aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/process_32.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/kernel/process_32.c')
-rw-r--r--arch/x86/kernel/process_32.c17
1 files changed, 1 insertions, 16 deletions
diff --git a/arch/x86/kernel/process_32.c b/arch/x86/kernel/process_32.c
index b5e4bfef4472..59f4524984af 100644
--- a/arch/x86/kernel/process_32.c
+++ b/arch/x86/kernel/process_32.c
@@ -9,8 +9,6 @@
9 * This file handles the architecture-dependent parts of process handling.. 9 * This file handles the architecture-dependent parts of process handling..
10 */ 10 */
11 11
12#include <stdarg.h>
13
14#include <linux/stackprotector.h> 12#include <linux/stackprotector.h>
15#include <linux/cpu.h> 13#include <linux/cpu.h>
16#include <linux/errno.h> 14#include <linux/errno.h>
@@ -33,7 +31,6 @@
33#include <linux/module.h> 31#include <linux/module.h>
34#include <linux/kallsyms.h> 32#include <linux/kallsyms.h>
35#include <linux/ptrace.h> 33#include <linux/ptrace.h>
36#include <linux/random.h>
37#include <linux/personality.h> 34#include <linux/personality.h>
38#include <linux/tick.h> 35#include <linux/tick.h>
39#include <linux/percpu.h> 36#include <linux/percpu.h>
@@ -408,7 +405,7 @@ __switch_to(struct task_struct *prev_p, struct task_struct *next_p)
408 * done before math_state_restore, so the TS bit is up 405 * done before math_state_restore, so the TS bit is up
409 * to date. 406 * to date.
410 */ 407 */
411 arch_leave_lazy_cpu_mode(); 408 arch_end_context_switch(next_p);
412 409
413 /* If the task has used fpu the last 5 timeslices, just do a full 410 /* If the task has used fpu the last 5 timeslices, just do a full
414 * restore of the math state immediately to avoid the trap; the 411 * restore of the math state immediately to avoid the trap; the
@@ -498,15 +495,3 @@ unsigned long get_wchan(struct task_struct *p)
498 return 0; 495 return 0;
499} 496}
500 497
501unsigned long arch_align_stack(unsigned long sp)
502{
503 if (!(current->personality & ADDR_NO_RANDOMIZE) && randomize_va_space)
504 sp -= get_random_int() % 8192;
505 return sp & ~0xf;
506}
507
508unsigned long arch_randomize_brk(struct mm_struct *mm)
509{
510 unsigned long range_end = mm->brk + 0x02000000;
511 return randomize_range(mm->brk, range_end, 0) ? : mm->brk;
512}