From f83b5e323f57d6e1f35a839d663e91cebe985e54 Mon Sep 17 00:00:00 2001 From: Ustyugov Roman Date: Fri, 23 Sep 2005 08:42:11 +0400 Subject: kbuild: set correct KBUILD_MODNAME when using well known kernel symbols as module names This patch fixes a problem when we use well known kernel symbols as module names. For example, if module source name is current.c, idle_stack.c or etc., we have a bad KBUILD_MODNAME value. For example, KBUILD_MODNAME will be "get_current()" instead of "current", or "(init_thread_union.stack)" instead of "idle_task". The trick is to define a stringify macro on the commandline - named KBUILD_STR for namespace reasons - and then to stringify the module name. There are a few uses of KBUILD_MODNAME throughout the tree but the usage is for debug and will not be harmed by this change so left untouched for now. While at it KBUILD_BASENAME was changed too. Any spinlock usage in the unix module would have created wrong section names without it. Usage in spinlock.h fixed so it no longer stringify KBUILD_BASENAME. Original patch from Ustyogov Roman - all bugs introduced by me. Signed-off-by: Sam Ravnborg --- include/linux/spinlock.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'include') diff --git a/include/linux/spinlock.h b/include/linux/spinlock.h index 0e9682c9def..799be674794 100644 --- a/include/linux/spinlock.h +++ b/include/linux/spinlock.h @@ -59,8 +59,7 @@ /* * Must define these before including other files, inline functions need them */ -#define LOCK_SECTION_NAME \ - ".text.lock." __stringify(KBUILD_BASENAME) +#define LOCK_SECTION_NAME ".text.lock."KBUILD_BASENAME #define LOCK_SECTION_START(extra) \ ".subsection 1\n\t" \ -- cgit v1.2.3 From 42f122c8f7e7134c824907358a5df94cfa38946d Mon Sep 17 00:00:00 2001 From: Brian Gerst Date: Tue, 27 Dec 2005 23:19:04 -0500 Subject: gitignore: asm-offsets.h Ignore asm-offsets.h for all arches. Signed-off-by: Brian Gerst Signed-off-by: Sam Ravnborg --- include/asm-mips/.gitignore | 1 - 1 file changed, 1 deletion(-) delete mode 100644 include/asm-mips/.gitignore (limited to 'include') diff --git a/include/asm-mips/.gitignore b/include/asm-mips/.gitignore deleted file mode 100644 index 4ec57ad5bc3..00000000000 --- a/include/asm-mips/.gitignore +++ /dev/null @@ -1 +0,0 @@ -asm_offsets.h -- cgit v1.2.3