Commit 5a489b98 authored by Heiko Carstens's avatar Heiko Carstens Committed by Martin Schwidefsky

[S390] irq change build fixes.

Signed-off-by: default avatarHeiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
parent 7e8ae7bf
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
#include <asm/lowcore.h> #include <asm/lowcore.h>
#include <asm/s390_ext.h> #include <asm/s390_ext.h>
#include <asm/irq_regs.h>
#include <asm/irq.h> #include <asm/irq.h>
/* /*
...@@ -114,26 +115,28 @@ void do_extint(struct pt_regs *regs, unsigned short code) ...@@ -114,26 +115,28 @@ void do_extint(struct pt_regs *regs, unsigned short code)
{ {
ext_int_info_t *p; ext_int_info_t *p;
int index; int index;
struct pt_regs *old_regs;
irq_enter(); irq_enter();
old_regs = set_irq_regs(regs);
asm volatile ("mc 0,0"); asm volatile ("mc 0,0");
if (S390_lowcore.int_clock >= S390_lowcore.jiffy_timer) if (S390_lowcore.int_clock >= S390_lowcore.jiffy_timer)
/** /**
* Make sure that the i/o interrupt did not "overtake" * Make sure that the i/o interrupt did not "overtake"
* the last HZ timer interrupt. * the last HZ timer interrupt.
*/ */
account_ticks(regs); account_ticks();
kstat_cpu(smp_processor_id()).irqs[EXTERNAL_INTERRUPT]++; kstat_cpu(smp_processor_id()).irqs[EXTERNAL_INTERRUPT]++;
index = ext_hash(code); index = ext_hash(code);
for (p = ext_int_hash[index]; p; p = p->next) { for (p = ext_int_hash[index]; p; p = p->next) {
if (likely(p->code == code)) { if (likely(p->code == code)) {
if (likely(p->handler)) if (likely(p->handler))
p->handler(regs, code); p->handler(code);
} }
} }
set_irq_regs(old_regs);
irq_exit(); irq_exit();
} }
EXPORT_SYMBOL(register_external_interrupt); EXPORT_SYMBOL(register_external_interrupt);
EXPORT_SYMBOL(unregister_external_interrupt); EXPORT_SYMBOL(unregister_external_interrupt);
...@@ -339,7 +339,7 @@ void machine_power_off_smp(void) ...@@ -339,7 +339,7 @@ void machine_power_off_smp(void)
* cpus are handled. * cpus are handled.
*/ */
void do_ext_call_interrupt(struct pt_regs *regs, __u16 code) void do_ext_call_interrupt(__u16 code)
{ {
unsigned long bits; unsigned long bits;
......
...@@ -34,6 +34,7 @@ ...@@ -34,6 +34,7 @@
#include <asm/s390_ext.h> #include <asm/s390_ext.h>
#include <asm/div64.h> #include <asm/div64.h>
#include <asm/irq.h> #include <asm/irq.h>
#include <asm/irq_regs.h>
#include <asm/timer.h> #include <asm/timer.h>
/* change this if you have some constant time drift */ /* change this if you have some constant time drift */
...@@ -150,9 +151,9 @@ EXPORT_SYMBOL(do_settimeofday); ...@@ -150,9 +151,9 @@ EXPORT_SYMBOL(do_settimeofday);
#ifdef CONFIG_PROFILING #ifdef CONFIG_PROFILING
#define s390_do_profile(regs) profile_tick(CPU_PROFILING, regs) #define s390_do_profile() profile_tick(CPU_PROFILING)
#else #else
#define s390_do_profile(regs) do { ; } while(0) #define s390_do_profile() do { ; } while(0)
#endif /* CONFIG_PROFILING */ #endif /* CONFIG_PROFILING */
...@@ -160,7 +161,7 @@ EXPORT_SYMBOL(do_settimeofday); ...@@ -160,7 +161,7 @@ EXPORT_SYMBOL(do_settimeofday);
* timer_interrupt() needs to keep up the real-time clock, * timer_interrupt() needs to keep up the real-time clock,
* as well as call the "do_timer()" routine every clocktick * as well as call the "do_timer()" routine every clocktick
*/ */
void account_ticks(struct pt_regs *regs) void account_ticks(void)
{ {
__u64 tmp; __u64 tmp;
__u32 ticks; __u32 ticks;
...@@ -221,10 +222,10 @@ void account_ticks(struct pt_regs *regs) ...@@ -221,10 +222,10 @@ void account_ticks(struct pt_regs *regs)
account_tick_vtime(current); account_tick_vtime(current);
#else #else
while (ticks--) while (ticks--)
update_process_times(user_mode(regs)); update_process_times(user_mode(get_irq_regs()));
#endif #endif
s390_do_profile(regs); s390_do_profile();
} }
#ifdef CONFIG_NO_IDLE_HZ #ifdef CONFIG_NO_IDLE_HZ
...@@ -285,9 +286,11 @@ static inline void stop_hz_timer(void) ...@@ -285,9 +286,11 @@ static inline void stop_hz_timer(void)
*/ */
static inline void start_hz_timer(void) static inline void start_hz_timer(void)
{ {
BUG_ON(!in_interrupt());
if (!cpu_isset(smp_processor_id(), nohz_cpu_mask)) if (!cpu_isset(smp_processor_id(), nohz_cpu_mask))
return; return;
account_ticks(task_pt_regs(current)); account_ticks();
cpu_clear(smp_processor_id(), nohz_cpu_mask); cpu_clear(smp_processor_id(), nohz_cpu_mask);
} }
......
...@@ -61,7 +61,7 @@ extern pgm_check_handler_t do_dat_exception; ...@@ -61,7 +61,7 @@ extern pgm_check_handler_t do_dat_exception;
#ifdef CONFIG_PFAULT #ifdef CONFIG_PFAULT
extern int pfault_init(void); extern int pfault_init(void);
extern void pfault_fini(void); extern void pfault_fini(void);
extern void pfault_interrupt(struct pt_regs *regs, __u16 error_code); extern void pfault_interrupt(__u16 error_code);
static ext_int_info_t ext_int_pfault; static ext_int_info_t ext_int_pfault;
#endif #endif
extern pgm_check_handler_t do_monitor_call; extern pgm_check_handler_t do_monitor_call;
......
...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
#include <asm/s390_ext.h> #include <asm/s390_ext.h>
#include <asm/timer.h> #include <asm/timer.h>
#include <asm/irq_regs.h>
static ext_int_info_t ext_int_info_timer; static ext_int_info_t ext_int_info_timer;
DEFINE_PER_CPU(struct vtimer_queue, virt_cpu_timer); DEFINE_PER_CPU(struct vtimer_queue, virt_cpu_timer);
...@@ -241,7 +242,7 @@ static void do_callbacks(struct list_head *cb_list, struct pt_regs *regs) ...@@ -241,7 +242,7 @@ static void do_callbacks(struct list_head *cb_list, struct pt_regs *regs)
/* /*
* Handler for the virtual CPU timer. * Handler for the virtual CPU timer.
*/ */
static void do_cpu_timer_interrupt(struct pt_regs *regs, __u16 error_code) static void do_cpu_timer_interrupt(__u16 error_code)
{ {
int cpu; int cpu;
__u64 next, delta; __u64 next, delta;
...@@ -274,7 +275,7 @@ static void do_cpu_timer_interrupt(struct pt_regs *regs, __u16 error_code) ...@@ -274,7 +275,7 @@ static void do_cpu_timer_interrupt(struct pt_regs *regs, __u16 error_code)
list_move_tail(&event->entry, &cb_list); list_move_tail(&event->entry, &cb_list);
} }
spin_unlock(&vt_list->lock); spin_unlock(&vt_list->lock);
do_callbacks(&cb_list, regs); do_callbacks(&cb_list, get_irq_regs());
/* next event is first in list */ /* next event is first in list */
spin_lock(&vt_list->lock); spin_lock(&vt_list->lock);
......
...@@ -451,7 +451,7 @@ void pfault_fini(void) ...@@ -451,7 +451,7 @@ void pfault_fini(void)
} }
asmlinkage void asmlinkage void
pfault_interrupt(struct pt_regs *regs, __u16 error_code) pfault_interrupt(__u16 error_code)
{ {
struct task_struct *tsk; struct task_struct *tsk;
__u16 subcode; __u16 subcode;
......
...@@ -218,7 +218,7 @@ dasd_diag_term_IO(struct dasd_ccw_req * cqr) ...@@ -218,7 +218,7 @@ dasd_diag_term_IO(struct dasd_ccw_req * cqr)
/* Handle external interruption. */ /* Handle external interruption. */
static void static void
dasd_ext_handler(struct pt_regs *regs, __u16 code) dasd_ext_handler(__u16 code)
{ {
struct dasd_ccw_req *cqr, *next; struct dasd_ccw_req *cqr, *next;
struct dasd_device *device; struct dasd_device *device;
......
...@@ -20,7 +20,7 @@ static int ctrlchar_sysrq_key; ...@@ -20,7 +20,7 @@ static int ctrlchar_sysrq_key;
static void static void
ctrlchar_handle_sysrq(void *tty) ctrlchar_handle_sysrq(void *tty)
{ {
handle_sysrq(ctrlchar_sysrq_key, NULL, (struct tty_struct *) tty); handle_sysrq(ctrlchar_sysrq_key, (struct tty_struct *) tty);
} }
static DECLARE_WORK(ctrlchar_work, ctrlchar_handle_sysrq, NULL); static DECLARE_WORK(ctrlchar_work, ctrlchar_handle_sysrq, NULL);
......
...@@ -304,7 +304,7 @@ kbd_keycode(struct kbd_data *kbd, unsigned int keycode) ...@@ -304,7 +304,7 @@ kbd_keycode(struct kbd_data *kbd, unsigned int keycode)
if (kbd->sysrq) { if (kbd->sysrq) {
if (kbd->sysrq == K(KT_LATIN, '-')) { if (kbd->sysrq == K(KT_LATIN, '-')) {
kbd->sysrq = 0; kbd->sysrq = 0;
handle_sysrq(value, NULL, kbd->tty); handle_sysrq(value, kbd->tty);
return; return;
} }
if (value == '-') { if (value == '-') {
......
...@@ -324,7 +324,7 @@ __sclp_find_req(u32 sccb) ...@@ -324,7 +324,7 @@ __sclp_find_req(u32 sccb)
* Prepare read event data request if necessary. Start processing of next * Prepare read event data request if necessary. Start processing of next
* request on queue. */ * request on queue. */
static void static void
sclp_interrupt_handler(struct pt_regs *regs, __u16 code) sclp_interrupt_handler(__u16 code)
{ {
struct sclp_req *req; struct sclp_req *req;
u32 finished_sccb; u32 finished_sccb;
...@@ -743,7 +743,7 @@ EXPORT_SYMBOL(sclp_reactivate); ...@@ -743,7 +743,7 @@ EXPORT_SYMBOL(sclp_reactivate);
/* Handler for external interruption used during initialization. Modify /* Handler for external interruption used during initialization. Modify
* request state to done. */ * request state to done. */
static void static void
sclp_check_handler(struct pt_regs *regs, __u16 code) sclp_check_handler(__u16 code)
{ {
u32 finished_sccb; u32 finished_sccb;
......
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
#include <asm/cio.h> #include <asm/cio.h>
#include <asm/delay.h> #include <asm/delay.h>
#include <asm/irq.h> #include <asm/irq.h>
#include <asm/irq_regs.h>
#include <asm/setup.h> #include <asm/setup.h>
#include "airq.h" #include "airq.h"
#include "cio.h" #include "cio.h"
...@@ -606,15 +607,17 @@ do_IRQ (struct pt_regs *regs) ...@@ -606,15 +607,17 @@ do_IRQ (struct pt_regs *regs)
struct tpi_info *tpi_info; struct tpi_info *tpi_info;
struct subchannel *sch; struct subchannel *sch;
struct irb *irb; struct irb *irb;
struct pt_regs *old_regs;
irq_enter (); irq_enter ();
old_regs = set_irq_regs(regs);
asm volatile ("mc 0,0"); asm volatile ("mc 0,0");
if (S390_lowcore.int_clock >= S390_lowcore.jiffy_timer) if (S390_lowcore.int_clock >= S390_lowcore.jiffy_timer)
/** /**
* Make sure that the i/o interrupt did not "overtake" * Make sure that the i/o interrupt did not "overtake"
* the last HZ timer interrupt. * the last HZ timer interrupt.
*/ */
account_ticks(regs); account_ticks();
/* /*
* Get interrupt information from lowcore * Get interrupt information from lowcore
*/ */
...@@ -652,6 +655,7 @@ do_IRQ (struct pt_regs *regs) ...@@ -652,6 +655,7 @@ do_IRQ (struct pt_regs *regs)
* out of the sie which costs more cycles than it saves. * out of the sie which costs more cycles than it saves.
*/ */
} while (!MACHINE_IS_VM && tpi (NULL) != 0); } while (!MACHINE_IS_VM && tpi (NULL) != 0);
set_irq_regs(old_regs);
irq_exit (); irq_exit ();
} }
......
...@@ -116,7 +116,7 @@ static DEFINE_SPINLOCK(iucv_irq_queue_lock); ...@@ -116,7 +116,7 @@ static DEFINE_SPINLOCK(iucv_irq_queue_lock);
*Internal function prototypes *Internal function prototypes
*/ */
static void iucv_tasklet_handler(unsigned long); static void iucv_tasklet_handler(unsigned long);
static void iucv_irq_handler(struct pt_regs *, __u16); static void iucv_irq_handler(__u16);
static DECLARE_TASKLET(iucv_tasklet,iucv_tasklet_handler,0); static DECLARE_TASKLET(iucv_tasklet,iucv_tasklet_handler,0);
...@@ -2251,7 +2251,7 @@ iucv_sever(__u16 pathid, __u8 user_data[16]) ...@@ -2251,7 +2251,7 @@ iucv_sever(__u16 pathid, __u8 user_data[16])
* Places the interrupt buffer on a queue and schedules iucv_tasklet_handler(). * Places the interrupt buffer on a queue and schedules iucv_tasklet_handler().
*/ */
static void static void
iucv_irq_handler(struct pt_regs *regs, __u16 code) iucv_irq_handler(__u16 code)
{ {
iucv_irqdata *irqdata; iucv_irqdata *irqdata;
......
...@@ -32,6 +32,6 @@ typedef struct { ...@@ -32,6 +32,6 @@ typedef struct {
#define HARDIRQ_BITS 8 #define HARDIRQ_BITS 8
extern void account_ticks(struct pt_regs *); extern void account_ticks(void);
#endif /* __ASM_HARDIRQ_H */ #endif /* __ASM_HARDIRQ_H */
#include <asm-generic/irq_regs.h>
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
* Martin Schwidefsky (schwidefsky@de.ibm.com) * Martin Schwidefsky (schwidefsky@de.ibm.com)
*/ */
typedef void (*ext_int_handler_t)(struct pt_regs *regs, __u16 code); typedef void (*ext_int_handler_t)(__u16 code);
/* /*
* Warning: if you change ext_int_info_t you have to change the * Warning: if you change ext_int_info_t you have to change the
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment