Browse Source

IRQ: Maintain regs pointer globally rather than passing to IRQ handlers

Maintain a per-CPU global "struct pt_regs *" variable which can be used instead
of passing regs around manually through all ~1800 interrupt handlers in the
Linux kernel.

The regs pointer is used in few places, but it potentially costs both stack
space and code to pass it around.  On the FRV arch, removing the regs parameter
from all the genirq function results in a 20% speed up of the IRQ exit path
(ie: from leaving timer_interrupt() to leaving do_IRQ()).

Where appropriate, an arch may override the generic storage facility and do
something different with the variable.  On FRV, for instance, the address is
maintained in GR28 at all times inside the kernel as part of general exception
handling.

Having looked over the code, it appears that the parameter may be handed down
through up to twenty or so layers of functions.  Consider a USB character
device attached to a USB hub, attached to a USB controller that posts its
interrupts through a cascaded auxiliary interrupt controller.  A character
device driver may want to pass regs to the sysrq handler through the input
layer which adds another few layers of parameter passing.

I've build this code with allyesconfig for x86_64 and i386.  I've runtested the
main part of the code on FRV and i386, though I can't test most of the drivers.
I've also done partial conversion for powerpc and MIPS - these at least compile
with minimal configurations.

This will affect all archs.  Mostly the changes should be relatively easy.
Take do_IRQ(), store the regs pointer at the beginning, saving the old one:

	struct pt_regs *old_regs = set_irq_regs(regs);

And put the old one back at the end:

	set_irq_regs(old_regs);

Don't pass regs through to generic_handle_irq() or __do_IRQ().

In timer_interrupt(), this sort of change will be necessary:

	-	update_process_times(user_mode(regs));
	-	profile_tick(CPU_PROFILING, regs);
	+	update_process_times(user_mode(get_irq_regs()));
	+	profile_tick(CPU_PROFILING);

I'd like to move update_process_times()'s use of get_irq_regs() into itself,
except that i386, alone of the archs, uses something other than user_mode().

Some notes on the interrupt handling in the drivers:

 (*) input_dev() is now gone entirely.  The regs pointer is no longer stored in
     the input_dev struct.

 (*) finish_unlinks() in drivers/usb/host/ohci-q.c needs checking.  It does
     something different depending on whether it's been supplied with a regs
     pointer or not.

 (*) Various IRQ handler function pointers have been moved to type
     irq_handler_t.

Signed-Off-By: David Howells <dhowells@redhat.com>
(cherry picked from 1b16e7ac85 commit)
imx_3.10.17_1.0.0_ga
David Howells 14 years ago
committed by David Howells
parent
commit
7d12e780e0
1079 changed files with 2621 additions and 2976 deletions
  1. +2
    -3
      arch/frv/kernel/dma.c
  2. +2
    -2
      arch/frv/kernel/irq-mb93091.c
  3. +2
    -2
      arch/frv/kernel/irq-mb93093.c
  4. +2
    -2
      arch/frv/kernel/irq-mb93493.c
  5. +1
    -1
      arch/frv/kernel/irq.c
  6. +4
    -4
      arch/frv/kernel/time.c
  7. +10
    -8
      arch/i386/kernel/apic.c
  8. +2
    -2
      arch/i386/kernel/i8259.c
  9. +7
    -5
      arch/i386/kernel/irq.c
  10. +6
    -0
      arch/i386/kernel/smp.c
  11. +3
    -3
      arch/i386/kernel/time.c
  12. +2
    -2
      arch/i386/kernel/time_hpet.c
  13. +1
    -1
      arch/i386/kernel/vm86.c
  14. +2
    -2
      arch/i386/mach-visws/visws_apic.c
  15. +1
    -1
      arch/i386/mach-voyager/voyager_basic.c
  16. +18
    -10
      arch/i386/mach-voyager/voyager_smp.c
  17. +3
    -1
      arch/ia64/kernel/irq_ia64.c
  18. +1
    -1
      arch/ia64/kernel/machvec.c
  19. +14
    -18
      arch/ia64/kernel/mca.c
  20. +4
    -4
      arch/ia64/kernel/time.c
  21. +1
    -2
      arch/ia64/sn/pci/tioca_provider.c
  22. +1
    -2
      arch/ia64/sn/pci/tioce_provider.c
  23. +3
    -1
      arch/mips/kernel/irq.c
  24. +14
    -10
      arch/mips/kernel/time.c
  25. +1
    -1
      arch/mips/sgi-ip22/ip22-reset.c
  26. +3
    -1
      arch/mips/sgi-ip22/ip22-time.c
  27. +4
    -2
      arch/powerpc/kernel/irq.c
  28. +3
    -3
      arch/powerpc/kernel/misc_64.S
  29. +3
    -3
      arch/powerpc/kernel/smp.c
  30. +5
    -1
      arch/powerpc/kernel/time.c
  31. +2
    -2
      arch/powerpc/platforms/cell/interrupt.c
  32. +2
    -3
      arch/powerpc/platforms/cell/spider-pic.c
  33. +1
    -1
      arch/powerpc/platforms/powermac/low_i2c.c
  34. +1
    -1
      arch/powerpc/platforms/powermac/pfunc_base.c
  35. +3
    -4
      arch/powerpc/platforms/powermac/pic.c
  36. +5
    -9
      arch/powerpc/platforms/pseries/ras.c
  37. +3
    -4
      arch/powerpc/platforms/pseries/setup.c
  38. +9
    -9
      arch/powerpc/platforms/pseries/xics.c
  39. +1
    -2
      arch/powerpc/platforms/pseries/xics.h
  40. +2
    -2
      arch/powerpc/sysdev/mpic.c
  41. +3
    -3
      arch/powerpc/xmon/xmon.c
  42. +6
    -6
      arch/x86_64/kernel/apic.c
  43. +5
    -2
      arch/x86_64/kernel/irq.c
  44. +10
    -10
      arch/x86_64/kernel/time.c
  45. +1
    -1
      drivers/acorn/block/mfmhd.c
  46. +1
    -1
      drivers/acpi/osl.c
  47. +2
    -2
      drivers/ata/ahci.c
  48. +1
    -2
      drivers/ata/libata-core.c
  49. +2
    -3
      drivers/ata/pdc_adma.c
  50. +2
    -4
      drivers/ata/sata_mv.c
  51. +6
    -12
      drivers/ata/sata_nv.c
  52. +2
    -2
      drivers/ata/sata_promise.c
  53. +2
    -2
      drivers/ata/sata_qstor.c
  54. +2
    -4
      drivers/ata/sata_sil.c
  55. +2
    -2
      drivers/ata/sata_sil24.c
  56. +2
    -2
      drivers/ata/sata_sx4.c
  57. +1
    -2
      drivers/ata/sata_vsc.c
  58. +1
    -3
      drivers/atm/ambassador.c
  59. +1
    -1
      drivers/atm/eni.c
  60. +1
    -1
      drivers/atm/firestream.c
  61. +1
    -1
      drivers/atm/fore200e.c
  62. +2
    -2
      drivers/atm/he.c
  63. +1
    -3
      drivers/atm/horizon.c
  64. +1
    -1
      drivers/atm/idt77252.c
  65. +1
    -1
      drivers/atm/iphase.c
  66. +2
    -2
      drivers/atm/lanai.c
  67. +2
    -2
      drivers/atm/nicstar.c
  68. +1
    -1
      drivers/atm/zatm.c
  69. +8
    -16
      drivers/block/DAC960.c
  70. +7
    -7
      drivers/block/DAC960.h
  71. +2
    -2
      drivers/block/acsi.c
  72. +2
    -2
      drivers/block/acsi_slm.c
  73. +2
    -2
      drivers/block/amiflop.c
  74. +2
    -2
      drivers/block/ataflop.c
  75. +3
    -3
      drivers/block/cciss.c
  76. +2
    -2
      drivers/block/cpqarray.c
  77. +2
    -2
      drivers/block/floppy.c
  78. +2
    -4
      drivers/block/ps2esdi.c
  79. +4
    -4
      drivers/block/swim3.c
  80. +2
    -2
      drivers/block/swim_iop.c
  81. +1
    -1
      drivers/block/sx8.c
  82. +3
    -3
      drivers/block/ub.c
  83. +1
    -1
      drivers/block/umem.c
  84. +1
    -2
      drivers/block/xd.c
  85. +1
    -2
      drivers/block/xd.h
  86. +1
    -1
      drivers/bluetooth/bcm203x.c
  87. +4
    -4
      drivers/bluetooth/bfusb.c
  88. +1
    -1
      drivers/bluetooth/bluecard_cs.c
  89. +1
    -1
      drivers/bluetooth/bpa10x.c
  90. +1
    -1
      drivers/bluetooth/bt3c_cs.c
  91. +1
    -1
      drivers/bluetooth/btuart_cs.c
  92. +1
    -1
      drivers/bluetooth/dtl1_cs.c
  93. +4
    -4
      drivers/bluetooth/hci_usb.c
  94. +1
    -1
      drivers/cdrom/cdu31a.c
  95. +1
    -1
      drivers/cdrom/cm206.c
  96. +1
    -1
      drivers/cdrom/mcdx.c
  97. +1
    -1
      drivers/cdrom/sonycd535.c
  98. +3
    -3
      drivers/char/amiserial.c
  99. +2
    -2
      drivers/char/applicom.c
  100. +2
    -2
      drivers/char/cyclades.c

+ 2
- 3
arch/frv/kernel/dma.c View File

@ -121,15 +121,14 @@ unsigned long frv_dma_inprogress;
/*
* DMA irq handler - determine channel involved, grab status and call real handler
*/
static irqreturn_t dma_irq_handler(int irq, void *_channel, struct pt_regs *regs)
static irqreturn_t dma_irq_handler(int irq, void *_channel)
{
struct frv_dma_channel *channel = _channel;
frv_clear_dma_inprogress(channel - frv_dma_channels);
return channel->handler(channel - frv_dma_channels,
__get_DMAC(channel->ioaddr, CSTR),
channel->data,
regs);
channel->data);
} /* end dma_irq_handler() */


+ 2
- 2
arch/frv/kernel/irq-mb93091.c View File

@ -80,7 +80,7 @@ static struct irq_chip frv_fpga_pic = {
/*
* FPGA PIC interrupt handler
*/
static irqreturn_t fpga_interrupt(int irq, void *_mask, struct pt_regs *regs)
static irqreturn_t fpga_interrupt(int irq, void *_mask)
{
uint16_t imr, mask = (unsigned long) _mask;
@ -95,7 +95,7 @@ static irqreturn_t fpga_interrupt(int irq, void *_mask, struct pt_regs *regs)
irq = 31 - irq;
mask &= ~(1 << irq);
generic_handle_irq(IRQ_BASE_FPGA + irq, regs);
generic_handle_irq(IRQ_BASE_FPGA + irq);
}
return IRQ_HANDLED;


+ 2
- 2
arch/frv/kernel/irq-mb93093.c View File

@ -79,7 +79,7 @@ static struct irq_chip frv_fpga_pic = {
/*
* FPGA PIC interrupt handler
*/
static irqreturn_t fpga_interrupt(int irq, void *_mask, struct pt_regs *regs)
static irqreturn_t fpga_interrupt(int irq, void *_mask)
{
uint16_t imr, mask = (unsigned long) _mask;
@ -94,7 +94,7 @@ static irqreturn_t fpga_interrupt(int irq, void *_mask, struct pt_regs *regs)
irq = 31 - irq;
mask &= ~(1 << irq);
generic_irq_handle(IRQ_BASE_FPGA + irq, regs);
generic_irq_handle(IRQ_BASE_FPGA + irq);
}
return IRQ_HANDLED;


+ 2
- 2
arch/frv/kernel/irq-mb93493.c View File

@ -90,7 +90,7 @@ static struct irq_chip frv_mb93493_pic = {
/*
* MB93493 PIC interrupt handler
*/
static irqreturn_t mb93493_interrupt(int irq, void *_piqsr, struct pt_regs *regs)
static irqreturn_t mb93493_interrupt(int irq, void *_piqsr)
{
volatile void *piqsr = _piqsr;
uint32_t iqsr;
@ -106,7 +106,7 @@ static irqreturn_t mb93493_interrupt(int irq, void *_piqsr, struct pt_regs *regs
irq = 31 - irq;
iqsr &= ~(1 << irq);
generic_handle_irq(IRQ_BASE_MB93493 + irq, regs);
generic_handle_irq(IRQ_BASE_MB93493 + irq);
}
return IRQ_HANDLED;


+ 1
- 1
arch/frv/kernel/irq.c View File

@ -143,7 +143,7 @@ static struct irq_chip frv_cpu_pic = {
asmlinkage void do_IRQ(void)
{
irq_enter();
generic_handle_irq(__get_IRL(), __frame);
generic_handle_irq(__get_IRL());
irq_exit();
}


+ 4
- 4
arch/frv/kernel/time.c View File

@ -40,7 +40,7 @@ unsigned long __nongprelbss __dsu_clock_speed_HZ;
unsigned long __nongprelbss __serial_clock_speed_HZ;
unsigned long __delay_loops_MHz;
static irqreturn_t timer_interrupt(int irq, void *dummy, struct pt_regs *regs);
static irqreturn_t timer_interrupt(int irq, void *dummy);
static struct irqaction timer_irq = {
timer_interrupt, IRQF_DISABLED, CPU_MASK_NONE, "timer", NULL, NULL
@ -55,7 +55,7 @@ static inline int set_rtc_mmss(unsigned long nowtime)
* timer_interrupt() needs to keep up the real-time clock,
* as well as call the "do_timer()" routine every clocktick
*/
static irqreturn_t timer_interrupt(int irq, void *dummy, struct pt_regs * regs)
static irqreturn_t timer_interrupt(int irq, void *dummy)
{
/* last time the cmos clock got updated */
static long last_rtc_update = 0;
@ -70,8 +70,8 @@ static irqreturn_t timer_interrupt(int irq, void *dummy, struct pt_regs * regs)
write_seqlock(&xtime_lock);
do_timer(1);
update_process_times(user_mode(regs));
profile_tick(CPU_PROFILING, regs);
update_process_times(user_mode(get_irq_regs()));
profile_tick(CPU_PROFILING);
/*
* If we have an externally synchronized Linux clock, then update


+ 10
- 8
arch/i386/kernel/apic.c View File

@ -1193,11 +1193,11 @@ EXPORT_SYMBOL(switch_ipi_to_APIC_timer);
* value into /proc/profile.
*/
inline void smp_local_timer_interrupt(struct pt_regs * regs)
inline void smp_local_timer_interrupt(void)
{
profile_tick(CPU_PROFILING, regs);
profile_tick(CPU_PROFILING);
#ifdef CONFIG_SMP
update_process_times(user_mode_vm(regs));
update_process_times(user_mode_vm(irq_regs));
#endif
/*
@ -1223,6 +1223,7 @@ inline void smp_local_timer_interrupt(struct pt_regs * regs)
fastcall void smp_apic_timer_interrupt(struct pt_regs *regs)
{
struct pt_regs *old_regs = set_irq_regs(regs);
int cpu = smp_processor_id();
/*
@ -1241,12 +1242,13 @@ fastcall void smp_apic_timer_interrupt(struct pt_regs *regs)
* interrupt lock, which is the WrongThing (tm) to do.
*/
irq_enter();
smp_local_timer_interrupt(regs);
smp_local_timer_interrupt();
irq_exit();
set_irq_regs(old_regs);
}
#ifndef CONFIG_SMP
static void up_apic_timer_interrupt_call(struct pt_regs *regs)
static void up_apic_timer_interrupt_call(void)
{
int cpu = smp_processor_id();
@ -1255,11 +1257,11 @@ static void up_apic_timer_interrupt_call(struct pt_regs *regs)
*/
per_cpu(irq_stat, cpu).apic_timer_irqs++;
smp_local_timer_interrupt(regs);
smp_local_timer_interrupt();
}
#endif
void smp_send_timer_broadcast_ipi(struct pt_regs *regs)
void smp_send_timer_broadcast_ipi(void)
{
cpumask_t mask;
@ -1272,7 +1274,7 @@ void smp_send_timer_broadcast_ipi(struct pt_regs *regs)
* We can directly call the apic timer interrupt handler
* in UP case. Minus all irq related functions
*/
up_apic_timer_interrupt_call(regs);
up_apic_timer_interrupt_call();
#endif
}
}


+ 2
- 2
arch/i386/kernel/i8259.c View File

@ -335,13 +335,13 @@ void init_8259A(int auto_eoi)
*/
static irqreturn_t math_error_irq(int cpl, void *dev_id, struct pt_regs *regs)
static irqreturn_t math_error_irq(int cpl, void *dev_id)
{
extern void math_error(void __user *);
outb(0,0xF0);
if (ignore_fpu_irq || !boot_cpu_data.hard_math)
return IRQ_NONE;
math_error((void __user *)regs->eip);
math_error((void __user *)get_irq_regs()->eip);
return IRQ_HANDLED;
}


+ 7
- 5
arch/i386/kernel/irq.c View File

@ -53,6 +53,7 @@ static union irq_ctx *softirq_ctx[NR_CPUS] __read_mostly;
*/
fastcall unsigned int do_IRQ(struct pt_regs *regs)
{
struct pt_regs *old_regs;
/* high bit used in ret_from_ code */
int irq = ~regs->orig_eax;
struct irq_desc *desc = irq_desc + irq;
@ -67,6 +68,7 @@ fastcall unsigned int do_IRQ(struct pt_regs *regs)
BUG();
}
old_regs = set_irq_regs(regs);
irq_enter();
#ifdef CONFIG_DEBUG_STACKOVERFLOW
/* Debugging check for stack overflow: is there less than 1KB free? */
@ -95,7 +97,7 @@ fastcall unsigned int do_IRQ(struct pt_regs *regs)
* current stack (which is the irq stack already after all)
*/
if (curctx != irqctx) {
int arg1, arg2, arg3, ebx;
int arg1, arg2, ebx;
/* build the stack frame on the IRQ stack */
isp = (u32*) ((char*)irqctx + sizeof(*irqctx));
@ -114,17 +116,17 @@ fastcall unsigned int do_IRQ(struct pt_regs *regs)
" xchgl %%ebx,%%esp \n"
" call *%%edi \n"
" movl %%ebx,%%esp \n"
: "=a" (arg1), "=d" (arg2), "=c" (arg3), "=b" (ebx)
: "0" (irq), "1" (desc), "2" (regs), "3" (isp),
: "=a" (arg1), "=d" (arg2), "=b" (ebx)
: "0" (irq), "1" (desc), "2" (isp),
"D" (desc->handle_irq)
: "memory", "cc"
);
} else
#endif
desc->handle_irq(irq, desc, regs);
desc->handle_irq(irq, desc);
irq_exit();
set_irq_regs(old_regs);
return 1;
}


+ 6
- 0
arch/i386/kernel/smp.c View File

@ -321,6 +321,7 @@ static inline void leave_mm (unsigned long cpu)
fastcall void smp_invalidate_interrupt(struct pt_regs *regs)
{
struct pt_regs *old_regs = set_irq_regs(regs);
unsigned long cpu;
cpu = get_cpu();
@ -351,6 +352,7 @@ fastcall void smp_invalidate_interrupt(struct pt_regs *regs)
smp_mb__after_clear_bit();
out:
put_cpu_no_resched();
set_irq_regs(old_regs);
}
static void flush_tlb_others(cpumask_t cpumask, struct mm_struct *mm,
@ -605,11 +607,14 @@ void smp_send_stop(void)
*/
fastcall void smp_reschedule_interrupt(struct pt_regs *regs)
{
struct pt_regs *old_regs = set_irq_regs(regs);
ack_APIC_irq();
set_irq_regs(old_regs);
}
fastcall void smp_call_function_interrupt(struct pt_regs *regs)
{
struct pt_regs *old_regs = set_irq_regs(regs);
void (*func) (void *info) = call_data->func;
void *info = call_data->info;
int wait = call_data->wait;
@ -632,6 +637,7 @@ fastcall void smp_call_function_interrupt(struct pt_regs *regs)
mb();
atomic_inc(&call_data->finished);
}
set_irq_regs(old_regs);
}
/*


+ 3
- 3
arch/i386/kernel/time.c View File

@ -161,7 +161,7 @@ EXPORT_SYMBOL(profile_pc);
* Time Stamp Counter value at the time of the timer interrupt, so that
* we later on can estimate the time of day more exactly.
*/
irqreturn_t timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
irqreturn_t timer_interrupt(int irq, void *dev_id)
{
/*
* Here we are in the timer irq handler. We just have irqs locally
@ -188,7 +188,7 @@ irqreturn_t timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
}
#endif
do_timer_interrupt_hook(regs);
do_timer_interrupt_hook();
if (MCA_bus) {
@ -209,7 +209,7 @@ irqreturn_t timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
#ifdef CONFIG_X86_LOCAL_APIC
if (using_apic_timer)
smp_send_timer_broadcast_ipi(regs);
smp_send_timer_broadcast_ipi();
#endif
return IRQ_HANDLED;


+ 2
- 2
arch/i386/kernel/time_hpet.c View File

@ -441,7 +441,7 @@ int hpet_rtc_dropped_irq(void)
return 1;
}
irqreturn_t hpet_rtc_interrupt(int irq, void *dev_id, struct pt_regs *regs)
irqreturn_t hpet_rtc_interrupt(int irq, void *dev_id)
{
struct rtc_time curr_time;
unsigned long rtc_int_flag = 0;
@ -480,7 +480,7 @@ irqreturn_t hpet_rtc_interrupt(int irq, void *dev_id, struct pt_regs *regs)
}
if (call_rtc_interrupt) {
rtc_int_flag |= (RTC_IRQF | (RTC_NUM_INTS << 8));
rtc_interrupt(rtc_int_flag, dev_id, regs);
rtc_interrupt(rtc_int_flag, dev_id);
}
return IRQ_HANDLED;
}


+ 1
- 1
arch/i386/kernel/vm86.c View File

@ -714,7 +714,7 @@ static int irqbits;
| (1 << SIGUSR1) | (1 << SIGUSR2) | (1 << SIGIO) | (1 << SIGURG) \
| (1 << SIGUNUSED) )
static irqreturn_t irq_handler(int intno, void *dev_id, struct pt_regs * regs)
static irqreturn_t irq_handler(int intno, void *dev_id)
{
int irq_bit;
unsigned long flags;


+ 2
- 2
arch/i386/mach-visws/visws_apic.c View File

@ -191,7 +191,7 @@ static struct hw_interrupt_type piix4_virtual_irq_type = {
* enable_irq gets the right irq. This 'master' irq is never directly
* manipulated by any driver.
*/
static irqreturn_t piix4_master_intr(int irq, void *dev_id, struct pt_regs * regs)
static irqreturn_t piix4_master_intr(int irq, void *dev_id)
{
int realirq;
irq_desc_t *desc;
@ -244,7 +244,7 @@ static irqreturn_t piix4_master_intr(int irq, void *dev_id, struct pt_regs * reg
kstat_cpu(smp_processor_id()).irqs[realirq]++;
if (likely(desc->action != NULL))
handle_IRQ_event(realirq, regs, desc->action);
handle_IRQ_event(realirq, desc->action);
if (!(desc->status & IRQ_DISABLED))
enable_8259A_irq(realirq);


+ 1
- 1
arch/i386/mach-voyager/voyager_basic.c View File

@ -87,7 +87,7 @@ voyager_detect(struct voyager_bios_info *bios)
}
void
voyager_system_interrupt(int cpl, void *dev_id, struct pt_regs *regs)
voyager_system_interrupt(int cpl, void *dev_id)
{
printk("Voyager: detected system interrupt\n");
}


+ 18
- 10
arch/i386/mach-voyager/voyager_smp.c View File

@ -126,10 +126,10 @@ send_QIC_CPI(__u32 cpuset, __u8 cpi)
}
static inline void
wrapper_smp_local_timer_interrupt(struct pt_regs *regs)
wrapper_smp_local_timer_interrupt(void)
{
irq_enter();
smp_local_timer_interrupt(regs);
smp_local_timer_interrupt();
irq_exit();
}
@ -786,7 +786,7 @@ fastcall void
smp_vic_sys_interrupt(struct pt_regs *regs)
{
ack_CPI(VIC_SYS_INT);
printk("Voyager SYSTEM INTERRUPT\n");
printk("Voyager SYSTEM INTERRUPT\n");
}
/* Handle a voyager CMN_INT; These interrupts occur either because of
@ -1135,7 +1135,9 @@ EXPORT_SYMBOL(smp_call_function);
fastcall void
smp_apic_timer_interrupt(struct pt_regs *regs)
{
wrapper_smp_local_timer_interrupt(regs);
struct pt_regs *old_regs = set_irq_regs(regs);
wrapper_smp_local_timer_interrupt();
set_irq_regs(old_regs);
}
/* All of the QUAD interrupt GATES */
@ -1143,7 +1145,9 @@ fastcall void
smp_qic_timer_interrupt(struct pt_regs *regs)
{
ack_QIC_CPI(QIC_TIMER_CPI);
wrapper_smp_local_timer_interrupt(regs);
struct pt_regs *old_regs = set_irq_regs(regs);
wrapper_smp_local_timer_interrupt(void);
set_irq_regs(old_regs);
}
fastcall void
@ -1177,6 +1181,7 @@ smp_qic_call_function_interrupt(struct pt_regs *regs)
fastcall void
smp_vic_cpi_interrupt(struct pt_regs *regs)
{
struct pt_regs *old_regs = set_irq_regs(regs);
__u8 cpu = smp_processor_id();
if(is_cpu_quad())
@ -1185,7 +1190,7 @@ smp_vic_cpi_interrupt(struct pt_regs *regs)
ack_VIC_CPI(VIC_CPI_LEVEL0);
if(test_and_clear_bit(VIC_TIMER_CPI, &vic_cpi_mailbox[cpu]))
wrapper_smp_local_timer_interrupt(regs);
wrapper_smp_local_timer_interrupt();
if(test_and_clear_bit(VIC_INVALIDATE_CPI, &vic_cpi_mailbox[cpu]))
smp_invalidate_interrupt();
if(test_and_clear_bit(VIC_RESCHEDULE_CPI, &vic_cpi_mailbox[cpu]))
@ -1194,6 +1199,7 @@ smp_vic_cpi_interrupt(struct pt_regs *regs)
smp_enable_irq_interrupt();
if(test_and_clear_bit(VIC_CALL_FUNCTION_CPI, &vic_cpi_mailbox[cpu]))
smp_call_function_interrupt();
set_irq_regs(old_regs);
}
static void
@ -1266,8 +1272,10 @@ smp_send_stop(void)
void
smp_vic_timer_interrupt(struct pt_regs *regs)
{
struct pt_regs *old_regs = set_irq_regs(regs);
send_CPI_allbutself(VIC_TIMER_CPI);
smp_local_timer_interrupt(regs);
smp_local_timer_interrupt();
set_irq_regs(old_regs);
}
/* local (per CPU) timer interrupt. It does both profiling and
@ -1279,12 +1287,12 @@ smp_vic_timer_interrupt(struct pt_regs *regs)
* value into /proc/profile.
*/
void
smp_local_timer_interrupt(struct pt_regs * regs)
smp_local_timer_interrupt(void)
{
int cpu = smp_processor_id();
long weight;
profile_tick(CPU_PROFILING, regs);
profile_tick(CPU_PROFILING);
if (--per_cpu(prof_counter, cpu) <= 0) {
/*
* The multiplier may have changed since the last time we got
@ -1302,7 +1310,7 @@ smp_local_timer_interrupt(struct pt_regs * regs)
per_cpu(prof_counter, cpu);
}
update_process_times(user_mode_vm(regs));
update_process_times(user_mode_vm(irq_regs));
}
if( ((1<<cpu) & voyager_extended_vic_processors) == 0)


+ 3
- 1
arch/ia64/kernel/irq_ia64.c View File

@ -138,6 +138,7 @@ void destroy_irq(unsigned int irq)
void
ia64_handle_irq (ia64_vector vector, struct pt_regs *regs)
{
struct pt_regs *old_regs = set_irq_regs(regs);
unsigned long saved_tpr;
#if IRQ_DEBUG
@ -183,7 +184,7 @@ ia64_handle_irq (ia64_vector vector, struct pt_regs *regs)
ia64_setreg(_IA64_REG_CR_TPR, vector);
ia64_srlz_d();
__do_IRQ(local_vector_to_irq(vector), regs);
__do_IRQ(local_vector_to_irq(vector));
/*
* Disable interrupts and send EOI:
@ -200,6 +201,7 @@ ia64_handle_irq (ia64_vector vector, struct pt_regs *regs)
* come through until ia64_eoi() has been done.
*/
irq_exit();
set_irq_regs(old_regs);
}
#ifdef CONFIG_HOTPLUG_CPU


+ 1
- 1
arch/ia64/kernel/machvec.c View File

@ -60,7 +60,7 @@ machvec_setup (char **arg)
EXPORT_SYMBOL(machvec_setup);
void
machvec_timer_interrupt (int irq, void *dev_id, struct pt_regs *regs)
machvec_timer_interrupt (int irq, void *dev_id)
{
}
EXPORT_SYMBOL(machvec_timer_interrupt);


+ 14
- 18
arch/ia64/kernel/mca.c View File

@ -499,7 +499,7 @@ int cpe_vector = -1;
int ia64_cpe_irq = -1;
static irqreturn_t
ia64_mca_cpe_int_handler (int cpe_irq, void *arg, struct pt_regs *ptregs)
ia64_mca_cpe_int_handler (int cpe_irq, void *arg)
{
static unsigned long cpe_history[CPE_HISTORY_LENGTH];
static int index;
@ -744,7 +744,7 @@ ia64_mca_wakeup_all(void)
* Outputs : None
*/
static irqreturn_t
ia64_mca_rendez_int_handler(int rendez_irq, void *arg, struct pt_regs *regs)
ia64_mca_rendez_int_handler(int rendez_irq, void *arg)
{
unsigned long flags;
int cpu = smp_processor_id();
@ -753,8 +753,8 @@ ia64_mca_rendez_int_handler(int rendez_irq, void *arg, struct pt_regs *regs)
/* Mask all interrupts */
local_irq_save(flags);
if (notify_die(DIE_MCA_RENDZVOUS_ENTER, "MCA", regs, (long)&nd, 0, 0)
== NOTIFY_STOP)
if (notify_die(DIE_MCA_RENDZVOUS_ENTER, "MCA", get_irq_regs(),
(long)&nd, 0, 0) == NOTIFY_STOP)
ia64_mca_spin(__FUNCTION__);
ia64_mc_info.imi_rendez_checkin[cpu] = IA64_MCA_RENDEZ_CHECKIN_DONE;
@ -763,16 +763,16 @@ ia64_mca_rendez_int_handler(int rendez_irq, void *arg, struct pt_regs *regs)
*/
ia64_sal_mc_rendez();
if (notify_die(DIE_MCA_RENDZVOUS_PROCESS, "MCA", regs, (long)&nd, 0, 0)
== NOTIFY_STOP)
if (notify_die(DIE_MCA_RENDZVOUS_PROCESS, "MCA", get_irq_regs(),
(long)&nd, 0, 0) == NOTIFY_STOP)
ia64_mca_spin(__FUNCTION__);
/* Wait for the monarch cpu to exit. */
while (monarch_cpu != -1)
cpu_relax(); /* spin until monarch leaves */
if (notify_die(DIE_MCA_RENDZVOUS_LEAVE, "MCA", regs, (long)&nd, 0, 0)
== NOTIFY_STOP)
if (notify_die(DIE_MCA_RENDZVOUS_LEAVE, "MCA", get_irq_regs(),
(long)&nd, 0, 0) == NOTIFY_STOP)
ia64_mca_spin(__FUNCTION__);
/* Enable all interrupts */
@ -791,12 +791,11 @@ ia64_mca_rendez_int_handler(int rendez_irq, void *arg, struct pt_regs *regs)
*
* Inputs : wakeup_irq (Wakeup-interrupt bit)
* arg (Interrupt handler specific argument)
* ptregs (Exception frame at the time of the interrupt)
* Outputs : None
*
*/
static irqreturn_t
ia64_mca_wakeup_int_handler(int wakeup_irq, void *arg, struct pt_regs *ptregs)
ia64_mca_wakeup_int_handler(int wakeup_irq, void *arg)
{
return IRQ_HANDLED;
}
@ -1261,13 +1260,12 @@ static DECLARE_WORK(cmc_enable_work, ia64_mca_cmc_vector_enable_keventd, NULL);
* Inputs
* interrupt number
* client data arg ptr
* saved registers ptr
*
* Outputs
* None
*/
static irqreturn_t
ia64_mca_cmc_int_handler(int cmc_irq, void *arg, struct pt_regs *ptregs)
ia64_mca_cmc_int_handler(int cmc_irq, void *arg)
{
static unsigned long cmc_history[CMC_HISTORY_LENGTH];
static int index;
@ -1336,12 +1334,11 @@ out:
* Inputs
* interrupt number
* client data arg ptr
* saved registers ptr
* Outputs
* handled
*/
static irqreturn_t
ia64_mca_cmc_int_caller(int cmc_irq, void *arg, struct pt_regs *ptregs)
ia64_mca_cmc_int_caller(int cmc_irq, void *arg)
{
static int start_count = -1;
unsigned int cpuid;
@ -1352,7 +1349,7 @@ ia64_mca_cmc_int_caller(int cmc_irq, void *arg, struct pt_regs *ptregs)
if (start_count == -1)
start_count = IA64_LOG_COUNT(SAL_INFO_TYPE_CMC);
ia64_mca_cmc_int_handler(cmc_irq, arg, ptregs);
ia64_mca_cmc_int_handler(cmc_irq, arg);
for (++cpuid ; cpuid < NR_CPUS && !cpu_online(cpuid) ; cpuid++);
@ -1403,14 +1400,13 @@ ia64_mca_cmc_poll (unsigned long dummy)
* Inputs
* interrupt number
* client data arg ptr
* saved registers ptr
* Outputs
* handled
*/
#ifdef CONFIG_ACPI
static irqreturn_t
ia64_mca_cpe_int_caller(int cpe_irq, void *arg, struct pt_regs *ptregs)
ia64_mca_cpe_int_caller(int cpe_irq, void *arg)
{
static int start_count = -1;
static int poll_time = MIN_CPE_POLL_INTERVAL;
@ -1422,7 +1418,7 @@ ia64_mca_cpe_int_caller(int cpe_irq, void *arg, struct pt_regs *ptregs)
if (start_count == -1)
start_count = IA64_LOG_COUNT(SAL_INFO_TYPE_CPE);
ia64_mca_cpe_int_handler(cpe_irq, arg, ptregs);
ia64_mca_cpe_int_handler(cpe_irq, arg);
for (++cpuid ; cpuid < NR_CPUS && !cpu_online(cpuid) ; cpuid++);


+ 4
- 4
arch/ia64/kernel/time.c View File

@ -45,7 +45,7 @@ static struct time_interpolator itc_interpolator = {
};
static irqreturn_t
timer_interrupt (int irq, void *dev_id, struct pt_regs *regs)
timer_interrupt (int irq, void *dev_id)
{
unsigned long new_itm;
@ -53,7 +53,7 @@ timer_interrupt (int irq, void *dev_id, struct pt_regs *regs)
return IRQ_HANDLED;
}
platform_timer_interrupt(irq, dev_id, regs);
platform_timer_interrupt(irq, dev_id);
new_itm = local_cpu_data->itm_next;
@ -61,10 +61,10 @@ timer_interrupt (int irq, void *dev_id, struct pt_regs *regs)
printk(KERN_ERR "Oops: timer tick before it's due (itc=%lx,itm=%lx)\n",
ia64_get_itc(), new_itm);
profile_tick(CPU_PROFILING, regs);
profile_tick(CPU_PROFILING);
while (1) {
update_process_times(user_mode(regs));
update_process_times(user_mode(get_irq_regs()));
new_itm += local_cpu_data->itm_delta;


+ 1
- 2
arch/ia64/sn/pci/tioca_provider.c View File

@ -550,13 +550,12 @@ tioca_dma_map(struct pci_dev *pdev, u64 paddr, size_t byte_count, int dma_flags)
* tioca_error_intr_handler - SGI TIO CA error interrupt handler
* @irq: unused
* @arg: pointer to tioca_common struct for the given CA
* @pt: unused
*
* Handle a CA error interrupt. Simply a wrapper around a SAL call which
* defers processing to the SGI prom.
*/
static irqreturn_t
tioca_error_intr_handler(int irq, void *arg, struct pt_regs *pt)
tioca_error_intr_handler(int irq, void *arg)
{
struct tioca_common *soft = arg;
struct ia64_sal_retval ret_stuff;


+ 1
- 2
arch/ia64/sn/pci/tioce_provider.c View File

@ -666,12 +666,11 @@ tioce_dma_consistent(struct pci_dev *pdev, u64 paddr, size_t byte_count, int dma
* tioce_error_intr_handler - SGI TIO CE error interrupt handler
* @irq: unused
* @arg: pointer to tioce_common struct for the given CE
* @pt: unused
*
* Handle a CE error interrupt. Simply a wrapper around a SAL call which
* defers processing to the SGI prom.
*/ static irqreturn_t
tioce_error_intr_handler(int irq, void *arg, struct pt_regs *pt)
tioce_error_intr_handler(int irq, void *arg)
{
struct tioce_common *soft = arg;
struct ia64_sal_retval ret_stuff;


+ 3
- 1
arch/mips/kernel/irq.c View File

@ -55,13 +55,15 @@ unsigned long irq_hwmask[NR_IRQS];
*/
asmlinkage unsigned int do_IRQ(unsigned int irq, struct pt_regs *regs)
{
struct pt_regs *old_regs = set_irq_regs(regs);
irq_enter();
__DO_IRQ_SMTC_HOOK();
__do_IRQ(irq, regs);
__do_IRQ(irq);
irq_exit();
set_irq_regs(old_regs);
return 1;
}


+ 14
- 10
arch/mips/kernel/time.c View File

@ -322,18 +322,18 @@ static long last_rtc_update;
* a broadcasted inter-processor interrupt which itself is triggered
* by the global timer interrupt.
*/
void local_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
void local_timer_interrupt(int irq, void *dev_id)
{
if (current->pid)
profile_tick(CPU_PROFILING, regs);
update_process_times(user_mode(regs));
profile_tick(CPU_PROFILING);
update_process_times(user_mode(get_irq_regs()));
}
/*
* High-level timer interrupt service routines. This function
* is set as irqaction->handler and is invoked through do_IRQ.
*/
irqreturn_t timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
irqreturn_t timer_interrupt(int irq, void *dev_id)
{
unsigned long j;
unsigned int count;
@ -419,23 +419,24 @@ irqreturn_t timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
* In SMP mode, local_timer_interrupt() is invoked by appropriate
* low-level local timer interrupt handler.
*/
local_timer_interrupt(irq, dev_id, regs);
local_timer_interrupt(irq, dev_id);
return IRQ_HANDLED;
}
int null_perf_irq(struct pt_regs *regs)
int null_perf_irq(void)
{
return 0;
}
int (*perf_irq)(struct pt_regs *regs) = null_perf_irq;
int (*perf_irq)(void) = null_perf_irq;
EXPORT_SYMBOL(null_perf_irq);
EXPORT_SYMBOL(perf_irq);
asmlinkage void ll_timer_interrupt(int irq, struct pt_regs *regs)
{
struct pt_regs *old_regs = set_irq_regs(regs);
int r2 = cpu_has_mips_r2;
irq_enter();
@ -448,27 +449,30 @@ asmlinkage void ll_timer_interrupt(int irq, struct pt_regs *regs)
* performance counter interrupt handler anyway.
*/
if (!r2 || (read_c0_cause() & (1 << 26)))
if (perf_irq(regs))
if (perf_irq())
goto out;
/* we keep interrupt disabled all the time */
if (!r2 || (read_c0_cause() & (1 << 30)))
timer_interrupt(irq, NULL, regs);
timer_interrupt(irq, NULL);
out:
irq_exit();
set_irq_regs(old_regs);
}
asmlinkage void ll_local_timer_interrupt(int irq, struct pt_regs *regs)
{
struct pt_regs *old_regs = set_irq_regs(regs);
irq_enter();
if (smp_processor_id() != 0)
kstat_this_cpu.irqs[irq]++;
/* we keep interrupt disabled all the time */
local_timer_interrupt(irq, NULL, regs);
local_timer_interrupt(irq, NULL);
irq_exit();
set_irq_regs(old_regs);
}
/*


+ 1
- 1
arch/mips/sgi-ip22/ip22-reset.c View File

@ -169,7 +169,7 @@ static inline void volume_down_button(unsigned long data)
}
}
static irqreturn_t panel_int(int irq, void *dev_id, struct pt_regs *regs)
static irqreturn_t panel_int(int irq, void *dev_id)
{
unsigned int buttons;


+ 3
- 1
arch/mips/sgi-ip22/ip22-time.c View File

@ -191,12 +191,14 @@ void indy_8254timer_irq(struct pt_regs *regs)
void indy_r4k_timer_interrupt(struct pt_regs *regs)
{
struct pt_regs *old_regs = set_irq_regs(regs);
int irq = SGI_TIMER_IRQ;
irq_enter();
kstat_this_cpu.irqs[irq]++;
timer_interrupt(irq, NULL, regs);
timer_interrupt(irq, NULL);
irq_exit();
set_irq_regs(old_regs);
}
void __init plat_timer_setup(struct irqaction *irq)


+ 4
- 2
arch/powerpc/kernel/irq.c View File

@ -187,6 +187,7 @@ void fixup_irqs(cpumask_t map)
void do_IRQ(struct pt_regs *regs)
{
struct pt_regs *old_regs = set_irq_regs(regs);
unsigned int irq;
#ifdef CONFIG_IRQSTACKS
struct thread_info *curtp, *irqtp;
@ -230,18 +231,19 @@ void do_IRQ(struct pt_regs *regs)
handler = &__do_IRQ;
irqtp->task = curtp->task;
irqtp->flags = 0;
call_handle_irq(irq, desc, regs, irqtp, handler);
call_handle_irq(irq, desc, irqtp, handler);
irqtp->task = NULL;
if (irqtp->flags)
set_bits(irqtp->flags, &curtp->flags);
} else
#endif
generic_handle_irq(irq, regs);
generic_handle_irq(irq);
} else if (irq != NO_IRQ_IGNORE)
/* That's not SMP safe ... but who cares ? */
ppc_spurious_interrupts++;
irq_exit();
set_irq_regs(old_regs);
#ifdef CONFIG_PPC_ISERIES
if (get_lppaca()->int_dword.fields.decr_int) {


+ 3
- 3
arch/powerpc/kernel/misc_64.S View File

@ -52,12 +52,12 @@ _GLOBAL(call_do_softirq)
blr
_GLOBAL(call_handle_irq)
ld r8,0(r7)
ld r8,0(r6)
mflr r0
std r0,16(r1)
mtctr r8
stdu r1,THREAD_SIZE-112(r6)
mr r1,r6
stdu r1,THREAD_SIZE-112(r5)
mr r1,r5
bctrl
ld r1,0(r1)
ld r0,16(r1)


+ 3
- 3
arch/powerpc/kernel/smp.c View File

@ -115,7 +115,7 @@ void __devinit smp_generic_kick_cpu(int nr)
}
#endif
void smp_message_recv(int msg, struct pt_regs *regs)
void smp_message_recv(int msg)
{
switch(msg) {
case PPC_MSG_CALL_FUNCTION:
@ -127,11 +127,11 @@ void smp_message_recv(int msg, struct pt_regs *regs)
break;
case PPC_MSG_DEBUGGER_BREAK:
if (crash_ipi_function_ptr) {
crash_ipi_function_ptr(regs);
crash_ipi_function_ptr(get_irq_regs());
break;
}
#ifdef CONFIG_DEBUGGER
debugger_ipi(regs);
debugger_ipi(get_irq_regs());
break;
#endif /* CONFIG_DEBUGGER */
/* FALLTHROUGH */


+ 5
- 1
arch/powerpc/kernel/time.c View File

@ -51,6 +51,7 @@
#include <linux/rtc.h>
#include <linux/jiffies.h>
#include <linux/posix-timers.h>
#include <linux/irq.h>
#include <asm/io.h>
#include <asm/processor.h>
@ -643,6 +644,7 @@ static void iSeries_tb_recal(void)
*/
void timer_interrupt(struct pt_regs * regs)
{
struct pt_regs *old_regs;
int next_dec;
int cpu = smp_processor_id();
unsigned long ticks;
@ -653,9 +655,10 @@ void timer_interrupt(struct pt_regs * regs)
do_IRQ(regs);
#endif
old_regs = set_irq_regs(regs);
irq_enter();
profile_tick(CPU_PROFILING, regs);
profile_tick(CPU_PROFILING);
calculate_steal_time();
#ifdef CONFIG_PPC_ISERIES
@ -715,6 +718,7 @@ void timer_interrupt(struct pt_regs * regs)
#endif
irq_exit();
set_irq_regs(old_regs);
}
void wakeup_decrementer(void)


+ 2
- 2
arch/powerpc/platforms/cell/interrupt.c View File

@ -190,11 +190,11 @@ struct irq_host *iic_get_irq_host(int node)
EXPORT_SYMBOL_GPL(iic_get_irq_host);
static irqreturn_t iic_ipi_action(int irq, void *dev_id, struct pt_regs *regs)
static irqreturn_t iic_ipi_action(int irq, void *dev_id)
{
int ipi = (int)(long)dev_id;
smp_message_recv(ipi, regs);
smp_message_recv(ipi);
return IRQ_HANDLED;
}


+ 2
- 3
arch/powerpc/platforms/cell/spider-pic.c View File

@ -213,8 +213,7 @@ static struct irq_host_ops spider_host_ops = {
.xlate = spider_host_xlate,
};
static void spider_irq_cascade(unsigned int irq, struct irq_desc *desc,
struct pt_regs *regs)
static void spider_irq_cascade(unsigned int irq, struct irq_desc *desc)
{
struct spider_pic *pic = desc->handler_data;
unsigned int cs, virq;
@ -225,7 +224,7 @@ static void spider_irq_cascade(unsigned int irq, struct irq_desc *desc,
else
virq = irq_linear_revmap(pic->host, cs);
if (virq != NO_IRQ)
generic_handle_irq(virq, regs);
generic_handle_irq(virq);
desc->chip->eoi(irq);
}


+ 1
- 1
arch/powerpc/platforms/powermac/low_i2c.c View File

@ -342,7 +342,7 @@ static void kw_i2c_handle_interrupt(struct pmac_i2c_host_kw *host, u8 isr)
}
/* Interrupt handler */
static irqreturn_t kw_i2c_irq(int irq, void *dev_id, struct pt_regs *regs)
static irqreturn_t kw_i2c_irq(int irq, void *dev_id)
{
struct pmac_i2c_host_kw *host = dev_id;
unsigned long flags;


+ 1
- 1
arch/powerpc/platforms/powermac/pfunc_base.c View File

@ -15,7 +15,7 @@
#define DBG(fmt...)
#endif
static irqreturn_t macio_gpio_irq(int irq, void *data, struct pt_regs *regs)
static irqreturn_t macio_gpio_irq(int irq, void *data)
{
pmf_do_irq(data);


+ 3
- 4
arch/powerpc/platforms/powermac/pic.c View File

@ -440,14 +440,13 @@ static void __init pmac_pic_probe_oldstyle(void)
}
#endif /* CONFIG_PPC32 */
static void pmac_u3_cascade(unsigned int irq, struct irq_desc *desc,
struct pt_regs *regs)
static void pmac_u3_cascade(unsigned int irq, struct irq_desc *desc)
{
struct mpic *mpic = desc->handler_data;
unsigned int cascade_irq = mpic_get_one_irq(mpic, regs);
unsigned int cascade_irq = mpic_get_one_irq(mpic, get_irq_regs());
if (cascade_irq != NO_IRQ)
generic_handle_irq(cascade_irq, regs);
generic_handle_irq(cascade_irq);
desc->chip->eoi(irq);
}


+ 5
- 9
arch/powerpc/platforms/pseries/ras.c View File

@ -65,16 +65,14 @@ static int ras_check_exception_token;
#define EPOW_SENSOR_INDEX 0
#define RAS_VECTOR_OFFSET 0x500
static irqreturn_t ras_epow_interrupt(int irq, void *dev_id,
struct pt_regs * regs);
static irqreturn_t ras_error_interrupt(int irq, void *dev_id,
struct pt_regs * regs);
static irqreturn_t ras_epow_interrupt(int irq, void *dev_id);
static irqreturn_t ras_error_interrupt(int irq, void *dev_id);
/* #define DEBUG */
static void request_ras_irqs(struct device_node *np,
irqreturn_t (*handler)(int, void *, struct pt_regs *),
irq_handler_t handler,
const char *name)
{
int i, index, count = 0;
@ -166,8 +164,7 @@ __initcall(init_ras_IRQ);
* to examine the type of power failure and take appropriate action where
* the time horizon permits something useful to be done.
*/
static irqreturn_t
ras_epow_interrupt(int irq, void *dev_id, struct pt_regs * regs)
static irqreturn_t ras_epow_interrupt(int irq, void *dev_id)
{
int status = 0xdeadbeef;
int state = 0;
@ -210,8 +207,7 @@ ras_epow_interrupt(int irq, void *dev_id, struct pt_regs * regs)
* For nonrecoverable errors, an error is logged and we stop all processing
* as quickly as possible in order to prevent propagation of the failure.
*/
static irqreturn_t
ras_error_interrupt(int irq, void *dev_id, struct pt_regs * regs)
static irqreturn_t ras_error_interrupt(int irq, void *dev_id)
{
struct rtas_error_log *rtas_elog;
int status = 0xdeadbeef;


+ 3
- 4
arch/powerpc/platforms/pseries/setup.c View File

@ -121,12 +121,11 @@ static void __init fwnmi_init(void)
fwnmi_active = 1;
}
void pseries_8259_cascade(unsigned int irq, struct irq_desc *desc,
struct pt_regs *regs)
void pseries_8259_cascade(unsigned int irq, struct irq_desc *desc)
{
unsigned int cascade_irq = i8259_irq(regs);
unsigned int cascade_irq = i8259_irq(get_irq_regs());
if (cascade_irq != NO_IRQ)
generic_handle_irq(cascade_irq, regs);
generic_handle_irq(cascade_irq);
desc->chip->eoi(irq);
}


+ 9
- 9
arch/powerpc/platforms/pseries/xics.c View File

@ -324,7 +324,7 @@ static unsigned int xics_get_irq_lpar(struct pt_regs *regs)
#ifdef CONFIG_SMP
static irqreturn_t xics_ipi_dispatch(int cpu, struct pt_regs *regs)
static irqreturn_t xics_ipi_dispatch(int cpu)
{
WARN_ON(cpu_is_offline(cpu));
@ -332,47 +332,47 @@ static irqreturn_t xics_ipi_dispatch(int cpu, struct pt_regs *regs)
if (test_and_clear_bit(PPC_MSG_CALL_FUNCTION,
&xics_ipi_message[cpu].value)) {
mb();
smp_message_recv(PPC_MSG_CALL_FUNCTION, regs);
smp_message_recv(PPC_MSG_CALL_FUNCTION);
}
if (test_and_clear_bit(PPC_MSG_RESCHEDULE,
&xics_ipi_message[cpu].value)) {
mb();
smp_message_recv(PPC_MSG_RESCHEDULE, regs);
smp_message_recv(PPC_MSG_RESCHEDULE);
}
#if 0
if (test_and_clear_bit(PPC_MSG_MIGRATE_TASK,
&xics_ipi_message[cpu].value)) {
mb();
smp_message_recv(PPC_MSG_MIGRATE_TASK, regs);
smp_message_recv(PPC_MSG_MIGRATE_TASK);
}
#endif
#if defined(CONFIG_DEBUGGER) || defined(CONFIG_KEXEC)
if (test_and_clear_bit(PPC_MSG_DEBUGGER_BREAK,
&xics_ipi_message[cpu].value)) {
mb();
smp_message_recv(PPC_MSG_DEBUGGER_BREAK, regs);
smp_message_recv(PPC_MSG_DEBUGGER_BREAK);
}
#endif
}
return IRQ_HANDLED;
}
static irqreturn_t xics_ipi_action_direct(int irq, void *dev_id, struct pt_regs *regs)
static irqreturn_t xics_ipi_action_direct(int irq, void *dev_id)
{
int cpu = smp_processor_id();
direct_qirr_info(cpu, 0xff);
return xics_ipi_dispatch(cpu, regs);
return xics_ipi_dispatch(cpu);
}
static irqreturn_t xics_ipi_action_lpar(int irq, void *dev_id, struct pt_regs *regs)
static irqreturn_t xics_ipi_action_lpar(int irq, void *dev_id)
{
int cpu = smp_processor_id();
lpar_qirr_info(cpu, 0xff);
return xics_ipi_dispatch(cpu, regs);
return xics_ipi_dispatch(cpu);
}
void xics_cause_IPI(int cpu)


+ 1
- 2
arch/powerpc/platforms/pseries/xics.h View File

@ -31,7 +31,6 @@ struct xics_ipi_struct {
extern struct xics_ipi_struct xics_ipi_message[NR_CPUS] __cacheline_aligned;
struct irq_desc;
extern void pseries_8259_cascade(unsigned int irq, struct irq_desc *desc,
struct pt_regs *regs);
extern void pseries_8259_cascade(unsigned int irq, struct irq_desc *desc);
#endif /* _POWERPC_KERNEL_XICS_H */

+ 2
- 2
arch/powerpc/sysdev/mpic.c View File

@ -489,9 +489,9 @@ static inline void mpic_eoi(struct mpic *mpic)
}
#ifdef CONFIG_SMP
static irqreturn_t mpic_ipi_action(int irq, void *dev_id, struct pt_regs *regs)
static irqreturn_t mpic_ipi_action(int irq, void *dev_id)
{
smp_message_recv(mpic_irq_to_hw(irq) - MPIC_VEC_IPI_0, regs);
smp_message_recv(mpic_irq_to_hw(irq) - MPIC_VEC_IPI_0);
return IRQ_HANDLED;
}
#endif /* CONFIG_SMP */


+ 3
- 3
arch/powerpc/xmon/xmon.c View File

@ -21,6 +21,7 @@
#include <linux/module.h>
#include <linux/sysrq.h>
#include <linux/interrupt.h>
#include <linux/irq.h>
#include <asm/ptrace.h>
#include <asm/string.h>
@ -2577,12 +2578,11 @@ void xmon_init(int enable)
}
#ifdef CONFIG_MAGIC_SYSRQ
static void sysrq_handle_xmon(int key, struct pt_regs *pt_regs,
struct tty_struct *tty)
static void sysrq_handle_xmon(int key, struct tty_struct *tty)
{
/* ensure xmon is enabled */
xmon_init(1);
debugger(pt_regs);
debugger(get_irq_regs());
}
static struct sysrq_key_op sysrq_xmon_op =


+ 6
- 6
arch/x86_64/kernel/apic.c View File

@ -885,14 +885,14 @@ void setup_APIC_extened_lvt(unsigned char lvt_off, unsigned char vector,
* value into /proc/profile.
*/
void smp_local_timer_interrupt(struct pt_regs *regs)
void smp_local_timer_interrupt(void)
{
profile_tick(CPU_PROFILING, regs);
profile_tick(CPU_PROFILING);
#ifdef CONFIG_SMP
update_process_times(user_mode(regs));
update_process_times(user_mode(get_irq_regs()));
#endif
if (apic_runs_main_timer > 1 && smp_processor_id() == boot_cpu_id)
main_timer_handler(regs);
main_timer_handler();
/*
* We take the 'long' return path, and there every subsystem
* grabs the appropriate locks (kernel lock/ irq lock).
@ -913,7 +913,7 @@ void smp_local_timer_interrupt(struct pt_regs *regs)
* [ if a single-CPU system runs an SMP kernel then we call the local
* interrupt as well. Thus we cannot inline the local irq ... ]
*/
void smp_apic_timer_interrupt(struct pt_regs *regs)
void smp_apic_timer_interrupt(void)
{
/*
* the NMI deadlock-detector uses this.
@ -932,7 +932,7 @@ void smp_apic_timer_interrupt(struct pt_regs *regs)
*/
exit_idle();
irq_enter();
smp_local_timer_interrupt(regs);
smp_local_timer_interrupt();
irq_exit();
}


+ 5
- 2
arch/x86_64/kernel/irq.c View File