2 * arch/s390/kernel/irq.c
5 * Copyright (C) 2004 IBM Deutschland Entwicklung GmbH, IBM Corporation
6 * Author(s): Martin Schwidefsky (schwidefsky@de.ibm.com),
8 * This file contains interrupt related functions.
11 #include <linux/module.h>
12 #include <linux/kernel.h>
13 #include <linux/kernel_stat.h>
14 #include <linux/interrupt.h>
15 #include <linux/seq_file.h>
16 #include <linux/cpu.h>
19 * show_interrupts is needed by /proc/interrupts.
21 int show_interrupts(struct seq_file *p, void *v)
23 static const char *intrclass_names[] = { "EXT", "I/O", };
24 int i = *(loff_t *) v, j;
28 for_each_online_cpu(j)
29 seq_printf(p, "CPU%d ",j);
34 seq_printf(p, "%s: ", intrclass_names[i]);
36 seq_printf(p, "%10u ", kstat_irqs(i));
38 for_each_online_cpu(j)
39 seq_printf(p, "%10u ", kstat_cpu(j).irqs[i]);
49 * For compatibilty only. S/390 specific setup of interrupts et al. is done
50 * much later in init_channel_subsystem().
59 * Switch to the asynchronous interrupt stack for softirq execution.
61 extern void __do_softirq(void);
63 asmlinkage void do_softirq(void)
65 unsigned long flags, old, new;
70 local_irq_save(flags);
72 if (local_softirq_pending()) {
73 /* Get current stack pointer. */
74 asm volatile("la %0,0(15)" : "=a" (old));
75 /* Check against async. stack address range. */
76 new = S390_lowcore.async_stack;
77 if (((new - old) >> (PAGE_SHIFT + THREAD_ORDER)) != 0) {
78 /* Need to switch to the async. stack. */
79 new -= STACK_FRAME_OVERHEAD;
80 ((struct stack_frame *) new)->back_chain = old;
82 asm volatile(" la 15,0(%0)\n"
85 : : "a" (new), "a" (old),
87 : "0", "1", "2", "3", "4", "5", "14",
90 /* We are already on the async stack. */
94 local_irq_restore(flags);
97 EXPORT_SYMBOL(do_softirq);