diff options
Diffstat (limited to 'arch')
54 files changed, 138 insertions, 153 deletions
diff --git a/arch/avr32/Makefile b/arch/avr32/Makefile index 6115fc1f0cfa..dc6bc01f232c 100644 --- a/arch/avr32/Makefile +++ b/arch/avr32/Makefile | |||
@@ -16,7 +16,7 @@ AFLAGS += -mrelax -mno-pic | |||
16 | CFLAGS_MODULE += -mno-relax | 16 | CFLAGS_MODULE += -mno-relax |
17 | LDFLAGS_vmlinux += --relax | 17 | LDFLAGS_vmlinux += --relax |
18 | 18 | ||
19 | cpuflags-$(CONFIG_CPU_AP7000) += -mcpu=ap7000 | 19 | cpuflags-$(CONFIG_CPU_AT32AP7000) += -mcpu=ap7000 |
20 | 20 | ||
21 | CFLAGS += $(cpuflags-y) | 21 | CFLAGS += $(cpuflags-y) |
22 | AFLAGS += $(cpuflags-y) | 22 | AFLAGS += $(cpuflags-y) |
diff --git a/arch/avr32/kernel/process.c b/arch/avr32/kernel/process.c index 4e4181ed1c6d..13f988402613 100644 --- a/arch/avr32/kernel/process.c +++ b/arch/avr32/kernel/process.c | |||
@@ -330,13 +330,13 @@ int copy_thread(int nr, unsigned long clone_flags, unsigned long usp, | |||
330 | { | 330 | { |
331 | struct pt_regs *childregs; | 331 | struct pt_regs *childregs; |
332 | 332 | ||
333 | childregs = ((struct pt_regs *)(THREAD_SIZE + (unsigned long)p->thread_info)) - 1; | 333 | childregs = ((struct pt_regs *)(THREAD_SIZE + (unsigned long)task_stack_page(p))) - 1; |
334 | *childregs = *regs; | 334 | *childregs = *regs; |
335 | 335 | ||
336 | if (user_mode(regs)) | 336 | if (user_mode(regs)) |
337 | childregs->sp = usp; | 337 | childregs->sp = usp; |
338 | else | 338 | else |
339 | childregs->sp = (unsigned long)p->thread_info + THREAD_SIZE; | 339 | childregs->sp = (unsigned long)task_stack_page(p) + THREAD_SIZE; |
340 | 340 | ||
341 | childregs->r12 = 0; /* Set return value for child */ | 341 | childregs->r12 = 0; /* Set return value for child */ |
342 | 342 | ||
@@ -403,7 +403,7 @@ unsigned long get_wchan(struct task_struct *p) | |||
403 | if (!p || p == current || p->state == TASK_RUNNING) | 403 | if (!p || p == current || p->state == TASK_RUNNING) |
404 | return 0; | 404 | return 0; |
405 | 405 | ||
406 | stack_page = (unsigned long)p->thread_info; | 406 | stack_page = (unsigned long)task_stack_page(p); |
407 | BUG_ON(!stack_page); | 407 | BUG_ON(!stack_page); |
408 | 408 | ||
409 | /* | 409 | /* |
diff --git a/arch/avr32/kernel/ptrace.c b/arch/avr32/kernel/ptrace.c index 8ac74dddbbde..3c36c2d16148 100644 --- a/arch/avr32/kernel/ptrace.c +++ b/arch/avr32/kernel/ptrace.c | |||
@@ -24,7 +24,7 @@ | |||
24 | 24 | ||
25 | static struct pt_regs *get_user_regs(struct task_struct *tsk) | 25 | static struct pt_regs *get_user_regs(struct task_struct *tsk) |
26 | { | 26 | { |
27 | return (struct pt_regs *)((unsigned long) tsk->thread_info + | 27 | return (struct pt_regs *)((unsigned long)task_stack_page(tsk) + |
28 | THREAD_SIZE - sizeof(struct pt_regs)); | 28 | THREAD_SIZE - sizeof(struct pt_regs)); |
29 | } | 29 | } |
30 | 30 | ||
diff --git a/arch/avr32/kernel/syscall_table.S b/arch/avr32/kernel/syscall_table.S index 7c279586fbba..07f6a6fa340d 100644 --- a/arch/avr32/kernel/syscall_table.S +++ b/arch/avr32/kernel/syscall_table.S | |||
@@ -291,4 +291,5 @@ sys_call_table: | |||
291 | .long sys_shmget /* 275 */ | 291 | .long sys_shmget /* 275 */ |
292 | .long sys_shmdt | 292 | .long sys_shmdt |
293 | .long sys_shmctl | 293 | .long sys_shmctl |
294 | .long sys_utimensat | ||
294 | .long sys_ni_syscall /* r8 is saturated at nr_syscalls */ | 295 | .long sys_ni_syscall /* r8 is saturated at nr_syscalls */ |
diff --git a/arch/avr32/kernel/traps.c b/arch/avr32/kernel/traps.c index 4de9edf96ed2..86d107511dd4 100644 --- a/arch/avr32/kernel/traps.c +++ b/arch/avr32/kernel/traps.c | |||
@@ -123,7 +123,7 @@ asmlinkage void do_address_exception(unsigned long ecr, struct pt_regs *regs) | |||
123 | 123 | ||
124 | /* This way of handling undefined instructions is stolen from ARM */ | 124 | /* This way of handling undefined instructions is stolen from ARM */ |
125 | static LIST_HEAD(undef_hook); | 125 | static LIST_HEAD(undef_hook); |
126 | static spinlock_t undef_lock = SPIN_LOCK_UNLOCKED; | 126 | static DEFINE_SPINLOCK(undef_lock); |
127 | 127 | ||
128 | void register_undef_hook(struct undef_hook *hook) | 128 | void register_undef_hook(struct undef_hook *hook) |
129 | { | 129 | { |
diff --git a/arch/avr32/kernel/vmlinux.lds.c b/arch/avr32/kernel/vmlinux.lds.c index 7ad20cfb48a8..e7f72c995a32 100644 --- a/arch/avr32/kernel/vmlinux.lds.c +++ b/arch/avr32/kernel/vmlinux.lds.c | |||
@@ -35,7 +35,7 @@ SECTIONS | |||
35 | _einittext = .; | 35 | _einittext = .; |
36 | . = ALIGN(4); | 36 | . = ALIGN(4); |
37 | __tagtable_begin = .; | 37 | __tagtable_begin = .; |
38 | *(.taglist) | 38 | *(.taglist.init) |
39 | __tagtable_end = .; | 39 | __tagtable_end = .; |
40 | *(.init.data) | 40 | *(.init.data) |
41 | . = ALIGN(16); | 41 | . = ALIGN(16); |
diff --git a/arch/avr32/mach-at32ap/clock.c b/arch/avr32/mach-at32ap/clock.c index 00c435452d7e..0f8c89c9f832 100644 --- a/arch/avr32/mach-at32ap/clock.c +++ b/arch/avr32/mach-at32ap/clock.c | |||
@@ -18,7 +18,7 @@ | |||
18 | 18 | ||
19 | #include "clock.h" | 19 | #include "clock.h" |
20 | 20 | ||
21 | static spinlock_t clk_lock = SPIN_LOCK_UNLOCKED; | 21 | static DEFINE_SPINLOCK(clk_lock); |
22 | 22 | ||
23 | struct clk *clk_get(struct device *dev, const char *id) | 23 | struct clk *clk_get(struct device *dev, const char *id) |
24 | { | 24 | { |
diff --git a/arch/avr32/mm/dma-coherent.c b/arch/avr32/mm/dma-coherent.c index b68d669f823d..099212d4567c 100644 --- a/arch/avr32/mm/dma-coherent.c +++ b/arch/avr32/mm/dma-coherent.c | |||
@@ -112,16 +112,21 @@ void dma_free_coherent(struct device *dev, size_t size, | |||
112 | } | 112 | } |
113 | EXPORT_SYMBOL(dma_free_coherent); | 113 | EXPORT_SYMBOL(dma_free_coherent); |
114 | 114 | ||
115 | #if 0 | ||
116 | void *dma_alloc_writecombine(struct device *dev, size_t size, | 115 | void *dma_alloc_writecombine(struct device *dev, size_t size, |
117 | dma_addr_t *handle, gfp_t gfp) | 116 | dma_addr_t *handle, gfp_t gfp) |
118 | { | 117 | { |
119 | struct page *page; | 118 | struct page *page; |
119 | dma_addr_t phys; | ||
120 | 120 | ||
121 | page = __dma_alloc(dev, size, handle, gfp); | 121 | page = __dma_alloc(dev, size, handle, gfp); |
122 | if (!page) | ||
123 | return NULL; | ||
124 | |||
125 | phys = page_to_phys(page); | ||
126 | *handle = phys; | ||
122 | 127 | ||
123 | /* Now, map the page into P3 with write-combining turned on */ | 128 | /* Now, map the page into P3 with write-combining turned on */ |
124 | return __ioremap(page_to_phys(page), size, _PAGE_BUFFER); | 129 | return __ioremap(phys, size, _PAGE_BUFFER); |
125 | } | 130 | } |
126 | EXPORT_SYMBOL(dma_alloc_writecombine); | 131 | EXPORT_SYMBOL(dma_alloc_writecombine); |
127 | 132 | ||
@@ -132,8 +137,7 @@ void dma_free_writecombine(struct device *dev, size_t size, | |||
132 | 137 | ||
133 | iounmap(cpu_addr); | 138 | iounmap(cpu_addr); |
134 | 139 | ||
135 | page = bus_to_page(handle); | 140 | page = phys_to_page(handle); |
136 | __dma_free(dev, size, page, handle); | 141 | __dma_free(dev, size, page, handle); |
137 | } | 142 | } |
138 | EXPORT_SYMBOL(dma_free_writecombine); | 143 | EXPORT_SYMBOL(dma_free_writecombine); |
139 | #endif | ||
diff --git a/arch/blackfin/kernel/asm-offsets.c b/arch/blackfin/kernel/asm-offsets.c index 41d9a9f89700..e455f4504509 100644 --- a/arch/blackfin/kernel/asm-offsets.c +++ b/arch/blackfin/kernel/asm-offsets.c | |||
@@ -46,7 +46,7 @@ int main(void) | |||
46 | DEFINE(TASK_PTRACE, offsetof(struct task_struct, ptrace)); | 46 | DEFINE(TASK_PTRACE, offsetof(struct task_struct, ptrace)); |
47 | DEFINE(TASK_BLOCKED, offsetof(struct task_struct, blocked)); | 47 | DEFINE(TASK_BLOCKED, offsetof(struct task_struct, blocked)); |
48 | DEFINE(TASK_THREAD, offsetof(struct task_struct, thread)); | 48 | DEFINE(TASK_THREAD, offsetof(struct task_struct, thread)); |
49 | DEFINE(TASK_THREAD_INFO, offsetof(struct task_struct, thread_info)); | 49 | DEFINE(TASK_THREAD_INFO, offsetof(struct task_struct, stack)); |
50 | DEFINE(TASK_MM, offsetof(struct task_struct, mm)); | 50 | DEFINE(TASK_MM, offsetof(struct task_struct, mm)); |
51 | DEFINE(TASK_ACTIVE_MM, offsetof(struct task_struct, active_mm)); | 51 | DEFINE(TASK_ACTIVE_MM, offsetof(struct task_struct, active_mm)); |
52 | DEFINE(TASK_SIGPENDING, offsetof(struct task_struct, pending)); | 52 | DEFINE(TASK_SIGPENDING, offsetof(struct task_struct, pending)); |
diff --git a/arch/blackfin/kernel/ptrace.c b/arch/blackfin/kernel/ptrace.c index d7c8e514cb92..e718bb4a1ef0 100644 --- a/arch/blackfin/kernel/ptrace.c +++ b/arch/blackfin/kernel/ptrace.c | |||
@@ -73,7 +73,7 @@ | |||
73 | static inline struct pt_regs *get_user_regs(struct task_struct *task) | 73 | static inline struct pt_regs *get_user_regs(struct task_struct *task) |
74 | { | 74 | { |
75 | return (struct pt_regs *) | 75 | return (struct pt_regs *) |
76 | ((unsigned long)task->thread_info + | 76 | ((unsigned long)task_stack_page(task) + |
77 | (THREAD_SIZE - sizeof(struct pt_regs))); | 77 | (THREAD_SIZE - sizeof(struct pt_regs))); |
78 | } | 78 | } |
79 | 79 | ||
@@ -99,7 +99,7 @@ static inline long get_reg(struct task_struct *task, int regno) | |||
99 | unsigned char *reg_ptr; | 99 | unsigned char *reg_ptr; |
100 | 100 | ||
101 | struct pt_regs *regs = | 101 | struct pt_regs *regs = |
102 | (struct pt_regs *)((unsigned long)task->thread_info + | 102 | (struct pt_regs *)((unsigned long)task_stack_page(task) + |
103 | (THREAD_SIZE - sizeof(struct pt_regs))); | 103 | (THREAD_SIZE - sizeof(struct pt_regs))); |
104 | reg_ptr = (char *)regs; | 104 | reg_ptr = (char *)regs; |
105 | 105 | ||
@@ -125,7 +125,7 @@ put_reg(struct task_struct *task, int regno, unsigned long data) | |||
125 | char * reg_ptr; | 125 | char * reg_ptr; |
126 | 126 | ||
127 | struct pt_regs *regs = | 127 | struct pt_regs *regs = |
128 | (struct pt_regs *)((unsigned long)task->thread_info + | 128 | (struct pt_regs *)((unsigned long)task_stack_page(task) + |
129 | (THREAD_SIZE - sizeof(struct pt_regs))); | 129 | (THREAD_SIZE - sizeof(struct pt_regs))); |
130 | reg_ptr = (char *)regs; | 130 | reg_ptr = (char *)regs; |
131 | 131 | ||
diff --git a/arch/frv/Kconfig b/arch/frv/Kconfig index eed694312a79..114738a45582 100644 --- a/arch/frv/Kconfig +++ b/arch/frv/Kconfig | |||
@@ -45,15 +45,15 @@ config TIME_LOW_RES | |||
45 | bool | 45 | bool |
46 | default y | 46 | default y |
47 | 47 | ||
48 | config ARCH_HAS_ILOG2_U32 | 48 | config QUICKLIST |
49 | bool | 49 | bool |
50 | default y | 50 | default y |
51 | 51 | ||
52 | config ARCH_HAS_ILOG2_U64 | 52 | config ARCH_HAS_ILOG2_U32 |
53 | bool | 53 | bool |
54 | default y | 54 | default y |
55 | 55 | ||
56 | config ARCH_USES_SLAB_PAGE_STRUCT | 56 | config ARCH_HAS_ILOG2_U64 |
57 | bool | 57 | bool |
58 | default y | 58 | default y |
59 | 59 | ||
diff --git a/arch/frv/kernel/process.c b/arch/frv/kernel/process.c index 515a5cea5469..9583a338e9d6 100644 --- a/arch/frv/kernel/process.c +++ b/arch/frv/kernel/process.c | |||
@@ -25,12 +25,14 @@ | |||
25 | #include <linux/elf.h> | 25 | #include <linux/elf.h> |
26 | #include <linux/reboot.h> | 26 | #include <linux/reboot.h> |
27 | #include <linux/interrupt.h> | 27 | #include <linux/interrupt.h> |
28 | #include <linux/pagemap.h> | ||
28 | 29 | ||
29 | #include <asm/asm-offsets.h> | 30 | #include <asm/asm-offsets.h> |
30 | #include <asm/uaccess.h> | 31 | #include <asm/uaccess.h> |
31 | #include <asm/system.h> | 32 | #include <asm/system.h> |
32 | #include <asm/setup.h> | 33 | #include <asm/setup.h> |
33 | #include <asm/pgtable.h> | 34 | #include <asm/pgtable.h> |
35 | #include <asm/tlb.h> | ||
34 | #include <asm/gdb-stub.h> | 36 | #include <asm/gdb-stub.h> |
35 | #include <asm/mb-regs.h> | 37 | #include <asm/mb-regs.h> |
36 | 38 | ||
@@ -88,6 +90,8 @@ void cpu_idle(void) | |||
88 | while (!need_resched()) { | 90 | while (!need_resched()) { |
89 | irq_stat[cpu].idle_timestamp = jiffies; | 91 | irq_stat[cpu].idle_timestamp = jiffies; |
90 | 92 | ||
93 | check_pgt_cache(); | ||
94 | |||
91 | if (!frv_dma_inprogress && idle) | 95 | if (!frv_dma_inprogress && idle) |
92 | idle(); | 96 | idle(); |
93 | } | 97 | } |
diff --git a/arch/frv/mm/pgalloc.c b/arch/frv/mm/pgalloc.c index 598a26ab8ad8..7787c3cc52c6 100644 --- a/arch/frv/mm/pgalloc.c +++ b/arch/frv/mm/pgalloc.c | |||
@@ -13,12 +13,12 @@ | |||
13 | #include <linux/slab.h> | 13 | #include <linux/slab.h> |
14 | #include <linux/mm.h> | 14 | #include <linux/mm.h> |
15 | #include <linux/highmem.h> | 15 | #include <linux/highmem.h> |
16 | #include <linux/quicklist.h> | ||
16 | #include <asm/pgalloc.h> | 17 | #include <asm/pgalloc.h> |
17 | #include <asm/page.h> | 18 | #include <asm/page.h> |
18 | #include <asm/cacheflush.h> | 19 | #include <asm/cacheflush.h> |
19 | 20 | ||
20 | pgd_t swapper_pg_dir[PTRS_PER_PGD] __attribute__((aligned(PAGE_SIZE))); | 21 | pgd_t swapper_pg_dir[PTRS_PER_PGD] __attribute__((aligned(PAGE_SIZE))); |
21 | struct kmem_cache *pgd_cache; | ||
22 | 22 | ||
23 | pte_t *pte_alloc_one_kernel(struct mm_struct *mm, unsigned long address) | 23 | pte_t *pte_alloc_one_kernel(struct mm_struct *mm, unsigned long address) |
24 | { | 24 | { |
@@ -100,7 +100,7 @@ static inline void pgd_list_del(pgd_t *pgd) | |||
100 | set_page_private(next, (unsigned long) pprev); | 100 | set_page_private(next, (unsigned long) pprev); |
101 | } | 101 | } |
102 | 102 | ||
103 | void pgd_ctor(void *pgd, struct kmem_cache *cache, unsigned long unused) | 103 | void pgd_ctor(void *pgd) |
104 | { | 104 | { |
105 | unsigned long flags; | 105 | unsigned long flags; |
106 | 106 | ||
@@ -120,7 +120,7 @@ void pgd_ctor(void *pgd, struct kmem_cache *cache, unsigned long unused) | |||
120 | } | 120 | } |
121 | 121 | ||
122 | /* never called when PTRS_PER_PMD > 1 */ | 122 | /* never called when PTRS_PER_PMD > 1 */ |
123 | void pgd_dtor(void *pgd, struct kmem_cache *cache, unsigned long unused) | 123 | void pgd_dtor(void *pgd) |
124 | { | 124 | { |
125 | unsigned long flags; /* can be called from interrupt context */ | 125 | unsigned long flags; /* can be called from interrupt context */ |
126 | 126 | ||
@@ -133,7 +133,7 @@ pgd_t *pgd_alloc(struct mm_struct *mm) | |||
133 | { | 133 | { |
134 | pgd_t *pgd; | 134 | pgd_t *pgd; |
135 | 135 | ||
136 | pgd = kmem_cache_alloc(pgd_cache, GFP_KERNEL); | 136 | pgd = quicklist_alloc(0, GFP_KERNEL, pgd_ctor); |
137 | if (!pgd) | 137 | if (!pgd) |
138 | return pgd; | 138 | return pgd; |
139 | 139 | ||
@@ -143,15 +143,15 @@ pgd_t *pgd_alloc(struct mm_struct *mm) | |||
143 | void pgd_free(pgd_t *pgd) | 143 | void pgd_free(pgd_t *pgd) |
144 | { | 144 | { |
145 | /* in the non-PAE case, clear_page_tables() clears user pgd entries */ | 145 | /* in the non-PAE case, clear_page_tables() clears user pgd entries */ |
146 | kmem_cache_free(pgd_cache, pgd); | 146 | quicklist_free(0, pgd_dtor, pgd); |
147 | } | 147 | } |
148 | 148 | ||
149 | void __init pgtable_cache_init(void) | 149 | void __init pgtable_cache_init(void) |
150 | { | 150 | { |
151 | pgd_cache = kmem_cache_create("pgd", | ||
152 | PTRS_PER_PGD * sizeof(pgd_t), | ||
153 | PTRS_PER_PGD * sizeof(pgd_t), | ||
154 | SLAB_PANIC, | ||
155 | pgd_ctor, | ||
156 | pgd_dtor); | ||
157 | } | 151 | } |
152 | |||
153 | void check_pgt_cache(void) | ||
154 | { | ||
155 | quicklist_trim(0, pgd_dtor, 25, 16); | ||
156 | } | ||
157 | |||
diff --git a/arch/h8300/kernel/asm-offsets.c b/arch/h8300/kernel/asm-offsets.c index b78b82ad28a3..fc30b4fd0914 100644 --- a/arch/h8300/kernel/asm-offsets.c +++ b/arch/h8300/kernel/asm-offsets.c | |||
@@ -30,7 +30,7 @@ int main(void) | |||
30 | DEFINE(TASK_PTRACE, offsetof(struct task_struct, ptrace)); | 30 | DEFINE(TASK_PTRACE, offsetof(struct task_struct, ptrace)); |
31 | DEFINE(TASK_BLOCKED, offsetof(struct task_struct, blocked)); | 31 | DEFINE(TASK_BLOCKED, offsetof(struct task_struct, blocked)); |
32 | DEFINE(TASK_THREAD, offsetof(struct task_struct, thread)); | 32 | DEFINE(TASK_THREAD, offsetof(struct task_struct, thread)); |
33 | DEFINE(TASK_THREAD_INFO, offsetof(struct task_struct, thread_info)); | 33 | DEFINE(TASK_THREAD_INFO, offsetof(struct task_struct, stack)); |
34 | DEFINE(TASK_MM, offsetof(struct task_struct, mm)); | 34 | DEFINE(TASK_MM, offsetof(struct task_struct, mm)); |
35 | DEFINE(TASK_ACTIVE_MM, offsetof(struct task_struct, active_mm)); | 35 | DEFINE(TASK_ACTIVE_MM, offsetof(struct task_struct, active_mm)); |
36 | 36 | ||
diff --git a/arch/i386/kernel/cpu/intel_cacheinfo.c b/arch/i386/kernel/cpu/intel_cacheinfo.c index 80b4c5d421b1..e5be819492ef 100644 --- a/arch/i386/kernel/cpu/intel_cacheinfo.c +++ b/arch/i386/kernel/cpu/intel_cacheinfo.c | |||
@@ -733,9 +733,11 @@ static int __cpuinit cacheinfo_cpu_callback(struct notifier_block *nfb, | |||
733 | sys_dev = get_cpu_sysdev(cpu); | 733 | sys_dev = get_cpu_sysdev(cpu); |
734 | switch (action) { | 734 | switch (action) { |
735 | case CPU_ONLINE: | 735 | case CPU_ONLINE: |
736 | case CPU_ONLINE_FROZEN: | ||
736 | cache_add_dev(sys_dev); | 737 | cache_add_dev(sys_dev); |
737 | break; | 738 | break; |
738 | case CPU_DEAD: | 739 | case CPU_DEAD: |
740 | case CPU_DEAD_FROZEN: | ||
739 | cache_remove_dev(sys_dev); | 741 | cache_remove_dev(sys_dev); |
740 | break; | 742 | break; |
741 | } | 743 | } |
diff --git a/arch/i386/kernel/cpu/mcheck/therm_throt.c b/arch/i386/kernel/cpu/mcheck/therm_throt.c index 2f28540caae2..7ba7c3abd3a4 100644 --- a/arch/i386/kernel/cpu/mcheck/therm_throt.c +++ b/arch/i386/kernel/cpu/mcheck/therm_throt.c | |||
@@ -137,10 +137,12 @@ static __cpuinit int thermal_throttle_cpu_callback(struct notifier_block *nfb, | |||
137 | mutex_lock(&therm_cpu_lock); | 137 | mutex_lock(&therm_cpu_lock); |
138 | switch (action) { | 138 | switch (action) { |
139 | case CPU_ONLINE: | 139 | case CPU_ONLINE: |
140 | case CPU_ONLINE_FROZEN: | ||
140 | err = thermal_throttle_add_dev(sys_dev); | 141 | err = thermal_throttle_add_dev(sys_dev); |
141 | WARN_ON(err); | 142 | WARN_ON(err); |
142 | break; | 143 | break; |
143 | case CPU_DEAD: | 144 | case CPU_DEAD: |
145 | case CPU_DEAD_FROZEN: | ||
144 | thermal_throttle_remove_dev(sys_dev); | 146 | thermal_throttle_remove_dev(sys_dev); |
145 | break; | 147 | break; |
146 | } | 148 | } |
diff --git a/arch/i386/kernel/cpu/transmeta.c b/arch/i386/kernel/cpu/transmeta.c index 6471a5a13202..200fb3f9ebfb 100644 --- a/arch/i386/kernel/cpu/transmeta.c +++ b/arch/i386/kernel/cpu/transmeta.c | |||
@@ -77,8 +77,10 @@ static void __cpuinit init_transmeta(struct cpuinfo_x86 *c) | |||
77 | set_bit(X86_FEATURE_CONSTANT_TSC, c->x86_capability); | 77 | set_bit(X86_FEATURE_CONSTANT_TSC, c->x86_capability); |
78 | 78 | ||
79 | /* If we can run i686 user-space code, call us an i686 */ | 79 | /* If we can run i686 user-space code, call us an i686 */ |
80 | #define USER686 (X86_FEATURE_TSC|X86_FEATURE_CX8|X86_FEATURE_CMOV) | 80 | #define USER686 ((1 << X86_FEATURE_TSC)|\ |
81 | if ( c->x86 == 5 && (c->x86_capability[0] & USER686) == USER686 ) | 81 | (1 << X86_FEATURE_CX8)|\ |
82 | (1 << X86_FEATURE_CMOV)) | ||
83 | if (c->x86 == 5 && (c->x86_capability[0] & USER686) == USER686) | ||
82 | c->x86 = 6; | 84 | c->x86 = 6; |
83 | 85 | ||
84 | #ifdef CONFIG_SYSCTL | 86 | #ifdef CONFIG_SYSCTL |
diff --git a/arch/i386/kernel/cpuid.c b/arch/i386/kernel/cpuid.c index eeae0d992337..5c2faa10e9fa 100644 --- a/arch/i386/kernel/cpuid.c +++ b/arch/i386/kernel/cpuid.c | |||
@@ -169,9 +169,11 @@ static int cpuid_class_cpu_callback(struct notifier_block *nfb, unsigned long ac | |||
169 | 169 | ||
170 | switch (action) { | 170 | switch (action) { |
171 | case CPU_ONLINE: | 171 | case CPU_ONLINE: |
172 | case CPU_ONLINE_FROZEN: | ||
172 | cpuid_device_create(cpu); | 173 | cpuid_device_create(cpu); |
173 | break; | 174 | break; |
174 | case CPU_DEAD: | 175 | case CPU_DEAD: |
176 | case CPU_DEAD_FROZEN: | ||
175 | device_destroy(cpuid_class, MKDEV(CPUID_MAJOR, cpu)); | 177 | device_destroy(cpuid_class, MKDEV(CPUID_MAJOR, cpu)); |
176 | break; | 178 | break; |
177 | } | 179 | } |
diff --git a/arch/i386/kernel/microcode.c b/arch/i386/kernel/microcode.c index cbe7ec8dbb9f..83f825f2e2d7 100644 --- a/arch/i386/kernel/microcode.c +++ b/arch/i386/kernel/microcode.c | |||
@@ -567,7 +567,7 @@ static int cpu_request_microcode(int cpu) | |||
567 | return error; | 567 | return error; |
568 | } | 568 | } |
569 | 569 | ||
570 | static int apply_microcode_on_cpu(int cpu) | 570 | static int apply_microcode_check_cpu(int cpu) |
571 | { | 571 | { |
572 | struct cpuinfo_x86 *c = cpu_data + cpu; | 572 | struct cpuinfo_x86 *c = cpu_data + cpu; |
573 | struct ucode_cpu_info *uci = ucode_cpu_info + cpu; | 573 | struct ucode_cpu_info *uci = ucode_cpu_info + cpu; |
@@ -575,8 +575,9 @@ static int apply_microcode_on_cpu(int cpu) | |||
575 | unsigned int val[2]; | 575 | unsigned int val[2]; |
576 | int err = 0; | 576 | int err = 0; |
577 | 577 | ||
578 | /* Check if the microcode is available */ | ||
578 | if (!uci->mc) | 579 | if (!uci->mc) |
579 | return -EINVAL; | 580 | return 0; |
580 | 581 | ||
581 | old = current->cpus_allowed; | 582 | old = current->cpus_allowed; |
582 | set_cpus_allowed(current, cpumask_of_cpu(cpu)); | 583 | set_cpus_allowed(current, cpumask_of_cpu(cpu)); |
@@ -614,7 +615,7 @@ static int apply_microcode_on_cpu(int cpu) | |||
614 | return err; | 615 | return err; |
615 | } | 616 | } |
616 | 617 | ||
617 | static void microcode_init_cpu(int cpu) | 618 | static void microcode_init_cpu(int cpu, int resume) |
618 | { | 619 | { |
619 | cpumask_t old; | 620 | cpumask_t old; |
620 | struct ucode_cpu_info *uci = ucode_cpu_info + cpu; | 621 | struct ucode_cpu_info *uci = ucode_cpu_info + cpu; |
@@ -624,8 +625,7 @@ static void microcode_init_cpu(int cpu) | |||
624 | set_cpus_allowed(current, cpumask_of_cpu(cpu)); | 625 | set_cpus_allowed(current, cpumask_of_cpu(cpu)); |
625 | mutex_lock(µcode_mutex); | 626 | mutex_lock(µcode_mutex); |
626 | collect_cpu_info(cpu); | 627 | collect_cpu_info(cpu); |
627 | if (uci->valid && system_state == SYSTEM_RUNNING && | 628 | if (uci->valid && system_state == SYSTEM_RUNNING && !resume) |
628 | !suspend_cpu_hotplug) | ||
629 | cpu_request_microcode(cpu); | 629 | cpu_request_microcode(cpu); |
630 | mutex_unlock(µcode_mutex); | 630 | mutex_unlock(µcode_mutex); |
631 | set_cpus_allowed(current, old); | 631 | set_cpus_allowed(current, old); |
@@ -702,7 +702,7 @@ static struct attribute_group mc_attr_group = { | |||
702 | .name = "microcode", | 702 | .name = "microcode", |
703 | }; | 703 | }; |
704 | 704 | ||
705 | static int mc_sysdev_add(struct sys_device *sys_dev) | 705 | static int __mc_sysdev_add(struct sys_device *sys_dev, int resume) |
706 | { | 706 | { |
707 | int err, cpu = sys_dev->id; | 707 | int err, cpu = sys_dev->id; |
708 | struct ucode_cpu_info *uci = ucode_cpu_info + cpu; | 708 | struct ucode_cpu_info *uci = ucode_cpu_info + cpu; |
@@ -711,39 +711,31 @@ static int mc_sysdev_add(struct sys_device *sys_dev) | |||
711 | return 0; | 711 | return 0; |
712 | 712 | ||
713 | pr_debug("Microcode:CPU %d added\n", cpu); | 713 | pr_debug("Microcode:CPU %d added\n", cpu); |
714 | /* If suspend_cpu_hotplug is set, the system is resuming and we should | 714 | memset(uci, 0, sizeof(*uci)); |
715 | * use the data from before the suspend. | ||
716 | */ | ||
717 | if (suspend_cpu_hotplug) { | ||
718 | err = apply_microcode_on_cpu(cpu); | ||
719 | if (err) | ||
720 | microcode_fini_cpu(cpu); | ||
721 | } | ||
722 | if (!uci->valid) | ||
723 | memset(uci, 0, sizeof(*uci)); | ||
724 | 715 | ||
725 | err = sysfs_create_group(&sys_dev->kobj, &mc_attr_group); | 716 | err = sysfs_create_group(&sys_dev->kobj, &mc_attr_group); |
726 | if (err) | 717 | if (err) |
727 | return err; | 718 | return err; |
728 | 719 | ||
729 | if (!uci->valid) | 720 | microcode_init_cpu(cpu, resume); |
730 | microcode_init_cpu(cpu); | ||
731 | 721 | ||
732 | return 0; | 722 | return 0; |
733 | } | 723 | } |
734 | 724 | ||
725 | static int mc_sysdev_add(struct sys_device *sys_dev) | ||
726 | { | ||
727 | return __mc_sysdev_add(sys_dev, 0); | ||
728 | } | ||
729 | |||
735 | static int mc_sysdev_remove(struct sys_device *sys_dev) | 730 | static int mc_sysdev_remove(struct sys_device *sys_dev) |
736 | { | 731 | { |
737 | int cpu = sys_dev->id; | 732 | int cpu = sys_dev->id; |
738 | 733 | ||
739 | if (!cpu_online(cpu)) | 734 | if (!cpu_online(cpu)) |
740 | return 0; | 735 | return 0; |
736 | |||
741 | pr_debug("Microcode:CPU %d removed\n", cpu); | 737 | pr_debug("Microcode:CPU %d removed\n", cpu); |
742 | /* If suspend_cpu_hotplug is set, the system is suspending and we should | 738 | microcode_fini_cpu(cpu); |
743 | * keep the microcode in memory for the resume. | ||
744 | */ | ||
745 | if (!suspend_cpu_hotplug) | ||
746 | microcode_fini_cpu(cpu); | ||
747 | sysfs_remove_group(&sys_dev->kobj, &mc_attr_group); | 739 | sysfs_remove_group(&sys_dev->kobj, &mc_attr_group); |
748 | return 0; | 740 | return 0; |
749 | } | 741 | } |
@@ -774,13 +766,34 @@ mc_cpu_callback(struct notifier_block *nb, unsigned long action, void *hcpu) | |||
774 | 766 | ||
775 | sys_dev = get_cpu_sysdev(cpu); | 767 | sys_dev = get_cpu_sysdev(cpu); |
776 | switch (action) { | 768 | switch (action) { |
769 | case CPU_UP_CANCELED_FROZEN: | ||
770 | /* The CPU refused to come up during a system resume */ | ||
771 | microcode_fini_cpu(cpu); | ||
772 | break; | ||
777 | case CPU_ONLINE: | 773 | case CPU_ONLINE: |
778 | case CPU_DOWN_FAILED: | 774 | case CPU_DOWN_FAILED: |
779 | mc_sysdev_add(sys_dev); | 775 | mc_sysdev_add(sys_dev); |
780 | break; | 776 | break; |
777 | case CPU_ONLINE_FROZEN: | ||
778 | /* System-wide resume is in progress, try to apply microcode */ | ||
779 | if (apply_microcode_check_cpu(cpu)) { | ||
780 | /* The application of microcode failed */ | ||
781 | microcode_fini_cpu(cpu); | ||
782 | __mc_sysdev_add(sys_dev, 1); | ||
783 | break; | ||
784 | } | ||
785 | case CPU_DOWN_FAILED_FROZEN: | ||
786 | if (sysfs_create_group(&sys_dev->kobj, &mc_attr_group)) | ||
787 | printk(KERN_ERR "Microcode: Failed to create the sysfs " | ||
788 | "group for CPU%d\n", cpu); | ||
789 | break; | ||
781 | case CPU_DOWN_PREPARE: | 790 | case CPU_DOWN_PREPARE: |
782 | mc_sysdev_remove(sys_dev); | 791 | mc_sysdev_remove(sys_dev); |
783 | break; | 792 | break; |
793 | case CPU_DOWN_PREPARE_FROZEN: | ||
794 | /* Suspend is in progress, only remove the interface */ | ||
795 | sysfs_remove_group(&sys_dev->kobj, &mc_attr_group); | ||
796 | break; | ||
784 | } | 797 | } |
785 | return NOTIFY_OK; | 798 | return NOTIFY_OK; |
786 | } | 799 | } |
diff --git a/arch/i386/kernel/msr.c b/arch/i386/kernel/msr.c index 8cd0a91ce107..0c1069b8d638 100644 --- a/arch/i386/kernel/msr.c +++ b/arch/i386/kernel/msr.c | |||
@@ -153,9 +153,11 @@ static int msr_class_cpu_callback(struct notifier_block *nfb, | |||
153 | 153 | ||
154 | switch (action) { | 154 | switch (action) { |
155 | case CPU_ONLINE: | 155 | case CPU_ONLINE: |
156 | case CPU_ONLINE_FROZEN: | ||
156 | msr_device_create(cpu); | 157 | msr_device_create(cpu); |
157 | break; | 158 | break; |
158 | case CPU_DEAD: | 159 | case CPU_DEAD: |
160 | case CPU_DEAD_FROZEN: | ||
159 | device_destroy(msr_class, MKDEV(MSR_MAJOR, cpu)); | 161 | device_destroy(msr_class, MKDEV(MSR_MAJOR, cpu)); |
160 | break; | 162 | break; |
161 | } | 163 | } |
diff --git a/arch/i386/kernel/traps.c b/arch/i386/kernel/traps.c index 4bec0cbf407a..c05e7e861b29 100644 --- a/arch/i386/kernel/traps.c +++ b/arch/i386/kernel/traps.c | |||
@@ -305,7 +305,7 @@ void show_registers(struct pt_regs *regs) | |||
305 | regs->xds & 0xffff, regs->xes & 0xffff, regs->xfs & 0xffff, gs, ss); | 305 | regs->xds & 0xffff, regs->xes & 0xffff, regs->xfs & 0xffff, gs, ss); |
306 | printk(KERN_EMERG "Process %.*s (pid: %d, ti=%p task=%p task.ti=%p)", | 306 | printk(KERN_EMERG "Process %.*s (pid: %d, ti=%p task=%p task.ti=%p)", |
307 | TASK_COMM_LEN, current->comm, current->pid, | 307 | TASK_COMM_LEN, current->comm, current->pid, |
308 | current_thread_info(), current, current->thread_info); | 308 | current_thread_info(), current, task_thread_info(current)); |
309 | /* | 309 | /* |
310 | * When in-kernel, we also print out the stack and code at the | 310 | * When in-kernel, we also print out the stack and code at the |
311 | * time of the fault.. | 311 | * time of the fault.. |
diff --git a/arch/i386/mach-generic/probe.c b/arch/i386/mach-generic/probe.c index a7b3999bb37a..74f3da634423 100644 --- a/arch/i386/mach-generic/probe.c +++ b/arch/i386/mach-generic/probe.c | |||
@@ -119,9 +119,7 @@ int __init acpi_madt_oem_check(char *oem_id, char *oem_table_id) | |||
119 | return 0; | 119 | return 0; |
120 | } | 120 | } |
121 | 121 | ||
122 | #ifdef CONFIG_SMP | ||
123 | int hard_smp_processor_id(void) | 122 | int hard_smp_processor_id(void) |
124 | { | 123 | { |
125 | return genapic->get_apic_id(*(unsigned long *)(APIC_BASE+APIC_ID)); | 124 | return genapic->get_apic_id(*(unsigned long *)(APIC_BASE+APIC_ID)); |
126 | } | 125 | } |
127 | #endif | ||
diff --git a/arch/i386/mach-voyager/voyager_basic.c b/arch/i386/mach-voyager/voyager_basic.c index 8fe7e4593d5f..9b77b39b71a6 100644 --- a/arch/i386/mach-voyager/voyager_basic.c +++ b/arch/i386/mach-voyager/voyager_basic.c | |||
@@ -292,8 +292,8 @@ machine_emergency_restart(void) | |||
292 | void | 292 | void |
293 | mca_nmi_hook(void) | 293 | mca_nmi_hook(void) |
294 | { | 294 | { |
295 | __u8 dumpval __attribute__((unused)) = inb(0xf823); | 295 | __u8 dumpval __maybe_unused = inb(0xf823); |
296 | __u8 swnmi __attribute__((unused)) = inb(0xf813); | 296 | __u8 swnmi __maybe_unused = inb(0xf813); |
297 | 297 | ||
298 | /* FIXME: assume dump switch pressed */ | 298 | /* FIXME: assume dump switch pressed */ |
299 | /* check to see if the dump switch was pressed */ | 299 | /* check to see if the dump switch was pressed */ |
diff --git a/arch/i386/pci/init.c b/arch/i386/pci/init.c index 1cf11af96de2..3de9f9ba2da6 100644 --- a/arch/i386/pci/init.c +++ b/arch/i386/pci/init.c | |||
@@ -6,7 +6,7 @@ | |||
6 | in the right sequence from here. */ | 6 | in the right sequence from here. */ |
7 | static __init int pci_access_init(void) | 7 | static __init int pci_access_init(void) |
8 | { | 8 | { |
9 | int type __attribute__((unused)) = 0; | 9 | int type __maybe_unused = 0; |
10 | 10 | ||
11 | #ifdef CONFIG_PCI_DIRECT | 11 | #ifdef CONFIG_PCI_DIRECT |
12 | type = pci_direct_probe(); | 12 | type = pci_direct_probe(); |
diff --git a/arch/ia64/kernel/err_inject.c b/arch/ia64/kernel/err_inject.c index d3e9f33e8bdd..6a49600cf337 100644 --- a/arch/ia64/kernel/err_inject.c +++ b/arch/ia64/kernel/err_inject.c | |||
@@ -236,9 +236,11 @@ static int __cpuinit err_inject_cpu_callback(struct notifier_block *nfb, | |||
236 | sys_dev = get_cpu_sysdev(cpu); | 236 | sys_dev = get_cpu_sysdev(cpu); |
237 | switch (action) { | 237 | switch (action) { |
238 | case CPU_ONLINE: | 238 | case CPU_ONLINE: |
239 | case CPU_ONLINE_FROZEN: | ||
239 | err_inject_add_dev(sys_dev); | 240 | err_inject_add_dev(sys_dev); |
240 | break; | 241 | break; |
241 | case CPU_DEAD: | 242 | case CPU_DEAD: |
243 | case CPU_DEAD_FROZEN: | ||
242 | err_inject_remove_dev(sys_dev); | 244 | err_inject_remove_dev(sys_dev); |
243 | break; | 245 | break; |
244 | } | 246 | } |
diff --git a/arch/ia64/kernel/mca.c b/arch/ia64/kernel/mca.c index 1d7cc7e2ce32..f8ae709de0b5 100644 --- a/arch/ia64/kernel/mca.c +++ b/arch/ia64/kernel/mca.c | |||
@@ -1689,7 +1689,7 @@ format_mca_init_stack(void *mca_data, unsigned long offset, | |||
1689 | ti->preempt_count = 1; | 1689 | ti->preempt_count = 1; |
1690 | ti->task = p; | 1690 | ti->task = p; |
1691 | ti->cpu = cpu; | 1691 | ti->cpu = cpu; |
1692 | p->thread_info = ti; | 1692 | p->stack = ti; |
1693 | p->state = TASK_UNINTERRUPTIBLE; | 1693 | p->state = TASK_UNINTERRUPTIBLE; |
1694 | cpu_set(cpu, p->cpus_allowed); | 1694 | cpu_set(cpu, p->cpus_allowed); |
1695 | INIT_LIST_HEAD(&p->tasks); | 1695 | INIT_LIST_HEAD(&p->tasks); |
diff --git a/arch/ia64/kernel/palinfo.c b/arch/ia64/kernel/palinfo.c index a71df9ae0397..85829e27785c 100644 --- a/arch/ia64/kernel/palinfo.c +++ b/arch/ia64/kernel/palinfo.c | |||
@@ -975,9 +975,11 @@ static int palinfo_cpu_callback(struct notifier_block *nfb, | |||
975 | 975 | ||
976 | switch (action) { | 976 | switch (action) { |
977 | case CPU_ONLINE: | 977 | case CPU_ONLINE: |
978 | case CPU_ONLINE_FROZEN: | ||
978 | create_palinfo_proc_entries(hotcpu); | 979 | create_palinfo_proc_entries(hotcpu); |
979 | break; | 980 | break; |
980 | case CPU_DEAD: | 981 | case CPU_DEAD: |
982 | case CPU_DEAD_FROZEN: | ||
981 | remove_palinfo_proc_entries(hotcpu); | 983 | remove_palinfo_proc_entries(hotcpu); |
982 | break; | 984 | break; |
983 | } | 985 | } |
diff --git a/arch/ia64/kernel/salinfo.c b/arch/ia64/kernel/salinfo.c index a51f1d0bfb70..89f6b138a62c 100644 --- a/arch/ia64/kernel/salinfo.c +++ b/arch/ia64/kernel/salinfo.c | |||
@@ -582,6 +582,7 @@ salinfo_cpu_callback(struct notifier_block *nb, unsigned long action, void *hcpu | |||
582 | struct salinfo_data *data; | 582 | struct salinfo_data *data; |
583 | switch (action) { | 583 | switch (action) { |
584 | case CPU_ONLINE: | 584 | case CPU_ONLINE: |
585 | case CPU_ONLINE_FROZEN: | ||
585 | spin_lock_irqsave(&data_saved_lock, flags); | 586 | spin_lock_irqsave(&data_saved_lock, flags); |
586 | for (i = 0, data = salinfo_data; | 587 | for (i = 0, data = salinfo_data; |
587 | i < ARRAY_SIZE(salinfo_data); | 588 | i < ARRAY_SIZE(salinfo_data); |
@@ -592,6 +593,7 @@ salinfo_cpu_callback(struct notifier_block *nb, unsigned long action, void *hcpu | |||
592 | spin_unlock_irqrestore(&data_saved_lock, flags); | 593 | spin_unlock_irqrestore(&data_saved_lock, flags); |
593 | break; | 594 | break; |
594 | case CPU_DEAD: | 595 | case CPU_DEAD: |
596 | case CPU_DEAD_FROZEN: | ||
595 | spin_lock_irqsave(&data_saved_lock, flags); | 597 | spin_lock_irqsave(&data_saved_lock, flags); |
596 | for (i = 0, data = salinfo_data; | 598 | for (i = 0, data = salinfo_data; |
597 | i < ARRAY_SIZE(salinfo_data); | 599 | i < ARRAY_SIZE(salinfo_data); |
diff --git a/arch/ia64/kernel/topology.c b/arch/ia64/kernel/topology.c index 687500ddb4b8..94ae3c87d828 100644 --- a/arch/ia64/kernel/topology.c +++ b/arch/ia64/kernel/topology.c | |||
@@ -412,9 +412,11 @@ static int __cpuinit cache_cpu_callback(struct notifier_block *nfb, | |||
412 | sys_dev = get_cpu_sysdev(cpu); | 412 | sys_dev = get_cpu_sysdev(cpu); |
413 | switch (action) { | 413 | switch (action) { |
414 | case CPU_ONLINE: | 414 | case CPU_ONLINE: |
415 | case CPU_ONLINE_FROZEN: | ||
415 | cache_add_dev(sys_dev); | 416 | cache_add_dev(sys_dev); |
416 | break; | 417 | break; |
417 | case CPU_DEAD: | 418 | case CPU_DEAD: |
419 | case CPU_DEAD_FROZEN: | ||
418 | cache_remove_dev(sys_dev); | 420 | cache_remove_dev(sys_dev); |
419 | break; | 421 | break; |
420 | } | 422 | } |
diff --git a/arch/m68knommu/kernel/asm-offsets.c b/arch/m68knommu/kernel/asm-offsets.c index b988c7bdc6e4..7cd183d346ef 100644 --- a/arch/m68knommu/kernel/asm-offsets.c +++ b/arch/m68knommu/kernel/asm-offsets.c | |||
@@ -31,7 +31,7 @@ int main(void) | |||
31 | DEFINE(TASK_PTRACE, offsetof(struct task_struct, ptrace)); | 31 | DEFINE(TASK_PTRACE, offsetof(struct task_struct, ptrace)); |
32 | DEFINE(TASK_BLOCKED, offsetof(struct task_struct, blocked)); | 32 | DEFINE(TASK_BLOCKED, offsetof(struct task_struct, blocked)); |
33 | DEFINE(TASK_THREAD, offsetof(struct task_struct, thread)); | 33 | DEFINE(TASK_THREAD, offsetof(struct task_struct, thread)); |
34 | DEFINE(TASK_THREAD_INFO, offsetof(struct task_struct, thread_info)); | 34 | DEFINE(TASK_THREAD_INFO, offsetof(struct task_struct, stack)); |
35 | DEFINE(TASK_MM, offsetof(struct task_struct, mm)); | 35 | DEFINE(TASK_MM, offsetof(struct task_struct, mm)); |
36 | DEFINE(TASK_ACTIVE_MM, offsetof(struct task_struct, active_mm)); | 36 | DEFINE(TASK_ACTIVE_MM, offsetof(struct task_struct, active_mm)); |
37 | 37 | ||
diff --git a/arch/mips/kernel/asm-offsets.c b/arch/mips/kernel/asm-offsets.c index 761a779d5c4f..3b27309d54b1 100644 --- a/arch/mips/kernel/asm-offsets.c +++ b/arch/mips/kernel/asm-offsets.c | |||
@@ -82,7 +82,7 @@ void output_task_defines(void) | |||
82 | { | 82 | { |
83 | text("/* MIPS task_struct offsets. */"); | 83 | text("/* MIPS task_struct offsets. */"); |
84 | offset("#define TASK_STATE ", struct task_struct, state); | 84 | offset("#define TASK_STATE ", struct task_struct, state); |
85 | offset("#define TASK_THREAD_INFO ", struct task_struct, thread_info); | 85 | offset("#define TASK_THREAD_INFO ", struct task_struct, stack); |
86 | offset("#define TASK_FLAGS ", struct task_struct, flags); | 86 | offset("#define TASK_FLAGS ", struct task_struct, flags); |
87 | offset("#define TASK_MM ", struct task_struct, mm); | 87 | offset("#define TASK_MM ", struct task_struct, mm); |
88 | offset("#define TASK_PID ", struct task_struct, pid); | 88 | offset("#define TASK_PID ", struct task_struct, pid); |
diff --git a/arch/mips/kernel/smtc.c b/arch/mips/kernel/smtc.c index 5dcfab6b288e..b361edb83dc6 100644 --- a/arch/mips/kernel/smtc.c +++ b/arch/mips/kernel/smtc.c | |||
@@ -560,7 +560,7 @@ void smtc_boot_secondary(int cpu, struct task_struct *idle) | |||
560 | write_tc_gpr_sp(__KSTK_TOS(idle)); | 560 | write_tc_gpr_sp(__KSTK_TOS(idle)); |
561 | 561 | ||
562 | /* global pointer */ | 562 | /* global pointer */ |
563 | write_tc_gpr_gp((unsigned long)idle->thread_info); | 563 | write_tc_gpr_gp((unsigned long)task_thread_info(idle)); |
564 | 564 | ||
565 | smtc_status |= SMTC_MTC_ACTIVE; | 565 | smtc_status |= SMTC_MTC_ACTIVE; |
566 | write_tc_c0_tchalt(0); | 566 | write_tc_c0_tchalt(0); |
diff --git a/arch/parisc/kernel/asm-offsets.c b/arch/parisc/kernel/asm-offsets.c index 54fdb959149c..d3b7917a87cb 100644 --- a/arch/parisc/kernel/asm-offsets.c +++ b/arch/parisc/kernel/asm-offsets.c | |||
@@ -54,7 +54,7 @@ | |||
54 | 54 | ||
55 | int main(void) | 55 | int main(void) |
56 | { | 56 | { |
57 | DEFINE(TASK_THREAD_INFO, offsetof(struct task_struct, thread_info)); | 57 | DEFINE(TASK_THREAD_INFO, offsetof(struct task_struct, stack)); |
58 | DEFINE(TASK_STATE, offsetof(struct task_struct, state)); | 58 | DEFINE(TASK_STATE, offsetof(struct task_struct, state)); |
59 | DEFINE(TASK_FLAGS, offsetof(struct task_struct, flags)); | 59 | DEFINE(TASK_FLAGS, offsetof(struct task_struct, flags)); |
60 | DEFINE(TASK_SIGPENDING, offsetof(struct task_struct, pending)); | 60 | DEFINE(TASK_SIGPENDING, offsetof(struct task_struct, pending)); |
diff --git a/arch/powerpc/kernel/asm-offsets.c b/arch/powerpc/kernel/asm-offsets.c index 8f48560b7ee2..37bc35e69dbe 100644 --- a/arch/powerpc/kernel/asm-offsets.c +++ b/arch/powerpc/kernel/asm-offsets.c | |||
@@ -58,7 +58,7 @@ int main(void) | |||
58 | #ifdef CONFIG_PPC64 | 58 | #ifdef CONFIG_PPC64 |
59 | DEFINE(AUDITCONTEXT, offsetof(struct task_struct, audit_context)); | 59 | DEFINE(AUDITCONTEXT, offsetof(struct task_struct, audit_context)); |
60 | #else | 60 | #else |
61 | DEFINE(THREAD_INFO, offsetof(struct task_struct, thread_info)); | 61 | DEFINE(THREAD_INFO, offsetof(struct task_struct, stack)); |
62 | DEFINE(PTRACE, offsetof(struct task_struct, ptrace)); | 62 | DEFINE(PTRACE, offsetof(struct task_struct, ptrace)); |
63 | #endif /* CONFIG_PPC64 */ | 63 | #endif /* CONFIG_PPC64 */ |
64 | 64 | ||
diff --git a/arch/powerpc/kernel/sysfs.c b/arch/powerpc/kernel/sysfs.c index cae39d9dfe48..68991c2d4a1b 100644 --- a/arch/powerpc/kernel/sysfs.c +++ b/arch/powerpc/kernel/sysfs.c | |||
@@ -342,10 +342,12 @@ static int __cpuinit sysfs_cpu_notify(struct notifier_block *self, | |||
342 | 342 | ||
343 | switch (action) { | 343 | switch (action) { |
344 | case CPU_ONLINE: | 344 | case CPU_ONLINE: |
345 | case CPU_ONLINE_FROZEN: | ||
345 | register_cpu_online(cpu); | 346 | register_cpu_online(cpu); |
346 | break; | 347 | break; |
347 | #ifdef CONFIG_HOTPLUG_CPU | 348 | #ifdef CONFIG_HOTPLUG_CPU |
348 | case CPU_DEAD: | 349 | case CPU_DEAD: |
350 | case CPU_DEAD_FROZEN: | ||
349 | unregister_cpu_online(cpu); | 351 | unregister_cpu_online(cpu); |
350 | break; | 352 | break; |
351 | #endif | 353 | #endif |
diff --git a/arch/powerpc/mm/numa.c b/arch/powerpc/mm/numa.c index b3a592b25ab3..de45aa82d97b 100644 --- a/arch/powerpc/mm/numa.c +++ b/arch/powerpc/mm/numa.c | |||
@@ -252,12 +252,15 @@ static int __cpuinit cpu_numa_callback(struct notifier_block *nfb, | |||
252 | 252 | ||
253 | switch (action) { | 253 | switch (action) { |
254 | case CPU_UP_PREPARE: | 254 | case CPU_UP_PREPARE: |
255 | case CPU_UP_PREPARE_FROZEN: | ||
255 | numa_setup_cpu(lcpu); | 256 | numa_setup_cpu(lcpu); |
256 | ret = NOTIFY_OK; | 257 | ret = NOTIFY_OK; |
257 | break; | 258 | break; |
258 | #ifdef CONFIG_HOTPLUG_CPU | 259 | #ifdef CONFIG_HOTPLUG_CPU |
259 | case CPU_DEAD: | 260 | case CPU_DEAD: |
261 | case CPU_DEAD_FROZEN: | ||
260 | case CPU_UP_CANCELED: | 262 | case CPU_UP_CANCELED: |
263 | case CPU_UP_CANCELED_FROZEN: | ||
261 | unmap_cpu_from_node(lcpu); | 264 | unmap_cpu_from_node(lcpu); |
262 | break; | 265 | break; |
263 | ret = NOTIFY_OK; | 266 | ret = NOTIFY_OK; |
diff --git a/arch/ppc/kernel/asm-offsets.c b/arch/ppc/kernel/asm-offsets.c index c5850a272650..e8e94321b59e 100644 --- a/arch/ppc/kernel/asm-offsets.c +++ b/arch/ppc/kernel/asm-offsets.c | |||
@@ -35,7 +35,7 @@ int | |||
35 | main(void) | 35 | main(void) |
36 | { | 36 | { |
37 | DEFINE(THREAD, offsetof(struct task_struct, thread)); | 37 | DEFINE(THREAD, offsetof(struct task_struct, thread)); |
38 | DEFINE(THREAD_INFO, offsetof(struct task_struct, thread_info)); | 38 | DEFINE(THREAD_INFO, offsetof(struct task_struct, stack)); |
39 | DEFINE(MM, offsetof(struct task_struct, mm)); | 39 | DEFINE(MM, offsetof(struct task_struct, mm)); |
40 | DEFINE(PTRACE, offsetof(struct task_struct, ptrace)); | 40 | DEFINE(PTRACE, offsetof(struct task_struct, ptrace)); |
41 | DEFINE(KSP, offsetof(struct thread_struct, ksp)); | 41 | DEFINE(KSP, offsetof(struct thread_struct, ksp)); |
diff --git a/arch/s390/appldata/appldata_base.c b/arch/s390/appldata/appldata_base.c index ee89b33145d5..81a2b92ab0c2 100644 --- a/arch/s390/appldata/appldata_base.c +++ b/arch/s390/appldata/appldata_base.c | |||
@@ -567,9 +567,11 @@ appldata_cpu_notify(struct notifier_block *self, | |||
567 | { | 567 | { |
568 | switch (action) { | 568 | switch (action) { |
569 | case CPU_ONLINE: | 569 | case CPU_ONLINE: |
570 | case CPU_ONLINE_FROZEN: | ||
570 | appldata_online_cpu((long) hcpu); | 571 | appldata_online_cpu((long) hcpu); |
571 | break; | 572 | break; |
572 | case CPU_DEAD: | 573 | case CPU_DEAD: |
574 | case CPU_DEAD_FROZEN: | ||
573 | appldata_offline_cpu((long) hcpu); | 575 | appldata_offline_cpu((long) hcpu); |
574 | break; | 576 | break; |
575 | default: | 577 | default: |
diff --git a/arch/s390/kernel/asm-offsets.c b/arch/s390/kernel/asm-offsets.c index ec514fe5ccd0..1375f8a4469e 100644 --- a/arch/s390/kernel/asm-offsets.c +++ b/arch/s390/kernel/asm-offsets.c | |||
@@ -15,7 +15,7 @@ | |||
15 | 15 | ||
16 | int main(void) | 16 | int main(void) |
17 | { | 17 | { |
18 | DEFINE(__THREAD_info, offsetof(struct task_struct, thread_info),); | 18 | DEFINE(__THREAD_info, offsetof(struct task_struct, stack),); |
19 | DEFINE(__THREAD_ksp, offsetof(struct task_struct, thread.ksp),); | 19 | DEFINE(__THREAD_ksp, offsetof(struct task_struct, thread.ksp),); |
20 | DEFINE(__THREAD_per, offsetof(struct task_struct, thread.per_info),); | 20 | DEFINE(__THREAD_per, offsetof(struct task_struct, thread.per_info),); |
21 | DEFINE(__THREAD_mm_segment, | 21 | DEFINE(__THREAD_mm_segment, |
diff --git a/arch/s390/kernel/smp.c b/arch/s390/kernel/smp.c index b7977027a28f..09f028a3266b 100644 --- a/arch/s390/kernel/smp.c +++ b/arch/s390/kernel/smp.c | |||
@@ -789,10 +789,12 @@ static int __cpuinit smp_cpu_notify(struct notifier_block *self, | |||
789 | 789 | ||
790 | switch (action) { | 790 | switch (action) { |
791 | case CPU_ONLINE: | 791 | case CPU_ONLINE: |
792 | case CPU_ONLINE_FROZEN: | ||
792 | if (sysdev_create_file(s, &attr_capability)) | 793 | if (sysdev_create_file(s, &attr_capability)) |
793 | return NOTIFY_BAD; | 794 | return NOTIFY_BAD; |
794 | break; | 795 | break; |
795 | case CPU_DEAD: | 796 | case CPU_DEAD: |
797 | case CPU_DEAD_FROZEN: | ||
796 | sysdev_remove_file(s, &attr_capability); | 798 | sysdev_remove_file(s, &attr_capability); |
797 | break; | 799 | break; |
798 | } | 800 | } |
diff --git a/arch/sparc/kernel/asm-offsets.c b/arch/sparc/kernel/asm-offsets.c index 29d7cfd1c970..6773ed76e414 100644 --- a/arch/sparc/kernel/asm-offsets.c +++ b/arch/sparc/kernel/asm-offsets.c | |||
@@ -28,7 +28,7 @@ int foo(void) | |||
28 | DEFINE(AOFF_task_gid, offsetof(struct task_struct, gid)); | 28 | DEFINE(AOFF_task_gid, offsetof(struct task_struct, gid)); |
29 | DEFINE(AOFF_task_euid, offsetof(struct task_struct, euid)); | 29 | DEFINE(AOFF_task_euid, offsetof(struct task_struct, euid)); |
30 | DEFINE(AOFF_task_egid, offsetof(struct task_struct, egid)); | 30 | DEFINE(AOFF_task_egid, offsetof(struct task_struct, egid)); |
31 | /* DEFINE(THREAD_INFO, offsetof(struct task_struct, thread_info)); */ | 31 | /* DEFINE(THREAD_INFO, offsetof(struct task_struct, stack)); */ |
32 | DEFINE(ASIZ_task_uid, sizeof(current->uid)); | 32 | DEFINE(ASIZ_task_uid, sizeof(current->uid)); |
33 | DEFINE(ASIZ_task_gid, sizeof(current->gid)); | 33 | DEFINE(ASIZ_task_gid, sizeof(current->gid)); |
34 | DEFINE(ASIZ_task_euid, sizeof(current->euid)); | 34 | DEFINE(ASIZ_task_euid, sizeof(current->euid)); |
diff --git a/arch/sparc64/kernel/traps.c b/arch/sparc64/kernel/traps.c index dc652f210290..d0fde36395b4 100644 --- a/arch/sparc64/kernel/traps.c +++ b/arch/sparc64/kernel/traps.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/init.h> | 19 | #include <linux/init.h> |
20 | #include <linux/kdebug.h> | 20 | #include <linux/kdebug.h> |
21 | 21 | ||
22 | #include <asm/smp.h> | ||
22 | #include <asm/delay.h> | 23 | #include <asm/delay.h> |
23 | #include <asm/system.h> | 24 | #include <asm/system.h> |
24 | #include <asm/ptrace.h> | 25 | #include <asm/ptrace.h> |
diff --git a/arch/um/Kconfig b/arch/um/Kconfig index 354cc6b70530..b9c0f307a8fa 100644 --- a/arch/um/Kconfig +++ b/arch/um/Kconfig | |||
@@ -320,21 +320,7 @@ source "crypto/Kconfig" | |||
320 | 320 | ||
321 | source "lib/Kconfig" | 321 | source "lib/Kconfig" |
322 | 322 | ||
323 | menu "SCSI support" | 323 | source "drivers/scsi/Kconfig" |
324 | depends on BROKEN | ||
325 | |||
326 | config SCSI | ||
327 | tristate "SCSI support" | ||
328 | |||
329 | # This gives us free_dma, which scsi.c wants. | ||
330 | config GENERIC_ISA_DMA | ||
331 | bool | ||
332 | depends on SCSI | ||
333 | default y | ||
334 | |||
335 | source "arch/um/Kconfig.scsi" | ||
336 | |||
337 | endmenu | ||
338 | 324 | ||
339 | source "drivers/md/Kconfig" | 325 | source "drivers/md/Kconfig" |
340 | 326 | ||
diff --git a/arch/um/Kconfig.scsi b/arch/um/Kconfig.scsi deleted file mode 100644 index c291c942b1a8..000000000000 --- a/arch/um/Kconfig.scsi +++ /dev/null | |||
@@ -1,58 +0,0 @@ | |||
1 | comment "SCSI support type (disk, tape, CD-ROM)" | ||
2 | depends on SCSI | ||
3 | |||
4 | config BLK_DEV_SD | ||
5 | tristate "SCSI disk support" | ||
6 | depends on SCSI | ||
7 | |||
8 | config SD_EXTRA_DEVS | ||
9 | int "Maximum number of SCSI disks that can be loaded as modules" | ||
10 | depends on BLK_DEV_SD | ||
11 | default "40" | ||
12 | |||
13 | config CHR_DEV_ST | ||
14 | tristate "SCSI tape support" | ||
15 | depends on SCSI | ||
16 | |||
17 | config BLK_DEV_SR | ||
18 | tristate "SCSI CD-ROM support" | ||
19 | depends on SCSI | ||
20 | |||
21 | config BLK_DEV_SR_VENDOR | ||
22 | bool "Enable vendor-specific extensions (for SCSI CDROM)" | ||
23 | depends on BLK_DEV_SR | ||
24 | |||
25 | config SR_EXTRA_DEVS | ||
26 | int "Maximum number of CDROM devices that can be loaded as modules" | ||
27 | depends on BLK_DEV_SR | ||
28 | default "2" | ||
29 | |||
30 | config CHR_DEV_SG | ||
31 | tristate "SCSI generic support" | ||
32 | depends on SCSI | ||
33 | |||
34 | comment "Some SCSI devices (e.g. CD jukebox) support multiple LUNs" | ||
35 | depends on SCSI | ||
36 | |||
37 | #if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then | ||
38 | config SCSI_DEBUG_QUEUES | ||
39 | bool "Enable extra checks in new queueing code" | ||
40 | depends on SCSI | ||
41 | |||
42 | #fi | ||
43 | config SCSI_MULTI_LUN | ||
44 | bool "Probe all LUNs on each SCSI device" | ||
45 | depends on SCSI | ||
46 | |||
47 | config SCSI_CONSTANTS | ||
48 | bool "Verbose SCSI error reporting (kernel size +=12K)" | ||
49 | depends on SCSI | ||
50 | |||
51 | config SCSI_LOGGING | ||
52 | bool "SCSI logging facility" | ||
53 | depends on SCSI | ||
54 | |||
55 | config SCSI_DEBUG | ||
56 | tristate "SCSI debugging host simulator (EXPERIMENTAL)" | ||
57 | depends on SCSI | ||
58 | |||
diff --git a/arch/um/kernel/skas/process.c b/arch/um/kernel/skas/process.c index ef36facd8fe9..a96ae1a0610e 100644 --- a/arch/um/kernel/skas/process.c +++ b/arch/um/kernel/skas/process.c | |||
@@ -178,20 +178,23 @@ int start_uml_skas(void) | |||
178 | 178 | ||
179 | int external_pid_skas(struct task_struct *task) | 179 | int external_pid_skas(struct task_struct *task) |
180 | { | 180 | { |
181 | #warning Need to look up userspace_pid by cpu | 181 | /* FIXME: Need to look up userspace_pid by cpu */ |
182 | return(userspace_pid[0]); | 182 | return(userspace_pid[0]); |
183 | } | 183 | } |
184 | 184 | ||
185 | int thread_pid_skas(struct task_struct *task) | 185 | int thread_pid_skas(struct task_struct *task) |
186 | { | 186 | { |
187 | #warning Need to look up userspace_pid by cpu | 187 | /* FIXME: Need to look up userspace_pid by cpu */ |
188 | return(userspace_pid[0]); | 188 | return(userspace_pid[0]); |
189 | } | 189 | } |
190 | 190 | ||
191 | void kill_off_processes_skas(void) | 191 | void kill_off_processes_skas(void) |
192 | { | 192 | { |
193 | if(proc_mm) | 193 | if(proc_mm) |
194 | #warning need to loop over userspace_pids in kill_off_processes_skas | 194 | /* |
195 | * FIXME: need to loop over userspace_pids in | ||
196 | * kill_off_processes_skas | ||
197 | */ | ||
195 | os_kill_ptraced_process(userspace_pid[0], 1); | 198 | os_kill_ptraced_process(userspace_pid[0], 1); |
196 | else { | 199 | else { |
197 | struct task_struct *p; | 200 | struct task_struct *p; |
diff --git a/arch/um/os-Linux/process.c b/arch/um/os-Linux/process.c index 92a7b59120d6..2d9d2ca39299 100644 --- a/arch/um/os-Linux/process.c +++ b/arch/um/os-Linux/process.c | |||
@@ -239,6 +239,7 @@ out: | |||
239 | return ok; | 239 | return ok; |
240 | } | 240 | } |
241 | 241 | ||
242 | #ifdef UML_CONFIG_MODE_TT | ||
242 | void init_new_thread_stack(void *sig_stack, void (*usr1_handler)(int)) | 243 | void init_new_thread_stack(void *sig_stack, void (*usr1_handler)(int)) |
243 | { | 244 | { |
244 | int flags = 0, pages; | 245 | int flags = 0, pages; |
@@ -260,6 +261,7 @@ void init_new_thread_stack(void *sig_stack, void (*usr1_handler)(int)) | |||
260 | "errno = %d\n", errno); | 261 | "errno = %d\n", errno); |
261 | } | 262 | } |
262 | } | 263 | } |
264 | #endif | ||
263 | 265 | ||
264 | void init_new_thread_signals(void) | 266 | void init_new_thread_signals(void) |
265 | { | 267 | { |
diff --git a/arch/um/os-Linux/skas/mem.c b/arch/um/os-Linux/skas/mem.c index 8e490fff3d47..5c8946320799 100644 --- a/arch/um/os-Linux/skas/mem.c +++ b/arch/um/os-Linux/skas/mem.c | |||
@@ -68,7 +68,7 @@ static inline long do_syscall_stub(struct mm_id * mm_idp, void **addr) | |||
68 | int err, pid = mm_idp->u.pid; | 68 | int err, pid = mm_idp->u.pid; |
69 | 69 | ||
70 | if(proc_mm) | 70 | if(proc_mm) |
71 | #warning Need to look up userspace_pid by cpu | 71 | /* FIXME: Need to look up userspace_pid by cpu */ |
72 | pid = userspace_pid[0]; | 72 | pid = userspace_pid[0]; |
73 | 73 | ||
74 | multi_count++; | 74 | multi_count++; |
diff --git a/arch/um/os-Linux/skas/process.c b/arch/um/os-Linux/skas/process.c index 5c088a55396c..6a0e466d01e3 100644 --- a/arch/um/os-Linux/skas/process.c +++ b/arch/um/os-Linux/skas/process.c | |||
@@ -586,7 +586,7 @@ void switch_mm_skas(struct mm_id *mm_idp) | |||
586 | { | 586 | { |
587 | int err; | 587 | int err; |
588 | 588 | ||
589 | #warning need cpu pid in switch_mm_skas | 589 | /* FIXME: need cpu pid in switch_mm_skas */ |
590 | if(proc_mm){ | 590 | if(proc_mm){ |
591 | err = ptrace(PTRACE_SWITCH_MM, userspace_pid[0], 0, | 591 | err = ptrace(PTRACE_SWITCH_MM, userspace_pid[0], 0, |
592 | mm_idp->u.mm_fd); | 592 | mm_idp->u.mm_fd); |
diff --git a/arch/v850/kernel/asm-offsets.c b/arch/v850/kernel/asm-offsets.c index 24f291369070..cee5c3142d41 100644 --- a/arch/v850/kernel/asm-offsets.c +++ b/arch/v850/kernel/asm-offsets.c | |||
@@ -29,7 +29,7 @@ int main (void) | |||
29 | DEFINE (TASK_PTRACE, offsetof (struct task_struct, ptrace)); | 29 | DEFINE (TASK_PTRACE, offsetof (struct task_struct, ptrace)); |
30 | DEFINE (TASK_BLOCKED, offsetof (struct task_struct, blocked)); | 30 | DEFINE (TASK_BLOCKED, offsetof (struct task_struct, blocked)); |
31 | DEFINE (TASK_THREAD, offsetof (struct task_struct, thread)); | 31 | DEFINE (TASK_THREAD, offsetof (struct task_struct, thread)); |
32 | DEFINE (TASK_THREAD_INFO, offsetof (struct task_struct, thread_info)); | 32 | DEFINE (TASK_THREAD_INFO, offsetof (struct task_struct, stack)); |
33 | DEFINE (TASK_MM, offsetof (struct task_struct, mm)); | 33 | DEFINE (TASK_MM, offsetof (struct task_struct, mm)); |
34 | DEFINE (TASK_ACTIVE_MM, offsetof (struct task_struct, active_mm)); | 34 | DEFINE (TASK_ACTIVE_MM, offsetof (struct task_struct, active_mm)); |
35 | DEFINE (TASK_PID, offsetof (struct task_struct, pid)); | 35 | DEFINE (TASK_PID, offsetof (struct task_struct, pid)); |
diff --git a/arch/x86_64/kernel/irq.c b/arch/x86_64/kernel/irq.c index 3bc30d2c13d3..3eaceac32481 100644 --- a/arch/x86_64/kernel/irq.c +++ b/arch/x86_64/kernel/irq.c | |||
@@ -32,7 +32,7 @@ atomic_t irq_err_count; | |||
32 | */ | 32 | */ |
33 | static inline void stack_overflow_check(struct pt_regs *regs) | 33 | static inline void stack_overflow_check(struct pt_regs *regs) |
34 | { | 34 | { |
35 | u64 curbase = (u64) current->thread_info; | 35 | u64 curbase = (u64)task_stack_page(current); |
36 | static unsigned long warned = -60*HZ; | 36 | static unsigned long warned = -60*HZ; |
37 | 37 | ||
38 | if (regs->rsp >= curbase && regs->rsp <= curbase + THREAD_SIZE && | 38 | if (regs->rsp >= curbase && regs->rsp <= curbase + THREAD_SIZE && |
diff --git a/arch/x86_64/kernel/mce.c b/arch/x86_64/kernel/mce.c index 442169640e45..a14375dd5425 100644 --- a/arch/x86_64/kernel/mce.c +++ b/arch/x86_64/kernel/mce.c | |||
@@ -720,9 +720,11 @@ mce_cpu_callback(struct notifier_block *nfb, unsigned long action, void *hcpu) | |||
720 | 720 | ||
721 | switch (action) { | 721 | switch (action) { |
722 | case CPU_ONLINE: | 722 | case CPU_ONLINE: |
723 | case CPU_ONLINE_FROZEN: | ||
723 | mce_create_device(cpu); | 724 | mce_create_device(cpu); |
724 | break; | 725 | break; |
725 | case CPU_DEAD: | 726 | case CPU_DEAD: |
727 | case CPU_DEAD_FROZEN: | ||
726 | mce_remove_device(cpu); | 728 | mce_remove_device(cpu); |
727 | break; | 729 | break; |
728 | } | 730 | } |
diff --git a/arch/x86_64/kernel/mce_amd.c b/arch/x86_64/kernel/mce_amd.c index d0bd5d66e103..03356e64f9c8 100644 --- a/arch/x86_64/kernel/mce_amd.c +++ b/arch/x86_64/kernel/mce_amd.c | |||
@@ -654,9 +654,11 @@ static int threshold_cpu_callback(struct notifier_block *nfb, | |||
654 | 654 | ||
655 | switch (action) { | 655 | switch (action) { |
656 | case CPU_ONLINE: | 656 | case CPU_ONLINE: |
657 | case CPU_ONLINE_FROZEN: | ||
657 | threshold_create_device(cpu); | 658 | threshold_create_device(cpu); |
658 | break; | 659 | break; |
659 | case CPU_DEAD: | 660 | case CPU_DEAD: |
661 | case CPU_DEAD_FROZEN: | ||
660 | threshold_remove_device(cpu); | 662 | threshold_remove_device(cpu); |
661 | break; | 663 | break; |
662 | default: | 664 | default: |
diff --git a/arch/x86_64/kernel/vsyscall.c b/arch/x86_64/kernel/vsyscall.c index dc32cef96195..51d4c6fa88c8 100644 --- a/arch/x86_64/kernel/vsyscall.c +++ b/arch/x86_64/kernel/vsyscall.c | |||
@@ -327,7 +327,7 @@ static int __cpuinit | |||
327 | cpu_vsyscall_notifier(struct notifier_block *n, unsigned long action, void *arg) | 327 | cpu_vsyscall_notifier(struct notifier_block *n, unsigned long action, void *arg) |
328 | { | 328 | { |
329 | long cpu = (long)arg; | 329 | long cpu = (long)arg; |
330 | if (action == CPU_ONLINE) | 330 | if (action == CPU_ONLINE || action == CPU_ONLINE_FROZEN) |
331 | smp_call_function_single(cpu, cpu_vsyscall_init, NULL, 0, 1); | 331 | smp_call_function_single(cpu, cpu_vsyscall_init, NULL, 0, 1); |
332 | return NOTIFY_DONE; | 332 | return NOTIFY_DONE; |
333 | } | 333 | } |
diff --git a/arch/xtensa/kernel/asm-offsets.c b/arch/xtensa/kernel/asm-offsets.c index b256cfbef344..698079b3a336 100644 --- a/arch/xtensa/kernel/asm-offsets.c +++ b/arch/xtensa/kernel/asm-offsets.c | |||
@@ -70,7 +70,7 @@ int main(void) | |||
70 | DEFINE(TASK_ACTIVE_MM, offsetof (struct task_struct, active_mm)); | 70 | DEFINE(TASK_ACTIVE_MM, offsetof (struct task_struct, active_mm)); |
71 | DEFINE(TASK_PID, offsetof (struct task_struct, pid)); | 71 | DEFINE(TASK_PID, offsetof (struct task_struct, pid)); |
72 | DEFINE(TASK_THREAD, offsetof (struct task_struct, thread)); | 72 | DEFINE(TASK_THREAD, offsetof (struct task_struct, thread)); |
73 | DEFINE(TASK_THREAD_INFO, offsetof (struct task_struct, thread_info)); | 73 | DEFINE(TASK_THREAD_INFO, offsetof (struct task_struct, stack)); |
74 | DEFINE(TASK_STRUCT_SIZE, sizeof (struct task_struct)); | 74 | DEFINE(TASK_STRUCT_SIZE, sizeof (struct task_struct)); |
75 | BLANK(); | 75 | BLANK(); |
76 | 76 | ||