Skip to contentSkip to conversation

UML - S390 preparation, arch_align_stack

PATCH New Jeff Dike 1 participant 1 message May 6, 2005 User-mode Linux (UML)

lore
Share & tools
lore

Jeff Dike

author
#0 lore raw

PATCH 10/12 UML - S390 preparation, arch_align_stack

From: Bodo Stroesser <[email protected]>

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.

arch/um/kernel/process_kern.c +9 -0
Index: linux-2.6.11-mm/arch/um/kernel/process_kern.c
===================================================================
@@ -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
 
 
 /*

-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games.
Get your fingers limbered up and give it your best shot. 4 great events, 4 opportunities to win big! Highest score wins.NEC IT Guy Games. Play to win an NEC 61 plasma display. Visit http://www.necitguy.com/?r=20
_______________________________________________
User-mode-linux-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel