aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/platforms/pseries
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/platforms/pseries')
-rw-r--r--arch/powerpc/platforms/pseries/dtl.c2
-rw-r--r--arch/powerpc/platforms/pseries/eeh.c2
-rw-r--r--arch/powerpc/platforms/pseries/eeh_cache.c2
-rw-r--r--arch/powerpc/platforms/pseries/hotplug-cpu.c4
-rw-r--r--arch/powerpc/platforms/pseries/io_event_irq.c8
-rw-r--r--arch/powerpc/platforms/pseries/kexec.c34
-rw-r--r--arch/powerpc/platforms/pseries/lpar.c19
-rw-r--r--arch/powerpc/platforms/pseries/plpar_wrappers.h12
-rw-r--r--arch/powerpc/platforms/pseries/setup.c5
-rw-r--r--arch/powerpc/platforms/pseries/smp.c2
10 files changed, 49 insertions, 41 deletions
diff --git a/arch/powerpc/platforms/pseries/dtl.c b/arch/powerpc/platforms/pseries/dtl.c
index e9190073bb9..0e865637006 100644
--- a/arch/powerpc/platforms/pseries/dtl.c
+++ b/arch/powerpc/platforms/pseries/dtl.c
@@ -181,7 +181,7 @@ static void dtl_stop(struct dtl *dtl)
181 181
182 lppaca_of(dtl->cpu).dtl_enable_mask = 0x0; 182 lppaca_of(dtl->cpu).dtl_enable_mask = 0x0;
183 183
184 unregister_dtl(hwcpu, __pa(dtl->buf)); 184 unregister_dtl(hwcpu);
185} 185}
186 186
187static u64 dtl_current_index(struct dtl *dtl) 187static u64 dtl_current_index(struct dtl *dtl)
diff --git a/arch/powerpc/platforms/pseries/eeh.c b/arch/powerpc/platforms/pseries/eeh.c
index 46b55cf563e..ada6e07532e 100644
--- a/arch/powerpc/platforms/pseries/eeh.c
+++ b/arch/powerpc/platforms/pseries/eeh.c
@@ -31,7 +31,7 @@
31#include <linux/spinlock.h> 31#include <linux/spinlock.h>
32#include <linux/of.h> 32#include <linux/of.h>
33 33
34#include <asm/atomic.h> 34#include <linux/atomic.h>
35#include <asm/eeh.h> 35#include <asm/eeh.h>
36#include <asm/eeh_event.h> 36#include <asm/eeh_event.h>
37#include <asm/io.h> 37#include <asm/io.h>
diff --git a/arch/powerpc/platforms/pseries/eeh_cache.c b/arch/powerpc/platforms/pseries/eeh_cache.c
index 8ed0d2d0e1b..fc5ae767989 100644
--- a/arch/powerpc/platforms/pseries/eeh_cache.c
+++ b/arch/powerpc/platforms/pseries/eeh_cache.c
@@ -25,7 +25,7 @@
25#include <linux/rbtree.h> 25#include <linux/rbtree.h>
26#include <linux/slab.h> 26#include <linux/slab.h>
27#include <linux/spinlock.h> 27#include <linux/spinlock.h>
28#include <asm/atomic.h> 28#include <linux/atomic.h>
29#include <asm/pci-bridge.h> 29#include <asm/pci-bridge.h>
30#include <asm/ppc-pci.h> 30#include <asm/ppc-pci.h>
31 31
diff --git a/arch/powerpc/platforms/pseries/hotplug-cpu.c b/arch/powerpc/platforms/pseries/hotplug-cpu.c
index bc0288501f1..83a3ca2fd28 100644
--- a/arch/powerpc/platforms/pseries/hotplug-cpu.c
+++ b/arch/powerpc/platforms/pseries/hotplug-cpu.c
@@ -135,7 +135,7 @@ static void pseries_mach_cpu_die(void)
135 get_lppaca()->idle = 0; 135 get_lppaca()->idle = 0;
136 136
137 if (get_preferred_offline_state(cpu) == CPU_STATE_ONLINE) { 137 if (get_preferred_offline_state(cpu) == CPU_STATE_ONLINE) {
138 unregister_slb_shadow(hwcpu, __pa(get_slb_shadow())); 138 unregister_slb_shadow(hwcpu);
139 139
140 /* 140 /*
141 * Call to start_secondary_resume() will not return. 141 * Call to start_secondary_resume() will not return.
@@ -150,7 +150,7 @@ static void pseries_mach_cpu_die(void)
150 WARN_ON(get_preferred_offline_state(cpu) != CPU_STATE_OFFLINE); 150 WARN_ON(get_preferred_offline_state(cpu) != CPU_STATE_OFFLINE);
151 151
152 set_cpu_current_state(cpu, CPU_STATE_OFFLINE); 152 set_cpu_current_state(cpu, CPU_STATE_OFFLINE);
153 unregister_slb_shadow(hwcpu, __pa(get_slb_shadow())); 153 unregister_slb_shadow(hwcpu);
154 rtas_stop_self(); 154 rtas_stop_self();
155 155
156 /* Should never get here... */ 156 /* Should never get here... */
diff --git a/arch/powerpc/platforms/pseries/io_event_irq.c b/arch/powerpc/platforms/pseries/io_event_irq.c
index c829e6067d5..2c4dd1fb833 100644
--- a/arch/powerpc/platforms/pseries/io_event_irq.c
+++ b/arch/powerpc/platforms/pseries/io_event_irq.c
@@ -212,17 +212,15 @@ static int __init ioei_init(void)
212 struct device_node *np; 212 struct device_node *np;
213 213
214 ioei_check_exception_token = rtas_token("check-exception"); 214 ioei_check_exception_token = rtas_token("check-exception");
215 if (ioei_check_exception_token == RTAS_UNKNOWN_SERVICE) { 215 if (ioei_check_exception_token == RTAS_UNKNOWN_SERVICE)
216 pr_warning("IO Event IRQ not supported on this system !\n");
217 return -ENODEV; 216 return -ENODEV;
218 } 217
219 np = of_find_node_by_path("/event-sources/ibm,io-events"); 218 np = of_find_node_by_path("/event-sources/ibm,io-events");
220 if (np) { 219 if (np) {
221 request_event_sources_irqs(np, ioei_interrupt, "IO_EVENT"); 220 request_event_sources_irqs(np, ioei_interrupt, "IO_EVENT");
221 pr_info("IBM I/O event interrupts enabled\n");
222 of_node_put(np); 222 of_node_put(np);
223 } else { 223 } else {
224 pr_err("io_event_irq: No ibm,io-events on system! "
225 "IO Event interrupt disabled.\n");
226 return -ENODEV; 224 return -ENODEV;
227 } 225 }
228 return 0; 226 return 0;
diff --git a/arch/powerpc/platforms/pseries/kexec.c b/arch/powerpc/platforms/pseries/kexec.c
index 54cf3a4aa16..7d94bdc63d5 100644
--- a/arch/powerpc/platforms/pseries/kexec.c
+++ b/arch/powerpc/platforms/pseries/kexec.c
@@ -25,20 +25,30 @@ static void pseries_kexec_cpu_down(int crash_shutdown, int secondary)
25{ 25{
26 /* Don't risk a hypervisor call if we're crashing */ 26 /* Don't risk a hypervisor call if we're crashing */
27 if (firmware_has_feature(FW_FEATURE_SPLPAR) && !crash_shutdown) { 27 if (firmware_has_feature(FW_FEATURE_SPLPAR) && !crash_shutdown) {
28 unsigned long addr; 28 int ret;
29 int cpu = smp_processor_id();
30 int hwcpu = hard_smp_processor_id();
29 31
30 addr = __pa(get_slb_shadow()); 32 if (get_lppaca()->dtl_enable_mask) {
31 if (unregister_slb_shadow(hard_smp_processor_id(), addr)) 33 ret = unregister_dtl(hwcpu);
32 printk("SLB shadow buffer deregistration of " 34 if (ret) {
33 "cpu %u (hw_cpu_id %d) failed\n", 35 pr_err("WARNING: DTL deregistration for cpu "
34 smp_processor_id(), 36 "%d (hw %d) failed with %d\n",
35 hard_smp_processor_id()); 37 cpu, hwcpu, ret);
38 }
39 }
40
41 ret = unregister_slb_shadow(hwcpu);
42 if (ret) {
43 pr_err("WARNING: SLB shadow buffer deregistration "
44 "for cpu %d (hw %d) failed with %d\n",
45 cpu, hwcpu, ret);
46 }
36 47
37 addr = __pa(get_lppaca()); 48 ret = unregister_vpa(hwcpu);
38 if (unregister_vpa(hard_smp_processor_id(), addr)) { 49 if (ret) {
39 printk("VPA deregistration of cpu %u (hw_cpu_id %d) " 50 pr_err("WARNING: VPA deregistration for cpu %d "
40 "failed\n", smp_processor_id(), 51 "(hw %d) failed with %d\n", cpu, hwcpu, ret);
41 hard_smp_processor_id());
42 } 52 }
43 } 53 }
44} 54}
diff --git a/arch/powerpc/platforms/pseries/lpar.c b/arch/powerpc/platforms/pseries/lpar.c
index f7205d344ef..c9a29dae8c0 100644
--- a/arch/powerpc/platforms/pseries/lpar.c
+++ b/arch/powerpc/platforms/pseries/lpar.c
@@ -67,9 +67,8 @@ void vpa_init(int cpu)
67 ret = register_vpa(hwcpu, addr); 67 ret = register_vpa(hwcpu, addr);
68 68
69 if (ret) { 69 if (ret) {
70 printk(KERN_ERR "WARNING: vpa_init: VPA registration for " 70 pr_err("WARNING: VPA registration for cpu %d (hw %d) of area "
71 "cpu %d (hw %d) of area %lx returns %ld\n", 71 "%lx failed with %ld\n", cpu, hwcpu, addr, ret);
72 cpu, hwcpu, addr, ret);
73 return; 72 return;
74 } 73 }
75 /* 74 /*
@@ -80,10 +79,9 @@ void vpa_init(int cpu)
80 if (firmware_has_feature(FW_FEATURE_SPLPAR)) { 79 if (firmware_has_feature(FW_FEATURE_SPLPAR)) {
81 ret = register_slb_shadow(hwcpu, addr); 80 ret = register_slb_shadow(hwcpu, addr);
82 if (ret) 81 if (ret)
83 printk(KERN_ERR 82 pr_err("WARNING: SLB shadow buffer registration for "
84 "WARNING: vpa_init: SLB shadow buffer " 83 "cpu %d (hw %d) of area %lx failed with %ld\n",
85 "registration for cpu %d (hw %d) of area %lx " 84 cpu, hwcpu, addr, ret);
86 "returns %ld\n", cpu, hwcpu, addr, ret);
87 } 85 }
88 86
89 /* 87 /*
@@ -100,8 +98,9 @@ void vpa_init(int cpu)
100 dtl->enqueue_to_dispatch_time = DISPATCH_LOG_BYTES; 98 dtl->enqueue_to_dispatch_time = DISPATCH_LOG_BYTES;
101 ret = register_dtl(hwcpu, __pa(dtl)); 99 ret = register_dtl(hwcpu, __pa(dtl));
102 if (ret) 100 if (ret)
103 pr_warn("DTL registration failed for cpu %d (%ld)\n", 101 pr_err("WARNING: DTL registration of cpu %d (hw %d) "
104 cpu, ret); 102 "failed with %ld\n", smp_processor_id(),
103 hwcpu, ret);
105 lppaca_of(cpu).dtl_enable_mask = 2; 104 lppaca_of(cpu).dtl_enable_mask = 2;
106 } 105 }
107} 106}
@@ -204,7 +203,7 @@ static void pSeries_lpar_hptab_clear(void)
204 unsigned long ptel; 203 unsigned long ptel;
205 } ptes[4]; 204 } ptes[4];
206 long lpar_rc; 205 long lpar_rc;
207 int i, j; 206 unsigned long i, j;
208 207
209 /* Read in batches of 4, 208 /* Read in batches of 4,
210 * invalidate only valid entries not in the VRMA 209 * invalidate only valid entries not in the VRMA
diff --git a/arch/powerpc/platforms/pseries/plpar_wrappers.h b/arch/powerpc/platforms/pseries/plpar_wrappers.h
index 4bf21207d7d..41c24c146d6 100644
--- a/arch/powerpc/platforms/pseries/plpar_wrappers.h
+++ b/arch/powerpc/platforms/pseries/plpar_wrappers.h
@@ -53,9 +53,9 @@ static inline long vpa_call(unsigned long flags, unsigned long cpu,
53 return plpar_hcall_norets(H_REGISTER_VPA, flags, cpu, vpa); 53 return plpar_hcall_norets(H_REGISTER_VPA, flags, cpu, vpa);
54} 54}
55 55
56static inline long unregister_vpa(unsigned long cpu, unsigned long vpa) 56static inline long unregister_vpa(unsigned long cpu)
57{ 57{
58 return vpa_call(0x5, cpu, vpa); 58 return vpa_call(0x5, cpu, 0);
59} 59}
60 60
61static inline long register_vpa(unsigned long cpu, unsigned long vpa) 61static inline long register_vpa(unsigned long cpu, unsigned long vpa)
@@ -63,9 +63,9 @@ static inline long register_vpa(unsigned long cpu, unsigned long vpa)
63 return vpa_call(0x1, cpu, vpa); 63 return vpa_call(0x1, cpu, vpa);
64} 64}
65 65
66static inline long unregister_slb_shadow(unsigned long cpu, unsigned long vpa) 66static inline long unregister_slb_shadow(unsigned long cpu)
67{ 67{
68 return vpa_call(0x7, cpu, vpa); 68 return vpa_call(0x7, cpu, 0);
69} 69}
70 70
71static inline long register_slb_shadow(unsigned long cpu, unsigned long vpa) 71static inline long register_slb_shadow(unsigned long cpu, unsigned long vpa)
@@ -73,9 +73,9 @@ static inline long register_slb_shadow(unsigned long cpu, unsigned long vpa)
73 return vpa_call(0x3, cpu, vpa); 73 return vpa_call(0x3, cpu, vpa);
74} 74}
75 75
76static inline long unregister_dtl(unsigned long cpu, unsigned long vpa) 76static inline long unregister_dtl(unsigned long cpu)
77{ 77{
78 return vpa_call(0x6, cpu, vpa); 78 return vpa_call(0x6, cpu, 0);
79} 79}
80 80
81static inline long register_dtl(unsigned long cpu, unsigned long vpa) 81static inline long register_dtl(unsigned long cpu, unsigned long vpa)
diff --git a/arch/powerpc/platforms/pseries/setup.c b/arch/powerpc/platforms/pseries/setup.c
index d00e52926b7..0969fd98c4f 100644
--- a/arch/powerpc/platforms/pseries/setup.c
+++ b/arch/powerpc/platforms/pseries/setup.c
@@ -324,8 +324,9 @@ static int alloc_dispatch_logs(void)
324 dtl->enqueue_to_dispatch_time = DISPATCH_LOG_BYTES; 324 dtl->enqueue_to_dispatch_time = DISPATCH_LOG_BYTES;
325 ret = register_dtl(hard_smp_processor_id(), __pa(dtl)); 325 ret = register_dtl(hard_smp_processor_id(), __pa(dtl));
326 if (ret) 326 if (ret)
327 pr_warn("DTL registration failed for boot cpu %d (%d)\n", 327 pr_err("WARNING: DTL registration of cpu %d (hw %d) failed "
328 smp_processor_id(), ret); 328 "with %d\n", smp_processor_id(),
329 hard_smp_processor_id(), ret);
329 get_paca()->lppaca_ptr->dtl_enable_mask = 2; 330 get_paca()->lppaca_ptr->dtl_enable_mask = 2;
330 331
331 return 0; 332 return 0;
diff --git a/arch/powerpc/platforms/pseries/smp.c b/arch/powerpc/platforms/pseries/smp.c
index 1672db2d1b0..4e44c4dcd11 100644
--- a/arch/powerpc/platforms/pseries/smp.c
+++ b/arch/powerpc/platforms/pseries/smp.c
@@ -27,7 +27,7 @@
27#include <linux/cpu.h> 27#include <linux/cpu.h>
28 28
29#include <asm/ptrace.h> 29#include <asm/ptrace.h>
30#include <asm/atomic.h> 30#include <linux/atomic.h>
31#include <asm/irq.h> 31#include <asm/irq.h>
32#include <asm/page.h> 32#include <asm/page.h>
33#include <asm/pgtable.h> 33#include <asm/pgtable.h>