diff options
Diffstat (limited to 'arch')
400 files changed, 2519 insertions, 3140 deletions
diff --git a/arch/alpha/Kconfig b/arch/alpha/Kconfig index 2a85dc33907c..4c002ba37e50 100644 --- a/arch/alpha/Kconfig +++ b/arch/alpha/Kconfig | |||
@@ -654,7 +654,7 @@ source "drivers/Kconfig" | |||
654 | 654 | ||
655 | source "fs/Kconfig" | 655 | source "fs/Kconfig" |
656 | 656 | ||
657 | source "arch/alpha/oprofile/Kconfig" | 657 | source "kernel/Kconfig.instrumentation" |
658 | 658 | ||
659 | source "arch/alpha/Kconfig.debug" | 659 | source "arch/alpha/Kconfig.debug" |
660 | 660 | ||
diff --git a/arch/alpha/kernel/err_marvel.c b/arch/alpha/kernel/err_marvel.c index f2956ac8dccc..497877bf2012 100644 --- a/arch/alpha/kernel/err_marvel.c +++ b/arch/alpha/kernel/err_marvel.c | |||
@@ -1082,7 +1082,7 @@ marvel_machine_check(u64 vector, u64 la_ptr) | |||
1082 | } | 1082 | } |
1083 | 1083 | ||
1084 | /* | 1084 | /* |
1085 | * A system event or error has occured, handle it here. | 1085 | * A system event or error has occurred, handle it here. |
1086 | * | 1086 | * |
1087 | * Any errors in the logout frame have already been cleared by the | 1087 | * Any errors in the logout frame have already been cleared by the |
1088 | * PALcode, so just parse it. | 1088 | * PALcode, so just parse it. |
diff --git a/arch/alpha/kernel/err_titan.c b/arch/alpha/kernel/err_titan.c index 543d96d7fa2b..6f3867877d9e 100644 --- a/arch/alpha/kernel/err_titan.c +++ b/arch/alpha/kernel/err_titan.c | |||
@@ -591,7 +591,7 @@ privateer_process_680_frame(struct el_common *mchk_header, int print) | |||
591 | (struct el_PRIVATEER_envdata_mcheck *) | 591 | (struct el_PRIVATEER_envdata_mcheck *) |
592 | ((unsigned long)mchk_header + mchk_header->sys_offset); | 592 | ((unsigned long)mchk_header + mchk_header->sys_offset); |
593 | 593 | ||
594 | /* TODO - catagorize errors, for now, no error */ | 594 | /* TODO - categorize errors, for now, no error */ |
595 | 595 | ||
596 | if (!print) | 596 | if (!print) |
597 | return status; | 597 | return status; |
diff --git a/arch/alpha/kernel/osf_sys.c b/arch/alpha/kernel/osf_sys.c index ce857158c1ea..6413c5f23226 100644 --- a/arch/alpha/kernel/osf_sys.c +++ b/arch/alpha/kernel/osf_sys.c | |||
@@ -715,7 +715,7 @@ osf_setsysinfo(unsigned long op, void __user *buffer, unsigned long nbytes, | |||
715 | /* | 715 | /* |
716 | * Alpha Architecture Handbook 4.7.7.3: | 716 | * Alpha Architecture Handbook 4.7.7.3: |
717 | * To be fully IEEE compiant, we must track the current IEEE | 717 | * To be fully IEEE compiant, we must track the current IEEE |
718 | * exception state in software, because spurrious bits can be | 718 | * exception state in software, because spurious bits can be |
719 | * set in the trap shadow of a software-complete insn. | 719 | * set in the trap shadow of a software-complete insn. |
720 | */ | 720 | */ |
721 | 721 | ||
diff --git a/arch/alpha/kernel/semaphore.c b/arch/alpha/kernel/semaphore.c index 8c8aaa205eae..8d2982aa1b8d 100644 --- a/arch/alpha/kernel/semaphore.c +++ b/arch/alpha/kernel/semaphore.c | |||
@@ -69,7 +69,7 @@ __down_failed(struct semaphore *sem) | |||
69 | 69 | ||
70 | #ifdef CONFIG_DEBUG_SEMAPHORE | 70 | #ifdef CONFIG_DEBUG_SEMAPHORE |
71 | printk("%s(%d): down failed(%p)\n", | 71 | printk("%s(%d): down failed(%p)\n", |
72 | tsk->comm, tsk->pid, sem); | 72 | tsk->comm, task_pid_nr(tsk), sem); |
73 | #endif | 73 | #endif |
74 | 74 | ||
75 | tsk->state = TASK_UNINTERRUPTIBLE; | 75 | tsk->state = TASK_UNINTERRUPTIBLE; |
@@ -98,7 +98,7 @@ __down_failed(struct semaphore *sem) | |||
98 | 98 | ||
99 | #ifdef CONFIG_DEBUG_SEMAPHORE | 99 | #ifdef CONFIG_DEBUG_SEMAPHORE |
100 | printk("%s(%d): down acquired(%p)\n", | 100 | printk("%s(%d): down acquired(%p)\n", |
101 | tsk->comm, tsk->pid, sem); | 101 | tsk->comm, task_pid_nr(tsk), sem); |
102 | #endif | 102 | #endif |
103 | } | 103 | } |
104 | 104 | ||
@@ -111,7 +111,7 @@ __down_failed_interruptible(struct semaphore *sem) | |||
111 | 111 | ||
112 | #ifdef CONFIG_DEBUG_SEMAPHORE | 112 | #ifdef CONFIG_DEBUG_SEMAPHORE |
113 | printk("%s(%d): down failed(%p)\n", | 113 | printk("%s(%d): down failed(%p)\n", |
114 | tsk->comm, tsk->pid, sem); | 114 | tsk->comm, task_pid_nr(tsk), sem); |
115 | #endif | 115 | #endif |
116 | 116 | ||
117 | tsk->state = TASK_INTERRUPTIBLE; | 117 | tsk->state = TASK_INTERRUPTIBLE; |
@@ -139,7 +139,7 @@ __down_failed_interruptible(struct semaphore *sem) | |||
139 | 139 | ||
140 | #ifdef CONFIG_DEBUG_SEMAPHORE | 140 | #ifdef CONFIG_DEBUG_SEMAPHORE |
141 | printk("%s(%d): down %s(%p)\n", | 141 | printk("%s(%d): down %s(%p)\n", |
142 | current->comm, current->pid, | 142 | current->comm, task_pid_nr(current), |
143 | (ret < 0 ? "interrupted" : "acquired"), sem); | 143 | (ret < 0 ? "interrupted" : "acquired"), sem); |
144 | #endif | 144 | #endif |
145 | return ret; | 145 | return ret; |
@@ -168,7 +168,7 @@ down(struct semaphore *sem) | |||
168 | #endif | 168 | #endif |
169 | #ifdef CONFIG_DEBUG_SEMAPHORE | 169 | #ifdef CONFIG_DEBUG_SEMAPHORE |
170 | printk("%s(%d): down(%p) <count=%d> from %p\n", | 170 | printk("%s(%d): down(%p) <count=%d> from %p\n", |
171 | current->comm, current->pid, sem, | 171 | current->comm, task_pid_nr(current), sem, |
172 | atomic_read(&sem->count), __builtin_return_address(0)); | 172 | atomic_read(&sem->count), __builtin_return_address(0)); |
173 | #endif | 173 | #endif |
174 | __down(sem); | 174 | __down(sem); |
@@ -182,7 +182,7 @@ down_interruptible(struct semaphore *sem) | |||
182 | #endif | 182 | #endif |
183 | #ifdef CONFIG_DEBUG_SEMAPHORE | 183 | #ifdef CONFIG_DEBUG_SEMAPHORE |
184 | printk("%s(%d): down(%p) <count=%d> from %p\n", | 184 | printk("%s(%d): down(%p) <count=%d> from %p\n", |
185 | current->comm, current->pid, sem, | 185 | current->comm, task_pid_nr(current), sem, |
186 | atomic_read(&sem->count), __builtin_return_address(0)); | 186 | atomic_read(&sem->count), __builtin_return_address(0)); |
187 | #endif | 187 | #endif |
188 | return __down_interruptible(sem); | 188 | return __down_interruptible(sem); |
@@ -201,7 +201,7 @@ down_trylock(struct semaphore *sem) | |||
201 | 201 | ||
202 | #ifdef CONFIG_DEBUG_SEMAPHORE | 202 | #ifdef CONFIG_DEBUG_SEMAPHORE |
203 | printk("%s(%d): down_trylock %s from %p\n", | 203 | printk("%s(%d): down_trylock %s from %p\n", |
204 | current->comm, current->pid, | 204 | current->comm, task_pid_nr(current), |
205 | ret ? "failed" : "acquired", | 205 | ret ? "failed" : "acquired", |
206 | __builtin_return_address(0)); | 206 | __builtin_return_address(0)); |
207 | #endif | 207 | #endif |
@@ -217,7 +217,7 @@ up(struct semaphore *sem) | |||
217 | #endif | 217 | #endif |
218 | #ifdef CONFIG_DEBUG_SEMAPHORE | 218 | #ifdef CONFIG_DEBUG_SEMAPHORE |
219 | printk("%s(%d): up(%p) <count=%d> from %p\n", | 219 | printk("%s(%d): up(%p) <count=%d> from %p\n", |
220 | current->comm, current->pid, sem, | 220 | current->comm, task_pid_nr(current), sem, |
221 | atomic_read(&sem->count), __builtin_return_address(0)); | 221 | atomic_read(&sem->count), __builtin_return_address(0)); |
222 | #endif | 222 | #endif |
223 | __up(sem); | 223 | __up(sem); |
diff --git a/arch/alpha/kernel/smp.c b/arch/alpha/kernel/smp.c index ad176441be55..f4ab233201b2 100644 --- a/arch/alpha/kernel/smp.c +++ b/arch/alpha/kernel/smp.c | |||
@@ -439,7 +439,6 @@ setup_smp(void) | |||
439 | ((char *)cpubase + i*hwrpb->processor_size); | 439 | ((char *)cpubase + i*hwrpb->processor_size); |
440 | if ((cpu->flags & 0x1cc) == 0x1cc) { | 440 | if ((cpu->flags & 0x1cc) == 0x1cc) { |
441 | smp_num_probed++; | 441 | smp_num_probed++; |
442 | /* Assume here that "whami" == index */ | ||
443 | cpu_set(i, cpu_present_map); | 442 | cpu_set(i, cpu_present_map); |
444 | cpu->pal_revision = boot_cpu_palrev; | 443 | cpu->pal_revision = boot_cpu_palrev; |
445 | } | 444 | } |
diff --git a/arch/alpha/kernel/sys_alcor.c b/arch/alpha/kernel/sys_alcor.c index 49bedfbbd31b..d187d01d2a17 100644 --- a/arch/alpha/kernel/sys_alcor.c +++ b/arch/alpha/kernel/sys_alcor.c | |||
@@ -138,7 +138,7 @@ alcor_init_irq(void) | |||
138 | 138 | ||
139 | for (i = 16; i < 48; ++i) { | 139 | for (i = 16; i < 48; ++i) { |
140 | /* On Alcor, at least, lines 20..30 are not connected | 140 | /* On Alcor, at least, lines 20..30 are not connected |
141 | and can generate spurrious interrupts if we turn them | 141 | and can generate spurious interrupts if we turn them |
142 | on while IRQ probing. */ | 142 | on while IRQ probing. */ |
143 | if (i >= 16+20 && i <= 16+30) | 143 | if (i >= 16+20 && i <= 16+30) |
144 | continue; | 144 | continue; |
diff --git a/arch/alpha/kernel/sys_sio.c b/arch/alpha/kernel/sys_sio.c index 14b5a753aba5..ee7b9009ebb4 100644 --- a/arch/alpha/kernel/sys_sio.c +++ b/arch/alpha/kernel/sys_sio.c | |||
@@ -78,7 +78,7 @@ alphabook1_init_arch(void) | |||
78 | * example, sound boards seem to like using IRQ 9. | 78 | * example, sound boards seem to like using IRQ 9. |
79 | * | 79 | * |
80 | * This is NOT how we should do it. PIRQ0-X should have | 80 | * This is NOT how we should do it. PIRQ0-X should have |
81 | * their own IRQ's, the way intel uses the IO-APIC irq's. | 81 | * their own IRQs, the way intel uses the IO-APIC IRQs. |
82 | */ | 82 | */ |
83 | 83 | ||
84 | static void __init | 84 | static void __init |
diff --git a/arch/alpha/kernel/traps.c b/arch/alpha/kernel/traps.c index ec0f05e0d8ff..2dc7f9fed213 100644 --- a/arch/alpha/kernel/traps.c +++ b/arch/alpha/kernel/traps.c | |||
@@ -182,7 +182,7 @@ die_if_kernel(char * str, struct pt_regs *regs, long err, unsigned long *r9_15) | |||
182 | #ifdef CONFIG_SMP | 182 | #ifdef CONFIG_SMP |
183 | printk("CPU %d ", hard_smp_processor_id()); | 183 | printk("CPU %d ", hard_smp_processor_id()); |
184 | #endif | 184 | #endif |
185 | printk("%s(%d): %s %ld\n", current->comm, current->pid, str, err); | 185 | printk("%s(%d): %s %ld\n", current->comm, task_pid_nr(current), str, err); |
186 | dik_show_regs(regs, r9_15); | 186 | dik_show_regs(regs, r9_15); |
187 | add_taint(TAINT_DIE); | 187 | add_taint(TAINT_DIE); |
188 | dik_show_trace((unsigned long *)(regs+1)); | 188 | dik_show_trace((unsigned long *)(regs+1)); |
@@ -646,7 +646,7 @@ got_exception: | |||
646 | lock_kernel(); | 646 | lock_kernel(); |
647 | 647 | ||
648 | printk("%s(%d): unhandled unaligned exception\n", | 648 | printk("%s(%d): unhandled unaligned exception\n", |
649 | current->comm, current->pid); | 649 | current->comm, task_pid_nr(current)); |
650 | 650 | ||
651 | printk("pc = [<%016lx>] ra = [<%016lx>] ps = %04lx\n", | 651 | printk("pc = [<%016lx>] ra = [<%016lx>] ps = %04lx\n", |
652 | pc, una_reg(26), regs->ps); | 652 | pc, una_reg(26), regs->ps); |
@@ -786,7 +786,7 @@ do_entUnaUser(void __user * va, unsigned long opcode, | |||
786 | } | 786 | } |
787 | if (++cnt < 5) { | 787 | if (++cnt < 5) { |
788 | printk("%s(%d): unaligned trap at %016lx: %p %lx %ld\n", | 788 | printk("%s(%d): unaligned trap at %016lx: %p %lx %ld\n", |
789 | current->comm, current->pid, | 789 | current->comm, task_pid_nr(current), |
790 | regs->pc - 4, va, opcode, reg); | 790 | regs->pc - 4, va, opcode, reg); |
791 | } | 791 | } |
792 | last_time = jiffies; | 792 | last_time = jiffies; |
diff --git a/arch/alpha/lib/checksum.c b/arch/alpha/lib/checksum.c index 8698e0746f9f..199f6efa83fa 100644 --- a/arch/alpha/lib/checksum.c +++ b/arch/alpha/lib/checksum.c | |||
@@ -5,7 +5,7 @@ | |||
5 | * in an architecture-specific manner due to speed.. | 5 | * in an architecture-specific manner due to speed.. |
6 | * Comments in other versions indicate that the algorithms are from RFC1071 | 6 | * Comments in other versions indicate that the algorithms are from RFC1071 |
7 | * | 7 | * |
8 | * accellerated versions (and 21264 assembly versions ) contributed by | 8 | * accelerated versions (and 21264 assembly versions ) contributed by |
9 | * Rick Gorton <rick.gorton@alpha-processor.com> | 9 | * Rick Gorton <rick.gorton@alpha-processor.com> |
10 | */ | 10 | */ |
11 | 11 | ||
diff --git a/arch/alpha/lib/csum_partial_copy.c b/arch/alpha/lib/csum_partial_copy.c index 4ca75c74ce90..40736da9bea8 100644 --- a/arch/alpha/lib/csum_partial_copy.c +++ b/arch/alpha/lib/csum_partial_copy.c | |||
@@ -2,7 +2,7 @@ | |||
2 | * csum_partial_copy - do IP checksumming and copy | 2 | * csum_partial_copy - do IP checksumming and copy |
3 | * | 3 | * |
4 | * (C) Copyright 1996 Linus Torvalds | 4 | * (C) Copyright 1996 Linus Torvalds |
5 | * accellerated versions (and 21264 assembly versions ) contributed by | 5 | * accelerated versions (and 21264 assembly versions ) contributed by |
6 | * Rick Gorton <rick.gorton@alpha-processor.com> | 6 | * Rick Gorton <rick.gorton@alpha-processor.com> |
7 | * | 7 | * |
8 | * Don't look at this too closely - you'll go mad. The things | 8 | * Don't look at this too closely - you'll go mad. The things |
diff --git a/arch/alpha/lib/fls.c b/arch/alpha/lib/fls.c index 7ad84ea0acf8..32afaa3fa686 100644 --- a/arch/alpha/lib/fls.c +++ b/arch/alpha/lib/fls.c | |||
@@ -3,7 +3,7 @@ | |||
3 | */ | 3 | */ |
4 | 4 | ||
5 | #include <linux/module.h> | 5 | #include <linux/module.h> |
6 | #include <asm/bitops.h> | 6 | #include <linux/bitops.h> |
7 | 7 | ||
8 | /* This is fls(x)-1, except zero is held to zero. This allows most | 8 | /* This is fls(x)-1, except zero is held to zero. This allows most |
9 | efficent input into extbl, plus it allows easy handling of fls(0)=0. */ | 9 | efficent input into extbl, plus it allows easy handling of fls(0)=0. */ |
diff --git a/arch/alpha/mm/fault.c b/arch/alpha/mm/fault.c index 25154df3055a..4829f96585b1 100644 --- a/arch/alpha/mm/fault.c +++ b/arch/alpha/mm/fault.c | |||
@@ -188,13 +188,13 @@ do_page_fault(unsigned long address, unsigned long mmcsr, | |||
188 | /* We ran out of memory, or some other thing happened to us that | 188 | /* We ran out of memory, or some other thing happened to us that |
189 | made us unable to handle the page fault gracefully. */ | 189 | made us unable to handle the page fault gracefully. */ |
190 | out_of_memory: | 190 | out_of_memory: |
191 | if (is_init(current)) { | 191 | if (is_global_init(current)) { |
192 | yield(); | 192 | yield(); |
193 | down_read(&mm->mmap_sem); | 193 | down_read(&mm->mmap_sem); |
194 | goto survive; | 194 | goto survive; |
195 | } | 195 | } |
196 | printk(KERN_ALERT "VM: killing process %s(%d)\n", | 196 | printk(KERN_ALERT "VM: killing process %s(%d)\n", |
197 | current->comm, current->pid); | 197 | current->comm, task_pid_nr(current)); |
198 | if (!user_mode(regs)) | 198 | if (!user_mode(regs)) |
199 | goto no_context; | 199 | goto no_context; |
200 | do_group_exit(SIGKILL); | 200 | do_group_exit(SIGKILL); |
diff --git a/arch/alpha/mm/init.c b/arch/alpha/mm/init.c index 5e6da47779a4..40c15e7301de 100644 --- a/arch/alpha/mm/init.c +++ b/arch/alpha/mm/init.c | |||
@@ -235,7 +235,7 @@ callback_init(void * kernel_end) | |||
235 | unsigned long pfn = crb->map[i].pa >> PAGE_SHIFT; | 235 | unsigned long pfn = crb->map[i].pa >> PAGE_SHIFT; |
236 | crb->map[i].va = vaddr; | 236 | crb->map[i].va = vaddr; |
237 | for (j = 0; j < crb->map[i].count; ++j) { | 237 | for (j = 0; j < crb->map[i].count; ++j) { |
238 | /* Newer console's (especially on larger | 238 | /* Newer consoles (especially on larger |
239 | systems) may require more pages of | 239 | systems) may require more pages of |
240 | PTEs. Grab additional pages as needed. */ | 240 | PTEs. Grab additional pages as needed. */ |
241 | if (pmd != pmd_offset(pgd, vaddr)) { | 241 | if (pmd != pmd_offset(pgd, vaddr)) { |
diff --git a/arch/alpha/oprofile/Kconfig b/arch/alpha/oprofile/Kconfig deleted file mode 100644 index 5ade19801b97..000000000000 --- a/arch/alpha/oprofile/Kconfig +++ /dev/null | |||
@@ -1,23 +0,0 @@ | |||
1 | |||
2 | menu "Profiling support" | ||
3 | depends on EXPERIMENTAL | ||
4 | |||
5 | config PROFILING | ||
6 | bool "Profiling support (EXPERIMENTAL)" | ||
7 | help | ||
8 | Say Y here to enable the extended profiling support mechanisms used | ||
9 | by profilers such as OProfile. | ||
10 | |||
11 | |||
12 | config OPROFILE | ||
13 | tristate "OProfile system profiling (EXPERIMENTAL)" | ||
14 | depends on PROFILING | ||
15 | help | ||
16 | OProfile is a profiling system capable of profiling the | ||
17 | whole system, include the kernel, kernel modules, libraries, | ||
18 | and applications. | ||
19 | |||
20 | If unsure, say N. | ||
21 | |||
22 | endmenu | ||
23 | |||
diff --git a/arch/alpha/oprofile/op_impl.h b/arch/alpha/oprofile/op_impl.h index 6b97893c1a80..b2b87ae9a353 100644 --- a/arch/alpha/oprofile/op_impl.h +++ b/arch/alpha/oprofile/op_impl.h | |||
@@ -38,7 +38,7 @@ struct op_register_config { | |||
38 | unsigned long need_reset; | 38 | unsigned long need_reset; |
39 | }; | 39 | }; |
40 | 40 | ||
41 | /* Per-architecture configury and hooks. */ | 41 | /* Per-architecture configuration and hooks. */ |
42 | struct op_axp_model { | 42 | struct op_axp_model { |
43 | void (*reg_setup) (struct op_register_config *, | 43 | void (*reg_setup) (struct op_register_config *, |
44 | struct op_counter_config *, | 44 | struct op_counter_config *, |
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 0a0c88d0039c..a0cdaafa115b 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig | |||
@@ -851,7 +851,7 @@ config KEXEC | |||
851 | help | 851 | help |
852 | kexec is a system call that implements the ability to shutdown your | 852 | kexec is a system call that implements the ability to shutdown your |
853 | current kernel, and to start another kernel. It is like a reboot | 853 | current kernel, and to start another kernel. It is like a reboot |
854 | but it is indepedent of the system firmware. And like a reboot | 854 | but it is independent of the system firmware. And like a reboot |
855 | you can start any kernel with it, not just Linux. | 855 | you can start any kernel with it, not just Linux. |
856 | 856 | ||
857 | It is an ongoing process to be certain the hardware in a machine | 857 | It is an ongoing process to be certain the hardware in a machine |
@@ -1068,7 +1068,7 @@ endmenu | |||
1068 | 1068 | ||
1069 | source "fs/Kconfig" | 1069 | source "fs/Kconfig" |
1070 | 1070 | ||
1071 | source "arch/arm/oprofile/Kconfig" | 1071 | source "kernel/Kconfig.instrumentation" |
1072 | 1072 | ||
1073 | source "arch/arm/Kconfig.debug" | 1073 | source "arch/arm/Kconfig.debug" |
1074 | 1074 | ||
diff --git a/arch/arm/common/sharpsl_pm.c b/arch/arm/common/sharpsl_pm.c index 111a7fa5debe..5bba5255b119 100644 --- a/arch/arm/common/sharpsl_pm.c +++ b/arch/arm/common/sharpsl_pm.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <linux/platform_device.h> | 24 | #include <linux/platform_device.h> |
25 | #include <linux/leds.h> | 25 | #include <linux/leds.h> |
26 | #include <linux/apm-emulation.h> | 26 | #include <linux/apm-emulation.h> |
27 | #include <linux/suspend.h> | ||
27 | 28 | ||
28 | #include <asm/hardware.h> | 29 | #include <asm/hardware.h> |
29 | #include <asm/mach-types.h> | 30 | #include <asm/mach-types.h> |
@@ -765,9 +766,9 @@ static void sharpsl_apm_get_power_status(struct apm_power_info *info) | |||
765 | info->battery_life = sharpsl_pm.battstat.mainbat_percent; | 766 | info->battery_life = sharpsl_pm.battstat.mainbat_percent; |
766 | } | 767 | } |
767 | 768 | ||
768 | static struct pm_ops sharpsl_pm_ops = { | 769 | static struct platform_suspend_ops sharpsl_pm_ops = { |
769 | .enter = corgi_pxa_pm_enter, | 770 | .enter = corgi_pxa_pm_enter, |
770 | .valid = pm_valid_only_mem, | 771 | .valid = suspend_valid_only_mem, |
771 | }; | 772 | }; |
772 | 773 | ||
773 | static int __init sharpsl_pm_probe(struct platform_device *pdev) | 774 | static int __init sharpsl_pm_probe(struct platform_device *pdev) |
@@ -799,7 +800,7 @@ static int __init sharpsl_pm_probe(struct platform_device *pdev) | |||
799 | 800 | ||
800 | apm_get_power_status = sharpsl_apm_get_power_status; | 801 | apm_get_power_status = sharpsl_apm_get_power_status; |
801 | 802 | ||
802 | pm_set_ops(&sharpsl_pm_ops); | 803 | suspend_set_ops(&sharpsl_pm_ops); |
803 | 804 | ||
804 | mod_timer(&sharpsl_pm.ac_timer, jiffies + msecs_to_jiffies(250)); | 805 | mod_timer(&sharpsl_pm.ac_timer, jiffies + msecs_to_jiffies(250)); |
805 | 806 | ||
@@ -808,7 +809,7 @@ static int __init sharpsl_pm_probe(struct platform_device *pdev) | |||
808 | 809 | ||
809 | static int sharpsl_pm_remove(struct platform_device *pdev) | 810 | static int sharpsl_pm_remove(struct platform_device *pdev) |
810 | { | 811 | { |
811 | pm_set_ops(NULL); | 812 | suspend_set_ops(NULL); |
812 | 813 | ||
813 | device_remove_file(&pdev->dev, &dev_attr_battery_percentage); | 814 | device_remove_file(&pdev->dev, &dev_attr_battery_percentage); |
814 | device_remove_file(&pdev->dev, &dev_attr_battery_voltage); | 815 | device_remove_file(&pdev->dev, &dev_attr_battery_voltage); |
diff --git a/arch/arm/kernel/process.c b/arch/arm/kernel/process.c index 93b7f8e22dcc..4f1a03124a74 100644 --- a/arch/arm/kernel/process.c +++ b/arch/arm/kernel/process.c | |||
@@ -265,7 +265,7 @@ void __show_regs(struct pt_regs *regs) | |||
265 | void show_regs(struct pt_regs * regs) | 265 | void show_regs(struct pt_regs * regs) |
266 | { | 266 | { |
267 | printk("\n"); | 267 | printk("\n"); |
268 | printk("Pid: %d, comm: %20s\n", current->pid, current->comm); | 268 | printk("Pid: %d, comm: %20s\n", task_pid_nr(current), current->comm); |
269 | __show_regs(regs); | 269 | __show_regs(regs); |
270 | __backtrace(); | 270 | __backtrace(); |
271 | } | 271 | } |
diff --git a/arch/arm/kernel/ptrace.c b/arch/arm/kernel/ptrace.c index 5feee722ea98..4b05dc5c1023 100644 --- a/arch/arm/kernel/ptrace.c +++ b/arch/arm/kernel/ptrace.c | |||
@@ -382,16 +382,16 @@ static void clear_breakpoint(struct task_struct *task, struct debug_entry *bp) | |||
382 | 382 | ||
383 | if (ret != 2 || old_insn.thumb != BREAKINST_THUMB) | 383 | if (ret != 2 || old_insn.thumb != BREAKINST_THUMB) |
384 | printk(KERN_ERR "%s:%d: corrupted Thumb breakpoint at " | 384 | printk(KERN_ERR "%s:%d: corrupted Thumb breakpoint at " |
385 | "0x%08lx (0x%04x)\n", task->comm, task->pid, | 385 | "0x%08lx (0x%04x)\n", task->comm, |
386 | addr, old_insn.thumb); | 386 | task_pid_nr(task), addr, old_insn.thumb); |
387 | } else { | 387 | } else { |
388 | ret = swap_insn(task, addr & ~3, &old_insn.arm, | 388 | ret = swap_insn(task, addr & ~3, &old_insn.arm, |
389 | &bp->insn.arm, 4); | 389 | &bp->insn.arm, 4); |
390 | 390 | ||
391 | if (ret != 4 || old_insn.arm != BREAKINST_ARM) | 391 | if (ret != 4 || old_insn.arm != BREAKINST_ARM) |
392 | printk(KERN_ERR "%s:%d: corrupted ARM breakpoint at " | 392 | printk(KERN_ERR "%s:%d: corrupted ARM breakpoint at " |
393 | "0x%08lx (0x%08x)\n", task->comm, task->pid, | 393 | "0x%08lx (0x%08x)\n", task->comm, |
394 | addr, old_insn.arm); | 394 | task_pid_nr(task), addr, old_insn.arm); |
395 | } | 395 | } |
396 | } | 396 | } |
397 | 397 | ||
diff --git a/arch/arm/kernel/traps.c b/arch/arm/kernel/traps.c index 8ad47619c079..4764bd9ccee8 100644 --- a/arch/arm/kernel/traps.c +++ b/arch/arm/kernel/traps.c | |||
@@ -223,7 +223,7 @@ static void __die(const char *str, int err, struct thread_info *thread, struct p | |||
223 | print_modules(); | 223 | print_modules(); |
224 | __show_regs(regs); | 224 | __show_regs(regs); |
225 | printk("Process %s (pid: %d, stack limit = 0x%p)\n", | 225 | printk("Process %s (pid: %d, stack limit = 0x%p)\n", |
226 | tsk->comm, tsk->pid, thread + 1); | 226 | tsk->comm, task_pid_nr(tsk), thread + 1); |
227 | 227 | ||
228 | if (!user_mode(regs) || in_interrupt()) { | 228 | if (!user_mode(regs) || in_interrupt()) { |
229 | dump_mem("Stack: ", regs->ARM_sp, | 229 | dump_mem("Stack: ", regs->ARM_sp, |
@@ -337,7 +337,7 @@ asmlinkage void __exception do_undefinstr(struct pt_regs *regs) | |||
337 | #ifdef CONFIG_DEBUG_USER | 337 | #ifdef CONFIG_DEBUG_USER |
338 | if (user_debug & UDBG_UNDEFINED) { | 338 | if (user_debug & UDBG_UNDEFINED) { |
339 | printk(KERN_INFO "%s (%d): undefined instruction: pc=%p\n", | 339 | printk(KERN_INFO "%s (%d): undefined instruction: pc=%p\n", |
340 | current->comm, current->pid, pc); | 340 | current->comm, task_pid_nr(current), pc); |
341 | dump_instr(regs); | 341 | dump_instr(regs); |
342 | } | 342 | } |
343 | #endif | 343 | #endif |
@@ -388,7 +388,7 @@ static int bad_syscall(int n, struct pt_regs *regs) | |||
388 | #ifdef CONFIG_DEBUG_USER | 388 | #ifdef CONFIG_DEBUG_USER |
389 | if (user_debug & UDBG_SYSCALL) { | 389 | if (user_debug & UDBG_SYSCALL) { |
390 | printk(KERN_ERR "[%d] %s: obsolete system call %08x.\n", | 390 | printk(KERN_ERR "[%d] %s: obsolete system call %08x.\n", |
391 | current->pid, current->comm, n); | 391 | task_pid_nr(current), current->comm, n); |
392 | dump_instr(regs); | 392 | dump_instr(regs); |
393 | } | 393 | } |
394 | #endif | 394 | #endif |
@@ -565,7 +565,7 @@ asmlinkage int arm_syscall(int no, struct pt_regs *regs) | |||
565 | */ | 565 | */ |
566 | if (user_debug & UDBG_SYSCALL) { | 566 | if (user_debug & UDBG_SYSCALL) { |
567 | printk("[%d] %s: arm syscall %d\n", | 567 | printk("[%d] %s: arm syscall %d\n", |
568 | current->pid, current->comm, no); | 568 | task_pid_nr(current), current->comm, no); |
569 | dump_instr(regs); | 569 | dump_instr(regs); |
570 | if (user_mode(regs)) { | 570 | if (user_mode(regs)) { |
571 | __show_regs(regs); | 571 | __show_regs(regs); |
@@ -642,7 +642,7 @@ baddataabort(int code, unsigned long instr, struct pt_regs *regs) | |||
642 | #ifdef CONFIG_DEBUG_USER | 642 | #ifdef CONFIG_DEBUG_USER |
643 | if (user_debug & UDBG_BADABORT) { | 643 | if (user_debug & UDBG_BADABORT) { |
644 | printk(KERN_ERR "[%d] %s: bad data abort: code %d instr 0x%08lx\n", | 644 | printk(KERN_ERR "[%d] %s: bad data abort: code %d instr 0x%08lx\n", |
645 | current->pid, current->comm, code, instr); | 645 | task_pid_nr(current), current->comm, code, instr); |
646 | dump_instr(regs); | 646 | dump_instr(regs); |
647 | show_pte(current->mm, addr); | 647 | show_pte(current->mm, addr); |
648 | } | 648 | } |
diff --git a/arch/arm/mach-at91/gpio.c b/arch/arm/mach-at91/gpio.c index ba4a1bb3ee40..aa2d365c93fb 100644 --- a/arch/arm/mach-at91/gpio.c +++ b/arch/arm/mach-at91/gpio.c | |||
@@ -439,7 +439,7 @@ void __init at91_gpio_irq_setup(void) | |||
439 | for (i = 0; i < 32; i++, pin++) { | 439 | for (i = 0; i < 32; i++, pin++) { |
440 | /* | 440 | /* |
441 | * Can use the "simple" and not "edge" handler since it's | 441 | * Can use the "simple" and not "edge" handler since it's |
442 | * shorter, and the AIC handles interupts sanely. | 442 | * shorter, and the AIC handles interrupts sanely. |
443 | */ | 443 | */ |
444 | set_irq_chip(pin, &gpio_irqchip); | 444 | set_irq_chip(pin, &gpio_irqchip); |
445 | set_irq_handler(pin, handle_simple_irq); | 445 | set_irq_handler(pin, handle_simple_irq); |
diff --git a/arch/arm/mach-at91/pm.c b/arch/arm/mach-at91/pm.c index ddf9184d561d..98cb61482917 100644 --- a/arch/arm/mach-at91/pm.c +++ b/arch/arm/mach-at91/pm.c | |||
@@ -10,10 +10,9 @@ | |||
10 | * (at your option) any later version. | 10 | * (at your option) any later version. |
11 | */ | 11 | */ |
12 | 12 | ||
13 | #include <linux/pm.h> | 13 | #include <linux/suspend.h> |
14 | #include <linux/sched.h> | 14 | #include <linux/sched.h> |
15 | #include <linux/proc_fs.h> | 15 | #include <linux/proc_fs.h> |
16 | #include <linux/pm.h> | ||
17 | #include <linux/interrupt.h> | 16 | #include <linux/interrupt.h> |
18 | #include <linux/sysfs.h> | 17 | #include <linux/sysfs.h> |
19 | #include <linux/module.h> | 18 | #include <linux/module.h> |
@@ -199,7 +198,7 @@ error: | |||
199 | } | 198 | } |
200 | 199 | ||
201 | 200 | ||
202 | static struct pm_ops at91_pm_ops ={ | 201 | static struct platform_suspend_ops at91_pm_ops ={ |
203 | .valid = at91_pm_valid_state, | 202 | .valid = at91_pm_valid_state, |
204 | .set_target = at91_pm_set_target, | 203 | .set_target = at91_pm_set_target, |
205 | .enter = at91_pm_enter, | 204 | .enter = at91_pm_enter, |
@@ -220,7 +219,7 @@ static int __init at91_pm_init(void) | |||
220 | /* Disable SDRAM low-power mode. Cannot be used with self-refresh. */ | 219 | /* Disable SDRAM low-power mode. Cannot be used with self-refresh. */ |
221 | at91_sys_write(AT91_SDRAMC_LPR, 0); | 220 | at91_sys_write(AT91_SDRAMC_LPR, 0); |
222 | 221 | ||
223 | pm_set_ops(&at91_pm_ops); | 222 | suspend_set_ops(&at91_pm_ops); |
224 | 223 | ||
225 | return 0; | 224 | return 0; |
226 | } | 225 | } |
diff --git a/arch/arm/mach-omap1/irq.c b/arch/arm/mach-omap1/irq.c index 0733078940fa..1da9d59a0347 100644 --- a/arch/arm/mach-omap1/irq.c +++ b/arch/arm/mach-omap1/irq.c | |||
@@ -5,7 +5,7 @@ | |||
5 | * | 5 | * |
6 | * Copyright (C) 2004 Nokia Corporation | 6 | * Copyright (C) 2004 Nokia Corporation |
7 | * Written by Tony Lindgren <tony@atomide.com> | 7 | * Written by Tony Lindgren <tony@atomide.com> |
8 | * Major cleanups by Juha Yrjölä <juha.yrjola@nokia.com> | 8 | * Major cleanups by Juha Yrjölä <juha.yrjola@nokia.com> |
9 | * | 9 | * |
10 | * Completely re-written to support various OMAP chips with bank specific | 10 | * Completely re-written to support various OMAP chips with bank specific |
11 | * interrupt handlers. | 11 | * interrupt handlers. |
diff --git a/arch/arm/mach-omap1/pm.c b/arch/arm/mach-omap1/pm.c index 089b8208de0e..3bf01e28df33 100644 --- a/arch/arm/mach-omap1/pm.c +++ b/arch/arm/mach-omap1/pm.c | |||
@@ -35,10 +35,9 @@ | |||
35 | * 675 Mass Ave, Cambridge, MA 02139, USA. | 35 | * 675 Mass Ave, Cambridge, MA 02139, USA. |
36 | */ | 36 | */ |
37 | 37 | ||
38 | #include <linux/pm.h> | 38 | #include <linux/suspend.h> |
39 | #include <linux/sched.h> | 39 | #include <linux/sched.h> |
40 | #include <linux/proc_fs.h> | 40 | #include <linux/proc_fs.h> |
41 | #include <linux/pm.h> | ||
42 | #include <linux/interrupt.h> | 41 | #include <linux/interrupt.h> |
43 | #include <linux/sysfs.h> | 42 | #include <linux/sysfs.h> |
44 | #include <linux/module.h> | 43 | #include <linux/module.h> |
@@ -600,27 +599,15 @@ static void (*saved_idle)(void) = NULL; | |||
600 | 599 | ||
601 | /* | 600 | /* |
602 | * omap_pm_prepare - Do preliminary suspend work. | 601 | * omap_pm_prepare - Do preliminary suspend work. |
603 | * @state: suspend state we're entering. | ||
604 | * | 602 | * |
605 | */ | 603 | */ |
606 | static int omap_pm_prepare(suspend_state_t state) | 604 | static int omap_pm_prepare(void) |
607 | { | 605 | { |
608 | int error = 0; | ||
609 | |||
610 | /* We cannot sleep in idle until we have resumed */ | 606 | /* We cannot sleep in idle until we have resumed */ |
611 | saved_idle = pm_idle; | 607 | saved_idle = pm_idle; |
612 | pm_idle = NULL; | 608 | pm_idle = NULL; |
613 | 609 | ||
614 | switch (state) | 610 | return 0; |
615 | { | ||
616 | case PM_SUSPEND_STANDBY: | ||
617 | case PM_SUSPEND_MEM: | ||
618 | break; | ||
619 | default: | ||
620 | return -EINVAL; | ||
621 | } | ||
622 | |||
623 | return error; | ||
624 | } | 611 | } |
625 | 612 | ||
626 | 613 | ||
@@ -648,16 +635,14 @@ static int omap_pm_enter(suspend_state_t state) | |||
648 | 635 | ||
649 | /** | 636 | /** |
650 | * omap_pm_finish - Finish up suspend sequence. | 637 | * omap_pm_finish - Finish up suspend sequence. |
651 | * @state: State we're coming out of. | ||
652 | * | 638 | * |
653 | * This is called after we wake back up (or if entering the sleep state | 639 | * This is called after we wake back up (or if entering the sleep state |
654 | * failed). | 640 | * failed). |
655 | */ | 641 | */ |
656 | 642 | ||
657 | static int omap_pm_finish(suspend_state_t state) | 643 | static void omap_pm_finish(void) |
658 | { | 644 | { |
659 | pm_idle = saved_idle; | 645 | pm_idle = saved_idle; |
660 | return 0; | ||
661 | } | 646 | } |
662 | 647 | ||
663 | 648 | ||
@@ -674,11 +659,11 @@ static struct irqaction omap_wakeup_irq = { | |||
674 | 659 | ||
675 | 660 | ||
676 | 661 | ||
677 | static struct pm_ops omap_pm_ops ={ | 662 | static struct platform_suspend_ops omap_pm_ops ={ |
678 | .prepare = omap_pm_prepare, | 663 | .prepare = omap_pm_prepare, |
679 | .enter = omap_pm_enter, | 664 | .enter = omap_pm_enter, |
680 | .finish = omap_pm_finish, | 665 | .finish = omap_pm_finish, |
681 | .valid = pm_valid_only_mem, | 666 | .valid = suspend_valid_only_mem, |
682 | }; | 667 | }; |
683 | 668 | ||
684 | static int __init omap_pm_init(void) | 669 | static int __init omap_pm_init(void) |
@@ -735,7 +720,7 @@ static int __init omap_pm_init(void) | |||
735 | else if (cpu_is_omap16xx()) | 720 | else if (cpu_is_omap16xx()) |
736 | omap_writel(OMAP1610_IDLECT3_VAL, OMAP1610_IDLECT3); | 721 | omap_writel(OMAP1610_IDLECT3_VAL, OMAP1610_IDLECT3); |
737 | 722 | ||
738 | pm_set_ops(&omap_pm_ops); | 723 | suspend_set_ops(&omap_pm_ops); |
739 | 724 | ||
740 | #if defined(DEBUG) && defined(CONFIG_PROC_FS) | 725 | #if defined(DEBUG) && defined(CONFIG_PROC_FS) |
741 | omap_pm_init_proc(); | 726 | omap_pm_init_proc(); |
diff --git a/arch/arm/mach-omap2/pm.c b/arch/arm/mach-omap2/pm.c index 6f4a5436d0ce..baf7d82b458b 100644 --- a/arch/arm/mach-omap2/pm.c +++ b/arch/arm/mach-omap2/pm.c | |||
@@ -16,10 +16,9 @@ | |||
16 | * published by the Free Software Foundation. | 16 | * published by the Free Software Foundation. |
17 | */ | 17 | */ |
18 | 18 | ||
19 | #include <linux/pm.h> | 19 | #include <linux/suspend.h> |
20 | #include <linux/sched.h> | 20 | #include <linux/sched.h> |
21 | #include <linux/proc_fs.h> | 21 | #include <linux/proc_fs.h> |
22 | #include <linux/pm.h> | ||
23 | #include <linux/interrupt.h> | 22 | #include <linux/interrupt.h> |
24 | #include <linux/sysfs.h> | 23 | #include <linux/sysfs.h> |
25 | #include <linux/module.h> | 24 | #include <linux/module.h> |
@@ -71,28 +70,12 @@ void omap2_pm_idle(void) | |||
71 | local_irq_enable(); | 70 | local_irq_enable(); |
72 | } | 71 | } |
73 | 72 | ||
74 | static int omap2_pm_prepare(suspend_state_t state) | 73 | static int omap2_pm_prepare(void) |
75 | { | 74 | { |
76 | int error = 0; | ||
77 | |||
78 | /* We cannot sleep in idle until we have resumed */ | 75 | /* We cannot sleep in idle until we have resumed */ |
79 | saved_idle = pm_idle; | 76 | saved_idle = pm_idle; |
80 | pm_idle = NULL; | 77 | pm_idle = NULL; |
81 | 78 | return 0; | |
82 | switch (state) | ||
83 | { | ||
84 | case PM_SUSPEND_STANDBY: | ||
85 | case PM_SUSPEND_MEM: | ||
86 | break; | ||
87 | |||
88 | case PM_SUSPEND_DISK: | ||
89 | return -ENOTSUPP; | ||
90 | |||
91 | default: | ||
92 | return -EINVAL; | ||
93 | } | ||
94 | |||
95 | return error; | ||
96 | } | 79 | } |
97 | 80 | ||
98 | #define INT0_WAKE_MASK (OMAP_IRQ_BIT(INT_24XX_GPIO_BANK1) | \ | 81 | #define INT0_WAKE_MASK (OMAP_IRQ_BIT(INT_24XX_GPIO_BANK1) | \ |
@@ -353,9 +336,6 @@ static int omap2_pm_enter(suspend_state_t state) | |||
353 | case PM_SUSPEND_MEM: | 336 | case PM_SUSPEND_MEM: |
354 | ret = omap2_pm_suspend(); | 337 | ret = omap2_pm_suspend(); |
355 | break; | 338 | break; |
356 | case PM_SUSPEND_DISK: | ||
357 | ret = -ENOTSUPP; | ||
358 | break; | ||
359 | default: | 339 | default: |
360 | ret = -EINVAL; | 340 | ret = -EINVAL; |
361 | } | 341 | } |
@@ -363,17 +343,16 @@ static int omap2_pm_enter(suspend_state_t state) | |||
363 | return ret; | 343 | return ret; |
364 | } | 344 | } |
365 | 345 | ||
366 | static int omap2_pm_finish(suspend_state_t state) | 346 | static void omap2_pm_finish(void) |
367 | { | 347 | { |
368 | pm_idle = saved_idle; | 348 | pm_idle = saved_idle; |
369 | return 0; | ||
370 | } | 349 | } |
371 | 350 | ||
372 | static struct pm_ops omap_pm_ops = { | 351 | static struct platform_suspend_ops omap_pm_ops = { |
373 | .prepare = omap2_pm_prepare, | 352 | .prepare = omap2_pm_prepare, |
374 | .enter = omap2_pm_enter, | 353 | .enter = omap2_pm_enter, |
375 | .finish = omap2_pm_finish, | 354 | .finish = omap2_pm_finish, |
376 | .valid = pm_valid_only_mem, | 355 | .valid = suspend_valid_only_mem, |
377 | }; | 356 | }; |
378 | 357 | ||
379 | int __init omap2_pm_init(void) | 358 | int __init omap2_pm_init(void) |
@@ -397,7 +376,7 @@ int __init omap2_pm_init(void) | |||
397 | omap2_sram_suspend = omap_sram_push(omap24xx_cpu_suspend, | 376 | omap2_sram_suspend = omap_sram_push(omap24xx_cpu_suspend, |
398 | omap24xx_cpu_suspend_sz); | 377 | omap24xx_cpu_suspend_sz); |
399 | 378 | ||
400 | pm_set_ops(&omap_pm_ops); | 379 | suspend_set_ops(&omap_pm_ops); |
401 | pm_idle = omap2_pm_idle; | 380 | pm_idle = omap2_pm_idle; |
402 | 381 | ||
403 | pmdomain_init(); | 382 | pmdomain_init(); |
diff --git a/arch/arm/mach-omap2/timer-gp.c b/arch/arm/mach-omap2/timer-gp.c index 62e801ef9ad9..8d322c20ccae 100644 --- a/arch/arm/mach-omap2/timer-gp.c +++ b/arch/arm/mach-omap2/timer-gp.c | |||
@@ -5,7 +5,7 @@ | |||
5 | * | 5 | * |
6 | * Copyright (C) 2005 Nokia Corporation | 6 | * Copyright (C) 2005 Nokia Corporation |
7 | * Author: Paul Mundt <paul.mundt@nokia.com> | 7 | * Author: Paul Mundt <paul.mundt@nokia.com> |
8 | * Juha Yrjölä <juha.yrjola@nokia.com> | 8 | * Juha Yrjölä <juha.yrjola@nokia.com> |
9 | * OMAP Dual-mode timer framework support by Timo Teras | 9 | * OMAP Dual-mode timer framework support by Timo Teras |
10 | * | 10 | * |
11 | * Some parts based off of TI's 24xx code: | 11 | * Some parts based off of TI's 24xx code: |
diff --git a/arch/arm/mach-pnx4008/pm.c b/arch/arm/mach-pnx4008/pm.c index 2a137f33f752..40116d254349 100644 --- a/arch/arm/mach-pnx4008/pm.c +++ b/arch/arm/mach-pnx4008/pm.c | |||
@@ -15,7 +15,7 @@ | |||
15 | #include <linux/rtc.h> | 15 | #include <linux/rtc.h> |
16 | #include <linux/sched.h> | 16 | #include <linux/sched.h> |
17 | #include <linux/proc_fs.h> | 17 | #include <linux/proc_fs.h> |
18 | #include <linux/pm.h> | 18 | #include <linux/suspend.h> |
19 | #include <linux/delay.h> | 19 | #include <linux/delay.h> |
20 | #include <linux/clk.h> | 20 | #include <linux/clk.h> |
21 | 21 | ||
@@ -117,7 +117,7 @@ static int pnx4008_pm_valid(suspend_state_t state) | |||
117 | (state == PM_SUSPEND_MEM); | 117 | (state == PM_SUSPEND_MEM); |
118 | } | 118 | } |
119 | 119 | ||
120 | static struct pm_ops pnx4008_pm_ops = { | 120 | static struct platform_suspend_ops pnx4008_pm_ops = { |
121 | .enter = pnx4008_pm_enter, | 121 | .enter = pnx4008_pm_enter, |
122 | .valid = pnx4008_pm_valid, | 122 | .valid = pnx4008_pm_valid, |
123 | }; | 123 | }; |
@@ -146,7 +146,7 @@ static int __init pnx4008_pm_init(void) | |||
146 | return -ENOMEM; | 146 | return -ENOMEM; |
147 | } | 147 | } |
148 | 148 | ||
149 | pm_set_ops(&pnx4008_pm_ops); | 149 | suspend_set_ops(&pnx4008_pm_ops); |
150 | return 0; | 150 | return 0; |
151 | } | 151 | } |
152 | 152 | ||
diff --git a/arch/arm/mach-pxa/pm.c b/arch/arm/mach-pxa/pm.c index b59a81a8e7d3..a941c71c7d06 100644 --- a/arch/arm/mach-pxa/pm.c +++ b/arch/arm/mach-pxa/pm.c | |||
@@ -86,7 +86,7 @@ static int pxa_pm_valid(suspend_state_t state) | |||
86 | return -EINVAL; | 86 | return -EINVAL; |
87 | } | 87 | } |
88 | 88 | ||
89 | static struct pm_ops pxa_pm_ops = { | 89 | static struct platform_suspend_ops pxa_pm_ops = { |
90 | .valid = pxa_pm_valid, | 90 | .valid = pxa_pm_valid, |
91 | .enter = pxa_pm_enter, | 91 | .enter = pxa_pm_enter, |
92 | }; | 92 | }; |
@@ -104,7 +104,7 @@ static int __init pxa_pm_init(void) | |||
104 | return -ENOMEM; | 104 | return -ENOMEM; |
105 | } | 105 | } |
106 | 106 | ||
107 | pm_set_ops(&pxa_pm_ops); | 107 | suspend_set_ops(&pxa_pm_ops); |
108 | return 0; | 108 | return 0; |
109 | } | 109 | } |
110 | 110 | ||
diff --git a/arch/arm/mach-pxa/pxa25x.c b/arch/arm/mach-pxa/pxa25x.c index 0d6a72504caa..dcd81f8d0833 100644 --- a/arch/arm/mach-pxa/pxa25x.c +++ b/arch/arm/mach-pxa/pxa25x.c | |||
@@ -20,7 +20,7 @@ | |||
20 | #include <linux/kernel.h> | 20 | #include <linux/kernel.h> |
21 | #include <linux/init.h> | 21 | #include <linux/init.h> |
22 | #include <linux/platform_device.h> | 22 | #include <linux/platform_device.h> |
23 | #include <linux/pm.h> | 23 | #include <linux/suspend.h> |
24 | 24 | ||
25 | #include <asm/hardware.h> | 25 | #include <asm/hardware.h> |
26 | #include <asm/arch/irqs.h> | 26 | #include <asm/arch/irqs.h> |
@@ -215,7 +215,7 @@ static void pxa25x_cpu_pm_enter(suspend_state_t state) | |||
215 | 215 | ||
216 | static struct pxa_cpu_pm_fns pxa25x_cpu_pm_fns = { | 216 | static struct pxa_cpu_pm_fns pxa25x_cpu_pm_fns = { |
217 | .save_size = SLEEP_SAVE_SIZE, | 217 | .save_size = SLEEP_SAVE_SIZE, |
218 | .valid = pm_valid_only_mem, | 218 | .valid = suspend_valid_only_mem, |
219 | .save = pxa25x_cpu_pm_save, | 219 | .save = pxa25x_cpu_pm_save, |
220 | .restore = pxa25x_cpu_pm_restore, | 220 | .restore = pxa25x_cpu_pm_restore, |
221 | .enter = pxa25x_cpu_pm_enter, | 221 | .enter = pxa25x_cpu_pm_enter, |
diff --git a/arch/arm/mach-pxa/pxa27x.c b/arch/arm/mach-pxa/pxa27x.c index 2d7fc39732e4..d0f2b597db12 100644 --- a/arch/arm/mach-pxa/pxa27x.c +++ b/arch/arm/mach-pxa/pxa27x.c | |||
@@ -14,7 +14,7 @@ | |||
14 | #include <linux/module.h> | 14 | #include <linux/module.h> |
15 | #include <linux/kernel.h> | 15 | #include <linux/kernel.h> |
16 | #include <linux/init.h> | 16 | #include <linux/init.h> |
17 | #include <linux/pm.h> | 17 | #include <linux/suspend.h> |
18 | #include <linux/platform_device.h> | 18 | #include <linux/platform_device.h> |
19 | 19 | ||
20 | #include <asm/hardware.h> | 20 | #include <asm/hardware.h> |
diff --git a/arch/arm/mach-s3c2410/clock.c b/arch/arm/mach-s3c2410/clock.c index cab9d6265e9e..2bfaa6102025 100644 --- a/arch/arm/mach-s3c2410/clock.c +++ b/arch/arm/mach-s3c2410/clock.c | |||
@@ -238,7 +238,7 @@ int __init s3c2410_baseclk_add(void) | |||
238 | } | 238 | } |
239 | 239 | ||
240 | /* We must be careful disabling the clocks we are not intending to | 240 | /* We must be careful disabling the clocks we are not intending to |
241 | * be using at boot time, as subsytems such as the LCD which do | 241 | * be using at boot time, as subsystems such as the LCD which do |
242 | * their own DMA requests to the bus can cause the system to lockup | 242 | * their own DMA requests to the bus can cause the system to lockup |
243 | * if they where in the middle of requesting bus access. | 243 | * if they where in the middle of requesting bus access. |
244 | * | 244 | * |
diff --git a/arch/arm/mach-s3c2412/clock.c b/arch/arm/mach-s3c2412/clock.c index 8543dd6df391..458993601897 100644 --- a/arch/arm/mach-s3c2412/clock.c +++ b/arch/arm/mach-s3c2412/clock.c | |||
@@ -689,7 +689,7 @@ int __init s3c2412_baseclk_add(void) | |||
689 | } | 689 | } |
690 | 690 | ||
691 | /* We must be careful disabling the clocks we are not intending to | 691 | /* We must be careful disabling the clocks we are not intending to |
692 | * be using at boot time, as subsytems such as the LCD which do | 692 | * be using at boot time, as subsystems such as the LCD which do |
693 | * their own DMA requests to the bus can cause the system to lockup | 693 | * their own DMA requests to the bus can cause the system to lockup |
694 | * if they where in the middle of requesting bus access. | 694 | * if they where in the middle of requesting bus access. |
695 | * | 695 | * |
diff --git a/arch/arm/mach-s3c2443/clock.c b/arch/arm/mach-s3c2443/clock.c index 58402948c47c..b42f956738d0 100644 --- a/arch/arm/mach-s3c2443/clock.c +++ b/arch/arm/mach-s3c2443/clock.c | |||
@@ -1005,7 +1005,7 @@ void __init s3c2443_init_clocks(int xtal) | |||
1005 | } | 1005 | } |
1006 | 1006 | ||
1007 | /* We must be careful disabling the clocks we are not intending to | 1007 | /* We must be careful disabling the clocks we are not intending to |
1008 | * be using at boot time, as subsytems such as the LCD which do | 1008 | * be using at boot time, as subsystems such as the LCD which do |
1009 | * their own DMA requests to the bus can cause the system to lockup | 1009 | * their own DMA requests to the bus can cause the system to lockup |
1010 | * if they where in the middle of requesting bus access. | 1010 | * if they where in the middle of requesting bus access. |
1011 | * | 1011 | * |
diff --git a/arch/arm/mach-sa1100/pm.c b/arch/arm/mach-sa1100/pm.c index 01a37d3c0727..246c573e7252 100644 --- a/arch/arm/mach-sa1100/pm.c +++ b/arch/arm/mach-sa1100/pm.c | |||
@@ -122,14 +122,14 @@ unsigned long sleep_phys_sp(void *sp) | |||
122 | return virt_to_phys(sp); | 122 | return virt_to_phys(sp); |
123 | } | 123 | } |
124 | 124 | ||
125 | static struct pm_ops sa11x0_pm_ops = { | 125 | static struct platform_suspend_ops sa11x0_pm_ops = { |
126 | .enter = sa11x0_pm_enter, | 126 | .enter = sa11x0_pm_enter, |
127 | .valid = pm_valid_only_mem, | 127 | .valid = suspend_valid_only_mem, |
128 | }; | 128 | }; |
129 | 129 | ||
130 | static int __init sa11x0_pm_init(void) | 130 | static int __init sa11x0_pm_init(void) |
131 | { | 131 | { |
132 | pm_set_ops(&sa11x0_pm_ops); | 132 | suspend_set_ops(&sa11x0_pm_ops); |
133 | return 0; | 133 | return 0; |
134 | } | 134 | } |
135 | 135 | ||
diff --git a/arch/arm/mm/alignment.c b/arch/arm/mm/alignment.c index 074b7cb07743..e162cca5917f 100644 --- a/arch/arm/mm/alignment.c +++ b/arch/arm/mm/alignment.c | |||
@@ -757,7 +757,7 @@ do_alignment(unsigned long addr, unsigned int fsr, struct pt_regs *regs) | |||
757 | if (ai_usermode & 1) | 757 | if (ai_usermode & 1) |
758 | printk("Alignment trap: %s (%d) PC=0x%08lx Instr=0x%0*lx " | 758 | printk("Alignment trap: %s (%d) PC=0x%08lx Instr=0x%0*lx " |
759 | "Address=0x%08lx FSR 0x%03x\n", current->comm, | 759 | "Address=0x%08lx FSR 0x%03x\n", current->comm, |
760 | current->pid, instrptr, | 760 | task_pid_nr(current), instrptr, |
761 | thumb_mode(regs) ? 4 : 8, | 761 | thumb_mode(regs) ? 4 : 8, |
762 | thumb_mode(regs) ? tinstr : instr, | 762 | thumb_mode(regs) ? tinstr : instr, |
763 | addr, fsr); | 763 | addr, fsr); |
diff --git a/arch/arm/mm/fault.c b/arch/arm/mm/fault.c index 59ed1d05b71b..a8a7dab757eb 100644 --- a/arch/arm/mm/fault.c +++ b/arch/arm/mm/fault.c | |||
@@ -197,7 +197,7 @@ survive: | |||
197 | return fault; | 197 | return fault; |
198 | 198 | ||
199 | out_of_memory: | 199 | out_of_memory: |
200 | if (!is_init(tsk)) | 200 | if (!is_global_init(tsk)) |
201 | goto out; | 201 | goto out; |
202 | 202 | ||
203 | /* | 203 | /* |
diff --git a/arch/arm/nwfpe/fpopcode.h b/arch/arm/nwfpe/fpopcode.h index ec78e3517fc9..786e4c96156d 100644 --- a/arch/arm/nwfpe/fpopcode.h +++ b/arch/arm/nwfpe/fpopcode.h | |||
@@ -78,11 +78,11 @@ TABLE 1 | |||
78 | +-------------------------+---+---+---------+---------+ | 78 | +-------------------------+---+---+---------+---------+ |
79 | | Precision | u | v | FPSR.EP | length | | 79 | | Precision | u | v | FPSR.EP | length | |
80 | +-------------------------+---+---+---------+---------+ | 80 | +-------------------------+---+---+---------+---------+ |
81 | | Single | 0 ü 0 | x | 1 words | | 81 | | Single | 0 | 0 | x | 1 words | |
82 | | Double | 1 ü 1 | x | 2 words | | 82 | | Double | 1 | 1 | x | 2 words | |
83 | | Extended | 1 ü 1 | x | 3 words | | 83 | | Extended | 1 | 1 | x | 3 words | |
84 | | Packed decimal | 1 ü 1 | 0 | 3 words | | 84 | | Packed decimal | 1 | 1 | 0 | 3 words | |
85 | | Expanded packed decimal | 1 ü 1 | 1 | 4 words | | 85 | | Expanded packed decimal | 1 | 1 | 1 | 4 words | |
86 | +-------------------------+---+---+---------+---------+ | 86 | +-------------------------+---+---+---------+---------+ |
87 | Note: x = don't care | 87 | Note: x = don't care |
88 | */ | 88 | */ |
@@ -92,10 +92,10 @@ TABLE 2 | |||
92 | +---+---+---------------------------------+ | 92 | +---+---+---------------------------------+ |
93 | | w | x | Number of registers to transfer | | 93 | | w | x | Number of registers to transfer | |
94 | +---+---+---------------------------------+ | 94 | +---+---+---------------------------------+ |
95 | | 0 ü 1 | 1 | | 95 | | 0 | 1 | 1 | |
96 | | 1 ü 0 | 2 | | 96 | | 1 | 0 | 2 | |
97 | | 1 ü 1 | 3 | | 97 | | 1 | 1 | 3 | |
98 | | 0 ü 0 | 4 | | 98 | | 0 | 0 | 4 | |
99 | +---+---+---------------------------------+ | 99 | +---+---+---------------------------------+ |
100 | */ | 100 | */ |
101 | 101 | ||
@@ -156,10 +156,10 @@ TABLE 5 | |||
156 | +-------------------------+---+---+ | 156 | +-------------------------+---+---+ |
157 | | Rounding Precision | e | f | | 157 | | Rounding Precision | e | f | |
158 | +-------------------------+---+---+ | 158 | +-------------------------+---+---+ |
159 | | IEEE Single precision | 0 ü 0 | | 159 | | IEEE Single precision | 0 | 0 | |
160 | | IEEE Double precision | 0 ü 1 | | 160 | | IEEE Double precision | 0 | 1 | |
161 | | IEEE Extended precision | 1 ü 0 | | 161 | | IEEE Extended precision | 1 | 0 | |
162 | | undefined (trap) | 1 ü 1 | | 162 | | undefined (trap) | 1 | 1 | |
163 | +-------------------------+---+---+ | 163 | +-------------------------+---+---+ |
164 | */ | 164 | */ |
165 | 165 | ||
@@ -168,10 +168,10 @@ TABLE 5 | |||
168 | +---------------------------------+---+---+ | 168 | +---------------------------------+---+---+ |
169 | | Rounding Mode | g | h | | 169 | | Rounding Mode | g | h | |
170 | +---------------------------------+---+---+ | 170 | +---------------------------------+---+---+ |
171 | | Round to nearest (default) | 0 ü 0 | | 171 | | Round to nearest (default) | 0 | 0 | |
172 | | Round toward plus infinity | 0 ü 1 | | 172 | | Round toward plus infinity | 0 | 1 | |
173 | | Round toward negative infinity | 1 ü 0 | | 173 | | Round toward negative infinity | 1 | 0 | |
174 | | Round toward zero | 1 ü 1 | | 174 | | Round toward zero | 1 | 1 | |
175 | +---------------------------------+---+---+ | 175 | +---------------------------------+---+---+ |
176 | */ | 176 | */ |
177 | 177 | ||
@@ -369,20 +369,20 @@ TABLE 5 | |||
369 | #define getRoundingMode(opcode) ((opcode & MASK_ROUNDING_MODE) >> 5) | 369 | #define getRoundingMode(opcode) ((opcode & MASK_ROUNDING_MODE) >> 5) |
370 | 370 | ||
371 | #ifdef CONFIG_FPE_NWFPE_XP | 371 | #ifdef CONFIG_FPE_NWFPE_XP |
372 | static inline __attribute_pure__ floatx80 getExtendedConstant(const unsigned int nIndex) | 372 | static inline floatx80 __pure getExtendedConstant(const unsigned int nIndex) |
373 | { | 373 | { |
374 | extern const floatx80 floatx80Constant[]; | 374 | extern const floatx80 floatx80Constant[]; |
375 | return floatx80Constant[nIndex]; | 375 | return floatx80Constant[nIndex]; |
376 | } | 376 | } |
377 | #endif | 377 | #endif |
378 | 378 | ||
379 | static inline __attribute_pure__ float64 getDoubleConstant(const unsigned int nIndex) | 379 | static inline float64 __pure getDoubleConstant(const unsigned int nIndex) |
380 | { | 380 | { |
381 | extern const float64 float64Constant[]; | 381 | extern const float64 float64Constant[]; |
382 | return float64Constant[nIndex]; | 382 | return float64Constant[nIndex]; |
383 | } | 383 | } |
384 | 384 | ||
385 | static inline __attribute_pure__ float32 getSingleConstant(const unsigned int nIndex) | 385 | static inline float32 __pure getSingleConstant(const unsigned int nIndex) |
386 | { | 386 | { |
387 | extern const float32 float32Constant[]; | 387 | extern const float32 float32Constant[]; |
388 | return float32Constant[nIndex]; | 388 | return float32Constant[nIndex]; |
diff --git a/arch/arm/oprofile/Kconfig b/arch/arm/oprofile/Kconfig deleted file mode 100644 index afd93ad02feb..000000000000 --- a/arch/arm/oprofile/Kconfig +++ /dev/null | |||
@@ -1,42 +0,0 @@ | |||
1 | |||
2 | menu "Profiling support" | ||
3 | depends on EXPERIMENTAL | ||
4 | |||
5 | config PROFILING | ||
6 | bool "Profiling support (EXPERIMENTAL)" | ||
7 | help | ||
8 | Say Y here to enable the extended profiling support mechanisms used | ||
9 | by profilers such as OProfile. | ||
10 | |||
11 | |||
12 | config OPROFILE | ||
13 | tristate "OProfile system profiling (EXPERIMENTAL)" | ||
14 | depends on PROFILING | ||
15 | help | ||
16 | OProfile is a profiling system capable of profiling the | ||
17 | whole system, include the kernel, kernel modules, libraries, | ||
18 | and applications. | ||
19 | |||
20 | If unsure, say N. | ||
21 | |||
22 | if OPROFILE | ||
23 | |||
24 | config OPROFILE_ARMV6 | ||
25 | bool | ||
26 | depends on CPU_V6 && !SMP | ||
27 | default y | ||
28 | select OPROFILE_ARM11_CORE | ||
29 | |||
30 | config OPROFILE_MPCORE | ||
31 | bool | ||
32 | depends on CPU_V6 && SMP | ||
33 | default y | ||
34 | select OPROFILE_ARM11_CORE | ||
35 | |||
36 | config OPROFILE_ARM11_CORE | ||
37 | bool | ||
38 | |||
39 | endif | ||
40 | |||
41 | endmenu | ||
42 | |||
diff --git a/arch/arm/plat-omap/dma.c b/arch/arm/plat-omap/dma.c index 05a38498cbe0..dcbba07cf98a 100644 --- a/arch/arm/plat-omap/dma.c +++ b/arch/arm/plat-omap/dma.c | |||
@@ -2,7 +2,7 @@ | |||
2 | * linux/arch/arm/plat-omap/dma.c | 2 | * linux/arch/arm/plat-omap/dma.c |
3 | * | 3 | * |
4 | * Copyright (C) 2003 Nokia Corporation | 4 | * Copyright (C) 2003 Nokia Corporation |
5 | * Author: Juha Yrjölä <juha.yrjola@nokia.com> | 5 | * Author: Juha Yrjölä <juha.yrjola@nokia.com> |
6 | * DMA channel linking for 1610 by Samuel Ortiz <samuel.ortiz@nokia.com> | 6 | * DMA channel linking for 1610 by Samuel Ortiz <samuel.ortiz@nokia.com> |
7 | * Graphics DMA and LCD DMA graphics tranformations | 7 | * Graphics DMA and LCD DMA graphics tranformations |
8 | * by Imre Deak <imre.deak@nokia.com> | 8 | * by Imre Deak <imre.deak@nokia.com> |
diff --git a/arch/arm/plat-omap/gpio.c b/arch/arm/plat-omap/gpio.c index 337455dfe64d..6097753394ad 100644 --- a/arch/arm/plat-omap/gpio.c +++ b/arch/arm/plat-omap/gpio.c | |||
@@ -4,7 +4,7 @@ | |||
4 | * Support functions for OMAP GPIO | 4 | * Support functions for OMAP GPIO |
5 | * | 5 | * |
6 | * Copyright (C) 2003-2005 Nokia Corporation | 6 | * Copyright (C) 2003-2005 Nokia Corporation |
7 | * Written by Juha Yrjölä <juha.yrjola@nokia.com> | 7 | * Written by Juha Yrjölä <juha.yrjola@nokia.com> |
8 | * | 8 | * |
9 | * This program is free software; you can redistribute it and/or modify | 9 | * This program is free software; you can redistribute it and/or modify |
10 | * it under the terms of the GNU General Public License version 2 as | 10 | * it under the terms of the GNU General Public License version 2 as |
diff --git a/arch/arm/plat-s3c24xx/pm.c b/arch/arm/plat-s3c24xx/pm.c index eab1850616d8..4fdb3117744f 100644 --- a/arch/arm/plat-s3c24xx/pm.c +++ b/arch/arm/plat-s3c24xx/pm.c | |||
@@ -612,9 +612,9 @@ static int s3c2410_pm_enter(suspend_state_t state) | |||
612 | return 0; | 612 | return 0; |
613 | } | 613 | } |
614 | 614 | ||
615 | static struct pm_ops s3c2410_pm_ops = { | 615 | static struct platform_suspend_ops s3c2410_pm_ops = { |
616 | .enter = s3c2410_pm_enter, | 616 | .enter = s3c2410_pm_enter, |
617 | .valid = pm_valid_only_mem, | 617 | .valid = suspend_valid_only_mem, |
618 | }; | 618 | }; |
619 | 619 | ||
620 | /* s3c2410_pm_init | 620 | /* s3c2410_pm_init |
@@ -628,6 +628,6 @@ int __init s3c2410_pm_init(void) | |||
628 | { | 628 | { |
629 | printk("S3C2410 Power Management, (c) 2004 Simtec Electronics\n"); | 629 | printk("S3C2410 Power Management, (c) 2004 Simtec Electronics\n"); |
630 | 630 | ||
631 | pm_set_ops(&s3c2410_pm_ops); | 631 | suspend_set_ops(&s3c2410_pm_ops); |
632 | return 0; | 632 | return 0; |
633 | } | 633 | } |
diff --git a/arch/avr32/Kconfig b/arch/avr32/Kconfig index d12346aaa88b..bbecbd8469b5 100644 --- a/arch/avr32/Kconfig +++ b/arch/avr32/Kconfig | |||
@@ -189,7 +189,7 @@ config CMDLINE | |||
189 | 189 | ||
190 | endmenu | 190 | endmenu |
191 | 191 | ||
192 | menu "Power managment options" | 192 | menu "Power management options" |
193 | 193 | ||
194 | menu "CPU Frequency scaling" | 194 | menu "CPU Frequency scaling" |
195 | 195 | ||
diff --git a/arch/avr32/kernel/traps.c b/arch/avr32/kernel/traps.c index 9a73ce7eb50f..8a7caf8e7b45 100644 --- a/arch/avr32/kernel/traps.c +++ b/arch/avr32/kernel/traps.c | |||
@@ -89,7 +89,7 @@ void _exception(long signr, struct pt_regs *regs, int code, | |||
89 | * generate the same exception over and over again and we get | 89 | * generate the same exception over and over again and we get |
90 | * nowhere. Better to kill it and let the kernel panic. | 90 | * nowhere. Better to kill it and let the kernel panic. |
91 | */ | 91 | */ |
92 | if (is_init(current)) { | 92 | if (is_global_init(current)) { |
93 | __sighandler_t handler; | 93 | __sighandler_t handler; |
94 | 94 | ||
95 | spin_lock_irq(¤t->sighand->siglock); | 95 | spin_lock_irq(¤t->sighand->siglock); |
diff --git a/arch/avr32/mm/fault.c b/arch/avr32/mm/fault.c index 11472f8701bd..6560cb18b4e3 100644 --- a/arch/avr32/mm/fault.c +++ b/arch/avr32/mm/fault.c | |||
@@ -160,7 +160,7 @@ bad_area: | |||
160 | if (exception_trace && printk_ratelimit()) | 160 | if (exception_trace && printk_ratelimit()) |
161 | printk("%s%s[%d]: segfault at %08lx pc %08lx " | 161 | printk("%s%s[%d]: segfault at %08lx pc %08lx " |
162 | "sp %08lx ecr %lu\n", | 162 | "sp %08lx ecr %lu\n", |
163 | is_init(tsk) ? KERN_EMERG : KERN_INFO, | 163 | is_global_init(tsk) ? KERN_EMERG : KERN_INFO, |
164 | tsk->comm, tsk->pid, address, regs->pc, | 164 | tsk->comm, tsk->pid, address, regs->pc, |
165 | regs->sp, ecr); | 165 | regs->sp, ecr); |
166 | _exception(SIGSEGV, regs, code, address); | 166 | _exception(SIGSEGV, regs, code, address); |
@@ -209,7 +209,7 @@ no_context: | |||
209 | */ | 209 | */ |
210 | out_of_memory: | 210 | out_of_memory: |
211 | up_read(&mm->mmap_sem); | 211 | up_read(&mm->mmap_sem); |
212 | if (is_init(current)) { | 212 | if (is_global_init(current)) { |
213 | yield(); | 213 | yield(); |
214 | down_read(&mm->mmap_sem); | 214 | down_read(&mm->mmap_sem); |
215 | goto survive; | 215 | goto survive; |
@@ -231,7 +231,7 @@ do_sigbus: | |||
231 | if (exception_trace) | 231 | if (exception_trace) |
232 | printk("%s%s[%d]: bus error at %08lx pc %08lx " | 232 | printk("%s%s[%d]: bus error at %08lx pc %08lx " |
233 | "sp %08lx ecr %lu\n", | 233 | "sp %08lx ecr %lu\n", |
234 | is_init(tsk) ? KERN_EMERG : KERN_INFO, | 234 | is_global_init(tsk) ? KERN_EMERG : KERN_INFO, |
235 | tsk->comm, tsk->pid, address, regs->pc, | 235 | tsk->comm, tsk->pid, address, regs->pc, |
236 | regs->sp, ecr); | 236 | regs->sp, ecr); |
237 | 237 | ||
diff --git a/arch/blackfin/Kconfig b/arch/blackfin/Kconfig index aa9db3073312..ad28dc76fc97 100644 --- a/arch/blackfin/Kconfig +++ b/arch/blackfin/Kconfig | |||
@@ -613,85 +613,86 @@ config I_ENTRY_L1 | |||
613 | bool "Locate interrupt entry code in L1 Memory" | 613 | bool "Locate interrupt entry code in L1 Memory" |
614 | default y | 614 | default y |
615 | help | 615 | help |
616 | If enabled interrupt entry code (STORE/RESTORE CONTEXT) is linked | 616 | If enabled, interrupt entry code (STORE/RESTORE CONTEXT) is linked |
617 | into L1 instruction memory.(less latency) | 617 | into L1 instruction memory. (less latency) |
618 | 618 | ||
619 | config EXCPT_IRQ_SYSC_L1 | 619 | config EXCPT_IRQ_SYSC_L1 |
620 | bool "Locate entire ASM lowlevel excepetion / interrupt - Syscall and CPLB handler code in L1 Memory" | 620 | bool "Locate entire ASM lowlevel exception / interrupt - Syscall and CPLB handler code in L1 Memory" |
621 | default y | 621 | default y |
622 | help | 622 | help |
623 | If enabled entire ASM lowlevel exception and interrupt entry code (STORE/RESTORE CONTEXT) is linked | 623 | If enabled, the entire ASM lowlevel exception and interrupt entry code |
624 | into L1 instruction memory.(less latency) | 624 | (STORE/RESTORE CONTEXT) is linked into L1 instruction memory. |
625 | (less latency) | ||
625 | 626 | ||
626 | config DO_IRQ_L1 | 627 | config DO_IRQ_L1 |
627 | bool "Locate frequently called do_irq dispatcher function in L1 Memory" | 628 | bool "Locate frequently called do_irq dispatcher function in L1 Memory" |
628 | default y | 629 | default y |
629 | help | 630 | help |
630 | If enabled frequently called do_irq dispatcher function is linked | 631 | If enabled, the frequently called do_irq dispatcher function is linked |
631 | into L1 instruction memory.(less latency) | 632 | into L1 instruction memory. (less latency) |
632 | 633 | ||
633 | config CORE_TIMER_IRQ_L1 | 634 | config CORE_TIMER_IRQ_L1 |
634 | bool "Locate frequently called timer_interrupt() function in L1 Memory" | 635 | bool "Locate frequently called timer_interrupt() function in L1 Memory" |
635 | default y | 636 | default y |
636 | help | 637 | help |
637 | If enabled frequently called timer_interrupt() function is linked | 638 | If enabled, the frequently called timer_interrupt() function is linked |
638 | into L1 instruction memory.(less latency) | 639 | into L1 instruction memory. (less latency) |
639 | 640 | ||
640 | config IDLE_L1 | 641 | config IDLE_L1 |
641 | bool "Locate frequently idle function in L1 Memory" | 642 | bool "Locate frequently idle function in L1 Memory" |
642 | default y | 643 | default y |
643 | help | 644 | help |
644 | If enabled frequently called idle function is linked | 645 | If enabled, the frequently called idle function is linked |
645 | into L1 instruction memory.(less latency) | 646 | into L1 instruction memory. (less latency) |
646 | 647 | ||
647 | config SCHEDULE_L1 | 648 | config SCHEDULE_L1 |
648 | bool "Locate kernel schedule function in L1 Memory" | 649 | bool "Locate kernel schedule function in L1 Memory" |
649 | default y | 650 | default y |
650 | help | 651 | help |
651 | If enabled frequently called kernel schedule is linked | 652 | If enabled, the frequently called kernel schedule is linked |
652 | into L1 instruction memory.(less latency) | 653 | into L1 instruction memory. (less latency) |
653 | 654 | ||
654 | config ARITHMETIC_OPS_L1 | 655 | config ARITHMETIC_OPS_L1 |
655 | bool "Locate kernel owned arithmetic functions in L1 Memory" | 656 | bool "Locate kernel owned arithmetic functions in L1 Memory" |
656 | default y | 657 | default y |
657 | help | 658 | help |
658 | If enabled arithmetic functions are linked | 659 | If enabled, arithmetic functions are linked |
659 | into L1 instruction memory.(less latency) | 660 | into L1 instruction memory. (less latency) |
660 | 661 | ||
661 | config ACCESS_OK_L1 | 662 | config ACCESS_OK_L1 |
662 | bool "Locate access_ok function in L1 Memory" | 663 | bool "Locate access_ok function in L1 Memory" |
663 | default y | 664 | default y |
664 | help | 665 | help |
665 | If enabled access_ok function is linked | 666 | If enabled, the access_ok function is linked |
666 | into L1 instruction memory.(less latency) | 667 | into L1 instruction memory. (less latency) |
667 | 668 | ||
668 | config MEMSET_L1 | 669 | config MEMSET_L1 |
669 | bool "Locate memset function in L1 Memory" | 670 | bool "Locate memset function in L1 Memory" |
670 | default y | 671 | default y |
671 | help | 672 | help |
672 | If enabled memset function is linked | 673 | If enabled, the memset function is linked |
673 | into L1 instruction memory.(less latency) | 674 | into L1 instruction memory. (less latency) |
674 | 675 | ||
675 | config MEMCPY_L1 | 676 | config MEMCPY_L1 |
676 | bool "Locate memcpy function in L1 Memory" | 677 | bool "Locate memcpy function in L1 Memory" |
677 | default y | 678 | default y |
678 | help | 679 | help |
679 | If enabled memcpy function is linked | 680 | If enabled, the memcpy function is linked |
680 | into L1 instruction memory.(less latency) | 681 | into L1 instruction memory. (less latency) |
681 | 682 | ||
682 | config SYS_BFIN_SPINLOCK_L1 | 683 | config SYS_BFIN_SPINLOCK_L1 |
683 | bool "Locate sys_bfin_spinlock function in L1 Memory" | 684 | bool "Locate sys_bfin_spinlock function in L1 Memory" |
684 | default y | 685 | default y |
685 | help | 686 | help |
686 | If enabled sys_bfin_spinlock function is linked | 687 | If enabled, sys_bfin_spinlock function is linked |
687 | into L1 instruction memory.(less latency) | 688 | into L1 instruction memory. (less latency) |
688 | 689 | ||
689 | config IP_CHECKSUM_L1 | 690 | config IP_CHECKSUM_L1 |
690 | bool "Locate IP Checksum function in L1 Memory" | 691 | bool "Locate IP Checksum function in L1 Memory" |
691 | default n | 692 | default n |
692 | help | 693 | help |
693 | If enabled IP Checksum function is linked | 694 | If enabled, the IP Checksum function is linked |
694 | into L1 instruction memory.(less latency) | 695 | into L1 instruction memory. (less latency) |
695 | 696 | ||
696 | config CACHELINE_ALIGNED_L1 | 697 | config CACHELINE_ALIGNED_L1 |
697 | bool "Locate cacheline_aligned data to L1 Data Memory" | 698 | bool "Locate cacheline_aligned data to L1 Data Memory" |
@@ -699,24 +700,24 @@ config CACHELINE_ALIGNED_L1 | |||
699 | default n if BF54x | 700 | default n if BF54x |
700 | depends on !BF531 | 701 | depends on !BF531 |
701 | help | 702 | help |
702 | If enabled cacheline_anligned data is linked | 703 | If enabled, cacheline_anligned data is linked |
703 | into L1 data memory.(less latency) | 704 | into L1 data memory. (less latency) |
704 | 705 | ||
705 | config SYSCALL_TAB_L1 | 706 | config SYSCALL_TAB_L1 |
706 | bool "Locate Syscall Table L1 Data Memory" | 707 | bool "Locate Syscall Table L1 Data Memory" |
707 | default n | 708 | default n |
708 | depends on !BF531 | 709 | depends on !BF531 |
709 | help | 710 | help |
710 | If enabled the Syscall LUT is linked | 711 | If enabled, the Syscall LUT is linked |
711 | into L1 data memory.(less latency) | 712 | into L1 data memory. (less latency) |
712 | 713 | ||
713 | config CPLB_SWITCH_TAB_L1 | 714 | config CPLB_SWITCH_TAB_L1 |
714 | bool "Locate CPLB Switch Tables L1 Data Memory" | 715 | bool "Locate CPLB Switch Tables L1 Data Memory" |
715 | default n | 716 | default n |
716 | depends on !BF531 | 717 | depends on !BF531 |
717 | help | 718 | help |
718 | If enabled the CPLB Switch Tables are linked | 719 | If enabled, the CPLB Switch Tables are linked |
719 | into L1 data memory.(less latency) | 720 | into L1 data memory. (less latency) |
720 | 721 | ||
721 | endmenu | 722 | endmenu |
722 | 723 | ||
@@ -1012,7 +1013,7 @@ source "drivers/Kconfig" | |||
1012 | 1013 | ||
1013 | source "fs/Kconfig" | 1014 | source "fs/Kconfig" |
1014 | 1015 | ||
1015 | source "arch/blackfin/oprofile/Kconfig" | 1016 | source "kernel/Kconfig.instrumentation" |
1016 | 1017 | ||
1017 | menu "Kernel hacking" | 1018 | menu "Kernel hacking" |
1018 | 1019 | ||
@@ -1029,13 +1030,13 @@ config DEBUG_HWERR | |||
1029 | from. | 1030 | from. |
1030 | 1031 | ||
1031 | config DEBUG_ICACHE_CHECK | 1032 | config DEBUG_ICACHE_CHECK |
1032 | bool "Check Instruction cache coherancy" | 1033 | bool "Check Instruction cache coherency" |
1033 | depends on DEBUG_KERNEL | 1034 | depends on DEBUG_KERNEL |
1034 | depends on DEBUG_HWERR | 1035 | depends on DEBUG_HWERR |
1035 | help | 1036 | help |
1036 | Say Y here if you are getting wierd unexplained errors. This will | 1037 | Say Y here if you are getting weird unexplained errors. This will |
1037 | ensure that icache is what SDRAM says it should be, by doing a | 1038 | ensure that icache is what SDRAM says it should be by doing a |
1038 | byte wise comparision between SDRAM and instruction cache. This | 1039 | byte wise comparison between SDRAM and instruction cache. This |
1039 | also relocates the irq_panic() function to L1 memory, (which is | 1040 | also relocates the irq_panic() function to L1 memory, (which is |
1040 | un-cached). | 1041 | un-cached). |
1041 | 1042 | ||
diff --git a/arch/blackfin/mach-common/pm.c b/arch/blackfin/mach-common/pm.c index b10302722202..dac51fb06f22 100644 --- a/arch/blackfin/mach-common/pm.c +++ b/arch/blackfin/mach-common/pm.c | |||
@@ -32,7 +32,7 @@ | |||
32 | * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | 32 | * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
33 | */ | 33 | */ |
34 | 34 | ||
35 | #include <linux/pm.h> | 35 | #include <linux/suspend.h> |
36 | #include <linux/sched.h> | 36 | #include <linux/sched.h> |
37 | #include <linux/proc_fs.h> | 37 | #include <linux/proc_fs.h> |
38 | #include <linux/io.h> | 38 | #include <linux/io.h> |
@@ -89,28 +89,15 @@ void bfin_pm_suspend_standby_enter(void) | |||
89 | #endif /* CONFIG_PM_WAKEUP_GPIO_BY_SIC_IWR */ | 89 | #endif /* CONFIG_PM_WAKEUP_GPIO_BY_SIC_IWR */ |
90 | } | 90 | } |
91 | 91 | ||
92 | |||
93 | /* | 92 | /* |
94 | * bfin_pm_prepare - Do preliminary suspend work. | 93 | * bfin_pm_valid - Tell the PM core that we only support the standby sleep |
95 | * @state: suspend state we're entering. | 94 | * state |
95 | * @state: suspend state we're checking. | ||
96 | * | 96 | * |
97 | */ | 97 | */ |
98 | static int bfin_pm_prepare(suspend_state_t state) | 98 | static int bfin_pm_valid(suspend_state_t state) |
99 | { | 99 | { |
100 | int error = 0; | 100 | return (state == PM_SUSPEND_STANDBY); |
101 | |||
102 | switch (state) { | ||
103 | case PM_SUSPEND_STANDBY: | ||
104 | break; | ||
105 | |||
106 | case PM_SUSPEND_MEM: | ||
107 | return -ENOTSUPP; | ||
108 | |||
109 | default: | ||
110 | return -EINVAL; | ||
111 | } | ||
112 | |||
113 | return error; | ||
114 | } | 101 | } |
115 | 102 | ||
116 | /* | 103 | /* |
@@ -135,44 +122,14 @@ static int bfin_pm_enter(suspend_state_t state) | |||
135 | return 0; | 122 | return 0; |
136 | } | 123 | } |
137 | 124 | ||
138 | /* | 125 | struct platform_suspend_ops bfin_pm_ops = { |
139 | * bfin_pm_finish - Finish up suspend sequence. | ||
140 | * @state: State we're coming out of. | ||
141 | * | ||
142 | * This is called after we wake back up (or if entering the sleep state | ||
143 | * failed). | ||
144 | */ | ||
145 | static int bfin_pm_finish(suspend_state_t state) | ||
146 | { | ||
147 | switch (state) { | ||
148 | case PM_SUSPEND_STANDBY: | ||
149 | break; | ||
150 | |||
151 | case PM_SUSPEND_MEM: | ||
152 | return -ENOTSUPP; | ||
153 | |||
154 | default: | ||
155 | return -EINVAL; | ||
156 | } | ||
157 | |||
158 | return 0; | ||
159 | } | ||
160 | |||
161 | static int bfin_pm_valid(suspend_state_t state) | ||
162 | { | ||
163 | return (state == PM_SUSPEND_STANDBY); | ||
164 | } | ||
165 | |||
166 | struct pm_ops bfin_pm_ops = { | ||
167 | .prepare = bfin_pm_prepare, | ||
168 | .enter = bfin_pm_enter, | 126 | .enter = bfin_pm_enter, |
169 | .finish = bfin_pm_finish, | ||
170 | .valid = bfin_pm_valid, | 127 | .valid = bfin_pm_valid, |
171 | }; | 128 | }; |
172 | 129 | ||
173 | static int __init bfin_pm_init(void) | 130 | static int __init bfin_pm_init(void) |
174 | { | 131 | { |
175 | pm_set_ops(&bfin_pm_ops); | 132 | suspend_set_ops(&bfin_pm_ops); |
176 | return 0; | 133 | return 0; |
177 | } | 134 | } |
178 | 135 | ||
diff --git a/arch/blackfin/oprofile/Kconfig b/arch/blackfin/oprofile/Kconfig deleted file mode 100644 index 0a2fd999c941..000000000000 --- a/arch/blackfin/oprofile/Kconfig +++ /dev/null | |||
@@ -1,29 +0,0 @@ | |||
1 | menu "Profiling support" | ||
2 | depends on EXPERIMENTAL | ||
3 | |||
4 | config PROFILING | ||
5 | bool "Profiling support (EXPERIMENTAL)" | ||
6 | help | ||
7 | Say Y here to enable the extended profiling support mechanisms used | ||
8 | by profilers such as OProfile. | ||
9 | |||
10 | config OPROFILE | ||
11 | tristate "OProfile system profiling (EXPERIMENTAL)" | ||
12 | depends on PROFILING | ||
13 | help | ||
14 | OProfile is a profiling system capable of profiling the | ||
15 | whole system, include the kernel, kernel modules, libraries, | ||
16 | and applications. | ||
17 | |||
18 | If unsure, say N. | ||
19 | |||
20 | config HARDWARE_PM | ||
21 | tristate "Hardware Performance Monitor Profiling" | ||
22 | depends on PROFILING | ||
23 | help | ||
24 | take use of hardware performance monitor to profiling the kernel | ||
25 | and application. | ||
26 | |||
27 | If unsure, say N. | ||
28 | |||
29 | endmenu | ||
diff --git a/arch/cris/Kconfig b/arch/cris/Kconfig index 6b4d026a00a1..21900a9378bb 100644 --- a/arch/cris/Kconfig +++ b/arch/cris/Kconfig | |||
@@ -196,6 +196,8 @@ source "sound/Kconfig" | |||
196 | 196 | ||
197 | source "drivers/usb/Kconfig" | 197 | source "drivers/usb/Kconfig" |
198 | 198 | ||
199 | source "kernel/Kconfig.instrumentation" | ||
200 | |||
199 | source "arch/cris/Kconfig.debug" | 201 | source "arch/cris/Kconfig.debug" |
200 | 202 | ||
201 | source "security/Kconfig" | 203 | source "security/Kconfig" |
diff --git a/arch/cris/arch-v10/Kconfig b/arch/cris/arch-v10/Kconfig index c7ea9efd0104..f1ce6f64401d 100644 --- a/arch/cris/arch-v10/Kconfig +++ b/arch/cris/arch-v10/Kconfig | |||
@@ -182,7 +182,7 @@ config ETRAX_LED7G | |||
182 | set this to same as CONFIG_ETRAX_LED1G (normally 2). | 182 | set this to same as CONFIG_ETRAX_LED1G (normally 2). |
183 | 183 | ||
184 | config ETRAX_LED8Y | 184 | config ETRAX_LED8Y |
185 | int "Eigth yellow LED bit" | 185 | int "Eighth yellow LED bit" |
186 | depends on ETRAX_CSP0_LEDS | 186 | depends on ETRAX_CSP0_LEDS |
187 | default "2" | 187 | default "2" |
188 | help | 188 | help |
diff --git a/arch/cris/arch-v10/boot/compressed/misc.c b/arch/cris/arch-v10/boot/compressed/misc.c index ffb8d21b2f83..e205d2e7e089 100644 --- a/arch/cris/arch-v10/boot/compressed/misc.c +++ b/arch/cris/arch-v10/boot/compressed/misc.c | |||
@@ -8,7 +8,7 @@ | |||
8 | * | 8 | * |
9 | * malloc by Hannu Savolainen 1993 and Matthias Urlichs 1994 | 9 | * malloc by Hannu Savolainen 1993 and Matthias Urlichs 1994 |
10 | * puts by Nick Holloway 1993, better puts by Martin Mares 1995 | 10 | * puts by Nick Holloway 1993, better puts by Martin Mares 1995 |
11 | * adoptation for Linux/CRIS Axis Communications AB, 1999 | 11 | * adaptation for Linux/CRIS Axis Communications AB, 1999 |
12 | * | 12 | * |
13 | */ | 13 | */ |
14 | 14 | ||
diff --git a/arch/cris/arch-v10/drivers/pcf8563.c b/arch/cris/arch-v10/drivers/pcf8563.c index 1de0026bb94e..c263b8232dbc 100644 --- a/arch/cris/arch-v10/drivers/pcf8563.c +++ b/arch/cris/arch-v10/drivers/pcf8563.c | |||
@@ -4,7 +4,7 @@ | |||
4 | * From Phillips' datasheet: | 4 | * From Phillips' datasheet: |
5 | * | 5 | * |
6 | * The PCF8563 is a CMOS real-time clock/calendar optimized for low power | 6 | * The PCF8563 is a CMOS real-time clock/calendar optimized for low power |
7 | * consumption. A programmable clock output, interupt output and voltage | 7 | * consumption. A programmable clock output, interrupt output and voltage |
8 | * low detector are also provided. All address and data are transferred | 8 | * low detector are also provided. All address and data are transferred |
9 | * serially via two-line bidirectional I2C-bus. Maximum bus speed is | 9 | * serially via two-line bidirectional I2C-bus. Maximum bus speed is |
10 | * 400 kbits/s. The built-in word address register is incremented | 10 | * 400 kbits/s. The built-in word address register is incremented |
diff --git a/arch/cris/arch-v10/kernel/debugport.c b/arch/cris/arch-v10/kernel/debugport.c index 2b536ca6f444..93679a48c791 100644 --- a/arch/cris/arch-v10/kernel/debugport.c +++ b/arch/cris/arch-v10/kernel/debugport.c | |||
@@ -83,7 +83,7 @@ | |||
83 | * | 83 | * |
84 | * Revision 1.4 2002/11/19 14:35:24 starvik | 84 | * Revision 1.4 2002/11/19 14:35:24 starvik |
85 | * Changes from linux 2.4 | 85 | * Changes from linux 2.4 |
86 | * Changed struct initializer syntax to the currently prefered notation | 86 | * Changed struct initializer syntax to the currently preferred notation |
87 | * | 87 | * |
88 | * Revision 1.3 2002/11/06 09:47:03 starvik | 88 | * Revision 1.3 2002/11/06 09:47:03 starvik |
89 | * Modified for new interrupt macros | 89 | * Modified for new interrupt macros |
diff --git a/arch/cris/arch-v10/kernel/entry.S b/arch/cris/arch-v10/kernel/entry.S index ae45d4522e65..c5844cb70f09 100644 --- a/arch/cris/arch-v10/kernel/entry.S +++ b/arch/cris/arch-v10/kernel/entry.S | |||
@@ -97,7 +97,7 @@ | |||
97 | * | 97 | * |
98 | * Revision 1.36 2001/11/22 13:36:36 bjornw | 98 | * Revision 1.36 2001/11/22 13:36:36 bjornw |
99 | * * In ret_from_intr, check regs->dccr for usermode reentrance instead of | 99 | * * In ret_from_intr, check regs->dccr for usermode reentrance instead of |
100 | * DCCR explicitely (because the latter might not reflect current reality) | 100 | * DCCR explicitly (because the latter might not reflect current reality) |
101 | * * In mmu_bus_fault, set $r9 _after_ calling the C-code instead of before | 101 | * * In mmu_bus_fault, set $r9 _after_ calling the C-code instead of before |
102 | * since $r9 is call-clobbered and is potentially needed afterwards | 102 | * since $r9 is call-clobbered and is potentially needed afterwards |
103 | * | 103 | * |
diff --git a/arch/cris/arch-v10/kernel/fasttimer.c b/arch/cris/arch-v10/kernel/fasttimer.c index 8cbdf594b369..d3ea052e5ee1 100644 --- a/arch/cris/arch-v10/kernel/fasttimer.c +++ b/arch/cris/arch-v10/kernel/fasttimer.c | |||
@@ -84,7 +84,7 @@ | |||
84 | * with time based on jiffies and *R_TIMER0_DATA, uses a table | 84 | * with time based on jiffies and *R_TIMER0_DATA, uses a table |
85 | * for fast conversion of timer value to microseconds. | 85 | * for fast conversion of timer value to microseconds. |
86 | * (Much faster the standard do_gettimeofday() and we don't really | 86 | * (Much faster the standard do_gettimeofday() and we don't really |
87 | * wan't to use the true time - we wan't the "uptime" so timers don't screw up | 87 | * want to use the true time - we want the "uptime" so timers don't screw up |
88 | * when we change the time. | 88 | * when we change the time. |
89 | * TODO: Add efficient support for continuous timers as well. | 89 | * TODO: Add efficient support for continuous timers as well. |
90 | * | 90 | * |
diff --git a/arch/cris/arch-v10/kernel/irq.c b/arch/cris/arch-v10/kernel/irq.c index 96094cbf1255..845c95f6e871 100644 --- a/arch/cris/arch-v10/kernel/irq.c +++ b/arch/cris/arch-v10/kernel/irq.c | |||
@@ -169,7 +169,7 @@ init_IRQ(void) | |||
169 | for (i = 0; i < 256; i++) | 169 | for (i = 0; i < 256; i++) |
170 | etrax_irv->v[i] = weird_irq; | 170 | etrax_irv->v[i] = weird_irq; |
171 | 171 | ||
172 | /* Initialize IRQ handler descriptiors. */ | 172 | /* Initialize IRQ handler descriptors. */ |
173 | for(i = 2; i < NR_IRQS; i++) { | 173 | for(i = 2; i < NR_IRQS; i++) { |
174 | irq_desc[i].chip = &crisv10_irq_type; | 174 | irq_desc[i].chip = &crisv10_irq_type; |
175 | set_int_vector(i, interrupt[i]); | 175 | set_int_vector(i, interrupt[i]); |
diff --git a/arch/cris/arch-v10/kernel/kgdb.c b/arch/cris/arch-v10/kernel/kgdb.c index 07628a13c6c4..77f4b1423725 100644 --- a/arch/cris/arch-v10/kernel/kgdb.c +++ b/arch/cris/arch-v10/kernel/kgdb.c | |||
@@ -959,7 +959,7 @@ stub_is_stopped(int sigval) | |||
959 | 959 | ||
960 | /* Send register contents. We probably only need to send the | 960 | /* Send register contents. We probably only need to send the |
961 | * PC, frame pointer and stack pointer here. Other registers will be | 961 | * PC, frame pointer and stack pointer here. Other registers will be |
962 | * explicitely asked for. But for now, send all. | 962 | * explicitly asked for. But for now, send all. |
963 | */ | 963 | */ |
964 | 964 | ||
965 | for (regno = R0; regno <= USP; regno++) { | 965 | for (regno = R0; regno <= USP; regno++) { |
diff --git a/arch/cris/arch-v10/kernel/process.c b/arch/cris/arch-v10/kernel/process.c index b6831ceb6a62..1a3760c94f85 100644 --- a/arch/cris/arch-v10/kernel/process.c +++ b/arch/cris/arch-v10/kernel/process.c | |||
@@ -64,7 +64,7 @@ void hard_reset_now (void) | |||
64 | #if defined(CONFIG_ETRAX_WATCHDOG) && !defined(CONFIG_SVINTO_SIM) | 64 | #if defined(CONFIG_ETRAX_WATCHDOG) && !defined(CONFIG_SVINTO_SIM) |
65 | cause_of_death = 0xbedead; | 65 | cause_of_death = 0xbedead; |
66 | #else | 66 | #else |
67 | /* Since we dont plan to keep on reseting the watchdog, | 67 | /* Since we dont plan to keep on resetting the watchdog, |
68 | the key can be arbitrary hence three */ | 68 | the key can be arbitrary hence three */ |
69 | *R_WATCHDOG = IO_FIELD(R_WATCHDOG, key, 3) | | 69 | *R_WATCHDOG = IO_FIELD(R_WATCHDOG, key, 3) | |
70 | IO_STATE(R_WATCHDOG, enable, start); | 70 | IO_STATE(R_WATCHDOG, enable, start); |
diff --git a/arch/cris/arch-v10/kernel/shadows.c b/arch/cris/arch-v10/kernel/shadows.c index 38fd44dfbc5b..326178aef6ee 100644 --- a/arch/cris/arch-v10/kernel/shadows.c +++ b/arch/cris/arch-v10/kernel/shadows.c | |||
@@ -20,7 +20,7 @@ unsigned long r_timer_ctrl_shadow; | |||
20 | * These are only usable if there actually IS a latch connected | 20 | * These are only usable if there actually IS a latch connected |
21 | * to the corresponding external chip-select pin. | 21 | * to the corresponding external chip-select pin. |
22 | * | 22 | * |
23 | * A common usage is that CSP0 controls LED's and CSP4 video chips. | 23 | * A common usage is that CSP0 controls LEDs and CSP4 video chips. |
24 | */ | 24 | */ |
25 | 25 | ||
26 | unsigned long port_cse1_shadow; | 26 | unsigned long port_cse1_shadow; |
diff --git a/arch/cris/arch-v10/lib/dram_init.S b/arch/cris/arch-v10/lib/dram_init.S index 9cf83932cd5d..6a6bdfd6984d 100644 --- a/arch/cris/arch-v10/lib/dram_init.S +++ b/arch/cris/arch-v10/lib/dram_init.S | |||
@@ -40,7 +40,7 @@ | |||
40 | * Copy warning from head.S about r8 and r9 | 40 | * Copy warning from head.S about r8 and r9 |
41 | * | 41 | * |
42 | * Revision 1.7 2001/04/18 12:05:39 bjornw | 42 | * Revision 1.7 2001/04/18 12:05:39 bjornw |
43 | * Fixed comments, and explicitely include config.h to be sure its there | 43 | * Fixed comments, and explicitly include config.h to be sure its there |
44 | * | 44 | * |
45 | * Revision 1.6 2001/04/10 06:20:16 starvik | 45 | * Revision 1.6 2001/04/10 06:20:16 starvik |
46 | * Delay should be 200us, not 200ns | 46 | * Delay should be 200us, not 200ns |
@@ -66,7 +66,7 @@ | |||
66 | */ | 66 | */ |
67 | 67 | ||
68 | /* Just to be certain the config file is included, we include it here | 68 | /* Just to be certain the config file is included, we include it here |
69 | * explicitely instead of depending on it being included in the file that | 69 | * explicitly instead of depending on it being included in the file that |
70 | * uses this code. | 70 | * uses this code. |
71 | */ | 71 | */ |
72 | 72 | ||
diff --git a/arch/cris/arch-v10/lib/string.c b/arch/cris/arch-v10/lib/string.c index 8ffde4901b57..15d6662b03b1 100644 --- a/arch/cris/arch-v10/lib/string.c +++ b/arch/cris/arch-v10/lib/string.c | |||
@@ -41,7 +41,7 @@ void *memcpy(void *pdst, | |||
41 | Make sure the compiler is able to make something useful of this. | 41 | Make sure the compiler is able to make something useful of this. |
42 | As it is now: r10 -> r13; r11 -> r11 (nop); r12 -> r12 (nop). | 42 | As it is now: r10 -> r13; r11 -> r11 (nop); r12 -> r12 (nop). |
43 | 43 | ||
44 | If gcc was allright, it really would need no temporaries, and no | 44 | If gcc was alright, it really would need no temporaries, and no |
45 | stack space to save stuff on. */ | 45 | stack space to save stuff on. */ |
46 | 46 | ||
47 | register void *return_dst __asm__ ("r10") = pdst; | 47 | register void *return_dst __asm__ ("r10") = pdst; |
diff --git a/arch/cris/arch-v10/lib/usercopy.c b/arch/cris/arch-v10/lib/usercopy.c index 43778d53c254..a12c708afc9a 100644 --- a/arch/cris/arch-v10/lib/usercopy.c +++ b/arch/cris/arch-v10/lib/usercopy.c | |||
@@ -38,7 +38,7 @@ __copy_user (void __user *pdst, const void *psrc, unsigned long pn) | |||
38 | As it is now: r10 -> r13; r11 -> r11 (nop); r12 -> r12 (nop). | 38 | As it is now: r10 -> r13; r11 -> r11 (nop); r12 -> r12 (nop). |
39 | 39 | ||
40 | FIXME: Comment for old gcc version. Check. | 40 | FIXME: Comment for old gcc version. Check. |
41 | If gcc was allright, it really would need no temporaries, and no | 41 | If gcc was alright, it really would need no temporaries, and no |
42 | stack space to save stuff on. */ | 42 | stack space to save stuff on. */ |
43 | 43 | ||
44 | register char *dst __asm__ ("r13") = pdst; | 44 | register char *dst __asm__ ("r13") = pdst; |
@@ -200,7 +200,7 @@ __copy_user_zeroing (void __user *pdst, const void *psrc, unsigned long pn) | |||
200 | As it is now: r10 -> r13; r11 -> r11 (nop); r12 -> r12 (nop). | 200 | As it is now: r10 -> r13; r11 -> r11 (nop); r12 -> r12 (nop). |
201 | 201 | ||
202 | FIXME: Comment for old gcc version. Check. | 202 | FIXME: Comment for old gcc version. Check. |
203 | If gcc was allright, it really would need no temporaries, and no | 203 | If gcc was alright, it really would need no temporaries, and no |
204 | stack space to save stuff on. */ | 204 | stack space to save stuff on. */ |
205 | 205 | ||
206 | register char *dst __asm__ ("r13") = pdst; | 206 | register char *dst __asm__ ("r13") = pdst; |
@@ -380,7 +380,7 @@ __do_clear_user (void __user *pto, unsigned long pn) | |||
380 | As it is now: r10 -> r13; r11 -> r11 (nop); r12 -> r12 (nop). | 380 | As it is now: r10 -> r13; r11 -> r11 (nop); r12 -> r12 (nop). |
381 | 381 | ||
382 | FIXME: Comment for old gcc version. Check. | 382 | FIXME: Comment for old gcc version. Check. |
383 | If gcc was allright, it really would need no temporaries, and no | 383 | If gcc was alright, it really would need no temporaries, and no |
384 | stack space to save stuff on. */ | 384 | stack space to save stuff on. */ |
385 | 385 | ||
386 | register char *dst __asm__ ("r13") = pto; | 386 | register char *dst __asm__ ("r13") = pto; |
diff --git a/arch/cris/arch-v32/boot/compressed/misc.c b/arch/cris/arch-v32/boot/compressed/misc.c index 11902697196d..0169ba1ca9c9 100644 --- a/arch/cris/arch-v32/boot/compressed/misc.c +++ b/arch/cris/arch-v32/boot/compressed/misc.c | |||
@@ -8,7 +8,7 @@ | |||
8 | * | 8 | * |
9 | * malloc by Hannu Savolainen 1993 and Matthias Urlichs 1994 | 9 | * malloc by Hannu Savolainen 1993 and Matthias Urlichs 1994 |
10 | * puts by Nick Holloway 1993, better puts by Martin Mares 1995 | 10 | * puts by Nick Holloway 1993, better puts by Martin Mares 1995 |
11 | * adoptation for Linux/CRIS Axis Communications AB, 1999 | 11 | * adaptation for Linux/CRIS Axis Communications AB, 1999 |
12 | * | 12 | * |
13 | */ | 13 | */ |
14 | 14 | ||
@@ -151,7 +151,7 @@ serout(const char *s, reg_scope_instances regi_ser) | |||
151 | do { | 151 | do { |
152 | rs = REG_RD(ser, regi_ser, rs_stat_din); | 152 | rs = REG_RD(ser, regi_ser, rs_stat_din); |
153 | } | 153 | } |
154 | while (!rs.tr_rdy);/* Wait for tranceiver. */ | 154 | while (!rs.tr_rdy);/* Wait for transceiver. */ |
155 | 155 | ||
156 | REG_WR(ser, regi_ser, rw_dout, dout); | 156 | REG_WR(ser, regi_ser, rw_dout, dout); |
157 | } | 157 | } |
@@ -264,7 +264,7 @@ serial_setup(reg_scope_instances regi_ser) | |||
264 | tr_ctrl.stop_bits = 1; /* 2 stop bits. */ | 264 | tr_ctrl.stop_bits = 1; /* 2 stop bits. */ |
265 | 265 | ||
266 | /* | 266 | /* |
267 | * The baudrate setup is a bit fishy, but in the end the tranceiver is | 267 | * The baudrate setup is a bit fishy, but in the end the transceiver is |
268 | * set to 4800 and the receiver to 115200. The magic value is | 268 | * set to 4800 and the receiver to 115200. The magic value is |
269 | * 29.493 MHz. | 269 | * 29.493 MHz. |
270 | */ | 270 | */ |
diff --git a/arch/cris/arch-v32/drivers/axisflashmap.c b/arch/cris/arch-v32/drivers/axisflashmap.c index 5180d45412fc..3ec12ea44e8e 100644 --- a/arch/cris/arch-v32/drivers/axisflashmap.c +++ b/arch/cris/arch-v32/drivers/axisflashmap.c | |||
@@ -205,7 +205,7 @@ static struct mtd_info *probe_cs(struct map_info *map_cs) | |||
205 | /* | 205 | /* |
206 | * Probe each chip select individually for flash chips. If there are chips on | 206 | * Probe each chip select individually for flash chips. If there are chips on |
207 | * both cse0 and cse1, the mtd_info structs will be concatenated to one struct | 207 | * both cse0 and cse1, the mtd_info structs will be concatenated to one struct |
208 | * so that MTD partitions can cross chip boundries. | 208 | * so that MTD partitions can cross chip boundaries. |
209 | * | 209 | * |
210 | * The only known restriction to how you can mount your chips is that each | 210 | * The only known restriction to how you can mount your chips is that each |
211 | * chip select must hold similar flash chips. But you need external hardware | 211 | * chip select must hold similar flash chips. But you need external hardware |
diff --git a/arch/cris/arch-v32/drivers/i2c.c b/arch/cris/arch-v32/drivers/i2c.c index e12f6cc6f4a2..f1edd2e359b2 100644 --- a/arch/cris/arch-v32/drivers/i2c.c +++ b/arch/cris/arch-v32/drivers/i2c.c | |||
@@ -275,7 +275,7 @@ i2c_getack(void) | |||
275 | ack = 0; | 275 | ack = 0; |
276 | i2c_delay(CLOCK_HIGH_TIME/2); | 276 | i2c_delay(CLOCK_HIGH_TIME/2); |
277 | if(!ack){ | 277 | if(!ack){ |
278 | if(!i2c_getbit()) /* receiver pulld SDA low */ | 278 | if(!i2c_getbit()) /* receiver pulled SDA low */ |
279 | ack = 1; | 279 | ack = 1; |
280 | i2c_delay(CLOCK_HIGH_TIME/2); | 280 | i2c_delay(CLOCK_HIGH_TIME/2); |
281 | } | 281 | } |
diff --git a/arch/cris/arch-v32/drivers/nandflash.c b/arch/cris/arch-v32/drivers/nandflash.c index 93ddea4d9564..5ce015c6bb0d 100644 --- a/arch/cris/arch-v32/drivers/nandflash.c +++ b/arch/cris/arch-v32/drivers/nandflash.c | |||
@@ -138,7 +138,7 @@ struct mtd_info* __init crisv32_nand_flash_probe (void) | |||
138 | /* Enable the following for a flash based bad block table */ | 138 | /* Enable the following for a flash based bad block table */ |
139 | this->options = NAND_USE_FLASH_BBT; | 139 | this->options = NAND_USE_FLASH_BBT; |
140 | 140 | ||
141 | /* Scan to find existance of the device */ | 141 | /* Scan to find existence of the device */ |
142 | if (nand_scan (crisv32_mtd, 1)) { | 142 | if (nand_scan (crisv32_mtd, 1)) { |
143 | err = -ENXIO; | 143 | err = -ENXIO; |
144 | goto out_ior; | 144 | goto out_ior; |
diff --git a/arch/cris/arch-v32/drivers/pcf8563.c b/arch/cris/arch-v32/drivers/pcf8563.c index da479a14f836..6dbd700d3d66 100644 --- a/arch/cris/arch-v32/drivers/pcf8563.c +++ b/arch/cris/arch-v32/drivers/pcf8563.c | |||
@@ -4,7 +4,7 @@ | |||
4 | * From Phillips' datasheet: | 4 | * From Phillips' datasheet: |
5 | * | 5 | * |
6 | * The PCF8563 is a CMOS real-time clock/calendar optimized for low power | 6 | * The PCF8563 is a CMOS real-time clock/calendar optimized for low power |
7 | * consumption. A programmable clock output, interupt output and voltage | 7 | * consumption. A programmable clock output, interrupt output and voltage |
8 | * low detector are also provided. All address and data are transferred | 8 | * low detector are also provided. All address and data are transferred |
9 | * serially via two-line bidirectional I2C-bus. Maximum bus speed is | 9 | * serially via two-line bidirectional I2C-bus. Maximum bus speed is |
10 | * 400 kbits/s. The built-in word address register is incremented | 10 | * 400 kbits/s. The built-in word address register is incremented |
diff --git a/arch/cris/arch-v32/kernel/fasttimer.c b/arch/cris/arch-v32/kernel/fasttimer.c index 79e1e4c2ca1d..b40551f9f40d 100644 --- a/arch/cris/arch-v32/kernel/fasttimer.c +++ b/arch/cris/arch-v32/kernel/fasttimer.c | |||
@@ -97,7 +97,7 @@ | |||
97 | * with time based on jiffies and *R_TIMER0_DATA, uses a table | 97 | * with time based on jiffies and *R_TIMER0_DATA, uses a table |
98 | * for fast conversion of timer value to microseconds. | 98 | * for fast conversion of timer value to microseconds. |
99 | * (Much faster the standard do_gettimeofday() and we don't really | 99 | * (Much faster the standard do_gettimeofday() and we don't really |
100 | * wan't to use the true time - we wan't the "uptime" so timers don't screw up | 100 | * want to use the true time - we want the "uptime" so timers don't screw up |
101 | * when we change the time. | 101 | * when we change the time. |
102 | * TODO: Add efficient support for continuous timers as well. | 102 | * TODO: Add efficient support for continuous timers as well. |
103 | * | 103 | * |
diff --git a/arch/cris/arch-v32/kernel/irq.c b/arch/cris/arch-v32/kernel/irq.c index cc361bf578ae..a9acaa270243 100644 --- a/arch/cris/arch-v32/kernel/irq.c +++ b/arch/cris/arch-v32/kernel/irq.c | |||
@@ -140,7 +140,7 @@ block_irq(int irq, int cpu) | |||
140 | spin_lock_irqsave(&irq_lock, flags); | 140 | spin_lock_irqsave(&irq_lock, flags); |
141 | intr_mask = REG_RD_INT(intr_vect, irq_regs[cpu], rw_mask); | 141 | intr_mask = REG_RD_INT(intr_vect, irq_regs[cpu], rw_mask); |
142 | 142 | ||
143 | /* Remember; 1 let thru, 0 block. */ | 143 | /* Remember; 1 let through, 0 block. */ |
144 | intr_mask &= ~(1 << (irq - FIRST_IRQ)); | 144 | intr_mask &= ~(1 << (irq - FIRST_IRQ)); |
145 | 145 | ||
146 | REG_WR_INT(intr_vect, irq_regs[cpu], rw_mask, intr_mask); | 146 | REG_WR_INT(intr_vect, irq_regs[cpu], rw_mask, intr_mask); |
@@ -156,7 +156,7 @@ unblock_irq(int irq, int cpu) | |||
156 | spin_lock_irqsave(&irq_lock, flags); | 156 | spin_lock_irqsave(&irq_lock, flags); |
157 | intr_mask = REG_RD_INT(intr_vect, irq_regs[cpu], rw_mask); | 157 | intr_mask = REG_RD_INT(intr_vect, irq_regs[cpu], rw_mask); |
158 | 158 | ||
159 | /* Remember; 1 let thru, 0 block. */ | 159 | /* Remember; 1 let through, 0 block. */ |
160 | intr_mask |= (1 << (irq - FIRST_IRQ)); | 160 | intr_mask |= (1 << (irq - FIRST_IRQ)); |
161 | 161 | ||
162 | REG_WR_INT(intr_vect, irq_regs[cpu], rw_mask, intr_mask); | 162 | REG_WR_INT(intr_vect, irq_regs[cpu], rw_mask, intr_mask); |
@@ -308,7 +308,7 @@ crisv32_do_multiple(struct pt_regs* regs) | |||
308 | */ | 308 | */ |
309 | irq_enter(); | 309 | irq_enter(); |
310 | 310 | ||
311 | /* Get which IRQs that happend. */ | 311 | /* Get which IRQs that happened. */ |
312 | masked = REG_RD_INT(intr_vect, irq_regs[cpu], r_masked_vect); | 312 | masked = REG_RD_INT(intr_vect, irq_regs[cpu], r_masked_vect); |
313 | 313 | ||
314 | /* Calculate new IRQ mask with these IRQs disabled. */ | 314 | /* Calculate new IRQ mask with these IRQs disabled. */ |
@@ -366,7 +366,7 @@ init_IRQ(void) | |||
366 | for (i = 0; i < 256; i++) | 366 | for (i = 0; i < 256; i++) |
367 | etrax_irv->v[i] = weird_irq; | 367 | etrax_irv->v[i] = weird_irq; |
368 | 368 | ||
369 | /* Point all IRQ's to bad handlers. */ | 369 | /* Point all IRQs to bad handlers. */ |
370 | for (i = FIRST_IRQ, j = 0; j < NR_IRQS; i++, j++) { | 370 | for (i = FIRST_IRQ, j = 0; j < NR_IRQS; i++, j++) { |
371 | irq_desc[j].chip = &crisv32_irq_type; | 371 | irq_desc[j].chip = &crisv32_irq_type; |
372 | set_exception_vector(i, interrupt[j]); | 372 | set_exception_vector(i, interrupt[j]); |
diff --git a/arch/cris/arch-v32/kernel/process.c b/arch/cris/arch-v32/kernel/process.c index 6326351af252..b72a15580dc7 100644 --- a/arch/cris/arch-v32/kernel/process.c +++ b/arch/cris/arch-v32/kernel/process.c | |||
@@ -162,7 +162,7 @@ copy_thread(int nr, unsigned long clone_flags, unsigned long usp, | |||
162 | /* Put the switch stack right below the pt_regs. */ | 162 | /* Put the switch stack right below the pt_regs. */ |
163 | swstack = ((struct switch_stack *) childregs) - 1; | 163 | swstack = ((struct switch_stack *) childregs) - 1; |
164 | 164 | ||
165 | /* Paramater to ret_from_sys_call. 0 is don't restart the syscall. */ | 165 | /* Parameter to ret_from_sys_call. 0 is don't restart the syscall. */ |
166 | swstack->r9 = 0; | 166 | swstack->r9 = 0; |
167 | 167 | ||
168 | /* | 168 | /* |
diff --git a/arch/cris/arch-v32/kernel/signal.c b/arch/cris/arch-v32/kernel/signal.c index 7cd6ac803409..024cc6901974 100644 --- a/arch/cris/arch-v32/kernel/signal.c +++ b/arch/cris/arch-v32/kernel/signal.c | |||
@@ -347,7 +347,7 @@ get_sigframe(struct k_sigaction *ka, struct pt_regs * regs, size_t frame_size) | |||
347 | /* Grab and setup a signal frame. | 347 | /* Grab and setup a signal frame. |
348 | * | 348 | * |
349 | * Basically a lot of state-info is stacked, and arranged for the | 349 | * Basically a lot of state-info is stacked, and arranged for the |
350 | * user-mode program to return to the kernel using either a trampiline | 350 | * user-mode program to return to the kernel using either a trampoline |
351 | * which performs the syscall sigreturn(), or a provided user-mode | 351 | * which performs the syscall sigreturn(), or a provided user-mode |
352 | * trampoline. | 352 | * trampoline. |
353 | */ | 353 | */ |
@@ -641,7 +641,7 @@ ugdb_trap_user(struct thread_info *ti, int sig) | |||
641 | user_regs(ti)->spc = 0; | 641 | user_regs(ti)->spc = 0; |
642 | } | 642 | } |
643 | /* FIXME: Filter out false h/w breakpoint hits (i.e. EDA | 643 | /* FIXME: Filter out false h/w breakpoint hits (i.e. EDA |
644 | not withing any configured h/w breakpoint range). Synchronize with | 644 | not within any configured h/w breakpoint range). Synchronize with |
645 | what already exists for kernel debugging. */ | 645 | what already exists for kernel debugging. */ |
646 | if (((user_regs(ti)->exs & 0xff00) >> 8) == BREAK_8_INTR_VECT) { | 646 | if (((user_regs(ti)->exs & 0xff00) >> 8) == BREAK_8_INTR_VECT) { |
647 | /* Break 8: subtract 2 from ERP unless in a delay slot. */ | 647 | /* Break 8: subtract 2 from ERP unless in a delay slot. */ |
diff --git a/arch/cris/arch-v32/kernel/smp.c b/arch/cris/arch-v32/kernel/smp.c index 697494bc2de1..171c96e0a5d3 100644 --- a/arch/cris/arch-v32/kernel/smp.c +++ b/arch/cris/arch-v32/kernel/smp.c | |||
@@ -142,7 +142,7 @@ smp_boot_one_cpu(int cpuid) | |||
142 | return -1; | 142 | return -1; |
143 | } | 143 | } |
144 | 144 | ||
145 | /* Secondary CPUs starts uing C here. Here we need to setup CPU | 145 | /* Secondary CPUs starts using C here. Here we need to setup CPU |
146 | * specific stuff such as the local timer and the MMU. */ | 146 | * specific stuff such as the local timer and the MMU. */ |
147 | void __init smp_callin(void) | 147 | void __init smp_callin(void) |
148 | { | 148 | { |
diff --git a/arch/cris/arch-v32/kernel/time.c b/arch/cris/arch-v32/kernel/time.c index be0a01657d4f..2f7e8e200f2c 100644 --- a/arch/cris/arch-v32/kernel/time.c +++ b/arch/cris/arch-v32/kernel/time.c | |||
@@ -99,7 +99,7 @@ unsigned long do_slow_gettimeoffset(void) | |||
99 | /* From timer MDS describing the hardware watchdog: | 99 | /* From timer MDS describing the hardware watchdog: |
100 | * 4.3.1 Watchdog Operation | 100 | * 4.3.1 Watchdog Operation |
101 | * The watchdog timer is an 8-bit timer with a configurable start value. | 101 | * The watchdog timer is an 8-bit timer with a configurable start value. |
102 | * Once started the whatchdog counts downwards with a frequency of 763 Hz | 102 | * Once started the watchdog counts downwards with a frequency of 763 Hz |
103 | * (100/131072 MHz). When the watchdog counts down to 1, it generates an | 103 | * (100/131072 MHz). When the watchdog counts down to 1, it generates an |
104 | * NMI (Non Maskable Interrupt), and when it counts down to 0, it resets the | 104 | * NMI (Non Maskable Interrupt), and when it counts down to 0, it resets the |
105 | * chip. | 105 | * chip. |
diff --git a/arch/cris/arch-v32/kernel/traps.c b/arch/cris/arch-v32/kernel/traps.c index 2462b1ef1fbb..17fd3dbd1c80 100644 --- a/arch/cris/arch-v32/kernel/traps.c +++ b/arch/cris/arch-v32/kernel/traps.c | |||
@@ -105,7 +105,7 @@ bad_value: | |||
105 | 105 | ||
106 | /* | 106 | /* |
107 | * This gets called from entry.S when the watchdog has bitten. Show something | 107 | * This gets called from entry.S when the watchdog has bitten. Show something |
108 | * similiar to an Oops dump, and if the kernel if configured to be a nice doggy; | 108 | * similar to an Oops dump, and if the kernel is configured to be a nice doggy; |
109 | * halt instead of reboot. | 109 | * halt instead of reboot. |
110 | */ | 110 | */ |
111 | void | 111 | void |
diff --git a/arch/cris/arch-v32/lib/dram_init.S b/arch/cris/arch-v32/lib/dram_init.S index 158b3dbb4d9d..218fbe259ee5 100644 --- a/arch/cris/arch-v32/lib/dram_init.S +++ b/arch/cris/arch-v32/lib/dram_init.S | |||
@@ -12,7 +12,7 @@ | |||
12 | */ | 12 | */ |
13 | 13 | ||
14 | /* Just to be certain the config file is included, we include it here | 14 | /* Just to be certain the config file is included, we include it here |
15 | * explicitely instead of depending on it being included in the file that | 15 | * explicitly instead of depending on it being included in the file that |
16 | * uses this code. | 16 | * uses this code. |
17 | */ | 17 | */ |
18 | 18 | ||
diff --git a/arch/cris/arch-v32/lib/string.c b/arch/cris/arch-v32/lib/string.c index 98e282ac824a..6740b2cebae5 100644 --- a/arch/cris/arch-v32/lib/string.c +++ b/arch/cris/arch-v32/lib/string.c | |||
@@ -41,7 +41,7 @@ void *memcpy(void *pdst, | |||
41 | Make sure the compiler is able to make something useful of this. | 41 | Make sure the compiler is able to make something useful of this. |
42 | As it is now: r10 -> r13; r11 -> r11 (nop); r12 -> r12 (nop). | 42 | As it is now: r10 -> r13; r11 -> r11 (nop); r12 -> r12 (nop). |
43 | 43 | ||
44 | If gcc was allright, it really would need no temporaries, and no | 44 | If gcc was alright, it really would need no temporaries, and no |
45 | stack space to save stuff on. */ | 45 | stack space to save stuff on. */ |
46 | 46 | ||
47 | register void *return_dst __asm__ ("r10") = pdst; | 47 | register void *return_dst __asm__ ("r10") = pdst; |
diff --git a/arch/cris/arch-v32/lib/usercopy.c b/arch/cris/arch-v32/lib/usercopy.c index f0b08460c1be..04d0cf35a276 100644 --- a/arch/cris/arch-v32/lib/usercopy.c +++ b/arch/cris/arch-v32/lib/usercopy.c | |||
@@ -34,7 +34,7 @@ __copy_user (void __user *pdst, const void *psrc, unsigned long pn) | |||
34 | As it is now: r10 -> r13; r11 -> r11 (nop); r12 -> r12 (nop). | 34 | As it is now: r10 -> r13; r11 -> r11 (nop); r12 -> r12 (nop). |
35 | 35 | ||
36 | FIXME: Comment for old gcc version. Check. | 36 | FIXME: Comment for old gcc version. Check. |
37 | If gcc was allright, it really would need no temporaries, and no | 37 | If gcc was alright, it really would need no temporaries, and no |
38 | stack space to save stuff on. */ | 38 | stack space to save stuff on. */ |
39 | 39 | ||
40 | register char *dst __asm__ ("r13") = pdst; | 40 | register char *dst __asm__ ("r13") = pdst; |
@@ -168,7 +168,7 @@ __copy_user_zeroing (void __user *pdst, const void *psrc, unsigned long pn) | |||
168 | As it is now: r10 -> r13; r11 -> r11 (nop); r12 -> r12 (nop). | 168 | As it is now: r10 -> r13; r11 -> r11 (nop); r12 -> r12 (nop). |
169 | 169 | ||
170 | FIXME: Comment for old gcc version. Check. | 170 | FIXME: Comment for old gcc version. Check. |
171 | If gcc was allright, it really would need no temporaries, and no | 171 | If gcc was alright, it really would need no temporaries, and no |
172 | stack space to save stuff on. */ | 172 | stack space to save stuff on. */ |
173 | 173 | ||
174 | register char *dst __asm__ ("r13") = pdst; | 174 | register char *dst __asm__ ("r13") = pdst; |
@@ -332,7 +332,7 @@ __do_clear_user (void __user *pto, unsigned long pn) | |||
332 | As it is now: r10 -> r13; r11 -> r11 (nop); r12 -> r12 (nop). | 332 | As it is now: r10 -> r13; r11 -> r11 (nop); r12 -> r12 (nop). |
333 | 333 | ||
334 | FIXME: Comment for old gcc version. Check. | 334 | FIXME: Comment for old gcc version. Check. |
335 | If gcc was allright, it really would need no temporaries, and no | 335 | If gcc was alright, it really would need no temporaries, and no |
336 | stack space to save stuff on. */ | 336 | stack space to save stuff on. */ |
337 | 337 | ||
338 | register char *dst __asm__ ("r13") = pto; | 338 | register char *dst __asm__ ("r13") = pto; |
diff --git a/arch/cris/arch-v32/mm/tlb.c b/arch/cris/arch-v32/mm/tlb.c index c2d12e9c40d7..a076ef6e9389 100644 --- a/arch/cris/arch-v32/mm/tlb.c +++ b/arch/cris/arch-v32/mm/tlb.c | |||
@@ -30,8 +30,8 @@ do { \ | |||
30 | * The TLB can host up to 256 different mm contexts at the same time. The running | 30 | * The TLB can host up to 256 different mm contexts at the same time. The running |
31 | * context is found in the PID register. Each TLB entry contains a page_id that | 31 | * context is found in the PID register. Each TLB entry contains a page_id that |
32 | * has to match the PID register to give a hit. page_id_map keeps track of which | 32 | * has to match the PID register to give a hit. page_id_map keeps track of which |
33 | * mm's is assigned to which page_id's, making sure it's known when to | 33 | * mm is assigned to which page_id, making sure it's known when to invalidate TLB |
34 | * invalidate TLB entries. | 34 | * entries. |
35 | * | 35 | * |
36 | * The last page_id is never running, it is used as an invalid page_id so that | 36 | * The last page_id is never running, it is used as an invalid page_id so that |
37 | * it's possible to make TLB entries that will nerver match. | 37 | * it's possible to make TLB entries that will nerver match. |
@@ -188,7 +188,7 @@ switch_mm(struct mm_struct *prev, struct mm_struct *next, | |||
188 | spin_unlock(&mmu_context_lock); | 188 | spin_unlock(&mmu_context_lock); |
189 | 189 | ||
190 | /* | 190 | /* |
191 | * Remember the pgd for the fault handlers. Keep a seperate copy of it | 191 | * Remember the pgd for the fault handlers. Keep a separate copy of it |
192 | * because current and active_mm might be invalid at points where | 192 | * because current and active_mm might be invalid at points where |
193 | * there's still a need to derefer the pgd. | 193 | * there's still a need to derefer the pgd. |
194 | */ | 194 | */ |
diff --git a/arch/cris/kernel/irq.c b/arch/cris/kernel/irq.c index 903ea62c6e21..5c27ff86121b 100644 --- a/arch/cris/kernel/irq.c +++ b/arch/cris/kernel/irq.c | |||
@@ -7,7 +7,7 @@ | |||
7 | * Authors: Bjorn Wesen (bjornw@axis.com) | 7 | * Authors: Bjorn Wesen (bjornw@axis.com) |
8 | * | 8 | * |
9 | * This file contains the code used by various IRQ handling routines: | 9 | * This file contains the code used by various IRQ handling routines: |
10 | * asking for different IRQ's should be done through these routines | 10 | * asking for different IRQs should be done through these routines |
11 | * instead of just grabbing them. Thus setups with different IRQ numbers | 11 | * instead of just grabbing them. Thus setups with different IRQ numbers |
12 | * shouldn't result in any weird surprises, and installing new handlers | 12 | * shouldn't result in any weird surprises, and installing new handlers |
13 | * should be easier. | 13 | * should be easier. |
@@ -15,7 +15,7 @@ | |||
15 | */ | 15 | */ |
16 | 16 | ||
17 | /* | 17 | /* |
18 | * IRQ's are in fact implemented a bit like signal handlers for the kernel. | 18 | * IRQs are in fact implemented a bit like signal handlers for the kernel. |
19 | * Naturally it's not a 1:1 relation, but there are similarities. | 19 | * Naturally it's not a 1:1 relation, but there are similarities. |
20 | */ | 20 | */ |
21 | 21 | ||
@@ -83,9 +83,9 @@ skip: | |||
83 | 83 | ||
84 | 84 | ||
85 | /* called by the assembler IRQ entry functions defined in irq.h | 85 | /* called by the assembler IRQ entry functions defined in irq.h |
86 | * to dispatch the interrupts to registred handlers | 86 | * to dispatch the interrupts to registered handlers |
87 | * interrupts are disabled upon entry - depending on if the | 87 | * interrupts are disabled upon entry - depending on if the |
88 | * interrupt was registred with IRQF_DISABLED or not, interrupts | 88 | * interrupt was registered with IRQF_DISABLED or not, interrupts |
89 | * are re-enabled or not. | 89 | * are re-enabled or not. |
90 | */ | 90 | */ |
91 | 91 | ||
diff --git a/arch/cris/mm/fault.c b/arch/cris/mm/fault.c index 8aab81430695..3034f3ff950c 100644 --- a/arch/cris/mm/fault.c +++ b/arch/cris/mm/fault.c | |||
@@ -13,7 +13,7 @@ | |||
13 | * Fixed warning. | 13 | * Fixed warning. |
14 | * | 14 | * |
15 | * Revision 1.18 2005/01/12 08:10:14 starvik | 15 | * Revision 1.18 2005/01/12 08:10:14 starvik |
16 | * Readded the change of frametype when handling kernel page fault fixup | 16 | * Re-added the change of frametype when handling kernel page fault fixup |
17 | * for v10. This is necessary to avoid that the CPU remakes the faulting | 17 | * for v10. This is necessary to avoid that the CPU remakes the faulting |
18 | * access. | 18 | * access. |
19 | * | 19 | * |
@@ -49,7 +49,7 @@ | |||
49 | * | 49 | * |
50 | * Revision 1.8 2003/07/04 13:02:48 tobiasa | 50 | * Revision 1.8 2003/07/04 13:02:48 tobiasa |
51 | * Moved code snippet from arch/cris/mm/fault.c that searches for fixup code | 51 | * Moved code snippet from arch/cris/mm/fault.c that searches for fixup code |
52 | * to seperate function in arch-specific files. | 52 | * to separate function in arch-specific files. |
53 | * | 53 | * |
54 | * Revision 1.7 2003/01/22 06:48:38 starvik | 54 | * Revision 1.7 2003/01/22 06:48:38 starvik |
55 | * Fixed warnings issued by GCC 3.2.1 | 55 | * Fixed warnings issued by GCC 3.2.1 |
diff --git a/arch/cris/mm/init.c b/arch/cris/mm/init.c index b7842ff213a6..0c833d176226 100644 --- a/arch/cris/mm/init.c +++ b/arch/cris/mm/init.c | |||
@@ -8,7 +8,7 @@ | |||
8 | * | 8 | * |
9 | * $Log: init.c,v $ | 9 | * $Log: init.c,v $ |
10 | * Revision 1.11 2004/05/28 09:28:56 starvik | 10 | * Revision 1.11 2004/05/28 09:28:56 starvik |
11 | * Calculation of loops_per_usec moved because initalization order has changed | 11 | * Calculation of loops_per_usec moved because initialization order has changed |
12 | * in Linux 2.6. | 12 | * in Linux 2.6. |
13 | * | 13 | * |
14 | * Revision 1.10 2004/05/14 07:58:05 starvik | 14 | * Revision 1.10 2004/05/14 07:58:05 starvik |
diff --git a/arch/cris/mm/tlb.c b/arch/cris/mm/tlb.c index c4a98e2e529e..b7f8de576777 100644 --- a/arch/cris/mm/tlb.c +++ b/arch/cris/mm/tlb.c | |||
@@ -16,7 +16,7 @@ | |||
16 | /* The TLB can host up to 64 different mm contexts at the same time. | 16 | /* The TLB can host up to 64 different mm contexts at the same time. |
17 | * The running context is R_MMU_CONTEXT, and each TLB entry contains a | 17 | * The running context is R_MMU_CONTEXT, and each TLB entry contains a |
18 | * page_id that has to match to give a hit. In page_id_map, we keep track | 18 | * page_id that has to match to give a hit. In page_id_map, we keep track |
19 | * of which mm's we have assigned which page_id's, so that we know when | 19 | * of which mm we have assigned to which page_id, so that we know when |
20 | * to invalidate TLB entries. | 20 | * to invalidate TLB entries. |
21 | * | 21 | * |
22 | * The last page_id is never running - it is used as an invalid page_id | 22 | * The last page_id is never running - it is used as an invalid page_id |
diff --git a/arch/frv/Kconfig b/arch/frv/Kconfig index 74eef7111f2b..43153e767bb1 100644 --- a/arch/frv/Kconfig +++ b/arch/frv/Kconfig | |||
@@ -375,6 +375,8 @@ source "drivers/Kconfig" | |||
375 | 375 | ||
376 | source "fs/Kconfig" | 376 | source "fs/Kconfig" |
377 | 377 | ||
378 | source "kernel/Kconfig.instrumentation" | ||
379 | |||
378 | source "arch/frv/Kconfig.debug" | 380 | source "arch/frv/Kconfig.debug" |
379 | 381 | ||
380 | source "security/Kconfig" | 382 | source "security/Kconfig" |
diff --git a/arch/frv/kernel/irq-mb93091.c b/arch/frv/kernel/irq-mb93091.c index ad753c1e9b8f..9e38f99bbab8 100644 --- a/arch/frv/kernel/irq-mb93091.c +++ b/arch/frv/kernel/irq-mb93091.c | |||
@@ -17,10 +17,10 @@ | |||
17 | #include <linux/interrupt.h> | 17 | #include <linux/interrupt.h> |
18 | #include <linux/init.h> | 18 | #include <linux/init.h> |
19 | #include <linux/irq.h> | 19 | #include <linux/irq.h> |
20 | #include <linux/bitops.h> | ||
20 | 21 | ||
21 | #include <asm/io.h> | 22 | #include <asm/io.h> |
22 | #include <asm/system.h> | 23 | #include <asm/system.h> |
23 | #include <asm/bitops.h> | ||
24 | #include <asm/delay.h> | 24 | #include <asm/delay.h> |
25 | #include <asm/irq.h> | 25 | #include <asm/irq.h> |
26 | #include <asm/irc-regs.h> | 26 | #include <asm/irc-regs.h> |
diff --git a/arch/frv/kernel/irq-mb93093.c b/arch/frv/kernel/irq-mb93093.c index e0983f6926ed..3c2752ca9775 100644 --- a/arch/frv/kernel/irq-mb93093.c +++ b/arch/frv/kernel/irq-mb93093.c | |||
@@ -17,10 +17,10 @@ | |||
17 | #include <linux/interrupt.h> | 17 | #include <linux/interrupt.h> |
18 | #include <linux/init.h> | 18 | #include <linux/init.h> |
19 | #include <linux/irq.h> | 19 | #include <linux/irq.h> |
20 | #include <linux/bitops.h> | ||
20 | 21 | ||
21 | #include <asm/io.h> | 22 | #include <asm/io.h> |
22 | #include <asm/system.h> | 23 | #include <asm/system.h> |
23 | #include <asm/bitops.h> | ||
24 | #include <asm/delay.h> | 24 | #include <asm/delay.h> |
25 | #include <asm/irq.h> | 25 | #include <asm/irq.h> |
26 | #include <asm/irc-regs.h> | 26 | #include <asm/irc-regs.h> |
diff --git a/arch/frv/kernel/irq-mb93493.c b/arch/frv/kernel/irq-mb93493.c index c157eeff871d..7754c7338e4b 100644 --- a/arch/frv/kernel/irq-mb93493.c +++ b/arch/frv/kernel/irq-mb93493.c | |||
@@ -17,10 +17,10 @@ | |||
17 | #include <linux/interrupt.h> | 17 | #include <linux/interrupt.h> |
18 | #include <linux/init.h> | 18 | #include <linux/init.h> |
19 | #include <linux/irq.h> | 19 | #include <linux/irq.h> |
20 | #include <linux/bitops.h> | ||
20 | 21 | ||
21 | #include <asm/io.h> | 22 | #include <asm/io.h> |
22 | #include <asm/system.h> | 23 | #include <asm/system.h> |
23 | #include <asm/bitops.h> | ||
24 | #include <asm/delay.h> | 24 | #include <asm/delay.h> |
25 | #include <asm/irq.h> | 25 | #include <asm/irq.h> |
26 | #include <asm/irc-regs.h> | 26 | #include <asm/irc-regs.h> |
diff --git a/arch/frv/kernel/irq.c b/arch/frv/kernel/irq.c index c7e59dcadee4..73abae767fdc 100644 --- a/arch/frv/kernel/irq.c +++ b/arch/frv/kernel/irq.c | |||
@@ -24,12 +24,12 @@ | |||
24 | #include <linux/proc_fs.h> | 24 | #include <linux/proc_fs.h> |
25 | #include <linux/seq_file.h> | 25 | #include <linux/seq_file.h> |
26 | #include <linux/module.h> | 26 | #include <linux/module.h> |
27 | #include <linux/bitops.h> | ||
27 | 28 | ||
28 | #include <asm/atomic.h> | 29 | #include <asm/atomic.h> |
29 | #include <asm/io.h> | 30 | #include <asm/io.h> |
30 | #include <asm/smp.h> | 31 | #include <asm/smp.h> |
31 | #include <asm/system.h> | 32 | #include <asm/system.h> |
32 | #include <asm/bitops.h> | ||
33 | #include <asm/uaccess.h> | 33 | #include <asm/uaccess.h> |
34 | #include <asm/pgalloc.h> | 34 | #include <asm/pgalloc.h> |
35 | #include <asm/delay.h> | 35 | #include <asm/delay.h> |
@@ -134,7 +134,7 @@ static struct irq_chip frv_cpu_pic = { | |||
134 | }; | 134 | }; |
135 | 135 | ||
136 | /* | 136 | /* |
137 | * handles all normal device IRQ's | 137 | * handles all normal device IRQs |
138 | * - registers are referred to by the __frame variable (GR28) | 138 | * - registers are referred to by the __frame variable (GR28) |
139 | * - IRQ distribution is complicated in this arch because of the many PICs, the | 139 | * - IRQ distribution is complicated in this arch because of the many PICs, the |
140 | * way they work and the way they cascade | 140 | * way they work and the way they cascade |
diff --git a/arch/frv/kernel/semaphore.c b/arch/frv/kernel/semaphore.c index 8e182ced1a0f..7ee3a147b471 100644 --- a/arch/frv/kernel/semaphore.c +++ b/arch/frv/kernel/semaphore.c | |||
@@ -139,7 +139,7 @@ void __up(struct semaphore *sem) | |||
139 | waiter = list_entry(sem->wait_list.next, struct sem_waiter, list); | 139 | waiter = list_entry(sem->wait_list.next, struct sem_waiter, list); |
140 | 140 | ||
141 | /* We must be careful not to touch 'waiter' after we set ->task = NULL. | 141 | /* We must be careful not to touch 'waiter' after we set ->task = NULL. |
142 | * It is an allocated on the waiter's stack and may become invalid at | 142 | * It is allocated on the waiter's stack and may become invalid at |
143 | * any time after that point (due to a wakeup from another source). | 143 | * any time after that point (due to a wakeup from another source). |
144 | */ | 144 | */ |
145 | list_del_init(&waiter->list); | 145 | list_del_init(&waiter->list); |
diff --git a/arch/frv/kernel/time.c b/arch/frv/kernel/time.c index e83e0bccfab9..925fb0199a0f 100644 --- a/arch/frv/kernel/time.c +++ b/arch/frv/kernel/time.c | |||
@@ -66,7 +66,7 @@ static irqreturn_t timer_interrupt(int irq, void *dummy) | |||
66 | /* | 66 | /* |
67 | * Here we are in the timer irq handler. We just have irqs locally | 67 | * Here we are in the timer irq handler. We just have irqs locally |
68 | * disabled but we don't know if the timer_bh is running on the other | 68 | * disabled but we don't know if the timer_bh is running on the other |
69 | * CPU. We need to avoid to SMP race with it. NOTE: we don' t need | 69 | * CPU. We need to avoid to SMP race with it. NOTE: we don't need |
70 | * the irq version of write_lock because as just said we have irq | 70 | * the irq version of write_lock because as just said we have irq |
71 | * locally disabled. -arca | 71 | * locally disabled. -arca |
72 | */ | 72 | */ |
@@ -126,7 +126,7 @@ void time_init(void) | |||
126 | 126 | ||
127 | /* FIX by dqg : Set to zero for platforms that don't have tod */ | 127 | /* FIX by dqg : Set to zero for platforms that don't have tod */ |
128 | /* without this time is undefined and can overflow time_t, causing */ | 128 | /* without this time is undefined and can overflow time_t, causing */ |
129 | /* very stange errors */ | 129 | /* very strange errors */ |
130 | year = 1980; | 130 | year = 1980; |
131 | mon = day = 1; | 131 | mon = day = 1; |
132 | hour = min = sec = 0; | 132 | hour = min = sec = 0; |
diff --git a/arch/h8300/Kconfig b/arch/h8300/Kconfig index e35f74e6e505..e2e9f57abe2e 100644 --- a/arch/h8300/Kconfig +++ b/arch/h8300/Kconfig | |||
@@ -223,6 +223,8 @@ endmenu | |||
223 | 223 | ||
224 | source "fs/Kconfig" | 224 | source "fs/Kconfig" |
225 | 225 | ||
226 | source "kernel/Kconfig.instrumentation" | ||
227 | |||
226 | source "arch/h8300/Kconfig.debug" | 228 | source "arch/h8300/Kconfig.debug" |
227 | 229 | ||
228 | source "security/Kconfig" | 230 | source "security/Kconfig" |
diff --git a/arch/h8300/Kconfig.debug b/arch/h8300/Kconfig.debug index 996d97e953b0..ee671c3f2c74 100644 --- a/arch/h8300/Kconfig.debug +++ b/arch/h8300/Kconfig.debug | |||
@@ -42,16 +42,16 @@ config SH_STANDARD_BIOS | |||
42 | Require eCos/RedBoot | 42 | Require eCos/RedBoot |
43 | 43 | ||
44 | config DEFAULT_CMDLINE | 44 | config DEFAULT_CMDLINE |
45 | bool "Use buildin commandline" | 45 | bool "Use builtin commandline" |
46 | default n | 46 | default n |
47 | help | 47 | help |
48 | buildin kernel commandline enabled. | 48 | builtin kernel commandline enabled. |
49 | 49 | ||
50 | config KERNEL_COMMAND | 50 | config KERNEL_COMMAND |
51 | string "Buildin commmand string" | 51 | string "Buildin commmand string" |
52 | depends on DEFAULT_CMDLINE | 52 | depends on DEFAULT_CMDLINE |
53 | help | 53 | help |
54 | buildin kernel commandline strings. | 54 | builtin kernel commandline strings. |
55 | 55 | ||
56 | config BLKDEV_RESERVE | 56 | config BLKDEV_RESERVE |
57 | bool "BLKDEV Reserved Memory" | 57 | bool "BLKDEV Reserved Memory" |
diff --git a/arch/h8300/kernel/irq.c b/arch/h8300/kernel/irq.c index 43d21e93f41f..8dec4dd57b4e 100644 --- a/arch/h8300/kernel/irq.c +++ b/arch/h8300/kernel/irq.c | |||
@@ -68,7 +68,7 @@ static void h8300_shutdown_irq(unsigned int irq) | |||
68 | } | 68 | } |
69 | 69 | ||
70 | /* | 70 | /* |
71 | * h8300 interrupt controler implementation | 71 | * h8300 interrupt controller implementation |
72 | */ | 72 | */ |
73 | struct irq_chip h8300irq_chip = { | 73 | struct irq_chip h8300irq_chip = { |
74 | .name = "H8300-INTC", | 74 | .name = "H8300-INTC", |
diff --git a/arch/h8300/kernel/time.c b/arch/h8300/kernel/time.c index 330638220a2e..e37c835e67cf 100644 --- a/arch/h8300/kernel/time.c +++ b/arch/h8300/kernel/time.c | |||
@@ -53,7 +53,7 @@ void time_init(void) | |||
53 | 53 | ||
54 | /* FIX by dqg : Set to zero for platforms that don't have tod */ | 54 | /* FIX by dqg : Set to zero for platforms that don't have tod */ |
55 | /* without this time is undefined and can overflow time_t, causing */ | 55 | /* without this time is undefined and can overflow time_t, causing */ |
56 | /* very stange errors */ | 56 | /* very strange errors */ |
57 | year = 1980; | 57 | year = 1980; |
58 | mon = day = 1; | 58 | mon = day = 1; |
59 | hour = min = sec = 0; | 59 | hour = min = sec = 0; |
diff --git a/arch/h8300/kernel/traps.c b/arch/h8300/kernel/traps.c index f97183011c2c..f8f7d7ea97f1 100644 --- a/arch/h8300/kernel/traps.c +++ b/arch/h8300/kernel/traps.c | |||
@@ -5,7 +5,7 @@ | |||
5 | * Cloned from Linux/m68k. | 5 | * Cloned from Linux/m68k. |
6 | * | 6 | * |
7 | * No original Copyright holder listed, | 7 | * No original Copyright holder listed, |
8 | * Probabily original (C) Roman Zippel (assigned DJD, 1999) | 8 | * Probable original (C) Roman Zippel (assigned DJD, 1999) |
9 | * | 9 | * |
10 | * Copyright 1999-2000 D. Jeff Dionne, <jeff@rt-control.com> | 10 | * Copyright 1999-2000 D. Jeff Dionne, <jeff@rt-control.com> |
11 | * | 11 | * |
diff --git a/arch/h8300/platform/h8s/ints.c b/arch/h8300/platform/h8s/ints.c index a71d6e2a3919..551fd5f30d82 100644 --- a/arch/h8300/platform/h8s/ints.c +++ b/arch/h8300/platform/h8s/ints.c | |||
@@ -179,7 +179,7 @@ int request_irq(unsigned int irq, | |||
179 | if (use_kmalloc) | 179 | if (use_kmalloc) |
180 | irq_handle = kmalloc(sizeof(irq_handler_t), GFP_ATOMIC); | 180 | irq_handle = kmalloc(sizeof(irq_handler_t), GFP_ATOMIC); |
181 | else { | 181 | else { |
182 | /* use bootmem allocater */ | 182 | /* use bootmem allocator */ |
183 | irq_handle = (irq_handler_t *)alloc_bootmem(sizeof(irq_handler_t)); | 183 | irq_handle = (irq_handler_t *)alloc_bootmem(sizeof(irq_handler_t)); |
184 | irq_handle = (irq_handler_t *)((unsigned long)irq_handle | 0x80000000); | 184 | irq_handle = (irq_handler_t *)((unsigned long)irq_handle | 0x80000000); |
185 | } | 185 | } |
diff --git a/arch/h8300/platform/h8s/ints_h8s.c b/arch/h8300/platform/h8s/ints_h8s.c index 93395d2a8a07..faa8a459d952 100644 --- a/arch/h8300/platform/h8s/ints_h8s.c +++ b/arch/h8300/platform/h8s/ints_h8s.c | |||
@@ -63,7 +63,7 @@ static const struct irq_pins irq_assign_table1[16]={ | |||
63 | {H8300_GPIO_P2,H8300_GPIO_B6},{H8300_GPIO_P2,H8300_GPIO_B7}, | 63 | {H8300_GPIO_P2,H8300_GPIO_B6},{H8300_GPIO_P2,H8300_GPIO_B7}, |
64 | }; | 64 | }; |
65 | 65 | ||
66 | /* IRQ to GPIO pinno transrate */ | 66 | /* IRQ to GPIO pin translation */ |
67 | #define IRQ_GPIO_MAP(irqbit,irq,port,bit) \ | 67 | #define IRQ_GPIO_MAP(irqbit,irq,port,bit) \ |
68 | do { \ | 68 | do { \ |
69 | if (*(volatile unsigned short *)ITSR & irqbit) { \ | 69 | if (*(volatile unsigned short *)ITSR & irqbit) { \ |
diff --git a/arch/i386/Kconfig b/arch/i386/Kconfig index b84d5050e92e..f6e44fc5283c 100644 --- a/arch/i386/Kconfig +++ b/arch/i386/Kconfig | |||
@@ -392,7 +392,7 @@ config X86_MCE_NONFATAL | |||
392 | will look at the machine check registers to see if anything happened. | 392 | will look at the machine check registers to see if anything happened. |
393 | Non-fatal problems automatically get corrected (but still logged). | 393 | Non-fatal problems automatically get corrected (but still logged). |
394 | Disable this if you don't want to see these messages. | 394 | Disable this if you don't want to see these messages. |
395 | Seeing the messages this option prints out may be indicative of dying hardware, | 395 | Seeing the messages this option prints out may be indicative of dying |
396 | or out-of-spec (ie, overclocked) hardware. | 396 | or out-of-spec (ie, overclocked) hardware. |
397 | This option only does something on certain CPUs. | 397 | This option only does something on certain CPUs. |
398 | (AMD Athlon/Duron and Intel Pentium 4) | 398 | (AMD Athlon/Duron and Intel Pentium 4) |
@@ -631,7 +631,7 @@ config NUMA | |||
631 | default n if X86_PC | 631 | default n if X86_PC |
632 | default y if (X86_NUMAQ || X86_SUMMIT) | 632 | default y if (X86_NUMAQ || X86_SUMMIT) |
633 | help | 633 | help |
634 | NUMA support for i386. This is currently high experimental | 634 | NUMA support for i386. This is currently highly experimental |
635 | and should be only used for kernel development. It might also | 635 | and should be only used for kernel development. It might also |
636 | cause boot failures. | 636 | cause boot failures. |
637 | 637 | ||
@@ -1080,7 +1080,9 @@ config APM_REAL_MODE_POWER_OFF | |||
1080 | 1080 | ||
1081 | endif # APM | 1081 | endif # APM |
1082 | 1082 | ||
1083 | source "arch/x86/kernel/cpu/cpufreq/Kconfig" | 1083 | source "arch/x86/kernel/cpu/cpufreq/Kconfig_32" |
1084 | |||
1085 | source "drivers/cpuidle/Kconfig" | ||
1084 | 1086 | ||
1085 | endmenu | 1087 | endmenu |
1086 | 1088 | ||
@@ -1256,31 +1258,6 @@ source "drivers/Kconfig" | |||
1256 | 1258 | ||
1257 | source "fs/Kconfig" | 1259 | source "fs/Kconfig" |
1258 | 1260 | ||
1259 | menuconfig INSTRUMENTATION | ||
1260 | bool "Instrumentation Support" | ||
1261 | default y | ||
1262 | ---help--- | ||
1263 | Say Y here to get to see options related to performance measurement, | ||
1264 | debugging, and testing. This option alone does not add any kernel code. | ||
1265 | |||
1266 | If you say N, all options in this submenu will be skipped and disabled. | ||
1267 | |||
1268 | if INSTRUMENTATION | ||
1269 | |||
1270 | source "arch/x86/oprofile/Kconfig" | ||
1271 | |||
1272 | config KPROBES | ||
1273 | bool "Kprobes" | ||
1274 | depends on KALLSYMS && MODULES | ||
1275 | help | ||
1276 | Kprobes allows you to trap at almost any kernel address and | ||
1277 | execute a callback function. register_kprobe() establishes | ||
1278 | a probepoint and specifies the callback. Kprobes is useful | ||
1279 | for kernel debugging, non-intrusive instrumentation and testing. | ||
1280 | If in doubt, say "N". | ||
1281 | |||
1282 | endif # INSTRUMENTATION | ||
1283 | |||
1284 | source "arch/i386/Kconfig.debug" | 1261 | source "arch/i386/Kconfig.debug" |
1285 | 1262 | ||
1286 | source "security/Kconfig" | 1263 | source "security/Kconfig" |
diff --git a/arch/i386/Makefile b/arch/i386/Makefile index f036d2dee3de..b88e47ca3032 100644 --- a/arch/i386/Makefile +++ b/arch/i386/Makefile | |||
@@ -102,7 +102,7 @@ core-$(CONFIG_XEN) += arch/x86/xen/ | |||
102 | # default subarch .h files | 102 | # default subarch .h files |
103 | mflags-y += -Iinclude/asm-x86/mach-default | 103 | mflags-y += -Iinclude/asm-x86/mach-default |
104 | 104 | ||
105 | head-y := arch/x86/kernel/head_32.o arch/x86/kernel/init_task_32.o | 105 | head-y := arch/x86/kernel/head_32.o arch/x86/kernel/init_task.o |
106 | 106 | ||
107 | libs-y += arch/x86/lib/ | 107 | libs-y += arch/x86/lib/ |
108 | core-y += arch/x86/kernel/ \ | 108 | core-y += arch/x86/kernel/ \ |
@@ -131,9 +131,9 @@ all: bzImage | |||
131 | zImage zlilo zdisk: KBUILD_IMAGE := arch/x86/boot/zImage | 131 | zImage zlilo zdisk: KBUILD_IMAGE := arch/x86/boot/zImage |
132 | 132 | ||
133 | zImage bzImage: vmlinux | 133 | zImage bzImage: vmlinux |
134 | $(Q)mkdir -p $(objtree)/arch/i386/boot | ||
135 | $(Q)ln -fsn $(objtree)/arch/x86/boot/bzImage $(objtree)/arch/i386/boot/bzImage | ||
136 | $(Q)$(MAKE) $(build)=$(boot) $(KBUILD_IMAGE) | 134 | $(Q)$(MAKE) $(build)=$(boot) $(KBUILD_IMAGE) |
135 | $(Q)mkdir -p $(objtree)/arch/i386/boot | ||
136 | $(Q)ln -fsn ../../x86/boot/bzImage $(objtree)/arch/i386/boot/bzImage | ||
137 | 137 | ||
138 | compressed: zImage | 138 | compressed: zImage |
139 | 139 | ||
diff --git a/arch/ia64/Kconfig b/arch/ia64/Kconfig index c60532d93c54..bef47725d4ad 100644 --- a/arch/ia64/Kconfig +++ b/arch/ia64/Kconfig | |||
@@ -452,9 +452,9 @@ config IA64_PALINFO | |||
452 | config IA64_MC_ERR_INJECT | 452 | config IA64_MC_ERR_INJECT |
453 | tristate "MC error injection support" | 453 | tristate "MC error injection support" |
454 | help | 454 | help |
455 | Selets whether support for MC error injection. By enabling the | 455 | Adds support for MC error injection. If enabled, the kernel |
456 | support, kernel provide sysfs interface for user application to | 456 | will provide a sysfs interface for user applications to |
457 | call MC error injection PAL procedure to inject various errors. | 457 | call MC error injection PAL procedures to inject various errors. |
458 | This is a useful tool for MCA testing. | 458 | This is a useful tool for MCA testing. |
459 | 459 | ||
460 | If you're unsure, do not select this option. | 460 | If you're unsure, do not select this option. |
@@ -491,7 +491,7 @@ config KEXEC | |||
491 | but it is independent of the system firmware. And like a reboot | 491 | but it is independent of the system firmware. And like a reboot |
492 | you can start any kernel with it, not just Linux. | 492 | you can start any kernel with it, not just Linux. |
493 | 493 | ||
494 | The name comes from the similiarity to the exec system call. | 494 | The name comes from the similarity to the exec system call. |
495 | 495 | ||
496 | It is an ongoing process to be certain the hardware in a machine | 496 | It is an ongoing process to be certain the hardware in a machine |
497 | is properly shutdown, so do not be surprised if this code does not | 497 | is properly shutdown, so do not be surprised if this code does not |
@@ -592,20 +592,7 @@ config IRQ_PER_CPU | |||
592 | 592 | ||
593 | source "arch/ia64/hp/sim/Kconfig" | 593 | source "arch/ia64/hp/sim/Kconfig" |
594 | 594 | ||
595 | menu "Instrumentation Support" | 595 | source "kernel/Kconfig.instrumentation" |
596 | |||
597 | source "arch/ia64/oprofile/Kconfig" | ||
598 | |||
599 | config KPROBES | ||
600 | bool "Kprobes" | ||
601 | depends on KALLSYMS && MODULES | ||
602 | help | ||
603 | Kprobes allows you to trap at almost any kernel address and | ||
604 | execute a callback function. register_kprobe() establishes | ||
605 | a probepoint and specifies the callback. Kprobes is useful | ||
606 | for kernel debugging, non-intrusive instrumentation and testing. | ||
607 | If in doubt, say "N". | ||
608 | endmenu | ||
609 | 596 | ||
610 | source "arch/ia64/Kconfig.debug" | 597 | source "arch/ia64/Kconfig.debug" |
611 | 598 | ||
diff --git a/arch/ia64/configs/sn2_defconfig b/arch/ia64/configs/sn2_defconfig index 449d3e75bfc2..75fd90dc76a3 100644 --- a/arch/ia64/configs/sn2_defconfig +++ b/arch/ia64/configs/sn2_defconfig | |||
@@ -26,6 +26,7 @@ CONFIG_TASK_IO_ACCOUNTING=y | |||
26 | # CONFIG_AUDIT is not set | 26 | # CONFIG_AUDIT is not set |
27 | # CONFIG_IKCONFIG is not set | 27 | # CONFIG_IKCONFIG is not set |
28 | CONFIG_LOG_BUF_SHIFT=20 | 28 | CONFIG_LOG_BUF_SHIFT=20 |
29 | CONFIG_CGROUPS=y | ||
29 | CONFIG_CPUSETS=y | 30 | CONFIG_CPUSETS=y |
30 | CONFIG_SYSFS_DEPRECATED=y | 31 | CONFIG_SYSFS_DEPRECATED=y |
31 | CONFIG_RELAY=y | 32 | CONFIG_RELAY=y |
diff --git a/arch/ia64/ia32/sys_ia32.c b/arch/ia64/ia32/sys_ia32.c index a3405b3c1eef..d025a22eb225 100644 --- a/arch/ia64/ia32/sys_ia32.c +++ b/arch/ia64/ia32/sys_ia32.c | |||
@@ -773,7 +773,7 @@ emulate_mmap (struct file *file, unsigned long start, unsigned long len, int pro | |||
773 | if (flags & MAP_SHARED) | 773 | if (flags & MAP_SHARED) |
774 | printk(KERN_INFO | 774 | printk(KERN_INFO |
775 | "%s(%d): emulate_mmap() can't share head (addr=0x%lx)\n", | 775 | "%s(%d): emulate_mmap() can't share head (addr=0x%lx)\n", |
776 | current->comm, current->pid, start); | 776 | current->comm, task_pid_nr(current), start); |
777 | ret = mmap_subpage(file, start, min(PAGE_ALIGN(start), end), prot, flags, | 777 | ret = mmap_subpage(file, start, min(PAGE_ALIGN(start), end), prot, flags, |
778 | off); | 778 | off); |
779 | if (IS_ERR((void *) ret)) | 779 | if (IS_ERR((void *) ret)) |
@@ -786,7 +786,7 @@ emulate_mmap (struct file *file, unsigned long start, unsigned long len, int pro | |||
786 | if (flags & MAP_SHARED) | 786 | if (flags & MAP_SHARED) |
787 | printk(KERN_INFO | 787 | printk(KERN_INFO |
788 | "%s(%d): emulate_mmap() can't share tail (end=0x%lx)\n", | 788 | "%s(%d): emulate_mmap() can't share tail (end=0x%lx)\n", |
789 | current->comm, current->pid, end); | 789 | current->comm, task_pid_nr(current), end); |
790 | ret = mmap_subpage(file, max(start, PAGE_START(end)), end, prot, flags, | 790 | ret = mmap_subpage(file, max(start, PAGE_START(end)), end, prot, flags, |
791 | (off + len) - offset_in_page(end)); | 791 | (off + len) - offset_in_page(end)); |
792 | if (IS_ERR((void *) ret)) | 792 | if (IS_ERR((void *) ret)) |
@@ -816,7 +816,7 @@ emulate_mmap (struct file *file, unsigned long start, unsigned long len, int pro | |||
816 | 816 | ||
817 | if ((flags & MAP_SHARED) && !is_congruent) | 817 | if ((flags & MAP_SHARED) && !is_congruent) |
818 | printk(KERN_INFO "%s(%d): emulate_mmap() can't share contents of incongruent mmap " | 818 | printk(KERN_INFO "%s(%d): emulate_mmap() can't share contents of incongruent mmap " |
819 | "(addr=0x%lx,off=0x%llx)\n", current->comm, current->pid, start, off); | 819 | "(addr=0x%lx,off=0x%llx)\n", current->comm, task_pid_nr(current), start, off); |
820 | 820 | ||
821 | DBG("mmap_body: mapping [0x%lx-0x%lx) %s with poff 0x%llx\n", pstart, pend, | 821 | DBG("mmap_body: mapping [0x%lx-0x%lx) %s with poff 0x%llx\n", pstart, pend, |
822 | is_congruent ? "congruent" : "not congruent", poff); | 822 | is_congruent ? "congruent" : "not congruent", poff); |
diff --git a/arch/ia64/kernel/efi.c b/arch/ia64/kernel/efi.c index 73ca86d03810..8e4894b205e2 100644 --- a/arch/ia64/kernel/efi.c +++ b/arch/ia64/kernel/efi.c | |||
@@ -967,7 +967,7 @@ find_memmap_space (void) | |||
967 | * to use. We can allocate partial granules only if the unavailable | 967 | * to use. We can allocate partial granules only if the unavailable |
968 | * parts exist, and are WB. | 968 | * parts exist, and are WB. |
969 | */ | 969 | */ |
970 | void | 970 | unsigned long |
971 | efi_memmap_init(unsigned long *s, unsigned long *e) | 971 | efi_memmap_init(unsigned long *s, unsigned long *e) |
972 | { | 972 | { |
973 | struct kern_memdesc *k, *prev = NULL; | 973 | struct kern_memdesc *k, *prev = NULL; |
@@ -1084,6 +1084,8 @@ efi_memmap_init(unsigned long *s, unsigned long *e) | |||
1084 | /* reserve the memory we are using for kern_memmap */ | 1084 | /* reserve the memory we are using for kern_memmap */ |
1085 | *s = (u64)kern_memmap; | 1085 | *s = (u64)kern_memmap; |
1086 | *e = (u64)++k; | 1086 | *e = (u64)++k; |
1087 | |||
1088 | return total_mem; | ||
1087 | } | 1089 | } |
1088 | 1090 | ||
1089 | void | 1091 | void |
diff --git a/arch/ia64/kernel/perfmon.c b/arch/ia64/kernel/perfmon.c index f55fa07849c4..59169bf7145f 100644 --- a/arch/ia64/kernel/perfmon.c +++ b/arch/ia64/kernel/perfmon.c | |||
@@ -158,14 +158,14 @@ | |||
158 | */ | 158 | */ |
159 | #define PROTECT_CTX(c, f) \ | 159 | #define PROTECT_CTX(c, f) \ |
160 | do { \ | 160 | do { \ |
161 | DPRINT(("spinlock_irq_save ctx %p by [%d]\n", c, current->pid)); \ | 161 | DPRINT(("spinlock_irq_save ctx %p by [%d]\n", c, task_pid_nr(current))); \ |
162 | spin_lock_irqsave(&(c)->ctx_lock, f); \ | 162 | spin_lock_irqsave(&(c)->ctx_lock, f); \ |
163 | DPRINT(("spinlocked ctx %p by [%d]\n", c, current->pid)); \ | 163 | DPRINT(("spinlocked ctx %p by [%d]\n", c, task_pid_nr(current))); \ |
164 | } while(0) | 164 | } while(0) |
165 | 165 | ||
166 | #define UNPROTECT_CTX(c, f) \ | 166 | #define UNPROTECT_CTX(c, f) \ |
167 | do { \ | 167 | do { \ |
168 | DPRINT(("spinlock_irq_restore ctx %p by [%d]\n", c, current->pid)); \ | 168 | DPRINT(("spinlock_irq_restore ctx %p by [%d]\n", c, task_pid_nr(current))); \ |
169 | spin_unlock_irqrestore(&(c)->ctx_lock, f); \ | 169 | spin_unlock_irqrestore(&(c)->ctx_lock, f); \ |
170 | } while(0) | 170 | } while(0) |
171 | 171 | ||
@@ -227,12 +227,12 @@ | |||
227 | #ifdef PFM_DEBUGGING | 227 | #ifdef PFM_DEBUGGING |
228 | #define DPRINT(a) \ | 228 | #define DPRINT(a) \ |
229 | do { \ | 229 | do { \ |
230 | if (unlikely(pfm_sysctl.debug >0)) { printk("%s.%d: CPU%d [%d] ", __FUNCTION__, __LINE__, smp_processor_id(), current->pid); printk a; } \ | 230 | if (unlikely(pfm_sysctl.debug >0)) { printk("%s.%d: CPU%d [%d] ", __FUNCTION__, __LINE__, smp_processor_id(), task_pid_nr(current)); printk a; } \ |
231 | } while (0) | 231 | } while (0) |
232 | 232 | ||
233 | #define DPRINT_ovfl(a) \ | 233 | #define DPRINT_ovfl(a) \ |
234 | do { \ | 234 | do { \ |
235 | if (unlikely(pfm_sysctl.debug > 0 && pfm_sysctl.debug_ovfl >0)) { printk("%s.%d: CPU%d [%d] ", __FUNCTION__, __LINE__, smp_processor_id(), current->pid); printk a; } \ | 235 | if (unlikely(pfm_sysctl.debug > 0 && pfm_sysctl.debug_ovfl >0)) { printk("%s.%d: CPU%d [%d] ", __FUNCTION__, __LINE__, smp_processor_id(), task_pid_nr(current)); printk a; } \ |
236 | } while (0) | 236 | } while (0) |
237 | #endif | 237 | #endif |
238 | 238 | ||
@@ -913,7 +913,7 @@ pfm_mask_monitoring(struct task_struct *task) | |||
913 | unsigned long mask, val, ovfl_mask; | 913 | unsigned long mask, val, ovfl_mask; |
914 | int i; | 914 | int i; |
915 | 915 | ||
916 | DPRINT_ovfl(("masking monitoring for [%d]\n", task->pid)); | 916 | DPRINT_ovfl(("masking monitoring for [%d]\n", task_pid_nr(task))); |
917 | 917 | ||
918 | ovfl_mask = pmu_conf->ovfl_val; | 918 | ovfl_mask = pmu_conf->ovfl_val; |
919 | /* | 919 | /* |
@@ -992,12 +992,12 @@ pfm_restore_monitoring(struct task_struct *task) | |||
992 | ovfl_mask = pmu_conf->ovfl_val; | 992 | ovfl_mask = pmu_conf->ovfl_val; |
993 | 993 | ||
994 | if (task != current) { | 994 | if (task != current) { |
995 | printk(KERN_ERR "perfmon.%d: invalid task[%d] current[%d]\n", __LINE__, task->pid, current->pid); | 995 | printk(KERN_ERR "perfmon.%d: invalid task[%d] current[%d]\n", __LINE__, task_pid_nr(task), task_pid_nr(current)); |
996 | return; | 996 | return; |
997 | } | 997 | } |
998 | if (ctx->ctx_state != PFM_CTX_MASKED) { | 998 | if (ctx->ctx_state != PFM_CTX_MASKED) { |
999 | printk(KERN_ERR "perfmon.%d: task[%d] current[%d] invalid state=%d\n", __LINE__, | 999 | printk(KERN_ERR "perfmon.%d: task[%d] current[%d] invalid state=%d\n", __LINE__, |
1000 | task->pid, current->pid, ctx->ctx_state); | 1000 | task_pid_nr(task), task_pid_nr(current), ctx->ctx_state); |
1001 | return; | 1001 | return; |
1002 | } | 1002 | } |
1003 | psr = pfm_get_psr(); | 1003 | psr = pfm_get_psr(); |
@@ -1051,7 +1051,8 @@ pfm_restore_monitoring(struct task_struct *task) | |||
1051 | if ((mask & 0x1) == 0UL) continue; | 1051 | if ((mask & 0x1) == 0UL) continue; |
1052 | ctx->th_pmcs[i] = ctx->ctx_pmcs[i]; | 1052 | ctx->th_pmcs[i] = ctx->ctx_pmcs[i]; |
1053 | ia64_set_pmc(i, ctx->th_pmcs[i]); | 1053 | ia64_set_pmc(i, ctx->th_pmcs[i]); |
1054 | DPRINT(("[%d] pmc[%d]=0x%lx\n", task->pid, i, ctx->th_pmcs[i])); | 1054 | DPRINT(("[%d] pmc[%d]=0x%lx\n", |
1055 | task_pid_nr(task), i, ctx->th_pmcs[i])); | ||
1055 | } | 1056 | } |
1056 | ia64_srlz_d(); | 1057 | ia64_srlz_d(); |
1057 | 1058 | ||
@@ -1370,7 +1371,7 @@ pfm_reserve_session(struct task_struct *task, int is_syswide, unsigned int cpu) | |||
1370 | 1371 | ||
1371 | error_conflict: | 1372 | error_conflict: |
1372 | DPRINT(("system wide not possible, conflicting session [%d] on CPU%d\n", | 1373 | DPRINT(("system wide not possible, conflicting session [%d] on CPU%d\n", |
1373 | pfm_sessions.pfs_sys_session[cpu]->pid, | 1374 | task_pid_nr(pfm_sessions.pfs_sys_session[cpu]), |
1374 | cpu)); | 1375 | cpu)); |
1375 | abort: | 1376 | abort: |
1376 | UNLOCK_PFS(flags); | 1377 | UNLOCK_PFS(flags); |
@@ -1442,7 +1443,7 @@ pfm_remove_smpl_mapping(struct task_struct *task, void *vaddr, unsigned long siz | |||
1442 | 1443 | ||
1443 | /* sanity checks */ | 1444 | /* sanity checks */ |
1444 | if (task->mm == NULL || size == 0UL || vaddr == NULL) { | 1445 | if (task->mm == NULL || size == 0UL || vaddr == NULL) { |
1445 | printk(KERN_ERR "perfmon: pfm_remove_smpl_mapping [%d] invalid context mm=%p\n", task->pid, task->mm); | 1446 | printk(KERN_ERR "perfmon: pfm_remove_smpl_mapping [%d] invalid context mm=%p\n", task_pid_nr(task), task->mm); |
1446 | return -EINVAL; | 1447 | return -EINVAL; |
1447 | } | 1448 | } |
1448 | 1449 | ||
@@ -1459,7 +1460,7 @@ pfm_remove_smpl_mapping(struct task_struct *task, void *vaddr, unsigned long siz | |||
1459 | 1460 | ||
1460 | up_write(&task->mm->mmap_sem); | 1461 | up_write(&task->mm->mmap_sem); |
1461 | if (r !=0) { | 1462 | if (r !=0) { |
1462 | printk(KERN_ERR "perfmon: [%d] unable to unmap sampling buffer @%p size=%lu\n", task->pid, vaddr, size); | 1463 | printk(KERN_ERR "perfmon: [%d] unable to unmap sampling buffer @%p size=%lu\n", task_pid_nr(task), vaddr, size); |
1463 | } | 1464 | } |
1464 | 1465 | ||
1465 | DPRINT(("do_unmap(%p, %lu)=%d\n", vaddr, size, r)); | 1466 | DPRINT(("do_unmap(%p, %lu)=%d\n", vaddr, size, r)); |
@@ -1501,7 +1502,7 @@ pfm_free_smpl_buffer(pfm_context_t *ctx) | |||
1501 | return 0; | 1502 | return 0; |
1502 | 1503 | ||
1503 | invalid_free: | 1504 | invalid_free: |
1504 | printk(KERN_ERR "perfmon: pfm_free_smpl_buffer [%d] no buffer\n", current->pid); | 1505 | printk(KERN_ERR "perfmon: pfm_free_smpl_buffer [%d] no buffer\n", task_pid_nr(current)); |
1505 | return -EINVAL; | 1506 | return -EINVAL; |
1506 | } | 1507 | } |
1507 | #endif | 1508 | #endif |
@@ -1547,13 +1548,13 @@ pfm_read(struct file *filp, char __user *buf, size_t size, loff_t *ppos) | |||
1547 | unsigned long flags; | 1548 | unsigned long flags; |
1548 | DECLARE_WAITQUEUE(wait, current); | 1549 | DECLARE_WAITQUEUE(wait, current); |
1549 | if (PFM_IS_FILE(filp) == 0) { | 1550 | if (PFM_IS_FILE(filp) == 0) { |
1550 | printk(KERN_ERR "perfmon: pfm_poll: bad magic [%d]\n", current->pid); | 1551 | printk(KERN_ERR "perfmon: pfm_poll: bad magic [%d]\n", task_pid_nr(current)); |
1551 | return -EINVAL; | 1552 | return -EINVAL; |
1552 | } | 1553 | } |
1553 | 1554 | ||
1554 | ctx = (pfm_context_t *)filp->private_data; | 1555 | ctx = (pfm_context_t *)filp->private_data; |
1555 | if (ctx == NULL) { | 1556 | if (ctx == NULL) { |
1556 | printk(KERN_ERR "perfmon: pfm_read: NULL ctx [%d]\n", current->pid); | 1557 | printk(KERN_ERR "perfmon: pfm_read: NULL ctx [%d]\n", task_pid_nr(current)); |
1557 | return -EINVAL; | 1558 | return -EINVAL; |
1558 | } | 1559 | } |
1559 | 1560 | ||
@@ -1607,7 +1608,7 @@ pfm_read(struct file *filp, char __user *buf, size_t size, loff_t *ppos) | |||
1607 | 1608 | ||
1608 | PROTECT_CTX(ctx, flags); | 1609 | PROTECT_CTX(ctx, flags); |
1609 | } | 1610 | } |
1610 | DPRINT(("[%d] back to running ret=%ld\n", current->pid, ret)); | 1611 | DPRINT(("[%d] back to running ret=%ld\n", task_pid_nr(current), ret)); |
1611 | set_current_state(TASK_RUNNING); | 1612 | set_current_state(TASK_RUNNING); |
1612 | remove_wait_queue(&ctx->ctx_msgq_wait, &wait); | 1613 | remove_wait_queue(&ctx->ctx_msgq_wait, &wait); |
1613 | 1614 | ||
@@ -1616,7 +1617,7 @@ pfm_read(struct file *filp, char __user *buf, size_t size, loff_t *ppos) | |||
1616 | ret = -EINVAL; | 1617 | ret = -EINVAL; |
1617 | msg = pfm_get_next_msg(ctx); | 1618 | msg = pfm_get_next_msg(ctx); |
1618 | if (msg == NULL) { | 1619 | if (msg == NULL) { |
1619 | printk(KERN_ERR "perfmon: pfm_read no msg for ctx=%p [%d]\n", ctx, current->pid); | 1620 | printk(KERN_ERR "perfmon: pfm_read no msg for ctx=%p [%d]\n", ctx, task_pid_nr(current)); |
1620 | goto abort_locked; | 1621 | goto abort_locked; |
1621 | } | 1622 | } |
1622 | 1623 | ||
@@ -1647,13 +1648,13 @@ pfm_poll(struct file *filp, poll_table * wait) | |||
1647 | unsigned int mask = 0; | 1648 | unsigned int mask = 0; |
1648 | 1649 | ||
1649 | if (PFM_IS_FILE(filp) == 0) { | 1650 | if (PFM_IS_FILE(filp) == 0) { |
1650 | printk(KERN_ERR "perfmon: pfm_poll: bad magic [%d]\n", current->pid); | 1651 | printk(KERN_ERR "perfmon: pfm_poll: bad magic [%d]\n", task_pid_nr(current)); |
1651 | return 0; | 1652 | return 0; |
1652 | } | 1653 | } |
1653 | 1654 | ||
1654 | ctx = (pfm_context_t *)filp->private_data; | 1655 | ctx = (pfm_context_t *)filp->private_data; |
1655 | if (ctx == NULL) { | 1656 | if (ctx == NULL) { |
1656 | printk(KERN_ERR "perfmon: pfm_poll: NULL ctx [%d]\n", current->pid); | 1657 | printk(KERN_ERR "perfmon: pfm_poll: NULL ctx [%d]\n", task_pid_nr(current)); |
1657 | return 0; | 1658 | return 0; |
1658 | } | 1659 | } |
1659 | 1660 | ||
@@ -1692,7 +1693,7 @@ pfm_do_fasync(int fd, struct file *filp, pfm_context_t *ctx, int on) | |||
1692 | ret = fasync_helper (fd, filp, on, &ctx->ctx_async_queue); | 1693 | ret = fasync_helper (fd, filp, on, &ctx->ctx_async_queue); |
1693 | 1694 | ||
1694 | DPRINT(("pfm_fasync called by [%d] on ctx_fd=%d on=%d async_queue=%p ret=%d\n", | 1695 | DPRINT(("pfm_fasync called by [%d] on ctx_fd=%d on=%d async_queue=%p ret=%d\n", |
1695 | current->pid, | 1696 | task_pid_nr(current), |
1696 | fd, | 1697 | fd, |
1697 | on, | 1698 | on, |
1698 | ctx->ctx_async_queue, ret)); | 1699 | ctx->ctx_async_queue, ret)); |
@@ -1707,13 +1708,13 @@ pfm_fasync(int fd, struct file *filp, int on) | |||
1707 | int ret; | 1708 | int ret; |
1708 | 1709 | ||
1709 | if (PFM_IS_FILE(filp) == 0) { | 1710 | if (PFM_IS_FILE(filp) == 0) { |
1710 | printk(KERN_ERR "perfmon: pfm_fasync bad magic [%d]\n", current->pid); | 1711 | printk(KERN_ERR "perfmon: pfm_fasync bad magic [%d]\n", task_pid_nr(current)); |
1711 | return -EBADF; | 1712 | return -EBADF; |
1712 | } | 1713 | } |
1713 | 1714 | ||
1714 | ctx = (pfm_context_t *)filp->private_data; | 1715 | ctx = (pfm_context_t *)filp->private_data; |
1715 | if (ctx == NULL) { | 1716 | if (ctx == NULL) { |
1716 | printk(KERN_ERR "perfmon: pfm_fasync NULL ctx [%d]\n", current->pid); | 1717 | printk(KERN_ERR "perfmon: pfm_fasync NULL ctx [%d]\n", task_pid_nr(current)); |
1717 | return -EBADF; | 1718 | return -EBADF; |
1718 | } | 1719 | } |
1719 | /* | 1720 | /* |
@@ -1759,7 +1760,7 @@ pfm_syswide_force_stop(void *info) | |||
1759 | if (owner != ctx->ctx_task) { | 1760 | if (owner != ctx->ctx_task) { |
1760 | printk(KERN_ERR "perfmon: pfm_syswide_force_stop CPU%d unexpected owner [%d] instead of [%d]\n", | 1761 | printk(KERN_ERR "perfmon: pfm_syswide_force_stop CPU%d unexpected owner [%d] instead of [%d]\n", |
1761 | smp_processor_id(), | 1762 | smp_processor_id(), |
1762 | owner->pid, ctx->ctx_task->pid); | 1763 | task_pid_nr(owner), task_pid_nr(ctx->ctx_task)); |
1763 | return; | 1764 | return; |
1764 | } | 1765 | } |
1765 | if (GET_PMU_CTX() != ctx) { | 1766 | if (GET_PMU_CTX() != ctx) { |
@@ -1769,7 +1770,7 @@ pfm_syswide_force_stop(void *info) | |||
1769 | return; | 1770 | return; |
1770 | } | 1771 | } |
1771 | 1772 | ||
1772 | DPRINT(("on CPU%d forcing system wide stop for [%d]\n", smp_processor_id(), ctx->ctx_task->pid)); | 1773 | DPRINT(("on CPU%d forcing system wide stop for [%d]\n", smp_processor_id(), task_pid_nr(ctx->ctx_task))); |
1773 | /* | 1774 | /* |
1774 | * the context is already protected in pfm_close(), we simply | 1775 | * the context is already protected in pfm_close(), we simply |
1775 | * need to mask interrupts to avoid a PMU interrupt race on | 1776 | * need to mask interrupts to avoid a PMU interrupt race on |
@@ -1821,7 +1822,7 @@ pfm_flush(struct file *filp, fl_owner_t id) | |||
1821 | 1822 | ||
1822 | ctx = (pfm_context_t *)filp->private_data; | 1823 | ctx = (pfm_context_t *)filp->private_data; |
1823 | if (ctx == NULL) { | 1824 | if (ctx == NULL) { |
1824 | printk(KERN_ERR "perfmon: pfm_flush: NULL ctx [%d]\n", current->pid); | 1825 | printk(KERN_ERR "perfmon: pfm_flush: NULL ctx [%d]\n", task_pid_nr(current)); |
1825 | return -EBADF; | 1826 | return -EBADF; |
1826 | } | 1827 | } |
1827 | 1828 | ||
@@ -1969,7 +1970,7 @@ pfm_close(struct inode *inode, struct file *filp) | |||
1969 | 1970 | ||
1970 | ctx = (pfm_context_t *)filp->private_data; | 1971 | ctx = (pfm_context_t *)filp->private_data; |
1971 | if (ctx == NULL) { | 1972 | if (ctx == NULL) { |
1972 | printk(KERN_ERR "perfmon: pfm_close: NULL ctx [%d]\n", current->pid); | 1973 | printk(KERN_ERR "perfmon: pfm_close: NULL ctx [%d]\n", task_pid_nr(current)); |
1973 | return -EBADF; | 1974 | return -EBADF; |
1974 | } | 1975 | } |
1975 | 1976 | ||
@@ -2066,7 +2067,7 @@ pfm_close(struct inode *inode, struct file *filp) | |||
2066 | */ | 2067 | */ |
2067 | ctx->ctx_state = PFM_CTX_ZOMBIE; | 2068 | ctx->ctx_state = PFM_CTX_ZOMBIE; |
2068 | 2069 | ||
2069 | DPRINT(("zombie ctx for [%d]\n", task->pid)); | 2070 | DPRINT(("zombie ctx for [%d]\n", task_pid_nr(task))); |
2070 | /* | 2071 | /* |
2071 | * cannot free the context on the spot. deferred until | 2072 | * cannot free the context on the spot. deferred until |
2072 | * the task notices the ZOMBIE state | 2073 | * the task notices the ZOMBIE state |
@@ -2472,7 +2473,7 @@ pfm_setup_buffer_fmt(struct task_struct *task, struct file *filp, pfm_context_t | |||
2472 | /* invoke and lock buffer format, if found */ | 2473 | /* invoke and lock buffer format, if found */ |
2473 | fmt = pfm_find_buffer_fmt(arg->ctx_smpl_buf_id); | 2474 | fmt = pfm_find_buffer_fmt(arg->ctx_smpl_buf_id); |
2474 | if (fmt == NULL) { | 2475 | if (fmt == NULL) { |
2475 | DPRINT(("[%d] cannot find buffer format\n", task->pid)); | 2476 | DPRINT(("[%d] cannot find buffer format\n", task_pid_nr(task))); |
2476 | return -EINVAL; | 2477 | return -EINVAL; |
2477 | } | 2478 | } |
2478 | 2479 | ||
@@ -2483,7 +2484,7 @@ pfm_setup_buffer_fmt(struct task_struct *task, struct file *filp, pfm_context_t | |||
2483 | 2484 | ||
2484 | ret = pfm_buf_fmt_validate(fmt, task, ctx_flags, cpu, fmt_arg); | 2485 | ret = pfm_buf_fmt_validate(fmt, task, ctx_flags, cpu, fmt_arg); |
2485 | 2486 | ||
2486 | DPRINT(("[%d] after validate(0x%x,%d,%p)=%d\n", task->pid, ctx_flags, cpu, fmt_arg, ret)); | 2487 | DPRINT(("[%d] after validate(0x%x,%d,%p)=%d\n", task_pid_nr(task), ctx_flags, cpu, fmt_arg, ret)); |
2487 | 2488 | ||
2488 | if (ret) goto error; | 2489 | if (ret) goto error; |
2489 | 2490 | ||
@@ -2605,23 +2606,23 @@ pfm_task_incompatible(pfm_context_t *ctx, struct task_struct *task) | |||
2605 | * no kernel task or task not owner by caller | 2606 | * no kernel task or task not owner by caller |
2606 | */ | 2607 | */ |
2607 | if (task->mm == NULL) { | 2608 | if (task->mm == NULL) { |
2608 | DPRINT(("task [%d] has not memory context (kernel thread)\n", task->pid)); | 2609 | DPRINT(("task [%d] has not memory context (kernel thread)\n", task_pid_nr(task))); |
2609 | return -EPERM; | 2610 | return -EPERM; |
2610 | } | 2611 | } |
2611 | if (pfm_bad_permissions(task)) { | 2612 | if (pfm_bad_permissions(task)) { |
2612 | DPRINT(("no permission to attach to [%d]\n", task->pid)); | 2613 | DPRINT(("no permission to attach to [%d]\n", task_pid_nr(task))); |
2613 | return -EPERM; | 2614 | return -EPERM; |
2614 | } | 2615 | } |
2615 | /* | 2616 | /* |
2616 | * cannot block in self-monitoring mode | 2617 | * cannot block in self-monitoring mode |
2617 | */ | 2618 | */ |
2618 | if (CTX_OVFL_NOBLOCK(ctx) == 0 && task == current) { | 2619 | if (CTX_OVFL_NOBLOCK(ctx) == 0 && task == current) { |
2619 | DPRINT(("cannot load a blocking context on self for [%d]\n", task->pid)); | 2620 | DPRINT(("cannot load a blocking context on self for [%d]\n", task_pid_nr(task))); |
2620 | return -EINVAL; | 2621 | return -EINVAL; |
2621 | } | 2622 | } |
2622 | 2623 | ||
2623 | if (task->exit_state == EXIT_ZOMBIE) { | 2624 | if (task->exit_state == EXIT_ZOMBIE) { |
2624 | DPRINT(("cannot attach to zombie task [%d]\n", task->pid)); | 2625 | DPRINT(("cannot attach to zombie task [%d]\n", task_pid_nr(task))); |
2625 | return -EBUSY; | 2626 | return -EBUSY; |
2626 | } | 2627 | } |
2627 | 2628 | ||
@@ -2631,7 +2632,7 @@ pfm_task_incompatible(pfm_context_t *ctx, struct task_struct *task) | |||
2631 | if (task == current) return 0; | 2632 | if (task == current) return 0; |
2632 | 2633 | ||
2633 | if ((task->state != TASK_STOPPED) && (task->state != TASK_TRACED)) { | 2634 | if ((task->state != TASK_STOPPED) && (task->state != TASK_TRACED)) { |
2634 | DPRINT(("cannot attach to non-stopped task [%d] state=%ld\n", task->pid, task->state)); | 2635 | DPRINT(("cannot attach to non-stopped task [%d] state=%ld\n", task_pid_nr(task), task->state)); |
2635 | return -EBUSY; | 2636 | return -EBUSY; |
2636 | } | 2637 | } |
2637 | /* | 2638 | /* |
@@ -3512,7 +3513,7 @@ pfm_use_debug_registers(struct task_struct *task) | |||
3512 | 3513 | ||
3513 | if (pmu_conf->use_rr_dbregs == 0) return 0; | 3514 | if (pmu_conf->use_rr_dbregs == 0) return 0; |
3514 | 3515 | ||
3515 | DPRINT(("called for [%d]\n", task->pid)); | 3516 | DPRINT(("called for [%d]\n", task_pid_nr(task))); |
3516 | 3517 | ||
3517 | /* | 3518 | /* |
3518 | * do it only once | 3519 | * do it only once |
@@ -3543,7 +3544,7 @@ pfm_use_debug_registers(struct task_struct *task) | |||
3543 | DPRINT(("ptrace_use_dbregs=%u sys_use_dbregs=%u by [%d] ret = %d\n", | 3544 | DPRINT(("ptrace_use_dbregs=%u sys_use_dbregs=%u by [%d] ret = %d\n", |
3544 | pfm_sessions.pfs_ptrace_use_dbregs, | 3545 | pfm_sessions.pfs_ptrace_use_dbregs, |
3545 | pfm_sessions.pfs_sys_use_dbregs, | 3546 | pfm_sessions.pfs_sys_use_dbregs, |
3546 | task->pid, ret)); | 3547 | task_pid_nr(task), ret)); |
3547 | 3548 | ||
3548 | UNLOCK_PFS(flags); | 3549 | UNLOCK_PFS(flags); |
3549 | 3550 | ||
@@ -3568,7 +3569,7 @@ pfm_release_debug_registers(struct task_struct *task) | |||
3568 | 3569 | ||
3569 | LOCK_PFS(flags); | 3570 | LOCK_PFS(flags); |
3570 | if (pfm_sessions.pfs_ptrace_use_dbregs == 0) { | 3571 | if (pfm_sessions.pfs_ptrace_use_dbregs == 0) { |
3571 | printk(KERN_ERR "perfmon: invalid release for [%d] ptrace_use_dbregs=0\n", task->pid); | 3572 | printk(KERN_ERR "perfmon: invalid release for [%d] ptrace_use_dbregs=0\n", task_pid_nr(task)); |
3572 | ret = -1; | 3573 | ret = -1; |
3573 | } else { | 3574 | } else { |
3574 | pfm_sessions.pfs_ptrace_use_dbregs--; | 3575 | pfm_sessions.pfs_ptrace_use_dbregs--; |
@@ -3620,7 +3621,7 @@ pfm_restart(pfm_context_t *ctx, void *arg, int count, struct pt_regs *regs) | |||
3620 | 3621 | ||
3621 | /* sanity check */ | 3622 | /* sanity check */ |
3622 | if (unlikely(task == NULL)) { | 3623 | if (unlikely(task == NULL)) { |
3623 | printk(KERN_ERR "perfmon: [%d] pfm_restart no task\n", current->pid); | 3624 | printk(KERN_ERR "perfmon: [%d] pfm_restart no task\n", task_pid_nr(current)); |
3624 | return -EINVAL; | 3625 | return -EINVAL; |
3625 | } | 3626 | } |
3626 | 3627 | ||
@@ -3629,7 +3630,7 @@ pfm_restart(pfm_context_t *ctx, void *arg, int count, struct pt_regs *regs) | |||
3629 | fmt = ctx->ctx_buf_fmt; | 3630 | fmt = ctx->ctx_buf_fmt; |
3630 | 3631 | ||
3631 | DPRINT(("restarting self %d ovfl=0x%lx\n", | 3632 | DPRINT(("restarting self %d ovfl=0x%lx\n", |
3632 | task->pid, | 3633 | task_pid_nr(task), |
3633 | ctx->ctx_ovfl_regs[0])); | 3634 | ctx->ctx_ovfl_regs[0])); |
3634 | 3635 | ||
3635 | if (CTX_HAS_SMPL(ctx)) { | 3636 | if (CTX_HAS_SMPL(ctx)) { |
@@ -3653,11 +3654,11 @@ pfm_restart(pfm_context_t *ctx, void *arg, int count, struct pt_regs *regs) | |||
3653 | pfm_reset_regs(ctx, ctx->ctx_ovfl_regs, PFM_PMD_LONG_RESET); | 3654 | pfm_reset_regs(ctx, ctx->ctx_ovfl_regs, PFM_PMD_LONG_RESET); |
3654 | 3655 | ||
3655 | if (rst_ctrl.bits.mask_monitoring == 0) { | 3656 | if (rst_ctrl.bits.mask_monitoring == 0) { |
3656 | DPRINT(("resuming monitoring for [%d]\n", task->pid)); | 3657 | DPRINT(("resuming monitoring for [%d]\n", task_pid_nr(task))); |
3657 | 3658 | ||
3658 | if (state == PFM_CTX_MASKED) pfm_restore_monitoring(task); | 3659 | if (state == PFM_CTX_MASKED) pfm_restore_monitoring(task); |
3659 | } else { | 3660 | } else { |
3660 | DPRINT(("keeping monitoring stopped for [%d]\n", task->pid)); | 3661 | DPRINT(("keeping monitoring stopped for [%d]\n", task_pid_nr(task))); |
3661 | 3662 | ||
3662 | // cannot use pfm_stop_monitoring(task, regs); | 3663 | // cannot use pfm_stop_monitoring(task, regs); |
3663 | } | 3664 | } |
@@ -3714,10 +3715,10 @@ pfm_restart(pfm_context_t *ctx, void *arg, int count, struct pt_regs *regs) | |||
3714 | * "self-monitoring". | 3715 | * "self-monitoring". |
3715 | */ | 3716 | */ |
3716 | if (CTX_OVFL_NOBLOCK(ctx) == 0 && state == PFM_CTX_MASKED) { | 3717 | if (CTX_OVFL_NOBLOCK(ctx) == 0 && state == PFM_CTX_MASKED) { |
3717 | DPRINT(("unblocking [%d] \n", task->pid)); | 3718 | DPRINT(("unblocking [%d] \n", task_pid_nr(task))); |
3718 | complete(&ctx->ctx_restart_done); | 3719 | complete(&ctx->ctx_restart_done); |
3719 | } else { | 3720 | } else { |
3720 | DPRINT(("[%d] armed exit trap\n", task->pid)); | 3721 | DPRINT(("[%d] armed exit trap\n", task_pid_nr(task))); |
3721 | 3722 | ||
3722 | ctx->ctx_fl_trap_reason = PFM_TRAP_REASON_RESET; | 3723 | ctx->ctx_fl_trap_reason = PFM_TRAP_REASON_RESET; |
3723 | 3724 | ||
@@ -3805,7 +3806,7 @@ pfm_write_ibr_dbr(int mode, pfm_context_t *ctx, void *arg, int count, struct pt_ | |||
3805 | * don't bother if we are loaded and task is being debugged | 3806 | * don't bother if we are loaded and task is being debugged |
3806 | */ | 3807 | */ |
3807 | if (is_loaded && (thread->flags & IA64_THREAD_DBG_VALID) != 0) { | 3808 | if (is_loaded && (thread->flags & IA64_THREAD_DBG_VALID) != 0) { |
3808 | DPRINT(("debug registers already in use for [%d]\n", task->pid)); | 3809 | DPRINT(("debug registers already in use for [%d]\n", task_pid_nr(task))); |
3809 | return -EBUSY; | 3810 | return -EBUSY; |
3810 | } | 3811 | } |
3811 | 3812 | ||
@@ -3846,7 +3847,7 @@ pfm_write_ibr_dbr(int mode, pfm_context_t *ctx, void *arg, int count, struct pt_ | |||
3846 | * is shared by all processes running on it | 3847 | * is shared by all processes running on it |
3847 | */ | 3848 | */ |
3848 | if (first_time && can_access_pmu) { | 3849 | if (first_time && can_access_pmu) { |
3849 | DPRINT(("[%d] clearing ibrs, dbrs\n", task->pid)); | 3850 | DPRINT(("[%d] clearing ibrs, dbrs\n", task_pid_nr(task))); |
3850 | for (i=0; i < pmu_conf->num_ibrs; i++) { | 3851 | for (i=0; i < pmu_conf->num_ibrs; i++) { |
3851 | ia64_set_ibr(i, 0UL); | 3852 | ia64_set_ibr(i, 0UL); |
3852 | ia64_dv_serialize_instruction(); | 3853 | ia64_dv_serialize_instruction(); |
@@ -4035,7 +4036,7 @@ pfm_stop(pfm_context_t *ctx, void *arg, int count, struct pt_regs *regs) | |||
4035 | return -EBUSY; | 4036 | return -EBUSY; |
4036 | } | 4037 | } |
4037 | DPRINT(("task [%d] ctx_state=%d is_system=%d\n", | 4038 | DPRINT(("task [%d] ctx_state=%d is_system=%d\n", |
4038 | PFM_CTX_TASK(ctx)->pid, | 4039 | task_pid_nr(PFM_CTX_TASK(ctx)), |
4039 | state, | 4040 | state, |
4040 | is_system)); | 4041 | is_system)); |
4041 | /* | 4042 | /* |
@@ -4093,7 +4094,7 @@ pfm_stop(pfm_context_t *ctx, void *arg, int count, struct pt_regs *regs) | |||
4093 | * monitoring disabled in kernel at next reschedule | 4094 | * monitoring disabled in kernel at next reschedule |
4094 | */ | 4095 | */ |
4095 | ctx->ctx_saved_psr_up = 0; | 4096 | ctx->ctx_saved_psr_up = 0; |
4096 | DPRINT(("task=[%d]\n", task->pid)); | 4097 | DPRINT(("task=[%d]\n", task_pid_nr(task))); |
4097 | } | 4098 | } |
4098 | return 0; | 4099 | return 0; |
4099 | } | 4100 | } |
@@ -4298,11 +4299,12 @@ pfm_context_load(pfm_context_t *ctx, void *arg, int count, struct pt_regs *regs) | |||
4298 | 4299 | ||
4299 | if (is_system) { | 4300 | if (is_system) { |
4300 | if (pfm_sessions.pfs_ptrace_use_dbregs) { | 4301 | if (pfm_sessions.pfs_ptrace_use_dbregs) { |
4301 | DPRINT(("cannot load [%d] dbregs in use\n", task->pid)); | 4302 | DPRINT(("cannot load [%d] dbregs in use\n", |
4303 | task_pid_nr(task))); | ||
4302 | ret = -EBUSY; | 4304 | ret = -EBUSY; |
4303 | } else { | 4305 | } else { |
4304 | pfm_sessions.pfs_sys_use_dbregs++; | 4306 | pfm_sessions.pfs_sys_use_dbregs++; |
4305 | DPRINT(("load [%d] increased sys_use_dbreg=%u\n", task->pid, pfm_sessions.pfs_sys_use_dbregs)); | 4307 | DPRINT(("load [%d] increased sys_use_dbreg=%u\n", task_pid_nr(task), pfm_sessions.pfs_sys_use_dbregs)); |
4306 | set_dbregs = 1; | 4308 | set_dbregs = 1; |
4307 | } | 4309 | } |
4308 | } | 4310 | } |
@@ -4394,7 +4396,7 @@ pfm_context_load(pfm_context_t *ctx, void *arg, int count, struct pt_regs *regs) | |||
4394 | 4396 | ||
4395 | /* allow user level control */ | 4397 | /* allow user level control */ |
4396 | ia64_psr(regs)->sp = 0; | 4398 | ia64_psr(regs)->sp = 0; |
4397 | DPRINT(("clearing psr.sp for [%d]\n", task->pid)); | 4399 | DPRINT(("clearing psr.sp for [%d]\n", task_pid_nr(task))); |
4398 | 4400 | ||
4399 | SET_LAST_CPU(ctx, smp_processor_id()); | 4401 | SET_LAST_CPU(ctx, smp_processor_id()); |
4400 | INC_ACTIVATION(); | 4402 | INC_ACTIVATION(); |
@@ -4429,7 +4431,7 @@ pfm_context_load(pfm_context_t *ctx, void *arg, int count, struct pt_regs *regs) | |||
4429 | */ | 4431 | */ |
4430 | SET_PMU_OWNER(task, ctx); | 4432 | SET_PMU_OWNER(task, ctx); |
4431 | 4433 | ||
4432 | DPRINT(("context loaded on PMU for [%d]\n", task->pid)); | 4434 | DPRINT(("context loaded on PMU for [%d]\n", task_pid_nr(task))); |
4433 | } else { | 4435 | } else { |
4434 | /* | 4436 | /* |
4435 | * when not current, task MUST be stopped, so this is safe | 4437 | * when not current, task MUST be stopped, so this is safe |
@@ -4493,7 +4495,7 @@ pfm_context_unload(pfm_context_t *ctx, void *arg, int count, struct pt_regs *reg | |||
4493 | int prev_state, is_system; | 4495 | int prev_state, is_system; |
4494 | int ret; | 4496 | int ret; |
4495 | 4497 | ||
4496 | DPRINT(("ctx_state=%d task [%d]\n", ctx->ctx_state, task ? task->pid : -1)); | 4498 | DPRINT(("ctx_state=%d task [%d]\n", ctx->ctx_state, task ? task_pid_nr(task) : -1)); |
4497 | 4499 | ||
4498 | prev_state = ctx->ctx_state; | 4500 | prev_state = ctx->ctx_state; |
4499 | is_system = ctx->ctx_fl_system; | 4501 | is_system = ctx->ctx_fl_system; |
@@ -4568,7 +4570,7 @@ pfm_context_unload(pfm_context_t *ctx, void *arg, int count, struct pt_regs *reg | |||
4568 | */ | 4570 | */ |
4569 | ia64_psr(regs)->sp = 1; | 4571 | ia64_psr(regs)->sp = 1; |
4570 | 4572 | ||
4571 | DPRINT(("setting psr.sp for [%d]\n", task->pid)); | 4573 | DPRINT(("setting psr.sp for [%d]\n", task_pid_nr(task))); |
4572 | } | 4574 | } |
4573 | /* | 4575 | /* |
4574 | * save PMDs to context | 4576 | * save PMDs to context |
@@ -4608,7 +4610,7 @@ pfm_context_unload(pfm_context_t *ctx, void *arg, int count, struct pt_regs *reg | |||
4608 | ctx->ctx_fl_can_restart = 0; | 4610 | ctx->ctx_fl_can_restart = 0; |
4609 | ctx->ctx_fl_going_zombie = 0; | 4611 | ctx->ctx_fl_going_zombie = 0; |
4610 | 4612 | ||
4611 | DPRINT(("disconnected [%d] from context\n", task->pid)); | 4613 | DPRINT(("disconnected [%d] from context\n", task_pid_nr(task))); |
4612 | 4614 | ||
4613 | return 0; | 4615 | return 0; |
4614 | } | 4616 | } |
@@ -4631,7 +4633,7 @@ pfm_exit_thread(struct task_struct *task) | |||
4631 | 4633 | ||
4632 | PROTECT_CTX(ctx, flags); | 4634 | PROTECT_CTX(ctx, flags); |
4633 | 4635 | ||
4634 | DPRINT(("state=%d task [%d]\n", ctx->ctx_state, task->pid)); | 4636 | DPRINT(("state=%d task [%d]\n", ctx->ctx_state, task_pid_nr(task))); |
4635 | 4637 | ||
4636 | state = ctx->ctx_state; | 4638 | state = ctx->ctx_state; |
4637 | switch(state) { | 4639 | switch(state) { |
@@ -4640,13 +4642,13 @@ pfm_exit_thread(struct task_struct *task) | |||
4640 | * only comes to this function if pfm_context is not NULL, i.e., cannot | 4642 | * only comes to this function if pfm_context is not NULL, i.e., cannot |
4641 | * be in unloaded state | 4643 | * be in unloaded state |
4642 | */ | 4644 | */ |
4643 | printk(KERN_ERR "perfmon: pfm_exit_thread [%d] ctx unloaded\n", task->pid); | 4645 | printk(KERN_ERR "perfmon: pfm_exit_thread [%d] ctx unloaded\n", task_pid_nr(task)); |
4644 | break; | 4646 | break; |
4645 | case PFM_CTX_LOADED: | 4647 | case PFM_CTX_LOADED: |
4646 | case PFM_CTX_MASKED: | 4648 | case PFM_CTX_MASKED: |
4647 | ret = pfm_context_unload(ctx, NULL, 0, regs); | 4649 | ret = pfm_context_unload(ctx, NULL, 0, regs); |
4648 | if (ret) { | 4650 | if (ret) { |
4649 | printk(KERN_ERR "perfmon: pfm_exit_thread [%d] state=%d unload failed %d\n", task->pid, state, ret); | 4651 | printk(KERN_ERR "perfmon: pfm_exit_thread [%d] state=%d unload failed %d\n", task_pid_nr(task), state, ret); |
4650 | } | 4652 | } |
4651 | DPRINT(("ctx unloaded for current state was %d\n", state)); | 4653 | DPRINT(("ctx unloaded for current state was %d\n", state)); |
4652 | 4654 | ||
@@ -4655,12 +4657,12 @@ pfm_exit_thread(struct task_struct *task) | |||
4655 | case PFM_CTX_ZOMBIE: | 4657 | case PFM_CTX_ZOMBIE: |
4656 | ret = pfm_context_unload(ctx, NULL, 0, regs); | 4658 | ret = pfm_context_unload(ctx, NULL, 0, regs); |
4657 | if (ret) { | 4659 | if (ret) { |
4658 | printk(KERN_ERR "perfmon: pfm_exit_thread [%d] state=%d unload failed %d\n", task->pid, state, ret); | 4660 | printk(KERN_ERR "perfmon: pfm_exit_thread [%d] state=%d unload failed %d\n", task_pid_nr(task), state, ret); |
4659 | } | 4661 | } |
4660 | free_ok = 1; | 4662 | free_ok = 1; |
4661 | break; | 4663 | break; |
4662 | default: | 4664 | default: |
4663 | printk(KERN_ERR "perfmon: pfm_exit_thread [%d] unexpected state=%d\n", task->pid, state); | 4665 | printk(KERN_ERR "perfmon: pfm_exit_thread [%d] unexpected state=%d\n", task_pid_nr(task), state); |
4664 | break; | 4666 | break; |
4665 | } | 4667 | } |
4666 | UNPROTECT_CTX(ctx, flags); | 4668 | UNPROTECT_CTX(ctx, flags); |
@@ -4744,7 +4746,7 @@ recheck: | |||
4744 | DPRINT(("context %d state=%d [%d] task_state=%ld must_stop=%d\n", | 4746 | DPRINT(("context %d state=%d [%d] task_state=%ld must_stop=%d\n", |
4745 | ctx->ctx_fd, | 4747 | ctx->ctx_fd, |
4746 | state, | 4748 | state, |
4747 | task->pid, | 4749 | task_pid_nr(task), |
4748 | task->state, PFM_CMD_STOPPED(cmd))); | 4750 | task->state, PFM_CMD_STOPPED(cmd))); |
4749 | 4751 | ||
4750 | /* | 4752 | /* |
@@ -4791,7 +4793,7 @@ recheck: | |||
4791 | */ | 4793 | */ |
4792 | if (PFM_CMD_STOPPED(cmd)) { | 4794 | if (PFM_CMD_STOPPED(cmd)) { |
4793 | if ((task->state != TASK_STOPPED) && (task->state != TASK_TRACED)) { | 4795 | if ((task->state != TASK_STOPPED) && (task->state != TASK_TRACED)) { |
4794 | DPRINT(("[%d] task not in stopped state\n", task->pid)); | 4796 | DPRINT(("[%d] task not in stopped state\n", task_pid_nr(task))); |
4795 | return -EBUSY; | 4797 | return -EBUSY; |
4796 | } | 4798 | } |
4797 | /* | 4799 | /* |
@@ -4884,7 +4886,7 @@ restart_args: | |||
4884 | * limit abuse to min page size | 4886 | * limit abuse to min page size |
4885 | */ | 4887 | */ |
4886 | if (unlikely(sz > PFM_MAX_ARGSIZE)) { | 4888 | if (unlikely(sz > PFM_MAX_ARGSIZE)) { |
4887 | printk(KERN_ERR "perfmon: [%d] argument too big %lu\n", current->pid, sz); | 4889 | printk(KERN_ERR "perfmon: [%d] argument too big %lu\n", task_pid_nr(current), sz); |
4888 | return -E2BIG; | 4890 | return -E2BIG; |
4889 | } | 4891 | } |
4890 | 4892 | ||
@@ -5031,11 +5033,11 @@ pfm_context_force_terminate(pfm_context_t *ctx, struct pt_regs *regs) | |||
5031 | { | 5033 | { |
5032 | int ret; | 5034 | int ret; |
5033 | 5035 | ||
5034 | DPRINT(("entering for [%d]\n", current->pid)); | 5036 | DPRINT(("entering for [%d]\n", task_pid_nr(current))); |
5035 | 5037 | ||
5036 | ret = pfm_context_unload(ctx, NULL, 0, regs); | 5038 | ret = pfm_context_unload(ctx, NULL, 0, regs); |
5037 | if (ret) { | 5039 | if (ret) { |
5038 | printk(KERN_ERR "pfm_context_force_terminate: [%d] unloaded failed with %d\n", current->pid, ret); | 5040 | printk(KERN_ERR "pfm_context_force_terminate: [%d] unloaded failed with %d\n", task_pid_nr(current), ret); |
5039 | } | 5041 | } |
5040 | 5042 | ||
5041 | /* | 5043 | /* |
@@ -5072,7 +5074,7 @@ pfm_handle_work(void) | |||
5072 | 5074 | ||
5073 | ctx = PFM_GET_CTX(current); | 5075 | ctx = PFM_GET_CTX(current); |
5074 | if (ctx == NULL) { | 5076 | if (ctx == NULL) { |
5075 | printk(KERN_ERR "perfmon: [%d] has no PFM context\n", current->pid); | 5077 | printk(KERN_ERR "perfmon: [%d] has no PFM context\n", task_pid_nr(current)); |
5076 | return; | 5078 | return; |
5077 | } | 5079 | } |
5078 | 5080 | ||
@@ -5269,7 +5271,7 @@ pfm_overflow_handler(struct task_struct *task, pfm_context_t *ctx, u64 pmc0, str | |||
5269 | DPRINT_ovfl(("pmc0=0x%lx pid=%d iip=0x%lx, %s " | 5271 | DPRINT_ovfl(("pmc0=0x%lx pid=%d iip=0x%lx, %s " |
5270 | "used_pmds=0x%lx\n", | 5272 | "used_pmds=0x%lx\n", |
5271 | pmc0, | 5273 | pmc0, |
5272 | task ? task->pid: -1, | 5274 | task ? task_pid_nr(task): -1, |
5273 | (regs ? regs->cr_iip : 0), | 5275 | (regs ? regs->cr_iip : 0), |
5274 | CTX_OVFL_NOBLOCK(ctx) ? "nonblocking" : "blocking", | 5276 | CTX_OVFL_NOBLOCK(ctx) ? "nonblocking" : "blocking", |
5275 | ctx->ctx_used_pmds[0])); | 5277 | ctx->ctx_used_pmds[0])); |
@@ -5458,7 +5460,7 @@ pfm_overflow_handler(struct task_struct *task, pfm_context_t *ctx, u64 pmc0, str | |||
5458 | } | 5460 | } |
5459 | 5461 | ||
5460 | DPRINT_ovfl(("owner [%d] pending=%ld reason=%u ovfl_pmds=0x%lx ovfl_notify=0x%lx masked=%d\n", | 5462 | DPRINT_ovfl(("owner [%d] pending=%ld reason=%u ovfl_pmds=0x%lx ovfl_notify=0x%lx masked=%d\n", |
5461 | GET_PMU_OWNER() ? GET_PMU_OWNER()->pid : -1, | 5463 | GET_PMU_OWNER() ? task_pid_nr(GET_PMU_OWNER()) : -1, |
5462 | PFM_GET_WORK_PENDING(task), | 5464 | PFM_GET_WORK_PENDING(task), |
5463 | ctx->ctx_fl_trap_reason, | 5465 | ctx->ctx_fl_trap_reason, |
5464 | ovfl_pmds, | 5466 | ovfl_pmds, |
@@ -5483,7 +5485,7 @@ pfm_overflow_handler(struct task_struct *task, pfm_context_t *ctx, u64 pmc0, str | |||
5483 | sanity_check: | 5485 | sanity_check: |
5484 | printk(KERN_ERR "perfmon: CPU%d overflow handler [%d] pmc0=0x%lx\n", | 5486 | printk(KERN_ERR "perfmon: CPU%d overflow handler [%d] pmc0=0x%lx\n", |
5485 | smp_processor_id(), | 5487 | smp_processor_id(), |
5486 | task ? task->pid : -1, | 5488 | task ? task_pid_nr(task) : -1, |
5487 | pmc0); | 5489 | pmc0); |
5488 | return; | 5490 | return; |
5489 | 5491 | ||
@@ -5516,7 +5518,7 @@ stop_monitoring: | |||
5516 | * | 5518 | * |
5517 | * Overall pretty hairy stuff.... | 5519 | * Overall pretty hairy stuff.... |
5518 | */ | 5520 | */ |
5519 | DPRINT(("ctx is zombie for [%d], converted to spurious\n", task ? task->pid: -1)); | 5521 | DPRINT(("ctx is zombie for [%d], converted to spurious\n", task ? task_pid_nr(task): -1)); |
5520 | pfm_clear_psr_up(); | 5522 | pfm_clear_psr_up(); |
5521 | ia64_psr(regs)->up = 0; | 5523 | ia64_psr(regs)->up = 0; |
5522 | ia64_psr(regs)->sp = 1; | 5524 | ia64_psr(regs)->sp = 1; |
@@ -5577,13 +5579,13 @@ pfm_do_interrupt_handler(int irq, void *arg, struct pt_regs *regs) | |||
5577 | 5579 | ||
5578 | report_spurious1: | 5580 | report_spurious1: |
5579 | printk(KERN_INFO "perfmon: spurious overflow interrupt on CPU%d: process %d has no PFM context\n", | 5581 | printk(KERN_INFO "perfmon: spurious overflow interrupt on CPU%d: process %d has no PFM context\n", |
5580 | this_cpu, task->pid); | 5582 | this_cpu, task_pid_nr(task)); |
5581 | pfm_unfreeze_pmu(); | 5583 | pfm_unfreeze_pmu(); |
5582 | return -1; | 5584 | return -1; |
5583 | report_spurious2: | 5585 | report_spurious2: |
5584 | printk(KERN_INFO "perfmon: spurious overflow interrupt on CPU%d: process %d, invalid flag\n", | 5586 | printk(KERN_INFO "perfmon: spurious overflow interrupt on CPU%d: process %d, invalid flag\n", |
5585 | this_cpu, | 5587 | this_cpu, |
5586 | task->pid); | 5588 | task_pid_nr(task)); |
5587 | pfm_unfreeze_pmu(); | 5589 | pfm_unfreeze_pmu(); |
5588 | return -1; | 5590 | return -1; |
5589 | } | 5591 | } |
@@ -5870,7 +5872,8 @@ pfm_force_cleanup(pfm_context_t *ctx, struct pt_regs *regs) | |||
5870 | ia64_psr(regs)->sp = 1; | 5872 | ia64_psr(regs)->sp = 1; |
5871 | 5873 | ||
5872 | if (GET_PMU_OWNER() == task) { | 5874 | if (GET_PMU_OWNER() == task) { |
5873 | DPRINT(("cleared ownership for [%d]\n", ctx->ctx_task->pid)); | 5875 | DPRINT(("cleared ownership for [%d]\n", |
5876 | task_pid_nr(ctx->ctx_task))); | ||
5874 | SET_PMU_OWNER(NULL, NULL); | 5877 | SET_PMU_OWNER(NULL, NULL); |
5875 | } | 5878 | } |
5876 | 5879 | ||
@@ -5882,7 +5885,7 @@ pfm_force_cleanup(pfm_context_t *ctx, struct pt_regs *regs) | |||
5882 | task->thread.pfm_context = NULL; | 5885 | task->thread.pfm_context = NULL; |
5883 | task->thread.flags &= ~IA64_THREAD_PM_VALID; | 5886 | task->thread.flags &= ~IA64_THREAD_PM_VALID; |
5884 | 5887 | ||
5885 | DPRINT(("force cleanup for [%d]\n", task->pid)); | 5888 | DPRINT(("force cleanup for [%d]\n", task_pid_nr(task))); |
5886 | } | 5889 | } |
5887 | 5890 | ||
5888 | 5891 | ||
@@ -6426,7 +6429,7 @@ pfm_flush_pmds(struct task_struct *task, pfm_context_t *ctx) | |||
6426 | 6429 | ||
6427 | if (PMD_IS_COUNTING(i)) { | 6430 | if (PMD_IS_COUNTING(i)) { |
6428 | DPRINT(("[%d] pmd[%d] ctx_pmd=0x%lx hw_pmd=0x%lx\n", | 6431 | DPRINT(("[%d] pmd[%d] ctx_pmd=0x%lx hw_pmd=0x%lx\n", |
6429 | task->pid, | 6432 | task_pid_nr(task), |
6430 | i, | 6433 | i, |
6431 | ctx->ctx_pmds[i].val, | 6434 | ctx->ctx_pmds[i].val, |
6432 | val & ovfl_val)); | 6435 | val & ovfl_val)); |
@@ -6448,11 +6451,11 @@ pfm_flush_pmds(struct task_struct *task, pfm_context_t *ctx) | |||
6448 | */ | 6451 | */ |
6449 | if (pmc0 & (1UL << i)) { | 6452 | if (pmc0 & (1UL << i)) { |
6450 | val += 1 + ovfl_val; | 6453 | val += 1 + ovfl_val; |
6451 | DPRINT(("[%d] pmd[%d] overflowed\n", task->pid, i)); | 6454 | DPRINT(("[%d] pmd[%d] overflowed\n", task_pid_nr(task), i)); |
6452 | } | 6455 | } |
6453 | } | 6456 | } |
6454 | 6457 | ||
6455 | DPRINT(("[%d] ctx_pmd[%d]=0x%lx pmd_val=0x%lx\n", task->pid, i, val, pmd_val)); | 6458 | DPRINT(("[%d] ctx_pmd[%d]=0x%lx pmd_val=0x%lx\n", task_pid_nr(task), i, val, pmd_val)); |
6456 | 6459 | ||
6457 | if (is_self) ctx->th_pmds[i] = pmd_val; | 6460 | if (is_self) ctx->th_pmds[i] = pmd_val; |
6458 | 6461 | ||
@@ -6793,14 +6796,14 @@ dump_pmu_state(const char *from) | |||
6793 | printk("CPU%d from %s() current [%d] iip=0x%lx %s\n", | 6796 | printk("CPU%d from %s() current [%d] iip=0x%lx %s\n", |
6794 | this_cpu, | 6797 | this_cpu, |
6795 | from, | 6798 | from, |
6796 | current->pid, | 6799 | task_pid_nr(current), |
6797 | regs->cr_iip, | 6800 | regs->cr_iip, |
6798 | current->comm); | 6801 | current->comm); |
6799 | 6802 | ||
6800 | task = GET_PMU_OWNER(); | 6803 | task = GET_PMU_OWNER(); |
6801 | ctx = GET_PMU_CTX(); | 6804 | ctx = GET_PMU_CTX(); |
6802 | 6805 | ||
6803 | printk("->CPU%d owner [%d] ctx=%p\n", this_cpu, task ? task->pid : -1, ctx); | 6806 | printk("->CPU%d owner [%d] ctx=%p\n", this_cpu, task ? task_pid_nr(task) : -1, ctx); |
6804 | 6807 | ||
6805 | psr = pfm_get_psr(); | 6808 | psr = pfm_get_psr(); |
6806 | 6809 | ||
@@ -6848,7 +6851,7 @@ pfm_inherit(struct task_struct *task, struct pt_regs *regs) | |||
6848 | { | 6851 | { |
6849 | struct thread_struct *thread; | 6852 | struct thread_struct *thread; |
6850 | 6853 | ||
6851 | DPRINT(("perfmon: pfm_inherit clearing state for [%d]\n", task->pid)); | 6854 | DPRINT(("perfmon: pfm_inherit clearing state for [%d]\n", task_pid_nr(task))); |
6852 | 6855 | ||
6853 | thread = &task->thread; | 6856 | thread = &task->thread; |
6854 | 6857 | ||
diff --git a/arch/ia64/kernel/perfmon_default_smpl.c b/arch/ia64/kernel/perfmon_default_smpl.c index ff80eab83b38..a7af1cb419f9 100644 --- a/arch/ia64/kernel/perfmon_default_smpl.c +++ b/arch/ia64/kernel/perfmon_default_smpl.c | |||
@@ -44,11 +44,11 @@ default_validate(struct task_struct *task, unsigned int flags, int cpu, void *da | |||
44 | int ret = 0; | 44 | int ret = 0; |
45 | 45 | ||
46 | if (data == NULL) { | 46 | if (data == NULL) { |
47 | DPRINT(("[%d] no argument passed\n", task->pid)); | 47 | DPRINT(("[%d] no argument passed\n", task_pid_nr(task))); |
48 | return -EINVAL; | 48 | return -EINVAL; |
49 | } | 49 | } |
50 | 50 | ||
51 | DPRINT(("[%d] validate flags=0x%x CPU%d\n", task->pid, flags, cpu)); | 51 | DPRINT(("[%d] validate flags=0x%x CPU%d\n", task_pid_nr(task), flags, cpu)); |
52 | 52 | ||
53 | /* | 53 | /* |
54 | * must hold at least the buffer header + one minimally sized entry | 54 | * must hold at least the buffer header + one minimally sized entry |
@@ -88,7 +88,7 @@ default_init(struct task_struct *task, void *buf, unsigned int flags, int cpu, v | |||
88 | hdr->hdr_count = 0UL; | 88 | hdr->hdr_count = 0UL; |
89 | 89 | ||
90 | DPRINT(("[%d] buffer=%p buf_size=%lu hdr_size=%lu hdr_version=%u cur_offs=%lu\n", | 90 | DPRINT(("[%d] buffer=%p buf_size=%lu hdr_size=%lu hdr_version=%u cur_offs=%lu\n", |
91 | task->pid, | 91 | task_pid_nr(task), |
92 | buf, | 92 | buf, |
93 | hdr->hdr_buf_size, | 93 | hdr->hdr_buf_size, |
94 | sizeof(*hdr), | 94 | sizeof(*hdr), |
@@ -245,7 +245,7 @@ default_restart(struct task_struct *task, pfm_ovfl_ctrl_t *ctrl, void *buf, stru | |||
245 | static int | 245 | static int |
246 | default_exit(struct task_struct *task, void *buf, struct pt_regs *regs) | 246 | default_exit(struct task_struct *task, void *buf, struct pt_regs *regs) |
247 | { | 247 | { |
248 | DPRINT(("[%d] exit(%p)\n", task->pid, buf)); | 248 | DPRINT(("[%d] exit(%p)\n", task_pid_nr(task), buf)); |
249 | return 0; | 249 | return 0; |
250 | } | 250 | } |
251 | 251 | ||
diff --git a/arch/ia64/kernel/process.c b/arch/ia64/kernel/process.c index c613fc0e91cc..2418289ee5ca 100644 --- a/arch/ia64/kernel/process.c +++ b/arch/ia64/kernel/process.c | |||
@@ -105,7 +105,8 @@ show_regs (struct pt_regs *regs) | |||
105 | unsigned long ip = regs->cr_iip + ia64_psr(regs)->ri; | 105 | unsigned long ip = regs->cr_iip + ia64_psr(regs)->ri; |
106 | 106 | ||
107 | print_modules(); | 107 | print_modules(); |
108 | printk("\nPid: %d, CPU %d, comm: %20s\n", current->pid, smp_processor_id(), current->comm); | 108 | printk("\nPid: %d, CPU %d, comm: %20s\n", task_pid_nr(current), |
109 | smp_processor_id(), current->comm); | ||
109 | printk("psr : %016lx ifs : %016lx ip : [<%016lx>] %s\n", | 110 | printk("psr : %016lx ifs : %016lx ip : [<%016lx>] %s\n", |
110 | regs->cr_ipsr, regs->cr_ifs, ip, print_tainted()); | 111 | regs->cr_ipsr, regs->cr_ifs, ip, print_tainted()); |
111 | print_symbol("ip is at %s\n", ip); | 112 | print_symbol("ip is at %s\n", ip); |
diff --git a/arch/ia64/kernel/setup.c b/arch/ia64/kernel/setup.c index c5cfcfa4c87c..cbf67f1aa291 100644 --- a/arch/ia64/kernel/setup.c +++ b/arch/ia64/kernel/setup.c | |||
@@ -208,6 +208,48 @@ static int __init register_memory(void) | |||
208 | 208 | ||
209 | __initcall(register_memory); | 209 | __initcall(register_memory); |
210 | 210 | ||
211 | |||
212 | #ifdef CONFIG_KEXEC | ||
213 | static void __init setup_crashkernel(unsigned long total, int *n) | ||
214 | { | ||
215 | unsigned long long base = 0, size = 0; | ||
216 | int ret; | ||
217 | |||
218 | ret = parse_crashkernel(boot_command_line, total, | ||
219 | &size, &base); | ||
220 | if (ret == 0 && size > 0) { | ||
221 | if (!base) { | ||
222 | sort_regions(rsvd_region, *n); | ||
223 | base = kdump_find_rsvd_region(size, | ||
224 | rsvd_region, *n); | ||
225 | } | ||
226 | if (base != ~0UL) { | ||
227 | printk(KERN_INFO "Reserving %ldMB of memory at %ldMB " | ||
228 | "for crashkernel (System RAM: %ldMB)\n", | ||
229 | (unsigned long)(size >> 20), | ||
230 | (unsigned long)(base >> 20), | ||
231 | (unsigned long)(total >> 20)); | ||
232 | rsvd_region[*n].start = | ||
233 | (unsigned long)__va(base); | ||
234 | rsvd_region[*n].end = | ||
235 | (unsigned long)__va(base + size); | ||
236 | (*n)++; | ||
237 | crashk_res.start = base; | ||
238 | crashk_res.end = base + size - 1; | ||
239 | } | ||
240 | } | ||
241 | efi_memmap_res.start = ia64_boot_param->efi_memmap; | ||
242 | efi_memmap_res.end = efi_memmap_res.start + | ||
243 | ia64_boot_param->efi_memmap_size; | ||
244 | boot_param_res.start = __pa(ia64_boot_param); | ||
245 | boot_param_res.end = boot_param_res.start + | ||
246 | sizeof(*ia64_boot_param); | ||
247 | } | ||
248 | #else | ||
249 | static inline void __init setup_crashkernel(unsigned long total, int *n) | ||
250 | {} | ||
251 | #endif | ||
252 | |||
211 | /** | 253 | /** |
212 | * reserve_memory - setup reserved memory areas | 254 | * reserve_memory - setup reserved memory areas |
213 | * | 255 | * |
@@ -219,6 +261,7 @@ void __init | |||
219 | reserve_memory (void) | 261 | reserve_memory (void) |
220 | { | 262 | { |
221 | int n = 0; | 263 | int n = 0; |
264 | unsigned long total_memory; | ||
222 | 265 | ||
223 | /* | 266 | /* |
224 | * none of the entries in this table overlap | 267 | * none of the entries in this table overlap |
@@ -254,50 +297,11 @@ reserve_memory (void) | |||
254 | n++; | 297 | n++; |
255 | #endif | 298 | #endif |
256 | 299 | ||
257 | efi_memmap_init(&rsvd_region[n].start, &rsvd_region[n].end); | 300 | total_memory = efi_memmap_init(&rsvd_region[n].start, &rsvd_region[n].end); |
258 | n++; | 301 | n++; |
259 | 302 | ||
260 | #ifdef CONFIG_KEXEC | 303 | setup_crashkernel(total_memory, &n); |
261 | /* crashkernel=size@offset specifies the size to reserve for a crash | 304 | |
262 | * kernel. If offset is 0, then it is determined automatically. | ||
263 | * By reserving this memory we guarantee that linux never set's it | ||
264 | * up as a DMA target.Useful for holding code to do something | ||
265 | * appropriate after a kernel panic. | ||
266 | */ | ||
267 | { | ||
268 | char *from = strstr(boot_command_line, "crashkernel="); | ||
269 | unsigned long base, size; | ||
270 | if (from) { | ||
271 | size = memparse(from + 12, &from); | ||
272 | if (*from == '@') | ||
273 | base = memparse(from+1, &from); | ||
274 | else | ||
275 | base = 0; | ||
276 | if (size) { | ||
277 | if (!base) { | ||
278 | sort_regions(rsvd_region, n); | ||
279 | base = kdump_find_rsvd_region(size, | ||
280 | rsvd_region, n); | ||
281 | } | ||
282 | if (base != ~0UL) { | ||
283 | rsvd_region[n].start = | ||
284 | (unsigned long)__va(base); | ||
285 | rsvd_region[n].end = | ||
286 | (unsigned long)__va(base + size); | ||
287 | n++; | ||
288 | crashk_res.start = base; | ||
289 | crashk_res.end = base + size - 1; | ||
290 | } | ||
291 | } | ||
292 | } | ||
293 | efi_memmap_res.start = ia64_boot_param->efi_memmap; | ||
294 | efi_memmap_res.end = efi_memmap_res.start + | ||
295 | ia64_boot_param->efi_memmap_size; | ||
296 | boot_param_res.start = __pa(ia64_boot_param); | ||
297 | boot_param_res.end = boot_param_res.start + | ||
298 | sizeof(*ia64_boot_param); | ||
299 | } | ||
300 | #endif | ||
301 | /* end of memory marker */ | 305 | /* end of memory marker */ |
302 | rsvd_region[n].start = ~0UL; | 306 | rsvd_region[n].start = ~0UL; |
303 | rsvd_region[n].end = ~0UL; | 307 | rsvd_region[n].end = ~0UL; |
diff --git a/arch/ia64/kernel/signal.c b/arch/ia64/kernel/signal.c index aeec8184e862..cdb64cc4d9c8 100644 --- a/arch/ia64/kernel/signal.c +++ b/arch/ia64/kernel/signal.c | |||
@@ -227,7 +227,7 @@ ia64_rt_sigreturn (struct sigscratch *scr) | |||
227 | si.si_signo = SIGSEGV; | 227 | si.si_signo = SIGSEGV; |
228 | si.si_errno = 0; | 228 | si.si_errno = 0; |
229 | si.si_code = SI_KERNEL; | 229 | si.si_code = SI_KERNEL; |
230 | si.si_pid = current->pid; | 230 | si.si_pid = task_pid_vnr(current); |
231 | si.si_uid = current->uid; | 231 | si.si_uid = current->uid; |
232 | si.si_addr = sc; | 232 | si.si_addr = sc; |
233 | force_sig_info(SIGSEGV, &si, current); | 233 | force_sig_info(SIGSEGV, &si, current); |
@@ -332,7 +332,7 @@ force_sigsegv_info (int sig, void __user *addr) | |||
332 | si.si_signo = SIGSEGV; | 332 | si.si_signo = SIGSEGV; |
333 | si.si_errno = 0; | 333 | si.si_errno = 0; |
334 | si.si_code = SI_KERNEL; | 334 | si.si_code = SI_KERNEL; |
335 | si.si_pid = current->pid; | 335 | si.si_pid = task_pid_vnr(current); |
336 | si.si_uid = current->uid; | 336 | si.si_uid = current->uid; |
337 | si.si_addr = addr; | 337 | si.si_addr = addr; |
338 | force_sig_info(SIGSEGV, &si, current); | 338 | force_sig_info(SIGSEGV, &si, current); |
diff --git a/arch/ia64/kernel/time.c b/arch/ia64/kernel/time.c index 98cfc90cab1d..2bb84214e5f1 100644 --- a/arch/ia64/kernel/time.c +++ b/arch/ia64/kernel/time.c | |||
@@ -371,6 +371,11 @@ ia64_setup_printk_clock(void) | |||
371 | ia64_printk_clock = ia64_itc_printk_clock; | 371 | ia64_printk_clock = ia64_itc_printk_clock; |
372 | } | 372 | } |
373 | 373 | ||
374 | /* IA64 doesn't cache the timezone */ | ||
375 | void update_vsyscall_tz(void) | ||
376 | { | ||
377 | } | ||
378 | |||
374 | void update_vsyscall(struct timespec *wall, struct clocksource *c) | 379 | void update_vsyscall(struct timespec *wall, struct clocksource *c) |
375 | { | 380 | { |
376 | unsigned long flags; | 381 | unsigned long flags; |
diff --git a/arch/ia64/kernel/traps.c b/arch/ia64/kernel/traps.c index 3aeaf15e468b..78d65cb947d2 100644 --- a/arch/ia64/kernel/traps.c +++ b/arch/ia64/kernel/traps.c | |||
@@ -61,7 +61,7 @@ die (const char *str, struct pt_regs *regs, long err) | |||
61 | 61 | ||
62 | if (++die.lock_owner_depth < 3) { | 62 | if (++die.lock_owner_depth < 3) { |
63 | printk("%s[%d]: %s %ld [%d]\n", | 63 | printk("%s[%d]: %s %ld [%d]\n", |
64 | current->comm, current->pid, str, err, ++die_counter); | 64 | current->comm, task_pid_nr(current), str, err, ++die_counter); |
65 | (void) notify_die(DIE_OOPS, (char *)str, regs, err, 255, SIGSEGV); | 65 | (void) notify_die(DIE_OOPS, (char *)str, regs, err, 255, SIGSEGV); |
66 | show_regs(regs); | 66 | show_regs(regs); |
67 | } else | 67 | } else |
@@ -315,7 +315,7 @@ handle_fpu_swa (int fp_fault, struct pt_regs *regs, unsigned long isr) | |||
315 | last.time = current_jiffies + 5 * HZ; | 315 | last.time = current_jiffies + 5 * HZ; |
316 | printk(KERN_WARNING | 316 | printk(KERN_WARNING |
317 | "%s(%d): floating-point assist fault at ip %016lx, isr %016lx\n", | 317 | "%s(%d): floating-point assist fault at ip %016lx, isr %016lx\n", |
318 | current->comm, current->pid, regs->cr_iip + ia64_psr(regs)->ri, isr); | 318 | current->comm, task_pid_nr(current), regs->cr_iip + ia64_psr(regs)->ri, isr); |
319 | } | 319 | } |
320 | } | 320 | } |
321 | } | 321 | } |
@@ -453,7 +453,7 @@ ia64_fault (unsigned long vector, unsigned long isr, unsigned long ifa, | |||
453 | if (code == 8) { | 453 | if (code == 8) { |
454 | # ifdef CONFIG_IA64_PRINT_HAZARDS | 454 | # ifdef CONFIG_IA64_PRINT_HAZARDS |
455 | printk("%s[%d]: possible hazard @ ip=%016lx (pr = %016lx)\n", | 455 | printk("%s[%d]: possible hazard @ ip=%016lx (pr = %016lx)\n", |
456 | current->comm, current->pid, | 456 | current->comm, task_pid_nr(current), |
457 | regs.cr_iip + ia64_psr(®s)->ri, regs.pr); | 457 | regs.cr_iip + ia64_psr(®s)->ri, regs.pr); |
458 | # endif | 458 | # endif |
459 | return; | 459 | return; |
diff --git a/arch/ia64/kernel/unaligned.c b/arch/ia64/kernel/unaligned.c index fe6aa5a9f8fa..2173de9fe917 100644 --- a/arch/ia64/kernel/unaligned.c +++ b/arch/ia64/kernel/unaligned.c | |||
@@ -1340,7 +1340,8 @@ ia64_handle_unaligned (unsigned long ifa, struct pt_regs *regs) | |||
1340 | size_t len; | 1340 | size_t len; |
1341 | 1341 | ||
1342 | len = sprintf(buf, "%s(%d): unaligned access to 0x%016lx, " | 1342 | len = sprintf(buf, "%s(%d): unaligned access to 0x%016lx, " |
1343 | "ip=0x%016lx\n\r", current->comm, current->pid, | 1343 | "ip=0x%016lx\n\r", current->comm, |
1344 | task_pid_nr(current), | ||
1344 | ifa, regs->cr_iip + ipsr->ri); | 1345 | ifa, regs->cr_iip + ipsr->ri); |
1345 | /* | 1346 | /* |
1346 | * Don't call tty_write_message() if we're in the kernel; we might | 1347 | * Don't call tty_write_message() if we're in the kernel; we might |
@@ -1363,7 +1364,7 @@ ia64_handle_unaligned (unsigned long ifa, struct pt_regs *regs) | |||
1363 | "administrator\n" | 1364 | "administrator\n" |
1364 | "echo 0 > /proc/sys/kernel/ignore-" | 1365 | "echo 0 > /proc/sys/kernel/ignore-" |
1365 | "unaligned-usertrap to re-enable\n", | 1366 | "unaligned-usertrap to re-enable\n", |
1366 | current->comm, current->pid); | 1367 | current->comm, task_pid_nr(current)); |
1367 | } | 1368 | } |
1368 | } | 1369 | } |
1369 | } else { | 1370 | } else { |
diff --git a/arch/ia64/mm/fault.c b/arch/ia64/mm/fault.c index 32f26253c4e8..7571076a16a1 100644 --- a/arch/ia64/mm/fault.c +++ b/arch/ia64/mm/fault.c | |||
@@ -274,7 +274,7 @@ ia64_do_page_fault (unsigned long address, unsigned long isr, struct pt_regs *re | |||
274 | 274 | ||
275 | out_of_memory: | 275 | out_of_memory: |
276 | up_read(&mm->mmap_sem); | 276 | up_read(&mm->mmap_sem); |
277 | if (is_init(current)) { | 277 | if (is_global_init(current)) { |
278 | yield(); | 278 | yield(); |
279 | down_read(&mm->mmap_sem); | 279 | down_read(&mm->mmap_sem); |
280 | goto survive; | 280 | goto survive; |
diff --git a/arch/ia64/mm/init.c b/arch/ia64/mm/init.c index 3e10152abbf0..c6c19bf11bec 100644 --- a/arch/ia64/mm/init.c +++ b/arch/ia64/mm/init.c | |||
@@ -127,8 +127,8 @@ ia64_init_addr_space (void) | |||
127 | vma->vm_mm = current->mm; | 127 | vma->vm_mm = current->mm; |
128 | vma->vm_start = current->thread.rbs_bot & PAGE_MASK; | 128 | vma->vm_start = current->thread.rbs_bot & PAGE_MASK; |
129 | vma->vm_end = vma->vm_start + PAGE_SIZE; | 129 | vma->vm_end = vma->vm_start + PAGE_SIZE; |
130 | vma->vm_page_prot = protection_map[VM_DATA_DEFAULT_FLAGS & 0x7]; | ||
131 | vma->vm_flags = VM_DATA_DEFAULT_FLAGS|VM_GROWSUP|VM_ACCOUNT; | 130 | vma->vm_flags = VM_DATA_DEFAULT_FLAGS|VM_GROWSUP|VM_ACCOUNT; |
131 | vma->vm_page_prot = vm_get_page_prot(vma->vm_flags); | ||
132 | down_write(¤t->mm->mmap_sem); | 132 | down_write(¤t->mm->mmap_sem); |
133 | if (insert_vm_struct(current->mm, vma)) { | 133 | if (insert_vm_struct(current->mm, vma)) { |
134 | up_write(¤t->mm->mmap_sem); | 134 | up_write(¤t->mm->mmap_sem); |
diff --git a/arch/ia64/oprofile/Kconfig b/arch/ia64/oprofile/Kconfig deleted file mode 100644 index 97271ab484dc..000000000000 --- a/arch/ia64/oprofile/Kconfig +++ /dev/null | |||
@@ -1,20 +0,0 @@ | |||
1 | config PROFILING | ||
2 | bool "Profiling support (EXPERIMENTAL)" | ||
3 | help | ||
4 | Say Y here to enable the extended profiling support mechanisms used | ||
5 | by profilers such as OProfile. | ||
6 | |||
7 | config OPROFILE | ||
8 | tristate "OProfile system profiling (EXPERIMENTAL)" | ||
9 | depends on PROFILING | ||
10 | help | ||
11 | OProfile is a profiling system capable of profiling the | ||
12 | whole system, include the kernel, kernel modules, libraries, | ||
13 | and applications. | ||
14 | |||
15 | Due to firmware bugs, you may need to use the "nohalt" boot | ||
16 | option if you're using OProfile with the hardware performance | ||
17 | counters. | ||
18 | |||
19 | If unsure, say N. | ||
20 | |||
diff --git a/arch/ia64/sn/kernel/xpnet.c b/arch/ia64/sn/kernel/xpnet.c index e58fcadff2e9..a5df672d8392 100644 --- a/arch/ia64/sn/kernel/xpnet.c +++ b/arch/ia64/sn/kernel/xpnet.c | |||
@@ -269,8 +269,9 @@ xpnet_receive(partid_t partid, int channel, struct xpnet_message *msg) | |||
269 | skb->protocol = eth_type_trans(skb, xpnet_device); | 269 | skb->protocol = eth_type_trans(skb, xpnet_device); |
270 | skb->ip_summed = CHECKSUM_UNNECESSARY; | 270 | skb->ip_summed = CHECKSUM_UNNECESSARY; |
271 | 271 | ||
272 | dev_dbg(xpnet, "passing skb to network layer; \n\tskb->head=0x%p " | 272 | dev_dbg(xpnet, "passing skb to network layer\n" |
273 | "skb->data=0x%p skb->tail=0x%p skb->end=0x%p skb->len=%d\n", | 273 | KERN_DEBUG "\tskb->head=0x%p skb->data=0x%p skb->tail=0x%p " |
274 | "skb->end=0x%p skb->len=%d\n", | ||
274 | (void *)skb->head, (void *)skb->data, skb_tail_pointer(skb), | 275 | (void *)skb->head, (void *)skb->data, skb_tail_pointer(skb), |
275 | skb_end_pointer(skb), skb->len); | 276 | skb_end_pointer(skb), skb->len); |
276 | 277 | ||
@@ -576,10 +577,10 @@ xpnet_dev_hard_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
576 | msg->tailout_ignore = end_addr - (u64)skb_tail_pointer(skb); | 577 | msg->tailout_ignore = end_addr - (u64)skb_tail_pointer(skb); |
577 | msg->buf_pa = __pa(start_addr); | 578 | msg->buf_pa = __pa(start_addr); |
578 | 579 | ||
579 | dev_dbg(xpnet, "sending XPC message to %d:%d\nmsg->buf_pa=" | 580 | dev_dbg(xpnet, "sending XPC message to %d:%d\n" |
580 | "0x%lx, msg->size=%u, msg->leadin_ignore=%u, " | 581 | KERN_DEBUG "msg->buf_pa=0x%lx, msg->size=%u, " |
581 | "msg->tailout_ignore=%u\n", dest_partid, | 582 | "msg->leadin_ignore=%u, msg->tailout_ignore=%u\n", |
582 | XPC_NET_CHANNEL, msg->buf_pa, msg->size, | 583 | dest_partid, XPC_NET_CHANNEL, msg->buf_pa, msg->size, |
583 | msg->leadin_ignore, msg->tailout_ignore); | 584 | msg->leadin_ignore, msg->tailout_ignore); |
584 | 585 | ||
585 | 586 | ||
diff --git a/arch/m32r/Kconfig b/arch/m32r/Kconfig index bd5fe76401f1..ab9a264cb194 100644 --- a/arch/m32r/Kconfig +++ b/arch/m32r/Kconfig | |||
@@ -426,7 +426,7 @@ source "drivers/Kconfig" | |||
426 | 426 | ||
427 | source "fs/Kconfig" | 427 | source "fs/Kconfig" |
428 | 428 | ||
429 | source "arch/m32r/oprofile/Kconfig" | 429 | source "kernel/Kconfig.instrumentation" |
430 | 430 | ||
431 | source "arch/m32r/Kconfig.debug" | 431 | source "arch/m32r/Kconfig.debug" |
432 | 432 | ||
diff --git a/arch/m32r/kernel/irq.c b/arch/m32r/kernel/irq.c index f8d8650383e0..d0c5b0b7da2f 100644 --- a/arch/m32r/kernel/irq.c +++ b/arch/m32r/kernel/irq.c | |||
@@ -71,7 +71,7 @@ skip: | |||
71 | } | 71 | } |
72 | 72 | ||
73 | /* | 73 | /* |
74 | * do_IRQ handles all normal device IRQ's (the special | 74 | * do_IRQ handles all normal device IRQs (the special |
75 | * SMP cross-CPU interrupts have their own specific | 75 | * SMP cross-CPU interrupts have their own specific |
76 | * handlers). | 76 | * handlers). |
77 | */ | 77 | */ |
diff --git a/arch/m32r/kernel/signal.c b/arch/m32r/kernel/signal.c index 916faf6070af..a753d79c4e89 100644 --- a/arch/m32r/kernel/signal.c +++ b/arch/m32r/kernel/signal.c | |||
@@ -358,7 +358,7 @@ int do_signal(struct pt_regs *regs, sigset_t *oldset) | |||
358 | 358 | ||
359 | signr = get_signal_to_deliver(&info, &ka, regs, NULL); | 359 | signr = get_signal_to_deliver(&info, &ka, regs, NULL); |
360 | if (signr > 0) { | 360 | if (signr > 0) { |
361 | /* Reenable any watchpoints before delivering the | 361 | /* Re-enable any watchpoints before delivering the |
362 | * signal to user space. The processor register will | 362 | * signal to user space. The processor register will |
363 | * have been cleared if the watchpoint triggered | 363 | * have been cleared if the watchpoint triggered |
364 | * inside the kernel. | 364 | * inside the kernel. |
diff --git a/arch/m32r/kernel/smp.c b/arch/m32r/kernel/smp.c index 360129174b2b..c837bc13b015 100644 --- a/arch/m32r/kernel/smp.c +++ b/arch/m32r/kernel/smp.c | |||
@@ -202,7 +202,7 @@ void smp_flush_cache_all_interrupt(void) | |||
202 | } | 202 | } |
203 | 203 | ||
204 | /*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*/ | 204 | /*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*/ |
205 | /* TLB flush request Routins */ | 205 | /* TLB flush request Routines */ |
206 | /*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*/ | 206 | /*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*/ |
207 | 207 | ||
208 | /*==========================================================================* | 208 | /*==========================================================================* |
@@ -378,7 +378,7 @@ void smp_flush_tlb_page(struct vm_area_struct *vma, unsigned long va) | |||
378 | * Name: flush_tlb_others | 378 | * Name: flush_tlb_others |
379 | * | 379 | * |
380 | * Description: This routine requests other CPU to execute flush TLB. | 380 | * Description: This routine requests other CPU to execute flush TLB. |
381 | * 1.Setup parmeters. | 381 | * 1.Setup parameters. |
382 | * 2.Send 'INVALIDATE_TLB_IPI' to other CPU. | 382 | * 2.Send 'INVALIDATE_TLB_IPI' to other CPU. |
383 | * Request other CPU to execute 'smp_invalidate_interrupt()'. | 383 | * Request other CPU to execute 'smp_invalidate_interrupt()'. |
384 | * 3.Wait for other CPUs operation finished. | 384 | * 3.Wait for other CPUs operation finished. |
@@ -502,7 +502,7 @@ void smp_invalidate_interrupt(void) | |||
502 | } | 502 | } |
503 | 503 | ||
504 | /*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*/ | 504 | /*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*/ |
505 | /* Stop CPU request Routins */ | 505 | /* Stop CPU request Routines */ |
506 | /*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*/ | 506 | /*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*/ |
507 | 507 | ||
508 | /*==========================================================================* | 508 | /*==========================================================================* |
@@ -566,7 +566,7 @@ static void stop_this_cpu(void *dummy) | |||
566 | } | 566 | } |
567 | 567 | ||
568 | /*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*/ | 568 | /*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*/ |
569 | /* Call function Routins */ | 569 | /* Call function Routines */ |
570 | /*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*/ | 570 | /*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*/ |
571 | 571 | ||
572 | /*==========================================================================* | 572 | /*==========================================================================* |
@@ -690,7 +690,7 @@ void smp_call_function_interrupt(void) | |||
690 | } | 690 | } |
691 | 691 | ||
692 | /*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*/ | 692 | /*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*/ |
693 | /* Timer Routins */ | 693 | /* Timer Routines */ |
694 | /*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*/ | 694 | /*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*/ |
695 | 695 | ||
696 | /*==========================================================================* | 696 | /*==========================================================================* |
@@ -802,7 +802,7 @@ void smp_local_timer_interrupt(void) | |||
802 | } | 802 | } |
803 | 803 | ||
804 | /*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*/ | 804 | /*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*/ |
805 | /* Send IPI Routins */ | 805 | /* Send IPI Routines */ |
806 | /*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*/ | 806 | /*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*/ |
807 | 807 | ||
808 | /*==========================================================================* | 808 | /*==========================================================================* |
@@ -814,7 +814,7 @@ void smp_local_timer_interrupt(void) | |||
814 | * | 814 | * |
815 | * Arguments: ipi_num - Number of IPI | 815 | * Arguments: ipi_num - Number of IPI |
816 | * try - 0 : Send IPI certainly. | 816 | * try - 0 : Send IPI certainly. |
817 | * !0 : The following IPI is not sended when Target CPU | 817 | * !0 : The following IPI is not sent when Target CPU |
818 | * has not received the before IPI. | 818 | * has not received the before IPI. |
819 | * | 819 | * |
820 | * Returns: void (cannot fail) | 820 | * Returns: void (cannot fail) |
@@ -844,7 +844,7 @@ void send_IPI_allbutself(int ipi_num, int try) | |||
844 | * Arguments: cpu_mask - Bitmap of target CPUs logical ID | 844 | * Arguments: cpu_mask - Bitmap of target CPUs logical ID |
845 | * ipi_num - Number of IPI | 845 | * ipi_num - Number of IPI |
846 | * try - 0 : Send IPI certainly. | 846 | * try - 0 : Send IPI certainly. |
847 | * !0 : The following IPI is not sended when Target CPU | 847 | * !0 : The following IPI is not sent when Target CPU |
848 | * has not received the before IPI. | 848 | * has not received the before IPI. |
849 | * | 849 | * |
850 | * Returns: void (cannot fail) | 850 | * Returns: void (cannot fail) |
@@ -885,7 +885,7 @@ static void send_IPI_mask(cpumask_t cpumask, int ipi_num, int try) | |||
885 | * Arguments: cpu_mask - Bitmap of target CPUs physical ID | 885 | * Arguments: cpu_mask - Bitmap of target CPUs physical ID |
886 | * ipi_num - Number of IPI | 886 | * ipi_num - Number of IPI |
887 | * try - 0 : Send IPI certainly. | 887 | * try - 0 : Send IPI certainly. |
888 | * !0 : The following IPI is not sended when Target CPU | 888 | * !0 : The following IPI is not sent when Target CPU |
889 | * has not received the before IPI. | 889 | * has not received the before IPI. |
890 | * | 890 | * |
891 | * Returns: IPICRi regster value. | 891 | * Returns: IPICRi regster value. |
diff --git a/arch/m32r/kernel/smpboot.c b/arch/m32r/kernel/smpboot.c index 9dae410014d8..0e383da158e9 100644 --- a/arch/m32r/kernel/smpboot.c +++ b/arch/m32r/kernel/smpboot.c | |||
@@ -133,7 +133,7 @@ static void map_cpu_to_physid(int, int); | |||
133 | static void unmap_cpu_to_physid(int, int); | 133 | static void unmap_cpu_to_physid(int, int); |
134 | 134 | ||
135 | /*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*/ | 135 | /*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*/ |
136 | /* Boot up APs Routins : BSP */ | 136 | /* Boot up APs Routines : BSP */ |
137 | /*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*/ | 137 | /*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*/ |
138 | void __devinit smp_prepare_boot_cpu(void) | 138 | void __devinit smp_prepare_boot_cpu(void) |
139 | { | 139 | { |
@@ -404,7 +404,7 @@ void __init smp_cpus_done(unsigned int max_cpus) | |||
404 | } | 404 | } |
405 | 405 | ||
406 | /*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*/ | 406 | /*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*/ |
407 | /* Activate a secondary processor Routins */ | 407 | /* Activate a secondary processor Routines */ |
408 | /*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*/ | 408 | /*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*/ |
409 | 409 | ||
410 | /*==========================================================================* | 410 | /*==========================================================================* |
@@ -509,7 +509,7 @@ static void __init smp_online(void) | |||
509 | } | 509 | } |
510 | 510 | ||
511 | /*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*/ | 511 | /*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*/ |
512 | /* Boot up CPUs common Routins */ | 512 | /* Boot up CPUs common Routines */ |
513 | /*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*/ | 513 | /*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*/ |
514 | static void __init show_mp_info(int nr_cpu) | 514 | static void __init show_mp_info(int nr_cpu) |
515 | { | 515 | { |
diff --git a/arch/m32r/kernel/sys_m32r.c b/arch/m32r/kernel/sys_m32r.c index 0fc2efec18f6..6d7a80fdad48 100644 --- a/arch/m32r/kernel/sys_m32r.c +++ b/arch/m32r/kernel/sys_m32r.c | |||
@@ -214,7 +214,7 @@ asmlinkage int sys_uname(struct old_utsname __user * name) | |||
214 | 214 | ||
215 | asmlinkage int sys_cacheflush(void *addr, int bytes, int cache) | 215 | asmlinkage int sys_cacheflush(void *addr, int bytes, int cache) |
216 | { | 216 | { |
217 | /* This should flush more selectivly ... */ | 217 | /* This should flush more selectively ... */ |
218 | _flush_cache_all(); | 218 | _flush_cache_all(); |
219 | return 0; | 219 | return 0; |
220 | } | 220 | } |
diff --git a/arch/m32r/kernel/traps.c b/arch/m32r/kernel/traps.c index 97e0b1c0830e..89ba4a0b5d51 100644 --- a/arch/m32r/kernel/traps.c +++ b/arch/m32r/kernel/traps.c | |||
@@ -196,7 +196,7 @@ static void show_registers(struct pt_regs *regs) | |||
196 | printk("SPI: %08lx\n", sp); | 196 | printk("SPI: %08lx\n", sp); |
197 | } | 197 | } |
198 | printk("Process %s (pid: %d, process nr: %d, stackpage=%08lx)", | 198 | printk("Process %s (pid: %d, process nr: %d, stackpage=%08lx)", |
199 | current->comm, current->pid, 0xffff & i, 4096+(unsigned long)current); | 199 | current->comm, task_pid_nr(current), 0xffff & i, 4096+(unsigned long)current); |
200 | 200 | ||
201 | /* | 201 | /* |
202 | * When in-kernel, we also print out the stack and code at the | 202 | * When in-kernel, we also print out the stack and code at the |
diff --git a/arch/m32r/mm/fault.c b/arch/m32r/mm/fault.c index 70a766aad3e0..4a71df4c1b30 100644 --- a/arch/m32r/mm/fault.c +++ b/arch/m32r/mm/fault.c | |||
@@ -271,7 +271,7 @@ no_context: | |||
271 | */ | 271 | */ |
272 | out_of_memory: | 272 | out_of_memory: |
273 | up_read(&mm->mmap_sem); | 273 | up_read(&mm->mmap_sem); |
274 | if (is_init(tsk)) { | 274 | if (is_global_init(tsk)) { |
275 | yield(); | 275 | yield(); |
276 | down_read(&mm->mmap_sem); | 276 | down_read(&mm->mmap_sem); |
277 | goto survive; | 277 | goto survive; |
diff --git a/arch/m32r/oprofile/Kconfig b/arch/m32r/oprofile/Kconfig deleted file mode 100644 index 19d37730b664..000000000000 --- a/arch/m32r/oprofile/Kconfig +++ /dev/null | |||
@@ -1,23 +0,0 @@ | |||
1 | |||
2 | menu "Profiling support" | ||
3 | depends on EXPERIMENTAL | ||
4 | |||
5 | config PROFILING | ||
6 | bool "Profiling support (EXPERIMENTAL)" | ||
7 | help | ||
8 | Say Y here to enable the extended profiling support mechanisms used | ||
9 | by profilers such as OProfile. | ||
10 | |||
11 | |||
12 | config OPROFILE | ||
13 | tristate "OProfile system profiling (EXPERIMENTAL)" | ||
14 | depends on PROFILING | ||
15 | help | ||
16 | OProfile is a profiling system capable of profiling the | ||
17 | whole system, include the kernel, kernel modules, libraries, | ||
18 | and applications. | ||
19 | |||
20 | If unsure, say N. | ||
21 | |||
22 | endmenu | ||
23 | |||
diff --git a/arch/m68k/Kconfig b/arch/m68k/Kconfig index 20a9c08e59c3..01dee84f840a 100644 --- a/arch/m68k/Kconfig +++ b/arch/m68k/Kconfig | |||
@@ -683,6 +683,8 @@ endmenu | |||
683 | 683 | ||
684 | source "fs/Kconfig" | 684 | source "fs/Kconfig" |
685 | 685 | ||
686 | source "kernel/Kconfig.instrumentation" | ||
687 | |||
686 | source "arch/m68k/Kconfig.debug" | 688 | source "arch/m68k/Kconfig.debug" |
687 | 689 | ||
688 | source "security/Kconfig" | 690 | source "security/Kconfig" |
diff --git a/arch/m68k/amiga/pcmcia.c b/arch/m68k/amiga/pcmcia.c index fc57c6e72acf..186662ca1a89 100644 --- a/arch/m68k/amiga/pcmcia.c +++ b/arch/m68k/amiga/pcmcia.c | |||
@@ -33,7 +33,7 @@ void pcmcia_reset(void) | |||
33 | 33 | ||
34 | 34 | ||
35 | /* copy a tuple, including tuple header. return nb bytes copied */ | 35 | /* copy a tuple, including tuple header. return nb bytes copied */ |
36 | /* be carefull as this may trigger a GAYLE_IRQ_WR interrupt ! */ | 36 | /* be careful as this may trigger a GAYLE_IRQ_WR interrupt ! */ |
37 | 37 | ||
38 | int pcmcia_copy_tuple(unsigned char tuple_id, void *tuple, int max_len) | 38 | int pcmcia_copy_tuple(unsigned char tuple_id, void *tuple, int max_len) |
39 | { | 39 | { |
diff --git a/arch/m68k/ifpsp060/CHANGES b/arch/m68k/ifpsp060/CHANGES index c1e712dfc2e7..ba96596910fd 100644 --- a/arch/m68k/ifpsp060/CHANGES +++ b/arch/m68k/ifpsp060/CHANGES | |||
@@ -4,7 +4,7 @@ M68000 Hi-Performance Microprocessor Division | |||
4 | M68060 Software Package | 4 | M68060 Software Package |
5 | Production Release P1.00 -- October 10, 1994 | 5 | Production Release P1.00 -- October 10, 1994 |
6 | 6 | ||
7 | M68060 Software Package Copyright © 1993, 1994 Motorola Inc. All rights reserved. | 7 | M68060 Software Package Copyright © 1993, 1994 Motorola Inc. All rights reserved. |
8 | 8 | ||
9 | THE SOFTWARE is provided on an "AS IS" basis and without warranty. | 9 | THE SOFTWARE is provided on an "AS IS" basis and without warranty. |
10 | To the maximum extent permitted by applicable law, | 10 | To the maximum extent permitted by applicable law, |
diff --git a/arch/m68k/ifpsp060/MISC b/arch/m68k/ifpsp060/MISC index b7e644b94ae2..1a63913daa16 100644 --- a/arch/m68k/ifpsp060/MISC +++ b/arch/m68k/ifpsp060/MISC | |||
@@ -4,7 +4,7 @@ M68000 Hi-Performance Microprocessor Division | |||
4 | M68060 Software Package | 4 | M68060 Software Package |
5 | Production Release P1.00 -- October 10, 1994 | 5 | Production Release P1.00 -- October 10, 1994 |
6 | 6 | ||
7 | M68060 Software Package Copyright © 1993, 1994 Motorola Inc. All rights reserved. | 7 | M68060 Software Package Copyright © 1993, 1994 Motorola Inc. All rights reserved. |
8 | 8 | ||
9 | THE SOFTWARE is provided on an "AS IS" basis and without warranty. | 9 | THE SOFTWARE is provided on an "AS IS" basis and without warranty. |
10 | To the maximum extent permitted by applicable law, | 10 | To the maximum extent permitted by applicable law, |
diff --git a/arch/m68k/ifpsp060/README b/arch/m68k/ifpsp060/README index e3bced429bd3..f6f8f5c59419 100644 --- a/arch/m68k/ifpsp060/README +++ b/arch/m68k/ifpsp060/README | |||
@@ -4,7 +4,7 @@ M68000 Hi-Performance Microprocessor Division | |||
4 | M68060 Software Package | 4 | M68060 Software Package |
5 | Production Release P1.00 -- October 10, 1994 | 5 | Production Release P1.00 -- October 10, 1994 |
6 | 6 | ||
7 | M68060 Software Package Copyright © 1993, 1994 Motorola Inc. All rights reserved. | 7 | M68060 Software Package Copyright © 1993, 1994 Motorola Inc. All rights reserved. |
8 | 8 | ||
9 | THE SOFTWARE is provided on an "AS IS" basis and without warranty. | 9 | THE SOFTWARE is provided on an "AS IS" basis and without warranty. |
10 | To the maximum extent permitted by applicable law, | 10 | To the maximum extent permitted by applicable law, |
diff --git a/arch/m68k/ifpsp060/TEST.DOC b/arch/m68k/ifpsp060/TEST.DOC index 5e5900cb2dc4..1ba3aef1500f 100644 --- a/arch/m68k/ifpsp060/TEST.DOC +++ b/arch/m68k/ifpsp060/TEST.DOC | |||
@@ -4,7 +4,7 @@ M68000 Hi-Performance Microprocessor Division | |||
4 | M68060 Software Package | 4 | M68060 Software Package |
5 | Production Release P1.00 -- October 10, 1994 | 5 | Production Release P1.00 -- October 10, 1994 |
6 | 6 | ||
7 | M68060 Software Package Copyright © 1993, 1994 Motorola Inc. All rights reserved. | 7 | M68060 Software Package Copyright © 1993, 1994 Motorola Inc. All rights reserved. |
8 | 8 | ||
9 | THE SOFTWARE is provided on an "AS IS" basis and without warranty. | 9 | THE SOFTWARE is provided on an "AS IS" basis and without warranty. |
10 | To the maximum extent permitted by applicable law, | 10 | To the maximum extent permitted by applicable law, |
diff --git a/arch/m68k/ifpsp060/fplsp.doc b/arch/m68k/ifpsp060/fplsp.doc index fb637c436762..89730a934c5e 100644 --- a/arch/m68k/ifpsp060/fplsp.doc +++ b/arch/m68k/ifpsp060/fplsp.doc | |||
@@ -4,7 +4,7 @@ M68000 Hi-Performance Microprocessor Division | |||
4 | M68060 Software Package | 4 | M68060 Software Package |
5 | Production Release P1.00 -- October 10, 1994 | 5 | Production Release P1.00 -- October 10, 1994 |
6 | 6 | ||
7 | M68060 Software Package Copyright © 1993, 1994 Motorola Inc. All rights reserved. | 7 | M68060 Software Package Copyright © 1993, 1994 Motorola Inc. All rights reserved. |
8 | 8 | ||
9 | THE SOFTWARE is provided on an "AS IS" basis and without warranty. | 9 | THE SOFTWARE is provided on an "AS IS" basis and without warranty. |
10 | To the maximum extent permitted by applicable law, | 10 | To the maximum extent permitted by applicable law, |
diff --git a/arch/m68k/ifpsp060/fpsp.doc b/arch/m68k/ifpsp060/fpsp.doc index 408315209e62..23d513f72ed9 100644 --- a/arch/m68k/ifpsp060/fpsp.doc +++ b/arch/m68k/ifpsp060/fpsp.doc | |||
@@ -4,7 +4,7 @@ M68000 Hi-Performance Microprocessor Division | |||
4 | M68060 Software Package | 4 | M68060 Software Package |
5 | Production Release P1.00 -- October 10, 1994 | 5 | Production Release P1.00 -- October 10, 1994 |
6 | 6 | ||
7 | M68060 Software Package Copyright © 1993, 1994 Motorola Inc. All rights reserved. | 7 | M68060 Software Package Copyright © 1993, 1994 Motorola Inc. All rights reserved. |
8 | 8 | ||
9 | THE SOFTWARE is provided on an "AS IS" basis and without warranty. | 9 | THE SOFTWARE is provided on an "AS IS" basis and without warranty. |
10 | To the maximum extent permitted by applicable law, | 10 | To the maximum extent permitted by applicable law, |
diff --git a/arch/m68k/ifpsp060/fskeleton.S b/arch/m68k/ifpsp060/fskeleton.S index a45a4ff9d2af..0a1ae4f44130 100644 --- a/arch/m68k/ifpsp060/fskeleton.S +++ b/arch/m68k/ifpsp060/fskeleton.S | |||
@@ -4,7 +4,7 @@ | |||
4 | |M68060 Software Package | 4 | |M68060 Software Package |
5 | |Production Release P1.00 -- October 10, 1994 | 5 | |Production Release P1.00 -- October 10, 1994 |
6 | | | 6 | | |
7 | |M68060 Software Package Copyright © 1993, 1994 Motorola Inc. All rights reserved. | 7 | |M68060 Software Package Copyright © 1993, 1994 Motorola Inc. All rights reserved. |
8 | | | 8 | | |
9 | |THE SOFTWARE is provided on an "AS IS" basis and without warranty. | 9 | |THE SOFTWARE is provided on an "AS IS" basis and without warranty. |
10 | |To the maximum extent permitted by applicable law, | 10 | |To the maximum extent permitted by applicable law, |
diff --git a/arch/m68k/ifpsp060/ilsp.doc b/arch/m68k/ifpsp060/ilsp.doc index f6fae6d900ae..4e6292f095aa 100644 --- a/arch/m68k/ifpsp060/ilsp.doc +++ b/arch/m68k/ifpsp060/ilsp.doc | |||
@@ -4,7 +4,7 @@ M68000 Hi-Performance Microprocessor Division | |||
4 | M68060 Software Package | 4 | M68060 Software Package |
5 | Production Release P1.00 -- October 10, 1994 | 5 | Production Release P1.00 -- October 10, 1994 |
6 | 6 | ||
7 | M68060 Software Package Copyright © 1993, 1994 Motorola Inc. All rights reserved. | 7 | M68060 Software Package Copyright © 1993, 1994 Motorola Inc. All rights reserved. |
8 | 8 | ||
9 | THE SOFTWARE is provided on an "AS IS" basis and without warranty. | 9 | THE SOFTWARE is provided on an "AS IS" basis and without warranty. |
10 | To the maximum extent permitted by applicable law, | 10 | To the maximum extent permitted by applicable law, |
diff --git a/arch/m68k/ifpsp060/iskeleton.S b/arch/m68k/ifpsp060/iskeleton.S index b2dbdf5ee309..91a9c65fee8a 100644 --- a/arch/m68k/ifpsp060/iskeleton.S +++ b/arch/m68k/ifpsp060/iskeleton.S | |||
@@ -4,7 +4,7 @@ | |||
4 | |M68060 Software Package | 4 | |M68060 Software Package |
5 | |Production Release P1.00 -- October 10, 1994 | 5 | |Production Release P1.00 -- October 10, 1994 |
6 | | | 6 | | |
7 | |M68060 Software Package Copyright © 1993, 1994 Motorola Inc. All rights reserved. | 7 | |M68060 Software Package Copyright © 1993, 1994 Motorola Inc. All rights reserved. |
8 | | | 8 | | |
9 | |THE SOFTWARE is provided on an "AS IS" basis and without warranty. | 9 | |THE SOFTWARE is provided on an "AS IS" basis and without warranty. |
10 | |To the maximum extent permitted by applicable law, | 10 | |To the maximum extent permitted by applicable law, |
diff --git a/arch/m68k/ifpsp060/isp.doc b/arch/m68k/ifpsp060/isp.doc index 5a90fded3f0b..9dadd727fc50 100644 --- a/arch/m68k/ifpsp060/isp.doc +++ b/arch/m68k/ifpsp060/isp.doc | |||
@@ -4,7 +4,7 @@ M68000 Hi-Performance Microprocessor Division | |||
4 | M68060 Software Package | 4 | M68060 Software Package |
5 | Production Release P1.00 -- October 10, 1994 | 5 | Production Release P1.00 -- October 10, 1994 |
6 | 6 | ||
7 | M68060 Software Package Copyright © 1993, 1994 Motorola Inc. All rights reserved. | 7 | M68060 Software Package Copyright © 1993, 1994 Motorola Inc. All rights reserved. |
8 | 8 | ||
9 | THE SOFTWARE is provided on an "AS IS" basis and without warranty. | 9 | THE SOFTWARE is provided on an "AS IS" basis and without warranty. |
10 | To the maximum extent permitted by applicable law, | 10 | To the maximum extent permitted by applicable law, |
diff --git a/arch/m68k/ifpsp060/os.S b/arch/m68k/ifpsp060/os.S index aa4df87a6c42..7a0d6e428066 100644 --- a/arch/m68k/ifpsp060/os.S +++ b/arch/m68k/ifpsp060/os.S | |||
@@ -4,7 +4,7 @@ | |||
4 | |M68060 Software Package | 4 | |M68060 Software Package |
5 | |Production Release P1.00 -- October 10, 1994 | 5 | |Production Release P1.00 -- October 10, 1994 |
6 | | | 6 | | |
7 | |M68060 Software Package Copyright © 1993, 1994 Motorola Inc. All rights reserved. | 7 | |M68060 Software Package Copyright © 1993, 1994 Motorola Inc. All rights reserved. |
8 | | | 8 | | |
9 | |THE SOFTWARE is provided on an "AS IS" basis and without warranty. | 9 | |THE SOFTWARE is provided on an "AS IS" basis and without warranty. |
10 | |To the maximum extent permitted by applicable law, | 10 | |To the maximum extent permitted by applicable law, |
diff --git a/arch/m68k/ifpsp060/src/fplsp.S b/arch/m68k/ifpsp060/src/fplsp.S index fdb79b927ef1..3b7ea2dc9f1b 100644 --- a/arch/m68k/ifpsp060/src/fplsp.S +++ b/arch/m68k/ifpsp060/src/fplsp.S | |||
@@ -4,7 +4,7 @@ M68000 Hi-Performance Microprocessor Division | |||
4 | M68060 Software Package | 4 | M68060 Software Package |
5 | Production Release P1.00 -- October 10, 1994 | 5 | Production Release P1.00 -- October 10, 1994 |
6 | 6 | ||
7 | M68060 Software Package Copyright © 1993, 1994 Motorola Inc. All rights reserved. | 7 | M68060 Software Package Copyright © 1993, 1994 Motorola Inc. All rights reserved. |
8 | 8 | ||
9 | THE SOFTWARE is provided on an "AS IS" basis and without warranty. | 9 | THE SOFTWARE is provided on an "AS IS" basis and without warranty. |
10 | To the maximum extent permitted by applicable law, | 10 | To the maximum extent permitted by applicable law, |
diff --git a/arch/m68k/ifpsp060/src/fpsp.S b/arch/m68k/ifpsp060/src/fpsp.S index 3b597a9bbf43..6c1a9a217887 100644 --- a/arch/m68k/ifpsp060/src/fpsp.S +++ b/arch/m68k/ifpsp060/src/fpsp.S | |||
@@ -4,7 +4,7 @@ M68000 Hi-Performance Microprocessor Division | |||
4 | M68060 Software Package | 4 | M68060 Software Package |
5 | Production Release P1.00 -- October 10, 1994 | 5 | Production Release P1.00 -- October 10, 1994 |
6 | 6 | ||
7 | M68060 Software Package Copyright © 1993, 1994 Motorola Inc. All rights reserved. | 7 | M68060 Software Package Copyright © 1993, 1994 Motorola Inc. All rights reserved. |
8 | 8 | ||
9 | THE SOFTWARE is provided on an "AS IS" basis and without warranty. | 9 | THE SOFTWARE is provided on an "AS IS" basis and without warranty. |
10 | To the maximum extent permitted by applicable law, | 10 | To the maximum extent permitted by applicable law, |
diff --git a/arch/m68k/ifpsp060/src/ftest.S b/arch/m68k/ifpsp060/src/ftest.S index 2edcbae0fd53..1f947915d81e 100644 --- a/arch/m68k/ifpsp060/src/ftest.S +++ b/arch/m68k/ifpsp060/src/ftest.S | |||
@@ -4,7 +4,7 @@ M68000 Hi-Performance Microprocessor Division | |||
4 | M68060 Software Package | 4 | M68060 Software Package |
5 | Production Release P1.00 -- October 10, 1994 | 5 | Production Release P1.00 -- October 10, 1994 |
6 | 6 | ||
7 | M68060 Software Package Copyright © 1993, 1994 Motorola Inc. All rights reserved. | 7 | M68060 Software Package Copyright © 1993, 1994 Motorola Inc. All rights reserved. |
8 | 8 | ||
9 | THE SOFTWARE is provided on an "AS IS" basis and without warranty. | 9 | THE SOFTWARE is provided on an "AS IS" basis and without warranty. |
10 | To the maximum extent permitted by applicable law, | 10 | To the maximum extent permitted by applicable law, |
diff --git a/arch/m68k/ifpsp060/src/ilsp.S b/arch/m68k/ifpsp060/src/ilsp.S index afa7422cddb5..970abaf3303e 100644 --- a/arch/m68k/ifpsp060/src/ilsp.S +++ b/arch/m68k/ifpsp060/src/ilsp.S | |||
@@ -4,7 +4,7 @@ M68000 Hi-Performance Microprocessor Division | |||
4 | M68060 Software Package | 4 | M68060 Software Package |
5 | Production Release P1.00 -- October 10, 1994 | 5 | Production Release P1.00 -- October 10, 1994 |
6 | 6 | ||
7 | M68060 Software Package Copyright © 1993, 1994 Motorola Inc. All rights reserved. | 7 | M68060 Software Package Copyright © 1993, 1994 Motorola Inc. All rights reserved. |
8 | 8 | ||
9 | THE SOFTWARE is provided on an "AS IS" basis and without warranty. | 9 | THE SOFTWARE is provided on an "AS IS" basis and without warranty. |
10 | To the maximum extent permitted by applicable law, | 10 | To the maximum extent permitted by applicable law, |
diff --git a/arch/m68k/ifpsp060/src/isp.S b/arch/m68k/ifpsp060/src/isp.S index b269091d9df6..6dccda766e22 100644 --- a/arch/m68k/ifpsp060/src/isp.S +++ b/arch/m68k/ifpsp060/src/isp.S | |||
@@ -4,7 +4,7 @@ M68000 Hi-Performance Microprocessor Division | |||
4 | M68060 Software Package | 4 | M68060 Software Package |
5 | Production Release P1.00 -- October 10, 1994 | 5 | Production Release P1.00 -- October 10, 1994 |
6 | 6 | ||
7 | M68060 Software Package Copyright © 1993, 1994 Motorola Inc. All rights reserved. | 7 | M68060 Software Package Copyright © 1993, 1994 Motorola Inc. All rights reserved. |
8 | 8 | ||
9 | THE SOFTWARE is provided on an "AS IS" basis and without warranty. | 9 | THE SOFTWARE is provided on an "AS IS" basis and without warranty. |
10 | To the maximum extent permitted by applicable law, | 10 | To the maximum extent permitted by applicable law, |
diff --git a/arch/m68k/ifpsp060/src/itest.S b/arch/m68k/ifpsp060/src/itest.S index ba4a30cbcbea..beca47e7d514 100644 --- a/arch/m68k/ifpsp060/src/itest.S +++ b/arch/m68k/ifpsp060/src/itest.S | |||
@@ -4,7 +4,7 @@ M68000 Hi-Performance Microprocessor Division | |||
4 | M68060 Software Package | 4 | M68060 Software Package |
5 | Production Release P1.00 -- October 10, 1994 | 5 | Production Release P1.00 -- October 10, 1994 |
6 | 6 | ||
7 | M68060 Software Package Copyright © 1993, 1994 Motorola Inc. All rights reserved. | 7 | M68060 Software Package Copyright © 1993, 1994 Motorola Inc. All rights reserved. |
8 | 8 | ||
9 | THE SOFTWARE is provided on an "AS IS" basis and without warranty. | 9 | THE SOFTWARE is provided on an "AS IS" basis and without warranty. |
10 | To the maximum extent permitted by applicable law, | 10 | To the maximum extent permitted by applicable law, |
diff --git a/arch/m68k/ifpsp060/src/pfpsp.S b/arch/m68k/ifpsp060/src/pfpsp.S index 0c997c436beb..51b9f7d879dd 100644 --- a/arch/m68k/ifpsp060/src/pfpsp.S +++ b/arch/m68k/ifpsp060/src/pfpsp.S | |||
@@ -4,7 +4,7 @@ M68000 Hi-Performance Microprocessor Division | |||
4 | M68060 Software Package | 4 | M68060 Software Package |
5 | Production Release P1.00 -- October 10, 1994 | 5 | Production Release P1.00 -- October 10, 1994 |
6 | 6 | ||
7 | M68060 Software Package Copyright © 1993, 1994 Motorola Inc. All rights reserved. | 7 | M68060 Software Package Copyright © 1993, 1994 Motorola Inc. All rights reserved. |
8 | 8 | ||
9 | THE SOFTWARE is provided on an "AS IS" basis and without warranty. | 9 | THE SOFTWARE is provided on an "AS IS" basis and without warranty. |
10 | To the maximum extent permitted by applicable law, | 10 | To the maximum extent permitted by applicable law, |
diff --git a/arch/m68k/kernel/traps.c b/arch/m68k/kernel/traps.c index 4e2752a0e89b..97f556fa4932 100644 --- a/arch/m68k/kernel/traps.c +++ b/arch/m68k/kernel/traps.c | |||
@@ -900,7 +900,7 @@ void show_registers(struct pt_regs *regs) | |||
900 | regs->d4, regs->d5, regs->a0, regs->a1); | 900 | regs->d4, regs->d5, regs->a0, regs->a1); |
901 | 901 | ||
902 | printk("Process %s (pid: %d, task=%p)\n", | 902 | printk("Process %s (pid: %d, task=%p)\n", |
903 | current->comm, current->pid, current); | 903 | current->comm, task_pid_nr(current), current); |
904 | addr = (unsigned long)&fp->un; | 904 | addr = (unsigned long)&fp->un; |
905 | printk("Frame format=%X ", regs->format); | 905 | printk("Frame format=%X ", regs->format); |
906 | switch (regs->format) { | 906 | switch (regs->format) { |
@@ -1038,7 +1038,7 @@ void bad_super_trap (struct frame *fp) | |||
1038 | fp->un.fmtb.daddr, space_names[ssw & DFC], | 1038 | fp->un.fmtb.daddr, space_names[ssw & DFC], |
1039 | fp->ptregs.pc); | 1039 | fp->ptregs.pc); |
1040 | } | 1040 | } |
1041 | printk ("Current process id is %d\n", current->pid); | 1041 | printk ("Current process id is %d\n", task_pid_nr(current)); |
1042 | die_if_kernel("BAD KERNEL TRAP", &fp->ptregs, 0); | 1042 | die_if_kernel("BAD KERNEL TRAP", &fp->ptregs, 0); |
1043 | } | 1043 | } |
1044 | 1044 | ||
diff --git a/arch/m68k/mac/config.c b/arch/m68k/mac/config.c index 8547dbc5e8d7..01b468b9392e 100644 --- a/arch/m68k/mac/config.c +++ b/arch/m68k/mac/config.c | |||
@@ -284,7 +284,7 @@ static struct mac_model mac_data_table[] = { | |||
284 | }, | 284 | }, |
285 | 285 | ||
286 | /* | 286 | /* |
287 | * Weirdified MacII hardware - all subtley different. Gee thanks | 287 | * Weirdified MacII hardware - all subtly different. Gee thanks |
288 | * Apple. All these boxes seem to have VIA2 in a different place to | 288 | * Apple. All these boxes seem to have VIA2 in a different place to |
289 | * the MacII (+1A000 rather than +4000) | 289 | * the MacII (+1A000 rather than +4000) |
290 | * CSA: see http://developer.apple.com/technotes/hw/hw_09.html | 290 | * CSA: see http://developer.apple.com/technotes/hw/hw_09.html |
@@ -707,7 +707,7 @@ static struct mac_model mac_data_table[] = { | |||
707 | * All of these probably have onboard SONIC in the Dock which | 707 | * All of these probably have onboard SONIC in the Dock which |
708 | * means we'll have to probe for it eventually. | 708 | * means we'll have to probe for it eventually. |
709 | * | 709 | * |
710 | * Are these reallly MAC_VIA_IIci? The developer notes for the | 710 | * Are these really MAC_VIA_IIci? The developer notes for the |
711 | * Duos show pretty much the same custom parts as in most of | 711 | * Duos show pretty much the same custom parts as in most of |
712 | * the other PowerBooks which would imply MAC_VIA_QUADRA. | 712 | * the other PowerBooks which would imply MAC_VIA_QUADRA. |
713 | */ | 713 | */ |
diff --git a/arch/m68k/mac/iop.c b/arch/m68k/mac/iop.c index 0cea21f58192..5b2799eb96a6 100644 --- a/arch/m68k/mac/iop.c +++ b/arch/m68k/mac/iop.c | |||
@@ -100,7 +100,7 @@ | |||
100 | * finished; this function moves the message state to MSG_COMPLETE and signals | 100 | * finished; this function moves the message state to MSG_COMPLETE and signals |
101 | * the IOP. This two-step process is provided to allow the handler to defer | 101 | * the IOP. This two-step process is provided to allow the handler to defer |
102 | * message processing to a bottom-half handler if the processing will take | 102 | * message processing to a bottom-half handler if the processing will take |
103 | * a signifigant amount of time (handlers are called at interrupt time so they | 103 | * a significant amount of time (handlers are called at interrupt time so they |
104 | * should execute quickly.) | 104 | * should execute quickly.) |
105 | */ | 105 | */ |
106 | 106 | ||
@@ -120,7 +120,7 @@ | |||
120 | 120 | ||
121 | /*#define DEBUG_IOP*/ | 121 | /*#define DEBUG_IOP*/ |
122 | 122 | ||
123 | /* Set to nonezero if the IOPs are present. Set by iop_init() */ | 123 | /* Set to non-zero if the IOPs are present. Set by iop_init() */ |
124 | 124 | ||
125 | int iop_scc_present,iop_ism_present; | 125 | int iop_scc_present,iop_ism_present; |
126 | 126 | ||
diff --git a/arch/m68k/mac/oss.c b/arch/m68k/mac/oss.c index d7be16917efd..50603d3dce84 100644 --- a/arch/m68k/mac/oss.c +++ b/arch/m68k/mac/oss.c | |||
@@ -8,7 +8,7 @@ | |||
8 | * | 8 | * |
9 | * 990502 (jmt) - Major rewrite for new interrupt architecture as well as some | 9 | * 990502 (jmt) - Major rewrite for new interrupt architecture as well as some |
10 | * recent insights into OSS operational details. | 10 | * recent insights into OSS operational details. |
11 | * 990610 (jmt) - Now taking fulll advantage of the OSS. Interrupts are mapped | 11 | * 990610 (jmt) - Now taking full advantage of the OSS. Interrupts are mapped |
12 | * to mostly match the A/UX interrupt scheme supported on the | 12 | * to mostly match the A/UX interrupt scheme supported on the |
13 | * VIA side. Also added support for enabling the ISM irq again | 13 | * VIA side. Also added support for enabling the ISM irq again |
14 | * since we now have a functional IOP manager. | 14 | * since we now have a functional IOP manager. |
diff --git a/arch/m68k/mac/via.c b/arch/m68k/mac/via.c index d5cac72eb3db..8df270e950fa 100644 --- a/arch/m68k/mac/via.c +++ b/arch/m68k/mac/via.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * 6522 Versatile Interface Adapter (VIA) | 2 | * 6522 Versatile Interface Adapter (VIA) |
3 | * | 3 | * |
4 | * There are two of these on the Mac II. Some IRQ's are vectored | 4 | * There are two of these on the Mac II. Some IRQs are vectored |
5 | * via them as are assorted bits and bobs - eg RTC, ADB. | 5 | * via them as are assorted bits and bobs - eg RTC, ADB. |
6 | * | 6 | * |
7 | * CSA: Motorola seems to have removed documentation on the 6522 from | 7 | * CSA: Motorola seems to have removed documentation on the 6522 from |
diff --git a/arch/m68k/math-emu/fp_log.c b/arch/m68k/math-emu/fp_log.c index 87b4f0158560..b1033ae0d6f0 100644 --- a/arch/m68k/math-emu/fp_log.c +++ b/arch/m68k/math-emu/fp_log.c | |||
@@ -65,7 +65,7 @@ fp_fsqrt(struct fp_ext *dest, struct fp_ext *src) | |||
65 | fp_copy_ext(&src2, dest); | 65 | fp_copy_ext(&src2, dest); |
66 | 66 | ||
67 | /* | 67 | /* |
68 | * The taylor row arround a for sqrt(x) is: | 68 | * The taylor row around a for sqrt(x) is: |
69 | * sqrt(x) = sqrt(a) + 1/(2*sqrt(a))*(x-a) + R | 69 | * sqrt(x) = sqrt(a) + 1/(2*sqrt(a))*(x-a) + R |
70 | * With a=1 this gives: | 70 | * With a=1 this gives: |
71 | * sqrt(x) = 1 + 1/2*(x-1) | 71 | * sqrt(x) = 1 + 1/2*(x-1) |
diff --git a/arch/m68k/mm/fault.c b/arch/m68k/mm/fault.c index eaa618681159..f493f03231d5 100644 --- a/arch/m68k/mm/fault.c +++ b/arch/m68k/mm/fault.c | |||
@@ -180,7 +180,7 @@ good_area: | |||
180 | */ | 180 | */ |
181 | out_of_memory: | 181 | out_of_memory: |
182 | up_read(&mm->mmap_sem); | 182 | up_read(&mm->mmap_sem); |
183 | if (is_init(current)) { | 183 | if (is_global_init(current)) { |
184 | yield(); | 184 | yield(); |
185 | down_read(&mm->mmap_sem); | 185 | down_read(&mm->mmap_sem); |
186 | goto survive; | 186 | goto survive; |
diff --git a/arch/m68k/q40/q40ints.c b/arch/m68k/q40/q40ints.c index ad3ed1fb8879..46161cef08b9 100644 --- a/arch/m68k/q40/q40ints.c +++ b/arch/m68k/q40/q40ints.c | |||
@@ -184,7 +184,7 @@ static struct IRQ_TABLE eirqs[] = { | |||
184 | }; | 184 | }; |
185 | 185 | ||
186 | /* complain only this many times about spurious ints : */ | 186 | /* complain only this many times about spurious ints : */ |
187 | static int ccleirq=60; /* ISA dev IRQ's*/ | 187 | static int ccleirq=60; /* ISA dev IRQs*/ |
188 | /*static int cclirq=60;*/ /* internal */ | 188 | /*static int cclirq=60;*/ /* internal */ |
189 | 189 | ||
190 | /* FIXME: add shared ints,mask,unmask,probing.... */ | 190 | /* FIXME: add shared ints,mask,unmask,probing.... */ |
@@ -234,7 +234,7 @@ static void q40_irq_handler(unsigned int irq, struct pt_regs *fp) | |||
234 | * There is a little mess wrt which IRQ really caused this irq request. The | 234 | * There is a little mess wrt which IRQ really caused this irq request. The |
235 | * main problem is that IIRQ_REG and EIRQ_REG reflect the state when they | 235 | * main problem is that IIRQ_REG and EIRQ_REG reflect the state when they |
236 | * are read - which is long after the request came in. In theory IRQs should | 236 | * are read - which is long after the request came in. In theory IRQs should |
237 | * not just go away but they occassionally do | 237 | * not just go away but they occasionally do |
238 | */ | 238 | */ |
239 | if (irq > 4 && irq <= 15 && mext_disabled) { | 239 | if (irq > 4 && irq <= 15 && mext_disabled) { |
240 | /*aliased_irq++;*/ | 240 | /*aliased_irq++;*/ |
diff --git a/arch/m68k/sun3/mmu_emu.c b/arch/m68k/sun3/mmu_emu.c index 7a0e3a220687..fb0f6a20cc3c 100644 --- a/arch/m68k/sun3/mmu_emu.c +++ b/arch/m68k/sun3/mmu_emu.c | |||
@@ -239,7 +239,7 @@ void clear_context(unsigned long context) | |||
239 | /* gets an empty context. if full, kills the next context listed to | 239 | /* gets an empty context. if full, kills the next context listed to |
240 | die first */ | 240 | die first */ |
241 | /* This context invalidation scheme is, well, totally arbitrary, I'm | 241 | /* This context invalidation scheme is, well, totally arbitrary, I'm |
242 | sure it could be much more intellegent... but it gets the job done | 242 | sure it could be much more intelligent... but it gets the job done |
243 | for now without much overhead in making it's decision. */ | 243 | for now without much overhead in making it's decision. */ |
244 | /* todo: come up with optimized scheme for flushing contexts */ | 244 | /* todo: come up with optimized scheme for flushing contexts */ |
245 | unsigned long get_free_context(struct mm_struct *mm) | 245 | unsigned long get_free_context(struct mm_struct *mm) |
diff --git a/arch/m68k/tools/amiga/dmesg.c b/arch/m68k/tools/amiga/dmesg.c index e892748e7386..7340f5b6cf6d 100644 --- a/arch/m68k/tools/amiga/dmesg.c +++ b/arch/m68k/tools/amiga/dmesg.c | |||
@@ -3,7 +3,7 @@ | |||
3 | * in Chip RAM with the kernel command | 3 | * in Chip RAM with the kernel command |
4 | * line option `debug=mem'. | 4 | * line option `debug=mem'. |
5 | * | 5 | * |
6 | * © Copyright 1996 by Geert Uytterhoeven <geert@linux-m68k.org> | 6 | * © Copyright 1996 by Geert Uytterhoeven <geert@linux-m68k.org> |
7 | * | 7 | * |
8 | * | 8 | * |
9 | * Usage: | 9 | * Usage: |
diff --git a/arch/m68knommu/Kconfig b/arch/m68knommu/Kconfig index 185906b54cb0..f52c627bdadd 100644 --- a/arch/m68knommu/Kconfig +++ b/arch/m68knommu/Kconfig | |||
@@ -696,6 +696,8 @@ source "drivers/Kconfig" | |||
696 | 696 | ||
697 | source "fs/Kconfig" | 697 | source "fs/Kconfig" |
698 | 698 | ||
699 | source "kernel/Kconfig.instrumentation" | ||
700 | |||
699 | source "arch/m68knommu/Kconfig.debug" | 701 | source "arch/m68knommu/Kconfig.debug" |
700 | 702 | ||
701 | source "security/Kconfig" | 703 | source "security/Kconfig" |
diff --git a/arch/m68knommu/platform/5307/pit.c b/arch/m68knommu/platform/5307/pit.c index e53c446d10e4..f18352fa35a6 100644 --- a/arch/m68knommu/platform/5307/pit.c +++ b/arch/m68knommu/platform/5307/pit.c | |||
@@ -83,7 +83,7 @@ unsigned long coldfire_pit_offset(void) | |||
83 | 83 | ||
84 | /* | 84 | /* |
85 | * If we are still in the first half of the upcount and a | 85 | * If we are still in the first half of the upcount and a |
86 | * timer interupt is pending, then add on a ticks worth of time. | 86 | * timer interrupt is pending, then add on a ticks worth of time. |
87 | */ | 87 | */ |
88 | offset = ((pmr - pcntr) * (1000000 / HZ)) / pmr; | 88 | offset = ((pmr - pcntr) * (1000000 / HZ)) / pmr; |
89 | if ((offset < (1000000 / HZ / 2)) && (*ipr & MCFPIT_IMR_IBIT)) | 89 | if ((offset < (1000000 / HZ / 2)) && (*ipr & MCFPIT_IMR_IBIT)) |
diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig index 235d4514e0a9..3ecff5e9e4f3 100644 --- a/arch/mips/Kconfig +++ b/arch/mips/Kconfig | |||
@@ -21,6 +21,7 @@ config MACH_ALCHEMY | |||
21 | 21 | ||
22 | config BASLER_EXCITE | 22 | config BASLER_EXCITE |
23 | bool "Basler eXcite smart camera" | 23 | bool "Basler eXcite smart camera" |
24 | select CEVT_R4K | ||
24 | select DMA_COHERENT | 25 | select DMA_COHERENT |
25 | select HW_HAS_PCI | 26 | select HW_HAS_PCI |
26 | select IRQ_CPU | 27 | select IRQ_CPU |
@@ -47,6 +48,7 @@ config BASLER_EXCITE_PROTOTYPE | |||
47 | 48 | ||
48 | config BCM47XX | 49 | config BCM47XX |
49 | bool "BCM47XX based boards" | 50 | bool "BCM47XX based boards" |
51 | select CEVT_R4K | ||
50 | select DMA_NONCOHERENT | 52 | select DMA_NONCOHERENT |
51 | select HW_HAS_PCI | 53 | select HW_HAS_PCI |
52 | select IRQ_CPU | 54 | select IRQ_CPU |
@@ -63,6 +65,7 @@ config BCM47XX | |||
63 | 65 | ||
64 | config MIPS_COBALT | 66 | config MIPS_COBALT |
65 | bool "Cobalt Server" | 67 | bool "Cobalt Server" |
68 | select CEVT_R4K | ||
66 | select DMA_NONCOHERENT | 69 | select DMA_NONCOHERENT |
67 | select HW_HAS_PCI | 70 | select HW_HAS_PCI |
68 | select I8253 | 71 | select I8253 |
@@ -80,6 +83,7 @@ config MIPS_COBALT | |||
80 | config MACH_DECSTATION | 83 | config MACH_DECSTATION |
81 | bool "DECstations" | 84 | bool "DECstations" |
82 | select BOOT_ELF32 | 85 | select BOOT_ELF32 |
86 | select CEVT_R4K | ||
83 | select DMA_NONCOHERENT | 87 | select DMA_NONCOHERENT |
84 | select NO_IOPORT | 88 | select NO_IOPORT |
85 | select IRQ_CPU | 89 | select IRQ_CPU |
@@ -111,6 +115,7 @@ config MACH_JAZZ | |||
111 | select ARC | 115 | select ARC |
112 | select ARC32 | 116 | select ARC32 |
113 | select ARCH_MAY_HAVE_PC_FDC | 117 | select ARCH_MAY_HAVE_PC_FDC |
118 | select CEVT_R4K | ||
114 | select GENERIC_ISA_DMA | 119 | select GENERIC_ISA_DMA |
115 | select IRQ_CPU | 120 | select IRQ_CPU |
116 | select I8253 | 121 | select I8253 |
@@ -130,6 +135,7 @@ config MACH_JAZZ | |||
130 | 135 | ||
131 | config LASAT | 136 | config LASAT |
132 | bool "LASAT Networks platforms" | 137 | bool "LASAT Networks platforms" |
138 | select CEVT_R4K | ||
133 | select DMA_NONCOHERENT | 139 | select DMA_NONCOHERENT |
134 | select SYS_HAS_EARLY_PRINTK | 140 | select SYS_HAS_EARLY_PRINTK |
135 | select HW_HAS_PCI | 141 | select HW_HAS_PCI |
@@ -146,6 +152,7 @@ config LASAT | |||
146 | config LEMOTE_FULONG | 152 | config LEMOTE_FULONG |
147 | bool "Lemote Fulong mini-PC" | 153 | bool "Lemote Fulong mini-PC" |
148 | select ARCH_SPARSEMEM_ENABLE | 154 | select ARCH_SPARSEMEM_ENABLE |
155 | select CEVT_R4K | ||
149 | select SYS_HAS_CPU_LOONGSON2 | 156 | select SYS_HAS_CPU_LOONGSON2 |
150 | select DMA_NONCOHERENT | 157 | select DMA_NONCOHERENT |
151 | select BOOT_ELF32 | 158 | select BOOT_ELF32 |
@@ -170,6 +177,7 @@ config LEMOTE_FULONG | |||
170 | config MIPS_ATLAS | 177 | config MIPS_ATLAS |
171 | bool "MIPS Atlas board" | 178 | bool "MIPS Atlas board" |
172 | select BOOT_ELF32 | 179 | select BOOT_ELF32 |
180 | select CEVT_R4K | ||
173 | select DMA_NONCOHERENT | 181 | select DMA_NONCOHERENT |
174 | select SYS_HAS_EARLY_PRINTK | 182 | select SYS_HAS_EARLY_PRINTK |
175 | select IRQ_CPU | 183 | select IRQ_CPU |
@@ -200,6 +208,7 @@ config MIPS_MALTA | |||
200 | bool "MIPS Malta board" | 208 | bool "MIPS Malta board" |
201 | select ARCH_MAY_HAVE_PC_FDC | 209 | select ARCH_MAY_HAVE_PC_FDC |
202 | select BOOT_ELF32 | 210 | select BOOT_ELF32 |
211 | select CEVT_R4K | ||
203 | select DMA_NONCOHERENT | 212 | select DMA_NONCOHERENT |
204 | select GENERIC_ISA_DMA | 213 | select GENERIC_ISA_DMA |
205 | select IRQ_CPU | 214 | select IRQ_CPU |
@@ -230,6 +239,7 @@ config MIPS_MALTA | |||
230 | 239 | ||
231 | config MIPS_SEAD | 240 | config MIPS_SEAD |
232 | bool "MIPS SEAD board" | 241 | bool "MIPS SEAD board" |
242 | select CEVT_R4K | ||
233 | select IRQ_CPU | 243 | select IRQ_CPU |
234 | select DMA_NONCOHERENT | 244 | select DMA_NONCOHERENT |
235 | select SYS_HAS_EARLY_PRINTK | 245 | select SYS_HAS_EARLY_PRINTK |
@@ -248,6 +258,7 @@ config MIPS_SEAD | |||
248 | 258 | ||
249 | config MIPS_SIM | 259 | config MIPS_SIM |
250 | bool 'MIPS simulator (MIPSsim)' | 260 | bool 'MIPS simulator (MIPSsim)' |
261 | select CEVT_R4K | ||
251 | select DMA_NONCOHERENT | 262 | select DMA_NONCOHERENT |
252 | select SYS_HAS_EARLY_PRINTK | 263 | select SYS_HAS_EARLY_PRINTK |
253 | select IRQ_CPU | 264 | select IRQ_CPU |
@@ -265,6 +276,7 @@ config MIPS_SIM | |||
265 | 276 | ||
266 | config MARKEINS | 277 | config MARKEINS |
267 | bool "NEC EMMA2RH Mark-eins" | 278 | bool "NEC EMMA2RH Mark-eins" |
279 | select CEVT_R4K | ||
268 | select DMA_NONCOHERENT | 280 | select DMA_NONCOHERENT |
269 | select HW_HAS_PCI | 281 | select HW_HAS_PCI |
270 | select IRQ_CPU | 282 | select IRQ_CPU |
@@ -279,6 +291,7 @@ config MARKEINS | |||
279 | 291 | ||
280 | config MACH_VR41XX | 292 | config MACH_VR41XX |
281 | bool "NEC VR4100 series based machines" | 293 | bool "NEC VR4100 series based machines" |
294 | select CEVT_R4K | ||
282 | select SYS_HAS_CPU_VR41XX | 295 | select SYS_HAS_CPU_VR41XX |
283 | select GENERIC_HARDIRQS_NO__DO_IRQ | 296 | select GENERIC_HARDIRQS_NO__DO_IRQ |
284 | 297 | ||
@@ -315,6 +328,7 @@ config PMC_MSP | |||
315 | 328 | ||
316 | config PMC_YOSEMITE | 329 | config PMC_YOSEMITE |
317 | bool "PMC-Sierra Yosemite eval board" | 330 | bool "PMC-Sierra Yosemite eval board" |
331 | select CEVT_R4K | ||
318 | select DMA_COHERENT | 332 | select DMA_COHERENT |
319 | select HW_HAS_PCI | 333 | select HW_HAS_PCI |
320 | select IRQ_CPU | 334 | select IRQ_CPU |
@@ -335,6 +349,7 @@ config PMC_YOSEMITE | |||
335 | 349 | ||
336 | config QEMU | 350 | config QEMU |
337 | bool "Qemu" | 351 | bool "Qemu" |
352 | select CEVT_R4K | ||
338 | select DMA_COHERENT | 353 | select DMA_COHERENT |
339 | select GENERIC_ISA_DMA | 354 | select GENERIC_ISA_DMA |
340 | select HAVE_STD_PC_SERIAL_PORT | 355 | select HAVE_STD_PC_SERIAL_PORT |
@@ -365,6 +380,7 @@ config SGI_IP22 | |||
365 | select ARC | 380 | select ARC |
366 | select ARC32 | 381 | select ARC32 |
367 | select BOOT_ELF32 | 382 | select BOOT_ELF32 |
383 | select CEVT_R4K | ||
368 | select DMA_NONCOHERENT | 384 | select DMA_NONCOHERENT |
369 | select HW_HAS_EISA | 385 | select HW_HAS_EISA |
370 | select I8253 | 386 | select I8253 |
@@ -409,6 +425,7 @@ config SGI_IP32 | |||
409 | select ARC | 425 | select ARC |
410 | select ARC32 | 426 | select ARC32 |
411 | select BOOT_ELF32 | 427 | select BOOT_ELF32 |
428 | select CEVT_R4K | ||
412 | select DMA_NONCOHERENT | 429 | select DMA_NONCOHERENT |
413 | select HW_HAS_PCI | 430 | select HW_HAS_PCI |
414 | select IRQ_CPU | 431 | select IRQ_CPU |
@@ -536,6 +553,7 @@ config SNI_RM | |||
536 | select ARC32 if CPU_LITTLE_ENDIAN | 553 | select ARC32 if CPU_LITTLE_ENDIAN |
537 | select ARCH_MAY_HAVE_PC_FDC | 554 | select ARCH_MAY_HAVE_PC_FDC |
538 | select BOOT_ELF32 | 555 | select BOOT_ELF32 |
556 | select CEVT_R4K | ||
539 | select DMA_NONCOHERENT | 557 | select DMA_NONCOHERENT |
540 | select GENERIC_ISA_DMA | 558 | select GENERIC_ISA_DMA |
541 | select HW_HAS_EISA | 559 | select HW_HAS_EISA |
@@ -577,6 +595,7 @@ config TOSHIBA_JMR3927 | |||
577 | 595 | ||
578 | config TOSHIBA_RBTX4927 | 596 | config TOSHIBA_RBTX4927 |
579 | bool "Toshiba RBTX49[23]7 board" | 597 | bool "Toshiba RBTX49[23]7 board" |
598 | select CEVT_R4K | ||
580 | select DMA_NONCOHERENT | 599 | select DMA_NONCOHERENT |
581 | select HAS_TXX9_SERIAL | 600 | select HAS_TXX9_SERIAL |
582 | select HW_HAS_PCI | 601 | select HW_HAS_PCI |
@@ -597,6 +616,7 @@ config TOSHIBA_RBTX4927 | |||
597 | 616 | ||
598 | config TOSHIBA_RBTX4938 | 617 | config TOSHIBA_RBTX4938 |
599 | bool "Toshiba RBTX4938 board" | 618 | bool "Toshiba RBTX4938 board" |
619 | select CEVT_R4K | ||
600 | select DMA_NONCOHERENT | 620 | select DMA_NONCOHERENT |
601 | select HAS_TXX9_SERIAL | 621 | select HAS_TXX9_SERIAL |
602 | select HW_HAS_PCI | 622 | select HW_HAS_PCI |
@@ -616,6 +636,7 @@ config TOSHIBA_RBTX4938 | |||
616 | 636 | ||
617 | config WR_PPMC | 637 | config WR_PPMC |
618 | bool "Wind River PPMC board" | 638 | bool "Wind River PPMC board" |
639 | select CEVT_R4K | ||
619 | select IRQ_CPU | 640 | select IRQ_CPU |
620 | select BOOT_ELF32 | 641 | select BOOT_ELF32 |
621 | select DMA_NONCOHERENT | 642 | select DMA_NONCOHERENT |
@@ -708,6 +729,9 @@ config ARCH_MAY_HAVE_PC_FDC | |||
708 | config BOOT_RAW | 729 | config BOOT_RAW |
709 | bool | 730 | bool |
710 | 731 | ||
732 | config CEVT_R4K | ||
733 | bool | ||
734 | |||
711 | config CFE | 735 | config CFE |
712 | bool | 736 | bool |
713 | 737 | ||
@@ -1788,7 +1812,7 @@ config KEXEC | |||
1788 | but it is independent of the system firmware. And like a reboot | 1812 | but it is independent of the system firmware. And like a reboot |
1789 | you can start any kernel with it, not just Linux. | 1813 | you can start any kernel with it, not just Linux. |
1790 | 1814 | ||
1791 | The name comes from the similiarity to the exec system call. | 1815 | The name comes from the similarity to the exec system call. |
1792 | 1816 | ||
1793 | It is an ongoing process to be certain the hardware in a machine | 1817 | It is an ongoing process to be certain the hardware in a machine |
1794 | is properly shutdown, so do not be surprised if this code does not | 1818 | is properly shutdown, so do not be surprised if this code does not |
@@ -1981,7 +2005,7 @@ source "drivers/Kconfig" | |||
1981 | 2005 | ||
1982 | source "fs/Kconfig" | 2006 | source "fs/Kconfig" |
1983 | 2007 | ||
1984 | source "arch/mips/oprofile/Kconfig" | 2008 | source "kernel/Kconfig.instrumentation" |
1985 | 2009 | ||
1986 | source "arch/mips/Kconfig.debug" | 2010 | source "arch/mips/Kconfig.debug" |
1987 | 2011 | ||
diff --git a/arch/mips/au1000/Kconfig b/arch/mips/au1000/Kconfig index a23d4154da01..b36cec58a9a8 100644 --- a/arch/mips/au1000/Kconfig +++ b/arch/mips/au1000/Kconfig | |||
@@ -137,6 +137,7 @@ config SOC_AU1200 | |||
137 | config SOC_AU1X00 | 137 | config SOC_AU1X00 |
138 | bool | 138 | bool |
139 | select 64BIT_PHYS_ADDR | 139 | select 64BIT_PHYS_ADDR |
140 | select CEVT_R4K | ||
140 | select IRQ_CPU | 141 | select IRQ_CPU |
141 | select SYS_HAS_CPU_MIPS32_R1 | 142 | select SYS_HAS_CPU_MIPS32_R1 |
142 | select SYS_SUPPORTS_32BIT_KERNEL | 143 | select SYS_SUPPORTS_32BIT_KERNEL |
diff --git a/arch/mips/au1000/pb1200/irqmap.c b/arch/mips/au1000/pb1200/irqmap.c index 5f48b0603796..bdf00e2a35e4 100644 --- a/arch/mips/au1000/pb1200/irqmap.c +++ b/arch/mips/au1000/pb1200/irqmap.c | |||
@@ -36,8 +36,8 @@ | |||
36 | #include <linux/slab.h> | 36 | #include <linux/slab.h> |
37 | #include <linux/random.h> | 37 | #include <linux/random.h> |
38 | #include <linux/delay.h> | 38 | #include <linux/delay.h> |
39 | #include <linux/bitops.h> | ||
39 | 40 | ||
40 | #include <asm/bitops.h> | ||
41 | #include <asm/bootinfo.h> | 41 | #include <asm/bootinfo.h> |
42 | #include <asm/io.h> | 42 | #include <asm/io.h> |
43 | #include <asm/mipsregs.h> | 43 | #include <asm/mipsregs.h> |
diff --git a/arch/mips/basler/excite/excite_irq.c b/arch/mips/basler/excite/excite_irq.c index 1ecab6350421..4903e067916b 100644 --- a/arch/mips/basler/excite/excite_irq.c +++ b/arch/mips/basler/excite/excite_irq.c | |||
@@ -29,7 +29,7 @@ | |||
29 | #include <linux/timex.h> | 29 | #include <linux/timex.h> |
30 | #include <linux/slab.h> | 30 | #include <linux/slab.h> |
31 | #include <linux/random.h> | 31 | #include <linux/random.h> |
32 | #include <asm/bitops.h> | 32 | #include <linux/bitops.h> |
33 | #include <asm/bootinfo.h> | 33 | #include <asm/bootinfo.h> |
34 | #include <asm/io.h> | 34 | #include <asm/io.h> |
35 | #include <asm/irq.h> | 35 | #include <asm/irq.h> |
diff --git a/arch/mips/bcm47xx/time.c b/arch/mips/bcm47xx/time.c index 0ab4676c8bd3..0c6f47b3fd94 100644 --- a/arch/mips/bcm47xx/time.c +++ b/arch/mips/bcm47xx/time.c | |||
@@ -46,10 +46,3 @@ void __init plat_time_init(void) | |||
46 | /* Set MIPS counter frequency for fixed_rate_gettimeoffset() */ | 46 | /* Set MIPS counter frequency for fixed_rate_gettimeoffset() */ |
47 | mips_hpt_frequency = hz; | 47 | mips_hpt_frequency = hz; |
48 | } | 48 | } |
49 | |||
50 | void __init | ||
51 | plat_timer_setup(struct irqaction *irq) | ||
52 | { | ||
53 | /* Enable the timer interrupt */ | ||
54 | setup_irq(7, irq); | ||
55 | } | ||
diff --git a/arch/mips/configs/ip27_defconfig b/arch/mips/configs/ip27_defconfig index 49bcc58929ba..892d4c38fd0d 100644 --- a/arch/mips/configs/ip27_defconfig +++ b/arch/mips/configs/ip27_defconfig | |||
@@ -175,6 +175,7 @@ CONFIG_POSIX_MQUEUE=y | |||
175 | CONFIG_IKCONFIG=y | 175 | CONFIG_IKCONFIG=y |
176 | CONFIG_IKCONFIG_PROC=y | 176 | CONFIG_IKCONFIG_PROC=y |
177 | CONFIG_LOG_BUF_SHIFT=15 | 177 | CONFIG_LOG_BUF_SHIFT=15 |
178 | CONFIG_CGROUPS=y | ||
178 | CONFIG_CPUSETS=y | 179 | CONFIG_CPUSETS=y |
179 | CONFIG_SYSFS_DEPRECATED=y | 180 | CONFIG_SYSFS_DEPRECATED=y |
180 | CONFIG_RELAY=y | 181 | CONFIG_RELAY=y |
diff --git a/arch/mips/configs/mipssim_defconfig b/arch/mips/configs/mipssim_defconfig index 86dcb7464353..61b72f5a953e 100644 --- a/arch/mips/configs/mipssim_defconfig +++ b/arch/mips/configs/mipssim_defconfig | |||
@@ -1,71 +1,68 @@ | |||
1 | # | 1 | # |
2 | # Automatically generated make config: don't edit | 2 | # Automatically generated make config: don't edit |
3 | # Linux kernel version: 2.6.20 | 3 | # Linux kernel version: 2.6.23 |
4 | # Tue Feb 20 21:47:35 2007 | 4 | # Thu Oct 18 22:45:52 2007 |
5 | # | 5 | # |
6 | CONFIG_MIPS=y | 6 | CONFIG_MIPS=y |
7 | 7 | ||
8 | # | 8 | # |
9 | # Machine selection | 9 | # Machine selection |
10 | # | 10 | # |
11 | CONFIG_ZONE_DMA=y | 11 | # CONFIG_MACH_ALCHEMY is not set |
12 | # CONFIG_MIPS_MTX1 is not set | ||
13 | # CONFIG_MIPS_BOSPORUS is not set | ||
14 | # CONFIG_MIPS_PB1000 is not set | ||
15 | # CONFIG_MIPS_PB1100 is not set | ||
16 | # CONFIG_MIPS_PB1500 is not set | ||
17 | # CONFIG_MIPS_PB1550 is not set | ||
18 | # CONFIG_MIPS_PB1200 is not set | ||
19 | # CONFIG_MIPS_DB1000 is not set | ||
20 | # CONFIG_MIPS_DB1100 is not set | ||
21 | # CONFIG_MIPS_DB1500 is not set | ||
22 | # CONFIG_MIPS_DB1550 is not set | ||
23 | # CONFIG_MIPS_DB1200 is not set | ||
24 | # CONFIG_MIPS_MIRAGE is not set | ||
25 | # CONFIG_BASLER_EXCITE is not set | 12 | # CONFIG_BASLER_EXCITE is not set |
13 | # CONFIG_BCM47XX is not set | ||
26 | # CONFIG_MIPS_COBALT is not set | 14 | # CONFIG_MIPS_COBALT is not set |
27 | # CONFIG_MACH_DECSTATION is not set | 15 | # CONFIG_MACH_DECSTATION is not set |
28 | # CONFIG_MACH_JAZZ is not set | 16 | # CONFIG_MACH_JAZZ is not set |
17 | # CONFIG_LASAT is not set | ||
18 | # CONFIG_LEMOTE_FULONG is not set | ||
29 | # CONFIG_MIPS_ATLAS is not set | 19 | # CONFIG_MIPS_ATLAS is not set |
30 | # CONFIG_MIPS_MALTA is not set | 20 | # CONFIG_MIPS_MALTA is not set |
31 | # CONFIG_MIPS_SEAD is not set | 21 | # CONFIG_MIPS_SEAD is not set |
32 | # CONFIG_WR_PPMC is not set | ||
33 | CONFIG_MIPS_SIM=y | 22 | CONFIG_MIPS_SIM=y |
34 | # CONFIG_MOMENCO_JAGUAR_ATX is not set | 23 | # CONFIG_MARKEINS is not set |
35 | # CONFIG_MIPS_XXS1500 is not set | 24 | # CONFIG_MACH_VR41XX is not set |
36 | # CONFIG_PNX8550_JBS is not set | 25 | # CONFIG_PNX8550_JBS is not set |
37 | # CONFIG_PNX8550_STB810 is not set | 26 | # CONFIG_PNX8550_STB810 is not set |
38 | # CONFIG_MACH_VR41XX is not set | 27 | # CONFIG_PMC_MSP is not set |
39 | # CONFIG_PMC_YOSEMITE is not set | 28 | # CONFIG_PMC_YOSEMITE is not set |
40 | # CONFIG_QEMU is not set | 29 | # CONFIG_QEMU is not set |
41 | # CONFIG_MARKEINS is not set | ||
42 | # CONFIG_SGI_IP22 is not set | 30 | # CONFIG_SGI_IP22 is not set |
43 | # CONFIG_SGI_IP27 is not set | 31 | # CONFIG_SGI_IP27 is not set |
44 | # CONFIG_SGI_IP32 is not set | 32 | # CONFIG_SGI_IP32 is not set |
45 | # CONFIG_SIBYTE_BIGSUR is not set | 33 | # CONFIG_SIBYTE_CRHINE is not set |
34 | # CONFIG_SIBYTE_CARMEL is not set | ||
35 | # CONFIG_SIBYTE_CRHONE is not set | ||
36 | # CONFIG_SIBYTE_RHONE is not set | ||
46 | # CONFIG_SIBYTE_SWARM is not set | 37 | # CONFIG_SIBYTE_SWARM is not set |
38 | # CONFIG_SIBYTE_LITTLESUR is not set | ||
47 | # CONFIG_SIBYTE_SENTOSA is not set | 39 | # CONFIG_SIBYTE_SENTOSA is not set |
48 | # CONFIG_SIBYTE_RHONE is not set | ||
49 | # CONFIG_SIBYTE_CARMEL is not set | ||
50 | # CONFIG_SIBYTE_PTSWARM is not set | 40 | # CONFIG_SIBYTE_PTSWARM is not set |
51 | # CONFIG_SIBYTE_LITTLESUR is not set | 41 | # CONFIG_SIBYTE_BIGSUR is not set |
52 | # CONFIG_SIBYTE_CRHINE is not set | ||
53 | # CONFIG_SIBYTE_CRHONE is not set | ||
54 | # CONFIG_SNI_RM is not set | 42 | # CONFIG_SNI_RM is not set |
55 | # CONFIG_TOSHIBA_JMR3927 is not set | 43 | # CONFIG_TOSHIBA_JMR3927 is not set |
56 | # CONFIG_TOSHIBA_RBTX4927 is not set | 44 | # CONFIG_TOSHIBA_RBTX4927 is not set |
57 | # CONFIG_TOSHIBA_RBTX4938 is not set | 45 | # CONFIG_TOSHIBA_RBTX4938 is not set |
46 | # CONFIG_WR_PPMC is not set | ||
58 | CONFIG_RWSEM_GENERIC_SPINLOCK=y | 47 | CONFIG_RWSEM_GENERIC_SPINLOCK=y |
59 | # CONFIG_ARCH_HAS_ILOG2_U32 is not set | 48 | # CONFIG_ARCH_HAS_ILOG2_U32 is not set |
60 | # CONFIG_ARCH_HAS_ILOG2_U64 is not set | 49 | # CONFIG_ARCH_HAS_ILOG2_U64 is not set |
61 | CONFIG_GENERIC_FIND_NEXT_BIT=y | 50 | CONFIG_GENERIC_FIND_NEXT_BIT=y |
62 | CONFIG_GENERIC_HWEIGHT=y | 51 | CONFIG_GENERIC_HWEIGHT=y |
63 | CONFIG_GENERIC_CALIBRATE_DELAY=y | 52 | CONFIG_GENERIC_CALIBRATE_DELAY=y |
53 | CONFIG_GENERIC_CLOCKEVENTS=y | ||
64 | CONFIG_GENERIC_TIME=y | 54 | CONFIG_GENERIC_TIME=y |
55 | CONFIG_GENERIC_CMOS_UPDATE=y | ||
65 | CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y | 56 | CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y |
66 | # CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ is not set | 57 | # CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ is not set |
58 | CONFIG_BOOT_RAW=y | ||
59 | CONFIG_CEVT_R4K=y | ||
67 | CONFIG_DMA_NONCOHERENT=y | 60 | CONFIG_DMA_NONCOHERENT=y |
68 | CONFIG_DMA_NEED_PCI_MAP_STATE=y | 61 | CONFIG_DMA_NEED_PCI_MAP_STATE=y |
62 | CONFIG_EARLY_PRINTK=y | ||
63 | CONFIG_SYS_HAS_EARLY_PRINTK=y | ||
64 | # CONFIG_HOTPLUG_CPU is not set | ||
65 | # CONFIG_NO_IOPORT is not set | ||
69 | # CONFIG_CPU_BIG_ENDIAN is not set | 66 | # CONFIG_CPU_BIG_ENDIAN is not set |
70 | CONFIG_CPU_LITTLE_ENDIAN=y | 67 | CONFIG_CPU_LITTLE_ENDIAN=y |
71 | CONFIG_SYS_SUPPORTS_BIG_ENDIAN=y | 68 | CONFIG_SYS_SUPPORTS_BIG_ENDIAN=y |
@@ -76,6 +73,11 @@ CONFIG_MIPS_L1_CACHE_SHIFT=5 | |||
76 | # | 73 | # |
77 | # CPU selection | 74 | # CPU selection |
78 | # | 75 | # |
76 | # CONFIG_TICK_ONESHOT is not set | ||
77 | # CONFIG_NO_HZ is not set | ||
78 | # CONFIG_HIGH_RES_TIMERS is not set | ||
79 | CONFIG_GENERIC_CLOCKEVENTS_BUILD=y | ||
80 | # CONFIG_CPU_LOONGSON2 is not set | ||
79 | CONFIG_CPU_MIPS32_R1=y | 81 | CONFIG_CPU_MIPS32_R1=y |
80 | # CONFIG_CPU_MIPS32_R2 is not set | 82 | # CONFIG_CPU_MIPS32_R2 is not set |
81 | # CONFIG_CPU_MIPS64_R1 is not set | 83 | # CONFIG_CPU_MIPS64_R1 is not set |
@@ -115,8 +117,8 @@ CONFIG_CPU_HAS_PREFETCH=y | |||
115 | CONFIG_MIPS_MT_DISABLED=y | 117 | CONFIG_MIPS_MT_DISABLED=y |
116 | # CONFIG_MIPS_MT_SMP is not set | 118 | # CONFIG_MIPS_MT_SMP is not set |
117 | # CONFIG_MIPS_MT_SMTC is not set | 119 | # CONFIG_MIPS_MT_SMTC is not set |
120 | CONFIG_SYS_SUPPORTS_MULTITHREADING=y | ||
118 | # CONFIG_MIPS_VPE_LOADER is not set | 121 | # CONFIG_MIPS_VPE_LOADER is not set |
119 | # CONFIG_64BIT_PHYS_ADDR is not set | ||
120 | CONFIG_CPU_HAS_LLSC=y | 122 | CONFIG_CPU_HAS_LLSC=y |
121 | CONFIG_CPU_HAS_SYNC=y | 123 | CONFIG_CPU_HAS_SYNC=y |
122 | CONFIG_GENERIC_HARDIRQS=y | 124 | CONFIG_GENERIC_HARDIRQS=y |
@@ -130,50 +132,52 @@ CONFIG_FLATMEM_MANUAL=y | |||
130 | CONFIG_FLATMEM=y | 132 | CONFIG_FLATMEM=y |
131 | CONFIG_FLAT_NODE_MEM_MAP=y | 133 | CONFIG_FLAT_NODE_MEM_MAP=y |
132 | # CONFIG_SPARSEMEM_STATIC is not set | 134 | # CONFIG_SPARSEMEM_STATIC is not set |
135 | # CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set | ||
133 | CONFIG_SPLIT_PTLOCK_CPUS=4 | 136 | CONFIG_SPLIT_PTLOCK_CPUS=4 |
134 | # CONFIG_RESOURCES_64BIT is not set | 137 | # CONFIG_RESOURCES_64BIT is not set |
135 | CONFIG_ZONE_DMA_FLAG=1 | 138 | CONFIG_ZONE_DMA_FLAG=0 |
139 | CONFIG_VIRT_TO_BUS=y | ||
136 | # CONFIG_HZ_48 is not set | 140 | # CONFIG_HZ_48 is not set |
137 | # CONFIG_HZ_100 is not set | 141 | CONFIG_HZ_100=y |
138 | # CONFIG_HZ_128 is not set | 142 | # CONFIG_HZ_128 is not set |
139 | # CONFIG_HZ_250 is not set | 143 | # CONFIG_HZ_250 is not set |
140 | # CONFIG_HZ_256 is not set | 144 | # CONFIG_HZ_256 is not set |
141 | CONFIG_HZ_1000=y | 145 | # CONFIG_HZ_1000 is not set |
142 | # CONFIG_HZ_1024 is not set | 146 | # CONFIG_HZ_1024 is not set |
143 | CONFIG_SYS_SUPPORTS_ARBIT_HZ=y | 147 | CONFIG_SYS_SUPPORTS_ARBIT_HZ=y |
144 | CONFIG_HZ=1000 | 148 | CONFIG_HZ=100 |
145 | CONFIG_PREEMPT_NONE=y | 149 | CONFIG_PREEMPT_NONE=y |
146 | # CONFIG_PREEMPT_VOLUNTARY is not set | 150 | # CONFIG_PREEMPT_VOLUNTARY is not set |
147 | # CONFIG_PREEMPT is not set | 151 | # CONFIG_PREEMPT is not set |
148 | # CONFIG_KEXEC is not set | 152 | # CONFIG_KEXEC is not set |
153 | # CONFIG_SECCOMP is not set | ||
149 | CONFIG_LOCKDEP_SUPPORT=y | 154 | CONFIG_LOCKDEP_SUPPORT=y |
150 | CONFIG_STACKTRACE_SUPPORT=y | 155 | CONFIG_STACKTRACE_SUPPORT=y |
151 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" | 156 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" |
152 | 157 | ||
153 | # | 158 | # |
154 | # Code maturity level options | 159 | # General setup |
155 | # | 160 | # |
156 | CONFIG_EXPERIMENTAL=y | 161 | CONFIG_EXPERIMENTAL=y |
157 | CONFIG_BROKEN_ON_SMP=y | 162 | CONFIG_BROKEN_ON_SMP=y |
158 | CONFIG_INIT_ENV_ARG_LIMIT=32 | 163 | CONFIG_INIT_ENV_ARG_LIMIT=32 |
159 | |||
160 | # | ||
161 | # General setup | ||
162 | # | ||
163 | CONFIG_LOCALVERSION="" | 164 | CONFIG_LOCALVERSION="" |
164 | CONFIG_LOCALVERSION_AUTO=y | 165 | CONFIG_LOCALVERSION_AUTO=y |
165 | CONFIG_SWAP=y | 166 | # CONFIG_SWAP is not set |
166 | CONFIG_SYSVIPC=y | 167 | CONFIG_SYSVIPC=y |
167 | # CONFIG_IPC_NS is not set | ||
168 | CONFIG_SYSVIPC_SYSCTL=y | 168 | CONFIG_SYSVIPC_SYSCTL=y |
169 | # CONFIG_POSIX_MQUEUE is not set | 169 | # CONFIG_POSIX_MQUEUE is not set |
170 | # CONFIG_BSD_PROCESS_ACCT is not set | 170 | # CONFIG_BSD_PROCESS_ACCT is not set |
171 | # CONFIG_TASKSTATS is not set | 171 | # CONFIG_TASKSTATS is not set |
172 | # CONFIG_UTS_NS is not set | 172 | # CONFIG_USER_NS is not set |
173 | # CONFIG_AUDIT is not set | 173 | # CONFIG_AUDIT is not set |
174 | # CONFIG_IKCONFIG is not set | 174 | # CONFIG_IKCONFIG is not set |
175 | CONFIG_LOG_BUF_SHIFT=14 | ||
176 | CONFIG_FAIR_GROUP_SCHED=y | ||
177 | CONFIG_FAIR_USER_SCHED=y | ||
175 | CONFIG_SYSFS_DEPRECATED=y | 178 | CONFIG_SYSFS_DEPRECATED=y |
176 | # CONFIG_RELAY is not set | 179 | # CONFIG_RELAY is not set |
180 | # CONFIG_BLK_DEV_INITRD is not set | ||
177 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 181 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
178 | CONFIG_SYSCTL=y | 182 | CONFIG_SYSCTL=y |
179 | CONFIG_EMBEDDED=y | 183 | CONFIG_EMBEDDED=y |
@@ -187,31 +191,29 @@ CONFIG_BUG=y | |||
187 | CONFIG_ELF_CORE=y | 191 | CONFIG_ELF_CORE=y |
188 | CONFIG_BASE_FULL=y | 192 | CONFIG_BASE_FULL=y |
189 | CONFIG_FUTEX=y | 193 | CONFIG_FUTEX=y |
194 | CONFIG_ANON_INODES=y | ||
190 | CONFIG_EPOLL=y | 195 | CONFIG_EPOLL=y |
196 | CONFIG_SIGNALFD=y | ||
197 | CONFIG_EVENTFD=y | ||
191 | CONFIG_SHMEM=y | 198 | CONFIG_SHMEM=y |
192 | CONFIG_SLAB=y | ||
193 | CONFIG_VM_EVENT_COUNTERS=y | 199 | CONFIG_VM_EVENT_COUNTERS=y |
200 | CONFIG_SLAB=y | ||
201 | # CONFIG_SLUB is not set | ||
202 | # CONFIG_SLOB is not set | ||
194 | CONFIG_RT_MUTEXES=y | 203 | CONFIG_RT_MUTEXES=y |
195 | # CONFIG_TINY_SHMEM is not set | 204 | # CONFIG_TINY_SHMEM is not set |
196 | CONFIG_BASE_SMALL=0 | 205 | CONFIG_BASE_SMALL=0 |
197 | # CONFIG_SLOB is not set | ||
198 | |||
199 | # | ||
200 | # Loadable module support | ||
201 | # | ||
202 | CONFIG_MODULES=y | 206 | CONFIG_MODULES=y |
203 | CONFIG_MODULE_UNLOAD=y | 207 | CONFIG_MODULE_UNLOAD=y |
204 | # CONFIG_MODULE_FORCE_UNLOAD is not set | 208 | # CONFIG_MODULE_FORCE_UNLOAD is not set |
205 | CONFIG_MODVERSIONS=y | 209 | CONFIG_MODVERSIONS=y |
206 | CONFIG_MODULE_SRCVERSION_ALL=y | 210 | CONFIG_MODULE_SRCVERSION_ALL=y |
207 | CONFIG_KMOD=y | 211 | CONFIG_KMOD=y |
208 | |||
209 | # | ||
210 | # Block layer | ||
211 | # | ||
212 | CONFIG_BLOCK=y | 212 | CONFIG_BLOCK=y |
213 | # CONFIG_LBD is not set | 213 | # CONFIG_LBD is not set |
214 | # CONFIG_BLK_DEV_IO_TRACE is not set | ||
214 | # CONFIG_LSF is not set | 215 | # CONFIG_LSF is not set |
216 | # CONFIG_BLK_DEV_BSG is not set | ||
215 | 217 | ||
216 | # | 218 | # |
217 | # IO Schedulers | 219 | # IO Schedulers |
@@ -229,18 +231,11 @@ CONFIG_DEFAULT_IOSCHED="anticipatory" | |||
229 | # | 231 | # |
230 | # Bus options (PCI, PCMCIA, EISA, ISA, TC) | 232 | # Bus options (PCI, PCMCIA, EISA, ISA, TC) |
231 | # | 233 | # |
234 | # CONFIG_ARCH_SUPPORTS_MSI is not set | ||
232 | CONFIG_MMU=y | 235 | CONFIG_MMU=y |
233 | |||
234 | # | ||
235 | # PCCARD (PCMCIA/CardBus) support | ||
236 | # | ||
237 | # CONFIG_PCCARD is not set | 236 | # CONFIG_PCCARD is not set |
238 | 237 | ||
239 | # | 238 | # |
240 | # PCI Hotplug Support | ||
241 | # | ||
242 | |||
243 | # | ||
244 | # Executable file formats | 239 | # Executable file formats |
245 | # | 240 | # |
246 | CONFIG_BINFMT_ELF=y | 241 | CONFIG_BINFMT_ELF=y |
@@ -250,9 +245,8 @@ CONFIG_TRAD_SIGNALS=y | |||
250 | # | 245 | # |
251 | # Power management options | 246 | # Power management options |
252 | # | 247 | # |
253 | CONFIG_PM=y | 248 | # CONFIG_PM is not set |
254 | # CONFIG_PM_LEGACY is not set | 249 | CONFIG_SUSPEND_UP_POSSIBLE=y |
255 | # CONFIG_PM_DEBUG is not set | ||
256 | 250 | ||
257 | # | 251 | # |
258 | # Networking | 252 | # Networking |
@@ -262,75 +256,50 @@ CONFIG_NET=y | |||
262 | # | 256 | # |
263 | # Networking options | 257 | # Networking options |
264 | # | 258 | # |
265 | # CONFIG_NETDEBUG is not set | ||
266 | CONFIG_PACKET=y | 259 | CONFIG_PACKET=y |
267 | CONFIG_PACKET_MMAP=y | 260 | CONFIG_PACKET_MMAP=y |
268 | CONFIG_UNIX=y | 261 | CONFIG_UNIX=y |
269 | CONFIG_XFRM=y | 262 | # CONFIG_NET_KEY is not set |
270 | # CONFIG_XFRM_USER is not set | ||
271 | # CONFIG_XFRM_SUB_POLICY is not set | ||
272 | CONFIG_XFRM_MIGRATE=y | ||
273 | CONFIG_NET_KEY=y | ||
274 | CONFIG_NET_KEY_MIGRATE=y | ||
275 | CONFIG_INET=y | 263 | CONFIG_INET=y |
276 | CONFIG_IP_MULTICAST=y | 264 | CONFIG_IP_MULTICAST=y |
277 | CONFIG_IP_ADVANCED_ROUTER=y | 265 | CONFIG_IP_ADVANCED_ROUTER=y |
278 | CONFIG_ASK_IP_FIB_HASH=y | 266 | CONFIG_ASK_IP_FIB_HASH=y |
279 | # CONFIG_IP_FIB_TRIE is not set | 267 | # CONFIG_IP_FIB_TRIE is not set |
280 | CONFIG_IP_FIB_HASH=y | 268 | CONFIG_IP_FIB_HASH=y |
281 | CONFIG_IP_MULTIPLE_TABLES=y | 269 | # CONFIG_IP_MULTIPLE_TABLES is not set |
282 | CONFIG_IP_ROUTE_MULTIPATH=y | 270 | # CONFIG_IP_ROUTE_MULTIPATH is not set |
283 | # CONFIG_IP_ROUTE_MULTIPATH_CACHED is not set | 271 | # CONFIG_IP_ROUTE_VERBOSE is not set |
284 | CONFIG_IP_ROUTE_VERBOSE=y | ||
285 | CONFIG_IP_PNP=y | 272 | CONFIG_IP_PNP=y |
286 | CONFIG_IP_PNP_DHCP=y | 273 | CONFIG_IP_PNP_DHCP=y |
287 | CONFIG_IP_PNP_BOOTP=y | 274 | CONFIG_IP_PNP_BOOTP=y |
288 | # CONFIG_IP_PNP_RARP is not set | 275 | # CONFIG_IP_PNP_RARP is not set |
289 | # CONFIG_NET_IPIP is not set | 276 | # CONFIG_NET_IPIP is not set |
290 | # CONFIG_NET_IPGRE is not set | 277 | # CONFIG_NET_IPGRE is not set |
291 | CONFIG_IP_MROUTE=y | 278 | # CONFIG_IP_MROUTE is not set |
292 | CONFIG_IP_PIMSM_V1=y | ||
293 | CONFIG_IP_PIMSM_V2=y | ||
294 | # CONFIG_ARPD is not set | 279 | # CONFIG_ARPD is not set |
295 | CONFIG_SYN_COOKIES=y | 280 | # CONFIG_SYN_COOKIES is not set |
296 | # CONFIG_INET_AH is not set | 281 | # CONFIG_INET_AH is not set |
297 | # CONFIG_INET_ESP is not set | 282 | # CONFIG_INET_ESP is not set |
298 | # CONFIG_INET_IPCOMP is not set | 283 | # CONFIG_INET_IPCOMP is not set |
299 | # CONFIG_INET_XFRM_TUNNEL is not set | 284 | # CONFIG_INET_XFRM_TUNNEL is not set |
300 | # CONFIG_INET_TUNNEL is not set | 285 | # CONFIG_INET_TUNNEL is not set |
301 | CONFIG_INET_XFRM_MODE_TRANSPORT=m | 286 | # CONFIG_INET_XFRM_MODE_TRANSPORT is not set |
302 | CONFIG_INET_XFRM_MODE_TUNNEL=m | 287 | # CONFIG_INET_XFRM_MODE_TUNNEL is not set |
303 | CONFIG_INET_XFRM_MODE_BEET=m | 288 | # CONFIG_INET_XFRM_MODE_BEET is not set |
289 | # CONFIG_INET_LRO is not set | ||
304 | CONFIG_INET_DIAG=y | 290 | CONFIG_INET_DIAG=y |
305 | CONFIG_INET_TCP_DIAG=y | 291 | CONFIG_INET_TCP_DIAG=y |
306 | # CONFIG_TCP_CONG_ADVANCED is not set | 292 | # CONFIG_TCP_CONG_ADVANCED is not set |
307 | CONFIG_TCP_CONG_CUBIC=y | 293 | CONFIG_TCP_CONG_CUBIC=y |
308 | CONFIG_DEFAULT_TCP_CONG="cubic" | 294 | CONFIG_DEFAULT_TCP_CONG="cubic" |
309 | CONFIG_TCP_MD5SIG=y | 295 | # CONFIG_TCP_MD5SIG is not set |
310 | # CONFIG_IPV6 is not set | 296 | # CONFIG_IPV6 is not set |
311 | # CONFIG_INET6_XFRM_TUNNEL is not set | 297 | # CONFIG_INET6_XFRM_TUNNEL is not set |
312 | # CONFIG_INET6_TUNNEL is not set | 298 | # CONFIG_INET6_TUNNEL is not set |
313 | CONFIG_NETWORK_SECMARK=y | 299 | # CONFIG_NETWORK_SECMARK is not set |
314 | # CONFIG_NETFILTER is not set | 300 | # CONFIG_NETFILTER is not set |
315 | |||
316 | # | ||
317 | # DCCP Configuration (EXPERIMENTAL) | ||
318 | # | ||
319 | # CONFIG_IP_DCCP is not set | 301 | # CONFIG_IP_DCCP is not set |
320 | 302 | # CONFIG_IP_SCTP is not set | |
321 | # | ||
322 | # SCTP Configuration (EXPERIMENTAL) | ||
323 | # | ||
324 | CONFIG_IP_SCTP=m | ||
325 | # CONFIG_SCTP_DBG_MSG is not set | ||
326 | # CONFIG_SCTP_DBG_OBJCNT is not set | ||
327 | # CONFIG_SCTP_HMAC_NONE is not set | ||
328 | # CONFIG_SCTP_HMAC_SHA1 is not set | ||
329 | CONFIG_SCTP_HMAC_MD5=y | ||
330 | |||
331 | # | ||
332 | # TIPC Configuration (EXPERIMENTAL) | ||
333 | # | ||
334 | # CONFIG_TIPC is not set | 303 | # CONFIG_TIPC is not set |
335 | # CONFIG_ATM is not set | 304 | # CONFIG_ATM is not set |
336 | # CONFIG_BRIDGE is not set | 305 | # CONFIG_BRIDGE is not set |
@@ -347,44 +316,7 @@ CONFIG_SCTP_HMAC_MD5=y | |||
347 | # | 316 | # |
348 | # QoS and/or fair queueing | 317 | # QoS and/or fair queueing |
349 | # | 318 | # |
350 | CONFIG_NET_SCHED=y | 319 | # CONFIG_NET_SCHED is not set |
351 | CONFIG_NET_SCH_FIFO=y | ||
352 | CONFIG_NET_SCH_CLK_JIFFIES=y | ||
353 | # CONFIG_NET_SCH_CLK_GETTIMEOFDAY is not set | ||
354 | # CONFIG_NET_SCH_CLK_CPU is not set | ||
355 | |||
356 | # | ||
357 | # Queueing/Scheduling | ||
358 | # | ||
359 | CONFIG_NET_SCH_CBQ=m | ||
360 | CONFIG_NET_SCH_HTB=m | ||
361 | CONFIG_NET_SCH_HFSC=m | ||
362 | CONFIG_NET_SCH_PRIO=m | ||
363 | CONFIG_NET_SCH_RED=m | ||
364 | CONFIG_NET_SCH_SFQ=m | ||
365 | CONFIG_NET_SCH_TEQL=m | ||
366 | CONFIG_NET_SCH_TBF=m | ||
367 | CONFIG_NET_SCH_GRED=m | ||
368 | CONFIG_NET_SCH_DSMARK=m | ||
369 | CONFIG_NET_SCH_NETEM=m | ||
370 | CONFIG_NET_SCH_INGRESS=m | ||
371 | |||
372 | # | ||
373 | # Classification | ||
374 | # | ||
375 | CONFIG_NET_CLS=y | ||
376 | CONFIG_NET_CLS_BASIC=m | ||
377 | CONFIG_NET_CLS_TCINDEX=m | ||
378 | CONFIG_NET_CLS_ROUTE4=m | ||
379 | CONFIG_NET_CLS_ROUTE=y | ||
380 | # CONFIG_NET_CLS_FW is not set | ||
381 | # CONFIG_NET_CLS_U32 is not set | ||
382 | # CONFIG_NET_CLS_RSVP is not set | ||
383 | # CONFIG_NET_CLS_RSVP6 is not set | ||
384 | # CONFIG_NET_EMATCH is not set | ||
385 | # CONFIG_NET_CLS_ACT is not set | ||
386 | # CONFIG_NET_CLS_POLICE is not set | ||
387 | CONFIG_NET_ESTIMATOR=y | ||
388 | 320 | ||
389 | # | 321 | # |
390 | # Network testing | 322 | # Network testing |
@@ -393,8 +325,17 @@ CONFIG_NET_ESTIMATOR=y | |||
393 | # CONFIG_HAMRADIO is not set | 325 | # CONFIG_HAMRADIO is not set |
394 | # CONFIG_IRDA is not set | 326 | # CONFIG_IRDA is not set |
395 | # CONFIG_BT is not set | 327 | # CONFIG_BT is not set |
328 | # CONFIG_AF_RXRPC is not set | ||
329 | |||
330 | # | ||
331 | # Wireless | ||
332 | # | ||
333 | # CONFIG_CFG80211 is not set | ||
334 | # CONFIG_WIRELESS_EXT is not set | ||
335 | # CONFIG_MAC80211 is not set | ||
396 | # CONFIG_IEEE80211 is not set | 336 | # CONFIG_IEEE80211 is not set |
397 | CONFIG_FIB_RULES=y | 337 | # CONFIG_RFKILL is not set |
338 | # CONFIG_NET_9P is not set | ||
398 | 339 | ||
399 | # | 340 | # |
400 | # Device Drivers | 341 | # Device Drivers |
@@ -403,52 +344,25 @@ CONFIG_FIB_RULES=y | |||
403 | # | 344 | # |
404 | # Generic Driver Options | 345 | # Generic Driver Options |
405 | # | 346 | # |
347 | CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" | ||
406 | # CONFIG_STANDALONE is not set | 348 | # CONFIG_STANDALONE is not set |
407 | # CONFIG_PREVENT_FIRMWARE_BUILD is not set | 349 | # CONFIG_PREVENT_FIRMWARE_BUILD is not set |
408 | # CONFIG_FW_LOADER is not set | 350 | # CONFIG_FW_LOADER is not set |
409 | # CONFIG_DEBUG_DRIVER is not set | 351 | # CONFIG_DEBUG_DRIVER is not set |
410 | # CONFIG_DEBUG_DEVRES is not set | 352 | # CONFIG_DEBUG_DEVRES is not set |
411 | # CONFIG_SYS_HYPERVISOR is not set | 353 | # CONFIG_SYS_HYPERVISOR is not set |
412 | |||
413 | # | ||
414 | # Connector - unified userspace <-> kernelspace linker | ||
415 | # | ||
416 | # CONFIG_CONNECTOR is not set | 354 | # CONFIG_CONNECTOR is not set |
417 | |||
418 | # | ||
419 | # Memory Technology Devices (MTD) | ||
420 | # | ||
421 | # CONFIG_MTD is not set | 355 | # CONFIG_MTD is not set |
422 | |||
423 | # | ||
424 | # Parallel port support | ||
425 | # | ||
426 | # CONFIG_PARPORT is not set | 356 | # CONFIG_PARPORT is not set |
427 | 357 | CONFIG_BLK_DEV=y | |
428 | # | ||
429 | # Plug and Play support | ||
430 | # | ||
431 | # CONFIG_PNPACPI is not set | ||
432 | |||
433 | # | ||
434 | # Block devices | ||
435 | # | ||
436 | # CONFIG_BLK_DEV_COW_COMMON is not set | 358 | # CONFIG_BLK_DEV_COW_COMMON is not set |
437 | CONFIG_BLK_DEV_LOOP=y | 359 | CONFIG_BLK_DEV_LOOP=y |
438 | # CONFIG_BLK_DEV_CRYPTOLOOP is not set | 360 | # CONFIG_BLK_DEV_CRYPTOLOOP is not set |
439 | CONFIG_BLK_DEV_NBD=y | 361 | CONFIG_BLK_DEV_NBD=y |
440 | # CONFIG_BLK_DEV_RAM is not set | 362 | # CONFIG_BLK_DEV_RAM is not set |
441 | # CONFIG_BLK_DEV_INITRD is not set | ||
442 | # CONFIG_CDROM_PKTCDVD is not set | 363 | # CONFIG_CDROM_PKTCDVD is not set |
443 | # CONFIG_ATA_OVER_ETH is not set | 364 | # CONFIG_ATA_OVER_ETH is not set |
444 | 365 | # CONFIG_MISC_DEVICES is not set | |
445 | # | ||
446 | # Misc devices | ||
447 | # | ||
448 | |||
449 | # | ||
450 | # ATA/ATAPI/MFM/RLL support | ||
451 | # | ||
452 | # CONFIG_IDE is not set | 366 | # CONFIG_IDE is not set |
453 | 367 | ||
454 | # | 368 | # |
@@ -456,48 +370,29 @@ CONFIG_BLK_DEV_NBD=y | |||
456 | # | 370 | # |
457 | # CONFIG_RAID_ATTRS is not set | 371 | # CONFIG_RAID_ATTRS is not set |
458 | # CONFIG_SCSI is not set | 372 | # CONFIG_SCSI is not set |
373 | # CONFIG_SCSI_DMA is not set | ||
459 | # CONFIG_SCSI_NETLINK is not set | 374 | # CONFIG_SCSI_NETLINK is not set |
460 | |||
461 | # | ||
462 | # Serial ATA (prod) and Parallel ATA (experimental) drivers | ||
463 | # | ||
464 | # CONFIG_ATA is not set | 375 | # CONFIG_ATA is not set |
465 | |||
466 | # | ||
467 | # Multi-device support (RAID and LVM) | ||
468 | # | ||
469 | # CONFIG_MD is not set | 376 | # CONFIG_MD is not set |
470 | |||
471 | # | ||
472 | # Fusion MPT device support | ||
473 | # | ||
474 | # CONFIG_FUSION is not set | ||
475 | |||
476 | # | ||
477 | # IEEE 1394 (FireWire) support | ||
478 | # | ||
479 | |||
480 | # | ||
481 | # I2O device support | ||
482 | # | ||
483 | |||
484 | # | ||
485 | # Network device support | ||
486 | # | ||
487 | CONFIG_NETDEVICES=y | 377 | CONFIG_NETDEVICES=y |
378 | # CONFIG_NETDEVICES_MULTIQUEUE is not set | ||
488 | # CONFIG_DUMMY is not set | 379 | # CONFIG_DUMMY is not set |
489 | # CONFIG_BONDING is not set | 380 | # CONFIG_BONDING is not set |
381 | # CONFIG_MACVLAN is not set | ||
490 | # CONFIG_EQUALIZER is not set | 382 | # CONFIG_EQUALIZER is not set |
491 | # CONFIG_TUN is not set | 383 | # CONFIG_TUN is not set |
384 | # CONFIG_VETH is not set | ||
492 | # CONFIG_PHYLIB is not set | 385 | # CONFIG_PHYLIB is not set |
493 | |||
494 | # | ||
495 | # Ethernet (10 or 100Mbit) | ||
496 | # | ||
497 | CONFIG_NET_ETHERNET=y | 386 | CONFIG_NET_ETHERNET=y |
498 | # CONFIG_MII is not set | 387 | # CONFIG_MII is not set |
388 | # CONFIG_AX88796 is not set | ||
499 | CONFIG_MIPS_SIM_NET=y | 389 | CONFIG_MIPS_SIM_NET=y |
500 | # CONFIG_DM9000 is not set | 390 | # CONFIG_DM9000 is not set |
391 | # CONFIG_IBM_NEW_EMAC_ZMII is not set | ||
392 | # CONFIG_IBM_NEW_EMAC_RGMII is not set | ||
393 | # CONFIG_IBM_NEW_EMAC_TAH is not set | ||
394 | # CONFIG_IBM_NEW_EMAC_EMAC4 is not set | ||
395 | # CONFIG_B44 is not set | ||
501 | # CONFIG_NETDEV_1000 is not set | 396 | # CONFIG_NETDEV_1000 is not set |
502 | # CONFIG_NETDEV_10000 is not set | 397 | # CONFIG_NETDEV_10000 is not set |
503 | 398 | ||
@@ -513,49 +408,18 @@ CONFIG_MIPS_SIM_NET=y | |||
513 | # CONFIG_NETCONSOLE is not set | 408 | # CONFIG_NETCONSOLE is not set |
514 | # CONFIG_NETPOLL is not set | 409 | # CONFIG_NETPOLL is not set |
515 | # CONFIG_NET_POLL_CONTROLLER is not set | 410 | # CONFIG_NET_POLL_CONTROLLER is not set |
516 | |||
517 | # | ||
518 | # ISDN subsystem | ||
519 | # | ||
520 | # CONFIG_ISDN is not set | 411 | # CONFIG_ISDN is not set |
521 | |||
522 | # | ||
523 | # Telephony Support | ||
524 | # | ||
525 | # CONFIG_PHONE is not set | 412 | # CONFIG_PHONE is not set |
526 | 413 | ||
527 | # | 414 | # |
528 | # Input device support | 415 | # Input device support |
529 | # | 416 | # |
530 | CONFIG_INPUT=y | 417 | # CONFIG_INPUT is not set |
531 | # CONFIG_INPUT_FF_MEMLESS is not set | ||
532 | |||
533 | # | ||
534 | # Userland interfaces | ||
535 | # | ||
536 | # CONFIG_INPUT_MOUSEDEV is not set | ||
537 | # CONFIG_INPUT_JOYDEV is not set | ||
538 | # CONFIG_INPUT_TSDEV is not set | ||
539 | # CONFIG_INPUT_EVDEV is not set | ||
540 | # CONFIG_INPUT_EVBUG is not set | ||
541 | |||
542 | # | ||
543 | # Input Device Drivers | ||
544 | # | ||
545 | # CONFIG_INPUT_KEYBOARD is not set | ||
546 | # CONFIG_INPUT_MOUSE is not set | ||
547 | # CONFIG_INPUT_JOYSTICK is not set | ||
548 | # CONFIG_INPUT_TOUCHSCREEN is not set | ||
549 | # CONFIG_INPUT_MISC is not set | ||
550 | 418 | ||
551 | # | 419 | # |
552 | # Hardware I/O ports | 420 | # Hardware I/O ports |
553 | # | 421 | # |
554 | CONFIG_SERIO=y | 422 | # CONFIG_SERIO is not set |
555 | # CONFIG_SERIO_I8042 is not set | ||
556 | CONFIG_SERIO_SERPORT=y | ||
557 | # CONFIG_SERIO_LIBPS2 is not set | ||
558 | # CONFIG_SERIO_RAW is not set | ||
559 | # CONFIG_GAMEPORT is not set | 423 | # CONFIG_GAMEPORT is not set |
560 | 424 | ||
561 | # | 425 | # |
@@ -581,31 +445,13 @@ CONFIG_SERIAL_CORE_CONSOLE=y | |||
581 | CONFIG_UNIX98_PTYS=y | 445 | CONFIG_UNIX98_PTYS=y |
582 | CONFIG_LEGACY_PTYS=y | 446 | CONFIG_LEGACY_PTYS=y |
583 | CONFIG_LEGACY_PTY_COUNT=256 | 447 | CONFIG_LEGACY_PTY_COUNT=256 |
584 | |||
585 | # | ||
586 | # IPMI | ||
587 | # | ||
588 | # CONFIG_IPMI_HANDLER is not set | 448 | # CONFIG_IPMI_HANDLER is not set |
589 | |||
590 | # | ||
591 | # Watchdog Cards | ||
592 | # | ||
593 | # CONFIG_WATCHDOG is not set | 449 | # CONFIG_WATCHDOG is not set |
594 | # CONFIG_HW_RANDOM is not set | 450 | # CONFIG_HW_RANDOM is not set |
595 | # CONFIG_RTC is not set | 451 | # CONFIG_RTC is not set |
596 | # CONFIG_GEN_RTC is not set | ||
597 | # CONFIG_DTLK is not set | ||
598 | # CONFIG_R3964 is not set | 452 | # CONFIG_R3964 is not set |
599 | # CONFIG_RAW_DRIVER is not set | 453 | # CONFIG_RAW_DRIVER is not set |
600 | |||
601 | # | ||
602 | # TPM devices | ||
603 | # | ||
604 | # CONFIG_TCG_TPM is not set | 454 | # CONFIG_TCG_TPM is not set |
605 | |||
606 | # | ||
607 | # I2C support | ||
608 | # | ||
609 | # CONFIG_I2C is not set | 455 | # CONFIG_I2C is not set |
610 | 456 | ||
611 | # | 457 | # |
@@ -613,118 +459,60 @@ CONFIG_LEGACY_PTY_COUNT=256 | |||
613 | # | 459 | # |
614 | # CONFIG_SPI is not set | 460 | # CONFIG_SPI is not set |
615 | # CONFIG_SPI_MASTER is not set | 461 | # CONFIG_SPI_MASTER is not set |
462 | # CONFIG_W1 is not set | ||
463 | # CONFIG_POWER_SUPPLY is not set | ||
464 | # CONFIG_HWMON is not set | ||
616 | 465 | ||
617 | # | 466 | # |
618 | # Dallas's 1-wire bus | 467 | # Sonics Silicon Backplane |
619 | # | 468 | # |
620 | # CONFIG_W1 is not set | 469 | CONFIG_SSB_POSSIBLE=y |
470 | # CONFIG_SSB is not set | ||
621 | 471 | ||
622 | # | 472 | # |
623 | # Hardware Monitoring support | 473 | # Multifunction device drivers |
624 | # | 474 | # |
625 | # CONFIG_HWMON is not set | 475 | # CONFIG_MFD_SM501 is not set |
626 | # CONFIG_HWMON_VID is not set | ||
627 | 476 | ||
628 | # | 477 | # |
629 | # Multimedia devices | 478 | # Multimedia devices |
630 | # | 479 | # |
631 | # CONFIG_VIDEO_DEV is not set | 480 | # CONFIG_VIDEO_DEV is not set |
632 | 481 | # CONFIG_DVB_CORE is not set | |
633 | # | 482 | # CONFIG_DAB is not set |
634 | # Digital Video Broadcasting Devices | ||
635 | # | ||
636 | # CONFIG_DVB is not set | ||
637 | 483 | ||
638 | # | 484 | # |
639 | # Graphics support | 485 | # Graphics support |
640 | # | 486 | # |
641 | # CONFIG_FIRMWARE_EDID is not set | 487 | # CONFIG_VGASTATE is not set |
488 | # CONFIG_VIDEO_OUTPUT_CONTROL is not set | ||
642 | # CONFIG_FB is not set | 489 | # CONFIG_FB is not set |
490 | # CONFIG_BACKLIGHT_LCD_SUPPORT is not set | ||
643 | 491 | ||
644 | # | 492 | # |
645 | # Sound | 493 | # Display device support |
646 | # | 494 | # |
647 | # CONFIG_SOUND is not set | 495 | # CONFIG_DISPLAY_SUPPORT is not set |
648 | 496 | ||
649 | # | 497 | # |
650 | # HID Devices | 498 | # Sound |
651 | # | ||
652 | # CONFIG_HID is not set | ||
653 | |||
654 | # | ||
655 | # USB support | ||
656 | # | ||
657 | # CONFIG_USB_ARCH_HAS_HCD is not set | ||
658 | # CONFIG_USB_ARCH_HAS_OHCI is not set | ||
659 | # CONFIG_USB_ARCH_HAS_EHCI is not set | ||
660 | |||
661 | # | ||
662 | # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' | ||
663 | # | ||
664 | |||
665 | # | ||
666 | # USB Gadget Support | ||
667 | # | ||
668 | # CONFIG_USB_GADGET is not set | ||
669 | |||
670 | # | ||
671 | # MMC/SD Card support | ||
672 | # | 499 | # |
500 | # CONFIG_SOUND is not set | ||
501 | # CONFIG_USB_SUPPORT is not set | ||
673 | # CONFIG_MMC is not set | 502 | # CONFIG_MMC is not set |
674 | |||
675 | # | ||
676 | # LED devices | ||
677 | # | ||
678 | # CONFIG_NEW_LEDS is not set | 503 | # CONFIG_NEW_LEDS is not set |
679 | 504 | CONFIG_RTC_LIB=y | |
680 | # | ||
681 | # LED drivers | ||
682 | # | ||
683 | |||
684 | # | ||
685 | # LED Triggers | ||
686 | # | ||
687 | |||
688 | # | ||
689 | # InfiniBand support | ||
690 | # | ||
691 | |||
692 | # | ||
693 | # EDAC - error detection and reporting (RAS) (EXPERIMENTAL) | ||
694 | # | ||
695 | |||
696 | # | ||
697 | # Real Time Clock | ||
698 | # | ||
699 | # CONFIG_RTC_CLASS is not set | 505 | # CONFIG_RTC_CLASS is not set |
700 | 506 | ||
701 | # | 507 | # |
702 | # DMA Engine support | 508 | # Userspace I/O |
703 | # | ||
704 | # CONFIG_DMA_ENGINE is not set | ||
705 | |||
706 | # | ||
707 | # DMA Clients | ||
708 | # | ||
709 | |||
710 | # | ||
711 | # DMA Devices | ||
712 | # | ||
713 | |||
714 | # | ||
715 | # Auxiliary Display support | ||
716 | # | ||
717 | |||
718 | # | ||
719 | # Virtualization | ||
720 | # | 509 | # |
510 | # CONFIG_UIO is not set | ||
721 | 511 | ||
722 | # | 512 | # |
723 | # File systems | 513 | # File systems |
724 | # | 514 | # |
725 | CONFIG_EXT2_FS=y | 515 | # CONFIG_EXT2_FS is not set |
726 | # CONFIG_EXT2_FS_XATTR is not set | ||
727 | # CONFIG_EXT2_FS_XIP is not set | ||
728 | # CONFIG_EXT3_FS is not set | 516 | # CONFIG_EXT3_FS is not set |
729 | # CONFIG_EXT4DEV_FS is not set | 517 | # CONFIG_EXT4DEV_FS is not set |
730 | # CONFIG_REISERFS_FS is not set | 518 | # CONFIG_REISERFS_FS is not set |
@@ -732,6 +520,7 @@ CONFIG_EXT2_FS=y | |||
732 | # CONFIG_FS_POSIX_ACL is not set | 520 | # CONFIG_FS_POSIX_ACL is not set |
733 | # CONFIG_XFS_FS is not set | 521 | # CONFIG_XFS_FS is not set |
734 | # CONFIG_GFS2_FS is not set | 522 | # CONFIG_GFS2_FS is not set |
523 | # CONFIG_OCFS2_FS is not set | ||
735 | # CONFIG_MINIX_FS is not set | 524 | # CONFIG_MINIX_FS is not set |
736 | CONFIG_ROMFS_FS=y | 525 | CONFIG_ROMFS_FS=y |
737 | # CONFIG_INOTIFY is not set | 526 | # CONFIG_INOTIFY is not set |
@@ -760,10 +549,11 @@ CONFIG_ROMFS_FS=y | |||
760 | CONFIG_PROC_FS=y | 549 | CONFIG_PROC_FS=y |
761 | # CONFIG_PROC_KCORE is not set | 550 | # CONFIG_PROC_KCORE is not set |
762 | CONFIG_PROC_SYSCTL=y | 551 | CONFIG_PROC_SYSCTL=y |
763 | # CONFIG_SYSFS is not set | 552 | CONFIG_SYSFS=y |
764 | # CONFIG_TMPFS is not set | 553 | CONFIG_TMPFS=y |
554 | # CONFIG_TMPFS_POSIX_ACL is not set | ||
765 | # CONFIG_HUGETLB_PAGE is not set | 555 | # CONFIG_HUGETLB_PAGE is not set |
766 | CONFIG_RAMFS=y | 556 | # CONFIG_CONFIGFS_FS is not set |
767 | 557 | ||
768 | # | 558 | # |
769 | # Miscellaneous filesystems | 559 | # Miscellaneous filesystems |
@@ -781,10 +571,7 @@ CONFIG_RAMFS=y | |||
781 | # CONFIG_QNX4FS_FS is not set | 571 | # CONFIG_QNX4FS_FS is not set |
782 | # CONFIG_SYSV_FS is not set | 572 | # CONFIG_SYSV_FS is not set |
783 | # CONFIG_UFS_FS is not set | 573 | # CONFIG_UFS_FS is not set |
784 | 574 | CONFIG_NETWORK_FILESYSTEMS=y | |
785 | # | ||
786 | # Network File Systems | ||
787 | # | ||
788 | CONFIG_NFS_FS=y | 575 | CONFIG_NFS_FS=y |
789 | CONFIG_NFS_V3=y | 576 | CONFIG_NFS_V3=y |
790 | # CONFIG_NFS_V3_ACL is not set | 577 | # CONFIG_NFS_V3_ACL is not set |
@@ -796,6 +583,7 @@ CONFIG_LOCKD=y | |||
796 | CONFIG_LOCKD_V4=y | 583 | CONFIG_LOCKD_V4=y |
797 | CONFIG_NFS_COMMON=y | 584 | CONFIG_NFS_COMMON=y |
798 | CONFIG_SUNRPC=y | 585 | CONFIG_SUNRPC=y |
586 | # CONFIG_SUNRPC_BIND34 is not set | ||
799 | # CONFIG_RPCSEC_GSS_KRB5 is not set | 587 | # CONFIG_RPCSEC_GSS_KRB5 is not set |
800 | # CONFIG_RPCSEC_GSS_SPKM3 is not set | 588 | # CONFIG_RPCSEC_GSS_SPKM3 is not set |
801 | # CONFIG_SMB_FS is not set | 589 | # CONFIG_SMB_FS is not set |
@@ -803,22 +591,14 @@ CONFIG_SUNRPC=y | |||
803 | # CONFIG_NCP_FS is not set | 591 | # CONFIG_NCP_FS is not set |
804 | # CONFIG_CODA_FS is not set | 592 | # CONFIG_CODA_FS is not set |
805 | # CONFIG_AFS_FS is not set | 593 | # CONFIG_AFS_FS is not set |
806 | # CONFIG_9P_FS is not set | ||
807 | 594 | ||
808 | # | 595 | # |
809 | # Partition Types | 596 | # Partition Types |
810 | # | 597 | # |
811 | # CONFIG_PARTITION_ADVANCED is not set | 598 | # CONFIG_PARTITION_ADVANCED is not set |
812 | CONFIG_MSDOS_PARTITION=y | 599 | CONFIG_MSDOS_PARTITION=y |
813 | |||
814 | # | ||
815 | # Native Language Support | ||
816 | # | ||
817 | # CONFIG_NLS is not set | 600 | # CONFIG_NLS is not set |
818 | 601 | # CONFIG_DLM is not set | |
819 | # | ||
820 | # Distributed Lock Manager | ||
821 | # | ||
822 | 602 | ||
823 | # | 603 | # |
824 | # Profiling support | 604 | # Profiling support |
@@ -833,20 +613,22 @@ CONFIG_TRACE_IRQFLAGS_SUPPORT=y | |||
833 | CONFIG_ENABLE_MUST_CHECK=y | 613 | CONFIG_ENABLE_MUST_CHECK=y |
834 | # CONFIG_MAGIC_SYSRQ is not set | 614 | # CONFIG_MAGIC_SYSRQ is not set |
835 | # CONFIG_UNUSED_SYMBOLS is not set | 615 | # CONFIG_UNUSED_SYMBOLS is not set |
616 | # CONFIG_DEBUG_FS is not set | ||
836 | # CONFIG_HEADERS_CHECK is not set | 617 | # CONFIG_HEADERS_CHECK is not set |
837 | CONFIG_DEBUG_KERNEL=y | 618 | CONFIG_DEBUG_KERNEL=y |
838 | # CONFIG_DEBUG_SHIRQ is not set | 619 | # CONFIG_DEBUG_SHIRQ is not set |
839 | CONFIG_LOG_BUF_SHIFT=14 | ||
840 | # CONFIG_DETECT_SOFTLOCKUP is not set | 620 | # CONFIG_DETECT_SOFTLOCKUP is not set |
621 | # CONFIG_SCHED_DEBUG is not set | ||
841 | # CONFIG_SCHEDSTATS is not set | 622 | # CONFIG_SCHEDSTATS is not set |
842 | # CONFIG_TIMER_STATS is not set | 623 | # CONFIG_TIMER_STATS is not set |
843 | # CONFIG_DEBUG_SLAB is not set | 624 | # CONFIG_DEBUG_SLAB is not set |
844 | # CONFIG_DEBUG_RT_MUTEXES is not set | 625 | # CONFIG_DEBUG_RT_MUTEXES is not set |
845 | # CONFIG_RT_MUTEX_TESTER is not set | 626 | # CONFIG_RT_MUTEX_TESTER is not set |
846 | # CONFIG_DEBUG_SPINLOCK is not set | 627 | # CONFIG_DEBUG_SPINLOCK is not set |
847 | CONFIG_DEBUG_MUTEXES=y | 628 | # CONFIG_DEBUG_MUTEXES is not set |
848 | # CONFIG_DEBUG_LOCK_ALLOC is not set | 629 | # CONFIG_DEBUG_LOCK_ALLOC is not set |
849 | # CONFIG_PROVE_LOCKING is not set | 630 | # CONFIG_PROVE_LOCKING is not set |
631 | # CONFIG_LOCK_STAT is not set | ||
850 | # CONFIG_DEBUG_SPINLOCK_SLEEP is not set | 632 | # CONFIG_DEBUG_SPINLOCK_SLEEP is not set |
851 | # CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set | 633 | # CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set |
852 | # CONFIG_DEBUG_KOBJECT is not set | 634 | # CONFIG_DEBUG_KOBJECT is not set |
@@ -854,7 +636,9 @@ CONFIG_DEBUG_INFO=y | |||
854 | # CONFIG_DEBUG_VM is not set | 636 | # CONFIG_DEBUG_VM is not set |
855 | # CONFIG_DEBUG_LIST is not set | 637 | # CONFIG_DEBUG_LIST is not set |
856 | CONFIG_FORCED_INLINING=y | 638 | CONFIG_FORCED_INLINING=y |
639 | # CONFIG_BOOT_PRINTK_DELAY is not set | ||
857 | # CONFIG_RCU_TORTURE_TEST is not set | 640 | # CONFIG_RCU_TORTURE_TEST is not set |
641 | # CONFIG_FAULT_INJECTION is not set | ||
858 | CONFIG_CROSSCOMPILE=y | 642 | CONFIG_CROSSCOMPILE=y |
859 | CONFIG_CMDLINE="nfsroot=192.168.192.169:/u1/mipsel,timeo=20 ip=dhcp" | 643 | CONFIG_CMDLINE="nfsroot=192.168.192.169:/u1/mipsel,timeo=20 ip=dhcp" |
860 | # CONFIG_DEBUG_STACK_USAGE is not set | 644 | # CONFIG_DEBUG_STACK_USAGE is not set |
@@ -865,60 +649,20 @@ CONFIG_CMDLINE="nfsroot=192.168.192.169:/u1/mipsel,timeo=20 ip=dhcp" | |||
865 | # Security options | 649 | # Security options |
866 | # | 650 | # |
867 | # CONFIG_KEYS is not set | 651 | # CONFIG_KEYS is not set |
868 | 652 | # CONFIG_SECURITY is not set | |
869 | # | 653 | # CONFIG_SECURITY_FILE_CAPABILITIES is not set |
870 | # Cryptographic options | 654 | # CONFIG_CRYPTO is not set |
871 | # | ||
872 | CONFIG_CRYPTO=y | ||
873 | CONFIG_CRYPTO_ALGAPI=y | ||
874 | CONFIG_CRYPTO_BLKCIPHER=m | ||
875 | CONFIG_CRYPTO_HASH=y | ||
876 | CONFIG_CRYPTO_MANAGER=y | ||
877 | CONFIG_CRYPTO_HMAC=y | ||
878 | CONFIG_CRYPTO_XCBC=m | ||
879 | # CONFIG_CRYPTO_NULL is not set | ||
880 | # CONFIG_CRYPTO_MD4 is not set | ||
881 | CONFIG_CRYPTO_MD5=y | ||
882 | # CONFIG_CRYPTO_SHA1 is not set | ||
883 | # CONFIG_CRYPTO_SHA256 is not set | ||
884 | # CONFIG_CRYPTO_SHA512 is not set | ||
885 | # CONFIG_CRYPTO_WP512 is not set | ||
886 | # CONFIG_CRYPTO_TGR192 is not set | ||
887 | CONFIG_CRYPTO_GF128MUL=m | ||
888 | CONFIG_CRYPTO_ECB=m | ||
889 | CONFIG_CRYPTO_CBC=m | ||
890 | CONFIG_CRYPTO_PCBC=m | ||
891 | CONFIG_CRYPTO_LRW=m | ||
892 | # CONFIG_CRYPTO_DES is not set | ||
893 | CONFIG_CRYPTO_FCRYPT=m | ||
894 | # CONFIG_CRYPTO_BLOWFISH is not set | ||
895 | # CONFIG_CRYPTO_TWOFISH is not set | ||
896 | # CONFIG_CRYPTO_SERPENT is not set | ||
897 | # CONFIG_CRYPTO_AES is not set | ||
898 | # CONFIG_CRYPTO_CAST5 is not set | ||
899 | # CONFIG_CRYPTO_CAST6 is not set | ||
900 | # CONFIG_CRYPTO_TEA is not set | ||
901 | # CONFIG_CRYPTO_ARC4 is not set | ||
902 | # CONFIG_CRYPTO_KHAZAD is not set | ||
903 | # CONFIG_CRYPTO_ANUBIS is not set | ||
904 | # CONFIG_CRYPTO_DEFLATE is not set | ||
905 | # CONFIG_CRYPTO_MICHAEL_MIC is not set | ||
906 | # CONFIG_CRYPTO_CRC32C is not set | ||
907 | CONFIG_CRYPTO_CAMELLIA=m | ||
908 | # CONFIG_CRYPTO_TEST is not set | ||
909 | |||
910 | # | ||
911 | # Hardware crypto devices | ||
912 | # | ||
913 | 655 | ||
914 | # | 656 | # |
915 | # Library routines | 657 | # Library routines |
916 | # | 658 | # |
917 | CONFIG_BITREVERSE=y | ||
918 | # CONFIG_CRC_CCITT is not set | 659 | # CONFIG_CRC_CCITT is not set |
919 | CONFIG_CRC16=y | 660 | # CONFIG_CRC16 is not set |
920 | CONFIG_CRC32=y | 661 | # CONFIG_CRC_ITU_T is not set |
662 | # CONFIG_CRC32 is not set | ||
663 | # CONFIG_CRC7 is not set | ||
921 | # CONFIG_LIBCRC32C is not set | 664 | # CONFIG_LIBCRC32C is not set |
922 | CONFIG_PLIST=y | 665 | CONFIG_PLIST=y |
923 | CONFIG_HAS_IOMEM=y | 666 | CONFIG_HAS_IOMEM=y |
924 | CONFIG_HAS_IOPORT=y | 667 | CONFIG_HAS_IOPORT=y |
668 | CONFIG_HAS_DMA=y | ||
diff --git a/arch/mips/configs/sb1250-swarm_defconfig b/arch/mips/configs/sb1250-swarm_defconfig index 3ed991ae0ebe..49dfcef2518c 100644 --- a/arch/mips/configs/sb1250-swarm_defconfig +++ b/arch/mips/configs/sb1250-swarm_defconfig | |||
@@ -196,6 +196,7 @@ CONFIG_SYSVIPC_SYSCTL=y | |||
196 | # CONFIG_UTS_NS is not set | 196 | # CONFIG_UTS_NS is not set |
197 | # CONFIG_AUDIT is not set | 197 | # CONFIG_AUDIT is not set |
198 | # CONFIG_IKCONFIG is not set | 198 | # CONFIG_IKCONFIG is not set |
199 | CONFIG_CGROUPS=y | ||
199 | CONFIG_CPUSETS=y | 200 | CONFIG_CPUSETS=y |
200 | CONFIG_SYSFS_DEPRECATED=y | 201 | CONFIG_SYSFS_DEPRECATED=y |
201 | CONFIG_RELAY=y | 202 | CONFIG_RELAY=y |
diff --git a/arch/mips/emma2rh/markeins/setup.c b/arch/mips/emma2rh/markeins/setup.c index 5e1da53b04a7..82f9e9013e70 100644 --- a/arch/mips/emma2rh/markeins/setup.c +++ b/arch/mips/emma2rh/markeins/setup.c | |||
@@ -104,12 +104,6 @@ void __init plat_time_init(void) | |||
104 | mips_hpt_frequency = (bus_frequency * (4 + reg)) / 4 / 2; | 104 | mips_hpt_frequency = (bus_frequency * (4 + reg)) / 4 / 2; |
105 | } | 105 | } |
106 | 106 | ||
107 | void __init plat_timer_setup(struct irqaction *irq) | ||
108 | { | ||
109 | /* we are using the cpu counter for timer interrupts */ | ||
110 | setup_irq(CPU_IRQ_BASE + 7, irq); | ||
111 | } | ||
112 | |||
113 | static void markeins_board_init(void); | 107 | static void markeins_board_init(void); |
114 | extern void markeins_irq_setup(void); | 108 | extern void markeins_irq_setup(void); |
115 | 109 | ||
diff --git a/arch/mips/jazz/irq.c b/arch/mips/jazz/irq.c index 835b056cea36..ae25b480723e 100644 --- a/arch/mips/jazz/irq.c +++ b/arch/mips/jazz/irq.c | |||
@@ -4,7 +4,7 @@ | |||
4 | * for more details. | 4 | * for more details. |
5 | * | 5 | * |
6 | * Copyright (C) 1992 Linus Torvalds | 6 | * Copyright (C) 1992 Linus Torvalds |
7 | * Copyright (C) 1994 - 2001, 2003 Ralf Baechle | 7 | * Copyright (C) 1994 - 2001, 2003, 07 Ralf Baechle |
8 | */ | 8 | */ |
9 | #include <linux/clockchips.h> | 9 | #include <linux/clockchips.h> |
10 | #include <linux/init.h> | 10 | #include <linux/init.h> |
@@ -13,6 +13,7 @@ | |||
13 | #include <linux/spinlock.h> | 13 | #include <linux/spinlock.h> |
14 | 14 | ||
15 | #include <asm/irq_cpu.h> | 15 | #include <asm/irq_cpu.h> |
16 | #include <asm/i8253.h> | ||
16 | #include <asm/i8259.h> | 17 | #include <asm/i8259.h> |
17 | #include <asm/io.h> | 18 | #include <asm/io.h> |
18 | #include <asm/jazz.h> | 19 | #include <asm/jazz.h> |
@@ -136,7 +137,7 @@ static struct irqaction r4030_timer_irqaction = { | |||
136 | .name = "timer", | 137 | .name = "timer", |
137 | }; | 138 | }; |
138 | 139 | ||
139 | void __init plat_timer_setup(struct irqaction *ignored) | 140 | void __init plat_time_init(void) |
140 | { | 141 | { |
141 | struct irqaction *irq = &r4030_timer_irqaction; | 142 | struct irqaction *irq = &r4030_timer_irqaction; |
142 | 143 | ||
@@ -152,4 +153,5 @@ void __init plat_timer_setup(struct irqaction *ignored) | |||
152 | setup_irq(JAZZ_TIMER_IRQ, irq); | 153 | setup_irq(JAZZ_TIMER_IRQ, irq); |
153 | 154 | ||
154 | clockevents_register_device(&r4030_clockevent); | 155 | clockevents_register_device(&r4030_clockevent); |
156 | setup_pit_timer(); | ||
155 | } | 157 | } |
diff --git a/arch/mips/jazz/setup.c b/arch/mips/jazz/setup.c index cfc7dce78dab..a7857973ca03 100644 --- a/arch/mips/jazz/setup.c +++ b/arch/mips/jazz/setup.c | |||
@@ -5,7 +5,7 @@ | |||
5 | * License. See the file "COPYING" in the main directory of this archive | 5 | * License. See the file "COPYING" in the main directory of this archive |
6 | * for more details. | 6 | * for more details. |
7 | * | 7 | * |
8 | * Copyright (C) 1996, 1997, 1998, 2001 by Ralf Baechle | 8 | * Copyright (C) 1996, 1997, 1998, 2001, 07 by Ralf Baechle |
9 | * Copyright (C) 2001 MIPS Technologies, Inc. | 9 | * Copyright (C) 2001 MIPS Technologies, Inc. |
10 | * Copyright (C) 2007 by Thomas Bogendoerfer | 10 | * Copyright (C) 2007 by Thomas Bogendoerfer |
11 | */ | 11 | */ |
@@ -25,7 +25,6 @@ | |||
25 | #include <linux/serial_8250.h> | 25 | #include <linux/serial_8250.h> |
26 | 26 | ||
27 | #include <asm/bootinfo.h> | 27 | #include <asm/bootinfo.h> |
28 | #include <asm/i8253.h> | ||
29 | #include <asm/irq.h> | 28 | #include <asm/irq.h> |
30 | #include <asm/jazz.h> | 29 | #include <asm/jazz.h> |
31 | #include <asm/jazzdma.h> | 30 | #include <asm/jazzdma.h> |
@@ -64,11 +63,6 @@ static struct resource jazz_io_resources[] = { | |||
64 | } | 63 | } |
65 | }; | 64 | }; |
66 | 65 | ||
67 | void __init plat_time_init(void) | ||
68 | { | ||
69 | setup_pit_timer(); | ||
70 | } | ||
71 | |||
72 | void __init plat_mem_setup(void) | 66 | void __init plat_mem_setup(void) |
73 | { | 67 | { |
74 | int i; | 68 | int i; |
diff --git a/arch/mips/jmr3927/rbhma3100/setup.c b/arch/mips/jmr3927/rbhma3100/setup.c index 0c7aee1682cd..edb9e59248ec 100644 --- a/arch/mips/jmr3927/rbhma3100/setup.c +++ b/arch/mips/jmr3927/rbhma3100/setup.c | |||
@@ -1,15 +1,4 @@ | |||
1 | /*********************************************************************** | 1 | /* |
2 | * | ||
3 | * Copyright 2001 MontaVista Software Inc. | ||
4 | * Author: MontaVista Software, Inc. | ||
5 | * ahennessy@mvista.com | ||
6 | * | ||
7 | * Based on arch/mips/ddb5xxx/ddb5477/setup.c | ||
8 | * | ||
9 | * Setup file for JMR3927. | ||
10 | * | ||
11 | * Copyright (C) 2000-2001 Toshiba Corporation | ||
12 | * | ||
13 | * This program is free software; you can redistribute it and/or modify it | 2 | * This program is free software; you can redistribute it and/or modify it |
14 | * under the terms of the GNU General Public License as published by the | 3 | * under the terms of the GNU General Public License as published by the |
15 | * Free Software Foundation; either version 2 of the License, or (at your | 4 | * Free Software Foundation; either version 2 of the License, or (at your |
@@ -30,9 +19,15 @@ | |||
30 | * with this program; if not, write to the Free Software Foundation, Inc., | 19 | * with this program; if not, write to the Free Software Foundation, Inc., |
31 | * 675 Mass Ave, Cambridge, MA 02139, USA. | 20 | * 675 Mass Ave, Cambridge, MA 02139, USA. |
32 | * | 21 | * |
33 | *********************************************************************** | 22 | * Copyright 2001 MontaVista Software Inc. |
23 | * Author: MontaVista Software, Inc. | ||
24 | * ahennessy@mvista.com | ||
25 | * | ||
26 | * Copyright (C) 2000-2001 Toshiba Corporation | ||
27 | * Copyright (C) 2007 Ralf Baechle (ralf@linux-mips.org) | ||
34 | */ | 28 | */ |
35 | 29 | ||
30 | #include <linux/clockchips.h> | ||
36 | #include <linux/init.h> | 31 | #include <linux/init.h> |
37 | #include <linux/kernel.h> | 32 | #include <linux/kernel.h> |
38 | #include <linux/kdev_t.h> | 33 | #include <linux/kdev_t.h> |
@@ -104,27 +99,60 @@ static cycle_t jmr3927_hpt_read(void) | |||
104 | return jiffies * (JMR3927_TIMER_CLK / HZ) + jmr3927_tmrptr->trr; | 99 | return jiffies * (JMR3927_TIMER_CLK / HZ) + jmr3927_tmrptr->trr; |
105 | } | 100 | } |
106 | 101 | ||
107 | static void jmr3927_timer_ack(void) | 102 | static void jmr3927_set_mode(enum clock_event_mode mode, |
103 | struct clock_event_device *evt) | ||
104 | { | ||
105 | /* Nothing to do here */ | ||
106 | } | ||
107 | |||
108 | struct clock_event_device jmr3927_clock_event_device = { | ||
109 | .name = "MIPS", | ||
110 | .features = CLOCK_EVT_FEAT_PERIODIC, | ||
111 | .shift = 32, | ||
112 | .rating = 300, | ||
113 | .cpumask = CPU_MASK_CPU0, | ||
114 | .irq = JMR3927_IRQ_TICK, | ||
115 | .set_mode = jmr3927_set_mode, | ||
116 | }; | ||
117 | |||
118 | static irqreturn_t jmr3927_timer_interrupt(int irq, void *dev_id) | ||
108 | { | 119 | { |
120 | struct clock_event_device *cd = &jmr3927_clock_event_device; | ||
121 | |||
109 | jmr3927_tmrptr->tisr = 0; /* ack interrupt */ | 122 | jmr3927_tmrptr->tisr = 0; /* ack interrupt */ |
123 | |||
124 | cd->event_handler(cd); | ||
125 | |||
126 | return IRQ_HANDLED; | ||
110 | } | 127 | } |
111 | 128 | ||
129 | static struct irqaction jmr3927_timer_irqaction = { | ||
130 | .handler = jmr3927_timer_interrupt, | ||
131 | .flags = IRQF_DISABLED | IRQF_PERCPU, | ||
132 | .name = "jmr3927-timer", | ||
133 | }; | ||
134 | |||
112 | void __init plat_time_init(void) | 135 | void __init plat_time_init(void) |
113 | { | 136 | { |
137 | struct clock_event_device *cd; | ||
138 | |||
114 | clocksource_mips.read = jmr3927_hpt_read; | 139 | clocksource_mips.read = jmr3927_hpt_read; |
115 | mips_timer_ack = jmr3927_timer_ack; | ||
116 | mips_hpt_frequency = JMR3927_TIMER_CLK; | 140 | mips_hpt_frequency = JMR3927_TIMER_CLK; |
117 | } | ||
118 | 141 | ||
119 | void __init plat_timer_setup(struct irqaction *irq) | ||
120 | { | ||
121 | jmr3927_tmrptr->cpra = JMR3927_TIMER_CLK / HZ; | 142 | jmr3927_tmrptr->cpra = JMR3927_TIMER_CLK / HZ; |
122 | jmr3927_tmrptr->itmr = TXx927_TMTITMR_TIIE | TXx927_TMTITMR_TZCE; | 143 | jmr3927_tmrptr->itmr = TXx927_TMTITMR_TIIE | TXx927_TMTITMR_TZCE; |
123 | jmr3927_tmrptr->ccdr = JMR3927_TIMER_CCD; | 144 | jmr3927_tmrptr->ccdr = JMR3927_TIMER_CCD; |
124 | jmr3927_tmrptr->tcr = | 145 | jmr3927_tmrptr->tcr = |
125 | TXx927_TMTCR_TCE | TXx927_TMTCR_CCDE | TXx927_TMTCR_TMODE_ITVL; | 146 | TXx927_TMTCR_TCE | TXx927_TMTCR_CCDE | TXx927_TMTCR_TMODE_ITVL; |
126 | 147 | ||
127 | setup_irq(JMR3927_IRQ_TICK, irq); | 148 | cd = &jmr3927_clock_event_device; |
149 | /* Calculate the min / max delta */ | ||
150 | cd->mult = div_sc((unsigned long) JMR3927_IMCLK, NSEC_PER_SEC, 32); | ||
151 | cd->max_delta_ns = clockevent_delta2ns(0x7fffffff, cd); | ||
152 | cd->min_delta_ns = clockevent_delta2ns(0x300, cd); | ||
153 | clockevents_register_device(cd); | ||
154 | |||
155 | setup_irq(JMR3927_IRQ_TICK, &jmr3927_timer_irqaction); | ||
128 | } | 156 | } |
129 | 157 | ||
130 | #define DO_WRITE_THROUGH | 158 | #define DO_WRITE_THROUGH |
diff --git a/arch/mips/kernel/Makefile b/arch/mips/kernel/Makefile index 95a356ef3910..a3afa39faae5 100644 --- a/arch/mips/kernel/Makefile +++ b/arch/mips/kernel/Makefile | |||
@@ -8,6 +8,8 @@ obj-y += cpu-probe.o branch.o entry.o genex.o irq.o process.o \ | |||
8 | ptrace.o reset.o semaphore.o setup.o signal.o syscall.o \ | 8 | ptrace.o reset.o semaphore.o setup.o signal.o syscall.o \ |
9 | time.o topology.o traps.o unaligned.o | 9 | time.o topology.o traps.o unaligned.o |
10 | 10 | ||
11 | obj-$(CONFIG_CEVT_R4K) += cevt-r4k.o | ||
12 | |||
11 | binfmt_irix-objs := irixelf.o irixinv.o irixioctl.o irixsig.o \ | 13 | binfmt_irix-objs := irixelf.o irixinv.o irixioctl.o irixsig.o \ |
12 | irix5sys.o sysirix.o | 14 | irix5sys.o sysirix.o |
13 | 15 | ||
diff --git a/arch/mips/kernel/cevt-r4k.c b/arch/mips/kernel/cevt-r4k.c new file mode 100644 index 000000000000..a915e5693421 --- /dev/null +++ b/arch/mips/kernel/cevt-r4k.c | |||
@@ -0,0 +1,273 @@ | |||
1 | /* | ||
2 | * This file is subject to the terms and conditions of the GNU General Public | ||
3 | * License. See the file "COPYING" in the main directory of this archive | ||
4 | * for more details. | ||
5 | * | ||
6 | * Copyright (C) 2007 MIPS Technologies, Inc. | ||
7 | * Copyright (C) 2007 Ralf Baechle <ralf@linux-mips.org> | ||
8 | */ | ||
9 | #include <linux/clockchips.h> | ||
10 | #include <linux/interrupt.h> | ||
11 | #include <linux/percpu.h> | ||
12 | |||
13 | #include <asm/smtc_ipi.h> | ||
14 | #include <asm/time.h> | ||
15 | |||
16 | static int mips_next_event(unsigned long delta, | ||
17 | struct clock_event_device *evt) | ||
18 | { | ||
19 | unsigned int cnt; | ||
20 | int res; | ||
21 | |||
22 | #ifdef CONFIG_MIPS_MT_SMTC | ||
23 | { | ||
24 | unsigned long flags, vpflags; | ||
25 | local_irq_save(flags); | ||
26 | vpflags = dvpe(); | ||
27 | #endif | ||
28 | cnt = read_c0_count(); | ||
29 | cnt += delta; | ||
30 | write_c0_compare(cnt); | ||
31 | res = ((long)(read_c0_count() - cnt ) > 0) ? -ETIME : 0; | ||
32 | #ifdef CONFIG_MIPS_MT_SMTC | ||
33 | evpe(vpflags); | ||
34 | local_irq_restore(flags); | ||
35 | } | ||
36 | #endif | ||
37 | return res; | ||
38 | } | ||
39 | |||
40 | static void mips_set_mode(enum clock_event_mode mode, | ||
41 | struct clock_event_device *evt) | ||
42 | { | ||
43 | /* Nothing to do ... */ | ||
44 | } | ||
45 | |||
46 | static DEFINE_PER_CPU(struct clock_event_device, mips_clockevent_device); | ||
47 | static int cp0_timer_irq_installed; | ||
48 | |||
49 | /* | ||
50 | * Timer ack for an R4k-compatible timer of a known frequency. | ||
51 | */ | ||
52 | static void c0_timer_ack(void) | ||
53 | { | ||
54 | write_c0_compare(read_c0_compare()); | ||
55 | } | ||
56 | |||
57 | /* | ||
58 | * Possibly handle a performance counter interrupt. | ||
59 | * Return true if the timer interrupt should not be checked | ||
60 | */ | ||
61 | static inline int handle_perf_irq(int r2) | ||
62 | { | ||
63 | /* | ||
64 | * The performance counter overflow interrupt may be shared with the | ||
65 | * timer interrupt (cp0_perfcount_irq < 0). If it is and a | ||
66 | * performance counter has overflowed (perf_irq() == IRQ_HANDLED) | ||
67 | * and we can't reliably determine if a counter interrupt has also | ||
68 | * happened (!r2) then don't check for a timer interrupt. | ||
69 | */ | ||
70 | return (cp0_perfcount_irq < 0) && | ||
71 | perf_irq() == IRQ_HANDLED && | ||
72 | !r2; | ||
73 | } | ||
74 | |||
75 | static irqreturn_t c0_compare_interrupt(int irq, void *dev_id) | ||
76 | { | ||
77 | const int r2 = cpu_has_mips_r2; | ||
78 | struct clock_event_device *cd; | ||
79 | int cpu = smp_processor_id(); | ||
80 | |||
81 | /* | ||
82 | * Suckage alert: | ||
83 | * Before R2 of the architecture there was no way to see if a | ||
84 | * performance counter interrupt was pending, so we have to run | ||
85 | * the performance counter interrupt handler anyway. | ||
86 | */ | ||
87 | if (handle_perf_irq(r2)) | ||
88 | goto out; | ||
89 | |||
90 | /* | ||
91 | * The same applies to performance counter interrupts. But with the | ||
92 | * above we now know that the reason we got here must be a timer | ||
93 | * interrupt. Being the paranoiacs we are we check anyway. | ||
94 | */ | ||
95 | if (!r2 || (read_c0_cause() & (1 << 30))) { | ||
96 | c0_timer_ack(); | ||
97 | #ifdef CONFIG_MIPS_MT_SMTC | ||
98 | if (cpu_data[cpu].vpe_id) | ||
99 | goto out; | ||
100 | cpu = 0; | ||
101 | #endif | ||
102 | cd = &per_cpu(mips_clockevent_device, cpu); | ||
103 | cd->event_handler(cd); | ||
104 | } | ||
105 | |||
106 | out: | ||
107 | return IRQ_HANDLED; | ||
108 | } | ||
109 | |||
110 | static struct irqaction c0_compare_irqaction = { | ||
111 | .handler = c0_compare_interrupt, | ||
112 | #ifdef CONFIG_MIPS_MT_SMTC | ||
113 | .flags = IRQF_DISABLED, | ||
114 | #else | ||
115 | .flags = IRQF_DISABLED | IRQF_PERCPU, | ||
116 | #endif | ||
117 | .name = "timer", | ||
118 | }; | ||
119 | |||
120 | #ifdef CONFIG_MIPS_MT_SMTC | ||
121 | DEFINE_PER_CPU(struct clock_event_device, smtc_dummy_clockevent_device); | ||
122 | |||
123 | static void smtc_set_mode(enum clock_event_mode mode, | ||
124 | struct clock_event_device *evt) | ||
125 | { | ||
126 | } | ||
127 | |||
128 | static void mips_broadcast(cpumask_t mask) | ||
129 | { | ||
130 | unsigned int cpu; | ||
131 | |||
132 | for_each_cpu_mask(cpu, mask) | ||
133 | smtc_send_ipi(cpu, SMTC_CLOCK_TICK, 0); | ||
134 | } | ||
135 | |||
136 | static void setup_smtc_dummy_clockevent_device(void) | ||
137 | { | ||
138 | //uint64_t mips_freq = mips_hpt_^frequency; | ||
139 | unsigned int cpu = smp_processor_id(); | ||
140 | struct clock_event_device *cd; | ||
141 | |||
142 | cd = &per_cpu(smtc_dummy_clockevent_device, cpu); | ||
143 | |||
144 | cd->name = "SMTC"; | ||
145 | cd->features = CLOCK_EVT_FEAT_DUMMY; | ||
146 | |||
147 | /* Calculate the min / max delta */ | ||
148 | cd->mult = 0; //div_sc((unsigned long) mips_freq, NSEC_PER_SEC, 32); | ||
149 | cd->shift = 0; //32; | ||
150 | cd->max_delta_ns = 0; //clockevent_delta2ns(0x7fffffff, cd); | ||
151 | cd->min_delta_ns = 0; //clockevent_delta2ns(0x30, cd); | ||
152 | |||
153 | cd->rating = 200; | ||
154 | cd->irq = 17; //-1; | ||
155 | // if (cpu) | ||
156 | // cd->cpumask = CPU_MASK_ALL; // cpumask_of_cpu(cpu); | ||
157 | // else | ||
158 | cd->cpumask = cpumask_of_cpu(cpu); | ||
159 | |||
160 | cd->set_mode = smtc_set_mode; | ||
161 | |||
162 | cd->broadcast = mips_broadcast; | ||
163 | |||
164 | clockevents_register_device(cd); | ||
165 | } | ||
166 | #endif | ||
167 | |||
168 | static void mips_event_handler(struct clock_event_device *dev) | ||
169 | { | ||
170 | } | ||
171 | |||
172 | /* | ||
173 | * FIXME: This doesn't hold for the relocated E9000 compare interrupt. | ||
174 | */ | ||
175 | static int c0_compare_int_pending(void) | ||
176 | { | ||
177 | return (read_c0_cause() >> cp0_compare_irq) & 0x100; | ||
178 | } | ||
179 | |||
180 | static int c0_compare_int_usable(void) | ||
181 | { | ||
182 | const unsigned int delta = 0x300000; | ||
183 | unsigned int cnt; | ||
184 | |||
185 | /* | ||
186 | * IP7 already pending? Try to clear it by acking the timer. | ||
187 | */ | ||
188 | if (c0_compare_int_pending()) { | ||
189 | write_c0_compare(read_c0_compare()); | ||
190 | irq_disable_hazard(); | ||
191 | if (c0_compare_int_pending()) | ||
192 | return 0; | ||
193 | } | ||
194 | |||
195 | cnt = read_c0_count(); | ||
196 | cnt += delta; | ||
197 | write_c0_compare(cnt); | ||
198 | |||
199 | while ((long)(read_c0_count() - cnt) <= 0) | ||
200 | ; /* Wait for expiry */ | ||
201 | |||
202 | if (!c0_compare_int_pending()) | ||
203 | return 0; | ||
204 | |||
205 | write_c0_compare(read_c0_compare()); | ||
206 | irq_disable_hazard(); | ||
207 | if (c0_compare_int_pending()) | ||
208 | return 0; | ||
209 | |||
210 | /* | ||
211 | * Feels like a real count / compare timer. | ||
212 | */ | ||
213 | return 1; | ||
214 | } | ||
215 | |||
216 | void __cpuinit mips_clockevent_init(void) | ||
217 | { | ||
218 | uint64_t mips_freq = mips_hpt_frequency; | ||
219 | unsigned int cpu = smp_processor_id(); | ||
220 | struct clock_event_device *cd; | ||
221 | unsigned int irq = MIPS_CPU_IRQ_BASE + 7; | ||
222 | |||
223 | if (!cpu_has_counter) | ||
224 | return; | ||
225 | |||
226 | #ifdef CONFIG_MIPS_MT_SMTC | ||
227 | setup_smtc_dummy_clockevent_device(); | ||
228 | |||
229 | /* | ||
230 | * On SMTC we only register VPE0's compare interrupt as clockevent | ||
231 | * device. | ||
232 | */ | ||
233 | if (cpu) | ||
234 | return; | ||
235 | #endif | ||
236 | |||
237 | if (!c0_compare_int_usable()) | ||
238 | return; | ||
239 | |||
240 | cd = &per_cpu(mips_clockevent_device, cpu); | ||
241 | |||
242 | cd->name = "MIPS"; | ||
243 | cd->features = CLOCK_EVT_FEAT_ONESHOT; | ||
244 | |||
245 | /* Calculate the min / max delta */ | ||
246 | cd->mult = div_sc((unsigned long) mips_freq, NSEC_PER_SEC, 32); | ||
247 | cd->shift = 32; | ||
248 | cd->max_delta_ns = clockevent_delta2ns(0x7fffffff, cd); | ||
249 | cd->min_delta_ns = clockevent_delta2ns(0x300, cd); | ||
250 | |||
251 | cd->rating = 300; | ||
252 | cd->irq = irq; | ||
253 | #ifdef CONFIG_MIPS_MT_SMTC | ||
254 | cd->cpumask = CPU_MASK_ALL; | ||
255 | #else | ||
256 | cd->cpumask = cpumask_of_cpu(cpu); | ||
257 | #endif | ||
258 | cd->set_next_event = mips_next_event; | ||
259 | cd->set_mode = mips_set_mode; | ||
260 | cd->event_handler = mips_event_handler; | ||
261 | |||
262 | clockevents_register_device(cd); | ||
263 | |||
264 | if (!cp0_timer_irq_installed) { | ||
265 | #ifdef CONFIG_MIPS_MT_SMTC | ||
266 | #define CPUCTR_IMASKBIT (0x100 << cp0_compare_irq) | ||
267 | setup_irq_smtc(irq, &c0_compare_irqaction, CPUCTR_IMASKBIT); | ||
268 | #else | ||
269 | setup_irq(irq, &c0_compare_irqaction); | ||
270 | #endif /* CONFIG_MIPS_MT_SMTC */ | ||
271 | cp0_timer_irq_installed = 1; | ||
272 | } | ||
273 | } | ||
diff --git a/arch/mips/kernel/head.S b/arch/mips/kernel/head.S index bf164a562acb..236768731063 100644 --- a/arch/mips/kernel/head.S +++ b/arch/mips/kernel/head.S | |||
@@ -27,16 +27,6 @@ | |||
27 | 27 | ||
28 | #include <kernel-entry-init.h> | 28 | #include <kernel-entry-init.h> |
29 | 29 | ||
30 | .macro ARC64_TWIDDLE_PC | ||
31 | #if defined(CONFIG_ARC64) || defined(CONFIG_MAPPED_KERNEL) | ||
32 | /* We get launched at a XKPHYS address but the kernel is linked to | ||
33 | run at a KSEG0 address, so jump there. */ | ||
34 | PTR_LA t0, \@f | ||
35 | jr t0 | ||
36 | \@: | ||
37 | #endif | ||
38 | .endm | ||
39 | |||
40 | /* | 30 | /* |
41 | * inputs are the text nasid in t1, data nasid in t2. | 31 | * inputs are the text nasid in t1, data nasid in t2. |
42 | */ | 32 | */ |
@@ -157,7 +147,11 @@ NESTED(kernel_entry, 16, sp) # kernel entry point | |||
157 | 147 | ||
158 | setup_c0_status_pri | 148 | setup_c0_status_pri |
159 | 149 | ||
160 | ARC64_TWIDDLE_PC | 150 | /* We might not get launched at the address the kernel is linked to, |
151 | so we jump there. */ | ||
152 | PTR_LA t0, 0f | ||
153 | jr t0 | ||
154 | 0: | ||
161 | 155 | ||
162 | #ifdef CONFIG_MIPS_MT_SMTC | 156 | #ifdef CONFIG_MIPS_MT_SMTC |
163 | /* | 157 | /* |
diff --git a/arch/mips/kernel/irixelf.c b/arch/mips/kernel/irixelf.c index b997af713eb3..7852c7cdf29e 100644 --- a/arch/mips/kernel/irixelf.c +++ b/arch/mips/kernel/irixelf.c | |||
@@ -1172,8 +1172,8 @@ static int irix_core_dump(long signr, struct pt_regs *regs, struct file *file, u | |||
1172 | prstatus.pr_sighold = current->blocked.sig[0]; | 1172 | prstatus.pr_sighold = current->blocked.sig[0]; |
1173 | psinfo.pr_pid = prstatus.pr_pid = current->pid; | 1173 | psinfo.pr_pid = prstatus.pr_pid = current->pid; |
1174 | psinfo.pr_ppid = prstatus.pr_ppid = current->parent->pid; | 1174 | psinfo.pr_ppid = prstatus.pr_ppid = current->parent->pid; |
1175 | psinfo.pr_pgrp = prstatus.pr_pgrp = process_group(current); | 1175 | psinfo.pr_pgrp = prstatus.pr_pgrp = task_pgrp_nr(current); |
1176 | psinfo.pr_sid = prstatus.pr_sid = process_session(current); | 1176 | psinfo.pr_sid = prstatus.pr_sid = task_session_nr(current); |
1177 | if (current->pid == current->tgid) { | 1177 | if (current->pid == current->tgid) { |
1178 | /* | 1178 | /* |
1179 | * This is the record for the group leader. Add in the | 1179 | * This is the record for the group leader. Add in the |
diff --git a/arch/mips/kernel/irixsig.c b/arch/mips/kernel/irixsig.c index 85c2e389edd6..a0a91056fda7 100644 --- a/arch/mips/kernel/irixsig.c +++ b/arch/mips/kernel/irixsig.c | |||
@@ -609,7 +609,7 @@ repeat: | |||
609 | p = list_entry(_p, struct task_struct, sibling); | 609 | p = list_entry(_p, struct task_struct, sibling); |
610 | if ((type == IRIX_P_PID) && p->pid != pid) | 610 | if ((type == IRIX_P_PID) && p->pid != pid) |
611 | continue; | 611 | continue; |
612 | if ((type == IRIX_P_PGID) && process_group(p) != pid) | 612 | if ((type == IRIX_P_PGID) && task_pgrp_nr(p) != pid) |
613 | continue; | 613 | continue; |
614 | if ((p->exit_signal != SIGCHLD)) | 614 | if ((p->exit_signal != SIGCHLD)) |
615 | continue; | 615 | continue; |
diff --git a/arch/mips/kernel/module.c b/arch/mips/kernel/module.c index cb0801437b66..e7ed0ac48537 100644 --- a/arch/mips/kernel/module.c +++ b/arch/mips/kernel/module.c | |||
@@ -381,7 +381,7 @@ const struct exception_table_entry *search_module_dbetables(unsigned long addr) | |||
381 | return e; | 381 | return e; |
382 | } | 382 | } |
383 | 383 | ||
384 | /* Put in dbe list if neccessary. */ | 384 | /* Put in dbe list if necessary. */ |
385 | int module_finalize(const Elf_Ehdr *hdr, | 385 | int module_finalize(const Elf_Ehdr *hdr, |
386 | const Elf_Shdr *sechdrs, | 386 | const Elf_Shdr *sechdrs, |
387 | struct module *me) | 387 | struct module *me) |
diff --git a/arch/mips/kernel/sysirix.c b/arch/mips/kernel/sysirix.c index ee7790d9debe..4c477c7ff74a 100644 --- a/arch/mips/kernel/sysirix.c +++ b/arch/mips/kernel/sysirix.c | |||
@@ -763,11 +763,11 @@ asmlinkage int irix_setpgrp(int flags) | |||
763 | printk("[%s:%d] setpgrp(%d) ", current->comm, current->pid, flags); | 763 | printk("[%s:%d] setpgrp(%d) ", current->comm, current->pid, flags); |
764 | #endif | 764 | #endif |
765 | if(!flags) | 765 | if(!flags) |
766 | error = process_group(current); | 766 | error = task_pgrp_nr(current); |
767 | else | 767 | else |
768 | error = sys_setsid(); | 768 | error = sys_setsid(); |
769 | #ifdef DEBUG_PROCGRPS | 769 | #ifdef DEBUG_PROCGRPS |
770 | printk("returning %d\n", process_group(current)); | 770 | printk("returning %d\n", task_pgrp_nr(current)); |
771 | #endif | 771 | #endif |
772 | 772 | ||
773 | return error; | 773 | return error; |
diff --git a/arch/mips/kernel/time.c b/arch/mips/kernel/time.c index e4b5e647b142..c4e6866d5cbc 100644 --- a/arch/mips/kernel/time.c +++ b/arch/mips/kernel/time.c | |||
@@ -40,17 +40,6 @@ | |||
40 | #include <irq.h> | 40 | #include <irq.h> |
41 | 41 | ||
42 | /* | 42 | /* |
43 | * The integer part of the number of usecs per jiffy is taken from tick, | ||
44 | * but the fractional part is not recorded, so we calculate it using the | ||
45 | * initial value of HZ. This aids systems where tick isn't really an | ||
46 | * integer (e.g. for HZ = 128). | ||
47 | */ | ||
48 | #define USECS_PER_JIFFY TICK_SIZE | ||
49 | #define USECS_PER_JIFFY_FRAC ((unsigned long)(u32)((1000000ULL << 32) / HZ)) | ||
50 | |||
51 | #define TICK_SIZE (tick_nsec / 1000) | ||
52 | |||
53 | /* | ||
54 | * forward reference | 43 | * forward reference |
55 | */ | 44 | */ |
56 | DEFINE_SPINLOCK(rtc_lock); | 45 | DEFINE_SPINLOCK(rtc_lock); |
@@ -72,14 +61,6 @@ int update_persistent_clock(struct timespec now) | |||
72 | return rtc_mips_set_mmss(now.tv_sec); | 61 | return rtc_mips_set_mmss(now.tv_sec); |
73 | } | 62 | } |
74 | 63 | ||
75 | /* how many counter cycles in a jiffy */ | ||
76 | static unsigned long cycles_per_jiffy __read_mostly; | ||
77 | |||
78 | /* | ||
79 | * Null timer ack for systems not needing one (e.g. i8254). | ||
80 | */ | ||
81 | static void null_timer_ack(void) { /* nothing */ } | ||
82 | |||
83 | /* | 64 | /* |
84 | * Null high precision timer functions for systems lacking one. | 65 | * Null high precision timer functions for systems lacking one. |
85 | */ | 66 | */ |
@@ -89,14 +70,6 @@ static cycle_t null_hpt_read(void) | |||
89 | } | 70 | } |
90 | 71 | ||
91 | /* | 72 | /* |
92 | * Timer ack for an R4k-compatible timer of a known frequency. | ||
93 | */ | ||
94 | static void c0_timer_ack(void) | ||
95 | { | ||
96 | write_c0_compare(read_c0_compare()); | ||
97 | } | ||
98 | |||
99 | /* | ||
100 | * High precision timer functions for a R4k-compatible timer. | 73 | * High precision timer functions for a R4k-compatible timer. |
101 | */ | 74 | */ |
102 | static cycle_t c0_hpt_read(void) | 75 | static cycle_t c0_hpt_read(void) |
@@ -105,7 +78,6 @@ static cycle_t c0_hpt_read(void) | |||
105 | } | 78 | } |
106 | 79 | ||
107 | int (*mips_timer_state)(void); | 80 | int (*mips_timer_state)(void); |
108 | void (*mips_timer_ack)(void); | ||
109 | 81 | ||
110 | /* | 82 | /* |
111 | * local_timer_interrupt() does profiling and process accounting | 83 | * local_timer_interrupt() does profiling and process accounting |
@@ -135,35 +107,6 @@ int (*perf_irq)(void) = null_perf_irq; | |||
135 | EXPORT_SYMBOL(perf_irq); | 107 | EXPORT_SYMBOL(perf_irq); |
136 | 108 | ||
137 | /* | 109 | /* |
138 | * Timer interrupt | ||
139 | */ | ||
140 | int cp0_compare_irq; | ||
141 | |||
142 | /* | ||
143 | * Performance counter IRQ or -1 if shared with timer | ||
144 | */ | ||
145 | int cp0_perfcount_irq; | ||
146 | EXPORT_SYMBOL_GPL(cp0_perfcount_irq); | ||
147 | |||
148 | /* | ||
149 | * Possibly handle a performance counter interrupt. | ||
150 | * Return true if the timer interrupt should not be checked | ||
151 | */ | ||
152 | static inline int handle_perf_irq(int r2) | ||
153 | { | ||
154 | /* | ||
155 | * The performance counter overflow interrupt may be shared with the | ||
156 | * timer interrupt (cp0_perfcount_irq < 0). If it is and a | ||
157 | * performance counter has overflowed (perf_irq() == IRQ_HANDLED) | ||
158 | * and we can't reliably determine if a counter interrupt has also | ||
159 | * happened (!r2) then don't check for a timer interrupt. | ||
160 | */ | ||
161 | return (cp0_perfcount_irq < 0) && | ||
162 | perf_irq() == IRQ_HANDLED && | ||
163 | !r2; | ||
164 | } | ||
165 | |||
166 | /* | ||
167 | * time_init() - it does the following things. | 110 | * time_init() - it does the following things. |
168 | * | 111 | * |
169 | * 1) plat_time_init() - | 112 | * 1) plat_time_init() - |
@@ -228,270 +171,58 @@ struct clocksource clocksource_mips = { | |||
228 | .flags = CLOCK_SOURCE_IS_CONTINUOUS, | 171 | .flags = CLOCK_SOURCE_IS_CONTINUOUS, |
229 | }; | 172 | }; |
230 | 173 | ||
231 | static int mips_next_event(unsigned long delta, | 174 | void __init clocksource_set_clock(struct clocksource *cs, unsigned int clock) |
232 | struct clock_event_device *evt) | ||
233 | { | 175 | { |
234 | unsigned int cnt; | 176 | u64 temp; |
235 | int res; | 177 | u32 shift; |
236 | |||
237 | #ifdef CONFIG_MIPS_MT_SMTC | ||
238 | { | ||
239 | unsigned long flags, vpflags; | ||
240 | local_irq_save(flags); | ||
241 | vpflags = dvpe(); | ||
242 | #endif | ||
243 | cnt = read_c0_count(); | ||
244 | cnt += delta; | ||
245 | write_c0_compare(cnt); | ||
246 | res = ((long)(read_c0_count() - cnt ) > 0) ? -ETIME : 0; | ||
247 | #ifdef CONFIG_MIPS_MT_SMTC | ||
248 | evpe(vpflags); | ||
249 | local_irq_restore(flags); | ||
250 | } | ||
251 | #endif | ||
252 | return res; | ||
253 | } | ||
254 | |||
255 | static void mips_set_mode(enum clock_event_mode mode, | ||
256 | struct clock_event_device *evt) | ||
257 | { | ||
258 | /* Nothing to do ... */ | ||
259 | } | ||
260 | |||
261 | static DEFINE_PER_CPU(struct clock_event_device, mips_clockevent_device); | ||
262 | static int cp0_timer_irq_installed; | ||
263 | |||
264 | static irqreturn_t timer_interrupt(int irq, void *dev_id) | ||
265 | { | ||
266 | const int r2 = cpu_has_mips_r2; | ||
267 | struct clock_event_device *cd; | ||
268 | int cpu = smp_processor_id(); | ||
269 | |||
270 | /* | ||
271 | * Suckage alert: | ||
272 | * Before R2 of the architecture there was no way to see if a | ||
273 | * performance counter interrupt was pending, so we have to run | ||
274 | * the performance counter interrupt handler anyway. | ||
275 | */ | ||
276 | if (handle_perf_irq(r2)) | ||
277 | goto out; | ||
278 | 178 | ||
279 | /* | 179 | /* Find a shift value */ |
280 | * The same applies to performance counter interrupts. But with the | 180 | for (shift = 32; shift > 0; shift--) { |
281 | * above we now know that the reason we got here must be a timer | 181 | temp = (u64) NSEC_PER_SEC << shift; |
282 | * interrupt. Being the paranoiacs we are we check anyway. | 182 | do_div(temp, clock); |
283 | */ | 183 | if ((temp >> 32) == 0) |
284 | if (!r2 || (read_c0_cause() & (1 << 30))) { | 184 | break; |
285 | c0_timer_ack(); | ||
286 | #ifdef CONFIG_MIPS_MT_SMTC | ||
287 | if (cpu_data[cpu].vpe_id) | ||
288 | goto out; | ||
289 | cpu = 0; | ||
290 | #endif | ||
291 | cd = &per_cpu(mips_clockevent_device, cpu); | ||
292 | cd->event_handler(cd); | ||
293 | } | 185 | } |
294 | 186 | cs->shift = shift; | |
295 | out: | 187 | cs->mult = (u32) temp; |
296 | return IRQ_HANDLED; | ||
297 | } | 188 | } |
298 | 189 | ||
299 | static struct irqaction timer_irqaction = { | 190 | void __cpuinit clockevent_set_clock(struct clock_event_device *cd, |
300 | .handler = timer_interrupt, | 191 | unsigned int clock) |
301 | #ifdef CONFIG_MIPS_MT_SMTC | ||
302 | .flags = IRQF_DISABLED, | ||
303 | #else | ||
304 | .flags = IRQF_DISABLED | IRQF_PERCPU, | ||
305 | #endif | ||
306 | .name = "timer", | ||
307 | }; | ||
308 | |||
309 | static void __init init_mips_clocksource(void) | ||
310 | { | 192 | { |
311 | u64 temp; | 193 | u64 temp; |
312 | u32 shift; | 194 | u32 shift; |
313 | 195 | ||
314 | if (!mips_hpt_frequency || clocksource_mips.read == null_hpt_read) | ||
315 | return; | ||
316 | |||
317 | /* Calclate a somewhat reasonable rating value */ | ||
318 | clocksource_mips.rating = 200 + mips_hpt_frequency / 10000000; | ||
319 | /* Find a shift value */ | 196 | /* Find a shift value */ |
320 | for (shift = 32; shift > 0; shift--) { | 197 | for (shift = 32; shift > 0; shift--) { |
321 | temp = (u64) NSEC_PER_SEC << shift; | 198 | temp = (u64) NSEC_PER_SEC << shift; |
322 | do_div(temp, mips_hpt_frequency); | 199 | do_div(temp, clock); |
323 | if ((temp >> 32) == 0) | 200 | if ((temp >> 32) == 0) |
324 | break; | 201 | break; |
325 | } | 202 | } |
326 | clocksource_mips.shift = shift; | 203 | cd->shift = shift; |
327 | clocksource_mips.mult = (u32)temp; | 204 | cd->mult = (u32) temp; |
328 | |||
329 | clocksource_register(&clocksource_mips); | ||
330 | } | ||
331 | |||
332 | void __init __weak plat_time_init(void) | ||
333 | { | ||
334 | } | 205 | } |
335 | 206 | ||
336 | void __init __weak plat_timer_setup(struct irqaction *irq) | 207 | static void __init init_mips_clocksource(void) |
337 | { | ||
338 | } | ||
339 | |||
340 | #ifdef CONFIG_MIPS_MT_SMTC | ||
341 | DEFINE_PER_CPU(struct clock_event_device, smtc_dummy_clockevent_device); | ||
342 | |||
343 | static void smtc_set_mode(enum clock_event_mode mode, | ||
344 | struct clock_event_device *evt) | ||
345 | { | ||
346 | } | ||
347 | |||
348 | int dummycnt[NR_CPUS]; | ||
349 | |||
350 | static void mips_broadcast(cpumask_t mask) | ||
351 | { | ||
352 | unsigned int cpu; | ||
353 | |||
354 | for_each_cpu_mask(cpu, mask) | ||
355 | smtc_send_ipi(cpu, SMTC_CLOCK_TICK, 0); | ||
356 | } | ||
357 | |||
358 | static void setup_smtc_dummy_clockevent_device(void) | ||
359 | { | 208 | { |
360 | //uint64_t mips_freq = mips_hpt_^frequency; | 209 | if (!mips_hpt_frequency || clocksource_mips.read == null_hpt_read) |
361 | unsigned int cpu = smp_processor_id(); | 210 | return; |
362 | struct clock_event_device *cd; | ||
363 | |||
364 | cd = &per_cpu(smtc_dummy_clockevent_device, cpu); | ||
365 | |||
366 | cd->name = "SMTC"; | ||
367 | cd->features = CLOCK_EVT_FEAT_DUMMY; | ||
368 | |||
369 | /* Calculate the min / max delta */ | ||
370 | cd->mult = 0; //div_sc((unsigned long) mips_freq, NSEC_PER_SEC, 32); | ||
371 | cd->shift = 0; //32; | ||
372 | cd->max_delta_ns = 0; //clockevent_delta2ns(0x7fffffff, cd); | ||
373 | cd->min_delta_ns = 0; //clockevent_delta2ns(0x30, cd); | ||
374 | |||
375 | cd->rating = 200; | ||
376 | cd->irq = 17; //-1; | ||
377 | // if (cpu) | ||
378 | // cd->cpumask = CPU_MASK_ALL; // cpumask_of_cpu(cpu); | ||
379 | // else | ||
380 | cd->cpumask = cpumask_of_cpu(cpu); | ||
381 | |||
382 | cd->set_mode = smtc_set_mode; | ||
383 | |||
384 | cd->broadcast = mips_broadcast; | ||
385 | 211 | ||
386 | clockevents_register_device(cd); | 212 | /* Calclate a somewhat reasonable rating value */ |
387 | } | 213 | clocksource_mips.rating = 200 + mips_hpt_frequency / 10000000; |
388 | #endif | ||
389 | 214 | ||
390 | static void mips_event_handler(struct clock_event_device *dev) | 215 | clocksource_set_clock(&clocksource_mips, mips_hpt_frequency); |
391 | { | ||
392 | } | ||
393 | 216 | ||
394 | /* | 217 | clocksource_register(&clocksource_mips); |
395 | * FIXME: This doesn't hold for the relocated E9000 compare interrupt. | ||
396 | */ | ||
397 | static int c0_compare_int_pending(void) | ||
398 | { | ||
399 | return (read_c0_cause() >> cp0_compare_irq) & 0x100; | ||
400 | } | 218 | } |
401 | 219 | ||
402 | static int c0_compare_int_usable(void) | 220 | void __init __weak plat_time_init(void) |
403 | { | 221 | { |
404 | const unsigned int delta = 0x300000; | ||
405 | unsigned int cnt; | ||
406 | |||
407 | /* | ||
408 | * IP7 already pending? Try to clear it by acking the timer. | ||
409 | */ | ||
410 | if (c0_compare_int_pending()) { | ||
411 | write_c0_compare(read_c0_compare()); | ||
412 | irq_disable_hazard(); | ||
413 | if (c0_compare_int_pending()) | ||
414 | return 0; | ||
415 | } | ||
416 | |||
417 | cnt = read_c0_count(); | ||
418 | cnt += delta; | ||
419 | write_c0_compare(cnt); | ||
420 | |||
421 | while ((long)(read_c0_count() - cnt) <= 0) | ||
422 | ; /* Wait for expiry */ | ||
423 | |||
424 | if (!c0_compare_int_pending()) | ||
425 | return 0; | ||
426 | |||
427 | write_c0_compare(read_c0_compare()); | ||
428 | irq_disable_hazard(); | ||
429 | if (c0_compare_int_pending()) | ||
430 | return 0; | ||
431 | |||
432 | /* | ||
433 | * Feels like a real count / compare timer. | ||
434 | */ | ||
435 | return 1; | ||
436 | } | 222 | } |
437 | 223 | ||
438 | void __cpuinit mips_clockevent_init(void) | 224 | void __init __weak plat_timer_setup(struct irqaction *irq) |
439 | { | 225 | { |
440 | uint64_t mips_freq = mips_hpt_frequency; | ||
441 | unsigned int cpu = smp_processor_id(); | ||
442 | struct clock_event_device *cd; | ||
443 | unsigned int irq = MIPS_CPU_IRQ_BASE + 7; | ||
444 | |||
445 | if (!cpu_has_counter) | ||
446 | return; | ||
447 | |||
448 | #ifdef CONFIG_MIPS_MT_SMTC | ||
449 | setup_smtc_dummy_clockevent_device(); | ||
450 | |||
451 | /* | ||
452 | * On SMTC we only register VPE0's compare interrupt as clockevent | ||
453 | * device. | ||
454 | */ | ||
455 | if (cpu) | ||
456 | return; | ||
457 | #endif | ||
458 | |||
459 | if (!c0_compare_int_usable()) | ||
460 | return; | ||
461 | |||
462 | cd = &per_cpu(mips_clockevent_device, cpu); | ||
463 | |||
464 | cd->name = "MIPS"; | ||
465 | cd->features = CLOCK_EVT_FEAT_ONESHOT; | ||
466 | |||
467 | /* Calculate the min / max delta */ | ||
468 | cd->mult = div_sc((unsigned long) mips_freq, NSEC_PER_SEC, 32); | ||
469 | cd->shift = 32; | ||
470 | cd->max_delta_ns = clockevent_delta2ns(0x7fffffff, cd); | ||
471 | cd->min_delta_ns = clockevent_delta2ns(0x300, cd); | ||
472 | |||
473 | cd->rating = 300; | ||
474 | cd->irq = irq; | ||
475 | #ifdef CONFIG_MIPS_MT_SMTC | ||
476 | cd->cpumask = CPU_MASK_ALL; | ||
477 | #else | ||
478 | cd->cpumask = cpumask_of_cpu(cpu); | ||
479 | #endif | ||
480 | cd->set_next_event = mips_next_event; | ||
481 | cd->set_mode = mips_set_mode; | ||
482 | cd->event_handler = mips_event_handler; | ||
483 | |||
484 | clockevents_register_device(cd); | ||
485 | |||
486 | if (!cp0_timer_irq_installed) { | ||
487 | #ifdef CONFIG_MIPS_MT_SMTC | ||
488 | #define CPUCTR_IMASKBIT (0x100 << cp0_compare_irq) | ||
489 | setup_irq_smtc(irq, &timer_irqaction, CPUCTR_IMASKBIT); | ||
490 | #else | ||
491 | setup_irq(irq, &timer_irqaction); | ||
492 | #endif /* CONFIG_MIPS_MT_SMTC */ | ||
493 | cp0_timer_irq_installed = 1; | ||
494 | } | ||
495 | } | 226 | } |
496 | 227 | ||
497 | void __init time_init(void) | 228 | void __init time_init(void) |
@@ -512,14 +243,6 @@ void __init time_init(void) | |||
512 | if (!clocksource_mips.read) { | 243 | if (!clocksource_mips.read) { |
513 | /* No external high precision timer -- use R4k. */ | 244 | /* No external high precision timer -- use R4k. */ |
514 | clocksource_mips.read = c0_hpt_read; | 245 | clocksource_mips.read = c0_hpt_read; |
515 | |||
516 | if (!mips_timer_state) { | ||
517 | /* No external timer interrupt -- use R4k. */ | ||
518 | mips_timer_ack = c0_timer_ack; | ||
519 | /* Calculate cache parameters. */ | ||
520 | cycles_per_jiffy = | ||
521 | (mips_hpt_frequency + HZ / 2) / HZ; | ||
522 | } | ||
523 | } | 246 | } |
524 | if (!mips_hpt_frequency) | 247 | if (!mips_hpt_frequency) |
525 | mips_hpt_frequency = calibrate_hpt(); | 248 | mips_hpt_frequency = calibrate_hpt(); |
@@ -528,29 +251,8 @@ void __init time_init(void) | |||
528 | printk("Using %u.%03u MHz high precision timer.\n", | 251 | printk("Using %u.%03u MHz high precision timer.\n", |
529 | ((mips_hpt_frequency + 500) / 1000) / 1000, | 252 | ((mips_hpt_frequency + 500) / 1000) / 1000, |
530 | ((mips_hpt_frequency + 500) / 1000) % 1000); | 253 | ((mips_hpt_frequency + 500) / 1000) % 1000); |
531 | |||
532 | #ifdef CONFIG_IRQ_CPU | ||
533 | setup_irq(MIPS_CPU_IRQ_BASE + 7, &timer_irqaction); | ||
534 | #endif | ||
535 | } | 254 | } |
536 | 255 | ||
537 | if (!mips_timer_ack) | ||
538 | /* No timer interrupt ack (e.g. i8254). */ | ||
539 | mips_timer_ack = null_timer_ack; | ||
540 | |||
541 | /* | ||
542 | * Call board specific timer interrupt setup. | ||
543 | * | ||
544 | * this pointer must be setup in machine setup routine. | ||
545 | * | ||
546 | * Even if a machine chooses to use a low-level timer interrupt, | ||
547 | * it still needs to setup the timer_irqaction. | ||
548 | * In that case, it might be better to set timer_irqaction.handler | ||
549 | * to be NULL function so that we are sure the high-level code | ||
550 | * is not invoked accidentally. | ||
551 | */ | ||
552 | plat_timer_setup(&timer_irqaction); | ||
553 | |||
554 | init_mips_clocksource(); | 256 | init_mips_clocksource(); |
555 | mips_clockevent_init(); | 257 | mips_clockevent_init(); |
556 | } | 258 | } |
diff --git a/arch/mips/kernel/traps.c b/arch/mips/kernel/traps.c index bbf01b81a4ff..fa500787152d 100644 --- a/arch/mips/kernel/traps.c +++ b/arch/mips/kernel/traps.c | |||
@@ -314,7 +314,7 @@ void show_registers(const struct pt_regs *regs) | |||
314 | __show_regs(regs); | 314 | __show_regs(regs); |
315 | print_modules(); | 315 | print_modules(); |
316 | printk("Process %s (pid: %d, threadinfo=%p, task=%p)\n", | 316 | printk("Process %s (pid: %d, threadinfo=%p, task=%p)\n", |
317 | current->comm, current->pid, current_thread_info(), current); | 317 | current->comm, task_pid_nr(current), current_thread_info(), current); |
318 | show_stacktrace(current, regs); | 318 | show_stacktrace(current, regs); |
319 | show_code((unsigned int __user *) regs->cp0_epc); | 319 | show_code((unsigned int __user *) regs->cp0_epc); |
320 | printk("\n"); | 320 | printk("\n"); |
@@ -1336,6 +1336,17 @@ extern void cpu_cache_init(void); | |||
1336 | extern void tlb_init(void); | 1336 | extern void tlb_init(void); |
1337 | extern void flush_tlb_handlers(void); | 1337 | extern void flush_tlb_handlers(void); |
1338 | 1338 | ||
1339 | /* | ||
1340 | * Timer interrupt | ||
1341 | */ | ||
1342 | int cp0_compare_irq; | ||
1343 | |||
1344 | /* | ||
1345 | * Performance counter IRQ or -1 if shared with timer | ||
1346 | */ | ||
1347 | int cp0_perfcount_irq; | ||
1348 | EXPORT_SYMBOL_GPL(cp0_perfcount_irq); | ||
1349 | |||
1339 | void __init per_cpu_trap_init(void) | 1350 | void __init per_cpu_trap_init(void) |
1340 | { | 1351 | { |
1341 | unsigned int cpu = smp_processor_id(); | 1352 | unsigned int cpu = smp_processor_id(); |
diff --git a/arch/mips/lemote/lm2e/setup.c b/arch/mips/lemote/lm2e/setup.c index 09314a20f9fb..2cc6745991ab 100644 --- a/arch/mips/lemote/lm2e/setup.c +++ b/arch/mips/lemote/lm2e/setup.c | |||
@@ -53,11 +53,6 @@ unsigned long bus_clock; | |||
53 | unsigned int memsize; | 53 | unsigned int memsize; |
54 | unsigned int highmemsize = 0; | 54 | unsigned int highmemsize = 0; |
55 | 55 | ||
56 | void __init plat_timer_setup(struct irqaction *irq) | ||
57 | { | ||
58 | setup_irq(MIPS_CPU_IRQ_BASE + 7, irq); | ||
59 | } | ||
60 | |||
61 | void __init plat_time_init(void) | 56 | void __init plat_time_init(void) |
62 | { | 57 | { |
63 | /* setup mips r4k timer */ | 58 | /* setup mips r4k timer */ |
diff --git a/arch/mips/mm/fault.c b/arch/mips/mm/fault.c index 5699c7713e2f..fa636fc6b7b9 100644 --- a/arch/mips/mm/fault.c +++ b/arch/mips/mm/fault.c | |||
@@ -173,7 +173,7 @@ no_context: | |||
173 | */ | 173 | */ |
174 | out_of_memory: | 174 | out_of_memory: |
175 | up_read(&mm->mmap_sem); | 175 | up_read(&mm->mmap_sem); |
176 | if (is_init(tsk)) { | 176 | if (is_global_init(tsk)) { |
177 | yield(); | 177 | yield(); |
178 | down_read(&mm->mmap_sem); | 178 | down_read(&mm->mmap_sem); |
179 | goto survive; | 179 | goto survive; |
diff --git a/arch/mips/oprofile/Kconfig b/arch/mips/oprofile/Kconfig deleted file mode 100644 index fb6f235348b0..000000000000 --- a/arch/mips/oprofile/Kconfig +++ /dev/null | |||
@@ -1,23 +0,0 @@ | |||
1 | |||
2 | menu "Profiling support" | ||
3 | depends on EXPERIMENTAL | ||
4 | |||
5 | config PROFILING | ||
6 | bool "Profiling support (EXPERIMENTAL)" | ||
7 | help | ||
8 | Say Y here to enable the extended profiling support mechanisms used | ||
9 | by profilers such as OProfile. | ||
10 | |||
11 | |||
12 | config OPROFILE | ||
13 | tristate "OProfile system profiling (EXPERIMENTAL)" | ||
14 | depends on PROFILING && !MIPS_MT_SMTC && EXPERIMENTAL | ||
15 | help | ||
16 | OProfile is a profiling system capable of profiling the | ||
17 | whole system, include the kernel, kernel modules, libraries, | ||
18 | and applications. | ||
19 | |||
20 | If unsure, say N. | ||
21 | |||
22 | endmenu | ||
23 | |||
diff --git a/arch/mips/pci/pci-excite.c b/arch/mips/pci/pci-excite.c index 3c86c77cb74f..8a56876afcc6 100644 --- a/arch/mips/pci/pci-excite.c +++ b/arch/mips/pci/pci-excite.c | |||
@@ -131,7 +131,7 @@ static int __init basler_excite_pci_setup(void) | |||
131 | ocd_writel(0x00000000, bar + 0x100); | 131 | ocd_writel(0x00000000, bar + 0x100); |
132 | } | 132 | } |
133 | 133 | ||
134 | /* Finally, enable the PCI interupt */ | 134 | /* Finally, enable the PCI interrupt */ |
135 | #if USB_IRQ > 7 | 135 | #if USB_IRQ > 7 |
136 | set_c0_intcontrol(1 << USB_IRQ); | 136 | set_c0_intcontrol(1 << USB_IRQ); |
137 | #else | 137 | #else |
diff --git a/arch/mips/pmc-sierra/Kconfig b/arch/mips/pmc-sierra/Kconfig index abbd0bbfabd7..6b293ce0935f 100644 --- a/arch/mips/pmc-sierra/Kconfig +++ b/arch/mips/pmc-sierra/Kconfig | |||
@@ -4,11 +4,13 @@ choice | |||
4 | 4 | ||
5 | config PMC_MSP4200_EVAL | 5 | config PMC_MSP4200_EVAL |
6 | bool "PMC-Sierra MSP4200 Eval Board" | 6 | bool "PMC-Sierra MSP4200 Eval Board" |
7 | select CEVT_R4K | ||
7 | select IRQ_MSP_SLP | 8 | select IRQ_MSP_SLP |
8 | select HW_HAS_PCI | 9 | select HW_HAS_PCI |
9 | 10 | ||
10 | config PMC_MSP4200_GW | 11 | config PMC_MSP4200_GW |
11 | bool "PMC-Sierra MSP4200 VoIP Gateway" | 12 | bool "PMC-Sierra MSP4200 VoIP Gateway" |
13 | select CEVT_R4K | ||
12 | select IRQ_MSP_SLP | 14 | select IRQ_MSP_SLP |
13 | select HW_HAS_PCI | 15 | select HW_HAS_PCI |
14 | 16 | ||
diff --git a/arch/mips/pmc-sierra/msp71xx/msp_time.c b/arch/mips/pmc-sierra/msp71xx/msp_time.c index f221d4763625..7cfeda5a651b 100644 --- a/arch/mips/pmc-sierra/msp71xx/msp_time.c +++ b/arch/mips/pmc-sierra/msp71xx/msp_time.c | |||
@@ -86,8 +86,5 @@ void __init plat_timer_setup(struct irqaction *irq) | |||
86 | #ifdef CONFIG_IRQ_MSP_CIC | 86 | #ifdef CONFIG_IRQ_MSP_CIC |
87 | /* we are using the vpe0 counter for timer interrupts */ | 87 | /* we are using the vpe0 counter for timer interrupts */ |
88 | setup_irq(MSP_INT_VPE0_TIMER, irq); | 88 | setup_irq(MSP_INT_VPE0_TIMER, irq); |
89 | #else | ||
90 | /* we are using the mips counter for timer interrupts */ | ||
91 | setup_irq(MSP_INT_TIMER, irq); | ||
92 | #endif | 89 | #endif |
93 | } | 90 | } |
diff --git a/arch/mips/pmc-sierra/yosemite/setup.c b/arch/mips/pmc-sierra/yosemite/setup.c index 015fcc363dc0..855977ca51cd 100644 --- a/arch/mips/pmc-sierra/yosemite/setup.c +++ b/arch/mips/pmc-sierra/yosemite/setup.c | |||
@@ -137,11 +137,6 @@ int rtc_mips_set_time(unsigned long tim) | |||
137 | return 0; | 137 | return 0; |
138 | } | 138 | } |
139 | 139 | ||
140 | void __init plat_timer_setup(struct irqaction *irq) | ||
141 | { | ||
142 | setup_irq(7, irq); | ||
143 | } | ||
144 | |||
145 | void __init plat_time_init(void) | 140 | void __init plat_time_init(void) |
146 | { | 141 | { |
147 | mips_hpt_frequency = cpu_clock_freq / 2; | 142 | mips_hpt_frequency = cpu_clock_freq / 2; |
diff --git a/arch/mips/sgi-ip27/ip27-irq.c b/arch/mips/sgi-ip27/ip27-irq.c index 856649cf9f1e..1bb692a3b319 100644 --- a/arch/mips/sgi-ip27/ip27-irq.c +++ b/arch/mips/sgi-ip27/ip27-irq.c | |||
@@ -374,14 +374,13 @@ int __devinit request_bridge_irq(struct bridge_controller *bc) | |||
374 | return irq; | 374 | return irq; |
375 | } | 375 | } |
376 | 376 | ||
377 | extern void ip27_rt_timer_interrupt(void); | ||
378 | |||
379 | asmlinkage void plat_irq_dispatch(void) | 377 | asmlinkage void plat_irq_dispatch(void) |
380 | { | 378 | { |
381 | unsigned long pending = read_c0_cause() & read_c0_status(); | 379 | unsigned long pending = read_c0_cause() & read_c0_status(); |
380 | extern unsigned int rt_timer_irq; | ||
382 | 381 | ||
383 | if (pending & CAUSEF_IP4) | 382 | if (pending & CAUSEF_IP4) |
384 | ip27_rt_timer_interrupt(); | 383 | do_IRQ(rt_timer_irq); |
385 | else if (pending & CAUSEF_IP2) /* PI_INT_PEND_0 or CC_PEND_{A|B} */ | 384 | else if (pending & CAUSEF_IP2) /* PI_INT_PEND_0 or CC_PEND_{A|B} */ |
386 | ip27_do_irq_mask0(); | 385 | ip27_do_irq_mask0(); |
387 | else if (pending & CAUSEF_IP3) /* PI_INT_PEND_1 */ | 386 | else if (pending & CAUSEF_IP3) /* PI_INT_PEND_1 */ |
diff --git a/arch/mips/sgi-ip27/ip27-timer.c b/arch/mips/sgi-ip27/ip27-timer.c index b7b3479b6bce..d467bf4f6c3f 100644 --- a/arch/mips/sgi-ip27/ip27-timer.c +++ b/arch/mips/sgi-ip27/ip27-timer.c | |||
@@ -3,6 +3,7 @@ | |||
3 | * Copytight (C) 1999, 2000 Silicon Graphics, Inc. | 3 | * Copytight (C) 1999, 2000 Silicon Graphics, Inc. |
4 | */ | 4 | */ |
5 | #include <linux/bcd.h> | 5 | #include <linux/bcd.h> |
6 | #include <linux/clockchips.h> | ||
6 | #include <linux/init.h> | 7 | #include <linux/init.h> |
7 | #include <linux/kernel.h> | 8 | #include <linux/kernel.h> |
8 | #include <linux/sched.h> | 9 | #include <linux/sched.h> |
@@ -25,22 +26,8 @@ | |||
25 | #include <asm/sn/sn0/ip27.h> | 26 | #include <asm/sn/sn0/ip27.h> |
26 | #include <asm/sn/sn0/hub.h> | 27 | #include <asm/sn/sn0/hub.h> |
27 | 28 | ||
28 | /* | ||
29 | * This is a hack; we really need to figure these values out dynamically | ||
30 | * | ||
31 | * Since 800 ns works very well with various HUB frequencies, such as | ||
32 | * 360, 380, 390 and 400 MHZ, we use 800 ns rtc cycle time. | ||
33 | * | ||
34 | * Ralf: which clock rate is used to feed the counter? | ||
35 | */ | ||
36 | #define NSEC_PER_CYCLE 800 | ||
37 | #define CYCLES_PER_SEC (NSEC_PER_SEC/NSEC_PER_CYCLE) | ||
38 | #define CYCLES_PER_JIFFY (CYCLES_PER_SEC/HZ) | ||
39 | |||
40 | #define TICK_SIZE (tick_nsec / 1000) | 29 | #define TICK_SIZE (tick_nsec / 1000) |
41 | 30 | ||
42 | static unsigned long ct_cur[NR_CPUS]; /* What counter should be at next timer irq */ | ||
43 | |||
44 | #if 0 | 31 | #if 0 |
45 | static int set_rtc_mmss(unsigned long nowtime) | 32 | static int set_rtc_mmss(unsigned long nowtime) |
46 | { | 33 | { |
@@ -86,36 +73,6 @@ static int set_rtc_mmss(unsigned long nowtime) | |||
86 | } | 73 | } |
87 | #endif | 74 | #endif |
88 | 75 | ||
89 | static unsigned int rt_timer_irq; | ||
90 | |||
91 | void ip27_rt_timer_interrupt(void) | ||
92 | { | ||
93 | int cpu = smp_processor_id(); | ||
94 | int cpuA = cputoslice(cpu) == 0; | ||
95 | unsigned int irq = rt_timer_irq; | ||
96 | |||
97 | irq_enter(); | ||
98 | write_seqlock(&xtime_lock); | ||
99 | |||
100 | again: | ||
101 | LOCAL_HUB_S(cpuA ? PI_RT_PEND_A : PI_RT_PEND_B, 0); /* Ack */ | ||
102 | ct_cur[cpu] += CYCLES_PER_JIFFY; | ||
103 | LOCAL_HUB_S(cpuA ? PI_RT_COMPARE_A : PI_RT_COMPARE_B, ct_cur[cpu]); | ||
104 | |||
105 | if (LOCAL_HUB_L(PI_RT_COUNT) >= ct_cur[cpu]) | ||
106 | goto again; | ||
107 | |||
108 | kstat_this_cpu.irqs[irq]++; /* kstat only for bootcpu? */ | ||
109 | |||
110 | if (cpu == 0) | ||
111 | do_timer(1); | ||
112 | |||
113 | update_process_times(user_mode(get_irq_regs())); | ||
114 | |||
115 | write_sequnlock(&xtime_lock); | ||
116 | irq_exit(); | ||
117 | } | ||
118 | |||
119 | /* Includes for ioc3_init(). */ | 76 | /* Includes for ioc3_init(). */ |
120 | #include <asm/sn/types.h> | 77 | #include <asm/sn/types.h> |
121 | #include <asm/sn/sn0/addrs.h> | 78 | #include <asm/sn/sn0/addrs.h> |
@@ -154,6 +111,46 @@ unsigned long read_persistent_clock(void) | |||
154 | return mktime(year, month, date, hour, min, sec); | 111 | return mktime(year, month, date, hour, min, sec); |
155 | } | 112 | } |
156 | 113 | ||
114 | static int rt_set_next_event(unsigned long delta, | ||
115 | struct clock_event_device *evt) | ||
116 | { | ||
117 | unsigned int cpu = smp_processor_id(); | ||
118 | int slice = cputoslice(cpu) == 0; | ||
119 | unsigned long cnt; | ||
120 | |||
121 | cnt = LOCAL_HUB_L(PI_RT_COUNT); | ||
122 | cnt += delta; | ||
123 | LOCAL_HUB_S(slice ? PI_RT_COMPARE_A : PI_RT_COMPARE_B, cnt); | ||
124 | |||
125 | return LOCAL_HUB_L(PI_RT_COUNT) >= cnt ? -ETIME : 0; | ||
126 | } | ||
127 | |||
128 | static void rt_set_mode(enum clock_event_mode mode, | ||
129 | struct clock_event_device *evt) | ||
130 | { | ||
131 | switch (mode) { | ||
132 | case CLOCK_EVT_MODE_PERIODIC: | ||
133 | /* The only mode supported */ | ||
134 | break; | ||
135 | |||
136 | case CLOCK_EVT_MODE_UNUSED: | ||
137 | case CLOCK_EVT_MODE_SHUTDOWN: | ||
138 | case CLOCK_EVT_MODE_ONESHOT: | ||
139 | case CLOCK_EVT_MODE_RESUME: | ||
140 | /* Nothing to do */ | ||
141 | break; | ||
142 | } | ||
143 | } | ||
144 | |||
145 | struct clock_event_device rt_clock_event_device = { | ||
146 | .name = "HUB-RT", | ||
147 | .features = CLOCK_EVT_FEAT_ONESHOT, | ||
148 | |||
149 | .rating = 300, | ||
150 | .set_next_event = rt_set_next_event, | ||
151 | .set_mode = rt_set_mode, | ||
152 | }; | ||
153 | |||
157 | static void enable_rt_irq(unsigned int irq) | 154 | static void enable_rt_irq(unsigned int irq) |
158 | { | 155 | { |
159 | } | 156 | } |
@@ -171,6 +168,20 @@ static struct irq_chip rt_irq_type = { | |||
171 | .eoi = enable_rt_irq, | 168 | .eoi = enable_rt_irq, |
172 | }; | 169 | }; |
173 | 170 | ||
171 | unsigned int rt_timer_irq; | ||
172 | |||
173 | static irqreturn_t ip27_rt_timer_interrupt(int irq, void *dev_id) | ||
174 | { | ||
175 | struct clock_event_device *cd = &rt_clock_event_device; | ||
176 | unsigned int cpu = smp_processor_id(); | ||
177 | int slice = cputoslice(cpu) == 0; | ||
178 | |||
179 | LOCAL_HUB_S(slice ? PI_RT_PEND_A : PI_RT_PEND_B, 0); /* Ack */ | ||
180 | cd->event_handler(cd); | ||
181 | |||
182 | return IRQ_HANDLED; | ||
183 | } | ||
184 | |||
174 | static struct irqaction rt_irqaction = { | 185 | static struct irqaction rt_irqaction = { |
175 | .handler = (irq_handler_t) ip27_rt_timer_interrupt, | 186 | .handler = (irq_handler_t) ip27_rt_timer_interrupt, |
176 | .flags = IRQF_DISABLED, | 187 | .flags = IRQF_DISABLED, |
@@ -178,26 +189,43 @@ static struct irqaction rt_irqaction = { | |||
178 | .name = "timer" | 189 | .name = "timer" |
179 | }; | 190 | }; |
180 | 191 | ||
181 | void __init plat_timer_setup(struct irqaction *irq) | 192 | /* |
193 | * This is a hack; we really need to figure these values out dynamically | ||
194 | * | ||
195 | * Since 800 ns works very well with various HUB frequencies, such as | ||
196 | * 360, 380, 390 and 400 MHZ, we use 800 ns rtc cycle time. | ||
197 | * | ||
198 | * Ralf: which clock rate is used to feed the counter? | ||
199 | */ | ||
200 | #define NSEC_PER_CYCLE 800 | ||
201 | #define CYCLES_PER_SEC (NSEC_PER_SEC / NSEC_PER_CYCLE) | ||
202 | |||
203 | static void __init ip27_rt_clock_event_init(void) | ||
182 | { | 204 | { |
183 | int irqno = allocate_irqno(); | 205 | struct clock_event_device *cd = &rt_clock_event_device; |
206 | unsigned int cpu = smp_processor_id(); | ||
207 | int irq = allocate_irqno(); | ||
184 | 208 | ||
185 | if (irqno < 0) | 209 | if (irq < 0) |
186 | panic("Can't allocate interrupt number for timer interrupt"); | 210 | panic("Can't allocate interrupt number for timer interrupt"); |
187 | 211 | ||
188 | set_irq_chip_and_handler(irqno, &rt_irq_type, handle_percpu_irq); | 212 | rt_timer_irq = irq; |
189 | 213 | ||
190 | /* over-write the handler, we use our own way */ | 214 | cd->irq = irq, |
191 | irq->handler = no_action; | 215 | cd->cpumask = cpumask_of_cpu(cpu), |
192 | 216 | ||
193 | /* setup irqaction */ | ||
194 | irq_desc[irqno].status |= IRQ_PER_CPU; | ||
195 | |||
196 | rt_timer_irq = irqno; | ||
197 | /* | 217 | /* |
198 | * Only needed to get /proc/interrupt to display timer irq stats | 218 | * Calculate the min / max delta |
199 | */ | 219 | */ |
200 | setup_irq(irqno, &rt_irqaction); | 220 | cd->mult = |
221 | div_sc((unsigned long) CYCLES_PER_SEC, NSEC_PER_SEC, 32); | ||
222 | cd->shift = 32; | ||
223 | cd->max_delta_ns = clockevent_delta2ns(0x7fffffff, cd); | ||
224 | cd->min_delta_ns = clockevent_delta2ns(0x300, cd); | ||
225 | clockevents_register_device(cd); | ||
226 | |||
227 | set_irq_chip_and_handler(irq, &rt_irq_type, handle_percpu_irq); | ||
228 | setup_irq(irq, &rt_irqaction); | ||
201 | } | 229 | } |
202 | 230 | ||
203 | static cycle_t hub_rt_read(void) | 231 | static cycle_t hub_rt_read(void) |
@@ -206,7 +234,7 @@ static cycle_t hub_rt_read(void) | |||
206 | } | 234 | } |
207 | 235 | ||
208 | struct clocksource ht_rt_clocksource = { | 236 | struct clocksource ht_rt_clocksource = { |
209 | .name = "HUB", | 237 | .name = "HUB-RT", |
210 | .rating = 200, | 238 | .rating = 200, |
211 | .read = hub_rt_read, | 239 | .read = hub_rt_read, |
212 | .mask = CLOCKSOURCE_MASK(52), | 240 | .mask = CLOCKSOURCE_MASK(52), |
@@ -214,11 +242,17 @@ struct clocksource ht_rt_clocksource = { | |||
214 | .flags = CLOCK_SOURCE_IS_CONTINUOUS, | 242 | .flags = CLOCK_SOURCE_IS_CONTINUOUS, |
215 | }; | 243 | }; |
216 | 244 | ||
217 | void __init plat_time_init(void) | 245 | static void __init ip27_rt_clocksource_init(void) |
218 | { | 246 | { |
219 | clocksource_register(&ht_rt_clocksource); | 247 | clocksource_register(&ht_rt_clocksource); |
220 | } | 248 | } |
221 | 249 | ||
250 | void __init plat_time_init(void) | ||
251 | { | ||
252 | ip27_rt_clock_event_init(); | ||
253 | ip27_rt_clocksource_init(); | ||
254 | } | ||
255 | |||
222 | void __init cpu_time_init(void) | 256 | void __init cpu_time_init(void) |
223 | { | 257 | { |
224 | lboard_t *board; | 258 | lboard_t *board; |
@@ -248,17 +282,12 @@ void __init hub_rtc_init(cnodeid_t cnode) | |||
248 | * node and timeouts will not happen there. | 282 | * node and timeouts will not happen there. |
249 | */ | 283 | */ |
250 | if (get_compact_nodeid() == cnode) { | 284 | if (get_compact_nodeid() == cnode) { |
251 | int cpu = smp_processor_id(); | ||
252 | LOCAL_HUB_S(PI_RT_EN_A, 1); | 285 | LOCAL_HUB_S(PI_RT_EN_A, 1); |
253 | LOCAL_HUB_S(PI_RT_EN_B, 1); | 286 | LOCAL_HUB_S(PI_RT_EN_B, 1); |
254 | LOCAL_HUB_S(PI_PROF_EN_A, 0); | 287 | LOCAL_HUB_S(PI_PROF_EN_A, 0); |
255 | LOCAL_HUB_S(PI_PROF_EN_B, 0); | 288 | LOCAL_HUB_S(PI_PROF_EN_B, 0); |
256 | ct_cur[cpu] = CYCLES_PER_JIFFY; | ||
257 | LOCAL_HUB_S(PI_RT_COMPARE_A, ct_cur[cpu]); | ||
258 | LOCAL_HUB_S(PI_RT_COUNT, 0); | 289 | LOCAL_HUB_S(PI_RT_COUNT, 0); |
259 | LOCAL_HUB_S(PI_RT_PEND_A, 0); | 290 | LOCAL_HUB_S(PI_RT_PEND_A, 0); |
260 | LOCAL_HUB_S(PI_RT_COMPARE_B, ct_cur[cpu]); | ||
261 | LOCAL_HUB_S(PI_RT_COUNT, 0); | ||
262 | LOCAL_HUB_S(PI_RT_PEND_B, 0); | 291 | LOCAL_HUB_S(PI_RT_PEND_B, 0); |
263 | } | 292 | } |
264 | } | 293 | } |
diff --git a/arch/mips/sgi-ip32/ip32-setup.c b/arch/mips/sgi-ip32/ip32-setup.c index fc75bfcb0c0e..1024bf40bd9e 100644 --- a/arch/mips/sgi-ip32/ip32-setup.c +++ b/arch/mips/sgi-ip32/ip32-setup.c | |||
@@ -80,12 +80,6 @@ void __init plat_time_init(void) | |||
80 | printk("%d MHz CPU detected\n", mips_hpt_frequency * 2 / 1000000); | 80 | printk("%d MHz CPU detected\n", mips_hpt_frequency * 2 / 1000000); |
81 | } | 81 | } |
82 | 82 | ||
83 | void __init plat_timer_setup(struct irqaction *irq) | ||
84 | { | ||
85 | irq->handler = no_action; | ||
86 | setup_irq(MIPS_CPU_IRQ_BASE + 7, irq); | ||
87 | } | ||
88 | |||
89 | void __init plat_mem_setup(void) | 83 | void __init plat_mem_setup(void) |
90 | { | 84 | { |
91 | board_be_init = ip32_be_init; | 85 | board_be_init = ip32_be_init; |
diff --git a/arch/mips/sibyte/bcm1480/smp.c b/arch/mips/sibyte/bcm1480/smp.c index 6eac36d1b8c8..02b266a31c46 100644 --- a/arch/mips/sibyte/bcm1480/smp.c +++ b/arch/mips/sibyte/bcm1480/smp.c | |||
@@ -69,8 +69,9 @@ void bcm1480_smp_init(void) | |||
69 | 69 | ||
70 | void bcm1480_smp_finish(void) | 70 | void bcm1480_smp_finish(void) |
71 | { | 71 | { |
72 | extern void bcm1480_time_init(void); | 72 | extern void sb1480_clockevent_init(void); |
73 | bcm1480_time_init(); | 73 | |
74 | sb1480_clockevent_init(); | ||
74 | local_irq_enable(); | 75 | local_irq_enable(); |
75 | } | 76 | } |
76 | 77 | ||
diff --git a/arch/mips/sibyte/bcm1480/time.c b/arch/mips/sibyte/bcm1480/time.c index 5b4bfbbb5a24..c730744aa474 100644 --- a/arch/mips/sibyte/bcm1480/time.c +++ b/arch/mips/sibyte/bcm1480/time.c | |||
@@ -27,9 +27,8 @@ | |||
27 | */ | 27 | */ |
28 | #include <linux/clockchips.h> | 28 | #include <linux/clockchips.h> |
29 | #include <linux/interrupt.h> | 29 | #include <linux/interrupt.h> |
30 | #include <linux/sched.h> | 30 | #include <linux/percpu.h> |
31 | #include <linux/spinlock.h> | 31 | #include <linux/spinlock.h> |
32 | #include <linux/kernel_stat.h> | ||
33 | 32 | ||
34 | #include <asm/irq.h> | 33 | #include <asm/irq.h> |
35 | #include <asm/addrspace.h> | 34 | #include <asm/addrspace.h> |
@@ -101,25 +100,36 @@ static void sibyte_set_mode(enum clock_event_mode mode, | |||
101 | break; | 100 | break; |
102 | 101 | ||
103 | case CLOCK_EVT_MODE_UNUSED: /* shuddup gcc */ | 102 | case CLOCK_EVT_MODE_UNUSED: /* shuddup gcc */ |
103 | case CLOCK_EVT_MODE_RESUME: | ||
104 | ; | 104 | ; |
105 | } | 105 | } |
106 | } | 106 | } |
107 | 107 | ||
108 | struct clock_event_device sibyte_hpt_clockevent = { | 108 | static int sibyte_next_event(unsigned long delta, struct clock_event_device *cd) |
109 | .name = "bcm1480-counter", | 109 | { |
110 | .features = CLOCK_EVT_FEAT_PERIODIC, | 110 | unsigned int cpu = smp_processor_id(); |
111 | .set_mode = sibyte_set_mode, | 111 | void __iomem *timer_init; |
112 | .shift = 32, | 112 | unsigned int cnt; |
113 | .irq = 0, | 113 | int res; |
114 | }; | 114 | |
115 | timer_init = IOADDR(A_SCD_TIMER_REGISTER(cpu, R_SCD_TIMER_INIT)); | ||
116 | cnt = __raw_readq(timer_init); | ||
117 | cnt += delta; | ||
118 | __raw_writeq(cnt, timer_init); | ||
119 | res = ((long)(__raw_readq(timer_init) - cnt ) > 0) ? -ETIME : 0; | ||
120 | |||
121 | return res; | ||
122 | } | ||
123 | |||
124 | static DEFINE_PER_CPU(struct clock_event_device, sibyte_hpt_clockevent); | ||
115 | 125 | ||
116 | static irqreturn_t sibyte_counter_handler(int irq, void *dev_id) | 126 | static irqreturn_t sibyte_counter_handler(int irq, void *dev_id) |
117 | { | 127 | { |
118 | struct clock_event_device *cd = &sibyte_hpt_clockevent; | ||
119 | unsigned int cpu = smp_processor_id(); | 128 | unsigned int cpu = smp_processor_id(); |
129 | struct clock_event_device *cd = &per_cpu(sibyte_hpt_clockevent, cpu); | ||
120 | 130 | ||
121 | /* Reset the timer */ | 131 | /* Reset the timer */ |
122 | __raw_writeq(M_SCD_TIMER_ENABLE|M_SCD_TIMER_MODE_CONTINUOUS, | 132 | __raw_writeq(M_SCD_TIMER_ENABLE | M_SCD_TIMER_MODE_CONTINUOUS, |
123 | IOADDR(A_SCD_TIMER_REGISTER(cpu, R_SCD_TIMER_CFG))); | 133 | IOADDR(A_SCD_TIMER_REGISTER(cpu, R_SCD_TIMER_CFG))); |
124 | cd->event_handler(cd); | 134 | cd->event_handler(cd); |
125 | 135 | ||
@@ -140,24 +150,21 @@ static struct irqaction sibyte_counter_irqaction = { | |||
140 | * called directly from irq_handler.S when IP[4] is set during an | 150 | * called directly from irq_handler.S when IP[4] is set during an |
141 | * interrupt | 151 | * interrupt |
142 | */ | 152 | */ |
143 | static void __init sb1480_clockevent_init(void) | 153 | void __cpuinit sb1480_clockevent_init(void) |
144 | { | 154 | { |
145 | unsigned int cpu = smp_processor_id(); | 155 | unsigned int cpu = smp_processor_id(); |
146 | unsigned int irq = K_BCM1480_INT_TIMER_0 + cpu; | 156 | unsigned int irq = K_BCM1480_INT_TIMER_0 + cpu; |
157 | struct clock_event_device *cd = &per_cpu(sibyte_hpt_clockevent, cpu); | ||
147 | 158 | ||
148 | setup_irq(irq, &sibyte_counter_irqaction); | 159 | cd->name = "bcm1480-counter"; |
149 | } | 160 | cd->features = CLOCK_EVT_FEAT_PERIODIC | |
161 | CLOCK_EVT_MODE_ONESHOT; | ||
162 | cd->set_next_event = sibyte_next_event; | ||
163 | cd->set_mode = sibyte_set_mode; | ||
164 | cd->irq = irq; | ||
165 | clockevent_set_clock(cd, BCM1480_HPT_VALUE); | ||
150 | 166 | ||
151 | void bcm1480_timer_interrupt(void) | 167 | setup_irq(irq, &sibyte_counter_irqaction); |
152 | { | ||
153 | int cpu = smp_processor_id(); | ||
154 | int irq = K_BCM1480_INT_TIMER_0 + cpu; | ||
155 | |||
156 | /* Reset the timer */ | ||
157 | __raw_writeq(M_SCD_TIMER_ENABLE|M_SCD_TIMER_MODE_CONTINUOUS, | ||
158 | IOADDR(A_SCD_TIMER_REGISTER(cpu, R_SCD_TIMER_CFG))); | ||
159 | |||
160 | ll_timer_interrupt(irq); | ||
161 | } | 168 | } |
162 | 169 | ||
163 | static cycle_t bcm1480_hpt_read(void) | 170 | static cycle_t bcm1480_hpt_read(void) |
@@ -168,9 +175,26 @@ static cycle_t bcm1480_hpt_read(void) | |||
168 | return (jiffies + 1) * (BCM1480_HPT_VALUE / HZ) - count; | 175 | return (jiffies + 1) * (BCM1480_HPT_VALUE / HZ) - count; |
169 | } | 176 | } |
170 | 177 | ||
178 | struct clocksource bcm1480_clocksource = { | ||
179 | .name = "MIPS", | ||
180 | .rating = 200, | ||
181 | .read = bcm1480_hpt_read, | ||
182 | .mask = CLOCKSOURCE_MASK(32), | ||
183 | .shift = 32, | ||
184 | .flags = CLOCK_SOURCE_IS_CONTINUOUS, | ||
185 | }; | ||
186 | |||
187 | void __init sb1480_clocksource_init(void) | ||
188 | { | ||
189 | struct clocksource *cs = &bcm1480_clocksource; | ||
190 | |||
191 | clocksource_set_clock(cs, BCM1480_HPT_VALUE); | ||
192 | clocksource_register(cs); | ||
193 | } | ||
194 | |||
171 | void __init bcm1480_hpt_setup(void) | 195 | void __init bcm1480_hpt_setup(void) |
172 | { | 196 | { |
173 | clocksource_mips.read = bcm1480_hpt_read; | ||
174 | mips_hpt_frequency = BCM1480_HPT_VALUE; | 197 | mips_hpt_frequency = BCM1480_HPT_VALUE; |
198 | sb1480_clocksource_init(); | ||
175 | sb1480_clockevent_init(); | 199 | sb1480_clockevent_init(); |
176 | } | 200 | } |
diff --git a/arch/mips/sibyte/sb1250/irq.c b/arch/mips/sibyte/sb1250/irq.c index 7659174819c6..500d17e84c09 100644 --- a/arch/mips/sibyte/sb1250/irq.c +++ b/arch/mips/sibyte/sb1250/irq.c | |||
@@ -400,43 +400,11 @@ static void sb1250_kgdb_interrupt(void) | |||
400 | 400 | ||
401 | #endif /* CONFIG_KGDB */ | 401 | #endif /* CONFIG_KGDB */ |
402 | 402 | ||
403 | static inline void sb1250_timer_interrupt(void) | ||
404 | { | ||
405 | int cpu = smp_processor_id(); | ||
406 | int irq = K_INT_TIMER_0 + cpu; | ||
407 | |||
408 | irq_enter(); | ||
409 | kstat_this_cpu.irqs[irq]++; | ||
410 | |||
411 | write_seqlock(&xtime_lock); | ||
412 | |||
413 | /* ACK interrupt */ | ||
414 | ____raw_writeq(M_SCD_TIMER_ENABLE | M_SCD_TIMER_MODE_CONTINUOUS, | ||
415 | IOADDR(A_SCD_TIMER_REGISTER(cpu, R_SCD_TIMER_CFG))); | ||
416 | |||
417 | /* | ||
418 | * call the generic timer interrupt handling | ||
419 | */ | ||
420 | do_timer(1); | ||
421 | |||
422 | write_sequnlock(&xtime_lock); | ||
423 | |||
424 | /* | ||
425 | * In UP mode, we call local_timer_interrupt() to do profiling | ||
426 | * and process accouting. | ||
427 | * | ||
428 | * In SMP mode, local_timer_interrupt() is invoked by appropriate | ||
429 | * low-level local timer interrupt handler. | ||
430 | */ | ||
431 | local_timer_interrupt(irq); | ||
432 | |||
433 | irq_exit(); | ||
434 | } | ||
435 | |||
436 | extern void sb1250_mailbox_interrupt(void); | 403 | extern void sb1250_mailbox_interrupt(void); |
437 | 404 | ||
438 | asmlinkage void plat_irq_dispatch(void) | 405 | asmlinkage void plat_irq_dispatch(void) |
439 | { | 406 | { |
407 | unsigned int cpu = smp_processor_id(); | ||
440 | unsigned int pending; | 408 | unsigned int pending; |
441 | 409 | ||
442 | /* | 410 | /* |
@@ -454,7 +422,7 @@ asmlinkage void plat_irq_dispatch(void) | |||
454 | if (pending & CAUSEF_IP7) /* CPU performance counter interrupt */ | 422 | if (pending & CAUSEF_IP7) /* CPU performance counter interrupt */ |
455 | do_IRQ(MIPS_CPU_IRQ_BASE + 7); | 423 | do_IRQ(MIPS_CPU_IRQ_BASE + 7); |
456 | else if (pending & CAUSEF_IP4) | 424 | else if (pending & CAUSEF_IP4) |
457 | sb1250_timer_interrupt(); | 425 | do_IRQ(K_INT_TIMER_0 + cpu); /* sb1250_timer_interrupt() */ |
458 | 426 | ||
459 | #ifdef CONFIG_SMP | 427 | #ifdef CONFIG_SMP |
460 | else if (pending & CAUSEF_IP3) | 428 | else if (pending & CAUSEF_IP3) |
diff --git a/arch/mips/sibyte/sb1250/smp.c b/arch/mips/sibyte/sb1250/smp.c index c38e1f34460d..aaa4f30dda79 100644 --- a/arch/mips/sibyte/sb1250/smp.c +++ b/arch/mips/sibyte/sb1250/smp.c | |||
@@ -57,8 +57,9 @@ void sb1250_smp_init(void) | |||
57 | 57 | ||
58 | void sb1250_smp_finish(void) | 58 | void sb1250_smp_finish(void) |
59 | { | 59 | { |
60 | extern void sb1250_time_init(void); | 60 | extern void sb1250_clockevent_init(void); |
61 | sb1250_time_init(); | 61 | |
62 | sb1250_clockevent_init(); | ||
62 | local_irq_enable(); | 63 | local_irq_enable(); |
63 | } | 64 | } |
64 | 65 | ||
diff --git a/arch/mips/sibyte/sb1250/time.c b/arch/mips/sibyte/sb1250/time.c index fe11fed8e0d7..9ef54628bc9c 100644 --- a/arch/mips/sibyte/sb1250/time.c +++ b/arch/mips/sibyte/sb1250/time.c | |||
@@ -100,6 +100,7 @@ static void sibyte_set_mode(enum clock_event_mode mode, | |||
100 | break; | 100 | break; |
101 | 101 | ||
102 | case CLOCK_EVT_MODE_UNUSED: /* shuddup gcc */ | 102 | case CLOCK_EVT_MODE_UNUSED: /* shuddup gcc */ |
103 | case CLOCK_EVT_MODE_RESUME: | ||
103 | ; | 104 | ; |
104 | } | 105 | } |
105 | } | 106 | } |
@@ -144,79 +145,7 @@ static struct irqaction sibyte_irqaction = { | |||
144 | .name = "timer", | 145 | .name = "timer", |
145 | }; | 146 | }; |
146 | 147 | ||
147 | /* | 148 | void __cpuinit sb1250_clockevent_init(void) |
148 | * The general purpose timer ticks at 1 Mhz independent if | ||
149 | * the rest of the system | ||
150 | */ | ||
151 | static void sibyte_set_mode(enum clock_event_mode mode, | ||
152 | struct clock_event_device *evt) | ||
153 | { | ||
154 | unsigned int cpu = smp_processor_id(); | ||
155 | void __iomem *timer_cfg, *timer_init; | ||
156 | |||
157 | timer_cfg = IOADDR(A_SCD_TIMER_REGISTER(cpu, R_SCD_TIMER_CFG)); | ||
158 | timer_init = IOADDR(A_SCD_TIMER_REGISTER(cpu, R_SCD_TIMER_INIT)); | ||
159 | |||
160 | switch (mode) { | ||
161 | case CLOCK_EVT_MODE_PERIODIC: | ||
162 | __raw_writeq(0, timer_cfg); | ||
163 | __raw_writeq((V_SCD_TIMER_FREQ / HZ) - 1, timer_init); | ||
164 | __raw_writeq(M_SCD_TIMER_ENABLE | M_SCD_TIMER_MODE_CONTINUOUS, | ||
165 | timer_cfg); | ||
166 | break; | ||
167 | |||
168 | case CLOCK_EVT_MODE_ONESHOT: | ||
169 | /* Stop the timer until we actually program a shot */ | ||
170 | case CLOCK_EVT_MODE_SHUTDOWN: | ||
171 | __raw_writeq(0, timer_cfg); | ||
172 | break; | ||
173 | |||
174 | case CLOCK_EVT_MODE_UNUSED: /* shuddup gcc */ | ||
175 | ; | ||
176 | } | ||
177 | } | ||
178 | |||
179 | static int | ||
180 | sibyte_next_event(unsigned long delta, struct clock_event_device *evt) | ||
181 | { | ||
182 | unsigned int cpu = smp_processor_id(); | ||
183 | void __iomem *timer_cfg, *timer_init; | ||
184 | |||
185 | timer_cfg = IOADDR(A_SCD_TIMER_REGISTER(cpu, R_SCD_TIMER_CFG)); | ||
186 | timer_init = IOADDR(A_SCD_TIMER_REGISTER(cpu, R_SCD_TIMER_INIT)); | ||
187 | |||
188 | __raw_writeq(0, timer_cfg); | ||
189 | __raw_writeq(delta, timer_init); | ||
190 | __raw_writeq(M_SCD_TIMER_ENABLE, timer_cfg); | ||
191 | |||
192 | return 0; | ||
193 | } | ||
194 | |||
195 | struct clock_event_device sibyte_hpt_clockevent = { | ||
196 | .name = "sb1250-counter", | ||
197 | .features = CLOCK_EVT_FEAT_PERIODIC, | ||
198 | .set_mode = sibyte_set_mode, | ||
199 | .set_next_event = sibyte_next_event, | ||
200 | .shift = 32, | ||
201 | .irq = 0, | ||
202 | }; | ||
203 | |||
204 | static irqreturn_t sibyte_counter_handler(int irq, void *dev_id) | ||
205 | { | ||
206 | struct clock_event_device *cd = &sibyte_hpt_clockevent; | ||
207 | |||
208 | cd->event_handler(cd); | ||
209 | |||
210 | return IRQ_HANDLED; | ||
211 | } | ||
212 | |||
213 | static struct irqaction sibyte_irqaction = { | ||
214 | .handler = sibyte_counter_handler, | ||
215 | .flags = IRQF_DISABLED | IRQF_PERCPU, | ||
216 | .name = "timer", | ||
217 | }; | ||
218 | |||
219 | static void __init sb1250_clockevent_init(void) | ||
220 | { | 149 | { |
221 | struct clock_event_device *cd = &sibyte_hpt_clockevent; | 150 | struct clock_event_device *cd = &sibyte_hpt_clockevent; |
222 | unsigned int cpu = smp_processor_id(); | 151 | unsigned int cpu = smp_processor_id(); |
@@ -249,12 +178,6 @@ static void __init sb1250_clockevent_init(void) | |||
249 | clockevents_register_device(cd); | 178 | clockevents_register_device(cd); |
250 | } | 179 | } |
251 | 180 | ||
252 | void __init plat_time_init(void) | ||
253 | { | ||
254 | sb1250_clocksource_init(); | ||
255 | sb1250_clockevent_init(); | ||
256 | } | ||
257 | |||
258 | /* | 181 | /* |
259 | * The HPT is free running from SB1250_HPT_VALUE down to 0 then starts over | 182 | * The HPT is free running from SB1250_HPT_VALUE down to 0 then starts over |
260 | * again. | 183 | * again. |
@@ -267,3 +190,26 @@ static cycle_t sb1250_hpt_read(void) | |||
267 | 190 | ||
268 | return SB1250_HPT_VALUE - count; | 191 | return SB1250_HPT_VALUE - count; |
269 | } | 192 | } |
193 | |||
194 | struct clocksource bcm1250_clocksource = { | ||
195 | .name = "MIPS", | ||
196 | .rating = 200, | ||
197 | .read = sb1250_hpt_read, | ||
198 | .mask = CLOCKSOURCE_MASK(32), | ||
199 | .shift = 32, | ||
200 | .flags = CLOCK_SOURCE_IS_CONTINUOUS, | ||
201 | }; | ||
202 | |||
203 | void __init sb1250_clocksource_init(void) | ||
204 | { | ||
205 | struct clocksource *cs = &bcm1250_clocksource; | ||
206 | |||
207 | clocksource_set_clock(cs, V_SCD_TIMER_FREQ); | ||
208 | clocksource_register(cs); | ||
209 | } | ||
210 | |||
211 | void __init plat_time_init(void) | ||
212 | { | ||
213 | sb1250_clocksource_init(); | ||
214 | sb1250_clockevent_init(); | ||
215 | } | ||
diff --git a/arch/mips/sibyte/swarm/setup.c b/arch/mips/sibyte/swarm/setup.c index 8b3ef0e4cd55..080c966263b7 100644 --- a/arch/mips/sibyte/swarm/setup.c +++ b/arch/mips/sibyte/swarm/setup.c | |||
@@ -69,31 +69,6 @@ const char *get_system_type(void) | |||
69 | return "SiByte " SIBYTE_BOARD_NAME; | 69 | return "SiByte " SIBYTE_BOARD_NAME; |
70 | } | 70 | } |
71 | 71 | ||
72 | void __init plat_time_init(void) | ||
73 | { | ||
74 | #if defined(CONFIG_SIBYTE_SB1250) || defined(CONFIG_SIBYTE_BCM112X) | ||
75 | /* Setup HPT */ | ||
76 | sb1250_hpt_setup(); | ||
77 | #endif | ||
78 | } | ||
79 | |||
80 | void __init plat_timer_setup(struct irqaction *irq) | ||
81 | { | ||
82 | /* | ||
83 | * we don't set up irqaction, because we will deliver timer | ||
84 | * interrupts through low-level (direct) meachanism. | ||
85 | */ | ||
86 | |||
87 | /* We only need to setup the generic timer */ | ||
88 | #if defined(CONFIG_SIBYTE_BCM1x55) || defined(CONFIG_SIBYTE_BCM1x80) | ||
89 | bcm1480_time_init(); | ||
90 | #elif defined(CONFIG_SIBYTE_SB1250) || defined(CONFIG_SIBYTE_BCM112X) | ||
91 | sb1250_time_init(); | ||
92 | #else | ||
93 | #error invalid SiByte board configuration | ||
94 | #endif | ||
95 | } | ||
96 | |||
97 | int swarm_be_handler(struct pt_regs *regs, int is_fixup) | 72 | int swarm_be_handler(struct pt_regs *regs, int is_fixup) |
98 | { | 73 | { |
99 | if (!is_fixup && (regs->cp0_cause & 4)) { | 74 | if (!is_fixup && (regs->cp0_cause & 4)) { |
diff --git a/arch/mips/sni/pcimt.c b/arch/mips/sni/pcimt.c index 39bb15f1f2a6..4df070f2ff5d 100644 --- a/arch/mips/sni/pcimt.c +++ b/arch/mips/sni/pcimt.c | |||
@@ -246,7 +246,7 @@ static void pcimt_hwint1(void) | |||
246 | /* | 246 | /* |
247 | * Note: ASIC PCI's builtin interrupt achknowledge feature is | 247 | * Note: ASIC PCI's builtin interrupt achknowledge feature is |
248 | * broken. Using it may result in loss of some or all i8259 | 248 | * broken. Using it may result in loss of some or all i8259 |
249 | * interupts, so don't use PCIMT_INT_ACKNOWLEDGE ... | 249 | * interrupts, so don't use PCIMT_INT_ACKNOWLEDGE ... |
250 | */ | 250 | */ |
251 | irq = i8259_irq(); | 251 | irq = i8259_irq(); |
252 | if (unlikely(irq < 0)) | 252 | if (unlikely(irq < 0)) |
diff --git a/arch/mips/sni/time.c b/arch/mips/sni/time.c index b80877349d38..0910b35cb71f 100644 --- a/arch/mips/sni/time.c +++ b/arch/mips/sni/time.c | |||
@@ -121,15 +121,6 @@ void __init plat_time_init(void) | |||
121 | setup_pit_timer(); | 121 | setup_pit_timer(); |
122 | } | 122 | } |
123 | 123 | ||
124 | /* | ||
125 | * R4k counter based timer interrupt. Works on RM200-225 and possibly | ||
126 | * others but not on RM400 | ||
127 | */ | ||
128 | static void __init sni_cpu_timer_setup(struct irqaction *irq) | ||
129 | { | ||
130 | setup_irq(SNI_MIPS_IRQ_CPU_TIMER, irq); | ||
131 | } | ||
132 | |||
133 | void __init plat_timer_setup(struct irqaction *irq) | 124 | void __init plat_timer_setup(struct irqaction *irq) |
134 | { | 125 | { |
135 | switch (sni_brd_type) { | 126 | switch (sni_brd_type) { |
@@ -139,15 +130,6 @@ void __init plat_timer_setup(struct irqaction *irq) | |||
139 | case SNI_BRD_MINITOWER: | 130 | case SNI_BRD_MINITOWER: |
140 | sni_a20r_timer_setup(irq); | 131 | sni_a20r_timer_setup(irq); |
141 | break; | 132 | break; |
142 | |||
143 | case SNI_BRD_PCI_TOWER: | ||
144 | case SNI_BRD_RM200: | ||
145 | case SNI_BRD_PCI_MTOWER: | ||
146 | case SNI_BRD_PCI_DESKTOP: | ||
147 | case SNI_BRD_PCI_TOWER_CPLUS: | ||
148 | case SNI_BRD_PCI_MTOWER_CPLUS: | ||
149 | sni_cpu_timer_setup(irq); | ||
150 | break; | ||
151 | } | 133 | } |
152 | } | 134 | } |
153 | 135 | ||
diff --git a/arch/mips/tx4927/common/tx4927_setup.c b/arch/mips/tx4927/common/tx4927_setup.c index 8ce0989671d8..36c5f200eb3d 100644 --- a/arch/mips/tx4927/common/tx4927_setup.c +++ b/arch/mips/tx4927/common/tx4927_setup.c | |||
@@ -72,22 +72,6 @@ void __init plat_time_init(void) | |||
72 | #endif | 72 | #endif |
73 | } | 73 | } |
74 | 74 | ||
75 | void __init plat_timer_setup(struct irqaction *irq) | ||
76 | { | ||
77 | setup_irq(TX4927_IRQ_CPU_TIMER, irq); | ||
78 | |||
79 | #ifdef CONFIG_TOSHIBA_RBTX4927 | ||
80 | { | ||
81 | extern void toshiba_rbtx4927_timer_setup(struct irqaction | ||
82 | *irq); | ||
83 | toshiba_rbtx4927_timer_setup(irq); | ||
84 | } | ||
85 | #endif | ||
86 | |||
87 | return; | ||
88 | } | ||
89 | |||
90 | |||
91 | #ifdef DEBUG | 75 | #ifdef DEBUG |
92 | void print_cp0(char *key, int num, char *name, u32 val) | 76 | void print_cp0(char *key, int num, char *name, u32 val) |
93 | { | 77 | { |
diff --git a/arch/mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_setup.c b/arch/mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_setup.c index b97102a1c635..c7470fba6180 100644 --- a/arch/mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_setup.c +++ b/arch/mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_setup.c | |||
@@ -94,7 +94,6 @@ | |||
94 | #define TOSHIBA_RBTX4927_SETUP_EFWFU ( 1 << 3 ) | 94 | #define TOSHIBA_RBTX4927_SETUP_EFWFU ( 1 << 3 ) |
95 | #define TOSHIBA_RBTX4927_SETUP_SETUP ( 1 << 4 ) | 95 | #define TOSHIBA_RBTX4927_SETUP_SETUP ( 1 << 4 ) |
96 | #define TOSHIBA_RBTX4927_SETUP_TIME_INIT ( 1 << 5 ) | 96 | #define TOSHIBA_RBTX4927_SETUP_TIME_INIT ( 1 << 5 ) |
97 | #define TOSHIBA_RBTX4927_SETUP_TIMER_SETUP ( 1 << 6 ) | ||
98 | #define TOSHIBA_RBTX4927_SETUP_PCIBIOS ( 1 << 7 ) | 97 | #define TOSHIBA_RBTX4927_SETUP_PCIBIOS ( 1 << 7 ) |
99 | #define TOSHIBA_RBTX4927_SETUP_PCI1 ( 1 << 8 ) | 98 | #define TOSHIBA_RBTX4927_SETUP_PCI1 ( 1 << 8 ) |
100 | #define TOSHIBA_RBTX4927_SETUP_PCI2 ( 1 << 9 ) | 99 | #define TOSHIBA_RBTX4927_SETUP_PCI2 ( 1 << 9 ) |
@@ -108,7 +107,6 @@ static const u32 toshiba_rbtx4927_setup_debug_flag = | |||
108 | (TOSHIBA_RBTX4927_SETUP_NONE | TOSHIBA_RBTX4927_SETUP_INFO | | 107 | (TOSHIBA_RBTX4927_SETUP_NONE | TOSHIBA_RBTX4927_SETUP_INFO | |
109 | TOSHIBA_RBTX4927_SETUP_WARN | TOSHIBA_RBTX4927_SETUP_EROR | | 108 | TOSHIBA_RBTX4927_SETUP_WARN | TOSHIBA_RBTX4927_SETUP_EROR | |
110 | TOSHIBA_RBTX4927_SETUP_EFWFU | TOSHIBA_RBTX4927_SETUP_SETUP | | 109 | TOSHIBA_RBTX4927_SETUP_EFWFU | TOSHIBA_RBTX4927_SETUP_SETUP | |
111 | TOSHIBA_RBTX4927_SETUP_TIME_INIT | TOSHIBA_RBTX4927_SETUP_TIMER_SETUP | ||
112 | | TOSHIBA_RBTX4927_SETUP_PCIBIOS | TOSHIBA_RBTX4927_SETUP_PCI1 | | 110 | | TOSHIBA_RBTX4927_SETUP_PCIBIOS | TOSHIBA_RBTX4927_SETUP_PCI1 | |
113 | TOSHIBA_RBTX4927_SETUP_PCI2 | TOSHIBA_RBTX4927_SETUP_PCI66); | 111 | TOSHIBA_RBTX4927_SETUP_PCI2 | TOSHIBA_RBTX4927_SETUP_PCI66); |
114 | #endif | 112 | #endif |
@@ -947,14 +945,6 @@ toshiba_rbtx4927_time_init(void) | |||
947 | 945 | ||
948 | } | 946 | } |
949 | 947 | ||
950 | void __init toshiba_rbtx4927_timer_setup(struct irqaction *irq) | ||
951 | { | ||
952 | TOSHIBA_RBTX4927_SETUP_DPRINTK(TOSHIBA_RBTX4927_SETUP_TIMER_SETUP, | ||
953 | "-\n"); | ||
954 | TOSHIBA_RBTX4927_SETUP_DPRINTK(TOSHIBA_RBTX4927_SETUP_TIMER_SETUP, | ||
955 | "+\n"); | ||
956 | } | ||
957 | |||
958 | static int __init toshiba_rbtx4927_rtc_init(void) | 948 | static int __init toshiba_rbtx4927_rtc_init(void) |
959 | { | 949 | { |
960 | static struct resource __initdata res = { | 950 | static struct resource __initdata res = { |
diff --git a/arch/mips/tx4938/common/setup.c b/arch/mips/tx4938/common/setup.c index ab4082267553..3ba4101d141e 100644 --- a/arch/mips/tx4938/common/setup.c +++ b/arch/mips/tx4938/common/setup.c | |||
@@ -24,7 +24,7 @@ | |||
24 | #include <linux/slab.h> | 24 | #include <linux/slab.h> |
25 | #include <linux/random.h> | 25 | #include <linux/random.h> |
26 | #include <linux/irq.h> | 26 | #include <linux/irq.h> |
27 | #include <asm/bitops.h> | 27 | #include <linux/bitops.h> |
28 | #include <asm/bootinfo.h> | 28 | #include <asm/bootinfo.h> |
29 | #include <asm/io.h> | 29 | #include <asm/io.h> |
30 | #include <asm/irq.h> | 30 | #include <asm/irq.h> |
@@ -43,8 +43,3 @@ plat_mem_setup(void) | |||
43 | { | 43 | { |
44 | toshiba_rbtx4938_setup(); | 44 | toshiba_rbtx4938_setup(); |
45 | } | 45 | } |
46 | |||
47 | void __init plat_timer_setup(struct irqaction *irq) | ||
48 | { | ||
49 | setup_irq(TX4938_IRQ_CPU_TIMER, irq); | ||
50 | } | ||
diff --git a/arch/mips/vr41xx/Kconfig b/arch/mips/vr41xx/Kconfig index 8f4d3e74c230..eeb089f20c0d 100644 --- a/arch/mips/vr41xx/Kconfig +++ b/arch/mips/vr41xx/Kconfig | |||
@@ -5,6 +5,7 @@ choice | |||
5 | 5 | ||
6 | config CASIO_E55 | 6 | config CASIO_E55 |
7 | bool "CASIO CASSIOPEIA E-10/15/55/65" | 7 | bool "CASIO CASSIOPEIA E-10/15/55/65" |
8 | select CEVT_R4K | ||
8 | select DMA_NONCOHERENT | 9 | select DMA_NONCOHERENT |
9 | select IRQ_CPU | 10 | select IRQ_CPU |
10 | select ISA | 11 | select ISA |
@@ -13,6 +14,7 @@ config CASIO_E55 | |||
13 | 14 | ||
14 | config IBM_WORKPAD | 15 | config IBM_WORKPAD |
15 | bool "IBM WorkPad z50" | 16 | bool "IBM WorkPad z50" |
17 | select CEVT_R4K | ||
16 | select DMA_NONCOHERENT | 18 | select DMA_NONCOHERENT |
17 | select IRQ_CPU | 19 | select IRQ_CPU |
18 | select ISA | 20 | select ISA |
@@ -21,6 +23,7 @@ config IBM_WORKPAD | |||
21 | 23 | ||
22 | config NEC_CMBVR4133 | 24 | config NEC_CMBVR4133 |
23 | bool "NEC CMB-VR4133" | 25 | bool "NEC CMB-VR4133" |
26 | select CEVT_R4K | ||
24 | select DMA_NONCOHERENT | 27 | select DMA_NONCOHERENT |
25 | select IRQ_CPU | 28 | select IRQ_CPU |
26 | select HW_HAS_PCI | 29 | select HW_HAS_PCI |
@@ -29,6 +32,7 @@ config NEC_CMBVR4133 | |||
29 | 32 | ||
30 | config TANBAC_TB022X | 33 | config TANBAC_TB022X |
31 | bool "TANBAC VR4131 multichip module and TANBAC VR4131DIMM" | 34 | bool "TANBAC VR4131 multichip module and TANBAC VR4131DIMM" |
35 | select CEVT_R4K | ||
32 | select DMA_NONCOHERENT | 36 | select DMA_NONCOHERENT |
33 | select IRQ_CPU | 37 | select IRQ_CPU |
34 | select HW_HAS_PCI | 38 | select HW_HAS_PCI |
@@ -43,6 +47,7 @@ config TANBAC_TB022X | |||
43 | 47 | ||
44 | config VICTOR_MPC30X | 48 | config VICTOR_MPC30X |
45 | bool "Victor MP-C303/304" | 49 | bool "Victor MP-C303/304" |
50 | select CEVT_R4K | ||
46 | select DMA_NONCOHERENT | 51 | select DMA_NONCOHERENT |
47 | select IRQ_CPU | 52 | select IRQ_CPU |
48 | select HW_HAS_PCI | 53 | select HW_HAS_PCI |
@@ -52,6 +57,7 @@ config VICTOR_MPC30X | |||
52 | 57 | ||
53 | config ZAO_CAPCELLA | 58 | config ZAO_CAPCELLA |
54 | bool "ZAO Networks Capcella" | 59 | bool "ZAO Networks Capcella" |
60 | select CEVT_R4K | ||
55 | select DMA_NONCOHERENT | 61 | select DMA_NONCOHERENT |
56 | select IRQ_CPU | 62 | select IRQ_CPU |
57 | select HW_HAS_PCI | 63 | select HW_HAS_PCI |
diff --git a/arch/mips/vr41xx/common/init.c b/arch/mips/vr41xx/common/init.c index 407cec203b29..8d760df686c4 100644 --- a/arch/mips/vr41xx/common/init.c +++ b/arch/mips/vr41xx/common/init.c | |||
@@ -48,11 +48,6 @@ void __init plat_time_init(void) | |||
48 | mips_hpt_frequency = tclock / 4; | 48 | mips_hpt_frequency = tclock / 4; |
49 | } | 49 | } |
50 | 50 | ||
51 | void __init plat_timer_setup(struct irqaction *irq) | ||
52 | { | ||
53 | setup_irq(TIMER_IRQ, irq); | ||
54 | } | ||
55 | |||
56 | void __init plat_mem_setup(void) | 51 | void __init plat_mem_setup(void) |
57 | { | 52 | { |
58 | vr41xx_calculate_clock_frequency(); | 53 | vr41xx_calculate_clock_frequency(); |
diff --git a/arch/parisc/Kconfig b/arch/parisc/Kconfig index 3d73545e8c48..b8ef1787a191 100644 --- a/arch/parisc/Kconfig +++ b/arch/parisc/Kconfig | |||
@@ -267,7 +267,7 @@ source "drivers/Kconfig" | |||
267 | 267 | ||
268 | source "fs/Kconfig" | 268 | source "fs/Kconfig" |
269 | 269 | ||
270 | source "arch/parisc/oprofile/Kconfig" | 270 | source "kernel/Kconfig.instrumentation" |
271 | 271 | ||
272 | source "arch/parisc/Kconfig.debug" | 272 | source "arch/parisc/Kconfig.debug" |
273 | 273 | ||
diff --git a/arch/parisc/kernel/signal.c b/arch/parisc/kernel/signal.c index fb35ebc0c4da..2ce3806f02e1 100644 --- a/arch/parisc/kernel/signal.c +++ b/arch/parisc/kernel/signal.c | |||
@@ -181,7 +181,7 @@ give_sigsegv: | |||
181 | si.si_signo = SIGSEGV; | 181 | si.si_signo = SIGSEGV; |
182 | si.si_errno = 0; | 182 | si.si_errno = 0; |
183 | si.si_code = SI_KERNEL; | 183 | si.si_code = SI_KERNEL; |
184 | si.si_pid = current->pid; | 184 | si.si_pid = task_pid_vnr(current); |
185 | si.si_uid = current->uid; | 185 | si.si_uid = current->uid; |
186 | si.si_addr = &frame->uc; | 186 | si.si_addr = &frame->uc; |
187 | force_sig_info(SIGSEGV, &si, current); | 187 | force_sig_info(SIGSEGV, &si, current); |
diff --git a/arch/parisc/kernel/traps.c b/arch/parisc/kernel/traps.c index bbf029a184ac..99fd56939afa 100644 --- a/arch/parisc/kernel/traps.c +++ b/arch/parisc/kernel/traps.c | |||
@@ -219,7 +219,7 @@ void die_if_kernel(char *str, struct pt_regs *regs, long err) | |||
219 | return; /* STFU */ | 219 | return; /* STFU */ |
220 | 220 | ||
221 | printk(KERN_CRIT "%s (pid %d): %s (code %ld) at " RFMT "\n", | 221 | printk(KERN_CRIT "%s (pid %d): %s (code %ld) at " RFMT "\n", |
222 | current->comm, current->pid, str, err, regs->iaoq[0]); | 222 | current->comm, task_pid_nr(current), str, err, regs->iaoq[0]); |
223 | #ifdef PRINT_USER_FAULTS | 223 | #ifdef PRINT_USER_FAULTS |
224 | /* XXX for debugging only */ | 224 | /* XXX for debugging only */ |
225 | show_regs(regs); | 225 | show_regs(regs); |
@@ -252,7 +252,7 @@ KERN_CRIT " || ||\n"); | |||
252 | 252 | ||
253 | if (err) | 253 | if (err) |
254 | printk(KERN_CRIT "%s (pid %d): %s (code %ld)\n", | 254 | printk(KERN_CRIT "%s (pid %d): %s (code %ld)\n", |
255 | current->comm, current->pid, str, err); | 255 | current->comm, task_pid_nr(current), str, err); |
256 | 256 | ||
257 | /* Wot's wrong wif bein' racy? */ | 257 | /* Wot's wrong wif bein' racy? */ |
258 | if (current->thread.flags & PARISC_KERNEL_DEATH) { | 258 | if (current->thread.flags & PARISC_KERNEL_DEATH) { |
@@ -317,7 +317,7 @@ static void handle_break(struct pt_regs *regs) | |||
317 | if (unlikely(iir != GDB_BREAK_INSN)) { | 317 | if (unlikely(iir != GDB_BREAK_INSN)) { |
318 | printk(KERN_DEBUG "break %d,%d: pid=%d command='%s'\n", | 318 | printk(KERN_DEBUG "break %d,%d: pid=%d command='%s'\n", |
319 | iir & 31, (iir>>13) & ((1<<13)-1), | 319 | iir & 31, (iir>>13) & ((1<<13)-1), |
320 | current->pid, current->comm); | 320 | task_pid_nr(current), current->comm); |
321 | show_regs(regs); | 321 | show_regs(regs); |
322 | } | 322 | } |
323 | #endif | 323 | #endif |
@@ -747,7 +747,7 @@ void handle_interruption(int code, struct pt_regs *regs) | |||
747 | if (user_mode(regs)) { | 747 | if (user_mode(regs)) { |
748 | #ifdef PRINT_USER_FAULTS | 748 | #ifdef PRINT_USER_FAULTS |
749 | printk(KERN_DEBUG "\nhandle_interruption() pid=%d command='%s'\n", | 749 | printk(KERN_DEBUG "\nhandle_interruption() pid=%d command='%s'\n", |
750 | current->pid, current->comm); | 750 | task_pid_nr(current), current->comm); |
751 | show_regs(regs); | 751 | show_regs(regs); |
752 | #endif | 752 | #endif |
753 | /* SIGBUS, for lack of a better one. */ | 753 | /* SIGBUS, for lack of a better one. */ |
@@ -772,7 +772,7 @@ void handle_interruption(int code, struct pt_regs *regs) | |||
772 | else | 772 | else |
773 | printk(KERN_DEBUG "User Fault (long pointer) (fault %d) ", | 773 | printk(KERN_DEBUG "User Fault (long pointer) (fault %d) ", |
774 | code); | 774 | code); |
775 | printk("pid=%d command='%s'\n", current->pid, current->comm); | 775 | printk("pid=%d command='%s'\n", task_pid_nr(current), current->comm); |
776 | show_regs(regs); | 776 | show_regs(regs); |
777 | #endif | 777 | #endif |
778 | si.si_signo = SIGSEGV; | 778 | si.si_signo = SIGSEGV; |
diff --git a/arch/parisc/kernel/unaligned.c b/arch/parisc/kernel/unaligned.c index 347bb922e6d0..aebf3c168871 100644 --- a/arch/parisc/kernel/unaligned.c +++ b/arch/parisc/kernel/unaligned.c | |||
@@ -469,7 +469,7 @@ void handle_unaligned(struct pt_regs *regs) | |||
469 | && ++unaligned_count < 5) { | 469 | && ++unaligned_count < 5) { |
470 | char buf[256]; | 470 | char buf[256]; |
471 | sprintf(buf, "%s(%d): unaligned access to 0x" RFMT " at ip=0x" RFMT "\n", | 471 | sprintf(buf, "%s(%d): unaligned access to 0x" RFMT " at ip=0x" RFMT "\n", |
472 | current->comm, current->pid, regs->ior, regs->iaoq[0]); | 472 | current->comm, task_pid_nr(current), regs->ior, regs->iaoq[0]); |
473 | printk(KERN_WARNING "%s", buf); | 473 | printk(KERN_WARNING "%s", buf); |
474 | #ifdef DEBUG_UNALIGNED | 474 | #ifdef DEBUG_UNALIGNED |
475 | show_regs(regs); | 475 | show_regs(regs); |
diff --git a/arch/parisc/mm/fault.c b/arch/parisc/mm/fault.c index 1c091b415cd9..b2e3e9a8cece 100644 --- a/arch/parisc/mm/fault.c +++ b/arch/parisc/mm/fault.c | |||
@@ -211,7 +211,7 @@ bad_area: | |||
211 | #ifdef PRINT_USER_FAULTS | 211 | #ifdef PRINT_USER_FAULTS |
212 | printk(KERN_DEBUG "\n"); | 212 | printk(KERN_DEBUG "\n"); |
213 | printk(KERN_DEBUG "do_page_fault() pid=%d command='%s' type=%lu address=0x%08lx\n", | 213 | printk(KERN_DEBUG "do_page_fault() pid=%d command='%s' type=%lu address=0x%08lx\n", |
214 | tsk->pid, tsk->comm, code, address); | 214 | task_pid_nr(tsk), tsk->comm, code, address); |
215 | if (vma) { | 215 | if (vma) { |
216 | printk(KERN_DEBUG "vm_start = 0x%08lx, vm_end = 0x%08lx\n", | 216 | printk(KERN_DEBUG "vm_start = 0x%08lx, vm_end = 0x%08lx\n", |
217 | vma->vm_start, vma->vm_end); | 217 | vma->vm_start, vma->vm_end); |
diff --git a/arch/parisc/oprofile/Kconfig b/arch/parisc/oprofile/Kconfig deleted file mode 100644 index 5ade19801b97..000000000000 --- a/arch/parisc/oprofile/Kconfig +++ /dev/null | |||
@@ -1,23 +0,0 @@ | |||
1 | |||
2 | menu "Profiling support" | ||
3 | depends on EXPERIMENTAL | ||
4 | |||
5 | config PROFILING | ||
6 | bool "Profiling support (EXPERIMENTAL)" | ||
7 | help | ||
8 | Say Y here to enable the extended profiling support mechanisms used | ||
9 | by profilers such as OProfile. | ||
10 | |||
11 | |||
12 | config OPROFILE | ||
13 | tristate "OProfile system profiling (EXPERIMENTAL)" | ||
14 | depends on PROFILING | ||
15 | help | ||
16 | OProfile is a profiling system capable of profiling the | ||
17 | whole system, include the kernel, kernel modules, libraries, | ||
18 | and applications. | ||
19 | |||
20 | If unsure, say N. | ||
21 | |||
22 | endmenu | ||
23 | |||
diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig index 3763f681ce4c..18f397ca05ef 100644 --- a/arch/powerpc/Kconfig +++ b/arch/powerpc/Kconfig | |||
@@ -669,20 +669,7 @@ source "arch/powerpc/sysdev/qe_lib/Kconfig" | |||
669 | 669 | ||
670 | source "lib/Kconfig" | 670 | source "lib/Kconfig" |
671 | 671 | ||
672 | menu "Instrumentation Support" | 672 | source "kernel/Kconfig.instrumentation" |
673 | |||
674 | source "arch/powerpc/oprofile/Kconfig" | ||
675 | |||
676 | config KPROBES | ||
677 | bool "Kprobes" | ||
678 | depends on !BOOKE && !4xx && KALLSYMS && MODULES | ||
679 | help | ||
680 | Kprobes allows you to trap at almost any kernel address and | ||
681 | execute a callback function. register_kprobe() establishes | ||
682 | a probepoint and specifies the callback. Kprobes is useful | ||
683 | for kernel debugging, non-intrusive instrumentation and testing. | ||
684 | If in doubt, say "N". | ||
685 | endmenu | ||
686 | 673 | ||
687 | source "arch/powerpc/Kconfig.debug" | 674 | source "arch/powerpc/Kconfig.debug" |
688 | 675 | ||
diff --git a/arch/powerpc/configs/cell_defconfig b/arch/powerpc/configs/cell_defconfig index 8b47c846421c..dcd7c02727c2 100644 --- a/arch/powerpc/configs/cell_defconfig +++ b/arch/powerpc/configs/cell_defconfig | |||
@@ -68,6 +68,7 @@ CONFIG_SYSVIPC_SYSCTL=y | |||
68 | CONFIG_IKCONFIG=y | 68 | CONFIG_IKCONFIG=y |
69 | CONFIG_IKCONFIG_PROC=y | 69 | CONFIG_IKCONFIG_PROC=y |
70 | CONFIG_LOG_BUF_SHIFT=15 | 70 | CONFIG_LOG_BUF_SHIFT=15 |
71 | CONFIG_CGROUPS=y | ||
71 | CONFIG_CPUSETS=y | 72 | CONFIG_CPUSETS=y |
72 | CONFIG_SYSFS_DEPRECATED=y | 73 | CONFIG_SYSFS_DEPRECATED=y |
73 | # CONFIG_RELAY is not set | 74 | # CONFIG_RELAY is not set |
diff --git a/arch/powerpc/configs/pmac32_defconfig b/arch/powerpc/configs/pmac32_defconfig index 95b823b60c97..8e5988c4a164 100644 --- a/arch/powerpc/configs/pmac32_defconfig +++ b/arch/powerpc/configs/pmac32_defconfig | |||
@@ -209,7 +209,6 @@ CONFIG_PM=y | |||
209 | # CONFIG_PM_LEGACY is not set | 209 | # CONFIG_PM_LEGACY is not set |
210 | CONFIG_PM_DEBUG=y | 210 | CONFIG_PM_DEBUG=y |
211 | # CONFIG_PM_VERBOSE is not set | 211 | # CONFIG_PM_VERBOSE is not set |
212 | # CONFIG_DISABLE_CONSOLE_SUSPEND is not set | ||
213 | CONFIG_PM_SLEEP=y | 212 | CONFIG_PM_SLEEP=y |
214 | CONFIG_SUSPEND=y | 213 | CONFIG_SUSPEND=y |
215 | CONFIG_HIBERNATION=y | 214 | CONFIG_HIBERNATION=y |
diff --git a/arch/powerpc/configs/ppc64_defconfig b/arch/powerpc/configs/ppc64_defconfig index bb8d4e46f0c5..05582af50c5b 100644 --- a/arch/powerpc/configs/ppc64_defconfig +++ b/arch/powerpc/configs/ppc64_defconfig | |||
@@ -71,6 +71,7 @@ CONFIG_TASK_DELAY_ACCT=y | |||
71 | CONFIG_IKCONFIG=y | 71 | CONFIG_IKCONFIG=y |
72 | CONFIG_IKCONFIG_PROC=y | 72 | CONFIG_IKCONFIG_PROC=y |
73 | CONFIG_LOG_BUF_SHIFT=17 | 73 | CONFIG_LOG_BUF_SHIFT=17 |
74 | CONFIG_CGROUPS=y | ||
74 | CONFIG_CPUSETS=y | 75 | CONFIG_CPUSETS=y |
75 | CONFIG_SYSFS_DEPRECATED=y | 76 | CONFIG_SYSFS_DEPRECATED=y |
76 | CONFIG_RELAY=y | 77 | CONFIG_RELAY=y |
diff --git a/arch/powerpc/configs/pseries_defconfig b/arch/powerpc/configs/pseries_defconfig index c09eb8cfbe71..62a38406b62f 100644 --- a/arch/powerpc/configs/pseries_defconfig +++ b/arch/powerpc/configs/pseries_defconfig | |||
@@ -71,6 +71,7 @@ CONFIG_AUDITSYSCALL=y | |||
71 | CONFIG_IKCONFIG=y | 71 | CONFIG_IKCONFIG=y |
72 | CONFIG_IKCONFIG_PROC=y | 72 | CONFIG_IKCONFIG_PROC=y |
73 | CONFIG_LOG_BUF_SHIFT=17 | 73 | CONFIG_LOG_BUF_SHIFT=17 |
74 | CONFIG_CGROUPS=y | ||
74 | CONFIG_CPUSETS=y | 75 | CONFIG_CPUSETS=y |
75 | CONFIG_SYSFS_DEPRECATED=y | 76 | CONFIG_SYSFS_DEPRECATED=y |
76 | # CONFIG_RELAY is not set | 77 | # CONFIG_RELAY is not set |
diff --git a/arch/powerpc/kernel/asm-offsets.c b/arch/powerpc/kernel/asm-offsets.c index 0ae5d57b9368..2c8e756d19a3 100644 --- a/arch/powerpc/kernel/asm-offsets.c +++ b/arch/powerpc/kernel/asm-offsets.c | |||
@@ -141,6 +141,7 @@ int main(void) | |||
141 | DEFINE(PACALPPACAPTR, offsetof(struct paca_struct, lppaca_ptr)); | 141 | DEFINE(PACALPPACAPTR, offsetof(struct paca_struct, lppaca_ptr)); |
142 | DEFINE(PACAHWCPUID, offsetof(struct paca_struct, hw_cpu_id)); | 142 | DEFINE(PACAHWCPUID, offsetof(struct paca_struct, hw_cpu_id)); |
143 | DEFINE(PACA_STARTPURR, offsetof(struct paca_struct, startpurr)); | 143 | DEFINE(PACA_STARTPURR, offsetof(struct paca_struct, startpurr)); |
144 | DEFINE(PACA_STARTSPURR, offsetof(struct paca_struct, startspurr)); | ||
144 | DEFINE(PACA_USER_TIME, offsetof(struct paca_struct, user_time)); | 145 | DEFINE(PACA_USER_TIME, offsetof(struct paca_struct, user_time)); |
145 | DEFINE(PACA_SYSTEM_TIME, offsetof(struct paca_struct, system_time)); | 146 | DEFINE(PACA_SYSTEM_TIME, offsetof(struct paca_struct, system_time)); |
146 | DEFINE(PACA_SLBSHADOWPTR, offsetof(struct paca_struct, slb_shadow_ptr)); | 147 | DEFINE(PACA_SLBSHADOWPTR, offsetof(struct paca_struct, slb_shadow_ptr)); |
diff --git a/arch/powerpc/kernel/cpu_setup_6xx.S b/arch/powerpc/kernel/cpu_setup_6xx.S index 8b4a4ee85eca..f1ee0b3f78f2 100644 --- a/arch/powerpc/kernel/cpu_setup_6xx.S +++ b/arch/powerpc/kernel/cpu_setup_6xx.S | |||
@@ -113,7 +113,7 @@ setup_604_hid0: | |||
113 | * around #3 and with the same fix we use. We may want to | 113 | * around #3 and with the same fix we use. We may want to |
114 | * check if the CPU is using 60x bus mode in which case | 114 | * check if the CPU is using 60x bus mode in which case |
115 | * the workaround for errata #4 is useless. Also, we may | 115 | * the workaround for errata #4 is useless. Also, we may |
116 | * want to explicitely clear HID0_NOPDST as this is not | 116 | * want to explicitly clear HID0_NOPDST as this is not |
117 | * needed once we have applied workaround #5 (though it's | 117 | * needed once we have applied workaround #5 (though it's |
118 | * not set by Apple's firmware at least). | 118 | * not set by Apple's firmware at least). |
119 | */ | 119 | */ |
diff --git a/arch/powerpc/kernel/irq.c b/arch/powerpc/kernel/irq.c index 2250f9e6c5ca..b0e5deb4274f 100644 --- a/arch/powerpc/kernel/irq.c +++ b/arch/powerpc/kernel/irq.c | |||
@@ -491,7 +491,7 @@ struct irq_host *irq_alloc_host(struct device_node *of_node, | |||
491 | 491 | ||
492 | /* Legacy flags are left to default at this point, | 492 | /* Legacy flags are left to default at this point, |
493 | * one can then use irq_create_mapping() to | 493 | * one can then use irq_create_mapping() to |
494 | * explicitely change them | 494 | * explicitly change them |
495 | */ | 495 | */ |
496 | ops->map(host, i, i); | 496 | ops->map(host, i, i); |
497 | } | 497 | } |
diff --git a/arch/powerpc/kernel/l2cr_6xx.S b/arch/powerpc/kernel/l2cr_6xx.S index 858f28ac8a06..2a2f3c3f6d80 100644 --- a/arch/powerpc/kernel/l2cr_6xx.S +++ b/arch/powerpc/kernel/l2cr_6xx.S | |||
@@ -1,6 +1,6 @@ | |||
1 | /* | 1 | /* |
2 | L2CR functions | 2 | L2CR functions |
3 | Copyright © 1997-1998 by PowerLogix R & D, Inc. | 3 | Copyright © 1997-1998 by PowerLogix R & D, Inc. |
4 | 4 | ||
5 | This program is free software; you can redistribute it and/or modify | 5 | This program is free software; you can redistribute it and/or modify |
6 | it under the terms of the GNU General Public License as published by | 6 | it under the terms of the GNU General Public License as published by |
diff --git a/arch/powerpc/kernel/machine_kexec.c b/arch/powerpc/kernel/machine_kexec.c index e60a0c544d63..c0c8e8c3ced9 100644 --- a/arch/powerpc/kernel/machine_kexec.c +++ b/arch/powerpc/kernel/machine_kexec.c | |||
@@ -61,45 +61,39 @@ NORET_TYPE void machine_kexec(struct kimage *image) | |||
61 | for(;;); | 61 | for(;;); |
62 | } | 62 | } |
63 | 63 | ||
64 | static int __init early_parse_crashk(char *p) | ||
65 | { | ||
66 | unsigned long size; | ||
67 | |||
68 | if (!p) | ||
69 | return 1; | ||
70 | |||
71 | size = memparse(p, &p); | ||
72 | |||
73 | if (*p == '@') | ||
74 | crashk_res.start = memparse(p + 1, &p); | ||
75 | else | ||
76 | crashk_res.start = KDUMP_KERNELBASE; | ||
77 | |||
78 | crashk_res.end = crashk_res.start + size - 1; | ||
79 | |||
80 | return 0; | ||
81 | } | ||
82 | early_param("crashkernel", early_parse_crashk); | ||
83 | |||
84 | void __init reserve_crashkernel(void) | 64 | void __init reserve_crashkernel(void) |
85 | { | 65 | { |
86 | unsigned long size; | 66 | unsigned long long crash_size, crash_base; |
67 | int ret; | ||
68 | |||
69 | /* this is necessary because of lmb_phys_mem_size() */ | ||
70 | lmb_analyze(); | ||
71 | |||
72 | /* use common parsing */ | ||
73 | ret = parse_crashkernel(boot_command_line, lmb_phys_mem_size(), | ||
74 | &crash_size, &crash_base); | ||
75 | if (ret == 0 && crash_size > 0) { | ||
76 | if (crash_base == 0) | ||
77 | crash_base = KDUMP_KERNELBASE; | ||
78 | crashk_res.start = crash_base; | ||
79 | } else { | ||
80 | /* handle the device tree */ | ||
81 | crash_size = crashk_res.end - crashk_res.start + 1; | ||
82 | } | ||
87 | 83 | ||
88 | if (crashk_res.start == 0) | 84 | if (crash_size == 0) |
89 | return; | 85 | return; |
90 | 86 | ||
91 | /* We might have got these values via the command line or the | 87 | /* We might have got these values via the command line or the |
92 | * device tree, either way sanitise them now. */ | 88 | * device tree, either way sanitise them now. */ |
93 | 89 | ||
94 | size = crashk_res.end - crashk_res.start + 1; | ||
95 | |||
96 | if (crashk_res.start != KDUMP_KERNELBASE) | 90 | if (crashk_res.start != KDUMP_KERNELBASE) |
97 | printk("Crash kernel location must be 0x%x\n", | 91 | printk("Crash kernel location must be 0x%x\n", |
98 | KDUMP_KERNELBASE); | 92 | KDUMP_KERNELBASE); |
99 | 93 | ||
100 | crashk_res.start = KDUMP_KERNELBASE; | 94 | crashk_res.start = KDUMP_KERNELBASE; |
101 | size = PAGE_ALIGN(size); | 95 | crash_size = PAGE_ALIGN(crash_size); |
102 | crashk_res.end = crashk_res.start + size - 1; | 96 | crashk_res.end = crashk_res.start + crash_size - 1; |
103 | 97 | ||
104 | /* Crash kernel trumps memory limit */ | 98 | /* Crash kernel trumps memory limit */ |
105 | if (memory_limit && memory_limit <= crashk_res.end) { | 99 | if (memory_limit && memory_limit <= crashk_res.end) { |
@@ -108,7 +102,13 @@ void __init reserve_crashkernel(void) | |||
108 | memory_limit); | 102 | memory_limit); |
109 | } | 103 | } |
110 | 104 | ||
111 | lmb_reserve(crashk_res.start, size); | 105 | printk(KERN_INFO "Reserving %ldMB of memory at %ldMB " |
106 | "for crashkernel (System RAM: %ldMB)\n", | ||
107 | (unsigned long)(crash_size >> 20), | ||
108 | (unsigned long)(crashk_res.start >> 20), | ||
109 | (unsigned long)(lmb_phys_mem_size() >> 20)); | ||
110 | |||
111 | lmb_reserve(crashk_res.start, crash_size); | ||
112 | } | 112 | } |
113 | 113 | ||
114 | int overlaps_crashkernel(unsigned long start, unsigned long size) | 114 | int overlaps_crashkernel(unsigned long start, unsigned long size) |
diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c index ea6ad7a2a7e3..b9d88374f14f 100644 --- a/arch/powerpc/kernel/process.c +++ b/arch/powerpc/kernel/process.c | |||
@@ -459,7 +459,7 @@ void show_regs(struct pt_regs * regs) | |||
459 | printk("DAR: "REG", DSISR: "REG"\n", regs->dar, regs->dsisr); | 459 | printk("DAR: "REG", DSISR: "REG"\n", regs->dar, regs->dsisr); |
460 | #endif | 460 | #endif |
461 | printk("TASK = %p[%d] '%s' THREAD: %p", | 461 | printk("TASK = %p[%d] '%s' THREAD: %p", |
462 | current, current->pid, current->comm, task_thread_info(current)); | 462 | current, task_pid_nr(current), current->comm, task_thread_info(current)); |
463 | 463 | ||
464 | #ifdef CONFIG_SMP | 464 | #ifdef CONFIG_SMP |
465 | printk(" CPU: %d", smp_processor_id()); | 465 | printk(" CPU: %d", smp_processor_id()); |
diff --git a/arch/powerpc/kernel/time.c b/arch/powerpc/kernel/time.c index 863a5d6d9b18..9eb3284deac4 100644 --- a/arch/powerpc/kernel/time.c +++ b/arch/powerpc/kernel/time.c | |||
@@ -212,23 +212,44 @@ static u64 read_purr(void) | |||
212 | } | 212 | } |
213 | 213 | ||
214 | /* | 214 | /* |
215 | * Read the SPURR on systems that have it, otherwise the purr | ||
216 | */ | ||
217 | static u64 read_spurr(u64 purr) | ||
218 | { | ||
219 | if (cpu_has_feature(CPU_FTR_SPURR)) | ||
220 | return mfspr(SPRN_SPURR); | ||
221 | return purr; | ||
222 | } | ||
223 | |||
224 | /* | ||
215 | * Account time for a transition between system, hard irq | 225 | * Account time for a transition between system, hard irq |
216 | * or soft irq state. | 226 | * or soft irq state. |
217 | */ | 227 | */ |
218 | void account_system_vtime(struct task_struct *tsk) | 228 | void account_system_vtime(struct task_struct *tsk) |
219 | { | 229 | { |
220 | u64 now, delta; | 230 | u64 now, nowscaled, delta, deltascaled; |
221 | unsigned long flags; | 231 | unsigned long flags; |
222 | 232 | ||
223 | local_irq_save(flags); | 233 | local_irq_save(flags); |
224 | now = read_purr(); | 234 | now = read_purr(); |
225 | delta = now - get_paca()->startpurr; | 235 | delta = now - get_paca()->startpurr; |
226 | get_paca()->startpurr = now; | 236 | get_paca()->startpurr = now; |
237 | nowscaled = read_spurr(now); | ||
238 | deltascaled = nowscaled - get_paca()->startspurr; | ||
239 | get_paca()->startspurr = nowscaled; | ||
227 | if (!in_interrupt()) { | 240 | if (!in_interrupt()) { |
241 | /* deltascaled includes both user and system time. | ||
242 | * Hence scale it based on the purr ratio to estimate | ||
243 | * the system time */ | ||
244 | deltascaled = deltascaled * get_paca()->system_time / | ||
245 | (get_paca()->system_time + get_paca()->user_time); | ||
228 | delta += get_paca()->system_time; | 246 | delta += get_paca()->system_time; |
229 | get_paca()->system_time = 0; | 247 | get_paca()->system_time = 0; |
230 | } | 248 | } |
231 | account_system_time(tsk, 0, delta); | 249 | account_system_time(tsk, 0, delta); |
250 | get_paca()->purrdelta = delta; | ||
251 | account_system_time_scaled(tsk, deltascaled); | ||
252 | get_paca()->spurrdelta = deltascaled; | ||
232 | local_irq_restore(flags); | 253 | local_irq_restore(flags); |
233 | } | 254 | } |
234 | 255 | ||
@@ -240,11 +261,17 @@ void account_system_vtime(struct task_struct *tsk) | |||
240 | */ | 261 | */ |
241 | void account_process_vtime(struct task_struct *tsk) | 262 | void account_process_vtime(struct task_struct *tsk) |
242 | { | 263 | { |
243 | cputime_t utime; | 264 | cputime_t utime, utimescaled; |
244 | 265 | ||
245 | utime = get_paca()->user_time; | 266 | utime = get_paca()->user_time; |
246 | get_paca()->user_time = 0; | 267 | get_paca()->user_time = 0; |
247 | account_user_time(tsk, utime); | 268 | account_user_time(tsk, utime); |
269 | |||
270 | /* Estimate the scaled utime by scaling the real utime based | ||
271 | * on the last spurr to purr ratio */ | ||
272 | utimescaled = utime * get_paca()->spurrdelta / get_paca()->purrdelta; | ||
273 | get_paca()->spurrdelta = get_paca()->purrdelta = 0; | ||
274 | account_user_time_scaled(tsk, utimescaled); | ||
248 | } | 275 | } |
249 | 276 | ||
250 | static void account_process_time(struct pt_regs *regs) | 277 | static void account_process_time(struct pt_regs *regs) |
@@ -266,6 +293,7 @@ struct cpu_purr_data { | |||
266 | int initialized; /* thread is running */ | 293 | int initialized; /* thread is running */ |
267 | u64 tb; /* last TB value read */ | 294 | u64 tb; /* last TB value read */ |
268 | u64 purr; /* last PURR value read */ | 295 | u64 purr; /* last PURR value read */ |
296 | u64 spurr; /* last SPURR value read */ | ||
269 | }; | 297 | }; |
270 | 298 | ||
271 | /* | 299 | /* |
diff --git a/arch/powerpc/kernel/traps.c b/arch/powerpc/kernel/traps.c index bf9e39c6e296..59c464e26f38 100644 --- a/arch/powerpc/kernel/traps.c +++ b/arch/powerpc/kernel/traps.c | |||
@@ -201,7 +201,7 @@ void _exception(int signr, struct pt_regs *regs, int code, unsigned long addr) | |||
201 | * generate the same exception over and over again and we get | 201 | * generate the same exception over and over again and we get |
202 | * nowhere. Better to kill it and let the kernel panic. | 202 | * nowhere. Better to kill it and let the kernel panic. |
203 | */ | 203 | */ |
204 | if (is_init(current)) { | 204 | if (is_global_init(current)) { |
205 | __sighandler_t handler; | 205 | __sighandler_t handler; |
206 | 206 | ||
207 | spin_lock_irq(¤t->sighand->siglock); | 207 | spin_lock_irq(¤t->sighand->siglock); |
@@ -881,7 +881,7 @@ void nonrecoverable_exception(struct pt_regs *regs) | |||
881 | void trace_syscall(struct pt_regs *regs) | 881 | void trace_syscall(struct pt_regs *regs) |
882 | { | 882 | { |
883 | printk("Task: %p(%d), PC: %08lX/%08lX, Syscall: %3ld, Result: %s%ld %s\n", | 883 | printk("Task: %p(%d), PC: %08lX/%08lX, Syscall: %3ld, Result: %s%ld %s\n", |
884 | current, current->pid, regs->nip, regs->link, regs->gpr[0], | 884 | current, task_pid_nr(current), regs->nip, regs->link, regs->gpr[0], |
885 | regs->ccr&0x10000000?"Error=":"", regs->gpr[3], print_tainted()); | 885 | regs->ccr&0x10000000?"Error=":"", regs->gpr[3], print_tainted()); |
886 | } | 886 | } |
887 | 887 | ||
diff --git a/arch/powerpc/mm/fault.c b/arch/powerpc/mm/fault.c index ab3546c5ac3a..a18fda361cc0 100644 --- a/arch/powerpc/mm/fault.c +++ b/arch/powerpc/mm/fault.c | |||
@@ -375,7 +375,7 @@ bad_area_nosemaphore: | |||
375 | */ | 375 | */ |
376 | out_of_memory: | 376 | out_of_memory: |
377 | up_read(&mm->mmap_sem); | 377 | up_read(&mm->mmap_sem); |
378 | if (is_init(current)) { | 378 | if (is_global_init(current)) { |
379 | yield(); | 379 | yield(); |
380 | down_read(&mm->mmap_sem); | 380 | down_read(&mm->mmap_sem); |
381 | goto survive; | 381 | goto survive; |
diff --git a/arch/powerpc/oprofile/Kconfig b/arch/powerpc/oprofile/Kconfig deleted file mode 100644 index 7089e79689b9..000000000000 --- a/arch/powerpc/oprofile/Kconfig +++ /dev/null | |||
@@ -1,24 +0,0 @@ | |||
1 | config PROFILING | ||
2 | bool "Profiling support (EXPERIMENTAL)" | ||
3 | help | ||
4 | Say Y here to enable the extended profiling support mechanisms used | ||
5 | by profilers such as OProfile. | ||
6 | |||
7 | |||
8 | config OPROFILE | ||
9 | tristate "OProfile system profiling (EXPERIMENTAL)" | ||
10 | depends on PROFILING | ||
11 | help | ||
12 | OProfile is a profiling system capable of profiling the | ||
13 | whole system, include the kernel, kernel modules, libraries, | ||
14 | and applications. | ||
15 | |||
16 | If unsure, say N. | ||
17 | |||
18 | config OPROFILE_CELL | ||
19 | bool "OProfile for Cell Broadband Engine" | ||
20 | depends on (SPU_FS = y && OPROFILE = m) || (SPU_FS = y && OPROFILE = y) || (SPU_FS = m && OPROFILE = m) | ||
21 | default y | ||
22 | help | ||
23 | Profiling of Cell BE SPUs requires special support enabled | ||
24 | by this option. | ||
diff --git a/arch/powerpc/platforms/52xx/lite5200_pm.c b/arch/powerpc/platforms/52xx/lite5200_pm.c index f26afcd41757..ffa14aff5248 100644 --- a/arch/powerpc/platforms/52xx/lite5200_pm.c +++ b/arch/powerpc/platforms/52xx/lite5200_pm.c | |||
@@ -1,5 +1,5 @@ | |||
1 | #include <linux/init.h> | 1 | #include <linux/init.h> |
2 | #include <linux/pm.h> | 2 | #include <linux/suspend.h> |
3 | #include <asm/io.h> | 3 | #include <asm/io.h> |
4 | #include <asm/time.h> | 4 | #include <asm/time.h> |
5 | #include <asm/mpc52xx.h> | 5 | #include <asm/mpc52xx.h> |
@@ -18,6 +18,8 @@ static void __iomem *sram; | |||
18 | static const int sram_size = 0x4000; /* 16 kBytes */ | 18 | static const int sram_size = 0x4000; /* 16 kBytes */ |
19 | static void __iomem *mbar; | 19 | static void __iomem *mbar; |
20 | 20 | ||
21 | static suspend_state_t lite5200_pm_target_state; | ||
22 | |||
21 | static int lite5200_pm_valid(suspend_state_t state) | 23 | static int lite5200_pm_valid(suspend_state_t state) |
22 | { | 24 | { |
23 | switch (state) { | 25 | switch (state) { |
@@ -29,13 +31,22 @@ static int lite5200_pm_valid(suspend_state_t state) | |||
29 | } | 31 | } |
30 | } | 32 | } |
31 | 33 | ||
32 | static int lite5200_pm_prepare(suspend_state_t state) | 34 | static int lite5200_pm_set_target(suspend_state_t state) |
35 | { | ||
36 | if (lite5200_pm_valid(state)) { | ||
37 | lite5200_pm_target_state = state; | ||
38 | return 0; | ||
39 | } | ||
40 | return -EINVAL; | ||
41 | } | ||
42 | |||
43 | static int lite5200_pm_prepare(void) | ||
33 | { | 44 | { |
34 | /* deep sleep? let mpc52xx code handle that */ | 45 | /* deep sleep? let mpc52xx code handle that */ |
35 | if (state == PM_SUSPEND_STANDBY) | 46 | if (lite5200_pm_target_state == PM_SUSPEND_STANDBY) |
36 | return mpc52xx_pm_prepare(state); | 47 | return mpc52xx_pm_prepare(); |
37 | 48 | ||
38 | if (state != PM_SUSPEND_MEM) | 49 | if (lite5200_pm_target_state != PM_SUSPEND_MEM) |
39 | return -EINVAL; | 50 | return -EINVAL; |
40 | 51 | ||
41 | /* map registers */ | 52 | /* map registers */ |
@@ -190,17 +201,16 @@ static int lite5200_pm_enter(suspend_state_t state) | |||
190 | return 0; | 201 | return 0; |
191 | } | 202 | } |
192 | 203 | ||
193 | static int lite5200_pm_finish(suspend_state_t state) | 204 | static void lite5200_pm_finish(void) |
194 | { | 205 | { |
195 | /* deep sleep? let mpc52xx code handle that */ | 206 | /* deep sleep? let mpc52xx code handle that */ |
196 | if (state == PM_SUSPEND_STANDBY) { | 207 | if (lite5200_pm_target_state == PM_SUSPEND_STANDBY) |
197 | return mpc52xx_pm_finish(state); | 208 | mpc52xx_pm_finish(); |
198 | } | ||
199 | return 0; | ||
200 | } | 209 | } |
201 | 210 | ||
202 | static struct pm_ops lite5200_pm_ops = { | 211 | static struct platform_suspend_ops lite5200_pm_ops = { |
203 | .valid = lite5200_pm_valid, | 212 | .valid = lite5200_pm_valid, |
213 | .set_target = lite5200_pm_set_target, | ||
204 | .prepare = lite5200_pm_prepare, | 214 | .prepare = lite5200_pm_prepare, |
205 | .enter = lite5200_pm_enter, | 215 | .enter = lite5200_pm_enter, |
206 | .finish = lite5200_pm_finish, | 216 | .finish = lite5200_pm_finish, |
@@ -208,6 +218,6 @@ static struct pm_ops lite5200_pm_ops = { | |||
208 | 218 | ||
209 | int __init lite5200_pm_init(void) | 219 | int __init lite5200_pm_init(void) |
210 | { | 220 | { |
211 | pm_set_ops(&lite5200_pm_ops); | 221 | suspend_set_ops(&lite5200_pm_ops); |
212 | return 0; | 222 | return 0; |
213 | } | 223 | } |
diff --git a/arch/powerpc/platforms/52xx/mpc52xx_pm.c b/arch/powerpc/platforms/52xx/mpc52xx_pm.c index ee2e7639c63e..7ffa7babf254 100644 --- a/arch/powerpc/platforms/52xx/mpc52xx_pm.c +++ b/arch/powerpc/platforms/52xx/mpc52xx_pm.c | |||
@@ -1,5 +1,5 @@ | |||
1 | #include <linux/init.h> | 1 | #include <linux/init.h> |
2 | #include <linux/pm.h> | 2 | #include <linux/suspend.h> |
3 | #include <linux/io.h> | 3 | #include <linux/io.h> |
4 | #include <asm/time.h> | 4 | #include <asm/time.h> |
5 | #include <asm/cacheflush.h> | 5 | #include <asm/cacheflush.h> |
@@ -57,11 +57,8 @@ int mpc52xx_set_wakeup_gpio(u8 pin, u8 level) | |||
57 | return 0; | 57 | return 0; |
58 | } | 58 | } |
59 | 59 | ||
60 | int mpc52xx_pm_prepare(suspend_state_t state) | 60 | int mpc52xx_pm_prepare(void) |
61 | { | 61 | { |
62 | if (state != PM_SUSPEND_STANDBY) | ||
63 | return -EINVAL; | ||
64 | |||
65 | /* map the whole register space */ | 62 | /* map the whole register space */ |
66 | mbar = mpc52xx_find_and_map("mpc5200"); | 63 | mbar = mpc52xx_find_and_map("mpc5200"); |
67 | if (!mbar) { | 64 | if (!mbar) { |
@@ -166,18 +163,16 @@ int mpc52xx_pm_enter(suspend_state_t state) | |||
166 | return 0; | 163 | return 0; |
167 | } | 164 | } |
168 | 165 | ||
169 | int mpc52xx_pm_finish(suspend_state_t state) | 166 | void mpc52xx_pm_finish(void) |
170 | { | 167 | { |
171 | /* call board resume code */ | 168 | /* call board resume code */ |
172 | if (mpc52xx_suspend.board_resume_finish) | 169 | if (mpc52xx_suspend.board_resume_finish) |
173 | mpc52xx_suspend.board_resume_finish(mbar); | 170 | mpc52xx_suspend.board_resume_finish(mbar); |
174 | 171 | ||
175 | iounmap(mbar); | 172 | iounmap(mbar); |
176 | |||
177 | return 0; | ||
178 | } | 173 | } |
179 | 174 | ||
180 | static struct pm_ops mpc52xx_pm_ops = { | 175 | static struct platform_suspend_ops mpc52xx_pm_ops = { |
181 | .valid = mpc52xx_pm_valid, | 176 | .valid = mpc52xx_pm_valid, |
182 | .prepare = mpc52xx_pm_prepare, | 177 | .prepare = mpc52xx_pm_prepare, |
183 | .enter = mpc52xx_pm_enter, | 178 | .enter = mpc52xx_pm_enter, |
@@ -186,6 +181,6 @@ static struct pm_ops mpc52xx_pm_ops = { | |||
186 | 181 | ||
187 | int __init mpc52xx_pm_init(void) | 182 | int __init mpc52xx_pm_init(void) |
188 | { | 183 | { |
189 | pm_set_ops(&mpc52xx_pm_ops); | 184 | suspend_set_ops(&mpc52xx_pm_ops); |
190 | return 0; | 185 | return 0; |
191 | } | 186 | } |
diff --git a/arch/powerpc/platforms/Kconfig b/arch/powerpc/platforms/Kconfig index 229d355ed86a..ea22cad2cd0a 100644 --- a/arch/powerpc/platforms/Kconfig +++ b/arch/powerpc/platforms/Kconfig | |||
@@ -120,7 +120,7 @@ config PPC_PMI | |||
120 | depends on PPC_IBM_CELL_BLADE | 120 | depends on PPC_IBM_CELL_BLADE |
121 | help | 121 | help |
122 | PMI (Platform Management Interrupt) is a way to | 122 | PMI (Platform Management Interrupt) is a way to |
123 | communicate with the BMC (Baseboard Mangement Controller). | 123 | communicate with the BMC (Baseboard Management Controller). |
124 | It is used in some IBM Cell blades. | 124 | It is used in some IBM Cell blades. |
125 | default m | 125 | default m |
126 | 126 | ||
diff --git a/arch/powerpc/platforms/cell/spufs/file.c b/arch/powerpc/platforms/cell/spufs/file.c index d72b16d6816e..d9e56a503795 100644 --- a/arch/powerpc/platforms/cell/spufs/file.c +++ b/arch/powerpc/platforms/cell/spufs/file.c | |||
@@ -748,7 +748,7 @@ static ssize_t spufs_wbox_write(struct file *file, const char __user *buf, | |||
748 | if (count) | 748 | if (count) |
749 | goto out; | 749 | goto out; |
750 | 750 | ||
751 | /* write aѕ much as possible */ | 751 | /* write as much as possible */ |
752 | for (count = 4, udata++; (count + 4) <= len; count += 4, udata++) { | 752 | for (count = 4, udata++; (count + 4) <= len; count += 4, udata++) { |
753 | int ret; | 753 | int ret; |
754 | ret = __get_user(wbox_data, udata); | 754 | ret = __get_user(wbox_data, udata); |
diff --git a/arch/powerpc/platforms/celleb/scc_uhc.c b/arch/powerpc/platforms/celleb/scc_uhc.c index a7c548bde2e3..b59c38a06e3e 100644 --- a/arch/powerpc/platforms/celleb/scc_uhc.c +++ b/arch/powerpc/platforms/celleb/scc_uhc.c | |||
@@ -36,7 +36,7 @@ static inline int uhc_clkctrl_ready(u32 val) | |||
36 | } | 36 | } |
37 | 37 | ||
38 | /* | 38 | /* |
39 | * UHC(usb host controler) enable function. | 39 | * UHC(usb host controller) enable function. |
40 | * affect to both of OHCI and EHCI core module. | 40 | * affect to both of OHCI and EHCI core module. |
41 | */ | 41 | */ |
42 | static void enable_scc_uhc(struct pci_dev *dev) | 42 | static void enable_scc_uhc(struct pci_dev *dev) |
diff --git a/arch/powerpc/platforms/maple/setup.c b/arch/powerpc/platforms/maple/setup.c index 354c05861629..144177d77cf1 100644 --- a/arch/powerpc/platforms/maple/setup.c +++ b/arch/powerpc/platforms/maple/setup.c | |||
@@ -41,13 +41,13 @@ | |||
41 | #include <linux/root_dev.h> | 41 | #include <linux/root_dev.h> |
42 | #include <linux/serial.h> | 42 | #include <linux/serial.h> |
43 | #include <linux/smp.h> | 43 | #include <linux/smp.h> |
44 | #include <linux/bitops.h> | ||
44 | 45 | ||
45 | #include <asm/processor.h> | 46 | #include <asm/processor.h> |
46 | #include <asm/sections.h> | 47 | #include <asm/sections.h> |
47 | #include <asm/prom.h> | 48 | #include <asm/prom.h> |
48 | #include <asm/system.h> | 49 | #include <asm/system.h> |
49 | #include <asm/pgtable.h> | 50 | #include <asm/pgtable.h> |
50 | #include <asm/bitops.h> | ||
51 | #include <asm/io.h> | 51 | #include <asm/io.h> |
52 | #include <asm/kexec.h> | 52 | #include <asm/kexec.h> |
53 | #include <asm/pci-bridge.h> | 53 | #include <asm/pci-bridge.h> |
diff --git a/arch/powerpc/platforms/pseries/ras.c b/arch/powerpc/platforms/pseries/ras.c index 3a393c7f390e..a1ab25c7082f 100644 --- a/arch/powerpc/platforms/pseries/ras.c +++ b/arch/powerpc/platforms/pseries/ras.c | |||
@@ -332,7 +332,7 @@ static int recover_mce(struct pt_regs *regs, struct rtas_error_log * err) | |||
332 | err->disposition == RTAS_DISP_NOT_RECOVERED && | 332 | err->disposition == RTAS_DISP_NOT_RECOVERED && |
333 | err->target == RTAS_TARGET_MEMORY && | 333 | err->target == RTAS_TARGET_MEMORY && |
334 | err->type == RTAS_TYPE_ECC_UNCORR && | 334 | err->type == RTAS_TYPE_ECC_UNCORR && |
335 | !(current->pid == 0 || is_init(current))) { | 335 | !(current->pid == 0 || is_global_init(current))) { |
336 | /* Kill off a user process with an ECC error */ | 336 | /* Kill off a user process with an ECC error */ |
337 | printk(KERN_ERR "MCE: uncorrectable ecc error for pid %d\n", | 337 | printk(KERN_ERR "MCE: uncorrectable ecc error for pid %d\n", |
338 | current->pid); | 338 | current->pid); |
diff --git a/arch/ppc/Kconfig b/arch/ppc/Kconfig index 607925c8a99e..6473fa7cb4b9 100644 --- a/arch/ppc/Kconfig +++ b/arch/ppc/Kconfig | |||
@@ -1317,7 +1317,7 @@ endmenu | |||
1317 | 1317 | ||
1318 | source "lib/Kconfig" | 1318 | source "lib/Kconfig" |
1319 | 1319 | ||
1320 | source "arch/powerpc/oprofile/Kconfig" | 1320 | source "kernel/Kconfig.instrumentation" |
1321 | 1321 | ||
1322 | source "arch/ppc/Kconfig.debug" | 1322 | source "arch/ppc/Kconfig.debug" |
1323 | 1323 | ||
diff --git a/arch/ppc/boot/Makefile b/arch/ppc/boot/Makefile index 487dc66dcc74..500497e3c72d 100644 --- a/arch/ppc/boot/Makefile +++ b/arch/ppc/boot/Makefile | |||
@@ -13,6 +13,8 @@ | |||
13 | # modified by Cort (cort@cs.nmt.edu) | 13 | # modified by Cort (cort@cs.nmt.edu) |
14 | # | 14 | # |
15 | 15 | ||
16 | # KBUILD_CFLAGS used when building rest of boot (takes effect recursively) | ||
17 | KBUILD_CFLAGS += -fno-builtin -D__BOOTER__ -Iarch/$(ARCH)/boot/include | ||
16 | HOSTCFLAGS += -Iarch/$(ARCH)/boot/include | 18 | HOSTCFLAGS += -Iarch/$(ARCH)/boot/include |
17 | 19 | ||
18 | BOOT_TARGETS = zImage zImage.initrd znetboot znetboot.initrd | 20 | BOOT_TARGETS = zImage zImage.initrd znetboot znetboot.initrd |
diff --git a/arch/ppc/kernel/traps.c b/arch/ppc/kernel/traps.c index 3f3b292eb773..c78568905c3b 100644 --- a/arch/ppc/kernel/traps.c +++ b/arch/ppc/kernel/traps.c | |||
@@ -121,7 +121,7 @@ void _exception(int signr, struct pt_regs *regs, int code, unsigned long addr) | |||
121 | * generate the same exception over and over again and we get | 121 | * generate the same exception over and over again and we get |
122 | * nowhere. Better to kill it and let the kernel panic. | 122 | * nowhere. Better to kill it and let the kernel panic. |
123 | */ | 123 | */ |
124 | if (is_init(current)) { | 124 | if (is_global_init(current)) { |
125 | __sighandler_t handler; | 125 | __sighandler_t handler; |
126 | 126 | ||
127 | spin_lock_irq(¤t->sighand->siglock); | 127 | spin_lock_irq(¤t->sighand->siglock); |
diff --git a/arch/ppc/mm/fault.c b/arch/ppc/mm/fault.c index 94913ddcf76e..254c23b755e6 100644 --- a/arch/ppc/mm/fault.c +++ b/arch/ppc/mm/fault.c | |||
@@ -290,7 +290,7 @@ bad_area: | |||
290 | */ | 290 | */ |
291 | out_of_memory: | 291 | out_of_memory: |
292 | up_read(&mm->mmap_sem); | 292 | up_read(&mm->mmap_sem); |
293 | if (is_init(current)) { | 293 | if (is_global_init(current)) { |
294 | yield(); | 294 | yield(); |
295 | down_read(&mm->mmap_sem); | 295 | down_read(&mm->mmap_sem); |
296 | goto survive; | 296 | goto survive; |
diff --git a/arch/ppc/platforms/chestnut.c b/arch/ppc/platforms/chestnut.c index 248684f50dd9..dcd6070b85eb 100644 --- a/arch/ppc/platforms/chestnut.c +++ b/arch/ppc/platforms/chestnut.c | |||
@@ -49,7 +49,6 @@ extern void gen550_progress(char *, unsigned short); | |||
49 | extern void gen550_init(int, struct uart_port *); | 49 | extern void gen550_init(int, struct uart_port *); |
50 | extern void mv64360_pcibios_fixup(mv64x60_handle_t *bh); | 50 | extern void mv64360_pcibios_fixup(mv64x60_handle_t *bh); |
51 | 51 | ||
52 | #define BIT(x) (1<<x) | ||
53 | #define CHESTNUT_PRESERVE_MASK (BIT(MV64x60_CPU2DEV_0_WIN) | \ | 52 | #define CHESTNUT_PRESERVE_MASK (BIT(MV64x60_CPU2DEV_0_WIN) | \ |
54 | BIT(MV64x60_CPU2DEV_1_WIN) | \ | 53 | BIT(MV64x60_CPU2DEV_1_WIN) | \ |
55 | BIT(MV64x60_CPU2DEV_2_WIN) | \ | 54 | BIT(MV64x60_CPU2DEV_2_WIN) | \ |
diff --git a/arch/s390/Kconfig b/arch/s390/Kconfig index b71132166f60..4ec716d8c1a6 100644 --- a/arch/s390/Kconfig +++ b/arch/s390/Kconfig | |||
@@ -529,21 +529,7 @@ source "drivers/Kconfig" | |||
529 | 529 | ||
530 | source "fs/Kconfig" | 530 | source "fs/Kconfig" |
531 | 531 | ||
532 | menu "Instrumentation Support" | 532 | source "kernel/Kconfig.instrumentation" |
533 | |||
534 | source "arch/s390/oprofile/Kconfig" | ||
535 | |||
536 | config KPROBES | ||
537 | bool "Kprobes (EXPERIMENTAL)" | ||
538 | depends on EXPERIMENTAL && MODULES | ||
539 | help | ||
540 | Kprobes allows you to trap at almost any kernel address and | ||
541 | execute a callback function. register_kprobe() establishes | ||
542 | a probepoint and specifies the callback. Kprobes is useful | ||
543 | for kernel debugging, non-intrusive instrumentation and testing. | ||
544 | If in doubt, say "N". | ||
545 | |||
546 | endmenu | ||
547 | 533 | ||
548 | source "arch/s390/Kconfig.debug" | 534 | source "arch/s390/Kconfig.debug" |
549 | 535 | ||
diff --git a/arch/s390/kernel/process.c b/arch/s390/kernel/process.c index abb447a3e472..70c57378f426 100644 --- a/arch/s390/kernel/process.c +++ b/arch/s390/kernel/process.c | |||
@@ -166,7 +166,7 @@ void show_regs(struct pt_regs *regs) | |||
166 | 166 | ||
167 | printk("CPU: %d %s\n", task_thread_info(tsk)->cpu, print_tainted()); | 167 | printk("CPU: %d %s\n", task_thread_info(tsk)->cpu, print_tainted()); |
168 | printk("Process %s (pid: %d, task: %p, ksp: %p)\n", | 168 | printk("Process %s (pid: %d, task: %p, ksp: %p)\n", |
169 | current->comm, current->pid, (void *) tsk, | 169 | current->comm, task_pid_nr(current), (void *) tsk, |
170 | (void *) tsk->thread.ksp); | 170 | (void *) tsk->thread.ksp); |
171 | 171 | ||
172 | show_registers(regs); | 172 | show_registers(regs); |
diff --git a/arch/s390/lib/uaccess_pt.c b/arch/s390/lib/uaccess_pt.c index 60604b2819b2..b159a9d65680 100644 --- a/arch/s390/lib/uaccess_pt.c +++ b/arch/s390/lib/uaccess_pt.c | |||
@@ -64,7 +64,7 @@ out: | |||
64 | 64 | ||
65 | out_of_memory: | 65 | out_of_memory: |
66 | up_read(&mm->mmap_sem); | 66 | up_read(&mm->mmap_sem); |
67 | if (is_init(current)) { | 67 | if (is_global_init(current)) { |
68 | yield(); | 68 | yield(); |
69 | down_read(&mm->mmap_sem); | 69 | down_read(&mm->mmap_sem); |
70 | goto survive; | 70 | goto survive; |
diff --git a/arch/s390/mm/fault.c b/arch/s390/mm/fault.c index 14c241ccdd4d..2456b52ed068 100644 --- a/arch/s390/mm/fault.c +++ b/arch/s390/mm/fault.c | |||
@@ -211,7 +211,7 @@ static int do_out_of_memory(struct pt_regs *regs, unsigned long error_code, | |||
211 | struct mm_struct *mm = tsk->mm; | 211 | struct mm_struct *mm = tsk->mm; |
212 | 212 | ||
213 | up_read(&mm->mmap_sem); | 213 | up_read(&mm->mmap_sem); |
214 | if (is_init(tsk)) { | 214 | if (is_global_init(tsk)) { |
215 | yield(); | 215 | yield(); |
216 | down_read(&mm->mmap_sem); | 216 | down_read(&mm->mmap_sem); |
217 | return 1; | 217 | return 1; |
diff --git a/arch/s390/oprofile/Kconfig b/arch/s390/oprofile/Kconfig deleted file mode 100644 index 208220a5f23f..000000000000 --- a/arch/s390/oprofile/Kconfig +++ /dev/null | |||
@@ -1,22 +0,0 @@ | |||
1 | |||
2 | menu "Profiling support" | ||
3 | |||
4 | config PROFILING | ||
5 | bool "Profiling support" | ||
6 | help | ||
7 | Say Y here to enable profiling support mechanisms used by | ||
8 | profilers such as readprofile or OProfile. | ||
9 | |||
10 | |||
11 | config OPROFILE | ||
12 | tristate "OProfile system profiling" | ||
13 | depends on PROFILING | ||
14 | help | ||
15 | OProfile is a profiling system capable of profiling the | ||
16 | whole system, include the kernel, kernel modules, libraries, | ||
17 | and applications. | ||
18 | |||
19 | If unsure, say N. | ||
20 | |||
21 | endmenu | ||
22 | |||
diff --git a/arch/sh/Kconfig b/arch/sh/Kconfig index 44982c1dfa23..247f8a65e733 100644 --- a/arch/sh/Kconfig +++ b/arch/sh/Kconfig | |||
@@ -758,7 +758,7 @@ source "drivers/Kconfig" | |||
758 | 758 | ||
759 | source "fs/Kconfig" | 759 | source "fs/Kconfig" |
760 | 760 | ||
761 | source "arch/sh/oprofile/Kconfig" | 761 | source "kernel/Kconfig.instrumentation" |
762 | 762 | ||
763 | source "arch/sh/Kconfig.debug" | 763 | source "arch/sh/Kconfig.debug" |
764 | 764 | ||
diff --git a/arch/sh/boards/hp6xx/pm.c b/arch/sh/boards/hp6xx/pm.c index 8143d1b948e7..d22f6eac9cca 100644 --- a/arch/sh/boards/hp6xx/pm.c +++ b/arch/sh/boards/hp6xx/pm.c | |||
@@ -67,14 +67,14 @@ static int hp6x0_pm_enter(suspend_state_t state) | |||
67 | return 0; | 67 | return 0; |
68 | } | 68 | } |
69 | 69 | ||
70 | static struct pm_ops hp6x0_pm_ops = { | 70 | static struct platform_suspend_ops hp6x0_pm_ops = { |
71 | .enter = hp6x0_pm_enter, | 71 | .enter = hp6x0_pm_enter, |
72 | .valid = pm_valid_only_mem, | 72 | .valid = suspend_valid_only_mem, |
73 | }; | 73 | }; |
74 | 74 | ||
75 | static int __init hp6x0_pm_init(void) | 75 | static int __init hp6x0_pm_init(void) |
76 | { | 76 | { |
77 | pm_set_ops(&hp6x0_pm_ops); | 77 | suspend_set_ops(&hp6x0_pm_ops); |
78 | return 0; | 78 | return 0; |
79 | } | 79 | } |
80 | 80 | ||
diff --git a/arch/sh/kernel/machine_kexec.c b/arch/sh/kernel/machine_kexec.c index 790ed69b8666..5c17de51987e 100644 --- a/arch/sh/kernel/machine_kexec.c +++ b/arch/sh/kernel/machine_kexec.c | |||
@@ -104,24 +104,3 @@ NORET_TYPE void machine_kexec(struct kimage *image) | |||
104 | (*rnk)(page_list, reboot_code_buffer, image->start, vbr_reg); | 104 | (*rnk)(page_list, reboot_code_buffer, image->start, vbr_reg); |
105 | } | 105 | } |
106 | 106 | ||
107 | /* crashkernel=size@addr specifies the location to reserve for | ||
108 | * a crash kernel. By reserving this memory we guarantee | ||
109 | * that linux never sets it up as a DMA target. | ||
110 | * Useful for holding code to do something appropriate | ||
111 | * after a kernel panic. | ||
112 | */ | ||
113 | static int __init parse_crashkernel(char *arg) | ||
114 | { | ||
115 | unsigned long size, base; | ||
116 | size = memparse(arg, &arg); | ||
117 | if (*arg == '@') { | ||
118 | base = memparse(arg+1, &arg); | ||
119 | /* FIXME: Do I want a sanity check | ||
120 | * to validate the memory range? | ||
121 | */ | ||
122 | crashk_res.start = base; | ||
123 | crashk_res.end = base + size - 1; | ||
124 | } | ||
125 | return 0; | ||
126 | } | ||
127 | early_param("crashkernel", parse_crashkernel); | ||
diff --git a/arch/sh/kernel/process.c b/arch/sh/kernel/process.c index b4469992d6b2..6d7f2b07e491 100644 --- a/arch/sh/kernel/process.c +++ b/arch/sh/kernel/process.c | |||
@@ -121,7 +121,7 @@ void machine_power_off(void) | |||
121 | void show_regs(struct pt_regs * regs) | 121 | void show_regs(struct pt_regs * regs) |
122 | { | 122 | { |
123 | printk("\n"); | 123 | printk("\n"); |
124 | printk("Pid : %d, Comm: %20s\n", current->pid, current->comm); | 124 | printk("Pid : %d, Comm: %20s\n", task_pid_nr(current), current->comm); |
125 | print_symbol("PC is at %s\n", instruction_pointer(regs)); | 125 | print_symbol("PC is at %s\n", instruction_pointer(regs)); |
126 | printk("PC : %08lx SP : %08lx SR : %08lx ", | 126 | printk("PC : %08lx SP : %08lx SR : %08lx ", |
127 | regs->pc, regs->regs[15], regs->sr); | 127 | regs->pc, regs->regs[15], regs->sr); |
diff --git a/arch/sh/kernel/setup.c b/arch/sh/kernel/setup.c index b3027a6775b9..b749403f6b38 100644 --- a/arch/sh/kernel/setup.c +++ b/arch/sh/kernel/setup.c | |||
@@ -128,6 +128,37 @@ static void __init register_bootmem_low_pages(void) | |||
128 | free_bootmem(PFN_PHYS(curr_pfn), PFN_PHYS(pages)); | 128 | free_bootmem(PFN_PHYS(curr_pfn), PFN_PHYS(pages)); |
129 | } | 129 | } |
130 | 130 | ||
131 | #ifdef CONFIG_KEXEC | ||
132 | static void __init reserve_crashkernel(void) | ||
133 | { | ||
134 | unsigned long long free_mem; | ||
135 | unsigned long long crash_size, crash_base; | ||
136 | int ret; | ||
137 | |||
138 | free_mem = ((unsigned long long)max_low_pfn - min_low_pfn) << PAGE_SHIFT; | ||
139 | |||
140 | ret = parse_crashkernel(boot_command_line, free_mem, | ||
141 | &crash_size, &crash_base); | ||
142 | if (ret == 0 && crash_size) { | ||
143 | if (crash_base > 0) { | ||
144 | printk(KERN_INFO "Reserving %ldMB of memory at %ldMB " | ||
145 | "for crashkernel (System RAM: %ldMB)\n", | ||
146 | (unsigned long)(crash_size >> 20), | ||
147 | (unsigned long)(crash_base >> 20), | ||
148 | (unsigned long)(free_mem >> 20)); | ||
149 | crashk_res.start = crash_base; | ||
150 | crashk_res.end = crash_base + crash_size - 1; | ||
151 | reserve_bootmem(crash_base, crash_size); | ||
152 | } else | ||
153 | printk(KERN_INFO "crashkernel reservation failed - " | ||
154 | "you have to specify a base address\n"); | ||
155 | } | ||
156 | } | ||
157 | #else | ||
158 | static inline void __init reserve_crashkernel(void) | ||
159 | {} | ||
160 | #endif | ||
161 | |||
131 | void __init setup_bootmem_allocator(unsigned long free_pfn) | 162 | void __init setup_bootmem_allocator(unsigned long free_pfn) |
132 | { | 163 | { |
133 | unsigned long bootmap_size; | 164 | unsigned long bootmap_size; |
@@ -189,11 +220,8 @@ void __init setup_bootmem_allocator(unsigned long free_pfn) | |||
189 | } | 220 | } |
190 | } | 221 | } |
191 | #endif | 222 | #endif |
192 | #ifdef CONFIG_KEXEC | 223 | |
193 | if (crashk_res.start != crashk_res.end) | 224 | reserve_crashkernel(); |
194 | reserve_bootmem(crashk_res.start, | ||
195 | crashk_res.end - crashk_res.start + 1); | ||
196 | #endif | ||
197 | } | 225 | } |
198 | 226 | ||
199 | #ifndef CONFIG_NEED_MULTIPLE_NODES | 227 | #ifndef CONFIG_NEED_MULTIPLE_NODES |
diff --git a/arch/sh/kernel/signal.c b/arch/sh/kernel/signal.c index 2f42442cf164..ca754fd42437 100644 --- a/arch/sh/kernel/signal.c +++ b/arch/sh/kernel/signal.c | |||
@@ -382,7 +382,7 @@ static int setup_frame(int sig, struct k_sigaction *ka, | |||
382 | set_fs(USER_DS); | 382 | set_fs(USER_DS); |
383 | 383 | ||
384 | pr_debug("SIG deliver (%s:%d): sp=%p pc=%08lx pr=%08lx\n", | 384 | pr_debug("SIG deliver (%s:%d): sp=%p pc=%08lx pr=%08lx\n", |
385 | current->comm, current->pid, frame, regs->pc, regs->pr); | 385 | current->comm, task_pid_nr(current), frame, regs->pc, regs->pr); |
386 | 386 | ||
387 | flush_cache_sigtramp(regs->pr); | 387 | flush_cache_sigtramp(regs->pr); |
388 | 388 | ||
@@ -462,7 +462,7 @@ static int setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info, | |||
462 | set_fs(USER_DS); | 462 | set_fs(USER_DS); |
463 | 463 | ||
464 | pr_debug("SIG deliver (%s:%d): sp=%p pc=%08lx pr=%08lx\n", | 464 | pr_debug("SIG deliver (%s:%d): sp=%p pc=%08lx pr=%08lx\n", |
465 | current->comm, current->pid, frame, regs->pc, regs->pr); | 465 | current->comm, task_pid_nr(current), frame, regs->pc, regs->pr); |
466 | 466 | ||
467 | flush_cache_sigtramp(regs->pr); | 467 | flush_cache_sigtramp(regs->pr); |
468 | 468 | ||
diff --git a/arch/sh/kernel/traps.c b/arch/sh/kernel/traps.c index dcb46e71da1c..cf99111cb33f 100644 --- a/arch/sh/kernel/traps.c +++ b/arch/sh/kernel/traps.c | |||
@@ -95,8 +95,8 @@ void die(const char * str, struct pt_regs * regs, long err) | |||
95 | print_modules(); | 95 | print_modules(); |
96 | show_regs(regs); | 96 | show_regs(regs); |
97 | 97 | ||
98 | printk("Process: %s (pid: %d, stack limit = %p)\n", | 98 | printk("Process: %s (pid: %d, stack limit = %p)\n", current->comm, |
99 | current->comm, current->pid, task_stack_page(current) + 1); | 99 | task_pid_nr(current), task_stack_page(current) + 1); |
100 | 100 | ||
101 | if (!user_mode(regs) || in_interrupt()) | 101 | if (!user_mode(regs) || in_interrupt()) |
102 | dump_mem("Stack: ", regs->regs[15], THREAD_SIZE + | 102 | dump_mem("Stack: ", regs->regs[15], THREAD_SIZE + |
@@ -386,7 +386,8 @@ static int handle_unaligned_access(u16 instruction, struct pt_regs *regs) | |||
386 | 386 | ||
387 | printk(KERN_NOTICE "Fixing up unaligned userspace access " | 387 | printk(KERN_NOTICE "Fixing up unaligned userspace access " |
388 | "in \"%s\" pid=%d pc=0x%p ins=0x%04hx\n", | 388 | "in \"%s\" pid=%d pc=0x%p ins=0x%04hx\n", |
389 | current->comm,current->pid,(u16*)regs->pc,instruction); | 389 | current->comm, task_pid_nr(current), |
390 | (u16 *)regs->pc, instruction); | ||
390 | } | 391 | } |
391 | 392 | ||
392 | ret = -EFAULT; | 393 | ret = -EFAULT; |
diff --git a/arch/sh/mm/fault.c b/arch/sh/mm/fault.c index 4729668ce5bf..f33cedb353fc 100644 --- a/arch/sh/mm/fault.c +++ b/arch/sh/mm/fault.c | |||
@@ -207,7 +207,7 @@ no_context: | |||
207 | */ | 207 | */ |
208 | out_of_memory: | 208 | out_of_memory: |
209 | up_read(&mm->mmap_sem); | 209 | up_read(&mm->mmap_sem); |
210 | if (is_init(current)) { | 210 | if (is_global_init(current)) { |
211 | yield(); | 211 | yield(); |
212 | down_read(&mm->mmap_sem); | 212 | down_read(&mm->mmap_sem); |
213 | goto survive; | 213 | goto survive; |
diff --git a/arch/sh/oprofile/Kconfig b/arch/sh/oprofile/Kconfig deleted file mode 100644 index 5ade19801b97..000000000000 --- a/arch/sh/oprofile/Kconfig +++ /dev/null | |||
@@ -1,23 +0,0 @@ | |||
1 | |||
2 | menu "Profiling support" | ||
3 | depends on EXPERIMENTAL | ||
4 | |||
5 | config PROFILING | ||
6 | bool "Profiling support (EXPERIMENTAL)" | ||
7 | help | ||
8 | Say Y here to enable the extended profiling support mechanisms used | ||
9 | by profilers such as OProfile. | ||
10 | |||
11 | |||
12 | config OPROFILE | ||
13 | tristate "OProfile system profiling (EXPERIMENTAL)" | ||
14 | depends on PROFILING | ||
15 | help | ||
16 | OProfile is a profiling system capable of profiling the | ||
17 | whole system, include the kernel, kernel modules, libraries, | ||
18 | and applications. | ||
19 | |||
20 | If unsure, say N. | ||
21 | |||
22 | endmenu | ||
23 | |||
diff --git a/arch/sh64/Kconfig b/arch/sh64/Kconfig index b3327ce8e82f..ba204bac49df 100644 --- a/arch/sh64/Kconfig +++ b/arch/sh64/Kconfig | |||
@@ -284,7 +284,7 @@ source "drivers/Kconfig" | |||
284 | 284 | ||
285 | source "fs/Kconfig" | 285 | source "fs/Kconfig" |
286 | 286 | ||
287 | source "arch/sh64/oprofile/Kconfig" | 287 | source "kernel/Kconfig.instrumentation" |
288 | 288 | ||
289 | source "arch/sh64/Kconfig.debug" | 289 | source "arch/sh64/Kconfig.debug" |
290 | 290 | ||
diff --git a/arch/sh64/kernel/pci_sh5.c b/arch/sh64/kernel/pci_sh5.c index 388bb711f1b0..b4d9534d2b0e 100644 --- a/arch/sh64/kernel/pci_sh5.c +++ b/arch/sh64/kernel/pci_sh5.c | |||
@@ -480,7 +480,7 @@ static int __init pcibios_init(void) | |||
480 | return -EINVAL; | 480 | return -EINVAL; |
481 | } | 481 | } |
482 | 482 | ||
483 | /* The pci subsytem needs to know where memory is and how much | 483 | /* The pci subsystem needs to know where memory is and how much |
484 | * of it there is. I've simply made these globals. A better mechanism | 484 | * of it there is. I've simply made these globals. A better mechanism |
485 | * is probably needed. | 485 | * is probably needed. |
486 | */ | 486 | */ |
diff --git a/arch/sh64/kernel/traps.c b/arch/sh64/kernel/traps.c index 9d0d58fb29fa..c03101fab467 100644 --- a/arch/sh64/kernel/traps.c +++ b/arch/sh64/kernel/traps.c | |||
@@ -764,7 +764,7 @@ static int misaligned_fixup(struct pt_regs *regs) | |||
764 | --user_mode_unaligned_fixup_count; | 764 | --user_mode_unaligned_fixup_count; |
765 | /* Only do 'count' worth of these reports, to remove a potential DoS against syslog */ | 765 | /* Only do 'count' worth of these reports, to remove a potential DoS against syslog */ |
766 | printk("Fixing up unaligned userspace access in \"%s\" pid=%d pc=0x%08x ins=0x%08lx\n", | 766 | printk("Fixing up unaligned userspace access in \"%s\" pid=%d pc=0x%08x ins=0x%08lx\n", |
767 | current->comm, current->pid, (__u32)regs->pc, opcode); | 767 | current->comm, task_pid_nr(current), (__u32)regs->pc, opcode); |
768 | } else | 768 | } else |
769 | #endif | 769 | #endif |
770 | if (!user_mode(regs) && (kernel_mode_unaligned_fixup_count > 0)) { | 770 | if (!user_mode(regs) && (kernel_mode_unaligned_fixup_count > 0)) { |
@@ -774,7 +774,7 @@ static int misaligned_fixup(struct pt_regs *regs) | |||
774 | (__u32)regs->pc, opcode); | 774 | (__u32)regs->pc, opcode); |
775 | } else { | 775 | } else { |
776 | printk("Fixing up unaligned kernelspace access in \"%s\" pid=%d pc=0x%08x ins=0x%08lx\n", | 776 | printk("Fixing up unaligned kernelspace access in \"%s\" pid=%d pc=0x%08x ins=0x%08lx\n", |
777 | current->comm, current->pid, (__u32)regs->pc, opcode); | 777 | current->comm, task_pid_nr(current), (__u32)regs->pc, opcode); |
778 | } | 778 | } |
779 | } | 779 | } |
780 | 780 | ||
diff --git a/arch/sh64/mm/fault.c b/arch/sh64/mm/fault.c index dd81c669c79b..7c79a1ba8059 100644 --- a/arch/sh64/mm/fault.c +++ b/arch/sh64/mm/fault.c | |||
@@ -81,7 +81,7 @@ static inline void print_vma(struct vm_area_struct *vma) | |||
81 | 81 | ||
82 | static inline void print_task(struct task_struct *tsk) | 82 | static inline void print_task(struct task_struct *tsk) |
83 | { | 83 | { |
84 | printk("Task pid %d\n", tsk->pid); | 84 | printk("Task pid %d\n", task_pid_nr(tsk)); |
85 | } | 85 | } |
86 | 86 | ||
87 | static pte_t *lookup_pte(struct mm_struct *mm, unsigned long address) | 87 | static pte_t *lookup_pte(struct mm_struct *mm, unsigned long address) |
@@ -272,13 +272,13 @@ bad_area: | |||
272 | * usermode, so only need a few */ | 272 | * usermode, so only need a few */ |
273 | count++; | 273 | count++; |
274 | printk("user mode bad_area address=%08lx pid=%d (%s) pc=%08lx\n", | 274 | printk("user mode bad_area address=%08lx pid=%d (%s) pc=%08lx\n", |
275 | address, current->pid, current->comm, | 275 | address, task_pid_nr(current), current->comm, |
276 | (unsigned long) regs->pc); | 276 | (unsigned long) regs->pc); |
277 | #if 0 | 277 | #if 0 |
278 | show_regs(regs); | 278 | show_regs(regs); |
279 | #endif | 279 | #endif |
280 | } | 280 | } |
281 | if (is_init(tsk)) { | 281 | if (is_global_init(tsk)) { |
282 | panic("INIT had user mode bad_area\n"); | 282 | panic("INIT had user mode bad_area\n"); |
283 | } | 283 | } |
284 | tsk->thread.address = address; | 284 | tsk->thread.address = address; |
@@ -320,14 +320,14 @@ no_context: | |||
320 | * us unable to handle the page fault gracefully. | 320 | * us unable to handle the page fault gracefully. |
321 | */ | 321 | */ |
322 | out_of_memory: | 322 | out_of_memory: |
323 | if (is_init(current)) { | 323 | if (is_global_init(current)) { |
324 | panic("INIT out of memory\n"); | 324 | panic("INIT out of memory\n"); |
325 | yield(); | 325 | yield(); |
326 | goto survive; | 326 | goto survive; |
327 | } | 327 | } |
328 | printk("fault:Out of memory\n"); | 328 | printk("fault:Out of memory\n"); |
329 | up_read(&mm->mmap_sem); | 329 | up_read(&mm->mmap_sem); |
330 | if (is_init(current)) { | 330 | if (is_global_init(current)) { |
331 | yield(); | 331 | yield(); |
332 | down_read(&mm->mmap_sem); | 332 | down_read(&mm->mmap_sem); |
333 | goto survive; | 333 | goto survive; |
diff --git a/arch/sh64/oprofile/Kconfig b/arch/sh64/oprofile/Kconfig deleted file mode 100644 index 19d37730b664..000000000000 --- a/arch/sh64/oprofile/Kconfig +++ /dev/null | |||
@@ -1,23 +0,0 @@ | |||
1 | |||
2 | menu "Profiling support" | ||
3 | depends on EXPERIMENTAL | ||
4 | |||
5 | config PROFILING | ||
6 | bool "Profiling support (EXPERIMENTAL)" | ||
7 | help | ||
8 | Say Y here to enable the extended profiling support mechanisms used | ||
9 | by profilers such as OProfile. | ||
10 | |||
11 | |||
12 | config OPROFILE | ||
13 | tristate "OProfile system profiling (EXPERIMENTAL)" | ||
14 | depends on PROFILING | ||
15 | help | ||
16 | OProfile is a profiling system capable of profiling the | ||
17 | whole system, include the kernel, kernel modules, libraries, | ||
18 | and applications. | ||
19 | |||
20 | If unsure, say N. | ||
21 | |||
22 | endmenu | ||
23 | |||
diff --git a/arch/sparc/Kconfig b/arch/sparc/Kconfig index c0f4ba109daa..527adc808ad6 100644 --- a/arch/sparc/Kconfig +++ b/arch/sparc/Kconfig | |||
@@ -320,11 +320,7 @@ endmenu | |||
320 | 320 | ||
321 | source "fs/Kconfig" | 321 | source "fs/Kconfig" |
322 | 322 | ||
323 | menu "Instrumentation Support" | 323 | source "kernel/Kconfig.instrumentation" |
324 | |||
325 | source "arch/sparc/oprofile/Kconfig" | ||
326 | |||
327 | endmenu | ||
328 | 324 | ||
329 | source "arch/sparc/Kconfig.debug" | 325 | source "arch/sparc/Kconfig.debug" |
330 | 326 | ||
diff --git a/arch/sparc/kernel/of_device.c b/arch/sparc/kernel/of_device.c index fb2caef79cec..3ea000d15e3a 100644 --- a/arch/sparc/kernel/of_device.c +++ b/arch/sparc/kernel/of_device.c | |||
@@ -585,24 +585,6 @@ static int __init of_debug(char *str) | |||
585 | 585 | ||
586 | __setup("of_debug=", of_debug); | 586 | __setup("of_debug=", of_debug); |
587 | 587 | ||
588 | int of_register_driver(struct of_platform_driver *drv, struct bus_type *bus) | ||
589 | { | ||
590 | /* initialize common driver fields */ | ||
591 | if (!drv->driver.name) | ||
592 | drv->driver.name = drv->name; | ||
593 | if (!drv->driver.owner) | ||
594 | drv->driver.owner = drv->owner; | ||
595 | drv->driver.bus = bus; | ||
596 | |||
597 | /* register with core */ | ||
598 | return driver_register(&drv->driver); | ||
599 | } | ||
600 | |||
601 | void of_unregister_driver(struct of_platform_driver *drv) | ||
602 | { | ||
603 | driver_unregister(&drv->driver); | ||
604 | } | ||
605 | |||
606 | struct of_device* of_platform_device_create(struct device_node *np, | 588 | struct of_device* of_platform_device_create(struct device_node *np, |
607 | const char *bus_id, | 589 | const char *bus_id, |
608 | struct device *parent, | 590 | struct device *parent, |
@@ -628,6 +610,4 @@ struct of_device* of_platform_device_create(struct device_node *np, | |||
628 | return dev; | 610 | return dev; |
629 | } | 611 | } |
630 | 612 | ||
631 | EXPORT_SYMBOL(of_register_driver); | ||
632 | EXPORT_SYMBOL(of_unregister_driver); | ||
633 | EXPORT_SYMBOL(of_platform_device_create); | 613 | EXPORT_SYMBOL(of_platform_device_create); |
diff --git a/arch/sparc/kernel/ptrace.c b/arch/sparc/kernel/ptrace.c index 003f8eed32f4..fe562db475e9 100644 --- a/arch/sparc/kernel/ptrace.c +++ b/arch/sparc/kernel/ptrace.c | |||
@@ -155,7 +155,7 @@ static inline void read_sunos_user(struct pt_regs *regs, unsigned long offset, | |||
155 | /* Rest of them are completely unsupported. */ | 155 | /* Rest of them are completely unsupported. */ |
156 | default: | 156 | default: |
157 | printk("%s [%d]: Wants to read user offset %ld\n", | 157 | printk("%s [%d]: Wants to read user offset %ld\n", |
158 | current->comm, current->pid, offset); | 158 | current->comm, task_pid_nr(current), offset); |
159 | pt_error_return(regs, EIO); | 159 | pt_error_return(regs, EIO); |
160 | return; | 160 | return; |
161 | } | 161 | } |
@@ -222,7 +222,7 @@ static inline void write_sunos_user(struct pt_regs *regs, unsigned long offset, | |||
222 | /* Rest of them are completely unsupported or "no-touch". */ | 222 | /* Rest of them are completely unsupported or "no-touch". */ |
223 | default: | 223 | default: |
224 | printk("%s [%d]: Wants to write user offset %ld\n", | 224 | printk("%s [%d]: Wants to write user offset %ld\n", |
225 | current->comm, current->pid, offset); | 225 | current->comm, task_pid_nr(current), offset); |
226 | goto failure; | 226 | goto failure; |
227 | } | 227 | } |
228 | success: | 228 | success: |
diff --git a/arch/sparc/kernel/sys_sparc.c b/arch/sparc/kernel/sys_sparc.c index 6c0221e9a9f5..42bf09db9a81 100644 --- a/arch/sparc/kernel/sys_sparc.c +++ b/arch/sparc/kernel/sys_sparc.c | |||
@@ -357,7 +357,7 @@ c_sys_nis_syscall (struct pt_regs *regs) | |||
357 | if (count++ > 5) | 357 | if (count++ > 5) |
358 | return -ENOSYS; | 358 | return -ENOSYS; |
359 | printk ("%s[%d]: Unimplemented SPARC system call %d\n", | 359 | printk ("%s[%d]: Unimplemented SPARC system call %d\n", |
360 | current->comm, current->pid, (int)regs->u_regs[1]); | 360 | current->comm, task_pid_nr(current), (int)regs->u_regs[1]); |
361 | #ifdef DEBUG_UNIMP_SYSCALL | 361 | #ifdef DEBUG_UNIMP_SYSCALL |
362 | show_regs (regs); | 362 | show_regs (regs); |
363 | #endif | 363 | #endif |
diff --git a/arch/sparc/kernel/sys_sunos.c b/arch/sparc/kernel/sys_sunos.c index f807172cab0e..28c187c5d9fd 100644 --- a/arch/sparc/kernel/sys_sunos.c +++ b/arch/sparc/kernel/sys_sunos.c | |||
@@ -866,7 +866,7 @@ asmlinkage int sunos_killpg(int pgrp, int sig) | |||
866 | rcu_read_lock(); | 866 | rcu_read_lock(); |
867 | ret = -EINVAL; | 867 | ret = -EINVAL; |
868 | if (pgrp > 0) | 868 | if (pgrp > 0) |
869 | ret = kill_pgrp(find_pid(pgrp), sig, 0); | 869 | ret = kill_pgrp(find_vpid(pgrp), sig, 0); |
870 | rcu_read_unlock(); | 870 | rcu_read_unlock(); |
871 | 871 | ||
872 | return ret; | 872 | return ret; |
diff --git a/arch/sparc/kernel/traps.c b/arch/sparc/kernel/traps.c index 3bc3bff51e08..d404e7994527 100644 --- a/arch/sparc/kernel/traps.c +++ b/arch/sparc/kernel/traps.c | |||
@@ -38,7 +38,7 @@ struct trap_trace_entry trapbuf[1024]; | |||
38 | 38 | ||
39 | void syscall_trace_entry(struct pt_regs *regs) | 39 | void syscall_trace_entry(struct pt_regs *regs) |
40 | { | 40 | { |
41 | printk("%s[%d]: ", current->comm, current->pid); | 41 | printk("%s[%d]: ", current->comm, task_pid_nr(current)); |
42 | printk("scall<%d> (could be %d)\n", (int) regs->u_regs[UREG_G1], | 42 | printk("scall<%d> (could be %d)\n", (int) regs->u_regs[UREG_G1], |
43 | (int) regs->u_regs[UREG_I0]); | 43 | (int) regs->u_regs[UREG_I0]); |
44 | } | 44 | } |
@@ -99,7 +99,7 @@ void die_if_kernel(char *str, struct pt_regs *regs) | |||
99 | " /_| \\__/ |_\\\n" | 99 | " /_| \\__/ |_\\\n" |
100 | " \\__U_/\n"); | 100 | " \\__U_/\n"); |
101 | 101 | ||
102 | printk("%s(%d): %s [#%d]\n", current->comm, current->pid, str, ++die_counter); | 102 | printk("%s(%d): %s [#%d]\n", current->comm, task_pid_nr(current), str, ++die_counter); |
103 | show_regs(regs); | 103 | show_regs(regs); |
104 | add_taint(TAINT_DIE); | 104 | add_taint(TAINT_DIE); |
105 | 105 | ||
diff --git a/arch/sparc/oprofile/Kconfig b/arch/sparc/oprofile/Kconfig deleted file mode 100644 index d8a84088471a..000000000000 --- a/arch/sparc/oprofile/Kconfig +++ /dev/null | |||
@@ -1,17 +0,0 @@ | |||
1 | config PROFILING | ||
2 | bool "Profiling support (EXPERIMENTAL)" | ||
3 | help | ||
4 | Say Y here to enable the extended profiling support mechanisms used | ||
5 | by profilers such as OProfile. | ||
6 | |||
7 | |||
8 | config OPROFILE | ||
9 | tristate "OProfile system profiling (EXPERIMENTAL)" | ||
10 | depends on PROFILING | ||
11 | help | ||
12 | OProfile is a profiling system capable of profiling the | ||
13 | whole system, include the kernel, kernel modules, libraries, | ||
14 | and applications. | ||
15 | |||
16 | If unsure, say N. | ||
17 | |||
diff --git a/arch/sparc64/Kconfig b/arch/sparc64/Kconfig index 59c4d752d286..c7a74e376985 100644 --- a/arch/sparc64/Kconfig +++ b/arch/sparc64/Kconfig | |||
@@ -460,20 +460,7 @@ source "drivers/fc4/Kconfig" | |||
460 | 460 | ||
461 | source "fs/Kconfig" | 461 | source "fs/Kconfig" |
462 | 462 | ||
463 | menu "Instrumentation Support" | 463 | source "kernel/Kconfig.instrumentation" |
464 | |||
465 | source "arch/sparc64/oprofile/Kconfig" | ||
466 | |||
467 | config KPROBES | ||
468 | bool "Kprobes (EXPERIMENTAL)" | ||
469 | depends on KALLSYMS && EXPERIMENTAL && MODULES | ||
470 | help | ||
471 | Kprobes allows you to trap at almost any kernel address and | ||
472 | execute a callback function. register_kprobe() establishes | ||
473 | a probepoint and specifies the callback. Kprobes is useful | ||
474 | for kernel debugging, non-intrusive instrumentation and testing. | ||
475 | If in doubt, say "N". | ||
476 | endmenu | ||
477 | 464 | ||
478 | source "arch/sparc64/Kconfig.debug" | 465 | source "arch/sparc64/Kconfig.debug" |
479 | 466 | ||
diff --git a/arch/sparc64/kernel/irq.c b/arch/sparc64/kernel/irq.c index f3922e5a89f6..2c3bea228159 100644 --- a/arch/sparc64/kernel/irq.c +++ b/arch/sparc64/kernel/irq.c | |||
@@ -877,7 +877,7 @@ void __cpuinit sun4v_register_mondo_queues(int this_cpu) | |||
877 | static void __init alloc_one_mondo(unsigned long *pa_ptr, unsigned long qmask) | 877 | static void __init alloc_one_mondo(unsigned long *pa_ptr, unsigned long qmask) |
878 | { | 878 | { |
879 | unsigned long size = PAGE_ALIGN(qmask + 1); | 879 | unsigned long size = PAGE_ALIGN(qmask + 1); |
880 | void *p = __alloc_bootmem_low(size, size, 0); | 880 | void *p = __alloc_bootmem(size, size, 0); |
881 | if (!p) { | 881 | if (!p) { |
882 | prom_printf("SUN4V: Error, cannot allocate mondo queue.\n"); | 882 | prom_printf("SUN4V: Error, cannot allocate mondo queue.\n"); |
883 | prom_halt(); | 883 | prom_halt(); |
@@ -889,7 +889,7 @@ static void __init alloc_one_mondo(unsigned long *pa_ptr, unsigned long qmask) | |||
889 | static void __init alloc_one_kbuf(unsigned long *pa_ptr, unsigned long qmask) | 889 | static void __init alloc_one_kbuf(unsigned long *pa_ptr, unsigned long qmask) |
890 | { | 890 | { |
891 | unsigned long size = PAGE_ALIGN(qmask + 1); | 891 | unsigned long size = PAGE_ALIGN(qmask + 1); |
892 | void *p = __alloc_bootmem_low(size, size, 0); | 892 | void *p = __alloc_bootmem(size, size, 0); |
893 | 893 | ||
894 | if (!p) { | 894 | if (!p) { |
895 | prom_printf("SUN4V: Error, cannot allocate kbuf page.\n"); | 895 | prom_printf("SUN4V: Error, cannot allocate kbuf page.\n"); |
@@ -906,7 +906,7 @@ static void __init init_cpu_send_mondo_info(struct trap_per_cpu *tb) | |||
906 | 906 | ||
907 | BUILD_BUG_ON((NR_CPUS * sizeof(u16)) > (PAGE_SIZE - 64)); | 907 | BUILD_BUG_ON((NR_CPUS * sizeof(u16)) > (PAGE_SIZE - 64)); |
908 | 908 | ||
909 | page = alloc_bootmem_low_pages(PAGE_SIZE); | 909 | page = alloc_bootmem_pages(PAGE_SIZE); |
910 | if (!page) { | 910 | if (!page) { |
911 | prom_printf("SUN4V: Error, cannot allocate cpu mondo page.\n"); | 911 | prom_printf("SUN4V: Error, cannot allocate cpu mondo page.\n"); |
912 | prom_halt(); | 912 | prom_halt(); |
@@ -953,7 +953,7 @@ void __init init_IRQ(void) | |||
953 | kill_prom_timer(); | 953 | kill_prom_timer(); |
954 | 954 | ||
955 | size = sizeof(struct ino_bucket) * NUM_IVECS; | 955 | size = sizeof(struct ino_bucket) * NUM_IVECS; |
956 | ivector_table = alloc_bootmem_low(size); | 956 | ivector_table = alloc_bootmem(size); |
957 | if (!ivector_table) { | 957 | if (!ivector_table) { |
958 | prom_printf("Fatal error, cannot allocate ivector_table\n"); | 958 | prom_printf("Fatal error, cannot allocate ivector_table\n"); |
959 | prom_halt(); | 959 | prom_halt(); |
diff --git a/arch/sparc64/kernel/of_device.c b/arch/sparc64/kernel/of_device.c index 42d779866fba..fc5c0cc793b8 100644 --- a/arch/sparc64/kernel/of_device.c +++ b/arch/sparc64/kernel/of_device.c | |||
@@ -869,26 +869,6 @@ static int __init of_debug(char *str) | |||
869 | 869 | ||
870 | __setup("of_debug=", of_debug); | 870 | __setup("of_debug=", of_debug); |
871 | 871 | ||
872 | int of_register_driver(struct of_platform_driver *drv, struct bus_type *bus) | ||
873 | { | ||
874 | /* initialize common driver fields */ | ||
875 | if (!drv->driver.name) | ||
876 | drv->driver.name = drv->name; | ||
877 | if (!drv->driver.owner) | ||
878 | drv->driver.owner = drv->owner; | ||
879 | drv->driver.bus = bus; | ||
880 | |||
881 | /* register with core */ | ||
882 | return driver_register(&drv->driver); | ||
883 | } | ||
884 | EXPORT_SYMBOL(of_register_driver); | ||
885 | |||
886 | void of_unregister_driver(struct of_platform_driver *drv) | ||
887 | { | ||
888 | driver_unregister(&drv->driver); | ||
889 | } | ||
890 | EXPORT_SYMBOL(of_unregister_driver); | ||
891 | |||
892 | struct of_device* of_platform_device_create(struct device_node *np, | 872 | struct of_device* of_platform_device_create(struct device_node *np, |
893 | const char *bus_id, | 873 | const char *bus_id, |
894 | struct device *parent, | 874 | struct device *parent, |
diff --git a/arch/sparc64/kernel/pci_common.c b/arch/sparc64/kernel/pci_common.c index c76bfbb7da08..923e0bcc3bfd 100644 --- a/arch/sparc64/kernel/pci_common.c +++ b/arch/sparc64/kernel/pci_common.c | |||
@@ -396,6 +396,13 @@ void pci_determine_mem_io_space(struct pci_pbm_info *pbm) | |||
396 | 396 | ||
397 | saw_mem = saw_io = 0; | 397 | saw_mem = saw_io = 0; |
398 | pbm_ranges = of_get_property(pbm->prom_node, "ranges", &i); | 398 | pbm_ranges = of_get_property(pbm->prom_node, "ranges", &i); |
399 | if (!pbm_ranges) { | ||
400 | prom_printf("PCI: Fatal error, missing PBM ranges property " | ||
401 | " for %s\n", | ||
402 | pbm->name); | ||
403 | prom_halt(); | ||
404 | } | ||
405 | |||
399 | num_pbm_ranges = i / sizeof(*pbm_ranges); | 406 | num_pbm_ranges = i / sizeof(*pbm_ranges); |
400 | 407 | ||
401 | for (i = 0; i < num_pbm_ranges; i++) { | 408 | for (i = 0; i < num_pbm_ranges; i++) { |
diff --git a/arch/sparc64/kernel/sys_sunos32.c b/arch/sparc64/kernel/sys_sunos32.c index 8f7a06e2c7e7..170d6ca8de6f 100644 --- a/arch/sparc64/kernel/sys_sunos32.c +++ b/arch/sparc64/kernel/sys_sunos32.c | |||
@@ -831,7 +831,7 @@ asmlinkage int sunos_killpg(int pgrp, int sig) | |||
831 | rcu_read_lock(); | 831 | rcu_read_lock(); |
832 | ret = -EINVAL; | 832 | ret = -EINVAL; |
833 | if (pgrp > 0) | 833 | if (pgrp > 0) |
834 | ret = kill_pgrp(find_pid(pgrp), sig, 0); | 834 | ret = kill_pgrp(find_vpid(pgrp), sig, 0); |
835 | rcu_read_unlock(); | 835 | rcu_read_unlock(); |
836 | 836 | ||
837 | return ret; | 837 | return ret; |
diff --git a/arch/sparc64/kernel/traps.c b/arch/sparc64/kernel/traps.c index 34573a55b6e5..e9c7e4f07abf 100644 --- a/arch/sparc64/kernel/traps.c +++ b/arch/sparc64/kernel/traps.c | |||
@@ -2225,7 +2225,7 @@ void die_if_kernel(char *str, struct pt_regs *regs) | |||
2225 | " /_| \\__/ |_\\\n" | 2225 | " /_| \\__/ |_\\\n" |
2226 | " \\__U_/\n"); | 2226 | " \\__U_/\n"); |
2227 | 2227 | ||
2228 | printk("%s(%d): %s [#%d]\n", current->comm, current->pid, str, ++die_counter); | 2228 | printk("%s(%d): %s [#%d]\n", current->comm, task_pid_nr(current), str, ++die_counter); |
2229 | notify_die(DIE_OOPS, str, regs, 0, 255, SIGSEGV); | 2229 | notify_die(DIE_OOPS, str, regs, 0, 255, SIGSEGV); |
2230 | __asm__ __volatile__("flushw"); | 2230 | __asm__ __volatile__("flushw"); |
2231 | __show_regs(regs); | 2231 | __show_regs(regs); |
diff --git a/arch/sparc64/lib/atomic.S b/arch/sparc64/lib/atomic.S index 9633750167d0..70ac4186f62b 100644 --- a/arch/sparc64/lib/atomic.S +++ b/arch/sparc64/lib/atomic.S | |||
@@ -1,10 +1,10 @@ | |||
1 | /* $Id: atomic.S,v 1.4 2001/11/18 00:12:56 davem Exp $ | 1 | /* atomic.S: These things are too big to do inline. |
2 | * atomic.S: These things are too big to do inline. | ||
3 | * | 2 | * |
4 | * Copyright (C) 1999 David S. Miller (davem@redhat.com) | 3 | * Copyright (C) 1999, 2007 David S. Miller (davem@davemloft.net) |
5 | */ | 4 | */ |
6 | 5 | ||
7 | #include <asm/asi.h> | 6 | #include <asm/asi.h> |
7 | #include <asm/backoff.h> | ||
8 | 8 | ||
9 | .text | 9 | .text |
10 | 10 | ||
@@ -16,27 +16,31 @@ | |||
16 | .globl atomic_add | 16 | .globl atomic_add |
17 | .type atomic_add,#function | 17 | .type atomic_add,#function |
18 | atomic_add: /* %o0 = increment, %o1 = atomic_ptr */ | 18 | atomic_add: /* %o0 = increment, %o1 = atomic_ptr */ |
19 | BACKOFF_SETUP(%o2) | ||
19 | 1: lduw [%o1], %g1 | 20 | 1: lduw [%o1], %g1 |
20 | add %g1, %o0, %g7 | 21 | add %g1, %o0, %g7 |
21 | cas [%o1], %g1, %g7 | 22 | cas [%o1], %g1, %g7 |
22 | cmp %g1, %g7 | 23 | cmp %g1, %g7 |
23 | bne,pn %icc, 1b | 24 | bne,pn %icc, 2f |
24 | nop | 25 | nop |
25 | retl | 26 | retl |
26 | nop | 27 | nop |
28 | 2: BACKOFF_SPIN(%o2, %o3, 1b) | ||
27 | .size atomic_add, .-atomic_add | 29 | .size atomic_add, .-atomic_add |
28 | 30 | ||
29 | .globl atomic_sub | 31 | .globl atomic_sub |
30 | .type atomic_sub,#function | 32 | .type atomic_sub,#function |
31 | atomic_sub: /* %o0 = decrement, %o1 = atomic_ptr */ | 33 | atomic_sub: /* %o0 = decrement, %o1 = atomic_ptr */ |
34 | BACKOFF_SETUP(%o2) | ||
32 | 1: lduw [%o1], %g1 | 35 | 1: lduw [%o1], %g1 |
33 | sub %g1, %o0, %g7 | 36 | sub %g1, %o0, %g7 |
34 | cas [%o1], %g1, %g7 | 37 | cas [%o1], %g1, %g7 |
35 | cmp %g1, %g7 | 38 | cmp %g1, %g7 |
36 | bne,pn %icc, 1b | 39 | bne,pn %icc, 2f |
37 | nop | 40 | nop |
38 | retl | 41 | retl |
39 | nop | 42 | nop |
43 | 2: BACKOFF_SPIN(%o2, %o3, 1b) | ||
40 | .size atomic_sub, .-atomic_sub | 44 | .size atomic_sub, .-atomic_sub |
41 | 45 | ||
42 | /* On SMP we need to use memory barriers to ensure | 46 | /* On SMP we need to use memory barriers to ensure |
@@ -60,89 +64,101 @@ atomic_sub: /* %o0 = decrement, %o1 = atomic_ptr */ | |||
60 | .globl atomic_add_ret | 64 | .globl atomic_add_ret |
61 | .type atomic_add_ret,#function | 65 | .type atomic_add_ret,#function |
62 | atomic_add_ret: /* %o0 = increment, %o1 = atomic_ptr */ | 66 | atomic_add_ret: /* %o0 = increment, %o1 = atomic_ptr */ |
67 | BACKOFF_SETUP(%o2) | ||
63 | ATOMIC_PRE_BARRIER | 68 | ATOMIC_PRE_BARRIER |
64 | 1: lduw [%o1], %g1 | 69 | 1: lduw [%o1], %g1 |
65 | add %g1, %o0, %g7 | 70 | add %g1, %o0, %g7 |
66 | cas [%o1], %g1, %g7 | 71 | cas [%o1], %g1, %g7 |
67 | cmp %g1, %g7 | 72 | cmp %g1, %g7 |
68 | bne,pn %icc, 1b | 73 | bne,pn %icc, 2f |
69 | add %g7, %o0, %g7 | 74 | add %g7, %o0, %g7 |
70 | sra %g7, 0, %o0 | 75 | sra %g7, 0, %o0 |
71 | ATOMIC_POST_BARRIER | 76 | ATOMIC_POST_BARRIER |
72 | retl | 77 | retl |
73 | nop | 78 | nop |
79 | 2: BACKOFF_SPIN(%o2, %o3, 1b) | ||
74 | .size atomic_add_ret, .-atomic_add_ret | 80 | .size atomic_add_ret, .-atomic_add_ret |
75 | 81 | ||
76 | .globl atomic_sub_ret | 82 | .globl atomic_sub_ret |
77 | .type atomic_sub_ret,#function | 83 | .type atomic_sub_ret,#function |
78 | atomic_sub_ret: /* %o0 = decrement, %o1 = atomic_ptr */ | 84 | atomic_sub_ret: /* %o0 = decrement, %o1 = atomic_ptr */ |
85 | BACKOFF_SETUP(%o2) | ||
79 | ATOMIC_PRE_BARRIER | 86 | ATOMIC_PRE_BARRIER |
80 | 1: lduw [%o1], %g1 | 87 | 1: lduw [%o1], %g1 |
81 | sub %g1, %o0, %g7 | 88 | sub %g1, %o0, %g7 |
82 | cas [%o1], %g1, %g7 | 89 | cas [%o1], %g1, %g7 |
83 | cmp %g1, %g7 | 90 | cmp %g1, %g7 |
84 | bne,pn %icc, 1b | 91 | bne,pn %icc, 2f |
85 | sub %g7, %o0, %g7 | 92 | sub %g7, %o0, %g7 |
86 | sra %g7, 0, %o0 | 93 | sra %g7, 0, %o0 |
87 | ATOMIC_POST_BARRIER | 94 | ATOMIC_POST_BARRIER |
88 | retl | 95 | retl |
89 | nop | 96 | nop |
97 | 2: BACKOFF_SPIN(%o2, %o3, 1b) | ||
90 | .size atomic_sub_ret, .-atomic_sub_ret | 98 | .size atomic_sub_ret, .-atomic_sub_ret |
91 | 99 | ||
92 | .globl atomic64_add | 100 | .globl atomic64_add |
93 | .type atomic64_add,#function | 101 | .type atomic64_add,#function |
94 | atomic64_add: /* %o0 = increment, %o1 = atomic_ptr */ | 102 | atomic64_add: /* %o0 = increment, %o1 = atomic_ptr */ |
103 | BACKOFF_SETUP(%o2) | ||
95 | 1: ldx [%o1], %g1 | 104 | 1: ldx [%o1], %g1 |
96 | add %g1, %o0, %g7 | 105 | add %g1, %o0, %g7 |
97 | casx [%o1], %g1, %g7 | 106 | casx [%o1], %g1, %g7 |
98 | cmp %g1, %g7 | 107 | cmp %g1, %g7 |
99 | bne,pn %xcc, 1b | 108 | bne,pn %xcc, 2f |
100 | nop | 109 | nop |
101 | retl | 110 | retl |
102 | nop | 111 | nop |
112 | 2: BACKOFF_SPIN(%o2, %o3, 1b) | ||
103 | .size atomic64_add, .-atomic64_add | 113 | .size atomic64_add, .-atomic64_add |
104 | 114 | ||
105 | .globl atomic64_sub | 115 | .globl atomic64_sub |
106 | .type atomic64_sub,#function | 116 | .type atomic64_sub,#function |
107 | atomic64_sub: /* %o0 = decrement, %o1 = atomic_ptr */ | 117 | atomic64_sub: /* %o0 = decrement, %o1 = atomic_ptr */ |
118 | BACKOFF_SETUP(%o2) | ||
108 | 1: ldx [%o1], %g1 | 119 | 1: ldx [%o1], %g1 |
109 | sub %g1, %o0, %g7 | 120 | sub %g1, %o0, %g7 |
110 | casx [%o1], %g1, %g7 | 121 | casx [%o1], %g1, %g7 |
111 | cmp %g1, %g7 | 122 | cmp %g1, %g7 |
112 | bne,pn %xcc, 1b | 123 | bne,pn %xcc, 2f |
113 | nop | 124 | nop |
114 | retl | 125 | retl |
115 | nop | 126 | nop |
127 | 2: BACKOFF_SPIN(%o2, %o3, 1b) | ||
116 | .size atomic64_sub, .-atomic64_sub | 128 | .size atomic64_sub, .-atomic64_sub |
117 | 129 | ||
118 | .globl atomic64_add_ret | 130 | .globl atomic64_add_ret |
119 | .type atomic64_add_ret,#function | 131 | .type atomic64_add_ret,#function |
120 | atomic64_add_ret: /* %o0 = increment, %o1 = atomic_ptr */ | 132 | atomic64_add_ret: /* %o0 = increment, %o1 = atomic_ptr */ |
133 | BACKOFF_SETUP(%o2) | ||
121 | ATOMIC_PRE_BARRIER | 134 | ATOMIC_PRE_BARRIER |
122 | 1: ldx [%o1], %g1 | 135 | 1: ldx [%o1], %g1 |
123 | add %g1, %o0, %g7 | 136 | add %g1, %o0, %g7 |
124 | casx [%o1], %g1, %g7 | 137 | casx [%o1], %g1, %g7 |
125 | cmp %g1, %g7 | 138 | cmp %g1, %g7 |
126 | bne,pn %xcc, 1b | 139 | bne,pn %xcc, 2f |
127 | add %g7, %o0, %g7 | 140 | add %g7, %o0, %g7 |
128 | mov %g7, %o0 | 141 | mov %g7, %o0 |
129 | ATOMIC_POST_BARRIER | 142 | ATOMIC_POST_BARRIER |
130 | retl | 143 | retl |
131 | nop | 144 | nop |
145 | 2: BACKOFF_SPIN(%o2, %o3, 1b) | ||
132 | .size atomic64_add_ret, .-atomic64_add_ret | 146 | .size atomic64_add_ret, .-atomic64_add_ret |
133 | 147 | ||
134 | .globl atomic64_sub_ret | 148 | .globl atomic64_sub_ret |
135 | .type atomic64_sub_ret,#function | 149 | .type atomic64_sub_ret,#function |
136 | atomic64_sub_ret: /* %o0 = decrement, %o1 = atomic_ptr */ | 150 | atomic64_sub_ret: /* %o0 = decrement, %o1 = atomic_ptr */ |
151 | BACKOFF_SETUP(%o2) | ||
137 | ATOMIC_PRE_BARRIER | 152 | ATOMIC_PRE_BARRIER |
138 | 1: ldx [%o1], %g1 | 153 | 1: ldx [%o1], %g1 |
139 | sub %g1, %o0, %g7 | 154 | sub %g1, %o0, %g7 |
140 | casx [%o1], %g1, %g7 | 155 | casx [%o1], %g1, %g7 |
141 | cmp %g1, %g7 | 156 | cmp %g1, %g7 |
142 | bne,pn %xcc, 1b | 157 | bne,pn %xcc, 2f |
143 | sub %g7, %o0, %g7 | 158 | sub %g7, %o0, %g7 |
144 | mov %g7, %o0 | 159 | mov %g7, %o0 |
145 | ATOMIC_POST_BARRIER | 160 | ATOMIC_POST_BARRIER |
146 | retl | 161 | retl |
147 | nop | 162 | nop |
163 | 2: BACKOFF_SPIN(%o2, %o3, 1b) | ||
148 | .size atomic64_sub_ret, .-atomic64_sub_ret | 164 | .size atomic64_sub_ret, .-atomic64_sub_ret |
diff --git a/arch/sparc64/lib/bitops.S b/arch/sparc64/lib/bitops.S index 892431a82131..6b015a6eefb5 100644 --- a/arch/sparc64/lib/bitops.S +++ b/arch/sparc64/lib/bitops.S | |||
@@ -1,10 +1,10 @@ | |||
1 | /* $Id: bitops.S,v 1.3 2001/11/18 00:12:56 davem Exp $ | 1 | /* bitops.S: Sparc64 atomic bit operations. |
2 | * bitops.S: Sparc64 atomic bit operations. | ||
3 | * | 2 | * |
4 | * Copyright (C) 2000 David S. Miller (davem@redhat.com) | 3 | * Copyright (C) 2000, 2007 David S. Miller (davem@davemloft.net) |
5 | */ | 4 | */ |
6 | 5 | ||
7 | #include <asm/asi.h> | 6 | #include <asm/asi.h> |
7 | #include <asm/backoff.h> | ||
8 | 8 | ||
9 | .text | 9 | .text |
10 | 10 | ||
@@ -29,6 +29,7 @@ | |||
29 | .globl test_and_set_bit | 29 | .globl test_and_set_bit |
30 | .type test_and_set_bit,#function | 30 | .type test_and_set_bit,#function |
31 | test_and_set_bit: /* %o0=nr, %o1=addr */ | 31 | test_and_set_bit: /* %o0=nr, %o1=addr */ |
32 | BACKOFF_SETUP(%o3) | ||
32 | BITOP_PRE_BARRIER | 33 | BITOP_PRE_BARRIER |
33 | srlx %o0, 6, %g1 | 34 | srlx %o0, 6, %g1 |
34 | mov 1, %o2 | 35 | mov 1, %o2 |
@@ -40,18 +41,20 @@ test_and_set_bit: /* %o0=nr, %o1=addr */ | |||
40 | or %g7, %o2, %g1 | 41 | or %g7, %o2, %g1 |
41 | casx [%o1], %g7, %g1 | 42 | casx [%o1], %g7, %g1 |
42 | cmp %g7, %g1 | 43 | cmp %g7, %g1 |
43 | bne,pn %xcc, 1b | 44 | bne,pn %xcc, 2f |
44 | and %g7, %o2, %g2 | 45 | and %g7, %o2, %g2 |
45 | clr %o0 | 46 | clr %o0 |
46 | movrne %g2, 1, %o0 | 47 | movrne %g2, 1, %o0 |
47 | BITOP_POST_BARRIER | 48 | BITOP_POST_BARRIER |
48 | retl | 49 | retl |
49 | nop | 50 | nop |
51 | 2: BACKOFF_SPIN(%o3, %o4, 1b) | ||
50 | .size test_and_set_bit, .-test_and_set_bit | 52 | .size test_and_set_bit, .-test_and_set_bit |
51 | 53 | ||
52 | .globl test_and_clear_bit | 54 | .globl test_and_clear_bit |
53 | .type test_and_clear_bit,#function | 55 | .type test_and_clear_bit,#function |
54 | test_and_clear_bit: /* %o0=nr, %o1=addr */ | 56 | test_and_clear_bit: /* %o0=nr, %o1=addr */ |
57 | BACKOFF_SETUP(%o3) | ||
55 | BITOP_PRE_BARRIER | 58 | BITOP_PRE_BARRIER |
56 | srlx %o0, 6, %g1 | 59 | srlx %o0, 6, %g1 |
57 | mov 1, %o2 | 60 | mov 1, %o2 |
@@ -63,18 +66,20 @@ test_and_clear_bit: /* %o0=nr, %o1=addr */ | |||
63 | andn %g7, %o2, %g1 | 66 | andn %g7, %o2, %g1 |
64 | casx [%o1], %g7, %g1 | 67 | casx [%o1], %g7, %g1 |
65 | cmp %g7, %g1 | 68 | cmp %g7, %g1 |
66 | bne,pn %xcc, 1b | 69 | bne,pn %xcc, 2f |
67 | and %g7, %o2, %g2 | 70 | and %g7, %o2, %g2 |
68 | clr %o0 | 71 | clr %o0 |
69 | movrne %g2, 1, %o0 | 72 | movrne %g2, 1, %o0 |
70 | BITOP_POST_BARRIER | 73 | BITOP_POST_BARRIER |
71 | retl | 74 | retl |
72 | nop | 75 | nop |
76 | 2: BACKOFF_SPIN(%o3, %o4, 1b) | ||
73 | .size test_and_clear_bit, .-test_and_clear_bit | 77 | .size test_and_clear_bit, .-test_and_clear_bit |
74 | 78 | ||
75 | .globl test_and_change_bit | 79 | .globl test_and_change_bit |
76 | .type test_and_change_bit,#function | 80 | .type test_and_change_bit,#function |
77 | test_and_change_bit: /* %o0=nr, %o1=addr */ | 81 | test_and_change_bit: /* %o0=nr, %o1=addr */ |
82 | BACKOFF_SETUP(%o3) | ||
78 | BITOP_PRE_BARRIER | 83 | BITOP_PRE_BARRIER |
79 | srlx %o0, 6, %g1 | 84 | srlx %o0, 6, %g1 |
80 | mov 1, %o2 | 85 | mov 1, %o2 |
@@ -86,18 +91,20 @@ test_and_change_bit: /* %o0=nr, %o1=addr */ | |||
86 | xor %g7, %o2, %g1 | 91 | xor %g7, %o2, %g1 |
87 | casx [%o1], %g7, %g1 | 92 | casx [%o1], %g7, %g1 |
88 | cmp %g7, %g1 | 93 | cmp %g7, %g1 |
89 | bne,pn %xcc, 1b | 94 | bne,pn %xcc, 2f |
90 | and %g7, %o2, %g2 | 95 | and %g7, %o2, %g2 |
91 | clr %o0 | 96 | clr %o0 |
92 | movrne %g2, 1, %o0 | 97 | movrne %g2, 1, %o0 |
93 | BITOP_POST_BARRIER | 98 | BITOP_POST_BARRIER |
94 | retl | 99 | retl |
95 | nop | 100 | nop |
101 | 2: BACKOFF_SPIN(%o3, %o4, 1b) | ||
96 | .size test_and_change_bit, .-test_and_change_bit | 102 | .size test_and_change_bit, .-test_and_change_bit |
97 | 103 | ||
98 | .globl set_bit | 104 | .globl set_bit |
99 | .type set_bit,#function | 105 | .type set_bit,#function |
100 | set_bit: /* %o0=nr, %o1=addr */ | 106 | set_bit: /* %o0=nr, %o1=addr */ |
107 | BACKOFF_SETUP(%o3) | ||
101 | srlx %o0, 6, %g1 | 108 | srlx %o0, 6, %g1 |
102 | mov 1, %o2 | 109 | mov 1, %o2 |
103 | sllx %g1, 3, %g3 | 110 | sllx %g1, 3, %g3 |
@@ -108,15 +115,17 @@ set_bit: /* %o0=nr, %o1=addr */ | |||
108 | or %g7, %o2, %g1 | 115 | or %g7, %o2, %g1 |
109 | casx [%o1], %g7, %g1 | 116 | casx [%o1], %g7, %g1 |
110 | cmp %g7, %g1 | 117 | cmp %g7, %g1 |
111 | bne,pn %xcc, 1b | 118 | bne,pn %xcc, 2f |
112 | nop | 119 | nop |
113 | retl | 120 | retl |
114 | nop | 121 | nop |
122 | 2: BACKOFF_SPIN(%o3, %o4, 1b) | ||
115 | .size set_bit, .-set_bit | 123 | .size set_bit, .-set_bit |
116 | 124 | ||
117 | .globl clear_bit | 125 | .globl clear_bit |
118 | .type clear_bit,#function | 126 | .type clear_bit,#function |
119 | clear_bit: /* %o0=nr, %o1=addr */ | 127 | clear_bit: /* %o0=nr, %o1=addr */ |
128 | BACKOFF_SETUP(%o3) | ||
120 | srlx %o0, 6, %g1 | 129 | srlx %o0, 6, %g1 |
121 | mov 1, %o2 | 130 | mov 1, %o2 |
122 | sllx %g1, 3, %g3 | 131 | sllx %g1, 3, %g3 |
@@ -127,15 +136,17 @@ clear_bit: /* %o0=nr, %o1=addr */ | |||
127 | andn %g7, %o2, %g1 | 136 | andn %g7, %o2, %g1 |
128 | casx [%o1], %g7, %g1 | 137 | casx [%o1], %g7, %g1 |
129 | cmp %g7, %g1 | 138 | cmp %g7, %g1 |
130 | bne,pn %xcc, 1b | 139 | bne,pn %xcc, 2f |
131 | nop | 140 | nop |
132 | retl | 141 | retl |
133 | nop | 142 | nop |
143 | 2: BACKOFF_SPIN(%o3, %o4, 1b) | ||
134 | .size clear_bit, .-clear_bit | 144 | .size clear_bit, .-clear_bit |
135 | 145 | ||
136 | .globl change_bit | 146 | .globl change_bit |
137 | .type change_bit,#function | 147 | .type change_bit,#function |
138 | change_bit: /* %o0=nr, %o1=addr */ | 148 | change_bit: /* %o0=nr, %o1=addr */ |
149 | BACKOFF_SETUP(%o3) | ||
139 | srlx %o0, 6, %g1 | 150 | srlx %o0, 6, %g1 |
140 | mov 1, %o2 | 151 | mov 1, %o2 |
141 | sllx %g1, 3, %g3 | 152 | sllx %g1, 3, %g3 |
@@ -146,8 +157,9 @@ change_bit: /* %o0=nr, %o1=addr */ | |||
146 | xor %g7, %o2, %g1 | 157 | xor %g7, %o2, %g1 |
147 | casx [%o1], %g7, %g1 | 158 | casx [%o1], %g7, %g1 |
148 | cmp %g7, %g1 | 159 | cmp %g7, %g1 |
149 | bne,pn %xcc, 1b | 160 | bne,pn %xcc, 2f |
150 | nop | 161 | nop |
151 | retl | 162 | retl |
152 | nop | 163 | nop |
164 | 2: BACKOFF_SPIN(%o3, %o4, 1b) | ||
153 | .size change_bit, .-change_bit | 165 | .size change_bit, .-change_bit |
diff --git a/arch/sparc64/oprofile/Kconfig b/arch/sparc64/oprofile/Kconfig deleted file mode 100644 index d8a84088471a..000000000000 --- a/arch/sparc64/oprofile/Kconfig +++ /dev/null | |||
@@ -1,17 +0,0 @@ | |||
1 | config PROFILING | ||
2 | bool "Profiling support (EXPERIMENTAL)" | ||
3 | help | ||
4 | Say Y here to enable the extended profiling support mechanisms used | ||
5 | by profilers such as OProfile. | ||
6 | |||
7 | |||
8 | config OPROFILE | ||
9 | tristate "OProfile system profiling (EXPERIMENTAL)" | ||
10 | depends on PROFILING | ||
11 | help | ||
12 | OProfile is a profiling system capable of profiling the | ||
13 | whole system, include the kernel, kernel modules, libraries, | ||
14 | and applications. | ||
15 | |||
16 | If unsure, say N. | ||
17 | |||
diff --git a/arch/sparc64/solaris/misc.c b/arch/sparc64/solaris/misc.c index 3b67de7455f1..c86cb3091a8e 100644 --- a/arch/sparc64/solaris/misc.c +++ b/arch/sparc64/solaris/misc.c | |||
@@ -415,7 +415,7 @@ asmlinkage int solaris_procids(int cmd, s32 pid, s32 pgid) | |||
415 | 415 | ||
416 | switch (cmd) { | 416 | switch (cmd) { |
417 | case 0: /* getpgrp */ | 417 | case 0: /* getpgrp */ |
418 | return process_group(current); | 418 | return task_pgrp_nr(current); |
419 | case 1: /* setpgrp */ | 419 | case 1: /* setpgrp */ |
420 | { | 420 | { |
421 | int (*sys_setpgid)(pid_t,pid_t) = | 421 | int (*sys_setpgid)(pid_t,pid_t) = |
@@ -426,7 +426,7 @@ asmlinkage int solaris_procids(int cmd, s32 pid, s32 pgid) | |||
426 | ret = sys_setpgid(0, 0); | 426 | ret = sys_setpgid(0, 0); |
427 | if (ret) return ret; | 427 | if (ret) return ret; |
428 | proc_clear_tty(current); | 428 | proc_clear_tty(current); |
429 | return process_group(current); | 429 | return task_pgrp_nr(current); |
430 | } | 430 | } |
431 | case 2: /* getsid */ | 431 | case 2: /* getsid */ |
432 | { | 432 | { |
diff --git a/arch/um/Kconfig b/arch/um/Kconfig index 740d8a922e48..dd1689b814cb 100644 --- a/arch/um/Kconfig +++ b/arch/um/Kconfig | |||
@@ -3,7 +3,7 @@ config DEFCONFIG_LIST | |||
3 | option defconfig_list | 3 | option defconfig_list |
4 | default "arch/$ARCH/defconfig" | 4 | default "arch/$ARCH/defconfig" |
5 | 5 | ||
6 | # UML uses the generic IRQ sugsystem | 6 | # UML uses the generic IRQ subsystem |
7 | config GENERIC_HARDIRQS | 7 | config GENERIC_HARDIRQS |
8 | bool | 8 | bool |
9 | default y | 9 | default y |
@@ -289,4 +289,6 @@ config INPUT | |||
289 | bool | 289 | bool |
290 | default n | 290 | default n |
291 | 291 | ||
292 | source "kernel/Kconfig.instrumentation" | ||
293 | |||
292 | source "arch/um/Kconfig.debug" | 294 | source "arch/um/Kconfig.debug" |
diff --git a/arch/um/drivers/line.c b/arch/um/drivers/line.c index 76fe0b0da996..83bf15a3dda8 100644 --- a/arch/um/drivers/line.c +++ b/arch/um/drivers/line.c | |||
@@ -35,7 +35,7 @@ static void line_timer_cb(struct work_struct *work) | |||
35 | /* | 35 | /* |
36 | * Returns the free space inside the ring buffer of this line. | 36 | * Returns the free space inside the ring buffer of this line. |
37 | * | 37 | * |
38 | * Should be called while holding line->lock (this does not modify datas). | 38 | * Should be called while holding line->lock (this does not modify data). |
39 | */ | 39 | */ |
40 | static int write_room(struct line *line) | 40 | static int write_room(struct line *line) |
41 | { | 41 | { |
diff --git a/arch/um/drivers/null.c b/arch/um/drivers/null.c index 21ad3d7932b3..2b45a1446c86 100644 --- a/arch/um/drivers/null.c +++ b/arch/um/drivers/null.c | |||
@@ -9,7 +9,7 @@ | |||
9 | #include "chan_user.h" | 9 | #include "chan_user.h" |
10 | #include "os.h" | 10 | #include "os.h" |
11 | 11 | ||
12 | /* This address is used only as a unique identifer */ | 12 | /* This address is used only as a unique identifier */ |
13 | static int null_chan; | 13 | static int null_chan; |
14 | 14 | ||
15 | static void *null_init(char *str, int device, const struct chan_opts *opts) | 15 | static void *null_init(char *str, int device, const struct chan_opts *opts) |
diff --git a/arch/um/drivers/slip_kern.c b/arch/um/drivers/slip_kern.c index ae67e7158e71..6b4a0f9e38de 100644 --- a/arch/um/drivers/slip_kern.c +++ b/arch/um/drivers/slip_kern.c | |||
@@ -31,10 +31,8 @@ void slip_init(struct net_device *dev, void *data) | |||
31 | slip_proto_init(&spri->slip); | 31 | slip_proto_init(&spri->slip); |
32 | 32 | ||
33 | dev->init = NULL; | 33 | dev->init = NULL; |
34 | dev->header_cache_update = NULL; | ||
35 | dev->hard_header_cache = NULL; | ||
36 | dev->hard_header = NULL; | ||
37 | dev->hard_header_len = 0; | 34 | dev->hard_header_len = 0; |
35 | dev->header_ops = NULL; | ||
38 | dev->addr_len = 0; | 36 | dev->addr_len = 0; |
39 | dev->type = ARPHRD_SLIP; | 37 | dev->type = ARPHRD_SLIP; |
40 | dev->tx_queue_len = 256; | 38 | dev->tx_queue_len = 256; |
diff --git a/arch/um/drivers/slirp_kern.c b/arch/um/drivers/slirp_kern.c index 240ee650865d..d987af277db9 100644 --- a/arch/um/drivers/slirp_kern.c +++ b/arch/um/drivers/slirp_kern.c | |||
@@ -34,9 +34,7 @@ void slirp_init(struct net_device *dev, void *data) | |||
34 | 34 | ||
35 | dev->init = NULL; | 35 | dev->init = NULL; |
36 | dev->hard_header_len = 0; | 36 | dev->hard_header_len = 0; |
37 | dev->header_cache_update = NULL; | 37 | dev->header_ops = NULL; |
38 | dev->hard_header_cache = NULL; | ||
39 | dev->hard_header = NULL; | ||
40 | dev->addr_len = 0; | 38 | dev->addr_len = 0; |
41 | dev->type = ARPHRD_SLIP; | 39 | dev->type = ARPHRD_SLIP; |
42 | dev->tx_queue_len = 256; | 40 | dev->tx_queue_len = 256; |
diff --git a/arch/um/drivers/stderr_console.c b/arch/um/drivers/stderr_console.c index 4739dd527b43..d07a97f8b994 100644 --- a/arch/um/drivers/stderr_console.c +++ b/arch/um/drivers/stderr_console.c | |||
@@ -8,7 +8,7 @@ | |||
8 | /* trivial console driver -- simply dump everything to stderr */ | 8 | /* trivial console driver -- simply dump everything to stderr */ |
9 | 9 | ||
10 | /* | 10 | /* |
11 | * Don't register by default -- as this registeres very early in the | 11 | * Don't register by default -- as this registers very early in the |
12 | * boot process it becomes the default console. | 12 | * boot process it becomes the default console. |
13 | * | 13 | * |
14 | * Initialized at init time. | 14 | * Initialized at init time. |
diff --git a/arch/um/kernel/gmon_syms.c b/arch/um/kernel/gmon_syms.c index 13aa115cd1b4..734f873cab12 100644 --- a/arch/um/kernel/gmon_syms.c +++ b/arch/um/kernel/gmon_syms.c | |||
@@ -12,8 +12,8 @@ EXPORT_SYMBOL(__bb_init_func); | |||
12 | * versions in libgcov. | 12 | * versions in libgcov. |
13 | * | 13 | * |
14 | * Since SuSE backported the fix, we cannot handle it depending on GCC version. | 14 | * Since SuSE backported the fix, we cannot handle it depending on GCC version. |
15 | * So, unconditinally export it. But also give it a weak declaration, which will | 15 | * So, unconditionally export it. But also give it a weak declaration, which will |
16 | * be overriden by any other one. | 16 | * be overridden by any other one. |
17 | */ | 17 | */ |
18 | 18 | ||
19 | extern void __gcov_init(void *) __attribute__((weak)); | 19 | extern void __gcov_init(void *) __attribute__((weak)); |
diff --git a/arch/um/kernel/irq.c b/arch/um/kernel/irq.c index 277fce17b088..70c2d625b070 100644 --- a/arch/um/kernel/irq.c +++ b/arch/um/kernel/irq.c | |||
@@ -326,7 +326,7 @@ int deactivate_all_fds(void) | |||
326 | } | 326 | } |
327 | 327 | ||
328 | /* | 328 | /* |
329 | * do_IRQ handles all normal device IRQ's (the special | 329 | * do_IRQ handles all normal device IRQs (the special |
330 | * SMP cross-CPU interrupts have their own specific | 330 | * SMP cross-CPU interrupts have their own specific |
331 | * handlers). | 331 | * handlers). |
332 | */ | 332 | */ |
diff --git a/arch/um/kernel/ptrace.c b/arch/um/kernel/ptrace.c index a0eba0833068..47b57b497d55 100644 --- a/arch/um/kernel/ptrace.c +++ b/arch/um/kernel/ptrace.c | |||
@@ -237,7 +237,7 @@ void send_sigtrap(struct task_struct *tsk, struct uml_pt_regs *regs, | |||
237 | /* User-mode eip? */ | 237 | /* User-mode eip? */ |
238 | info.si_addr = UPT_IS_USER(regs) ? (void __user *) UPT_IP(regs) : NULL; | 238 | info.si_addr = UPT_IS_USER(regs) ? (void __user *) UPT_IP(regs) : NULL; |
239 | 239 | ||
240 | /* Send us the fakey SIGTRAP */ | 240 | /* Send us the fake SIGTRAP */ |
241 | force_sig_info(SIGTRAP, &info, tsk); | 241 | force_sig_info(SIGTRAP, &info, tsk); |
242 | } | 242 | } |
243 | 243 | ||
diff --git a/arch/um/kernel/trap.c b/arch/um/kernel/trap.c index bd060551e619..cb3321f8e0a9 100644 --- a/arch/um/kernel/trap.c +++ b/arch/um/kernel/trap.c | |||
@@ -108,7 +108,7 @@ out_nosemaphore: | |||
108 | * us unable to handle the page fault gracefully. | 108 | * us unable to handle the page fault gracefully. |
109 | */ | 109 | */ |
110 | out_of_memory: | 110 | out_of_memory: |
111 | if (is_init(current)) { | 111 | if (is_global_init(current)) { |
112 | up_read(&mm->mmap_sem); | 112 | up_read(&mm->mmap_sem); |
113 | yield(); | 113 | yield(); |
114 | down_read(&mm->mmap_sem); | 114 | down_read(&mm->mmap_sem); |
diff --git a/arch/um/sys-i386/bug.c b/arch/um/sys-i386/bug.c index 200c8ba2879b..a4360b5207db 100644 --- a/arch/um/sys-i386/bug.c +++ b/arch/um/sys-i386/bug.c | |||
@@ -6,7 +6,7 @@ | |||
6 | #include <linux/uaccess.h> | 6 | #include <linux/uaccess.h> |
7 | 7 | ||
8 | /* Mostly copied from i386/x86_86 - eliminated the eip < PAGE_OFFSET because | 8 | /* Mostly copied from i386/x86_86 - eliminated the eip < PAGE_OFFSET because |
9 | * that's not relevent in skas mode. | 9 | * that's not relevant in skas mode. |
10 | */ | 10 | */ |
11 | 11 | ||
12 | int is_valid_bugaddr(unsigned long eip) | 12 | int is_valid_bugaddr(unsigned long eip) |
diff --git a/arch/um/sys-i386/tls.c b/arch/um/sys-i386/tls.c index b02266ab5c55..fcaff86b000c 100644 --- a/arch/um/sys-i386/tls.c +++ b/arch/um/sys-i386/tls.c | |||
@@ -45,7 +45,7 @@ int do_get_thread_area(struct user_desc *info) | |||
45 | * XXX: Consider leaving one free slot for glibc usage at first place. This must | 45 | * XXX: Consider leaving one free slot for glibc usage at first place. This must |
46 | * be done here (and by changing GDT_ENTRY_TLS_* macros) and nowhere else. | 46 | * be done here (and by changing GDT_ENTRY_TLS_* macros) and nowhere else. |
47 | * | 47 | * |
48 | * Also, this must be tested when compiling in SKAS mode with dinamic linking | 48 | * Also, this must be tested when compiling in SKAS mode with dynamic linking |
49 | * and running against NPTL. | 49 | * and running against NPTL. |
50 | */ | 50 | */ |
51 | static int get_free_idx(struct task_struct* task) | 51 | static int get_free_idx(struct task_struct* task) |
diff --git a/arch/um/sys-x86_64/bug.c b/arch/um/sys-x86_64/bug.c index 200c8ba2879b..a4360b5207db 100644 --- a/arch/um/sys-x86_64/bug.c +++ b/arch/um/sys-x86_64/bug.c | |||
@@ -6,7 +6,7 @@ | |||
6 | #include <linux/uaccess.h> | 6 | #include <linux/uaccess.h> |
7 | 7 | ||
8 | /* Mostly copied from i386/x86_86 - eliminated the eip < PAGE_OFFSET because | 8 | /* Mostly copied from i386/x86_86 - eliminated the eip < PAGE_OFFSET because |
9 | * that's not relevent in skas mode. | 9 | * that's not relevant in skas mode. |
10 | */ | 10 | */ |
11 | 11 | ||
12 | int is_valid_bugaddr(unsigned long eip) | 12 | int is_valid_bugaddr(unsigned long eip) |
diff --git a/arch/um/sys-x86_64/sysrq.c b/arch/um/sys-x86_64/sysrq.c index ce3e07fcf283..765444031819 100644 --- a/arch/um/sys-x86_64/sysrq.c +++ b/arch/um/sys-x86_64/sysrq.c | |||
@@ -15,8 +15,8 @@ void __show_regs(struct pt_regs * regs) | |||
15 | { | 15 | { |
16 | printk("\n"); | 16 | printk("\n"); |
17 | print_modules(); | 17 | print_modules(); |
18 | printk("Pid: %d, comm: %.20s %s %s\n", | 18 | printk("Pid: %d, comm: %.20s %s %s\n", task_pid_nr(current), |
19 | current->pid, current->comm, print_tainted(), init_utsname()->release); | 19 | current->comm, print_tainted(), init_utsname()->release); |
20 | printk("RIP: %04lx:[<%016lx>] ", PT_REGS_CS(regs) & 0xffff, | 20 | printk("RIP: %04lx:[<%016lx>] ", PT_REGS_CS(regs) & 0xffff, |
21 | PT_REGS_RIP(regs)); | 21 | PT_REGS_RIP(regs)); |
22 | printk("\nRSP: %016lx EFLAGS: %08lx\n", PT_REGS_RSP(regs), | 22 | printk("\nRSP: %016lx EFLAGS: %08lx\n", PT_REGS_RSP(regs), |
diff --git a/arch/v850/Kconfig b/arch/v850/Kconfig index ace479ab273f..b6a50b8b38de 100644 --- a/arch/v850/Kconfig +++ b/arch/v850/Kconfig | |||
@@ -331,6 +331,8 @@ source "sound/Kconfig" | |||
331 | 331 | ||
332 | source "drivers/usb/Kconfig" | 332 | source "drivers/usb/Kconfig" |
333 | 333 | ||
334 | source "kernel/Kconfig.instrumentation" | ||
335 | |||
334 | source "arch/v850/Kconfig.debug" | 336 | source "arch/v850/Kconfig.debug" |
335 | 337 | ||
336 | source "security/Kconfig" | 338 | source "security/Kconfig" |
diff --git a/arch/v850/kernel/me2.c b/arch/v850/kernel/me2.c index 38be5c194f6b..007115dc9ce0 100644 --- a/arch/v850/kernel/me2.c +++ b/arch/v850/kernel/me2.c | |||
@@ -58,13 +58,13 @@ void __init me2_init_irqs (void) | |||
58 | void me2_uart_pre_configure (unsigned chan, unsigned cflags, unsigned baud) | 58 | void me2_uart_pre_configure (unsigned chan, unsigned cflags, unsigned baud) |
59 | { | 59 | { |
60 | if (chan == 0) { | 60 | if (chan == 0) { |
61 | /* Specify that the relevent pins on the chip should do | 61 | /* Specify that the relevant pins on the chip should do |
62 | serial I/O, not direct I/O. */ | 62 | serial I/O, not direct I/O. */ |
63 | ME2_PORT1_PMC |= 0xC; | 63 | ME2_PORT1_PMC |= 0xC; |
64 | /* Specify that we're using the UART, not the CSI device. */ | 64 | /* Specify that we're using the UART, not the CSI device. */ |
65 | ME2_PORT1_PFC |= 0xC; | 65 | ME2_PORT1_PFC |= 0xC; |
66 | } else if (chan == 1) { | 66 | } else if (chan == 1) { |
67 | /* Specify that the relevent pins on the chip should do | 67 | /* Specify that the relevant pins on the chip should do |
68 | serial I/O, not direct I/O. */ | 68 | serial I/O, not direct I/O. */ |
69 | ME2_PORT2_PMC |= 0x6; | 69 | ME2_PORT2_PMC |= 0x6; |
70 | /* Specify that we're using the UART, not the CSI device. */ | 70 | /* Specify that we're using the UART, not the CSI device. */ |
diff --git a/arch/v850/kernel/rte_mb_a_pci.c b/arch/v850/kernel/rte_mb_a_pci.c index 35a4bd5515cb..7165478824e7 100644 --- a/arch/v850/kernel/rte_mb_a_pci.c +++ b/arch/v850/kernel/rte_mb_a_pci.c | |||
@@ -179,7 +179,7 @@ static int __devinit pcibios_init (void) | |||
179 | default uses. */ | 179 | default uses. */ |
180 | 180 | ||
181 | /* Significant address bits used for decoding PCI GCS5 space | 181 | /* Significant address bits used for decoding PCI GCS5 space |
182 | accessess. */ | 182 | accesses. */ |
183 | MB_A_PCI_DMRR = ~(MB_A_PCI_MEM_SIZE - 1); | 183 | MB_A_PCI_DMRR = ~(MB_A_PCI_MEM_SIZE - 1); |
184 | 184 | ||
185 | /* I don't understand this, but the SolutionGear example code | 185 | /* I don't understand this, but the SolutionGear example code |
@@ -775,7 +775,7 @@ pci_alloc_consistent (struct pci_dev *pdev, size_t size, dma_addr_t *dma_addr) | |||
775 | /* Free and unmap a consistent DMA buffer. CPU_ADDR and DMA_ADDR must | 775 | /* Free and unmap a consistent DMA buffer. CPU_ADDR and DMA_ADDR must |
776 | be values that were returned from pci_alloc_consistent. SIZE must be | 776 | be values that were returned from pci_alloc_consistent. SIZE must be |
777 | the same as what as passed into pci_alloc_consistent. References to | 777 | the same as what as passed into pci_alloc_consistent. References to |
778 | the memory and mappings assosciated with CPU_ADDR or DMA_ADDR past | 778 | the memory and mappings associated with CPU_ADDR or DMA_ADDR past |
779 | this call are illegal. */ | 779 | this call are illegal. */ |
780 | void | 780 | void |
781 | pci_free_consistent (struct pci_dev *pdev, size_t size, void *cpu_addr, | 781 | pci_free_consistent (struct pci_dev *pdev, size_t size, void *cpu_addr, |
diff --git a/arch/x86/boot/compressed/misc_32.c b/arch/x86/boot/compressed/misc_32.c index b28505c544c9..1dc1e19c0a9f 100644 --- a/arch/x86/boot/compressed/misc_32.c +++ b/arch/x86/boot/compressed/misc_32.c | |||
@@ -25,7 +25,7 @@ | |||
25 | 25 | ||
26 | /* | 26 | /* |
27 | * Getting to provable safe in place decompression is hard. | 27 | * Getting to provable safe in place decompression is hard. |
28 | * Worst case behaviours need to be analized. | 28 | * Worst case behaviours need to be analyzed. |
29 | * Background information: | 29 | * Background information: |
30 | * | 30 | * |
31 | * The file layout is: | 31 | * The file layout is: |
@@ -94,7 +94,7 @@ | |||
94 | * Adding 32768 instead of 32767 just makes for round numbers. | 94 | * Adding 32768 instead of 32767 just makes for round numbers. |
95 | * Adding the decompressor_size is necessary as it musht live after all | 95 | * Adding the decompressor_size is necessary as it musht live after all |
96 | * of the data as well. Last I measured the decompressor is about 14K. | 96 | * of the data as well. Last I measured the decompressor is about 14K. |
97 | * 10K of actuall data and 4K of bss. | 97 | * 10K of actual data and 4K of bss. |
98 | * | 98 | * |
99 | */ | 99 | */ |
100 | 100 | ||
diff --git a/arch/x86/boot/compressed/misc_64.c b/arch/x86/boot/compressed/misc_64.c index f932b0e89096..6ea015aa65e4 100644 --- a/arch/x86/boot/compressed/misc_64.c +++ b/arch/x86/boot/compressed/misc_64.c | |||
@@ -25,7 +25,7 @@ | |||
25 | 25 | ||
26 | /* | 26 | /* |
27 | * Getting to provable safe in place decompression is hard. | 27 | * Getting to provable safe in place decompression is hard. |
28 | * Worst case behaviours need to be analized. | 28 | * Worst case behaviours need to be analyzed. |
29 | * Background information: | 29 | * Background information: |
30 | * | 30 | * |
31 | * The file layout is: | 31 | * The file layout is: |
@@ -94,7 +94,7 @@ | |||
94 | * Adding 32768 instead of 32767 just makes for round numbers. | 94 | * Adding 32768 instead of 32767 just makes for round numbers. |
95 | * Adding the decompressor_size is necessary as it musht live after all | 95 | * Adding the decompressor_size is necessary as it musht live after all |
96 | * of the data as well. Last I measured the decompressor is about 14K. | 96 | * of the data as well. Last I measured the decompressor is about 14K. |
97 | * 10K of actuall data and 4K of bss. | 97 | * 10K of actual data and 4K of bss. |
98 | * | 98 | * |
99 | */ | 99 | */ |
100 | 100 | ||
diff --git a/arch/x86/ia32/ia32_binfmt.c b/arch/x86/ia32/ia32_binfmt.c index 118b9f9ff499..55822d2cf053 100644 --- a/arch/x86/ia32/ia32_binfmt.c +++ b/arch/x86/ia32/ia32_binfmt.c | |||
@@ -5,10 +5,6 @@ | |||
5 | * This tricks binfmt_elf.c into loading 32bit binaries using lots | 5 | * This tricks binfmt_elf.c into loading 32bit binaries using lots |
6 | * of ugly preprocessor tricks. Talk about very very poor man's inheritance. | 6 | * of ugly preprocessor tricks. Talk about very very poor man's inheritance. |
7 | */ | 7 | */ |
8 | #define __ASM_X86_64_ELF_H 1 | ||
9 | |||
10 | #undef ELF_CLASS | ||
11 | #define ELF_CLASS ELFCLASS32 | ||
12 | 8 | ||
13 | #include <linux/types.h> | 9 | #include <linux/types.h> |
14 | #include <linux/stddef.h> | 10 | #include <linux/stddef.h> |
@@ -19,6 +15,7 @@ | |||
19 | #include <linux/binfmts.h> | 15 | #include <linux/binfmts.h> |
20 | #include <linux/mm.h> | 16 | #include <linux/mm.h> |
21 | #include <linux/security.h> | 17 | #include <linux/security.h> |
18 | #include <linux/elfcore-compat.h> | ||
22 | 19 | ||
23 | #include <asm/segment.h> | 20 | #include <asm/segment.h> |
24 | #include <asm/ptrace.h> | 21 | #include <asm/ptrace.h> |
@@ -31,6 +28,20 @@ | |||
31 | #include <asm/ia32.h> | 28 | #include <asm/ia32.h> |
32 | #include <asm/vsyscall32.h> | 29 | #include <asm/vsyscall32.h> |
33 | 30 | ||
31 | #undef ELF_ARCH | ||
32 | #undef ELF_CLASS | ||
33 | #define ELF_CLASS ELFCLASS32 | ||
34 | #define ELF_ARCH EM_386 | ||
35 | |||
36 | #undef elfhdr | ||
37 | #undef elf_phdr | ||
38 | #undef elf_note | ||
39 | #undef elf_addr_t | ||
40 | #define elfhdr elf32_hdr | ||
41 | #define elf_phdr elf32_phdr | ||
42 | #define elf_note elf32_note | ||
43 | #define elf_addr_t Elf32_Off | ||
44 | |||
34 | #define ELF_NAME "elf/i386" | 45 | #define ELF_NAME "elf/i386" |
35 | 46 | ||
36 | #define AT_SYSINFO 32 | 47 | #define AT_SYSINFO 32 |
@@ -48,74 +59,20 @@ int sysctl_vsyscall32 = 1; | |||
48 | } while(0) | 59 | } while(0) |
49 | 60 | ||
50 | struct file; | 61 | struct file; |
51 | struct elf_phdr; | ||
52 | 62 | ||
53 | #define IA32_EMULATOR 1 | 63 | #define IA32_EMULATOR 1 |
54 | 64 | ||
55 | #define ELF_ET_DYN_BASE (TASK_UNMAPPED_BASE + 0x1000000) | 65 | #undef ELF_ET_DYN_BASE |
56 | |||
57 | #undef ELF_ARCH | ||
58 | #define ELF_ARCH EM_386 | ||
59 | |||
60 | #define ELF_DATA ELFDATA2LSB | ||
61 | 66 | ||
62 | #define USE_ELF_CORE_DUMP 1 | 67 | #define ELF_ET_DYN_BASE (TASK_UNMAPPED_BASE + 0x1000000) |
63 | |||
64 | /* Override elfcore.h */ | ||
65 | #define _LINUX_ELFCORE_H 1 | ||
66 | typedef unsigned int elf_greg_t; | ||
67 | |||
68 | #define ELF_NGREG (sizeof (struct user_regs_struct32) / sizeof(elf_greg_t)) | ||
69 | typedef elf_greg_t elf_gregset_t[ELF_NGREG]; | ||
70 | |||
71 | struct elf_siginfo | ||
72 | { | ||
73 | int si_signo; /* signal number */ | ||
74 | int si_code; /* extra code */ | ||
75 | int si_errno; /* errno */ | ||
76 | }; | ||
77 | 68 | ||
78 | #define jiffies_to_timeval(a,b) do { (b)->tv_usec = 0; (b)->tv_sec = (a)/HZ; }while(0) | 69 | #define jiffies_to_timeval(a,b) do { (b)->tv_usec = 0; (b)->tv_sec = (a)/HZ; }while(0) |
79 | 70 | ||
80 | struct elf_prstatus | ||
81 | { | ||
82 | struct elf_siginfo pr_info; /* Info associated with signal */ | ||
83 | short pr_cursig; /* Current signal */ | ||
84 | unsigned int pr_sigpend; /* Set of pending signals */ | ||
85 | unsigned int pr_sighold; /* Set of held signals */ | ||
86 | pid_t pr_pid; | ||
87 | pid_t pr_ppid; | ||
88 | pid_t pr_pgrp; | ||
89 | pid_t pr_sid; | ||
90 | struct compat_timeval pr_utime; /* User time */ | ||
91 | struct compat_timeval pr_stime; /* System time */ | ||
92 | struct compat_timeval pr_cutime; /* Cumulative user time */ | ||
93 | struct compat_timeval pr_cstime; /* Cumulative system time */ | ||
94 | elf_gregset_t pr_reg; /* GP registers */ | ||
95 | int pr_fpvalid; /* True if math co-processor being used. */ | ||
96 | }; | ||
97 | |||
98 | #define ELF_PRARGSZ (80) /* Number of chars for args */ | ||
99 | |||
100 | struct elf_prpsinfo | ||
101 | { | ||
102 | char pr_state; /* numeric process state */ | ||
103 | char pr_sname; /* char for pr_state */ | ||
104 | char pr_zomb; /* zombie */ | ||
105 | char pr_nice; /* nice val */ | ||
106 | unsigned int pr_flag; /* flags */ | ||
107 | __u16 pr_uid; | ||
108 | __u16 pr_gid; | ||
109 | pid_t pr_pid, pr_ppid, pr_pgrp, pr_sid; | ||
110 | /* Lots missing */ | ||
111 | char pr_fname[16]; /* filename of executable */ | ||
112 | char pr_psargs[ELF_PRARGSZ]; /* initial part of arg list */ | ||
113 | }; | ||
114 | |||
115 | #define _GET_SEG(x) \ | 71 | #define _GET_SEG(x) \ |
116 | ({ __u32 seg; asm("movl %%" __stringify(x) ",%0" : "=r"(seg)); seg; }) | 72 | ({ __u32 seg; asm("movl %%" __stringify(x) ",%0" : "=r"(seg)); seg; }) |
117 | 73 | ||
118 | /* Assumes current==process to be dumped */ | 74 | /* Assumes current==process to be dumped */ |
75 | #undef ELF_CORE_COPY_REGS | ||
119 | #define ELF_CORE_COPY_REGS(pr_reg, regs) \ | 76 | #define ELF_CORE_COPY_REGS(pr_reg, regs) \ |
120 | pr_reg[0] = regs->rbx; \ | 77 | pr_reg[0] = regs->rbx; \ |
121 | pr_reg[1] = regs->rcx; \ | 78 | pr_reg[1] = regs->rcx; \ |
@@ -135,36 +92,41 @@ struct elf_prpsinfo | |||
135 | pr_reg[15] = regs->rsp; \ | 92 | pr_reg[15] = regs->rsp; \ |
136 | pr_reg[16] = regs->ss; | 93 | pr_reg[16] = regs->ss; |
137 | 94 | ||
138 | #define user user32 | 95 | |
96 | #define elf_prstatus compat_elf_prstatus | ||
97 | #define elf_prpsinfo compat_elf_prpsinfo | ||
98 | #define elf_fpregset_t struct user_i387_ia32_struct | ||
99 | #define elf_fpxregset_t struct user32_fxsr_struct | ||
100 | #define user user32 | ||
139 | 101 | ||
140 | #undef elf_read_implies_exec | 102 | #undef elf_read_implies_exec |
141 | #define elf_read_implies_exec(ex, executable_stack) (executable_stack != EXSTACK_DISABLE_X) | 103 | #define elf_read_implies_exec(ex, executable_stack) (executable_stack != EXSTACK_DISABLE_X) |
142 | //#include <asm/ia32.h> | ||
143 | #include <linux/elf.h> | ||
144 | |||
145 | typedef struct user_i387_ia32_struct elf_fpregset_t; | ||
146 | typedef struct user32_fxsr_struct elf_fpxregset_t; | ||
147 | |||
148 | 104 | ||
149 | static inline void elf_core_copy_regs(elf_gregset_t *elfregs, struct pt_regs *regs) | 105 | #define elf_core_copy_regs elf32_core_copy_regs |
106 | static inline void elf32_core_copy_regs(compat_elf_gregset_t *elfregs, | ||
107 | struct pt_regs *regs) | ||
150 | { | 108 | { |
151 | ELF_CORE_COPY_REGS((*elfregs), regs) | 109 | ELF_CORE_COPY_REGS((&elfregs->ebx), regs) |
152 | } | 110 | } |
153 | 111 | ||
154 | static inline int elf_core_copy_task_regs(struct task_struct *t, elf_gregset_t* elfregs) | 112 | #define elf_core_copy_task_regs elf32_core_copy_task_regs |
113 | static inline int elf32_core_copy_task_regs(struct task_struct *t, | ||
114 | compat_elf_gregset_t* elfregs) | ||
155 | { | 115 | { |
156 | struct pt_regs *pp = task_pt_regs(t); | 116 | struct pt_regs *pp = task_pt_regs(t); |
157 | ELF_CORE_COPY_REGS((*elfregs), pp); | 117 | ELF_CORE_COPY_REGS((&elfregs->ebx), pp); |
158 | /* fix wrong segments */ | 118 | /* fix wrong segments */ |
159 | (*elfregs)[7] = t->thread.ds; | 119 | elfregs->ds = t->thread.ds; |
160 | (*elfregs)[9] = t->thread.fsindex; | 120 | elfregs->fs = t->thread.fsindex; |
161 | (*elfregs)[10] = t->thread.gsindex; | 121 | elfregs->gs = t->thread.gsindex; |
162 | (*elfregs)[8] = t->thread.es; | 122 | elfregs->es = t->thread.es; |
163 | return 1; | 123 | return 1; |
164 | } | 124 | } |
165 | 125 | ||
126 | #define elf_core_copy_task_fpregs elf32_core_copy_task_fpregs | ||
166 | static inline int | 127 | static inline int |
167 | elf_core_copy_task_fpregs(struct task_struct *tsk, struct pt_regs *regs, elf_fpregset_t *fpu) | 128 | elf32_core_copy_task_fpregs(struct task_struct *tsk, struct pt_regs *regs, |
129 | elf_fpregset_t *fpu) | ||
168 | { | 130 | { |
169 | struct _fpstate_ia32 *fpstate = (void*)fpu; | 131 | struct _fpstate_ia32 *fpstate = (void*)fpu; |
170 | mm_segment_t oldfs = get_fs(); | 132 | mm_segment_t oldfs = get_fs(); |
@@ -186,8 +148,9 @@ elf_core_copy_task_fpregs(struct task_struct *tsk, struct pt_regs *regs, elf_fpr | |||
186 | 148 | ||
187 | #define ELF_CORE_COPY_XFPREGS 1 | 149 | #define ELF_CORE_COPY_XFPREGS 1 |
188 | #define ELF_CORE_XFPREG_TYPE NT_PRXFPREG | 150 | #define ELF_CORE_XFPREG_TYPE NT_PRXFPREG |
151 | #define elf_core_copy_task_xfpregs elf32_core_copy_task_xfpregs | ||
189 | static inline int | 152 | static inline int |
190 | elf_core_copy_task_xfpregs(struct task_struct *t, elf_fpxregset_t *xfpu) | 153 | elf32_core_copy_task_xfpregs(struct task_struct *t, elf_fpxregset_t *xfpu) |
191 | { | 154 | { |
192 | struct pt_regs *regs = task_pt_regs(t); | 155 | struct pt_regs *regs = task_pt_regs(t); |
193 | if (!tsk_used_math(t)) | 156 | if (!tsk_used_math(t)) |
@@ -206,6 +169,10 @@ elf_core_copy_task_xfpregs(struct task_struct *t, elf_fpxregset_t *xfpu) | |||
206 | 169 | ||
207 | extern int force_personality32; | 170 | extern int force_personality32; |
208 | 171 | ||
172 | #undef ELF_EXEC_PAGESIZE | ||
173 | #undef ELF_HWCAP | ||
174 | #undef ELF_PLATFORM | ||
175 | #undef SET_PERSONALITY | ||
209 | #define ELF_EXEC_PAGESIZE PAGE_SIZE | 176 | #define ELF_EXEC_PAGESIZE PAGE_SIZE |
210 | #define ELF_HWCAP (boot_cpu_data.x86_capability[0]) | 177 | #define ELF_HWCAP (boot_cpu_data.x86_capability[0]) |
211 | #define ELF_PLATFORM ("i686") | 178 | #define ELF_PLATFORM ("i686") |
@@ -231,6 +198,7 @@ do { \ | |||
231 | 198 | ||
232 | #define load_elf_binary load_elf32_binary | 199 | #define load_elf_binary load_elf32_binary |
233 | 200 | ||
201 | #undef ELF_PLAT_INIT | ||
234 | #define ELF_PLAT_INIT(r, load_addr) elf32_init(r) | 202 | #define ELF_PLAT_INIT(r, load_addr) elf32_init(r) |
235 | 203 | ||
236 | #undef start_thread | 204 | #undef start_thread |
@@ -289,7 +257,6 @@ static void elf32_init(struct pt_regs *regs) | |||
289 | 257 | ||
290 | static ctl_table abi_table2[] = { | 258 | static ctl_table abi_table2[] = { |
291 | { | 259 | { |
292 | .ctl_name = 99, | ||
293 | .procname = "vsyscall32", | 260 | .procname = "vsyscall32", |
294 | .data = &sysctl_vsyscall32, | 261 | .data = &sysctl_vsyscall32, |
295 | .maxlen = sizeof(int), | 262 | .maxlen = sizeof(int), |
diff --git a/arch/x86/kernel/Makefile_32 b/arch/x86/kernel/Makefile_32 index a3fa11f8f460..ccea590bbb92 100644 --- a/arch/x86/kernel/Makefile_32 +++ b/arch/x86/kernel/Makefile_32 | |||
@@ -2,7 +2,7 @@ | |||
2 | # Makefile for the linux kernel. | 2 | # Makefile for the linux kernel. |
3 | # | 3 | # |
4 | 4 | ||
5 | extra-y := head_32.o init_task_32.o vmlinux.lds | 5 | extra-y := head_32.o init_task.o vmlinux.lds |
6 | 6 | ||
7 | obj-y := process_32.o signal_32.o entry_32.o traps_32.o irq_32.o \ | 7 | obj-y := process_32.o signal_32.o entry_32.o traps_32.o irq_32.o \ |
8 | ptrace_32.o time_32.o ioport_32.o ldt_32.o setup_32.o i8259_32.o sys_i386_32.o \ | 8 | ptrace_32.o time_32.o ioport_32.o ldt_32.o setup_32.o i8259_32.o sys_i386_32.o \ |
@@ -17,6 +17,7 @@ obj-$(CONFIG_MCA) += mca_32.o | |||
17 | obj-$(CONFIG_X86_MSR) += msr.o | 17 | obj-$(CONFIG_X86_MSR) += msr.o |
18 | obj-$(CONFIG_X86_CPUID) += cpuid.o | 18 | obj-$(CONFIG_X86_CPUID) += cpuid.o |
19 | obj-$(CONFIG_MICROCODE) += microcode.o | 19 | obj-$(CONFIG_MICROCODE) += microcode.o |
20 | obj-$(CONFIG_PCI) += early-quirks.o | ||
20 | obj-$(CONFIG_APM) += apm_32.o | 21 | obj-$(CONFIG_APM) += apm_32.o |
21 | obj-$(CONFIG_X86_SMP) += smp_32.o smpboot_32.o tsc_sync.o | 22 | obj-$(CONFIG_X86_SMP) += smp_32.o smpboot_32.o tsc_sync.o |
22 | obj-$(CONFIG_SMP) += smpcommon_32.o | 23 | obj-$(CONFIG_SMP) += smpcommon_32.o |
diff --git a/arch/x86/kernel/Makefile_64 b/arch/x86/kernel/Makefile_64 index 43da66213a47..dec06e769281 100644 --- a/arch/x86/kernel/Makefile_64 +++ b/arch/x86/kernel/Makefile_64 | |||
@@ -2,7 +2,7 @@ | |||
2 | # Makefile for the linux kernel. | 2 | # Makefile for the linux kernel. |
3 | # | 3 | # |
4 | 4 | ||
5 | extra-y := head_64.o head64.o init_task_64.o vmlinux.lds | 5 | extra-y := head_64.o head64.o init_task.o vmlinux.lds |
6 | EXTRA_AFLAGS := -traditional | 6 | EXTRA_AFLAGS := -traditional |
7 | obj-y := process_64.o signal_64.o entry_64.o traps_64.o irq_64.o \ | 7 | obj-y := process_64.o signal_64.o entry_64.o traps_64.o irq_64.o \ |
8 | ptrace_64.o time_64.o ioport_64.o ldt_64.o setup_64.o i8259_64.o sys_x86_64.o \ | 8 | ptrace_64.o time_64.o ioport_64.o ldt_64.o setup_64.o i8259_64.o sys_x86_64.o \ |
@@ -39,7 +39,7 @@ obj-$(CONFIG_K8_NB) += k8.o | |||
39 | obj-$(CONFIG_AUDIT) += audit_64.o | 39 | obj-$(CONFIG_AUDIT) += audit_64.o |
40 | 40 | ||
41 | obj-$(CONFIG_MODULES) += module_64.o | 41 | obj-$(CONFIG_MODULES) += module_64.o |
42 | obj-$(CONFIG_PCI) += early-quirks_64.o | 42 | obj-$(CONFIG_PCI) += early-quirks.o |
43 | 43 | ||
44 | obj-y += topology.o | 44 | obj-y += topology.o |
45 | obj-y += intel_cacheinfo.o | 45 | obj-y += intel_cacheinfo.o |
diff --git a/arch/x86/kernel/acpi/Makefile_32 b/arch/x86/kernel/acpi/Makefile_32 index a4852a2e9190..045dd54b33e0 100644 --- a/arch/x86/kernel/acpi/Makefile_32 +++ b/arch/x86/kernel/acpi/Makefile_32 | |||
@@ -1,7 +1,4 @@ | |||
1 | obj-$(CONFIG_ACPI) += boot.o | 1 | obj-$(CONFIG_ACPI) += boot.o |
2 | ifneq ($(CONFIG_PCI),) | ||
3 | obj-$(CONFIG_X86_IO_APIC) += earlyquirk_32.o | ||
4 | endif | ||
5 | obj-$(CONFIG_ACPI_SLEEP) += sleep_32.o wakeup_32.o | 2 | obj-$(CONFIG_ACPI_SLEEP) += sleep_32.o wakeup_32.o |
6 | 3 | ||
7 | ifneq ($(CONFIG_ACPI_PROCESSOR),) | 4 | ifneq ($(CONFIG_ACPI_PROCESSOR),) |
diff --git a/arch/x86/kernel/acpi/boot.c b/arch/x86/kernel/acpi/boot.c index afd2afe9102d..289247d974c6 100644 --- a/arch/x86/kernel/acpi/boot.c +++ b/arch/x86/kernel/acpi/boot.c | |||
@@ -99,7 +99,7 @@ static u64 acpi_lapic_addr __initdata = APIC_DEFAULT_PHYS_BASE; | |||
99 | 99 | ||
100 | /* | 100 | /* |
101 | * The default interrupt routing model is PIC (8259). This gets | 101 | * The default interrupt routing model is PIC (8259). This gets |
102 | * overriden if IOAPICs are enumerated (below). | 102 | * overridden if IOAPICs are enumerated (below). |
103 | */ | 103 | */ |
104 | enum acpi_irq_model_id acpi_irq_model = ACPI_IRQ_MODEL_PIC; | 104 | enum acpi_irq_model_id acpi_irq_model = ACPI_IRQ_MODEL_PIC; |
105 | 105 | ||
@@ -414,8 +414,8 @@ acpi_parse_nmi_src(struct acpi_subtable_header * header, const unsigned long end | |||
414 | * | 414 | * |
415 | * Port 0x4d0-4d1 are ECLR1 and ECLR2, the Edge/Level Control Registers | 415 | * Port 0x4d0-4d1 are ECLR1 and ECLR2, the Edge/Level Control Registers |
416 | * for the 8259 PIC. bit[n] = 1 means irq[n] is Level, otherwise Edge. | 416 | * for the 8259 PIC. bit[n] = 1 means irq[n] is Level, otherwise Edge. |
417 | * ECLR1 is IRQ's 0-7 (IRQ 0, 1, 2 must be 0) | 417 | * ECLR1 is IRQs 0-7 (IRQ 0, 1, 2 must be 0) |
418 | * ECLR2 is IRQ's 8-15 (IRQ 8, 13 must be 0) | 418 | * ECLR2 is IRQs 8-15 (IRQ 8, 13 must be 0) |
419 | */ | 419 | */ |
420 | 420 | ||
421 | void __init acpi_pic_sci_set_trigger(unsigned int irq, u16 trigger) | 421 | void __init acpi_pic_sci_set_trigger(unsigned int irq, u16 trigger) |
@@ -427,7 +427,7 @@ void __init acpi_pic_sci_set_trigger(unsigned int irq, u16 trigger) | |||
427 | old = inb(0x4d0) | (inb(0x4d1) << 8); | 427 | old = inb(0x4d0) | (inb(0x4d1) << 8); |
428 | 428 | ||
429 | /* | 429 | /* |
430 | * If we use ACPI to set PCI irq's, then we should clear ELCR | 430 | * If we use ACPI to set PCI IRQs, then we should clear ELCR |
431 | * since we will set it correctly as we enable the PCI irq | 431 | * since we will set it correctly as we enable the PCI irq |
432 | * routing. | 432 | * routing. |
433 | */ | 433 | */ |
@@ -555,7 +555,7 @@ EXPORT_SYMBOL(acpi_map_lsapic); | |||
555 | 555 | ||
556 | int acpi_unmap_lsapic(int cpu) | 556 | int acpi_unmap_lsapic(int cpu) |
557 | { | 557 | { |
558 | x86_cpu_to_apicid[cpu] = -1; | 558 | per_cpu(x86_cpu_to_apicid, cpu) = -1; |
559 | cpu_clear(cpu, cpu_present_map); | 559 | cpu_clear(cpu, cpu_present_map); |
560 | num_processors--; | 560 | num_processors--; |
561 | 561 | ||
diff --git a/arch/x86/kernel/acpi/cstate.c b/arch/x86/kernel/acpi/cstate.c index 2d39f55d29a8..10b67170b133 100644 --- a/arch/x86/kernel/acpi/cstate.c +++ b/arch/x86/kernel/acpi/cstate.c | |||
@@ -29,7 +29,7 @@ | |||
29 | void acpi_processor_power_init_bm_check(struct acpi_processor_flags *flags, | 29 | void acpi_processor_power_init_bm_check(struct acpi_processor_flags *flags, |
30 | unsigned int cpu) | 30 | unsigned int cpu) |
31 | { | 31 | { |
32 | struct cpuinfo_x86 *c = cpu_data + cpu; | 32 | struct cpuinfo_x86 *c = &cpu_data(cpu); |
33 | 33 | ||
34 | flags->bm_check = 0; | 34 | flags->bm_check = 0; |
35 | if (num_online_cpus() == 1) | 35 | if (num_online_cpus() == 1) |
@@ -72,7 +72,7 @@ int acpi_processor_ffh_cstate_probe(unsigned int cpu, | |||
72 | struct acpi_processor_cx *cx, struct acpi_power_register *reg) | 72 | struct acpi_processor_cx *cx, struct acpi_power_register *reg) |
73 | { | 73 | { |
74 | struct cstate_entry *percpu_entry; | 74 | struct cstate_entry *percpu_entry; |
75 | struct cpuinfo_x86 *c = cpu_data + cpu; | 75 | struct cpuinfo_x86 *c = &cpu_data(cpu); |
76 | 76 | ||
77 | cpumask_t saved_mask; | 77 | cpumask_t saved_mask; |
78 | int retval; | 78 | int retval; |
diff --git a/arch/x86/kernel/acpi/earlyquirk_32.c b/arch/x86/kernel/acpi/earlyquirk_32.c deleted file mode 100644 index 23f78efc577d..000000000000 --- a/arch/x86/kernel/acpi/earlyquirk_32.c +++ /dev/null | |||
@@ -1,84 +0,0 @@ | |||
1 | /* | ||
2 | * Do early PCI probing for bug detection when the main PCI subsystem is | ||
3 | * not up yet. | ||
4 | */ | ||
5 | #include <linux/init.h> | ||
6 | #include <linux/kernel.h> | ||
7 | #include <linux/pci.h> | ||
8 | #include <linux/acpi.h> | ||
9 | |||
10 | #include <asm/pci-direct.h> | ||
11 | #include <asm/acpi.h> | ||
12 | #include <asm/apic.h> | ||
13 | |||
14 | #ifdef CONFIG_ACPI | ||
15 | |||
16 | static int __init nvidia_hpet_check(struct acpi_table_header *header) | ||
17 | { | ||
18 | return 0; | ||
19 | } | ||
20 | #endif | ||
21 | |||
22 | static int __init check_bridge(int vendor, int device) | ||
23 | { | ||
24 | #ifdef CONFIG_ACPI | ||
25 | static int warned; | ||
26 | /* According to Nvidia all timer overrides are bogus unless HPET | ||
27 | is enabled. */ | ||
28 | if (!acpi_use_timer_override && vendor == PCI_VENDOR_ID_NVIDIA) { | ||
29 | if (!warned && acpi_table_parse(ACPI_SIG_HPET, | ||
30 | nvidia_hpet_check)) { | ||
31 | warned = 1; | ||
32 | acpi_skip_timer_override = 1; | ||
33 | printk(KERN_INFO "Nvidia board " | ||
34 | "detected. Ignoring ACPI " | ||
35 | "timer override.\n"); | ||
36 | printk(KERN_INFO "If you got timer trouble " | ||
37 | "try acpi_use_timer_override\n"); | ||
38 | |||
39 | } | ||
40 | } | ||
41 | #endif | ||
42 | if (vendor == PCI_VENDOR_ID_ATI && timer_over_8254 == 1) { | ||
43 | timer_over_8254 = 0; | ||
44 | printk(KERN_INFO "ATI board detected. Disabling timer routing " | ||
45 | "over 8254.\n"); | ||
46 | } | ||
47 | return 0; | ||
48 | } | ||
49 | |||
50 | void __init check_acpi_pci(void) | ||
51 | { | ||
52 | int num, slot, func; | ||
53 | |||
54 | /* Assume the machine supports type 1. If not it will | ||
55 | always read ffffffff and should not have any side effect. | ||
56 | Actually a few buggy systems can machine check. Allow the user | ||
57 | to disable it by command line option at least -AK */ | ||
58 | if (!early_pci_allowed()) | ||
59 | return; | ||
60 | |||
61 | /* Poor man's PCI discovery */ | ||
62 | for (num = 0; num < 32; num++) { | ||
63 | for (slot = 0; slot < 32; slot++) { | ||
64 | for (func = 0; func < 8; func++) { | ||
65 | u32 class; | ||
66 | u32 vendor; | ||
67 | class = read_pci_config(num, slot, func, | ||
68 | PCI_CLASS_REVISION); | ||
69 | if (class == 0xffffffff) | ||
70 | break; | ||
71 | |||
72 | if ((class >> 16) != PCI_CLASS_BRIDGE_PCI) | ||
73 | continue; | ||
74 | |||
75 | vendor = read_pci_config(num, slot, func, | ||
76 | PCI_VENDOR_ID); | ||
77 | |||
78 | if (check_bridge(vendor & 0xffff, vendor >> 16)) | ||
79 | return; | ||
80 | } | ||
81 | |||
82 | } | ||
83 | } | ||
84 | } | ||
diff --git a/arch/x86/kernel/acpi/processor.c b/arch/x86/kernel/acpi/processor.c index b54fded49834..2ed0a4ce62f0 100644 --- a/arch/x86/kernel/acpi/processor.c +++ b/arch/x86/kernel/acpi/processor.c | |||
@@ -63,7 +63,7 @@ static void init_intel_pdc(struct acpi_processor *pr, struct cpuinfo_x86 *c) | |||
63 | void arch_acpi_processor_init_pdc(struct acpi_processor *pr) | 63 | void arch_acpi_processor_init_pdc(struct acpi_processor *pr) |
64 | { | 64 | { |
65 | unsigned int cpu = pr->id; | 65 | unsigned int cpu = pr->id; |
66 | struct cpuinfo_x86 *c = cpu_data + cpu; | 66 | struct cpuinfo_x86 *c = &cpu_data(cpu); |
67 | 67 | ||
68 | pr->pdc = NULL; | 68 | pr->pdc = NULL; |
69 | if (c->x86_vendor == X86_VENDOR_INTEL) | 69 | if (c->x86_vendor == X86_VENDOR_INTEL) |
diff --git a/arch/x86/kernel/acpi/wakeup_32.S b/arch/x86/kernel/acpi/wakeup_32.S index f22ba8534d26..a97313b1270e 100644 --- a/arch/x86/kernel/acpi/wakeup_32.S +++ b/arch/x86/kernel/acpi/wakeup_32.S | |||
@@ -11,7 +11,7 @@ | |||
11 | # | 11 | # |
12 | # If physical address of wakeup_code is 0x12345, BIOS should call us with | 12 | # If physical address of wakeup_code is 0x12345, BIOS should call us with |
13 | # cs = 0x1234, eip = 0x05 | 13 | # cs = 0x1234, eip = 0x05 |
14 | # | 14 | # |
15 | 15 | ||
16 | #define BEEP \ | 16 | #define BEEP \ |
17 | inb $97, %al; \ | 17 | inb $97, %al; \ |
@@ -52,7 +52,6 @@ wakeup_code: | |||
52 | BEEP | 52 | BEEP |
53 | 1: | 53 | 1: |
54 | mov $(wakeup_stack - wakeup_code), %sp # Private stack is needed for ASUS board | 54 | mov $(wakeup_stack - wakeup_code), %sp # Private stack is needed for ASUS board |
55 | movw $0x0e00 + 'S', %fs:(0x12) | ||
56 | 55 | ||
57 | pushl $0 # Kill any dangerous flags | 56 | pushl $0 # Kill any dangerous flags |
58 | popfl | 57 | popfl |
@@ -90,9 +89,6 @@ wakeup_code: | |||
90 | # make sure %cr4 is set correctly (features, etc) | 89 | # make sure %cr4 is set correctly (features, etc) |
91 | movl real_save_cr4 - wakeup_code, %eax | 90 | movl real_save_cr4 - wakeup_code, %eax |
92 | movl %eax, %cr4 | 91 | movl %eax, %cr4 |
93 | movw $0xb800, %ax | ||
94 | movw %ax,%fs | ||
95 | movw $0x0e00 + 'i', %fs:(0x12) | ||
96 | 92 | ||
97 | # need a gdt -- use lgdtl to force 32-bit operands, in case | 93 | # need a gdt -- use lgdtl to force 32-bit operands, in case |
98 | # the GDT is located past 16 megabytes. | 94 | # the GDT is located past 16 megabytes. |
@@ -102,8 +98,6 @@ wakeup_code: | |||
102 | movl %eax, %cr0 | 98 | movl %eax, %cr0 |
103 | jmp 1f | 99 | jmp 1f |
104 | 1: | 100 | 1: |
105 | movw $0x0e00 + 'n', %fs:(0x14) | ||
106 | |||
107 | movl real_magic - wakeup_code, %eax | 101 | movl real_magic - wakeup_code, %eax |
108 | cmpl $0x12345678, %eax | 102 | cmpl $0x12345678, %eax |
109 | jne bogus_real_magic | 103 | jne bogus_real_magic |
@@ -122,13 +116,11 @@ real_save_cr4: .long 0 | |||
122 | real_magic: .long 0 | 116 | real_magic: .long 0 |
123 | video_mode: .long 0 | 117 | video_mode: .long 0 |
124 | realmode_flags: .long 0 | 118 | realmode_flags: .long 0 |
125 | beep_flags: .long 0 | ||
126 | real_efer_save_restore: .long 0 | 119 | real_efer_save_restore: .long 0 |
127 | real_save_efer_edx: .long 0 | 120 | real_save_efer_edx: .long 0 |
128 | real_save_efer_eax: .long 0 | 121 | real_save_efer_eax: .long 0 |
129 | 122 | ||
130 | bogus_real_magic: | 123 | bogus_real_magic: |
131 | movw $0x0e00 + 'B', %fs:(0x12) | ||
132 | jmp bogus_real_magic | 124 | jmp bogus_real_magic |
133 | 125 | ||
134 | /* This code uses an extended set of video mode numbers. These include: | 126 | /* This code uses an extended set of video mode numbers. These include: |
@@ -194,7 +186,6 @@ wakeup_pmode_return: | |||
194 | movw %ax, %es | 186 | movw %ax, %es |
195 | movw %ax, %fs | 187 | movw %ax, %fs |
196 | movw %ax, %gs | 188 | movw %ax, %gs |
197 | movw $0x0e00 + 'u', 0xb8016 | ||
198 | 189 | ||
199 | # reload the gdt, as we need the full 32 bit address | 190 | # reload the gdt, as we need the full 32 bit address |
200 | lgdt saved_gdt | 191 | lgdt saved_gdt |
@@ -218,7 +209,6 @@ wakeup_pmode_return: | |||
218 | jmp *%eax | 209 | jmp *%eax |
219 | 210 | ||
220 | bogus_magic: | 211 | bogus_magic: |
221 | movw $0x0e00 + 'B', 0xb8018 | ||
222 | jmp bogus_magic | 212 | jmp bogus_magic |
223 | 213 | ||
224 | 214 | ||
diff --git a/arch/x86/kernel/acpi/wakeup_64.S b/arch/x86/kernel/acpi/wakeup_64.S index 8b4357e1efe0..55608ec2ed72 100644 --- a/arch/x86/kernel/acpi/wakeup_64.S +++ b/arch/x86/kernel/acpi/wakeup_64.S | |||
@@ -41,7 +41,6 @@ wakeup_code: | |||
41 | 41 | ||
42 | # Running in *copy* of this code, somewhere in low 1MB. | 42 | # Running in *copy* of this code, somewhere in low 1MB. |
43 | 43 | ||
44 | movb $0xa1, %al ; outb %al, $0x80 | ||
45 | cli | 44 | cli |
46 | cld | 45 | cld |
47 | # setup data segment | 46 | # setup data segment |
@@ -65,11 +64,6 @@ wakeup_code: | |||
65 | cmpl $0x12345678, %eax | 64 | cmpl $0x12345678, %eax |
66 | jne bogus_real_magic | 65 | jne bogus_real_magic |
67 | 66 | ||
68 | call verify_cpu # Verify the cpu supports long | ||
69 | # mode | ||
70 | testl %eax, %eax | ||
71 | jnz no_longmode | ||
72 | |||
73 | testl $1, realmode_flags - wakeup_code | 67 | testl $1, realmode_flags - wakeup_code |
74 | jz 1f | 68 | jz 1f |
75 | lcall $0xc000,$3 | 69 | lcall $0xc000,$3 |
@@ -84,12 +78,6 @@ wakeup_code: | |||
84 | call mode_set | 78 | call mode_set |
85 | 1: | 79 | 1: |
86 | 80 | ||
87 | movw $0xb800, %ax | ||
88 | movw %ax,%fs | ||
89 | movw $0x0e00 + 'L', %fs:(0x10) | ||
90 | |||
91 | movb $0xa2, %al ; outb %al, $0x80 | ||
92 | |||
93 | mov %ds, %ax # Find 32bit wakeup_code addr | 81 | mov %ds, %ax # Find 32bit wakeup_code addr |
94 | movzx %ax, %esi # (Convert %ds:gdt to a liner ptr) | 82 | movzx %ax, %esi # (Convert %ds:gdt to a liner ptr) |
95 | shll $4, %esi | 83 | shll $4, %esi |
@@ -117,14 +105,10 @@ wakeup_32_vector: | |||
117 | .code32 | 105 | .code32 |
118 | wakeup_32: | 106 | wakeup_32: |
119 | # Running in this code, but at low address; paging is not yet turned on. | 107 | # Running in this code, but at low address; paging is not yet turned on. |
120 | movb $0xa5, %al ; outb %al, $0x80 | ||
121 | 108 | ||
122 | movl $__KERNEL_DS, %eax | 109 | movl $__KERNEL_DS, %eax |
123 | movl %eax, %ds | 110 | movl %eax, %ds |
124 | 111 | ||
125 | movw $0x0e00 + 'i', %ds:(0xb8012) | ||
126 | movb $0xa8, %al ; outb %al, $0x80; | ||
127 | |||
128 | /* | 112 | /* |
129 | * Prepare for entering 64bits mode | 113 | * Prepare for entering 64bits mode |
130 | */ | 114 | */ |
@@ -200,16 +184,11 @@ wakeup_long64: | |||
200 | */ | 184 | */ |
201 | lgdt cpu_gdt_descr | 185 | lgdt cpu_gdt_descr |
202 | 186 | ||
203 | movw $0x0e00 + 'n', %ds:(0xb8014) | ||
204 | movb $0xa9, %al ; outb %al, $0x80 | ||
205 | |||
206 | movq saved_magic, %rax | 187 | movq saved_magic, %rax |
207 | movq $0x123456789abcdef0, %rdx | 188 | movq $0x123456789abcdef0, %rdx |
208 | cmpq %rdx, %rax | 189 | cmpq %rdx, %rax |
209 | jne bogus_64_magic | 190 | jne bogus_64_magic |
210 | 191 | ||
211 | movw $0x0e00 + 'u', %ds:(0xb8016) | ||
212 | |||
213 | nop | 192 | nop |
214 | nop | 193 | nop |
215 | movw $__KERNEL_DS, %ax | 194 | movw $__KERNEL_DS, %ax |
@@ -220,13 +199,11 @@ wakeup_long64: | |||
220 | movw %ax, %gs | 199 | movw %ax, %gs |
221 | movq saved_rsp, %rsp | 200 | movq saved_rsp, %rsp |
222 | 201 | ||
223 | movw $0x0e00 + 'x', %ds:(0xb8018) | ||
224 | movq saved_rbx, %rbx | 202 | movq saved_rbx, %rbx |
225 | movq saved_rdi, %rdi | 203 | movq saved_rdi, %rdi |
226 | movq saved_rsi, %rsi | 204 | movq saved_rsi, %rsi |
227 | movq saved_rbp, %rbp | 205 | movq saved_rbp, %rbp |
228 | 206 | ||
229 | movw $0x0e00 + '!', %ds:(0xb801a) | ||
230 | movq saved_rip, %rax | 207 | movq saved_rip, %rax |
231 | jmp *%rax | 208 | jmp *%rax |
232 | 209 | ||
@@ -256,21 +233,12 @@ realmode_flags: .quad 0 | |||
256 | 233 | ||
257 | .code16 | 234 | .code16 |
258 | bogus_real_magic: | 235 | bogus_real_magic: |
259 | movb $0xba,%al ; outb %al,$0x80 | ||
260 | jmp bogus_real_magic | 236 | jmp bogus_real_magic |
261 | 237 | ||
262 | .code64 | 238 | .code64 |
263 | bogus_64_magic: | 239 | bogus_64_magic: |
264 | movb $0xb3,%al ; outb %al,$0x80 | ||
265 | jmp bogus_64_magic | 240 | jmp bogus_64_magic |
266 | 241 | ||
267 | .code16 | ||
268 | no_longmode: | ||
269 | movb $0xbc,%al ; outb %al,$0x80 | ||
270 | jmp no_longmode | ||
271 | |||
272 | #include "../verify_cpu_64.S" | ||
273 | |||
274 | /* This code uses an extended set of video mode numbers. These include: | 242 | /* This code uses an extended set of video mode numbers. These include: |
275 | * Aliases for standard modes | 243 | * Aliases for standard modes |
276 | * NORMAL_VGA (-1) | 244 | * NORMAL_VGA (-1) |
diff --git a/arch/x86/kernel/alternative.c b/arch/x86/kernel/alternative.c index 3bd2688bd443..d6405e0842b5 100644 --- a/arch/x86/kernel/alternative.c +++ b/arch/x86/kernel/alternative.c | |||
@@ -357,14 +357,14 @@ void alternatives_smp_switch(int smp) | |||
357 | if (smp) { | 357 | if (smp) { |
358 | printk(KERN_INFO "SMP alternatives: switching to SMP code\n"); | 358 | printk(KERN_INFO "SMP alternatives: switching to SMP code\n"); |
359 | clear_bit(X86_FEATURE_UP, boot_cpu_data.x86_capability); | 359 | clear_bit(X86_FEATURE_UP, boot_cpu_data.x86_capability); |
360 | clear_bit(X86_FEATURE_UP, cpu_data[0].x86_capability); | 360 | clear_bit(X86_FEATURE_UP, cpu_data(0).x86_capability); |
361 | list_for_each_entry(mod, &smp_alt_modules, next) | 361 | list_for_each_entry(mod, &smp_alt_modules, next) |
362 | alternatives_smp_lock(mod->locks, mod->locks_end, | 362 | alternatives_smp_lock(mod->locks, mod->locks_end, |
363 | mod->text, mod->text_end); | 363 | mod->text, mod->text_end); |
364 | } else { | 364 | } else { |
365 | printk(KERN_INFO "SMP alternatives: switching to UP code\n"); | 365 | printk(KERN_INFO "SMP alternatives: switching to UP code\n"); |
366 | set_bit(X86_FEATURE_UP, boot_cpu_data.x86_capability); | 366 | set_bit(X86_FEATURE_UP, boot_cpu_data.x86_capability); |
367 | set_bit(X86_FEATURE_UP, cpu_data[0].x86_capability); | 367 | set_bit(X86_FEATURE_UP, cpu_data(0).x86_capability); |
368 | list_for_each_entry(mod, &smp_alt_modules, next) | 368 | list_for_each_entry(mod, &smp_alt_modules, next) |
369 | alternatives_smp_unlock(mod->locks, mod->locks_end, | 369 | alternatives_smp_unlock(mod->locks, mod->locks_end, |
370 | mod->text, mod->text_end); | 370 | mod->text, mod->text_end); |
@@ -432,7 +432,7 @@ void __init alternative_instructions(void) | |||
432 | if (1 == num_possible_cpus()) { | 432 | if (1 == num_possible_cpus()) { |
433 | printk(KERN_INFO "SMP alternatives: switching to UP code\n"); | 433 | printk(KERN_INFO "SMP alternatives: switching to UP code\n"); |
434 | set_bit(X86_FEATURE_UP, boot_cpu_data.x86_capability); | 434 | set_bit(X86_FEATURE_UP, boot_cpu_data.x86_capability); |
435 | set_bit(X86_FEATURE_UP, cpu_data[0].x86_capability); | 435 | set_bit(X86_FEATURE_UP, cpu_data(0).x86_capability); |
436 | alternatives_smp_unlock(__smp_locks, __smp_locks_end, | 436 | alternatives_smp_unlock(__smp_locks, __smp_locks_end, |
437 | _text, _etext); | 437 | _text, _etext); |
438 | } | 438 | } |
diff --git a/arch/x86/kernel/apic_32.c b/arch/x86/kernel/apic_32.c index 793341fffc81..08b07c176962 100644 --- a/arch/x86/kernel/apic_32.c +++ b/arch/x86/kernel/apic_32.c | |||
@@ -947,7 +947,7 @@ void __devinit setup_local_APIC(void) | |||
947 | * Set up LVT0, LVT1: | 947 | * Set up LVT0, LVT1: |
948 | * | 948 | * |
949 | * set up through-local-APIC on the BP's LINT0. This is not | 949 | * set up through-local-APIC on the BP's LINT0. This is not |
950 | * strictly necessery in pure symmetric-IO mode, but sometimes | 950 | * strictly necessary in pure symmetric-IO mode, but sometimes |
951 | * we delegate interrupts to the 8259A. | 951 | * we delegate interrupts to the 8259A. |
952 | */ | 952 | */ |
953 | /* | 953 | /* |
@@ -998,7 +998,7 @@ void __devinit setup_local_APIC(void) | |||
998 | } else { | 998 | } else { |
999 | if (esr_disable) | 999 | if (esr_disable) |
1000 | /* | 1000 | /* |
1001 | * Something untraceble is creating bad interrupts on | 1001 | * Something untraceable is creating bad interrupts on |
1002 | * secondary quads ... for the moment, just leave the | 1002 | * secondary quads ... for the moment, just leave the |
1003 | * ESR disabled - we can't do anything useful with the | 1003 | * ESR disabled - we can't do anything useful with the |
1004 | * errors anyway - mbligh | 1004 | * errors anyway - mbligh |
diff --git a/arch/x86/kernel/apm_32.c b/arch/x86/kernel/apm_32.c index 32f2365c26ed..17089a041028 100644 --- a/arch/x86/kernel/apm_32.c +++ b/arch/x86/kernel/apm_32.c | |||
@@ -57,7 +57,7 @@ | |||
57 | * screen-blanking and gpm (Stephen Rothwell); Linux 1.99.4 | 57 | * screen-blanking and gpm (Stephen Rothwell); Linux 1.99.4 |
58 | * 1.2a:Simple change to stop mysterious bug reports with SMP also added | 58 | * 1.2a:Simple change to stop mysterious bug reports with SMP also added |
59 | * levels to the printk calls. APM is not defined for SMP machines. | 59 | * levels to the printk calls. APM is not defined for SMP machines. |
60 | * The new replacment for it is, but Linux doesn't yet support this. | 60 | * The new replacement for it is, but Linux doesn't yet support this. |
61 | * Alan Cox Linux 2.1.55 | 61 | * Alan Cox Linux 2.1.55 |
62 | * 1.3: Set up a valid data descriptor 0x40 for buggy BIOS's | 62 | * 1.3: Set up a valid data descriptor 0x40 for buggy BIOS's |
63 | * 1.4: Upgraded to support APM 1.2. Integrated ThinkPad suspend patch by | 63 | * 1.4: Upgraded to support APM 1.2. Integrated ThinkPad suspend patch by |
diff --git a/arch/x86/kernel/cpu/amd.c b/arch/x86/kernel/cpu/amd.c index 5f8af875f457..1ff88c7f45cf 100644 --- a/arch/x86/kernel/cpu/amd.c +++ b/arch/x86/kernel/cpu/amd.c | |||
@@ -266,7 +266,7 @@ static void __cpuinit init_amd(struct cpuinfo_x86 *c) | |||
266 | #ifdef CONFIG_X86_HT | 266 | #ifdef CONFIG_X86_HT |
267 | /* | 267 | /* |
268 | * On a AMD multi core setup the lower bits of the APIC id | 268 | * On a AMD multi core setup the lower bits of the APIC id |
269 | * distingush the cores. | 269 | * distinguish the cores. |
270 | */ | 270 | */ |
271 | if (c->x86_max_cores > 1) { | 271 | if (c->x86_max_cores > 1) { |
272 | int cpu = smp_processor_id(); | 272 | int cpu = smp_processor_id(); |
diff --git a/arch/x86/kernel/cpu/centaur.c b/arch/x86/kernel/cpu/centaur.c index 473eac883c7b..9681fa15ddf0 100644 --- a/arch/x86/kernel/cpu/centaur.c +++ b/arch/x86/kernel/cpu/centaur.c | |||
@@ -53,7 +53,7 @@ static u32 __cpuinit ramtop(void) /* 16388 */ | |||
53 | continue; | 53 | continue; |
54 | /* | 54 | /* |
55 | * Don't MCR over reserved space. Ignore the ISA hole | 55 | * Don't MCR over reserved space. Ignore the ISA hole |
56 | * we frob around that catastrophy already | 56 | * we frob around that catastrophe already |
57 | */ | 57 | */ |
58 | 58 | ||
59 | if (e820.map[i].type == E820_RESERVED) | 59 | if (e820.map[i].type == E820_RESERVED) |
@@ -287,7 +287,7 @@ static void __cpuinit init_c3(struct cpuinfo_x86 *c) | |||
287 | c->x86_capability[5] = cpuid_edx(0xC0000001); | 287 | c->x86_capability[5] = cpuid_edx(0xC0000001); |
288 | } | 288 | } |
289 | 289 | ||
290 | /* Cyrix III family needs CX8 & PGE explicity enabled. */ | 290 | /* Cyrix III family needs CX8 & PGE explicitly enabled. */ |
291 | if (c->x86_model >=6 && c->x86_model <= 9) { | 291 | if (c->x86_model >=6 && c->x86_model <= 9) { |
292 | rdmsr (MSR_VIA_FCR, lo, hi); | 292 | rdmsr (MSR_VIA_FCR, lo, hi); |
293 | lo |= (1<<1 | 1<<7); | 293 | lo |= (1<<1 | 1<<7); |
diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c index d506201d397c..e2fcf2051bdb 100644 --- a/arch/x86/kernel/cpu/common.c +++ b/arch/x86/kernel/cpu/common.c | |||
@@ -207,7 +207,7 @@ static void __cpuinit get_cpu_vendor(struct cpuinfo_x86 *c, int early) | |||
207 | 207 | ||
208 | static int __init x86_fxsr_setup(char * s) | 208 | static int __init x86_fxsr_setup(char * s) |
209 | { | 209 | { |
210 | /* Tell all the other CPU's to not use it... */ | 210 | /* Tell all the other CPUs to not use it... */ |
211 | disable_x86_fxsr = 1; | 211 | disable_x86_fxsr = 1; |
212 | 212 | ||
213 | /* | 213 | /* |
diff --git a/arch/x86/kernel/cpu/cpufreq/Kconfig b/arch/x86/kernel/cpu/cpufreq/Kconfig_32 index d8c6f132dc7a..d8c6f132dc7a 100644 --- a/arch/x86/kernel/cpu/cpufreq/Kconfig +++ b/arch/x86/kernel/cpu/cpufreq/Kconfig_32 | |||
diff --git a/arch/x86/kernel/cpufreq/Kconfig b/arch/x86/kernel/cpu/cpufreq/Kconfig_64 index a3fd51926cbd..9c9699fdcf52 100644 --- a/arch/x86/kernel/cpufreq/Kconfig +++ b/arch/x86/kernel/cpu/cpufreq/Kconfig_64 | |||
@@ -19,7 +19,7 @@ config X86_POWERNOW_K8 | |||
19 | To compile this driver as a module, choose M here: the | 19 | To compile this driver as a module, choose M here: the |
20 | module will be called powernow-k8. | 20 | module will be called powernow-k8. |
21 | 21 | ||
22 | For details, take a look at <file:Documentation/cpu-freq/>. | 22 | For details, take a look at <file:Documentation/cpu-freq/>. |
23 | 23 | ||
24 | If in doubt, say N. | 24 | If in doubt, say N. |
25 | 25 | ||
diff --git a/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c b/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c index 2ca43ba32bc0..fea0af0476b9 100644 --- a/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c +++ b/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c | |||
@@ -77,7 +77,7 @@ static unsigned int acpi_pstate_strict; | |||
77 | 77 | ||
78 | static int check_est_cpu(unsigned int cpuid) | 78 | static int check_est_cpu(unsigned int cpuid) |
79 | { | 79 | { |
80 | struct cpuinfo_x86 *cpu = &cpu_data[cpuid]; | 80 | struct cpuinfo_x86 *cpu = &cpu_data(cpuid); |
81 | 81 | ||
82 | if (cpu->x86_vendor != X86_VENDOR_INTEL || | 82 | if (cpu->x86_vendor != X86_VENDOR_INTEL || |
83 | !cpu_has(cpu, X86_FEATURE_EST)) | 83 | !cpu_has(cpu, X86_FEATURE_EST)) |
@@ -560,7 +560,7 @@ static int acpi_cpufreq_cpu_init(struct cpufreq_policy *policy) | |||
560 | unsigned int cpu = policy->cpu; | 560 | unsigned int cpu = policy->cpu; |
561 | struct acpi_cpufreq_data *data; | 561 | struct acpi_cpufreq_data *data; |
562 | unsigned int result = 0; | 562 | unsigned int result = 0; |
563 | struct cpuinfo_x86 *c = &cpu_data[policy->cpu]; | 563 | struct cpuinfo_x86 *c = &cpu_data(policy->cpu); |
564 | struct acpi_processor_performance *perf; | 564 | struct acpi_processor_performance *perf; |
565 | 565 | ||
566 | dprintk("acpi_cpufreq_cpu_init\n"); | 566 | dprintk("acpi_cpufreq_cpu_init\n"); |
diff --git a/arch/x86/kernel/cpu/cpufreq/cpufreq-nforce2.c b/arch/x86/kernel/cpu/cpufreq/cpufreq-nforce2.c index 32f0bda3fc95..f03e9153618e 100644 --- a/arch/x86/kernel/cpu/cpufreq/cpufreq-nforce2.c +++ b/arch/x86/kernel/cpu/cpufreq/cpufreq-nforce2.c | |||
@@ -260,7 +260,7 @@ static int nforce2_target(struct cpufreq_policy *policy, | |||
260 | 260 | ||
261 | freqs.old = nforce2_get(policy->cpu); | 261 | freqs.old = nforce2_get(policy->cpu); |
262 | freqs.new = target_fsb * fid * 100; | 262 | freqs.new = target_fsb * fid * 100; |
263 | freqs.cpu = 0; /* Only one CPU on nForce2 plattforms */ | 263 | freqs.cpu = 0; /* Only one CPU on nForce2 platforms */ |
264 | 264 | ||
265 | if (freqs.old == freqs.new) | 265 | if (freqs.old == freqs.new) |
266 | return 0; | 266 | return 0; |
diff --git a/arch/x86/kernel/cpu/cpufreq/e_powersaver.c b/arch/x86/kernel/cpu/cpufreq/e_powersaver.c index c11baaf9f2b4..326a4c81f684 100644 --- a/arch/x86/kernel/cpu/cpufreq/e_powersaver.c +++ b/arch/x86/kernel/cpu/cpufreq/e_powersaver.c | |||
@@ -305,7 +305,7 @@ static struct cpufreq_driver eps_driver = { | |||
305 | 305 | ||
306 | static int __init eps_init(void) | 306 | static int __init eps_init(void) |
307 | { | 307 | { |
308 | struct cpuinfo_x86 *c = cpu_data; | 308 | struct cpuinfo_x86 *c = &cpu_data(0); |
309 | 309 | ||
310 | /* This driver will work only on Centaur C7 processors with | 310 | /* This driver will work only on Centaur C7 processors with |
311 | * Enhanced SpeedStep/PowerSaver registers */ | 311 | * Enhanced SpeedStep/PowerSaver registers */ |
diff --git a/arch/x86/kernel/cpu/cpufreq/elanfreq.c b/arch/x86/kernel/cpu/cpufreq/elanfreq.c index 1e7ae7dafcf6..94619c22f563 100644 --- a/arch/x86/kernel/cpu/cpufreq/elanfreq.c +++ b/arch/x86/kernel/cpu/cpufreq/elanfreq.c | |||
@@ -199,7 +199,7 @@ static int elanfreq_target (struct cpufreq_policy *policy, | |||
199 | 199 | ||
200 | static int elanfreq_cpu_init(struct cpufreq_policy *policy) | 200 | static int elanfreq_cpu_init(struct cpufreq_policy *policy) |
201 | { | 201 | { |
202 | struct cpuinfo_x86 *c = cpu_data; | 202 | struct cpuinfo_x86 *c = &cpu_data(0); |
203 | unsigned int i; | 203 | unsigned int i; |
204 | int result; | 204 | int result; |
205 | 205 | ||
@@ -280,7 +280,7 @@ static struct cpufreq_driver elanfreq_driver = { | |||
280 | 280 | ||
281 | static int __init elanfreq_init(void) | 281 | static int __init elanfreq_init(void) |
282 | { | 282 | { |
283 | struct cpuinfo_x86 *c = cpu_data; | 283 | struct cpuinfo_x86 *c = &cpu_data(0); |
284 | 284 | ||
285 | /* Test if we have the right hardware */ | 285 | /* Test if we have the right hardware */ |
286 | if ((c->x86_vendor != X86_VENDOR_AMD) || | 286 | if ((c->x86_vendor != X86_VENDOR_AMD) || |
diff --git a/arch/x86/kernel/cpu/cpufreq/gx-suspmod.c b/arch/x86/kernel/cpu/cpufreq/gx-suspmod.c index ed2bda127c44..2ed7db2fd257 100644 --- a/arch/x86/kernel/cpu/cpufreq/gx-suspmod.c +++ b/arch/x86/kernel/cpu/cpufreq/gx-suspmod.c | |||
@@ -12,12 +12,12 @@ | |||
12 | * of any nature resulting due to the use of this software. This | 12 | * of any nature resulting due to the use of this software. This |
13 | * software is provided AS-IS with no warranties. | 13 | * software is provided AS-IS with no warranties. |
14 | * | 14 | * |
15 | * Theoritical note: | 15 | * Theoretical note: |
16 | * | 16 | * |
17 | * (see Geode(tm) CS5530 manual (rev.4.1) page.56) | 17 | * (see Geode(tm) CS5530 manual (rev.4.1) page.56) |
18 | * | 18 | * |
19 | * CPU frequency control on NatSemi Geode GX1/GXLV processor and CS55x0 | 19 | * CPU frequency control on NatSemi Geode GX1/GXLV processor and CS55x0 |
20 | * are based on Suspend Moduration. | 20 | * are based on Suspend Modulation. |
21 | * | 21 | * |
22 | * Suspend Modulation works by asserting and de-asserting the SUSP# pin | 22 | * Suspend Modulation works by asserting and de-asserting the SUSP# pin |
23 | * to CPU(GX1/GXLV) for configurable durations. When asserting SUSP# | 23 | * to CPU(GX1/GXLV) for configurable durations. When asserting SUSP# |
@@ -101,11 +101,11 @@ | |||
101 | 101 | ||
102 | /* SUSCFG bits */ | 102 | /* SUSCFG bits */ |
103 | #define SUSMOD (1<<0) /* enable/disable suspend modulation */ | 103 | #define SUSMOD (1<<0) /* enable/disable suspend modulation */ |
104 | /* the belows support only with cs5530 (after rev.1.2)/cs5530A */ | 104 | /* the below is supported only with cs5530 (after rev.1.2)/cs5530A */ |
105 | #define SMISPDUP (1<<1) /* select how SMI re-enable suspend modulation: */ | 105 | #define SMISPDUP (1<<1) /* select how SMI re-enable suspend modulation: */ |
106 | /* IRQTC timer or read SMI speedup disable reg.(F1BAR[08-09h]) */ | 106 | /* IRQTC timer or read SMI speedup disable reg.(F1BAR[08-09h]) */ |
107 | #define SUSCFG (1<<2) /* enable powering down a GXLV processor. "Special 3Volt Suspend" mode */ | 107 | #define SUSCFG (1<<2) /* enable powering down a GXLV processor. "Special 3Volt Suspend" mode */ |
108 | /* the belows support only with cs5530A */ | 108 | /* the below is supported only with cs5530A */ |
109 | #define PWRSVE_ISA (1<<3) /* stop ISA clock */ | 109 | #define PWRSVE_ISA (1<<3) /* stop ISA clock */ |
110 | #define PWRSVE (1<<4) /* active idle */ | 110 | #define PWRSVE (1<<4) /* active idle */ |
111 | 111 | ||
diff --git a/arch/x86/kernel/cpu/cpufreq/longhaul.c b/arch/x86/kernel/cpu/cpufreq/longhaul.c index 5045f5d583c8..749d00cb2ebd 100644 --- a/arch/x86/kernel/cpu/cpufreq/longhaul.c +++ b/arch/x86/kernel/cpu/cpufreq/longhaul.c | |||
@@ -780,7 +780,7 @@ static int longhaul_setup_southbridge(void) | |||
780 | 780 | ||
781 | static int __init longhaul_cpu_init(struct cpufreq_policy *policy) | 781 | static int __init longhaul_cpu_init(struct cpufreq_policy *policy) |
782 | { | 782 | { |
783 | struct cpuinfo_x86 *c = cpu_data; | 783 | struct cpuinfo_x86 *c = &cpu_data(0); |
784 | char *cpuname=NULL; | 784 | char *cpuname=NULL; |
785 | int ret; | 785 | int ret; |
786 | u32 lo, hi; | 786 | u32 lo, hi; |
@@ -959,7 +959,7 @@ static struct cpufreq_driver longhaul_driver = { | |||
959 | 959 | ||
960 | static int __init longhaul_init(void) | 960 | static int __init longhaul_init(void) |
961 | { | 961 | { |
962 | struct cpuinfo_x86 *c = cpu_data; | 962 | struct cpuinfo_x86 *c = &cpu_data(0); |
963 | 963 | ||
964 | if (c->x86_vendor != X86_VENDOR_CENTAUR || c->x86 != 6) | 964 | if (c->x86_vendor != X86_VENDOR_CENTAUR || c->x86 != 6) |
965 | return -ENODEV; | 965 | return -ENODEV; |
diff --git a/arch/x86/kernel/cpu/cpufreq/longrun.c b/arch/x86/kernel/cpu/cpufreq/longrun.c index b2689514295a..af4a867a097c 100644 --- a/arch/x86/kernel/cpu/cpufreq/longrun.c +++ b/arch/x86/kernel/cpu/cpufreq/longrun.c | |||
@@ -172,7 +172,7 @@ static unsigned int __init longrun_determine_freqs(unsigned int *low_freq, | |||
172 | u32 save_lo, save_hi; | 172 | u32 save_lo, save_hi; |
173 | u32 eax, ebx, ecx, edx; | 173 | u32 eax, ebx, ecx, edx; |
174 | u32 try_hi; | 174 | u32 try_hi; |
175 | struct cpuinfo_x86 *c = cpu_data; | 175 | struct cpuinfo_x86 *c = &cpu_data(0); |
176 | 176 | ||
177 | if (!low_freq || !high_freq) | 177 | if (!low_freq || !high_freq) |
178 | return -EINVAL; | 178 | return -EINVAL; |
@@ -298,7 +298,7 @@ static struct cpufreq_driver longrun_driver = { | |||
298 | */ | 298 | */ |
299 | static int __init longrun_init(void) | 299 | static int __init longrun_init(void) |
300 | { | 300 | { |
301 | struct cpuinfo_x86 *c = cpu_data; | 301 | struct cpuinfo_x86 *c = &cpu_data(0); |
302 | 302 | ||
303 | if (c->x86_vendor != X86_VENDOR_TRANSMETA || | 303 | if (c->x86_vendor != X86_VENDOR_TRANSMETA || |
304 | !cpu_has(c, X86_FEATURE_LONGRUN)) | 304 | !cpu_has(c, X86_FEATURE_LONGRUN)) |
diff --git a/arch/x86/kernel/cpu/cpufreq/p4-clockmod.c b/arch/x86/kernel/cpu/cpufreq/p4-clockmod.c index 793eae854f4f..14791ec55cfd 100644 --- a/arch/x86/kernel/cpu/cpufreq/p4-clockmod.c +++ b/arch/x86/kernel/cpu/cpufreq/p4-clockmod.c | |||
@@ -195,7 +195,7 @@ static unsigned int cpufreq_p4_get_frequency(struct cpuinfo_x86 *c) | |||
195 | 195 | ||
196 | static int cpufreq_p4_cpu_init(struct cpufreq_policy *policy) | 196 | static int cpufreq_p4_cpu_init(struct cpufreq_policy *policy) |
197 | { | 197 | { |
198 | struct cpuinfo_x86 *c = &cpu_data[policy->cpu]; | 198 | struct cpuinfo_x86 *c = &cpu_data(policy->cpu); |
199 | int cpuid = 0; | 199 | int cpuid = 0; |
200 | unsigned int i; | 200 | unsigned int i; |
201 | 201 | ||
@@ -279,7 +279,7 @@ static struct cpufreq_driver p4clockmod_driver = { | |||
279 | 279 | ||
280 | static int __init cpufreq_p4_init(void) | 280 | static int __init cpufreq_p4_init(void) |
281 | { | 281 | { |
282 | struct cpuinfo_x86 *c = cpu_data; | 282 | struct cpuinfo_x86 *c = &cpu_data(0); |
283 | int ret; | 283 | int ret; |
284 | 284 | ||
285 | /* | 285 | /* |
diff --git a/arch/x86/kernel/cpu/cpufreq/powernow-k6.c b/arch/x86/kernel/cpu/cpufreq/powernow-k6.c index 6d0285339317..eb9b62b0830c 100644 --- a/arch/x86/kernel/cpu/cpufreq/powernow-k6.c +++ b/arch/x86/kernel/cpu/cpufreq/powernow-k6.c | |||
@@ -1,6 +1,6 @@ | |||
1 | /* | 1 | /* |
2 | * This file was based upon code in Powertweak Linux (http://powertweak.sf.net) | 2 | * This file was based upon code in Powertweak Linux (http://powertweak.sf.net) |
3 | * (C) 2000-2003 Dave Jones, Arjan van de Ven, Janne Pänkälä, Dominik Brodowski. | 3 | * (C) 2000-2003 Dave Jones, Arjan van de Ven, Janne Pänkälä, Dominik Brodowski. |
4 | * | 4 | * |
5 | * Licensed under the terms of the GNU GPL License version 2. | 5 | * Licensed under the terms of the GNU GPL License version 2. |
6 | * | 6 | * |
@@ -215,7 +215,7 @@ static struct cpufreq_driver powernow_k6_driver = { | |||
215 | */ | 215 | */ |
216 | static int __init powernow_k6_init(void) | 216 | static int __init powernow_k6_init(void) |
217 | { | 217 | { |
218 | struct cpuinfo_x86 *c = cpu_data; | 218 | struct cpuinfo_x86 *c = &cpu_data(0); |
219 | 219 | ||
220 | if ((c->x86_vendor != X86_VENDOR_AMD) || (c->x86 != 5) || | 220 | if ((c->x86_vendor != X86_VENDOR_AMD) || (c->x86 != 5) || |
221 | ((c->x86_model != 12) && (c->x86_model != 13))) | 221 | ((c->x86_model != 12) && (c->x86_model != 13))) |
diff --git a/arch/x86/kernel/cpu/cpufreq/powernow-k7.c b/arch/x86/kernel/cpu/cpufreq/powernow-k7.c index f3686a5f2308..b5a9863d6cdc 100644 --- a/arch/x86/kernel/cpu/cpufreq/powernow-k7.c +++ b/arch/x86/kernel/cpu/cpufreq/powernow-k7.c | |||
@@ -114,7 +114,7 @@ static int check_fsb(unsigned int fsbspeed) | |||
114 | 114 | ||
115 | static int check_powernow(void) | 115 | static int check_powernow(void) |
116 | { | 116 | { |
117 | struct cpuinfo_x86 *c = cpu_data; | 117 | struct cpuinfo_x86 *c = &cpu_data(0); |
118 | unsigned int maxei, eax, ebx, ecx, edx; | 118 | unsigned int maxei, eax, ebx, ecx, edx; |
119 | 119 | ||
120 | if ((c->x86_vendor != X86_VENDOR_AMD) || (c->x86 !=6)) { | 120 | if ((c->x86_vendor != X86_VENDOR_AMD) || (c->x86 !=6)) { |
diff --git a/arch/x86/kernel/cpu/cpufreq/powernow-k8.c b/arch/x86/kernel/cpu/cpufreq/powernow-k8.c index c06ac680c9ca..9c36a53676b7 100644 --- a/arch/x86/kernel/cpu/cpufreq/powernow-k8.c +++ b/arch/x86/kernel/cpu/cpufreq/powernow-k8.c | |||
@@ -168,7 +168,7 @@ static void count_off_irt(struct powernow_k8_data *data) | |||
168 | return; | 168 | return; |
169 | } | 169 | } |
170 | 170 | ||
171 | /* the voltage stabalization time */ | 171 | /* the voltage stabilization time */ |
172 | static void count_off_vst(struct powernow_k8_data *data) | 172 | static void count_off_vst(struct powernow_k8_data *data) |
173 | { | 173 | { |
174 | udelay(data->vstable * VST_UNITS_20US); | 174 | udelay(data->vstable * VST_UNITS_20US); |
diff --git a/arch/x86/kernel/cpu/cpufreq/powernow-k8.h b/arch/x86/kernel/cpu/cpufreq/powernow-k8.h index b06c812208ca..7c4f6e0faed4 100644 --- a/arch/x86/kernel/cpu/cpufreq/powernow-k8.h +++ b/arch/x86/kernel/cpu/cpufreq/powernow-k8.h | |||
@@ -148,10 +148,10 @@ struct powernow_k8_data { | |||
148 | #define PLL_LOCK_CONVERSION (1000/5) /* ms to ns, then divide by clock period */ | 148 | #define PLL_LOCK_CONVERSION (1000/5) /* ms to ns, then divide by clock period */ |
149 | 149 | ||
150 | #define MAXIMUM_VID_STEPS 1 /* Current cpus only allow a single step of 25mV */ | 150 | #define MAXIMUM_VID_STEPS 1 /* Current cpus only allow a single step of 25mV */ |
151 | #define VST_UNITS_20US 20 /* Voltage Stabalization Time is in units of 20us */ | 151 | #define VST_UNITS_20US 20 /* Voltage Stabilization Time is in units of 20us */ |
152 | 152 | ||
153 | /* | 153 | /* |
154 | * Most values of interest are enocoded in a single field of the _PSS | 154 | * Most values of interest are encoded in a single field of the _PSS |
155 | * entries: the "control" value. | 155 | * entries: the "control" value. |
156 | */ | 156 | */ |
157 | 157 | ||
diff --git a/arch/x86/kernel/cpu/cpufreq/sc520_freq.c b/arch/x86/kernel/cpu/cpufreq/sc520_freq.c index d9f3e90a7ae0..42da9bd677d6 100644 --- a/arch/x86/kernel/cpu/cpufreq/sc520_freq.c +++ b/arch/x86/kernel/cpu/cpufreq/sc520_freq.c | |||
@@ -102,7 +102,7 @@ static int sc520_freq_target (struct cpufreq_policy *policy, | |||
102 | 102 | ||
103 | static int sc520_freq_cpu_init(struct cpufreq_policy *policy) | 103 | static int sc520_freq_cpu_init(struct cpufreq_policy *policy) |
104 | { | 104 | { |
105 | struct cpuinfo_x86 *c = cpu_data; | 105 | struct cpuinfo_x86 *c = &cpu_data(0); |
106 | int result; | 106 | int result; |
107 | 107 | ||
108 | /* capability check */ | 108 | /* capability check */ |
@@ -151,7 +151,7 @@ static struct cpufreq_driver sc520_freq_driver = { | |||
151 | 151 | ||
152 | static int __init sc520_freq_init(void) | 152 | static int __init sc520_freq_init(void) |
153 | { | 153 | { |
154 | struct cpuinfo_x86 *c = cpu_data; | 154 | struct cpuinfo_x86 *c = &cpu_data(0); |
155 | int err; | 155 | int err; |
156 | 156 | ||
157 | /* Test if we have the right hardware */ | 157 | /* Test if we have the right hardware */ |
diff --git a/arch/x86/kernel/cpu/cpufreq/speedstep-centrino.c b/arch/x86/kernel/cpu/cpufreq/speedstep-centrino.c index 811d47438546..3031f1196192 100644 --- a/arch/x86/kernel/cpu/cpufreq/speedstep-centrino.c +++ b/arch/x86/kernel/cpu/cpufreq/speedstep-centrino.c | |||
@@ -230,7 +230,7 @@ static struct cpu_model models[] = | |||
230 | 230 | ||
231 | static int centrino_cpu_init_table(struct cpufreq_policy *policy) | 231 | static int centrino_cpu_init_table(struct cpufreq_policy *policy) |
232 | { | 232 | { |
233 | struct cpuinfo_x86 *cpu = &cpu_data[policy->cpu]; | 233 | struct cpuinfo_x86 *cpu = &cpu_data(policy->cpu); |
234 | struct cpu_model *model; | 234 | struct cpu_model *model; |
235 | 235 | ||
236 | for(model = models; model->cpu_id != NULL; model++) | 236 | for(model = models; model->cpu_id != NULL; model++) |
@@ -340,7 +340,7 @@ static unsigned int get_cur_freq(unsigned int cpu) | |||
340 | 340 | ||
341 | static int centrino_cpu_init(struct cpufreq_policy *policy) | 341 | static int centrino_cpu_init(struct cpufreq_policy *policy) |
342 | { | 342 | { |
343 | struct cpuinfo_x86 *cpu = &cpu_data[policy->cpu]; | 343 | struct cpuinfo_x86 *cpu = &cpu_data(policy->cpu); |
344 | unsigned freq; | 344 | unsigned freq; |
345 | unsigned l, h; | 345 | unsigned l, h; |
346 | int ret; | 346 | int ret; |
@@ -612,7 +612,7 @@ static struct cpufreq_driver centrino_driver = { | |||
612 | */ | 612 | */ |
613 | static int __init centrino_init(void) | 613 | static int __init centrino_init(void) |
614 | { | 614 | { |
615 | struct cpuinfo_x86 *cpu = cpu_data; | 615 | struct cpuinfo_x86 *cpu = &cpu_data(0); |
616 | 616 | ||
617 | if (!cpu_has(cpu, X86_FEATURE_EST)) | 617 | if (!cpu_has(cpu, X86_FEATURE_EST)) |
618 | return -ENODEV; | 618 | return -ENODEV; |
diff --git a/arch/x86/kernel/cpu/cpufreq/speedstep-lib.c b/arch/x86/kernel/cpu/cpufreq/speedstep-lib.c index b1acc8ce3167..76c3ab0da468 100644 --- a/arch/x86/kernel/cpu/cpufreq/speedstep-lib.c +++ b/arch/x86/kernel/cpu/cpufreq/speedstep-lib.c | |||
@@ -228,7 +228,7 @@ EXPORT_SYMBOL_GPL(speedstep_get_processor_frequency); | |||
228 | 228 | ||
229 | unsigned int speedstep_detect_processor (void) | 229 | unsigned int speedstep_detect_processor (void) |
230 | { | 230 | { |
231 | struct cpuinfo_x86 *c = cpu_data; | 231 | struct cpuinfo_x86 *c = &cpu_data(0); |
232 | u32 ebx, msr_lo, msr_hi; | 232 | u32 ebx, msr_lo, msr_hi; |
233 | 233 | ||
234 | dprintk("x86: %x, model: %x\n", c->x86, c->x86_model); | 234 | dprintk("x86: %x, model: %x\n", c->x86, c->x86_model); |
diff --git a/arch/x86/kernel/cpu/cyrix.c b/arch/x86/kernel/cpu/cyrix.c index 122d2d75aa9f..88d66fb8411d 100644 --- a/arch/x86/kernel/cpu/cyrix.c +++ b/arch/x86/kernel/cpu/cyrix.c | |||
@@ -93,7 +93,7 @@ static void __cpuinit check_cx686_slop(struct cpuinfo_x86 *c) | |||
93 | 93 | ||
94 | local_irq_save(flags); | 94 | local_irq_save(flags); |
95 | ccr3 = getCx86(CX86_CCR3); | 95 | ccr3 = getCx86(CX86_CCR3); |
96 | setCx86(CX86_CCR3, (ccr3 & 0x0f) | 0x10); /* enable MAPEN */ | 96 | setCx86(CX86_CCR3, (ccr3 & 0x0f) | 0x10); /* enable MAPEN */ |
97 | ccr5 = getCx86(CX86_CCR5); | 97 | ccr5 = getCx86(CX86_CCR5); |
98 | if (ccr5 & 2) | 98 | if (ccr5 & 2) |
99 | setCx86(CX86_CCR5, ccr5 & 0xfd); /* reset SLOP */ | 99 | setCx86(CX86_CCR5, ccr5 & 0xfd); /* reset SLOP */ |
@@ -115,9 +115,9 @@ static void __cpuinit set_cx86_reorder(void) | |||
115 | 115 | ||
116 | printk(KERN_INFO "Enable Memory access reorder on Cyrix/NSC processor.\n"); | 116 | printk(KERN_INFO "Enable Memory access reorder on Cyrix/NSC processor.\n"); |
117 | ccr3 = getCx86(CX86_CCR3); | 117 | ccr3 = getCx86(CX86_CCR3); |
118 | setCx86(CX86_CCR3, (ccr3 & 0x0f) | 0x10); /* enable MAPEN */ | 118 | setCx86(CX86_CCR3, (ccr3 & 0x0f) | 0x10); /* enable MAPEN */ |
119 | 119 | ||
120 | /* Load/Store Serialize to mem access disable (=reorder it) */ | 120 | /* Load/Store Serialize to mem access disable (=reorder it) */ |
121 | setCx86(CX86_PCR0, getCx86(CX86_PCR0) & ~0x80); | 121 | setCx86(CX86_PCR0, getCx86(CX86_PCR0) & ~0x80); |
122 | /* set load/store serialize from 1GB to 4GB */ | 122 | /* set load/store serialize from 1GB to 4GB */ |
123 | ccr3 |= 0xe0; | 123 | ccr3 |= 0xe0; |
@@ -146,7 +146,7 @@ static void __cpuinit set_cx86_inc(void) | |||
146 | printk(KERN_INFO "Enable Incrementor on Cyrix/NSC processor.\n"); | 146 | printk(KERN_INFO "Enable Incrementor on Cyrix/NSC processor.\n"); |
147 | 147 | ||
148 | ccr3 = getCx86(CX86_CCR3); | 148 | ccr3 = getCx86(CX86_CCR3); |
149 | setCx86(CX86_CCR3, (ccr3 & 0x0f) | 0x10); /* enable MAPEN */ | 149 | setCx86(CX86_CCR3, (ccr3 & 0x0f) | 0x10); /* enable MAPEN */ |
150 | /* PCR1 -- Performance Control */ | 150 | /* PCR1 -- Performance Control */ |
151 | /* Incrementor on, whatever that is */ | 151 | /* Incrementor on, whatever that is */ |
152 | setCx86(CX86_PCR1, getCx86(CX86_PCR1) | 0x02); | 152 | setCx86(CX86_PCR1, getCx86(CX86_PCR1) | 0x02); |
@@ -256,7 +256,7 @@ static void __cpuinit init_cyrix(struct cpuinfo_x86 *c) | |||
256 | u32 vendor, device; | 256 | u32 vendor, device; |
257 | /* It isn't really a PCI quirk directly, but the cure is the | 257 | /* It isn't really a PCI quirk directly, but the cure is the |
258 | same. The MediaGX has deep magic SMM stuff that handles the | 258 | same. The MediaGX has deep magic SMM stuff that handles the |
259 | SB emulation. It thows away the fifo on disable_dma() which | 259 | SB emulation. It throws away the fifo on disable_dma() which |
260 | is wrong and ruins the audio. | 260 | is wrong and ruins the audio. |
261 | 261 | ||
262 | Bug2: VSA1 has a wrap bug so that using maximum sized DMA | 262 | Bug2: VSA1 has a wrap bug so that using maximum sized DMA |
diff --git a/arch/x86/kernel/cpu/intel_cacheinfo.c b/arch/x86/kernel/cpu/intel_cacheinfo.c index 1826395ebeeb..9921b01fe199 100644 --- a/arch/x86/kernel/cpu/intel_cacheinfo.c +++ b/arch/x86/kernel/cpu/intel_cacheinfo.c | |||
@@ -295,7 +295,7 @@ unsigned int __cpuinit init_intel_cacheinfo(struct cpuinfo_x86 *c) | |||
295 | unsigned int new_l2 = 0, new_l3 = 0, i; /* Cache sizes from cpuid(4) */ | 295 | unsigned int new_l2 = 0, new_l3 = 0, i; /* Cache sizes from cpuid(4) */ |
296 | unsigned int l2_id = 0, l3_id = 0, num_threads_sharing, index_msb; | 296 | unsigned int l2_id = 0, l3_id = 0, num_threads_sharing, index_msb; |
297 | #ifdef CONFIG_X86_HT | 297 | #ifdef CONFIG_X86_HT |
298 | unsigned int cpu = (c == &boot_cpu_data) ? 0 : (c - cpu_data); | 298 | unsigned int cpu = c->cpu_index; |
299 | #endif | 299 | #endif |
300 | 300 | ||
301 | if (c->cpuid_level > 3) { | 301 | if (c->cpuid_level > 3) { |
@@ -417,14 +417,14 @@ unsigned int __cpuinit init_intel_cacheinfo(struct cpuinfo_x86 *c) | |||
417 | if (new_l2) { | 417 | if (new_l2) { |
418 | l2 = new_l2; | 418 | l2 = new_l2; |
419 | #ifdef CONFIG_X86_HT | 419 | #ifdef CONFIG_X86_HT |
420 | cpu_llc_id[cpu] = l2_id; | 420 | per_cpu(cpu_llc_id, cpu) = l2_id; |
421 | #endif | 421 | #endif |
422 | } | 422 | } |
423 | 423 | ||
424 | if (new_l3) { | 424 | if (new_l3) { |
425 | l3 = new_l3; | 425 | l3 = new_l3; |
426 | #ifdef CONFIG_X86_HT | 426 | #ifdef CONFIG_X86_HT |
427 | cpu_llc_id[cpu] = l3_id; | 427 | per_cpu(cpu_llc_id, cpu) = l3_id; |
428 | #endif | 428 | #endif |
429 | } | 429 | } |
430 | 430 | ||
@@ -459,7 +459,7 @@ static void __cpuinit cache_shared_cpu_map_setup(unsigned int cpu, int index) | |||
459 | struct _cpuid4_info *this_leaf, *sibling_leaf; | 459 | struct _cpuid4_info *this_leaf, *sibling_leaf; |
460 | unsigned long num_threads_sharing; | 460 | unsigned long num_threads_sharing; |
461 | int index_msb, i; | 461 | int index_msb, i; |
462 | struct cpuinfo_x86 *c = cpu_data; | 462 | struct cpuinfo_x86 *c = &cpu_data(cpu); |
463 | 463 | ||
464 | this_leaf = CPUID4_INFO_IDX(cpu, index); | 464 | this_leaf = CPUID4_INFO_IDX(cpu, index); |
465 | num_threads_sharing = 1 + this_leaf->eax.split.num_threads_sharing; | 465 | num_threads_sharing = 1 + this_leaf->eax.split.num_threads_sharing; |
@@ -470,8 +470,8 @@ static void __cpuinit cache_shared_cpu_map_setup(unsigned int cpu, int index) | |||
470 | index_msb = get_count_order(num_threads_sharing); | 470 | index_msb = get_count_order(num_threads_sharing); |
471 | 471 | ||
472 | for_each_online_cpu(i) { | 472 | for_each_online_cpu(i) { |
473 | if (c[i].apicid >> index_msb == | 473 | if (cpu_data(i).apicid >> index_msb == |
474 | c[cpu].apicid >> index_msb) { | 474 | c->apicid >> index_msb) { |
475 | cpu_set(i, this_leaf->shared_cpu_map); | 475 | cpu_set(i, this_leaf->shared_cpu_map); |
476 | if (i != cpu && cpuid4_info[i]) { | 476 | if (i != cpu && cpuid4_info[i]) { |
477 | sibling_leaf = CPUID4_INFO_IDX(i, index); | 477 | sibling_leaf = CPUID4_INFO_IDX(i, index); |
@@ -499,6 +499,11 @@ static void __cpuinit cache_remove_shared_cpu_map(unsigned int cpu, int index) { | |||
499 | 499 | ||
500 | static void free_cache_attributes(unsigned int cpu) | 500 | static void free_cache_attributes(unsigned int cpu) |
501 | { | 501 | { |
502 | int i; | ||
503 | |||
504 | for (i = 0; i < num_cache_leaves; i++) | ||
505 | cache_remove_shared_cpu_map(cpu, i); | ||
506 | |||
502 | kfree(cpuid4_info[cpu]); | 507 | kfree(cpuid4_info[cpu]); |
503 | cpuid4_info[cpu] = NULL; | 508 | cpuid4_info[cpu] = NULL; |
504 | } | 509 | } |
@@ -506,8 +511,8 @@ static void free_cache_attributes(unsigned int cpu) | |||
506 | static int __cpuinit detect_cache_attributes(unsigned int cpu) | 511 | static int __cpuinit detect_cache_attributes(unsigned int cpu) |
507 | { | 512 | { |
508 | struct _cpuid4_info *this_leaf; | 513 | struct _cpuid4_info *this_leaf; |
509 | unsigned long j; | 514 | unsigned long j; |
510 | int retval; | 515 | int retval; |
511 | cpumask_t oldmask; | 516 | cpumask_t oldmask; |
512 | 517 | ||
513 | if (num_cache_leaves == 0) | 518 | if (num_cache_leaves == 0) |
@@ -524,19 +529,26 @@ static int __cpuinit detect_cache_attributes(unsigned int cpu) | |||
524 | goto out; | 529 | goto out; |
525 | 530 | ||
526 | /* Do cpuid and store the results */ | 531 | /* Do cpuid and store the results */ |
527 | retval = 0; | ||
528 | for (j = 0; j < num_cache_leaves; j++) { | 532 | for (j = 0; j < num_cache_leaves; j++) { |
529 | this_leaf = CPUID4_INFO_IDX(cpu, j); | 533 | this_leaf = CPUID4_INFO_IDX(cpu, j); |
530 | retval = cpuid4_cache_lookup(j, this_leaf); | 534 | retval = cpuid4_cache_lookup(j, this_leaf); |
531 | if (unlikely(retval < 0)) | 535 | if (unlikely(retval < 0)) { |
536 | int i; | ||
537 | |||
538 | for (i = 0; i < j; i++) | ||
539 | cache_remove_shared_cpu_map(cpu, i); | ||
532 | break; | 540 | break; |
541 | } | ||
533 | cache_shared_cpu_map_setup(cpu, j); | 542 | cache_shared_cpu_map_setup(cpu, j); |
534 | } | 543 | } |
535 | set_cpus_allowed(current, oldmask); | 544 | set_cpus_allowed(current, oldmask); |
536 | 545 | ||
537 | out: | 546 | out: |
538 | if (retval) | 547 | if (retval) { |
539 | free_cache_attributes(cpu); | 548 | kfree(cpuid4_info[cpu]); |
549 | cpuid4_info[cpu] = NULL; | ||
550 | } | ||
551 | |||
540 | return retval; | 552 | return retval; |
541 | } | 553 | } |
542 | 554 | ||
@@ -669,7 +681,7 @@ static struct kobj_type ktype_percpu_entry = { | |||
669 | .sysfs_ops = &sysfs_ops, | 681 | .sysfs_ops = &sysfs_ops, |
670 | }; | 682 | }; |
671 | 683 | ||
672 | static void cpuid4_cache_sysfs_exit(unsigned int cpu) | 684 | static void __cpuinit cpuid4_cache_sysfs_exit(unsigned int cpu) |
673 | { | 685 | { |
674 | kfree(cache_kobject[cpu]); | 686 | kfree(cache_kobject[cpu]); |
675 | kfree(index_kobject[cpu]); | 687 | kfree(index_kobject[cpu]); |
@@ -680,13 +692,14 @@ static void cpuid4_cache_sysfs_exit(unsigned int cpu) | |||
680 | 692 | ||
681 | static int __cpuinit cpuid4_cache_sysfs_init(unsigned int cpu) | 693 | static int __cpuinit cpuid4_cache_sysfs_init(unsigned int cpu) |
682 | { | 694 | { |
695 | int err; | ||
683 | 696 | ||
684 | if (num_cache_leaves == 0) | 697 | if (num_cache_leaves == 0) |
685 | return -ENOENT; | 698 | return -ENOENT; |
686 | 699 | ||
687 | detect_cache_attributes(cpu); | 700 | err = detect_cache_attributes(cpu); |
688 | if (cpuid4_info[cpu] == NULL) | 701 | if (err) |
689 | return -ENOENT; | 702 | return err; |
690 | 703 | ||
691 | /* Allocate all required memory */ | 704 | /* Allocate all required memory */ |
692 | cache_kobject[cpu] = kzalloc(sizeof(struct kobject), GFP_KERNEL); | 705 | cache_kobject[cpu] = kzalloc(sizeof(struct kobject), GFP_KERNEL); |
@@ -705,13 +718,15 @@ err_out: | |||
705 | return -ENOMEM; | 718 | return -ENOMEM; |
706 | } | 719 | } |
707 | 720 | ||
721 | static cpumask_t cache_dev_map = CPU_MASK_NONE; | ||
722 | |||
708 | /* Add/Remove cache interface for CPU device */ | 723 | /* Add/Remove cache interface for CPU device */ |
709 | static int __cpuinit cache_add_dev(struct sys_device * sys_dev) | 724 | static int __cpuinit cache_add_dev(struct sys_device * sys_dev) |
710 | { | 725 | { |
711 | unsigned int cpu = sys_dev->id; | 726 | unsigned int cpu = sys_dev->id; |
712 | unsigned long i, j; | 727 | unsigned long i, j; |
713 | struct _index_kobject *this_object; | 728 | struct _index_kobject *this_object; |
714 | int retval = 0; | 729 | int retval; |
715 | 730 | ||
716 | retval = cpuid4_cache_sysfs_init(cpu); | 731 | retval = cpuid4_cache_sysfs_init(cpu); |
717 | if (unlikely(retval < 0)) | 732 | if (unlikely(retval < 0)) |
@@ -721,6 +736,10 @@ static int __cpuinit cache_add_dev(struct sys_device * sys_dev) | |||
721 | kobject_set_name(cache_kobject[cpu], "%s", "cache"); | 736 | kobject_set_name(cache_kobject[cpu], "%s", "cache"); |
722 | cache_kobject[cpu]->ktype = &ktype_percpu_entry; | 737 | cache_kobject[cpu]->ktype = &ktype_percpu_entry; |
723 | retval = kobject_register(cache_kobject[cpu]); | 738 | retval = kobject_register(cache_kobject[cpu]); |
739 | if (retval < 0) { | ||
740 | cpuid4_cache_sysfs_exit(cpu); | ||
741 | return retval; | ||
742 | } | ||
724 | 743 | ||
725 | for (i = 0; i < num_cache_leaves; i++) { | 744 | for (i = 0; i < num_cache_leaves; i++) { |
726 | this_object = INDEX_KOBJECT_PTR(cpu,i); | 745 | this_object = INDEX_KOBJECT_PTR(cpu,i); |
@@ -740,6 +759,9 @@ static int __cpuinit cache_add_dev(struct sys_device * sys_dev) | |||
740 | break; | 759 | break; |
741 | } | 760 | } |
742 | } | 761 | } |
762 | if (!retval) | ||
763 | cpu_set(cpu, cache_dev_map); | ||
764 | |||
743 | return retval; | 765 | return retval; |
744 | } | 766 | } |
745 | 767 | ||
@@ -750,13 +772,14 @@ static void __cpuinit cache_remove_dev(struct sys_device * sys_dev) | |||
750 | 772 | ||
751 | if (cpuid4_info[cpu] == NULL) | 773 | if (cpuid4_info[cpu] == NULL) |
752 | return; | 774 | return; |
753 | for (i = 0; i < num_cache_leaves; i++) { | 775 | if (!cpu_isset(cpu, cache_dev_map)) |
754 | cache_remove_shared_cpu_map(cpu, i); | 776 | return; |
777 | cpu_clear(cpu, cache_dev_map); | ||
778 | |||
779 | for (i = 0; i < num_cache_leaves; i++) | ||
755 | kobject_unregister(&(INDEX_KOBJECT_PTR(cpu,i)->kobj)); | 780 | kobject_unregister(&(INDEX_KOBJECT_PTR(cpu,i)->kobj)); |
756 | } | ||
757 | kobject_unregister(cache_kobject[cpu]); | 781 | kobject_unregister(cache_kobject[cpu]); |
758 | cpuid4_cache_sysfs_exit(cpu); | 782 | cpuid4_cache_sysfs_exit(cpu); |
759 | return; | ||
760 | } | 783 | } |
761 | 784 | ||
762 | static int __cpuinit cacheinfo_cpu_callback(struct notifier_block *nfb, | 785 | static int __cpuinit cacheinfo_cpu_callback(struct notifier_block *nfb, |
@@ -781,7 +804,7 @@ static int __cpuinit cacheinfo_cpu_callback(struct notifier_block *nfb, | |||
781 | 804 | ||
782 | static struct notifier_block __cpuinitdata cacheinfo_cpu_notifier = | 805 | static struct notifier_block __cpuinitdata cacheinfo_cpu_notifier = |
783 | { | 806 | { |
784 | .notifier_call = cacheinfo_cpu_callback, | 807 | .notifier_call = cacheinfo_cpu_callback, |
785 | }; | 808 | }; |
786 | 809 | ||
787 | static int __cpuinit cache_sysfs_init(void) | 810 | static int __cpuinit cache_sysfs_init(void) |
@@ -791,14 +814,15 @@ static int __cpuinit cache_sysfs_init(void) | |||
791 | if (num_cache_leaves == 0) | 814 | if (num_cache_leaves == 0) |
792 | return 0; | 815 | return 0; |
793 | 816 | ||
794 | register_hotcpu_notifier(&cacheinfo_cpu_notifier); | ||
795 | |||
796 | for_each_online_cpu(i) { | 817 | for_each_online_cpu(i) { |
797 | struct sys_device *sys_dev = get_cpu_sysdev((unsigned int)i); | 818 | int err; |
819 | struct sys_device *sys_dev = get_cpu_sysdev(i); | ||
798 | 820 | ||
799 | cache_add_dev(sys_dev); | 821 | err = cache_add_dev(sys_dev); |
822 | if (err) | ||
823 | return err; | ||
800 | } | 824 | } |
801 | 825 | register_hotcpu_notifier(&cacheinfo_cpu_notifier); | |
802 | return 0; | 826 | return 0; |
803 | } | 827 | } |
804 | 828 | ||
diff --git a/arch/x86/kernel/cpu/mcheck/therm_throt.c b/arch/x86/kernel/cpu/mcheck/therm_throt.c index 494d320d909b..24885be5c48c 100644 --- a/arch/x86/kernel/cpu/mcheck/therm_throt.c +++ b/arch/x86/kernel/cpu/mcheck/therm_throt.c | |||
@@ -131,17 +131,19 @@ static __cpuinit int thermal_throttle_cpu_callback(struct notifier_block *nfb, | |||
131 | { | 131 | { |
132 | unsigned int cpu = (unsigned long)hcpu; | 132 | unsigned int cpu = (unsigned long)hcpu; |
133 | struct sys_device *sys_dev; | 133 | struct sys_device *sys_dev; |
134 | int err; | 134 | int err = 0; |
135 | 135 | ||
136 | sys_dev = get_cpu_sysdev(cpu); | 136 | sys_dev = get_cpu_sysdev(cpu); |
137 | switch (action) { | 137 | switch (action) { |
138 | case CPU_ONLINE: | 138 | case CPU_UP_PREPARE: |
139 | case CPU_ONLINE_FROZEN: | 139 | case CPU_UP_PREPARE_FROZEN: |
140 | mutex_lock(&therm_cpu_lock); | 140 | mutex_lock(&therm_cpu_lock); |
141 | err = thermal_throttle_add_dev(sys_dev); | 141 | err = thermal_throttle_add_dev(sys_dev); |
142 | mutex_unlock(&therm_cpu_lock); | 142 | mutex_unlock(&therm_cpu_lock); |
143 | WARN_ON(err); | 143 | WARN_ON(err); |
144 | break; | 144 | break; |
145 | case CPU_UP_CANCELED: | ||
146 | case CPU_UP_CANCELED_FROZEN: | ||
145 | case CPU_DEAD: | 147 | case CPU_DEAD: |
146 | case CPU_DEAD_FROZEN: | 148 | case CPU_DEAD_FROZEN: |
147 | mutex_lock(&therm_cpu_lock); | 149 | mutex_lock(&therm_cpu_lock); |
@@ -149,7 +151,7 @@ static __cpuinit int thermal_throttle_cpu_callback(struct notifier_block *nfb, | |||
149 | mutex_unlock(&therm_cpu_lock); | 151 | mutex_unlock(&therm_cpu_lock); |
150 | break; | 152 | break; |
151 | } | 153 | } |
152 | return NOTIFY_OK; | 154 | return err ? NOTIFY_BAD : NOTIFY_OK; |
153 | } | 155 | } |
154 | 156 | ||
155 | static struct notifier_block thermal_throttle_cpu_notifier __cpuinitdata = | 157 | static struct notifier_block thermal_throttle_cpu_notifier __cpuinitdata = |
diff --git a/arch/x86/kernel/cpu/mtrr/cyrix.c b/arch/x86/kernel/cpu/mtrr/cyrix.c index 2287d4863a8a..9964be3de2b7 100644 --- a/arch/x86/kernel/cpu/mtrr/cyrix.c +++ b/arch/x86/kernel/cpu/mtrr/cyrix.c | |||
@@ -147,10 +147,10 @@ static void prepare_set(void) | |||
147 | write_cr0(cr0); | 147 | write_cr0(cr0); |
148 | wbinvd(); | 148 | wbinvd(); |
149 | 149 | ||
150 | /* Cyrix ARRs - everything else were excluded at the top */ | 150 | /* Cyrix ARRs - everything else was excluded at the top */ |
151 | ccr3 = getCx86(CX86_CCR3); | 151 | ccr3 = getCx86(CX86_CCR3); |
152 | 152 | ||
153 | /* Cyrix ARRs - everything else were excluded at the top */ | 153 | /* Cyrix ARRs - everything else was excluded at the top */ |
154 | setCx86(CX86_CCR3, (ccr3 & 0x0f) | 0x10); | 154 | setCx86(CX86_CCR3, (ccr3 & 0x0f) | 0x10); |
155 | 155 | ||
156 | } | 156 | } |
diff --git a/arch/x86/kernel/cpu/mtrr/generic.c b/arch/x86/kernel/cpu/mtrr/generic.c index 56f64e34829f..992f08dfbb6c 100644 --- a/arch/x86/kernel/cpu/mtrr/generic.c +++ b/arch/x86/kernel/cpu/mtrr/generic.c | |||
@@ -182,7 +182,7 @@ static inline void k8_enable_fixed_iorrs(void) | |||
182 | 182 | ||
183 | /** | 183 | /** |
184 | * Checks and updates an fixed-range MTRR if it differs from the value it | 184 | * Checks and updates an fixed-range MTRR if it differs from the value it |
185 | * should have. If K8 extenstions are wanted, update the K8 SYSCFG MSR also. | 185 | * should have. If K8 extentions are wanted, update the K8 SYSCFG MSR also. |
186 | * see AMD publication no. 24593, chapter 7.8.1, page 233 for more information | 186 | * see AMD publication no. 24593, chapter 7.8.1, page 233 for more information |
187 | * \param msr MSR address of the MTTR which should be checked and updated | 187 | * \param msr MSR address of the MTTR which should be checked and updated |
188 | * \param changed pointer which indicates whether the MTRR needed to be changed | 188 | * \param changed pointer which indicates whether the MTRR needed to be changed |
diff --git a/arch/x86/kernel/cpu/mtrr/main.c b/arch/x86/kernel/cpu/mtrr/main.c index 5e4be30ff903..9abbdf7562c5 100644 --- a/arch/x86/kernel/cpu/mtrr/main.c +++ b/arch/x86/kernel/cpu/mtrr/main.c | |||
@@ -748,7 +748,7 @@ static int __init mtrr_init_finialize(void) | |||
748 | if (use_intel()) | 748 | if (use_intel()) |
749 | mtrr_state_warn(); | 749 | mtrr_state_warn(); |
750 | else { | 750 | else { |
751 | /* The CPUs haven't MTRR and seemes not support SMP. They have | 751 | /* The CPUs haven't MTRR and seem to not support SMP. They have |
752 | * specific drivers, we use a tricky method to support | 752 | * specific drivers, we use a tricky method to support |
753 | * suspend/resume for them. | 753 | * suspend/resume for them. |
754 | * TBD: is there any system with such CPU which supports | 754 | * TBD: is there any system with such CPU which supports |
diff --git a/arch/x86/kernel/cpu/perfctr-watchdog.c b/arch/x86/kernel/cpu/perfctr-watchdog.c index 54cdbf1a40f1..c02541e6e653 100644 --- a/arch/x86/kernel/cpu/perfctr-watchdog.c +++ b/arch/x86/kernel/cpu/perfctr-watchdog.c | |||
@@ -120,7 +120,9 @@ int reserve_perfctr_nmi(unsigned int msr) | |||
120 | unsigned int counter; | 120 | unsigned int counter; |
121 | 121 | ||
122 | counter = nmi_perfctr_msr_to_bit(msr); | 122 | counter = nmi_perfctr_msr_to_bit(msr); |
123 | BUG_ON(counter > NMI_MAX_COUNTER_BITS); | 123 | /* register not managed by the allocator? */ |
124 | if (counter > NMI_MAX_COUNTER_BITS) | ||
125 | return 1; | ||
124 | 126 | ||
125 | if (!test_and_set_bit(counter, perfctr_nmi_owner)) | 127 | if (!test_and_set_bit(counter, perfctr_nmi_owner)) |
126 | return 1; | 128 | return 1; |
@@ -132,7 +134,9 @@ void release_perfctr_nmi(unsigned int msr) | |||
132 | unsigned int counter; | 134 | unsigned int counter; |
133 | 135 | ||
134 | counter = nmi_perfctr_msr_to_bit(msr); | 136 | counter = nmi_perfctr_msr_to_bit(msr); |
135 | BUG_ON(counter > NMI_MAX_COUNTER_BITS); | 137 | /* register not managed by the allocator? */ |
138 | if (counter > NMI_MAX_COUNTER_BITS) | ||
139 | return; | ||
136 | 140 | ||
137 | clear_bit(counter, perfctr_nmi_owner); | 141 | clear_bit(counter, perfctr_nmi_owner); |
138 | } | 142 | } |
@@ -142,7 +146,9 @@ int reserve_evntsel_nmi(unsigned int msr) | |||
142 | unsigned int counter; | 146 | unsigned int counter; |
143 | 147 | ||
144 | counter = nmi_evntsel_msr_to_bit(msr); | 148 | counter = nmi_evntsel_msr_to_bit(msr); |
145 | BUG_ON(counter > NMI_MAX_COUNTER_BITS); | 149 | /* register not managed by the allocator? */ |
150 | if (counter > NMI_MAX_COUNTER_BITS) | ||
151 | return 1; | ||
146 | 152 | ||
147 | if (!test_and_set_bit(counter, evntsel_nmi_owner)) | 153 | if (!test_and_set_bit(counter, evntsel_nmi_owner)) |
148 | return 1; | 154 | return 1; |
@@ -154,7 +160,9 @@ void release_evntsel_nmi(unsigned int msr) | |||
154 | unsigned int counter; | 160 | unsigned int counter; |
155 | 161 | ||
156 | counter = nmi_evntsel_msr_to_bit(msr); | 162 | counter = nmi_evntsel_msr_to_bit(msr); |
157 | BUG_ON(counter > NMI_MAX_COUNTER_BITS); | 163 | /* register not managed by the allocator? */ |
164 | if (counter > NMI_MAX_COUNTER_BITS) | ||
165 | return; | ||
158 | 166 | ||
159 | clear_bit(counter, evntsel_nmi_owner); | 167 | clear_bit(counter, evntsel_nmi_owner); |
160 | } | 168 | } |
diff --git a/arch/x86/kernel/cpu/proc.c b/arch/x86/kernel/cpu/proc.c index 879a0f789b1e..2d42b414b777 100644 --- a/arch/x86/kernel/cpu/proc.c +++ b/arch/x86/kernel/cpu/proc.c | |||
@@ -85,12 +85,13 @@ static int show_cpuinfo(struct seq_file *m, void *v) | |||
85 | /* nothing */ | 85 | /* nothing */ |
86 | }; | 86 | }; |
87 | struct cpuinfo_x86 *c = v; | 87 | struct cpuinfo_x86 *c = v; |
88 | int i, n = c - cpu_data; | 88 | int i, n = 0; |
89 | int fpu_exception; | 89 | int fpu_exception; |
90 | 90 | ||
91 | #ifdef CONFIG_SMP | 91 | #ifdef CONFIG_SMP |
92 | if (!cpu_online(n)) | 92 | if (!cpu_online(n)) |
93 | return 0; | 93 | return 0; |
94 | n = c->cpu_index; | ||
94 | #endif | 95 | #endif |
95 | seq_printf(m, "processor\t: %d\n" | 96 | seq_printf(m, "processor\t: %d\n" |
96 | "vendor_id\t: %s\n" | 97 | "vendor_id\t: %s\n" |
@@ -175,11 +176,15 @@ static int show_cpuinfo(struct seq_file *m, void *v) | |||
175 | 176 | ||
176 | static void *c_start(struct seq_file *m, loff_t *pos) | 177 | static void *c_start(struct seq_file *m, loff_t *pos) |
177 | { | 178 | { |
178 | return *pos < NR_CPUS ? cpu_data + *pos : NULL; | 179 | if (*pos == 0) /* just in case, cpu 0 is not the first */ |
180 | *pos = first_cpu(cpu_possible_map); | ||
181 | if ((*pos) < NR_CPUS && cpu_possible(*pos)) | ||
182 | return &cpu_data(*pos); | ||
183 | return NULL; | ||
179 | } | 184 | } |
180 | static void *c_next(struct seq_file *m, void *v, loff_t *pos) | 185 | static void *c_next(struct seq_file *m, void *v, loff_t *pos) |
181 | { | 186 | { |
182 | ++*pos; | 187 | *pos = next_cpu(*pos, cpu_possible_map); |
183 | return c_start(m, pos); | 188 | return c_start(m, pos); |
184 | } | 189 | } |
185 | static void c_stop(struct seq_file *m, void *v) | 190 | static void c_stop(struct seq_file *m, void *v) |
diff --git a/arch/x86/kernel/cpuid.c b/arch/x86/kernel/cpuid.c index 70dcf912d9fb..05c9936a16cc 100644 --- a/arch/x86/kernel/cpuid.c +++ b/arch/x86/kernel/cpuid.c | |||
@@ -114,7 +114,7 @@ static ssize_t cpuid_read(struct file *file, char __user *buf, | |||
114 | static int cpuid_open(struct inode *inode, struct file *file) | 114 | static int cpuid_open(struct inode *inode, struct file *file) |
115 | { | 115 | { |
116 | unsigned int cpu = iminor(file->f_path.dentry->d_inode); | 116 | unsigned int cpu = iminor(file->f_path.dentry->d_inode); |
117 | struct cpuinfo_x86 *c = &(cpu_data)[cpu]; | 117 | struct cpuinfo_x86 *c = &cpu_data(cpu); |
118 | 118 | ||
119 | if (cpu >= NR_CPUS || !cpu_online(cpu)) | 119 | if (cpu >= NR_CPUS || !cpu_online(cpu)) |
120 | return -ENXIO; /* No such CPU */ | 120 | return -ENXIO; /* No such CPU */ |
@@ -134,15 +134,18 @@ static const struct file_operations cpuid_fops = { | |||
134 | .open = cpuid_open, | 134 | .open = cpuid_open, |
135 | }; | 135 | }; |
136 | 136 | ||
137 | static int __cpuinit cpuid_device_create(int i) | 137 | static __cpuinit int cpuid_device_create(int cpu) |
138 | { | 138 | { |
139 | int err = 0; | ||
140 | struct device *dev; | 139 | struct device *dev; |
141 | 140 | ||
142 | dev = device_create(cpuid_class, NULL, MKDEV(CPUID_MAJOR, i), "cpu%d",i); | 141 | dev = device_create(cpuid_class, NULL, MKDEV(CPUID_MAJOR, cpu), |
143 | if (IS_ERR(dev)) | 142 | "cpu%d", cpu); |
144 | err = PTR_ERR(dev); | 143 | return IS_ERR(dev) ? PTR_ERR(dev) : 0; |
145 | return err; | 144 | } |
145 | |||
146 | static void cpuid_device_destroy(int cpu) | ||
147 | { | ||
148 | device_destroy(cpuid_class, MKDEV(CPUID_MAJOR, cpu)); | ||
146 | } | 149 | } |
147 | 150 | ||
148 | static int __cpuinit cpuid_class_cpu_callback(struct notifier_block *nfb, | 151 | static int __cpuinit cpuid_class_cpu_callback(struct notifier_block *nfb, |
@@ -150,18 +153,21 @@ static int __cpuinit cpuid_class_cpu_callback(struct notifier_block *nfb, | |||
150 | void *hcpu) | 153 | void *hcpu) |
151 | { | 154 | { |
152 | unsigned int cpu = (unsigned long)hcpu; | 155 | unsigned int cpu = (unsigned long)hcpu; |
156 | int err = 0; | ||
153 | 157 | ||
154 | switch (action) { | 158 | switch (action) { |
155 | case CPU_ONLINE: | 159 | case CPU_UP_PREPARE: |
156 | case CPU_ONLINE_FROZEN: | 160 | case CPU_UP_PREPARE_FROZEN: |
157 | cpuid_device_create(cpu); | 161 | err = cpuid_device_create(cpu); |
158 | break; | 162 | break; |
163 | case CPU_UP_CANCELED: | ||
164 | case CPU_UP_CANCELED_FROZEN: | ||
159 | case CPU_DEAD: | 165 | case CPU_DEAD: |
160 | case CPU_DEAD_FROZEN: | 166 | case CPU_DEAD_FROZEN: |
161 | device_destroy(cpuid_class, MKDEV(CPUID_MAJOR, cpu)); | 167 | cpuid_device_destroy(cpu); |
162 | break; | 168 | break; |
163 | } | 169 | } |
164 | return NOTIFY_OK; | 170 | return err ? NOTIFY_BAD : NOTIFY_OK; |
165 | } | 171 | } |
166 | 172 | ||
167 | static struct notifier_block __cpuinitdata cpuid_class_cpu_notifier = | 173 | static struct notifier_block __cpuinitdata cpuid_class_cpu_notifier = |
@@ -198,7 +204,7 @@ static int __init cpuid_init(void) | |||
198 | out_class: | 204 | out_class: |
199 | i = 0; | 205 | i = 0; |
200 | for_each_online_cpu(i) { | 206 | for_each_online_cpu(i) { |
201 | device_destroy(cpuid_class, MKDEV(CPUID_MAJOR, i)); | 207 | cpuid_device_destroy(i); |
202 | } | 208 | } |
203 | class_destroy(cpuid_class); | 209 | class_destroy(cpuid_class); |
204 | out_chrdev: | 210 | out_chrdev: |
@@ -212,7 +218,7 @@ static void __exit cpuid_exit(void) | |||
212 | int cpu = 0; | 218 | int cpu = 0; |
213 | 219 | ||
214 | for_each_online_cpu(cpu) | 220 | for_each_online_cpu(cpu) |
215 | device_destroy(cpuid_class, MKDEV(CPUID_MAJOR, cpu)); | 221 | cpuid_device_destroy(cpu); |
216 | class_destroy(cpuid_class); | 222 | class_destroy(cpuid_class); |
217 | unregister_chrdev(CPUID_MAJOR, "cpu/cpuid"); | 223 | unregister_chrdev(CPUID_MAJOR, "cpu/cpuid"); |
218 | unregister_hotcpu_notifier(&cpuid_class_cpu_notifier); | 224 | unregister_hotcpu_notifier(&cpuid_class_cpu_notifier); |
diff --git a/arch/x86/kernel/crash_dump_32.c b/arch/x86/kernel/crash_dump_32.c index 32e75d0731a9..72d0c56c1b48 100644 --- a/arch/x86/kernel/crash_dump_32.c +++ b/arch/x86/kernel/crash_dump_32.c | |||
@@ -47,6 +47,7 @@ ssize_t copy_oldmem_page(unsigned long pfn, char *buf, | |||
47 | if (!kdump_buf_page) { | 47 | if (!kdump_buf_page) { |
48 | printk(KERN_WARNING "Kdump: Kdump buffer page not" | 48 | printk(KERN_WARNING "Kdump: Kdump buffer page not" |
49 | " allocated\n"); | 49 | " allocated\n"); |
50 | kunmap_atomic(vaddr, KM_PTE0); | ||
50 | return -EFAULT; | 51 | return -EFAULT; |
51 | } | 52 | } |
52 | copy_page(kdump_buf_page, vaddr); | 53 | copy_page(kdump_buf_page, vaddr); |
diff --git a/arch/x86/kernel/e820_32.c b/arch/x86/kernel/e820_32.c index 3c86b979a40a..58fd54eb5577 100644 --- a/arch/x86/kernel/e820_32.c +++ b/arch/x86/kernel/e820_32.c | |||
@@ -288,7 +288,8 @@ legacy_init_iomem_resources(struct resource *code_resource, struct resource *dat | |||
288 | request_resource(res, code_resource); | 288 | request_resource(res, code_resource); |
289 | request_resource(res, data_resource); | 289 | request_resource(res, data_resource); |
290 | #ifdef CONFIG_KEXEC | 290 | #ifdef CONFIG_KEXEC |
291 | request_resource(res, &crashk_res); | 291 | if (crashk_res.start != crashk_res.end) |
292 | request_resource(res, &crashk_res); | ||
292 | #endif | 293 | #endif |
293 | } | 294 | } |
294 | } | 295 | } |
@@ -705,7 +706,7 @@ void __init e820_register_memory(void) | |||
705 | int i; | 706 | int i; |
706 | 707 | ||
707 | /* | 708 | /* |
708 | * Search for the bigest gap in the low 32 bits of the e820 | 709 | * Search for the biggest gap in the low 32 bits of the e820 |
709 | * memory space. | 710 | * memory space. |
710 | */ | 711 | */ |
711 | last = 0x100000000ull; | 712 | last = 0x100000000ull; |
diff --git a/arch/x86/kernel/e820_64.c b/arch/x86/kernel/e820_64.c index e422b8159f69..57616865d8a0 100644 --- a/arch/x86/kernel/e820_64.c +++ b/arch/x86/kernel/e820_64.c | |||
@@ -226,7 +226,8 @@ void __init e820_reserve_resources(void) | |||
226 | request_resource(res, &code_resource); | 226 | request_resource(res, &code_resource); |
227 | request_resource(res, &data_resource); | 227 | request_resource(res, &data_resource); |
228 | #ifdef CONFIG_KEXEC | 228 | #ifdef CONFIG_KEXEC |
229 | request_resource(res, &crashk_res); | 229 | if (crashk_res.start != crashk_res.end) |
230 | request_resource(res, &crashk_res); | ||
230 | #endif | 231 | #endif |
231 | } | 232 | } |
232 | } | 233 | } |
diff --git a/arch/x86/kernel/early-quirks_64.c b/arch/x86/kernel/early-quirks.c index 13aa4fd728f3..dc34acbd54aa 100644 --- a/arch/x86/kernel/early-quirks_64.c +++ b/arch/x86/kernel/early-quirks.c | |||
@@ -13,9 +13,13 @@ | |||
13 | #include <linux/acpi.h> | 13 | #include <linux/acpi.h> |
14 | #include <linux/pci_ids.h> | 14 | #include <linux/pci_ids.h> |
15 | #include <asm/pci-direct.h> | 15 | #include <asm/pci-direct.h> |
16 | #include <asm/proto.h> | ||
17 | #include <asm/iommu.h> | ||
18 | #include <asm/dma.h> | 16 | #include <asm/dma.h> |
17 | #include <asm/io_apic.h> | ||
18 | #include <asm/apic.h> | ||
19 | |||
20 | #ifdef CONFIG_IOMMU | ||
21 | #include <asm/iommu.h> | ||
22 | #endif | ||
19 | 23 | ||
20 | static void __init via_bugs(void) | 24 | static void __init via_bugs(void) |
21 | { | 25 | { |
@@ -23,7 +27,8 @@ static void __init via_bugs(void) | |||
23 | if ((end_pfn > MAX_DMA32_PFN || force_iommu) && | 27 | if ((end_pfn > MAX_DMA32_PFN || force_iommu) && |
24 | !iommu_aperture_allowed) { | 28 | !iommu_aperture_allowed) { |
25 | printk(KERN_INFO | 29 | printk(KERN_INFO |
26 | "Looks like a VIA chipset. Disabling IOMMU. Override with iommu=allowed\n"); | 30 | "Looks like a VIA chipset. Disabling IOMMU." |
31 | " Override with iommu=allowed\n"); | ||
27 | iommu_aperture_disabled = 1; | 32 | iommu_aperture_disabled = 1; |
28 | } | 33 | } |
29 | #endif | 34 | #endif |
@@ -40,6 +45,7 @@ static int __init nvidia_hpet_check(struct acpi_table_header *header) | |||
40 | static void __init nvidia_bugs(void) | 45 | static void __init nvidia_bugs(void) |
41 | { | 46 | { |
42 | #ifdef CONFIG_ACPI | 47 | #ifdef CONFIG_ACPI |
48 | #ifdef CONFIG_X86_IO_APIC | ||
43 | /* | 49 | /* |
44 | * All timer overrides on Nvidia are | 50 | * All timer overrides on Nvidia are |
45 | * wrong unless HPET is enabled. | 51 | * wrong unless HPET is enabled. |
@@ -59,17 +65,20 @@ static void __init nvidia_bugs(void) | |||
59 | "try acpi_use_timer_override\n"); | 65 | "try acpi_use_timer_override\n"); |
60 | } | 66 | } |
61 | #endif | 67 | #endif |
68 | #endif | ||
62 | /* RED-PEN skip them on mptables too? */ | 69 | /* RED-PEN skip them on mptables too? */ |
63 | 70 | ||
64 | } | 71 | } |
65 | 72 | ||
66 | static void __init ati_bugs(void) | 73 | static void __init ati_bugs(void) |
67 | { | 74 | { |
75 | #ifdef CONFIG_X86_IO_APIC | ||
68 | if (timer_over_8254 == 1) { | 76 | if (timer_over_8254 == 1) { |
69 | timer_over_8254 = 0; | 77 | timer_over_8254 = 0; |
70 | printk(KERN_INFO | 78 | printk(KERN_INFO |
71 | "ATI board detected. Disabling timer routing over 8254.\n"); | 79 | "ATI board detected. Disabling timer routing over 8254.\n"); |
72 | } | 80 | } |
81 | #endif | ||
73 | } | 82 | } |
74 | 83 | ||
75 | struct chipset { | 84 | struct chipset { |
@@ -104,7 +113,7 @@ void __init early_quirks(void) | |||
104 | if (class == 0xffffffff) | 113 | if (class == 0xffffffff) |
105 | break; | 114 | break; |
106 | 115 | ||
107 | if ((class >> 16) != PCI_CLASS_BRIDGE_PCI) | 116 | if ((class >> 16) != PCI_CLASS_BRIDGE_PCI) |
108 | continue; | 117 | continue; |
109 | 118 | ||
110 | vendor = read_pci_config(num, slot, func, | 119 | vendor = read_pci_config(num, slot, func, |
diff --git a/arch/x86/kernel/genapic_64.c b/arch/x86/kernel/genapic_64.c index 4ae03e3e8294..ce703e21c912 100644 --- a/arch/x86/kernel/genapic_64.c +++ b/arch/x86/kernel/genapic_64.c | |||
@@ -24,10 +24,19 @@ | |||
24 | #include <acpi/acpi_bus.h> | 24 | #include <acpi/acpi_bus.h> |
25 | #endif | 25 | #endif |
26 | 26 | ||
27 | /* which logical CPU number maps to which CPU (physical APIC ID) */ | 27 | /* |
28 | u8 x86_cpu_to_apicid[NR_CPUS] __read_mostly | 28 | * which logical CPU number maps to which CPU (physical APIC ID) |
29 | * | ||
30 | * The following static array is used during kernel startup | ||
31 | * and the x86_cpu_to_apicid_ptr contains the address of the | ||
32 | * array during this time. Is it zeroed when the per_cpu | ||
33 | * data area is removed. | ||
34 | */ | ||
35 | u8 x86_cpu_to_apicid_init[NR_CPUS] __initdata | ||
29 | = { [0 ... NR_CPUS-1] = BAD_APICID }; | 36 | = { [0 ... NR_CPUS-1] = BAD_APICID }; |
30 | EXPORT_SYMBOL(x86_cpu_to_apicid); | 37 | void *x86_cpu_to_apicid_ptr; |
38 | DEFINE_PER_CPU(u8, x86_cpu_to_apicid) = BAD_APICID; | ||
39 | EXPORT_PER_CPU_SYMBOL(x86_cpu_to_apicid); | ||
31 | 40 | ||
32 | struct genapic __read_mostly *genapic = &apic_flat; | 41 | struct genapic __read_mostly *genapic = &apic_flat; |
33 | 42 | ||
diff --git a/arch/x86/kernel/genapic_flat_64.c b/arch/x86/kernel/genapic_flat_64.c index 91c7526768ee..07352b74bda6 100644 --- a/arch/x86/kernel/genapic_flat_64.c +++ b/arch/x86/kernel/genapic_flat_64.c | |||
@@ -172,7 +172,7 @@ static unsigned int physflat_cpu_mask_to_apicid(cpumask_t cpumask) | |||
172 | */ | 172 | */ |
173 | cpu = first_cpu(cpumask); | 173 | cpu = first_cpu(cpumask); |
174 | if ((unsigned)cpu < NR_CPUS) | 174 | if ((unsigned)cpu < NR_CPUS) |
175 | return x86_cpu_to_apicid[cpu]; | 175 | return per_cpu(x86_cpu_to_apicid, cpu); |
176 | else | 176 | else |
177 | return BAD_APICID; | 177 | return BAD_APICID; |
178 | } | 178 | } |
diff --git a/arch/x86/kernel/head64.c b/arch/x86/kernel/head64.c index a7eee0a4751d..6b3469311e42 100644 --- a/arch/x86/kernel/head64.c +++ b/arch/x86/kernel/head64.c | |||
@@ -58,7 +58,7 @@ void __init x86_64_start_kernel(char * real_mode_data) | |||
58 | 58 | ||
59 | for (i = 0; i < IDT_ENTRIES; i++) | 59 | for (i = 0; i < IDT_ENTRIES; i++) |
60 | set_intr_gate(i, early_idt_handler); | 60 | set_intr_gate(i, early_idt_handler); |
61 | asm volatile("lidt %0" :: "m" (idt_descr)); | 61 | load_idt((const struct desc_ptr *)&idt_descr); |
62 | 62 | ||
63 | early_printk("Kernel alive\n"); | 63 | early_printk("Kernel alive\n"); |
64 | 64 | ||
diff --git a/arch/x86/kernel/hpet.c b/arch/x86/kernel/hpet.c index f8367074da0d..53303f2e5475 100644 --- a/arch/x86/kernel/hpet.c +++ b/arch/x86/kernel/hpet.c | |||
@@ -69,12 +69,15 @@ static inline void hpet_clear_mapping(void) | |||
69 | * HPET command line enable / disable | 69 | * HPET command line enable / disable |
70 | */ | 70 | */ |
71 | static int boot_hpet_disable; | 71 | static int boot_hpet_disable; |
72 | int hpet_force_user; | ||
72 | 73 | ||
73 | static int __init hpet_setup(char* str) | 74 | static int __init hpet_setup(char* str) |
74 | { | 75 | { |
75 | if (str) { | 76 | if (str) { |
76 | if (!strncmp("disable", str, 7)) | 77 | if (!strncmp("disable", str, 7)) |
77 | boot_hpet_disable = 1; | 78 | boot_hpet_disable = 1; |
79 | if (!strncmp("force", str, 5)) | ||
80 | hpet_force_user = 1; | ||
78 | } | 81 | } |
79 | return 1; | 82 | return 1; |
80 | } | 83 | } |
@@ -350,7 +353,7 @@ static int hpet_clocksource_register(void) | |||
350 | * | 353 | * |
351 | * hpet period is in femto seconds per cycle | 354 | * hpet period is in femto seconds per cycle |
352 | * so we need to convert this to ns/cyc units | 355 | * so we need to convert this to ns/cyc units |
353 | * aproximated by mult/2^shift | 356 | * approximated by mult/2^shift |
354 | * | 357 | * |
355 | * fsec/cyc * 1nsec/1000000fsec = nsec/cyc = mult/2^shift | 358 | * fsec/cyc * 1nsec/1000000fsec = nsec/cyc = mult/2^shift |
356 | * fsec/cyc * 1ns/1000000fsec * 2^shift = mult | 359 | * fsec/cyc * 1ns/1000000fsec * 2^shift = mult |
diff --git a/arch/x86/kernel/i8253.c b/arch/x86/kernel/i8253.c index 5cc8841ca2c6..a42c80745325 100644 --- a/arch/x86/kernel/i8253.c +++ b/arch/x86/kernel/i8253.c | |||
@@ -86,7 +86,7 @@ static int pit_next_event(unsigned long delta, struct clock_event_device *evt) | |||
86 | * On UP the PIT can serve all of the possible timer functions. On SMP systems | 86 | * On UP the PIT can serve all of the possible timer functions. On SMP systems |
87 | * it can be solely used for the global tick. | 87 | * it can be solely used for the global tick. |
88 | * | 88 | * |
89 | * The profiling and update capabilites are switched off once the local apic is | 89 | * The profiling and update capabilities are switched off once the local apic is |
90 | * registered. This mechanism replaces the previous #ifdef LOCAL_APIC - | 90 | * registered. This mechanism replaces the previous #ifdef LOCAL_APIC - |
91 | * !using_apic_timer decisions in do_timer_interrupt_hook() | 91 | * !using_apic_timer decisions in do_timer_interrupt_hook() |
92 | */ | 92 | */ |
diff --git a/arch/x86/kernel/i8259_32.c b/arch/x86/kernel/i8259_32.c index d34a10cc13a7..f634fc715c99 100644 --- a/arch/x86/kernel/i8259_32.c +++ b/arch/x86/kernel/i8259_32.c | |||
@@ -403,7 +403,8 @@ void __init native_init_IRQ(void) | |||
403 | int vector = FIRST_EXTERNAL_VECTOR + i; | 403 | int vector = FIRST_EXTERNAL_VECTOR + i; |
404 | if (i >= NR_IRQS) | 404 | if (i >= NR_IRQS) |
405 | break; | 405 | break; |
406 | if (vector != SYSCALL_VECTOR) | 406 | /* SYSCALL_VECTOR was reserved in trap_init. */ |
407 | if (!test_bit(vector, used_vectors)) | ||
407 | set_intr_gate(vector, interrupt[i]); | 408 | set_intr_gate(vector, interrupt[i]); |
408 | } | 409 | } |
409 | 410 | ||
diff --git a/arch/x86/kernel/init_task_32.c b/arch/x86/kernel/init_task.c index d26fc063a760..468c9c437842 100644 --- a/arch/x86/kernel/init_task_32.c +++ b/arch/x86/kernel/init_task.c | |||
@@ -15,7 +15,6 @@ static struct files_struct init_files = INIT_FILES; | |||
15 | static struct signal_struct init_signals = INIT_SIGNALS(init_signals); | 15 | static struct signal_struct init_signals = INIT_SIGNALS(init_signals); |
16 | static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand); | 16 | static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand); |
17 | struct mm_struct init_mm = INIT_MM(init_mm); | 17 | struct mm_struct init_mm = INIT_MM(init_mm); |
18 | |||
19 | EXPORT_SYMBOL(init_mm); | 18 | EXPORT_SYMBOL(init_mm); |
20 | 19 | ||
21 | /* | 20 | /* |
@@ -25,7 +24,7 @@ EXPORT_SYMBOL(init_mm); | |||
25 | * way process stacks are handled. This is done by having a special | 24 | * way process stacks are handled. This is done by having a special |
26 | * "init_task" linker map entry.. | 25 | * "init_task" linker map entry.. |
27 | */ | 26 | */ |
28 | union thread_union init_thread_union | 27 | union thread_union init_thread_union |
29 | __attribute__((__section__(".data.init_task"))) = | 28 | __attribute__((__section__(".data.init_task"))) = |
30 | { INIT_THREAD_INFO(init_task) }; | 29 | { INIT_THREAD_INFO(init_task) }; |
31 | 30 | ||
@@ -35,12 +34,14 @@ union thread_union init_thread_union | |||
35 | * All other task structs will be allocated on slabs in fork.c | 34 | * All other task structs will be allocated on slabs in fork.c |
36 | */ | 35 | */ |
37 | struct task_struct init_task = INIT_TASK(init_task); | 36 | struct task_struct init_task = INIT_TASK(init_task); |
38 | |||
39 | EXPORT_SYMBOL(init_task); | 37 | EXPORT_SYMBOL(init_task); |
40 | 38 | ||
41 | /* | 39 | /* |
42 | * per-CPU TSS segments. Threads are completely 'soft' on Linux, | 40 | * per-CPU TSS segments. Threads are completely 'soft' on Linux, |
43 | * no more per-task TSS's. | 41 | * no more per-task TSS's. The TSS size is kept cacheline-aligned |
44 | */ | 42 | * so they are allowed to end up in the .data.cacheline_aligned |
43 | * section. Since TSS's are completely CPU-local, we want them | ||
44 | * on exact cacheline boundaries, to eliminate cacheline ping-pong. | ||
45 | */ | ||
45 | DEFINE_PER_CPU_SHARED_ALIGNED(struct tss_struct, init_tss) = INIT_TSS; | 46 | DEFINE_PER_CPU_SHARED_ALIGNED(struct tss_struct, init_tss) = INIT_TSS; |
46 | 47 | ||
diff --git a/arch/x86/kernel/init_task_64.c b/arch/x86/kernel/init_task_64.c deleted file mode 100644 index 4ff33d4f8551..000000000000 --- a/arch/x86/kernel/init_task_64.c +++ /dev/null | |||
@@ -1,54 +0,0 @@ | |||
1 | #include <linux/mm.h> | ||
2 | #include <linux/module.h> | ||
3 | #include <linux/sched.h> | ||
4 | #include <linux/init.h> | ||
5 | #include <linux/init_task.h> | ||
6 | #include <linux/fs.h> | ||
7 | #include <linux/mqueue.h> | ||
8 | |||
9 | #include <asm/uaccess.h> | ||
10 | #include <asm/pgtable.h> | ||
11 | #include <asm/desc.h> | ||
12 | |||
13 | static struct fs_struct init_fs = INIT_FS; | ||
14 | static struct files_struct init_files = INIT_FILES; | ||
15 | static struct signal_struct init_signals = INIT_SIGNALS(init_signals); | ||
16 | static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand); | ||
17 | struct mm_struct init_mm = INIT_MM(init_mm); | ||
18 | |||
19 | EXPORT_SYMBOL(init_mm); | ||
20 | |||
21 | /* | ||
22 | * Initial task structure. | ||
23 | * | ||
24 | * We need to make sure that this is 8192-byte aligned due to the | ||
25 | * way process stacks are handled. This is done by having a special | ||
26 | * "init_task" linker map entry.. | ||
27 | */ | ||
28 | union thread_union init_thread_union | ||
29 | __attribute__((__section__(".data.init_task"))) = | ||
30 | { INIT_THREAD_INFO(init_task) }; | ||
31 | |||
32 | /* | ||
33 | * Initial task structure. | ||
34 | * | ||
35 | * All other task structs will be allocated on slabs in fork.c | ||
36 | */ | ||
37 | struct task_struct init_task = INIT_TASK(init_task); | ||
38 | |||
39 | EXPORT_SYMBOL(init_task); | ||
40 | /* | ||
41 | * per-CPU TSS segments. Threads are completely 'soft' on Linux, | ||
42 | * no more per-task TSS's. The TSS size is kept cacheline-aligned | ||
43 | * so they are allowed to end up in the .data.cacheline_aligned | ||
44 | * section. Since TSS's are completely CPU-local, we want them | ||
45 | * on exact cacheline boundaries, to eliminate cacheline ping-pong. | ||
46 | */ | ||
47 | DEFINE_PER_CPU_SHARED_ALIGNED(struct tss_struct, init_tss) = INIT_TSS; | ||
48 | |||
49 | /* Copies of the original ist values from the tss are only accessed during | ||
50 | * debugging, no special alignment required. | ||
51 | */ | ||
52 | DEFINE_PER_CPU(struct orig_ist, orig_ist); | ||
53 | |||
54 | #define ALIGN_TO_4K __attribute__((section(".data.init_task"))) | ||
diff --git a/arch/x86/kernel/io_apic_32.c b/arch/x86/kernel/io_apic_32.c index 5f10c7189534..f35c6eb33da9 100644 --- a/arch/x86/kernel/io_apic_32.c +++ b/arch/x86/kernel/io_apic_32.c | |||
@@ -584,7 +584,7 @@ tryanotherirq: | |||
584 | 584 | ||
585 | imbalance = move_this_load; | 585 | imbalance = move_this_load; |
586 | 586 | ||
587 | /* For physical_balance case, we accumlated both load | 587 | /* For physical_balance case, we accumulated both load |
588 | * values in the one of the siblings cpu_irq[], | 588 | * values in the one of the siblings cpu_irq[], |
589 | * to use the same code for physical and logical processors | 589 | * to use the same code for physical and logical processors |
590 | * as much as possible. | 590 | * as much as possible. |
@@ -1198,7 +1198,7 @@ static u8 irq_vector[NR_IRQ_VECTORS] __read_mostly = { FIRST_DEVICE_VECTOR , 0 } | |||
1198 | static int __assign_irq_vector(int irq) | 1198 | static int __assign_irq_vector(int irq) |
1199 | { | 1199 | { |
1200 | static int current_vector = FIRST_DEVICE_VECTOR, current_offset = 0; | 1200 | static int current_vector = FIRST_DEVICE_VECTOR, current_offset = 0; |
1201 | int vector, offset, i; | 1201 | int vector, offset; |
1202 | 1202 | ||
1203 | BUG_ON((unsigned)irq >= NR_IRQ_VECTORS); | 1203 | BUG_ON((unsigned)irq >= NR_IRQ_VECTORS); |
1204 | 1204 | ||
@@ -1215,11 +1215,8 @@ next: | |||
1215 | } | 1215 | } |
1216 | if (vector == current_vector) | 1216 | if (vector == current_vector) |
1217 | return -ENOSPC; | 1217 | return -ENOSPC; |
1218 | if (vector == SYSCALL_VECTOR) | 1218 | if (test_and_set_bit(vector, used_vectors)) |
1219 | goto next; | 1219 | goto next; |
1220 | for (i = 0; i < NR_IRQ_VECTORS; i++) | ||
1221 | if (irq_vector[i] == vector) | ||
1222 | goto next; | ||
1223 | 1220 | ||
1224 | current_vector = vector; | 1221 | current_vector = vector; |
1225 | current_offset = offset; | 1222 | current_offset = offset; |
@@ -2295,6 +2292,12 @@ static inline void __init check_timer(void) | |||
2295 | 2292 | ||
2296 | void __init setup_IO_APIC(void) | 2293 | void __init setup_IO_APIC(void) |
2297 | { | 2294 | { |
2295 | int i; | ||
2296 | |||
2297 | /* Reserve all the system vectors. */ | ||
2298 | for (i = FIRST_SYSTEM_VECTOR; i < NR_VECTORS; i++) | ||
2299 | set_bit(i, used_vectors); | ||
2300 | |||
2298 | enable_IO_APIC(); | 2301 | enable_IO_APIC(); |
2299 | 2302 | ||
2300 | if (acpi_ioapic) | 2303 | if (acpi_ioapic) |
@@ -2472,7 +2475,7 @@ void destroy_irq(unsigned int irq) | |||
2472 | } | 2475 | } |
2473 | 2476 | ||
2474 | /* | 2477 | /* |
2475 | * MSI mesage composition | 2478 | * MSI message composition |
2476 | */ | 2479 | */ |
2477 | #ifdef CONFIG_PCI_MSI | 2480 | #ifdef CONFIG_PCI_MSI |
2478 | static int msi_compose_msg(struct pci_dev *pdev, unsigned int irq, struct msi_msg *msg) | 2481 | static int msi_compose_msg(struct pci_dev *pdev, unsigned int irq, struct msi_msg *msg) |
diff --git a/arch/x86/kernel/io_apic_64.c b/arch/x86/kernel/io_apic_64.c index 1c2c7bf6a9d3..b3c2d268d708 100644 --- a/arch/x86/kernel/io_apic_64.c +++ b/arch/x86/kernel/io_apic_64.c | |||
@@ -1770,7 +1770,7 @@ __setup("no_timer_check", notimercheck); | |||
1770 | 1770 | ||
1771 | /* | 1771 | /* |
1772 | * | 1772 | * |
1773 | * IRQ's that are handled by the PIC in the MPS IOAPIC case. | 1773 | * IRQs that are handled by the PIC in the MPS IOAPIC case. |
1774 | * - IRQ2 is the cascade IRQ, and cannot be a io-apic IRQ. | 1774 | * - IRQ2 is the cascade IRQ, and cannot be a io-apic IRQ. |
1775 | * Linux doesn't really care, as it's not actually used | 1775 | * Linux doesn't really care, as it's not actually used |
1776 | * for any interrupt handling anyway. | 1776 | * for any interrupt handling anyway. |
@@ -1921,7 +1921,7 @@ void destroy_irq(unsigned int irq) | |||
1921 | } | 1921 | } |
1922 | 1922 | ||
1923 | /* | 1923 | /* |
1924 | * MSI mesage composition | 1924 | * MSI message composition |
1925 | */ | 1925 | */ |
1926 | #ifdef CONFIG_PCI_MSI | 1926 | #ifdef CONFIG_PCI_MSI |
1927 | static int msi_compose_msg(struct pci_dev *pdev, unsigned int irq, struct msi_msg *msg) | 1927 | static int msi_compose_msg(struct pci_dev *pdev, unsigned int irq, struct msi_msg *msg) |
diff --git a/arch/x86/kernel/machine_kexec_32.c b/arch/x86/kernel/machine_kexec_32.c index 8459ca64bc2f..11b935f4f886 100644 --- a/arch/x86/kernel/machine_kexec_32.c +++ b/arch/x86/kernel/machine_kexec_32.c | |||
@@ -149,28 +149,6 @@ NORET_TYPE void machine_kexec(struct kimage *image) | |||
149 | image->start, cpu_has_pae); | 149 | image->start, cpu_has_pae); |
150 | } | 150 | } |
151 | 151 | ||
152 | /* crashkernel=size@addr specifies the location to reserve for | ||
153 | * a crash kernel. By reserving this memory we guarantee | ||
154 | * that linux never sets it up as a DMA target. | ||
155 | * Useful for holding code to do something appropriate | ||
156 | * after a kernel panic. | ||
157 | */ | ||
158 | static int __init parse_crashkernel(char *arg) | ||
159 | { | ||
160 | unsigned long size, base; | ||
161 | size = memparse(arg, &arg); | ||
162 | if (*arg == '@') { | ||
163 | base = memparse(arg+1, &arg); | ||
164 | /* FIXME: Do I want a sanity check | ||
165 | * to validate the memory range? | ||
166 | */ | ||
167 | crashk_res.start = base; | ||
168 | crashk_res.end = base + size - 1; | ||
169 | } | ||
170 | return 0; | ||
171 | } | ||
172 | early_param("crashkernel", parse_crashkernel); | ||
173 | |||
174 | void arch_crash_save_vmcoreinfo(void) | 152 | void arch_crash_save_vmcoreinfo(void) |
175 | { | 153 | { |
176 | #ifdef CONFIG_ARCH_DISCONTIGMEM_ENABLE | 154 | #ifdef CONFIG_ARCH_DISCONTIGMEM_ENABLE |
diff --git a/arch/x86/kernel/machine_kexec_64.c b/arch/x86/kernel/machine_kexec_64.c index 7450b69710b5..0d8577f05422 100644 --- a/arch/x86/kernel/machine_kexec_64.c +++ b/arch/x86/kernel/machine_kexec_64.c | |||
@@ -231,33 +231,6 @@ NORET_TYPE void machine_kexec(struct kimage *image) | |||
231 | image->start); | 231 | image->start); |
232 | } | 232 | } |
233 | 233 | ||
234 | /* crashkernel=size@addr specifies the location to reserve for | ||
235 | * a crash kernel. By reserving this memory we guarantee | ||
236 | * that linux never set's it up as a DMA target. | ||
237 | * Useful for holding code to do something appropriate | ||
238 | * after a kernel panic. | ||
239 | */ | ||
240 | static int __init setup_crashkernel(char *arg) | ||
241 | { | ||
242 | unsigned long size, base; | ||
243 | char *p; | ||
244 | if (!arg) | ||
245 | return -EINVAL; | ||
246 | size = memparse(arg, &p); | ||
247 | if (arg == p) | ||
248 | return -EINVAL; | ||
249 | if (*p == '@') { | ||
250 | base = memparse(p+1, &p); | ||
251 | /* FIXME: Do I want a sanity check to validate the | ||
252 | * memory range? Yes you do, but it's too early for | ||
253 | * e820 -AK */ | ||
254 | crashk_res.start = base; | ||
255 | crashk_res.end = base + size - 1; | ||
256 | } | ||
257 | return 0; | ||
258 | } | ||
259 | early_param("crashkernel", setup_crashkernel); | ||
260 | |||
261 | void arch_crash_save_vmcoreinfo(void) | 234 | void arch_crash_save_vmcoreinfo(void) |
262 | { | 235 | { |
263 | #ifdef CONFIG_ARCH_DISCONTIGMEM_ENABLE | 236 | #ifdef CONFIG_ARCH_DISCONTIGMEM_ENABLE |
diff --git a/arch/x86/kernel/mce_64.c b/arch/x86/kernel/mce_64.c index 8ca8f8648969..07bbfe7aa7f7 100644 --- a/arch/x86/kernel/mce_64.c +++ b/arch/x86/kernel/mce_64.c | |||
@@ -320,7 +320,7 @@ void do_machine_check(struct pt_regs * regs, long error_code) | |||
320 | #ifdef CONFIG_X86_MCE_INTEL | 320 | #ifdef CONFIG_X86_MCE_INTEL |
321 | /*** | 321 | /*** |
322 | * mce_log_therm_throt_event - Logs the thermal throttling event to mcelog | 322 | * mce_log_therm_throt_event - Logs the thermal throttling event to mcelog |
323 | * @cpu: The CPU on which the event occured. | 323 | * @cpu: The CPU on which the event occurred. |
324 | * @status: Event status information | 324 | * @status: Event status information |
325 | * | 325 | * |
326 | * This function should be called by the thermal interrupt after the | 326 | * This function should be called by the thermal interrupt after the |
@@ -688,7 +688,7 @@ static int __init mcheck_disable(char *str) | |||
688 | return 1; | 688 | return 1; |
689 | } | 689 | } |
690 | 690 | ||
691 | /* mce=off disables machine check. Note you can reenable it later | 691 | /* mce=off disables machine check. Note you can re-enable it later |
692 | using sysfs. | 692 | using sysfs. |
693 | mce=TOLERANCELEVEL (number, see above) | 693 | mce=TOLERANCELEVEL (number, see above) |
694 | mce=bootlog Log MCEs from before booting. Disabled by default on AMD. | 694 | mce=bootlog Log MCEs from before booting. Disabled by default on AMD. |
@@ -799,19 +799,33 @@ static __cpuinit int mce_create_device(unsigned int cpu) | |||
799 | { | 799 | { |
800 | int err; | 800 | int err; |
801 | int i; | 801 | int i; |
802 | if (!mce_available(&cpu_data[cpu])) | 802 | |
803 | if (!mce_available(&cpu_data(cpu))) | ||
803 | return -EIO; | 804 | return -EIO; |
804 | 805 | ||
806 | memset(&per_cpu(device_mce, cpu).kobj, 0, sizeof(struct kobject)); | ||
805 | per_cpu(device_mce,cpu).id = cpu; | 807 | per_cpu(device_mce,cpu).id = cpu; |
806 | per_cpu(device_mce,cpu).cls = &mce_sysclass; | 808 | per_cpu(device_mce,cpu).cls = &mce_sysclass; |
807 | 809 | ||
808 | err = sysdev_register(&per_cpu(device_mce,cpu)); | 810 | err = sysdev_register(&per_cpu(device_mce,cpu)); |
811 | if (err) | ||
812 | return err; | ||
813 | |||
814 | for (i = 0; mce_attributes[i]; i++) { | ||
815 | err = sysdev_create_file(&per_cpu(device_mce,cpu), | ||
816 | mce_attributes[i]); | ||
817 | if (err) | ||
818 | goto error; | ||
819 | } | ||
809 | 820 | ||
810 | if (!err) { | 821 | return 0; |
811 | for (i = 0; mce_attributes[i]; i++) | 822 | error: |
812 | sysdev_create_file(&per_cpu(device_mce,cpu), | 823 | while (i--) { |
813 | mce_attributes[i]); | 824 | sysdev_remove_file(&per_cpu(device_mce,cpu), |
825 | mce_attributes[i]); | ||
814 | } | 826 | } |
827 | sysdev_unregister(&per_cpu(device_mce,cpu)); | ||
828 | |||
815 | return err; | 829 | return err; |
816 | } | 830 | } |
817 | 831 | ||
@@ -823,7 +837,6 @@ static void mce_remove_device(unsigned int cpu) | |||
823 | sysdev_remove_file(&per_cpu(device_mce,cpu), | 837 | sysdev_remove_file(&per_cpu(device_mce,cpu), |
824 | mce_attributes[i]); | 838 | mce_attributes[i]); |
825 | sysdev_unregister(&per_cpu(device_mce,cpu)); | 839 | sysdev_unregister(&per_cpu(device_mce,cpu)); |
826 | memset(&per_cpu(device_mce, cpu).kobj, 0, sizeof(struct kobject)); | ||
827 | } | 840 | } |
828 | 841 | ||
829 | /* Get notified when a cpu comes on/off. Be hotplug friendly. */ | 842 | /* Get notified when a cpu comes on/off. Be hotplug friendly. */ |
@@ -831,18 +844,21 @@ static int | |||
831 | mce_cpu_callback(struct notifier_block *nfb, unsigned long action, void *hcpu) | 844 | mce_cpu_callback(struct notifier_block *nfb, unsigned long action, void *hcpu) |
832 | { | 845 | { |
833 | unsigned int cpu = (unsigned long)hcpu; | 846 | unsigned int cpu = (unsigned long)hcpu; |
847 | int err = 0; | ||
834 | 848 | ||
835 | switch (action) { | 849 | switch (action) { |
836 | case CPU_ONLINE: | 850 | case CPU_UP_PREPARE: |
837 | case CPU_ONLINE_FROZEN: | 851 | case CPU_UP_PREPARE_FROZEN: |
838 | mce_create_device(cpu); | 852 | err = mce_create_device(cpu); |
839 | break; | 853 | break; |
854 | case CPU_UP_CANCELED: | ||
855 | case CPU_UP_CANCELED_FROZEN: | ||
840 | case CPU_DEAD: | 856 | case CPU_DEAD: |
841 | case CPU_DEAD_FROZEN: | 857 | case CPU_DEAD_FROZEN: |
842 | mce_remove_device(cpu); | 858 | mce_remove_device(cpu); |
843 | break; | 859 | break; |
844 | } | 860 | } |
845 | return NOTIFY_OK; | 861 | return err ? NOTIFY_BAD : NOTIFY_OK; |
846 | } | 862 | } |
847 | 863 | ||
848 | static struct notifier_block mce_cpu_notifier = { | 864 | static struct notifier_block mce_cpu_notifier = { |
@@ -857,9 +873,13 @@ static __init int mce_init_device(void) | |||
857 | if (!mce_available(&boot_cpu_data)) | 873 | if (!mce_available(&boot_cpu_data)) |
858 | return -EIO; | 874 | return -EIO; |
859 | err = sysdev_class_register(&mce_sysclass); | 875 | err = sysdev_class_register(&mce_sysclass); |
876 | if (err) | ||
877 | return err; | ||
860 | 878 | ||
861 | for_each_online_cpu(i) { | 879 | for_each_online_cpu(i) { |
862 | mce_create_device(i); | 880 | err = mce_create_device(i); |
881 | if (err) | ||
882 | return err; | ||
863 | } | 883 | } |
864 | 884 | ||
865 | register_hotcpu_notifier(&mce_cpu_notifier); | 885 | register_hotcpu_notifier(&mce_cpu_notifier); |
diff --git a/arch/x86/kernel/mce_amd_64.c b/arch/x86/kernel/mce_amd_64.c index 0d2afd96aca4..752fb16a817d 100644 --- a/arch/x86/kernel/mce_amd_64.c +++ b/arch/x86/kernel/mce_amd_64.c | |||
@@ -472,11 +472,11 @@ static __cpuinit int threshold_create_bank(unsigned int cpu, unsigned int bank) | |||
472 | sprintf(name, "threshold_bank%i", bank); | 472 | sprintf(name, "threshold_bank%i", bank); |
473 | 473 | ||
474 | #ifdef CONFIG_SMP | 474 | #ifdef CONFIG_SMP |
475 | if (cpu_data[cpu].cpu_core_id && shared_bank[bank]) { /* symlink */ | 475 | if (cpu_data(cpu).cpu_core_id && shared_bank[bank]) { /* symlink */ |
476 | i = first_cpu(per_cpu(cpu_core_map, cpu)); | 476 | i = first_cpu(per_cpu(cpu_core_map, cpu)); |
477 | 477 | ||
478 | /* first core not up yet */ | 478 | /* first core not up yet */ |
479 | if (cpu_data[i].cpu_core_id) | 479 | if (cpu_data(i).cpu_core_id) |
480 | goto out; | 480 | goto out; |
481 | 481 | ||
482 | /* already linked */ | 482 | /* already linked */ |
diff --git a/arch/x86/kernel/microcode.c b/arch/x86/kernel/microcode.c index 09cf78110358..09c315214a5e 100644 --- a/arch/x86/kernel/microcode.c +++ b/arch/x86/kernel/microcode.c | |||
@@ -132,7 +132,7 @@ static struct ucode_cpu_info { | |||
132 | 132 | ||
133 | static void collect_cpu_info(int cpu_num) | 133 | static void collect_cpu_info(int cpu_num) |
134 | { | 134 | { |
135 | struct cpuinfo_x86 *c = cpu_data + cpu_num; | 135 | struct cpuinfo_x86 *c = &cpu_data(cpu_num); |
136 | struct ucode_cpu_info *uci = ucode_cpu_info + cpu_num; | 136 | struct ucode_cpu_info *uci = ucode_cpu_info + cpu_num; |
137 | unsigned int val[2]; | 137 | unsigned int val[2]; |
138 | 138 | ||
@@ -522,7 +522,7 @@ static struct platform_device *microcode_pdev; | |||
522 | static int cpu_request_microcode(int cpu) | 522 | static int cpu_request_microcode(int cpu) |
523 | { | 523 | { |
524 | char name[30]; | 524 | char name[30]; |
525 | struct cpuinfo_x86 *c = cpu_data + cpu; | 525 | struct cpuinfo_x86 *c = &cpu_data(cpu); |
526 | const struct firmware *firmware; | 526 | const struct firmware *firmware; |
527 | void *buf; | 527 | void *buf; |
528 | unsigned long size; | 528 | unsigned long size; |
@@ -570,7 +570,7 @@ static int cpu_request_microcode(int cpu) | |||
570 | 570 | ||
571 | static int apply_microcode_check_cpu(int cpu) | 571 | static int apply_microcode_check_cpu(int cpu) |
572 | { | 572 | { |
573 | struct cpuinfo_x86 *c = cpu_data + cpu; | 573 | struct cpuinfo_x86 *c = &cpu_data(cpu); |
574 | struct ucode_cpu_info *uci = ucode_cpu_info + cpu; | 574 | struct ucode_cpu_info *uci = ucode_cpu_info + cpu; |
575 | cpumask_t old; | 575 | cpumask_t old; |
576 | unsigned int val[2]; | 576 | unsigned int val[2]; |
diff --git a/arch/x86/kernel/mpparse_32.c b/arch/x86/kernel/mpparse_32.c index 13abb4ebfb79..7a05a7f6099a 100644 --- a/arch/x86/kernel/mpparse_32.c +++ b/arch/x86/kernel/mpparse_32.c | |||
@@ -1001,7 +1001,7 @@ void __init mp_config_acpi_legacy_irqs (void) | |||
1001 | 1001 | ||
1002 | /* | 1002 | /* |
1003 | * Use the default configuration for the IRQs 0-15. Unless | 1003 | * Use the default configuration for the IRQs 0-15. Unless |
1004 | * overriden by (MADT) interrupt source override entries. | 1004 | * overridden by (MADT) interrupt source override entries. |
1005 | */ | 1005 | */ |
1006 | for (i = 0; i < 16; i++) { | 1006 | for (i = 0; i < 16; i++) { |
1007 | int idx; | 1007 | int idx; |
diff --git a/arch/x86/kernel/mpparse_64.c b/arch/x86/kernel/mpparse_64.c index 8bf0ca03ac8e..ef4aab123581 100644 --- a/arch/x86/kernel/mpparse_64.c +++ b/arch/x86/kernel/mpparse_64.c | |||
@@ -57,6 +57,8 @@ unsigned long mp_lapic_addr = 0; | |||
57 | 57 | ||
58 | /* Processor that is doing the boot up */ | 58 | /* Processor that is doing the boot up */ |
59 | unsigned int boot_cpu_id = -1U; | 59 | unsigned int boot_cpu_id = -1U; |
60 | EXPORT_SYMBOL(boot_cpu_id); | ||
61 | |||
60 | /* Internal processor count */ | 62 | /* Internal processor count */ |
61 | unsigned int num_processors __cpuinitdata = 0; | 63 | unsigned int num_processors __cpuinitdata = 0; |
62 | 64 | ||
@@ -86,7 +88,7 @@ static int __init mpf_checksum(unsigned char *mp, int len) | |||
86 | return sum & 0xFF; | 88 | return sum & 0xFF; |
87 | } | 89 | } |
88 | 90 | ||
89 | static void __cpuinit MP_processor_info (struct mpc_config_processor *m) | 91 | static void __cpuinit MP_processor_info(struct mpc_config_processor *m) |
90 | { | 92 | { |
91 | int cpu; | 93 | int cpu; |
92 | cpumask_t tmp_map; | 94 | cpumask_t tmp_map; |
@@ -123,7 +125,18 @@ static void __cpuinit MP_processor_info (struct mpc_config_processor *m) | |||
123 | cpu = 0; | 125 | cpu = 0; |
124 | } | 126 | } |
125 | bios_cpu_apicid[cpu] = m->mpc_apicid; | 127 | bios_cpu_apicid[cpu] = m->mpc_apicid; |
126 | x86_cpu_to_apicid[cpu] = m->mpc_apicid; | 128 | /* |
129 | * We get called early in the the start_kernel initialization | ||
130 | * process when the per_cpu data area is not yet setup, so we | ||
131 | * use a static array that is removed after the per_cpu data | ||
132 | * area is created. | ||
133 | */ | ||
134 | if (x86_cpu_to_apicid_ptr) { | ||
135 | u8 *x86_cpu_to_apicid = (u8 *)x86_cpu_to_apicid_ptr; | ||
136 | x86_cpu_to_apicid[cpu] = m->mpc_apicid; | ||
137 | } else { | ||
138 | per_cpu(x86_cpu_to_apicid, cpu) = m->mpc_apicid; | ||
139 | } | ||
127 | 140 | ||
128 | cpu_set(cpu, cpu_possible_map); | 141 | cpu_set(cpu, cpu_possible_map); |
129 | cpu_set(cpu, cpu_present_map); | 142 | cpu_set(cpu, cpu_present_map); |
diff --git a/arch/x86/kernel/msr.c b/arch/x86/kernel/msr.c index df85c9c13601..ee6eba4ecfea 100644 --- a/arch/x86/kernel/msr.c +++ b/arch/x86/kernel/msr.c | |||
@@ -112,7 +112,7 @@ static ssize_t msr_write(struct file *file, const char __user *buf, | |||
112 | static int msr_open(struct inode *inode, struct file *file) | 112 | static int msr_open(struct inode *inode, struct file *file) |
113 | { | 113 | { |
114 | unsigned int cpu = iminor(file->f_path.dentry->d_inode); | 114 | unsigned int cpu = iminor(file->f_path.dentry->d_inode); |
115 | struct cpuinfo_x86 *c = &(cpu_data)[cpu]; | 115 | struct cpuinfo_x86 *c = &cpu_data(cpu); |
116 | 116 | ||
117 | if (cpu >= NR_CPUS || !cpu_online(cpu)) | 117 | if (cpu >= NR_CPUS || !cpu_online(cpu)) |
118 | return -ENXIO; /* No such CPU */ | 118 | return -ENXIO; /* No such CPU */ |
@@ -133,37 +133,42 @@ static const struct file_operations msr_fops = { | |||
133 | .open = msr_open, | 133 | .open = msr_open, |
134 | }; | 134 | }; |
135 | 135 | ||
136 | static int __cpuinit msr_device_create(int i) | 136 | static int __cpuinit msr_device_create(int cpu) |
137 | { | 137 | { |
138 | int err = 0; | ||
139 | struct device *dev; | 138 | struct device *dev; |
140 | 139 | ||
141 | dev = device_create(msr_class, NULL, MKDEV(MSR_MAJOR, i), "msr%d",i); | 140 | dev = device_create(msr_class, NULL, MKDEV(MSR_MAJOR, cpu), |
142 | if (IS_ERR(dev)) | 141 | "msr%d", cpu); |
143 | err = PTR_ERR(dev); | 142 | return IS_ERR(dev) ? PTR_ERR(dev) : 0; |
144 | return err; | 143 | } |
144 | |||
145 | static void msr_device_destroy(int cpu) | ||
146 | { | ||
147 | device_destroy(msr_class, MKDEV(MSR_MAJOR, cpu)); | ||
145 | } | 148 | } |
146 | 149 | ||
147 | static int __cpuinit msr_class_cpu_callback(struct notifier_block *nfb, | 150 | static int __cpuinit msr_class_cpu_callback(struct notifier_block *nfb, |
148 | unsigned long action, void *hcpu) | 151 | unsigned long action, void *hcpu) |
149 | { | 152 | { |
150 | unsigned int cpu = (unsigned long)hcpu; | 153 | unsigned int cpu = (unsigned long)hcpu; |
154 | int err = 0; | ||
151 | 155 | ||
152 | switch (action) { | 156 | switch (action) { |
153 | case CPU_ONLINE: | 157 | case CPU_UP_PREPARE: |
154 | case CPU_ONLINE_FROZEN: | 158 | case CPU_UP_PREPARE_FROZEN: |
155 | msr_device_create(cpu); | 159 | err = msr_device_create(cpu); |
156 | break; | 160 | break; |
161 | case CPU_UP_CANCELED: | ||
162 | case CPU_UP_CANCELED_FROZEN: | ||
157 | case CPU_DEAD: | 163 | case CPU_DEAD: |
158 | case CPU_DEAD_FROZEN: | 164 | case CPU_DEAD_FROZEN: |
159 | device_destroy(msr_class, MKDEV(MSR_MAJOR, cpu)); | 165 | msr_device_destroy(cpu); |
160 | break; | 166 | break; |
161 | } | 167 | } |
162 | return NOTIFY_OK; | 168 | return err ? NOTIFY_BAD : NOTIFY_OK; |
163 | } | 169 | } |
164 | 170 | ||
165 | static struct notifier_block __cpuinitdata msr_class_cpu_notifier = | 171 | static struct notifier_block __cpuinitdata msr_class_cpu_notifier = { |
166 | { | ||
167 | .notifier_call = msr_class_cpu_callback, | 172 | .notifier_call = msr_class_cpu_callback, |
168 | }; | 173 | }; |
169 | 174 | ||
@@ -196,7 +201,7 @@ static int __init msr_init(void) | |||
196 | out_class: | 201 | out_class: |
197 | i = 0; | 202 | i = 0; |
198 | for_each_online_cpu(i) | 203 | for_each_online_cpu(i) |
199 | device_destroy(msr_class, MKDEV(MSR_MAJOR, i)); | 204 | msr_device_destroy(i); |
200 | class_destroy(msr_class); | 205 | class_destroy(msr_class); |
201 | out_chrdev: | 206 | out_chrdev: |
202 | unregister_chrdev(MSR_MAJOR, "cpu/msr"); | 207 | unregister_chrdev(MSR_MAJOR, "cpu/msr"); |
@@ -208,7 +213,7 @@ static void __exit msr_exit(void) | |||
208 | { | 213 | { |
209 | int cpu = 0; | 214 | int cpu = 0; |
210 | for_each_online_cpu(cpu) | 215 | for_each_online_cpu(cpu) |
211 | device_destroy(msr_class, MKDEV(MSR_MAJOR, cpu)); | 216 | msr_device_destroy(cpu); |
212 | class_destroy(msr_class); | 217 | class_destroy(msr_class); |
213 | unregister_chrdev(MSR_MAJOR, "cpu/msr"); | 218 | unregister_chrdev(MSR_MAJOR, "cpu/msr"); |
214 | unregister_hotcpu_notifier(&msr_class_cpu_notifier); | 219 | unregister_hotcpu_notifier(&msr_class_cpu_notifier); |
diff --git a/arch/x86/kernel/pci-dma_64.c b/arch/x86/kernel/pci-dma_64.c index b2b42bdb0a15..afaf9f12c032 100644 --- a/arch/x86/kernel/pci-dma_64.c +++ b/arch/x86/kernel/pci-dma_64.c | |||
@@ -11,7 +11,7 @@ | |||
11 | #include <asm/iommu.h> | 11 | #include <asm/iommu.h> |
12 | #include <asm/calgary.h> | 12 | #include <asm/calgary.h> |
13 | 13 | ||
14 | int iommu_merge __read_mostly = 0; | 14 | int iommu_merge __read_mostly = 1; |
15 | EXPORT_SYMBOL(iommu_merge); | 15 | EXPORT_SYMBOL(iommu_merge); |
16 | 16 | ||
17 | dma_addr_t bad_dma_address __read_mostly; | 17 | dma_addr_t bad_dma_address __read_mostly; |
diff --git a/arch/x86/kernel/process_32.c b/arch/x86/kernel/process_32.c index 097aeafce5ff..7b899584d290 100644 --- a/arch/x86/kernel/process_32.c +++ b/arch/x86/kernel/process_32.c | |||
@@ -295,34 +295,52 @@ static int __init idle_setup(char *str) | |||
295 | } | 295 | } |
296 | early_param("idle", idle_setup); | 296 | early_param("idle", idle_setup); |
297 | 297 | ||
298 | void show_regs(struct pt_regs * regs) | 298 | void __show_registers(struct pt_regs *regs, int all) |
299 | { | 299 | { |
300 | unsigned long cr0 = 0L, cr2 = 0L, cr3 = 0L, cr4 = 0L; | 300 | unsigned long cr0 = 0L, cr2 = 0L, cr3 = 0L, cr4 = 0L; |
301 | unsigned long d0, d1, d2, d3, d6, d7; | 301 | unsigned long d0, d1, d2, d3, d6, d7; |
302 | unsigned long esp; | ||
303 | unsigned short ss, gs; | ||
304 | |||
305 | if (user_mode_vm(regs)) { | ||
306 | esp = regs->esp; | ||
307 | ss = regs->xss & 0xffff; | ||
308 | savesegment(gs, gs); | ||
309 | } else { | ||
310 | esp = (unsigned long) (®s->esp); | ||
311 | savesegment(ss, ss); | ||
312 | savesegment(gs, gs); | ||
313 | } | ||
302 | 314 | ||
303 | printk("\n"); | 315 | printk("\n"); |
304 | printk("Pid: %d, comm: %20s\n", current->pid, current->comm); | 316 | printk("Pid: %d, comm: %s %s (%s %.*s)\n", |
305 | printk("EIP: %04x:[<%08lx>] CPU: %d\n",0xffff & regs->xcs,regs->eip, smp_processor_id()); | 317 | task_pid_nr(current), current->comm, |
318 | print_tainted(), init_utsname()->release, | ||
319 | (int)strcspn(init_utsname()->version, " "), | ||
320 | init_utsname()->version); | ||
321 | |||
322 | printk("EIP: %04x:[<%08lx>] EFLAGS: %08lx CPU: %d\n", | ||
323 | 0xffff & regs->xcs, regs->eip, regs->eflags, | ||
324 | smp_processor_id()); | ||
306 | print_symbol("EIP is at %s\n", regs->eip); | 325 | print_symbol("EIP is at %s\n", regs->eip); |
307 | 326 | ||
308 | if (user_mode_vm(regs)) | ||
309 | printk(" ESP: %04x:%08lx",0xffff & regs->xss,regs->esp); | ||
310 | printk(" EFLAGS: %08lx %s (%s %.*s)\n", | ||
311 | regs->eflags, print_tainted(), init_utsname()->release, | ||
312 | (int)strcspn(init_utsname()->version, " "), | ||
313 | init_utsname()->version); | ||
314 | printk("EAX: %08lx EBX: %08lx ECX: %08lx EDX: %08lx\n", | 327 | printk("EAX: %08lx EBX: %08lx ECX: %08lx EDX: %08lx\n", |
315 | regs->eax,regs->ebx,regs->ecx,regs->edx); | 328 | regs->eax, regs->ebx, regs->ecx, regs->edx); |
316 | printk("ESI: %08lx EDI: %08lx EBP: %08lx", | 329 | printk("ESI: %08lx EDI: %08lx EBP: %08lx ESP: %08lx\n", |
317 | regs->esi, regs->edi, regs->ebp); | 330 | regs->esi, regs->edi, regs->ebp, esp); |
318 | printk(" DS: %04x ES: %04x FS: %04x\n", | 331 | printk(" DS: %04x ES: %04x FS: %04x GS: %04x SS: %04x\n", |
319 | 0xffff & regs->xds,0xffff & regs->xes, 0xffff & regs->xfs); | 332 | regs->xds & 0xffff, regs->xes & 0xffff, |
333 | regs->xfs & 0xffff, gs, ss); | ||
334 | |||
335 | if (!all) | ||
336 | return; | ||
320 | 337 | ||
321 | cr0 = read_cr0(); | 338 | cr0 = read_cr0(); |
322 | cr2 = read_cr2(); | 339 | cr2 = read_cr2(); |
323 | cr3 = read_cr3(); | 340 | cr3 = read_cr3(); |
324 | cr4 = read_cr4_safe(); | 341 | cr4 = read_cr4_safe(); |
325 | printk("CR0: %08lx CR2: %08lx CR3: %08lx CR4: %08lx\n", cr0, cr2, cr3, cr4); | 342 | printk("CR0: %08lx CR2: %08lx CR3: %08lx CR4: %08lx\n", |
343 | cr0, cr2, cr3, cr4); | ||
326 | 344 | ||
327 | get_debugreg(d0, 0); | 345 | get_debugreg(d0, 0); |
328 | get_debugreg(d1, 1); | 346 | get_debugreg(d1, 1); |
@@ -330,10 +348,16 @@ void show_regs(struct pt_regs * regs) | |||
330 | get_debugreg(d3, 3); | 348 | get_debugreg(d3, 3); |
331 | printk("DR0: %08lx DR1: %08lx DR2: %08lx DR3: %08lx\n", | 349 | printk("DR0: %08lx DR1: %08lx DR2: %08lx DR3: %08lx\n", |
332 | d0, d1, d2, d3); | 350 | d0, d1, d2, d3); |
351 | |||
333 | get_debugreg(d6, 6); | 352 | get_debugreg(d6, 6); |
334 | get_debugreg(d7, 7); | 353 | get_debugreg(d7, 7); |
335 | printk("DR6: %08lx DR7: %08lx\n", d6, d7); | 354 | printk("DR6: %08lx DR7: %08lx\n", |
355 | d6, d7); | ||
356 | } | ||
336 | 357 | ||
358 | void show_regs(struct pt_regs *regs) | ||
359 | { | ||
360 | __show_registers(regs, 1); | ||
337 | show_trace(NULL, regs, ®s->esp); | 361 | show_trace(NULL, regs, ®s->esp); |
338 | } | 362 | } |
339 | 363 | ||
diff --git a/arch/x86/kernel/ptrace_32.c b/arch/x86/kernel/ptrace_32.c index 99102ec5fade..ff5431cc03ee 100644 --- a/arch/x86/kernel/ptrace_32.c +++ b/arch/x86/kernel/ptrace_32.c | |||
@@ -632,7 +632,7 @@ void send_sigtrap(struct task_struct *tsk, struct pt_regs *regs, int error_code) | |||
632 | /* User-mode eip? */ | 632 | /* User-mode eip? */ |
633 | info.si_addr = user_mode_vm(regs) ? (void __user *) regs->eip : NULL; | 633 | info.si_addr = user_mode_vm(regs) ? (void __user *) regs->eip : NULL; |
634 | 634 | ||
635 | /* Send us the fakey SIGTRAP */ | 635 | /* Send us the fake SIGTRAP */ |
636 | force_sig_info(SIGTRAP, &info, tsk); | 636 | force_sig_info(SIGTRAP, &info, tsk); |
637 | } | 637 | } |
638 | 638 | ||
diff --git a/arch/x86/kernel/quirks.c b/arch/x86/kernel/quirks.c index d769e204f942..a4ce1911efdf 100644 --- a/arch/x86/kernel/quirks.c +++ b/arch/x86/kernel/quirks.c | |||
@@ -45,9 +45,12 @@ static void __devinit quirk_intel_irqbalance(struct pci_dev *dev) | |||
45 | if (!(config & 0x2)) | 45 | if (!(config & 0x2)) |
46 | pci_write_config_byte(dev, 0xf4, config); | 46 | pci_write_config_byte(dev, 0xf4, config); |
47 | } | 47 | } |
48 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_E7320_MCH, quirk_intel_irqbalance); | 48 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_E7320_MCH, |
49 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_E7525_MCH, quirk_intel_irqbalance); | 49 | quirk_intel_irqbalance); |
50 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_E7520_MCH, quirk_intel_irqbalance); | 50 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_E7525_MCH, |
51 | quirk_intel_irqbalance); | ||
52 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_E7520_MCH, | ||
53 | quirk_intel_irqbalance); | ||
51 | #endif | 54 | #endif |
52 | 55 | ||
53 | #if defined(CONFIG_HPET_TIMER) | 56 | #if defined(CONFIG_HPET_TIMER) |
@@ -56,7 +59,8 @@ unsigned long force_hpet_address; | |||
56 | static enum { | 59 | static enum { |
57 | NONE_FORCE_HPET_RESUME, | 60 | NONE_FORCE_HPET_RESUME, |
58 | OLD_ICH_FORCE_HPET_RESUME, | 61 | OLD_ICH_FORCE_HPET_RESUME, |
59 | ICH_FORCE_HPET_RESUME | 62 | ICH_FORCE_HPET_RESUME, |
63 | VT8237_FORCE_HPET_RESUME | ||
60 | } force_hpet_resume_type; | 64 | } force_hpet_resume_type; |
61 | 65 | ||
62 | static void __iomem *rcba_base; | 66 | static void __iomem *rcba_base; |
@@ -146,17 +150,17 @@ static void ich_force_enable_hpet(struct pci_dev *dev) | |||
146 | } | 150 | } |
147 | 151 | ||
148 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ESB2_0, | 152 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ESB2_0, |
149 | ich_force_enable_hpet); | 153 | ich_force_enable_hpet); |
150 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH6_1, | 154 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH6_1, |
151 | ich_force_enable_hpet); | 155 | ich_force_enable_hpet); |
152 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH7_0, | 156 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH7_0, |
153 | ich_force_enable_hpet); | 157 | ich_force_enable_hpet); |
154 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH7_1, | 158 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH7_1, |
155 | ich_force_enable_hpet); | 159 | ich_force_enable_hpet); |
156 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH7_31, | 160 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH7_31, |
157 | ich_force_enable_hpet); | 161 | ich_force_enable_hpet); |
158 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH8_1, | 162 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH8_1, |
159 | ich_force_enable_hpet); | 163 | ich_force_enable_hpet); |
160 | 164 | ||
161 | 165 | ||
162 | static struct pci_dev *cached_dev; | 166 | static struct pci_dev *cached_dev; |
@@ -232,10 +236,91 @@ static void old_ich_force_enable_hpet(struct pci_dev *dev) | |||
232 | printk(KERN_DEBUG "Failed to force enable HPET\n"); | 236 | printk(KERN_DEBUG "Failed to force enable HPET\n"); |
233 | } | 237 | } |
234 | 238 | ||
239 | /* | ||
240 | * Undocumented chipset features. Make sure that the user enforced | ||
241 | * this. | ||
242 | */ | ||
243 | static void old_ich_force_enable_hpet_user(struct pci_dev *dev) | ||
244 | { | ||
245 | if (hpet_force_user) | ||
246 | old_ich_force_enable_hpet(dev); | ||
247 | } | ||
248 | |||
249 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801CA_0, | ||
250 | old_ich_force_enable_hpet_user); | ||
251 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801CA_12, | ||
252 | old_ich_force_enable_hpet_user); | ||
253 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801DB_0, | ||
254 | old_ich_force_enable_hpet_user); | ||
255 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801DB_12, | ||
256 | old_ich_force_enable_hpet_user); | ||
235 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801EB_0, | 257 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801EB_0, |
236 | old_ich_force_enable_hpet); | 258 | old_ich_force_enable_hpet); |
237 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801EB_12, | 259 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801EB_12, |
238 | old_ich_force_enable_hpet); | 260 | old_ich_force_enable_hpet); |
261 | |||
262 | |||
263 | static void vt8237_force_hpet_resume(void) | ||
264 | { | ||
265 | u32 val; | ||
266 | |||
267 | if (!force_hpet_address || !cached_dev) | ||
268 | return; | ||
269 | |||
270 | val = 0xfed00000 | 0x80; | ||
271 | pci_write_config_dword(cached_dev, 0x68, val); | ||
272 | |||
273 | pci_read_config_dword(cached_dev, 0x68, &val); | ||
274 | if (val & 0x80) | ||
275 | printk(KERN_DEBUG "Force enabled HPET at resume\n"); | ||
276 | else | ||
277 | BUG(); | ||
278 | } | ||
279 | |||
280 | static void vt8237_force_enable_hpet(struct pci_dev *dev) | ||
281 | { | ||
282 | u32 uninitialized_var(val); | ||
283 | |||
284 | if (!hpet_force_user || hpet_address || force_hpet_address) | ||
285 | return; | ||
286 | |||
287 | pci_read_config_dword(dev, 0x68, &val); | ||
288 | /* | ||
289 | * Bit 7 is HPET enable bit. | ||
290 | * Bit 31:10 is HPET base address (contrary to what datasheet claims) | ||
291 | */ | ||
292 | if (val & 0x80) { | ||
293 | force_hpet_address = (val & ~0x3ff); | ||
294 | printk(KERN_DEBUG "HPET at base address 0x%lx\n", | ||
295 | force_hpet_address); | ||
296 | return; | ||
297 | } | ||
298 | |||
299 | /* | ||
300 | * HPET is disabled. Trying enabling at FED00000 and check | ||
301 | * whether it sticks | ||
302 | */ | ||
303 | val = 0xfed00000 | 0x80; | ||
304 | pci_write_config_dword(dev, 0x68, val); | ||
305 | |||
306 | pci_read_config_dword(dev, 0x68, &val); | ||
307 | if (val & 0x80) { | ||
308 | force_hpet_address = (val & ~0x3ff); | ||
309 | printk(KERN_DEBUG "Force enabled HPET at base address 0x%lx\n", | ||
310 | force_hpet_address); | ||
311 | cached_dev = dev; | ||
312 | force_hpet_resume_type = VT8237_FORCE_HPET_RESUME; | ||
313 | return; | ||
314 | } | ||
315 | |||
316 | printk(KERN_DEBUG "Failed to force enable HPET\n"); | ||
317 | } | ||
318 | |||
319 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8235, | ||
320 | vt8237_force_enable_hpet); | ||
321 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8237, | ||
322 | vt8237_force_enable_hpet); | ||
323 | |||
239 | 324 | ||
240 | void force_hpet_resume(void) | 325 | void force_hpet_resume(void) |
241 | { | 326 | { |
@@ -246,6 +331,9 @@ void force_hpet_resume(void) | |||
246 | case OLD_ICH_FORCE_HPET_RESUME: | 331 | case OLD_ICH_FORCE_HPET_RESUME: |
247 | return old_ich_force_hpet_resume(); | 332 | return old_ich_force_hpet_resume(); |
248 | 333 | ||
334 | case VT8237_FORCE_HPET_RESUME: | ||
335 | return vt8237_force_hpet_resume(); | ||
336 | |||
249 | default: | 337 | default: |
250 | break; | 338 | break; |
251 | } | 339 | } |
diff --git a/arch/x86/kernel/reboot_64.c b/arch/x86/kernel/reboot_64.c index 368db2b9c5ac..776eb06b6512 100644 --- a/arch/x86/kernel/reboot_64.c +++ b/arch/x86/kernel/reboot_64.c | |||
@@ -11,6 +11,7 @@ | |||
11 | #include <linux/sched.h> | 11 | #include <linux/sched.h> |
12 | #include <asm/io.h> | 12 | #include <asm/io.h> |
13 | #include <asm/delay.h> | 13 | #include <asm/delay.h> |
14 | #include <asm/desc.h> | ||
14 | #include <asm/hw_irq.h> | 15 | #include <asm/hw_irq.h> |
15 | #include <asm/system.h> | 16 | #include <asm/system.h> |
16 | #include <asm/pgtable.h> | 17 | #include <asm/pgtable.h> |
@@ -136,7 +137,7 @@ void machine_emergency_restart(void) | |||
136 | } | 137 | } |
137 | 138 | ||
138 | case BOOT_TRIPLE: | 139 | case BOOT_TRIPLE: |
139 | __asm__ __volatile__("lidt (%0)": :"r" (&no_idt)); | 140 | load_idt((const struct desc_ptr *)&no_idt); |
140 | __asm__ __volatile__("int3"); | 141 | __asm__ __volatile__("int3"); |
141 | 142 | ||
142 | reboot_type = BOOT_KBD; | 143 | reboot_type = BOOT_KBD; |
diff --git a/arch/x86/kernel/reboot_fixups_32.c b/arch/x86/kernel/reboot_fixups_32.c index 8b30b26ad069..1a07bbea7be3 100644 --- a/arch/x86/kernel/reboot_fixups_32.c +++ b/arch/x86/kernel/reboot_fixups_32.c | |||
@@ -12,6 +12,7 @@ | |||
12 | #include <linux/interrupt.h> | 12 | #include <linux/interrupt.h> |
13 | #include <asm/reboot_fixups.h> | 13 | #include <asm/reboot_fixups.h> |
14 | #include <asm/msr.h> | 14 | #include <asm/msr.h> |
15 | #include <asm/geode.h> | ||
15 | 16 | ||
16 | static void cs5530a_warm_reset(struct pci_dev *dev) | 17 | static void cs5530a_warm_reset(struct pci_dev *dev) |
17 | { | 18 | { |
@@ -24,11 +25,8 @@ static void cs5530a_warm_reset(struct pci_dev *dev) | |||
24 | 25 | ||
25 | static void cs5536_warm_reset(struct pci_dev *dev) | 26 | static void cs5536_warm_reset(struct pci_dev *dev) |
26 | { | 27 | { |
27 | /* | 28 | /* writing 1 to the LSB of this MSR causes a hard reset */ |
28 | * 6.6.2.12 Soft Reset (DIVIL_SOFT_RESET) | 29 | wrmsrl(MSR_DIVIL_SOFT_RESET, 1ULL); |
29 | * writing 1 to the LSB of this MSR causes a hard reset. | ||
30 | */ | ||
31 | wrmsrl(0x51400017, 1ULL); | ||
32 | udelay(50); /* shouldn't get here but be safe and spin a while */ | 30 | udelay(50); /* shouldn't get here but be safe and spin a while */ |
33 | } | 31 | } |
34 | 32 | ||
diff --git a/arch/x86/kernel/setup64.c b/arch/x86/kernel/setup64.c index ba9188235057..3558ac78c926 100644 --- a/arch/x86/kernel/setup64.c +++ b/arch/x86/kernel/setup64.c | |||
@@ -185,6 +185,12 @@ void __cpuinit check_efer(void) | |||
185 | unsigned long kernel_eflags; | 185 | unsigned long kernel_eflags; |
186 | 186 | ||
187 | /* | 187 | /* |
188 | * Copies of the original ist values from the tss are only accessed during | ||
189 | * debugging, no special alignment required. | ||
190 | */ | ||
191 | DEFINE_PER_CPU(struct orig_ist, orig_ist); | ||
192 | |||
193 | /* | ||
188 | * cpu_init() initializes state that is per-CPU. Some data is already | 194 | * cpu_init() initializes state that is per-CPU. Some data is already |
189 | * initialized (naturally) in the bootstrap process, such as the GDT | 195 | * initialized (naturally) in the bootstrap process, such as the GDT |
190 | * and IDT. We reload them nevertheless, this function acts as a | 196 | * and IDT. We reload them nevertheless, this function acts as a |
@@ -224,8 +230,8 @@ void __cpuinit cpu_init (void) | |||
224 | memcpy(cpu_gdt(cpu), cpu_gdt_table, GDT_SIZE); | 230 | memcpy(cpu_gdt(cpu), cpu_gdt_table, GDT_SIZE); |
225 | 231 | ||
226 | cpu_gdt_descr[cpu].size = GDT_SIZE; | 232 | cpu_gdt_descr[cpu].size = GDT_SIZE; |
227 | asm volatile("lgdt %0" :: "m" (cpu_gdt_descr[cpu])); | 233 | load_gdt((const struct desc_ptr *)&cpu_gdt_descr[cpu]); |
228 | asm volatile("lidt %0" :: "m" (idt_descr)); | 234 | load_idt((const struct desc_ptr *)&idt_descr); |
229 | 235 | ||
230 | memset(me->thread.tls_array, 0, GDT_ENTRY_TLS_ENTRIES * 8); | 236 | memset(me->thread.tls_array, 0, GDT_ENTRY_TLS_ENTRIES * 8); |
231 | syscall_init(); | 237 | syscall_init(); |
diff --git a/arch/x86/kernel/setup_32.c b/arch/x86/kernel/setup_32.c index b87a6fd5ba48..ba2e165a8a0f 100644 --- a/arch/x86/kernel/setup_32.c +++ b/arch/x86/kernel/setup_32.c | |||
@@ -378,6 +378,49 @@ extern unsigned long __init setup_memory(void); | |||
378 | extern void zone_sizes_init(void); | 378 | extern void zone_sizes_init(void); |
379 | #endif /* !CONFIG_NEED_MULTIPLE_NODES */ | 379 | #endif /* !CONFIG_NEED_MULTIPLE_NODES */ |
380 | 380 | ||
381 | static inline unsigned long long get_total_mem(void) | ||
382 | { | ||
383 | unsigned long long total; | ||
384 | |||
385 | total = max_low_pfn - min_low_pfn; | ||
386 | #ifdef CONFIG_HIGHMEM | ||
387 | total += highend_pfn - highstart_pfn; | ||
388 | #endif | ||
389 | |||
390 | return total << PAGE_SHIFT; | ||
391 | } | ||
392 | |||
393 | #ifdef CONFIG_KEXEC | ||
394 | static void __init reserve_crashkernel(void) | ||
395 | { | ||
396 | unsigned long long total_mem; | ||
397 | unsigned long long crash_size, crash_base; | ||
398 | int ret; | ||
399 | |||
400 | total_mem = get_total_mem(); | ||
401 | |||
402 | ret = parse_crashkernel(boot_command_line, total_mem, | ||
403 | &crash_size, &crash_base); | ||
404 | if (ret == 0 && crash_size > 0) { | ||
405 | if (crash_base > 0) { | ||
406 | printk(KERN_INFO "Reserving %ldMB of memory at %ldMB " | ||
407 | "for crashkernel (System RAM: %ldMB)\n", | ||
408 | (unsigned long)(crash_size >> 20), | ||
409 | (unsigned long)(crash_base >> 20), | ||
410 | (unsigned long)(total_mem >> 20)); | ||
411 | crashk_res.start = crash_base; | ||
412 | crashk_res.end = crash_base + crash_size - 1; | ||
413 | reserve_bootmem(crash_base, crash_size); | ||
414 | } else | ||
415 | printk(KERN_INFO "crashkernel reservation failed - " | ||
416 | "you have to specify a base address\n"); | ||
417 | } | ||
418 | } | ||
419 | #else | ||
420 | static inline void __init reserve_crashkernel(void) | ||
421 | {} | ||
422 | #endif | ||
423 | |||
381 | void __init setup_bootmem_allocator(void) | 424 | void __init setup_bootmem_allocator(void) |
382 | { | 425 | { |
383 | unsigned long bootmap_size; | 426 | unsigned long bootmap_size; |
@@ -453,11 +496,7 @@ void __init setup_bootmem_allocator(void) | |||
453 | } | 496 | } |
454 | } | 497 | } |
455 | #endif | 498 | #endif |
456 | #ifdef CONFIG_KEXEC | 499 | reserve_crashkernel(); |
457 | if (crashk_res.start != crashk_res.end) | ||
458 | reserve_bootmem(crashk_res.start, | ||
459 | crashk_res.end - crashk_res.start + 1); | ||
460 | #endif | ||
461 | } | 500 | } |
462 | 501 | ||
463 | /* | 502 | /* |
@@ -585,7 +624,7 @@ void __init setup_arch(char **cmdline_p) | |||
585 | /* | 624 | /* |
586 | * NOTE: before this point _nobody_ is allowed to allocate | 625 | * NOTE: before this point _nobody_ is allowed to allocate |
587 | * any memory using the bootmem allocator. Although the | 626 | * any memory using the bootmem allocator. Although the |
588 | * alloctor is now initialised only the first 8Mb of the kernel | 627 | * allocator is now initialised only the first 8Mb of the kernel |
589 | * virtual address space has been mapped. All allocations before | 628 | * virtual address space has been mapped. All allocations before |
590 | * paging_init() has completed must use the alloc_bootmem_low_pages() | 629 | * paging_init() has completed must use the alloc_bootmem_low_pages() |
591 | * variant (which allocates DMA'able memory) and care must be taken | 630 | * variant (which allocates DMA'able memory) and care must be taken |
@@ -622,9 +661,7 @@ void __init setup_arch(char **cmdline_p) | |||
622 | #endif | 661 | #endif |
623 | 662 | ||
624 | #ifdef CONFIG_PCI | 663 | #ifdef CONFIG_PCI |
625 | #ifdef CONFIG_X86_IO_APIC | 664 | early_quirks(); |
626 | check_acpi_pci(); /* Checks more than just ACPI actually */ | ||
627 | #endif | ||
628 | #endif | 665 | #endif |
629 | 666 | ||
630 | #ifdef CONFIG_ACPI | 667 | #ifdef CONFIG_ACPI |
diff --git a/arch/x86/kernel/setup_64.c b/arch/x86/kernel/setup_64.c index 5a19f0cc5b67..31322d42eaae 100644 --- a/arch/x86/kernel/setup_64.c +++ b/arch/x86/kernel/setup_64.c | |||
@@ -191,6 +191,37 @@ static inline void copy_edd(void) | |||
191 | } | 191 | } |
192 | #endif | 192 | #endif |
193 | 193 | ||
194 | #ifdef CONFIG_KEXEC | ||
195 | static void __init reserve_crashkernel(void) | ||
196 | { | ||
197 | unsigned long long free_mem; | ||
198 | unsigned long long crash_size, crash_base; | ||
199 | int ret; | ||
200 | |||
201 | free_mem = ((unsigned long long)max_low_pfn - min_low_pfn) << PAGE_SHIFT; | ||
202 | |||
203 | ret = parse_crashkernel(boot_command_line, free_mem, | ||
204 | &crash_size, &crash_base); | ||
205 | if (ret == 0 && crash_size) { | ||
206 | if (crash_base > 0) { | ||
207 | printk(KERN_INFO "Reserving %ldMB of memory at %ldMB " | ||
208 | "for crashkernel (System RAM: %ldMB)\n", | ||
209 | (unsigned long)(crash_size >> 20), | ||
210 | (unsigned long)(crash_base >> 20), | ||
211 | (unsigned long)(free_mem >> 20)); | ||
212 | crashk_res.start = crash_base; | ||
213 | crashk_res.end = crash_base + crash_size - 1; | ||
214 | reserve_bootmem(crash_base, crash_size); | ||
215 | } else | ||
216 | printk(KERN_INFO "crashkernel reservation failed - " | ||
217 | "you have to specify a base address\n"); | ||
218 | } | ||
219 | } | ||
220 | #else | ||
221 | static inline void __init reserve_crashkernel(void) | ||
222 | {} | ||
223 | #endif | ||
224 | |||
194 | #define EBDA_ADDR_POINTER 0x40E | 225 | #define EBDA_ADDR_POINTER 0x40E |
195 | 226 | ||
196 | unsigned __initdata ebda_addr; | 227 | unsigned __initdata ebda_addr; |
@@ -271,6 +302,11 @@ void __init setup_arch(char **cmdline_p) | |||
271 | 302 | ||
272 | dmi_scan_machine(); | 303 | dmi_scan_machine(); |
273 | 304 | ||
305 | #ifdef CONFIG_SMP | ||
306 | /* setup to use the static apicid table during kernel startup */ | ||
307 | x86_cpu_to_apicid_ptr = (void *)&x86_cpu_to_apicid_init; | ||
308 | #endif | ||
309 | |||
274 | #ifdef CONFIG_ACPI | 310 | #ifdef CONFIG_ACPI |
275 | /* | 311 | /* |
276 | * Initialize the ACPI boot-time table parser (gets the RSDP and SDT). | 312 | * Initialize the ACPI boot-time table parser (gets the RSDP and SDT). |
@@ -357,13 +393,7 @@ void __init setup_arch(char **cmdline_p) | |||
357 | } | 393 | } |
358 | } | 394 | } |
359 | #endif | 395 | #endif |
360 | #ifdef CONFIG_KEXEC | 396 | reserve_crashkernel(); |
361 | if (crashk_res.start != crashk_res.end) { | ||
362 | reserve_bootmem_generic(crashk_res.start, | ||
363 | crashk_res.end - crashk_res.start + 1); | ||
364 | } | ||
365 | #endif | ||
366 | |||
367 | paging_init(); | 397 | paging_init(); |
368 | 398 | ||
369 | #ifdef CONFIG_PCI | 399 | #ifdef CONFIG_PCI |
@@ -529,7 +559,7 @@ static void __init amd_detect_cmp(struct cpuinfo_x86 *c) | |||
529 | but in the same order as the HT nodeids. | 559 | but in the same order as the HT nodeids. |
530 | If that doesn't result in a usable node fall back to the | 560 | If that doesn't result in a usable node fall back to the |
531 | path for the previous case. */ | 561 | path for the previous case. */ |
532 | int ht_nodeid = apicid - (cpu_data[0].phys_proc_id << bits); | 562 | int ht_nodeid = apicid - (cpu_data(0).phys_proc_id << bits); |
533 | if (ht_nodeid >= 0 && | 563 | if (ht_nodeid >= 0 && |
534 | apicid_to_node[ht_nodeid] != NUMA_NO_NODE) | 564 | apicid_to_node[ht_nodeid] != NUMA_NO_NODE) |
535 | node = apicid_to_node[ht_nodeid]; | 565 | node = apicid_to_node[ht_nodeid]; |
@@ -853,6 +883,7 @@ void __cpuinit early_identify_cpu(struct cpuinfo_x86 *c) | |||
853 | 883 | ||
854 | #ifdef CONFIG_SMP | 884 | #ifdef CONFIG_SMP |
855 | c->phys_proc_id = (cpuid_ebx(1) >> 24) & 0xff; | 885 | c->phys_proc_id = (cpuid_ebx(1) >> 24) & 0xff; |
886 | c->cpu_index = 0; | ||
856 | #endif | 887 | #endif |
857 | } | 888 | } |
858 | 889 | ||
@@ -959,6 +990,7 @@ void __cpuinit print_cpu_info(struct cpuinfo_x86 *c) | |||
959 | static int show_cpuinfo(struct seq_file *m, void *v) | 990 | static int show_cpuinfo(struct seq_file *m, void *v) |
960 | { | 991 | { |
961 | struct cpuinfo_x86 *c = v; | 992 | struct cpuinfo_x86 *c = v; |
993 | int cpu = 0; | ||
962 | 994 | ||
963 | /* | 995 | /* |
964 | * These flag bits must match the definitions in <asm/cpufeature.h>. | 996 | * These flag bits must match the definitions in <asm/cpufeature.h>. |
@@ -1037,8 +1069,9 @@ static int show_cpuinfo(struct seq_file *m, void *v) | |||
1037 | 1069 | ||
1038 | 1070 | ||
1039 | #ifdef CONFIG_SMP | 1071 | #ifdef CONFIG_SMP |
1040 | if (!cpu_online(c-cpu_data)) | 1072 | if (!cpu_online(c->cpu_index)) |
1041 | return 0; | 1073 | return 0; |
1074 | cpu = c->cpu_index; | ||
1042 | #endif | 1075 | #endif |
1043 | 1076 | ||
1044 | seq_printf(m,"processor\t: %u\n" | 1077 | seq_printf(m,"processor\t: %u\n" |
@@ -1046,7 +1079,7 @@ static int show_cpuinfo(struct seq_file *m, void *v) | |||
1046 | "cpu family\t: %d\n" | 1079 | "cpu family\t: %d\n" |
1047 | "model\t\t: %d\n" | 1080 | "model\t\t: %d\n" |
1048 | "model name\t: %s\n", | 1081 | "model name\t: %s\n", |
1049 | (unsigned)(c-cpu_data), | 1082 | (unsigned)cpu, |
1050 | c->x86_vendor_id[0] ? c->x86_vendor_id : "unknown", | 1083 | c->x86_vendor_id[0] ? c->x86_vendor_id : "unknown", |
1051 | c->x86, | 1084 | c->x86, |
1052 | (int)c->x86_model, | 1085 | (int)c->x86_model, |
@@ -1058,7 +1091,7 @@ static int show_cpuinfo(struct seq_file *m, void *v) | |||
1058 | seq_printf(m, "stepping\t: unknown\n"); | 1091 | seq_printf(m, "stepping\t: unknown\n"); |
1059 | 1092 | ||
1060 | if (cpu_has(c,X86_FEATURE_TSC)) { | 1093 | if (cpu_has(c,X86_FEATURE_TSC)) { |
1061 | unsigned int freq = cpufreq_quick_get((unsigned)(c-cpu_data)); | 1094 | unsigned int freq = cpufreq_quick_get((unsigned)cpu); |
1062 | if (!freq) | 1095 | if (!freq) |
1063 | freq = cpu_khz; | 1096 | freq = cpu_khz; |
1064 | seq_printf(m, "cpu MHz\t\t: %u.%03u\n", | 1097 | seq_printf(m, "cpu MHz\t\t: %u.%03u\n", |
@@ -1071,7 +1104,6 @@ static int show_cpuinfo(struct seq_file *m, void *v) | |||
1071 | 1104 | ||
1072 | #ifdef CONFIG_SMP | 1105 | #ifdef CONFIG_SMP |
1073 | if (smp_num_siblings * c->x86_max_cores > 1) { | 1106 | if (smp_num_siblings * c->x86_max_cores > 1) { |
1074 | int cpu = c - cpu_data; | ||
1075 | seq_printf(m, "physical id\t: %d\n", c->phys_proc_id); | 1107 | seq_printf(m, "physical id\t: %d\n", c->phys_proc_id); |
1076 | seq_printf(m, "siblings\t: %d\n", | 1108 | seq_printf(m, "siblings\t: %d\n", |
1077 | cpus_weight(per_cpu(cpu_core_map, cpu))); | 1109 | cpus_weight(per_cpu(cpu_core_map, cpu))); |
@@ -1129,12 +1161,16 @@ static int show_cpuinfo(struct seq_file *m, void *v) | |||
1129 | 1161 | ||
1130 | static void *c_start(struct seq_file *m, loff_t *pos) | 1162 | static void *c_start(struct seq_file *m, loff_t *pos) |
1131 | { | 1163 | { |
1132 | return *pos < NR_CPUS ? cpu_data + *pos : NULL; | 1164 | if (*pos == 0) /* just in case, cpu 0 is not the first */ |
1165 | *pos = first_cpu(cpu_possible_map); | ||
1166 | if ((*pos) < NR_CPUS && cpu_possible(*pos)) | ||
1167 | return &cpu_data(*pos); | ||
1168 | return NULL; | ||
1133 | } | 1169 | } |
1134 | 1170 | ||
1135 | static void *c_next(struct seq_file *m, void *v, loff_t *pos) | 1171 | static void *c_next(struct seq_file *m, void *v, loff_t *pos) |
1136 | { | 1172 | { |
1137 | ++*pos; | 1173 | *pos = next_cpu(*pos, cpu_possible_map); |
1138 | return c_start(m, pos); | 1174 | return c_start(m, pos); |
1139 | } | 1175 | } |
1140 | 1176 | ||
diff --git a/arch/x86/kernel/signal_32.c b/arch/x86/kernel/signal_32.c index 0d79df3c5631..9bdd83022f5f 100644 --- a/arch/x86/kernel/signal_32.c +++ b/arch/x86/kernel/signal_32.c | |||
@@ -200,8 +200,8 @@ badframe: | |||
200 | if (show_unhandled_signals && printk_ratelimit()) | 200 | if (show_unhandled_signals && printk_ratelimit()) |
201 | printk("%s%s[%d] bad frame in sigreturn frame:%p eip:%lx" | 201 | printk("%s%s[%d] bad frame in sigreturn frame:%p eip:%lx" |
202 | " esp:%lx oeax:%lx\n", | 202 | " esp:%lx oeax:%lx\n", |
203 | current->pid > 1 ? KERN_INFO : KERN_EMERG, | 203 | task_pid_nr(current) > 1 ? KERN_INFO : KERN_EMERG, |
204 | current->comm, current->pid, frame, regs->eip, | 204 | current->comm, task_pid_nr(current), frame, regs->eip, |
205 | regs->esp, regs->orig_eax); | 205 | regs->esp, regs->orig_eax); |
206 | 206 | ||
207 | force_sig(SIGSEGV, current); | 207 | force_sig(SIGSEGV, current); |
@@ -594,7 +594,7 @@ static void fastcall do_signal(struct pt_regs *regs) | |||
594 | 594 | ||
595 | signr = get_signal_to_deliver(&info, &ka, regs, NULL); | 595 | signr = get_signal_to_deliver(&info, &ka, regs, NULL); |
596 | if (signr > 0) { | 596 | if (signr > 0) { |
597 | /* Reenable any watchpoints before delivering the | 597 | /* Re-enable any watchpoints before delivering the |
598 | * signal to user space. The processor register will | 598 | * signal to user space. The processor register will |
599 | * have been cleared if the watchpoint triggered | 599 | * have been cleared if the watchpoint triggered |
600 | * inside the kernel. | 600 | * inside the kernel. |
diff --git a/arch/x86/kernel/signal_64.c b/arch/x86/kernel/signal_64.c index 683802bec419..ab086b0357fc 100644 --- a/arch/x86/kernel/signal_64.c +++ b/arch/x86/kernel/signal_64.c | |||
@@ -410,7 +410,7 @@ static void do_signal(struct pt_regs *regs) | |||
410 | 410 | ||
411 | signr = get_signal_to_deliver(&info, &ka, regs, NULL); | 411 | signr = get_signal_to_deliver(&info, &ka, regs, NULL); |
412 | if (signr > 0) { | 412 | if (signr > 0) { |
413 | /* Reenable any watchpoints before delivering the | 413 | /* Re-enable any watchpoints before delivering the |
414 | * signal to user space. The processor register will | 414 | * signal to user space. The processor register will |
415 | * have been cleared if the watchpoint triggered | 415 | * have been cleared if the watchpoint triggered |
416 | * inside the kernel. | 416 | * inside the kernel. |
diff --git a/arch/x86/kernel/smp_32.c b/arch/x86/kernel/smp_32.c index 791d9f8036ae..f32115308399 100644 --- a/arch/x86/kernel/smp_32.c +++ b/arch/x86/kernel/smp_32.c | |||
@@ -69,7 +69,7 @@ | |||
69 | * | 69 | * |
70 | * B stepping CPUs may hang. There are hardware work arounds | 70 | * B stepping CPUs may hang. There are hardware work arounds |
71 | * for this. We warn about it in case your board doesn't have the work | 71 | * for this. We warn about it in case your board doesn't have the work |
72 | * arounds. Basically thats so I can tell anyone with a B stepping | 72 | * arounds. Basically that's so I can tell anyone with a B stepping |
73 | * CPU and SMP problems "tough". | 73 | * CPU and SMP problems "tough". |
74 | * | 74 | * |
75 | * Specific items [From Pentium Processor Specification Update] | 75 | * Specific items [From Pentium Processor Specification Update] |
@@ -273,7 +273,7 @@ void leave_mm(unsigned long cpu) | |||
273 | * 1a1) cpu_clear(cpu, old_mm->cpu_vm_mask); | 273 | * 1a1) cpu_clear(cpu, old_mm->cpu_vm_mask); |
274 | * Stop ipi delivery for the old mm. This is not synchronized with | 274 | * Stop ipi delivery for the old mm. This is not synchronized with |
275 | * the other cpus, but smp_invalidate_interrupt ignore flush ipis | 275 | * the other cpus, but smp_invalidate_interrupt ignore flush ipis |
276 | * for the wrong mm, and in the worst case we perform a superflous | 276 | * for the wrong mm, and in the worst case we perform a superfluous |
277 | * tlb flush. | 277 | * tlb flush. |
278 | * 1a2) set cpu_tlbstate to TLBSTATE_OK | 278 | * 1a2) set cpu_tlbstate to TLBSTATE_OK |
279 | * Now the smp_invalidate_interrupt won't call leave_mm if cpu0 | 279 | * Now the smp_invalidate_interrupt won't call leave_mm if cpu0 |
@@ -610,7 +610,7 @@ static void stop_this_cpu (void * dummy) | |||
610 | */ | 610 | */ |
611 | cpu_clear(smp_processor_id(), cpu_online_map); | 611 | cpu_clear(smp_processor_id(), cpu_online_map); |
612 | disable_local_APIC(); | 612 | disable_local_APIC(); |
613 | if (cpu_data[smp_processor_id()].hlt_works_ok) | 613 | if (cpu_data(smp_processor_id()).hlt_works_ok) |
614 | for(;;) halt(); | 614 | for(;;) halt(); |
615 | for (;;); | 615 | for (;;); |
616 | } | 616 | } |
@@ -676,7 +676,7 @@ static int convert_apicid_to_cpu(int apic_id) | |||
676 | int i; | 676 | int i; |
677 | 677 | ||
678 | for (i = 0; i < NR_CPUS; i++) { | 678 | for (i = 0; i < NR_CPUS; i++) { |
679 | if (x86_cpu_to_apicid[i] == apic_id) | 679 | if (per_cpu(x86_cpu_to_apicid, i) == apic_id) |
680 | return i; | 680 | return i; |
681 | } | 681 | } |
682 | return -1; | 682 | return -1; |
diff --git a/arch/x86/kernel/smp_64.c b/arch/x86/kernel/smp_64.c index 5c2964727d19..03fa6ed559c6 100644 --- a/arch/x86/kernel/smp_64.c +++ b/arch/x86/kernel/smp_64.c | |||
@@ -322,17 +322,27 @@ void unlock_ipi_call_lock(void) | |||
322 | } | 322 | } |
323 | 323 | ||
324 | /* | 324 | /* |
325 | * this function sends a 'generic call function' IPI to one other CPU | 325 | * this function sends a 'generic call function' IPI to all other CPU |
326 | * in the system. | 326 | * of the system defined in the mask. |
327 | * | ||
328 | * cpu is a standard Linux logical CPU number. | ||
329 | */ | 327 | */ |
330 | static void | 328 | |
331 | __smp_call_function_single(int cpu, void (*func) (void *info), void *info, | 329 | static int |
332 | int nonatomic, int wait) | 330 | __smp_call_function_mask(cpumask_t mask, |
331 | void (*func)(void *), void *info, | ||
332 | int wait) | ||
333 | { | 333 | { |
334 | struct call_data_struct data; | 334 | struct call_data_struct data; |
335 | int cpus = 1; | 335 | cpumask_t allbutself; |
336 | int cpus; | ||
337 | |||
338 | allbutself = cpu_online_map; | ||
339 | cpu_clear(smp_processor_id(), allbutself); | ||
340 | |||
341 | cpus_and(mask, mask, allbutself); | ||
342 | cpus = cpus_weight(mask); | ||
343 | |||
344 | if (!cpus) | ||
345 | return 0; | ||
336 | 346 | ||
337 | data.func = func; | 347 | data.func = func; |
338 | data.info = info; | 348 | data.info = info; |
@@ -343,19 +353,55 @@ __smp_call_function_single(int cpu, void (*func) (void *info), void *info, | |||
343 | 353 | ||
344 | call_data = &data; | 354 | call_data = &data; |
345 | wmb(); | 355 | wmb(); |
346 | /* Send a message to all other CPUs and wait for them to respond */ | 356 | |
347 | send_IPI_mask(cpumask_of_cpu(cpu), CALL_FUNCTION_VECTOR); | 357 | /* Send a message to other CPUs */ |
358 | if (cpus_equal(mask, allbutself)) | ||
359 | send_IPI_allbutself(CALL_FUNCTION_VECTOR); | ||
360 | else | ||
361 | send_IPI_mask(mask, CALL_FUNCTION_VECTOR); | ||
348 | 362 | ||
349 | /* Wait for response */ | 363 | /* Wait for response */ |
350 | while (atomic_read(&data.started) != cpus) | 364 | while (atomic_read(&data.started) != cpus) |
351 | cpu_relax(); | 365 | cpu_relax(); |
352 | 366 | ||
353 | if (!wait) | 367 | if (!wait) |
354 | return; | 368 | return 0; |
355 | 369 | ||
356 | while (atomic_read(&data.finished) != cpus) | 370 | while (atomic_read(&data.finished) != cpus) |
357 | cpu_relax(); | 371 | cpu_relax(); |
372 | |||
373 | return 0; | ||
374 | } | ||
375 | /** | ||
376 | * smp_call_function_mask(): Run a function on a set of other CPUs. | ||
377 | * @mask: The set of cpus to run on. Must not include the current cpu. | ||
378 | * @func: The function to run. This must be fast and non-blocking. | ||
379 | * @info: An arbitrary pointer to pass to the function. | ||
380 | * @wait: If true, wait (atomically) until function has completed on other CPUs. | ||
381 | * | ||
382 | * Returns 0 on success, else a negative status code. | ||
383 | * | ||
384 | * If @wait is true, then returns once @func has returned; otherwise | ||
385 | * it returns just before the target cpu calls @func. | ||
386 | * | ||
387 | * You must not call this function with disabled interrupts or from a | ||
388 | * hardware interrupt handler or from a bottom half handler. | ||
389 | */ | ||
390 | int smp_call_function_mask(cpumask_t mask, | ||
391 | void (*func)(void *), void *info, | ||
392 | int wait) | ||
393 | { | ||
394 | int ret; | ||
395 | |||
396 | /* Can deadlock when called with interrupts disabled */ | ||
397 | WARN_ON(irqs_disabled()); | ||
398 | |||
399 | spin_lock(&call_lock); | ||
400 | ret = __smp_call_function_mask(mask, func, info, wait); | ||
401 | spin_unlock(&call_lock); | ||
402 | return ret; | ||
358 | } | 403 | } |
404 | EXPORT_SYMBOL(smp_call_function_mask); | ||
359 | 405 | ||
360 | /* | 406 | /* |
361 | * smp_call_function_single - Run a function on a specific CPU | 407 | * smp_call_function_single - Run a function on a specific CPU |
@@ -374,6 +420,7 @@ int smp_call_function_single (int cpu, void (*func) (void *info), void *info, | |||
374 | int nonatomic, int wait) | 420 | int nonatomic, int wait) |
375 | { | 421 | { |
376 | /* prevent preemption and reschedule on another processor */ | 422 | /* prevent preemption and reschedule on another processor */ |
423 | int ret; | ||
377 | int me = get_cpu(); | 424 | int me = get_cpu(); |
378 | 425 | ||
379 | /* Can deadlock when called with interrupts disabled */ | 426 | /* Can deadlock when called with interrupts disabled */ |
@@ -387,51 +434,14 @@ int smp_call_function_single (int cpu, void (*func) (void *info), void *info, | |||
387 | return 0; | 434 | return 0; |
388 | } | 435 | } |
389 | 436 | ||
390 | spin_lock(&call_lock); | 437 | ret = smp_call_function_mask(cpumask_of_cpu(cpu), func, info, wait); |
391 | __smp_call_function_single(cpu, func, info, nonatomic, wait); | 438 | |
392 | spin_unlock(&call_lock); | ||
393 | put_cpu(); | 439 | put_cpu(); |
394 | return 0; | 440 | return ret; |
395 | } | 441 | } |
396 | EXPORT_SYMBOL(smp_call_function_single); | 442 | EXPORT_SYMBOL(smp_call_function_single); |
397 | 443 | ||
398 | /* | 444 | /* |
399 | * this function sends a 'generic call function' IPI to all other CPUs | ||
400 | * in the system. | ||
401 | */ | ||
402 | static void __smp_call_function (void (*func) (void *info), void *info, | ||
403 | int nonatomic, int wait) | ||
404 | { | ||
405 | struct call_data_struct data; | ||
406 | int cpus = num_online_cpus()-1; | ||
407 | |||
408 | if (!cpus) | ||
409 | return; | ||
410 | |||
411 | data.func = func; | ||
412 | data.info = info; | ||
413 | atomic_set(&data.started, 0); | ||
414 | data.wait = wait; | ||
415 | if (wait) | ||
416 | atomic_set(&data.finished, 0); | ||
417 | |||
418 | call_data = &data; | ||
419 | wmb(); | ||
420 | /* Send a message to all other CPUs and wait for them to respond */ | ||
421 | send_IPI_allbutself(CALL_FUNCTION_VECTOR); | ||
422 | |||
423 | /* Wait for response */ | ||
424 | while (atomic_read(&data.started) != cpus) | ||
425 | cpu_relax(); | ||
426 | |||
427 | if (!wait) | ||
428 | return; | ||
429 | |||
430 | while (atomic_read(&data.finished) != cpus) | ||
431 | cpu_relax(); | ||
432 | } | ||
433 | |||
434 | /* | ||
435 | * smp_call_function - run a function on all other CPUs. | 445 | * smp_call_function - run a function on all other CPUs. |
436 | * @func: The function to run. This must be fast and non-blocking. | 446 | * @func: The function to run. This must be fast and non-blocking. |
437 | * @info: An arbitrary pointer to pass to the function. | 447 | * @info: An arbitrary pointer to pass to the function. |
@@ -449,10 +459,7 @@ static void __smp_call_function (void (*func) (void *info), void *info, | |||
449 | int smp_call_function (void (*func) (void *info), void *info, int nonatomic, | 459 | int smp_call_function (void (*func) (void *info), void *info, int nonatomic, |
450 | int wait) | 460 | int wait) |
451 | { | 461 | { |
452 | spin_lock(&call_lock); | 462 | return smp_call_function_mask(cpu_online_map, func, info, wait); |
453 | __smp_call_function(func,info,nonatomic,wait); | ||
454 | spin_unlock(&call_lock); | ||
455 | return 0; | ||
456 | } | 463 | } |
457 | EXPORT_SYMBOL(smp_call_function); | 464 | EXPORT_SYMBOL(smp_call_function); |
458 | 465 | ||
@@ -479,7 +486,7 @@ void smp_send_stop(void) | |||
479 | /* Don't deadlock on the call lock in panic */ | 486 | /* Don't deadlock on the call lock in panic */ |
480 | nolock = !spin_trylock(&call_lock); | 487 | nolock = !spin_trylock(&call_lock); |
481 | local_irq_save(flags); | 488 | local_irq_save(flags); |
482 | __smp_call_function(stop_this_cpu, NULL, 0, 0); | 489 | __smp_call_function_mask(cpu_online_map, stop_this_cpu, NULL, 0); |
483 | if (!nolock) | 490 | if (!nolock) |
484 | spin_unlock(&call_lock); | 491 | spin_unlock(&call_lock); |
485 | disable_local_APIC(); | 492 | disable_local_APIC(); |
diff --git a/arch/x86/kernel/smpboot_32.c b/arch/x86/kernel/smpboot_32.c index be3faac04719..ef0f34ede1ab 100644 --- a/arch/x86/kernel/smpboot_32.c +++ b/arch/x86/kernel/smpboot_32.c | |||
@@ -67,7 +67,7 @@ int smp_num_siblings = 1; | |||
67 | EXPORT_SYMBOL(smp_num_siblings); | 67 | EXPORT_SYMBOL(smp_num_siblings); |
68 | 68 | ||
69 | /* Last level cache ID of each logical CPU */ | 69 | /* Last level cache ID of each logical CPU */ |
70 | int cpu_llc_id[NR_CPUS] __cpuinitdata = {[0 ... NR_CPUS-1] = BAD_APICID}; | 70 | DEFINE_PER_CPU(u8, cpu_llc_id) = BAD_APICID; |
71 | 71 | ||
72 | /* representing HT siblings of each logical CPU */ | 72 | /* representing HT siblings of each logical CPU */ |
73 | DEFINE_PER_CPU(cpumask_t, cpu_sibling_map); | 73 | DEFINE_PER_CPU(cpumask_t, cpu_sibling_map); |
@@ -89,12 +89,20 @@ EXPORT_SYMBOL(cpu_possible_map); | |||
89 | static cpumask_t smp_commenced_mask; | 89 | static cpumask_t smp_commenced_mask; |
90 | 90 | ||
91 | /* Per CPU bogomips and other parameters */ | 91 | /* Per CPU bogomips and other parameters */ |
92 | struct cpuinfo_x86 cpu_data[NR_CPUS] __cacheline_aligned; | 92 | DEFINE_PER_CPU_SHARED_ALIGNED(struct cpuinfo_x86, cpu_info); |
93 | EXPORT_SYMBOL(cpu_data); | 93 | EXPORT_PER_CPU_SYMBOL(cpu_info); |
94 | 94 | ||
95 | u8 x86_cpu_to_apicid[NR_CPUS] __read_mostly = | 95 | /* |
96 | { [0 ... NR_CPUS-1] = 0xff }; | 96 | * The following static array is used during kernel startup |
97 | EXPORT_SYMBOL(x86_cpu_to_apicid); | 97 | * and the x86_cpu_to_apicid_ptr contains the address of the |
98 | * array during this time. Is it zeroed when the per_cpu | ||
99 | * data area is removed. | ||
100 | */ | ||
101 | u8 x86_cpu_to_apicid_init[NR_CPUS] __initdata = | ||
102 | { [0 ... NR_CPUS-1] = BAD_APICID }; | ||
103 | void *x86_cpu_to_apicid_ptr; | ||
104 | DEFINE_PER_CPU(u8, x86_cpu_to_apicid) = BAD_APICID; | ||
105 | EXPORT_PER_CPU_SYMBOL(x86_cpu_to_apicid); | ||
98 | 106 | ||
99 | u8 apicid_2_node[MAX_APICID]; | 107 | u8 apicid_2_node[MAX_APICID]; |
100 | 108 | ||
@@ -150,9 +158,10 @@ void __init smp_alloc_memory(void) | |||
150 | 158 | ||
151 | void __cpuinit smp_store_cpu_info(int id) | 159 | void __cpuinit smp_store_cpu_info(int id) |
152 | { | 160 | { |
153 | struct cpuinfo_x86 *c = cpu_data + id; | 161 | struct cpuinfo_x86 *c = &cpu_data(id); |
154 | 162 | ||
155 | *c = boot_cpu_data; | 163 | *c = boot_cpu_data; |
164 | c->cpu_index = id; | ||
156 | if (id!=0) | 165 | if (id!=0) |
157 | identify_secondary_cpu(c); | 166 | identify_secondary_cpu(c); |
158 | /* | 167 | /* |
@@ -294,7 +303,7 @@ static int cpucount; | |||
294 | /* maps the cpu to the sched domain representing multi-core */ | 303 | /* maps the cpu to the sched domain representing multi-core */ |
295 | cpumask_t cpu_coregroup_map(int cpu) | 304 | cpumask_t cpu_coregroup_map(int cpu) |
296 | { | 305 | { |
297 | struct cpuinfo_x86 *c = cpu_data + cpu; | 306 | struct cpuinfo_x86 *c = &cpu_data(cpu); |
298 | /* | 307 | /* |
299 | * For perf, we return last level cache shared map. | 308 | * For perf, we return last level cache shared map. |
300 | * And for power savings, we return cpu_core_map | 309 | * And for power savings, we return cpu_core_map |
@@ -311,41 +320,41 @@ static cpumask_t cpu_sibling_setup_map; | |||
311 | void __cpuinit set_cpu_sibling_map(int cpu) | 320 | void __cpuinit set_cpu_sibling_map(int cpu) |
312 | { | 321 | { |
313 | int i; | 322 | int i; |
314 | struct cpuinfo_x86 *c = cpu_data; | 323 | struct cpuinfo_x86 *c = &cpu_data(cpu); |
315 | 324 | ||
316 | cpu_set(cpu, cpu_sibling_setup_map); | 325 | cpu_set(cpu, cpu_sibling_setup_map); |
317 | 326 | ||
318 | if (smp_num_siblings > 1) { | 327 | if (smp_num_siblings > 1) { |
319 | for_each_cpu_mask(i, cpu_sibling_setup_map) { | 328 | for_each_cpu_mask(i, cpu_sibling_setup_map) { |
320 | if (c[cpu].phys_proc_id == c[i].phys_proc_id && | 329 | if (c->phys_proc_id == cpu_data(i).phys_proc_id && |
321 | c[cpu].cpu_core_id == c[i].cpu_core_id) { | 330 | c->cpu_core_id == cpu_data(i).cpu_core_id) { |
322 | cpu_set(i, per_cpu(cpu_sibling_map, cpu)); | 331 | cpu_set(i, per_cpu(cpu_sibling_map, cpu)); |
323 | cpu_set(cpu, per_cpu(cpu_sibling_map, i)); | 332 | cpu_set(cpu, per_cpu(cpu_sibling_map, i)); |
324 | cpu_set(i, per_cpu(cpu_core_map, cpu)); | 333 | cpu_set(i, per_cpu(cpu_core_map, cpu)); |
325 | cpu_set(cpu, per_cpu(cpu_core_map, i)); | 334 | cpu_set(cpu, per_cpu(cpu_core_map, i)); |
326 | cpu_set(i, c[cpu].llc_shared_map); | 335 | cpu_set(i, c->llc_shared_map); |
327 | cpu_set(cpu, c[i].llc_shared_map); | 336 | cpu_set(cpu, cpu_data(i).llc_shared_map); |
328 | } | 337 | } |
329 | } | 338 | } |
330 | } else { | 339 | } else { |
331 | cpu_set(cpu, per_cpu(cpu_sibling_map, cpu)); | 340 | cpu_set(cpu, per_cpu(cpu_sibling_map, cpu)); |
332 | } | 341 | } |
333 | 342 | ||
334 | cpu_set(cpu, c[cpu].llc_shared_map); | 343 | cpu_set(cpu, c->llc_shared_map); |
335 | 344 | ||
336 | if (current_cpu_data.x86_max_cores == 1) { | 345 | if (current_cpu_data.x86_max_cores == 1) { |
337 | per_cpu(cpu_core_map, cpu) = per_cpu(cpu_sibling_map, cpu); | 346 | per_cpu(cpu_core_map, cpu) = per_cpu(cpu_sibling_map, cpu); |
338 | c[cpu].booted_cores = 1; | 347 | c->booted_cores = 1; |
339 | return; | 348 | return; |
340 | } | 349 | } |
341 | 350 | ||
342 | for_each_cpu_mask(i, cpu_sibling_setup_map) { | 351 | for_each_cpu_mask(i, cpu_sibling_setup_map) { |
343 | if (cpu_llc_id[cpu] != BAD_APICID && | 352 | if (per_cpu(cpu_llc_id, cpu) != BAD_APICID && |
344 | cpu_llc_id[cpu] == cpu_llc_id[i]) { | 353 | per_cpu(cpu_llc_id, cpu) == per_cpu(cpu_llc_id, i)) { |
345 | cpu_set(i, c[cpu].llc_shared_map); | 354 | cpu_set(i, c->llc_shared_map); |
346 | cpu_set(cpu, c[i].llc_shared_map); | 355 | cpu_set(cpu, cpu_data(i).llc_shared_map); |
347 | } | 356 | } |
348 | if (c[cpu].phys_proc_id == c[i].phys_proc_id) { | 357 | if (c->phys_proc_id == cpu_data(i).phys_proc_id) { |
349 | cpu_set(i, per_cpu(cpu_core_map, cpu)); | 358 | cpu_set(i, per_cpu(cpu_core_map, cpu)); |
350 | cpu_set(cpu, per_cpu(cpu_core_map, i)); | 359 | cpu_set(cpu, per_cpu(cpu_core_map, i)); |
351 | /* | 360 | /* |
@@ -357,15 +366,15 @@ void __cpuinit set_cpu_sibling_map(int cpu) | |||
357 | * the booted_cores for this new cpu | 366 | * the booted_cores for this new cpu |
358 | */ | 367 | */ |
359 | if (first_cpu(per_cpu(cpu_sibling_map, i)) == i) | 368 | if (first_cpu(per_cpu(cpu_sibling_map, i)) == i) |
360 | c[cpu].booted_cores++; | 369 | c->booted_cores++; |
361 | /* | 370 | /* |
362 | * increment the core count for all | 371 | * increment the core count for all |
363 | * the other cpus in this package | 372 | * the other cpus in this package |
364 | */ | 373 | */ |
365 | if (i != cpu) | 374 | if (i != cpu) |
366 | c[i].booted_cores++; | 375 | cpu_data(i).booted_cores++; |
367 | } else if (i != cpu && !c[cpu].booted_cores) | 376 | } else if (i != cpu && !c->booted_cores) |
368 | c[cpu].booted_cores = c[i].booted_cores; | 377 | c->booted_cores = cpu_data(i).booted_cores; |
369 | } | 378 | } |
370 | } | 379 | } |
371 | } | 380 | } |
@@ -412,7 +421,7 @@ static void __cpuinit start_secondary(void *unused) | |||
412 | /* | 421 | /* |
413 | * We need to hold call_lock, so there is no inconsistency | 422 | * We need to hold call_lock, so there is no inconsistency |
414 | * between the time smp_call_function() determines number of | 423 | * between the time smp_call_function() determines number of |
415 | * IPI receipients, and the time when the determination is made | 424 | * IPI recipients, and the time when the determination is made |
416 | * for which cpus receive the IPI. Holding this | 425 | * for which cpus receive the IPI. Holding this |
417 | * lock helps us to not include this cpu in a currently in progress | 426 | * lock helps us to not include this cpu in a currently in progress |
418 | * smp_call_function(). | 427 | * smp_call_function(). |
@@ -804,7 +813,7 @@ static int __cpuinit do_boot_cpu(int apicid, int cpu) | |||
804 | 813 | ||
805 | irq_ctx_init(cpu); | 814 | irq_ctx_init(cpu); |
806 | 815 | ||
807 | x86_cpu_to_apicid[cpu] = apicid; | 816 | per_cpu(x86_cpu_to_apicid, cpu) = apicid; |
808 | /* | 817 | /* |
809 | * This grunge runs the startup process for | 818 | * This grunge runs the startup process for |
810 | * the targeted processor. | 819 | * the targeted processor. |
@@ -844,7 +853,7 @@ static int __cpuinit do_boot_cpu(int apicid, int cpu) | |||
844 | /* number CPUs logically, starting from 1 (BSP is 0) */ | 853 | /* number CPUs logically, starting from 1 (BSP is 0) */ |
845 | Dprintk("OK.\n"); | 854 | Dprintk("OK.\n"); |
846 | printk("CPU%d: ", cpu); | 855 | printk("CPU%d: ", cpu); |
847 | print_cpu_info(&cpu_data[cpu]); | 856 | print_cpu_info(&cpu_data(cpu)); |
848 | Dprintk("CPU has booted.\n"); | 857 | Dprintk("CPU has booted.\n"); |
849 | } else { | 858 | } else { |
850 | boot_error= 1; | 859 | boot_error= 1; |
@@ -866,7 +875,7 @@ static int __cpuinit do_boot_cpu(int apicid, int cpu) | |||
866 | cpu_clear(cpu, cpu_initialized); /* was set by cpu_init() */ | 875 | cpu_clear(cpu, cpu_initialized); /* was set by cpu_init() */ |
867 | cpucount--; | 876 | cpucount--; |
868 | } else { | 877 | } else { |
869 | x86_cpu_to_apicid[cpu] = apicid; | 878 | per_cpu(x86_cpu_to_apicid, cpu) = apicid; |
870 | cpu_set(cpu, cpu_present_map); | 879 | cpu_set(cpu, cpu_present_map); |
871 | } | 880 | } |
872 | 881 | ||
@@ -915,7 +924,7 @@ static int __cpuinit __smp_prepare_cpu(int cpu) | |||
915 | struct warm_boot_cpu_info info; | 924 | struct warm_boot_cpu_info info; |
916 | int apicid, ret; | 925 | int apicid, ret; |
917 | 926 | ||
918 | apicid = x86_cpu_to_apicid[cpu]; | 927 | apicid = per_cpu(x86_cpu_to_apicid, cpu); |
919 | if (apicid == BAD_APICID) { | 928 | if (apicid == BAD_APICID) { |
920 | ret = -ENODEV; | 929 | ret = -ENODEV; |
921 | goto exit; | 930 | goto exit; |
@@ -961,11 +970,11 @@ static void __init smp_boot_cpus(unsigned int max_cpus) | |||
961 | */ | 970 | */ |
962 | smp_store_cpu_info(0); /* Final full version of the data */ | 971 | smp_store_cpu_info(0); /* Final full version of the data */ |
963 | printk("CPU%d: ", 0); | 972 | printk("CPU%d: ", 0); |
964 | print_cpu_info(&cpu_data[0]); | 973 | print_cpu_info(&cpu_data(0)); |
965 | 974 | ||
966 | boot_cpu_physical_apicid = GET_APIC_ID(apic_read(APIC_ID)); | 975 | boot_cpu_physical_apicid = GET_APIC_ID(apic_read(APIC_ID)); |
967 | boot_cpu_logical_apicid = logical_smp_processor_id(); | 976 | boot_cpu_logical_apicid = logical_smp_processor_id(); |
968 | x86_cpu_to_apicid[0] = boot_cpu_physical_apicid; | 977 | per_cpu(x86_cpu_to_apicid, 0) = boot_cpu_physical_apicid; |
969 | 978 | ||
970 | current_thread_info()->cpu = 0; | 979 | current_thread_info()->cpu = 0; |
971 | 980 | ||
@@ -1008,6 +1017,7 @@ static void __init smp_boot_cpus(unsigned int max_cpus) | |||
1008 | printk(KERN_ERR "... forcing use of dummy APIC emulation. (tell your hw vendor)\n"); | 1017 | printk(KERN_ERR "... forcing use of dummy APIC emulation. (tell your hw vendor)\n"); |
1009 | smpboot_clear_io_apic_irqs(); | 1018 | smpboot_clear_io_apic_irqs(); |
1010 | phys_cpu_present_map = physid_mask_of_physid(0); | 1019 | phys_cpu_present_map = physid_mask_of_physid(0); |
1020 | map_cpu_to_logical_apicid(); | ||
1011 | cpu_set(0, per_cpu(cpu_sibling_map, 0)); | 1021 | cpu_set(0, per_cpu(cpu_sibling_map, 0)); |
1012 | cpu_set(0, per_cpu(cpu_core_map, 0)); | 1022 | cpu_set(0, per_cpu(cpu_core_map, 0)); |
1013 | return; | 1023 | return; |
@@ -1029,6 +1039,7 @@ static void __init smp_boot_cpus(unsigned int max_cpus) | |||
1029 | } | 1039 | } |
1030 | smpboot_clear_io_apic_irqs(); | 1040 | smpboot_clear_io_apic_irqs(); |
1031 | phys_cpu_present_map = physid_mask_of_physid(0); | 1041 | phys_cpu_present_map = physid_mask_of_physid(0); |
1042 | map_cpu_to_logical_apicid(); | ||
1032 | cpu_set(0, per_cpu(cpu_sibling_map, 0)); | 1043 | cpu_set(0, per_cpu(cpu_sibling_map, 0)); |
1033 | cpu_set(0, per_cpu(cpu_core_map, 0)); | 1044 | cpu_set(0, per_cpu(cpu_core_map, 0)); |
1034 | return; | 1045 | return; |
@@ -1082,7 +1093,7 @@ static void __init smp_boot_cpus(unsigned int max_cpus) | |||
1082 | Dprintk("Before bogomips.\n"); | 1093 | Dprintk("Before bogomips.\n"); |
1083 | for (cpu = 0; cpu < NR_CPUS; cpu++) | 1094 | for (cpu = 0; cpu < NR_CPUS; cpu++) |
1084 | if (cpu_isset(cpu, cpu_callout_map)) | 1095 | if (cpu_isset(cpu, cpu_callout_map)) |
1085 | bogosum += cpu_data[cpu].loops_per_jiffy; | 1096 | bogosum += cpu_data(cpu).loops_per_jiffy; |
1086 | printk(KERN_INFO | 1097 | printk(KERN_INFO |
1087 | "Total of %d processors activated (%lu.%02lu BogoMIPS).\n", | 1098 | "Total of %d processors activated (%lu.%02lu BogoMIPS).\n", |
1088 | cpucount+1, | 1099 | cpucount+1, |
@@ -1152,7 +1163,7 @@ void __init native_smp_prepare_boot_cpu(void) | |||
1152 | void remove_siblinginfo(int cpu) | 1163 | void remove_siblinginfo(int cpu) |
1153 | { | 1164 | { |
1154 | int sibling; | 1165 | int sibling; |
1155 | struct cpuinfo_x86 *c = cpu_data; | 1166 | struct cpuinfo_x86 *c = &cpu_data(cpu); |
1156 | 1167 | ||
1157 | for_each_cpu_mask(sibling, per_cpu(cpu_core_map, cpu)) { | 1168 | for_each_cpu_mask(sibling, per_cpu(cpu_core_map, cpu)) { |
1158 | cpu_clear(cpu, per_cpu(cpu_core_map, sibling)); | 1169 | cpu_clear(cpu, per_cpu(cpu_core_map, sibling)); |
@@ -1160,15 +1171,15 @@ void remove_siblinginfo(int cpu) | |||
1160 | * last thread sibling in this cpu core going down | 1171 | * last thread sibling in this cpu core going down |
1161 | */ | 1172 | */ |
1162 | if (cpus_weight(per_cpu(cpu_sibling_map, cpu)) == 1) | 1173 | if (cpus_weight(per_cpu(cpu_sibling_map, cpu)) == 1) |
1163 | c[sibling].booted_cores--; | 1174 | cpu_data(sibling).booted_cores--; |
1164 | } | 1175 | } |
1165 | 1176 | ||
1166 | for_each_cpu_mask(sibling, per_cpu(cpu_sibling_map, cpu)) | 1177 | for_each_cpu_mask(sibling, per_cpu(cpu_sibling_map, cpu)) |
1167 | cpu_clear(cpu, per_cpu(cpu_sibling_map, sibling)); | 1178 | cpu_clear(cpu, per_cpu(cpu_sibling_map, sibling)); |
1168 | cpus_clear(per_cpu(cpu_sibling_map, cpu)); | 1179 | cpus_clear(per_cpu(cpu_sibling_map, cpu)); |
1169 | cpus_clear(per_cpu(cpu_core_map, cpu)); | 1180 | cpus_clear(per_cpu(cpu_core_map, cpu)); |
1170 | c[cpu].phys_proc_id = 0; | 1181 | c->phys_proc_id = 0; |
1171 | c[cpu].cpu_core_id = 0; | 1182 | c->cpu_core_id = 0; |
1172 | cpu_clear(cpu, cpu_sibling_setup_map); | 1183 | cpu_clear(cpu, cpu_sibling_setup_map); |
1173 | } | 1184 | } |
1174 | 1185 | ||
diff --git a/arch/x86/kernel/smpboot_64.c b/arch/x86/kernel/smpboot_64.c index e351ac4ab5b1..b7e768dd87c9 100644 --- a/arch/x86/kernel/smpboot_64.c +++ b/arch/x86/kernel/smpboot_64.c | |||
@@ -65,7 +65,7 @@ int smp_num_siblings = 1; | |||
65 | EXPORT_SYMBOL(smp_num_siblings); | 65 | EXPORT_SYMBOL(smp_num_siblings); |
66 | 66 | ||
67 | /* Last level cache ID of each logical CPU */ | 67 | /* Last level cache ID of each logical CPU */ |
68 | u8 cpu_llc_id[NR_CPUS] __cpuinitdata = {[0 ... NR_CPUS-1] = BAD_APICID}; | 68 | DEFINE_PER_CPU(u8, cpu_llc_id) = BAD_APICID; |
69 | 69 | ||
70 | /* Bitmask of currently online CPUs */ | 70 | /* Bitmask of currently online CPUs */ |
71 | cpumask_t cpu_online_map __read_mostly; | 71 | cpumask_t cpu_online_map __read_mostly; |
@@ -84,8 +84,8 @@ cpumask_t cpu_possible_map; | |||
84 | EXPORT_SYMBOL(cpu_possible_map); | 84 | EXPORT_SYMBOL(cpu_possible_map); |
85 | 85 | ||
86 | /* Per CPU bogomips and other parameters */ | 86 | /* Per CPU bogomips and other parameters */ |
87 | struct cpuinfo_x86 cpu_data[NR_CPUS] __cacheline_aligned; | 87 | DEFINE_PER_CPU_SHARED_ALIGNED(struct cpuinfo_x86, cpu_info); |
88 | EXPORT_SYMBOL(cpu_data); | 88 | EXPORT_PER_CPU_SYMBOL(cpu_info); |
89 | 89 | ||
90 | /* Set when the idlers are all forked */ | 90 | /* Set when the idlers are all forked */ |
91 | int smp_threads_ready; | 91 | int smp_threads_ready; |
@@ -138,9 +138,10 @@ static unsigned long __cpuinit setup_trampoline(void) | |||
138 | 138 | ||
139 | static void __cpuinit smp_store_cpu_info(int id) | 139 | static void __cpuinit smp_store_cpu_info(int id) |
140 | { | 140 | { |
141 | struct cpuinfo_x86 *c = cpu_data + id; | 141 | struct cpuinfo_x86 *c = &cpu_data(id); |
142 | 142 | ||
143 | *c = boot_cpu_data; | 143 | *c = boot_cpu_data; |
144 | c->cpu_index = id; | ||
144 | identify_cpu(c); | 145 | identify_cpu(c); |
145 | print_cpu_info(c); | 146 | print_cpu_info(c); |
146 | } | 147 | } |
@@ -237,7 +238,7 @@ void __cpuinit smp_callin(void) | |||
237 | /* maps the cpu to the sched domain representing multi-core */ | 238 | /* maps the cpu to the sched domain representing multi-core */ |
238 | cpumask_t cpu_coregroup_map(int cpu) | 239 | cpumask_t cpu_coregroup_map(int cpu) |
239 | { | 240 | { |
240 | struct cpuinfo_x86 *c = cpu_data + cpu; | 241 | struct cpuinfo_x86 *c = &cpu_data(cpu); |
241 | /* | 242 | /* |
242 | * For perf, we return last level cache shared map. | 243 | * For perf, we return last level cache shared map. |
243 | * And for power savings, we return cpu_core_map | 244 | * And for power savings, we return cpu_core_map |
@@ -254,41 +255,41 @@ static cpumask_t cpu_sibling_setup_map; | |||
254 | static inline void set_cpu_sibling_map(int cpu) | 255 | static inline void set_cpu_sibling_map(int cpu) |
255 | { | 256 | { |
256 | int i; | 257 | int i; |
257 | struct cpuinfo_x86 *c = cpu_data; | 258 | struct cpuinfo_x86 *c = &cpu_data(cpu); |
258 | 259 | ||
259 | cpu_set(cpu, cpu_sibling_setup_map); | 260 | cpu_set(cpu, cpu_sibling_setup_map); |
260 | 261 | ||
261 | if (smp_num_siblings > 1) { | 262 | if (smp_num_siblings > 1) { |
262 | for_each_cpu_mask(i, cpu_sibling_setup_map) { | 263 | for_each_cpu_mask(i, cpu_sibling_setup_map) { |
263 | if (c[cpu].phys_proc_id == c[i].phys_proc_id && | 264 | if (c->phys_proc_id == cpu_data(i).phys_proc_id && |
264 | c[cpu].cpu_core_id == c[i].cpu_core_id) { | 265 | c->cpu_core_id == cpu_data(i).cpu_core_id) { |
265 | cpu_set(i, per_cpu(cpu_sibling_map, cpu)); | 266 | cpu_set(i, per_cpu(cpu_sibling_map, cpu)); |
266 | cpu_set(cpu, per_cpu(cpu_sibling_map, i)); | 267 | cpu_set(cpu, per_cpu(cpu_sibling_map, i)); |
267 | cpu_set(i, per_cpu(cpu_core_map, cpu)); | 268 | cpu_set(i, per_cpu(cpu_core_map, cpu)); |
268 | cpu_set(cpu, per_cpu(cpu_core_map, i)); | 269 | cpu_set(cpu, per_cpu(cpu_core_map, i)); |
269 | cpu_set(i, c[cpu].llc_shared_map); | 270 | cpu_set(i, c->llc_shared_map); |
270 | cpu_set(cpu, c[i].llc_shared_map); | 271 | cpu_set(cpu, cpu_data(i).llc_shared_map); |
271 | } | 272 | } |
272 | } | 273 | } |
273 | } else { | 274 | } else { |
274 | cpu_set(cpu, per_cpu(cpu_sibling_map, cpu)); | 275 | cpu_set(cpu, per_cpu(cpu_sibling_map, cpu)); |
275 | } | 276 | } |
276 | 277 | ||
277 | cpu_set(cpu, c[cpu].llc_shared_map); | 278 | cpu_set(cpu, c->llc_shared_map); |
278 | 279 | ||
279 | if (current_cpu_data.x86_max_cores == 1) { | 280 | if (current_cpu_data.x86_max_cores == 1) { |
280 | per_cpu(cpu_core_map, cpu) = per_cpu(cpu_sibling_map, cpu); | 281 | per_cpu(cpu_core_map, cpu) = per_cpu(cpu_sibling_map, cpu); |
281 | c[cpu].booted_cores = 1; | 282 | c->booted_cores = 1; |
282 | return; | 283 | return; |
283 | } | 284 | } |
284 | 285 | ||
285 | for_each_cpu_mask(i, cpu_sibling_setup_map) { | 286 | for_each_cpu_mask(i, cpu_sibling_setup_map) { |
286 | if (cpu_llc_id[cpu] != BAD_APICID && | 287 | if (per_cpu(cpu_llc_id, cpu) != BAD_APICID && |
287 | cpu_llc_id[cpu] == cpu_llc_id[i]) { | 288 | per_cpu(cpu_llc_id, cpu) == per_cpu(cpu_llc_id, i)) { |
288 | cpu_set(i, c[cpu].llc_shared_map); | 289 | cpu_set(i, c->llc_shared_map); |
289 | cpu_set(cpu, c[i].llc_shared_map); | 290 | cpu_set(cpu, cpu_data(i).llc_shared_map); |
290 | } | 291 | } |
291 | if (c[cpu].phys_proc_id == c[i].phys_proc_id) { | 292 | if (c->phys_proc_id == cpu_data(i).phys_proc_id) { |
292 | cpu_set(i, per_cpu(cpu_core_map, cpu)); | 293 | cpu_set(i, per_cpu(cpu_core_map, cpu)); |
293 | cpu_set(cpu, per_cpu(cpu_core_map, i)); | 294 | cpu_set(cpu, per_cpu(cpu_core_map, i)); |
294 | /* | 295 | /* |
@@ -300,15 +301,15 @@ static inline void set_cpu_sibling_map(int cpu) | |||
300 | * the booted_cores for this new cpu | 301 | * the booted_cores for this new cpu |
301 | */ | 302 | */ |
302 | if (first_cpu(per_cpu(cpu_sibling_map, i)) == i) | 303 | if (first_cpu(per_cpu(cpu_sibling_map, i)) == i) |
303 | c[cpu].booted_cores++; | 304 | c->booted_cores++; |
304 | /* | 305 | /* |
305 | * increment the core count for all | 306 | * increment the core count for all |
306 | * the other cpus in this package | 307 | * the other cpus in this package |
307 | */ | 308 | */ |
308 | if (i != cpu) | 309 | if (i != cpu) |
309 | c[i].booted_cores++; | 310 | cpu_data(i).booted_cores++; |
310 | } else if (i != cpu && !c[cpu].booted_cores) | 311 | } else if (i != cpu && !c->booted_cores) |
311 | c[cpu].booted_cores = c[i].booted_cores; | 312 | c->booted_cores = cpu_data(i).booted_cores; |
312 | } | 313 | } |
313 | } | 314 | } |
314 | } | 315 | } |
@@ -350,7 +351,7 @@ void __cpuinit start_secondary(void) | |||
350 | /* | 351 | /* |
351 | * We need to hold call_lock, so there is no inconsistency | 352 | * We need to hold call_lock, so there is no inconsistency |
352 | * between the time smp_call_function() determines number of | 353 | * between the time smp_call_function() determines number of |
353 | * IPI receipients, and the time when the determination is made | 354 | * IPI recipients, and the time when the determination is made |
354 | * for which cpus receive the IPI in genapic_flat.c. Holding this | 355 | * for which cpus receive the IPI in genapic_flat.c. Holding this |
355 | * lock helps us to not include this cpu in a currently in progress | 356 | * lock helps us to not include this cpu in a currently in progress |
356 | * smp_call_function(). | 357 | * smp_call_function(). |
@@ -694,7 +695,7 @@ do_rest: | |||
694 | clear_node_cpumask(cpu); /* was set by numa_add_cpu */ | 695 | clear_node_cpumask(cpu); /* was set by numa_add_cpu */ |
695 | cpu_clear(cpu, cpu_present_map); | 696 | cpu_clear(cpu, cpu_present_map); |
696 | cpu_clear(cpu, cpu_possible_map); | 697 | cpu_clear(cpu, cpu_possible_map); |
697 | x86_cpu_to_apicid[cpu] = BAD_APICID; | 698 | per_cpu(x86_cpu_to_apicid, cpu) = BAD_APICID; |
698 | return -EIO; | 699 | return -EIO; |
699 | } | 700 | } |
700 | 701 | ||
@@ -841,6 +842,26 @@ static int __init smp_sanity_check(unsigned max_cpus) | |||
841 | } | 842 | } |
842 | 843 | ||
843 | /* | 844 | /* |
845 | * Copy apicid's found by MP_processor_info from initial array to the per cpu | ||
846 | * data area. The x86_cpu_to_apicid_init array is then expendable and the | ||
847 | * x86_cpu_to_apicid_ptr is zeroed indicating that the static array is no | ||
848 | * longer available. | ||
849 | */ | ||
850 | void __init smp_set_apicids(void) | ||
851 | { | ||
852 | int cpu; | ||
853 | |||
854 | for_each_cpu_mask(cpu, cpu_possible_map) { | ||
855 | if (per_cpu_offset(cpu)) | ||
856 | per_cpu(x86_cpu_to_apicid, cpu) = | ||
857 | x86_cpu_to_apicid_init[cpu]; | ||
858 | } | ||
859 | |||
860 | /* indicate the static array will be going away soon */ | ||
861 | x86_cpu_to_apicid_ptr = NULL; | ||
862 | } | ||
863 | |||
864 | /* | ||
844 | * Prepare for SMP bootup. The MP table or ACPI has been read | 865 | * Prepare for SMP bootup. The MP table or ACPI has been read |
845 | * earlier. Just do some sanity checking here and enable APIC mode. | 866 | * earlier. Just do some sanity checking here and enable APIC mode. |
846 | */ | 867 | */ |
@@ -849,6 +870,7 @@ void __init smp_prepare_cpus(unsigned int max_cpus) | |||
849 | nmi_watchdog_default(); | 870 | nmi_watchdog_default(); |
850 | current_cpu_data = boot_cpu_data; | 871 | current_cpu_data = boot_cpu_data; |
851 | current_thread_info()->cpu = 0; /* needed? */ | 872 | current_thread_info()->cpu = 0; /* needed? */ |
873 | smp_set_apicids(); | ||
852 | set_cpu_sibling_map(0); | 874 | set_cpu_sibling_map(0); |
853 | 875 | ||
854 | if (smp_sanity_check(max_cpus) < 0) { | 876 | if (smp_sanity_check(max_cpus) < 0) { |
@@ -968,7 +990,7 @@ void __init smp_cpus_done(unsigned int max_cpus) | |||
968 | static void remove_siblinginfo(int cpu) | 990 | static void remove_siblinginfo(int cpu) |
969 | { | 991 | { |
970 | int sibling; | 992 | int sibling; |
971 | struct cpuinfo_x86 *c = cpu_data; | 993 | struct cpuinfo_x86 *c = &cpu_data(cpu); |
972 | 994 | ||
973 | for_each_cpu_mask(sibling, per_cpu(cpu_core_map, cpu)) { | 995 | for_each_cpu_mask(sibling, per_cpu(cpu_core_map, cpu)) { |
974 | cpu_clear(cpu, per_cpu(cpu_core_map, sibling)); | 996 | cpu_clear(cpu, per_cpu(cpu_core_map, sibling)); |
@@ -976,15 +998,15 @@ static void remove_siblinginfo(int cpu) | |||
976 | * last thread sibling in this cpu core going down | 998 | * last thread sibling in this cpu core going down |
977 | */ | 999 | */ |
978 | if (cpus_weight(per_cpu(cpu_sibling_map, cpu)) == 1) | 1000 | if (cpus_weight(per_cpu(cpu_sibling_map, cpu)) == 1) |
979 | c[sibling].booted_cores--; | 1001 | cpu_data(sibling).booted_cores--; |
980 | } | 1002 | } |
981 | 1003 | ||
982 | for_each_cpu_mask(sibling, per_cpu(cpu_sibling_map, cpu)) | 1004 | for_each_cpu_mask(sibling, per_cpu(cpu_sibling_map, cpu)) |
983 | cpu_clear(cpu, per_cpu(cpu_sibling_map, sibling)); | 1005 | cpu_clear(cpu, per_cpu(cpu_sibling_map, sibling)); |
984 | cpus_clear(per_cpu(cpu_sibling_map, cpu)); | 1006 | cpus_clear(per_cpu(cpu_sibling_map, cpu)); |
985 | cpus_clear(per_cpu(cpu_core_map, cpu)); | 1007 | cpus_clear(per_cpu(cpu_core_map, cpu)); |
986 | c[cpu].phys_proc_id = 0; | 1008 | c->phys_proc_id = 0; |
987 | c[cpu].cpu_core_id = 0; | 1009 | c->cpu_core_id = 0; |
988 | cpu_clear(cpu, cpu_sibling_setup_map); | 1010 | cpu_clear(cpu, cpu_sibling_setup_map); |
989 | } | 1011 | } |
990 | 1012 | ||
diff --git a/arch/x86/kernel/summit_32.c b/arch/x86/kernel/summit_32.c index 91c7acc8d999..72f463401592 100644 --- a/arch/x86/kernel/summit_32.c +++ b/arch/x86/kernel/summit_32.c | |||
@@ -64,7 +64,7 @@ static int __init setup_pci_node_map_for_wpeg(int wpeg_num, int last_bus) | |||
64 | 64 | ||
65 | switch (rio_devs[wpeg_num]->type){ | 65 | switch (rio_devs[wpeg_num]->type){ |
66 | case CompatWPEG: | 66 | case CompatWPEG: |
67 | /* The Compatability Winnipeg controls the 2 legacy buses, | 67 | /* The Compatibility Winnipeg controls the 2 legacy buses, |
68 | * the 66MHz PCI bus [2 slots] and the 2 "extra" buses in case | 68 | * the 66MHz PCI bus [2 slots] and the 2 "extra" buses in case |
69 | * a PCI-PCI bridge card is used in either slot: total 5 buses. | 69 | * a PCI-PCI bridge card is used in either slot: total 5 buses. |
70 | */ | 70 | */ |
diff --git a/arch/x86/kernel/suspend_64.c b/arch/x86/kernel/suspend_64.c index 573c0a6e0ac6..bc9f59c246fd 100644 --- a/arch/x86/kernel/suspend_64.c +++ b/arch/x86/kernel/suspend_64.c | |||
@@ -32,9 +32,9 @@ void __save_processor_state(struct saved_context *ctxt) | |||
32 | /* | 32 | /* |
33 | * descriptor tables | 33 | * descriptor tables |
34 | */ | 34 | */ |
35 | asm volatile ("sgdt %0" : "=m" (ctxt->gdt_limit)); | 35 | store_gdt((struct desc_ptr *)&ctxt->gdt_limit); |
36 | asm volatile ("sidt %0" : "=m" (ctxt->idt_limit)); | 36 | store_idt((struct desc_ptr *)&ctxt->idt_limit); |
37 | asm volatile ("str %0" : "=m" (ctxt->tr)); | 37 | store_tr(ctxt->tr); |
38 | 38 | ||
39 | /* XMM0..XMM15 should be handled by kernel_fpu_begin(). */ | 39 | /* XMM0..XMM15 should be handled by kernel_fpu_begin(). */ |
40 | /* | 40 | /* |
@@ -91,8 +91,9 @@ void __restore_processor_state(struct saved_context *ctxt) | |||
91 | * now restore the descriptor tables to their proper values | 91 | * now restore the descriptor tables to their proper values |
92 | * ltr is done i fix_processor_context(). | 92 | * ltr is done i fix_processor_context(). |
93 | */ | 93 | */ |
94 | asm volatile ("lgdt %0" :: "m" (ctxt->gdt_limit)); | 94 | load_gdt((const struct desc_ptr *)&ctxt->gdt_limit); |
95 | asm volatile ("lidt %0" :: "m" (ctxt->idt_limit)); | 95 | load_idt((const struct desc_ptr *)&ctxt->idt_limit); |
96 | |||
96 | 97 | ||
97 | /* | 98 | /* |
98 | * segment registers | 99 | * segment registers |
@@ -123,7 +124,7 @@ void fix_processor_context(void) | |||
123 | int cpu = smp_processor_id(); | 124 | int cpu = smp_processor_id(); |
124 | struct tss_struct *t = &per_cpu(init_tss, cpu); | 125 | struct tss_struct *t = &per_cpu(init_tss, cpu); |
125 | 126 | ||
126 | set_tss_desc(cpu,t); /* This just modifies memory; should not be neccessary. But... This is neccessary, because 386 hardware has concept of busy TSS or some similar stupidity. */ | 127 | set_tss_desc(cpu,t); /* This just modifies memory; should not be necessary. But... This is necessary, because 386 hardware has concept of busy TSS or some similar stupidity. */ |
127 | 128 | ||
128 | cpu_gdt(cpu)[GDT_ENTRY_TSS].type = 9; | 129 | cpu_gdt(cpu)[GDT_ENTRY_TSS].type = 9; |
129 | 130 | ||
@@ -150,8 +151,22 @@ void fix_processor_context(void) | |||
150 | /* Defined in arch/x86_64/kernel/suspend_asm.S */ | 151 | /* Defined in arch/x86_64/kernel/suspend_asm.S */ |
151 | extern int restore_image(void); | 152 | extern int restore_image(void); |
152 | 153 | ||
154 | /* | ||
155 | * Address to jump to in the last phase of restore in order to get to the image | ||
156 | * kernel's text (this value is passed in the image header). | ||
157 | */ | ||
158 | unsigned long restore_jump_address; | ||
159 | |||
160 | /* | ||
161 | * Value of the cr3 register from before the hibernation (this value is passed | ||
162 | * in the image header). | ||
163 | */ | ||
164 | unsigned long restore_cr3; | ||
165 | |||
153 | pgd_t *temp_level4_pgt; | 166 | pgd_t *temp_level4_pgt; |
154 | 167 | ||
168 | void *relocated_restore_code; | ||
169 | |||
155 | static int res_phys_pud_init(pud_t *pud, unsigned long address, unsigned long end) | 170 | static int res_phys_pud_init(pud_t *pud, unsigned long address, unsigned long end) |
156 | { | 171 | { |
157 | long i, j; | 172 | long i, j; |
@@ -175,7 +190,7 @@ static int res_phys_pud_init(pud_t *pud, unsigned long address, unsigned long en | |||
175 | 190 | ||
176 | if (paddr >= end) | 191 | if (paddr >= end) |
177 | break; | 192 | break; |
178 | pe = _PAGE_NX | _PAGE_PSE | _KERNPG_TABLE | paddr; | 193 | pe = __PAGE_KERNEL_LARGE_EXEC | paddr; |
179 | pe &= __supported_pte_mask; | 194 | pe &= __supported_pte_mask; |
180 | set_pmd(pmd, __pmd(pe)); | 195 | set_pmd(pmd, __pmd(pe)); |
181 | } | 196 | } |
@@ -183,25 +198,42 @@ static int res_phys_pud_init(pud_t *pud, unsigned long address, unsigned long en | |||
183 | return 0; | 198 | return 0; |
184 | } | 199 | } |
185 | 200 | ||
201 | static int res_kernel_text_pud_init(pud_t *pud, unsigned long start) | ||
202 | { | ||
203 | pmd_t *pmd; | ||
204 | unsigned long paddr; | ||
205 | |||
206 | pmd = (pmd_t *)get_safe_page(GFP_ATOMIC); | ||
207 | if (!pmd) | ||
208 | return -ENOMEM; | ||
209 | set_pud(pud + pud_index(start), __pud(__pa(pmd) | _KERNPG_TABLE)); | ||
210 | for (paddr = 0; paddr < KERNEL_TEXT_SIZE; pmd++, paddr += PMD_SIZE) { | ||
211 | unsigned long pe; | ||
212 | |||
213 | pe = __PAGE_KERNEL_LARGE_EXEC | _PAGE_GLOBAL | paddr; | ||
214 | pe &= __supported_pte_mask; | ||
215 | set_pmd(pmd, __pmd(pe)); | ||
216 | } | ||
217 | |||
218 | return 0; | ||
219 | } | ||
220 | |||
186 | static int set_up_temporary_mappings(void) | 221 | static int set_up_temporary_mappings(void) |
187 | { | 222 | { |
188 | unsigned long start, end, next; | 223 | unsigned long start, end, next; |
224 | pud_t *pud; | ||
189 | int error; | 225 | int error; |
190 | 226 | ||
191 | temp_level4_pgt = (pgd_t *)get_safe_page(GFP_ATOMIC); | 227 | temp_level4_pgt = (pgd_t *)get_safe_page(GFP_ATOMIC); |
192 | if (!temp_level4_pgt) | 228 | if (!temp_level4_pgt) |
193 | return -ENOMEM; | 229 | return -ENOMEM; |
194 | 230 | ||
195 | /* It is safe to reuse the original kernel mapping */ | ||
196 | set_pgd(temp_level4_pgt + pgd_index(__START_KERNEL_map), | ||
197 | init_level4_pgt[pgd_index(__START_KERNEL_map)]); | ||
198 | |||
199 | /* Set up the direct mapping from scratch */ | 231 | /* Set up the direct mapping from scratch */ |
200 | start = (unsigned long)pfn_to_kaddr(0); | 232 | start = (unsigned long)pfn_to_kaddr(0); |
201 | end = (unsigned long)pfn_to_kaddr(end_pfn); | 233 | end = (unsigned long)pfn_to_kaddr(end_pfn); |
202 | 234 | ||
203 | for (; start < end; start = next) { | 235 | for (; start < end; start = next) { |
204 | pud_t *pud = (pud_t *)get_safe_page(GFP_ATOMIC); | 236 | pud = (pud_t *)get_safe_page(GFP_ATOMIC); |
205 | if (!pud) | 237 | if (!pud) |
206 | return -ENOMEM; | 238 | return -ENOMEM; |
207 | next = start + PGDIR_SIZE; | 239 | next = start + PGDIR_SIZE; |
@@ -212,7 +244,17 @@ static int set_up_temporary_mappings(void) | |||
212 | set_pgd(temp_level4_pgt + pgd_index(start), | 244 | set_pgd(temp_level4_pgt + pgd_index(start), |
213 | mk_kernel_pgd(__pa(pud))); | 245 | mk_kernel_pgd(__pa(pud))); |
214 | } | 246 | } |
215 | return 0; | 247 | |
248 | /* Set up the kernel text mapping from scratch */ | ||
249 | pud = (pud_t *)get_safe_page(GFP_ATOMIC); | ||
250 | if (!pud) | ||
251 | return -ENOMEM; | ||
252 | error = res_kernel_text_pud_init(pud, __START_KERNEL_map); | ||
253 | if (!error) | ||
254 | set_pgd(temp_level4_pgt + pgd_index(__START_KERNEL_map), | ||
255 | __pgd(__pa(pud) | _PAGE_TABLE)); | ||
256 | |||
257 | return error; | ||
216 | } | 258 | } |
217 | 259 | ||
218 | int swsusp_arch_resume(void) | 260 | int swsusp_arch_resume(void) |
@@ -222,6 +264,13 @@ int swsusp_arch_resume(void) | |||
222 | /* We have got enough memory and from now on we cannot recover */ | 264 | /* We have got enough memory and from now on we cannot recover */ |
223 | if ((error = set_up_temporary_mappings())) | 265 | if ((error = set_up_temporary_mappings())) |
224 | return error; | 266 | return error; |
267 | |||
268 | relocated_restore_code = (void *)get_safe_page(GFP_ATOMIC); | ||
269 | if (!relocated_restore_code) | ||
270 | return -ENOMEM; | ||
271 | memcpy(relocated_restore_code, &core_restore_code, | ||
272 | &restore_registers - &core_restore_code); | ||
273 | |||
225 | restore_image(); | 274 | restore_image(); |
226 | return 0; | 275 | return 0; |
227 | } | 276 | } |
@@ -236,4 +285,43 @@ int pfn_is_nosave(unsigned long pfn) | |||
236 | unsigned long nosave_end_pfn = PAGE_ALIGN(__pa_symbol(&__nosave_end)) >> PAGE_SHIFT; | 285 | unsigned long nosave_end_pfn = PAGE_ALIGN(__pa_symbol(&__nosave_end)) >> PAGE_SHIFT; |
237 | return (pfn >= nosave_begin_pfn) && (pfn < nosave_end_pfn); | 286 | return (pfn >= nosave_begin_pfn) && (pfn < nosave_end_pfn); |
238 | } | 287 | } |
288 | |||
289 | struct restore_data_record { | ||
290 | unsigned long jump_address; | ||
291 | unsigned long cr3; | ||
292 | unsigned long magic; | ||
293 | }; | ||
294 | |||
295 | #define RESTORE_MAGIC 0x0123456789ABCDEFUL | ||
296 | |||
297 | /** | ||
298 | * arch_hibernation_header_save - populate the architecture specific part | ||
299 | * of a hibernation image header | ||
300 | * @addr: address to save the data at | ||
301 | */ | ||
302 | int arch_hibernation_header_save(void *addr, unsigned int max_size) | ||
303 | { | ||
304 | struct restore_data_record *rdr = addr; | ||
305 | |||
306 | if (max_size < sizeof(struct restore_data_record)) | ||
307 | return -EOVERFLOW; | ||
308 | rdr->jump_address = restore_jump_address; | ||
309 | rdr->cr3 = restore_cr3; | ||
310 | rdr->magic = RESTORE_MAGIC; | ||
311 | return 0; | ||
312 | } | ||
313 | |||
314 | /** | ||
315 | * arch_hibernation_header_restore - read the architecture specific data | ||
316 | * from the hibernation image header | ||
317 | * @addr: address to read the data from | ||
318 | */ | ||
319 | int arch_hibernation_header_restore(void *addr) | ||
320 | { | ||
321 | struct restore_data_record *rdr = addr; | ||
322 | |||
323 | restore_jump_address = rdr->jump_address; | ||
324 | restore_cr3 = rdr->cr3; | ||
325 | return (rdr->magic == RESTORE_MAGIC) ? 0 : -EINVAL; | ||
326 | } | ||
239 | #endif /* CONFIG_HIBERNATION */ | 327 | #endif /* CONFIG_HIBERNATION */ |
diff --git a/arch/x86/kernel/suspend_asm_64.S b/arch/x86/kernel/suspend_asm_64.S index 16d183f67bc1..48344b666d2c 100644 --- a/arch/x86/kernel/suspend_asm_64.S +++ b/arch/x86/kernel/suspend_asm_64.S | |||
@@ -2,8 +2,8 @@ | |||
2 | * | 2 | * |
3 | * Distribute under GPLv2. | 3 | * Distribute under GPLv2. |
4 | * | 4 | * |
5 | * swsusp_arch_resume may not use any stack, nor any variable that is | 5 | * swsusp_arch_resume must not use any stack or any nonlocal variables while |
6 | * not "NoSave" during copying pages: | 6 | * copying pages: |
7 | * | 7 | * |
8 | * Its rewriting one kernel image with another. What is stack in "old" | 8 | * Its rewriting one kernel image with another. What is stack in "old" |
9 | * image could very well be data page in "new" image, and overwriting | 9 | * image could very well be data page in "new" image, and overwriting |
@@ -36,6 +36,13 @@ ENTRY(swsusp_arch_suspend) | |||
36 | movq %r15, saved_context_r15(%rip) | 36 | movq %r15, saved_context_r15(%rip) |
37 | pushfq ; popq saved_context_eflags(%rip) | 37 | pushfq ; popq saved_context_eflags(%rip) |
38 | 38 | ||
39 | /* save the address of restore_registers */ | ||
40 | movq $restore_registers, %rax | ||
41 | movq %rax, restore_jump_address(%rip) | ||
42 | /* save cr3 */ | ||
43 | movq %cr3, %rax | ||
44 | movq %rax, restore_cr3(%rip) | ||
45 | |||
39 | call swsusp_save | 46 | call swsusp_save |
40 | ret | 47 | ret |
41 | 48 | ||
@@ -54,7 +61,17 @@ ENTRY(restore_image) | |||
54 | movq %rcx, %cr3; | 61 | movq %rcx, %cr3; |
55 | movq %rax, %cr4; # turn PGE back on | 62 | movq %rax, %cr4; # turn PGE back on |
56 | 63 | ||
64 | /* prepare to jump to the image kernel */ | ||
65 | movq restore_jump_address(%rip), %rax | ||
66 | movq restore_cr3(%rip), %rbx | ||
67 | |||
68 | /* prepare to copy image data to their original locations */ | ||
57 | movq restore_pblist(%rip), %rdx | 69 | movq restore_pblist(%rip), %rdx |
70 | movq relocated_restore_code(%rip), %rcx | ||
71 | jmpq *%rcx | ||
72 | |||
73 | /* code below has been relocated to a safe page */ | ||
74 | ENTRY(core_restore_code) | ||
58 | loop: | 75 | loop: |
59 | testq %rdx, %rdx | 76 | testq %rdx, %rdx |
60 | jz done | 77 | jz done |
@@ -62,7 +79,7 @@ loop: | |||
62 | /* get addresses from the pbe and copy the page */ | 79 | /* get addresses from the pbe and copy the page */ |
63 | movq pbe_address(%rdx), %rsi | 80 | movq pbe_address(%rdx), %rsi |
64 | movq pbe_orig_address(%rdx), %rdi | 81 | movq pbe_orig_address(%rdx), %rdi |
65 | movq $512, %rcx | 82 | movq $(PAGE_SIZE >> 3), %rcx |
66 | rep | 83 | rep |
67 | movsq | 84 | movsq |
68 | 85 | ||
@@ -70,10 +87,22 @@ loop: | |||
70 | movq pbe_next(%rdx), %rdx | 87 | movq pbe_next(%rdx), %rdx |
71 | jmp loop | 88 | jmp loop |
72 | done: | 89 | done: |
90 | /* jump to the restore_registers address from the image header */ | ||
91 | jmpq *%rax | ||
92 | /* | ||
93 | * NOTE: This assumes that the boot kernel's text mapping covers the | ||
94 | * image kernel's page containing restore_registers and the address of | ||
95 | * this page is the same as in the image kernel's text mapping (it | ||
96 | * should always be true, because the text mapping is linear, starting | ||
97 | * from 0, and is supposed to cover the entire kernel text for every | ||
98 | * kernel). | ||
99 | * | ||
100 | * code below belongs to the image kernel | ||
101 | */ | ||
102 | |||
103 | ENTRY(restore_registers) | ||
73 | /* go back to the original page tables */ | 104 | /* go back to the original page tables */ |
74 | movq $(init_level4_pgt - __START_KERNEL_map), %rax | 105 | movq %rbx, %cr3 |
75 | addq phys_base(%rip), %rax | ||
76 | movq %rax, %cr3 | ||
77 | 106 | ||
78 | /* Flush TLB, including "global" things (vmalloc) */ | 107 | /* Flush TLB, including "global" things (vmalloc) */ |
79 | movq mmu_cr4_features(%rip), %rax | 108 | movq mmu_cr4_features(%rip), %rax |
@@ -84,12 +113,9 @@ done: | |||
84 | movq %rcx, %cr3 | 113 | movq %rcx, %cr3 |
85 | movq %rax, %cr4; # turn PGE back on | 114 | movq %rax, %cr4; # turn PGE back on |
86 | 115 | ||
87 | movl $24, %eax | ||
88 | movl %eax, %ds | ||
89 | |||
90 | movq saved_context_esp(%rip), %rsp | 116 | movq saved_context_esp(%rip), %rsp |
91 | movq saved_context_ebp(%rip), %rbp | 117 | movq saved_context_ebp(%rip), %rbp |
92 | /* Don't restore %rax, it must be 0 anyway */ | 118 | /* restore GPRs (we don't restore %rax, it must be 0 anyway) */ |
93 | movq saved_context_ebx(%rip), %rbx | 119 | movq saved_context_ebx(%rip), %rbx |
94 | movq saved_context_ecx(%rip), %rcx | 120 | movq saved_context_ecx(%rip), %rcx |
95 | movq saved_context_edx(%rip), %rdx | 121 | movq saved_context_edx(%rip), %rdx |
@@ -107,4 +133,7 @@ done: | |||
107 | 133 | ||
108 | xorq %rax, %rax | 134 | xorq %rax, %rax |
109 | 135 | ||
136 | /* tell the hibernation core that we've just restored the memory */ | ||
137 | movq %rax, in_suspend(%rip) | ||
138 | |||
110 | ret | 139 | ret |
diff --git a/arch/x86/kernel/traps_32.c b/arch/x86/kernel/traps_32.c index b132d3957dfc..cc9acace7e23 100644 --- a/arch/x86/kernel/traps_32.c +++ b/arch/x86/kernel/traps_32.c | |||
@@ -63,6 +63,9 @@ | |||
63 | 63 | ||
64 | int panic_on_unrecovered_nmi; | 64 | int panic_on_unrecovered_nmi; |
65 | 65 | ||
66 | DECLARE_BITMAP(used_vectors, NR_VECTORS); | ||
67 | EXPORT_SYMBOL_GPL(used_vectors); | ||
68 | |||
66 | asmlinkage int system_call(void); | 69 | asmlinkage int system_call(void); |
67 | 70 | ||
68 | /* Do we ignore FPU interrupts ? */ | 71 | /* Do we ignore FPU interrupts ? */ |
@@ -288,48 +291,24 @@ EXPORT_SYMBOL(dump_stack); | |||
288 | void show_registers(struct pt_regs *regs) | 291 | void show_registers(struct pt_regs *regs) |
289 | { | 292 | { |
290 | int i; | 293 | int i; |
291 | int in_kernel = 1; | 294 | |
292 | unsigned long esp; | ||
293 | unsigned short ss, gs; | ||
294 | |||
295 | esp = (unsigned long) (®s->esp); | ||
296 | savesegment(ss, ss); | ||
297 | savesegment(gs, gs); | ||
298 | if (user_mode_vm(regs)) { | ||
299 | in_kernel = 0; | ||
300 | esp = regs->esp; | ||
301 | ss = regs->xss & 0xffff; | ||
302 | } | ||
303 | print_modules(); | 295 | print_modules(); |
304 | printk(KERN_EMERG "CPU: %d\n" | 296 | __show_registers(regs, 0); |
305 | KERN_EMERG "EIP: %04x:[<%08lx>] %s VLI\n" | ||
306 | KERN_EMERG "EFLAGS: %08lx (%s %.*s)\n", | ||
307 | smp_processor_id(), 0xffff & regs->xcs, regs->eip, | ||
308 | print_tainted(), regs->eflags, init_utsname()->release, | ||
309 | (int)strcspn(init_utsname()->version, " "), | ||
310 | init_utsname()->version); | ||
311 | print_symbol(KERN_EMERG "EIP is at %s\n", regs->eip); | ||
312 | printk(KERN_EMERG "eax: %08lx ebx: %08lx ecx: %08lx edx: %08lx\n", | ||
313 | regs->eax, regs->ebx, regs->ecx, regs->edx); | ||
314 | printk(KERN_EMERG "esi: %08lx edi: %08lx ebp: %08lx esp: %08lx\n", | ||
315 | regs->esi, regs->edi, regs->ebp, esp); | ||
316 | printk(KERN_EMERG "ds: %04x es: %04x fs: %04x gs: %04x ss: %04x\n", | ||
317 | regs->xds & 0xffff, regs->xes & 0xffff, regs->xfs & 0xffff, gs, ss); | ||
318 | printk(KERN_EMERG "Process %.*s (pid: %d, ti=%p task=%p task.ti=%p)", | 297 | printk(KERN_EMERG "Process %.*s (pid: %d, ti=%p task=%p task.ti=%p)", |
319 | TASK_COMM_LEN, current->comm, current->pid, | 298 | TASK_COMM_LEN, current->comm, task_pid_nr(current), |
320 | current_thread_info(), current, task_thread_info(current)); | 299 | current_thread_info(), current, task_thread_info(current)); |
321 | /* | 300 | /* |
322 | * When in-kernel, we also print out the stack and code at the | 301 | * When in-kernel, we also print out the stack and code at the |
323 | * time of the fault.. | 302 | * time of the fault.. |
324 | */ | 303 | */ |
325 | if (in_kernel) { | 304 | if (!user_mode_vm(regs)) { |
326 | u8 *eip; | 305 | u8 *eip; |
327 | unsigned int code_prologue = code_bytes * 43 / 64; | 306 | unsigned int code_prologue = code_bytes * 43 / 64; |
328 | unsigned int code_len = code_bytes; | 307 | unsigned int code_len = code_bytes; |
329 | unsigned char c; | 308 | unsigned char c; |
330 | 309 | ||
331 | printk("\n" KERN_EMERG "Stack: "); | 310 | printk("\n" KERN_EMERG "Stack: "); |
332 | show_stack_log_lvl(NULL, regs, (unsigned long *)esp, KERN_EMERG); | 311 | show_stack_log_lvl(NULL, regs, ®s->esp, KERN_EMERG); |
333 | 312 | ||
334 | printk(KERN_EMERG "Code: "); | 313 | printk(KERN_EMERG "Code: "); |
335 | 314 | ||
@@ -374,11 +353,11 @@ int is_valid_bugaddr(unsigned long eip) | |||
374 | void die(const char * str, struct pt_regs * regs, long err) | 353 | void die(const char * str, struct pt_regs * regs, long err) |
375 | { | 354 | { |
376 | static struct { | 355 | static struct { |
377 | spinlock_t lock; | 356 | raw_spinlock_t lock; |
378 | u32 lock_owner; | 357 | u32 lock_owner; |
379 | int lock_owner_depth; | 358 | int lock_owner_depth; |
380 | } die = { | 359 | } die = { |
381 | .lock = __SPIN_LOCK_UNLOCKED(die.lock), | 360 | .lock = __RAW_SPIN_LOCK_UNLOCKED, |
382 | .lock_owner = -1, | 361 | .lock_owner = -1, |
383 | .lock_owner_depth = 0 | 362 | .lock_owner_depth = 0 |
384 | }; | 363 | }; |
@@ -389,13 +368,14 @@ void die(const char * str, struct pt_regs * regs, long err) | |||
389 | 368 | ||
390 | if (die.lock_owner != raw_smp_processor_id()) { | 369 | if (die.lock_owner != raw_smp_processor_id()) { |
391 | console_verbose(); | 370 | console_verbose(); |
392 | spin_lock_irqsave(&die.lock, flags); | 371 | __raw_spin_lock(&die.lock); |
372 | raw_local_save_flags(flags); | ||
393 | die.lock_owner = smp_processor_id(); | 373 | die.lock_owner = smp_processor_id(); |
394 | die.lock_owner_depth = 0; | 374 | die.lock_owner_depth = 0; |
395 | bust_spinlocks(1); | 375 | bust_spinlocks(1); |
396 | } | 376 | } |
397 | else | 377 | else |
398 | local_save_flags(flags); | 378 | raw_local_save_flags(flags); |
399 | 379 | ||
400 | if (++die.lock_owner_depth < 3) { | 380 | if (++die.lock_owner_depth < 3) { |
401 | unsigned long esp; | 381 | unsigned long esp; |
@@ -439,7 +419,8 @@ void die(const char * str, struct pt_regs * regs, long err) | |||
439 | bust_spinlocks(0); | 419 | bust_spinlocks(0); |
440 | die.lock_owner = -1; | 420 | die.lock_owner = -1; |
441 | add_taint(TAINT_DIE); | 421 | add_taint(TAINT_DIE); |
442 | spin_unlock_irqrestore(&die.lock, flags); | 422 | __raw_spin_unlock(&die.lock); |
423 | raw_local_irq_restore(flags); | ||
443 | 424 | ||
444 | if (!regs) | 425 | if (!regs) |
445 | return; | 426 | return; |
@@ -622,7 +603,7 @@ fastcall void __kprobes do_general_protection(struct pt_regs * regs, | |||
622 | printk_ratelimit()) | 603 | printk_ratelimit()) |
623 | printk(KERN_INFO | 604 | printk(KERN_INFO |
624 | "%s[%d] general protection eip:%lx esp:%lx error:%lx\n", | 605 | "%s[%d] general protection eip:%lx esp:%lx error:%lx\n", |
625 | current->comm, current->pid, | 606 | current->comm, task_pid_nr(current), |
626 | regs->eip, regs->esp, error_code); | 607 | regs->eip, regs->esp, error_code); |
627 | 608 | ||
628 | force_sig(SIGSEGV, current); | 609 | force_sig(SIGSEGV, current); |
@@ -1142,6 +1123,8 @@ static void __init set_task_gate(unsigned int n, unsigned int gdt_entry) | |||
1142 | 1123 | ||
1143 | void __init trap_init(void) | 1124 | void __init trap_init(void) |
1144 | { | 1125 | { |
1126 | int i; | ||
1127 | |||
1145 | #ifdef CONFIG_EISA | 1128 | #ifdef CONFIG_EISA |
1146 | void __iomem *p = ioremap(0x0FFFD9, 4); | 1129 | void __iomem *p = ioremap(0x0FFFD9, 4); |
1147 | if (readl(p) == 'E'+('I'<<8)+('S'<<16)+('A'<<24)) { | 1130 | if (readl(p) == 'E'+('I'<<8)+('S'<<16)+('A'<<24)) { |
@@ -1201,6 +1184,11 @@ void __init trap_init(void) | |||
1201 | 1184 | ||
1202 | set_system_gate(SYSCALL_VECTOR,&system_call); | 1185 | set_system_gate(SYSCALL_VECTOR,&system_call); |
1203 | 1186 | ||
1187 | /* Reserve all the builtin and the syscall vector. */ | ||
1188 | for (i = 0; i < FIRST_EXTERNAL_VECTOR; i++) | ||
1189 | set_bit(i, used_vectors); | ||
1190 | set_bit(SYSCALL_VECTOR, used_vectors); | ||
1191 | |||
1204 | /* | 1192 | /* |
1205 | * Should be a barrier for any external CPU state. | 1193 | * Should be a barrier for any external CPU state. |
1206 | */ | 1194 | */ |
diff --git a/arch/x86/kernel/traps_64.c b/arch/x86/kernel/traps_64.c index b4a9b3db1994..d0c2bc7ab2ec 100644 --- a/arch/x86/kernel/traps_64.c +++ b/arch/x86/kernel/traps_64.c | |||
@@ -201,7 +201,7 @@ static unsigned long *in_exception_stack(unsigned cpu, unsigned long stack, | |||
201 | #define MSG(txt) ops->warning(data, txt) | 201 | #define MSG(txt) ops->warning(data, txt) |
202 | 202 | ||
203 | /* | 203 | /* |
204 | * x86-64 can have upto three kernel stacks: | 204 | * x86-64 can have up to three kernel stacks: |
205 | * process stack | 205 | * process stack |
206 | * interrupt stack | 206 | * interrupt stack |
207 | * severe exception (double fault, nmi, stack fault, debug, mce) hardware stack | 207 | * severe exception (double fault, nmi, stack fault, debug, mce) hardware stack |
@@ -462,7 +462,7 @@ void out_of_line_bug(void) | |||
462 | EXPORT_SYMBOL(out_of_line_bug); | 462 | EXPORT_SYMBOL(out_of_line_bug); |
463 | #endif | 463 | #endif |
464 | 464 | ||
465 | static DEFINE_SPINLOCK(die_lock); | 465 | static raw_spinlock_t die_lock = __RAW_SPIN_LOCK_UNLOCKED; |
466 | static int die_owner = -1; | 466 | static int die_owner = -1; |
467 | static unsigned int die_nest_count; | 467 | static unsigned int die_nest_count; |
468 | 468 | ||
@@ -474,13 +474,13 @@ unsigned __kprobes long oops_begin(void) | |||
474 | oops_enter(); | 474 | oops_enter(); |
475 | 475 | ||
476 | /* racy, but better than risking deadlock. */ | 476 | /* racy, but better than risking deadlock. */ |
477 | local_irq_save(flags); | 477 | raw_local_irq_save(flags); |
478 | cpu = smp_processor_id(); | 478 | cpu = smp_processor_id(); |
479 | if (!spin_trylock(&die_lock)) { | 479 | if (!__raw_spin_trylock(&die_lock)) { |
480 | if (cpu == die_owner) | 480 | if (cpu == die_owner) |
481 | /* nested oops. should stop eventually */; | 481 | /* nested oops. should stop eventually */; |
482 | else | 482 | else |
483 | spin_lock(&die_lock); | 483 | __raw_spin_lock(&die_lock); |
484 | } | 484 | } |
485 | die_nest_count++; | 485 | die_nest_count++; |
486 | die_owner = cpu; | 486 | die_owner = cpu; |
@@ -494,12 +494,10 @@ void __kprobes oops_end(unsigned long flags) | |||
494 | die_owner = -1; | 494 | die_owner = -1; |
495 | bust_spinlocks(0); | 495 | bust_spinlocks(0); |
496 | die_nest_count--; | 496 | die_nest_count--; |
497 | if (die_nest_count) | 497 | if (!die_nest_count) |
498 | /* We still own the lock */ | ||
499 | local_irq_restore(flags); | ||
500 | else | ||
501 | /* Nest count reaches zero, release the lock. */ | 498 | /* Nest count reaches zero, release the lock. */ |
502 | spin_unlock_irqrestore(&die_lock, flags); | 499 | __raw_spin_unlock(&die_lock); |
500 | raw_local_irq_restore(flags); | ||
503 | if (panic_on_oops) | 501 | if (panic_on_oops) |
504 | panic("Fatal exception"); | 502 | panic("Fatal exception"); |
505 | oops_exit(); | 503 | oops_exit(); |
diff --git a/arch/x86/kernel/tsc_32.c b/arch/x86/kernel/tsc_32.c index e87a3939ed40..d78444c788a3 100644 --- a/arch/x86/kernel/tsc_32.c +++ b/arch/x86/kernel/tsc_32.c | |||
@@ -59,7 +59,7 @@ int check_tsc_unstable(void) | |||
59 | } | 59 | } |
60 | EXPORT_SYMBOL_GPL(check_tsc_unstable); | 60 | EXPORT_SYMBOL_GPL(check_tsc_unstable); |
61 | 61 | ||
62 | /* Accellerators for sched_clock() | 62 | /* Accelerators for sched_clock() |
63 | * convert from cycles(64bits) => nanoseconds (64bits) | 63 | * convert from cycles(64bits) => nanoseconds (64bits) |
64 | * basic equation: | 64 | * basic equation: |
65 | * ns = cycles / (freq / ns_per_sec) | 65 | * ns = cycles / (freq / ns_per_sec) |
@@ -74,7 +74,7 @@ EXPORT_SYMBOL_GPL(check_tsc_unstable); | |||
74 | * And since SC is a constant power of two, we can convert the div | 74 | * And since SC is a constant power of two, we can convert the div |
75 | * into a shift. | 75 | * into a shift. |
76 | * | 76 | * |
77 | * We can use khz divisor instead of mhz to keep a better percision, since | 77 | * We can use khz divisor instead of mhz to keep a better precision, since |
78 | * cyc2ns_scale is limited to 10^6 * 2^10, which fits in 32 bits. | 78 | * cyc2ns_scale is limited to 10^6 * 2^10, which fits in 32 bits. |
79 | * (mathieu.desnoyers@polymtl.ca) | 79 | * (mathieu.desnoyers@polymtl.ca) |
80 | * | 80 | * |
@@ -181,8 +181,8 @@ int recalibrate_cpu_khz(void) | |||
181 | if (cpu_has_tsc) { | 181 | if (cpu_has_tsc) { |
182 | cpu_khz = calculate_cpu_khz(); | 182 | cpu_khz = calculate_cpu_khz(); |
183 | tsc_khz = cpu_khz; | 183 | tsc_khz = cpu_khz; |
184 | cpu_data[0].loops_per_jiffy = | 184 | cpu_data(0).loops_per_jiffy = |
185 | cpufreq_scale(cpu_data[0].loops_per_jiffy, | 185 | cpufreq_scale(cpu_data(0).loops_per_jiffy, |
186 | cpu_khz_old, cpu_khz); | 186 | cpu_khz_old, cpu_khz); |
187 | return 0; | 187 | return 0; |
188 | } else | 188 | } else |
@@ -215,7 +215,7 @@ time_cpufreq_notifier(struct notifier_block *nb, unsigned long val, void *data) | |||
215 | return 0; | 215 | return 0; |
216 | } | 216 | } |
217 | ref_freq = freq->old; | 217 | ref_freq = freq->old; |
218 | loops_per_jiffy_ref = cpu_data[freq->cpu].loops_per_jiffy; | 218 | loops_per_jiffy_ref = cpu_data(freq->cpu).loops_per_jiffy; |
219 | cpu_khz_ref = cpu_khz; | 219 | cpu_khz_ref = cpu_khz; |
220 | } | 220 | } |
221 | 221 | ||
@@ -223,7 +223,7 @@ time_cpufreq_notifier(struct notifier_block *nb, unsigned long val, void *data) | |||
223 | (val == CPUFREQ_POSTCHANGE && freq->old > freq->new) || | 223 | (val == CPUFREQ_POSTCHANGE && freq->old > freq->new) || |
224 | (val == CPUFREQ_RESUMECHANGE)) { | 224 | (val == CPUFREQ_RESUMECHANGE)) { |
225 | if (!(freq->flags & CPUFREQ_CONST_LOOPS)) | 225 | if (!(freq->flags & CPUFREQ_CONST_LOOPS)) |
226 | cpu_data[freq->cpu].loops_per_jiffy = | 226 | cpu_data(freq->cpu).loops_per_jiffy = |
227 | cpufreq_scale(loops_per_jiffy_ref, | 227 | cpufreq_scale(loops_per_jiffy_ref, |
228 | ref_freq, freq->new); | 228 | ref_freq, freq->new); |
229 | 229 | ||
diff --git a/arch/x86/kernel/tsc_64.c b/arch/x86/kernel/tsc_64.c index 9f22e542c374..9c70af45b42b 100644 --- a/arch/x86/kernel/tsc_64.c +++ b/arch/x86/kernel/tsc_64.c | |||
@@ -73,13 +73,13 @@ static int time_cpufreq_notifier(struct notifier_block *nb, unsigned long val, | |||
73 | struct cpufreq_freqs *freq = data; | 73 | struct cpufreq_freqs *freq = data; |
74 | unsigned long *lpj, dummy; | 74 | unsigned long *lpj, dummy; |
75 | 75 | ||
76 | if (cpu_has(&cpu_data[freq->cpu], X86_FEATURE_CONSTANT_TSC)) | 76 | if (cpu_has(&cpu_data(freq->cpu), X86_FEATURE_CONSTANT_TSC)) |
77 | return 0; | 77 | return 0; |
78 | 78 | ||
79 | lpj = &dummy; | 79 | lpj = &dummy; |
80 | if (!(freq->flags & CPUFREQ_CONST_LOOPS)) | 80 | if (!(freq->flags & CPUFREQ_CONST_LOOPS)) |
81 | #ifdef CONFIG_SMP | 81 | #ifdef CONFIG_SMP |
82 | lpj = &cpu_data[freq->cpu].loops_per_jiffy; | 82 | lpj = &cpu_data(freq->cpu).loops_per_jiffy; |
83 | #else | 83 | #else |
84 | lpj = &boot_cpu_data.loops_per_jiffy; | 84 | lpj = &boot_cpu_data.loops_per_jiffy; |
85 | #endif | 85 | #endif |
diff --git a/arch/x86/kernel/vsyscall_64.c b/arch/x86/kernel/vsyscall_64.c index 8a67e282cb5e..ad4005c6d4a1 100644 --- a/arch/x86/kernel/vsyscall_64.c +++ b/arch/x86/kernel/vsyscall_64.c | |||
@@ -48,12 +48,12 @@ | |||
48 | ({unsigned long v; \ | 48 | ({unsigned long v; \ |
49 | extern char __vsyscall_0; \ | 49 | extern char __vsyscall_0; \ |
50 | asm("" : "=r" (v) : "0" (x)); \ | 50 | asm("" : "=r" (v) : "0" (x)); \ |
51 | ((v - VSYSCALL_FIRST_PAGE) + __pa_symbol(&__vsyscall_0)); }) | 51 | ((v - VSYSCALL_START) + __pa_symbol(&__vsyscall_0)); }) |
52 | 52 | ||
53 | /* | 53 | /* |
54 | * vsyscall_gtod_data contains data that is : | 54 | * vsyscall_gtod_data contains data that is : |
55 | * - readonly from vsyscalls | 55 | * - readonly from vsyscalls |
56 | * - writen by timer interrupt or systcl (/proc/sys/kernel/vsyscall64) | 56 | * - written by timer interrupt or systcl (/proc/sys/kernel/vsyscall64) |
57 | * Try to keep this structure as small as possible to avoid cache line ping pongs | 57 | * Try to keep this structure as small as possible to avoid cache line ping pongs |
58 | */ | 58 | */ |
59 | int __vgetcpu_mode __section_vgetcpu_mode; | 59 | int __vgetcpu_mode __section_vgetcpu_mode; |
@@ -64,6 +64,16 @@ struct vsyscall_gtod_data __vsyscall_gtod_data __section_vsyscall_gtod_data = | |||
64 | .sysctl_enabled = 1, | 64 | .sysctl_enabled = 1, |
65 | }; | 65 | }; |
66 | 66 | ||
67 | void update_vsyscall_tz(void) | ||
68 | { | ||
69 | unsigned long flags; | ||
70 | |||
71 | write_seqlock_irqsave(&vsyscall_gtod_data.lock, flags); | ||
72 | /* sys_tz has changed */ | ||
73 | vsyscall_gtod_data.sys_tz = sys_tz; | ||
74 | write_sequnlock_irqrestore(&vsyscall_gtod_data.lock, flags); | ||
75 | } | ||
76 | |||
67 | void update_vsyscall(struct timespec *wall_time, struct clocksource *clock) | 77 | void update_vsyscall(struct timespec *wall_time, struct clocksource *clock) |
68 | { | 78 | { |
69 | unsigned long flags; | 79 | unsigned long flags; |
@@ -77,7 +87,6 @@ void update_vsyscall(struct timespec *wall_time, struct clocksource *clock) | |||
77 | vsyscall_gtod_data.clock.shift = clock->shift; | 87 | vsyscall_gtod_data.clock.shift = clock->shift; |
78 | vsyscall_gtod_data.wall_time_sec = wall_time->tv_sec; | 88 | vsyscall_gtod_data.wall_time_sec = wall_time->tv_sec; |
79 | vsyscall_gtod_data.wall_time_nsec = wall_time->tv_nsec; | 89 | vsyscall_gtod_data.wall_time_nsec = wall_time->tv_nsec; |
80 | vsyscall_gtod_data.sys_tz = sys_tz; | ||
81 | vsyscall_gtod_data.wall_to_monotonic = wall_to_monotonic; | 90 | vsyscall_gtod_data.wall_to_monotonic = wall_to_monotonic; |
82 | write_sequnlock_irqrestore(&vsyscall_gtod_data.lock, flags); | 91 | write_sequnlock_irqrestore(&vsyscall_gtod_data.lock, flags); |
83 | } | 92 | } |
@@ -163,7 +172,7 @@ time_t __vsyscall(1) vtime(time_t *t) | |||
163 | if (unlikely(!__vsyscall_gtod_data.sysctl_enabled)) | 172 | if (unlikely(!__vsyscall_gtod_data.sysctl_enabled)) |
164 | return time_syscall(t); | 173 | return time_syscall(t); |
165 | 174 | ||
166 | vgettimeofday(&tv, 0); | 175 | vgettimeofday(&tv, NULL); |
167 | result = tv.tv_sec; | 176 | result = tv.tv_sec; |
168 | if (t) | 177 | if (t) |
169 | *t = result; | 178 | *t = result; |
@@ -257,18 +266,10 @@ out: | |||
257 | return ret; | 266 | return ret; |
258 | } | 267 | } |
259 | 268 | ||
260 | static int vsyscall_sysctl_nostrat(ctl_table *t, int __user *name, int nlen, | ||
261 | void __user *oldval, size_t __user *oldlenp, | ||
262 | void __user *newval, size_t newlen) | ||
263 | { | ||
264 | return -ENOSYS; | ||
265 | } | ||
266 | |||
267 | static ctl_table kernel_table2[] = { | 269 | static ctl_table kernel_table2[] = { |
268 | { .ctl_name = 99, .procname = "vsyscall64", | 270 | { .procname = "vsyscall64", |
269 | .data = &vsyscall_gtod_data.sysctl_enabled, .maxlen = sizeof(int), | 271 | .data = &vsyscall_gtod_data.sysctl_enabled, .maxlen = sizeof(int), |
270 | .mode = 0644, | 272 | .mode = 0644, |
271 | .strategy = vsyscall_sysctl_nostrat, | ||
272 | .proc_handler = vsyscall_sysctl_change }, | 273 | .proc_handler = vsyscall_sysctl_change }, |
273 | {} | 274 | {} |
274 | }; | 275 | }; |
@@ -290,7 +291,7 @@ static void __cpuinit vsyscall_set_cpu(int cpu) | |||
290 | #ifdef CONFIG_NUMA | 291 | #ifdef CONFIG_NUMA |
291 | node = cpu_to_node(cpu); | 292 | node = cpu_to_node(cpu); |
292 | #endif | 293 | #endif |
293 | if (cpu_has(&cpu_data[cpu], X86_FEATURE_RDTSCP)) | 294 | if (cpu_has(&cpu_data(cpu), X86_FEATURE_RDTSCP)) |
294 | write_rdtscp_aux((node << 12) | cpu); | 295 | write_rdtscp_aux((node << 12) | cpu); |
295 | 296 | ||
296 | /* Store cpu number in limit so that it can be loaded quickly | 297 | /* Store cpu number in limit so that it can be loaded quickly |
diff --git a/arch/x86/lib/delay_32.c b/arch/x86/lib/delay_32.c index f6edb11364df..952e7a89c2ac 100644 --- a/arch/x86/lib/delay_32.c +++ b/arch/x86/lib/delay_32.c | |||
@@ -82,7 +82,7 @@ inline void __const_udelay(unsigned long xloops) | |||
82 | __asm__("mull %0" | 82 | __asm__("mull %0" |
83 | :"=d" (xloops), "=&a" (d0) | 83 | :"=d" (xloops), "=&a" (d0) |
84 | :"1" (xloops), "0" | 84 | :"1" (xloops), "0" |
85 | (cpu_data[raw_smp_processor_id()].loops_per_jiffy * (HZ/4))); | 85 | (cpu_data(raw_smp_processor_id()).loops_per_jiffy * (HZ/4))); |
86 | 86 | ||
87 | __delay(++xloops); | 87 | __delay(++xloops); |
88 | } | 88 | } |
diff --git a/arch/x86/lib/delay_64.c b/arch/x86/lib/delay_64.c index 2dbebd308347..0ebbfb9e7c7f 100644 --- a/arch/x86/lib/delay_64.c +++ b/arch/x86/lib/delay_64.c | |||
@@ -40,7 +40,8 @@ EXPORT_SYMBOL(__delay); | |||
40 | 40 | ||
41 | inline void __const_udelay(unsigned long xloops) | 41 | inline void __const_udelay(unsigned long xloops) |
42 | { | 42 | { |
43 | __delay(((xloops * HZ * cpu_data[raw_smp_processor_id()].loops_per_jiffy) >> 32) + 1); | 43 | __delay(((xloops * HZ * |
44 | cpu_data(raw_smp_processor_id()).loops_per_jiffy) >> 32) + 1); | ||
44 | } | 45 | } |
45 | EXPORT_SYMBOL(__const_udelay); | 46 | EXPORT_SYMBOL(__const_udelay); |
46 | 47 | ||
diff --git a/arch/x86/lib/usercopy_32.c b/arch/x86/lib/usercopy_32.c index 9f38b12b4af1..8bab2b2efaff 100644 --- a/arch/x86/lib/usercopy_32.c +++ b/arch/x86/lib/usercopy_32.c | |||
@@ -748,7 +748,7 @@ survive: | |||
748 | retval = get_user_pages(current, current->mm, | 748 | retval = get_user_pages(current, current->mm, |
749 | (unsigned long )to, 1, 1, 0, &pg, NULL); | 749 | (unsigned long )to, 1, 1, 0, &pg, NULL); |
750 | 750 | ||
751 | if (retval == -ENOMEM && is_init(current)) { | 751 | if (retval == -ENOMEM && is_global_init(current)) { |
752 | up_read(¤t->mm->mmap_sem); | 752 | up_read(¤t->mm->mmap_sem); |
753 | congestion_wait(WRITE, HZ/50); | 753 | congestion_wait(WRITE, HZ/50); |
754 | goto survive; | 754 | goto survive; |
diff --git a/arch/x86/mach-default/setup.c b/arch/x86/mach-default/setup.c index 3f08010f3517..0c28a071824c 100644 --- a/arch/x86/mach-default/setup.c +++ b/arch/x86/mach-default/setup.c | |||
@@ -108,7 +108,7 @@ void __init time_init_hook(void) | |||
108 | * mca_nmi_hook - hook into MCA specific NMI chain | 108 | * mca_nmi_hook - hook into MCA specific NMI chain |
109 | * | 109 | * |
110 | * Description: | 110 | * Description: |
111 | * The MCA (Microchannel Arcitecture) has an NMI chain for NMI sources | 111 | * The MCA (Microchannel Architecture) has an NMI chain for NMI sources |
112 | * along the MCA bus. Use this to hook into that chain if you will need | 112 | * along the MCA bus. Use this to hook into that chain if you will need |
113 | * it. | 113 | * it. |
114 | **/ | 114 | **/ |
@@ -131,7 +131,7 @@ static __init int no_ipi_broadcast(char *str) | |||
131 | return 1; | 131 | return 1; |
132 | } | 132 | } |
133 | 133 | ||
134 | __setup("no_ipi_broadcast", no_ipi_broadcast); | 134 | __setup("no_ipi_broadcast=", no_ipi_broadcast); |
135 | 135 | ||
136 | static int __init print_ipi_mode(void) | 136 | static int __init print_ipi_mode(void) |
137 | { | 137 | { |
diff --git a/arch/x86/mach-generic/default.c b/arch/x86/mach-generic/default.c index 8685208d8512..1af0cc7648f0 100644 --- a/arch/x86/mach-generic/default.c +++ b/arch/x86/mach-generic/default.c | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Default generic APIC driver. This handles upto 8 CPUs. | 2 | * Default generic APIC driver. This handles up to 8 CPUs. |
3 | */ | 3 | */ |
4 | #define APIC_DEFINITION 1 | 4 | #define APIC_DEFINITION 1 |
5 | #include <linux/threads.h> | 5 | #include <linux/threads.h> |
diff --git a/arch/x86/mach-generic/probe.c b/arch/x86/mach-generic/probe.c index 4121d1551800..f410d3cb5659 100644 --- a/arch/x86/mach-generic/probe.c +++ b/arch/x86/mach-generic/probe.c | |||
@@ -56,7 +56,7 @@ void __init generic_bigsmp_probe(void) | |||
56 | /* | 56 | /* |
57 | * This routine is used to switch to bigsmp mode when | 57 | * This routine is used to switch to bigsmp mode when |
58 | * - There is no apic= option specified by the user | 58 | * - There is no apic= option specified by the user |
59 | * - generic_apic_probe() has choosen apic_default as the sub_arch | 59 | * - generic_apic_probe() has chosen apic_default as the sub_arch |
60 | * - we find more than 8 CPUs in acpi LAPIC listing with xAPIC support | 60 | * - we find more than 8 CPUs in acpi LAPIC listing with xAPIC support |
61 | */ | 61 | */ |
62 | 62 | ||
diff --git a/arch/x86/mach-voyager/voyager_smp.c b/arch/x86/mach-voyager/voyager_smp.c index e4928aa6bdfb..361ac5107b33 100644 --- a/arch/x86/mach-voyager/voyager_smp.c +++ b/arch/x86/mach-voyager/voyager_smp.c | |||
@@ -36,8 +36,8 @@ static unsigned long cpu_irq_affinity[NR_CPUS] __cacheline_aligned = { [0 ... NR | |||
36 | 36 | ||
37 | /* per CPU data structure (for /proc/cpuinfo et al), visible externally | 37 | /* per CPU data structure (for /proc/cpuinfo et al), visible externally |
38 | * indexed physically */ | 38 | * indexed physically */ |
39 | struct cpuinfo_x86 cpu_data[NR_CPUS] __cacheline_aligned; | 39 | DEFINE_PER_CPU(cpuinfo_x86, cpu_info) __cacheline_aligned; |
40 | EXPORT_SYMBOL(cpu_data); | 40 | EXPORT_PER_CPU_SYMBOL(cpu_info); |
41 | 41 | ||
42 | /* physical ID of the CPU used to boot the system */ | 42 | /* physical ID of the CPU used to boot the system */ |
43 | unsigned char boot_cpu_id; | 43 | unsigned char boot_cpu_id; |
@@ -389,7 +389,7 @@ find_smp_config(void) | |||
389 | 389 | ||
390 | /* The boot CPU must be extended */ | 390 | /* The boot CPU must be extended */ |
391 | voyager_extended_vic_processors = 1<<boot_cpu_id; | 391 | voyager_extended_vic_processors = 1<<boot_cpu_id; |
392 | /* initially, all of the first 8 cpu's can boot */ | 392 | /* initially, all of the first 8 CPUs can boot */ |
393 | voyager_allowed_boot_processors = 0xff; | 393 | voyager_allowed_boot_processors = 0xff; |
394 | /* set up everything for just this CPU, we can alter | 394 | /* set up everything for just this CPU, we can alter |
395 | * this as we start the other CPUs later */ | 395 | * this as we start the other CPUs later */ |
@@ -430,7 +430,7 @@ find_smp_config(void) | |||
430 | void __init | 430 | void __init |
431 | smp_store_cpu_info(int id) | 431 | smp_store_cpu_info(int id) |
432 | { | 432 | { |
433 | struct cpuinfo_x86 *c=&cpu_data[id]; | 433 | struct cpuinfo_x86 *c = &cpu_data(id); |
434 | 434 | ||
435 | *c = boot_cpu_data; | 435 | *c = boot_cpu_data; |
436 | 436 | ||
@@ -634,7 +634,7 @@ do_boot_cpu(__u8 cpu) | |||
634 | cpu, smp_processor_id())); | 634 | cpu, smp_processor_id())); |
635 | 635 | ||
636 | printk("CPU%d: ", cpu); | 636 | printk("CPU%d: ", cpu); |
637 | print_cpu_info(&cpu_data[cpu]); | 637 | print_cpu_info(&cpu_data(cpu)); |
638 | wmb(); | 638 | wmb(); |
639 | cpu_set(cpu, cpu_callout_map); | 639 | cpu_set(cpu, cpu_callout_map); |
640 | cpu_set(cpu, cpu_present_map); | 640 | cpu_set(cpu, cpu_present_map); |
@@ -683,7 +683,7 @@ smp_boot_cpus(void) | |||
683 | */ | 683 | */ |
684 | smp_store_cpu_info(boot_cpu_id); | 684 | smp_store_cpu_info(boot_cpu_id); |
685 | printk("CPU%d: ", boot_cpu_id); | 685 | printk("CPU%d: ", boot_cpu_id); |
686 | print_cpu_info(&cpu_data[boot_cpu_id]); | 686 | print_cpu_info(&cpu_data(boot_cpu_id)); |
687 | 687 | ||
688 | if(is_cpu_quad()) { | 688 | if(is_cpu_quad()) { |
689 | /* booting on a Quad CPU */ | 689 | /* booting on a Quad CPU */ |
@@ -714,7 +714,7 @@ smp_boot_cpus(void) | |||
714 | unsigned long bogosum = 0; | 714 | unsigned long bogosum = 0; |
715 | for (i = 0; i < NR_CPUS; i++) | 715 | for (i = 0; i < NR_CPUS; i++) |
716 | if (cpu_isset(i, cpu_online_map)) | 716 | if (cpu_isset(i, cpu_online_map)) |
717 | bogosum += cpu_data[i].loops_per_jiffy; | 717 | bogosum += cpu_data(i).loops_per_jiffy; |
718 | printk(KERN_INFO "Total of %d processors activated (%lu.%02lu BogoMIPS).\n", | 718 | printk(KERN_INFO "Total of %d processors activated (%lu.%02lu BogoMIPS).\n", |
719 | cpucount+1, | 719 | cpucount+1, |
720 | bogosum/(500000/HZ), | 720 | bogosum/(500000/HZ), |
@@ -1010,7 +1010,7 @@ static struct call_data_struct * call_data; | |||
1010 | 1010 | ||
1011 | /* execute a thread on a new CPU. The function to be called must be | 1011 | /* execute a thread on a new CPU. The function to be called must be |
1012 | * previously set up. This is used to schedule a function for | 1012 | * previously set up. This is used to schedule a function for |
1013 | * execution on all CPU's - set up the function then broadcast a | 1013 | * execution on all CPUs - set up the function then broadcast a |
1014 | * function_interrupt CPI to come here on each CPU */ | 1014 | * function_interrupt CPI to come here on each CPU */ |
1015 | static void | 1015 | static void |
1016 | smp_call_function_interrupt(void) | 1016 | smp_call_function_interrupt(void) |
@@ -1095,7 +1095,7 @@ voyager_smp_call_function_mask (cpumask_t cpumask, | |||
1095 | * CPI here. We don't use this actually for counting so losing | 1095 | * CPI here. We don't use this actually for counting so losing |
1096 | * ticks doesn't matter | 1096 | * ticks doesn't matter |
1097 | * | 1097 | * |
1098 | * FIXME: For those CPU's which actually have a local APIC, we could | 1098 | * FIXME: For those CPUs which actually have a local APIC, we could |
1099 | * try to use it to trigger this interrupt instead of having to | 1099 | * try to use it to trigger this interrupt instead of having to |
1100 | * broadcast the timer tick. Unfortunately, all my pentium DYADs have | 1100 | * broadcast the timer tick. Unfortunately, all my pentium DYADs have |
1101 | * no local APIC, so I can't do this | 1101 | * no local APIC, so I can't do this |
@@ -1287,7 +1287,7 @@ smp_local_timer_interrupt(void) | |||
1287 | 1287 | ||
1288 | /* | 1288 | /* |
1289 | * We take the 'long' return path, and there every subsystem | 1289 | * We take the 'long' return path, and there every subsystem |
1290 | * grabs the apropriate locks (kernel lock/ irq lock). | 1290 | * grabs the appropriate locks (kernel lock/ irq lock). |
1291 | * | 1291 | * |
1292 | * we might want to decouple profiling from the 'long path', | 1292 | * we might want to decouple profiling from the 'long path', |
1293 | * and do the profiling totally in assembly. | 1293 | * and do the profiling totally in assembly. |
@@ -1759,7 +1759,7 @@ set_vic_irq_affinity(unsigned int irq, cpumask_t mask) | |||
1759 | real_mask = cpus_addr(mask)[0] & voyager_extended_vic_processors; | 1759 | real_mask = cpus_addr(mask)[0] & voyager_extended_vic_processors; |
1760 | 1760 | ||
1761 | if(cpus_addr(mask)[0] == 0) | 1761 | if(cpus_addr(mask)[0] == 0) |
1762 | /* can't have no cpu's to accept the interrupt -- extremely | 1762 | /* can't have no CPUs to accept the interrupt -- extremely |
1763 | * bad things will happen */ | 1763 | * bad things will happen */ |
1764 | return; | 1764 | return; |
1765 | 1765 | ||
@@ -1791,7 +1791,7 @@ set_vic_irq_affinity(unsigned int irq, cpumask_t mask) | |||
1791 | } | 1791 | } |
1792 | /* this is magic, we now have the correct affinity maps, so | 1792 | /* this is magic, we now have the correct affinity maps, so |
1793 | * enable the interrupt. This will send an enable CPI to | 1793 | * enable the interrupt. This will send an enable CPI to |
1794 | * those cpu's who need to enable it in their local masks, | 1794 | * those CPUs who need to enable it in their local masks, |
1795 | * causing them to correct for the new affinity . If the | 1795 | * causing them to correct for the new affinity . If the |
1796 | * interrupt is currently globally disabled, it will simply be | 1796 | * interrupt is currently globally disabled, it will simply be |
1797 | * disabled again as it comes in (voyager lazy disable). If | 1797 | * disabled again as it comes in (voyager lazy disable). If |
diff --git a/arch/x86/mach-voyager/voyager_thread.c b/arch/x86/mach-voyager/voyager_thread.c index f9d595338159..50f9366c411e 100644 --- a/arch/x86/mach-voyager/voyager_thread.c +++ b/arch/x86/mach-voyager/voyager_thread.c | |||
@@ -64,7 +64,7 @@ check_from_kernel(void) | |||
64 | { | 64 | { |
65 | if(voyager_status.switch_off) { | 65 | if(voyager_status.switch_off) { |
66 | 66 | ||
67 | /* FIXME: This should be configureable via proc */ | 67 | /* FIXME: This should be configurable via proc */ |
68 | execute("umask 600; echo 0 > /etc/initrunlvl; kill -HUP 1"); | 68 | execute("umask 600; echo 0 > /etc/initrunlvl; kill -HUP 1"); |
69 | } else if(voyager_status.power_fail) { | 69 | } else if(voyager_status.power_fail) { |
70 | VDEBUG(("Voyager daemon detected AC power failure\n")); | 70 | VDEBUG(("Voyager daemon detected AC power failure\n")); |
diff --git a/arch/x86/mm/boot_ioremap_32.c b/arch/x86/mm/boot_ioremap_32.c index 4de95a17a7d4..f14da2a53ece 100644 --- a/arch/x86/mm/boot_ioremap_32.c +++ b/arch/x86/mm/boot_ioremap_32.c | |||
@@ -10,7 +10,7 @@ | |||
10 | 10 | ||
11 | /* | 11 | /* |
12 | * We need to use the 2-level pagetable functions, but CONFIG_X86_PAE | 12 | * We need to use the 2-level pagetable functions, but CONFIG_X86_PAE |
13 | * keeps that from happenning. If anyone has a better way, I'm listening. | 13 | * keeps that from happening. If anyone has a better way, I'm listening. |
14 | * | 14 | * |
15 | * boot_pte_t is defined only if this all works correctly | 15 | * boot_pte_t is defined only if this all works correctly |
16 | */ | 16 | */ |
diff --git a/arch/x86/mm/discontig_32.c b/arch/x86/mm/discontig_32.c index 13893772cc48..fe608a45ffb6 100644 --- a/arch/x86/mm/discontig_32.c +++ b/arch/x86/mm/discontig_32.c | |||
@@ -273,7 +273,7 @@ unsigned long __init setup_memory(void) | |||
273 | * When mapping a NUMA machine we allocate the node_mem_map arrays | 273 | * When mapping a NUMA machine we allocate the node_mem_map arrays |
274 | * from node local memory. They are then mapped directly into KVA | 274 | * from node local memory. They are then mapped directly into KVA |
275 | * between zone normal and vmalloc space. Calculate the size of | 275 | * between zone normal and vmalloc space. Calculate the size of |
276 | * this space and use it to adjust the boundry between ZONE_NORMAL | 276 | * this space and use it to adjust the boundary between ZONE_NORMAL |
277 | * and ZONE_HIGHMEM. | 277 | * and ZONE_HIGHMEM. |
278 | */ | 278 | */ |
279 | find_max_pfn(); | 279 | find_max_pfn(); |
diff --git a/arch/x86/mm/fault_32.c b/arch/x86/mm/fault_32.c index 6555c3d14371..503dfc05111b 100644 --- a/arch/x86/mm/fault_32.c +++ b/arch/x86/mm/fault_32.c | |||
@@ -354,7 +354,7 @@ fastcall void __kprobes do_page_fault(struct pt_regs *regs, | |||
354 | 354 | ||
355 | /* When running in the kernel we expect faults to occur only to | 355 | /* When running in the kernel we expect faults to occur only to |
356 | * addresses in user space. All other faults represent errors in the | 356 | * addresses in user space. All other faults represent errors in the |
357 | * kernel and should generate an OOPS. Unfortunatly, in the case of an | 357 | * kernel and should generate an OOPS. Unfortunately, in the case of an |
358 | * erroneous fault occurring in a code path which already holds mmap_sem | 358 | * erroneous fault occurring in a code path which already holds mmap_sem |
359 | * we will deadlock attempting to validate the fault against the | 359 | * we will deadlock attempting to validate the fault against the |
360 | * address space. Luckily the kernel only validly references user | 360 | * address space. Luckily the kernel only validly references user |
@@ -362,7 +362,7 @@ fastcall void __kprobes do_page_fault(struct pt_regs *regs, | |||
362 | * exceptions table. | 362 | * exceptions table. |
363 | * | 363 | * |
364 | * As the vast majority of faults will be valid we will only perform | 364 | * As the vast majority of faults will be valid we will only perform |
365 | * the source reference check when there is a possibilty of a deadlock. | 365 | * the source reference check when there is a possibility of a deadlock. |
366 | * Attempt to lock the address space, if we cannot we then validate the | 366 | * Attempt to lock the address space, if we cannot we then validate the |
367 | * source. If this is invalid we can skip the address space check, | 367 | * source. If this is invalid we can skip the address space check, |
368 | * thus avoiding the deadlock. | 368 | * thus avoiding the deadlock. |
@@ -471,8 +471,8 @@ bad_area_nosemaphore: | |||
471 | printk_ratelimit()) { | 471 | printk_ratelimit()) { |
472 | printk("%s%s[%d]: segfault at %08lx eip %08lx " | 472 | printk("%s%s[%d]: segfault at %08lx eip %08lx " |
473 | "esp %08lx error %lx\n", | 473 | "esp %08lx error %lx\n", |
474 | tsk->pid > 1 ? KERN_INFO : KERN_EMERG, | 474 | task_pid_nr(tsk) > 1 ? KERN_INFO : KERN_EMERG, |
475 | tsk->comm, tsk->pid, address, regs->eip, | 475 | tsk->comm, task_pid_nr(tsk), address, regs->eip, |
476 | regs->esp, error_code); | 476 | regs->esp, error_code); |
477 | } | 477 | } |
478 | tsk->thread.cr2 = address; | 478 | tsk->thread.cr2 = address; |
@@ -564,7 +564,8 @@ no_context: | |||
564 | * it's allocated already. | 564 | * it's allocated already. |
565 | */ | 565 | */ |
566 | if ((page >> PAGE_SHIFT) < max_low_pfn | 566 | if ((page >> PAGE_SHIFT) < max_low_pfn |
567 | && (page & _PAGE_PRESENT)) { | 567 | && (page & _PAGE_PRESENT) |
568 | && !(page & _PAGE_PSE)) { | ||
568 | page &= PAGE_MASK; | 569 | page &= PAGE_MASK; |
569 | page = ((__typeof__(page) *) __va(page))[(address >> PAGE_SHIFT) | 570 | page = ((__typeof__(page) *) __va(page))[(address >> PAGE_SHIFT) |
570 | & (PTRS_PER_PTE - 1)]; | 571 | & (PTRS_PER_PTE - 1)]; |
@@ -587,7 +588,7 @@ no_context: | |||
587 | */ | 588 | */ |
588 | out_of_memory: | 589 | out_of_memory: |
589 | up_read(&mm->mmap_sem); | 590 | up_read(&mm->mmap_sem); |
590 | if (is_init(tsk)) { | 591 | if (is_global_init(tsk)) { |
591 | yield(); | 592 | yield(); |
592 | down_read(&mm->mmap_sem); | 593 | down_read(&mm->mmap_sem); |
593 | goto survive; | 594 | goto survive; |
diff --git a/arch/x86/mm/fault_64.c b/arch/x86/mm/fault_64.c index 5e0e54906c48..644b4f7ece10 100644 --- a/arch/x86/mm/fault_64.c +++ b/arch/x86/mm/fault_64.c | |||
@@ -169,7 +169,7 @@ void dump_pagetable(unsigned long address) | |||
169 | pmd = pmd_offset(pud, address); | 169 | pmd = pmd_offset(pud, address); |
170 | if (bad_address(pmd)) goto bad; | 170 | if (bad_address(pmd)) goto bad; |
171 | printk("PMD %lx ", pmd_val(*pmd)); | 171 | printk("PMD %lx ", pmd_val(*pmd)); |
172 | if (!pmd_present(*pmd)) goto ret; | 172 | if (!pmd_present(*pmd) || pmd_large(*pmd)) goto ret; |
173 | 173 | ||
174 | pte = pte_offset_kernel(pmd, address); | 174 | pte = pte_offset_kernel(pmd, address); |
175 | if (bad_address(pte)) goto bad; | 175 | if (bad_address(pte)) goto bad; |
@@ -285,7 +285,6 @@ static int vmalloc_fault(unsigned long address) | |||
285 | return 0; | 285 | return 0; |
286 | } | 286 | } |
287 | 287 | ||
288 | static int page_fault_trace; | ||
289 | int show_unhandled_signals = 1; | 288 | int show_unhandled_signals = 1; |
290 | 289 | ||
291 | /* | 290 | /* |
@@ -354,10 +353,6 @@ asmlinkage void __kprobes do_page_fault(struct pt_regs *regs, | |||
354 | if (likely(regs->eflags & X86_EFLAGS_IF)) | 353 | if (likely(regs->eflags & X86_EFLAGS_IF)) |
355 | local_irq_enable(); | 354 | local_irq_enable(); |
356 | 355 | ||
357 | if (unlikely(page_fault_trace)) | ||
358 | printk("pagefault rip:%lx rsp:%lx cs:%lu ss:%lu address %lx error %lx\n", | ||
359 | regs->rip,regs->rsp,regs->cs,regs->ss,address,error_code); | ||
360 | |||
361 | if (unlikely(error_code & PF_RSVD)) | 356 | if (unlikely(error_code & PF_RSVD)) |
362 | pgtable_bad(address, regs, error_code); | 357 | pgtable_bad(address, regs, error_code); |
363 | 358 | ||
@@ -378,7 +373,7 @@ asmlinkage void __kprobes do_page_fault(struct pt_regs *regs, | |||
378 | again: | 373 | again: |
379 | /* When running in the kernel we expect faults to occur only to | 374 | /* When running in the kernel we expect faults to occur only to |
380 | * addresses in user space. All other faults represent errors in the | 375 | * addresses in user space. All other faults represent errors in the |
381 | * kernel and should generate an OOPS. Unfortunatly, in the case of an | 376 | * kernel and should generate an OOPS. Unfortunately, in the case of an |
382 | * erroneous fault occurring in a code path which already holds mmap_sem | 377 | * erroneous fault occurring in a code path which already holds mmap_sem |
383 | * we will deadlock attempting to validate the fault against the | 378 | * we will deadlock attempting to validate the fault against the |
384 | * address space. Luckily the kernel only validly references user | 379 | * address space. Luckily the kernel only validly references user |
@@ -386,7 +381,7 @@ asmlinkage void __kprobes do_page_fault(struct pt_regs *regs, | |||
386 | * exceptions table. | 381 | * exceptions table. |
387 | * | 382 | * |
388 | * As the vast majority of faults will be valid we will only perform | 383 | * As the vast majority of faults will be valid we will only perform |
389 | * the source reference check when there is a possibilty of a deadlock. | 384 | * the source reference check when there is a possibility of a deadlock. |
390 | * Attempt to lock the address space, if we cannot we then validate the | 385 | * Attempt to lock the address space, if we cannot we then validate the |
391 | * source. If this is invalid we can skip the address space check, | 386 | * source. If this is invalid we can skip the address space check, |
392 | * thus avoiding the deadlock. | 387 | * thus avoiding the deadlock. |
@@ -488,7 +483,7 @@ bad_area_nosemaphore: | |||
488 | if (show_unhandled_signals && unhandled_signal(tsk, SIGSEGV) && | 483 | if (show_unhandled_signals && unhandled_signal(tsk, SIGSEGV) && |
489 | printk_ratelimit()) { | 484 | printk_ratelimit()) { |
490 | printk( | 485 | printk( |
491 | "%s%s[%d]: segfault at %016lx rip %016lx rsp %016lx error %lx\n", | 486 | "%s%s[%d]: segfault at %lx rip %lx rsp %lx error %lx\n", |
492 | tsk->pid > 1 ? KERN_INFO : KERN_EMERG, | 487 | tsk->pid > 1 ? KERN_INFO : KERN_EMERG, |
493 | tsk->comm, tsk->pid, address, regs->rip, | 488 | tsk->comm, tsk->pid, address, regs->rip, |
494 | regs->rsp, error_code); | 489 | regs->rsp, error_code); |
@@ -554,7 +549,7 @@ no_context: | |||
554 | */ | 549 | */ |
555 | out_of_memory: | 550 | out_of_memory: |
556 | up_read(&mm->mmap_sem); | 551 | up_read(&mm->mmap_sem); |
557 | if (is_init(current)) { | 552 | if (is_global_init(current)) { |
558 | yield(); | 553 | yield(); |
559 | goto again; | 554 | goto again; |
560 | } | 555 | } |
@@ -621,10 +616,3 @@ void vmalloc_sync_all(void) | |||
621 | BUILD_BUG_ON(!(((MODULES_END - 1) & PGDIR_MASK) == | 616 | BUILD_BUG_ON(!(((MODULES_END - 1) & PGDIR_MASK) == |
622 | (__START_KERNEL & PGDIR_MASK))); | 617 | (__START_KERNEL & PGDIR_MASK))); |
623 | } | 618 | } |
624 | |||
625 | static int __init enable_pagefaulttrace(char *str) | ||
626 | { | ||
627 | page_fault_trace = 1; | ||
628 | return 1; | ||
629 | } | ||
630 | __setup("pagefaulttrace", enable_pagefaulttrace); | ||
diff --git a/arch/x86/mm/numa_64.c b/arch/x86/mm/numa_64.c index 5eec5e56d07f..3d6926ba8995 100644 --- a/arch/x86/mm/numa_64.c +++ b/arch/x86/mm/numa_64.c | |||
@@ -612,7 +612,7 @@ void __init init_cpu_to_node(void) | |||
612 | { | 612 | { |
613 | int i; | 613 | int i; |
614 | for (i = 0; i < NR_CPUS; i++) { | 614 | for (i = 0; i < NR_CPUS; i++) { |
615 | u8 apicid = x86_cpu_to_apicid[i]; | 615 | u8 apicid = x86_cpu_to_apicid_init[i]; |
616 | if (apicid == BAD_APICID) | 616 | if (apicid == BAD_APICID) |
617 | continue; | 617 | continue; |
618 | if (apicid_to_node[apicid] == NUMA_NO_NODE) | 618 | if (apicid_to_node[apicid] == NUMA_NO_NODE) |
diff --git a/arch/x86/mm/pageattr_64.c b/arch/x86/mm/pageattr_64.c index 8a4f65bf956e..c7b7dfe1d405 100644 --- a/arch/x86/mm/pageattr_64.c +++ b/arch/x86/mm/pageattr_64.c | |||
@@ -230,9 +230,14 @@ void global_flush_tlb(void) | |||
230 | struct page *pg, *next; | 230 | struct page *pg, *next; |
231 | struct list_head l; | 231 | struct list_head l; |
232 | 232 | ||
233 | down_read(&init_mm.mmap_sem); | 233 | /* |
234 | * Write-protect the semaphore, to exclude two contexts | ||
235 | * doing a list_replace_init() call in parallel and to | ||
236 | * exclude new additions to the deferred_pages list: | ||
237 | */ | ||
238 | down_write(&init_mm.mmap_sem); | ||
234 | list_replace_init(&deferred_pages, &l); | 239 | list_replace_init(&deferred_pages, &l); |
235 | up_read(&init_mm.mmap_sem); | 240 | up_write(&init_mm.mmap_sem); |
236 | 241 | ||
237 | flush_map(&l); | 242 | flush_map(&l); |
238 | 243 | ||
diff --git a/arch/x86/mm/srat_64.c b/arch/x86/mm/srat_64.c index 56089ccc3949..ea85172fc0cc 100644 --- a/arch/x86/mm/srat_64.c +++ b/arch/x86/mm/srat_64.c | |||
@@ -218,7 +218,7 @@ static inline int save_add_info(void) {return 0;} | |||
218 | /* | 218 | /* |
219 | * Update nodes_add and decide if to include add are in the zone. | 219 | * Update nodes_add and decide if to include add are in the zone. |
220 | * Both SPARSE and RESERVE need nodes_add infomation. | 220 | * Both SPARSE and RESERVE need nodes_add infomation. |
221 | * This code supports one contigious hot add area per node. | 221 | * This code supports one contiguous hot add area per node. |
222 | */ | 222 | */ |
223 | static int reserve_hotadd(int node, unsigned long start, unsigned long end) | 223 | static int reserve_hotadd(int node, unsigned long start, unsigned long end) |
224 | { | 224 | { |
diff --git a/arch/x86/oprofile/backtrace.c b/arch/x86/oprofile/backtrace.c index c049ce414f01..0ed046a187f7 100644 --- a/arch/x86/oprofile/backtrace.c +++ b/arch/x86/oprofile/backtrace.c | |||
@@ -13,25 +13,45 @@ | |||
13 | #include <linux/mm.h> | 13 | #include <linux/mm.h> |
14 | #include <asm/ptrace.h> | 14 | #include <asm/ptrace.h> |
15 | #include <asm/uaccess.h> | 15 | #include <asm/uaccess.h> |
16 | #include <asm/stacktrace.h> | ||
16 | 17 | ||
17 | struct frame_head { | 18 | static void backtrace_warning_symbol(void *data, char *msg, |
18 | struct frame_head * ebp; | 19 | unsigned long symbol) |
19 | unsigned long ret; | 20 | { |
20 | } __attribute__((packed)); | 21 | /* Ignore warnings */ |
22 | } | ||
21 | 23 | ||
22 | static struct frame_head * | 24 | static void backtrace_warning(void *data, char *msg) |
23 | dump_kernel_backtrace(struct frame_head * head) | ||
24 | { | 25 | { |
25 | oprofile_add_trace(head->ret); | 26 | /* Ignore warnings */ |
27 | } | ||
26 | 28 | ||
27 | /* frame pointers should strictly progress back up the stack | 29 | static int backtrace_stack(void *data, char *name) |
28 | * (towards higher addresses) */ | 30 | { |
29 | if (head >= head->ebp) | 31 | /* Yes, we want all stacks */ |
30 | return NULL; | 32 | return 0; |
33 | } | ||
34 | |||
35 | static void backtrace_address(void *data, unsigned long addr) | ||
36 | { | ||
37 | unsigned int *depth = data; | ||
31 | 38 | ||
32 | return head->ebp; | 39 | if ((*depth)--) |
40 | oprofile_add_trace(addr); | ||
33 | } | 41 | } |
34 | 42 | ||
43 | static struct stacktrace_ops backtrace_ops = { | ||
44 | .warning = backtrace_warning, | ||
45 | .warning_symbol = backtrace_warning_symbol, | ||
46 | .stack = backtrace_stack, | ||
47 | .address = backtrace_address, | ||
48 | }; | ||
49 | |||
50 | struct frame_head { | ||
51 | struct frame_head *ebp; | ||
52 | unsigned long ret; | ||
53 | } __attribute__((packed)); | ||
54 | |||
35 | static struct frame_head * | 55 | static struct frame_head * |
36 | dump_user_backtrace(struct frame_head * head) | 56 | dump_user_backtrace(struct frame_head * head) |
37 | { | 57 | { |
@@ -53,72 +73,16 @@ dump_user_backtrace(struct frame_head * head) | |||
53 | return bufhead[0].ebp; | 73 | return bufhead[0].ebp; |
54 | } | 74 | } |
55 | 75 | ||
56 | /* | ||
57 | * | | /\ Higher addresses | ||
58 | * | | | ||
59 | * --------------- stack base (address of current_thread_info) | ||
60 | * | thread info | | ||
61 | * . . | ||
62 | * | stack | | ||
63 | * --------------- saved regs->ebp value if valid (frame_head address) | ||
64 | * . . | ||
65 | * --------------- saved regs->rsp value if x86_64 | ||
66 | * | | | ||
67 | * --------------- struct pt_regs * stored on stack if 32-bit | ||
68 | * | | | ||
69 | * . . | ||
70 | * | | | ||
71 | * --------------- %esp | ||
72 | * | | | ||
73 | * | | \/ Lower addresses | ||
74 | * | ||
75 | * Thus, regs (or regs->rsp for x86_64) <-> stack base restricts the | ||
76 | * valid(ish) ebp values. Note: (1) for x86_64, NMI and several other | ||
77 | * exceptions use special stacks, maintained by the interrupt stack table | ||
78 | * (IST). These stacks are set up in trap_init() in | ||
79 | * arch/x86_64/kernel/traps.c. Thus, for x86_64, regs now does not point | ||
80 | * to the kernel stack; instead, it points to some location on the NMI | ||
81 | * stack. On the other hand, regs->rsp is the stack pointer saved when the | ||
82 | * NMI occurred. (2) For 32-bit, regs->esp is not valid because the | ||
83 | * processor does not save %esp on the kernel stack when interrupts occur | ||
84 | * in the kernel mode. | ||
85 | */ | ||
86 | #ifdef CONFIG_FRAME_POINTER | ||
87 | static int valid_kernel_stack(struct frame_head * head, struct pt_regs * regs) | ||
88 | { | ||
89 | unsigned long headaddr = (unsigned long)head; | ||
90 | #ifdef CONFIG_X86_64 | ||
91 | unsigned long stack = (unsigned long)regs->rsp; | ||
92 | #else | ||
93 | unsigned long stack = (unsigned long)regs; | ||
94 | #endif | ||
95 | unsigned long stack_base = (stack & ~(THREAD_SIZE - 1)) + THREAD_SIZE; | ||
96 | |||
97 | return headaddr > stack && headaddr < stack_base; | ||
98 | } | ||
99 | #else | ||
100 | /* without fp, it's just junk */ | ||
101 | static int valid_kernel_stack(struct frame_head * head, struct pt_regs * regs) | ||
102 | { | ||
103 | return 0; | ||
104 | } | ||
105 | #endif | ||
106 | |||
107 | |||
108 | void | 76 | void |
109 | x86_backtrace(struct pt_regs * const regs, unsigned int depth) | 77 | x86_backtrace(struct pt_regs * const regs, unsigned int depth) |
110 | { | 78 | { |
111 | struct frame_head *head; | 79 | struct frame_head *head = (struct frame_head *)frame_pointer(regs); |
112 | 80 | unsigned long stack = stack_pointer(regs); | |
113 | #ifdef CONFIG_X86_64 | ||
114 | head = (struct frame_head *)regs->rbp; | ||
115 | #else | ||
116 | head = (struct frame_head *)regs->ebp; | ||
117 | #endif | ||
118 | 81 | ||
119 | if (!user_mode_vm(regs)) { | 82 | if (!user_mode_vm(regs)) { |
120 | while (depth-- && valid_kernel_stack(head, regs)) | 83 | if (depth) |
121 | head = dump_kernel_backtrace(head); | 84 | dump_trace(NULL, regs, (unsigned long *)stack, |
85 | &backtrace_ops, &depth); | ||
122 | return; | 86 | return; |
123 | } | 87 | } |
124 | 88 | ||
diff --git a/arch/x86/oprofile/op_x86_model.h b/arch/x86/oprofile/op_x86_model.h index abb1aa95b979..45b605fa71d0 100644 --- a/arch/x86/oprofile/op_x86_model.h +++ b/arch/x86/oprofile/op_x86_model.h | |||
@@ -29,7 +29,7 @@ struct op_msrs { | |||
29 | struct pt_regs; | 29 | struct pt_regs; |
30 | 30 | ||
31 | /* The model vtable abstracts the differences between | 31 | /* The model vtable abstracts the differences between |
32 | * various x86 CPU model's perfctr support. | 32 | * various x86 CPU models' perfctr support. |
33 | */ | 33 | */ |
34 | struct op_x86_model_spec { | 34 | struct op_x86_model_spec { |
35 | unsigned int const num_counters; | 35 | unsigned int const num_counters; |
diff --git a/arch/x86/pci/irq.c b/arch/x86/pci/irq.c index c52150fdf82b..88d8f5c0ecb5 100644 --- a/arch/x86/pci/irq.c +++ b/arch/x86/pci/irq.c | |||
@@ -169,7 +169,7 @@ void eisa_set_level_irq(unsigned int irq) | |||
169 | } | 169 | } |
170 | 170 | ||
171 | /* | 171 | /* |
172 | * Common IRQ routing practice: nybbles in config space, | 172 | * Common IRQ routing practice: nibbles in config space, |
173 | * offset by some magic constant. | 173 | * offset by some magic constant. |
174 | */ | 174 | */ |
175 | static unsigned int read_config_nybble(struct pci_dev *router, unsigned offset, unsigned nr) | 175 | static unsigned int read_config_nybble(struct pci_dev *router, unsigned offset, unsigned nr) |
@@ -585,7 +585,7 @@ static __init int via_router_probe(struct irq_router *r, | |||
585 | /* FIXME: We should move some of the quirk fixup stuff here */ | 585 | /* FIXME: We should move some of the quirk fixup stuff here */ |
586 | 586 | ||
587 | /* | 587 | /* |
588 | * work arounds for some buggy BIOSes | 588 | * workarounds for some buggy BIOSes |
589 | */ | 589 | */ |
590 | if (device == PCI_DEVICE_ID_VIA_82C586_0) { | 590 | if (device == PCI_DEVICE_ID_VIA_82C586_0) { |
591 | switch(router->device) { | 591 | switch(router->device) { |
diff --git a/arch/x86_64/.gitignore b/arch/x86_64/.gitignore new file mode 100644 index 000000000000..36ef4c374d25 --- /dev/null +++ b/arch/x86_64/.gitignore | |||
@@ -0,0 +1 @@ | |||
boot | |||
diff --git a/arch/x86_64/Kconfig b/arch/x86_64/Kconfig index 43fafe9e9c08..aab25f3ba3ce 100644 --- a/arch/x86_64/Kconfig +++ b/arch/x86_64/Kconfig | |||
@@ -716,9 +716,16 @@ menu "Power management options" | |||
716 | 716 | ||
717 | source kernel/power/Kconfig | 717 | source kernel/power/Kconfig |
718 | 718 | ||
719 | config ARCH_HIBERNATION_HEADER | ||
720 | bool | ||
721 | depends on HIBERNATION | ||
722 | default y | ||
723 | |||
719 | source "drivers/acpi/Kconfig" | 724 | source "drivers/acpi/Kconfig" |
720 | 725 | ||
721 | source "arch/x86/kernel/cpufreq/Kconfig" | 726 | source "arch/x86/kernel/cpu/cpufreq/Kconfig_64" |
727 | |||
728 | source "drivers/cpuidle/Kconfig" | ||
722 | 729 | ||
723 | endmenu | 730 | endmenu |
724 | 731 | ||
@@ -761,9 +768,9 @@ source "fs/Kconfig.binfmt" | |||
761 | config IA32_EMULATION | 768 | config IA32_EMULATION |
762 | bool "IA32 Emulation" | 769 | bool "IA32 Emulation" |
763 | help | 770 | help |
764 | Include code to run 32-bit programs under a 64-bit kernel. You should likely | 771 | Include code to run 32-bit programs under a 64-bit kernel. You should |
765 | turn this on, unless you're 100% sure that you don't have any 32-bit programs | 772 | likely turn this on, unless you're 100% sure that you don't have any |
766 | left. | 773 | 32-bit programs left. |
767 | 774 | ||
768 | config IA32_AOUT | 775 | config IA32_AOUT |
769 | tristate "IA32 a.out support" | 776 | tristate "IA32 a.out support" |
@@ -794,21 +801,6 @@ source "drivers/firmware/Kconfig" | |||
794 | 801 | ||
795 | source fs/Kconfig | 802 | source fs/Kconfig |
796 | 803 | ||
797 | menu "Instrumentation Support" | ||
798 | |||
799 | source "arch/x86/oprofile/Kconfig" | ||
800 | |||
801 | config KPROBES | ||
802 | bool "Kprobes" | ||
803 | depends on KALLSYMS && MODULES | ||
804 | help | ||
805 | Kprobes allows you to trap at almost any kernel address and | ||
806 | execute a callback function. register_kprobe() establishes | ||
807 | a probepoint and specifies the callback. Kprobes is useful | ||
808 | for kernel debugging, non-intrusive instrumentation and testing. | ||
809 | If in doubt, say "N". | ||
810 | endmenu | ||
811 | |||
812 | source "arch/x86_64/Kconfig.debug" | 804 | source "arch/x86_64/Kconfig.debug" |
813 | 805 | ||
814 | source "security/Kconfig" | 806 | source "security/Kconfig" |
diff --git a/arch/x86_64/Makefile b/arch/x86_64/Makefile index 03e1ede27b85..6d89ab762ffc 100644 --- a/arch/x86_64/Makefile +++ b/arch/x86_64/Makefile | |||
@@ -74,7 +74,7 @@ KBUILD_CFLAGS += $(cflags-y) | |||
74 | CFLAGS_KERNEL += $(cflags-kernel-y) | 74 | CFLAGS_KERNEL += $(cflags-kernel-y) |
75 | KBUILD_AFLAGS += -m64 | 75 | KBUILD_AFLAGS += -m64 |
76 | 76 | ||
77 | head-y := arch/x86/kernel/head_64.o arch/x86/kernel/head64.o arch/x86/kernel/init_task_64.o | 77 | head-y := arch/x86/kernel/head_64.o arch/x86/kernel/head64.o arch/x86/kernel/init_task.o |
78 | 78 | ||
79 | libs-y += arch/x86/lib/ | 79 | libs-y += arch/x86/lib/ |
80 | core-y += arch/x86/kernel/ \ | 80 | core-y += arch/x86/kernel/ \ |
@@ -97,9 +97,9 @@ BOOTIMAGE := arch/x86/boot/bzImage | |||
97 | KBUILD_IMAGE := $(BOOTIMAGE) | 97 | KBUILD_IMAGE := $(BOOTIMAGE) |
98 | 98 | ||
99 | bzImage: vmlinux | 99 | bzImage: vmlinux |
100 | $(Q)mkdir -p $(objtree)/arch/x86_64/boot | ||
101 | $(Q)ln -fsn $(objtree)/arch/x86/boot/bzImage $(objtree)/arch/x86_64/boot/bzImage | ||
102 | $(Q)$(MAKE) $(build)=$(boot) $(BOOTIMAGE) | 100 | $(Q)$(MAKE) $(build)=$(boot) $(BOOTIMAGE) |
101 | $(Q)mkdir -p $(objtree)/arch/x86_64/boot | ||
102 | $(Q)ln -fsn ../../x86/boot/bzImage $(objtree)/arch/x86_64/boot/bzImage | ||
103 | 103 | ||
104 | bzlilo: vmlinux | 104 | bzlilo: vmlinux |
105 | $(Q)$(MAKE) $(build)=$(boot) BOOTIMAGE=$(BOOTIMAGE) zlilo | 105 | $(Q)$(MAKE) $(build)=$(boot) BOOTIMAGE=$(BOOTIMAGE) zlilo |
diff --git a/arch/xtensa/Kconfig b/arch/xtensa/Kconfig index 7fbb44bea37f..85ffbb491490 100644 --- a/arch/xtensa/Kconfig +++ b/arch/xtensa/Kconfig | |||
@@ -251,6 +251,8 @@ config EMBEDDED_RAMDISK_IMAGE | |||
251 | provide one yourself. | 251 | provide one yourself. |
252 | endmenu | 252 | endmenu |
253 | 253 | ||
254 | source "kernel/Kconfig.instrumentation" | ||
255 | |||
254 | source "arch/xtensa/Kconfig.debug" | 256 | source "arch/xtensa/Kconfig.debug" |
255 | 257 | ||
256 | source "security/Kconfig" | 258 | source "security/Kconfig" |
diff --git a/arch/xtensa/boot/Makefile b/arch/xtensa/boot/Makefile index 9c5185f605b6..40aa55b485be 100644 --- a/arch/xtensa/boot/Makefile +++ b/arch/xtensa/boot/Makefile | |||
@@ -8,7 +8,8 @@ | |||
8 | # | 8 | # |
9 | 9 | ||
10 | 10 | ||
11 | EXTRA_CFLAGS += -fno-builtin -Iarch/$(ARCH)/boot/include | 11 | # KBUILD_CFLAGS used when building rest of boot (takes effect recursively) |
12 | KBUILD_CFLAGS += -fno-builtin -Iarch/$(ARCH)/boot/include | ||
12 | HOSTFLAGS += -Iarch/$(ARCH)/boot/include | 13 | HOSTFLAGS += -Iarch/$(ARCH)/boot/include |
13 | 14 | ||
14 | BIG_ENDIAN := $(shell echo -e __XTENSA_EB__ | $(CC) -E - | grep -v "\#") | 15 | BIG_ENDIAN := $(shell echo -e __XTENSA_EB__ | $(CC) -E - | grep -v "\#") |
diff --git a/arch/xtensa/kernel/traps.c b/arch/xtensa/kernel/traps.c index 8be99c777d9d..397bcd6ad08d 100644 --- a/arch/xtensa/kernel/traps.c +++ b/arch/xtensa/kernel/traps.c | |||
@@ -176,7 +176,7 @@ void do_unhandled(struct pt_regs *regs, unsigned long exccause) | |||
176 | printk("Caught unhandled exception in '%s' " | 176 | printk("Caught unhandled exception in '%s' " |
177 | "(pid = %d, pc = %#010lx) - should not happen\n" | 177 | "(pid = %d, pc = %#010lx) - should not happen\n" |
178 | "\tEXCCAUSE is %ld\n", | 178 | "\tEXCCAUSE is %ld\n", |
179 | current->comm, current->pid, regs->pc, exccause); | 179 | current->comm, task_pid_nr(current), regs->pc, exccause); |
180 | force_sig(SIGILL, current); | 180 | force_sig(SIGILL, current); |
181 | } | 181 | } |
182 | 182 | ||
@@ -228,7 +228,7 @@ do_illegal_instruction(struct pt_regs *regs) | |||
228 | /* If in user mode, send SIGILL signal to current process. */ | 228 | /* If in user mode, send SIGILL signal to current process. */ |
229 | 229 | ||
230 | printk("Illegal Instruction in '%s' (pid = %d, pc = %#010lx)\n", | 230 | printk("Illegal Instruction in '%s' (pid = %d, pc = %#010lx)\n", |
231 | current->comm, current->pid, regs->pc); | 231 | current->comm, task_pid_nr(current), regs->pc); |
232 | force_sig(SIGILL, current); | 232 | force_sig(SIGILL, current); |
233 | } | 233 | } |
234 | 234 | ||
@@ -254,7 +254,7 @@ do_unaligned_user (struct pt_regs *regs) | |||
254 | current->thread.error_code = -3; | 254 | current->thread.error_code = -3; |
255 | printk("Unaligned memory access to %08lx in '%s' " | 255 | printk("Unaligned memory access to %08lx in '%s' " |
256 | "(pid = %d, pc = %#010lx)\n", | 256 | "(pid = %d, pc = %#010lx)\n", |
257 | regs->excvaddr, current->comm, current->pid, regs->pc); | 257 | regs->excvaddr, current->comm, task_pid_nr(current), regs->pc); |
258 | info.si_signo = SIGBUS; | 258 | info.si_signo = SIGBUS; |
259 | info.si_errno = 0; | 259 | info.si_errno = 0; |
260 | info.si_code = BUS_ADRALN; | 260 | info.si_code = BUS_ADRALN; |
diff --git a/arch/xtensa/mm/fault.c b/arch/xtensa/mm/fault.c index 2f842859948f..33f366be323f 100644 --- a/arch/xtensa/mm/fault.c +++ b/arch/xtensa/mm/fault.c | |||
@@ -145,7 +145,7 @@ bad_area: | |||
145 | */ | 145 | */ |
146 | out_of_memory: | 146 | out_of_memory: |
147 | up_read(&mm->mmap_sem); | 147 | up_read(&mm->mmap_sem); |
148 | if (is_init(current)) { | 148 | if (is_global_init(current)) { |
149 | yield(); | 149 | yield(); |
150 | down_read(&mm->mmap_sem); | 150 | down_read(&mm->mmap_sem); |
151 | goto survive; | 151 | goto survive; |
diff --git a/arch/xtensa/platform-iss/network.c b/arch/xtensa/platform-iss/network.c index f09962fa98c0..b61fb36674e7 100644 --- a/arch/xtensa/platform-iss/network.c +++ b/arch/xtensa/platform-iss/network.c | |||
@@ -798,7 +798,7 @@ static int iss_net_setup(char *str) | |||
798 | 798 | ||
799 | #undef ERR | 799 | #undef ERR |
800 | 800 | ||
801 | __setup("eth", iss_net_setup); | 801 | __setup("eth=", iss_net_setup); |
802 | 802 | ||
803 | /* | 803 | /* |
804 | * Initialize all ISS Ethernet devices previously registered in iss_net_setup. | 804 | * Initialize all ISS Ethernet devices previously registered in iss_net_setup. |