aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/process.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2009-04-05 19:41:22 -0400
committerIngo Molnar <mingo@elte.hu>2009-04-05 19:41:22 -0400
commit9efe21cb82b5dbe3b0b2ae4de4eccc64ecb94e95 (patch)
tree7ff8833745d2f268f897f6fa4a27263b4a572245 /arch/x86/kernel/process.c
parentde18836e447c2dc30120c0919b8db8ddc0401cc4 (diff)
parent0221c81b1b8eb0cbb6b30a0ced52ead32d2b4e4c (diff)
Merge branch 'linus' into irq/threaded
Conflicts: include/linux/irq.h kernel/irq/handle.c
Diffstat (limited to 'arch/x86/kernel/process.c')
-rw-r--r--arch/x86/kernel/process.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/arch/x86/kernel/process.c b/arch/x86/kernel/process.c
index 78533a519d8f..ca989158e847 100644
--- a/arch/x86/kernel/process.c
+++ b/arch/x86/kernel/process.c
@@ -8,7 +8,7 @@
8#include <linux/module.h> 8#include <linux/module.h>
9#include <linux/pm.h> 9#include <linux/pm.h>
10#include <linux/clockchips.h> 10#include <linux/clockchips.h>
11#include <linux/ftrace.h> 11#include <trace/power.h>
12#include <asm/system.h> 12#include <asm/system.h>
13#include <asm/apic.h> 13#include <asm/apic.h>
14#include <asm/idle.h> 14#include <asm/idle.h>
@@ -22,6 +22,9 @@ EXPORT_SYMBOL(idle_nomwait);
22 22
23struct kmem_cache *task_xstate_cachep; 23struct kmem_cache *task_xstate_cachep;
24 24
25DEFINE_TRACE(power_start);
26DEFINE_TRACE(power_end);
27
25int arch_dup_task_struct(struct task_struct *dst, struct task_struct *src) 28int arch_dup_task_struct(struct task_struct *dst, struct task_struct *src)
26{ 29{
27 *dst = *src; 30 *dst = *src;
@@ -65,11 +68,11 @@ void exit_thread(void)
65{ 68{
66 struct task_struct *me = current; 69 struct task_struct *me = current;
67 struct thread_struct *t = &me->thread; 70 struct thread_struct *t = &me->thread;
71 unsigned long *bp = t->io_bitmap_ptr;
68 72
69 if (me->thread.io_bitmap_ptr) { 73 if (bp) {
70 struct tss_struct *tss = &per_cpu(init_tss, get_cpu()); 74 struct tss_struct *tss = &per_cpu(init_tss, get_cpu());
71 75
72 kfree(t->io_bitmap_ptr);
73 t->io_bitmap_ptr = NULL; 76 t->io_bitmap_ptr = NULL;
74 clear_thread_flag(TIF_IO_BITMAP); 77 clear_thread_flag(TIF_IO_BITMAP);
75 /* 78 /*
@@ -78,6 +81,7 @@ void exit_thread(void)
78 memset(tss->io_bitmap, 0xff, t->io_bitmap_max); 81 memset(tss->io_bitmap, 0xff, t->io_bitmap_max);
79 t->io_bitmap_max = 0; 82 t->io_bitmap_max = 0;
80 put_cpu(); 83 put_cpu();
84 kfree(bp);
81 } 85 }
82 86
83 ds_exit_thread(current); 87 ds_exit_thread(current);