Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 138493
b: refs/heads/master
c: d839088
h: refs/heads/master
i:
  138491: 3e90603
v: v3
  • Loading branch information
Anton Blanchard authored and Benjamin Herrenschmidt committed Feb 23, 2009
1 parent ce9bdb5 commit 02313e7
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 2dadb987e09995b2910c419cdfe2307e66537649
refs/heads/master: d839088caec6891a5070f0b1ce61031e458533a9
2 changes: 1 addition & 1 deletion trunk/arch/powerpc/include/asm/system.h
Original file line number Diff line number Diff line change
Expand Up @@ -531,7 +531,7 @@ __cmpxchg_local(volatile void *ptr, unsigned long old, unsigned long new,
#define cmpxchg64_local(ptr, o, n) __cmpxchg64_local_generic((ptr), (o), (n))
#endif

#define arch_align_stack(x) (x)
extern unsigned long arch_align_stack(unsigned long sp);

/* Used in very early kernel initialization. */
extern unsigned long reloc_offset(void);
Expand Down
9 changes: 9 additions & 0 deletions trunk/arch/powerpc/kernel/process.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@
#include <linux/utsname.h>
#include <linux/ftrace.h>
#include <linux/kernel_stat.h>
#include <linux/personality.h>
#include <linux/random.h>

#include <asm/pgtable.h>
#include <asm/uaccess.h>
Expand Down Expand Up @@ -1138,3 +1140,10 @@ void thread_info_cache_init(void)
}

#endif /* THREAD_SHIFT < PAGE_SHIFT */

unsigned long arch_align_stack(unsigned long sp)
{
if (!(current->personality & ADDR_NO_RANDOMIZE) && randomize_va_space)
sp -= get_random_int() & ~PAGE_MASK;
return sp & ~0xf;
}

0 comments on commit 02313e7

Please sign in to comment.