* [PATCH 10/12] UML - S390 preparation, arch_align_stack
@ 2005-05-06 22:49 Jeff Dike
0 siblings, 0 replies; only message in thread
From: Jeff Dike @ 2005-05-06 22:49 UTC (permalink / raw)
To: torvalds, akpm; +Cc: linux-kernel, user-mode-linux-devel, Bodo Stroesser
From: Bodo Stroesser <bstroesser@fujitsu-siemens.com>
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>
Index: linux-2.6.11-mm/arch/um/kernel/process_kern.c
===================================================================
--- linux-2.6.11-mm.orig/arch/um/kernel/process_kern.c 2005-04-30 13:13:04.000000000 -0400
+++ linux-2.6.11-mm/arch/um/kernel/process_kern.c 2005-04-30 13:20:41.000000000 -0400
@@ -462,12 +462,21 @@
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
/*
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2005-05-06 22:58 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-05-06 22:49 [PATCH 10/12] UML - S390 preparation, arch_align_stack Jeff Dike
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®