diff options
author | Bodo Stroesser <bstroesser@fujitsu-siemens.com> | 2005-05-07 04:30:53 (GMT) |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-05-07 05:09:30 (GMT) |
commit | b8bd0220c1ac6273eda66e25d992654219f846b6 (patch) | |
tree | 62ffb77c57261813fc8da66ce7ae404df313cff9 /arch | |
parent | 1f3be588b51e809476cdecd4eaf6fd04670d9c36 (diff) | |
download | linux-fsl-qoriq-b8bd0220c1ac6273eda66e25d992654219f846b6.tar.xz |
[PATCH] uml: S390 preparation, arch_align_stack
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>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/um/kernel/process_kern.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/um/kernel/process_kern.c b/arch/um/kernel/process_kern.c index dea80d4..3dcb080 100644 --- a/arch/um/kernel/process_kern.c +++ b/arch/um/kernel/process_kern.c @@ -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 /* |