diff options
Diffstat (limited to 'arch')
138 files changed, 2176 insertions, 876 deletions
diff --git a/arch/alpha/kernel/process.c b/arch/alpha/kernel/process.c index eb20c3afff58..a8682612abc0 100644 --- a/arch/alpha/kernel/process.c +++ b/arch/alpha/kernel/process.c | |||
@@ -43,21 +43,17 @@ | |||
43 | #include "proto.h" | 43 | #include "proto.h" |
44 | #include "pci_impl.h" | 44 | #include "pci_impl.h" |
45 | 45 | ||
46 | void default_idle(void) | ||
47 | { | ||
48 | barrier(); | ||
49 | } | ||
50 | |||
51 | void | 46 | void |
52 | cpu_idle(void) | 47 | cpu_idle(void) |
53 | { | 48 | { |
49 | set_thread_flag(TIF_POLLING_NRFLAG); | ||
50 | |||
54 | while (1) { | 51 | while (1) { |
55 | void (*idle)(void) = default_idle; | ||
56 | /* FIXME -- EV6 and LCA45 know how to power down | 52 | /* FIXME -- EV6 and LCA45 know how to power down |
57 | the CPU. */ | 53 | the CPU. */ |
58 | 54 | ||
59 | while (!need_resched()) | 55 | while (!need_resched()) |
60 | idle(); | 56 | cpu_relax(); |
61 | schedule(); | 57 | schedule(); |
62 | } | 58 | } |
63 | } | 59 | } |
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 91d5ef3397be..3bfef0934c9d 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig | |||
@@ -356,6 +356,16 @@ config HOTPLUG_CPU | |||
356 | Say Y here to experiment with turning CPUs off and on. CPUs | 356 | Say Y here to experiment with turning CPUs off and on. CPUs |
357 | can be controlled through /sys/devices/system/cpu. | 357 | can be controlled through /sys/devices/system/cpu. |
358 | 358 | ||
359 | config LOCAL_TIMERS | ||
360 | bool "Use local timer interrupts" | ||
361 | depends on SMP && n | ||
362 | default y | ||
363 | help | ||
364 | Enable support for local timers on SMP platforms, rather then the | ||
365 | legacy IPI broadcast method. Local timers allows the system | ||
366 | accounting to be spread across the timer interval, preventing a | ||
367 | "thundering herd" at every timer tick. | ||
368 | |||
359 | config PREEMPT | 369 | config PREEMPT |
360 | bool "Preemptible Kernel (EXPERIMENTAL)" | 370 | bool "Preemptible Kernel (EXPERIMENTAL)" |
361 | depends on EXPERIMENTAL | 371 | depends on EXPERIMENTAL |
diff --git a/arch/arm/boot/compressed/misc.c b/arch/arm/boot/compressed/misc.c index 50f13eec6cd7..5ab94584baee 100644 --- a/arch/arm/boot/compressed/misc.c +++ b/arch/arm/boot/compressed/misc.c | |||
@@ -283,8 +283,14 @@ void flush_window(void) | |||
283 | putstr("."); | 283 | putstr("."); |
284 | } | 284 | } |
285 | 285 | ||
286 | #ifndef arch_error | ||
287 | #define arch_error(x) | ||
288 | #endif | ||
289 | |||
286 | static void error(char *x) | 290 | static void error(char *x) |
287 | { | 291 | { |
292 | arch_error(x); | ||
293 | |||
288 | putstr("\n\n"); | 294 | putstr("\n\n"); |
289 | putstr(x); | 295 | putstr(x); |
290 | putstr("\n\n -- System halted"); | 296 | putstr("\n\n -- System halted"); |
diff --git a/arch/arm/common/scoop.c b/arch/arm/common/scoop.c index bb4eff614413..c7fdf390cef9 100644 --- a/arch/arm/common/scoop.c +++ b/arch/arm/common/scoop.c | |||
@@ -19,12 +19,6 @@ | |||
19 | 19 | ||
20 | #define SCOOP_REG(d,adr) (*(volatile unsigned short*)(d +(adr))) | 20 | #define SCOOP_REG(d,adr) (*(volatile unsigned short*)(d +(adr))) |
21 | 21 | ||
22 | /* PCMCIA to Scoop linkage structures for pxa2xx_sharpsl.c | ||
23 | There is no easy way to link multiple scoop devices into one | ||
24 | single entity for the pxa2xx_pcmcia device */ | ||
25 | int scoop_num; | ||
26 | struct scoop_pcmcia_dev *scoop_devs; | ||
27 | |||
28 | struct scoop_dev { | 22 | struct scoop_dev { |
29 | void *base; | 23 | void *base; |
30 | spinlock_t scoop_lock; | 24 | spinlock_t scoop_lock; |
diff --git a/arch/arm/kernel/armksyms.c b/arch/arm/kernel/armksyms.c index 7b17a87a3311..7a3261f0bf79 100644 --- a/arch/arm/kernel/armksyms.c +++ b/arch/arm/kernel/armksyms.c | |||
@@ -9,6 +9,7 @@ | |||
9 | */ | 9 | */ |
10 | #include <linux/module.h> | 10 | #include <linux/module.h> |
11 | #include <linux/string.h> | 11 | #include <linux/string.h> |
12 | #include <linux/cryptohash.h> | ||
12 | #include <linux/delay.h> | 13 | #include <linux/delay.h> |
13 | #include <linux/in6.h> | 14 | #include <linux/in6.h> |
14 | #include <linux/syscalls.h> | 15 | #include <linux/syscalls.h> |
@@ -126,6 +127,9 @@ EXPORT_SYMBOL(__put_user_2); | |||
126 | EXPORT_SYMBOL(__put_user_4); | 127 | EXPORT_SYMBOL(__put_user_4); |
127 | EXPORT_SYMBOL(__put_user_8); | 128 | EXPORT_SYMBOL(__put_user_8); |
128 | 129 | ||
130 | /* crypto hash */ | ||
131 | EXPORT_SYMBOL(sha_transform); | ||
132 | |||
129 | /* gcc lib functions */ | 133 | /* gcc lib functions */ |
130 | EXPORT_SYMBOL(__ashldi3); | 134 | EXPORT_SYMBOL(__ashldi3); |
131 | EXPORT_SYMBOL(__ashrdi3); | 135 | EXPORT_SYMBOL(__ashrdi3); |
diff --git a/arch/arm/kernel/entry-armv.S b/arch/arm/kernel/entry-armv.S index a511ec5b11a3..d9fb819bf7cc 100644 --- a/arch/arm/kernel/entry-armv.S +++ b/arch/arm/kernel/entry-armv.S | |||
@@ -47,6 +47,13 @@ | |||
47 | movne r0, sp | 47 | movne r0, sp |
48 | adrne lr, 1b | 48 | adrne lr, 1b |
49 | bne do_IPI | 49 | bne do_IPI |
50 | |||
51 | #ifdef CONFIG_LOCAL_TIMERS | ||
52 | test_for_ltirq r0, r6, r5, lr | ||
53 | movne r0, sp | ||
54 | adrne lr, 1b | ||
55 | bne do_local_timer | ||
56 | #endif | ||
50 | #endif | 57 | #endif |
51 | 58 | ||
52 | .endm | 59 | .endm |
diff --git a/arch/arm/kernel/irq.c b/arch/arm/kernel/irq.c index 9def4404e1f2..d7099dbbb879 100644 --- a/arch/arm/kernel/irq.c +++ b/arch/arm/kernel/irq.c | |||
@@ -264,6 +264,7 @@ unlock: | |||
264 | #endif | 264 | #endif |
265 | #ifdef CONFIG_SMP | 265 | #ifdef CONFIG_SMP |
266 | show_ipi_list(p); | 266 | show_ipi_list(p); |
267 | show_local_irqs(p); | ||
267 | #endif | 268 | #endif |
268 | seq_printf(p, "Err: %10lu\n", irq_err_count); | 269 | seq_printf(p, "Err: %10lu\n", irq_err_count); |
269 | } | 270 | } |
@@ -995,7 +996,7 @@ void __init init_irq_proc(void) | |||
995 | struct proc_dir_entry *dir; | 996 | struct proc_dir_entry *dir; |
996 | int irq; | 997 | int irq; |
997 | 998 | ||
998 | dir = proc_mkdir("irq", 0); | 999 | dir = proc_mkdir("irq", NULL); |
999 | if (!dir) | 1000 | if (!dir) |
1000 | return; | 1001 | return; |
1001 | 1002 | ||
diff --git a/arch/arm/kernel/process.c b/arch/arm/kernel/process.c index ba298277becd..c0f6a119de3b 100644 --- a/arch/arm/kernel/process.c +++ b/arch/arm/kernel/process.c | |||
@@ -86,12 +86,16 @@ EXPORT_SYMBOL(pm_power_off); | |||
86 | */ | 86 | */ |
87 | void default_idle(void) | 87 | void default_idle(void) |
88 | { | 88 | { |
89 | local_irq_disable(); | 89 | if (hlt_counter) |
90 | if (!need_resched() && !hlt_counter) { | 90 | cpu_relax(); |
91 | timer_dyn_reprogram(); | 91 | else { |
92 | arch_idle(); | 92 | local_irq_disable(); |
93 | if (!need_resched()) { | ||
94 | timer_dyn_reprogram(); | ||
95 | arch_idle(); | ||
96 | } | ||
97 | local_irq_enable(); | ||
93 | } | 98 | } |
94 | local_irq_enable(); | ||
95 | } | 99 | } |
96 | 100 | ||
97 | /* | 101 | /* |
@@ -116,13 +120,13 @@ void cpu_idle(void) | |||
116 | 120 | ||
117 | if (!idle) | 121 | if (!idle) |
118 | idle = default_idle; | 122 | idle = default_idle; |
119 | preempt_disable(); | ||
120 | leds_event(led_idle_start); | 123 | leds_event(led_idle_start); |
121 | while (!need_resched()) | 124 | while (!need_resched()) |
122 | idle(); | 125 | idle(); |
123 | leds_event(led_idle_end); | 126 | leds_event(led_idle_end); |
124 | preempt_enable(); | 127 | preempt_enable_no_resched(); |
125 | schedule(); | 128 | schedule(); |
129 | preempt_disable(); | ||
126 | } | 130 | } |
127 | } | 131 | } |
128 | 132 | ||
diff --git a/arch/arm/kernel/smp.c b/arch/arm/kernel/smp.c index edb5a406922f..e55ea952f7aa 100644 --- a/arch/arm/kernel/smp.c +++ b/arch/arm/kernel/smp.c | |||
@@ -142,7 +142,7 @@ int __cpuinit __cpu_up(unsigned int cpu) | |||
142 | ret = -EIO; | 142 | ret = -EIO; |
143 | } | 143 | } |
144 | 144 | ||
145 | secondary_data.stack = 0; | 145 | secondary_data.stack = NULL; |
146 | secondary_data.pgdir = 0; | 146 | secondary_data.pgdir = 0; |
147 | 147 | ||
148 | *pmd_offset(pgd, PHYS_OFFSET) = __pmd(0); | 148 | *pmd_offset(pgd, PHYS_OFFSET) = __pmd(0); |
@@ -185,6 +185,11 @@ int __cpuexit __cpu_disable(void) | |||
185 | migrate_irqs(); | 185 | migrate_irqs(); |
186 | 186 | ||
187 | /* | 187 | /* |
188 | * Stop the local timer for this CPU. | ||
189 | */ | ||
190 | local_timer_stop(cpu); | ||
191 | |||
192 | /* | ||
188 | * Flush user cache and TLB mappings, and then remove this CPU | 193 | * Flush user cache and TLB mappings, and then remove this CPU |
189 | * from the vm mask set of all processes. | 194 | * from the vm mask set of all processes. |
190 | */ | 195 | */ |
@@ -251,7 +256,9 @@ void __cpuexit cpu_die(void) | |||
251 | asmlinkage void __cpuinit secondary_start_kernel(void) | 256 | asmlinkage void __cpuinit secondary_start_kernel(void) |
252 | { | 257 | { |
253 | struct mm_struct *mm = &init_mm; | 258 | struct mm_struct *mm = &init_mm; |
254 | unsigned int cpu = smp_processor_id(); | 259 | unsigned int cpu; |
260 | |||
261 | cpu = smp_processor_id(); | ||
255 | 262 | ||
256 | printk("CPU%u: Booted secondary processor\n", cpu); | 263 | printk("CPU%u: Booted secondary processor\n", cpu); |
257 | 264 | ||
@@ -268,6 +275,7 @@ asmlinkage void __cpuinit secondary_start_kernel(void) | |||
268 | local_flush_tlb_all(); | 275 | local_flush_tlb_all(); |
269 | 276 | ||
270 | cpu_init(); | 277 | cpu_init(); |
278 | preempt_disable(); | ||
271 | 279 | ||
272 | /* | 280 | /* |
273 | * Give the platform a chance to do its own initialisation. | 281 | * Give the platform a chance to do its own initialisation. |
@@ -290,6 +298,11 @@ asmlinkage void __cpuinit secondary_start_kernel(void) | |||
290 | cpu_set(cpu, cpu_online_map); | 298 | cpu_set(cpu, cpu_online_map); |
291 | 299 | ||
292 | /* | 300 | /* |
301 | * Setup local timer for this CPU. | ||
302 | */ | ||
303 | local_timer_setup(cpu); | ||
304 | |||
305 | /* | ||
293 | * OK, it's off to the idle thread for us | 306 | * OK, it's off to the idle thread for us |
294 | */ | 307 | */ |
295 | cpu_idle(); | 308 | cpu_idle(); |
@@ -359,8 +372,8 @@ static void send_ipi_message(cpumask_t callmap, enum ipi_msg_type msg) | |||
359 | * You must not call this function with disabled interrupts, from a | 372 | * You must not call this function with disabled interrupts, from a |
360 | * hardware interrupt handler, nor from a bottom half handler. | 373 | * hardware interrupt handler, nor from a bottom half handler. |
361 | */ | 374 | */ |
362 | int smp_call_function_on_cpu(void (*func)(void *info), void *info, int retry, | 375 | static int smp_call_function_on_cpu(void (*func)(void *info), void *info, |
363 | int wait, cpumask_t callmap) | 376 | int retry, int wait, cpumask_t callmap) |
364 | { | 377 | { |
365 | struct smp_call_struct data; | 378 | struct smp_call_struct data; |
366 | unsigned long timeout; | 379 | unsigned long timeout; |
@@ -454,6 +467,18 @@ void show_ipi_list(struct seq_file *p) | |||
454 | seq_putc(p, '\n'); | 467 | seq_putc(p, '\n'); |
455 | } | 468 | } |
456 | 469 | ||
470 | void show_local_irqs(struct seq_file *p) | ||
471 | { | ||
472 | unsigned int cpu; | ||
473 | |||
474 | seq_printf(p, "LOC: "); | ||
475 | |||
476 | for_each_present_cpu(cpu) | ||
477 | seq_printf(p, "%10u ", irq_stat[cpu].local_timer_irqs); | ||
478 | |||
479 | seq_putc(p, '\n'); | ||
480 | } | ||
481 | |||
457 | static void ipi_timer(struct pt_regs *regs) | 482 | static void ipi_timer(struct pt_regs *regs) |
458 | { | 483 | { |
459 | int user = user_mode(regs); | 484 | int user = user_mode(regs); |
@@ -464,6 +489,18 @@ static void ipi_timer(struct pt_regs *regs) | |||
464 | irq_exit(); | 489 | irq_exit(); |
465 | } | 490 | } |
466 | 491 | ||
492 | #ifdef CONFIG_LOCAL_TIMERS | ||
493 | asmlinkage void do_local_timer(struct pt_regs *regs) | ||
494 | { | ||
495 | int cpu = smp_processor_id(); | ||
496 | |||
497 | if (local_timer_ack()) { | ||
498 | irq_stat[cpu].local_timer_irqs++; | ||
499 | ipi_timer(regs); | ||
500 | } | ||
501 | } | ||
502 | #endif | ||
503 | |||
467 | /* | 504 | /* |
468 | * ipi_call_function - handle IPI from smp_call_function() | 505 | * ipi_call_function - handle IPI from smp_call_function() |
469 | * | 506 | * |
@@ -515,7 +552,7 @@ static void ipi_cpu_stop(unsigned int cpu) | |||
515 | * | 552 | * |
516 | * Bit 0 - Inter-processor function call | 553 | * Bit 0 - Inter-processor function call |
517 | */ | 554 | */ |
518 | void do_IPI(struct pt_regs *regs) | 555 | asmlinkage void do_IPI(struct pt_regs *regs) |
519 | { | 556 | { |
520 | unsigned int cpu = smp_processor_id(); | 557 | unsigned int cpu = smp_processor_id(); |
521 | struct ipi_data *ipi = &per_cpu(ipi_data, cpu); | 558 | struct ipi_data *ipi = &per_cpu(ipi_data, cpu); |
diff --git a/arch/arm/mach-omap1/leds-h2p2-debug.c b/arch/arm/mach-omap1/leds-h2p2-debug.c index be283cda63dd..399010c14036 100644 --- a/arch/arm/mach-omap1/leds-h2p2-debug.c +++ b/arch/arm/mach-omap1/leds-h2p2-debug.c | |||
@@ -13,7 +13,6 @@ | |||
13 | #include <linux/init.h> | 13 | #include <linux/init.h> |
14 | #include <linux/kernel_stat.h> | 14 | #include <linux/kernel_stat.h> |
15 | #include <linux/sched.h> | 15 | #include <linux/sched.h> |
16 | #include <linux/version.h> | ||
17 | 16 | ||
18 | #include <asm/io.h> | 17 | #include <asm/io.h> |
19 | #include <asm/hardware.h> | 18 | #include <asm/hardware.h> |
diff --git a/arch/arm/mach-pxa/corgi.c b/arch/arm/mach-pxa/corgi.c index eb5f6d744a4a..100fb31b5156 100644 --- a/arch/arm/mach-pxa/corgi.c +++ b/arch/arm/mach-pxa/corgi.c | |||
@@ -62,6 +62,37 @@ static struct scoop_config corgi_scoop_setup = { | |||
62 | .io_out = CORGI_SCOOP_IO_OUT, | 62 | .io_out = CORGI_SCOOP_IO_OUT, |
63 | }; | 63 | }; |
64 | 64 | ||
65 | struct platform_device corgiscoop_device = { | ||
66 | .name = "sharp-scoop", | ||
67 | .id = -1, | ||
68 | .dev = { | ||
69 | .platform_data = &corgi_scoop_setup, | ||
70 | }, | ||
71 | .num_resources = ARRAY_SIZE(corgi_scoop_resources), | ||
72 | .resource = corgi_scoop_resources, | ||
73 | }; | ||
74 | |||
75 | static void corgi_pcmcia_init(void) | ||
76 | { | ||
77 | /* Setup default state of GPIO outputs | ||
78 | before we enable them as outputs. */ | ||
79 | GPSR(GPIO48_nPOE) = GPIO_bit(GPIO48_nPOE) | | ||
80 | GPIO_bit(GPIO49_nPWE) | GPIO_bit(GPIO50_nPIOR) | | ||
81 | GPIO_bit(GPIO51_nPIOW) | GPIO_bit(GPIO52_nPCE_1) | | ||
82 | GPIO_bit(GPIO53_nPCE_2); | ||
83 | |||
84 | pxa_gpio_mode(GPIO48_nPOE_MD); | ||
85 | pxa_gpio_mode(GPIO49_nPWE_MD); | ||
86 | pxa_gpio_mode(GPIO50_nPIOR_MD); | ||
87 | pxa_gpio_mode(GPIO51_nPIOW_MD); | ||
88 | pxa_gpio_mode(GPIO55_nPREG_MD); | ||
89 | pxa_gpio_mode(GPIO56_nPWAIT_MD); | ||
90 | pxa_gpio_mode(GPIO57_nIOIS16_MD); | ||
91 | pxa_gpio_mode(GPIO52_nPCE_1_MD); | ||
92 | pxa_gpio_mode(GPIO53_nPCE_2_MD); | ||
93 | pxa_gpio_mode(GPIO54_pSKTSEL_MD); | ||
94 | } | ||
95 | |||
65 | static struct scoop_pcmcia_dev corgi_pcmcia_scoop[] = { | 96 | static struct scoop_pcmcia_dev corgi_pcmcia_scoop[] = { |
66 | { | 97 | { |
67 | .dev = &corgiscoop_device.dev, | 98 | .dev = &corgiscoop_device.dev, |
@@ -71,16 +102,14 @@ static struct scoop_pcmcia_dev corgi_pcmcia_scoop[] = { | |||
71 | }, | 102 | }, |
72 | }; | 103 | }; |
73 | 104 | ||
74 | struct platform_device corgiscoop_device = { | 105 | static struct scoop_pcmcia_config corgi_pcmcia_config = { |
75 | .name = "sharp-scoop", | 106 | .devs = &corgi_pcmcia_scoop[0], |
76 | .id = -1, | 107 | .num_devs = 1, |
77 | .dev = { | 108 | .pcmcia_init = corgi_pcmcia_init, |
78 | .platform_data = &corgi_scoop_setup, | ||
79 | }, | ||
80 | .num_resources = ARRAY_SIZE(corgi_scoop_resources), | ||
81 | .resource = corgi_scoop_resources, | ||
82 | }; | 109 | }; |
83 | 110 | ||
111 | EXPORT_SYMBOL(corgiscoop_device); | ||
112 | |||
84 | 113 | ||
85 | /* | 114 | /* |
86 | * Corgi SSP Device | 115 | * Corgi SSP Device |
@@ -294,8 +323,7 @@ static void __init corgi_init(void) | |||
294 | pxa_set_mci_info(&corgi_mci_platform_data); | 323 | pxa_set_mci_info(&corgi_mci_platform_data); |
295 | pxa_set_ficp_info(&corgi_ficp_platform_data); | 324 | pxa_set_ficp_info(&corgi_ficp_platform_data); |
296 | 325 | ||
297 | scoop_num = 1; | 326 | platform_scoop_config = &corgi_pcmcia_config; |
298 | scoop_devs = &corgi_pcmcia_scoop[0]; | ||
299 | 327 | ||
300 | platform_add_devices(devices, ARRAY_SIZE(devices)); | 328 | platform_add_devices(devices, ARRAY_SIZE(devices)); |
301 | } | 329 | } |
diff --git a/arch/arm/mach-pxa/poodle.c b/arch/arm/mach-pxa/poodle.c index ad6a13f95a62..eef3de26ad37 100644 --- a/arch/arm/mach-pxa/poodle.c +++ b/arch/arm/mach-pxa/poodle.c | |||
@@ -65,6 +65,27 @@ struct platform_device poodle_scoop_device = { | |||
65 | .resource = poodle_scoop_resources, | 65 | .resource = poodle_scoop_resources, |
66 | }; | 66 | }; |
67 | 67 | ||
68 | static void poodle_pcmcia_init(void) | ||
69 | { | ||
70 | /* Setup default state of GPIO outputs | ||
71 | before we enable them as outputs. */ | ||
72 | GPSR(GPIO48_nPOE) = GPIO_bit(GPIO48_nPOE) | | ||
73 | GPIO_bit(GPIO49_nPWE) | GPIO_bit(GPIO50_nPIOR) | | ||
74 | GPIO_bit(GPIO51_nPIOW) | GPIO_bit(GPIO52_nPCE_1) | | ||
75 | GPIO_bit(GPIO53_nPCE_2); | ||
76 | |||
77 | pxa_gpio_mode(GPIO48_nPOE_MD); | ||
78 | pxa_gpio_mode(GPIO49_nPWE_MD); | ||
79 | pxa_gpio_mode(GPIO50_nPIOR_MD); | ||
80 | pxa_gpio_mode(GPIO51_nPIOW_MD); | ||
81 | pxa_gpio_mode(GPIO55_nPREG_MD); | ||
82 | pxa_gpio_mode(GPIO56_nPWAIT_MD); | ||
83 | pxa_gpio_mode(GPIO57_nIOIS16_MD); | ||
84 | pxa_gpio_mode(GPIO52_nPCE_1_MD); | ||
85 | pxa_gpio_mode(GPIO53_nPCE_2_MD); | ||
86 | pxa_gpio_mode(GPIO54_pSKTSEL_MD); | ||
87 | } | ||
88 | |||
68 | static struct scoop_pcmcia_dev poodle_pcmcia_scoop[] = { | 89 | static struct scoop_pcmcia_dev poodle_pcmcia_scoop[] = { |
69 | { | 90 | { |
70 | .dev = &poodle_scoop_device.dev, | 91 | .dev = &poodle_scoop_device.dev, |
@@ -74,6 +95,14 @@ static struct scoop_pcmcia_dev poodle_pcmcia_scoop[] = { | |||
74 | }, | 95 | }, |
75 | }; | 96 | }; |
76 | 97 | ||
98 | static struct scoop_pcmcia_config poodle_pcmcia_config = { | ||
99 | .devs = &poodle_pcmcia_scoop[0], | ||
100 | .num_devs = 1, | ||
101 | .pcmcia_init = poodle_pcmcia_init, | ||
102 | }; | ||
103 | |||
104 | EXPORT_SYMBOL(poodle_scoop_device); | ||
105 | |||
77 | 106 | ||
78 | /* LoCoMo device */ | 107 | /* LoCoMo device */ |
79 | static struct resource locomo_resources[] = { | 108 | static struct resource locomo_resources[] = { |
@@ -268,8 +297,7 @@ static void __init poodle_init(void) | |||
268 | pxa_set_mci_info(&poodle_mci_platform_data); | 297 | pxa_set_mci_info(&poodle_mci_platform_data); |
269 | pxa_set_ficp_info(&poodle_ficp_platform_data); | 298 | pxa_set_ficp_info(&poodle_ficp_platform_data); |
270 | 299 | ||
271 | scoop_num = 1; | 300 | platform_scoop_config = &poodle_pcmcia_config; |
272 | scoop_devs = &poodle_pcmcia_scoop[0]; | ||
273 | 301 | ||
274 | ret = platform_add_devices(devices, ARRAY_SIZE(devices)); | 302 | ret = platform_add_devices(devices, ARRAY_SIZE(devices)); |
275 | if (ret) { | 303 | if (ret) { |
diff --git a/arch/arm/mach-pxa/spitz.c b/arch/arm/mach-pxa/spitz.c index 6c6878cd2207..4e9a699ee428 100644 --- a/arch/arm/mach-pxa/spitz.c +++ b/arch/arm/mach-pxa/spitz.c | |||
@@ -104,6 +104,66 @@ struct platform_device spitzscoop2_device = { | |||
104 | .resource = spitz_scoop2_resources, | 104 | .resource = spitz_scoop2_resources, |
105 | }; | 105 | }; |
106 | 106 | ||
107 | #define SPITZ_PWR_SD 0x01 | ||
108 | #define SPITZ_PWR_CF 0x02 | ||
109 | |||
110 | /* Power control is shared with between one of the CF slots and SD */ | ||
111 | static void spitz_card_pwr_ctrl(int device, unsigned short new_cpr) | ||
112 | { | ||
113 | unsigned short cpr = read_scoop_reg(&spitzscoop_device.dev, SCOOP_CPR); | ||
114 | |||
115 | if (new_cpr & 0x0007) { | ||
116 | set_scoop_gpio(&spitzscoop_device.dev, SPITZ_SCP_CF_POWER); | ||
117 | if (!(cpr & 0x0002) && !(cpr & 0x0004)) | ||
118 | mdelay(5); | ||
119 | if (device == SPITZ_PWR_CF) | ||
120 | cpr |= 0x0002; | ||
121 | if (device == SPITZ_PWR_SD) | ||
122 | cpr |= 0x0004; | ||
123 | write_scoop_reg(&spitzscoop_device.dev, SCOOP_CPR, cpr | new_cpr); | ||
124 | } else { | ||
125 | if (device == SPITZ_PWR_CF) | ||
126 | cpr &= ~0x0002; | ||
127 | if (device == SPITZ_PWR_SD) | ||
128 | cpr &= ~0x0004; | ||
129 | write_scoop_reg(&spitzscoop_device.dev, SCOOP_CPR, cpr | new_cpr); | ||
130 | if (!(cpr & 0x0002) && !(cpr & 0x0004)) { | ||
131 | mdelay(1); | ||
132 | reset_scoop_gpio(&spitzscoop_device.dev, SPITZ_SCP_CF_POWER); | ||
133 | } | ||
134 | } | ||
135 | } | ||
136 | |||
137 | static void spitz_pcmcia_init(void) | ||
138 | { | ||
139 | /* Setup default state of GPIO outputs | ||
140 | before we enable them as outputs. */ | ||
141 | GPSR(GPIO48_nPOE) = GPIO_bit(GPIO48_nPOE) | | ||
142 | GPIO_bit(GPIO49_nPWE) | GPIO_bit(GPIO50_nPIOR) | | ||
143 | GPIO_bit(GPIO51_nPIOW) | GPIO_bit(GPIO54_nPCE_2); | ||
144 | GPSR(GPIO85_nPCE_1) = GPIO_bit(GPIO85_nPCE_1); | ||
145 | |||
146 | pxa_gpio_mode(GPIO48_nPOE_MD); | ||
147 | pxa_gpio_mode(GPIO49_nPWE_MD); | ||
148 | pxa_gpio_mode(GPIO50_nPIOR_MD); | ||
149 | pxa_gpio_mode(GPIO51_nPIOW_MD); | ||
150 | pxa_gpio_mode(GPIO55_nPREG_MD); | ||
151 | pxa_gpio_mode(GPIO56_nPWAIT_MD); | ||
152 | pxa_gpio_mode(GPIO57_nIOIS16_MD); | ||
153 | pxa_gpio_mode(GPIO85_nPCE_1_MD); | ||
154 | pxa_gpio_mode(GPIO54_nPCE_2_MD); | ||
155 | pxa_gpio_mode(GPIO104_pSKTSEL_MD); | ||
156 | } | ||
157 | |||
158 | static void spitz_pcmcia_pwr(struct device *scoop, unsigned short cpr, int nr) | ||
159 | { | ||
160 | /* Only need to override behaviour for slot 0 */ | ||
161 | if (nr == 0) | ||
162 | spitz_card_pwr_ctrl(SPITZ_PWR_CF, cpr); | ||
163 | else | ||
164 | write_scoop_reg(scoop, SCOOP_CPR, cpr); | ||
165 | } | ||
166 | |||
107 | static struct scoop_pcmcia_dev spitz_pcmcia_scoop[] = { | 167 | static struct scoop_pcmcia_dev spitz_pcmcia_scoop[] = { |
108 | { | 168 | { |
109 | .dev = &spitzscoop_device.dev, | 169 | .dev = &spitzscoop_device.dev, |
@@ -117,6 +177,16 @@ static struct scoop_pcmcia_dev spitz_pcmcia_scoop[] = { | |||
117 | }, | 177 | }, |
118 | }; | 178 | }; |
119 | 179 | ||
180 | static struct scoop_pcmcia_config spitz_pcmcia_config = { | ||
181 | .devs = &spitz_pcmcia_scoop[0], | ||
182 | .num_devs = 2, | ||
183 | .pcmcia_init = spitz_pcmcia_init, | ||
184 | .power_ctrl = spitz_pcmcia_pwr, | ||
185 | }; | ||
186 | |||
187 | EXPORT_SYMBOL(spitzscoop_device); | ||
188 | EXPORT_SYMBOL(spitzscoop2_device); | ||
189 | |||
120 | 190 | ||
121 | /* | 191 | /* |
122 | * Spitz SSP Device | 192 | * Spitz SSP Device |
@@ -235,27 +305,14 @@ static int spitz_mci_init(struct device *dev, irqreturn_t (*spitz_detect_int)(in | |||
235 | return 0; | 305 | return 0; |
236 | } | 306 | } |
237 | 307 | ||
238 | /* Power control is shared with one of the CF slots so we have a mess */ | ||
239 | static void spitz_mci_setpower(struct device *dev, unsigned int vdd) | 308 | static void spitz_mci_setpower(struct device *dev, unsigned int vdd) |
240 | { | 309 | { |
241 | struct pxamci_platform_data* p_d = dev->platform_data; | 310 | struct pxamci_platform_data* p_d = dev->platform_data; |
242 | 311 | ||
243 | unsigned short cpr = read_scoop_reg(&spitzscoop_device.dev, SCOOP_CPR); | 312 | if (( 1 << vdd) & p_d->ocr_mask) |
244 | 313 | spitz_card_pwr_ctrl(SPITZ_PWR_SD, 0x0004); | |
245 | if (( 1 << vdd) & p_d->ocr_mask) { | 314 | else |
246 | /* printk(KERN_DEBUG "%s: on\n", __FUNCTION__); */ | 315 | spitz_card_pwr_ctrl(SPITZ_PWR_SD, 0x0000); |
247 | set_scoop_gpio(&spitzscoop_device.dev, SPITZ_SCP_CF_POWER); | ||
248 | mdelay(2); | ||
249 | write_scoop_reg(&spitzscoop_device.dev, SCOOP_CPR, cpr | 0x04); | ||
250 | } else { | ||
251 | /* printk(KERN_DEBUG "%s: off\n", __FUNCTION__); */ | ||
252 | write_scoop_reg(&spitzscoop_device.dev, SCOOP_CPR, cpr & ~0x04); | ||
253 | |||
254 | if (!(cpr | 0x02)) { | ||
255 | mdelay(1); | ||
256 | reset_scoop_gpio(&spitzscoop_device.dev, SPITZ_SCP_CF_POWER); | ||
257 | } | ||
258 | } | ||
259 | } | 316 | } |
260 | 317 | ||
261 | static int spitz_mci_get_ro(struct device *dev) | 318 | static int spitz_mci_get_ro(struct device *dev) |
@@ -351,8 +408,8 @@ static void __init common_init(void) | |||
351 | 408 | ||
352 | static void __init spitz_init(void) | 409 | static void __init spitz_init(void) |
353 | { | 410 | { |
354 | scoop_num = 2; | 411 | platform_scoop_config = &spitz_pcmcia_config; |
355 | scoop_devs = &spitz_pcmcia_scoop[0]; | 412 | |
356 | spitz_bl_machinfo.set_bl_intensity = spitz_bl_set_intensity; | 413 | spitz_bl_machinfo.set_bl_intensity = spitz_bl_set_intensity; |
357 | 414 | ||
358 | common_init(); | 415 | common_init(); |
diff --git a/arch/arm/mach-pxa/time.c b/arch/arm/mach-pxa/time.c index 7dad3f1465e0..b9b2057349eb 100644 --- a/arch/arm/mach-pxa/time.c +++ b/arch/arm/mach-pxa/time.c | |||
@@ -132,11 +132,13 @@ static void __init pxa_timer_init(void) | |||
132 | tv.tv_sec = pxa_get_rtc_time(); | 132 | tv.tv_sec = pxa_get_rtc_time(); |
133 | do_settimeofday(&tv); | 133 | do_settimeofday(&tv); |
134 | 134 | ||
135 | OSMR0 = 0; /* set initial match at 0 */ | 135 | OIER = 0; /* disable any timer interrupts */ |
136 | OSCR = LATCH*2; /* push OSCR out of the way */ | ||
137 | OSMR0 = LATCH; /* set initial match */ | ||
136 | OSSR = 0xf; /* clear status on all timers */ | 138 | OSSR = 0xf; /* clear status on all timers */ |
137 | setup_irq(IRQ_OST0, &pxa_timer_irq); | 139 | setup_irq(IRQ_OST0, &pxa_timer_irq); |
138 | OIER |= OIER_E0; /* enable match on timer 0 to cause interrupts */ | 140 | OIER = OIER_E0; /* enable match on timer 0 to cause interrupts */ |
139 | OSCR = 0; /* initialize free-running timer, force first match */ | 141 | OSCR = 0; /* initialize free-running timer */ |
140 | } | 142 | } |
141 | 143 | ||
142 | #ifdef CONFIG_NO_IDLE_HZ | 144 | #ifdef CONFIG_NO_IDLE_HZ |
diff --git a/arch/arm/mach-pxa/tosa.c b/arch/arm/mach-pxa/tosa.c index 400609f8b6a8..c312054dfb88 100644 --- a/arch/arm/mach-pxa/tosa.c +++ b/arch/arm/mach-pxa/tosa.c | |||
@@ -98,6 +98,9 @@ struct platform_device tosascoop_jc_device = { | |||
98 | .resource = tosa_scoop_jc_resources, | 98 | .resource = tosa_scoop_jc_resources, |
99 | }; | 99 | }; |
100 | 100 | ||
101 | /* | ||
102 | * PCMCIA | ||
103 | */ | ||
101 | static struct scoop_pcmcia_dev tosa_pcmcia_scoop[] = { | 104 | static struct scoop_pcmcia_dev tosa_pcmcia_scoop[] = { |
102 | { | 105 | { |
103 | .dev = &tosascoop_device.dev, | 106 | .dev = &tosascoop_device.dev, |
@@ -111,16 +114,155 @@ static struct scoop_pcmcia_dev tosa_pcmcia_scoop[] = { | |||
111 | }, | 114 | }, |
112 | }; | 115 | }; |
113 | 116 | ||
117 | static void tosa_pcmcia_init(void) | ||
118 | { | ||
119 | /* Setup default state of GPIO outputs | ||
120 | before we enable them as outputs. */ | ||
121 | GPSR(GPIO48_nPOE) = GPIO_bit(GPIO48_nPOE) | | ||
122 | GPIO_bit(GPIO49_nPWE) | GPIO_bit(GPIO50_nPIOR) | | ||
123 | GPIO_bit(GPIO51_nPIOW) | GPIO_bit(GPIO52_nPCE_1) | | ||
124 | GPIO_bit(GPIO53_nPCE_2); | ||
125 | |||
126 | pxa_gpio_mode(GPIO48_nPOE_MD); | ||
127 | pxa_gpio_mode(GPIO49_nPWE_MD); | ||
128 | pxa_gpio_mode(GPIO50_nPIOR_MD); | ||
129 | pxa_gpio_mode(GPIO51_nPIOW_MD); | ||
130 | pxa_gpio_mode(GPIO55_nPREG_MD); | ||
131 | pxa_gpio_mode(GPIO56_nPWAIT_MD); | ||
132 | pxa_gpio_mode(GPIO57_nIOIS16_MD); | ||
133 | pxa_gpio_mode(GPIO52_nPCE_1_MD); | ||
134 | pxa_gpio_mode(GPIO53_nPCE_2_MD); | ||
135 | pxa_gpio_mode(GPIO54_pSKTSEL_MD); | ||
136 | } | ||
137 | |||
138 | static struct scoop_pcmcia_config tosa_pcmcia_config = { | ||
139 | .devs = &tosa_pcmcia_scoop[0], | ||
140 | .num_devs = 2, | ||
141 | .pcmcia_init = tosa_pcmcia_init, | ||
142 | }; | ||
143 | |||
144 | /* | ||
145 | * USB Device Controller | ||
146 | */ | ||
147 | static void tosa_udc_command(int cmd) | ||
148 | { | ||
149 | switch(cmd) { | ||
150 | case PXA2XX_UDC_CMD_CONNECT: | ||
151 | set_scoop_gpio(&tosascoop_jc_device.dev,TOSA_SCOOP_JC_USB_PULLUP); | ||
152 | break; | ||
153 | case PXA2XX_UDC_CMD_DISCONNECT: | ||
154 | reset_scoop_gpio(&tosascoop_jc_device.dev,TOSA_SCOOP_JC_USB_PULLUP); | ||
155 | break; | ||
156 | } | ||
157 | } | ||
158 | |||
159 | static int tosa_udc_is_connected(void) | ||
160 | { | ||
161 | return ((GPLR(TOSA_GPIO_USB_IN) & GPIO_bit(TOSA_GPIO_USB_IN)) == 0); | ||
162 | } | ||
163 | |||
164 | |||
165 | static struct pxa2xx_udc_mach_info udc_info __initdata = { | ||
166 | .udc_command = tosa_udc_command, | ||
167 | .udc_is_connected = tosa_udc_is_connected, | ||
168 | }; | ||
169 | |||
170 | /* | ||
171 | * MMC/SD Device | ||
172 | */ | ||
173 | static struct pxamci_platform_data tosa_mci_platform_data; | ||
174 | |||
175 | static int tosa_mci_init(struct device *dev, irqreturn_t (*tosa_detect_int)(int, void *, struct pt_regs *), void *data) | ||
176 | { | ||
177 | int err; | ||
178 | |||
179 | /* setup GPIO for PXA25x MMC controller */ | ||
180 | pxa_gpio_mode(GPIO6_MMCCLK_MD); | ||
181 | pxa_gpio_mode(GPIO8_MMCCS0_MD); | ||
182 | pxa_gpio_mode(TOSA_GPIO_nSD_DETECT | GPIO_IN); | ||
183 | |||
184 | tosa_mci_platform_data.detect_delay = msecs_to_jiffies(250); | ||
185 | |||
186 | err = request_irq(TOSA_IRQ_GPIO_nSD_DETECT, tosa_detect_int, SA_INTERRUPT, | ||
187 | "MMC/SD card detect", data); | ||
188 | if (err) { | ||
189 | printk(KERN_ERR "tosa_mci_init: MMC/SD: can't request MMC card detect IRQ\n"); | ||
190 | return -1; | ||
191 | } | ||
192 | |||
193 | set_irq_type(TOSA_IRQ_GPIO_nSD_DETECT, IRQT_BOTHEDGE); | ||
194 | |||
195 | return 0; | ||
196 | } | ||
197 | |||
198 | static void tosa_mci_setpower(struct device *dev, unsigned int vdd) | ||
199 | { | ||
200 | struct pxamci_platform_data* p_d = dev->platform_data; | ||
201 | |||
202 | if (( 1 << vdd) & p_d->ocr_mask) { | ||
203 | set_scoop_gpio(&tosascoop_device.dev,TOSA_SCOOP_PWR_ON); | ||
204 | } else { | ||
205 | reset_scoop_gpio(&tosascoop_device.dev,TOSA_SCOOP_PWR_ON); | ||
206 | } | ||
207 | } | ||
208 | |||
209 | static int tosa_mci_get_ro(struct device *dev) | ||
210 | { | ||
211 | return (read_scoop_reg(&tosascoop_device.dev, SCOOP_GPWR)&TOSA_SCOOP_SD_WP); | ||
212 | } | ||
213 | |||
214 | static void tosa_mci_exit(struct device *dev, void *data) | ||
215 | { | ||
216 | free_irq(TOSA_IRQ_GPIO_nSD_DETECT, data); | ||
217 | } | ||
218 | |||
219 | static struct pxamci_platform_data tosa_mci_platform_data = { | ||
220 | .ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34, | ||
221 | .init = tosa_mci_init, | ||
222 | .get_ro = tosa_mci_get_ro, | ||
223 | .setpower = tosa_mci_setpower, | ||
224 | .exit = tosa_mci_exit, | ||
225 | }; | ||
226 | |||
227 | /* | ||
228 | * Irda | ||
229 | */ | ||
230 | static void tosa_irda_transceiver_mode(struct device *dev, int mode) | ||
231 | { | ||
232 | if (mode & IR_OFF) { | ||
233 | reset_scoop_gpio(&tosascoop_device.dev,TOSA_SCOOP_IR_POWERDWN); | ||
234 | pxa_gpio_mode(GPIO47_STTXD|GPIO_DFLT_LOW); | ||
235 | pxa_gpio_mode(GPIO47_STTXD|GPIO_OUT); | ||
236 | } else { | ||
237 | pxa_gpio_mode(GPIO47_STTXD_MD); | ||
238 | set_scoop_gpio(&tosascoop_device.dev,TOSA_SCOOP_IR_POWERDWN); | ||
239 | } | ||
240 | } | ||
241 | |||
242 | static struct pxaficp_platform_data tosa_ficp_platform_data = { | ||
243 | .transceiver_cap = IR_SIRMODE | IR_OFF, | ||
244 | .transceiver_mode = tosa_irda_transceiver_mode, | ||
245 | }; | ||
246 | |||
247 | /* | ||
248 | * Tosa Keyboard | ||
249 | */ | ||
250 | static struct platform_device tosakbd_device = { | ||
251 | .name = "tosa-keyboard", | ||
252 | .id = -1, | ||
253 | }; | ||
114 | 254 | ||
115 | static struct platform_device *devices[] __initdata = { | 255 | static struct platform_device *devices[] __initdata = { |
116 | &tosascoop_device, | 256 | &tosascoop_device, |
117 | &tosascoop_jc_device, | 257 | &tosascoop_jc_device, |
258 | &tosakbd_device, | ||
118 | }; | 259 | }; |
119 | 260 | ||
120 | static void __init tosa_init(void) | 261 | static void __init tosa_init(void) |
121 | { | 262 | { |
122 | pxa_gpio_mode(TOSA_GPIO_ON_RESET | GPIO_IN); | 263 | pxa_gpio_mode(TOSA_GPIO_ON_RESET | GPIO_IN); |
123 | pxa_gpio_mode(TOSA_GPIO_TC6393_INT | GPIO_IN); | 264 | pxa_gpio_mode(TOSA_GPIO_TC6393_INT | GPIO_IN); |
265 | pxa_gpio_mode(TOSA_GPIO_USB_IN | GPIO_IN); | ||
124 | 266 | ||
125 | /* setup sleep mode values */ | 267 | /* setup sleep mode values */ |
126 | PWER = 0x00000002; | 268 | PWER = 0x00000002; |
@@ -131,13 +273,15 @@ static void __init tosa_init(void) | |||
131 | PGSR2 = 0x00014000; | 273 | PGSR2 = 0x00014000; |
132 | PCFR |= PCFR_OPDE; | 274 | PCFR |= PCFR_OPDE; |
133 | 275 | ||
134 | // enable batt_fault | 276 | /* enable batt_fault */ |
135 | PMCR = 0x01; | 277 | PMCR = 0x01; |
136 | 278 | ||
137 | platform_add_devices(devices, ARRAY_SIZE(devices)); | 279 | pxa_set_mci_info(&tosa_mci_platform_data); |
280 | pxa_set_udc_info(&udc_info); | ||
281 | pxa_set_ficp_info(&tosa_ficp_platform_data); | ||
282 | platform_scoop_config = &tosa_pcmcia_config; | ||
138 | 283 | ||
139 | scoop_num = 2; | 284 | platform_add_devices(devices, ARRAY_SIZE(devices)); |
140 | scoop_devs = &tosa_pcmcia_scoop[0]; | ||
141 | } | 285 | } |
142 | 286 | ||
143 | static void __init fixup_tosa(struct machine_desc *desc, | 287 | static void __init fixup_tosa(struct machine_desc *desc, |
diff --git a/arch/arm/mach-realview/core.c b/arch/arm/mach-realview/core.c index 482eb512ebe8..4ea60d8b6e36 100644 --- a/arch/arm/mach-realview/core.c +++ b/arch/arm/mach-realview/core.c | |||
@@ -550,6 +550,11 @@ static irqreturn_t realview_timer_interrupt(int irq, void *dev_id, struct pt_reg | |||
550 | 550 | ||
551 | timer_tick(regs); | 551 | timer_tick(regs); |
552 | 552 | ||
553 | #ifdef CONFIG_SMP | ||
554 | smp_send_timer(); | ||
555 | update_process_times(user_mode(regs)); | ||
556 | #endif | ||
557 | |||
553 | write_sequnlock(&xtime_lock); | 558 | write_sequnlock(&xtime_lock); |
554 | 559 | ||
555 | return IRQ_HANDLED; | 560 | return IRQ_HANDLED; |
diff --git a/arch/arm/mach-realview/platsmp.c b/arch/arm/mach-realview/platsmp.c index 9844644d0fb5..09b35f62247a 100644 --- a/arch/arm/mach-realview/platsmp.c +++ b/arch/arm/mach-realview/platsmp.c | |||
@@ -32,7 +32,7 @@ static unsigned int __init get_core_count(void) | |||
32 | { | 32 | { |
33 | unsigned int ncores; | 33 | unsigned int ncores; |
34 | 34 | ||
35 | ncores = __raw_readl(IO_ADDRESS(REALVIEW_MPCORE_SCU_BASE) + SCU_CONFIG); | 35 | ncores = __raw_readl(__io_address(REALVIEW_MPCORE_SCU_BASE) + SCU_CONFIG); |
36 | 36 | ||
37 | return (ncores & 0x03) + 1; | 37 | return (ncores & 0x03) + 1; |
38 | } | 38 | } |
@@ -133,12 +133,12 @@ static void __init poke_milo(void) | |||
133 | #if 1 | 133 | #if 1 |
134 | #define REALVIEW_SYS_FLAGSS_OFFSET 0x30 | 134 | #define REALVIEW_SYS_FLAGSS_OFFSET 0x30 |
135 | __raw_writel(virt_to_phys(realview_secondary_startup), | 135 | __raw_writel(virt_to_phys(realview_secondary_startup), |
136 | (IO_ADDRESS(REALVIEW_SYS_BASE) + | 136 | __io_address(REALVIEW_SYS_BASE) + |
137 | REALVIEW_SYS_FLAGSS_OFFSET)); | 137 | REALVIEW_SYS_FLAGSS_OFFSET); |
138 | #define REALVIEW_SYS_FLAGSC_OFFSET 0x34 | 138 | #define REALVIEW_SYS_FLAGSC_OFFSET 0x34 |
139 | __raw_writel(3, | 139 | __raw_writel(3, |
140 | (IO_ADDRESS(REALVIEW_SYS_BASE) + | 140 | __io_address(REALVIEW_SYS_BASE) + |
141 | REALVIEW_SYS_FLAGSC_OFFSET)); | 141 | REALVIEW_SYS_FLAGSC_OFFSET); |
142 | #endif | 142 | #endif |
143 | 143 | ||
144 | mb(); | 144 | mb(); |
diff --git a/arch/arm/mach-s3c2410/Kconfig b/arch/arm/mach-s3c2410/Kconfig index c796bcdd6158..0b9d7ca49ec1 100644 --- a/arch/arm/mach-s3c2410/Kconfig +++ b/arch/arm/mach-s3c2410/Kconfig | |||
@@ -121,6 +121,14 @@ config S3C2410_BOOT_WATCHDOG | |||
121 | system resets depends on the value of PCLK. The timeout on an | 121 | system resets depends on the value of PCLK. The timeout on an |
122 | 200MHz s3c2410 should be about 30 seconds. | 122 | 200MHz s3c2410 should be about 30 seconds. |
123 | 123 | ||
124 | config S3C2410_BOOT_ERROR_RESET | ||
125 | bool "S3C2410 Reboot on decompression error" | ||
126 | depends on ARCH_S3C2410 | ||
127 | help | ||
128 | Say y here to use the watchdog to reset the system if the | ||
129 | kernel decompressor detects an error during decompression. | ||
130 | |||
131 | |||
124 | comment "S3C2410 Setup" | 132 | comment "S3C2410 Setup" |
125 | 133 | ||
126 | config S3C2410_DMA | 134 | config S3C2410_DMA |
diff --git a/arch/arm/mach-s3c2410/mach-bast.c b/arch/arm/mach-s3c2410/mach-bast.c index 0b71c896bbd1..1be2567a7486 100644 --- a/arch/arm/mach-s3c2410/mach-bast.c +++ b/arch/arm/mach-s3c2410/mach-bast.c | |||
@@ -89,32 +89,63 @@ | |||
89 | 89 | ||
90 | /* macros to modify the physical addresses for io space */ | 90 | /* macros to modify the physical addresses for io space */ |
91 | 91 | ||
92 | #define PA_CS2(item) ((item) + S3C2410_CS2) | 92 | #define PA_CS2(item) (__phys_to_pfn((item) + S3C2410_CS2)) |
93 | #define PA_CS3(item) ((item) + S3C2410_CS3) | 93 | #define PA_CS3(item) (__phys_to_pfn((item) + S3C2410_CS3)) |
94 | #define PA_CS4(item) ((item) + S3C2410_CS4) | 94 | #define PA_CS4(item) (__phys_to_pfn((item) + S3C2410_CS4)) |
95 | #define PA_CS5(item) ((item) + S3C2410_CS5) | 95 | #define PA_CS5(item) (__phys_to_pfn((item) + S3C2410_CS5)) |
96 | 96 | ||
97 | static struct map_desc bast_iodesc[] __initdata = { | 97 | static struct map_desc bast_iodesc[] __initdata = { |
98 | /* ISA IO areas */ | 98 | /* ISA IO areas */ |
99 | 99 | { | |
100 | { (u32)S3C24XX_VA_ISA_BYTE, PA_CS2(BAST_PA_ISAIO), SZ_16M, MT_DEVICE }, | 100 | .virtual = (u32)S3C24XX_VA_ISA_BYTE, |
101 | { (u32)S3C24XX_VA_ISA_WORD, PA_CS3(BAST_PA_ISAIO), SZ_16M, MT_DEVICE }, | 101 | .pfn = PA_CS2(BAST_PA_ISAIO), |
102 | 102 | .length = SZ_16M, | |
103 | /* we could possibly compress the next set down into a set of smaller tables | 103 | .type = MT_DEVICE, |
104 | * pagetables, but that would mean using an L2 section, and it still means | 104 | }, { |
105 | * we cannot actually feed the same register to an LDR due to 16K spacing | 105 | .virtual = (u32)S3C24XX_VA_ISA_WORD, |
106 | */ | 106 | .pfn = PA_CS3(BAST_PA_ISAIO), |
107 | 107 | .length = SZ_16M, | |
108 | .type = MT_DEVICE, | ||
109 | }, | ||
108 | /* bast CPLD control registers, and external interrupt controls */ | 110 | /* bast CPLD control registers, and external interrupt controls */ |
109 | { (u32)BAST_VA_CTRL1, BAST_PA_CTRL1, SZ_1M, MT_DEVICE }, | 111 | { |
110 | { (u32)BAST_VA_CTRL2, BAST_PA_CTRL2, SZ_1M, MT_DEVICE }, | 112 | .virtual = (u32)BAST_VA_CTRL1, |
111 | { (u32)BAST_VA_CTRL3, BAST_PA_CTRL3, SZ_1M, MT_DEVICE }, | 113 | .pfn = __phys_to_pfn(BAST_PA_CTRL1), |
112 | { (u32)BAST_VA_CTRL4, BAST_PA_CTRL4, SZ_1M, MT_DEVICE }, | 114 | .length = SZ_1M, |
113 | 115 | .type = MT_DEVICE, | |
116 | }, { | ||
117 | .virtual = (u32)BAST_VA_CTRL2, | ||
118 | .pfn = __phys_to_pfn(BAST_PA_CTRL2), | ||
119 | .length = SZ_1M, | ||
120 | .type = MT_DEVICE, | ||
121 | }, { | ||
122 | .virtual = (u32)BAST_VA_CTRL3, | ||
123 | .pfn = __phys_to_pfn(BAST_PA_CTRL3), | ||
124 | .length = SZ_1M, | ||
125 | .type = MT_DEVICE, | ||
126 | }, { | ||
127 | .virtual = (u32)BAST_VA_CTRL4, | ||
128 | .pfn = __phys_to_pfn(BAST_PA_CTRL4), | ||
129 | .length = SZ_1M, | ||
130 | .type = MT_DEVICE, | ||
131 | }, | ||
114 | /* PC104 IRQ mux */ | 132 | /* PC104 IRQ mux */ |
115 | { (u32)BAST_VA_PC104_IRQREQ, BAST_PA_PC104_IRQREQ, SZ_1M, MT_DEVICE }, | 133 | { |
116 | { (u32)BAST_VA_PC104_IRQRAW, BAST_PA_PC104_IRQRAW, SZ_1M, MT_DEVICE }, | 134 | .virtual = (u32)BAST_VA_PC104_IRQREQ, |
117 | { (u32)BAST_VA_PC104_IRQMASK, BAST_PA_PC104_IRQMASK, SZ_1M, MT_DEVICE }, | 135 | .pfn = __phys_to_pfn(BAST_PA_PC104_IRQREQ), |
136 | .length = SZ_1M, | ||
137 | .type = MT_DEVICE, | ||
138 | }, { | ||
139 | .virtual = (u32)BAST_VA_PC104_IRQRAW, | ||
140 | .pfn = __phys_to_pfn(BAST_PA_PC104_IRQRAW), | ||
141 | .length = SZ_1M, | ||
142 | .type = MT_DEVICE, | ||
143 | }, { | ||
144 | .virtual = (u32)BAST_VA_PC104_IRQMASK, | ||
145 | .pfn = __phys_to_pfn(BAST_PA_PC104_IRQMASK), | ||
146 | .length = SZ_1M, | ||
147 | .type = MT_DEVICE, | ||
148 | }, | ||
118 | 149 | ||
119 | /* peripheral space... one for each of fast/slow/byte/16bit */ | 150 | /* peripheral space... one for each of fast/slow/byte/16bit */ |
120 | /* note, ide is only decoded in word space, even though some registers | 151 | /* note, ide is only decoded in word space, even though some registers |
diff --git a/arch/arm/mach-s3c2410/mach-vr1000.c b/arch/arm/mach-s3c2410/mach-vr1000.c index 46b259673c18..ae7e099bf6c8 100644 --- a/arch/arm/mach-s3c2410/mach-vr1000.c +++ b/arch/arm/mach-s3c2410/mach-vr1000.c | |||
@@ -74,27 +74,47 @@ | |||
74 | 74 | ||
75 | /* macros to modify the physical addresses for io space */ | 75 | /* macros to modify the physical addresses for io space */ |
76 | 76 | ||
77 | #define PA_CS2(item) ((item) + S3C2410_CS2) | 77 | #define PA_CS2(item) (__phys_to_pfn((item) + S3C2410_CS2)) |
78 | #define PA_CS3(item) ((item) + S3C2410_CS3) | 78 | #define PA_CS3(item) (__phys_to_pfn((item) + S3C2410_CS3)) |
79 | #define PA_CS4(item) ((item) + S3C2410_CS4) | 79 | #define PA_CS4(item) (__phys_to_pfn((item) + S3C2410_CS4)) |
80 | #define PA_CS5(item) ((item) + S3C2410_CS5) | 80 | #define PA_CS5(item) (__phys_to_pfn((item) + S3C2410_CS5)) |
81 | 81 | ||
82 | static struct map_desc vr1000_iodesc[] __initdata = { | 82 | static struct map_desc vr1000_iodesc[] __initdata = { |
83 | /* ISA IO areas */ | 83 | /* ISA IO areas */ |
84 | 84 | { | |
85 | { (u32)S3C24XX_VA_ISA_BYTE, PA_CS2(BAST_PA_ISAIO), SZ_16M, MT_DEVICE }, | 85 | .virtual = (u32)S3C24XX_VA_ISA_BYTE, |
86 | { (u32)S3C24XX_VA_ISA_WORD, PA_CS3(BAST_PA_ISAIO), SZ_16M, MT_DEVICE }, | 86 | .pfn = PA_CS2(BAST_PA_ISAIO), |
87 | 87 | .length = SZ_16M, | |
88 | /* we could possibly compress the next set down into a set of smaller tables | 88 | .type = MT_DEVICE, |
89 | * pagetables, but that would mean using an L2 section, and it still means | 89 | }, { |
90 | * we cannot actually feed the same register to an LDR due to 16K spacing | 90 | .virtual = (u32)S3C24XX_VA_ISA_WORD, |
91 | */ | 91 | .pfn = PA_CS3(BAST_PA_ISAIO), |
92 | 92 | .length = SZ_16M, | |
93 | /* bast CPLD control registers, and external interrupt controls */ | 93 | .type = MT_DEVICE, |
94 | { (u32)VR1000_VA_CTRL1, VR1000_PA_CTRL1, SZ_1M, MT_DEVICE }, | 94 | }, |
95 | { (u32)VR1000_VA_CTRL2, VR1000_PA_CTRL2, SZ_1M, MT_DEVICE }, | 95 | |
96 | { (u32)VR1000_VA_CTRL3, VR1000_PA_CTRL3, SZ_1M, MT_DEVICE }, | 96 | /* CPLD control registers, and external interrupt controls */ |
97 | { (u32)VR1000_VA_CTRL4, VR1000_PA_CTRL4, SZ_1M, MT_DEVICE }, | 97 | { |
98 | .virtual = (u32)VR1000_VA_CTRL1, | ||
99 | .pfn = __phys_to_pfn(VR1000_PA_CTRL1), | ||
100 | .length = SZ_1M, | ||
101 | .type = MT_DEVICE, | ||
102 | }, { | ||
103 | .virtual = (u32)VR1000_VA_CTRL2, | ||
104 | .pfn = __phys_to_pfn(VR1000_PA_CTRL2), | ||
105 | .length = SZ_1M, | ||
106 | .type = MT_DEVICE, | ||
107 | }, { | ||
108 | .virtual = (u32)VR1000_VA_CTRL3, | ||
109 | .pfn = __phys_to_pfn(VR1000_PA_CTRL3), | ||
110 | .length = SZ_1M, | ||
111 | .type = MT_DEVICE, | ||
112 | }, { | ||
113 | .virtual = (u32)VR1000_VA_CTRL4, | ||
114 | .pfn = __phys_to_pfn(VR1000_PA_CTRL4), | ||
115 | .length = SZ_1M, | ||
116 | .type = MT_DEVICE, | ||
117 | }, | ||
98 | 118 | ||
99 | /* peripheral space... one for each of fast/slow/byte/16bit */ | 119 | /* peripheral space... one for each of fast/slow/byte/16bit */ |
100 | /* note, ide is only decoded in word space, even though some registers | 120 | /* note, ide is only decoded in word space, even though some registers |
diff --git a/arch/arm/mach-sa1100/time.c b/arch/arm/mach-sa1100/time.c index 47e0420623fc..e4b435e634e4 100644 --- a/arch/arm/mach-sa1100/time.c +++ b/arch/arm/mach-sa1100/time.c | |||
@@ -124,11 +124,13 @@ static void __init sa1100_timer_init(void) | |||
124 | tv.tv_sec = sa1100_get_rtc_time(); | 124 | tv.tv_sec = sa1100_get_rtc_time(); |
125 | do_settimeofday(&tv); | 125 | do_settimeofday(&tv); |
126 | 126 | ||
127 | OSMR0 = 0; /* set initial match at 0 */ | 127 | OIER = 0; /* disable any timer interrupts */ |
128 | OSCR = LATCH*2; /* push OSCR out of the way */ | ||
129 | OSMR0 = LATCH; /* set initial match */ | ||
128 | OSSR = 0xf; /* clear status on all timers */ | 130 | OSSR = 0xf; /* clear status on all timers */ |
129 | setup_irq(IRQ_OST0, &sa1100_timer_irq); | 131 | setup_irq(IRQ_OST0, &sa1100_timer_irq); |
130 | OIER |= OIER_E0; /* enable match on timer 0 to cause interrupts */ | 132 | OIER = OIER_E0; /* enable match on timer 0 to cause interrupts */ |
131 | OSCR = 0; /* initialize free-running timer, force first match */ | 133 | OSCR = 0; /* initialize free-running timer */ |
132 | } | 134 | } |
133 | 135 | ||
134 | #ifdef CONFIG_NO_IDLE_HZ | 136 | #ifdef CONFIG_NO_IDLE_HZ |
diff --git a/arch/arm/plat-omap/ocpi.c b/arch/arm/plat-omap/ocpi.c index 1fb16f9edfd5..2ede2ee8cae4 100644 --- a/arch/arm/plat-omap/ocpi.c +++ b/arch/arm/plat-omap/ocpi.c | |||
@@ -25,7 +25,6 @@ | |||
25 | 25 | ||
26 | #include <linux/config.h> | 26 | #include <linux/config.h> |
27 | #include <linux/module.h> | 27 | #include <linux/module.h> |
28 | #include <linux/version.h> | ||
29 | #include <linux/types.h> | 28 | #include <linux/types.h> |
30 | #include <linux/errno.h> | 29 | #include <linux/errno.h> |
31 | #include <linux/kernel.h> | 30 | #include <linux/kernel.h> |
diff --git a/arch/arm26/kernel/process.c b/arch/arm26/kernel/process.c index 9eb9964d32a7..15833a0057dd 100644 --- a/arch/arm26/kernel/process.c +++ b/arch/arm26/kernel/process.c | |||
@@ -74,15 +74,13 @@ __setup("hlt", hlt_setup); | |||
74 | void cpu_idle(void) | 74 | void cpu_idle(void) |
75 | { | 75 | { |
76 | /* endless idle loop with no priority at all */ | 76 | /* endless idle loop with no priority at all */ |
77 | preempt_disable(); | ||
78 | while (1) { | 77 | while (1) { |
79 | while (!need_resched()) { | 78 | while (!need_resched()) |
80 | local_irq_disable(); | 79 | cpu_relax(); |
81 | if (!need_resched() && !hlt_counter) | 80 | preempt_enable_no_resched(); |
82 | local_irq_enable(); | 81 | schedule(); |
83 | } | 82 | preempt_disable(); |
84 | } | 83 | } |
85 | schedule(); | ||
86 | } | 84 | } |
87 | 85 | ||
88 | static char reboot_mode = 'h'; | 86 | static char reboot_mode = 'h'; |
diff --git a/arch/cris/arch-v10/drivers/pcf8563.c b/arch/cris/arch-v10/drivers/pcf8563.c index 201f4c90d961..f2c55742e90c 100644 --- a/arch/cris/arch-v10/drivers/pcf8563.c +++ b/arch/cris/arch-v10/drivers/pcf8563.c | |||
@@ -19,7 +19,6 @@ | |||
19 | */ | 19 | */ |
20 | 20 | ||
21 | #include <linux/config.h> | 21 | #include <linux/config.h> |
22 | #include <linux/version.h> | ||
23 | #include <linux/module.h> | 22 | #include <linux/module.h> |
24 | #include <linux/kernel.h> | 23 | #include <linux/kernel.h> |
25 | #include <linux/types.h> | 24 | #include <linux/types.h> |
diff --git a/arch/cris/arch-v10/kernel/fasttimer.c b/arch/cris/arch-v10/kernel/fasttimer.c index 094ff45ae85b..cac05a5e514c 100644 --- a/arch/cris/arch-v10/kernel/fasttimer.c +++ b/arch/cris/arch-v10/kernel/fasttimer.c | |||
@@ -112,7 +112,6 @@ | |||
112 | #include <asm/rtc.h> | 112 | #include <asm/rtc.h> |
113 | 113 | ||
114 | #include <linux/config.h> | 114 | #include <linux/config.h> |
115 | #include <linux/version.h> | ||
116 | 115 | ||
117 | #include <asm/arch/svinto.h> | 116 | #include <asm/arch/svinto.h> |
118 | #include <asm/fasttimer.h> | 117 | #include <asm/fasttimer.h> |
diff --git a/arch/cris/arch-v32/drivers/nandflash.c b/arch/cris/arch-v32/drivers/nandflash.c index fc2a619b035d..93ddea4d9564 100644 --- a/arch/cris/arch-v32/drivers/nandflash.c +++ b/arch/cris/arch-v32/drivers/nandflash.c | |||
@@ -14,7 +14,6 @@ | |||
14 | * | 14 | * |
15 | */ | 15 | */ |
16 | 16 | ||
17 | #include <linux/version.h> | ||
18 | #include <linux/slab.h> | 17 | #include <linux/slab.h> |
19 | #include <linux/init.h> | 18 | #include <linux/init.h> |
20 | #include <linux/module.h> | 19 | #include <linux/module.h> |
diff --git a/arch/cris/arch-v32/drivers/pcf8563.c b/arch/cris/arch-v32/drivers/pcf8563.c index f894580b648b..d788bda3578c 100644 --- a/arch/cris/arch-v32/drivers/pcf8563.c +++ b/arch/cris/arch-v32/drivers/pcf8563.c | |||
@@ -18,7 +18,6 @@ | |||
18 | */ | 18 | */ |
19 | 19 | ||
20 | #include <linux/config.h> | 20 | #include <linux/config.h> |
21 | #include <linux/version.h> | ||
22 | #include <linux/module.h> | 21 | #include <linux/module.h> |
23 | #include <linux/kernel.h> | 22 | #include <linux/kernel.h> |
24 | #include <linux/types.h> | 23 | #include <linux/types.h> |
diff --git a/arch/cris/arch-v32/kernel/smp.c b/arch/cris/arch-v32/kernel/smp.c index 957f551ba5ce..13867f4fad16 100644 --- a/arch/cris/arch-v32/kernel/smp.c +++ b/arch/cris/arch-v32/kernel/smp.c | |||
@@ -161,6 +161,7 @@ void __init smp_callin(void) | |||
161 | REG_WR(intr_vect, irq_regs[cpu], rw_mask, vect_mask); | 161 | REG_WR(intr_vect, irq_regs[cpu], rw_mask, vect_mask); |
162 | unmask_irq(IPI_INTR_VECT); | 162 | unmask_irq(IPI_INTR_VECT); |
163 | unmask_irq(TIMER_INTR_VECT); | 163 | unmask_irq(TIMER_INTR_VECT); |
164 | preempt_disable(); | ||
164 | local_irq_enable(); | 165 | local_irq_enable(); |
165 | 166 | ||
166 | cpu_set(cpu, cpu_online_map); | 167 | cpu_set(cpu, cpu_online_map); |
diff --git a/arch/cris/kernel/process.c b/arch/cris/kernel/process.c index 949a0e40e03c..7c80afb10460 100644 --- a/arch/cris/kernel/process.c +++ b/arch/cris/kernel/process.c | |||
@@ -218,7 +218,9 @@ void cpu_idle (void) | |||
218 | idle = default_idle; | 218 | idle = default_idle; |
219 | idle(); | 219 | idle(); |
220 | } | 220 | } |
221 | preempt_enable_no_resched(); | ||
221 | schedule(); | 222 | schedule(); |
223 | preempt_disable(); | ||
222 | } | 224 | } |
223 | } | 225 | } |
224 | 226 | ||
diff --git a/arch/frv/kernel/process.c b/arch/frv/kernel/process.c index 3001b82b1514..54a452136f00 100644 --- a/arch/frv/kernel/process.c +++ b/arch/frv/kernel/process.c | |||
@@ -77,16 +77,20 @@ void (*idle)(void) = core_sleep_idle; | |||
77 | */ | 77 | */ |
78 | void cpu_idle(void) | 78 | void cpu_idle(void) |
79 | { | 79 | { |
80 | int cpu = smp_processor_id(); | ||
81 | |||
80 | /* endless idle loop with no priority at all */ | 82 | /* endless idle loop with no priority at all */ |
81 | while (1) { | 83 | while (1) { |
82 | while (!need_resched()) { | 84 | while (!need_resched()) { |
83 | irq_stat[smp_processor_id()].idle_timestamp = jiffies; | 85 | irq_stat[cpu].idle_timestamp = jiffies; |
84 | 86 | ||
85 | if (!frv_dma_inprogress && idle) | 87 | if (!frv_dma_inprogress && idle) |
86 | idle(); | 88 | idle(); |
87 | } | 89 | } |
88 | 90 | ||
91 | preempt_enable_no_resched(); | ||
89 | schedule(); | 92 | schedule(); |
93 | preempt_disable(); | ||
90 | } | 94 | } |
91 | } | 95 | } |
92 | 96 | ||
diff --git a/arch/h8300/kernel/process.c b/arch/h8300/kernel/process.c index 27f1fce64ce4..fe21adf3e75e 100644 --- a/arch/h8300/kernel/process.c +++ b/arch/h8300/kernel/process.c | |||
@@ -53,22 +53,18 @@ asmlinkage void ret_from_fork(void); | |||
53 | #if !defined(CONFIG_H8300H_SIM) && !defined(CONFIG_H8S_SIM) | 53 | #if !defined(CONFIG_H8300H_SIM) && !defined(CONFIG_H8S_SIM) |
54 | void default_idle(void) | 54 | void default_idle(void) |
55 | { | 55 | { |
56 | while(1) { | 56 | local_irq_disable(); |
57 | if (!need_resched()) { | 57 | if (!need_resched()) { |
58 | local_irq_enable(); | 58 | local_irq_enable(); |
59 | __asm__("sleep"); | 59 | /* XXX: race here! What if need_resched() gets set now? */ |
60 | local_irq_disable(); | 60 | __asm__("sleep"); |
61 | } | 61 | } else |
62 | schedule(); | 62 | local_irq_enable(); |
63 | } | ||
64 | } | 63 | } |
65 | #else | 64 | #else |
66 | void default_idle(void) | 65 | void default_idle(void) |
67 | { | 66 | { |
68 | while(1) { | 67 | cpu_relax(); |
69 | if (need_resched()) | ||
70 | schedule(); | ||
71 | } | ||
72 | } | 68 | } |
73 | #endif | 69 | #endif |
74 | void (*idle)(void) = default_idle; | 70 | void (*idle)(void) = default_idle; |
@@ -81,7 +77,13 @@ void (*idle)(void) = default_idle; | |||
81 | */ | 77 | */ |
82 | void cpu_idle(void) | 78 | void cpu_idle(void) |
83 | { | 79 | { |
84 | idle(); | 80 | while (1) { |
81 | while (!need_resched()) | ||
82 | idle(); | ||
83 | preempt_enable_no_resched(); | ||
84 | schedule(); | ||
85 | preempt_disable(); | ||
86 | } | ||
85 | } | 87 | } |
86 | 88 | ||
87 | void machine_restart(char * __unused) | 89 | void machine_restart(char * __unused) |
diff --git a/arch/i386/kernel/apm.c b/arch/i386/kernel/apm.c index 86e80c551478..003548b8735f 100644 --- a/arch/i386/kernel/apm.c +++ b/arch/i386/kernel/apm.c | |||
@@ -769,8 +769,26 @@ static int set_system_power_state(u_short state) | |||
769 | static int apm_do_idle(void) | 769 | static int apm_do_idle(void) |
770 | { | 770 | { |
771 | u32 eax; | 771 | u32 eax; |
772 | u8 ret = 0; | ||
773 | int idled = 0; | ||
774 | int polling; | ||
775 | |||
776 | polling = test_thread_flag(TIF_POLLING_NRFLAG); | ||
777 | if (polling) { | ||
778 | clear_thread_flag(TIF_POLLING_NRFLAG); | ||
779 | smp_mb__after_clear_bit(); | ||
780 | } | ||
781 | if (!need_resched()) { | ||
782 | idled = 1; | ||
783 | ret = apm_bios_call_simple(APM_FUNC_IDLE, 0, 0, &eax); | ||
784 | } | ||
785 | if (polling) | ||
786 | set_thread_flag(TIF_POLLING_NRFLAG); | ||
787 | |||
788 | if (!idled) | ||
789 | return 0; | ||
772 | 790 | ||
773 | if (apm_bios_call_simple(APM_FUNC_IDLE, 0, 0, &eax)) { | 791 | if (ret) { |
774 | static unsigned long t; | 792 | static unsigned long t; |
775 | 793 | ||
776 | /* This always fails on some SMP boards running UP kernels. | 794 | /* This always fails on some SMP boards running UP kernels. |
diff --git a/arch/i386/kernel/process.c b/arch/i386/kernel/process.c index 7a14fdfd3af9..1cb261f225d5 100644 --- a/arch/i386/kernel/process.c +++ b/arch/i386/kernel/process.c | |||
@@ -99,14 +99,22 @@ EXPORT_SYMBOL(enable_hlt); | |||
99 | */ | 99 | */ |
100 | void default_idle(void) | 100 | void default_idle(void) |
101 | { | 101 | { |
102 | local_irq_enable(); | ||
103 | |||
102 | if (!hlt_counter && boot_cpu_data.hlt_works_ok) { | 104 | if (!hlt_counter && boot_cpu_data.hlt_works_ok) { |
103 | local_irq_disable(); | 105 | clear_thread_flag(TIF_POLLING_NRFLAG); |
104 | if (!need_resched()) | 106 | smp_mb__after_clear_bit(); |
105 | safe_halt(); | 107 | while (!need_resched()) { |
106 | else | 108 | local_irq_disable(); |
107 | local_irq_enable(); | 109 | if (!need_resched()) |
110 | safe_halt(); | ||
111 | else | ||
112 | local_irq_enable(); | ||
113 | } | ||
114 | set_thread_flag(TIF_POLLING_NRFLAG); | ||
108 | } else { | 115 | } else { |
109 | cpu_relax(); | 116 | while (!need_resched()) |
117 | cpu_relax(); | ||
110 | } | 118 | } |
111 | } | 119 | } |
112 | #ifdef CONFIG_APM_MODULE | 120 | #ifdef CONFIG_APM_MODULE |
@@ -120,29 +128,14 @@ EXPORT_SYMBOL(default_idle); | |||
120 | */ | 128 | */ |
121 | static void poll_idle (void) | 129 | static void poll_idle (void) |
122 | { | 130 | { |
123 | int oldval; | ||
124 | |||
125 | local_irq_enable(); | 131 | local_irq_enable(); |
126 | 132 | ||
127 | /* | 133 | asm volatile( |
128 | * Deal with another CPU just having chosen a thread to | 134 | "2:" |
129 | * run here: | 135 | "testl %0, %1;" |
130 | */ | 136 | "rep; nop;" |
131 | oldval = test_and_clear_thread_flag(TIF_NEED_RESCHED); | 137 | "je 2b;" |
132 | 138 | : : "i"(_TIF_NEED_RESCHED), "m" (current_thread_info()->flags)); | |
133 | if (!oldval) { | ||
134 | set_thread_flag(TIF_POLLING_NRFLAG); | ||
135 | asm volatile( | ||
136 | "2:" | ||
137 | "testl %0, %1;" | ||
138 | "rep; nop;" | ||
139 | "je 2b;" | ||
140 | : : "i"(_TIF_NEED_RESCHED), "m" (current_thread_info()->flags)); | ||
141 | |||
142 | clear_thread_flag(TIF_POLLING_NRFLAG); | ||
143 | } else { | ||
144 | set_need_resched(); | ||
145 | } | ||
146 | } | 139 | } |
147 | 140 | ||
148 | #ifdef CONFIG_HOTPLUG_CPU | 141 | #ifdef CONFIG_HOTPLUG_CPU |
@@ -179,7 +172,9 @@ static inline void play_dead(void) | |||
179 | */ | 172 | */ |
180 | void cpu_idle(void) | 173 | void cpu_idle(void) |
181 | { | 174 | { |
182 | int cpu = raw_smp_processor_id(); | 175 | int cpu = smp_processor_id(); |
176 | |||
177 | set_thread_flag(TIF_POLLING_NRFLAG); | ||
183 | 178 | ||
184 | /* endless idle loop with no priority at all */ | 179 | /* endless idle loop with no priority at all */ |
185 | while (1) { | 180 | while (1) { |
@@ -201,7 +196,9 @@ void cpu_idle(void) | |||
201 | __get_cpu_var(irq_stat).idle_timestamp = jiffies; | 196 | __get_cpu_var(irq_stat).idle_timestamp = jiffies; |
202 | idle(); | 197 | idle(); |
203 | } | 198 | } |
199 | preempt_enable_no_resched(); | ||
204 | schedule(); | 200 | schedule(); |
201 | preempt_disable(); | ||
205 | } | 202 | } |
206 | } | 203 | } |
207 | 204 | ||
@@ -244,15 +241,12 @@ static void mwait_idle(void) | |||
244 | { | 241 | { |
245 | local_irq_enable(); | 242 | local_irq_enable(); |
246 | 243 | ||
247 | if (!need_resched()) { | 244 | while (!need_resched()) { |
248 | set_thread_flag(TIF_POLLING_NRFLAG); | 245 | __monitor((void *)¤t_thread_info()->flags, 0, 0); |
249 | do { | 246 | smp_mb(); |
250 | __monitor((void *)¤t_thread_info()->flags, 0, 0); | 247 | if (need_resched()) |
251 | if (need_resched()) | 248 | break; |
252 | break; | 249 | __mwait(0, 0); |
253 | __mwait(0, 0); | ||
254 | } while (!need_resched()); | ||
255 | clear_thread_flag(TIF_POLLING_NRFLAG); | ||
256 | } | 250 | } |
257 | } | 251 | } |
258 | 252 | ||
diff --git a/arch/i386/kernel/setup.c b/arch/i386/kernel/setup.c index b48ac635f3c1..fdfcb0cba9b4 100644 --- a/arch/i386/kernel/setup.c +++ b/arch/i386/kernel/setup.c | |||
@@ -129,9 +129,7 @@ struct drive_info_struct { char dummy[32]; } drive_info; | |||
129 | EXPORT_SYMBOL(drive_info); | 129 | EXPORT_SYMBOL(drive_info); |
130 | #endif | 130 | #endif |
131 | struct screen_info screen_info; | 131 | struct screen_info screen_info; |
132 | #ifdef CONFIG_VT | ||
133 | EXPORT_SYMBOL(screen_info); | 132 | EXPORT_SYMBOL(screen_info); |
134 | #endif | ||
135 | struct apm_info apm_info; | 133 | struct apm_info apm_info; |
136 | EXPORT_SYMBOL(apm_info); | 134 | EXPORT_SYMBOL(apm_info); |
137 | struct sys_desc_table_struct { | 135 | struct sys_desc_table_struct { |
diff --git a/arch/i386/kernel/smpboot.c b/arch/i386/kernel/smpboot.c index 47ec76794d02..bc5a9d97466b 100644 --- a/arch/i386/kernel/smpboot.c +++ b/arch/i386/kernel/smpboot.c | |||
@@ -485,6 +485,7 @@ static void __devinit start_secondary(void *unused) | |||
485 | * things done here to the most necessary things. | 485 | * things done here to the most necessary things. |
486 | */ | 486 | */ |
487 | cpu_init(); | 487 | cpu_init(); |
488 | preempt_disable(); | ||
488 | smp_callin(); | 489 | smp_callin(); |
489 | while (!cpu_isset(smp_processor_id(), smp_commenced_mask)) | 490 | while (!cpu_isset(smp_processor_id(), smp_commenced_mask)) |
490 | rep_nop(); | 491 | rep_nop(); |
diff --git a/arch/ia64/ia32/ia32_ioctl.c b/arch/ia64/ia32/ia32_ioctl.c index 164b211f4174..88739394f6df 100644 --- a/arch/ia64/ia32/ia32_ioctl.c +++ b/arch/ia64/ia32/ia32_ioctl.c | |||
@@ -29,10 +29,8 @@ | |||
29 | #define CODE | 29 | #define CODE |
30 | #include "compat_ioctl.c" | 30 | #include "compat_ioctl.c" |
31 | 31 | ||
32 | typedef int (* ioctl32_handler_t)(unsigned int, unsigned int, unsigned long, struct file *); | ||
33 | |||
34 | #define COMPATIBLE_IOCTL(cmd) HANDLE_IOCTL((cmd),sys_ioctl) | 32 | #define COMPATIBLE_IOCTL(cmd) HANDLE_IOCTL((cmd),sys_ioctl) |
35 | #define HANDLE_IOCTL(cmd,handler) { (cmd), (ioctl32_handler_t)(handler), NULL }, | 33 | #define HANDLE_IOCTL(cmd,handler) { (cmd), (ioctl_trans_handler_t)(handler), NULL }, |
36 | #define IOCTL_TABLE_START \ | 34 | #define IOCTL_TABLE_START \ |
37 | struct ioctl_trans ioctl_start[] = { | 35 | struct ioctl_trans ioctl_start[] = { |
38 | #define IOCTL_TABLE_END \ | 36 | #define IOCTL_TABLE_END \ |
diff --git a/arch/ia64/kernel/mca_drv.c b/arch/ia64/kernel/mca_drv.c index f081c60ab206..eb39bc9c133b 100644 --- a/arch/ia64/kernel/mca_drv.c +++ b/arch/ia64/kernel/mca_drv.c | |||
@@ -88,7 +88,7 @@ mca_page_isolate(unsigned long paddr) | |||
88 | if (!ia64_phys_addr_valid(paddr)) | 88 | if (!ia64_phys_addr_valid(paddr)) |
89 | return ISOLATE_NONE; | 89 | return ISOLATE_NONE; |
90 | 90 | ||
91 | if (!pfn_valid(paddr)) | 91 | if (!pfn_valid(paddr >> PAGE_SHIFT)) |
92 | return ISOLATE_NONE; | 92 | return ISOLATE_NONE; |
93 | 93 | ||
94 | /* convert physical address to physical page number */ | 94 | /* convert physical address to physical page number */ |
@@ -108,6 +108,7 @@ mca_page_isolate(unsigned long paddr) | |||
108 | return ISOLATE_NG; | 108 | return ISOLATE_NG; |
109 | 109 | ||
110 | /* add attribute 'Reserved' and register the page */ | 110 | /* add attribute 'Reserved' and register the page */ |
111 | get_page(p); | ||
111 | SetPageReserved(p); | 112 | SetPageReserved(p); |
112 | page_isolate[num_page_isolate++] = p; | 113 | page_isolate[num_page_isolate++] = p; |
113 | 114 | ||
diff --git a/arch/ia64/kernel/process.c b/arch/ia64/kernel/process.c index 051e050359e4..640d6908f8ec 100644 --- a/arch/ia64/kernel/process.c +++ b/arch/ia64/kernel/process.c | |||
@@ -197,11 +197,15 @@ void | |||
197 | default_idle (void) | 197 | default_idle (void) |
198 | { | 198 | { |
199 | local_irq_enable(); | 199 | local_irq_enable(); |
200 | while (!need_resched()) | 200 | while (!need_resched()) { |
201 | if (can_do_pal_halt) | 201 | if (can_do_pal_halt) { |
202 | safe_halt(); | 202 | local_irq_disable(); |
203 | else | 203 | if (!need_resched()) |
204 | safe_halt(); | ||
205 | local_irq_enable(); | ||
206 | } else | ||
204 | cpu_relax(); | 207 | cpu_relax(); |
208 | } | ||
205 | } | 209 | } |
206 | 210 | ||
207 | #ifdef CONFIG_HOTPLUG_CPU | 211 | #ifdef CONFIG_HOTPLUG_CPU |
@@ -263,16 +267,16 @@ void __attribute__((noreturn)) | |||
263 | cpu_idle (void) | 267 | cpu_idle (void) |
264 | { | 268 | { |
265 | void (*mark_idle)(int) = ia64_mark_idle; | 269 | void (*mark_idle)(int) = ia64_mark_idle; |
270 | int cpu = smp_processor_id(); | ||
271 | set_thread_flag(TIF_POLLING_NRFLAG); | ||
266 | 272 | ||
267 | /* endless idle loop with no priority at all */ | 273 | /* endless idle loop with no priority at all */ |
268 | while (1) { | 274 | while (1) { |
275 | if (!need_resched()) { | ||
276 | void (*idle)(void); | ||
269 | #ifdef CONFIG_SMP | 277 | #ifdef CONFIG_SMP |
270 | if (!need_resched()) | ||
271 | min_xtp(); | 278 | min_xtp(); |
272 | #endif | 279 | #endif |
273 | while (!need_resched()) { | ||
274 | void (*idle)(void); | ||
275 | |||
276 | if (__get_cpu_var(cpu_idle_state)) | 280 | if (__get_cpu_var(cpu_idle_state)) |
277 | __get_cpu_var(cpu_idle_state) = 0; | 281 | __get_cpu_var(cpu_idle_state) = 0; |
278 | 282 | ||
@@ -284,17 +288,17 @@ cpu_idle (void) | |||
284 | if (!idle) | 288 | if (!idle) |
285 | idle = default_idle; | 289 | idle = default_idle; |
286 | (*idle)(); | 290 | (*idle)(); |
287 | } | 291 | if (mark_idle) |
288 | 292 | (*mark_idle)(0); | |
289 | if (mark_idle) | ||
290 | (*mark_idle)(0); | ||
291 | |||
292 | #ifdef CONFIG_SMP | 293 | #ifdef CONFIG_SMP |
293 | normal_xtp(); | 294 | normal_xtp(); |
294 | #endif | 295 | #endif |
296 | } | ||
297 | preempt_enable_no_resched(); | ||
295 | schedule(); | 298 | schedule(); |
299 | preempt_disable(); | ||
296 | check_pgt_cache(); | 300 | check_pgt_cache(); |
297 | if (cpu_is_offline(smp_processor_id())) | 301 | if (cpu_is_offline(cpu)) |
298 | play_dead(); | 302 | play_dead(); |
299 | } | 303 | } |
300 | } | 304 | } |
diff --git a/arch/ia64/kernel/smpboot.c b/arch/ia64/kernel/smpboot.c index 400a48987124..8f44e7d2df66 100644 --- a/arch/ia64/kernel/smpboot.c +++ b/arch/ia64/kernel/smpboot.c | |||
@@ -399,6 +399,7 @@ start_secondary (void *unused) | |||
399 | Dprintk("start_secondary: starting CPU 0x%x\n", hard_smp_processor_id()); | 399 | Dprintk("start_secondary: starting CPU 0x%x\n", hard_smp_processor_id()); |
400 | efi_map_pal_code(); | 400 | efi_map_pal_code(); |
401 | cpu_init(); | 401 | cpu_init(); |
402 | preempt_disable(); | ||
402 | smp_callin(); | 403 | smp_callin(); |
403 | 404 | ||
404 | cpu_idle(); | 405 | cpu_idle(); |
diff --git a/arch/ia64/sn/pci/pcibr/pcibr_provider.c b/arch/ia64/sn/pci/pcibr/pcibr_provider.c index 7b03b8084ffc..1f500c81002c 100644 --- a/arch/ia64/sn/pci/pcibr/pcibr_provider.c +++ b/arch/ia64/sn/pci/pcibr/pcibr_provider.c | |||
@@ -212,13 +212,13 @@ void pcibr_target_interrupt(struct sn_irq_info *sn_irq_info) | |||
212 | pdi_pcibus_info; | 212 | pdi_pcibus_info; |
213 | 213 | ||
214 | /* Disable the device's IRQ */ | 214 | /* Disable the device's IRQ */ |
215 | pcireg_intr_enable_bit_clr(pcibus_info, bit); | 215 | pcireg_intr_enable_bit_clr(pcibus_info, (1 << bit)); |
216 | 216 | ||
217 | /* Change the device's IRQ */ | 217 | /* Change the device's IRQ */ |
218 | pcireg_intr_addr_addr_set(pcibus_info, bit, xtalk_addr); | 218 | pcireg_intr_addr_addr_set(pcibus_info, bit, xtalk_addr); |
219 | 219 | ||
220 | /* Re-enable the device's IRQ */ | 220 | /* Re-enable the device's IRQ */ |
221 | pcireg_intr_enable_bit_set(pcibus_info, bit); | 221 | pcireg_intr_enable_bit_set(pcibus_info, (1 << bit)); |
222 | 222 | ||
223 | pcibr_force_interrupt(sn_irq_info); | 223 | pcibr_force_interrupt(sn_irq_info); |
224 | } | 224 | } |
diff --git a/arch/ia64/sn/pci/pcibr/pcibr_reg.c b/arch/ia64/sn/pci/pcibr/pcibr_reg.c index 4f718c3e93d3..5d534091262c 100644 --- a/arch/ia64/sn/pci/pcibr/pcibr_reg.c +++ b/arch/ia64/sn/pci/pcibr/pcibr_reg.c | |||
@@ -131,7 +131,7 @@ void pcireg_intr_enable_bit_clr(struct pcibus_info *pcibus_info, uint64_t bits) | |||
131 | __sn_clrq_relaxed(&ptr->tio.cp_int_enable, bits); | 131 | __sn_clrq_relaxed(&ptr->tio.cp_int_enable, bits); |
132 | break; | 132 | break; |
133 | case PCIBR_BRIDGETYPE_PIC: | 133 | case PCIBR_BRIDGETYPE_PIC: |
134 | __sn_clrq_relaxed(&ptr->pic.p_int_enable, ~bits); | 134 | __sn_clrq_relaxed(&ptr->pic.p_int_enable, bits); |
135 | break; | 135 | break; |
136 | default: | 136 | default: |
137 | panic | 137 | panic |
diff --git a/arch/m32r/kernel/process.c b/arch/m32r/kernel/process.c index ea13a8f4d8b0..cc4b571e5db7 100644 --- a/arch/m32r/kernel/process.c +++ b/arch/m32r/kernel/process.c | |||
@@ -104,7 +104,9 @@ void cpu_idle (void) | |||
104 | 104 | ||
105 | idle(); | 105 | idle(); |
106 | } | 106 | } |
107 | preempt_enable_no_resched(); | ||
107 | schedule(); | 108 | schedule(); |
109 | preempt_disable(); | ||
108 | } | 110 | } |
109 | } | 111 | } |
110 | 112 | ||
diff --git a/arch/m32r/kernel/smpboot.c b/arch/m32r/kernel/smpboot.c index 640d592ea072..b90c54169fa5 100644 --- a/arch/m32r/kernel/smpboot.c +++ b/arch/m32r/kernel/smpboot.c | |||
@@ -426,6 +426,7 @@ void __init smp_cpus_done(unsigned int max_cpus) | |||
426 | int __init start_secondary(void *unused) | 426 | int __init start_secondary(void *unused) |
427 | { | 427 | { |
428 | cpu_init(); | 428 | cpu_init(); |
429 | preempt_disable(); | ||
429 | smp_callin(); | 430 | smp_callin(); |
430 | while (!cpu_isset(smp_processor_id(), smp_commenced_mask)) | 431 | while (!cpu_isset(smp_processor_id(), smp_commenced_mask)) |
431 | cpu_relax(); | 432 | cpu_relax(); |
diff --git a/arch/m68k/kernel/process.c b/arch/m68k/kernel/process.c index 11b1b90ba6ba..13d109328a42 100644 --- a/arch/m68k/kernel/process.c +++ b/arch/m68k/kernel/process.c | |||
@@ -102,7 +102,9 @@ void cpu_idle(void) | |||
102 | while (1) { | 102 | while (1) { |
103 | while (!need_resched()) | 103 | while (!need_resched()) |
104 | idle(); | 104 | idle(); |
105 | preempt_enable_no_resched(); | ||
105 | schedule(); | 106 | schedule(); |
107 | preempt_disable(); | ||
106 | } | 108 | } |
107 | } | 109 | } |
108 | 110 | ||
diff --git a/arch/mips/au1000/common/setup.c b/arch/mips/au1000/common/setup.c index 1ef15d5ef943..4f21f42d096b 100644 --- a/arch/mips/au1000/common/setup.c +++ b/arch/mips/au1000/common/setup.c | |||
@@ -111,17 +111,6 @@ void __init plat_setup(void) | |||
111 | } | 111 | } |
112 | #endif | 112 | #endif |
113 | 113 | ||
114 | #ifdef CONFIG_FB_E1356 | ||
115 | if ((argptr = strstr(argptr, "video=")) == NULL) { | ||
116 | argptr = prom_getcmdline(); | ||
117 | #ifdef CONFIG_MIPS_PB1000 | ||
118 | strcat(argptr, " video=e1356fb:system:pb1000,mmunalign:1"); | ||
119 | #else | ||
120 | strcat(argptr, " video=e1356fb:system:pb1500"); | ||
121 | #endif | ||
122 | } | ||
123 | #endif | ||
124 | |||
125 | #ifdef CONFIG_FB_XPERT98 | 114 | #ifdef CONFIG_FB_XPERT98 |
126 | if ((argptr = strstr(argptr, "video=")) == NULL) { | 115 | if ((argptr = strstr(argptr, "video=")) == NULL) { |
127 | argptr = prom_getcmdline(); | 116 | argptr = prom_getcmdline(); |
diff --git a/arch/mips/configs/ddb5476_defconfig b/arch/mips/configs/ddb5476_defconfig index b260e51eb517..326f3aa63741 100644 --- a/arch/mips/configs/ddb5476_defconfig +++ b/arch/mips/configs/ddb5476_defconfig | |||
@@ -658,7 +658,6 @@ CONFIG_FB=y | |||
658 | # CONFIG_FB_SMIVGX is not set | 658 | # CONFIG_FB_SMIVGX is not set |
659 | # CONFIG_FB_CYBLA is not set | 659 | # CONFIG_FB_CYBLA is not set |
660 | # CONFIG_FB_TRIDENT is not set | 660 | # CONFIG_FB_TRIDENT is not set |
661 | # CONFIG_FB_E1356 is not set | ||
662 | # CONFIG_FB_S1D13XXX is not set | 661 | # CONFIG_FB_S1D13XXX is not set |
663 | # CONFIG_FB_VIRTUAL is not set | 662 | # CONFIG_FB_VIRTUAL is not set |
664 | 663 | ||
diff --git a/arch/mips/configs/jmr3927_defconfig b/arch/mips/configs/jmr3927_defconfig index 9a728c2d8fd5..6390a753e80b 100644 --- a/arch/mips/configs/jmr3927_defconfig +++ b/arch/mips/configs/jmr3927_defconfig | |||
@@ -628,7 +628,6 @@ CONFIG_FB=y | |||
628 | # CONFIG_FB_SMIVGX is not set | 628 | # CONFIG_FB_SMIVGX is not set |
629 | # CONFIG_FB_CYBLA is not set | 629 | # CONFIG_FB_CYBLA is not set |
630 | # CONFIG_FB_TRIDENT is not set | 630 | # CONFIG_FB_TRIDENT is not set |
631 | # CONFIG_FB_E1356 is not set | ||
632 | # CONFIG_FB_S1D13XXX is not set | 631 | # CONFIG_FB_S1D13XXX is not set |
633 | # CONFIG_FB_VIRTUAL is not set | 632 | # CONFIG_FB_VIRTUAL is not set |
634 | 633 | ||
diff --git a/arch/mips/configs/ocelot_3_defconfig b/arch/mips/configs/ocelot_3_defconfig index ffb23fcab862..f18d05c2ca77 100644 --- a/arch/mips/configs/ocelot_3_defconfig +++ b/arch/mips/configs/ocelot_3_defconfig | |||
@@ -758,7 +758,6 @@ CONFIG_FB_MODE_HELPERS=y | |||
758 | # CONFIG_FB_SMIVGX is not set | 758 | # CONFIG_FB_SMIVGX is not set |
759 | # CONFIG_FB_CYBLA is not set | 759 | # CONFIG_FB_CYBLA is not set |
760 | # CONFIG_FB_TRIDENT is not set | 760 | # CONFIG_FB_TRIDENT is not set |
761 | # CONFIG_FB_E1356 is not set | ||
762 | # CONFIG_FB_S1D13XXX is not set | 761 | # CONFIG_FB_S1D13XXX is not set |
763 | # CONFIG_FB_VIRTUAL is not set | 762 | # CONFIG_FB_VIRTUAL is not set |
764 | 763 | ||
diff --git a/arch/mips/configs/pnx8550-v2pci_defconfig b/arch/mips/configs/pnx8550-v2pci_defconfig index 05e65206a7b4..37bd8d5c865d 100644 --- a/arch/mips/configs/pnx8550-v2pci_defconfig +++ b/arch/mips/configs/pnx8550-v2pci_defconfig | |||
@@ -897,7 +897,6 @@ CONFIG_FB=y | |||
897 | # CONFIG_FB_SMIVGX is not set | 897 | # CONFIG_FB_SMIVGX is not set |
898 | # CONFIG_FB_CYBLA is not set | 898 | # CONFIG_FB_CYBLA is not set |
899 | # CONFIG_FB_TRIDENT is not set | 899 | # CONFIG_FB_TRIDENT is not set |
900 | # CONFIG_FB_E1356 is not set | ||
901 | # CONFIG_FB_S1D13XXX is not set | 900 | # CONFIG_FB_S1D13XXX is not set |
902 | # CONFIG_FB_VIRTUAL is not set | 901 | # CONFIG_FB_VIRTUAL is not set |
903 | 902 | ||
diff --git a/arch/mips/configs/rbhma4500_defconfig b/arch/mips/configs/rbhma4500_defconfig index 2bc61ca4ba08..897420d39053 100644 --- a/arch/mips/configs/rbhma4500_defconfig +++ b/arch/mips/configs/rbhma4500_defconfig | |||
@@ -876,7 +876,6 @@ CONFIG_FB_ATY_CT=y | |||
876 | # CONFIG_FB_SMIVGX is not set | 876 | # CONFIG_FB_SMIVGX is not set |
877 | # CONFIG_FB_CYBLA is not set | 877 | # CONFIG_FB_CYBLA is not set |
878 | # CONFIG_FB_TRIDENT is not set | 878 | # CONFIG_FB_TRIDENT is not set |
879 | # CONFIG_FB_E1356 is not set | ||
880 | # CONFIG_FB_S1D13XXX is not set | 879 | # CONFIG_FB_S1D13XXX is not set |
881 | # CONFIG_FB_VIRTUAL is not set | 880 | # CONFIG_FB_VIRTUAL is not set |
882 | 881 | ||
diff --git a/arch/mips/kernel/ioctl32.c b/arch/mips/kernel/ioctl32.c index ed9b2da510be..9ea1fc748864 100644 --- a/arch/mips/kernel/ioctl32.c +++ b/arch/mips/kernel/ioctl32.c | |||
@@ -26,10 +26,8 @@ long sys_ioctl(unsigned int fd, unsigned int cmd, unsigned long arg); | |||
26 | #define CODE | 26 | #define CODE |
27 | #include "compat_ioctl.c" | 27 | #include "compat_ioctl.c" |
28 | 28 | ||
29 | typedef int (* ioctl32_handler_t)(unsigned int, unsigned int, unsigned long, struct file *); | ||
30 | |||
31 | #define COMPATIBLE_IOCTL(cmd) HANDLE_IOCTL((cmd),sys_ioctl) | 29 | #define COMPATIBLE_IOCTL(cmd) HANDLE_IOCTL((cmd),sys_ioctl) |
32 | #define HANDLE_IOCTL(cmd,handler) { (cmd), (ioctl32_handler_t)(handler), NULL }, | 30 | #define HANDLE_IOCTL(cmd,handler) { (cmd), (ioctl_trans_handler_t)(handler), NULL }, |
33 | #define IOCTL_TABLE_START \ | 31 | #define IOCTL_TABLE_START \ |
34 | struct ioctl_trans ioctl_start[] = { | 32 | struct ioctl_trans ioctl_start[] = { |
35 | #define IOCTL_TABLE_END \ | 33 | #define IOCTL_TABLE_END \ |
diff --git a/arch/mips/kernel/process.c b/arch/mips/kernel/process.c index 4fe3d5715c41..dd725779d91f 100644 --- a/arch/mips/kernel/process.c +++ b/arch/mips/kernel/process.c | |||
@@ -52,7 +52,9 @@ ATTRIB_NORET void cpu_idle(void) | |||
52 | while (!need_resched()) | 52 | while (!need_resched()) |
53 | if (cpu_wait) | 53 | if (cpu_wait) |
54 | (*cpu_wait)(); | 54 | (*cpu_wait)(); |
55 | preempt_enable_no_resched(); | ||
55 | schedule(); | 56 | schedule(); |
57 | preempt_disable(); | ||
56 | } | 58 | } |
57 | } | 59 | } |
58 | 60 | ||
diff --git a/arch/mips/kernel/smp.c b/arch/mips/kernel/smp.c index fcacf1aae98a..25472fcaf715 100644 --- a/arch/mips/kernel/smp.c +++ b/arch/mips/kernel/smp.c | |||
@@ -82,7 +82,7 @@ extern ATTRIB_NORET void cpu_idle(void); | |||
82 | */ | 82 | */ |
83 | asmlinkage void start_secondary(void) | 83 | asmlinkage void start_secondary(void) |
84 | { | 84 | { |
85 | unsigned int cpu = smp_processor_id(); | 85 | unsigned int cpu; |
86 | 86 | ||
87 | cpu_probe(); | 87 | cpu_probe(); |
88 | cpu_report(); | 88 | cpu_report(); |
@@ -95,6 +95,8 @@ asmlinkage void start_secondary(void) | |||
95 | */ | 95 | */ |
96 | 96 | ||
97 | calibrate_delay(); | 97 | calibrate_delay(); |
98 | preempt_disable(); | ||
99 | cpu = smp_processor_id(); | ||
98 | cpu_data[cpu].udelay_val = loops_per_jiffy; | 100 | cpu_data[cpu].udelay_val = loops_per_jiffy; |
99 | 101 | ||
100 | prom_smp_finish(); | 102 | prom_smp_finish(); |
diff --git a/arch/mips/tx4938/toshiba_rbtx4938/irq.c b/arch/mips/tx4938/toshiba_rbtx4938/irq.c index 230f5a93c2e6..9cd9c0fe2265 100644 --- a/arch/mips/tx4938/toshiba_rbtx4938/irq.c +++ b/arch/mips/tx4938/toshiba_rbtx4938/irq.c | |||
@@ -84,7 +84,6 @@ IRQ Device | |||
84 | #include <asm/ptrace.h> | 84 | #include <asm/ptrace.h> |
85 | #include <asm/reboot.h> | 85 | #include <asm/reboot.h> |
86 | #include <asm/time.h> | 86 | #include <asm/time.h> |
87 | #include <linux/version.h> | ||
88 | #include <linux/bootmem.h> | 87 | #include <linux/bootmem.h> |
89 | #include <asm/tx4938/rbtx4938.h> | 88 | #include <asm/tx4938/rbtx4938.h> |
90 | 89 | ||
diff --git a/arch/parisc/kernel/asm-offsets.c b/arch/parisc/kernel/asm-offsets.c index 1ad44f92d6e4..e23c4e1e3a25 100644 --- a/arch/parisc/kernel/asm-offsets.c +++ b/arch/parisc/kernel/asm-offsets.c | |||
@@ -30,7 +30,6 @@ | |||
30 | #include <linux/types.h> | 30 | #include <linux/types.h> |
31 | #include <linux/sched.h> | 31 | #include <linux/sched.h> |
32 | #include <linux/thread_info.h> | 32 | #include <linux/thread_info.h> |
33 | #include <linux/version.h> | ||
34 | #include <linux/ptrace.h> | 33 | #include <linux/ptrace.h> |
35 | #include <linux/hardirq.h> | 34 | #include <linux/hardirq.h> |
36 | 35 | ||
diff --git a/arch/parisc/kernel/process.c b/arch/parisc/kernel/process.c index 7fdca87ef647..fee4f1f09adc 100644 --- a/arch/parisc/kernel/process.c +++ b/arch/parisc/kernel/process.c | |||
@@ -88,11 +88,15 @@ void default_idle(void) | |||
88 | */ | 88 | */ |
89 | void cpu_idle(void) | 89 | void cpu_idle(void) |
90 | { | 90 | { |
91 | set_thread_flag(TIF_POLLING_NRFLAG); | ||
92 | |||
91 | /* endless idle loop with no priority at all */ | 93 | /* endless idle loop with no priority at all */ |
92 | while (1) { | 94 | while (1) { |
93 | while (!need_resched()) | 95 | while (!need_resched()) |
94 | barrier(); | 96 | barrier(); |
97 | preempt_enable_no_resched(); | ||
95 | schedule(); | 98 | schedule(); |
99 | preempt_disable(); | ||
96 | check_pgt_cache(); | 100 | check_pgt_cache(); |
97 | } | 101 | } |
98 | } | 102 | } |
diff --git a/arch/parisc/kernel/smp.c b/arch/parisc/kernel/smp.c index 5db3be4e2704..a9ecf6465784 100644 --- a/arch/parisc/kernel/smp.c +++ b/arch/parisc/kernel/smp.c | |||
@@ -463,6 +463,7 @@ void __init smp_callin(void) | |||
463 | #endif | 463 | #endif |
464 | 464 | ||
465 | smp_cpu_init(slave_id); | 465 | smp_cpu_init(slave_id); |
466 | preempt_disable(); | ||
466 | 467 | ||
467 | #if 0 /* NOT WORKING YET - see entry.S */ | 468 | #if 0 /* NOT WORKING YET - see entry.S */ |
468 | istack = (void *)__get_free_pages(GFP_KERNEL,ISTACK_ORDER); | 469 | istack = (void *)__get_free_pages(GFP_KERNEL,ISTACK_ORDER); |
diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig index 6ffae2d2b3fa..1493c7896fe3 100644 --- a/arch/powerpc/Kconfig +++ b/arch/powerpc/Kconfig | |||
@@ -404,6 +404,14 @@ config CPU_FREQ_PMAC | |||
404 | this currently includes some models of iBook & Titanium | 404 | this currently includes some models of iBook & Titanium |
405 | PowerBook. | 405 | PowerBook. |
406 | 406 | ||
407 | config CPU_FREQ_PMAC64 | ||
408 | bool "Support for some Apple G5s" | ||
409 | depends on CPU_FREQ && PMAC_SMU && PPC64 | ||
410 | select CPU_FREQ_TABLE | ||
411 | help | ||
412 | This adds support for frequency switching on Apple iMac G5, | ||
413 | and some of the more recent desktop G5 machines as well. | ||
414 | |||
407 | config PPC601_SYNC_FIX | 415 | config PPC601_SYNC_FIX |
408 | bool "Workarounds for PPC601 bugs" | 416 | bool "Workarounds for PPC601 bugs" |
409 | depends on 6xx && (PPC_PREP || PPC_PMAC) | 417 | depends on 6xx && (PPC_PREP || PPC_PMAC) |
@@ -484,6 +492,7 @@ source "fs/Kconfig.binfmt" | |||
484 | config FORCE_MAX_ZONEORDER | 492 | config FORCE_MAX_ZONEORDER |
485 | int | 493 | int |
486 | depends on PPC64 | 494 | depends on PPC64 |
495 | default "9" if PPC_64K_PAGES | ||
487 | default "13" | 496 | default "13" |
488 | 497 | ||
489 | config MATH_EMULATION | 498 | config MATH_EMULATION |
diff --git a/arch/powerpc/configs/g5_defconfig b/arch/powerpc/configs/g5_defconfig index 6323065fbf2c..e76854f8c121 100644 --- a/arch/powerpc/configs/g5_defconfig +++ b/arch/powerpc/configs/g5_defconfig | |||
@@ -1,18 +1,32 @@ | |||
1 | # | 1 | # |
2 | # Automatically generated make config: don't edit | 2 | # Automatically generated make config: don't edit |
3 | # Linux kernel version: 2.6.14-rc4 | 3 | # Linux kernel version: 2.6.14 |
4 | # Thu Oct 20 08:30:23 2005 | 4 | # Mon Nov 7 13:37:59 2005 |
5 | # | 5 | # |
6 | CONFIG_PPC64=y | ||
6 | CONFIG_64BIT=y | 7 | CONFIG_64BIT=y |
8 | CONFIG_PPC_MERGE=y | ||
7 | CONFIG_MMU=y | 9 | CONFIG_MMU=y |
10 | CONFIG_GENERIC_HARDIRQS=y | ||
8 | CONFIG_RWSEM_XCHGADD_ALGORITHM=y | 11 | CONFIG_RWSEM_XCHGADD_ALGORITHM=y |
9 | CONFIG_GENERIC_CALIBRATE_DELAY=y | 12 | CONFIG_GENERIC_CALIBRATE_DELAY=y |
10 | CONFIG_GENERIC_ISA_DMA=y | 13 | CONFIG_PPC=y |
11 | CONFIG_EARLY_PRINTK=y | 14 | CONFIG_EARLY_PRINTK=y |
12 | CONFIG_COMPAT=y | 15 | CONFIG_COMPAT=y |
16 | CONFIG_SYSVIPC_COMPAT=y | ||
13 | CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y | 17 | CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y |
14 | CONFIG_ARCH_MAY_HAVE_PC_FDC=y | 18 | CONFIG_ARCH_MAY_HAVE_PC_FDC=y |
15 | CONFIG_FORCE_MAX_ZONEORDER=13 | 19 | |
20 | # | ||
21 | # Processor support | ||
22 | # | ||
23 | CONFIG_POWER4_ONLY=y | ||
24 | CONFIG_POWER4=y | ||
25 | CONFIG_PPC_FPU=y | ||
26 | CONFIG_ALTIVEC=y | ||
27 | CONFIG_PPC_STD_MMU=y | ||
28 | CONFIG_SMP=y | ||
29 | CONFIG_NR_CPUS=2 | ||
16 | 30 | ||
17 | # | 31 | # |
18 | # Code maturity level options | 32 | # Code maturity level options |
@@ -67,30 +81,60 @@ CONFIG_MODVERSIONS=y | |||
67 | CONFIG_MODULE_SRCVERSION_ALL=y | 81 | CONFIG_MODULE_SRCVERSION_ALL=y |
68 | CONFIG_KMOD=y | 82 | CONFIG_KMOD=y |
69 | CONFIG_STOP_MACHINE=y | 83 | CONFIG_STOP_MACHINE=y |
70 | CONFIG_SYSVIPC_COMPAT=y | ||
71 | 84 | ||
72 | # | 85 | # |
73 | # Platform support | 86 | # Platform support |
74 | # | 87 | # |
75 | # CONFIG_PPC_ISERIES is not set | ||
76 | CONFIG_PPC_MULTIPLATFORM=y | 88 | CONFIG_PPC_MULTIPLATFORM=y |
89 | # CONFIG_PPC_ISERIES is not set | ||
90 | # CONFIG_EMBEDDED6xx is not set | ||
91 | # CONFIG_APUS is not set | ||
77 | # CONFIG_PPC_PSERIES is not set | 92 | # CONFIG_PPC_PSERIES is not set |
78 | # CONFIG_PPC_BPA is not set | ||
79 | CONFIG_PPC_PMAC=y | 93 | CONFIG_PPC_PMAC=y |
94 | CONFIG_PPC_PMAC64=y | ||
80 | # CONFIG_PPC_MAPLE is not set | 95 | # CONFIG_PPC_MAPLE is not set |
81 | CONFIG_PPC=y | 96 | # CONFIG_PPC_CELL is not set |
82 | CONFIG_PPC64=y | ||
83 | CONFIG_PPC_OF=y | 97 | CONFIG_PPC_OF=y |
84 | CONFIG_MPIC=y | ||
85 | CONFIG_ALTIVEC=y | ||
86 | CONFIG_KEXEC=y | ||
87 | CONFIG_U3_DART=y | 98 | CONFIG_U3_DART=y |
88 | CONFIG_PPC_PMAC64=y | 99 | CONFIG_MPIC=y |
89 | CONFIG_BOOTX_TEXT=y | 100 | # CONFIG_PPC_RTAS is not set |
90 | CONFIG_POWER4_ONLY=y | 101 | # CONFIG_MMIO_NVRAM is not set |
102 | # CONFIG_PPC_MPC106 is not set | ||
103 | CONFIG_GENERIC_TBSYNC=y | ||
104 | CONFIG_CPU_FREQ=y | ||
105 | CONFIG_CPU_FREQ_TABLE=y | ||
106 | # CONFIG_CPU_FREQ_DEBUG is not set | ||
107 | CONFIG_CPU_FREQ_STAT=y | ||
108 | # CONFIG_CPU_FREQ_STAT_DETAILS is not set | ||
109 | CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y | ||
110 | # CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set | ||
111 | CONFIG_CPU_FREQ_GOV_PERFORMANCE=y | ||
112 | CONFIG_CPU_FREQ_GOV_POWERSAVE=y | ||
113 | CONFIG_CPU_FREQ_GOV_USERSPACE=y | ||
114 | # CONFIG_CPU_FREQ_GOV_ONDEMAND is not set | ||
115 | # CONFIG_CPU_FREQ_GOV_CONSERVATIVE is not set | ||
116 | CONFIG_CPU_FREQ_PMAC64=y | ||
117 | # CONFIG_WANT_EARLY_SERIAL is not set | ||
118 | |||
119 | # | ||
120 | # Kernel options | ||
121 | # | ||
122 | # CONFIG_HZ_100 is not set | ||
123 | CONFIG_HZ_250=y | ||
124 | # CONFIG_HZ_1000 is not set | ||
125 | CONFIG_HZ=250 | ||
126 | CONFIG_PREEMPT_NONE=y | ||
127 | # CONFIG_PREEMPT_VOLUNTARY is not set | ||
128 | # CONFIG_PREEMPT is not set | ||
129 | # CONFIG_PREEMPT_BKL is not set | ||
130 | CONFIG_BINFMT_ELF=y | ||
131 | # CONFIG_BINFMT_MISC is not set | ||
132 | CONFIG_FORCE_MAX_ZONEORDER=13 | ||
91 | CONFIG_IOMMU_VMERGE=y | 133 | CONFIG_IOMMU_VMERGE=y |
92 | CONFIG_SMP=y | 134 | # CONFIG_HOTPLUG_CPU is not set |
93 | CONFIG_NR_CPUS=2 | 135 | CONFIG_KEXEC=y |
136 | CONFIG_IRQ_ALL_CPUS=y | ||
137 | # CONFIG_NUMA is not set | ||
94 | CONFIG_ARCH_SELECT_MEMORY_MODEL=y | 138 | CONFIG_ARCH_SELECT_MEMORY_MODEL=y |
95 | CONFIG_ARCH_FLATMEM_ENABLE=y | 139 | CONFIG_ARCH_FLATMEM_ENABLE=y |
96 | CONFIG_SELECT_MEMORY_MODEL=y | 140 | CONFIG_SELECT_MEMORY_MODEL=y |
@@ -100,28 +144,21 @@ CONFIG_FLATMEM_MANUAL=y | |||
100 | CONFIG_FLATMEM=y | 144 | CONFIG_FLATMEM=y |
101 | CONFIG_FLAT_NODE_MEM_MAP=y | 145 | CONFIG_FLAT_NODE_MEM_MAP=y |
102 | # CONFIG_SPARSEMEM_STATIC is not set | 146 | # CONFIG_SPARSEMEM_STATIC is not set |
103 | # CONFIG_NUMA is not set | 147 | CONFIG_SPLIT_PTLOCK_CPUS=4 |
148 | # CONFIG_PPC_64K_PAGES is not set | ||
104 | # CONFIG_SCHED_SMT is not set | 149 | # CONFIG_SCHED_SMT is not set |
105 | CONFIG_PREEMPT_NONE=y | ||
106 | # CONFIG_PREEMPT_VOLUNTARY is not set | ||
107 | # CONFIG_PREEMPT is not set | ||
108 | # CONFIG_PREEMPT_BKL is not set | ||
109 | # CONFIG_HZ_100 is not set | ||
110 | CONFIG_HZ_250=y | ||
111 | # CONFIG_HZ_1000 is not set | ||
112 | CONFIG_HZ=250 | ||
113 | CONFIG_GENERIC_HARDIRQS=y | ||
114 | CONFIG_SECCOMP=y | ||
115 | CONFIG_BINFMT_ELF=y | ||
116 | # CONFIG_BINFMT_MISC is not set | ||
117 | # CONFIG_HOTPLUG_CPU is not set | ||
118 | CONFIG_PROC_DEVICETREE=y | 150 | CONFIG_PROC_DEVICETREE=y |
119 | # CONFIG_CMDLINE_BOOL is not set | 151 | # CONFIG_CMDLINE_BOOL is not set |
152 | # CONFIG_PM is not set | ||
153 | CONFIG_SECCOMP=y | ||
120 | CONFIG_ISA_DMA_API=y | 154 | CONFIG_ISA_DMA_API=y |
121 | 155 | ||
122 | # | 156 | # |
123 | # Bus Options | 157 | # Bus options |
124 | # | 158 | # |
159 | CONFIG_GENERIC_ISA_DMA=y | ||
160 | # CONFIG_PPC_I8259 is not set | ||
161 | # CONFIG_PPC_INDIRECT_PCI is not set | ||
125 | CONFIG_PCI=y | 162 | CONFIG_PCI=y |
126 | CONFIG_PCI_DOMAINS=y | 163 | CONFIG_PCI_DOMAINS=y |
127 | CONFIG_PCI_LEGACY_PROC=y | 164 | CONFIG_PCI_LEGACY_PROC=y |
@@ -136,6 +173,7 @@ CONFIG_PCI_LEGACY_PROC=y | |||
136 | # PCI Hotplug Support | 173 | # PCI Hotplug Support |
137 | # | 174 | # |
138 | # CONFIG_HOTPLUG_PCI is not set | 175 | # CONFIG_HOTPLUG_PCI is not set |
176 | CONFIG_KERNEL_START=0xc000000000000000 | ||
139 | 177 | ||
140 | # | 178 | # |
141 | # Networking | 179 | # Networking |
@@ -276,6 +314,10 @@ CONFIG_LLC=y | |||
276 | # CONFIG_NET_DIVERT is not set | 314 | # CONFIG_NET_DIVERT is not set |
277 | # CONFIG_ECONET is not set | 315 | # CONFIG_ECONET is not set |
278 | # CONFIG_WAN_ROUTER is not set | 316 | # CONFIG_WAN_ROUTER is not set |
317 | |||
318 | # | ||
319 | # QoS and/or fair queueing | ||
320 | # | ||
279 | # CONFIG_NET_SCHED is not set | 321 | # CONFIG_NET_SCHED is not set |
280 | CONFIG_NET_CLS_ROUTE=y | 322 | CONFIG_NET_CLS_ROUTE=y |
281 | 323 | ||
@@ -348,6 +390,11 @@ CONFIG_IOSCHED_NOOP=y | |||
348 | CONFIG_IOSCHED_AS=y | 390 | CONFIG_IOSCHED_AS=y |
349 | CONFIG_IOSCHED_DEADLINE=y | 391 | CONFIG_IOSCHED_DEADLINE=y |
350 | CONFIG_IOSCHED_CFQ=y | 392 | CONFIG_IOSCHED_CFQ=y |
393 | CONFIG_DEFAULT_AS=y | ||
394 | # CONFIG_DEFAULT_DEADLINE is not set | ||
395 | # CONFIG_DEFAULT_CFQ is not set | ||
396 | # CONFIG_DEFAULT_NOOP is not set | ||
397 | CONFIG_DEFAULT_IOSCHED="anticipatory" | ||
351 | # CONFIG_ATA_OVER_ETH is not set | 398 | # CONFIG_ATA_OVER_ETH is not set |
352 | 399 | ||
353 | # | 400 | # |
@@ -449,6 +496,7 @@ CONFIG_SCSI_SPI_ATTRS=y | |||
449 | # | 496 | # |
450 | # SCSI low-level drivers | 497 | # SCSI low-level drivers |
451 | # | 498 | # |
499 | # CONFIG_ISCSI_TCP is not set | ||
452 | # CONFIG_BLK_DEV_3W_XXXX_RAID is not set | 500 | # CONFIG_BLK_DEV_3W_XXXX_RAID is not set |
453 | # CONFIG_SCSI_3W_9XXX is not set | 501 | # CONFIG_SCSI_3W_9XXX is not set |
454 | # CONFIG_SCSI_ACARD is not set | 502 | # CONFIG_SCSI_ACARD is not set |
@@ -465,10 +513,12 @@ CONFIG_SCSI_SATA_SVW=y | |||
465 | # CONFIG_SCSI_ATA_PIIX is not set | 513 | # CONFIG_SCSI_ATA_PIIX is not set |
466 | # CONFIG_SCSI_SATA_MV is not set | 514 | # CONFIG_SCSI_SATA_MV is not set |
467 | # CONFIG_SCSI_SATA_NV is not set | 515 | # CONFIG_SCSI_SATA_NV is not set |
468 | # CONFIG_SCSI_SATA_PROMISE is not set | 516 | # CONFIG_SCSI_PDC_ADMA is not set |
469 | # CONFIG_SCSI_SATA_QSTOR is not set | 517 | # CONFIG_SCSI_SATA_QSTOR is not set |
518 | # CONFIG_SCSI_SATA_PROMISE is not set | ||
470 | # CONFIG_SCSI_SATA_SX4 is not set | 519 | # CONFIG_SCSI_SATA_SX4 is not set |
471 | # CONFIG_SCSI_SATA_SIL is not set | 520 | # CONFIG_SCSI_SATA_SIL is not set |
521 | # CONFIG_SCSI_SATA_SIL24 is not set | ||
472 | # CONFIG_SCSI_SATA_SIS is not set | 522 | # CONFIG_SCSI_SATA_SIS is not set |
473 | # CONFIG_SCSI_SATA_ULI is not set | 523 | # CONFIG_SCSI_SATA_ULI is not set |
474 | # CONFIG_SCSI_SATA_VIA is not set | 524 | # CONFIG_SCSI_SATA_VIA is not set |
@@ -567,6 +617,9 @@ CONFIG_IEEE1394_RAWIO=y | |||
567 | CONFIG_ADB_PMU=y | 617 | CONFIG_ADB_PMU=y |
568 | CONFIG_PMAC_SMU=y | 618 | CONFIG_PMAC_SMU=y |
569 | CONFIG_THERM_PM72=y | 619 | CONFIG_THERM_PM72=y |
620 | CONFIG_WINDFARM=y | ||
621 | CONFIG_WINDFARM_PM81=y | ||
622 | CONFIG_WINDFARM_PM91=y | ||
570 | 623 | ||
571 | # | 624 | # |
572 | # Network device support | 625 | # Network device support |
@@ -603,6 +656,7 @@ CONFIG_SUNGEM=y | |||
603 | # CONFIG_NET_TULIP is not set | 656 | # CONFIG_NET_TULIP is not set |
604 | # CONFIG_HP100 is not set | 657 | # CONFIG_HP100 is not set |
605 | # CONFIG_NET_PCI is not set | 658 | # CONFIG_NET_PCI is not set |
659 | # CONFIG_FEC_8XX is not set | ||
606 | 660 | ||
607 | # | 661 | # |
608 | # Ethernet (1000 Mbit) | 662 | # Ethernet (1000 Mbit) |
@@ -768,6 +822,7 @@ CONFIG_MAX_RAW_DEVS=256 | |||
768 | # TPM devices | 822 | # TPM devices |
769 | # | 823 | # |
770 | # CONFIG_TCG_TPM is not set | 824 | # CONFIG_TCG_TPM is not set |
825 | # CONFIG_TELCLOCK is not set | ||
771 | 826 | ||
772 | # | 827 | # |
773 | # I2C support | 828 | # I2C support |
@@ -820,6 +875,7 @@ CONFIG_I2C_PMAC_SMU=y | |||
820 | # CONFIG_SENSORS_PCF8591 is not set | 875 | # CONFIG_SENSORS_PCF8591 is not set |
821 | # CONFIG_SENSORS_RTC8564 is not set | 876 | # CONFIG_SENSORS_RTC8564 is not set |
822 | # CONFIG_SENSORS_MAX6875 is not set | 877 | # CONFIG_SENSORS_MAX6875 is not set |
878 | # CONFIG_RTC_X1205_I2C is not set | ||
823 | # CONFIG_I2C_DEBUG_CORE is not set | 879 | # CONFIG_I2C_DEBUG_CORE is not set |
824 | # CONFIG_I2C_DEBUG_ALGO is not set | 880 | # CONFIG_I2C_DEBUG_ALGO is not set |
825 | # CONFIG_I2C_DEBUG_BUS is not set | 881 | # CONFIG_I2C_DEBUG_BUS is not set |
@@ -876,10 +932,9 @@ CONFIG_FB_OF=y | |||
876 | # CONFIG_FB_ASILIANT is not set | 932 | # CONFIG_FB_ASILIANT is not set |
877 | # CONFIG_FB_IMSTT is not set | 933 | # CONFIG_FB_IMSTT is not set |
878 | # CONFIG_FB_VGA16 is not set | 934 | # CONFIG_FB_VGA16 is not set |
879 | # CONFIG_FB_NVIDIA is not set | 935 | CONFIG_FB_NVIDIA=y |
880 | CONFIG_FB_RIVA=y | 936 | CONFIG_FB_NVIDIA_I2C=y |
881 | # CONFIG_FB_RIVA_I2C is not set | 937 | # CONFIG_FB_RIVA is not set |
882 | # CONFIG_FB_RIVA_DEBUG is not set | ||
883 | # CONFIG_FB_MATROX is not set | 938 | # CONFIG_FB_MATROX is not set |
884 | # CONFIG_FB_RADEON_OLD is not set | 939 | # CONFIG_FB_RADEON_OLD is not set |
885 | CONFIG_FB_RADEON=y | 940 | CONFIG_FB_RADEON=y |
@@ -924,7 +979,96 @@ CONFIG_LCD_DEVICE=y | |||
924 | # | 979 | # |
925 | # Sound | 980 | # Sound |
926 | # | 981 | # |
927 | # CONFIG_SOUND is not set | 982 | CONFIG_SOUND=m |
983 | |||
984 | # | ||
985 | # Advanced Linux Sound Architecture | ||
986 | # | ||
987 | CONFIG_SND=m | ||
988 | CONFIG_SND_TIMER=m | ||
989 | CONFIG_SND_PCM=m | ||
990 | CONFIG_SND_HWDEP=m | ||
991 | CONFIG_SND_RAWMIDI=m | ||
992 | CONFIG_SND_SEQUENCER=m | ||
993 | # CONFIG_SND_SEQ_DUMMY is not set | ||
994 | CONFIG_SND_OSSEMUL=y | ||
995 | CONFIG_SND_MIXER_OSS=m | ||
996 | CONFIG_SND_PCM_OSS=m | ||
997 | CONFIG_SND_SEQUENCER_OSS=y | ||
998 | # CONFIG_SND_VERBOSE_PRINTK is not set | ||
999 | # CONFIG_SND_DEBUG is not set | ||
1000 | CONFIG_SND_GENERIC_DRIVER=y | ||
1001 | |||
1002 | # | ||
1003 | # Generic devices | ||
1004 | # | ||
1005 | # CONFIG_SND_DUMMY is not set | ||
1006 | # CONFIG_SND_VIRMIDI is not set | ||
1007 | # CONFIG_SND_MTPAV is not set | ||
1008 | # CONFIG_SND_SERIAL_U16550 is not set | ||
1009 | # CONFIG_SND_MPU401 is not set | ||
1010 | |||
1011 | # | ||
1012 | # PCI devices | ||
1013 | # | ||
1014 | # CONFIG_SND_ALI5451 is not set | ||
1015 | # CONFIG_SND_ATIIXP is not set | ||
1016 | # CONFIG_SND_ATIIXP_MODEM is not set | ||
1017 | # CONFIG_SND_AU8810 is not set | ||
1018 | # CONFIG_SND_AU8820 is not set | ||
1019 | # CONFIG_SND_AU8830 is not set | ||
1020 | # CONFIG_SND_AZT3328 is not set | ||
1021 | # CONFIG_SND_BT87X is not set | ||
1022 | # CONFIG_SND_CS46XX is not set | ||
1023 | # CONFIG_SND_CS4281 is not set | ||
1024 | # CONFIG_SND_EMU10K1 is not set | ||
1025 | # CONFIG_SND_EMU10K1X is not set | ||
1026 | # CONFIG_SND_CA0106 is not set | ||
1027 | # CONFIG_SND_KORG1212 is not set | ||
1028 | # CONFIG_SND_MIXART is not set | ||
1029 | # CONFIG_SND_NM256 is not set | ||
1030 | # CONFIG_SND_RME32 is not set | ||
1031 | # CONFIG_SND_RME96 is not set | ||
1032 | # CONFIG_SND_RME9652 is not set | ||
1033 | # CONFIG_SND_HDSP is not set | ||
1034 | # CONFIG_SND_HDSPM is not set | ||
1035 | # CONFIG_SND_TRIDENT is not set | ||
1036 | # CONFIG_SND_YMFPCI is not set | ||
1037 | # CONFIG_SND_AD1889 is not set | ||
1038 | # CONFIG_SND_ALS4000 is not set | ||
1039 | # CONFIG_SND_CMIPCI is not set | ||
1040 | # CONFIG_SND_ENS1370 is not set | ||
1041 | # CONFIG_SND_ENS1371 is not set | ||
1042 | # CONFIG_SND_ES1938 is not set | ||
1043 | # CONFIG_SND_ES1968 is not set | ||
1044 | # CONFIG_SND_MAESTRO3 is not set | ||
1045 | # CONFIG_SND_FM801 is not set | ||
1046 | # CONFIG_SND_ICE1712 is not set | ||
1047 | # CONFIG_SND_ICE1724 is not set | ||
1048 | # CONFIG_SND_INTEL8X0 is not set | ||
1049 | # CONFIG_SND_INTEL8X0M is not set | ||
1050 | # CONFIG_SND_SONICVIBES is not set | ||
1051 | # CONFIG_SND_VIA82XX is not set | ||
1052 | # CONFIG_SND_VIA82XX_MODEM is not set | ||
1053 | # CONFIG_SND_VX222 is not set | ||
1054 | # CONFIG_SND_HDA_INTEL is not set | ||
1055 | |||
1056 | # | ||
1057 | # ALSA PowerMac devices | ||
1058 | # | ||
1059 | CONFIG_SND_POWERMAC=m | ||
1060 | CONFIG_SND_POWERMAC_AUTO_DRC=y | ||
1061 | |||
1062 | # | ||
1063 | # USB devices | ||
1064 | # | ||
1065 | CONFIG_SND_USB_AUDIO=m | ||
1066 | # CONFIG_SND_USB_USX2Y is not set | ||
1067 | |||
1068 | # | ||
1069 | # Open Sound System | ||
1070 | # | ||
1071 | # CONFIG_SOUND_PRIME is not set | ||
928 | 1072 | ||
929 | # | 1073 | # |
930 | # USB support | 1074 | # USB support |
@@ -958,12 +1102,16 @@ CONFIG_USB_OHCI_LITTLE_ENDIAN=y | |||
958 | # | 1102 | # |
959 | # USB Device Class drivers | 1103 | # USB Device Class drivers |
960 | # | 1104 | # |
961 | # CONFIG_USB_BLUETOOTH_TTY is not set | 1105 | # CONFIG_OBSOLETE_OSS_USB_DRIVER is not set |
962 | CONFIG_USB_ACM=m | 1106 | CONFIG_USB_ACM=m |
963 | CONFIG_USB_PRINTER=y | 1107 | CONFIG_USB_PRINTER=y |
964 | 1108 | ||
965 | # | 1109 | # |
966 | # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' may also be needed; see USB_STORAGE Help for more information | 1110 | # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' |
1111 | # | ||
1112 | |||
1113 | # | ||
1114 | # may also be needed; see USB_STORAGE Help for more information | ||
967 | # | 1115 | # |
968 | CONFIG_USB_STORAGE=y | 1116 | CONFIG_USB_STORAGE=y |
969 | # CONFIG_USB_STORAGE_DEBUG is not set | 1117 | # CONFIG_USB_STORAGE_DEBUG is not set |
@@ -1074,6 +1222,7 @@ CONFIG_USB_SERIAL_KEYSPAN_USA49WLC=y | |||
1074 | CONFIG_USB_SERIAL_KLSI=m | 1222 | CONFIG_USB_SERIAL_KLSI=m |
1075 | CONFIG_USB_SERIAL_KOBIL_SCT=m | 1223 | CONFIG_USB_SERIAL_KOBIL_SCT=m |
1076 | CONFIG_USB_SERIAL_MCT_U232=m | 1224 | CONFIG_USB_SERIAL_MCT_U232=m |
1225 | # CONFIG_USB_SERIAL_NOKIA_DKU2 is not set | ||
1077 | CONFIG_USB_SERIAL_PL2303=m | 1226 | CONFIG_USB_SERIAL_PL2303=m |
1078 | # CONFIG_USB_SERIAL_HP4X is not set | 1227 | # CONFIG_USB_SERIAL_HP4X is not set |
1079 | CONFIG_USB_SERIAL_SAFE=m | 1228 | CONFIG_USB_SERIAL_SAFE=m |
@@ -1311,6 +1460,20 @@ CONFIG_NLS_ISO8859_15=y | |||
1311 | CONFIG_NLS_UTF8=y | 1460 | CONFIG_NLS_UTF8=y |
1312 | 1461 | ||
1313 | # | 1462 | # |
1463 | # Library routines | ||
1464 | # | ||
1465 | CONFIG_CRC_CCITT=m | ||
1466 | # CONFIG_CRC16 is not set | ||
1467 | CONFIG_CRC32=y | ||
1468 | CONFIG_LIBCRC32C=m | ||
1469 | CONFIG_ZLIB_INFLATE=y | ||
1470 | CONFIG_ZLIB_DEFLATE=m | ||
1471 | CONFIG_TEXTSEARCH=y | ||
1472 | CONFIG_TEXTSEARCH_KMP=m | ||
1473 | CONFIG_TEXTSEARCH_BM=m | ||
1474 | CONFIG_TEXTSEARCH_FSM=m | ||
1475 | |||
1476 | # | ||
1314 | # Profiling support | 1477 | # Profiling support |
1315 | # | 1478 | # |
1316 | CONFIG_PROFILING=y | 1479 | CONFIG_PROFILING=y |
@@ -1331,12 +1494,14 @@ CONFIG_DETECT_SOFTLOCKUP=y | |||
1331 | # CONFIG_DEBUG_KOBJECT is not set | 1494 | # CONFIG_DEBUG_KOBJECT is not set |
1332 | # CONFIG_DEBUG_INFO is not set | 1495 | # CONFIG_DEBUG_INFO is not set |
1333 | CONFIG_DEBUG_FS=y | 1496 | CONFIG_DEBUG_FS=y |
1497 | # CONFIG_DEBUG_VM is not set | ||
1498 | # CONFIG_RCU_TORTURE_TEST is not set | ||
1334 | # CONFIG_DEBUG_STACKOVERFLOW is not set | 1499 | # CONFIG_DEBUG_STACKOVERFLOW is not set |
1335 | # CONFIG_KPROBES is not set | 1500 | # CONFIG_KPROBES is not set |
1336 | # CONFIG_DEBUG_STACK_USAGE is not set | 1501 | # CONFIG_DEBUG_STACK_USAGE is not set |
1337 | # CONFIG_DEBUGGER is not set | 1502 | # CONFIG_DEBUGGER is not set |
1338 | # CONFIG_PPCDBG is not set | ||
1339 | CONFIG_IRQSTACKS=y | 1503 | CONFIG_IRQSTACKS=y |
1504 | CONFIG_BOOTX_TEXT=y | ||
1340 | 1505 | ||
1341 | # | 1506 | # |
1342 | # Security options | 1507 | # Security options |
@@ -1376,17 +1541,3 @@ CONFIG_CRYPTO_TEST=m | |||
1376 | # | 1541 | # |
1377 | # Hardware crypto devices | 1542 | # Hardware crypto devices |
1378 | # | 1543 | # |
1379 | |||
1380 | # | ||
1381 | # Library routines | ||
1382 | # | ||
1383 | CONFIG_CRC_CCITT=m | ||
1384 | # CONFIG_CRC16 is not set | ||
1385 | CONFIG_CRC32=y | ||
1386 | CONFIG_LIBCRC32C=m | ||
1387 | CONFIG_ZLIB_INFLATE=y | ||
1388 | CONFIG_ZLIB_DEFLATE=m | ||
1389 | CONFIG_TEXTSEARCH=y | ||
1390 | CONFIG_TEXTSEARCH_KMP=m | ||
1391 | CONFIG_TEXTSEARCH_BM=m | ||
1392 | CONFIG_TEXTSEARCH_FSM=m | ||
diff --git a/arch/powerpc/kernel/misc_64.S b/arch/powerpc/kernel/misc_64.S index b3e95ff0dba0..ae1433da09b2 100644 --- a/arch/powerpc/kernel/misc_64.S +++ b/arch/powerpc/kernel/misc_64.S | |||
@@ -604,6 +604,76 @@ _GLOBAL(real_writeb) | |||
604 | #endif /* defined(CONFIG_PPC_PMAC) || defined(CONFIG_PPC_MAPLE) */ | 604 | #endif /* defined(CONFIG_PPC_PMAC) || defined(CONFIG_PPC_MAPLE) */ |
605 | 605 | ||
606 | /* | 606 | /* |
607 | * SCOM access functions for 970 (FX only for now) | ||
608 | * | ||
609 | * unsigned long scom970_read(unsigned int address); | ||
610 | * void scom970_write(unsigned int address, unsigned long value); | ||
611 | * | ||
612 | * The address passed in is the 24 bits register address. This code | ||
613 | * is 970 specific and will not check the status bits, so you should | ||
614 | * know what you are doing. | ||
615 | */ | ||
616 | _GLOBAL(scom970_read) | ||
617 | /* interrupts off */ | ||
618 | mfmsr r4 | ||
619 | ori r0,r4,MSR_EE | ||
620 | xori r0,r0,MSR_EE | ||
621 | mtmsrd r0,1 | ||
622 | |||
623 | /* rotate 24 bits SCOM address 8 bits left and mask out it's low 8 bits | ||
624 | * (including parity). On current CPUs they must be 0'd, | ||
625 | * and finally or in RW bit | ||
626 | */ | ||
627 | rlwinm r3,r3,8,0,15 | ||
628 | ori r3,r3,0x8000 | ||
629 | |||
630 | /* do the actual scom read */ | ||
631 | sync | ||
632 | mtspr SPRN_SCOMC,r3 | ||
633 | isync | ||
634 | mfspr r3,SPRN_SCOMD | ||
635 | isync | ||
636 | mfspr r0,SPRN_SCOMC | ||
637 | isync | ||
638 | |||
639 | /* XXX: fixup result on some buggy 970's (ouch ! we lost a bit, bah | ||
640 | * that's the best we can do). Not implemented yet as we don't use | ||
641 | * the scom on any of the bogus CPUs yet, but may have to be done | ||
642 | * ultimately | ||
643 | */ | ||
644 | |||
645 | /* restore interrupts */ | ||
646 | mtmsrd r4,1 | ||
647 | blr | ||
648 | |||
649 | |||
650 | _GLOBAL(scom970_write) | ||
651 | /* interrupts off */ | ||
652 | mfmsr r5 | ||
653 | ori r0,r5,MSR_EE | ||
654 | xori r0,r0,MSR_EE | ||
655 | mtmsrd r0,1 | ||
656 | |||
657 | /* rotate 24 bits SCOM address 8 bits left and mask out it's low 8 bits | ||
658 | * (including parity). On current CPUs they must be 0'd. | ||
659 | */ | ||
660 | |||
661 | rlwinm r3,r3,8,0,15 | ||
662 | |||
663 | sync | ||
664 | mtspr SPRN_SCOMD,r4 /* write data */ | ||
665 | isync | ||
666 | mtspr SPRN_SCOMC,r3 /* write command */ | ||
667 | isync | ||
668 | mfspr 3,SPRN_SCOMC | ||
669 | isync | ||
670 | |||
671 | /* restore interrupts */ | ||
672 | mtmsrd r5,1 | ||
673 | blr | ||
674 | |||
675 | |||
676 | /* | ||
607 | * Create a kernel thread | 677 | * Create a kernel thread |
608 | * kernel_thread(fn, arg, flags) | 678 | * kernel_thread(fn, arg, flags) |
609 | */ | 679 | */ |
diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c index 7f64f0464d44..de69fb37c731 100644 --- a/arch/powerpc/kernel/process.c +++ b/arch/powerpc/kernel/process.c | |||
@@ -46,10 +46,10 @@ | |||
46 | #include <asm/processor.h> | 46 | #include <asm/processor.h> |
47 | #include <asm/mmu.h> | 47 | #include <asm/mmu.h> |
48 | #include <asm/prom.h> | 48 | #include <asm/prom.h> |
49 | #include <asm/machdep.h> | ||
49 | #ifdef CONFIG_PPC64 | 50 | #ifdef CONFIG_PPC64 |
50 | #include <asm/firmware.h> | 51 | #include <asm/firmware.h> |
51 | #include <asm/time.h> | 52 | #include <asm/time.h> |
52 | #include <asm/machdep.h> | ||
53 | #endif | 53 | #endif |
54 | 54 | ||
55 | extern unsigned long _get_SP(void); | 55 | extern unsigned long _get_SP(void); |
@@ -203,10 +203,8 @@ int dump_spe(struct pt_regs *regs, elf_vrregset_t *evrregs) | |||
203 | 203 | ||
204 | int set_dabr(unsigned long dabr) | 204 | int set_dabr(unsigned long dabr) |
205 | { | 205 | { |
206 | #ifdef CONFIG_PPC64 | ||
207 | if (ppc_md.set_dabr) | 206 | if (ppc_md.set_dabr) |
208 | return ppc_md.set_dabr(dabr); | 207 | return ppc_md.set_dabr(dabr); |
209 | #endif | ||
210 | 208 | ||
211 | mtspr(SPRN_DABR, dabr); | 209 | mtspr(SPRN_DABR, dabr); |
212 | return 0; | 210 | return 0; |
diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c index 3675ef4bac90..f645adb57534 100644 --- a/arch/powerpc/kernel/prom.c +++ b/arch/powerpc/kernel/prom.c | |||
@@ -1974,14 +1974,29 @@ EXPORT_SYMBOL(get_property); | |||
1974 | /* | 1974 | /* |
1975 | * Add a property to a node | 1975 | * Add a property to a node |
1976 | */ | 1976 | */ |
1977 | void prom_add_property(struct device_node* np, struct property* prop) | 1977 | int prom_add_property(struct device_node* np, struct property* prop) |
1978 | { | 1978 | { |
1979 | struct property **next = &np->properties; | 1979 | struct property **next; |
1980 | 1980 | ||
1981 | prop->next = NULL; | 1981 | prop->next = NULL; |
1982 | while (*next) | 1982 | write_lock(&devtree_lock); |
1983 | next = &np->properties; | ||
1984 | while (*next) { | ||
1985 | if (strcmp(prop->name, (*next)->name) == 0) { | ||
1986 | /* duplicate ! don't insert it */ | ||
1987 | write_unlock(&devtree_lock); | ||
1988 | return -1; | ||
1989 | } | ||
1983 | next = &(*next)->next; | 1990 | next = &(*next)->next; |
1991 | } | ||
1984 | *next = prop; | 1992 | *next = prop; |
1993 | write_unlock(&devtree_lock); | ||
1994 | |||
1995 | /* try to add to proc as well if it was initialized */ | ||
1996 | if (np->pde) | ||
1997 | proc_device_tree_add_prop(np->pde, prop); | ||
1998 | |||
1999 | return 0; | ||
1985 | } | 2000 | } |
1986 | 2001 | ||
1987 | /* I quickly hacked that one, check against spec ! */ | 2002 | /* I quickly hacked that one, check against spec ! */ |
diff --git a/arch/powerpc/kernel/prom_init.c b/arch/powerpc/kernel/prom_init.c index c758b6624d7b..6dc33d19fc2a 100644 --- a/arch/powerpc/kernel/prom_init.c +++ b/arch/powerpc/kernel/prom_init.c | |||
@@ -403,19 +403,19 @@ static int __init prom_next_node(phandle *nodep) | |||
403 | } | 403 | } |
404 | } | 404 | } |
405 | 405 | ||
406 | static int __init prom_getprop(phandle node, const char *pname, | 406 | static int inline prom_getprop(phandle node, const char *pname, |
407 | void *value, size_t valuelen) | 407 | void *value, size_t valuelen) |
408 | { | 408 | { |
409 | return call_prom("getprop", 4, 1, node, ADDR(pname), | 409 | return call_prom("getprop", 4, 1, node, ADDR(pname), |
410 | (u32)(unsigned long) value, (u32) valuelen); | 410 | (u32)(unsigned long) value, (u32) valuelen); |
411 | } | 411 | } |
412 | 412 | ||
413 | static int __init prom_getproplen(phandle node, const char *pname) | 413 | static int inline prom_getproplen(phandle node, const char *pname) |
414 | { | 414 | { |
415 | return call_prom("getproplen", 2, 1, node, ADDR(pname)); | 415 | return call_prom("getproplen", 2, 1, node, ADDR(pname)); |
416 | } | 416 | } |
417 | 417 | ||
418 | static int __init prom_setprop(phandle node, const char *pname, | 418 | static int inline prom_setprop(phandle node, const char *pname, |
419 | void *value, size_t valuelen) | 419 | void *value, size_t valuelen) |
420 | { | 420 | { |
421 | return call_prom("setprop", 4, 1, node, ADDR(pname), | 421 | return call_prom("setprop", 4, 1, node, ADDR(pname), |
@@ -1408,8 +1408,9 @@ static int __init prom_find_machine_type(void) | |||
1408 | struct prom_t *_prom = &RELOC(prom); | 1408 | struct prom_t *_prom = &RELOC(prom); |
1409 | char compat[256]; | 1409 | char compat[256]; |
1410 | int len, i = 0; | 1410 | int len, i = 0; |
1411 | #ifdef CONFIG_PPC64 | ||
1411 | phandle rtas; | 1412 | phandle rtas; |
1412 | 1413 | #endif | |
1413 | len = prom_getprop(_prom->root, "compatible", | 1414 | len = prom_getprop(_prom->root, "compatible", |
1414 | compat, sizeof(compat)-1); | 1415 | compat, sizeof(compat)-1); |
1415 | if (len > 0) { | 1416 | if (len > 0) { |
@@ -1872,7 +1873,7 @@ static void __init fixup_device_tree(void) | |||
1872 | if (prom_getprop(u3, "device-rev", &u3_rev, sizeof(u3_rev)) | 1873 | if (prom_getprop(u3, "device-rev", &u3_rev, sizeof(u3_rev)) |
1873 | == PROM_ERROR) | 1874 | == PROM_ERROR) |
1874 | return; | 1875 | return; |
1875 | if (u3_rev != 0x35 && u3_rev != 0x37) | 1876 | if (u3_rev < 0x35 || u3_rev > 0x39) |
1876 | return; | 1877 | return; |
1877 | /* does it need fixup ? */ | 1878 | /* does it need fixup ? */ |
1878 | if (prom_getproplen(i2c, "interrupts") > 0) | 1879 | if (prom_getproplen(i2c, "interrupts") > 0) |
diff --git a/arch/powerpc/kernel/rtas.c b/arch/powerpc/kernel/rtas.c index b7fc2d884950..9d4e07f6f1ec 100644 --- a/arch/powerpc/kernel/rtas.c +++ b/arch/powerpc/kernel/rtas.c | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <linux/spinlock.h> | 17 | #include <linux/spinlock.h> |
18 | #include <linux/module.h> | 18 | #include <linux/module.h> |
19 | #include <linux/init.h> | 19 | #include <linux/init.h> |
20 | #include <linux/delay.h> | ||
20 | 21 | ||
21 | #include <asm/prom.h> | 22 | #include <asm/prom.h> |
22 | #include <asm/rtas.h> | 23 | #include <asm/rtas.h> |
@@ -83,7 +84,7 @@ void call_rtas_display_status_delay(unsigned char c) | |||
83 | while (width-- > 0) | 84 | while (width-- > 0) |
84 | call_rtas_display_status(' '); | 85 | call_rtas_display_status(' '); |
85 | width = 16; | 86 | width = 16; |
86 | udelay(500000); | 87 | mdelay(500); |
87 | pending_newline = 1; | 88 | pending_newline = 1; |
88 | } else { | 89 | } else { |
89 | if (pending_newline) { | 90 | if (pending_newline) { |
@@ -608,7 +609,6 @@ asmlinkage int ppc_rtas(struct rtas_args __user *uargs) | |||
608 | return 0; | 609 | return 0; |
609 | } | 610 | } |
610 | 611 | ||
611 | #ifdef CONFIG_SMP | ||
612 | /* This version can't take the spinlock, because it never returns */ | 612 | /* This version can't take the spinlock, because it never returns */ |
613 | 613 | ||
614 | struct rtas_args rtas_stop_self_args = { | 614 | struct rtas_args rtas_stop_self_args = { |
@@ -633,7 +633,6 @@ void rtas_stop_self(void) | |||
633 | 633 | ||
634 | panic("Alas, I survived.\n"); | 634 | panic("Alas, I survived.\n"); |
635 | } | 635 | } |
636 | #endif | ||
637 | 636 | ||
638 | /* | 637 | /* |
639 | * Call early during boot, before mem init or bootmem, to retreive the RTAS | 638 | * Call early during boot, before mem init or bootmem, to retreive the RTAS |
diff --git a/arch/powerpc/kernel/setup-common.c b/arch/powerpc/kernel/setup-common.c index d43fa8c0e5ac..e22856ecb5a0 100644 --- a/arch/powerpc/kernel/setup-common.c +++ b/arch/powerpc/kernel/setup-common.c | |||
@@ -405,6 +405,46 @@ static int __init set_preferred_console(void) | |||
405 | console_initcall(set_preferred_console); | 405 | console_initcall(set_preferred_console); |
406 | #endif /* CONFIG_PPC_MULTIPLATFORM */ | 406 | #endif /* CONFIG_PPC_MULTIPLATFORM */ |
407 | 407 | ||
408 | void __init check_for_initrd(void) | ||
409 | { | ||
410 | #ifdef CONFIG_BLK_DEV_INITRD | ||
411 | unsigned long *prop; | ||
412 | |||
413 | DBG(" -> check_for_initrd()\n"); | ||
414 | |||
415 | if (of_chosen) { | ||
416 | prop = (unsigned long *)get_property(of_chosen, | ||
417 | "linux,initrd-start", NULL); | ||
418 | if (prop != NULL) { | ||
419 | initrd_start = (unsigned long)__va(*prop); | ||
420 | prop = (unsigned long *)get_property(of_chosen, | ||
421 | "linux,initrd-end", NULL); | ||
422 | if (prop != NULL) { | ||
423 | initrd_end = (unsigned long)__va(*prop); | ||
424 | initrd_below_start_ok = 1; | ||
425 | } else | ||
426 | initrd_start = 0; | ||
427 | } | ||
428 | } | ||
429 | |||
430 | /* If we were passed an initrd, set the ROOT_DEV properly if the values | ||
431 | * look sensible. If not, clear initrd reference. | ||
432 | */ | ||
433 | if (initrd_start >= KERNELBASE && initrd_end >= KERNELBASE && | ||
434 | initrd_end > initrd_start) | ||
435 | ROOT_DEV = Root_RAM0; | ||
436 | else { | ||
437 | printk("Bogus initrd %08lx %08lx\n", initrd_start, initrd_end); | ||
438 | initrd_start = initrd_end = 0; | ||
439 | } | ||
440 | |||
441 | if (initrd_start) | ||
442 | printk("Found initrd at 0x%lx:0x%lx\n", initrd_start, initrd_end); | ||
443 | |||
444 | DBG(" <- check_for_initrd()\n"); | ||
445 | #endif /* CONFIG_BLK_DEV_INITRD */ | ||
446 | } | ||
447 | |||
408 | #ifdef CONFIG_SMP | 448 | #ifdef CONFIG_SMP |
409 | 449 | ||
410 | /** | 450 | /** |
diff --git a/arch/powerpc/kernel/setup_32.c b/arch/powerpc/kernel/setup_32.c index b45eedbb4b3a..3af2631e3fab 100644 --- a/arch/powerpc/kernel/setup_32.c +++ b/arch/powerpc/kernel/setup_32.c | |||
@@ -286,6 +286,7 @@ void __init setup_arch(char **cmdline_p) | |||
286 | loops_per_jiffy = 500000000 / HZ; | 286 | loops_per_jiffy = 500000000 / HZ; |
287 | 287 | ||
288 | unflatten_device_tree(); | 288 | unflatten_device_tree(); |
289 | check_for_initrd(); | ||
289 | finish_device_tree(); | 290 | finish_device_tree(); |
290 | 291 | ||
291 | smp_setup_cpu_maps(); | 292 | smp_setup_cpu_maps(); |
diff --git a/arch/powerpc/kernel/setup_64.c b/arch/powerpc/kernel/setup_64.c index b0994050024f..0471e843b6c5 100644 --- a/arch/powerpc/kernel/setup_64.c +++ b/arch/powerpc/kernel/setup_64.c | |||
@@ -41,7 +41,6 @@ | |||
41 | #include <asm/elf.h> | 41 | #include <asm/elf.h> |
42 | #include <asm/machdep.h> | 42 | #include <asm/machdep.h> |
43 | #include <asm/paca.h> | 43 | #include <asm/paca.h> |
44 | #include <asm/ppcdebug.h> | ||
45 | #include <asm/time.h> | 44 | #include <asm/time.h> |
46 | #include <asm/cputable.h> | 45 | #include <asm/cputable.h> |
47 | #include <asm/sections.h> | 46 | #include <asm/sections.h> |
@@ -60,6 +59,7 @@ | |||
60 | #include <asm/firmware.h> | 59 | #include <asm/firmware.h> |
61 | #include <asm/systemcfg.h> | 60 | #include <asm/systemcfg.h> |
62 | #include <asm/xmon.h> | 61 | #include <asm/xmon.h> |
62 | #include <asm/udbg.h> | ||
63 | 63 | ||
64 | #ifdef DEBUG | 64 | #ifdef DEBUG |
65 | #define DBG(fmt...) udbg_printf(fmt) | 65 | #define DBG(fmt...) udbg_printf(fmt) |
@@ -244,12 +244,6 @@ void __init early_setup(unsigned long dt_ptr) | |||
244 | DBG(" -> early_setup()\n"); | 244 | DBG(" -> early_setup()\n"); |
245 | 245 | ||
246 | /* | 246 | /* |
247 | * Fill the default DBG level (do we want to keep | ||
248 | * that old mecanism around forever ?) | ||
249 | */ | ||
250 | ppcdbg_initialize(); | ||
251 | |||
252 | /* | ||
253 | * Do early initializations using the flattened device | 247 | * Do early initializations using the flattened device |
254 | * tree, like retreiving the physical memory map or | 248 | * tree, like retreiving the physical memory map or |
255 | * calculating/retreiving the hash table size | 249 | * calculating/retreiving the hash table size |
@@ -401,43 +395,6 @@ static void __init initialize_cache_info(void) | |||
401 | DBG(" <- initialize_cache_info()\n"); | 395 | DBG(" <- initialize_cache_info()\n"); |
402 | } | 396 | } |
403 | 397 | ||
404 | static void __init check_for_initrd(void) | ||
405 | { | ||
406 | #ifdef CONFIG_BLK_DEV_INITRD | ||
407 | u64 *prop; | ||
408 | |||
409 | DBG(" -> check_for_initrd()\n"); | ||
410 | |||
411 | if (of_chosen) { | ||
412 | prop = (u64 *)get_property(of_chosen, | ||
413 | "linux,initrd-start", NULL); | ||
414 | if (prop != NULL) { | ||
415 | initrd_start = (unsigned long)__va(*prop); | ||
416 | prop = (u64 *)get_property(of_chosen, | ||
417 | "linux,initrd-end", NULL); | ||
418 | if (prop != NULL) { | ||
419 | initrd_end = (unsigned long)__va(*prop); | ||
420 | initrd_below_start_ok = 1; | ||
421 | } else | ||
422 | initrd_start = 0; | ||
423 | } | ||
424 | } | ||
425 | |||
426 | /* If we were passed an initrd, set the ROOT_DEV properly if the values | ||
427 | * look sensible. If not, clear initrd reference. | ||
428 | */ | ||
429 | if (initrd_start >= KERNELBASE && initrd_end >= KERNELBASE && | ||
430 | initrd_end > initrd_start) | ||
431 | ROOT_DEV = Root_RAM0; | ||
432 | else | ||
433 | initrd_start = initrd_end = 0; | ||
434 | |||
435 | if (initrd_start) | ||
436 | printk("Found initrd at 0x%lx:0x%lx\n", initrd_start, initrd_end); | ||
437 | |||
438 | DBG(" <- check_for_initrd()\n"); | ||
439 | #endif /* CONFIG_BLK_DEV_INITRD */ | ||
440 | } | ||
441 | 398 | ||
442 | /* | 399 | /* |
443 | * Do some initial setup of the system. The parameters are those which | 400 | * Do some initial setup of the system. The parameters are those which |
@@ -521,7 +478,6 @@ void __init setup_system(void) | |||
521 | 478 | ||
522 | printk("-----------------------------------------------------\n"); | 479 | printk("-----------------------------------------------------\n"); |
523 | printk("ppc64_pft_size = 0x%lx\n", ppc64_pft_size); | 480 | printk("ppc64_pft_size = 0x%lx\n", ppc64_pft_size); |
524 | printk("ppc64_debug_switch = 0x%lx\n", ppc64_debug_switch); | ||
525 | printk("ppc64_interrupt_controller = 0x%ld\n", ppc64_interrupt_controller); | 481 | printk("ppc64_interrupt_controller = 0x%ld\n", ppc64_interrupt_controller); |
526 | printk("systemcfg = 0x%p\n", systemcfg); | 482 | printk("systemcfg = 0x%p\n", systemcfg); |
527 | printk("systemcfg->platform = 0x%x\n", systemcfg->platform); | 483 | printk("systemcfg->platform = 0x%x\n", systemcfg->platform); |
diff --git a/arch/powerpc/kernel/signal_32.c b/arch/powerpc/kernel/signal_32.c index 876c57c11365..081d931eae48 100644 --- a/arch/powerpc/kernel/signal_32.c +++ b/arch/powerpc/kernel/signal_32.c | |||
@@ -44,7 +44,6 @@ | |||
44 | #include <asm/cacheflush.h> | 44 | #include <asm/cacheflush.h> |
45 | #ifdef CONFIG_PPC64 | 45 | #ifdef CONFIG_PPC64 |
46 | #include "ppc32.h" | 46 | #include "ppc32.h" |
47 | #include <asm/ppcdebug.h> | ||
48 | #include <asm/unistd.h> | 47 | #include <asm/unistd.h> |
49 | #include <asm/vdso.h> | 48 | #include <asm/vdso.h> |
50 | #else | 49 | #else |
diff --git a/arch/powerpc/kernel/signal_64.c b/arch/powerpc/kernel/signal_64.c index ec9d0984b6a0..58194e150711 100644 --- a/arch/powerpc/kernel/signal_64.c +++ b/arch/powerpc/kernel/signal_64.c | |||
@@ -33,7 +33,6 @@ | |||
33 | #include <asm/ucontext.h> | 33 | #include <asm/ucontext.h> |
34 | #include <asm/uaccess.h> | 34 | #include <asm/uaccess.h> |
35 | #include <asm/pgtable.h> | 35 | #include <asm/pgtable.h> |
36 | #include <asm/ppcdebug.h> | ||
37 | #include <asm/unistd.h> | 36 | #include <asm/unistd.h> |
38 | #include <asm/cacheflush.h> | 37 | #include <asm/cacheflush.h> |
39 | #include <asm/vdso.h> | 38 | #include <asm/vdso.h> |
diff --git a/arch/powerpc/kernel/smp.c b/arch/powerpc/kernel/smp.c index 1794a694a928..5c330c3366e4 100644 --- a/arch/powerpc/kernel/smp.c +++ b/arch/powerpc/kernel/smp.c | |||
@@ -40,7 +40,6 @@ | |||
40 | #include <asm/prom.h> | 40 | #include <asm/prom.h> |
41 | #include <asm/smp.h> | 41 | #include <asm/smp.h> |
42 | #include <asm/time.h> | 42 | #include <asm/time.h> |
43 | #include <asm/xmon.h> | ||
44 | #include <asm/machdep.h> | 43 | #include <asm/machdep.h> |
45 | #include <asm/cputable.h> | 44 | #include <asm/cputable.h> |
46 | #include <asm/system.h> | 45 | #include <asm/system.h> |
diff --git a/arch/powerpc/kernel/time.c b/arch/powerpc/kernel/time.c index b1c89bc4bf90..a6282b625b44 100644 --- a/arch/powerpc/kernel/time.c +++ b/arch/powerpc/kernel/time.c | |||
@@ -61,6 +61,7 @@ | |||
61 | #include <asm/prom.h> | 61 | #include <asm/prom.h> |
62 | #include <asm/irq.h> | 62 | #include <asm/irq.h> |
63 | #include <asm/div64.h> | 63 | #include <asm/div64.h> |
64 | #include <asm/smp.h> | ||
64 | #ifdef CONFIG_PPC64 | 65 | #ifdef CONFIG_PPC64 |
65 | #include <asm/systemcfg.h> | 66 | #include <asm/systemcfg.h> |
66 | #include <asm/firmware.h> | 67 | #include <asm/firmware.h> |
@@ -119,10 +120,6 @@ static unsigned adjusting_time = 0; | |||
119 | unsigned long ppc_proc_freq; | 120 | unsigned long ppc_proc_freq; |
120 | unsigned long ppc_tb_freq; | 121 | unsigned long ppc_tb_freq; |
121 | 122 | ||
122 | #ifdef CONFIG_PPC32 /* XXX for now */ | ||
123 | #define boot_cpuid 0 | ||
124 | #endif | ||
125 | |||
126 | u64 tb_last_jiffy __cacheline_aligned_in_smp; | 123 | u64 tb_last_jiffy __cacheline_aligned_in_smp; |
127 | unsigned long tb_last_stamp; | 124 | unsigned long tb_last_stamp; |
128 | 125 | ||
diff --git a/arch/powerpc/kernel/traps.c b/arch/powerpc/kernel/traps.c index 07e5ee40b870..0578f8387603 100644 --- a/arch/powerpc/kernel/traps.c +++ b/arch/powerpc/kernel/traps.c | |||
@@ -39,7 +39,6 @@ | |||
39 | #include <asm/io.h> | 39 | #include <asm/io.h> |
40 | #include <asm/machdep.h> | 40 | #include <asm/machdep.h> |
41 | #include <asm/rtas.h> | 41 | #include <asm/rtas.h> |
42 | #include <asm/xmon.h> | ||
43 | #include <asm/pmc.h> | 42 | #include <asm/pmc.h> |
44 | #ifdef CONFIG_PPC32 | 43 | #ifdef CONFIG_PPC32 |
45 | #include <asm/reg.h> | 44 | #include <asm/reg.h> |
@@ -748,22 +747,12 @@ static int check_bug_trap(struct pt_regs *regs) | |||
748 | return 0; | 747 | return 0; |
749 | if (bug->line & BUG_WARNING_TRAP) { | 748 | if (bug->line & BUG_WARNING_TRAP) { |
750 | /* this is a WARN_ON rather than BUG/BUG_ON */ | 749 | /* this is a WARN_ON rather than BUG/BUG_ON */ |
751 | #ifdef CONFIG_XMON | ||
752 | xmon_printf(KERN_ERR "Badness in %s at %s:%ld\n", | ||
753 | bug->function, bug->file, | ||
754 | bug->line & ~BUG_WARNING_TRAP); | ||
755 | #endif /* CONFIG_XMON */ | ||
756 | printk(KERN_ERR "Badness in %s at %s:%ld\n", | 750 | printk(KERN_ERR "Badness in %s at %s:%ld\n", |
757 | bug->function, bug->file, | 751 | bug->function, bug->file, |
758 | bug->line & ~BUG_WARNING_TRAP); | 752 | bug->line & ~BUG_WARNING_TRAP); |
759 | dump_stack(); | 753 | dump_stack(); |
760 | return 1; | 754 | return 1; |
761 | } | 755 | } |
762 | #ifdef CONFIG_XMON | ||
763 | xmon_printf(KERN_CRIT "kernel BUG in %s at %s:%ld!\n", | ||
764 | bug->function, bug->file, bug->line); | ||
765 | xmon(regs); | ||
766 | #endif /* CONFIG_XMON */ | ||
767 | printk(KERN_CRIT "kernel BUG in %s at %s:%ld!\n", | 756 | printk(KERN_CRIT "kernel BUG in %s at %s:%ld!\n", |
768 | bug->function, bug->file, bug->line); | 757 | bug->function, bug->file, bug->line); |
769 | 758 | ||
@@ -898,10 +887,6 @@ void altivec_unavailable_exception(struct pt_regs *regs) | |||
898 | die("Unrecoverable VMX/Altivec Unavailable Exception", regs, SIGABRT); | 887 | die("Unrecoverable VMX/Altivec Unavailable Exception", regs, SIGABRT); |
899 | } | 888 | } |
900 | 889 | ||
901 | #ifdef CONFIG_PPC64 | ||
902 | extern perf_irq_t perf_irq; | ||
903 | #endif | ||
904 | |||
905 | #if defined(CONFIG_PPC64) || defined(CONFIG_E500) | 890 | #if defined(CONFIG_PPC64) || defined(CONFIG_E500) |
906 | void performance_monitor_exception(struct pt_regs *regs) | 891 | void performance_monitor_exception(struct pt_regs *regs) |
907 | { | 892 | { |
diff --git a/arch/powerpc/kernel/vio.c b/arch/powerpc/kernel/vio.c index 97082a4203ad..71a6addf9f7f 100644 --- a/arch/powerpc/kernel/vio.c +++ b/arch/powerpc/kernel/vio.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <asm/iommu.h> | 21 | #include <asm/iommu.h> |
22 | #include <asm/dma.h> | 22 | #include <asm/dma.h> |
23 | #include <asm/vio.h> | 23 | #include <asm/vio.h> |
24 | #include <asm/prom.h> | ||
24 | 25 | ||
25 | static const struct vio_device_id *vio_match_device( | 26 | static const struct vio_device_id *vio_match_device( |
26 | const struct vio_device_id *, const struct vio_dev *); | 27 | const struct vio_device_id *, const struct vio_dev *); |
@@ -265,7 +266,33 @@ static int vio_bus_match(struct device *dev, struct device_driver *drv) | |||
265 | return (ids != NULL) && (vio_match_device(ids, vio_dev) != NULL); | 266 | return (ids != NULL) && (vio_match_device(ids, vio_dev) != NULL); |
266 | } | 267 | } |
267 | 268 | ||
269 | static int vio_hotplug(struct device *dev, char **envp, int num_envp, | ||
270 | char *buffer, int buffer_size) | ||
271 | { | ||
272 | const struct vio_dev *vio_dev = to_vio_dev(dev); | ||
273 | char *cp; | ||
274 | int length; | ||
275 | |||
276 | if (!num_envp) | ||
277 | return -ENOMEM; | ||
278 | |||
279 | if (!vio_dev->dev.platform_data) | ||
280 | return -ENODEV; | ||
281 | cp = (char *)get_property(vio_dev->dev.platform_data, "compatible", &length); | ||
282 | if (!cp) | ||
283 | return -ENODEV; | ||
284 | |||
285 | envp[0] = buffer; | ||
286 | length = scnprintf(buffer, buffer_size, "MODALIAS=vio:T%sS%s", | ||
287 | vio_dev->type, cp); | ||
288 | if (buffer_size - length <= 0) | ||
289 | return -ENOMEM; | ||
290 | envp[1] = NULL; | ||
291 | return 0; | ||
292 | } | ||
293 | |||
268 | struct bus_type vio_bus_type = { | 294 | struct bus_type vio_bus_type = { |
269 | .name = "vio", | 295 | .name = "vio", |
296 | .hotplug = vio_hotplug, | ||
270 | .match = vio_bus_match, | 297 | .match = vio_bus_match, |
271 | }; | 298 | }; |
diff --git a/arch/powerpc/lib/locks.c b/arch/powerpc/lib/locks.c index 2a912f411eb4..35bd03c41dd1 100644 --- a/arch/powerpc/lib/locks.c +++ b/arch/powerpc/lib/locks.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #if defined(CONFIG_PPC_SPLPAR) || defined(CONFIG_PPC_ISERIES) | 23 | #if defined(CONFIG_PPC_SPLPAR) || defined(CONFIG_PPC_ISERIES) |
24 | #include <asm/hvcall.h> | 24 | #include <asm/hvcall.h> |
25 | #include <asm/iseries/hv_call.h> | 25 | #include <asm/iseries/hv_call.h> |
26 | #include <asm/smp.h> | ||
26 | 27 | ||
27 | void __spin_yield(raw_spinlock_t *lock) | 28 | void __spin_yield(raw_spinlock_t *lock) |
28 | { | 29 | { |
diff --git a/arch/powerpc/mm/fault.c b/arch/powerpc/mm/fault.c index 841d8b6323a8..93d4fbfdb724 100644 --- a/arch/powerpc/mm/fault.c +++ b/arch/powerpc/mm/fault.c | |||
@@ -389,5 +389,22 @@ void bad_page_fault(struct pt_regs *regs, unsigned long address, int sig) | |||
389 | } | 389 | } |
390 | 390 | ||
391 | /* kernel has accessed a bad area */ | 391 | /* kernel has accessed a bad area */ |
392 | |||
393 | printk(KERN_ALERT "Unable to handle kernel paging request for "); | ||
394 | switch (regs->trap) { | ||
395 | case 0x300: | ||
396 | case 0x380: | ||
397 | printk("data at address 0x%08lx\n", regs->dar); | ||
398 | break; | ||
399 | case 0x400: | ||
400 | case 0x480: | ||
401 | printk("instruction fetch\n"); | ||
402 | break; | ||
403 | default: | ||
404 | printk("unknown fault\n"); | ||
405 | } | ||
406 | printk(KERN_ALERT "Faulting instruction address: 0x%08lx\n", | ||
407 | regs->nip); | ||
408 | |||
392 | die("Kernel access of bad area", regs, sig); | 409 | die("Kernel access of bad area", regs, sig); |
393 | } | 410 | } |
diff --git a/arch/powerpc/mm/hash_utils_64.c b/arch/powerpc/mm/hash_utils_64.c index f15dfb92dec0..22e474876133 100644 --- a/arch/powerpc/mm/hash_utils_64.c +++ b/arch/powerpc/mm/hash_utils_64.c | |||
@@ -33,7 +33,6 @@ | |||
33 | #include <linux/init.h> | 33 | #include <linux/init.h> |
34 | #include <linux/signal.h> | 34 | #include <linux/signal.h> |
35 | 35 | ||
36 | #include <asm/ppcdebug.h> | ||
37 | #include <asm/processor.h> | 36 | #include <asm/processor.h> |
38 | #include <asm/pgtable.h> | 37 | #include <asm/pgtable.h> |
39 | #include <asm/mmu.h> | 38 | #include <asm/mmu.h> |
@@ -409,12 +408,6 @@ void __init htab_initialize(void) | |||
409 | htab_size_bytes = htab_get_table_size(); | 408 | htab_size_bytes = htab_get_table_size(); |
410 | pteg_count = htab_size_bytes >> 7; | 409 | pteg_count = htab_size_bytes >> 7; |
411 | 410 | ||
412 | /* For debug, make the HTAB 1/8 as big as it normally would be. */ | ||
413 | ifppcdebug(PPCDBG_HTABSIZE) { | ||
414 | pteg_count >>= 3; | ||
415 | htab_size_bytes = pteg_count << 7; | ||
416 | } | ||
417 | |||
418 | htab_hash_mask = pteg_count - 1; | 411 | htab_hash_mask = pteg_count - 1; |
419 | 412 | ||
420 | if (systemcfg->platform & PLATFORM_LPAR) { | 413 | if (systemcfg->platform & PLATFORM_LPAR) { |
@@ -514,6 +507,9 @@ unsigned int hash_page_do_lazy_icache(unsigned int pp, pte_t pte, int trap) | |||
514 | { | 507 | { |
515 | struct page *page; | 508 | struct page *page; |
516 | 509 | ||
510 | if (!pfn_valid(pte_pfn(pte))) | ||
511 | return pp; | ||
512 | |||
517 | page = pte_page(pte); | 513 | page = pte_page(pte); |
518 | 514 | ||
519 | /* page is dirty */ | 515 | /* page is dirty */ |
diff --git a/arch/powerpc/mm/init_64.c b/arch/powerpc/mm/init_64.c index dfe7fa37b41a..ce974c83d88a 100644 --- a/arch/powerpc/mm/init_64.c +++ b/arch/powerpc/mm/init_64.c | |||
@@ -57,7 +57,6 @@ | |||
57 | #include <asm/processor.h> | 57 | #include <asm/processor.h> |
58 | #include <asm/mmzone.h> | 58 | #include <asm/mmzone.h> |
59 | #include <asm/cputable.h> | 59 | #include <asm/cputable.h> |
60 | #include <asm/ppcdebug.h> | ||
61 | #include <asm/sections.h> | 60 | #include <asm/sections.h> |
62 | #include <asm/system.h> | 61 | #include <asm/system.h> |
63 | #include <asm/iommu.h> | 62 | #include <asm/iommu.h> |
diff --git a/arch/powerpc/mm/mem.c b/arch/powerpc/mm/mem.c index 7faa46b71f21..6f55efd9be95 100644 --- a/arch/powerpc/mm/mem.c +++ b/arch/powerpc/mm/mem.c | |||
@@ -358,7 +358,7 @@ void __init mem_init(void) | |||
358 | } | 358 | } |
359 | 359 | ||
360 | codesize = (unsigned long)&_sdata - (unsigned long)&_stext; | 360 | codesize = (unsigned long)&_sdata - (unsigned long)&_stext; |
361 | datasize = (unsigned long)&__init_begin - (unsigned long)&_sdata; | 361 | datasize = (unsigned long)&_edata - (unsigned long)&_sdata; |
362 | initsize = (unsigned long)&__init_end - (unsigned long)&__init_begin; | 362 | initsize = (unsigned long)&__init_end - (unsigned long)&__init_begin; |
363 | bsssize = (unsigned long)&__bss_stop - (unsigned long)&__bss_start; | 363 | bsssize = (unsigned long)&__bss_stop - (unsigned long)&__bss_start; |
364 | 364 | ||
diff --git a/arch/powerpc/mm/numa.c b/arch/powerpc/mm/numa.c index 4035cad8d7f1..da09ba03c424 100644 --- a/arch/powerpc/mm/numa.c +++ b/arch/powerpc/mm/numa.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <asm/machdep.h> | 21 | #include <asm/machdep.h> |
22 | #include <asm/abs_addr.h> | 22 | #include <asm/abs_addr.h> |
23 | #include <asm/system.h> | 23 | #include <asm/system.h> |
24 | #include <asm/smp.h> | ||
24 | 25 | ||
25 | static int numa_enabled = 1; | 26 | static int numa_enabled = 1; |
26 | 27 | ||
diff --git a/arch/powerpc/mm/pgtable_64.c b/arch/powerpc/mm/pgtable_64.c index 51b786940971..900842451bd3 100644 --- a/arch/powerpc/mm/pgtable_64.c +++ b/arch/powerpc/mm/pgtable_64.c | |||
@@ -59,7 +59,6 @@ | |||
59 | #include <asm/processor.h> | 59 | #include <asm/processor.h> |
60 | #include <asm/mmzone.h> | 60 | #include <asm/mmzone.h> |
61 | #include <asm/cputable.h> | 61 | #include <asm/cputable.h> |
62 | #include <asm/ppcdebug.h> | ||
63 | #include <asm/sections.h> | 62 | #include <asm/sections.h> |
64 | #include <asm/system.h> | 63 | #include <asm/system.h> |
65 | #include <asm/iommu.h> | 64 | #include <asm/iommu.h> |
diff --git a/arch/powerpc/oprofile/op_model_power4.c b/arch/powerpc/oprofile/op_model_power4.c index 886449315847..c4ee5478427b 100644 --- a/arch/powerpc/oprofile/op_model_power4.c +++ b/arch/powerpc/oprofile/op_model_power4.c | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <asm/systemcfg.h> | 17 | #include <asm/systemcfg.h> |
18 | #include <asm/rtas.h> | 18 | #include <asm/rtas.h> |
19 | #include <asm/oprofile_impl.h> | 19 | #include <asm/oprofile_impl.h> |
20 | #include <asm/reg.h> | ||
20 | 21 | ||
21 | #define dbg(args...) | 22 | #define dbg(args...) |
22 | 23 | ||
@@ -81,6 +82,26 @@ static void power4_reg_setup(struct op_counter_config *ctr, | |||
81 | 82 | ||
82 | extern void ppc64_enable_pmcs(void); | 83 | extern void ppc64_enable_pmcs(void); |
83 | 84 | ||
85 | /* | ||
86 | * Older CPUs require the MMCRA sample bit to be always set, but newer | ||
87 | * CPUs only want it set for some groups. Eventually we will remove all | ||
88 | * knowledge of this bit in the kernel, oprofile userspace should be | ||
89 | * setting it when required. | ||
90 | * | ||
91 | * In order to keep current installations working we force the bit for | ||
92 | * those older CPUs. Once everyone has updated their oprofile userspace we | ||
93 | * can remove this hack. | ||
94 | */ | ||
95 | static inline int mmcra_must_set_sample(void) | ||
96 | { | ||
97 | if (__is_processor(PV_POWER4) || __is_processor(PV_POWER4p) || | ||
98 | __is_processor(PV_970) || __is_processor(PV_970FX) || | ||
99 | __is_processor(PV_970MP)) | ||
100 | return 1; | ||
101 | |||
102 | return 0; | ||
103 | } | ||
104 | |||
84 | static void power4_cpu_setup(void *unused) | 105 | static void power4_cpu_setup(void *unused) |
85 | { | 106 | { |
86 | unsigned int mmcr0 = mmcr0_val; | 107 | unsigned int mmcr0 = mmcr0_val; |
@@ -98,7 +119,8 @@ static void power4_cpu_setup(void *unused) | |||
98 | 119 | ||
99 | mtspr(SPRN_MMCR1, mmcr1_val); | 120 | mtspr(SPRN_MMCR1, mmcr1_val); |
100 | 121 | ||
101 | mmcra |= MMCRA_SAMPLE_ENABLE; | 122 | if (mmcra_must_set_sample()) |
123 | mmcra |= MMCRA_SAMPLE_ENABLE; | ||
102 | mtspr(SPRN_MMCRA, mmcra); | 124 | mtspr(SPRN_MMCRA, mmcra); |
103 | 125 | ||
104 | dbg("setup on cpu %d, mmcr0 %lx\n", smp_processor_id(), | 126 | dbg("setup on cpu %d, mmcr0 %lx\n", smp_processor_id(), |
diff --git a/arch/powerpc/platforms/iseries/irq.c b/arch/powerpc/platforms/iseries/irq.c index c1135912cc05..a06603d84a45 100644 --- a/arch/powerpc/platforms/iseries/irq.c +++ b/arch/powerpc/platforms/iseries/irq.c | |||
@@ -35,7 +35,6 @@ | |||
35 | #include <linux/irq.h> | 35 | #include <linux/irq.h> |
36 | #include <linux/spinlock.h> | 36 | #include <linux/spinlock.h> |
37 | 37 | ||
38 | #include <asm/ppcdebug.h> | ||
39 | #include <asm/iseries/hv_types.h> | 38 | #include <asm/iseries/hv_types.h> |
40 | #include <asm/iseries/hv_lp_event.h> | 39 | #include <asm/iseries/hv_lp_event.h> |
41 | #include <asm/iseries/hv_call_xm.h> | 40 | #include <asm/iseries/hv_call_xm.h> |
@@ -227,8 +226,6 @@ static void iSeries_enable_IRQ(unsigned int irq) | |||
227 | /* Unmask secondary INTA */ | 226 | /* Unmask secondary INTA */ |
228 | mask = 0x80000000; | 227 | mask = 0x80000000; |
229 | HvCallPci_unmaskInterrupts(bus, subBus, deviceId, mask); | 228 | HvCallPci_unmaskInterrupts(bus, subBus, deviceId, mask); |
230 | PPCDBG(PPCDBG_BUSWALK, "iSeries_enable_IRQ 0x%02X.%02X.%02X 0x%04X\n", | ||
231 | bus, subBus, deviceId, irq); | ||
232 | } | 229 | } |
233 | 230 | ||
234 | /* This is called by iSeries_activate_IRQs */ | 231 | /* This is called by iSeries_activate_IRQs */ |
@@ -310,8 +307,6 @@ static void iSeries_disable_IRQ(unsigned int irq) | |||
310 | /* Mask secondary INTA */ | 307 | /* Mask secondary INTA */ |
311 | mask = 0x80000000; | 308 | mask = 0x80000000; |
312 | HvCallPci_maskInterrupts(bus, subBus, deviceId, mask); | 309 | HvCallPci_maskInterrupts(bus, subBus, deviceId, mask); |
313 | PPCDBG(PPCDBG_BUSWALK, "iSeries_disable_IRQ 0x%02X.%02X.%02X 0x%04X\n", | ||
314 | bus, subBus, deviceId, irq); | ||
315 | } | 310 | } |
316 | 311 | ||
317 | /* | 312 | /* |
diff --git a/arch/powerpc/platforms/iseries/pci.c b/arch/powerpc/platforms/iseries/pci.c index 7d7d5884343f..4b75131773a6 100644 --- a/arch/powerpc/platforms/iseries/pci.c +++ b/arch/powerpc/platforms/iseries/pci.c | |||
@@ -32,7 +32,6 @@ | |||
32 | #include <asm/prom.h> | 32 | #include <asm/prom.h> |
33 | #include <asm/machdep.h> | 33 | #include <asm/machdep.h> |
34 | #include <asm/pci-bridge.h> | 34 | #include <asm/pci-bridge.h> |
35 | #include <asm/ppcdebug.h> | ||
36 | #include <asm/iommu.h> | 35 | #include <asm/iommu.h> |
37 | #include <asm/abs_addr.h> | 36 | #include <asm/abs_addr.h> |
38 | 37 | ||
@@ -207,10 +206,6 @@ static struct device_node *build_device_node(HvBusNumber Bus, | |||
207 | struct device_node *node; | 206 | struct device_node *node; |
208 | struct pci_dn *pdn; | 207 | struct pci_dn *pdn; |
209 | 208 | ||
210 | PPCDBG(PPCDBG_BUSWALK, | ||
211 | "-build_device_node 0x%02X.%02X.%02X Function: %02X\n", | ||
212 | Bus, SubBus, AgentId, Function); | ||
213 | |||
214 | node = kmalloc(sizeof(struct device_node), GFP_KERNEL); | 209 | node = kmalloc(sizeof(struct device_node), GFP_KERNEL); |
215 | if (node == NULL) | 210 | if (node == NULL) |
216 | return NULL; | 211 | return NULL; |
@@ -243,8 +238,6 @@ unsigned long __init find_and_init_phbs(void) | |||
243 | struct pci_controller *phb; | 238 | struct pci_controller *phb; |
244 | HvBusNumber bus; | 239 | HvBusNumber bus; |
245 | 240 | ||
246 | PPCDBG(PPCDBG_BUSWALK, "find_and_init_phbs Entry\n"); | ||
247 | |||
248 | /* Check all possible buses. */ | 241 | /* Check all possible buses. */ |
249 | for (bus = 0; bus < 256; bus++) { | 242 | for (bus = 0; bus < 256; bus++) { |
250 | int ret = HvCallXm_testBus(bus); | 243 | int ret = HvCallXm_testBus(bus); |
@@ -261,9 +254,6 @@ unsigned long __init find_and_init_phbs(void) | |||
261 | phb->last_busno = bus; | 254 | phb->last_busno = bus; |
262 | phb->ops = &iSeries_pci_ops; | 255 | phb->ops = &iSeries_pci_ops; |
263 | 256 | ||
264 | PPCDBG(PPCDBG_BUSWALK, "PCI:Create iSeries pci_controller(%p), Bus: %04X\n", | ||
265 | phb, bus); | ||
266 | |||
267 | /* Find and connect the devices. */ | 257 | /* Find and connect the devices. */ |
268 | scan_PHB_slots(phb); | 258 | scan_PHB_slots(phb); |
269 | } | 259 | } |
@@ -285,11 +275,9 @@ unsigned long __init find_and_init_phbs(void) | |||
285 | */ | 275 | */ |
286 | void iSeries_pcibios_init(void) | 276 | void iSeries_pcibios_init(void) |
287 | { | 277 | { |
288 | PPCDBG(PPCDBG_BUSWALK, "iSeries_pcibios_init Entry.\n"); | ||
289 | iomm_table_initialize(); | 278 | iomm_table_initialize(); |
290 | find_and_init_phbs(); | 279 | find_and_init_phbs(); |
291 | io_page_mask = -1; | 280 | io_page_mask = -1; |
292 | PPCDBG(PPCDBG_BUSWALK, "iSeries_pcibios_init Exit.\n"); | ||
293 | } | 281 | } |
294 | 282 | ||
295 | /* | 283 | /* |
@@ -301,8 +289,6 @@ void __init iSeries_pci_final_fixup(void) | |||
301 | struct device_node *node; | 289 | struct device_node *node; |
302 | int DeviceCount = 0; | 290 | int DeviceCount = 0; |
303 | 291 | ||
304 | PPCDBG(PPCDBG_BUSWALK, "iSeries_pcibios_fixup Entry.\n"); | ||
305 | |||
306 | /* Fix up at the device node and pci_dev relationship */ | 292 | /* Fix up at the device node and pci_dev relationship */ |
307 | mf_display_src(0xC9000100); | 293 | mf_display_src(0xC9000100); |
308 | 294 | ||
@@ -316,9 +302,6 @@ void __init iSeries_pci_final_fixup(void) | |||
316 | ++DeviceCount; | 302 | ++DeviceCount; |
317 | pdev->sysdata = (void *)node; | 303 | pdev->sysdata = (void *)node; |
318 | PCI_DN(node)->pcidev = pdev; | 304 | PCI_DN(node)->pcidev = pdev; |
319 | PPCDBG(PPCDBG_BUSWALK, | ||
320 | "pdev 0x%p <==> DevNode 0x%p\n", | ||
321 | pdev, node); | ||
322 | allocate_device_bars(pdev); | 305 | allocate_device_bars(pdev); |
323 | iSeries_Device_Information(pdev, DeviceCount); | 306 | iSeries_Device_Information(pdev, DeviceCount); |
324 | iommu_devnode_init_iSeries(node); | 307 | iommu_devnode_init_iSeries(node); |
@@ -333,13 +316,10 @@ void __init iSeries_pci_final_fixup(void) | |||
333 | 316 | ||
334 | void pcibios_fixup_bus(struct pci_bus *PciBus) | 317 | void pcibios_fixup_bus(struct pci_bus *PciBus) |
335 | { | 318 | { |
336 | PPCDBG(PPCDBG_BUSWALK, "iSeries_pcibios_fixup_bus(0x%04X) Entry.\n", | ||
337 | PciBus->number); | ||
338 | } | 319 | } |
339 | 320 | ||
340 | void pcibios_fixup_resources(struct pci_dev *pdev) | 321 | void pcibios_fixup_resources(struct pci_dev *pdev) |
341 | { | 322 | { |
342 | PPCDBG(PPCDBG_BUSWALK, "fixup_resources pdev %p\n", pdev); | ||
343 | } | 323 | } |
344 | 324 | ||
345 | /* | 325 | /* |
@@ -401,9 +381,6 @@ static void scan_EADS_bridge(HvBusNumber bus, HvSubBusNumber SubBus, | |||
401 | printk("found device at bus %d idsel %d func %d (AgentId %x)\n", | 381 | printk("found device at bus %d idsel %d func %d (AgentId %x)\n", |
402 | bus, IdSel, Function, AgentId); | 382 | bus, IdSel, Function, AgentId); |
403 | /* Connect EADs: 0x18.00.12 = 0x00 */ | 383 | /* Connect EADs: 0x18.00.12 = 0x00 */ |
404 | PPCDBG(PPCDBG_BUSWALK, | ||
405 | "PCI:Connect EADs: 0x%02X.%02X.%02X\n", | ||
406 | bus, SubBus, AgentId); | ||
407 | HvRc = HvCallPci_getBusUnitInfo(bus, SubBus, AgentId, | 384 | HvRc = HvCallPci_getBusUnitInfo(bus, SubBus, AgentId, |
408 | iseries_hv_addr(BridgeInfo), | 385 | iseries_hv_addr(BridgeInfo), |
409 | sizeof(struct HvCallPci_BridgeInfo)); | 386 | sizeof(struct HvCallPci_BridgeInfo)); |
@@ -414,14 +391,6 @@ static void scan_EADS_bridge(HvBusNumber bus, HvSubBusNumber SubBus, | |||
414 | BridgeInfo->maxAgents, | 391 | BridgeInfo->maxAgents, |
415 | BridgeInfo->maxSubBusNumber, | 392 | BridgeInfo->maxSubBusNumber, |
416 | BridgeInfo->logicalSlotNumber); | 393 | BridgeInfo->logicalSlotNumber); |
417 | PPCDBG(PPCDBG_BUSWALK, | ||
418 | "PCI: BridgeInfo, Type:0x%02X, SubBus:0x%02X, MaxAgents:0x%02X, MaxSubBus: 0x%02X, LSlot: 0x%02X\n", | ||
419 | BridgeInfo->busUnitInfo.deviceType, | ||
420 | BridgeInfo->subBusNumber, | ||
421 | BridgeInfo->maxAgents, | ||
422 | BridgeInfo->maxSubBusNumber, | ||
423 | BridgeInfo->logicalSlotNumber); | ||
424 | |||
425 | if (BridgeInfo->busUnitInfo.deviceType == | 394 | if (BridgeInfo->busUnitInfo.deviceType == |
426 | HvCallPci_BridgeDevice) { | 395 | HvCallPci_BridgeDevice) { |
427 | /* Scan_Bridge_Slot...: 0x18.00.12 */ | 396 | /* Scan_Bridge_Slot...: 0x18.00.12 */ |
@@ -454,9 +423,6 @@ static int scan_bridge_slot(HvBusNumber Bus, | |||
454 | 423 | ||
455 | /* iSeries_allocate_IRQ.: 0x18.00.12(0xA3) */ | 424 | /* iSeries_allocate_IRQ.: 0x18.00.12(0xA3) */ |
456 | Irq = iSeries_allocate_IRQ(Bus, 0, EADsIdSel); | 425 | Irq = iSeries_allocate_IRQ(Bus, 0, EADsIdSel); |
457 | PPCDBG(PPCDBG_BUSWALK, | ||
458 | "PCI:- allocate and assign IRQ 0x%02X.%02X.%02X = 0x%02X\n", | ||
459 | Bus, 0, EADsIdSel, Irq); | ||
460 | 426 | ||
461 | /* | 427 | /* |
462 | * Connect all functions of any device found. | 428 | * Connect all functions of any device found. |
@@ -482,9 +448,6 @@ static int scan_bridge_slot(HvBusNumber Bus, | |||
482 | printk("read vendor ID: %x\n", VendorId); | 448 | printk("read vendor ID: %x\n", VendorId); |
483 | 449 | ||
484 | /* FoundDevice: 0x18.28.10 = 0x12AE */ | 450 | /* FoundDevice: 0x18.28.10 = 0x12AE */ |
485 | PPCDBG(PPCDBG_BUSWALK, | ||
486 | "PCI:- FoundDevice: 0x%02X.%02X.%02X = 0x%04X, irq %d\n", | ||
487 | Bus, SubBus, AgentId, VendorId, Irq); | ||
488 | HvRc = HvCallPci_configStore8(Bus, SubBus, AgentId, | 451 | HvRc = HvCallPci_configStore8(Bus, SubBus, AgentId, |
489 | PCI_INTERRUPT_LINE, Irq); | 452 | PCI_INTERRUPT_LINE, Irq); |
490 | if (HvRc != 0) | 453 | if (HvRc != 0) |
diff --git a/arch/powerpc/platforms/iseries/setup.c b/arch/powerpc/platforms/iseries/setup.c index c5207064977d..7f8f0cda6a74 100644 --- a/arch/powerpc/platforms/iseries/setup.c +++ b/arch/powerpc/platforms/iseries/setup.c | |||
@@ -71,8 +71,6 @@ extern void hvlog(char *fmt, ...); | |||
71 | #endif | 71 | #endif |
72 | 72 | ||
73 | /* Function Prototypes */ | 73 | /* Function Prototypes */ |
74 | extern void ppcdbg_initialize(void); | ||
75 | |||
76 | static void build_iSeries_Memory_Map(void); | 74 | static void build_iSeries_Memory_Map(void); |
77 | static void iseries_shared_idle(void); | 75 | static void iseries_shared_idle(void); |
78 | static void iseries_dedicated_idle(void); | 76 | static void iseries_dedicated_idle(void); |
@@ -309,8 +307,6 @@ static void __init iSeries_init_early(void) | |||
309 | 307 | ||
310 | ppc64_firmware_features = FW_FEATURE_ISERIES; | 308 | ppc64_firmware_features = FW_FEATURE_ISERIES; |
311 | 309 | ||
312 | ppcdbg_initialize(); | ||
313 | |||
314 | ppc64_interrupt_controller = IC_ISERIES; | 310 | ppc64_interrupt_controller = IC_ISERIES; |
315 | 311 | ||
316 | #if defined(CONFIG_BLK_DEV_INITRD) | 312 | #if defined(CONFIG_BLK_DEV_INITRD) |
@@ -698,20 +694,19 @@ static void iseries_shared_idle(void) | |||
698 | if (hvlpevent_is_pending()) | 694 | if (hvlpevent_is_pending()) |
699 | process_iSeries_events(); | 695 | process_iSeries_events(); |
700 | 696 | ||
697 | preempt_enable_no_resched(); | ||
701 | schedule(); | 698 | schedule(); |
699 | preempt_disable(); | ||
702 | } | 700 | } |
703 | } | 701 | } |
704 | 702 | ||
705 | static void iseries_dedicated_idle(void) | 703 | static void iseries_dedicated_idle(void) |
706 | { | 704 | { |
707 | long oldval; | 705 | long oldval; |
706 | set_thread_flag(TIF_POLLING_NRFLAG); | ||
708 | 707 | ||
709 | while (1) { | 708 | while (1) { |
710 | oldval = test_and_clear_thread_flag(TIF_NEED_RESCHED); | 709 | if (!need_resched()) { |
711 | |||
712 | if (!oldval) { | ||
713 | set_thread_flag(TIF_POLLING_NRFLAG); | ||
714 | |||
715 | while (!need_resched()) { | 710 | while (!need_resched()) { |
716 | ppc64_runlatch_off(); | 711 | ppc64_runlatch_off(); |
717 | HMT_low(); | 712 | HMT_low(); |
@@ -724,13 +719,12 @@ static void iseries_dedicated_idle(void) | |||
724 | } | 719 | } |
725 | 720 | ||
726 | HMT_medium(); | 721 | HMT_medium(); |
727 | clear_thread_flag(TIF_POLLING_NRFLAG); | ||
728 | } else { | ||
729 | set_need_resched(); | ||
730 | } | 722 | } |
731 | 723 | ||
732 | ppc64_runlatch_on(); | 724 | ppc64_runlatch_on(); |
725 | preempt_enable_no_resched(); | ||
733 | schedule(); | 726 | schedule(); |
727 | preempt_disable(); | ||
734 | } | 728 | } |
735 | } | 729 | } |
736 | 730 | ||
diff --git a/arch/powerpc/platforms/iseries/smp.c b/arch/powerpc/platforms/iseries/smp.c index 3336bad67724..fcb094ec6aec 100644 --- a/arch/powerpc/platforms/iseries/smp.c +++ b/arch/powerpc/platforms/iseries/smp.c | |||
@@ -40,7 +40,6 @@ | |||
40 | #include <asm/paca.h> | 40 | #include <asm/paca.h> |
41 | #include <asm/iseries/hv_call.h> | 41 | #include <asm/iseries/hv_call.h> |
42 | #include <asm/time.h> | 42 | #include <asm/time.h> |
43 | #include <asm/ppcdebug.h> | ||
44 | #include <asm/machdep.h> | 43 | #include <asm/machdep.h> |
45 | #include <asm/cputable.h> | 44 | #include <asm/cputable.h> |
46 | #include <asm/system.h> | 45 | #include <asm/system.h> |
diff --git a/arch/powerpc/platforms/powermac/Makefile b/arch/powerpc/platforms/powermac/Makefile index 4369676f1d54..c9df44fcf571 100644 --- a/arch/powerpc/platforms/powermac/Makefile +++ b/arch/powerpc/platforms/powermac/Makefile | |||
@@ -1,7 +1,8 @@ | |||
1 | obj-y += pic.o setup.o time.o feature.o pci.o \ | 1 | obj-y += pic.o setup.o time.o feature.o pci.o \ |
2 | sleep.o low_i2c.o cache.o | 2 | sleep.o low_i2c.o cache.o |
3 | obj-$(CONFIG_PMAC_BACKLIGHT) += backlight.o | 3 | obj-$(CONFIG_PMAC_BACKLIGHT) += backlight.o |
4 | obj-$(CONFIG_CPU_FREQ_PMAC) += cpufreq.o | 4 | obj-$(CONFIG_CPU_FREQ_PMAC) += cpufreq_32.o |
5 | obj-$(CONFIG_CPU_FREQ_PMAC64) += cpufreq_64.o | ||
5 | obj-$(CONFIG_NVRAM) += nvram.o | 6 | obj-$(CONFIG_NVRAM) += nvram.o |
6 | # ppc64 pmac doesn't define CONFIG_NVRAM but needs nvram stuff | 7 | # ppc64 pmac doesn't define CONFIG_NVRAM but needs nvram stuff |
7 | obj-$(CONFIG_PPC64) += nvram.o | 8 | obj-$(CONFIG_PPC64) += nvram.o |
diff --git a/arch/powerpc/platforms/powermac/cpufreq.c b/arch/powerpc/platforms/powermac/cpufreq_32.c index c47f8b69725c..56fd4e05fede 100644 --- a/arch/powerpc/platforms/powermac/cpufreq.c +++ b/arch/powerpc/platforms/powermac/cpufreq_32.c | |||
@@ -397,18 +397,16 @@ static int pmac_cpufreq_target( struct cpufreq_policy *policy, | |||
397 | unsigned int relation) | 397 | unsigned int relation) |
398 | { | 398 | { |
399 | unsigned int newstate = 0; | 399 | unsigned int newstate = 0; |
400 | int rc; | ||
400 | 401 | ||
401 | if (cpufreq_frequency_table_target(policy, pmac_cpu_freqs, | 402 | if (cpufreq_frequency_table_target(policy, pmac_cpu_freqs, |
402 | target_freq, relation, &newstate)) | 403 | target_freq, relation, &newstate)) |
403 | return -EINVAL; | 404 | return -EINVAL; |
404 | 405 | ||
405 | return do_set_cpu_speed(newstate, 1); | 406 | rc = do_set_cpu_speed(newstate, 1); |
406 | } | ||
407 | 407 | ||
408 | unsigned int pmac_get_one_cpufreq(int i) | 408 | ppc_proc_freq = cur_freq * 1000ul; |
409 | { | 409 | return rc; |
410 | /* Supports only one CPU for now */ | ||
411 | return (i == 0) ? cur_freq : 0; | ||
412 | } | 410 | } |
413 | 411 | ||
414 | static int pmac_cpufreq_cpu_init(struct cpufreq_policy *policy) | 412 | static int pmac_cpufreq_cpu_init(struct cpufreq_policy *policy) |
@@ -474,6 +472,8 @@ static int pmac_cpufreq_resume(struct cpufreq_policy *policy) | |||
474 | do_set_cpu_speed(sleep_freq == low_freq ? | 472 | do_set_cpu_speed(sleep_freq == low_freq ? |
475 | CPUFREQ_LOW : CPUFREQ_HIGH, 0); | 473 | CPUFREQ_LOW : CPUFREQ_HIGH, 0); |
476 | 474 | ||
475 | ppc_proc_freq = cur_freq * 1000ul; | ||
476 | |||
477 | no_schedule = 0; | 477 | no_schedule = 0; |
478 | return 0; | 478 | return 0; |
479 | } | 479 | } |
@@ -547,7 +547,7 @@ static int pmac_cpufreq_init_MacRISC3(struct device_node *cpunode) | |||
547 | */ | 547 | */ |
548 | if (low_freq < 98000000) | 548 | if (low_freq < 98000000) |
549 | low_freq = 101000000; | 549 | low_freq = 101000000; |
550 | 550 | ||
551 | /* Convert those to CPU core clocks */ | 551 | /* Convert those to CPU core clocks */ |
552 | low_freq = (low_freq * (*ratio)) / 2000; | 552 | low_freq = (low_freq * (*ratio)) / 2000; |
553 | hi_freq = (hi_freq * (*ratio)) / 2000; | 553 | hi_freq = (hi_freq * (*ratio)) / 2000; |
@@ -714,6 +714,7 @@ out: | |||
714 | 714 | ||
715 | pmac_cpu_freqs[CPUFREQ_LOW].frequency = low_freq; | 715 | pmac_cpu_freqs[CPUFREQ_LOW].frequency = low_freq; |
716 | pmac_cpu_freqs[CPUFREQ_HIGH].frequency = hi_freq; | 716 | pmac_cpu_freqs[CPUFREQ_HIGH].frequency = hi_freq; |
717 | ppc_proc_freq = cur_freq * 1000ul; | ||
717 | 718 | ||
718 | printk(KERN_INFO "Registering PowerMac CPU frequency driver\n"); | 719 | printk(KERN_INFO "Registering PowerMac CPU frequency driver\n"); |
719 | printk(KERN_INFO "Low: %d Mhz, High: %d Mhz, Boot: %d Mhz\n", | 720 | printk(KERN_INFO "Low: %d Mhz, High: %d Mhz, Boot: %d Mhz\n", |
diff --git a/arch/powerpc/platforms/powermac/cpufreq_64.c b/arch/powerpc/platforms/powermac/cpufreq_64.c new file mode 100644 index 000000000000..39150342c6f1 --- /dev/null +++ b/arch/powerpc/platforms/powermac/cpufreq_64.c | |||
@@ -0,0 +1,323 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2002 - 2005 Benjamin Herrenschmidt <benh@kernel.crashing.org> | ||
3 | * and Markus Demleitner <msdemlei@cl.uni-heidelberg.de> | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or modify | ||
6 | * it under the terms of the GNU General Public License version 2 as | ||
7 | * published by the Free Software Foundation. | ||
8 | * | ||
9 | * This driver adds basic cpufreq support for SMU & 970FX based G5 Macs, | ||
10 | * that is iMac G5 and latest single CPU desktop. | ||
11 | */ | ||
12 | |||
13 | #include <linux/config.h> | ||
14 | #include <linux/module.h> | ||
15 | #include <linux/types.h> | ||
16 | #include <linux/errno.h> | ||
17 | #include <linux/kernel.h> | ||
18 | #include <linux/delay.h> | ||
19 | #include <linux/sched.h> | ||
20 | #include <linux/slab.h> | ||
21 | #include <linux/cpufreq.h> | ||
22 | #include <linux/init.h> | ||
23 | #include <linux/completion.h> | ||
24 | #include <asm/prom.h> | ||
25 | #include <asm/machdep.h> | ||
26 | #include <asm/irq.h> | ||
27 | #include <asm/sections.h> | ||
28 | #include <asm/cputable.h> | ||
29 | #include <asm/time.h> | ||
30 | #include <asm/smu.h> | ||
31 | |||
32 | #undef DEBUG | ||
33 | |||
34 | #ifdef DEBUG | ||
35 | #define DBG(fmt...) printk(fmt) | ||
36 | #else | ||
37 | #define DBG(fmt...) | ||
38 | #endif | ||
39 | |||
40 | /* see 970FX user manual */ | ||
41 | |||
42 | #define SCOM_PCR 0x0aa001 /* PCR scom addr */ | ||
43 | |||
44 | #define PCR_HILO_SELECT 0x80000000U /* 1 = PCR, 0 = PCRH */ | ||
45 | #define PCR_SPEED_FULL 0x00000000U /* 1:1 speed value */ | ||
46 | #define PCR_SPEED_HALF 0x00020000U /* 1:2 speed value */ | ||
47 | #define PCR_SPEED_QUARTER 0x00040000U /* 1:4 speed value */ | ||
48 | #define PCR_SPEED_MASK 0x000e0000U /* speed mask */ | ||
49 | #define PCR_SPEED_SHIFT 17 | ||
50 | #define PCR_FREQ_REQ_VALID 0x00010000U /* freq request valid */ | ||
51 | #define PCR_VOLT_REQ_VALID 0x00008000U /* volt request valid */ | ||
52 | #define PCR_TARGET_TIME_MASK 0x00006000U /* target time */ | ||
53 | #define PCR_STATLAT_MASK 0x00001f00U /* STATLAT value */ | ||
54 | #define PCR_SNOOPLAT_MASK 0x000000f0U /* SNOOPLAT value */ | ||
55 | #define PCR_SNOOPACC_MASK 0x0000000fU /* SNOOPACC value */ | ||
56 | |||
57 | #define SCOM_PSR 0x408001 /* PSR scom addr */ | ||
58 | /* warning: PSR is a 64 bits register */ | ||
59 | #define PSR_CMD_RECEIVED 0x2000000000000000U /* command received */ | ||
60 | #define PSR_CMD_COMPLETED 0x1000000000000000U /* command completed */ | ||
61 | #define PSR_CUR_SPEED_MASK 0x0300000000000000U /* current speed */ | ||
62 | #define PSR_CUR_SPEED_SHIFT (56) | ||
63 | |||
64 | /* | ||
65 | * The G5 only supports two frequencies (Quarter speed is not supported) | ||
66 | */ | ||
67 | #define CPUFREQ_HIGH 0 | ||
68 | #define CPUFREQ_LOW 1 | ||
69 | |||
70 | static struct cpufreq_frequency_table g5_cpu_freqs[] = { | ||
71 | {CPUFREQ_HIGH, 0}, | ||
72 | {CPUFREQ_LOW, 0}, | ||
73 | {0, CPUFREQ_TABLE_END}, | ||
74 | }; | ||
75 | |||
76 | static struct freq_attr* g5_cpu_freqs_attr[] = { | ||
77 | &cpufreq_freq_attr_scaling_available_freqs, | ||
78 | NULL, | ||
79 | }; | ||
80 | |||
81 | /* Power mode data is an array of the 32 bits PCR values to use for | ||
82 | * the various frequencies, retreived from the device-tree | ||
83 | */ | ||
84 | static u32 *g5_pmode_data; | ||
85 | static int g5_pmode_max; | ||
86 | static int g5_pmode_cur; | ||
87 | |||
88 | static DECLARE_MUTEX(g5_switch_mutex); | ||
89 | |||
90 | |||
91 | static struct smu_sdbp_fvt *g5_fvt_table; /* table of op. points */ | ||
92 | static int g5_fvt_count; /* number of op. points */ | ||
93 | static int g5_fvt_cur; /* current op. point */ | ||
94 | |||
95 | /* ----------------- real hardware interface */ | ||
96 | |||
97 | static void g5_switch_volt(int speed_mode) | ||
98 | { | ||
99 | struct smu_simple_cmd cmd; | ||
100 | |||
101 | DECLARE_COMPLETION(comp); | ||
102 | smu_queue_simple(&cmd, SMU_CMD_POWER_COMMAND, 8, smu_done_complete, | ||
103 | &comp, 'V', 'S', 'L', 'E', 'W', | ||
104 | 0xff, g5_fvt_cur+1, speed_mode); | ||
105 | wait_for_completion(&comp); | ||
106 | } | ||
107 | |||
108 | static int g5_switch_freq(int speed_mode) | ||
109 | { | ||
110 | struct cpufreq_freqs freqs; | ||
111 | int to; | ||
112 | |||
113 | if (g5_pmode_cur == speed_mode) | ||
114 | return 0; | ||
115 | |||
116 | down(&g5_switch_mutex); | ||
117 | |||
118 | freqs.old = g5_cpu_freqs[g5_pmode_cur].frequency; | ||
119 | freqs.new = g5_cpu_freqs[speed_mode].frequency; | ||
120 | freqs.cpu = 0; | ||
121 | |||
122 | cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE); | ||
123 | |||
124 | /* If frequency is going up, first ramp up the voltage */ | ||
125 | if (speed_mode < g5_pmode_cur) | ||
126 | g5_switch_volt(speed_mode); | ||
127 | |||
128 | /* Clear PCR high */ | ||
129 | scom970_write(SCOM_PCR, 0); | ||
130 | /* Clear PCR low */ | ||
131 | scom970_write(SCOM_PCR, PCR_HILO_SELECT | 0); | ||
132 | /* Set PCR low */ | ||
133 | scom970_write(SCOM_PCR, PCR_HILO_SELECT | | ||
134 | g5_pmode_data[speed_mode]); | ||
135 | |||
136 | /* Wait for completion */ | ||
137 | for (to = 0; to < 10; to++) { | ||
138 | unsigned long psr = scom970_read(SCOM_PSR); | ||
139 | |||
140 | if ((psr & PSR_CMD_RECEIVED) == 0 && | ||
141 | (((psr >> PSR_CUR_SPEED_SHIFT) ^ | ||
142 | (g5_pmode_data[speed_mode] >> PCR_SPEED_SHIFT)) & 0x3) | ||
143 | == 0) | ||
144 | break; | ||
145 | if (psr & PSR_CMD_COMPLETED) | ||
146 | break; | ||
147 | udelay(100); | ||
148 | } | ||
149 | |||
150 | /* If frequency is going down, last ramp the voltage */ | ||
151 | if (speed_mode > g5_pmode_cur) | ||
152 | g5_switch_volt(speed_mode); | ||
153 | |||
154 | g5_pmode_cur = speed_mode; | ||
155 | ppc_proc_freq = g5_cpu_freqs[speed_mode].frequency * 1000ul; | ||
156 | |||
157 | cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE); | ||
158 | |||
159 | up(&g5_switch_mutex); | ||
160 | |||
161 | return 0; | ||
162 | } | ||
163 | |||
164 | static int g5_query_freq(void) | ||
165 | { | ||
166 | unsigned long psr = scom970_read(SCOM_PSR); | ||
167 | int i; | ||
168 | |||
169 | for (i = 0; i <= g5_pmode_max; i++) | ||
170 | if ((((psr >> PSR_CUR_SPEED_SHIFT) ^ | ||
171 | (g5_pmode_data[i] >> PCR_SPEED_SHIFT)) & 0x3) == 0) | ||
172 | break; | ||
173 | return i; | ||
174 | } | ||
175 | |||
176 | /* ----------------- cpufreq bookkeeping */ | ||
177 | |||
178 | static int g5_cpufreq_verify(struct cpufreq_policy *policy) | ||
179 | { | ||
180 | return cpufreq_frequency_table_verify(policy, g5_cpu_freqs); | ||
181 | } | ||
182 | |||
183 | static int g5_cpufreq_target(struct cpufreq_policy *policy, | ||
184 | unsigned int target_freq, unsigned int relation) | ||
185 | { | ||
186 | unsigned int newstate = 0; | ||
187 | |||
188 | if (cpufreq_frequency_table_target(policy, g5_cpu_freqs, | ||
189 | target_freq, relation, &newstate)) | ||
190 | return -EINVAL; | ||
191 | |||
192 | return g5_switch_freq(newstate); | ||
193 | } | ||
194 | |||
195 | static unsigned int g5_cpufreq_get_speed(unsigned int cpu) | ||
196 | { | ||
197 | return g5_cpu_freqs[g5_pmode_cur].frequency; | ||
198 | } | ||
199 | |||
200 | static int g5_cpufreq_cpu_init(struct cpufreq_policy *policy) | ||
201 | { | ||
202 | if (policy->cpu != 0) | ||
203 | return -ENODEV; | ||
204 | |||
205 | policy->governor = CPUFREQ_DEFAULT_GOVERNOR; | ||
206 | policy->cpuinfo.transition_latency = CPUFREQ_ETERNAL; | ||
207 | policy->cur = g5_cpu_freqs[g5_query_freq()].frequency; | ||
208 | cpufreq_frequency_table_get_attr(g5_cpu_freqs, policy->cpu); | ||
209 | |||
210 | return cpufreq_frequency_table_cpuinfo(policy, | ||
211 | g5_cpu_freqs); | ||
212 | } | ||
213 | |||
214 | |||
215 | static struct cpufreq_driver g5_cpufreq_driver = { | ||
216 | .name = "powermac", | ||
217 | .owner = THIS_MODULE, | ||
218 | .flags = CPUFREQ_CONST_LOOPS, | ||
219 | .init = g5_cpufreq_cpu_init, | ||
220 | .verify = g5_cpufreq_verify, | ||
221 | .target = g5_cpufreq_target, | ||
222 | .get = g5_cpufreq_get_speed, | ||
223 | .attr = g5_cpu_freqs_attr, | ||
224 | }; | ||
225 | |||
226 | |||
227 | static int __init g5_cpufreq_init(void) | ||
228 | { | ||
229 | struct device_node *cpunode; | ||
230 | unsigned int psize, ssize; | ||
231 | struct smu_sdbp_header *shdr; | ||
232 | unsigned long max_freq; | ||
233 | u32 *valp; | ||
234 | int rc = -ENODEV; | ||
235 | |||
236 | /* Look for CPU and SMU nodes */ | ||
237 | cpunode = of_find_node_by_type(NULL, "cpu"); | ||
238 | if (!cpunode) { | ||
239 | DBG("No CPU node !\n"); | ||
240 | return -ENODEV; | ||
241 | } | ||
242 | |||
243 | /* Check 970FX for now */ | ||
244 | valp = (u32 *)get_property(cpunode, "cpu-version", NULL); | ||
245 | if (!valp) { | ||
246 | DBG("No cpu-version property !\n"); | ||
247 | goto bail_noprops; | ||
248 | } | ||
249 | if (((*valp) >> 16) != 0x3c) { | ||
250 | DBG("Wrong CPU version: %08x\n", *valp); | ||
251 | goto bail_noprops; | ||
252 | } | ||
253 | |||
254 | /* Look for the powertune data in the device-tree */ | ||
255 | g5_pmode_data = (u32 *)get_property(cpunode, "power-mode-data",&psize); | ||
256 | if (!g5_pmode_data) { | ||
257 | DBG("No power-mode-data !\n"); | ||
258 | goto bail_noprops; | ||
259 | } | ||
260 | g5_pmode_max = psize / sizeof(u32) - 1; | ||
261 | |||
262 | /* Look for the FVT table */ | ||
263 | shdr = smu_get_sdb_partition(SMU_SDB_FVT_ID, NULL); | ||
264 | if (!shdr) | ||
265 | goto bail_noprops; | ||
266 | g5_fvt_table = (struct smu_sdbp_fvt *)&shdr[1]; | ||
267 | ssize = (shdr->len * sizeof(u32)) - sizeof(struct smu_sdbp_header); | ||
268 | g5_fvt_count = ssize / sizeof(struct smu_sdbp_fvt); | ||
269 | g5_fvt_cur = 0; | ||
270 | |||
271 | /* Sanity checking */ | ||
272 | if (g5_fvt_count < 1 || g5_pmode_max < 1) | ||
273 | goto bail_noprops; | ||
274 | |||
275 | /* | ||
276 | * From what I see, clock-frequency is always the maximal frequency. | ||
277 | * The current driver can not slew sysclk yet, so we really only deal | ||
278 | * with powertune steps for now. We also only implement full freq and | ||
279 | * half freq in this version. So far, I haven't yet seen a machine | ||
280 | * supporting anything else. | ||
281 | */ | ||
282 | valp = (u32 *)get_property(cpunode, "clock-frequency", NULL); | ||
283 | if (!valp) | ||
284 | return -ENODEV; | ||
285 | max_freq = (*valp)/1000; | ||
286 | g5_cpu_freqs[0].frequency = max_freq; | ||
287 | g5_cpu_freqs[1].frequency = max_freq/2; | ||
288 | |||
289 | /* Check current frequency */ | ||
290 | g5_pmode_cur = g5_query_freq(); | ||
291 | if (g5_pmode_cur > 1) | ||
292 | /* We don't support anything but 1:1 and 1:2, fixup ... */ | ||
293 | g5_pmode_cur = 1; | ||
294 | |||
295 | /* Force apply current frequency to make sure everything is in | ||
296 | * sync (voltage is right for example). Firmware may leave us with | ||
297 | * a strange setting ... | ||
298 | */ | ||
299 | g5_switch_freq(g5_pmode_cur); | ||
300 | |||
301 | printk(KERN_INFO "Registering G5 CPU frequency driver\n"); | ||
302 | printk(KERN_INFO "Low: %d Mhz, High: %d Mhz, Cur: %d MHz\n", | ||
303 | g5_cpu_freqs[1].frequency/1000, | ||
304 | g5_cpu_freqs[0].frequency/1000, | ||
305 | g5_cpu_freqs[g5_pmode_cur].frequency/1000); | ||
306 | |||
307 | rc = cpufreq_register_driver(&g5_cpufreq_driver); | ||
308 | |||
309 | /* We keep the CPU node on hold... hopefully, Apple G5 don't have | ||
310 | * hotplug CPU with a dynamic device-tree ... | ||
311 | */ | ||
312 | return rc; | ||
313 | |||
314 | bail_noprops: | ||
315 | of_node_put(cpunode); | ||
316 | |||
317 | return rc; | ||
318 | } | ||
319 | |||
320 | module_init(g5_cpufreq_init); | ||
321 | |||
322 | |||
323 | MODULE_LICENSE("GPL"); | ||
diff --git a/arch/powerpc/platforms/powermac/setup.c b/arch/powerpc/platforms/powermac/setup.c index 80b58c1ec412..7acb0546671f 100644 --- a/arch/powerpc/platforms/powermac/setup.c +++ b/arch/powerpc/platforms/powermac/setup.c | |||
@@ -193,18 +193,6 @@ static void pmac_show_cpuinfo(struct seq_file *m) | |||
193 | pmac_newworld ? "NewWorld" : "OldWorld"); | 193 | pmac_newworld ? "NewWorld" : "OldWorld"); |
194 | } | 194 | } |
195 | 195 | ||
196 | static void pmac_show_percpuinfo(struct seq_file *m, int i) | ||
197 | { | ||
198 | #ifdef CONFIG_CPU_FREQ_PMAC | ||
199 | extern unsigned int pmac_get_one_cpufreq(int i); | ||
200 | unsigned int freq = pmac_get_one_cpufreq(i); | ||
201 | if (freq != 0) { | ||
202 | seq_printf(m, "clock\t\t: %dMHz\n", freq/1000); | ||
203 | return; | ||
204 | } | ||
205 | #endif /* CONFIG_CPU_FREQ_PMAC */ | ||
206 | } | ||
207 | |||
208 | #ifndef CONFIG_ADB_CUDA | 196 | #ifndef CONFIG_ADB_CUDA |
209 | int find_via_cuda(void) | 197 | int find_via_cuda(void) |
210 | { | 198 | { |
@@ -767,7 +755,6 @@ struct machdep_calls __initdata pmac_md = { | |||
767 | .setup_arch = pmac_setup_arch, | 755 | .setup_arch = pmac_setup_arch, |
768 | .init_early = pmac_init_early, | 756 | .init_early = pmac_init_early, |
769 | .show_cpuinfo = pmac_show_cpuinfo, | 757 | .show_cpuinfo = pmac_show_cpuinfo, |
770 | .show_percpuinfo = pmac_show_percpuinfo, | ||
771 | .init_IRQ = pmac_pic_init, | 758 | .init_IRQ = pmac_pic_init, |
772 | .get_irq = mpic_get_irq, /* changed later */ | 759 | .get_irq = mpic_get_irq, /* changed later */ |
773 | .pcibios_fixup = pmac_pcibios_fixup, | 760 | .pcibios_fixup = pmac_pcibios_fixup, |
diff --git a/arch/powerpc/platforms/pseries/iommu.c b/arch/powerpc/platforms/pseries/iommu.c index 513e27231493..fcc50bfd43fd 100644 --- a/arch/powerpc/platforms/pseries/iommu.c +++ b/arch/powerpc/platforms/pseries/iommu.c | |||
@@ -37,7 +37,6 @@ | |||
37 | #include <asm/io.h> | 37 | #include <asm/io.h> |
38 | #include <asm/prom.h> | 38 | #include <asm/prom.h> |
39 | #include <asm/rtas.h> | 39 | #include <asm/rtas.h> |
40 | #include <asm/ppcdebug.h> | ||
41 | #include <asm/iommu.h> | 40 | #include <asm/iommu.h> |
42 | #include <asm/pci-bridge.h> | 41 | #include <asm/pci-bridge.h> |
43 | #include <asm/machdep.h> | 42 | #include <asm/machdep.h> |
@@ -47,6 +46,7 @@ | |||
47 | #include <asm/firmware.h> | 46 | #include <asm/firmware.h> |
48 | #include <asm/tce.h> | 47 | #include <asm/tce.h> |
49 | #include <asm/ppc-pci.h> | 48 | #include <asm/ppc-pci.h> |
49 | #include <asm/udbg.h> | ||
50 | 50 | ||
51 | #include "plpar_wrappers.h" | 51 | #include "plpar_wrappers.h" |
52 | 52 | ||
diff --git a/arch/powerpc/platforms/pseries/lpar.c b/arch/powerpc/platforms/pseries/lpar.c index ab0c6dd6ec94..a50e5f3f396d 100644 --- a/arch/powerpc/platforms/pseries/lpar.c +++ b/arch/powerpc/platforms/pseries/lpar.c | |||
@@ -31,13 +31,14 @@ | |||
31 | #include <asm/machdep.h> | 31 | #include <asm/machdep.h> |
32 | #include <asm/abs_addr.h> | 32 | #include <asm/abs_addr.h> |
33 | #include <asm/mmu_context.h> | 33 | #include <asm/mmu_context.h> |
34 | #include <asm/ppcdebug.h> | ||
35 | #include <asm/iommu.h> | 34 | #include <asm/iommu.h> |
36 | #include <asm/tlbflush.h> | 35 | #include <asm/tlbflush.h> |
37 | #include <asm/tlb.h> | 36 | #include <asm/tlb.h> |
38 | #include <asm/prom.h> | 37 | #include <asm/prom.h> |
39 | #include <asm/abs_addr.h> | 38 | #include <asm/abs_addr.h> |
40 | #include <asm/cputable.h> | 39 | #include <asm/cputable.h> |
40 | #include <asm/udbg.h> | ||
41 | #include <asm/smp.h> | ||
41 | 42 | ||
42 | #include "plpar_wrappers.h" | 43 | #include "plpar_wrappers.h" |
43 | 44 | ||
diff --git a/arch/powerpc/platforms/pseries/plpar_wrappers.h b/arch/powerpc/platforms/pseries/plpar_wrappers.h index 382f8c5b0e7c..3bd1b3e06003 100644 --- a/arch/powerpc/platforms/pseries/plpar_wrappers.h +++ b/arch/powerpc/platforms/pseries/plpar_wrappers.h | |||
@@ -107,14 +107,4 @@ static inline long plpar_put_term_char(unsigned long termno, unsigned long len, | |||
107 | lbuf[1]); | 107 | lbuf[1]); |
108 | } | 108 | } |
109 | 109 | ||
110 | static inline long plpar_set_xdabr(unsigned long address, unsigned long flags) | ||
111 | { | ||
112 | return plpar_hcall_norets(H_SET_XDABR, address, flags); | ||
113 | } | ||
114 | |||
115 | static inline long plpar_set_dabr(unsigned long val) | ||
116 | { | ||
117 | return plpar_hcall_norets(H_SET_DABR, val); | ||
118 | } | ||
119 | |||
120 | #endif /* _PSERIES_PLPAR_WRAPPERS_H */ | 110 | #endif /* _PSERIES_PLPAR_WRAPPERS_H */ |
diff --git a/arch/powerpc/platforms/pseries/ras.c b/arch/powerpc/platforms/pseries/ras.c index 6562ff4b0a82..fbd214d68b07 100644 --- a/arch/powerpc/platforms/pseries/ras.c +++ b/arch/powerpc/platforms/pseries/ras.c | |||
@@ -48,7 +48,7 @@ | |||
48 | #include <asm/ptrace.h> | 48 | #include <asm/ptrace.h> |
49 | #include <asm/machdep.h> | 49 | #include <asm/machdep.h> |
50 | #include <asm/rtas.h> | 50 | #include <asm/rtas.h> |
51 | #include <asm/ppcdebug.h> | 51 | #include <asm/udbg.h> |
52 | 52 | ||
53 | static unsigned char ras_log_buf[RTAS_ERROR_LOG_MAX]; | 53 | static unsigned char ras_log_buf[RTAS_ERROR_LOG_MAX]; |
54 | static DEFINE_SPINLOCK(ras_log_buf_lock); | 54 | static DEFINE_SPINLOCK(ras_log_buf_lock); |
diff --git a/arch/powerpc/platforms/pseries/setup.c b/arch/powerpc/platforms/pseries/setup.c index 65bee939eecc..a093a0d4dd69 100644 --- a/arch/powerpc/platforms/pseries/setup.c +++ b/arch/powerpc/platforms/pseries/setup.c | |||
@@ -65,6 +65,7 @@ | |||
65 | #include <asm/ppc-pci.h> | 65 | #include <asm/ppc-pci.h> |
66 | #include <asm/i8259.h> | 66 | #include <asm/i8259.h> |
67 | #include <asm/udbg.h> | 67 | #include <asm/udbg.h> |
68 | #include <asm/smp.h> | ||
68 | 69 | ||
69 | #include "plpar_wrappers.h" | 70 | #include "plpar_wrappers.h" |
70 | 71 | ||
@@ -353,14 +354,15 @@ static void pSeries_mach_cpu_die(void) | |||
353 | 354 | ||
354 | static int pseries_set_dabr(unsigned long dabr) | 355 | static int pseries_set_dabr(unsigned long dabr) |
355 | { | 356 | { |
356 | if (firmware_has_feature(FW_FEATURE_XDABR)) { | 357 | return plpar_hcall_norets(H_SET_DABR, dabr); |
357 | /* We want to catch accesses from kernel and userspace */ | ||
358 | return plpar_set_xdabr(dabr, H_DABRX_KERNEL | H_DABRX_USER); | ||
359 | } | ||
360 | |||
361 | return plpar_set_dabr(dabr); | ||
362 | } | 358 | } |
363 | 359 | ||
360 | static int pseries_set_xdabr(unsigned long dabr) | ||
361 | { | ||
362 | /* We want to catch accesses from kernel and userspace */ | ||
363 | return plpar_hcall_norets(H_SET_XDABR, dabr, | ||
364 | H_DABRX_KERNEL | H_DABRX_USER); | ||
365 | } | ||
364 | 366 | ||
365 | /* | 367 | /* |
366 | * Early initialization. Relocation is on but do not reference unbolted pages | 368 | * Early initialization. Relocation is on but do not reference unbolted pages |
@@ -396,8 +398,10 @@ static void __init pSeries_init_early(void) | |||
396 | DBG("Hello World !\n"); | 398 | DBG("Hello World !\n"); |
397 | } | 399 | } |
398 | 400 | ||
399 | if (firmware_has_feature(FW_FEATURE_XDABR | FW_FEATURE_DABR)) | 401 | if (firmware_has_feature(FW_FEATURE_DABR)) |
400 | ppc_md.set_dabr = pseries_set_dabr; | 402 | ppc_md.set_dabr = pseries_set_dabr; |
403 | else if (firmware_has_feature(FW_FEATURE_XDABR)) | ||
404 | ppc_md.set_dabr = pseries_set_xdabr; | ||
401 | 405 | ||
402 | iommu_init_early_pSeries(); | 406 | iommu_init_early_pSeries(); |
403 | 407 | ||
@@ -465,6 +469,7 @@ static inline void dedicated_idle_sleep(unsigned int cpu) | |||
465 | * more. | 469 | * more. |
466 | */ | 470 | */ |
467 | clear_thread_flag(TIF_POLLING_NRFLAG); | 471 | clear_thread_flag(TIF_POLLING_NRFLAG); |
472 | smp_mb__after_clear_bit(); | ||
468 | 473 | ||
469 | /* | 474 | /* |
470 | * SMT dynamic mode. Cede will result in this thread going | 475 | * SMT dynamic mode. Cede will result in this thread going |
@@ -477,6 +482,7 @@ static inline void dedicated_idle_sleep(unsigned int cpu) | |||
477 | cede_processor(); | 482 | cede_processor(); |
478 | else | 483 | else |
479 | local_irq_enable(); | 484 | local_irq_enable(); |
485 | set_thread_flag(TIF_POLLING_NRFLAG); | ||
480 | } else { | 486 | } else { |
481 | /* | 487 | /* |
482 | * Give the HV an opportunity at the processor, since we are | 488 | * Give the HV an opportunity at the processor, since we are |
@@ -488,11 +494,11 @@ static inline void dedicated_idle_sleep(unsigned int cpu) | |||
488 | 494 | ||
489 | static void pseries_dedicated_idle(void) | 495 | static void pseries_dedicated_idle(void) |
490 | { | 496 | { |
491 | long oldval; | ||
492 | struct paca_struct *lpaca = get_paca(); | 497 | struct paca_struct *lpaca = get_paca(); |
493 | unsigned int cpu = smp_processor_id(); | 498 | unsigned int cpu = smp_processor_id(); |
494 | unsigned long start_snooze; | 499 | unsigned long start_snooze; |
495 | unsigned long *smt_snooze_delay = &__get_cpu_var(smt_snooze_delay); | 500 | unsigned long *smt_snooze_delay = &__get_cpu_var(smt_snooze_delay); |
501 | set_thread_flag(TIF_POLLING_NRFLAG); | ||
496 | 502 | ||
497 | while (1) { | 503 | while (1) { |
498 | /* | 504 | /* |
@@ -501,10 +507,7 @@ static void pseries_dedicated_idle(void) | |||
501 | */ | 507 | */ |
502 | lpaca->lppaca.idle = 1; | 508 | lpaca->lppaca.idle = 1; |
503 | 509 | ||
504 | oldval = test_and_clear_thread_flag(TIF_NEED_RESCHED); | 510 | if (!need_resched()) { |
505 | if (!oldval) { | ||
506 | set_thread_flag(TIF_POLLING_NRFLAG); | ||
507 | |||
508 | start_snooze = __get_tb() + | 511 | start_snooze = __get_tb() + |
509 | *smt_snooze_delay * tb_ticks_per_usec; | 512 | *smt_snooze_delay * tb_ticks_per_usec; |
510 | 513 | ||
@@ -527,15 +530,14 @@ static void pseries_dedicated_idle(void) | |||
527 | } | 530 | } |
528 | 531 | ||
529 | HMT_medium(); | 532 | HMT_medium(); |
530 | clear_thread_flag(TIF_POLLING_NRFLAG); | ||
531 | } else { | ||
532 | set_need_resched(); | ||
533 | } | 533 | } |
534 | 534 | ||
535 | lpaca->lppaca.idle = 0; | 535 | lpaca->lppaca.idle = 0; |
536 | ppc64_runlatch_on(); | 536 | ppc64_runlatch_on(); |
537 | 537 | ||
538 | preempt_enable_no_resched(); | ||
538 | schedule(); | 539 | schedule(); |
540 | preempt_disable(); | ||
539 | 541 | ||
540 | if (cpu_is_offline(cpu) && system_state == SYSTEM_RUNNING) | 542 | if (cpu_is_offline(cpu) && system_state == SYSTEM_RUNNING) |
541 | cpu_die(); | 543 | cpu_die(); |
@@ -579,7 +581,9 @@ static void pseries_shared_idle(void) | |||
579 | lpaca->lppaca.idle = 0; | 581 | lpaca->lppaca.idle = 0; |
580 | ppc64_runlatch_on(); | 582 | ppc64_runlatch_on(); |
581 | 583 | ||
584 | preempt_enable_no_resched(); | ||
582 | schedule(); | 585 | schedule(); |
586 | preempt_disable(); | ||
583 | 587 | ||
584 | if (cpu_is_offline(cpu) && system_state == SYSTEM_RUNNING) | 588 | if (cpu_is_offline(cpu) && system_state == SYSTEM_RUNNING) |
585 | cpu_die(); | 589 | cpu_die(); |
diff --git a/arch/powerpc/sysdev/i8259.c b/arch/powerpc/sysdev/i8259.c index 90bce6e0c191..b7ac32fdd776 100644 --- a/arch/powerpc/sysdev/i8259.c +++ b/arch/powerpc/sysdev/i8259.c | |||
@@ -207,6 +207,9 @@ void __init i8259_init(unsigned long intack_addr, int offset) | |||
207 | 207 | ||
208 | spin_unlock_irqrestore(&i8259_lock, flags); | 208 | spin_unlock_irqrestore(&i8259_lock, flags); |
209 | 209 | ||
210 | for (i = 0; i < NUM_ISA_INTERRUPTS; ++i) | ||
211 | irq_desc[offset + i].handler = &i8259_pic; | ||
212 | |||
210 | /* reserve our resources */ | 213 | /* reserve our resources */ |
211 | setup_irq(offset + 2, &i8259_irqaction); | 214 | setup_irq(offset + 2, &i8259_irqaction); |
212 | request_resource(&ioport_resource, &pic1_iores); | 215 | request_resource(&ioport_resource, &pic1_iores); |
@@ -216,6 +219,4 @@ void __init i8259_init(unsigned long intack_addr, int offset) | |||
216 | if (intack_addr != 0) | 219 | if (intack_addr != 0) |
217 | pci_intack = ioremap(intack_addr, 1); | 220 | pci_intack = ioremap(intack_addr, 1); |
218 | 221 | ||
219 | for (i = 0; i < NUM_ISA_INTERRUPTS; ++i) | ||
220 | irq_desc[offset + i].handler = &i8259_pic; | ||
221 | } | 222 | } |
diff --git a/arch/powerpc/sysdev/u3_iommu.c b/arch/powerpc/sysdev/u3_iommu.c index 607722178c1a..543d65909812 100644 --- a/arch/powerpc/sysdev/u3_iommu.c +++ b/arch/powerpc/sysdev/u3_iommu.c | |||
@@ -37,7 +37,6 @@ | |||
37 | #include <linux/vmalloc.h> | 37 | #include <linux/vmalloc.h> |
38 | #include <asm/io.h> | 38 | #include <asm/io.h> |
39 | #include <asm/prom.h> | 39 | #include <asm/prom.h> |
40 | #include <asm/ppcdebug.h> | ||
41 | #include <asm/iommu.h> | 40 | #include <asm/iommu.h> |
42 | #include <asm/pci-bridge.h> | 41 | #include <asm/pci-bridge.h> |
43 | #include <asm/machdep.h> | 42 | #include <asm/machdep.h> |
diff --git a/arch/ppc/configs/mpc834x_sys_defconfig b/arch/ppc/configs/mpc834x_sys_defconfig index 4a5522ca8207..673dc64ebcb1 100644 --- a/arch/ppc/configs/mpc834x_sys_defconfig +++ b/arch/ppc/configs/mpc834x_sys_defconfig | |||
@@ -1,16 +1,17 @@ | |||
1 | # | 1 | # |
2 | # Automatically generated make config: don't edit | 2 | # Automatically generated make config: don't edit |
3 | # Linux kernel version: 2.6.11-rc4 | 3 | # Linux kernel version: 2.6.14 |
4 | # Thu Feb 17 16:12:23 2005 | 4 | # Mon Nov 7 15:38:29 2005 |
5 | # | 5 | # |
6 | CONFIG_MMU=y | 6 | CONFIG_MMU=y |
7 | CONFIG_GENERIC_HARDIRQS=y | 7 | CONFIG_GENERIC_HARDIRQS=y |
8 | CONFIG_RWSEM_XCHGADD_ALGORITHM=y | 8 | CONFIG_RWSEM_XCHGADD_ALGORITHM=y |
9 | CONFIG_GENERIC_CALIBRATE_DELAY=y | 9 | CONFIG_GENERIC_CALIBRATE_DELAY=y |
10 | CONFIG_HAVE_DEC_LOCK=y | ||
11 | CONFIG_PPC=y | 10 | CONFIG_PPC=y |
12 | CONFIG_PPC32=y | 11 | CONFIG_PPC32=y |
13 | CONFIG_GENERIC_NVRAM=y | 12 | CONFIG_GENERIC_NVRAM=y |
13 | CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y | ||
14 | CONFIG_ARCH_MAY_HAVE_PC_FDC=y | ||
14 | 15 | ||
15 | # | 16 | # |
16 | # Code maturity level options | 17 | # Code maturity level options |
@@ -18,23 +19,28 @@ CONFIG_GENERIC_NVRAM=y | |||
18 | CONFIG_EXPERIMENTAL=y | 19 | CONFIG_EXPERIMENTAL=y |
19 | CONFIG_CLEAN_COMPILE=y | 20 | CONFIG_CLEAN_COMPILE=y |
20 | CONFIG_BROKEN_ON_SMP=y | 21 | CONFIG_BROKEN_ON_SMP=y |
22 | CONFIG_INIT_ENV_ARG_LIMIT=32 | ||
21 | 23 | ||
22 | # | 24 | # |
23 | # General setup | 25 | # General setup |
24 | # | 26 | # |
25 | CONFIG_LOCALVERSION="" | 27 | CONFIG_LOCALVERSION="" |
28 | CONFIG_LOCALVERSION_AUTO=y | ||
26 | CONFIG_SWAP=y | 29 | CONFIG_SWAP=y |
27 | CONFIG_SYSVIPC=y | 30 | CONFIG_SYSVIPC=y |
28 | # CONFIG_POSIX_MQUEUE is not set | 31 | # CONFIG_POSIX_MQUEUE is not set |
29 | # CONFIG_BSD_PROCESS_ACCT is not set | 32 | # CONFIG_BSD_PROCESS_ACCT is not set |
30 | CONFIG_SYSCTL=y | 33 | CONFIG_SYSCTL=y |
31 | # CONFIG_AUDIT is not set | 34 | # CONFIG_AUDIT is not set |
32 | CONFIG_LOG_BUF_SHIFT=14 | ||
33 | # CONFIG_HOTPLUG is not set | 35 | # CONFIG_HOTPLUG is not set |
34 | CONFIG_KOBJECT_UEVENT=y | 36 | CONFIG_KOBJECT_UEVENT=y |
35 | # CONFIG_IKCONFIG is not set | 37 | # CONFIG_IKCONFIG is not set |
38 | CONFIG_INITRAMFS_SOURCE="" | ||
36 | CONFIG_EMBEDDED=y | 39 | CONFIG_EMBEDDED=y |
37 | # CONFIG_KALLSYMS is not set | 40 | # CONFIG_KALLSYMS is not set |
41 | CONFIG_PRINTK=y | ||
42 | CONFIG_BUG=y | ||
43 | CONFIG_BASE_FULL=y | ||
38 | CONFIG_FUTEX=y | 44 | CONFIG_FUTEX=y |
39 | # CONFIG_EPOLL is not set | 45 | # CONFIG_EPOLL is not set |
40 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 46 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
@@ -44,6 +50,7 @@ CONFIG_CC_ALIGN_LABELS=0 | |||
44 | CONFIG_CC_ALIGN_LOOPS=0 | 50 | CONFIG_CC_ALIGN_LOOPS=0 |
45 | CONFIG_CC_ALIGN_JUMPS=0 | 51 | CONFIG_CC_ALIGN_JUMPS=0 |
46 | # CONFIG_TINY_SHMEM is not set | 52 | # CONFIG_TINY_SHMEM is not set |
53 | CONFIG_BASE_SMALL=0 | ||
47 | 54 | ||
48 | # | 55 | # |
49 | # Loadable module support | 56 | # Loadable module support |
@@ -59,34 +66,84 @@ CONFIG_6xx=y | |||
59 | # CONFIG_POWER3 is not set | 66 | # CONFIG_POWER3 is not set |
60 | # CONFIG_POWER4 is not set | 67 | # CONFIG_POWER4 is not set |
61 | # CONFIG_8xx is not set | 68 | # CONFIG_8xx is not set |
69 | # CONFIG_E200 is not set | ||
62 | # CONFIG_E500 is not set | 70 | # CONFIG_E500 is not set |
71 | CONFIG_PPC_FPU=y | ||
72 | # CONFIG_KEXEC is not set | ||
63 | # CONFIG_CPU_FREQ is not set | 73 | # CONFIG_CPU_FREQ is not set |
74 | # CONFIG_WANT_EARLY_SERIAL is not set | ||
64 | CONFIG_PPC_GEN550=y | 75 | CONFIG_PPC_GEN550=y |
65 | CONFIG_83xx=y | ||
66 | |||
67 | # | ||
68 | # Freescale 83xx options | ||
69 | # | ||
70 | CONFIG_MPC834x_SYS=y | ||
71 | CONFIG_MPC834x=y | ||
72 | CONFIG_PPC_STD_MMU=y | 76 | CONFIG_PPC_STD_MMU=y |
73 | 77 | ||
74 | # | 78 | # |
75 | # Platform options | 79 | # Platform options |
76 | # | 80 | # |
81 | # CONFIG_PPC_MULTIPLATFORM is not set | ||
82 | # CONFIG_APUS is not set | ||
83 | # CONFIG_KATANA is not set | ||
84 | # CONFIG_WILLOW is not set | ||
85 | # CONFIG_CPCI690 is not set | ||
86 | # CONFIG_POWERPMC250 is not set | ||
87 | # CONFIG_CHESTNUT is not set | ||
88 | # CONFIG_SPRUCE is not set | ||
89 | # CONFIG_HDPU is not set | ||
90 | # CONFIG_EV64260 is not set | ||
91 | # CONFIG_LOPEC is not set | ||
92 | # CONFIG_MVME5100 is not set | ||
93 | # CONFIG_PPLUS is not set | ||
94 | # CONFIG_PRPMC750 is not set | ||
95 | # CONFIG_PRPMC800 is not set | ||
96 | # CONFIG_SANDPOINT is not set | ||
97 | # CONFIG_RADSTONE_PPC7D is not set | ||
98 | # CONFIG_PAL4 is not set | ||
99 | # CONFIG_GEMINI is not set | ||
100 | # CONFIG_EST8260 is not set | ||
101 | # CONFIG_SBC82xx is not set | ||
102 | # CONFIG_SBS8260 is not set | ||
103 | # CONFIG_RPX8260 is not set | ||
104 | # CONFIG_TQM8260 is not set | ||
105 | # CONFIG_ADS8272 is not set | ||
106 | # CONFIG_PQ2FADS is not set | ||
107 | # CONFIG_LITE5200 is not set | ||
108 | CONFIG_MPC834x_SYS=y | ||
109 | # CONFIG_EV64360 is not set | ||
110 | CONFIG_83xx=y | ||
111 | CONFIG_MPC834x=y | ||
77 | # CONFIG_SMP is not set | 112 | # CONFIG_SMP is not set |
78 | # CONFIG_PREEMPT is not set | ||
79 | # CONFIG_HIGHMEM is not set | 113 | # CONFIG_HIGHMEM is not set |
114 | # CONFIG_HZ_100 is not set | ||
115 | CONFIG_HZ_250=y | ||
116 | # CONFIG_HZ_1000 is not set | ||
117 | CONFIG_HZ=250 | ||
118 | CONFIG_PREEMPT_NONE=y | ||
119 | # CONFIG_PREEMPT_VOLUNTARY is not set | ||
120 | # CONFIG_PREEMPT is not set | ||
121 | CONFIG_SELECT_MEMORY_MODEL=y | ||
122 | CONFIG_FLATMEM_MANUAL=y | ||
123 | # CONFIG_DISCONTIGMEM_MANUAL is not set | ||
124 | # CONFIG_SPARSEMEM_MANUAL is not set | ||
125 | CONFIG_FLATMEM=y | ||
126 | CONFIG_FLAT_NODE_MEM_MAP=y | ||
127 | # CONFIG_SPARSEMEM_STATIC is not set | ||
128 | CONFIG_SPLIT_PTLOCK_CPUS=4 | ||
80 | CONFIG_BINFMT_ELF=y | 129 | CONFIG_BINFMT_ELF=y |
81 | # CONFIG_BINFMT_MISC is not set | 130 | # CONFIG_BINFMT_MISC is not set |
82 | # CONFIG_CMDLINE_BOOL is not set | 131 | # CONFIG_CMDLINE_BOOL is not set |
132 | # CONFIG_PM is not set | ||
133 | # CONFIG_SOFTWARE_SUSPEND is not set | ||
134 | CONFIG_SECCOMP=y | ||
135 | CONFIG_ISA_DMA_API=y | ||
83 | 136 | ||
84 | # | 137 | # |
85 | # Bus options | 138 | # Bus options |
86 | # | 139 | # |
87 | CONFIG_GENERIC_ISA_DMA=y | 140 | CONFIG_GENERIC_ISA_DMA=y |
88 | # CONFIG_PCI is not set | 141 | # CONFIG_PPC_I8259 is not set |
89 | # CONFIG_PCI_DOMAINS is not set | 142 | CONFIG_PPC_INDIRECT_PCI=y |
143 | CONFIG_PCI=y | ||
144 | CONFIG_PCI_DOMAINS=y | ||
145 | # CONFIG_MPC83xx_PCI2 is not set | ||
146 | CONFIG_PCI_LEGACY_PROC=y | ||
90 | 147 | ||
91 | # | 148 | # |
92 | # PCCARD (PCMCIA/CardBus) support | 149 | # PCCARD (PCMCIA/CardBus) support |
@@ -94,10 +151,6 @@ CONFIG_GENERIC_ISA_DMA=y | |||
94 | # CONFIG_PCCARD is not set | 151 | # CONFIG_PCCARD is not set |
95 | 152 | ||
96 | # | 153 | # |
97 | # PC-card bridges | ||
98 | # | ||
99 | |||
100 | # | ||
101 | # Advanced setup | 154 | # Advanced setup |
102 | # | 155 | # |
103 | # CONFIG_ADVANCED_OPTIONS is not set | 156 | # CONFIG_ADVANCED_OPTIONS is not set |
@@ -112,6 +165,75 @@ CONFIG_TASK_SIZE=0x80000000 | |||
112 | CONFIG_BOOT_LOAD=0x00800000 | 165 | CONFIG_BOOT_LOAD=0x00800000 |
113 | 166 | ||
114 | # | 167 | # |
168 | # Networking | ||
169 | # | ||
170 | CONFIG_NET=y | ||
171 | |||
172 | # | ||
173 | # Networking options | ||
174 | # | ||
175 | CONFIG_PACKET=y | ||
176 | # CONFIG_PACKET_MMAP is not set | ||
177 | CONFIG_UNIX=y | ||
178 | # CONFIG_NET_KEY is not set | ||
179 | CONFIG_INET=y | ||
180 | CONFIG_IP_MULTICAST=y | ||
181 | # CONFIG_IP_ADVANCED_ROUTER is not set | ||
182 | CONFIG_IP_FIB_HASH=y | ||
183 | CONFIG_IP_PNP=y | ||
184 | CONFIG_IP_PNP_DHCP=y | ||
185 | CONFIG_IP_PNP_BOOTP=y | ||
186 | # CONFIG_IP_PNP_RARP is not set | ||
187 | # CONFIG_NET_IPIP is not set | ||
188 | # CONFIG_NET_IPGRE is not set | ||
189 | # CONFIG_IP_MROUTE is not set | ||
190 | # CONFIG_ARPD is not set | ||
191 | CONFIG_SYN_COOKIES=y | ||
192 | # CONFIG_INET_AH is not set | ||
193 | # CONFIG_INET_ESP is not set | ||
194 | # CONFIG_INET_IPCOMP is not set | ||
195 | # CONFIG_INET_TUNNEL is not set | ||
196 | CONFIG_INET_DIAG=y | ||
197 | CONFIG_INET_TCP_DIAG=y | ||
198 | # CONFIG_TCP_CONG_ADVANCED is not set | ||
199 | CONFIG_TCP_CONG_BIC=y | ||
200 | # CONFIG_IPV6 is not set | ||
201 | # CONFIG_NETFILTER is not set | ||
202 | |||
203 | # | ||
204 | # DCCP Configuration (EXPERIMENTAL) | ||
205 | # | ||
206 | # CONFIG_IP_DCCP is not set | ||
207 | |||
208 | # | ||
209 | # SCTP Configuration (EXPERIMENTAL) | ||
210 | # | ||
211 | # CONFIG_IP_SCTP is not set | ||
212 | # CONFIG_ATM is not set | ||
213 | # CONFIG_BRIDGE is not set | ||
214 | # CONFIG_VLAN_8021Q is not set | ||
215 | # CONFIG_DECNET is not set | ||
216 | # CONFIG_LLC2 is not set | ||
217 | # CONFIG_IPX is not set | ||
218 | # CONFIG_ATALK is not set | ||
219 | # CONFIG_X25 is not set | ||
220 | # CONFIG_LAPB is not set | ||
221 | # CONFIG_NET_DIVERT is not set | ||
222 | # CONFIG_ECONET is not set | ||
223 | # CONFIG_WAN_ROUTER is not set | ||
224 | # CONFIG_NET_SCHED is not set | ||
225 | # CONFIG_NET_CLS_ROUTE is not set | ||
226 | |||
227 | # | ||
228 | # Network testing | ||
229 | # | ||
230 | # CONFIG_NET_PKTGEN is not set | ||
231 | # CONFIG_HAMRADIO is not set | ||
232 | # CONFIG_IRDA is not set | ||
233 | # CONFIG_BT is not set | ||
234 | # CONFIG_IEEE80211 is not set | ||
235 | |||
236 | # | ||
115 | # Device Drivers | 237 | # Device Drivers |
116 | # | 238 | # |
117 | 239 | ||
@@ -123,6 +245,11 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y | |||
123 | # CONFIG_FW_LOADER is not set | 245 | # CONFIG_FW_LOADER is not set |
124 | 246 | ||
125 | # | 247 | # |
248 | # Connector - unified userspace <-> kernelspace linker | ||
249 | # | ||
250 | # CONFIG_CONNECTOR is not set | ||
251 | |||
252 | # | ||
126 | # Memory Technology Devices (MTD) | 253 | # Memory Technology Devices (MTD) |
127 | # | 254 | # |
128 | # CONFIG_MTD is not set | 255 | # CONFIG_MTD is not set |
@@ -140,15 +267,19 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y | |||
140 | # Block devices | 267 | # Block devices |
141 | # | 268 | # |
142 | # CONFIG_BLK_DEV_FD is not set | 269 | # CONFIG_BLK_DEV_FD is not set |
270 | # CONFIG_BLK_CPQ_DA is not set | ||
271 | # CONFIG_BLK_CPQ_CISS_DA is not set | ||
272 | # CONFIG_BLK_DEV_DAC960 is not set | ||
273 | # CONFIG_BLK_DEV_UMEM is not set | ||
143 | # CONFIG_BLK_DEV_COW_COMMON is not set | 274 | # CONFIG_BLK_DEV_COW_COMMON is not set |
144 | CONFIG_BLK_DEV_LOOP=y | 275 | CONFIG_BLK_DEV_LOOP=y |
145 | # CONFIG_BLK_DEV_CRYPTOLOOP is not set | 276 | # CONFIG_BLK_DEV_CRYPTOLOOP is not set |
146 | # CONFIG_BLK_DEV_NBD is not set | 277 | # CONFIG_BLK_DEV_NBD is not set |
278 | # CONFIG_BLK_DEV_SX8 is not set | ||
147 | CONFIG_BLK_DEV_RAM=y | 279 | CONFIG_BLK_DEV_RAM=y |
148 | CONFIG_BLK_DEV_RAM_COUNT=16 | 280 | CONFIG_BLK_DEV_RAM_COUNT=16 |
149 | CONFIG_BLK_DEV_RAM_SIZE=32768 | 281 | CONFIG_BLK_DEV_RAM_SIZE=32768 |
150 | CONFIG_BLK_DEV_INITRD=y | 282 | CONFIG_BLK_DEV_INITRD=y |
151 | CONFIG_INITRAMFS_SOURCE="" | ||
152 | # CONFIG_LBD is not set | 283 | # CONFIG_LBD is not set |
153 | # CONFIG_CDROM_PKTCDVD is not set | 284 | # CONFIG_CDROM_PKTCDVD is not set |
154 | 285 | ||
@@ -159,6 +290,11 @@ CONFIG_IOSCHED_NOOP=y | |||
159 | CONFIG_IOSCHED_AS=y | 290 | CONFIG_IOSCHED_AS=y |
160 | CONFIG_IOSCHED_DEADLINE=y | 291 | CONFIG_IOSCHED_DEADLINE=y |
161 | CONFIG_IOSCHED_CFQ=y | 292 | CONFIG_IOSCHED_CFQ=y |
293 | CONFIG_DEFAULT_AS=y | ||
294 | # CONFIG_DEFAULT_DEADLINE is not set | ||
295 | # CONFIG_DEFAULT_CFQ is not set | ||
296 | # CONFIG_DEFAULT_NOOP is not set | ||
297 | CONFIG_DEFAULT_IOSCHED="anticipatory" | ||
162 | # CONFIG_ATA_OVER_ETH is not set | 298 | # CONFIG_ATA_OVER_ETH is not set |
163 | 299 | ||
164 | # | 300 | # |
@@ -169,6 +305,7 @@ CONFIG_IOSCHED_CFQ=y | |||
169 | # | 305 | # |
170 | # SCSI device support | 306 | # SCSI device support |
171 | # | 307 | # |
308 | # CONFIG_RAID_ATTRS is not set | ||
172 | # CONFIG_SCSI is not set | 309 | # CONFIG_SCSI is not set |
173 | 310 | ||
174 | # | 311 | # |
@@ -179,110 +316,116 @@ CONFIG_IOSCHED_CFQ=y | |||
179 | # | 316 | # |
180 | # Fusion MPT device support | 317 | # Fusion MPT device support |
181 | # | 318 | # |
319 | # CONFIG_FUSION is not set | ||
182 | 320 | ||
183 | # | 321 | # |
184 | # IEEE 1394 (FireWire) support | 322 | # IEEE 1394 (FireWire) support |
185 | # | 323 | # |
324 | # CONFIG_IEEE1394 is not set | ||
186 | 325 | ||
187 | # | 326 | # |
188 | # I2O device support | 327 | # I2O device support |
189 | # | 328 | # |
329 | # CONFIG_I2O is not set | ||
190 | 330 | ||
191 | # | 331 | # |
192 | # Macintosh device drivers | 332 | # Macintosh device drivers |
193 | # | 333 | # |
194 | 334 | ||
195 | # | 335 | # |
196 | # Networking support | 336 | # Network device support |
197 | # | 337 | # |
198 | CONFIG_NET=y | 338 | CONFIG_NETDEVICES=y |
199 | 339 | # CONFIG_DUMMY is not set | |
200 | # | 340 | # CONFIG_BONDING is not set |
201 | # Networking options | 341 | # CONFIG_EQUALIZER is not set |
202 | # | 342 | # CONFIG_TUN is not set |
203 | CONFIG_PACKET=y | ||
204 | # CONFIG_PACKET_MMAP is not set | ||
205 | # CONFIG_NETLINK_DEV is not set | ||
206 | CONFIG_UNIX=y | ||
207 | # CONFIG_NET_KEY is not set | ||
208 | CONFIG_INET=y | ||
209 | CONFIG_IP_MULTICAST=y | ||
210 | # CONFIG_IP_ADVANCED_ROUTER is not set | ||
211 | CONFIG_IP_PNP=y | ||
212 | CONFIG_IP_PNP_DHCP=y | ||
213 | CONFIG_IP_PNP_BOOTP=y | ||
214 | # CONFIG_IP_PNP_RARP is not set | ||
215 | # CONFIG_NET_IPIP is not set | ||
216 | # CONFIG_NET_IPGRE is not set | ||
217 | # CONFIG_IP_MROUTE is not set | ||
218 | # CONFIG_ARPD is not set | ||
219 | CONFIG_SYN_COOKIES=y | ||
220 | # CONFIG_INET_AH is not set | ||
221 | # CONFIG_INET_ESP is not set | ||
222 | # CONFIG_INET_IPCOMP is not set | ||
223 | # CONFIG_INET_TUNNEL is not set | ||
224 | CONFIG_IP_TCPDIAG=y | ||
225 | # CONFIG_IP_TCPDIAG_IPV6 is not set | ||
226 | # CONFIG_IPV6 is not set | ||
227 | # CONFIG_NETFILTER is not set | ||
228 | 343 | ||
229 | # | 344 | # |
230 | # SCTP Configuration (EXPERIMENTAL) | 345 | # ARCnet devices |
231 | # | 346 | # |
232 | # CONFIG_IP_SCTP is not set | 347 | # CONFIG_ARCNET is not set |
233 | # CONFIG_ATM is not set | ||
234 | # CONFIG_BRIDGE is not set | ||
235 | # CONFIG_VLAN_8021Q is not set | ||
236 | # CONFIG_DECNET is not set | ||
237 | # CONFIG_LLC2 is not set | ||
238 | # CONFIG_IPX is not set | ||
239 | # CONFIG_ATALK is not set | ||
240 | # CONFIG_X25 is not set | ||
241 | # CONFIG_LAPB is not set | ||
242 | # CONFIG_NET_DIVERT is not set | ||
243 | # CONFIG_ECONET is not set | ||
244 | # CONFIG_WAN_ROUTER is not set | ||
245 | 348 | ||
246 | # | 349 | # |
247 | # QoS and/or fair queueing | 350 | # PHY device support |
248 | # | 351 | # |
249 | # CONFIG_NET_SCHED is not set | 352 | CONFIG_PHYLIB=y |
250 | # CONFIG_NET_CLS_ROUTE is not set | ||
251 | 353 | ||
252 | # | 354 | # |
253 | # Network testing | 355 | # MII PHY device drivers |
254 | # | 356 | # |
255 | # CONFIG_NET_PKTGEN is not set | 357 | CONFIG_MARVELL_PHY=y |
256 | # CONFIG_NETPOLL is not set | 358 | # CONFIG_DAVICOM_PHY is not set |
257 | # CONFIG_NET_POLL_CONTROLLER is not set | 359 | # CONFIG_QSEMI_PHY is not set |
258 | # CONFIG_HAMRADIO is not set | 360 | # CONFIG_LXT_PHY is not set |
259 | # CONFIG_IRDA is not set | 361 | # CONFIG_CICADA_PHY is not set |
260 | # CONFIG_BT is not set | ||
261 | CONFIG_NETDEVICES=y | ||
262 | # CONFIG_DUMMY is not set | ||
263 | # CONFIG_BONDING is not set | ||
264 | # CONFIG_EQUALIZER is not set | ||
265 | # CONFIG_TUN is not set | ||
266 | 362 | ||
267 | # | 363 | # |
268 | # Ethernet (10 or 100Mbit) | 364 | # Ethernet (10 or 100Mbit) |
269 | # | 365 | # |
270 | CONFIG_NET_ETHERNET=y | 366 | CONFIG_NET_ETHERNET=y |
271 | CONFIG_MII=y | 367 | CONFIG_MII=y |
368 | # CONFIG_HAPPYMEAL is not set | ||
369 | # CONFIG_SUNGEM is not set | ||
370 | # CONFIG_CASSINI is not set | ||
371 | # CONFIG_NET_VENDOR_3COM is not set | ||
372 | |||
373 | # | ||
374 | # Tulip family network device support | ||
375 | # | ||
376 | # CONFIG_NET_TULIP is not set | ||
377 | # CONFIG_HP100 is not set | ||
378 | CONFIG_NET_PCI=y | ||
379 | # CONFIG_PCNET32 is not set | ||
380 | # CONFIG_AMD8111_ETH is not set | ||
381 | # CONFIG_ADAPTEC_STARFIRE is not set | ||
382 | # CONFIG_B44 is not set | ||
383 | # CONFIG_FORCEDETH is not set | ||
384 | # CONFIG_DGRS is not set | ||
385 | # CONFIG_EEPRO100 is not set | ||
386 | CONFIG_E100=y | ||
387 | # CONFIG_FEALNX is not set | ||
388 | # CONFIG_NATSEMI is not set | ||
389 | # CONFIG_NE2K_PCI is not set | ||
390 | # CONFIG_8139CP is not set | ||
391 | # CONFIG_8139TOO is not set | ||
392 | # CONFIG_SIS900 is not set | ||
393 | # CONFIG_EPIC100 is not set | ||
394 | # CONFIG_SUNDANCE is not set | ||
395 | # CONFIG_TLAN is not set | ||
396 | # CONFIG_VIA_RHINE is not set | ||
272 | 397 | ||
273 | # | 398 | # |
274 | # Ethernet (1000 Mbit) | 399 | # Ethernet (1000 Mbit) |
275 | # | 400 | # |
401 | # CONFIG_ACENIC is not set | ||
402 | # CONFIG_DL2K is not set | ||
403 | CONFIG_E1000=y | ||
404 | # CONFIG_E1000_NAPI is not set | ||
405 | # CONFIG_NS83820 is not set | ||
406 | # CONFIG_HAMACHI is not set | ||
407 | # CONFIG_YELLOWFIN is not set | ||
408 | # CONFIG_R8169 is not set | ||
409 | # CONFIG_SIS190 is not set | ||
410 | # CONFIG_SKGE is not set | ||
411 | # CONFIG_SK98LIN is not set | ||
412 | # CONFIG_VIA_VELOCITY is not set | ||
413 | # CONFIG_TIGON3 is not set | ||
414 | # CONFIG_BNX2 is not set | ||
276 | CONFIG_GIANFAR=y | 415 | CONFIG_GIANFAR=y |
277 | # CONFIG_GFAR_NAPI is not set | 416 | # CONFIG_GFAR_NAPI is not set |
278 | 417 | ||
279 | # | 418 | # |
280 | # Ethernet (10000 Mbit) | 419 | # Ethernet (10000 Mbit) |
281 | # | 420 | # |
421 | # CONFIG_CHELSIO_T1 is not set | ||
422 | # CONFIG_IXGB is not set | ||
423 | # CONFIG_S2IO is not set | ||
282 | 424 | ||
283 | # | 425 | # |
284 | # Token Ring devices | 426 | # Token Ring devices |
285 | # | 427 | # |
428 | # CONFIG_TR is not set | ||
286 | 429 | ||
287 | # | 430 | # |
288 | # Wireless LAN (non-hamradio) | 431 | # Wireless LAN (non-hamradio) |
@@ -293,10 +436,14 @@ CONFIG_GIANFAR=y | |||
293 | # Wan interfaces | 436 | # Wan interfaces |
294 | # | 437 | # |
295 | # CONFIG_WAN is not set | 438 | # CONFIG_WAN is not set |
439 | # CONFIG_FDDI is not set | ||
440 | # CONFIG_HIPPI is not set | ||
296 | # CONFIG_PPP is not set | 441 | # CONFIG_PPP is not set |
297 | # CONFIG_SLIP is not set | 442 | # CONFIG_SLIP is not set |
298 | # CONFIG_SHAPER is not set | 443 | # CONFIG_SHAPER is not set |
299 | # CONFIG_NETCONSOLE is not set | 444 | # CONFIG_NETCONSOLE is not set |
445 | # CONFIG_NETPOLL is not set | ||
446 | # CONFIG_NET_POLL_CONTROLLER is not set | ||
300 | 447 | ||
301 | # | 448 | # |
302 | # ISDN subsystem | 449 | # ISDN subsystem |
@@ -323,14 +470,6 @@ CONFIG_INPUT=y | |||
323 | # CONFIG_INPUT_EVBUG is not set | 470 | # CONFIG_INPUT_EVBUG is not set |
324 | 471 | ||
325 | # | 472 | # |
326 | # Input I/O drivers | ||
327 | # | ||
328 | # CONFIG_GAMEPORT is not set | ||
329 | CONFIG_SOUND_GAMEPORT=y | ||
330 | # CONFIG_SERIO is not set | ||
331 | # CONFIG_SERIO_I8042 is not set | ||
332 | |||
333 | # | ||
334 | # Input Device Drivers | 473 | # Input Device Drivers |
335 | # | 474 | # |
336 | # CONFIG_INPUT_KEYBOARD is not set | 475 | # CONFIG_INPUT_KEYBOARD is not set |
@@ -340,6 +479,12 @@ CONFIG_SOUND_GAMEPORT=y | |||
340 | # CONFIG_INPUT_MISC is not set | 479 | # CONFIG_INPUT_MISC is not set |
341 | 480 | ||
342 | # | 481 | # |
482 | # Hardware I/O ports | ||
483 | # | ||
484 | # CONFIG_SERIO is not set | ||
485 | # CONFIG_GAMEPORT is not set | ||
486 | |||
487 | # | ||
343 | # Character devices | 488 | # Character devices |
344 | # | 489 | # |
345 | # CONFIG_VT is not set | 490 | # CONFIG_VT is not set |
@@ -358,6 +503,7 @@ CONFIG_SERIAL_8250_NR_UARTS=4 | |||
358 | # | 503 | # |
359 | CONFIG_SERIAL_CORE=y | 504 | CONFIG_SERIAL_CORE=y |
360 | CONFIG_SERIAL_CORE_CONSOLE=y | 505 | CONFIG_SERIAL_CORE_CONSOLE=y |
506 | # CONFIG_SERIAL_JSM is not set | ||
361 | CONFIG_UNIX98_PTYS=y | 507 | CONFIG_UNIX98_PTYS=y |
362 | CONFIG_LEGACY_PTYS=y | 508 | CONFIG_LEGACY_PTYS=y |
363 | CONFIG_LEGACY_PTY_COUNT=256 | 509 | CONFIG_LEGACY_PTY_COUNT=256 |
@@ -376,6 +522,7 @@ CONFIG_GEN_RTC=y | |||
376 | # CONFIG_GEN_RTC_X is not set | 522 | # CONFIG_GEN_RTC_X is not set |
377 | # CONFIG_DTLK is not set | 523 | # CONFIG_DTLK is not set |
378 | # CONFIG_R3964 is not set | 524 | # CONFIG_R3964 is not set |
525 | # CONFIG_APPLICOM is not set | ||
379 | 526 | ||
380 | # | 527 | # |
381 | # Ftape, the floppy tape device driver | 528 | # Ftape, the floppy tape device driver |
@@ -385,6 +532,12 @@ CONFIG_GEN_RTC=y | |||
385 | # CONFIG_RAW_DRIVER is not set | 532 | # CONFIG_RAW_DRIVER is not set |
386 | 533 | ||
387 | # | 534 | # |
535 | # TPM devices | ||
536 | # | ||
537 | # CONFIG_TCG_TPM is not set | ||
538 | # CONFIG_TELCLOCK is not set | ||
539 | |||
540 | # | ||
388 | # I2C support | 541 | # I2C support |
389 | # | 542 | # |
390 | CONFIG_I2C=y | 543 | CONFIG_I2C=y |
@@ -400,23 +553,68 @@ CONFIG_I2C_CHARDEV=y | |||
400 | # | 553 | # |
401 | # I2C Hardware Bus support | 554 | # I2C Hardware Bus support |
402 | # | 555 | # |
403 | # CONFIG_I2C_ISA is not set | 556 | # CONFIG_I2C_ALI1535 is not set |
557 | # CONFIG_I2C_ALI1563 is not set | ||
558 | # CONFIG_I2C_ALI15X3 is not set | ||
559 | # CONFIG_I2C_AMD756 is not set | ||
560 | # CONFIG_I2C_AMD8111 is not set | ||
561 | # CONFIG_I2C_I801 is not set | ||
562 | # CONFIG_I2C_I810 is not set | ||
563 | # CONFIG_I2C_PIIX4 is not set | ||
404 | CONFIG_I2C_MPC=y | 564 | CONFIG_I2C_MPC=y |
565 | # CONFIG_I2C_NFORCE2 is not set | ||
405 | # CONFIG_I2C_PARPORT_LIGHT is not set | 566 | # CONFIG_I2C_PARPORT_LIGHT is not set |
567 | # CONFIG_I2C_PROSAVAGE is not set | ||
568 | # CONFIG_I2C_SAVAGE4 is not set | ||
569 | # CONFIG_SCx200_ACB is not set | ||
570 | # CONFIG_I2C_SIS5595 is not set | ||
571 | # CONFIG_I2C_SIS630 is not set | ||
572 | # CONFIG_I2C_SIS96X is not set | ||
573 | # CONFIG_I2C_VIA is not set | ||
574 | # CONFIG_I2C_VIAPRO is not set | ||
575 | # CONFIG_I2C_VOODOO3 is not set | ||
406 | # CONFIG_I2C_PCA_ISA is not set | 576 | # CONFIG_I2C_PCA_ISA is not set |
407 | 577 | ||
408 | # | 578 | # |
409 | # Hardware Sensors Chip support | 579 | # Miscellaneous I2C Chip support |
580 | # | ||
581 | # CONFIG_SENSORS_DS1337 is not set | ||
582 | # CONFIG_SENSORS_DS1374 is not set | ||
583 | # CONFIG_SENSORS_EEPROM is not set | ||
584 | # CONFIG_SENSORS_PCF8574 is not set | ||
585 | # CONFIG_SENSORS_PCA9539 is not set | ||
586 | # CONFIG_SENSORS_PCF8591 is not set | ||
587 | # CONFIG_SENSORS_RTC8564 is not set | ||
588 | # CONFIG_SENSORS_M41T00 is not set | ||
589 | # CONFIG_SENSORS_MAX6875 is not set | ||
590 | # CONFIG_RTC_X1205_I2C is not set | ||
591 | # CONFIG_I2C_DEBUG_CORE is not set | ||
592 | # CONFIG_I2C_DEBUG_ALGO is not set | ||
593 | # CONFIG_I2C_DEBUG_BUS is not set | ||
594 | # CONFIG_I2C_DEBUG_CHIP is not set | ||
595 | |||
596 | # | ||
597 | # Dallas's 1-wire bus | ||
598 | # | ||
599 | # CONFIG_W1 is not set | ||
600 | |||
601 | # | ||
602 | # Hardware Monitoring support | ||
410 | # | 603 | # |
411 | # CONFIG_I2C_SENSOR is not set | 604 | CONFIG_HWMON=y |
605 | # CONFIG_HWMON_VID is not set | ||
412 | # CONFIG_SENSORS_ADM1021 is not set | 606 | # CONFIG_SENSORS_ADM1021 is not set |
413 | # CONFIG_SENSORS_ADM1025 is not set | 607 | # CONFIG_SENSORS_ADM1025 is not set |
414 | # CONFIG_SENSORS_ADM1026 is not set | 608 | # CONFIG_SENSORS_ADM1026 is not set |
415 | # CONFIG_SENSORS_ADM1031 is not set | 609 | # CONFIG_SENSORS_ADM1031 is not set |
610 | # CONFIG_SENSORS_ADM9240 is not set | ||
416 | # CONFIG_SENSORS_ASB100 is not set | 611 | # CONFIG_SENSORS_ASB100 is not set |
612 | # CONFIG_SENSORS_ATXP1 is not set | ||
417 | # CONFIG_SENSORS_DS1621 is not set | 613 | # CONFIG_SENSORS_DS1621 is not set |
418 | # CONFIG_SENSORS_FSCHER is not set | 614 | # CONFIG_SENSORS_FSCHER is not set |
615 | # CONFIG_SENSORS_FSCPOS is not set | ||
419 | # CONFIG_SENSORS_GL518SM is not set | 616 | # CONFIG_SENSORS_GL518SM is not set |
617 | # CONFIG_SENSORS_GL520SM is not set | ||
420 | # CONFIG_SENSORS_IT87 is not set | 618 | # CONFIG_SENSORS_IT87 is not set |
421 | # CONFIG_SENSORS_LM63 is not set | 619 | # CONFIG_SENSORS_LM63 is not set |
422 | # CONFIG_SENSORS_LM75 is not set | 620 | # CONFIG_SENSORS_LM75 is not set |
@@ -427,33 +625,26 @@ CONFIG_I2C_MPC=y | |||
427 | # CONFIG_SENSORS_LM85 is not set | 625 | # CONFIG_SENSORS_LM85 is not set |
428 | # CONFIG_SENSORS_LM87 is not set | 626 | # CONFIG_SENSORS_LM87 is not set |
429 | # CONFIG_SENSORS_LM90 is not set | 627 | # CONFIG_SENSORS_LM90 is not set |
628 | # CONFIG_SENSORS_LM92 is not set | ||
430 | # CONFIG_SENSORS_MAX1619 is not set | 629 | # CONFIG_SENSORS_MAX1619 is not set |
431 | # CONFIG_SENSORS_PC87360 is not set | 630 | # CONFIG_SENSORS_PC87360 is not set |
432 | # CONFIG_SENSORS_SMSC47B397 is not set | 631 | # CONFIG_SENSORS_SIS5595 is not set |
433 | # CONFIG_SENSORS_SMSC47M1 is not set | 632 | # CONFIG_SENSORS_SMSC47M1 is not set |
633 | # CONFIG_SENSORS_SMSC47B397 is not set | ||
634 | # CONFIG_SENSORS_VIA686A is not set | ||
434 | # CONFIG_SENSORS_W83781D is not set | 635 | # CONFIG_SENSORS_W83781D is not set |
636 | # CONFIG_SENSORS_W83792D is not set | ||
435 | # CONFIG_SENSORS_W83L785TS is not set | 637 | # CONFIG_SENSORS_W83L785TS is not set |
436 | # CONFIG_SENSORS_W83627HF is not set | 638 | # CONFIG_SENSORS_W83627HF is not set |
639 | # CONFIG_SENSORS_W83627EHF is not set | ||
640 | # CONFIG_HWMON_DEBUG_CHIP is not set | ||
437 | 641 | ||
438 | # | 642 | # |
439 | # Other I2C Chip support | 643 | # Misc devices |
440 | # | ||
441 | # CONFIG_SENSORS_EEPROM is not set | ||
442 | # CONFIG_SENSORS_PCF8574 is not set | ||
443 | # CONFIG_SENSORS_PCF8591 is not set | ||
444 | # CONFIG_SENSORS_RTC8564 is not set | ||
445 | # CONFIG_I2C_DEBUG_CORE is not set | ||
446 | # CONFIG_I2C_DEBUG_ALGO is not set | ||
447 | # CONFIG_I2C_DEBUG_BUS is not set | ||
448 | # CONFIG_I2C_DEBUG_CHIP is not set | ||
449 | |||
450 | # | ||
451 | # Dallas's 1-wire bus | ||
452 | # | 644 | # |
453 | # CONFIG_W1 is not set | ||
454 | 645 | ||
455 | # | 646 | # |
456 | # Misc devices | 647 | # Multimedia Capabilities Port drivers |
457 | # | 648 | # |
458 | 649 | ||
459 | # | 650 | # |
@@ -479,11 +670,12 @@ CONFIG_I2C_MPC=y | |||
479 | # | 670 | # |
480 | # USB support | 671 | # USB support |
481 | # | 672 | # |
482 | # CONFIG_USB_ARCH_HAS_HCD is not set | 673 | CONFIG_USB_ARCH_HAS_HCD=y |
483 | # CONFIG_USB_ARCH_HAS_OHCI is not set | 674 | CONFIG_USB_ARCH_HAS_OHCI=y |
675 | # CONFIG_USB is not set | ||
484 | 676 | ||
485 | # | 677 | # |
486 | # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' may also be needed; see USB_STORAGE Help for more information | 678 | # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' |
487 | # | 679 | # |
488 | 680 | ||
489 | # | 681 | # |
@@ -502,10 +694,15 @@ CONFIG_I2C_MPC=y | |||
502 | # CONFIG_INFINIBAND is not set | 694 | # CONFIG_INFINIBAND is not set |
503 | 695 | ||
504 | # | 696 | # |
697 | # SN Devices | ||
698 | # | ||
699 | |||
700 | # | ||
505 | # File systems | 701 | # File systems |
506 | # | 702 | # |
507 | CONFIG_EXT2_FS=y | 703 | CONFIG_EXT2_FS=y |
508 | # CONFIG_EXT2_FS_XATTR is not set | 704 | # CONFIG_EXT2_FS_XATTR is not set |
705 | # CONFIG_EXT2_FS_XIP is not set | ||
509 | CONFIG_EXT3_FS=y | 706 | CONFIG_EXT3_FS=y |
510 | CONFIG_EXT3_FS_XATTR=y | 707 | CONFIG_EXT3_FS_XATTR=y |
511 | # CONFIG_EXT3_FS_POSIX_ACL is not set | 708 | # CONFIG_EXT3_FS_POSIX_ACL is not set |
@@ -515,17 +712,16 @@ CONFIG_JBD=y | |||
515 | CONFIG_FS_MBCACHE=y | 712 | CONFIG_FS_MBCACHE=y |
516 | # CONFIG_REISERFS_FS is not set | 713 | # CONFIG_REISERFS_FS is not set |
517 | # CONFIG_JFS_FS is not set | 714 | # CONFIG_JFS_FS is not set |
518 | 715 | # CONFIG_FS_POSIX_ACL is not set | |
519 | # | ||
520 | # XFS support | ||
521 | # | ||
522 | # CONFIG_XFS_FS is not set | 716 | # CONFIG_XFS_FS is not set |
523 | # CONFIG_MINIX_FS is not set | 717 | # CONFIG_MINIX_FS is not set |
524 | # CONFIG_ROMFS_FS is not set | 718 | # CONFIG_ROMFS_FS is not set |
719 | CONFIG_INOTIFY=y | ||
525 | # CONFIG_QUOTA is not set | 720 | # CONFIG_QUOTA is not set |
526 | CONFIG_DNOTIFY=y | 721 | CONFIG_DNOTIFY=y |
527 | # CONFIG_AUTOFS_FS is not set | 722 | # CONFIG_AUTOFS_FS is not set |
528 | # CONFIG_AUTOFS4_FS is not set | 723 | # CONFIG_AUTOFS4_FS is not set |
724 | # CONFIG_FUSE_FS is not set | ||
529 | 725 | ||
530 | # | 726 | # |
531 | # CD-ROM/DVD Filesystems | 727 | # CD-ROM/DVD Filesystems |
@@ -546,12 +742,10 @@ CONFIG_DNOTIFY=y | |||
546 | CONFIG_PROC_FS=y | 742 | CONFIG_PROC_FS=y |
547 | CONFIG_PROC_KCORE=y | 743 | CONFIG_PROC_KCORE=y |
548 | CONFIG_SYSFS=y | 744 | CONFIG_SYSFS=y |
549 | # CONFIG_DEVFS_FS is not set | ||
550 | # CONFIG_DEVPTS_FS_XATTR is not set | ||
551 | CONFIG_TMPFS=y | 745 | CONFIG_TMPFS=y |
552 | # CONFIG_TMPFS_XATTR is not set | ||
553 | # CONFIG_HUGETLB_PAGE is not set | 746 | # CONFIG_HUGETLB_PAGE is not set |
554 | CONFIG_RAMFS=y | 747 | CONFIG_RAMFS=y |
748 | # CONFIG_RELAYFS_FS is not set | ||
555 | 749 | ||
556 | # | 750 | # |
557 | # Miscellaneous filesystems | 751 | # Miscellaneous filesystems |
@@ -580,6 +774,7 @@ CONFIG_NFS_FS=y | |||
580 | # CONFIG_NFSD is not set | 774 | # CONFIG_NFSD is not set |
581 | CONFIG_ROOT_NFS=y | 775 | CONFIG_ROOT_NFS=y |
582 | CONFIG_LOCKD=y | 776 | CONFIG_LOCKD=y |
777 | CONFIG_NFS_COMMON=y | ||
583 | CONFIG_SUNRPC=y | 778 | CONFIG_SUNRPC=y |
584 | # CONFIG_RPCSEC_GSS_KRB5 is not set | 779 | # CONFIG_RPCSEC_GSS_KRB5 is not set |
585 | # CONFIG_RPCSEC_GSS_SPKM3 is not set | 780 | # CONFIG_RPCSEC_GSS_SPKM3 is not set |
@@ -588,6 +783,7 @@ CONFIG_SUNRPC=y | |||
588 | # CONFIG_NCP_FS is not set | 783 | # CONFIG_NCP_FS is not set |
589 | # CONFIG_CODA_FS is not set | 784 | # CONFIG_CODA_FS is not set |
590 | # CONFIG_AFS_FS is not set | 785 | # CONFIG_AFS_FS is not set |
786 | # CONFIG_9P_FS is not set | ||
591 | 787 | ||
592 | # | 788 | # |
593 | # Partition Types | 789 | # Partition Types |
@@ -614,6 +810,7 @@ CONFIG_PARTITION_ADVANCED=y | |||
614 | # Library routines | 810 | # Library routines |
615 | # | 811 | # |
616 | # CONFIG_CRC_CCITT is not set | 812 | # CONFIG_CRC_CCITT is not set |
813 | # CONFIG_CRC16 is not set | ||
617 | CONFIG_CRC32=y | 814 | CONFIG_CRC32=y |
618 | # CONFIG_LIBCRC32C is not set | 815 | # CONFIG_LIBCRC32C is not set |
619 | 816 | ||
@@ -625,7 +822,9 @@ CONFIG_CRC32=y | |||
625 | # | 822 | # |
626 | # Kernel hacking | 823 | # Kernel hacking |
627 | # | 824 | # |
825 | # CONFIG_PRINTK_TIME is not set | ||
628 | # CONFIG_DEBUG_KERNEL is not set | 826 | # CONFIG_DEBUG_KERNEL is not set |
827 | CONFIG_LOG_BUF_SHIFT=14 | ||
629 | # CONFIG_SERIAL_TEXT_DEBUG is not set | 828 | # CONFIG_SERIAL_TEXT_DEBUG is not set |
630 | 829 | ||
631 | # | 830 | # |
diff --git a/arch/ppc/kernel/idle.c b/arch/ppc/kernel/idle.c index 11e5b44713f7..3c4e4cb61074 100644 --- a/arch/ppc/kernel/idle.c +++ b/arch/ppc/kernel/idle.c | |||
@@ -53,10 +53,6 @@ void default_idle(void) | |||
53 | } | 53 | } |
54 | #endif | 54 | #endif |
55 | } | 55 | } |
56 | if (need_resched()) | ||
57 | schedule(); | ||
58 | if (cpu_is_offline(cpu) && system_state == SYSTEM_RUNNING) | ||
59 | cpu_die(); | ||
60 | } | 56 | } |
61 | 57 | ||
62 | /* | 58 | /* |
@@ -64,11 +60,22 @@ void default_idle(void) | |||
64 | */ | 60 | */ |
65 | void cpu_idle(void) | 61 | void cpu_idle(void) |
66 | { | 62 | { |
67 | for (;;) | 63 | int cpu = smp_processor_id(); |
68 | if (ppc_md.idle != NULL) | 64 | |
69 | ppc_md.idle(); | 65 | for (;;) { |
70 | else | 66 | while (need_resched()) { |
71 | default_idle(); | 67 | if (ppc_md.idle != NULL) |
68 | ppc_md.idle(); | ||
69 | else | ||
70 | default_idle(); | ||
71 | } | ||
72 | |||
73 | if (cpu_is_offline(cpu) && system_state == SYSTEM_RUNNING) | ||
74 | cpu_die(); | ||
75 | preempt_enable_no_resched(); | ||
76 | schedule(); | ||
77 | preempt_disable(); | ||
78 | } | ||
72 | } | 79 | } |
73 | 80 | ||
74 | #if defined(CONFIG_SYSCTL) && defined(CONFIG_6xx) | 81 | #if defined(CONFIG_SYSCTL) && defined(CONFIG_6xx) |
diff --git a/arch/ppc/kernel/misc.S b/arch/ppc/kernel/misc.S index 3056ede2424d..ae6af29938a1 100644 --- a/arch/ppc/kernel/misc.S +++ b/arch/ppc/kernel/misc.S | |||
@@ -25,6 +25,11 @@ | |||
25 | #include <asm/thread_info.h> | 25 | #include <asm/thread_info.h> |
26 | #include <asm/asm-offsets.h> | 26 | #include <asm/asm-offsets.h> |
27 | 27 | ||
28 | #ifdef CONFIG_8xx | ||
29 | #define ISYNC_8xx isync | ||
30 | #else | ||
31 | #define ISYNC_8xx | ||
32 | #endif | ||
28 | .text | 33 | .text |
29 | 34 | ||
30 | .align 5 | 35 | .align 5 |
@@ -800,8 +805,18 @@ _GLOBAL(_insb) | |||
800 | subi r4,r4,1 | 805 | subi r4,r4,1 |
801 | blelr- | 806 | blelr- |
802 | 00: lbz r5,0(r3) | 807 | 00: lbz r5,0(r3) |
803 | eieio | 808 | 01: eieio |
804 | stbu r5,1(r4) | 809 | 02: stbu r5,1(r4) |
810 | ISYNC_8xx | ||
811 | .section .fixup,"ax" | ||
812 | 03: blr | ||
813 | .text | ||
814 | .section __ex_table, "a" | ||
815 | .align 2 | ||
816 | .long 00b, 03b | ||
817 | .long 01b, 03b | ||
818 | .long 02b, 03b | ||
819 | .text | ||
805 | bdnz 00b | 820 | bdnz 00b |
806 | blr | 821 | blr |
807 | 822 | ||
@@ -811,8 +826,18 @@ _GLOBAL(_outsb) | |||
811 | subi r4,r4,1 | 826 | subi r4,r4,1 |
812 | blelr- | 827 | blelr- |
813 | 00: lbzu r5,1(r4) | 828 | 00: lbzu r5,1(r4) |
814 | stb r5,0(r3) | 829 | 01: stb r5,0(r3) |
815 | eieio | 830 | 02: eieio |
831 | ISYNC_8xx | ||
832 | .section .fixup,"ax" | ||
833 | 03: blr | ||
834 | .text | ||
835 | .section __ex_table, "a" | ||
836 | .align 2 | ||
837 | .long 00b, 03b | ||
838 | .long 01b, 03b | ||
839 | .long 02b, 03b | ||
840 | .text | ||
816 | bdnz 00b | 841 | bdnz 00b |
817 | blr | 842 | blr |
818 | 843 | ||
@@ -822,8 +847,18 @@ _GLOBAL(_insw) | |||
822 | subi r4,r4,2 | 847 | subi r4,r4,2 |
823 | blelr- | 848 | blelr- |
824 | 00: lhbrx r5,0,r3 | 849 | 00: lhbrx r5,0,r3 |
825 | eieio | 850 | 01: eieio |
826 | sthu r5,2(r4) | 851 | 02: sthu r5,2(r4) |
852 | ISYNC_8xx | ||
853 | .section .fixup,"ax" | ||
854 | 03: blr | ||
855 | .text | ||
856 | .section __ex_table, "a" | ||
857 | .align 2 | ||
858 | .long 00b, 03b | ||
859 | .long 01b, 03b | ||
860 | .long 02b, 03b | ||
861 | .text | ||
827 | bdnz 00b | 862 | bdnz 00b |
828 | blr | 863 | blr |
829 | 864 | ||
@@ -833,8 +868,18 @@ _GLOBAL(_outsw) | |||
833 | subi r4,r4,2 | 868 | subi r4,r4,2 |
834 | blelr- | 869 | blelr- |
835 | 00: lhzu r5,2(r4) | 870 | 00: lhzu r5,2(r4) |
836 | eieio | 871 | 01: eieio |
837 | sthbrx r5,0,r3 | 872 | 02: sthbrx r5,0,r3 |
873 | ISYNC_8xx | ||
874 | .section .fixup,"ax" | ||
875 | 03: blr | ||
876 | .text | ||
877 | .section __ex_table, "a" | ||
878 | .align 2 | ||
879 | .long 00b, 03b | ||
880 | .long 01b, 03b | ||
881 | .long 02b, 03b | ||
882 | .text | ||
838 | bdnz 00b | 883 | bdnz 00b |
839 | blr | 884 | blr |
840 | 885 | ||
@@ -844,8 +889,18 @@ _GLOBAL(_insl) | |||
844 | subi r4,r4,4 | 889 | subi r4,r4,4 |
845 | blelr- | 890 | blelr- |
846 | 00: lwbrx r5,0,r3 | 891 | 00: lwbrx r5,0,r3 |
847 | eieio | 892 | 01: eieio |
848 | stwu r5,4(r4) | 893 | 02: stwu r5,4(r4) |
894 | ISYNC_8xx | ||
895 | .section .fixup,"ax" | ||
896 | 03: blr | ||
897 | .text | ||
898 | .section __ex_table, "a" | ||
899 | .align 2 | ||
900 | .long 00b, 03b | ||
901 | .long 01b, 03b | ||
902 | .long 02b, 03b | ||
903 | .text | ||
849 | bdnz 00b | 904 | bdnz 00b |
850 | blr | 905 | blr |
851 | 906 | ||
@@ -855,8 +910,18 @@ _GLOBAL(_outsl) | |||
855 | subi r4,r4,4 | 910 | subi r4,r4,4 |
856 | blelr- | 911 | blelr- |
857 | 00: lwzu r5,4(r4) | 912 | 00: lwzu r5,4(r4) |
858 | stwbrx r5,0,r3 | 913 | 01: stwbrx r5,0,r3 |
859 | eieio | 914 | 02: eieio |
915 | ISYNC_8xx | ||
916 | .section .fixup,"ax" | ||
917 | 03: blr | ||
918 | .text | ||
919 | .section __ex_table, "a" | ||
920 | .align 2 | ||
921 | .long 00b, 03b | ||
922 | .long 01b, 03b | ||
923 | .long 02b, 03b | ||
924 | .text | ||
860 | bdnz 00b | 925 | bdnz 00b |
861 | blr | 926 | blr |
862 | 927 | ||
@@ -867,8 +932,18 @@ _GLOBAL(_insw_ns) | |||
867 | subi r4,r4,2 | 932 | subi r4,r4,2 |
868 | blelr- | 933 | blelr- |
869 | 00: lhz r5,0(r3) | 934 | 00: lhz r5,0(r3) |
870 | eieio | 935 | 01: eieio |
871 | sthu r5,2(r4) | 936 | 02: sthu r5,2(r4) |
937 | ISYNC_8xx | ||
938 | .section .fixup,"ax" | ||
939 | 03: blr | ||
940 | .text | ||
941 | .section __ex_table, "a" | ||
942 | .align 2 | ||
943 | .long 00b, 03b | ||
944 | .long 01b, 03b | ||
945 | .long 02b, 03b | ||
946 | .text | ||
872 | bdnz 00b | 947 | bdnz 00b |
873 | blr | 948 | blr |
874 | 949 | ||
@@ -879,8 +954,18 @@ _GLOBAL(_outsw_ns) | |||
879 | subi r4,r4,2 | 954 | subi r4,r4,2 |
880 | blelr- | 955 | blelr- |
881 | 00: lhzu r5,2(r4) | 956 | 00: lhzu r5,2(r4) |
882 | sth r5,0(r3) | 957 | 01: sth r5,0(r3) |
883 | eieio | 958 | 02: eieio |
959 | ISYNC_8xx | ||
960 | .section .fixup,"ax" | ||
961 | 03: blr | ||
962 | .text | ||
963 | .section __ex_table, "a" | ||
964 | .align 2 | ||
965 | .long 00b, 03b | ||
966 | .long 01b, 03b | ||
967 | .long 02b, 03b | ||
968 | .text | ||
884 | bdnz 00b | 969 | bdnz 00b |
885 | blr | 970 | blr |
886 | 971 | ||
@@ -891,8 +976,18 @@ _GLOBAL(_insl_ns) | |||
891 | subi r4,r4,4 | 976 | subi r4,r4,4 |
892 | blelr- | 977 | blelr- |
893 | 00: lwz r5,0(r3) | 978 | 00: lwz r5,0(r3) |
894 | eieio | 979 | 01: eieio |
895 | stwu r5,4(r4) | 980 | 02: stwu r5,4(r4) |
981 | ISYNC_8xx | ||
982 | .section .fixup,"ax" | ||
983 | 03: blr | ||
984 | .text | ||
985 | .section __ex_table, "a" | ||
986 | .align 2 | ||
987 | .long 00b, 03b | ||
988 | .long 01b, 03b | ||
989 | .long 02b, 03b | ||
990 | .text | ||
896 | bdnz 00b | 991 | bdnz 00b |
897 | blr | 992 | blr |
898 | 993 | ||
@@ -903,8 +998,18 @@ _GLOBAL(_outsl_ns) | |||
903 | subi r4,r4,4 | 998 | subi r4,r4,4 |
904 | blelr- | 999 | blelr- |
905 | 00: lwzu r5,4(r4) | 1000 | 00: lwzu r5,4(r4) |
906 | stw r5,0(r3) | 1001 | 01: stw r5,0(r3) |
907 | eieio | 1002 | 02: eieio |
1003 | ISYNC_8xx | ||
1004 | .section .fixup,"ax" | ||
1005 | 03: blr | ||
1006 | .text | ||
1007 | .section __ex_table, "a" | ||
1008 | .align 2 | ||
1009 | .long 00b, 03b | ||
1010 | .long 01b, 03b | ||
1011 | .long 02b, 03b | ||
1012 | .text | ||
908 | bdnz 00b | 1013 | bdnz 00b |
909 | blr | 1014 | blr |
910 | 1015 | ||
diff --git a/arch/ppc/kernel/smp.c b/arch/ppc/kernel/smp.c index bc5bf1124836..43b8fc2ca591 100644 --- a/arch/ppc/kernel/smp.c +++ b/arch/ppc/kernel/smp.c | |||
@@ -341,6 +341,7 @@ int __devinit start_secondary(void *unused) | |||
341 | cpu = smp_processor_id(); | 341 | cpu = smp_processor_id(); |
342 | smp_store_cpu_info(cpu); | 342 | smp_store_cpu_info(cpu); |
343 | set_dec(tb_ticks_per_jiffy); | 343 | set_dec(tb_ticks_per_jiffy); |
344 | preempt_disable(); | ||
344 | cpu_callin_map[cpu] = 1; | 345 | cpu_callin_map[cpu] = 1; |
345 | 346 | ||
346 | printk("CPU %d done callin...\n", cpu); | 347 | printk("CPU %d done callin...\n", cpu); |
diff --git a/arch/ppc/kernel/traps.c b/arch/ppc/kernel/traps.c index 16adde6b429d..9dbc4d28fa28 100644 --- a/arch/ppc/kernel/traps.c +++ b/arch/ppc/kernel/traps.c | |||
@@ -49,7 +49,7 @@ extern int xmon_sstep(struct pt_regs *regs); | |||
49 | extern int xmon_iabr_match(struct pt_regs *regs); | 49 | extern int xmon_iabr_match(struct pt_regs *regs); |
50 | extern int xmon_dabr_match(struct pt_regs *regs); | 50 | extern int xmon_dabr_match(struct pt_regs *regs); |
51 | 51 | ||
52 | void (*debugger)(struct pt_regs *regs) = xmon; | 52 | int (*debugger)(struct pt_regs *regs) = xmon; |
53 | int (*debugger_bpt)(struct pt_regs *regs) = xmon_bpt; | 53 | int (*debugger_bpt)(struct pt_regs *regs) = xmon_bpt; |
54 | int (*debugger_sstep)(struct pt_regs *regs) = xmon_sstep; | 54 | int (*debugger_sstep)(struct pt_regs *regs) = xmon_sstep; |
55 | int (*debugger_iabr_match)(struct pt_regs *regs) = xmon_iabr_match; | 55 | int (*debugger_iabr_match)(struct pt_regs *regs) = xmon_iabr_match; |
@@ -57,7 +57,7 @@ int (*debugger_dabr_match)(struct pt_regs *regs) = xmon_dabr_match; | |||
57 | void (*debugger_fault_handler)(struct pt_regs *regs); | 57 | void (*debugger_fault_handler)(struct pt_regs *regs); |
58 | #else | 58 | #else |
59 | #ifdef CONFIG_KGDB | 59 | #ifdef CONFIG_KGDB |
60 | void (*debugger)(struct pt_regs *regs); | 60 | int (*debugger)(struct pt_regs *regs); |
61 | int (*debugger_bpt)(struct pt_regs *regs); | 61 | int (*debugger_bpt)(struct pt_regs *regs); |
62 | int (*debugger_sstep)(struct pt_regs *regs); | 62 | int (*debugger_sstep)(struct pt_regs *regs); |
63 | int (*debugger_iabr_match)(struct pt_regs *regs); | 63 | int (*debugger_iabr_match)(struct pt_regs *regs); |
@@ -159,7 +159,7 @@ void _exception(int signr, struct pt_regs *regs, int code, unsigned long addr) | |||
159 | */ | 159 | */ |
160 | static inline int check_io_access(struct pt_regs *regs) | 160 | static inline int check_io_access(struct pt_regs *regs) |
161 | { | 161 | { |
162 | #ifdef CONFIG_PPC_PMAC | 162 | #if defined CONFIG_PPC_PMAC || defined CONFIG_8xx |
163 | unsigned long msr = regs->msr; | 163 | unsigned long msr = regs->msr; |
164 | const struct exception_table_entry *entry; | 164 | const struct exception_table_entry *entry; |
165 | unsigned int *nip = (unsigned int *)regs->nip; | 165 | unsigned int *nip = (unsigned int *)regs->nip; |
@@ -178,7 +178,11 @@ static inline int check_io_access(struct pt_regs *regs) | |||
178 | nip -= 2; | 178 | nip -= 2; |
179 | else if (*nip == 0x4c00012c) /* isync */ | 179 | else if (*nip == 0x4c00012c) /* isync */ |
180 | --nip; | 180 | --nip; |
181 | if (*nip == 0x7c0004ac || (*nip >> 26) == 3) { | 181 | /* eieio from I/O string functions */ |
182 | else if ((*nip) == 0x7c0006ac || *(nip+1) == 0x7c0006ac) | ||
183 | nip += 2; | ||
184 | if (*nip == 0x7c0004ac || (*nip >> 26) == 3 || | ||
185 | (*(nip+1) >> 26) == 3) { | ||
182 | /* sync or twi */ | 186 | /* sync or twi */ |
183 | unsigned int rb; | 187 | unsigned int rb; |
184 | 188 | ||
diff --git a/arch/ppc/platforms/83xx/mpc834x_sys.c b/arch/ppc/platforms/83xx/mpc834x_sys.c index 79b3f533d0a3..98edc75f4105 100644 --- a/arch/ppc/platforms/83xx/mpc834x_sys.c +++ b/arch/ppc/platforms/83xx/mpc834x_sys.c | |||
@@ -51,6 +51,9 @@ | |||
51 | 51 | ||
52 | #include <syslib/ppc83xx_setup.h> | 52 | #include <syslib/ppc83xx_setup.h> |
53 | 53 | ||
54 | static const char *GFAR_PHY_0 = "phy0:0"; | ||
55 | static const char *GFAR_PHY_1 = "phy0:1"; | ||
56 | |||
54 | #ifndef CONFIG_PCI | 57 | #ifndef CONFIG_PCI |
55 | unsigned long isa_io_base = 0; | 58 | unsigned long isa_io_base = 0; |
56 | unsigned long isa_mem_base = 0; | 59 | unsigned long isa_mem_base = 0; |
@@ -97,6 +100,7 @@ mpc834x_sys_setup_arch(void) | |||
97 | bd_t *binfo = (bd_t *) __res; | 100 | bd_t *binfo = (bd_t *) __res; |
98 | unsigned int freq; | 101 | unsigned int freq; |
99 | struct gianfar_platform_data *pdata; | 102 | struct gianfar_platform_data *pdata; |
103 | struct gianfar_mdio_data *mdata; | ||
100 | 104 | ||
101 | /* get the core frequency */ | 105 | /* get the core frequency */ |
102 | freq = binfo->bi_intfreq; | 106 | freq = binfo->bi_intfreq; |
@@ -111,24 +115,27 @@ mpc834x_sys_setup_arch(void) | |||
111 | #endif | 115 | #endif |
112 | mpc83xx_early_serial_map(); | 116 | mpc83xx_early_serial_map(); |
113 | 117 | ||
118 | /* setup the board related info for the MDIO bus */ | ||
119 | mdata = (struct gianfar_mdio_data *) ppc_sys_get_pdata(MPC83xx_MDIO); | ||
120 | |||
121 | mdata->irq[0] = MPC83xx_IRQ_EXT1; | ||
122 | mdata->irq[1] = MPC83xx_IRQ_EXT2; | ||
123 | mdata->irq[2] = -1; | ||
124 | mdata->irq[31] = -1; | ||
125 | mdata->paddr += binfo->bi_immr_base; | ||
126 | |||
114 | /* setup the board related information for the enet controllers */ | 127 | /* setup the board related information for the enet controllers */ |
115 | pdata = (struct gianfar_platform_data *) ppc_sys_get_pdata(MPC83xx_TSEC1); | 128 | pdata = (struct gianfar_platform_data *) ppc_sys_get_pdata(MPC83xx_TSEC1); |
116 | if (pdata) { | 129 | if (pdata) { |
117 | pdata->board_flags = FSL_GIANFAR_BRD_HAS_PHY_INTR; | 130 | pdata->board_flags = FSL_GIANFAR_BRD_HAS_PHY_INTR; |
118 | pdata->interruptPHY = MPC83xx_IRQ_EXT1; | 131 | pdata->bus_id = GFAR_PHY_0; |
119 | pdata->phyid = 0; | ||
120 | /* fixup phy address */ | ||
121 | pdata->phy_reg_addr += binfo->bi_immr_base; | ||
122 | memcpy(pdata->mac_addr, binfo->bi_enetaddr, 6); | 132 | memcpy(pdata->mac_addr, binfo->bi_enetaddr, 6); |
123 | } | 133 | } |
124 | 134 | ||
125 | pdata = (struct gianfar_platform_data *) ppc_sys_get_pdata(MPC83xx_TSEC2); | 135 | pdata = (struct gianfar_platform_data *) ppc_sys_get_pdata(MPC83xx_TSEC2); |
126 | if (pdata) { | 136 | if (pdata) { |
127 | pdata->board_flags = FSL_GIANFAR_BRD_HAS_PHY_INTR; | 137 | pdata->board_flags = FSL_GIANFAR_BRD_HAS_PHY_INTR; |
128 | pdata->interruptPHY = MPC83xx_IRQ_EXT2; | 138 | pdata->bus_id = GFAR_PHY_1; |
129 | pdata->phyid = 1; | ||
130 | /* fixup phy address */ | ||
131 | pdata->phy_reg_addr += binfo->bi_immr_base; | ||
132 | memcpy(pdata->mac_addr, binfo->bi_enet1addr, 6); | 139 | memcpy(pdata->mac_addr, binfo->bi_enet1addr, 6); |
133 | } | 140 | } |
134 | 141 | ||
diff --git a/arch/ppc/platforms/85xx/stx_gp3.h b/arch/ppc/platforms/85xx/stx_gp3.h index 95fdf4b0680b..7bcc6c35a417 100644 --- a/arch/ppc/platforms/85xx/stx_gp3.h +++ b/arch/ppc/platforms/85xx/stx_gp3.h | |||
@@ -21,6 +21,7 @@ | |||
21 | 21 | ||
22 | #include <linux/config.h> | 22 | #include <linux/config.h> |
23 | #include <linux/init.h> | 23 | #include <linux/init.h> |
24 | #include <linux/seq_file.h> | ||
24 | #include <asm/ppcboot.h> | 25 | #include <asm/ppcboot.h> |
25 | 26 | ||
26 | #define BOARD_CCSRBAR ((uint)0xe0000000) | 27 | #define BOARD_CCSRBAR ((uint)0xe0000000) |
diff --git a/arch/ppc/syslib/Makefile b/arch/ppc/syslib/Makefile index 5bd33baac243..5b7f2b80e56e 100644 --- a/arch/ppc/syslib/Makefile +++ b/arch/ppc/syslib/Makefile | |||
@@ -33,7 +33,6 @@ obj-$(CONFIG_PPC4xx_DMA) += ppc4xx_dma.o | |||
33 | obj-$(CONFIG_PPC4xx_EDMA) += ppc4xx_sgdma.o | 33 | obj-$(CONFIG_PPC4xx_EDMA) += ppc4xx_sgdma.o |
34 | ifeq ($(CONFIG_40x),y) | 34 | ifeq ($(CONFIG_40x),y) |
35 | obj-$(CONFIG_PCI) += pci_auto.o ppc405_pci.o | 35 | obj-$(CONFIG_PCI) += pci_auto.o ppc405_pci.o |
36 | obj-$(CONFIG_RAPIDIO) += ppc85xx_rio.o | ||
37 | endif | 36 | endif |
38 | endif | 37 | endif |
39 | obj-$(CONFIG_8xx) += m8xx_setup.o ppc8xx_pic.o $(wdt-mpc8xx-y) \ | 38 | obj-$(CONFIG_8xx) += m8xx_setup.o ppc8xx_pic.o $(wdt-mpc8xx-y) \ |
@@ -96,6 +95,7 @@ obj-$(CONFIG_85xx) += open_pic.o ppc85xx_common.o ppc85xx_setup.o \ | |||
96 | ifeq ($(CONFIG_85xx),y) | 95 | ifeq ($(CONFIG_85xx),y) |
97 | obj-$(CONFIG_PCI) += pci_auto.o | 96 | obj-$(CONFIG_PCI) += pci_auto.o |
98 | endif | 97 | endif |
98 | obj-$(CONFIG_RAPIDIO) += ppc85xx_rio.o | ||
99 | obj-$(CONFIG_83xx) += ipic.o ppc83xx_setup.o ppc_sys.o \ | 99 | obj-$(CONFIG_83xx) += ipic.o ppc83xx_setup.o ppc_sys.o \ |
100 | mpc83xx_sys.o mpc83xx_devices.o | 100 | mpc83xx_sys.o mpc83xx_devices.o |
101 | ifeq ($(CONFIG_83xx),y) | 101 | ifeq ($(CONFIG_83xx),y) |
diff --git a/arch/ppc/syslib/m8xx_wdt.c b/arch/ppc/syslib/m8xx_wdt.c index c5ac5ce5d7d2..a21632d37e5a 100644 --- a/arch/ppc/syslib/m8xx_wdt.c +++ b/arch/ppc/syslib/m8xx_wdt.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <linux/irq.h> | 14 | #include <linux/irq.h> |
15 | #include <linux/kernel.h> | 15 | #include <linux/kernel.h> |
16 | #include <linux/sched.h> | 16 | #include <linux/sched.h> |
17 | #include <asm/io.h> | ||
17 | #include <asm/8xx_immap.h> | 18 | #include <asm/8xx_immap.h> |
18 | #include <syslib/m8xx_wdt.h> | 19 | #include <syslib/m8xx_wdt.h> |
19 | 20 | ||
@@ -29,8 +30,8 @@ void m8xx_wdt_reset(void) | |||
29 | { | 30 | { |
30 | volatile immap_t *imap = (volatile immap_t *)IMAP_ADDR; | 31 | volatile immap_t *imap = (volatile immap_t *)IMAP_ADDR; |
31 | 32 | ||
32 | out_be16(imap->im_siu_conf.sc_swsr, 0x556c); /* write magic1 */ | 33 | out_be16(&imap->im_siu_conf.sc_swsr, 0x556c); /* write magic1 */ |
33 | out_be16(imap->im_siu_conf.sc_swsr, 0xaa39); /* write magic2 */ | 34 | out_be16(&imap->im_siu_conf.sc_swsr, 0xaa39); /* write magic2 */ |
34 | } | 35 | } |
35 | 36 | ||
36 | static irqreturn_t m8xx_wdt_interrupt(int irq, void *dev, struct pt_regs *regs) | 37 | static irqreturn_t m8xx_wdt_interrupt(int irq, void *dev, struct pt_regs *regs) |
@@ -39,7 +40,7 @@ static irqreturn_t m8xx_wdt_interrupt(int irq, void *dev, struct pt_regs *regs) | |||
39 | 40 | ||
40 | m8xx_wdt_reset(); | 41 | m8xx_wdt_reset(); |
41 | 42 | ||
42 | out_be16(imap->im_sit.sit_piscr, in_be16(imap->im_sit.sit_piscr | PISCR_PS)); /* clear irq */ | 43 | out_be16(&imap->im_sit.sit_piscr, in_be16(&imap->im_sit.sit_piscr) | PISCR_PS); /* clear irq */ |
43 | 44 | ||
44 | return IRQ_HANDLED; | 45 | return IRQ_HANDLED; |
45 | } | 46 | } |
@@ -51,7 +52,7 @@ void __init m8xx_wdt_handler_install(bd_t * binfo) | |||
51 | u32 sypcr; | 52 | u32 sypcr; |
52 | u32 pitrtclk; | 53 | u32 pitrtclk; |
53 | 54 | ||
54 | sypcr = in_be32(imap->im_siu_conf.sc_sypcr); | 55 | sypcr = in_be32(&imap->im_siu_conf.sc_sypcr); |
55 | 56 | ||
56 | if (!(sypcr & 0x04)) { | 57 | if (!(sypcr & 0x04)) { |
57 | printk(KERN_NOTICE "m8xx_wdt: wdt disabled (SYPCR: 0x%08X)\n", | 58 | printk(KERN_NOTICE "m8xx_wdt: wdt disabled (SYPCR: 0x%08X)\n", |
@@ -87,9 +88,9 @@ void __init m8xx_wdt_handler_install(bd_t * binfo) | |||
87 | else | 88 | else |
88 | pitc = pitrtclk * wdt_timeout / binfo->bi_intfreq / 2; | 89 | pitc = pitrtclk * wdt_timeout / binfo->bi_intfreq / 2; |
89 | 90 | ||
90 | out_be32(imap->im_sit.sit_pitc, pitc << 16); | 91 | out_be32(&imap->im_sit.sit_pitc, pitc << 16); |
91 | 92 | ||
92 | out_be16(imap->im_sit.sit_piscr, (mk_int_int_mask(PIT_INTERRUPT) << 8) | PISCR_PIE | PISCR_PTE); | 93 | out_be16(&imap->im_sit.sit_piscr, (mk_int_int_mask(PIT_INTERRUPT) << 8) | PISCR_PIE | PISCR_PTE); |
93 | 94 | ||
94 | if (setup_irq(PIT_INTERRUPT, &m8xx_wdt_irqaction)) | 95 | if (setup_irq(PIT_INTERRUPT, &m8xx_wdt_irqaction)) |
95 | panic("m8xx_wdt: error setting up the watchdog irq!"); | 96 | panic("m8xx_wdt: error setting up the watchdog irq!"); |
diff --git a/arch/ppc/syslib/mpc83xx_devices.c b/arch/ppc/syslib/mpc83xx_devices.c index dbf8acac507f..f43fbf9a9389 100644 --- a/arch/ppc/syslib/mpc83xx_devices.c +++ b/arch/ppc/syslib/mpc83xx_devices.c | |||
@@ -27,18 +27,20 @@ | |||
27 | * what IMMRBAR is, will get fixed up by mach_mpc83xx_fixup | 27 | * what IMMRBAR is, will get fixed up by mach_mpc83xx_fixup |
28 | */ | 28 | */ |
29 | 29 | ||
30 | struct gianfar_mdio_data mpc83xx_mdio_pdata = { | ||
31 | .paddr = 0x24520, | ||
32 | }; | ||
33 | |||
30 | static struct gianfar_platform_data mpc83xx_tsec1_pdata = { | 34 | static struct gianfar_platform_data mpc83xx_tsec1_pdata = { |
31 | .device_flags = FSL_GIANFAR_DEV_HAS_GIGABIT | | 35 | .device_flags = FSL_GIANFAR_DEV_HAS_GIGABIT | |
32 | FSL_GIANFAR_DEV_HAS_COALESCE | FSL_GIANFAR_DEV_HAS_RMON | | 36 | FSL_GIANFAR_DEV_HAS_COALESCE | FSL_GIANFAR_DEV_HAS_RMON | |
33 | FSL_GIANFAR_DEV_HAS_MULTI_INTR, | 37 | FSL_GIANFAR_DEV_HAS_MULTI_INTR, |
34 | .phy_reg_addr = 0x24000, | ||
35 | }; | 38 | }; |
36 | 39 | ||
37 | static struct gianfar_platform_data mpc83xx_tsec2_pdata = { | 40 | static struct gianfar_platform_data mpc83xx_tsec2_pdata = { |
38 | .device_flags = FSL_GIANFAR_DEV_HAS_GIGABIT | | 41 | .device_flags = FSL_GIANFAR_DEV_HAS_GIGABIT | |
39 | FSL_GIANFAR_DEV_HAS_COALESCE | FSL_GIANFAR_DEV_HAS_RMON | | 42 | FSL_GIANFAR_DEV_HAS_COALESCE | FSL_GIANFAR_DEV_HAS_RMON | |
40 | FSL_GIANFAR_DEV_HAS_MULTI_INTR, | 43 | FSL_GIANFAR_DEV_HAS_MULTI_INTR, |
41 | .phy_reg_addr = 0x24000, | ||
42 | }; | 44 | }; |
43 | 45 | ||
44 | static struct fsl_i2c_platform_data mpc83xx_fsl_i2c1_pdata = { | 46 | static struct fsl_i2c_platform_data mpc83xx_fsl_i2c1_pdata = { |
@@ -220,6 +222,12 @@ struct platform_device ppc_sys_platform_devices[] = { | |||
220 | }, | 222 | }, |
221 | }, | 223 | }, |
222 | }, | 224 | }, |
225 | [MPC83xx_MDIO] = { | ||
226 | .name = "fsl-gianfar_mdio", | ||
227 | .id = 0, | ||
228 | .dev.platform_data = &mpc83xx_mdio_pdata, | ||
229 | .num_resources = 0, | ||
230 | }, | ||
223 | }; | 231 | }; |
224 | 232 | ||
225 | static int __init mach_mpc83xx_fixup(struct platform_device *pdev) | 233 | static int __init mach_mpc83xx_fixup(struct platform_device *pdev) |
diff --git a/arch/ppc/syslib/mpc83xx_sys.c b/arch/ppc/syslib/mpc83xx_sys.c index 29aa63350025..da743446789b 100644 --- a/arch/ppc/syslib/mpc83xx_sys.c +++ b/arch/ppc/syslib/mpc83xx_sys.c | |||
@@ -24,72 +24,72 @@ struct ppc_sys_spec ppc_sys_specs[] = { | |||
24 | .ppc_sys_name = "8349E", | 24 | .ppc_sys_name = "8349E", |
25 | .mask = 0xFFFF0000, | 25 | .mask = 0xFFFF0000, |
26 | .value = 0x80500000, | 26 | .value = 0x80500000, |
27 | .num_devices = 8, | 27 | .num_devices = 9, |
28 | .device_list = (enum ppc_sys_devices[]) | 28 | .device_list = (enum ppc_sys_devices[]) |
29 | { | 29 | { |
30 | MPC83xx_TSEC1, MPC83xx_TSEC2, MPC83xx_IIC1, | 30 | MPC83xx_TSEC1, MPC83xx_TSEC2, MPC83xx_IIC1, |
31 | MPC83xx_IIC2, MPC83xx_DUART, MPC83xx_SEC2, | 31 | MPC83xx_IIC2, MPC83xx_DUART, MPC83xx_SEC2, |
32 | MPC83xx_USB2_DR, MPC83xx_USB2_MPH | 32 | MPC83xx_USB2_DR, MPC83xx_USB2_MPH, MPC83xx_MDIO |
33 | }, | 33 | }, |
34 | }, | 34 | }, |
35 | { | 35 | { |
36 | .ppc_sys_name = "8349", | 36 | .ppc_sys_name = "8349", |
37 | .mask = 0xFFFF0000, | 37 | .mask = 0xFFFF0000, |
38 | .value = 0x80510000, | 38 | .value = 0x80510000, |
39 | .num_devices = 7, | 39 | .num_devices = 8, |
40 | .device_list = (enum ppc_sys_devices[]) | 40 | .device_list = (enum ppc_sys_devices[]) |
41 | { | 41 | { |
42 | MPC83xx_TSEC1, MPC83xx_TSEC2, MPC83xx_IIC1, | 42 | MPC83xx_TSEC1, MPC83xx_TSEC2, MPC83xx_IIC1, |
43 | MPC83xx_IIC2, MPC83xx_DUART, | 43 | MPC83xx_IIC2, MPC83xx_DUART, |
44 | MPC83xx_USB2_DR, MPC83xx_USB2_MPH | 44 | MPC83xx_USB2_DR, MPC83xx_USB2_MPH, MPC83xx_MDIO |
45 | }, | 45 | }, |
46 | }, | 46 | }, |
47 | { | 47 | { |
48 | .ppc_sys_name = "8347E", | 48 | .ppc_sys_name = "8347E", |
49 | .mask = 0xFFFF0000, | 49 | .mask = 0xFFFF0000, |
50 | .value = 0x80520000, | 50 | .value = 0x80520000, |
51 | .num_devices = 8, | 51 | .num_devices = 9, |
52 | .device_list = (enum ppc_sys_devices[]) | 52 | .device_list = (enum ppc_sys_devices[]) |
53 | { | 53 | { |
54 | MPC83xx_TSEC1, MPC83xx_TSEC2, MPC83xx_IIC1, | 54 | MPC83xx_TSEC1, MPC83xx_TSEC2, MPC83xx_IIC1, |
55 | MPC83xx_IIC2, MPC83xx_DUART, MPC83xx_SEC2, | 55 | MPC83xx_IIC2, MPC83xx_DUART, MPC83xx_SEC2, |
56 | MPC83xx_USB2_DR, MPC83xx_USB2_MPH | 56 | MPC83xx_USB2_DR, MPC83xx_USB2_MPH, MPC83xx_MDIO |
57 | }, | 57 | }, |
58 | }, | 58 | }, |
59 | { | 59 | { |
60 | .ppc_sys_name = "8347", | 60 | .ppc_sys_name = "8347", |
61 | .mask = 0xFFFF0000, | 61 | .mask = 0xFFFF0000, |
62 | .value = 0x80530000, | 62 | .value = 0x80530000, |
63 | .num_devices = 7, | 63 | .num_devices = 8, |
64 | .device_list = (enum ppc_sys_devices[]) | 64 | .device_list = (enum ppc_sys_devices[]) |
65 | { | 65 | { |
66 | MPC83xx_TSEC1, MPC83xx_TSEC2, MPC83xx_IIC1, | 66 | MPC83xx_TSEC1, MPC83xx_TSEC2, MPC83xx_IIC1, |
67 | MPC83xx_IIC2, MPC83xx_DUART, | 67 | MPC83xx_IIC2, MPC83xx_DUART, |
68 | MPC83xx_USB2_DR, MPC83xx_USB2_MPH | 68 | MPC83xx_USB2_DR, MPC83xx_USB2_MPH, MPC83xx_MDIO |
69 | }, | 69 | }, |
70 | }, | 70 | }, |
71 | { | 71 | { |
72 | .ppc_sys_name = "8343E", | 72 | .ppc_sys_name = "8343E", |
73 | .mask = 0xFFFF0000, | 73 | .mask = 0xFFFF0000, |
74 | .value = 0x80540000, | 74 | .value = 0x80540000, |
75 | .num_devices = 7, | 75 | .num_devices = 8, |
76 | .device_list = (enum ppc_sys_devices[]) | 76 | .device_list = (enum ppc_sys_devices[]) |
77 | { | 77 | { |
78 | MPC83xx_TSEC1, MPC83xx_TSEC2, MPC83xx_IIC1, | 78 | MPC83xx_TSEC1, MPC83xx_TSEC2, MPC83xx_IIC1, |
79 | MPC83xx_IIC2, MPC83xx_DUART, MPC83xx_SEC2, | 79 | MPC83xx_IIC2, MPC83xx_DUART, MPC83xx_SEC2, |
80 | MPC83xx_USB2_DR, | 80 | MPC83xx_USB2_DR, MPC83xx_MDIO |
81 | }, | 81 | }, |
82 | }, | 82 | }, |
83 | { | 83 | { |
84 | .ppc_sys_name = "8343", | 84 | .ppc_sys_name = "8343", |
85 | .mask = 0xFFFF0000, | 85 | .mask = 0xFFFF0000, |
86 | .value = 0x80550000, | 86 | .value = 0x80550000, |
87 | .num_devices = 6, | 87 | .num_devices = 7, |
88 | .device_list = (enum ppc_sys_devices[]) | 88 | .device_list = (enum ppc_sys_devices[]) |
89 | { | 89 | { |
90 | MPC83xx_TSEC1, MPC83xx_TSEC2, MPC83xx_IIC1, | 90 | MPC83xx_TSEC1, MPC83xx_TSEC2, MPC83xx_IIC1, |
91 | MPC83xx_IIC2, MPC83xx_DUART, | 91 | MPC83xx_IIC2, MPC83xx_DUART, |
92 | MPC83xx_USB2_DR, | 92 | MPC83xx_USB2_DR, MPC83xx_MDIO |
93 | }, | 93 | }, |
94 | }, | 94 | }, |
95 | { /* default match */ | 95 | { /* default match */ |
diff --git a/arch/ppc/syslib/prom.c b/arch/ppc/syslib/prom.c index 1b9aa0d6a924..af4deace49e0 100644 --- a/arch/ppc/syslib/prom.c +++ b/arch/ppc/syslib/prom.c | |||
@@ -13,7 +13,6 @@ | |||
13 | #include <linux/kernel.h> | 13 | #include <linux/kernel.h> |
14 | #include <linux/string.h> | 14 | #include <linux/string.h> |
15 | #include <linux/init.h> | 15 | #include <linux/init.h> |
16 | #include <linux/version.h> | ||
17 | #include <linux/threads.h> | 16 | #include <linux/threads.h> |
18 | #include <linux/spinlock.h> | 17 | #include <linux/spinlock.h> |
19 | #include <linux/ioport.h> | 18 | #include <linux/ioport.h> |
@@ -1165,7 +1164,7 @@ get_property(struct device_node *np, const char *name, int *lenp) | |||
1165 | /* | 1164 | /* |
1166 | * Add a property to a node | 1165 | * Add a property to a node |
1167 | */ | 1166 | */ |
1168 | void | 1167 | int |
1169 | prom_add_property(struct device_node* np, struct property* prop) | 1168 | prom_add_property(struct device_node* np, struct property* prop) |
1170 | { | 1169 | { |
1171 | struct property **next = &np->properties; | 1170 | struct property **next = &np->properties; |
@@ -1174,6 +1173,8 @@ prom_add_property(struct device_node* np, struct property* prop) | |||
1174 | while (*next) | 1173 | while (*next) |
1175 | next = &(*next)->next; | 1174 | next = &(*next)->next; |
1176 | *next = prop; | 1175 | *next = prop; |
1176 | |||
1177 | return 0; | ||
1177 | } | 1178 | } |
1178 | 1179 | ||
1179 | /* I quickly hacked that one, check against spec ! */ | 1180 | /* I quickly hacked that one, check against spec ! */ |
diff --git a/arch/ppc/syslib/prom_init.c b/arch/ppc/syslib/prom_init.c index 7f15136830f4..df14422ae1c6 100644 --- a/arch/ppc/syslib/prom_init.c +++ b/arch/ppc/syslib/prom_init.c | |||
@@ -9,7 +9,6 @@ | |||
9 | #include <linux/kernel.h> | 9 | #include <linux/kernel.h> |
10 | #include <linux/string.h> | 10 | #include <linux/string.h> |
11 | #include <linux/init.h> | 11 | #include <linux/init.h> |
12 | #include <linux/version.h> | ||
13 | #include <linux/threads.h> | 12 | #include <linux/threads.h> |
14 | #include <linux/spinlock.h> | 13 | #include <linux/spinlock.h> |
15 | #include <linux/ioport.h> | 14 | #include <linux/ioport.h> |
diff --git a/arch/ppc/xmon/xmon.c b/arch/ppc/xmon/xmon.c index 66bfaa3211a2..2b483b4f1602 100644 --- a/arch/ppc/xmon/xmon.c +++ b/arch/ppc/xmon/xmon.c | |||
@@ -220,8 +220,7 @@ static void get_tb(unsigned *p) | |||
220 | p[1] = lo; | 220 | p[1] = lo; |
221 | } | 221 | } |
222 | 222 | ||
223 | void | 223 | int xmon(struct pt_regs *excp) |
224 | xmon(struct pt_regs *excp) | ||
225 | { | 224 | { |
226 | struct pt_regs regs; | 225 | struct pt_regs regs; |
227 | int msr, cmd; | 226 | int msr, cmd; |
@@ -290,6 +289,8 @@ xmon(struct pt_regs *excp) | |||
290 | #endif /* CONFIG_SMP */ | 289 | #endif /* CONFIG_SMP */ |
291 | set_msr(msr); /* restore interrupt enable */ | 290 | set_msr(msr); /* restore interrupt enable */ |
292 | get_tb(start_tb[smp_processor_id()]); | 291 | get_tb(start_tb[smp_processor_id()]); |
292 | |||
293 | return cmd != 'X'; | ||
293 | } | 294 | } |
294 | 295 | ||
295 | irqreturn_t | 296 | irqreturn_t |
diff --git a/arch/ppc64/Kconfig b/arch/ppc64/Kconfig index 2130cc315957..29552348e581 100644 --- a/arch/ppc64/Kconfig +++ b/arch/ppc64/Kconfig | |||
@@ -56,6 +56,7 @@ config PPC_STD_MMU | |||
56 | # max order + 1 | 56 | # max order + 1 |
57 | config FORCE_MAX_ZONEORDER | 57 | config FORCE_MAX_ZONEORDER |
58 | int | 58 | int |
59 | default "9" if PPC_64K_PAGES | ||
59 | default "13" | 60 | default "13" |
60 | 61 | ||
61 | source "init/Kconfig" | 62 | source "init/Kconfig" |
@@ -173,6 +174,16 @@ config KEXEC | |||
173 | support. As of this writing the exact hardware interface is | 174 | support. As of this writing the exact hardware interface is |
174 | strongly in flux, so no good recommendation can be made. | 175 | strongly in flux, so no good recommendation can be made. |
175 | 176 | ||
177 | source "drivers/cpufreq/Kconfig" | ||
178 | |||
179 | config CPU_FREQ_PMAC64 | ||
180 | bool "Support for some Apple G5s" | ||
181 | depends on CPU_FREQ && PMAC_SMU && PPC64 | ||
182 | select CPU_FREQ_TABLE | ||
183 | help | ||
184 | This adds support for frequency switching on Apple iMac G5, | ||
185 | and some of the more recent desktop G5 machines as well. | ||
186 | |||
176 | config IBMVIO | 187 | config IBMVIO |
177 | depends on PPC_PSERIES || PPC_ISERIES | 188 | depends on PPC_PSERIES || PPC_ISERIES |
178 | bool | 189 | bool |
diff --git a/arch/ppc64/Kconfig.debug b/arch/ppc64/Kconfig.debug index f16a5030527b..b258c9314a1b 100644 --- a/arch/ppc64/Kconfig.debug +++ b/arch/ppc64/Kconfig.debug | |||
@@ -55,10 +55,6 @@ config XMON_DEFAULT | |||
55 | xmon is normally disabled unless booted with 'xmon=on'. | 55 | xmon is normally disabled unless booted with 'xmon=on'. |
56 | Use 'xmon=off' to disable xmon init during runtime. | 56 | Use 'xmon=off' to disable xmon init during runtime. |
57 | 57 | ||
58 | config PPCDBG | ||
59 | bool "Include PPCDBG realtime debugging" | ||
60 | depends on DEBUG_KERNEL | ||
61 | |||
62 | config IRQSTACKS | 58 | config IRQSTACKS |
63 | bool "Use separate kernel stacks when processing interrupts" | 59 | bool "Use separate kernel stacks when processing interrupts" |
64 | help | 60 | help |
diff --git a/arch/ppc64/kernel/idle.c b/arch/ppc64/kernel/idle.c index 8abd2ad92832..715bc0e71e0f 100644 --- a/arch/ppc64/kernel/idle.c +++ b/arch/ppc64/kernel/idle.c | |||
@@ -28,20 +28,17 @@ | |||
28 | #include <asm/time.h> | 28 | #include <asm/time.h> |
29 | #include <asm/systemcfg.h> | 29 | #include <asm/systemcfg.h> |
30 | #include <asm/machdep.h> | 30 | #include <asm/machdep.h> |
31 | #include <asm/smp.h> | ||
31 | 32 | ||
32 | extern void power4_idle(void); | 33 | extern void power4_idle(void); |
33 | 34 | ||
34 | void default_idle(void) | 35 | void default_idle(void) |
35 | { | 36 | { |
36 | long oldval; | ||
37 | unsigned int cpu = smp_processor_id(); | 37 | unsigned int cpu = smp_processor_id(); |
38 | set_thread_flag(TIF_POLLING_NRFLAG); | ||
38 | 39 | ||
39 | while (1) { | 40 | while (1) { |
40 | oldval = test_and_clear_thread_flag(TIF_NEED_RESCHED); | 41 | if (!need_resched()) { |
41 | |||
42 | if (!oldval) { | ||
43 | set_thread_flag(TIF_POLLING_NRFLAG); | ||
44 | |||
45 | while (!need_resched() && !cpu_is_offline(cpu)) { | 42 | while (!need_resched() && !cpu_is_offline(cpu)) { |
46 | ppc64_runlatch_off(); | 43 | ppc64_runlatch_off(); |
47 | 44 | ||
@@ -54,13 +51,12 @@ void default_idle(void) | |||
54 | } | 51 | } |
55 | 52 | ||
56 | HMT_medium(); | 53 | HMT_medium(); |
57 | clear_thread_flag(TIF_POLLING_NRFLAG); | ||
58 | } else { | ||
59 | set_need_resched(); | ||
60 | } | 54 | } |
61 | 55 | ||
62 | ppc64_runlatch_on(); | 56 | ppc64_runlatch_on(); |
57 | preempt_enable_no_resched(); | ||
63 | schedule(); | 58 | schedule(); |
59 | preempt_disable(); | ||
64 | if (cpu_is_offline(cpu) && system_state == SYSTEM_RUNNING) | 60 | if (cpu_is_offline(cpu) && system_state == SYSTEM_RUNNING) |
65 | cpu_die(); | 61 | cpu_die(); |
66 | } | 62 | } |
@@ -76,7 +72,9 @@ void native_idle(void) | |||
76 | 72 | ||
77 | if (need_resched()) { | 73 | if (need_resched()) { |
78 | ppc64_runlatch_on(); | 74 | ppc64_runlatch_on(); |
75 | preempt_enable_no_resched(); | ||
79 | schedule(); | 76 | schedule(); |
77 | preempt_disable(); | ||
80 | } | 78 | } |
81 | 79 | ||
82 | if (cpu_is_offline(smp_processor_id()) && | 80 | if (cpu_is_offline(smp_processor_id()) && |
diff --git a/arch/ppc64/kernel/machine_kexec.c b/arch/ppc64/kernel/machine_kexec.c index ff8679f260f3..07ea03598c00 100644 --- a/arch/ppc64/kernel/machine_kexec.c +++ b/arch/ppc64/kernel/machine_kexec.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <asm/mmu.h> | 24 | #include <asm/mmu.h> |
25 | #include <asm/sections.h> /* _end */ | 25 | #include <asm/sections.h> /* _end */ |
26 | #include <asm/prom.h> | 26 | #include <asm/prom.h> |
27 | #include <asm/smp.h> | ||
27 | 28 | ||
28 | #define HASH_GROUP_SIZE 0x80 /* size of each hash group, asm/mmu.h */ | 29 | #define HASH_GROUP_SIZE 0x80 /* size of each hash group, asm/mmu.h */ |
29 | 30 | ||
diff --git a/arch/ppc64/kernel/misc.S b/arch/ppc64/kernel/misc.S index 077507ffbab8..914632ec587d 100644 --- a/arch/ppc64/kernel/misc.S +++ b/arch/ppc64/kernel/misc.S | |||
@@ -560,7 +560,7 @@ _GLOBAL(real_readb) | |||
560 | isync | 560 | isync |
561 | blr | 561 | blr |
562 | 562 | ||
563 | /* | 563 | /* |
564 | * Do an IO access in real mode | 564 | * Do an IO access in real mode |
565 | */ | 565 | */ |
566 | _GLOBAL(real_writeb) | 566 | _GLOBAL(real_writeb) |
@@ -593,6 +593,76 @@ _GLOBAL(real_writeb) | |||
593 | #endif /* defined(CONFIG_PPC_PMAC) || defined(CONFIG_PPC_MAPLE) */ | 593 | #endif /* defined(CONFIG_PPC_PMAC) || defined(CONFIG_PPC_MAPLE) */ |
594 | 594 | ||
595 | /* | 595 | /* |
596 | * SCOM access functions for 970 (FX only for now) | ||
597 | * | ||
598 | * unsigned long scom970_read(unsigned int address); | ||
599 | * void scom970_write(unsigned int address, unsigned long value); | ||
600 | * | ||
601 | * The address passed in is the 24 bits register address. This code | ||
602 | * is 970 specific and will not check the status bits, so you should | ||
603 | * know what you are doing. | ||
604 | */ | ||
605 | _GLOBAL(scom970_read) | ||
606 | /* interrupts off */ | ||
607 | mfmsr r4 | ||
608 | ori r0,r4,MSR_EE | ||
609 | xori r0,r0,MSR_EE | ||
610 | mtmsrd r0,1 | ||
611 | |||
612 | /* rotate 24 bits SCOM address 8 bits left and mask out it's low 8 bits | ||
613 | * (including parity). On current CPUs they must be 0'd, | ||
614 | * and finally or in RW bit | ||
615 | */ | ||
616 | rlwinm r3,r3,8,0,15 | ||
617 | ori r3,r3,0x8000 | ||
618 | |||
619 | /* do the actual scom read */ | ||
620 | sync | ||
621 | mtspr SPRN_SCOMC,r3 | ||
622 | isync | ||
623 | mfspr r3,SPRN_SCOMD | ||
624 | isync | ||
625 | mfspr r0,SPRN_SCOMC | ||
626 | isync | ||
627 | |||
628 | /* XXX: fixup result on some buggy 970's (ouch ! we lost a bit, bah | ||
629 | * that's the best we can do). Not implemented yet as we don't use | ||
630 | * the scom on any of the bogus CPUs yet, but may have to be done | ||
631 | * ultimately | ||
632 | */ | ||
633 | |||
634 | /* restore interrupts */ | ||
635 | mtmsrd r4,1 | ||
636 | blr | ||
637 | |||
638 | |||
639 | _GLOBAL(scom970_write) | ||
640 | /* interrupts off */ | ||
641 | mfmsr r5 | ||
642 | ori r0,r5,MSR_EE | ||
643 | xori r0,r0,MSR_EE | ||
644 | mtmsrd r0,1 | ||
645 | |||
646 | /* rotate 24 bits SCOM address 8 bits left and mask out it's low 8 bits | ||
647 | * (including parity). On current CPUs they must be 0'd. | ||
648 | */ | ||
649 | |||
650 | rlwinm r3,r3,8,0,15 | ||
651 | |||
652 | sync | ||
653 | mtspr SPRN_SCOMD,r4 /* write data */ | ||
654 | isync | ||
655 | mtspr SPRN_SCOMC,r3 /* write command */ | ||
656 | isync | ||
657 | mfspr 3,SPRN_SCOMC | ||
658 | isync | ||
659 | |||
660 | /* restore interrupts */ | ||
661 | mtmsrd r5,1 | ||
662 | blr | ||
663 | |||
664 | |||
665 | /* | ||
596 | * Create a kernel thread | 666 | * Create a kernel thread |
597 | * kernel_thread(fn, arg, flags) | 667 | * kernel_thread(fn, arg, flags) |
598 | */ | 668 | */ |
diff --git a/arch/ppc64/kernel/pci.c b/arch/ppc64/kernel/pci.c index 3d2106b022a1..30247ff74972 100644 --- a/arch/ppc64/kernel/pci.c +++ b/arch/ppc64/kernel/pci.c | |||
@@ -295,8 +295,8 @@ static void pci_parse_of_addrs(struct device_node *node, struct pci_dev *dev) | |||
295 | } | 295 | } |
296 | } | 296 | } |
297 | 297 | ||
298 | static struct pci_dev *of_create_pci_dev(struct device_node *node, | 298 | struct pci_dev *of_create_pci_dev(struct device_node *node, |
299 | struct pci_bus *bus, int devfn) | 299 | struct pci_bus *bus, int devfn) |
300 | { | 300 | { |
301 | struct pci_dev *dev; | 301 | struct pci_dev *dev; |
302 | const char *type; | 302 | const char *type; |
@@ -354,10 +354,9 @@ static struct pci_dev *of_create_pci_dev(struct device_node *node, | |||
354 | 354 | ||
355 | return dev; | 355 | return dev; |
356 | } | 356 | } |
357 | EXPORT_SYMBOL(of_create_pci_dev); | ||
357 | 358 | ||
358 | static void of_scan_pci_bridge(struct device_node *node, struct pci_dev *dev); | 359 | void __devinit of_scan_bus(struct device_node *node, |
359 | |||
360 | static void __devinit of_scan_bus(struct device_node *node, | ||
361 | struct pci_bus *bus) | 360 | struct pci_bus *bus) |
362 | { | 361 | { |
363 | struct device_node *child = NULL; | 362 | struct device_node *child = NULL; |
@@ -381,9 +380,10 @@ static void __devinit of_scan_bus(struct device_node *node, | |||
381 | 380 | ||
382 | do_bus_setup(bus); | 381 | do_bus_setup(bus); |
383 | } | 382 | } |
383 | EXPORT_SYMBOL(of_scan_bus); | ||
384 | 384 | ||
385 | static void __devinit of_scan_pci_bridge(struct device_node *node, | 385 | void __devinit of_scan_pci_bridge(struct device_node *node, |
386 | struct pci_dev *dev) | 386 | struct pci_dev *dev) |
387 | { | 387 | { |
388 | struct pci_bus *bus; | 388 | struct pci_bus *bus; |
389 | u32 *busrange, *ranges; | 389 | u32 *busrange, *ranges; |
@@ -464,9 +464,10 @@ static void __devinit of_scan_pci_bridge(struct device_node *node, | |||
464 | else if (mode == PCI_PROBE_NORMAL) | 464 | else if (mode == PCI_PROBE_NORMAL) |
465 | pci_scan_child_bus(bus); | 465 | pci_scan_child_bus(bus); |
466 | } | 466 | } |
467 | EXPORT_SYMBOL(of_scan_pci_bridge); | ||
467 | #endif /* CONFIG_PPC_MULTIPLATFORM */ | 468 | #endif /* CONFIG_PPC_MULTIPLATFORM */ |
468 | 469 | ||
469 | static void __devinit scan_phb(struct pci_controller *hose) | 470 | void __devinit scan_phb(struct pci_controller *hose) |
470 | { | 471 | { |
471 | struct pci_bus *bus; | 472 | struct pci_bus *bus; |
472 | struct device_node *node = hose->arch_data; | 473 | struct device_node *node = hose->arch_data; |
diff --git a/arch/ppc64/kernel/prom.c b/arch/ppc64/kernel/prom.c index dece31e58bc4..3402fbee62c7 100644 --- a/arch/ppc64/kernel/prom.c +++ b/arch/ppc64/kernel/prom.c | |||
@@ -31,6 +31,7 @@ | |||
31 | #include <linux/initrd.h> | 31 | #include <linux/initrd.h> |
32 | #include <linux/bitops.h> | 32 | #include <linux/bitops.h> |
33 | #include <linux/module.h> | 33 | #include <linux/module.h> |
34 | #include <linux/module.h> | ||
34 | 35 | ||
35 | #include <asm/prom.h> | 36 | #include <asm/prom.h> |
36 | #include <asm/rtas.h> | 37 | #include <asm/rtas.h> |
@@ -46,7 +47,6 @@ | |||
46 | #include <asm/pgtable.h> | 47 | #include <asm/pgtable.h> |
47 | #include <asm/pci.h> | 48 | #include <asm/pci.h> |
48 | #include <asm/iommu.h> | 49 | #include <asm/iommu.h> |
49 | #include <asm/ppcdebug.h> | ||
50 | #include <asm/btext.h> | 50 | #include <asm/btext.h> |
51 | #include <asm/sections.h> | 51 | #include <asm/sections.h> |
52 | #include <asm/machdep.h> | 52 | #include <asm/machdep.h> |
@@ -1866,17 +1866,32 @@ get_property(struct device_node *np, const char *name, int *lenp) | |||
1866 | EXPORT_SYMBOL(get_property); | 1866 | EXPORT_SYMBOL(get_property); |
1867 | 1867 | ||
1868 | /* | 1868 | /* |
1869 | * Add a property to a node | 1869 | * Add a property to a node. |
1870 | */ | 1870 | */ |
1871 | void | 1871 | int |
1872 | prom_add_property(struct device_node* np, struct property* prop) | 1872 | prom_add_property(struct device_node* np, struct property* prop) |
1873 | { | 1873 | { |
1874 | struct property **next = &np->properties; | 1874 | struct property **next; |
1875 | 1875 | ||
1876 | prop->next = NULL; | 1876 | prop->next = NULL; |
1877 | while (*next) | 1877 | write_lock(&devtree_lock); |
1878 | next = &np->properties; | ||
1879 | while (*next) { | ||
1880 | if (strcmp(prop->name, (*next)->name) == 0) { | ||
1881 | /* duplicate ! don't insert it */ | ||
1882 | write_unlock(&devtree_lock); | ||
1883 | return -1; | ||
1884 | } | ||
1878 | next = &(*next)->next; | 1885 | next = &(*next)->next; |
1886 | } | ||
1879 | *next = prop; | 1887 | *next = prop; |
1888 | write_unlock(&devtree_lock); | ||
1889 | |||
1890 | /* try to add to proc as well if it was initialized */ | ||
1891 | if (np->pde) | ||
1892 | proc_device_tree_add_prop(np->pde, prop); | ||
1893 | |||
1894 | return 0; | ||
1880 | } | 1895 | } |
1881 | 1896 | ||
1882 | #if 0 | 1897 | #if 0 |
diff --git a/arch/ppc64/kernel/prom_init.c b/arch/ppc64/kernel/prom_init.c index a4bbca6dbb8b..e4c880dab997 100644 --- a/arch/ppc64/kernel/prom_init.c +++ b/arch/ppc64/kernel/prom_init.c | |||
@@ -44,7 +44,6 @@ | |||
44 | #include <asm/pgtable.h> | 44 | #include <asm/pgtable.h> |
45 | #include <asm/pci.h> | 45 | #include <asm/pci.h> |
46 | #include <asm/iommu.h> | 46 | #include <asm/iommu.h> |
47 | #include <asm/ppcdebug.h> | ||
48 | #include <asm/btext.h> | 47 | #include <asm/btext.h> |
49 | #include <asm/sections.h> | 48 | #include <asm/sections.h> |
50 | #include <asm/machdep.h> | 49 | #include <asm/machdep.h> |
@@ -1825,7 +1824,7 @@ static void __init fixup_device_tree(void) | |||
1825 | if (prom_getprop(u3, "device-rev", &u3_rev, sizeof(u3_rev)) | 1824 | if (prom_getprop(u3, "device-rev", &u3_rev, sizeof(u3_rev)) |
1826 | == PROM_ERROR) | 1825 | == PROM_ERROR) |
1827 | return; | 1826 | return; |
1828 | if (u3_rev != 0x35 && u3_rev != 0x37) | 1827 | if (u3_rev < 0x35 || u3_rev > 0x39) |
1829 | return; | 1828 | return; |
1830 | /* does it need fixup ? */ | 1829 | /* does it need fixup ? */ |
1831 | if (prom_getproplen(i2c, "interrupts") > 0) | 1830 | if (prom_getproplen(i2c, "interrupts") > 0) |
diff --git a/arch/ppc64/kernel/rtas_pci.c b/arch/ppc64/kernel/rtas_pci.c index 3ad15c90fbbd..3c3f19192fcc 100644 --- a/arch/ppc64/kernel/rtas_pci.c +++ b/arch/ppc64/kernel/rtas_pci.c | |||
@@ -440,7 +440,6 @@ struct pci_controller * __devinit init_phb_dynamic(struct device_node *dn) | |||
440 | struct device_node *root = of_find_node_by_path("/"); | 440 | struct device_node *root = of_find_node_by_path("/"); |
441 | unsigned int root_size_cells = 0; | 441 | unsigned int root_size_cells = 0; |
442 | struct pci_controller *phb; | 442 | struct pci_controller *phb; |
443 | struct pci_bus *bus; | ||
444 | int primary; | 443 | int primary; |
445 | 444 | ||
446 | root_size_cells = prom_n_size_cells(root); | 445 | root_size_cells = prom_n_size_cells(root); |
@@ -456,10 +455,7 @@ struct pci_controller * __devinit init_phb_dynamic(struct device_node *dn) | |||
456 | of_node_put(root); | 455 | of_node_put(root); |
457 | 456 | ||
458 | pci_devs_phb_init_dynamic(phb); | 457 | pci_devs_phb_init_dynamic(phb); |
459 | phb->last_busno = 0xff; | 458 | scan_phb(phb); |
460 | bus = pci_scan_bus(phb->first_busno, phb->ops, phb->arch_data); | ||
461 | phb->bus = bus; | ||
462 | phb->last_busno = bus->subordinate; | ||
463 | 459 | ||
464 | return phb; | 460 | return phb; |
465 | } | 461 | } |
diff --git a/arch/ppc64/kernel/udbg.c b/arch/ppc64/kernel/udbg.c index d49c3613c8ec..0d878e72fc44 100644 --- a/arch/ppc64/kernel/udbg.c +++ b/arch/ppc64/kernel/udbg.c | |||
@@ -10,12 +10,10 @@ | |||
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <stdarg.h> | 12 | #include <stdarg.h> |
13 | #define WANT_PPCDBG_TAB /* Only defined here */ | ||
14 | #include <linux/config.h> | 13 | #include <linux/config.h> |
15 | #include <linux/types.h> | 14 | #include <linux/types.h> |
16 | #include <linux/sched.h> | 15 | #include <linux/sched.h> |
17 | #include <linux/console.h> | 16 | #include <linux/console.h> |
18 | #include <asm/ppcdebug.h> | ||
19 | #include <asm/processor.h> | 17 | #include <asm/processor.h> |
20 | 18 | ||
21 | void (*udbg_putc)(unsigned char c); | 19 | void (*udbg_putc)(unsigned char c); |
@@ -89,59 +87,6 @@ void udbg_printf(const char *fmt, ...) | |||
89 | va_end(args); | 87 | va_end(args); |
90 | } | 88 | } |
91 | 89 | ||
92 | /* PPCDBG stuff */ | ||
93 | |||
94 | u64 ppc64_debug_switch; | ||
95 | |||
96 | /* Special print used by PPCDBG() macro */ | ||
97 | void udbg_ppcdbg(unsigned long debug_flags, const char *fmt, ...) | ||
98 | { | ||
99 | unsigned long active_debugs = debug_flags & ppc64_debug_switch; | ||
100 | |||
101 | if (active_debugs) { | ||
102 | va_list ap; | ||
103 | unsigned char buf[UDBG_BUFSIZE]; | ||
104 | unsigned long i, len = 0; | ||
105 | |||
106 | for (i=0; i < PPCDBG_NUM_FLAGS; i++) { | ||
107 | if (((1U << i) & active_debugs) && | ||
108 | trace_names[i]) { | ||
109 | len += strlen(trace_names[i]); | ||
110 | udbg_puts(trace_names[i]); | ||
111 | break; | ||
112 | } | ||
113 | } | ||
114 | |||
115 | snprintf(buf, UDBG_BUFSIZE, " [%s]: ", current->comm); | ||
116 | len += strlen(buf); | ||
117 | udbg_puts(buf); | ||
118 | |||
119 | while (len < 18) { | ||
120 | udbg_puts(" "); | ||
121 | len++; | ||
122 | } | ||
123 | |||
124 | va_start(ap, fmt); | ||
125 | vsnprintf(buf, UDBG_BUFSIZE, fmt, ap); | ||
126 | udbg_puts(buf); | ||
127 | va_end(ap); | ||
128 | } | ||
129 | } | ||
130 | |||
131 | unsigned long udbg_ifdebug(unsigned long flags) | ||
132 | { | ||
133 | return (flags & ppc64_debug_switch); | ||
134 | } | ||
135 | |||
136 | /* | ||
137 | * Initialize the PPCDBG state. Called before relocation has been enabled. | ||
138 | */ | ||
139 | void __init ppcdbg_initialize(void) | ||
140 | { | ||
141 | ppc64_debug_switch = PPC_DEBUG_DEFAULT; /* | PPCDBG_BUSWALK | */ | ||
142 | /* PPCDBG_PHBINIT | PPCDBG_MM | PPCDBG_MMINIT | PPCDBG_TCEINIT | PPCDBG_TCE */; | ||
143 | } | ||
144 | |||
145 | /* | 90 | /* |
146 | * Early boot console based on udbg | 91 | * Early boot console based on udbg |
147 | */ | 92 | */ |
diff --git a/arch/s390/appldata/appldata_base.c b/arch/s390/appldata/appldata_base.c index c9f2f60cfa58..dee6ab54984d 100644 --- a/arch/s390/appldata/appldata_base.c +++ b/arch/s390/appldata/appldata_base.c | |||
@@ -592,12 +592,15 @@ int appldata_register_ops(struct appldata_ops *ops) | |||
592 | */ | 592 | */ |
593 | void appldata_unregister_ops(struct appldata_ops *ops) | 593 | void appldata_unregister_ops(struct appldata_ops *ops) |
594 | { | 594 | { |
595 | void *table; | ||
595 | spin_lock(&appldata_ops_lock); | 596 | spin_lock(&appldata_ops_lock); |
596 | unregister_sysctl_table(ops->sysctl_header); | ||
597 | list_del(&ops->list); | 597 | list_del(&ops->list); |
598 | kfree(ops->ctl_table); | 598 | /* at that point any incoming access will fail */ |
599 | table = ops->ctl_table; | ||
599 | ops->ctl_table = NULL; | 600 | ops->ctl_table = NULL; |
600 | spin_unlock(&appldata_ops_lock); | 601 | spin_unlock(&appldata_ops_lock); |
602 | unregister_sysctl_table(ops->sysctl_header); | ||
603 | kfree(table); | ||
601 | P_INFO("%s-ops unregistered!\n", ops->name); | 604 | P_INFO("%s-ops unregistered!\n", ops->name); |
602 | } | 605 | } |
603 | /********************** module-ops management <END> **************************/ | 606 | /********************** module-ops management <END> **************************/ |
diff --git a/arch/s390/kernel/debug.c b/arch/s390/kernel/debug.c index bc59282da762..896d39d0e4ce 100644 --- a/arch/s390/kernel/debug.c +++ b/arch/s390/kernel/debug.c | |||
@@ -486,7 +486,7 @@ out: | |||
486 | * - goto next entry in p_info | 486 | * - goto next entry in p_info |
487 | */ | 487 | */ |
488 | 488 | ||
489 | extern inline int | 489 | static inline int |
490 | debug_next_entry(file_private_info_t *p_info) | 490 | debug_next_entry(file_private_info_t *p_info) |
491 | { | 491 | { |
492 | debug_info_t *id; | 492 | debug_info_t *id; |
@@ -800,7 +800,7 @@ debug_set_level(debug_info_t* id, int new_level) | |||
800 | * - set active entry to next in the ring buffer | 800 | * - set active entry to next in the ring buffer |
801 | */ | 801 | */ |
802 | 802 | ||
803 | extern inline void | 803 | static inline void |
804 | proceed_active_entry(debug_info_t * id) | 804 | proceed_active_entry(debug_info_t * id) |
805 | { | 805 | { |
806 | if ((id->active_entries[id->active_area] += id->entry_size) | 806 | if ((id->active_entries[id->active_area] += id->entry_size) |
@@ -817,7 +817,7 @@ proceed_active_entry(debug_info_t * id) | |||
817 | * - set active area to next in the ring buffer | 817 | * - set active area to next in the ring buffer |
818 | */ | 818 | */ |
819 | 819 | ||
820 | extern inline void | 820 | static inline void |
821 | proceed_active_area(debug_info_t * id) | 821 | proceed_active_area(debug_info_t * id) |
822 | { | 822 | { |
823 | id->active_area++; | 823 | id->active_area++; |
@@ -828,7 +828,7 @@ proceed_active_area(debug_info_t * id) | |||
828 | * get_active_entry: | 828 | * get_active_entry: |
829 | */ | 829 | */ |
830 | 830 | ||
831 | extern inline debug_entry_t* | 831 | static inline debug_entry_t* |
832 | get_active_entry(debug_info_t * id) | 832 | get_active_entry(debug_info_t * id) |
833 | { | 833 | { |
834 | return (debug_entry_t *) (((char *) id->areas[id->active_area] | 834 | return (debug_entry_t *) (((char *) id->areas[id->active_area] |
@@ -841,7 +841,7 @@ get_active_entry(debug_info_t * id) | |||
841 | * - set timestamp, caller address, cpu number etc. | 841 | * - set timestamp, caller address, cpu number etc. |
842 | */ | 842 | */ |
843 | 843 | ||
844 | extern inline void | 844 | static inline void |
845 | debug_finish_entry(debug_info_t * id, debug_entry_t* active, int level, | 845 | debug_finish_entry(debug_info_t * id, debug_entry_t* active, int level, |
846 | int exception) | 846 | int exception) |
847 | { | 847 | { |
@@ -971,7 +971,7 @@ debug_entry_t | |||
971 | * counts arguments in format string for sprintf view | 971 | * counts arguments in format string for sprintf view |
972 | */ | 972 | */ |
973 | 973 | ||
974 | extern inline int | 974 | static inline int |
975 | debug_count_numargs(char *string) | 975 | debug_count_numargs(char *string) |
976 | { | 976 | { |
977 | int numargs=0; | 977 | int numargs=0; |
diff --git a/arch/s390/kernel/process.c b/arch/s390/kernel/process.c index 9f3dff6c0b72..78b64fe5e7c2 100644 --- a/arch/s390/kernel/process.c +++ b/arch/s390/kernel/process.c | |||
@@ -99,15 +99,15 @@ void default_idle(void) | |||
99 | { | 99 | { |
100 | int cpu, rc; | 100 | int cpu, rc; |
101 | 101 | ||
102 | /* CPU is going idle. */ | ||
103 | cpu = smp_processor_id(); | ||
104 | |||
102 | local_irq_disable(); | 105 | local_irq_disable(); |
103 | if (need_resched()) { | 106 | if (need_resched()) { |
104 | local_irq_enable(); | 107 | local_irq_enable(); |
105 | schedule(); | 108 | return; |
106 | return; | 109 | } |
107 | } | ||
108 | 110 | ||
109 | /* CPU is going idle. */ | ||
110 | cpu = smp_processor_id(); | ||
111 | rc = notifier_call_chain(&idle_chain, CPU_IDLE, (void *)(long) cpu); | 111 | rc = notifier_call_chain(&idle_chain, CPU_IDLE, (void *)(long) cpu); |
112 | if (rc != NOTIFY_OK && rc != NOTIFY_DONE) | 112 | if (rc != NOTIFY_OK && rc != NOTIFY_DONE) |
113 | BUG(); | 113 | BUG(); |
@@ -120,7 +120,7 @@ void default_idle(void) | |||
120 | __ctl_set_bit(8, 15); | 120 | __ctl_set_bit(8, 15); |
121 | 121 | ||
122 | #ifdef CONFIG_HOTPLUG_CPU | 122 | #ifdef CONFIG_HOTPLUG_CPU |
123 | if (cpu_is_offline(smp_processor_id())) | 123 | if (cpu_is_offline(cpu)) |
124 | cpu_die(); | 124 | cpu_die(); |
125 | #endif | 125 | #endif |
126 | 126 | ||
@@ -139,8 +139,14 @@ void default_idle(void) | |||
139 | 139 | ||
140 | void cpu_idle(void) | 140 | void cpu_idle(void) |
141 | { | 141 | { |
142 | for (;;) | 142 | for (;;) { |
143 | default_idle(); | 143 | while (!need_resched()) |
144 | default_idle(); | ||
145 | |||
146 | preempt_enable_no_resched(); | ||
147 | schedule(); | ||
148 | preempt_disable(); | ||
149 | } | ||
144 | } | 150 | } |
145 | 151 | ||
146 | void show_regs(struct pt_regs *regs) | 152 | void show_regs(struct pt_regs *regs) |
diff --git a/arch/s390/kernel/smp.c b/arch/s390/kernel/smp.c index e13c87b446b2..5856b3fda6bf 100644 --- a/arch/s390/kernel/smp.c +++ b/arch/s390/kernel/smp.c | |||
@@ -533,6 +533,7 @@ int __devinit start_secondary(void *cpuvoid) | |||
533 | { | 533 | { |
534 | /* Setup the cpu */ | 534 | /* Setup the cpu */ |
535 | cpu_init(); | 535 | cpu_init(); |
536 | preempt_disable(); | ||
536 | /* init per CPU timer */ | 537 | /* init per CPU timer */ |
537 | init_cpu_timer(); | 538 | init_cpu_timer(); |
538 | #ifdef CONFIG_VIRT_TIMER | 539 | #ifdef CONFIG_VIRT_TIMER |
diff --git a/arch/s390/mm/fault.c b/arch/s390/mm/fault.c index 64e32da77754..fb2607c369ed 100644 --- a/arch/s390/mm/fault.c +++ b/arch/s390/mm/fault.c | |||
@@ -160,7 +160,7 @@ static void do_sigsegv(struct pt_regs *regs, unsigned long error_code, | |||
160 | * 11 Page translation -> Not present (nullification) | 160 | * 11 Page translation -> Not present (nullification) |
161 | * 3b Region third trans. -> Not present (nullification) | 161 | * 3b Region third trans. -> Not present (nullification) |
162 | */ | 162 | */ |
163 | extern inline void | 163 | static inline void |
164 | do_exception(struct pt_regs *regs, unsigned long error_code, int is_protection) | 164 | do_exception(struct pt_regs *regs, unsigned long error_code, int is_protection) |
165 | { | 165 | { |
166 | struct task_struct *tsk; | 166 | struct task_struct *tsk; |
diff --git a/arch/sh/kernel/process.c b/arch/sh/kernel/process.c index 6dce9d0b81f8..fd4f240b833d 100644 --- a/arch/sh/kernel/process.c +++ b/arch/sh/kernel/process.c | |||
@@ -51,28 +51,24 @@ void enable_hlt(void) | |||
51 | 51 | ||
52 | EXPORT_SYMBOL(enable_hlt); | 52 | EXPORT_SYMBOL(enable_hlt); |
53 | 53 | ||
54 | void default_idle(void) | 54 | void cpu_idle(void) |
55 | { | 55 | { |
56 | /* endless idle loop with no priority at all */ | 56 | /* endless idle loop with no priority at all */ |
57 | while (1) { | 57 | while (1) { |
58 | if (hlt_counter) { | 58 | if (hlt_counter) { |
59 | while (1) | 59 | while (!need_resched()) |
60 | if (need_resched()) | 60 | cpu_relax(); |
61 | break; | ||
62 | } else { | 61 | } else { |
63 | while (!need_resched()) | 62 | while (!need_resched()) |
64 | cpu_sleep(); | 63 | cpu_sleep(); |
65 | } | 64 | } |
66 | 65 | ||
66 | preempt_enable_no_resched(); | ||
67 | schedule(); | 67 | schedule(); |
68 | preempt_disable(); | ||
68 | } | 69 | } |
69 | } | 70 | } |
70 | 71 | ||
71 | void cpu_idle(void) | ||
72 | { | ||
73 | default_idle(); | ||
74 | } | ||
75 | |||
76 | void machine_restart(char * __unused) | 72 | void machine_restart(char * __unused) |
77 | { | 73 | { |
78 | /* SR.BL=1 and invoke address error to let CPU reset (manual reset) */ | 74 | /* SR.BL=1 and invoke address error to let CPU reset (manual reset) */ |
diff --git a/arch/sh/kernel/smp.c b/arch/sh/kernel/smp.c index 5ecefc02896a..59e49b18252c 100644 --- a/arch/sh/kernel/smp.c +++ b/arch/sh/kernel/smp.c | |||
@@ -112,7 +112,9 @@ int __cpu_up(unsigned int cpu) | |||
112 | 112 | ||
113 | int start_secondary(void *unused) | 113 | int start_secondary(void *unused) |
114 | { | 114 | { |
115 | unsigned int cpu = smp_processor_id(); | 115 | unsigned int cpu; |
116 | |||
117 | cpu = smp_processor_id(); | ||
116 | 118 | ||
117 | atomic_inc(&init_mm.mm_count); | 119 | atomic_inc(&init_mm.mm_count); |
118 | current->active_mm = &init_mm; | 120 | current->active_mm = &init_mm; |
@@ -120,6 +122,7 @@ int start_secondary(void *unused) | |||
120 | smp_store_cpu_info(cpu); | 122 | smp_store_cpu_info(cpu); |
121 | 123 | ||
122 | __smp_slave_init(cpu); | 124 | __smp_slave_init(cpu); |
125 | preempt_disable(); | ||
123 | per_cpu_trap_init(); | 126 | per_cpu_trap_init(); |
124 | 127 | ||
125 | atomic_inc(&cpus_booted); | 128 | atomic_inc(&cpus_booted); |
diff --git a/arch/sh64/kernel/process.c b/arch/sh64/kernel/process.c index efde41c0cd66..b95d04141855 100644 --- a/arch/sh64/kernel/process.c +++ b/arch/sh64/kernel/process.c | |||
@@ -307,23 +307,19 @@ __setup("hlt", hlt_setup); | |||
307 | 307 | ||
308 | static inline void hlt(void) | 308 | static inline void hlt(void) |
309 | { | 309 | { |
310 | if (hlt_counter) | ||
311 | return; | ||
312 | |||
313 | __asm__ __volatile__ ("sleep" : : : "memory"); | 310 | __asm__ __volatile__ ("sleep" : : : "memory"); |
314 | } | 311 | } |
315 | 312 | ||
316 | /* | 313 | /* |
317 | * The idle loop on a uniprocessor SH.. | 314 | * The idle loop on a uniprocessor SH.. |
318 | */ | 315 | */ |
319 | void default_idle(void) | 316 | void cpu_idle(void) |
320 | { | 317 | { |
321 | /* endless idle loop with no priority at all */ | 318 | /* endless idle loop with no priority at all */ |
322 | while (1) { | 319 | while (1) { |
323 | if (hlt_counter) { | 320 | if (hlt_counter) { |
324 | while (1) | 321 | while (!need_resched()) |
325 | if (need_resched()) | 322 | cpu_relax(); |
326 | break; | ||
327 | } else { | 323 | } else { |
328 | local_irq_disable(); | 324 | local_irq_disable(); |
329 | while (!need_resched()) { | 325 | while (!need_resched()) { |
@@ -334,13 +330,11 @@ void default_idle(void) | |||
334 | } | 330 | } |
335 | local_irq_enable(); | 331 | local_irq_enable(); |
336 | } | 332 | } |
333 | preempt_enable_no_resched(); | ||
337 | schedule(); | 334 | schedule(); |
335 | preempt_disable(); | ||
338 | } | 336 | } |
339 | } | ||
340 | 337 | ||
341 | void cpu_idle(void) | ||
342 | { | ||
343 | default_idle(); | ||
344 | } | 338 | } |
345 | 339 | ||
346 | void machine_restart(char * __unused) | 340 | void machine_restart(char * __unused) |
diff --git a/arch/sparc/kernel/process.c b/arch/sparc/kernel/process.c index 29e72b57d4fd..ea8647411462 100644 --- a/arch/sparc/kernel/process.c +++ b/arch/sparc/kernel/process.c | |||
@@ -67,13 +67,6 @@ extern void fpsave(unsigned long *, unsigned long *, void *, unsigned long *); | |||
67 | struct task_struct *last_task_used_math = NULL; | 67 | struct task_struct *last_task_used_math = NULL; |
68 | struct thread_info *current_set[NR_CPUS]; | 68 | struct thread_info *current_set[NR_CPUS]; |
69 | 69 | ||
70 | /* | ||
71 | * default_idle is new in 2.5. XXX Review, currently stolen from sparc64. | ||
72 | */ | ||
73 | void default_idle(void) | ||
74 | { | ||
75 | } | ||
76 | |||
77 | #ifndef CONFIG_SMP | 70 | #ifndef CONFIG_SMP |
78 | 71 | ||
79 | #define SUN4C_FAULT_HIGH 100 | 72 | #define SUN4C_FAULT_HIGH 100 |
@@ -92,12 +85,11 @@ void cpu_idle(void) | |||
92 | static unsigned long fps; | 85 | static unsigned long fps; |
93 | unsigned long now; | 86 | unsigned long now; |
94 | unsigned long faults; | 87 | unsigned long faults; |
95 | unsigned long flags; | ||
96 | 88 | ||
97 | extern unsigned long sun4c_kernel_faults; | 89 | extern unsigned long sun4c_kernel_faults; |
98 | extern void sun4c_grow_kernel_ring(void); | 90 | extern void sun4c_grow_kernel_ring(void); |
99 | 91 | ||
100 | local_irq_save(flags); | 92 | local_irq_disable(); |
101 | now = jiffies; | 93 | now = jiffies; |
102 | count -= (now - last_jiffies); | 94 | count -= (now - last_jiffies); |
103 | last_jiffies = now; | 95 | last_jiffies = now; |
@@ -113,14 +105,19 @@ void cpu_idle(void) | |||
113 | sun4c_grow_kernel_ring(); | 105 | sun4c_grow_kernel_ring(); |
114 | } | 106 | } |
115 | } | 107 | } |
116 | local_irq_restore(flags); | 108 | local_irq_enable(); |
117 | } | 109 | } |
118 | 110 | ||
119 | while((!need_resched()) && pm_idle) { | 111 | if (pm_idle) { |
120 | (*pm_idle)(); | 112 | while (!need_resched()) |
113 | (*pm_idle)(); | ||
114 | } else { | ||
115 | while (!need_resched()) | ||
116 | cpu_relax(); | ||
121 | } | 117 | } |
122 | 118 | preempt_enable_no_resched(); | |
123 | schedule(); | 119 | schedule(); |
120 | preempt_disable(); | ||
124 | check_pgt_cache(); | 121 | check_pgt_cache(); |
125 | } | 122 | } |
126 | } | 123 | } |
@@ -130,13 +127,15 @@ void cpu_idle(void) | |||
130 | /* This is being executed in task 0 'user space'. */ | 127 | /* This is being executed in task 0 'user space'. */ |
131 | void cpu_idle(void) | 128 | void cpu_idle(void) |
132 | { | 129 | { |
130 | set_thread_flag(TIF_POLLING_NRFLAG); | ||
133 | /* endless idle loop with no priority at all */ | 131 | /* endless idle loop with no priority at all */ |
134 | while(1) { | 132 | while(1) { |
135 | if(need_resched()) { | 133 | while (!need_resched()) |
136 | schedule(); | 134 | cpu_relax(); |
137 | check_pgt_cache(); | 135 | preempt_enable_no_resched(); |
138 | } | 136 | schedule(); |
139 | barrier(); /* or else gcc optimizes... */ | 137 | preempt_disable(); |
138 | check_pgt_cache(); | ||
140 | } | 139 | } |
141 | } | 140 | } |
142 | 141 | ||
diff --git a/arch/sparc64/kernel/ioctl32.c b/arch/sparc64/kernel/ioctl32.c index 92e26304de90..c2e96daa5ab3 100644 --- a/arch/sparc64/kernel/ioctl32.c +++ b/arch/sparc64/kernel/ioctl32.c | |||
@@ -92,10 +92,8 @@ static int fbiogscursor(unsigned int fd, unsigned int cmd, unsigned long arg) | |||
92 | return sys_ioctl (fd, FBIOSCURSOR, (unsigned long)p); | 92 | return sys_ioctl (fd, FBIOSCURSOR, (unsigned long)p); |
93 | } | 93 | } |
94 | 94 | ||
95 | typedef int (* ioctl32_handler_t)(unsigned int, unsigned int, unsigned long, struct file *); | ||
96 | |||
97 | #define COMPATIBLE_IOCTL(cmd) HANDLE_IOCTL((cmd),sys_ioctl) | 95 | #define COMPATIBLE_IOCTL(cmd) HANDLE_IOCTL((cmd),sys_ioctl) |
98 | #define HANDLE_IOCTL(cmd,handler) { (cmd), (ioctl32_handler_t)(handler), NULL }, | 96 | #define HANDLE_IOCTL(cmd,handler) { (cmd), (ioctl_trans_handler_t)(handler), NULL }, |
99 | #define IOCTL_TABLE_START \ | 97 | #define IOCTL_TABLE_START \ |
100 | struct ioctl_trans ioctl_start[] = { | 98 | struct ioctl_trans ioctl_start[] = { |
101 | #define IOCTL_TABLE_END \ | 99 | #define IOCTL_TABLE_END \ |
diff --git a/arch/sparc64/kernel/process.c b/arch/sparc64/kernel/process.c index 7d10b0397091..02f9dec1d459 100644 --- a/arch/sparc64/kernel/process.c +++ b/arch/sparc64/kernel/process.c | |||
@@ -74,7 +74,9 @@ void cpu_idle(void) | |||
74 | while (!need_resched()) | 74 | while (!need_resched()) |
75 | barrier(); | 75 | barrier(); |
76 | 76 | ||
77 | preempt_enable_no_resched(); | ||
77 | schedule(); | 78 | schedule(); |
79 | preempt_disable(); | ||
78 | check_pgt_cache(); | 80 | check_pgt_cache(); |
79 | } | 81 | } |
80 | } | 82 | } |
@@ -83,21 +85,31 @@ void cpu_idle(void) | |||
83 | 85 | ||
84 | /* | 86 | /* |
85 | * the idle loop on a UltraMultiPenguin... | 87 | * the idle loop on a UltraMultiPenguin... |
88 | * | ||
89 | * TIF_POLLING_NRFLAG is set because we do not sleep the cpu | ||
90 | * inside of the idler task, so an interrupt is not needed | ||
91 | * to get a clean fast response. | ||
92 | * | ||
93 | * XXX Reverify this assumption... -DaveM | ||
94 | * | ||
95 | * Addendum: We do want it to do something for the signal | ||
96 | * delivery case, we detect that by just seeing | ||
97 | * if we are trying to send this to an idler or not. | ||
86 | */ | 98 | */ |
87 | #define idle_me_harder() (cpu_data(smp_processor_id()).idle_volume += 1) | ||
88 | #define unidle_me() (cpu_data(smp_processor_id()).idle_volume = 0) | ||
89 | void cpu_idle(void) | 99 | void cpu_idle(void) |
90 | { | 100 | { |
101 | cpuinfo_sparc *cpuinfo = &local_cpu_data(); | ||
91 | set_thread_flag(TIF_POLLING_NRFLAG); | 102 | set_thread_flag(TIF_POLLING_NRFLAG); |
103 | |||
92 | while(1) { | 104 | while(1) { |
93 | if (need_resched()) { | 105 | if (need_resched()) { |
94 | unidle_me(); | 106 | cpuinfo->idle_volume = 0; |
95 | clear_thread_flag(TIF_POLLING_NRFLAG); | 107 | preempt_enable_no_resched(); |
96 | schedule(); | 108 | schedule(); |
97 | set_thread_flag(TIF_POLLING_NRFLAG); | 109 | preempt_disable(); |
98 | check_pgt_cache(); | 110 | check_pgt_cache(); |
99 | } | 111 | } |
100 | idle_me_harder(); | 112 | cpuinfo->idle_volume++; |
101 | 113 | ||
102 | /* The store ordering is so that IRQ handlers on | 114 | /* The store ordering is so that IRQ handlers on |
103 | * other cpus see our increasing idleness for the buddy | 115 | * other cpus see our increasing idleness for the buddy |
diff --git a/arch/sparc64/kernel/smp.c b/arch/sparc64/kernel/smp.c index 5d90ee9aebf1..797a65493fb8 100644 --- a/arch/sparc64/kernel/smp.c +++ b/arch/sparc64/kernel/smp.c | |||
@@ -168,6 +168,9 @@ void __init smp_callin(void) | |||
168 | rmb(); | 168 | rmb(); |
169 | 169 | ||
170 | cpu_set(cpuid, cpu_online_map); | 170 | cpu_set(cpuid, cpu_online_map); |
171 | |||
172 | /* idle thread is expected to have preempt disabled */ | ||
173 | preempt_disable(); | ||
171 | } | 174 | } |
172 | 175 | ||
173 | void cpu_panic(void) | 176 | void cpu_panic(void) |
@@ -1149,20 +1152,9 @@ void __init smp_cpus_done(unsigned int max_cpus) | |||
1149 | (bogosum/(5000/HZ))%100); | 1152 | (bogosum/(5000/HZ))%100); |
1150 | } | 1153 | } |
1151 | 1154 | ||
1152 | /* This needn't do anything as we do not sleep the cpu | ||
1153 | * inside of the idler task, so an interrupt is not needed | ||
1154 | * to get a clean fast response. | ||
1155 | * | ||
1156 | * XXX Reverify this assumption... -DaveM | ||
1157 | * | ||
1158 | * Addendum: We do want it to do something for the signal | ||
1159 | * delivery case, we detect that by just seeing | ||
1160 | * if we are trying to send this to an idler or not. | ||
1161 | */ | ||
1162 | void smp_send_reschedule(int cpu) | 1155 | void smp_send_reschedule(int cpu) |
1163 | { | 1156 | { |
1164 | if (cpu_data(cpu).idle_volume == 0) | 1157 | smp_receive_signal(cpu); |
1165 | smp_receive_signal(cpu); | ||
1166 | } | 1158 | } |
1167 | 1159 | ||
1168 | /* This is a nop because we capture all other cpus | 1160 | /* This is a nop because we capture all other cpus |
diff --git a/arch/sparc64/mm/fault.c b/arch/sparc64/mm/fault.c index 31fbc67719a1..3be278d916db 100644 --- a/arch/sparc64/mm/fault.c +++ b/arch/sparc64/mm/fault.c | |||
@@ -109,7 +109,7 @@ static void bad_kernel_pc(struct pt_regs *regs) | |||
109 | * this. Additionally, to prevent kswapd from ripping ptes from | 109 | * this. Additionally, to prevent kswapd from ripping ptes from |
110 | * under us, raise interrupts around the time that we look at the | 110 | * under us, raise interrupts around the time that we look at the |
111 | * pte, kswapd will have to wait to get his smp ipi response from | 111 | * pte, kswapd will have to wait to get his smp ipi response from |
112 | * us. This saves us having to get page_table_lock. | 112 | * us. vmtruncate likewise. This saves us having to get pte lock. |
113 | */ | 113 | */ |
114 | static unsigned int get_user_insn(unsigned long tpc) | 114 | static unsigned int get_user_insn(unsigned long tpc) |
115 | { | 115 | { |
diff --git a/arch/v850/kernel/process.c b/arch/v850/kernel/process.c index 9c708c32c1f0..39cf247cdae4 100644 --- a/arch/v850/kernel/process.c +++ b/arch/v850/kernel/process.c | |||
@@ -36,11 +36,8 @@ extern void ret_from_fork (void); | |||
36 | /* The idle loop. */ | 36 | /* The idle loop. */ |
37 | void default_idle (void) | 37 | void default_idle (void) |
38 | { | 38 | { |
39 | while (1) { | 39 | while (! need_resched ()) |
40 | while (! need_resched ()) | 40 | asm ("halt; nop; nop; nop; nop; nop" ::: "cc"); |
41 | asm ("halt; nop; nop; nop; nop; nop" ::: "cc"); | ||
42 | schedule (); | ||
43 | } | ||
44 | } | 41 | } |
45 | 42 | ||
46 | void (*idle)(void) = default_idle; | 43 | void (*idle)(void) = default_idle; |
@@ -54,7 +51,14 @@ void (*idle)(void) = default_idle; | |||
54 | void cpu_idle (void) | 51 | void cpu_idle (void) |
55 | { | 52 | { |
56 | /* endless idle loop with no priority at all */ | 53 | /* endless idle loop with no priority at all */ |
57 | (*idle) (); | 54 | while (1) { |
55 | while (!need_resched()) | ||
56 | (*idle) (); | ||
57 | |||
58 | preempt_enable_no_resched(); | ||
59 | schedule(); | ||
60 | preempt_disable(); | ||
61 | } | ||
58 | } | 62 | } |
59 | 63 | ||
60 | /* | 64 | /* |
diff --git a/arch/x86_64/ia32/ia32_ioctl.c b/arch/x86_64/ia32/ia32_ioctl.c index 4ba0e293d5e5..e335bd0b637d 100644 --- a/arch/x86_64/ia32/ia32_ioctl.c +++ b/arch/x86_64/ia32/ia32_ioctl.c | |||
@@ -64,12 +64,6 @@ struct ioctl_trans ioctl_start[] = { | |||
64 | #include <linux/compat_ioctl.h> | 64 | #include <linux/compat_ioctl.h> |
65 | #define DECLARES | 65 | #define DECLARES |
66 | #include "compat_ioctl.c" | 66 | #include "compat_ioctl.c" |
67 | COMPATIBLE_IOCTL(HDIO_SET_KEEPSETTINGS) | ||
68 | COMPATIBLE_IOCTL(HDIO_SCAN_HWIF) | ||
69 | COMPATIBLE_IOCTL(BLKRASET) | ||
70 | COMPATIBLE_IOCTL(0x4B50) /* KDGHWCLK - not in the kernel, but don't complain */ | ||
71 | COMPATIBLE_IOCTL(0x4B51) /* KDSHWCLK - not in the kernel, but don't complain */ | ||
72 | COMPATIBLE_IOCTL(FIOQSIZE) | ||
73 | 67 | ||
74 | /* And these ioctls need translation */ | 68 | /* And these ioctls need translation */ |
75 | /* realtime device */ | 69 | /* realtime device */ |
diff --git a/arch/x86_64/kernel/process.c b/arch/x86_64/kernel/process.c index b5a89c0bdf59..59be85d9a4bc 100644 --- a/arch/x86_64/kernel/process.c +++ b/arch/x86_64/kernel/process.c | |||
@@ -86,12 +86,22 @@ EXPORT_SYMBOL(enable_hlt); | |||
86 | */ | 86 | */ |
87 | void default_idle(void) | 87 | void default_idle(void) |
88 | { | 88 | { |
89 | local_irq_enable(); | ||
90 | |||
89 | if (!atomic_read(&hlt_counter)) { | 91 | if (!atomic_read(&hlt_counter)) { |
90 | local_irq_disable(); | 92 | clear_thread_flag(TIF_POLLING_NRFLAG); |
91 | if (!need_resched()) | 93 | smp_mb__after_clear_bit(); |
92 | safe_halt(); | 94 | while (!need_resched()) { |
93 | else | 95 | local_irq_disable(); |
94 | local_irq_enable(); | 96 | if (!need_resched()) |
97 | safe_halt(); | ||
98 | else | ||
99 | local_irq_enable(); | ||
100 | } | ||
101 | set_thread_flag(TIF_POLLING_NRFLAG); | ||
102 | } else { | ||
103 | while (!need_resched()) | ||
104 | cpu_relax(); | ||
95 | } | 105 | } |
96 | } | 106 | } |
97 | 107 | ||
@@ -102,30 +112,16 @@ void default_idle(void) | |||
102 | */ | 112 | */ |
103 | static void poll_idle (void) | 113 | static void poll_idle (void) |
104 | { | 114 | { |
105 | int oldval; | ||
106 | |||
107 | local_irq_enable(); | 115 | local_irq_enable(); |
108 | 116 | ||
109 | /* | 117 | asm volatile( |
110 | * Deal with another CPU just having chosen a thread to | 118 | "2:" |
111 | * run here: | 119 | "testl %0,%1;" |
112 | */ | 120 | "rep; nop;" |
113 | oldval = test_and_clear_thread_flag(TIF_NEED_RESCHED); | 121 | "je 2b;" |
114 | 122 | : : | |
115 | if (!oldval) { | 123 | "i" (_TIF_NEED_RESCHED), |
116 | set_thread_flag(TIF_POLLING_NRFLAG); | 124 | "m" (current_thread_info()->flags)); |
117 | asm volatile( | ||
118 | "2:" | ||
119 | "testl %0,%1;" | ||
120 | "rep; nop;" | ||
121 | "je 2b;" | ||
122 | : : | ||
123 | "i" (_TIF_NEED_RESCHED), | ||
124 | "m" (current_thread_info()->flags)); | ||
125 | clear_thread_flag(TIF_POLLING_NRFLAG); | ||
126 | } else { | ||
127 | set_need_resched(); | ||
128 | } | ||
129 | } | 125 | } |
130 | 126 | ||
131 | void cpu_idle_wait(void) | 127 | void cpu_idle_wait(void) |
@@ -187,6 +183,8 @@ static inline void play_dead(void) | |||
187 | */ | 183 | */ |
188 | void cpu_idle (void) | 184 | void cpu_idle (void) |
189 | { | 185 | { |
186 | set_thread_flag(TIF_POLLING_NRFLAG); | ||
187 | |||
190 | /* endless idle loop with no priority at all */ | 188 | /* endless idle loop with no priority at all */ |
191 | while (1) { | 189 | while (1) { |
192 | while (!need_resched()) { | 190 | while (!need_resched()) { |
@@ -204,7 +202,9 @@ void cpu_idle (void) | |||
204 | idle(); | 202 | idle(); |
205 | } | 203 | } |
206 | 204 | ||
205 | preempt_enable_no_resched(); | ||
207 | schedule(); | 206 | schedule(); |
207 | preempt_disable(); | ||
208 | } | 208 | } |
209 | } | 209 | } |
210 | 210 | ||
@@ -219,15 +219,12 @@ static void mwait_idle(void) | |||
219 | { | 219 | { |
220 | local_irq_enable(); | 220 | local_irq_enable(); |
221 | 221 | ||
222 | if (!need_resched()) { | 222 | while (!need_resched()) { |
223 | set_thread_flag(TIF_POLLING_NRFLAG); | 223 | __monitor((void *)¤t_thread_info()->flags, 0, 0); |
224 | do { | 224 | smp_mb(); |
225 | __monitor((void *)¤t_thread_info()->flags, 0, 0); | 225 | if (need_resched()) |
226 | if (need_resched()) | 226 | break; |
227 | break; | 227 | __mwait(0, 0); |
228 | __mwait(0, 0); | ||
229 | } while (!need_resched()); | ||
230 | clear_thread_flag(TIF_POLLING_NRFLAG); | ||
231 | } | 228 | } |
232 | } | 229 | } |
233 | 230 | ||
diff --git a/arch/x86_64/kernel/smpboot.c b/arch/x86_64/kernel/smpboot.c index 4b5b088ec102..c4e59bbdc187 100644 --- a/arch/x86_64/kernel/smpboot.c +++ b/arch/x86_64/kernel/smpboot.c | |||
@@ -472,6 +472,7 @@ void __cpuinit start_secondary(void) | |||
472 | * things done here to the most necessary things. | 472 | * things done here to the most necessary things. |
473 | */ | 473 | */ |
474 | cpu_init(); | 474 | cpu_init(); |
475 | preempt_disable(); | ||
475 | smp_callin(); | 476 | smp_callin(); |
476 | 477 | ||
477 | /* otherwise gcc will move up the smp_processor_id before the cpu_init */ | 478 | /* otherwise gcc will move up the smp_processor_id before the cpu_init */ |
diff --git a/arch/xtensa/kernel/process.c b/arch/xtensa/kernel/process.c index 08ef6d82ee51..6a44b54ae817 100644 --- a/arch/xtensa/kernel/process.c +++ b/arch/xtensa/kernel/process.c | |||
@@ -96,8 +96,9 @@ void cpu_idle(void) | |||
96 | while (1) { | 96 | while (1) { |
97 | while (!need_resched()) | 97 | while (!need_resched()) |
98 | platform_idle(); | 98 | platform_idle(); |
99 | preempt_enable(); | 99 | preempt_enable_no_resched(); |
100 | schedule(); | 100 | schedule(); |
101 | preempt_disable(); | ||
101 | } | 102 | } |
102 | } | 103 | } |
103 | 104 | ||