aboutsummaryrefslogtreecommitdiffstats
path: root/arch/ia64
diff options
context:
space:
mode:
Diffstat (limited to 'arch/ia64')
-rw-r--r--arch/ia64/ia32/ia32_ioctl.c4
-rw-r--r--arch/ia64/kernel/mca_drv.c20
-rw-r--r--arch/ia64/kernel/process.c34
-rw-r--r--arch/ia64/kernel/signal.c11
-rw-r--r--arch/ia64/kernel/smpboot.c1
-rw-r--r--arch/ia64/sn/pci/pcibr/pcibr_provider.c4
-rw-r--r--arch/ia64/sn/pci/pcibr/pcibr_reg.c2
7 files changed, 44 insertions, 32 deletions
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
32typedef 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..3492e3211a44 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
@@ -546,9 +547,20 @@ recover_from_processor_error(int platform, slidx_table_t *slidx,
546 (pal_processor_state_info_t*)peidx_psp(peidx); 547 (pal_processor_state_info_t*)peidx_psp(peidx);
547 548
548 /* 549 /*
549 * We cannot recover errors with other than bus_check. 550 * Processor recovery status must key off of the PAL recovery
551 * status in the Processor State Parameter.
550 */ 552 */
551 if (psp->cc || psp->rc || psp->uc) 553
554 /*
555 * The machine check is corrected.
556 */
557 if (psp->cm == 1)
558 return 1;
559
560 /*
561 * The error was not contained. Software must be reset.
562 */
563 if (psp->us || psp->ci == 0)
552 return 0; 564 return 0;
553 565
554 /* 566 /*
@@ -569,8 +581,6 @@ recover_from_processor_error(int platform, slidx_table_t *slidx,
569 return 0; 581 return 0;
570 if (pbci->eb && pbci->bsi > 0) 582 if (pbci->eb && pbci->bsi > 0)
571 return 0; 583 return 0;
572 if (psp->ci == 0)
573 return 0;
574 584
575 /* 585 /*
576 * This is a local MCA and estimated as recoverble external bus error. 586 * This is a local MCA and estimated as recoverble external bus error.
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
197default_idle (void) 197default_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))
263cpu_idle (void) 267cpu_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/signal.c b/arch/ia64/kernel/signal.c
index 774f34b675cf..58ce07efc56e 100644
--- a/arch/ia64/kernel/signal.c
+++ b/arch/ia64/kernel/signal.c
@@ -387,15 +387,14 @@ setup_frame (int sig, struct k_sigaction *ka, siginfo_t *info, sigset_t *set,
387 struct sigscratch *scr) 387 struct sigscratch *scr)
388{ 388{
389 extern char __kernel_sigtramp[]; 389 extern char __kernel_sigtramp[];
390 unsigned long tramp_addr, new_rbs = 0; 390 unsigned long tramp_addr, new_rbs = 0, new_sp;
391 struct sigframe __user *frame; 391 struct sigframe __user *frame;
392 long err; 392 long err;
393 393
394 frame = (void __user *) scr->pt.r12; 394 new_sp = scr->pt.r12;
395 tramp_addr = (unsigned long) __kernel_sigtramp; 395 tramp_addr = (unsigned long) __kernel_sigtramp;
396 if ((ka->sa.sa_flags & SA_ONSTACK) && sas_ss_flags((unsigned long) frame) == 0) { 396 if ((ka->sa.sa_flags & SA_ONSTACK) && sas_ss_flags(new_sp) == 0) {
397 frame = (void __user *) ((current->sas_ss_sp + current->sas_ss_size) 397 new_sp = current->sas_ss_sp + current->sas_ss_size;
398 & ~(STACK_ALIGN - 1));
399 /* 398 /*
400 * We need to check for the register stack being on the signal stack 399 * We need to check for the register stack being on the signal stack
401 * separately, because it's switched separately (memory stack is switched 400 * separately, because it's switched separately (memory stack is switched
@@ -404,7 +403,7 @@ setup_frame (int sig, struct k_sigaction *ka, siginfo_t *info, sigset_t *set,
404 if (!rbs_on_sig_stack(scr->pt.ar_bspstore)) 403 if (!rbs_on_sig_stack(scr->pt.ar_bspstore))
405 new_rbs = (current->sas_ss_sp + sizeof(long) - 1) & ~(sizeof(long) - 1); 404 new_rbs = (current->sas_ss_sp + sizeof(long) - 1) & ~(sizeof(long) - 1);
406 } 405 }
407 frame = (void __user *) frame - ((sizeof(*frame) + STACK_ALIGN - 1) & ~(STACK_ALIGN - 1)); 406 frame = (void __user *) ((new_sp - sizeof(*frame)) & -STACK_ALIGN);
408 407
409 if (!access_ok(VERIFY_WRITE, frame, sizeof(*frame))) 408 if (!access_ok(VERIFY_WRITE, frame, sizeof(*frame)))
410 return force_sigsegv_info(sig, frame); 409 return force_sigsegv_info(sig, frame);
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