Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

[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>

authored by

Bodo Stroesser and committed by
Linus Torvalds
b8bd0220 1f3be588

+9
+9
arch/um/kernel/process_kern.c
··· 466 466 return 2; 467 467 } 468 468 469 + /* 470 + * Only x86 and x86_64 have an arch_align_stack(). 471 + * All other arches have "#define arch_align_stack(x) (x)" 472 + * in their asm/system.h 473 + * As this is included in UML from asm-um/system-generic.h, 474 + * we can use it to behave as the subarch does. 475 + */ 476 + #ifndef arch_align_stack 469 477 unsigned long arch_align_stack(unsigned long sp) 470 478 { 471 479 if (randomize_va_space) 472 480 sp -= get_random_int() % 8192; 473 481 return sp & ~0xf; 474 482 } 483 + #endif 475 484 476 485 477 486 /*