[PATCH] uml: S390 preparation, arch_align_stack
authorBodo Stroesser <bstroesser@fujitsu-siemens.com>
Sat, 7 May 2005 04:30:53 +0000 (21:30 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Sat, 7 May 2005 05:09:30 +0000 (22:09 -0700)
Only x86 and x86_64 use arch_align_stack(), all other subarches have:

 #define arch_align_stack(x) (x)

So, if this definition is found, UML's own arch_align_stack() should be
skipped.

Signed-off-by: Bodo Stroesser <bstroesser@fujitsu-siemens.com>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
arch/um/kernel/process_kern.c

index dea80d4357f09651c1f29204fdee19ca15f27ce7..3dcb080c44a04fbf57c9ce670d80af00a2b866b6 100644 (file)
@@ -466,12 +466,21 @@ int singlestepping(void * t)
        return 2;
 }
 
+/*
+ * Only x86 and x86_64 have an arch_align_stack().
+ * All other arches have "#define arch_align_stack(x) (x)"
+ * in their asm/system.h
+ * As this is included in UML from asm-um/system-generic.h,
+ * we can use it to behave as the subarch does.
+ */
+#ifndef arch_align_stack
 unsigned long arch_align_stack(unsigned long sp)
 {
        if (randomize_va_space)
                sp -= get_random_int() % 8192;
        return sp & ~0xf;
 }
+#endif
 
 
 /*