* [PATCH] x86: unify module_{32|64}.h
@ 2007-12-18 12:04 Harvey Harrison
2007-12-18 17:27 ` Christoph Hellwig
2007-12-18 18:22 ` Sam Ravnborg
0 siblings, 2 replies; 3+ messages in thread
From: Harvey Harrison @ 2007-12-18 12:04 UTC (permalink / raw)
To: Ingo Molnar; +Cc: LKML, H. Peter Anvin, Thomas Gleixner
This adds one case to the MODULE_PROC_FAMILY block testing
for X86_64. There are no new things defined on X86_64 than
there were before.
Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
---
include/asm-x86/module.h | 83 +++++++++++++++++++++++++++++++++++++++++-
include/asm-x86/module_32.h | 75 --------------------------------------
include/asm-x86/module_64.h | 10 -----
3 files changed, 81 insertions(+), 87 deletions(-)
diff --git a/include/asm-x86/module.h b/include/asm-x86/module.h
index 2b2f18d..994837c 100644
--- a/include/asm-x86/module.h
+++ b/include/asm-x86/module.h
@@ -1,5 +1,84 @@
+#ifndef _ASM_MODULE_H
+#define _ASM_MODULE_H
+
+/* x86_32/64 are simple */
+struct mod_arch_specific
+{
+};
+
#ifdef CONFIG_X86_32
-# include "module_32.h"
+# define Elf_Shdr Elf32_Shdr
+# define Elf_Sym Elf32_Sym
+# define Elf_Ehdr Elf32_Ehdr
#else
-# include "module_64.h"
+# define Elf_Shdr Elf64_Shdr
+# define Elf_Sym Elf64_Sym
+# define Elf_Ehdr Elf64_Ehdr
#endif
+
+#ifdef CONFIG_X86_64
+/* X86_64 does not define MODULE_PROC_FAMILY */
+#elif defined CONFIG_M386
+#define MODULE_PROC_FAMILY "386 "
+#elif defined CONFIG_M486
+#define MODULE_PROC_FAMILY "486 "
+#elif defined CONFIG_M586
+#define MODULE_PROC_FAMILY "586 "
+#elif defined CONFIG_M586TSC
+#define MODULE_PROC_FAMILY "586TSC "
+#elif defined CONFIG_M586MMX
+#define MODULE_PROC_FAMILY "586MMX "
+#elif defined CONFIG_MCORE2
+#define MODULE_PROC_FAMILY "CORE2 "
+#elif defined CONFIG_M686
+#define MODULE_PROC_FAMILY "686 "
+#elif defined CONFIG_MPENTIUMII
+#define MODULE_PROC_FAMILY "PENTIUMII "
+#elif defined CONFIG_MPENTIUMIII
+#define MODULE_PROC_FAMILY "PENTIUMIII "
+#elif defined CONFIG_MPENTIUMM
+#define MODULE_PROC_FAMILY "PENTIUMM "
+#elif defined CONFIG_MPENTIUM4
+#define MODULE_PROC_FAMILY "PENTIUM4 "
+#elif defined CONFIG_MK6
+#define MODULE_PROC_FAMILY "K6 "
+#elif defined CONFIG_MK7
+#define MODULE_PROC_FAMILY "K7 "
+#elif defined CONFIG_MK8
+#define MODULE_PROC_FAMILY "K8 "
+#elif defined CONFIG_X86_ELAN
+#define MODULE_PROC_FAMILY "ELAN "
+#elif defined CONFIG_MCRUSOE
+#define MODULE_PROC_FAMILY "CRUSOE "
+#elif defined CONFIG_MEFFICEON
+#define MODULE_PROC_FAMILY "EFFICEON "
+#elif defined CONFIG_MWINCHIPC6
+#define MODULE_PROC_FAMILY "WINCHIPC6 "
+#elif defined CONFIG_MWINCHIP2
+#define MODULE_PROC_FAMILY "WINCHIP2 "
+#elif defined CONFIG_MWINCHIP3D
+#define MODULE_PROC_FAMILY "WINCHIP3D "
+#elif defined CONFIG_MCYRIXIII
+#define MODULE_PROC_FAMILY "CYRIXIII "
+#elif defined CONFIG_MVIAC3_2
+#define MODULE_PROC_FAMILY "VIAC3-2 "
+#elif defined CONFIG_MVIAC7
+#define MODULE_PROC_FAMILY "VIAC7 "
+#elif defined CONFIG_MGEODEGX1
+#define MODULE_PROC_FAMILY "GEODEGX1 "
+#elif defined CONFIG_MGEODE_LX
+#define MODULE_PROC_FAMILY "GEODE "
+#else
+#error unknown processor family
+#endif
+
+#ifdef CONFIG_X86_32
+# ifdef CONFIG_4KSTACKS
+# define MODULE_STACKSIZE "4KSTACKS "
+# else
+# define MODULE_STACKSIZE ""
+# endif
+# define MODULE_ARCH_VERMAGIC MODULE_PROC_FAMILY MODULE_STACKSIZE
+#endif
+
+#endif /* _ASM_MODULE_H */
diff --git a/include/asm-x86/module_32.h b/include/asm-x86/module_32.h
deleted file mode 100644
index 7e5fda6..0000000
--- a/include/asm-x86/module_32.h
+++ /dev/null
@@ -1,75 +0,0 @@
-#ifndef _ASM_I386_MODULE_H
-#define _ASM_I386_MODULE_H
-
-/* x86 is simple */
-struct mod_arch_specific
-{
-};
-
-#define Elf_Shdr Elf32_Shdr
-#define Elf_Sym Elf32_Sym
-#define Elf_Ehdr Elf32_Ehdr
-
-#ifdef CONFIG_M386
-#define MODULE_PROC_FAMILY "386 "
-#elif defined CONFIG_M486
-#define MODULE_PROC_FAMILY "486 "
-#elif defined CONFIG_M586
-#define MODULE_PROC_FAMILY "586 "
-#elif defined CONFIG_M586TSC
-#define MODULE_PROC_FAMILY "586TSC "
-#elif defined CONFIG_M586MMX
-#define MODULE_PROC_FAMILY "586MMX "
-#elif defined CONFIG_MCORE2
-#define MODULE_PROC_FAMILY "CORE2 "
-#elif defined CONFIG_M686
-#define MODULE_PROC_FAMILY "686 "
-#elif defined CONFIG_MPENTIUMII
-#define MODULE_PROC_FAMILY "PENTIUMII "
-#elif defined CONFIG_MPENTIUMIII
-#define MODULE_PROC_FAMILY "PENTIUMIII "
-#elif defined CONFIG_MPENTIUMM
-#define MODULE_PROC_FAMILY "PENTIUMM "
-#elif defined CONFIG_MPENTIUM4
-#define MODULE_PROC_FAMILY "PENTIUM4 "
-#elif defined CONFIG_MK6
-#define MODULE_PROC_FAMILY "K6 "
-#elif defined CONFIG_MK7
-#define MODULE_PROC_FAMILY "K7 "
-#elif defined CONFIG_MK8
-#define MODULE_PROC_FAMILY "K8 "
-#elif defined CONFIG_X86_ELAN
-#define MODULE_PROC_FAMILY "ELAN "
-#elif defined CONFIG_MCRUSOE
-#define MODULE_PROC_FAMILY "CRUSOE "
-#elif defined CONFIG_MEFFICEON
-#define MODULE_PROC_FAMILY "EFFICEON "
-#elif defined CONFIG_MWINCHIPC6
-#define MODULE_PROC_FAMILY "WINCHIPC6 "
-#elif defined CONFIG_MWINCHIP2
-#define MODULE_PROC_FAMILY "WINCHIP2 "
-#elif defined CONFIG_MWINCHIP3D
-#define MODULE_PROC_FAMILY "WINCHIP3D "
-#elif defined CONFIG_MCYRIXIII
-#define MODULE_PROC_FAMILY "CYRIXIII "
-#elif defined CONFIG_MVIAC3_2
-#define MODULE_PROC_FAMILY "VIAC3-2 "
-#elif defined CONFIG_MVIAC7
-#define MODULE_PROC_FAMILY "VIAC7 "
-#elif defined CONFIG_MGEODEGX1
-#define MODULE_PROC_FAMILY "GEODEGX1 "
-#elif defined CONFIG_MGEODE_LX
-#define MODULE_PROC_FAMILY "GEODE "
-#else
-#error unknown processor family
-#endif
-
-#ifdef CONFIG_4KSTACKS
-#define MODULE_STACKSIZE "4KSTACKS "
-#else
-#define MODULE_STACKSIZE ""
-#endif
-
-#define MODULE_ARCH_VERMAGIC MODULE_PROC_FAMILY MODULE_STACKSIZE
-
-#endif /* _ASM_I386_MODULE_H */
diff --git a/include/asm-x86/module_64.h b/include/asm-x86/module_64.h
deleted file mode 100644
index 67f8f69..0000000
--- a/include/asm-x86/module_64.h
+++ /dev/null
@@ -1,10 +0,0 @@
-#ifndef _ASM_X8664_MODULE_H
-#define _ASM_X8664_MODULE_H
-
-struct mod_arch_specific {};
-
-#define Elf_Shdr Elf64_Shdr
-#define Elf_Sym Elf64_Sym
-#define Elf_Ehdr Elf64_Ehdr
-
-#endif
--
1.5.4.rc0.1143.g1a8a
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH] x86: unify module_{32|64}.h
2007-12-18 12:04 [PATCH] x86: unify module_{32|64}.h Harvey Harrison
@ 2007-12-18 17:27 ` Christoph Hellwig
2007-12-18 18:22 ` Sam Ravnborg
1 sibling, 0 replies; 3+ messages in thread
From: Christoph Hellwig @ 2007-12-18 17:27 UTC (permalink / raw)
To: Harvey Harrison; +Cc: Ingo Molnar, LKML, H. Peter Anvin, Thomas Gleixner
On Tue, Dec 18, 2007 at 04:04:30AM -0800, Harvey Harrison wrote:
> +/* x86_32/64 are simple */
> +struct mod_arch_specific
> +{
> +};
<nitpick> what about just /* x86 is simple */ </nitpick>
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] x86: unify module_{32|64}.h
2007-12-18 12:04 [PATCH] x86: unify module_{32|64}.h Harvey Harrison
2007-12-18 17:27 ` Christoph Hellwig
@ 2007-12-18 18:22 ` Sam Ravnborg
1 sibling, 0 replies; 3+ messages in thread
From: Sam Ravnborg @ 2007-12-18 18:22 UTC (permalink / raw)
To: Harvey Harrison; +Cc: Ingo Molnar, LKML, H. Peter Anvin, Thomas Gleixner
On Tue, Dec 18, 2007 at 04:04:30AM -0800, Harvey Harrison wrote:
> This adds one case to the MODULE_PROC_FAMILY block testing
> for X86_64. There are no new things defined on X86_64 than
> there were before.
>
> Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
> ---
> include/asm-x86/module.h | 83 +++++++++++++++++++++++++++++++++++++++++-
> include/asm-x86/module_32.h | 75 --------------------------------------
> include/asm-x86/module_64.h | 10 -----
> 3 files changed, 81 insertions(+), 87 deletions(-)
>
> diff --git a/include/asm-x86/module.h b/include/asm-x86/module.h
> index 2b2f18d..994837c 100644
> --- a/include/asm-x86/module.h
> +++ b/include/asm-x86/module.h
> @@ -1,5 +1,84 @@
> +#ifndef _ASM_MODULE_H
> +#define _ASM_MODULE_H
> +
> +/* x86_32/64 are simple */
> +struct mod_arch_specific
> +{
> +};
> +
> #ifdef CONFIG_X86_32
> -# include "module_32.h"
> +# define Elf_Shdr Elf32_Shdr
> +# define Elf_Sym Elf32_Sym
> +# define Elf_Ehdr Elf32_Ehdr
> #else
> -# include "module_64.h"
> +# define Elf_Shdr Elf64_Shdr
> +# define Elf_Sym Elf64_Sym
> +# define Elf_Ehdr Elf64_Ehdr
> #endif
> +
> +#ifdef CONFIG_X86_64
> +/* X86_64 does not define MODULE_PROC_FAMILY */
Why is MODULE_PROC_FAMILY not relevant for 64 bit x86?
Introducing it does not belong to a unification patch,
but a follow-up patch. But I guess we would like to distingush
on te selected processor when testing module compatibility
also for 64 bit x86.
Sam
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2007-12-18 18:22 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-12-18 12:04 [PATCH] x86: unify module_{32|64}.h Harvey Harrison
2007-12-18 17:27 ` Christoph Hellwig
2007-12-18 18:22 ` Sam Ravnborg
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox