diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-04-05 15:29:43 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-04-05 15:29:43 -0400 |
commit | 47e89798e7cd9390b74a173006afafcb12e8bc89 (patch) | |
tree | 7c745202a7656f376b37e25c10117b38f1a562a8 | |
parent | 884b8267d5f13bdcdc7e675ecbd0dbb0257689bb (diff) | |
parent | c60e65d7863620945d498a8ac60181077879599c (diff) |
Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc
* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc:
powerpc/pseries: Fix build without CONFIG_HOTPLUG_CPU
powerpc: Set nr_cpu_ids early and use it to free PACAs
powerpc/pseries: Don't register global initcall
powerpc/kexec: Fix mismatched ifdefs for PPC64/SMP.
edac/mpc85xx: Limit setting/clearing of HID1[RFXE] to e500v1/v2 cores
powerpc/85xx: Update dts for PCIe memory maps to match u-boot of Px020RDB
-rw-r--r-- | arch/powerpc/boot/dts/p1020rdb.dts | 12 | ||||
-rw-r--r-- | arch/powerpc/boot/dts/p2020rdb.dts | 12 | ||||
-rw-r--r-- | arch/powerpc/boot/dts/p2020rdb_camp_core0.dts | 4 | ||||
-rw-r--r-- | arch/powerpc/boot/dts/p2020rdb_camp_core1.dts | 10 | ||||
-rw-r--r-- | arch/powerpc/kernel/crash.c | 6 | ||||
-rw-r--r-- | arch/powerpc/kernel/paca.c | 2 | ||||
-rw-r--r-- | arch/powerpc/kernel/setup-common.c | 3 | ||||
-rw-r--r-- | arch/powerpc/platforms/pseries/setup.c | 2 | ||||
-rw-r--r-- | arch/powerpc/platforms/pseries/smp.c | 17 | ||||
-rw-r--r-- | drivers/edac/mpc85xx_edac.c | 27 |
10 files changed, 57 insertions, 38 deletions
diff --git a/arch/powerpc/boot/dts/p1020rdb.dts b/arch/powerpc/boot/dts/p1020rdb.dts index 22f64b62d7f6..e0668f877794 100644 --- a/arch/powerpc/boot/dts/p1020rdb.dts +++ b/arch/powerpc/boot/dts/p1020rdb.dts | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * P1020 RDB Device Tree Source | 2 | * P1020 RDB Device Tree Source |
3 | * | 3 | * |
4 | * Copyright 2009 Freescale Semiconductor Inc. | 4 | * Copyright 2009-2011 Freescale Semiconductor Inc. |
5 | * | 5 | * |
6 | * This program is free software; you can redistribute it and/or modify it | 6 | * This program is free software; you can redistribute it and/or modify it |
7 | * under the terms of the GNU General Public License as published by the | 7 | * under the terms of the GNU General Public License as published by the |
@@ -553,7 +553,7 @@ | |||
553 | reg = <0 0xffe09000 0 0x1000>; | 553 | reg = <0 0xffe09000 0 0x1000>; |
554 | bus-range = <0 255>; | 554 | bus-range = <0 255>; |
555 | ranges = <0x2000000 0x0 0xa0000000 0 0xa0000000 0x0 0x20000000 | 555 | ranges = <0x2000000 0x0 0xa0000000 0 0xa0000000 0x0 0x20000000 |
556 | 0x1000000 0x0 0x00000000 0 0xffc30000 0x0 0x10000>; | 556 | 0x1000000 0x0 0x00000000 0 0xffc10000 0x0 0x10000>; |
557 | clock-frequency = <33333333>; | 557 | clock-frequency = <33333333>; |
558 | interrupt-parent = <&mpic>; | 558 | interrupt-parent = <&mpic>; |
559 | interrupts = <16 2>; | 559 | interrupts = <16 2>; |
@@ -580,8 +580,8 @@ | |||
580 | #address-cells = <3>; | 580 | #address-cells = <3>; |
581 | reg = <0 0xffe0a000 0 0x1000>; | 581 | reg = <0 0xffe0a000 0 0x1000>; |
582 | bus-range = <0 255>; | 582 | bus-range = <0 255>; |
583 | ranges = <0x2000000 0x0 0xc0000000 0 0xc0000000 0x0 0x20000000 | 583 | ranges = <0x2000000 0x0 0x80000000 0 0x80000000 0x0 0x20000000 |
584 | 0x1000000 0x0 0x00000000 0 0xffc20000 0x0 0x10000>; | 584 | 0x1000000 0x0 0x00000000 0 0xffc00000 0x0 0x10000>; |
585 | clock-frequency = <33333333>; | 585 | clock-frequency = <33333333>; |
586 | interrupt-parent = <&mpic>; | 586 | interrupt-parent = <&mpic>; |
587 | interrupts = <16 2>; | 587 | interrupts = <16 2>; |
@@ -590,8 +590,8 @@ | |||
590 | #size-cells = <2>; | 590 | #size-cells = <2>; |
591 | #address-cells = <3>; | 591 | #address-cells = <3>; |
592 | device_type = "pci"; | 592 | device_type = "pci"; |
593 | ranges = <0x2000000 0x0 0xc0000000 | 593 | ranges = <0x2000000 0x0 0x80000000 |
594 | 0x2000000 0x0 0xc0000000 | 594 | 0x2000000 0x0 0x80000000 |
595 | 0x0 0x20000000 | 595 | 0x0 0x20000000 |
596 | 596 | ||
597 | 0x1000000 0x0 0x0 | 597 | 0x1000000 0x0 0x0 |
diff --git a/arch/powerpc/boot/dts/p2020rdb.dts b/arch/powerpc/boot/dts/p2020rdb.dts index da4cb0d8d215..e2d48fd4416e 100644 --- a/arch/powerpc/boot/dts/p2020rdb.dts +++ b/arch/powerpc/boot/dts/p2020rdb.dts | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * P2020 RDB Device Tree Source | 2 | * P2020 RDB Device Tree Source |
3 | * | 3 | * |
4 | * Copyright 2009 Freescale Semiconductor Inc. | 4 | * Copyright 2009-2011 Freescale Semiconductor Inc. |
5 | * | 5 | * |
6 | * This program is free software; you can redistribute it and/or modify it | 6 | * This program is free software; you can redistribute it and/or modify it |
7 | * under the terms of the GNU General Public License as published by the | 7 | * under the terms of the GNU General Public License as published by the |
@@ -537,7 +537,7 @@ | |||
537 | reg = <0 0xffe09000 0 0x1000>; | 537 | reg = <0 0xffe09000 0 0x1000>; |
538 | bus-range = <0 255>; | 538 | bus-range = <0 255>; |
539 | ranges = <0x2000000 0x0 0xa0000000 0 0xa0000000 0x0 0x20000000 | 539 | ranges = <0x2000000 0x0 0xa0000000 0 0xa0000000 0x0 0x20000000 |
540 | 0x1000000 0x0 0x00000000 0 0xffc30000 0x0 0x10000>; | 540 | 0x1000000 0x0 0x00000000 0 0xffc10000 0x0 0x10000>; |
541 | clock-frequency = <33333333>; | 541 | clock-frequency = <33333333>; |
542 | interrupt-parent = <&mpic>; | 542 | interrupt-parent = <&mpic>; |
543 | interrupts = <25 2>; | 543 | interrupts = <25 2>; |
@@ -564,8 +564,8 @@ | |||
564 | #address-cells = <3>; | 564 | #address-cells = <3>; |
565 | reg = <0 0xffe0a000 0 0x1000>; | 565 | reg = <0 0xffe0a000 0 0x1000>; |
566 | bus-range = <0 255>; | 566 | bus-range = <0 255>; |
567 | ranges = <0x2000000 0x0 0xc0000000 0 0xc0000000 0x0 0x20000000 | 567 | ranges = <0x2000000 0x0 0x80000000 0 0x80000000 0x0 0x20000000 |
568 | 0x1000000 0x0 0x00000000 0 0xffc20000 0x0 0x10000>; | 568 | 0x1000000 0x0 0x00000000 0 0xffc00000 0x0 0x10000>; |
569 | clock-frequency = <33333333>; | 569 | clock-frequency = <33333333>; |
570 | interrupt-parent = <&mpic>; | 570 | interrupt-parent = <&mpic>; |
571 | interrupts = <26 2>; | 571 | interrupts = <26 2>; |
@@ -574,8 +574,8 @@ | |||
574 | #size-cells = <2>; | 574 | #size-cells = <2>; |
575 | #address-cells = <3>; | 575 | #address-cells = <3>; |
576 | device_type = "pci"; | 576 | device_type = "pci"; |
577 | ranges = <0x2000000 0x0 0xc0000000 | 577 | ranges = <0x2000000 0x0 0x80000000 |
578 | 0x2000000 0x0 0xc0000000 | 578 | 0x2000000 0x0 0x80000000 |
579 | 0x0 0x20000000 | 579 | 0x0 0x20000000 |
580 | 580 | ||
581 | 0x1000000 0x0 0x0 | 581 | 0x1000000 0x0 0x0 |
diff --git a/arch/powerpc/boot/dts/p2020rdb_camp_core0.dts b/arch/powerpc/boot/dts/p2020rdb_camp_core0.dts index 0fe93d0c8b2e..b69c3a5dc858 100644 --- a/arch/powerpc/boot/dts/p2020rdb_camp_core0.dts +++ b/arch/powerpc/boot/dts/p2020rdb_camp_core0.dts | |||
@@ -6,7 +6,7 @@ | |||
6 | * This dts file allows core0 to have memory, l2, i2c, spi, gpio, dma1, usb, | 6 | * This dts file allows core0 to have memory, l2, i2c, spi, gpio, dma1, usb, |
7 | * eth1, eth2, sdhc, crypto, global-util, pci0. | 7 | * eth1, eth2, sdhc, crypto, global-util, pci0. |
8 | * | 8 | * |
9 | * Copyright 2009 Freescale Semiconductor Inc. | 9 | * Copyright 2009-2011 Freescale Semiconductor Inc. |
10 | * | 10 | * |
11 | * This program is free software; you can redistribute it and/or modify it | 11 | * This program is free software; you can redistribute it and/or modify it |
12 | * under the terms of the GNU General Public License as published by the | 12 | * under the terms of the GNU General Public License as published by the |
@@ -342,7 +342,7 @@ | |||
342 | reg = <0 0xffe09000 0 0x1000>; | 342 | reg = <0 0xffe09000 0 0x1000>; |
343 | bus-range = <0 255>; | 343 | bus-range = <0 255>; |
344 | ranges = <0x2000000 0x0 0xa0000000 0 0xa0000000 0x0 0x20000000 | 344 | ranges = <0x2000000 0x0 0xa0000000 0 0xa0000000 0x0 0x20000000 |
345 | 0x1000000 0x0 0x00000000 0 0xffc30000 0x0 0x10000>; | 345 | 0x1000000 0x0 0x00000000 0 0xffc10000 0x0 0x10000>; |
346 | clock-frequency = <33333333>; | 346 | clock-frequency = <33333333>; |
347 | interrupt-parent = <&mpic>; | 347 | interrupt-parent = <&mpic>; |
348 | interrupts = <25 2>; | 348 | interrupts = <25 2>; |
diff --git a/arch/powerpc/boot/dts/p2020rdb_camp_core1.dts b/arch/powerpc/boot/dts/p2020rdb_camp_core1.dts index e95a51285328..7a31d46c01b0 100644 --- a/arch/powerpc/boot/dts/p2020rdb_camp_core1.dts +++ b/arch/powerpc/boot/dts/p2020rdb_camp_core1.dts | |||
@@ -7,7 +7,7 @@ | |||
7 | * | 7 | * |
8 | * Please note to add "-b 1" for core1's dts compiling. | 8 | * Please note to add "-b 1" for core1's dts compiling. |
9 | * | 9 | * |
10 | * Copyright 2009 Freescale Semiconductor Inc. | 10 | * Copyright 2009-2011 Freescale Semiconductor Inc. |
11 | * | 11 | * |
12 | * This program is free software; you can redistribute it and/or modify it | 12 | * This program is free software; you can redistribute it and/or modify it |
13 | * under the terms of the GNU General Public License as published by the | 13 | * under the terms of the GNU General Public License as published by the |
@@ -162,8 +162,8 @@ | |||
162 | #address-cells = <3>; | 162 | #address-cells = <3>; |
163 | reg = <0 0xffe0a000 0 0x1000>; | 163 | reg = <0 0xffe0a000 0 0x1000>; |
164 | bus-range = <0 255>; | 164 | bus-range = <0 255>; |
165 | ranges = <0x2000000 0x0 0xc0000000 0 0xc0000000 0x0 0x20000000 | 165 | ranges = <0x2000000 0x0 0x80000000 0 0x80000000 0x0 0x20000000 |
166 | 0x1000000 0x0 0x00000000 0 0xffc20000 0x0 0x10000>; | 166 | 0x1000000 0x0 0x00000000 0 0xffc00000 0x0 0x10000>; |
167 | clock-frequency = <33333333>; | 167 | clock-frequency = <33333333>; |
168 | interrupt-parent = <&mpic>; | 168 | interrupt-parent = <&mpic>; |
169 | interrupts = <26 2>; | 169 | interrupts = <26 2>; |
@@ -172,8 +172,8 @@ | |||
172 | #size-cells = <2>; | 172 | #size-cells = <2>; |
173 | #address-cells = <3>; | 173 | #address-cells = <3>; |
174 | device_type = "pci"; | 174 | device_type = "pci"; |
175 | ranges = <0x2000000 0x0 0xc0000000 | 175 | ranges = <0x2000000 0x0 0x80000000 |
176 | 0x2000000 0x0 0xc0000000 | 176 | 0x2000000 0x0 0x80000000 |
177 | 0x0 0x20000000 | 177 | 0x0 0x20000000 |
178 | 178 | ||
179 | 0x1000000 0x0 0x0 | 179 | 0x1000000 0x0 0x0 |
diff --git a/arch/powerpc/kernel/crash.c b/arch/powerpc/kernel/crash.c index 3d569e2aff18..3d3d416339dd 100644 --- a/arch/powerpc/kernel/crash.c +++ b/arch/powerpc/kernel/crash.c | |||
@@ -163,7 +163,7 @@ static void crash_kexec_prepare_cpus(int cpu) | |||
163 | } | 163 | } |
164 | 164 | ||
165 | /* wait for all the CPUs to hit real mode but timeout if they don't come in */ | 165 | /* wait for all the CPUs to hit real mode but timeout if they don't come in */ |
166 | #ifdef CONFIG_PPC_STD_MMU_64 | 166 | #if defined(CONFIG_PPC_STD_MMU_64) && defined(CONFIG_SMP) |
167 | static void crash_kexec_wait_realmode(int cpu) | 167 | static void crash_kexec_wait_realmode(int cpu) |
168 | { | 168 | { |
169 | unsigned int msecs; | 169 | unsigned int msecs; |
@@ -188,6 +188,8 @@ static void crash_kexec_wait_realmode(int cpu) | |||
188 | } | 188 | } |
189 | mb(); | 189 | mb(); |
190 | } | 190 | } |
191 | #else | ||
192 | static inline void crash_kexec_wait_realmode(int cpu) {} | ||
191 | #endif | 193 | #endif |
192 | 194 | ||
193 | /* | 195 | /* |
@@ -344,9 +346,7 @@ void default_machine_crash_shutdown(struct pt_regs *regs) | |||
344 | crash_save_cpu(regs, crashing_cpu); | 346 | crash_save_cpu(regs, crashing_cpu); |
345 | crash_kexec_prepare_cpus(crashing_cpu); | 347 | crash_kexec_prepare_cpus(crashing_cpu); |
346 | cpu_set(crashing_cpu, cpus_in_crash); | 348 | cpu_set(crashing_cpu, cpus_in_crash); |
347 | #if defined(CONFIG_PPC_STD_MMU_64) && defined(CONFIG_SMP) | ||
348 | crash_kexec_wait_realmode(crashing_cpu); | 349 | crash_kexec_wait_realmode(crashing_cpu); |
349 | #endif | ||
350 | 350 | ||
351 | machine_kexec_mask_interrupts(); | 351 | machine_kexec_mask_interrupts(); |
352 | 352 | ||
diff --git a/arch/powerpc/kernel/paca.c b/arch/powerpc/kernel/paca.c index f4adf89d7614..10f0aadee95b 100644 --- a/arch/powerpc/kernel/paca.c +++ b/arch/powerpc/kernel/paca.c | |||
@@ -203,7 +203,7 @@ void __init free_unused_pacas(void) | |||
203 | { | 203 | { |
204 | int new_size; | 204 | int new_size; |
205 | 205 | ||
206 | new_size = PAGE_ALIGN(sizeof(struct paca_struct) * num_possible_cpus()); | 206 | new_size = PAGE_ALIGN(sizeof(struct paca_struct) * nr_cpu_ids); |
207 | 207 | ||
208 | if (new_size >= paca_size) | 208 | if (new_size >= paca_size) |
209 | return; | 209 | return; |
diff --git a/arch/powerpc/kernel/setup-common.c b/arch/powerpc/kernel/setup-common.c index 9d4882a46647..21f30cb68077 100644 --- a/arch/powerpc/kernel/setup-common.c +++ b/arch/powerpc/kernel/setup-common.c | |||
@@ -509,6 +509,9 @@ void __init smp_setup_cpu_maps(void) | |||
509 | */ | 509 | */ |
510 | cpu_init_thread_core_maps(nthreads); | 510 | cpu_init_thread_core_maps(nthreads); |
511 | 511 | ||
512 | /* Now that possible cpus are set, set nr_cpu_ids for later use */ | ||
513 | nr_cpu_ids = find_last_bit(cpumask_bits(cpu_possible_mask),NR_CPUS) + 1; | ||
514 | |||
512 | free_unused_pacas(); | 515 | free_unused_pacas(); |
513 | } | 516 | } |
514 | #endif /* CONFIG_SMP */ | 517 | #endif /* CONFIG_SMP */ |
diff --git a/arch/powerpc/platforms/pseries/setup.c b/arch/powerpc/platforms/pseries/setup.c index c319d04aa799..000724149089 100644 --- a/arch/powerpc/platforms/pseries/setup.c +++ b/arch/powerpc/platforms/pseries/setup.c | |||
@@ -378,7 +378,7 @@ static int __init pSeries_init_panel(void) | |||
378 | 378 | ||
379 | return 0; | 379 | return 0; |
380 | } | 380 | } |
381 | arch_initcall(pSeries_init_panel); | 381 | machine_arch_initcall(pseries, pSeries_init_panel); |
382 | 382 | ||
383 | static int pseries_set_dabr(unsigned long dabr) | 383 | static int pseries_set_dabr(unsigned long dabr) |
384 | { | 384 | { |
diff --git a/arch/powerpc/platforms/pseries/smp.c b/arch/powerpc/platforms/pseries/smp.c index d6479f9738f0..a509c5292a67 100644 --- a/arch/powerpc/platforms/pseries/smp.c +++ b/arch/powerpc/platforms/pseries/smp.c | |||
@@ -112,10 +112,10 @@ static inline int __devinit smp_startup_cpu(unsigned int lcpu) | |||
112 | 112 | ||
113 | /* Fixup atomic count: it exited inside IRQ handler. */ | 113 | /* Fixup atomic count: it exited inside IRQ handler. */ |
114 | task_thread_info(paca[lcpu].__current)->preempt_count = 0; | 114 | task_thread_info(paca[lcpu].__current)->preempt_count = 0; |
115 | 115 | #ifdef CONFIG_HOTPLUG_CPU | |
116 | if (get_cpu_current_state(lcpu) == CPU_STATE_INACTIVE) | 116 | if (get_cpu_current_state(lcpu) == CPU_STATE_INACTIVE) |
117 | goto out; | 117 | goto out; |
118 | 118 | #endif | |
119 | /* | 119 | /* |
120 | * If the RTAS start-cpu token does not exist then presume the | 120 | * If the RTAS start-cpu token does not exist then presume the |
121 | * cpu is already spinning. | 121 | * cpu is already spinning. |
@@ -130,7 +130,9 @@ static inline int __devinit smp_startup_cpu(unsigned int lcpu) | |||
130 | return 0; | 130 | return 0; |
131 | } | 131 | } |
132 | 132 | ||
133 | #ifdef CONFIG_HOTPLUG_CPU | ||
133 | out: | 134 | out: |
135 | #endif | ||
134 | return 1; | 136 | return 1; |
135 | } | 137 | } |
136 | 138 | ||
@@ -144,16 +146,15 @@ static void __devinit smp_xics_setup_cpu(int cpu) | |||
144 | vpa_init(cpu); | 146 | vpa_init(cpu); |
145 | 147 | ||
146 | cpumask_clear_cpu(cpu, of_spin_mask); | 148 | cpumask_clear_cpu(cpu, of_spin_mask); |
149 | #ifdef CONFIG_HOTPLUG_CPU | ||
147 | set_cpu_current_state(cpu, CPU_STATE_ONLINE); | 150 | set_cpu_current_state(cpu, CPU_STATE_ONLINE); |
148 | set_default_offline_state(cpu); | 151 | set_default_offline_state(cpu); |
149 | 152 | #endif | |
150 | } | 153 | } |
151 | #endif /* CONFIG_XICS */ | 154 | #endif /* CONFIG_XICS */ |
152 | 155 | ||
153 | static void __devinit smp_pSeries_kick_cpu(int nr) | 156 | static void __devinit smp_pSeries_kick_cpu(int nr) |
154 | { | 157 | { |
155 | long rc; | ||
156 | unsigned long hcpuid; | ||
157 | BUG_ON(nr < 0 || nr >= NR_CPUS); | 158 | BUG_ON(nr < 0 || nr >= NR_CPUS); |
158 | 159 | ||
159 | if (!smp_startup_cpu(nr)) | 160 | if (!smp_startup_cpu(nr)) |
@@ -165,16 +166,20 @@ static void __devinit smp_pSeries_kick_cpu(int nr) | |||
165 | * the processor will continue on to secondary_start | 166 | * the processor will continue on to secondary_start |
166 | */ | 167 | */ |
167 | paca[nr].cpu_start = 1; | 168 | paca[nr].cpu_start = 1; |
168 | 169 | #ifdef CONFIG_HOTPLUG_CPU | |
169 | set_preferred_offline_state(nr, CPU_STATE_ONLINE); | 170 | set_preferred_offline_state(nr, CPU_STATE_ONLINE); |
170 | 171 | ||
171 | if (get_cpu_current_state(nr) == CPU_STATE_INACTIVE) { | 172 | if (get_cpu_current_state(nr) == CPU_STATE_INACTIVE) { |
173 | long rc; | ||
174 | unsigned long hcpuid; | ||
175 | |||
172 | hcpuid = get_hard_smp_processor_id(nr); | 176 | hcpuid = get_hard_smp_processor_id(nr); |
173 | rc = plpar_hcall_norets(H_PROD, hcpuid); | 177 | rc = plpar_hcall_norets(H_PROD, hcpuid); |
174 | if (rc != H_SUCCESS) | 178 | if (rc != H_SUCCESS) |
175 | printk(KERN_ERR "Error: Prod to wake up processor %d " | 179 | printk(KERN_ERR "Error: Prod to wake up processor %d " |
176 | "Ret= %ld\n", nr, rc); | 180 | "Ret= %ld\n", nr, rc); |
177 | } | 181 | } |
182 | #endif | ||
178 | } | 183 | } |
179 | 184 | ||
180 | static int smp_pSeries_cpu_bootable(unsigned int nr) | 185 | static int smp_pSeries_cpu_bootable(unsigned int nr) |
diff --git a/drivers/edac/mpc85xx_edac.c b/drivers/edac/mpc85xx_edac.c index ffb5ad080bee..38ab8e2cd7f4 100644 --- a/drivers/edac/mpc85xx_edac.c +++ b/drivers/edac/mpc85xx_edac.c | |||
@@ -1147,13 +1147,14 @@ static struct platform_driver mpc85xx_mc_err_driver = { | |||
1147 | static void __init mpc85xx_mc_clear_rfxe(void *data) | 1147 | static void __init mpc85xx_mc_clear_rfxe(void *data) |
1148 | { | 1148 | { |
1149 | orig_hid1[smp_processor_id()] = mfspr(SPRN_HID1); | 1149 | orig_hid1[smp_processor_id()] = mfspr(SPRN_HID1); |
1150 | mtspr(SPRN_HID1, (orig_hid1[smp_processor_id()] & ~0x20000)); | 1150 | mtspr(SPRN_HID1, (orig_hid1[smp_processor_id()] & ~HID1_RFXE)); |
1151 | } | 1151 | } |
1152 | #endif | 1152 | #endif |
1153 | 1153 | ||
1154 | static int __init mpc85xx_mc_init(void) | 1154 | static int __init mpc85xx_mc_init(void) |
1155 | { | 1155 | { |
1156 | int res = 0; | 1156 | int res = 0; |
1157 | u32 pvr = 0; | ||
1157 | 1158 | ||
1158 | printk(KERN_INFO "Freescale(R) MPC85xx EDAC driver, " | 1159 | printk(KERN_INFO "Freescale(R) MPC85xx EDAC driver, " |
1159 | "(C) 2006 Montavista Software\n"); | 1160 | "(C) 2006 Montavista Software\n"); |
@@ -1183,12 +1184,17 @@ static int __init mpc85xx_mc_init(void) | |||
1183 | #endif | 1184 | #endif |
1184 | 1185 | ||
1185 | #ifdef CONFIG_FSL_SOC_BOOKE | 1186 | #ifdef CONFIG_FSL_SOC_BOOKE |
1186 | /* | 1187 | pvr = mfspr(SPRN_PVR); |
1187 | * need to clear HID1[RFXE] to disable machine check int | 1188 | |
1188 | * so we can catch it | 1189 | if ((PVR_VER(pvr) == PVR_VER_E500V1) || |
1189 | */ | 1190 | (PVR_VER(pvr) == PVR_VER_E500V2)) { |
1190 | if (edac_op_state == EDAC_OPSTATE_INT) | 1191 | /* |
1191 | on_each_cpu(mpc85xx_mc_clear_rfxe, NULL, 0); | 1192 | * need to clear HID1[RFXE] to disable machine check int |
1193 | * so we can catch it | ||
1194 | */ | ||
1195 | if (edac_op_state == EDAC_OPSTATE_INT) | ||
1196 | on_each_cpu(mpc85xx_mc_clear_rfxe, NULL, 0); | ||
1197 | } | ||
1192 | #endif | 1198 | #endif |
1193 | 1199 | ||
1194 | return 0; | 1200 | return 0; |
@@ -1206,7 +1212,12 @@ static void __exit mpc85xx_mc_restore_hid1(void *data) | |||
1206 | static void __exit mpc85xx_mc_exit(void) | 1212 | static void __exit mpc85xx_mc_exit(void) |
1207 | { | 1213 | { |
1208 | #ifdef CONFIG_FSL_SOC_BOOKE | 1214 | #ifdef CONFIG_FSL_SOC_BOOKE |
1209 | on_each_cpu(mpc85xx_mc_restore_hid1, NULL, 0); | 1215 | u32 pvr = mfspr(SPRN_PVR); |
1216 | |||
1217 | if ((PVR_VER(pvr) == PVR_VER_E500V1) || | ||
1218 | (PVR_VER(pvr) == PVR_VER_E500V2)) { | ||
1219 | on_each_cpu(mpc85xx_mc_restore_hid1, NULL, 0); | ||
1220 | } | ||
1210 | #endif | 1221 | #endif |
1211 | #ifdef CONFIG_PCI | 1222 | #ifdef CONFIG_PCI |
1212 | platform_driver_unregister(&mpc85xx_pci_err_driver); | 1223 | platform_driver_unregister(&mpc85xx_pci_err_driver); |