aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2006-04-02 15:48:36 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-04-02 15:48:36 -0400
commitf900e5824a44ab65437b4f7e7c610b72f94820c5 (patch)
tree770015a763e4c87e807e00a467a4ca602f242363 /arch/powerpc/kernel
parent23344cb341902f4e3431d8137dca93d6e186d054 (diff)
parent856d08ec46c5ecf3df13827c492fb6998fdc8322 (diff)
Merge master.kernel.org:/pub/scm/linux/kernel/git/paulus/powerpc
* master.kernel.org:/pub/scm/linux/kernel/git/paulus/powerpc: [PATCH] powerpc: iSeries needs slb_initialize to be called powerpc: hook up the splice syscall [PATCH] powerpc/cell: compile fixes [PATCH] powerpc: trivial spelling fixes in fault.c [PATCH] powerpc/pseries: EEH Cleanup [PATCH] powerpc/pseries: misc lparcfg fixes [PATCH] powerpc/pseries: fix device name printing, again. [PATCH] powerpc: Extends HCALL interface for InfiniBand usage [PATCH] powerpc/pseries: Change H_StudlyCaps to H_SHOUTING_CAPS [PATCH] powerpc/pseries: print message if EEH recovery fails [PATCH] powerpc/pseries: mutex lock to serialize EEH event processing powerpc: converted embedded platforms to use new define_machine support powerpc: merge machine_check_exception between ppc32 & ppc64
Diffstat (limited to 'arch/powerpc/kernel')
-rw-r--r--arch/powerpc/kernel/lparcfg.c31
-rw-r--r--arch/powerpc/kernel/rtas.c12
-rw-r--r--arch/powerpc/kernel/setup_32.c6
-rw-r--r--arch/powerpc/kernel/setup_64.c10
-rw-r--r--arch/powerpc/kernel/traps.c9
5 files changed, 29 insertions, 39 deletions
diff --git a/arch/powerpc/kernel/lparcfg.c b/arch/powerpc/kernel/lparcfg.c
index 1b73508ecb2b..2cbde865d4f5 100644
--- a/arch/powerpc/kernel/lparcfg.c
+++ b/arch/powerpc/kernel/lparcfg.c
@@ -37,7 +37,7 @@
37#include <asm/prom.h> 37#include <asm/prom.h>
38#include <asm/vdso_datapage.h> 38#include <asm/vdso_datapage.h>
39 39
40#define MODULE_VERS "1.6" 40#define MODULE_VERS "1.7"
41#define MODULE_NAME "lparcfg" 41#define MODULE_NAME "lparcfg"
42 42
43/* #define LPARCFG_DEBUG */ 43/* #define LPARCFG_DEBUG */
@@ -149,17 +149,17 @@ static void log_plpar_hcall_return(unsigned long rc, char *tag)
149 if (rc == 0) /* success, return */ 149 if (rc == 0) /* success, return */
150 return; 150 return;
151/* check for null tag ? */ 151/* check for null tag ? */
152 if (rc == H_Hardware) 152 if (rc == H_HARDWARE)
153 printk(KERN_INFO 153 printk(KERN_INFO
154 "plpar-hcall (%s) failed with hardware fault\n", tag); 154 "plpar-hcall (%s) failed with hardware fault\n", tag);
155 else if (rc == H_Function) 155 else if (rc == H_FUNCTION)
156 printk(KERN_INFO 156 printk(KERN_INFO
157 "plpar-hcall (%s) failed; function not allowed\n", tag); 157 "plpar-hcall (%s) failed; function not allowed\n", tag);
158 else if (rc == H_Authority) 158 else if (rc == H_AUTHORITY)
159 printk(KERN_INFO 159 printk(KERN_INFO
160 "plpar-hcall (%s) failed; not authorized to this function\n", 160 "plpar-hcall (%s) failed; not authorized to this"
161 tag); 161 " function\n", tag);
162 else if (rc == H_Parameter) 162 else if (rc == H_PARAMETER)
163 printk(KERN_INFO "plpar-hcall (%s) failed; Bad parameter(s)\n", 163 printk(KERN_INFO "plpar-hcall (%s) failed; Bad parameter(s)\n",
164 tag); 164 tag);
165 else 165 else
@@ -209,7 +209,7 @@ static void h_pic(unsigned long *pool_idle_time, unsigned long *num_procs)
209 unsigned long dummy; 209 unsigned long dummy;
210 rc = plpar_hcall(H_PIC, 0, 0, 0, 0, pool_idle_time, num_procs, &dummy); 210 rc = plpar_hcall(H_PIC, 0, 0, 0, 0, pool_idle_time, num_procs, &dummy);
211 211
212 if (rc != H_Authority) 212 if (rc != H_AUTHORITY)
213 log_plpar_hcall_return(rc, "H_PIC"); 213 log_plpar_hcall_return(rc, "H_PIC");
214} 214}
215 215
@@ -242,7 +242,7 @@ static void parse_system_parameter_string(struct seq_file *m)
242{ 242{
243 int call_status; 243 int call_status;
244 244
245 char *local_buffer = kmalloc(SPLPAR_MAXLENGTH, GFP_KERNEL); 245 unsigned char *local_buffer = kmalloc(SPLPAR_MAXLENGTH, GFP_KERNEL);
246 if (!local_buffer) { 246 if (!local_buffer) {
247 printk(KERN_ERR "%s %s kmalloc failure at line %d \n", 247 printk(KERN_ERR "%s %s kmalloc failure at line %d \n",
248 __FILE__, __FUNCTION__, __LINE__); 248 __FILE__, __FUNCTION__, __LINE__);
@@ -254,7 +254,8 @@ static void parse_system_parameter_string(struct seq_file *m)
254 call_status = rtas_call(rtas_token("ibm,get-system-parameter"), 3, 1, 254 call_status = rtas_call(rtas_token("ibm,get-system-parameter"), 3, 1,
255 NULL, 255 NULL,
256 SPLPAR_CHARACTERISTICS_TOKEN, 256 SPLPAR_CHARACTERISTICS_TOKEN,
257 __pa(rtas_data_buf)); 257 __pa(rtas_data_buf),
258 RTAS_DATA_BUF_SIZE);
258 memcpy(local_buffer, rtas_data_buf, SPLPAR_MAXLENGTH); 259 memcpy(local_buffer, rtas_data_buf, SPLPAR_MAXLENGTH);
259 spin_unlock(&rtas_data_buf_lock); 260 spin_unlock(&rtas_data_buf_lock);
260 261
@@ -275,7 +276,7 @@ static void parse_system_parameter_string(struct seq_file *m)
275#ifdef LPARCFG_DEBUG 276#ifdef LPARCFG_DEBUG
276 printk(KERN_INFO "success calling get-system-parameter \n"); 277 printk(KERN_INFO "success calling get-system-parameter \n");
277#endif 278#endif
278 splpar_strlen = local_buffer[0] * 16 + local_buffer[1]; 279 splpar_strlen = local_buffer[0] * 256 + local_buffer[1];
279 local_buffer += 2; /* step over strlen value */ 280 local_buffer += 2; /* step over strlen value */
280 281
281 memset(workbuffer, 0, SPLPAR_MAXLENGTH); 282 memset(workbuffer, 0, SPLPAR_MAXLENGTH);
@@ -529,13 +530,13 @@ static ssize_t lparcfg_write(struct file *file, const char __user * buf,
529 retval = plpar_hcall_norets(H_SET_PPP, *new_entitled_ptr, 530 retval = plpar_hcall_norets(H_SET_PPP, *new_entitled_ptr,
530 *new_weight_ptr); 531 *new_weight_ptr);
531 532
532 if (retval == H_Success || retval == H_Constrained) { 533 if (retval == H_SUCCESS || retval == H_CONSTRAINED) {
533 retval = count; 534 retval = count;
534 } else if (retval == H_Busy) { 535 } else if (retval == H_BUSY) {
535 retval = -EBUSY; 536 retval = -EBUSY;
536 } else if (retval == H_Hardware) { 537 } else if (retval == H_HARDWARE) {
537 retval = -EIO; 538 retval = -EIO;
538 } else if (retval == H_Parameter) { 539 } else if (retval == H_PARAMETER) {
539 retval = -EINVAL; 540 retval = -EINVAL;
540 } else { 541 } else {
541 printk(KERN_WARNING "%s: received unknown hv return code %ld", 542 printk(KERN_WARNING "%s: received unknown hv return code %ld",
diff --git a/arch/powerpc/kernel/rtas.c b/arch/powerpc/kernel/rtas.c
index 06636c927a7e..0112318213ab 100644
--- a/arch/powerpc/kernel/rtas.c
+++ b/arch/powerpc/kernel/rtas.c
@@ -578,18 +578,18 @@ static void rtas_percpu_suspend_me(void *info)
578 * We use "waiting" to indicate our state. As long 578 * We use "waiting" to indicate our state. As long
579 * as it is >0, we are still trying to all join up. 579 * as it is >0, we are still trying to all join up.
580 * If it goes to 0, we have successfully joined up and 580 * If it goes to 0, we have successfully joined up and
581 * one thread got H_Continue. If any error happens, 581 * one thread got H_CONTINUE. If any error happens,
582 * we set it to <0. 582 * we set it to <0.
583 */ 583 */
584 local_irq_save(flags); 584 local_irq_save(flags);
585 do { 585 do {
586 rc = plpar_hcall_norets(H_JOIN); 586 rc = plpar_hcall_norets(H_JOIN);
587 smp_rmb(); 587 smp_rmb();
588 } while (rc == H_Success && data->waiting > 0); 588 } while (rc == H_SUCCESS && data->waiting > 0);
589 if (rc == H_Success) 589 if (rc == H_SUCCESS)
590 goto out; 590 goto out;
591 591
592 if (rc == H_Continue) { 592 if (rc == H_CONTINUE) {
593 data->waiting = 0; 593 data->waiting = 0;
594 data->args->args[data->args->nargs] = 594 data->args->args[data->args->nargs] =
595 rtas_call(ibm_suspend_me_token, 0, 1, NULL); 595 rtas_call(ibm_suspend_me_token, 0, 1, NULL);
@@ -597,7 +597,7 @@ static void rtas_percpu_suspend_me(void *info)
597 plpar_hcall_norets(H_PROD,i); 597 plpar_hcall_norets(H_PROD,i);
598 } else { 598 } else {
599 data->waiting = -EBUSY; 599 data->waiting = -EBUSY;
600 printk(KERN_ERR "Error on H_Join hypervisor call\n"); 600 printk(KERN_ERR "Error on H_JOIN hypervisor call\n");
601 } 601 }
602 602
603out: 603out:
@@ -624,7 +624,7 @@ static int rtas_ibm_suspend_me(struct rtas_args *args)
624 printk(KERN_ERR "Error doing global join\n"); 624 printk(KERN_ERR "Error doing global join\n");
625 625
626 /* Prod each CPU. This won't hurt, and will wake 626 /* Prod each CPU. This won't hurt, and will wake
627 * anyone we successfully put to sleep with H_Join 627 * anyone we successfully put to sleep with H_JOIN.
628 */ 628 */
629 for_each_possible_cpu(i) 629 for_each_possible_cpu(i)
630 plpar_hcall_norets(H_PROD, i); 630 plpar_hcall_norets(H_PROD, i);
diff --git a/arch/powerpc/kernel/setup_32.c b/arch/powerpc/kernel/setup_32.c
index a72bf5dceeee..69ac25701344 100644
--- a/arch/powerpc/kernel/setup_32.c
+++ b/arch/powerpc/kernel/setup_32.c
@@ -50,7 +50,6 @@
50#include <asm/kgdb.h> 50#include <asm/kgdb.h>
51#endif 51#endif
52 52
53extern void platform_init(void);
54extern void bootx_init(unsigned long r4, unsigned long phys); 53extern void bootx_init(unsigned long r4, unsigned long phys);
55 54
56boot_infos_t *boot_infos; 55boot_infos_t *boot_infos;
@@ -138,12 +137,7 @@ void __init machine_init(unsigned long dt_ptr, unsigned long phys)
138 strlcpy(cmd_line, CONFIG_CMDLINE, sizeof(cmd_line)); 137 strlcpy(cmd_line, CONFIG_CMDLINE, sizeof(cmd_line));
139#endif /* CONFIG_CMDLINE */ 138#endif /* CONFIG_CMDLINE */
140 139
141#ifdef CONFIG_PPC_MULTIPLATFORM
142 probe_machine(); 140 probe_machine();
143#else
144 /* Base init based on machine type. Obsoloete, please kill ! */
145 platform_init();
146#endif
147 141
148#ifdef CONFIG_6xx 142#ifdef CONFIG_6xx
149 if (cpu_has_feature(CPU_FTR_CAN_DOZE) || 143 if (cpu_has_feature(CPU_FTR_CAN_DOZE) ||
diff --git a/arch/powerpc/kernel/setup_64.c b/arch/powerpc/kernel/setup_64.c
index 59aa92cd6fa4..13e91c4d70a8 100644
--- a/arch/powerpc/kernel/setup_64.c
+++ b/arch/powerpc/kernel/setup_64.c
@@ -215,12 +215,10 @@ void __init early_setup(unsigned long dt_ptr)
215 /* 215 /*
216 * Initialize stab / SLB management except on iSeries 216 * Initialize stab / SLB management except on iSeries
217 */ 217 */
218 if (!firmware_has_feature(FW_FEATURE_ISERIES)) { 218 if (cpu_has_feature(CPU_FTR_SLB))
219 if (cpu_has_feature(CPU_FTR_SLB)) 219 slb_initialize();
220 slb_initialize(); 220 else if (!firmware_has_feature(FW_FEATURE_ISERIES))
221 else 221 stab_initialize(get_paca()->stab_real);
222 stab_initialize(get_paca()->stab_real);
223 }
224 222
225 DBG(" <- early_setup()\n"); 223 DBG(" <- early_setup()\n");
226} 224}
diff --git a/arch/powerpc/kernel/traps.c b/arch/powerpc/kernel/traps.c
index 4cbde211eb69..064a52564692 100644
--- a/arch/powerpc/kernel/traps.c
+++ b/arch/powerpc/kernel/traps.c
@@ -228,7 +228,7 @@ void system_reset_exception(struct pt_regs *regs)
228 */ 228 */
229static inline int check_io_access(struct pt_regs *regs) 229static inline int check_io_access(struct pt_regs *regs)
230{ 230{
231#ifdef CONFIG_PPC_PMAC 231#if defined(CONFIG_PPC_PMAC) && defined(CONFIG_PPC32)
232 unsigned long msr = regs->msr; 232 unsigned long msr = regs->msr;
233 const struct exception_table_entry *entry; 233 const struct exception_table_entry *entry;
234 unsigned int *nip = (unsigned int *)regs->nip; 234 unsigned int *nip = (unsigned int *)regs->nip;
@@ -261,7 +261,7 @@ static inline int check_io_access(struct pt_regs *regs)
261 return 1; 261 return 1;
262 } 262 }
263 } 263 }
264#endif /* CONFIG_PPC_PMAC */ 264#endif /* CONFIG_PPC_PMAC && CONFIG_PPC32 */
265 return 0; 265 return 0;
266} 266}
267 267
@@ -308,8 +308,8 @@ platform_machine_check(struct pt_regs *regs)
308 308
309void machine_check_exception(struct pt_regs *regs) 309void machine_check_exception(struct pt_regs *regs)
310{ 310{
311#ifdef CONFIG_PPC64
312 int recover = 0; 311 int recover = 0;
312 unsigned long reason = get_mc_reason(regs);
313 313
314 /* See if any machine dependent calls */ 314 /* See if any machine dependent calls */
315 if (ppc_md.machine_check_exception) 315 if (ppc_md.machine_check_exception)
@@ -317,8 +317,6 @@ void machine_check_exception(struct pt_regs *regs)
317 317
318 if (recover) 318 if (recover)
319 return; 319 return;
320#else
321 unsigned long reason = get_mc_reason(regs);
322 320
323 if (user_mode(regs)) { 321 if (user_mode(regs)) {
324 regs->msr |= MSR_RI; 322 regs->msr |= MSR_RI;
@@ -462,7 +460,6 @@ void machine_check_exception(struct pt_regs *regs)
462 * additional info, e.g. bus error registers. 460 * additional info, e.g. bus error registers.
463 */ 461 */
464 platform_machine_check(regs); 462 platform_machine_check(regs);
465#endif /* CONFIG_PPC64 */
466 463
467 if (debugger_fault_handler(regs)) 464 if (debugger_fault_handler(regs))
468 return; 465 return;