diff options
Diffstat (limited to 'arch/ia64/kernel')
-rw-r--r-- | arch/ia64/kernel/mca_drv.c | 3 | ||||
-rw-r--r-- | arch/ia64/kernel/process.c | 34 | ||||
-rw-r--r-- | arch/ia64/kernel/signal.c | 11 | ||||
-rw-r--r-- | arch/ia64/kernel/smpboot.c | 1 |
4 files changed, 27 insertions, 22 deletions
diff --git a/arch/ia64/kernel/mca_drv.c b/arch/ia64/kernel/mca_drv.c index eb860e293415..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 | ||
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/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(); |