#include <asm/pgtable.h>
#include <asm/pcic.h>
#include <asm/cacheflush.h>
+#include <asm/irq_regs.h>
#ifdef CONFIG_SMP
#define SMP_NOP2 "nop; nop;\n\t"
prom_halt();
}
-void (*sparc_init_timers)(irqreturn_t (*)(int, void *,struct pt_regs *)) =
- (void (*)(irqreturn_t (*)(int, void *,struct pt_regs *))) irq_panic;
+void (*sparc_init_timers)(irqreturn_t (*)(int, void *)) =
+ (void (*)(irqreturn_t (*)(int, void *))) irq_panic;
/*
* Dave Redman (djhr@tadpole.co.uk)
void handler_irq(int irq, struct pt_regs * regs)
{
+ struct pt_regs *old_regs;
struct irqaction * action;
int cpu = smp_processor_id();
#ifdef CONFIG_SMP
extern void smp4m_irq_rotate(int cpu);
#endif
+ old_regs = set_irq_regs(regs);
irq_enter();
disable_pil_irq(irq);
#ifdef CONFIG_SMP
do {
if (!action || !action->handler)
unexpected_irq(irq, NULL, regs);
- action->handler(irq, action->dev_id, regs);
+ action->handler(irq, action->dev_id);
action = action->next;
} while (action);
sparc_irq[irq].flags &= ~SPARC_IRQ_INPROGRESS;
enable_pil_irq(irq);
irq_exit();
+ set_irq_regs(old_regs);
}
#ifdef CONFIG_BLK_DEV_FD
-extern void floppy_interrupt(int irq, void *dev_id, struct pt_regs *regs);
+extern void floppy_interrupt(int irq, void *dev_id)
void sparc_floppy_irq(int irq, void *dev_id, struct pt_regs *regs)
{
+ struct pt_regs *old_regs;
int cpu = smp_processor_id();
+ old_regs = set_irq_regs(regs);
disable_pil_irq(irq);
irq_enter();
kstat_cpu(cpu).irqs[irq]++;
- floppy_interrupt(irq, dev_id, regs);
+ floppy_interrupt(irq, dev_id);
irq_exit();
enable_pil_irq(irq);
+ set_irq_regs(old_regs);
// XXX Eek, it's totally changed with preempt_count() and such
// if (softirq_pending(cpu))
// do_softirq();
* thus no sharing possible.
*/
int request_fast_irq(unsigned int irq,
- irqreturn_t (*handler)(int, void *, struct pt_regs *),
+ irqreturn_t (*handler)(int, void *),
unsigned long irqflags, const char *devname)
{
struct irqaction *action;
}
int request_irq(unsigned int irq,
- irqreturn_t (*handler)(int, void *, struct pt_regs *),
+ irqreturn_t (*handler)(int, void *),
unsigned long irqflags, const char * devname, void *dev_id)
{
struct irqaction * action, **actionp;
if (sparc_cpu_model == sun4d) {
extern int sun4d_request_irq(unsigned int,
- irqreturn_t (*)(int, void *, struct pt_regs *),
+ irqreturn_t (*)(int, void *),
unsigned long, const char *, void *);
return sun4d_request_irq(irq, handler, irqflags, devname, dev_id);
}
pcic_timer_dummy = readl(pcic0.pcic_regs+PCI_SYS_LIMIT);
}
-static irqreturn_t pcic_timer_handler (int irq, void *h, struct pt_regs *regs)
+static irqreturn_t pcic_timer_handler (int irq, void *h)
{
write_seqlock(&xtime_lock); /* Dummy, to show that we remember */
pcic_clear_clock_irq();
do_timer(1);
#ifndef CONFIG_SMP
- update_process_times(user_mode(regs));
+ update_process_times(user_mode(get_irq_regs()));
#endif
write_sequnlock(&xtime_lock);
return IRQ_HANDLED;
/* Errm.. not sure how to do this.. */
}
-static void __init sun4c_init_timers(irqreturn_t (*counter_fn)(int, void *, struct pt_regs *))
+static void __init sun4c_init_timers(irqreturn_t (*counter_fn)(int, void *))
{
int irq;
#include <asm/sbus.h>
#include <asm/sbi.h>
#include <asm/cacheflush.h>
+#include <asm/irq_regs.h>
/* If you trust current SCSI layer to handle different SCSI IRQs, enable this. I don't trust it... -jj */
/* #define DISTRIBUTE_IRQS */
void sun4d_handler_irq(int irq, struct pt_regs * regs)
{
+ struct pt_regs *old_regs;
struct irqaction * action;
int cpu = smp_processor_id();
/* SBUS IRQ level (1 - 7) */
cc_set_iclr(1 << irq);
+ old_regs = set_irq_regs(regs);
irq_enter();
kstat_cpu(cpu).irqs[irq]++;
if (!sbusl) {
if (!action)
unexpected_irq(irq, NULL, regs);
do {
- action->handler(irq, action->dev_id, regs);
+ action->handler(irq, action->dev_id);
action = action->next;
} while (action);
} else {
if (!action)
unexpected_irq(irq, NULL, regs);
do {
- action->handler(irq, action->dev_id, regs);
+ action->handler(irq, action->dev_id);
action = action->next;
} while (action);
release_sbi(SBI2DEVID(sbino), slot);
}
}
irq_exit();
+ set_irq_regs(old_regs);
}
unsigned int sun4d_build_irq(struct sbus_dev *sdev, int irq)
}
int sun4d_request_irq(unsigned int irq,
- irqreturn_t (*handler)(int, void *, struct pt_regs *),
+ irqreturn_t (*handler)(int, void *),
unsigned long irqflags, const char * devname, void *dev_id)
{
struct irqaction *action, *tmp = NULL, **actionp;
bw_set_prof_limit(cpu, limit);
}
-static void __init sun4d_init_timers(irqreturn_t (*counter_fn)(int, void *, struct pt_regs *))
+static void __init sun4d_init_timers(irqreturn_t (*counter_fn)(int, void *))
{
int irq;
int cpu;
#include <asm/ptrace.h>
#include <asm/atomic.h>
+#include <asm/irq_regs.h>
#include <asm/delay.h>
#include <asm/irq.h>
void smp4d_percpu_timer_interrupt(struct pt_regs *regs)
{
+ struct pt_regs *old_regs;
int cpu = hard_smp4d_processor_id();
static int cpu_tick[NR_CPUS];
static char led_mask[] = { 0xe, 0xd, 0xb, 0x7, 0xb, 0xd };
+ old_regs = set_irq_regs(regs);
bw_get_prof_limit(cpu);
bw_clear_intr_mask(0, 1); /* INTR_TABLE[0] & 1 is Profile IRQ */
show_leds(cpu);
}
- profile_tick(CPU_PROFILING, regs);
+ profile_tick(CPU_PROFILING);
if(!--prof_counter(cpu)) {
int user = user_mode(regs);
prof_counter(cpu) = prof_multiplier(cpu);
}
+ set_irq_regs(old_regs);
}
extern unsigned int lvl14_resolution;
sun4m_timers->cpu_timers[cpu].l14_timer_limit = limit;
}
-static void __init sun4m_init_timers(irqreturn_t (*counter_fn)(int, void *, struct pt_regs *))
+static void __init sun4m_init_timers(irqreturn_t (*counter_fn)(int, void *))
{
int reg_count, irq, cpu;
struct linux_prom_registers cnt_regs[PROMREG_MAX];
#include <linux/profile.h>
#include <asm/cacheflush.h>
#include <asm/tlbflush.h>
+#include <asm/irq_regs.h>
#include <asm/ptrace.h>
#include <asm/atomic.h>
void smp4m_percpu_timer_interrupt(struct pt_regs *regs)
{
+ struct pt_regs *old_regs;
int cpu = smp_processor_id();
+ old_regs = set_irq_regs(regs);
+
clear_profile_irq(cpu);
- profile_tick(CPU_PROFILING, regs);
+ profile_tick(CPU_PROFILING);
if(!--prof_counter(cpu)) {
int user = user_mode(regs);
prof_counter(cpu) = prof_multiplier(cpu);
}
+ set_irq_regs(old_regs);
}
extern unsigned int lvl14_resolution;
linux_lvl14[3] = obp_lvl14[3];
}
-void claim_ticker14(irqreturn_t (*handler)(int, void *, struct pt_regs *),
+void claim_ticker14(irqreturn_t (*handler)(int, void *),
int irq_nr, unsigned int timeout )
{
int cpu = smp_processor_id();
#include <asm/page.h>
#include <asm/pcic.h>
#include <asm/of_device.h>
+#include <asm/irq_regs.h>
DEFINE_SPINLOCK(rtc_lock);
enum sparc_clock_type sp_clock_typ;
#define TICK_SIZE (tick_nsec / 1000)
-irqreturn_t timer_interrupt(int irq, void *dev_id, struct pt_regs * regs)
+irqreturn_t timer_interrupt(int irq, void *dev_id)
{
/* last time the cmos clock got updated */
static long last_rtc_update;
#ifndef CONFIG_SMP
- profile_tick(CPU_PROFILING, regs);
+ profile_tick(CPU_PROFILING);
#endif
/* Protect counter clear so that do_gettimeoffset works */
do_timer(1);
#ifndef CONFIG_SMP
- update_process_times(user_mode(regs));
+ update_process_times(user_mode(get_irq_regs()));
#endif
static irqreturn_t parport_sunbpp_interrupt(int irq, void *dev_id)
{
- parport_generic_irq(irq, (struct parport *) dev_id, regs);
+ parport_generic_irq(irq, (struct parport *) dev_id);
return IRQ_HANDLED;
}
}
/* Our low-level entry point in arch/sparc/kernel/entry.S */
-irqreturn_t floppy_hardint(int irq, void *unused, struct pt_regs *regs);
+irqreturn_t floppy_hardint(int irq, void *unused);
static int sun_fd_request_irq(void)
{
BTFIXUP_CALL(load_profile_irq)(cpu, limit);
}
-extern void (*sparc_init_timers)(irqreturn_t (*lvl10_irq)(int, void *, struct pt_regs *));
-extern void claim_ticker14(irqreturn_t (*irq_handler)(int, void *, struct pt_regs *),
+extern void (*sparc_init_timers)(irqreturn_t (*lvl10_irq)(int, void *));
+extern void claim_ticker14(irqreturn_t (*irq_handler)(int, void *),
int irq,
unsigned int timeout);
#define set_irq_udt(cpu) BTFIXUP_CALL(set_irq_udt)(cpu)
#endif
-extern int request_fast_irq(unsigned int irq, irqreturn_t (*handler)(int, void *, struct pt_regs *), unsigned long flags, __const__ char *devname);
+extern int request_fast_irq(unsigned int irq, irqreturn_t (*handler)(int, void *), unsigned long flags, __const__ char *devname);
/* On the sun4m, just like the timers, we have both per-cpu and master
* interrupt registers.
--- /dev/null
+#include <asm-generic/irq_regs.h>