x86: unify TASK_ALIGN definitions
authorGlauber de Oliveira Costa <gcosta@redhat.com>
Wed, 30 Jan 2008 12:31:31 +0000 (13:31 +0100)
committerIngo Molnar <mingo@elte.hu>
Wed, 30 Jan 2008 12:31:31 +0000 (13:31 +0100)
This patch moves the TASK_ALIGN constraints to common header.
The base of it is the same for x86_64 and i386. The only difference
is the presence of vSMP in x86_64. As it's not a worry in i386, we can
safely use the same code for both.

Signed-off-by: Glauber de Oliveira Costa <gcosta@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
include/asm-x86/processor.h
include/asm-x86/processor_32.h
include/asm-x86/processor_64.h

index 0e82ad5a22a4325993e206a31a1708b16b37f3fa..8b56c23f043d4165d788e5fe1a24a14f27d783e6 100644 (file)
@@ -22,6 +22,14 @@ static inline void *current_text_addr(void)
        return pc;
 }
 
+#ifdef CONFIG_X86_VSMP
+#define ARCH_MIN_TASKALIGN     (1 << INTERNODE_CACHE_SHIFT)
+#define ARCH_MIN_MMSTRUCT_ALIGN        (1 << INTERNODE_CACHE_SHIFT)
+#else
+#define ARCH_MIN_TASKALIGN     16
+#define ARCH_MIN_MMSTRUCT_ALIGN        0
+#endif
+
 static inline void native_cpuid(unsigned int *eax, unsigned int *ebx,
                                         unsigned int *ecx, unsigned int *edx)
 {
index 8cb05cec3cb9bfb3554d6e514cfa85b3e28be32b..8380243a19d37a8e9650b192317c6f69575ae9d8 100644 (file)
@@ -174,7 +174,6 @@ typedef struct {
        unsigned long seg;
 } mm_segment_t;
 
-#define ARCH_MIN_TASKALIGN     16
 
 #define INIT_THREAD  {                                                 \
        .sp0 = sizeof(init_stack) + (long)&init_stack,                  \
index 4b4ec3d7991024c073a90c0e492bffdc0dbbc473..7fe5c1461c836a7c3bade2c994cfc1b8f00cb9f3 100644 (file)
@@ -117,14 +117,6 @@ struct orig_ist {
 };
 DECLARE_PER_CPU(struct orig_ist, orig_ist);
 
-#ifdef CONFIG_X86_VSMP
-#define ARCH_MIN_TASKALIGN     (1 << INTERNODE_CACHE_SHIFT)
-#define ARCH_MIN_MMSTRUCT_ALIGN        (1 << INTERNODE_CACHE_SHIFT)
-#else
-#define ARCH_MIN_TASKALIGN     16
-#define ARCH_MIN_MMSTRUCT_ALIGN        0
-#endif
-
 #define INIT_THREAD  { \
        .sp0 = (unsigned long)&init_stack + sizeof(init_stack) \
 }