aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390/kernel
diff options
context:
space:
mode:
authorHeiko Carstens <heiko.carstens@de.ibm.com>2012-03-11 11:59:31 -0400
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2012-03-11 11:59:29 -0400
commitfde15c3a3adc7b65cd0610dd6bca4804ee7ffd38 (patch)
tree62c1f93d33a7449fb07250993e4cf4086d5aa273 /arch/s390/kernel
parent2215011dd9c1b01f1fc430620ed31f2baad267c3 (diff)
[S390] irq: external interrupt code passing
The external interrupt handlers have a parameter called ext_int_code. Besides the name this paramter does not only contain the ext_int_code but in addition also the "cpu address" (POP) which caused the external interrupt. To make the code a bit more obvious pass a struct instead so the called function can easily distinguish between external interrupt code and cpu address. The cpu address field however is named "subcode" since some external interrupt sources do not pass a cpu address but a different parameter (or none at all). Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390/kernel')
-rw-r--r--arch/s390/kernel/entry.h3
-rw-r--r--arch/s390/kernel/irq.c12
-rw-r--r--arch/s390/kernel/smp.c4
-rw-r--r--arch/s390/kernel/time.c4
-rw-r--r--arch/s390/kernel/vtime.c2
5 files changed, 12 insertions, 13 deletions
diff --git a/arch/s390/kernel/entry.h b/arch/s390/kernel/entry.h
index 4984785e3078..6cdddac93a2e 100644
--- a/arch/s390/kernel/entry.h
+++ b/arch/s390/kernel/entry.h
@@ -35,7 +35,8 @@ int handle_signal32(unsigned long sig, struct k_sigaction *ka,
35 siginfo_t *info, sigset_t *oldset, struct pt_regs *regs); 35 siginfo_t *info, sigset_t *oldset, struct pt_regs *regs);
36void do_notify_resume(struct pt_regs *regs); 36void do_notify_resume(struct pt_regs *regs);
37 37
38void do_extint(struct pt_regs *regs, unsigned int, unsigned int, unsigned long); 38struct ext_code;
39void do_extint(struct pt_regs *regs, struct ext_code, unsigned int, unsigned long);
39void do_restart(void); 40void do_restart(void);
40void __init startup_init(void); 41void __init startup_init(void);
41void die(struct pt_regs *regs, const char *str); 42void die(struct pt_regs *regs, const char *str);
diff --git a/arch/s390/kernel/irq.c b/arch/s390/kernel/irq.c
index 09a014c62537..7a97d57f7073 100644
--- a/arch/s390/kernel/irq.c
+++ b/arch/s390/kernel/irq.c
@@ -209,29 +209,27 @@ int unregister_external_interrupt(u16 code, ext_int_handler_t handler)
209} 209}
210EXPORT_SYMBOL(unregister_external_interrupt); 210EXPORT_SYMBOL(unregister_external_interrupt);
211 211
212void __irq_entry do_extint(struct pt_regs *regs, unsigned int ext_int_code, 212void __irq_entry do_extint(struct pt_regs *regs, struct ext_code ext_code,
213 unsigned int param32, unsigned long param64) 213 unsigned int param32, unsigned long param64)
214{ 214{
215 struct pt_regs *old_regs; 215 struct pt_regs *old_regs;
216 unsigned short code;
217 struct ext_int_info *p; 216 struct ext_int_info *p;
218 int index; 217 int index;
219 218
220 code = (unsigned short) ext_int_code;
221 old_regs = set_irq_regs(regs); 219 old_regs = set_irq_regs(regs);
222 irq_enter(); 220 irq_enter();
223 if (S390_lowcore.int_clock >= S390_lowcore.clock_comparator) 221 if (S390_lowcore.int_clock >= S390_lowcore.clock_comparator)
224 /* Serve timer interrupts first. */ 222 /* Serve timer interrupts first. */
225 clock_comparator_work(); 223 clock_comparator_work();
226 kstat_cpu(smp_processor_id()).irqs[EXTERNAL_INTERRUPT]++; 224 kstat_cpu(smp_processor_id()).irqs[EXTERNAL_INTERRUPT]++;
227 if (code != 0x1004) 225 if (ext_code.code != 0x1004)
228 __get_cpu_var(s390_idle).nohz_delay = 1; 226 __get_cpu_var(s390_idle).nohz_delay = 1;
229 227
230 index = ext_hash(code); 228 index = ext_hash(ext_code.code);
231 rcu_read_lock(); 229 rcu_read_lock();
232 list_for_each_entry_rcu(p, &ext_int_hash[index], entry) 230 list_for_each_entry_rcu(p, &ext_int_hash[index], entry)
233 if (likely(p->code == code)) 231 if (likely(p->code == ext_code.code))
234 p->handler(ext_int_code, param32, param64); 232 p->handler(ext_code, param32, param64);
235 rcu_read_unlock(); 233 rcu_read_unlock();
236 irq_exit(); 234 irq_exit();
237 set_irq_regs(old_regs); 235 set_irq_regs(old_regs);
diff --git a/arch/s390/kernel/smp.c b/arch/s390/kernel/smp.c
index afd6e5113a90..734e644972ab 100644
--- a/arch/s390/kernel/smp.c
+++ b/arch/s390/kernel/smp.c
@@ -434,14 +434,14 @@ void smp_stop_cpu(void)
434 * This is the main routine where commands issued by other 434 * This is the main routine where commands issued by other
435 * cpus are handled. 435 * cpus are handled.
436 */ 436 */
437static void do_ext_call_interrupt(unsigned int ext_int_code, 437static void do_ext_call_interrupt(struct ext_code ext_code,
438 unsigned int param32, unsigned long param64) 438 unsigned int param32, unsigned long param64)
439{ 439{
440 unsigned long bits; 440 unsigned long bits;
441 int cpu; 441 int cpu;
442 442
443 cpu = smp_processor_id(); 443 cpu = smp_processor_id();
444 if ((ext_int_code & 0xffff) == 0x1202) 444 if (ext_code.code == 0x1202)
445 kstat_cpu(cpu).irqs[EXTINT_EXC]++; 445 kstat_cpu(cpu).irqs[EXTINT_EXC]++;
446 else 446 else
447 kstat_cpu(cpu).irqs[EXTINT_EMS]++; 447 kstat_cpu(cpu).irqs[EXTINT_EMS]++;
diff --git a/arch/s390/kernel/time.c b/arch/s390/kernel/time.c
index 14da278febbf..d4e1cb1dbcd1 100644
--- a/arch/s390/kernel/time.c
+++ b/arch/s390/kernel/time.c
@@ -165,7 +165,7 @@ void init_cpu_timer(void)
165 __ctl_set_bit(0, 4); 165 __ctl_set_bit(0, 4);
166} 166}
167 167
168static void clock_comparator_interrupt(unsigned int ext_int_code, 168static void clock_comparator_interrupt(struct ext_code ext_code,
169 unsigned int param32, 169 unsigned int param32,
170 unsigned long param64) 170 unsigned long param64)
171{ 171{
@@ -177,7 +177,7 @@ static void clock_comparator_interrupt(unsigned int ext_int_code,
177static void etr_timing_alert(struct etr_irq_parm *); 177static void etr_timing_alert(struct etr_irq_parm *);
178static void stp_timing_alert(struct stp_irq_parm *); 178static void stp_timing_alert(struct stp_irq_parm *);
179 179
180static void timing_alert_interrupt(unsigned int ext_int_code, 180static void timing_alert_interrupt(struct ext_code ext_code,
181 unsigned int param32, unsigned long param64) 181 unsigned int param32, unsigned long param64)
182{ 182{
183 kstat_cpu(smp_processor_id()).irqs[EXTINT_TLA]++; 183 kstat_cpu(smp_processor_id()).irqs[EXTINT_TLA]++;
diff --git a/arch/s390/kernel/vtime.c b/arch/s390/kernel/vtime.c
index 277ea712b232..39ebff506946 100644
--- a/arch/s390/kernel/vtime.c
+++ b/arch/s390/kernel/vtime.c
@@ -220,7 +220,7 @@ static void do_callbacks(struct list_head *cb_list)
220/* 220/*
221 * Handler for the virtual CPU timer. 221 * Handler for the virtual CPU timer.
222 */ 222 */
223static void do_cpu_timer_interrupt(unsigned int ext_int_code, 223static void do_cpu_timer_interrupt(struct ext_code ext_code,
224 unsigned int param32, unsigned long param64) 224 unsigned int param32, unsigned long param64)
225{ 225{
226 struct vtimer_queue *vq; 226 struct vtimer_queue *vq;