diff options
Diffstat (limited to 'arch/s390/kernel')
-rw-r--r-- | arch/s390/kernel/dumpstack.c | 12 | ||||
-rw-r--r-- | arch/s390/kernel/irq.c | 64 | ||||
-rw-r--r-- | arch/s390/kernel/sclp.S | 2 | ||||
-rw-r--r-- | arch/s390/kernel/smp.c | 27 |
4 files changed, 84 insertions, 21 deletions
diff --git a/arch/s390/kernel/dumpstack.c b/arch/s390/kernel/dumpstack.c index 298297477257..87acc38f73c6 100644 --- a/arch/s390/kernel/dumpstack.c +++ b/arch/s390/kernel/dumpstack.c | |||
@@ -74,6 +74,8 @@ __show_trace(unsigned long sp, unsigned long low, unsigned long high) | |||
74 | 74 | ||
75 | static void show_trace(struct task_struct *task, unsigned long *stack) | 75 | static void show_trace(struct task_struct *task, unsigned long *stack) |
76 | { | 76 | { |
77 | const unsigned long frame_size = | ||
78 | STACK_FRAME_OVERHEAD + sizeof(struct pt_regs); | ||
77 | register unsigned long __r15 asm ("15"); | 79 | register unsigned long __r15 asm ("15"); |
78 | unsigned long sp; | 80 | unsigned long sp; |
79 | 81 | ||
@@ -82,11 +84,13 @@ static void show_trace(struct task_struct *task, unsigned long *stack) | |||
82 | sp = task ? task->thread.ksp : __r15; | 84 | sp = task ? task->thread.ksp : __r15; |
83 | printk("Call Trace:\n"); | 85 | printk("Call Trace:\n"); |
84 | #ifdef CONFIG_CHECK_STACK | 86 | #ifdef CONFIG_CHECK_STACK |
85 | sp = __show_trace(sp, S390_lowcore.panic_stack - 4096, | 87 | sp = __show_trace(sp, |
86 | S390_lowcore.panic_stack); | 88 | S390_lowcore.panic_stack + frame_size - 4096, |
89 | S390_lowcore.panic_stack + frame_size); | ||
87 | #endif | 90 | #endif |
88 | sp = __show_trace(sp, S390_lowcore.async_stack - ASYNC_SIZE, | 91 | sp = __show_trace(sp, |
89 | S390_lowcore.async_stack); | 92 | S390_lowcore.async_stack + frame_size - ASYNC_SIZE, |
93 | S390_lowcore.async_stack + frame_size); | ||
90 | if (task) | 94 | if (task) |
91 | __show_trace(sp, (unsigned long) task_stack_page(task), | 95 | __show_trace(sp, (unsigned long) task_stack_page(task), |
92 | (unsigned long) task_stack_page(task) + THREAD_SIZE); | 96 | (unsigned long) task_stack_page(task) + THREAD_SIZE); |
diff --git a/arch/s390/kernel/irq.c b/arch/s390/kernel/irq.c index f7fb58903f6a..408e866ae548 100644 --- a/arch/s390/kernel/irq.c +++ b/arch/s390/kernel/irq.c | |||
@@ -311,3 +311,67 @@ void measurement_alert_subclass_unregister(void) | |||
311 | spin_unlock(&ma_subclass_lock); | 311 | spin_unlock(&ma_subclass_lock); |
312 | } | 312 | } |
313 | EXPORT_SYMBOL(measurement_alert_subclass_unregister); | 313 | EXPORT_SYMBOL(measurement_alert_subclass_unregister); |
314 | |||
315 | void synchronize_irq(unsigned int irq) | ||
316 | { | ||
317 | /* | ||
318 | * Not needed, the handler is protected by a lock and IRQs that occur | ||
319 | * after the handler is deleted are just NOPs. | ||
320 | */ | ||
321 | } | ||
322 | EXPORT_SYMBOL_GPL(synchronize_irq); | ||
323 | |||
324 | #ifndef CONFIG_PCI | ||
325 | |||
326 | /* Only PCI devices have dynamically-defined IRQ handlers */ | ||
327 | |||
328 | int request_irq(unsigned int irq, irq_handler_t handler, | ||
329 | unsigned long irqflags, const char *devname, void *dev_id) | ||
330 | { | ||
331 | return -EINVAL; | ||
332 | } | ||
333 | EXPORT_SYMBOL_GPL(request_irq); | ||
334 | |||
335 | void free_irq(unsigned int irq, void *dev_id) | ||
336 | { | ||
337 | WARN_ON(1); | ||
338 | } | ||
339 | EXPORT_SYMBOL_GPL(free_irq); | ||
340 | |||
341 | void enable_irq(unsigned int irq) | ||
342 | { | ||
343 | WARN_ON(1); | ||
344 | } | ||
345 | EXPORT_SYMBOL_GPL(enable_irq); | ||
346 | |||
347 | void disable_irq(unsigned int irq) | ||
348 | { | ||
349 | WARN_ON(1); | ||
350 | } | ||
351 | EXPORT_SYMBOL_GPL(disable_irq); | ||
352 | |||
353 | #endif /* !CONFIG_PCI */ | ||
354 | |||
355 | void disable_irq_nosync(unsigned int irq) | ||
356 | { | ||
357 | disable_irq(irq); | ||
358 | } | ||
359 | EXPORT_SYMBOL_GPL(disable_irq_nosync); | ||
360 | |||
361 | unsigned long probe_irq_on(void) | ||
362 | { | ||
363 | return 0; | ||
364 | } | ||
365 | EXPORT_SYMBOL_GPL(probe_irq_on); | ||
366 | |||
367 | int probe_irq_off(unsigned long val) | ||
368 | { | ||
369 | return 0; | ||
370 | } | ||
371 | EXPORT_SYMBOL_GPL(probe_irq_off); | ||
372 | |||
373 | unsigned int probe_irq_mask(unsigned long val) | ||
374 | { | ||
375 | return val; | ||
376 | } | ||
377 | EXPORT_SYMBOL_GPL(probe_irq_mask); | ||
diff --git a/arch/s390/kernel/sclp.S b/arch/s390/kernel/sclp.S index b6506ee32a36..29bd7bec4176 100644 --- a/arch/s390/kernel/sclp.S +++ b/arch/s390/kernel/sclp.S | |||
@@ -225,7 +225,7 @@ _sclp_print: | |||
225 | ahi %r2,1 | 225 | ahi %r2,1 |
226 | ltr %r0,%r0 # end of string? | 226 | ltr %r0,%r0 # end of string? |
227 | jz .LfinalizemtoS4 | 227 | jz .LfinalizemtoS4 |
228 | chi %r0,0x15 # end of line (NL)? | 228 | chi %r0,0x0a # end of line (NL)? |
229 | jz .LfinalizemtoS4 | 229 | jz .LfinalizemtoS4 |
230 | stc %r0,0(%r6,%r7) # copy to mto | 230 | stc %r0,0(%r6,%r7) # copy to mto |
231 | la %r11,0(%r6,%r7) | 231 | la %r11,0(%r6,%r7) |
diff --git a/arch/s390/kernel/smp.c b/arch/s390/kernel/smp.c index 05674b669001..4f977d0d25c2 100644 --- a/arch/s390/kernel/smp.c +++ b/arch/s390/kernel/smp.c | |||
@@ -428,34 +428,27 @@ void smp_stop_cpu(void) | |||
428 | * This is the main routine where commands issued by other | 428 | * This is the main routine where commands issued by other |
429 | * cpus are handled. | 429 | * cpus are handled. |
430 | */ | 430 | */ |
431 | static void do_ext_call_interrupt(struct ext_code ext_code, | 431 | static void smp_handle_ext_call(void) |
432 | unsigned int param32, unsigned long param64) | ||
433 | { | 432 | { |
434 | unsigned long bits; | 433 | unsigned long bits; |
435 | int cpu; | ||
436 | |||
437 | cpu = smp_processor_id(); | ||
438 | if (ext_code.code == 0x1202) | ||
439 | inc_irq_stat(IRQEXT_EXC); | ||
440 | else | ||
441 | inc_irq_stat(IRQEXT_EMS); | ||
442 | /* | ||
443 | * handle bit signal external calls | ||
444 | */ | ||
445 | bits = xchg(&pcpu_devices[cpu].ec_mask, 0); | ||
446 | 434 | ||
435 | /* handle bit signal external calls */ | ||
436 | bits = xchg(&pcpu_devices[smp_processor_id()].ec_mask, 0); | ||
447 | if (test_bit(ec_stop_cpu, &bits)) | 437 | if (test_bit(ec_stop_cpu, &bits)) |
448 | smp_stop_cpu(); | 438 | smp_stop_cpu(); |
449 | |||
450 | if (test_bit(ec_schedule, &bits)) | 439 | if (test_bit(ec_schedule, &bits)) |
451 | scheduler_ipi(); | 440 | scheduler_ipi(); |
452 | |||
453 | if (test_bit(ec_call_function, &bits)) | 441 | if (test_bit(ec_call_function, &bits)) |
454 | generic_smp_call_function_interrupt(); | 442 | generic_smp_call_function_interrupt(); |
455 | |||
456 | if (test_bit(ec_call_function_single, &bits)) | 443 | if (test_bit(ec_call_function_single, &bits)) |
457 | generic_smp_call_function_single_interrupt(); | 444 | generic_smp_call_function_single_interrupt(); |
445 | } | ||
458 | 446 | ||
447 | static void do_ext_call_interrupt(struct ext_code ext_code, | ||
448 | unsigned int param32, unsigned long param64) | ||
449 | { | ||
450 | inc_irq_stat(ext_code.code == 0x1202 ? IRQEXT_EXC : IRQEXT_EMS); | ||
451 | smp_handle_ext_call(); | ||
459 | } | 452 | } |
460 | 453 | ||
461 | void arch_send_call_function_ipi_mask(const struct cpumask *mask) | 454 | void arch_send_call_function_ipi_mask(const struct cpumask *mask) |
@@ -760,6 +753,8 @@ int __cpu_disable(void) | |||
760 | { | 753 | { |
761 | unsigned long cregs[16]; | 754 | unsigned long cregs[16]; |
762 | 755 | ||
756 | /* Handle possible pending IPIs */ | ||
757 | smp_handle_ext_call(); | ||
763 | set_cpu_online(smp_processor_id(), false); | 758 | set_cpu_online(smp_processor_id(), false); |
764 | /* Disable pseudo page faults on this cpu. */ | 759 | /* Disable pseudo page faults on this cpu. */ |
765 | pfault_fini(); | 760 | pfault_fini(); |