Skip to content

Commit

Permalink
[PATCH] uml: S390 preparation, arch_align_stack
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Bodo Stroesser authored and Linus Torvalds committed May 7, 2005
1 parent 1f3be58 commit b8bd022
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions arch/um/kernel/process_kern.c
Original file line number Diff line number Diff line change
Expand Up @@ -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


/*
Expand Down

0 comments on commit b8bd022

Please sign in to comment.