diff options
174 files changed, 790 insertions, 717 deletions
diff --git a/MAINTAINERS b/MAINTAINERS index 84a018ee455..50fb3ae5f31 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -2261,6 +2261,17 @@ T: git kernel.org:/pub/scm/linux/kernel/git/kyle/parisc-2.6.git T: cvs cvs.parisc-linux.org:/var/cvs/linux-2.6 S: Maintained +PC87360 HARDWARE MONITORING DRIVER +P: Jim Cromie +M: jim.cromie@gmail.com +L: lm-sensors@lm-sensors.org +S: Maintained + +PC8736x GPIO DRIVER +P: Jim Cromie +M: jim.cromie@gmail.com +S: Maintained + PCI ERROR RECOVERY P: Linas Vepstas M: linas@austin.ibm.com @@ -2592,10 +2603,19 @@ L: lksctp-developers@lists.sourceforge.net S: Supported SCx200 CPU SUPPORT -P: Christer Weinigel -M: christer@weinigel.se -W: http://www.weinigel.se -S: Supported +P: Jim Cromie +M: jim.cromie@gmail.com +S: Odd Fixes + +SCx200 GPIO DRIVER +P: Jim Cromie +M: jim.cromie@gmail.com +S: Maintained + +SCx200 HRT CLOCKSOURCE DRIVER +P: Jim Cromie +M: jim.cromie@gmail.com +S: Maintained SECURITY CONTACT P: Security Officers diff --git a/arch/arm/common/locomo.c b/arch/arm/common/locomo.c index 181ef1ead5b..80a72c75214 100644 --- a/arch/arm/common/locomo.c +++ b/arch/arm/common/locomo.c @@ -163,8 +163,7 @@ static struct locomo_dev_info locomo_devices[] = { #define LOCOMO_IRQ_LT_START (IRQ_LOCOMO_LT) #define LOCOMO_IRQ_SPI_START (IRQ_LOCOMO_SPI_RFR) -static void locomo_handler(unsigned int irq, struct irqdesc *desc, - struct pt_regs *regs) +static void locomo_handler(unsigned int irq, struct irqdesc *desc) { int req, i; struct irqdesc *d; @@ -182,7 +181,7 @@ static void locomo_handler(unsigned int irq, struct irqdesc *desc, d = irq_desc + irq; for (i = 0; i <= 3; i++, d++, irq++) { if (req & (0x0100 << i)) { - desc_handle_irq(irq, d, regs); + desc_handle_irq(irq, d); } } @@ -218,15 +217,14 @@ static struct irq_chip locomo_chip = { .unmask = locomo_unmask_irq, }; -static void locomo_key_handler(unsigned int irq, struct irqdesc *desc, - struct pt_regs *regs) +static void locomo_key_handler(unsigned int irq, struct irqdesc *desc) { struct irqdesc *d; void __iomem *mapbase = get_irq_chipdata(irq); if (locomo_readl(mapbase + LOCOMO_KEYBOARD + LOCOMO_KIC) & 0x0001) { d = irq_desc + LOCOMO_IRQ_KEY_START; - desc_handle_irq(LOCOMO_IRQ_KEY_START, d, regs); + desc_handle_irq(LOCOMO_IRQ_KEY_START, d); } } @@ -264,8 +262,7 @@ static struct irq_chip locomo_key_chip = { .unmask = locomo_key_unmask_irq, }; -static void locomo_gpio_handler(unsigned int irq, struct irqdesc *desc, - struct pt_regs *regs) +static void locomo_gpio_handler(unsigned int irq, struct irqdesc *desc) { int req, i; struct irqdesc *d; @@ -280,7 +277,7 @@ static void locomo_gpio_handler(unsigned int irq, struct irqdesc *desc, d = irq_desc + LOCOMO_IRQ_GPIO_START; for (i = 0; i <= 15; i++, irq++, d++) { if (req & (0x0001 << i)) { - desc_handle_irq(irq, d, regs); + desc_handle_irq(irq, d); } } } @@ -328,15 +325,14 @@ static struct irq_chip locomo_gpio_chip = { .unmask = locomo_gpio_unmask_irq, }; -static void locomo_lt_handler(unsigned int irq, struct irqdesc *desc, - struct pt_regs *regs) +static void locomo_lt_handler(unsigned int irq, struct irqdesc *desc) { struct irqdesc *d; void __iomem *mapbase = get_irq_chipdata(irq); if (locomo_readl(mapbase + LOCOMO_LTINT) & 0x0001) { d = irq_desc + LOCOMO_IRQ_LT_START; - desc_handle_irq(LOCOMO_IRQ_LT_START, d, regs); + desc_handle_irq(LOCOMO_IRQ_LT_START, d); } } @@ -374,8 +370,7 @@ static struct irq_chip locomo_lt_chip = { .unmask = locomo_lt_unmask_irq, }; -static void locomo_spi_handler(unsigned int irq, struct irqdesc *desc, - struct pt_regs *regs) +static void locomo_spi_handler(unsigned int irq, struct irqdesc *desc) { int req, i; struct irqdesc *d; @@ -388,7 +383,7 @@ static void locomo_spi_handler(unsigned int irq, struct irqdesc *desc, for (i = 0; i <= 3; i++, irq++, d++) { if (req & (0x0001 << i)) { - desc_handle_irq(irq, d, regs); + desc_handle_irq(irq, d); } } } diff --git a/arch/arm/common/sa1111.c b/arch/arm/common/sa1111.c index 30046ad41ce..d5f72010a6f 100644 --- a/arch/arm/common/sa1111.c +++ b/arch/arm/common/sa1111.c @@ -147,7 +147,7 @@ void __init sa1111_adjust_zones(int node, unsigned long *size, unsigned long *ho * will call us again if there are more interrupts to process. */ static void -sa1111_irq_handler(unsigned int irq, struct irqdesc *desc, struct pt_regs *regs) +sa1111_irq_handler(unsigned int irq, struct irqdesc *desc) { unsigned int stat0, stat1, i; void __iomem *base = get_irq_data(irq); @@ -162,17 +162,17 @@ sa1111_irq_handler(unsigned int irq, struct irqdesc *desc, struct pt_regs *regs) sa1111_writel(stat1, base + SA1111_INTSTATCLR1); if (stat0 == 0 && stat1 == 0) { - do_bad_IRQ(irq, desc, regs); + do_bad_IRQ(irq, desc); return; } for (i = IRQ_SA1111_START; stat0; i++, stat0 >>= 1) if (stat0 & 1) - handle_edge_irq(i, irq_desc + i, regs); + handle_edge_irq(i, irq_desc + i); for (i = IRQ_SA1111_START + 32; stat1; i++, stat1 >>= 1) if (stat1 & 1) - handle_edge_irq(i, irq_desc + i, regs); + handle_edge_irq(i, irq_desc + i); /* For level-based interrupts */ desc->chip->unmask(irq); diff --git a/arch/arm/common/sharpsl_pm.c b/arch/arm/common/sharpsl_pm.c index f412dedda68..605dedf9679 100644 --- a/arch/arm/common/sharpsl_pm.c +++ b/arch/arm/common/sharpsl_pm.c @@ -258,7 +258,7 @@ static void sharpsl_ac_timer(unsigned long data) } -irqreturn_t sharpsl_ac_isr(int irq, void *dev_id, struct pt_regs *fp) +irqreturn_t sharpsl_ac_isr(int irq, void *dev_id) { /* Delay the event slightly to debounce */ /* Must be a smaller delay than the chrg_full_isr below */ @@ -293,7 +293,7 @@ static void sharpsl_chrg_full_timer(unsigned long data) /* Charging Finished Interrupt (Not present on Corgi) */ /* Can trigger at the same time as an AC staus change so delay until after that has been processed */ -irqreturn_t sharpsl_chrg_full_isr(int irq, void *dev_id, struct pt_regs *fp) +irqreturn_t sharpsl_chrg_full_isr(int irq, void *dev_id) { if (sharpsl_pm.flags & SHARPSL_SUSPENDED) return IRQ_HANDLED; @@ -304,7 +304,7 @@ irqreturn_t sharpsl_chrg_full_isr(int irq, void *dev_id, struct pt_regs *fp) return IRQ_HANDLED; } -irqreturn_t sharpsl_fatal_isr(int irq, void *dev_id, struct pt_regs *fp) +irqreturn_t sharpsl_fatal_isr(int irq, void *dev_id) { int is_fatal = 0; diff --git a/arch/arm/common/time-acorn.c b/arch/arm/common/time-acorn.c index 3f60dd9aca8..34038eccbba 100644 --- a/arch/arm/common/time-acorn.c +++ b/arch/arm/common/time-acorn.c @@ -67,10 +67,10 @@ void __init ioctime_init(void) } static irqreturn_t -ioc_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) +ioc_timer_interrupt(int irq, void *dev_id) { write_seqlock(&xtime_lock); - timer_tick(regs); + timer_tick(); write_sequnlock(&xtime_lock); return IRQ_HANDLED; } diff --git a/arch/arm/kernel/ecard.c b/arch/arm/kernel/ecard.c index 3e14b1348c0..b27513a0f11 100644 --- a/arch/arm/kernel/ecard.c +++ b/arch/arm/kernel/ecard.c @@ -567,7 +567,7 @@ static void ecard_check_lockup(struct irqdesc *desc) } static void -ecard_irq_handler(unsigned int irq, struct irqdesc *desc, struct pt_regs *regs) +ecard_irq_handler(unsigned int irq, struct irqdesc *desc) { ecard_t *ec; int called = 0; @@ -586,7 +586,7 @@ ecard_irq_handler(unsigned int irq, struct irqdesc *desc, struct pt_regs *regs) if (pending) { struct irqdesc *d = irq_desc + ec->irq; - desc_handle_irq(ec->irq, d, regs); + desc_handle_irq(ec->irq, d); called ++; } } @@ -609,7 +609,7 @@ static unsigned char first_set[] = }; static void -ecard_irqexp_handler(unsigned int irq, struct irqdesc *desc, struct pt_regs *regs) +ecard_irqexp_handler(unsigned int irq, struct irqdesc *desc) { const unsigned int statusmask = 15; unsigned int status; @@ -633,7 +633,7 @@ ecard_irqexp_handler(unsigned int irq, struct irqdesc *desc, struct pt_regs *reg * Serial cards should go in 0/1, ethernet/scsi in 2/3 * otherwise you will lose serial data at high speeds! */ - desc_handle_irq(ec->irq, d, regs); + desc_handle_irq(ec->irq, d); } else { printk(KERN_WARNING "card%d: interrupt from unclaimed " "card???\n", slot); diff --git a/arch/arm/kernel/irq.c b/arch/arm/kernel/irq.c index 2e1bf830fe1..e999b11de2c 100644 --- a/arch/arm/kernel/irq.c +++ b/arch/arm/kernel/irq.c @@ -122,7 +122,8 @@ asmlinkage void asm_do_IRQ(unsigned int irq, struct pt_regs *regs) irq_enter(); - desc_handle_irq(irq, desc, regs); + set_irq_regs(regs); + desc_handle_irq(irq, desc); /* AT91 specific workaround */ irq_finish(irq); diff --git a/arch/arm/kernel/time.c b/arch/arm/kernel/time.c index b030320b17c..c03cab5c4c7 100644 --- a/arch/arm/kernel/time.c +++ b/arch/arm/kernel/time.c @@ -27,6 +27,7 @@ #include <linux/profile.h> #include <linux/sysdev.h> #include <linux/timer.h> +#include <linux/irq.h> #include <asm/leds.h> #include <asm/thread_info.h> @@ -324,9 +325,10 @@ EXPORT_SYMBOL(restore_time_delta); /* * Kernel system timer support. */ -void timer_tick(struct pt_regs *regs) +void timer_tick(void) { - profile_tick(CPU_PROFILING, regs); + struct pt_regs *regs = get_irq_regs(); + profile_tick(CPU_PROFILING); do_leds(); do_set_rtc(); do_timer(1); diff --git a/arch/arm/mach-aaec2000/core.c b/arch/arm/mach-aaec2000/core.c index baa997c857d..fe3d297d682 100644 --- a/arch/arm/mach-aaec2000/core.c +++ b/arch/arm/mach-aaec2000/core.c @@ -127,12 +127,12 @@ static unsigned long aaec2000_gettimeoffset(void) /* We enter here with IRQs enabled */ static irqreturn_t -aaec2000_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) +aaec2000_timer_interrupt(int irq, void *dev_id) { /* TODO: Check timer accuracy */ write_seqlock(&xtime_lock); - timer_tick(regs); + timer_tick(); TIMER1_CLEAR = 1; write_sequnlock(&xtime_lock); diff --git a/arch/arm/mach-at91rm9200/at91rm9200_time.c b/arch/arm/mach-at91rm9200/at91rm9200_time.c index a92a8622c78..07c9cea8961 100644 --- a/arch/arm/mach-at91rm9200/at91rm9200_time.c +++ b/arch/arm/mach-at91rm9200/at91rm9200_time.c @@ -65,13 +65,13 @@ static unsigned long at91rm9200_gettimeoffset(void) /* * IRQ handler for the timer. */ -static irqreturn_t at91rm9200_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) +static irqreturn_t at91rm9200_timer_interrupt(int irq, void *dev_id) { if (at91_sys_read(AT91_ST_SR) & AT91_ST_PITS) { /* This is a shared interrupt */ write_seqlock(&xtime_lock); while (((read_CRTR() - last_crtr) & AT91_ST_ALMV) >= LATCH) { - timer_tick(regs); + timer_tick(); last_crtr = (last_crtr + LATCH) & AT91_ST_ALMV; } diff --git a/arch/arm/mach-at91rm9200/gpio.c b/arch/arm/mach-at91rm9200/gpio.c index 58c9bf5e952..7467d644f0a 100644 --- a/arch/arm/mach-at91rm9200/gpio.c +++ b/arch/arm/mach-at91rm9200/gpio.c @@ -332,7 +332,7 @@ static struct irq_chip gpio_irqchip = { .set_wake = gpio_irq_set_wake, }; -static void gpio_irq_handler(unsigned irq, struct irqdesc *desc, struct pt_regs *regs) +static void gpio_irq_handler(unsigned irq, struct irqdesc *desc) { unsigned pin; struct irqdesc *gpio; @@ -363,7 +363,7 @@ static void gpio_irq_handler(unsigned irq, struct irqdesc *desc, struct pt_regs gpio_irq_mask(pin); } else - desc_handle_irq(pin, gpio, regs); + desc_handle_irq(pin, gpio); } pin++; gpio++; diff --git a/arch/arm/mach-clps711x/time.c b/arch/arm/mach-clps711x/time.c index a071eac4a30..428493dd468 100644 --- a/arch/arm/mach-clps711x/time.c +++ b/arch/arm/mach-clps711x/time.c @@ -48,10 +48,10 @@ static unsigned long clps711x_gettimeoffset(void) * IRQ handler for the timer */ static irqreturn_t -p720t_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) +p720t_timer_interrupt(int irq, void *dev_id) { write_seqlock(&xtime_lock); - timer_tick(regs); + timer_tick(); write_sequnlock(&xtime_lock); return IRQ_HANDLED; } diff --git a/arch/arm/mach-clps7500/core.c b/arch/arm/mach-clps7500/core.c index 92eaebdd560..fb10cf25258 100644 --- a/arch/arm/mach-clps7500/core.c +++ b/arch/arm/mach-clps7500/core.c @@ -292,11 +292,11 @@ extern void ioctime_init(void); extern unsigned long ioc_timer_gettimeoffset(void); static irqreturn_t -clps7500_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) +clps7500_timer_interrupt(int irq, void *dev_id) { write_seqlock(&xtime_lock); - timer_tick(regs); + timer_tick(); /* Why not using do_leds interface?? */ { diff --git a/arch/arm/mach-ebsa110/core.c b/arch/arm/mach-ebsa110/core.c index 70dd12ef3c4..90103ab373a 100644 --- a/arch/arm/mach-ebsa110/core.c +++ b/arch/arm/mach-ebsa110/core.c @@ -174,7 +174,7 @@ static unsigned long ebsa110_gettimeoffset(void) } static irqreturn_t -ebsa110_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) +ebsa110_timer_interrupt(int irq, void *dev_id) { u32 count; @@ -190,7 +190,7 @@ ebsa110_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) __raw_writeb(count & 0xff, PIT_T1); __raw_writeb(count >> 8, PIT_T1); - timer_tick(regs); + timer_tick(); write_sequnlock(&xtime_lock); diff --git a/arch/arm/mach-ep93xx/core.c b/arch/arm/mach-ep93xx/core.c index a87a784b920..e3fd1ab6adc 100644 --- a/arch/arm/mach-ep93xx/core.c +++ b/arch/arm/mach-ep93xx/core.c @@ -97,7 +97,7 @@ static unsigned int last_jiffy_time; #define TIMER4_TICKS_PER_JIFFY ((CLOCK_TICK_RATE + (HZ/2)) / HZ) -static int ep93xx_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) +static int ep93xx_timer_interrupt(int irq, void *dev_id) { write_seqlock(&xtime_lock); @@ -106,7 +106,7 @@ static int ep93xx_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) (__raw_readl(EP93XX_TIMER4_VALUE_LOW) - last_jiffy_time) >= TIMER4_TICKS_PER_JIFFY) { last_jiffy_time += TIMER4_TICKS_PER_JIFFY; - timer_tick(regs); + timer_tick(); } write_sequnlock(&xtime_lock); @@ -245,7 +245,7 @@ EXPORT_SYMBOL(gpio_line_set); * EP93xx IRQ handling *************************************************************************/ static void ep93xx_gpio_ab_irq_handler(unsigned int irq, - struct irqdesc *desc, struct pt_regs *regs) + struct irqdesc *desc) { unsigned char status; int i; @@ -254,7 +254,7 @@ static void ep93xx_gpio_ab_irq_handler(unsigned int irq, for (i = 0; i < 8; i++) { if (status & (1 << i)) { desc = irq_desc + IRQ_EP93XX_GPIO(0) + i; - desc_handle_irq(IRQ_EP93XX_GPIO(0) + i, desc, regs); + desc_handle_irq(IRQ_EP93XX_GPIO(0) + i, desc); } } @@ -262,7 +262,7 @@ static void ep93xx_gpio_ab_irq_handler(unsigned int irq, for (i = 0; i < 8; i++) { if (status & (1 << i)) { desc = irq_desc + IRQ_EP93XX_GPIO(8) + i; - desc_handle_irq(IRQ_EP93XX_GPIO(8) + i, desc, regs); + desc_handle_irq(IRQ_EP93XX_GPIO(8) + i, desc); } } } diff --git a/arch/arm/mach-footbridge/dc21285-timer.c b/arch/arm/mach-footbridge/dc21285-timer.c index 2af610811ca..fa6be870c6c 100644 --- a/arch/arm/mach-footbridge/dc21285-timer.c +++ b/arch/arm/mach-footbridge/dc21285-timer.c @@ -28,13 +28,13 @@ static unsigned long timer1_gettimeoffset (void) } static irqreturn_t -timer1_interrupt(int irq, void *dev_id, struct pt_regs *regs) +timer1_interrupt(int irq, void *dev_id) { write_seqlock(&xtime_lock); *CSR_TIMER1_CLR = 0; - timer_tick(regs); + timer_tick(); write_sequnlock(&xtime_lock); diff --git a/arch/arm/mach-footbridge/dc21285.c b/arch/arm/mach-footbridge/dc21285.c index a1ae49df5c3..fa5d4976f51 100644 --- a/arch/arm/mach-footbridge/dc21285.c +++ b/arch/arm/mach-footbridge/dc21285.c @@ -154,7 +154,7 @@ static void dc21285_enable_error(unsigned long __data) /* * Warn on PCI errors. */ -static irqreturn_t dc21285_abort_irq(int irq, void *dev_id, struct pt_regs *regs) +static irqreturn_t dc21285_abort_irq(int irq, void *dev_id) { unsigned int cmd; unsigned int status; @@ -165,7 +165,7 @@ static irqreturn_t dc21285_abort_irq(int irq, void *dev_id, struct pt_regs *regs if (status & PCI_STATUS_REC_MASTER_ABORT) { printk(KERN_DEBUG "PCI: master abort, pc=0x%08lx\n", - instruction_pointer(regs)); + instruction_pointer(get_irq_regs())); cmd |= PCI_STATUS_REC_MASTER_ABORT << 16; } @@ -184,7 +184,7 @@ static irqreturn_t dc21285_abort_irq(int irq, void *dev_id, struct pt_regs *regs return IRQ_HANDLED; } -static irqreturn_t dc21285_serr_irq(int irq, void *dev_id, struct pt_regs *regs) +static irqreturn_t dc21285_serr_irq(int irq, void *dev_id) { struct timer_list *timer = dev_id; unsigned int cntl; @@ -206,7 +206,7 @@ static irqreturn_t dc21285_serr_irq(int irq, void *dev_id, struct pt_regs *regs) return IRQ_HANDLED; } -static irqreturn_t dc21285_discard_irq(int irq, void *dev_id, struct pt_regs *regs) +static irqreturn_t dc21285_discard_irq(int irq, void *dev_id) { printk(KERN_DEBUG "PCI: discard timer expired\n"); *CSR_SA110_CNTL &= 0xffffde07; @@ -214,7 +214,7 @@ static irqreturn_t dc21285_discard_irq(int irq, void *dev_id, struct pt_regs *re return IRQ_HANDLED; } -static irqreturn_t dc21285_dparity_irq(int irq, void *dev_id, struct pt_regs *regs) +static irqreturn_t dc21285_dparity_irq(int irq, void *dev_id) { unsigned int cmd; @@ -228,7 +228,7 @@ static irqreturn_t dc21285_dparity_irq(int irq, void *dev_id, struct pt_regs *re return IRQ_HANDLED; } -static irqreturn_t dc21285_parity_irq(int irq, void *dev_id, struct pt_regs *regs) +static irqreturn_t dc21285_parity_irq(int irq, void *dev_id) { struct timer_list *timer = dev_id; unsigned int cmd; diff --git a/arch/arm/mach-footbridge/isa-irq.c b/arch/arm/mach-footbridge/isa-irq.c index 87448c2d6ba..888dedd501b 100644 --- a/arch/arm/mach-footbridge/isa-irq.c +++ b/arch/arm/mach-footbridge/isa-irq.c @@ -85,17 +85,17 @@ static struct irqchip isa_hi_chip = { }; static void -isa_irq_handler(unsigned int irq, struct irqdesc *desc, struct pt_regs *regs) +isa_irq_handler(unsigned int irq, struct irqdesc *desc) { unsigned int isa_irq = *(unsigned char *)PCIIACK_BASE; if (isa_irq < _ISA_IRQ(0) || isa_irq >= _ISA_IRQ(16)) { - do_bad_IRQ(isa_irq, desc, regs); + do_bad_IRQ(isa_irq, desc); return; } desc = irq_desc + isa_irq; - desc_handle_irq(isa_irq, desc, regs); + desc_handle_irq(isa_irq, desc); } static struct irqaction irq_cascade = { diff --git a/arch/arm/mach-footbridge/isa-timer.c b/arch/arm/mach-footbridge/isa-timer.c index c4810a40c8e..d884a3954fb 100644 --- a/arch/arm/mach-footbridge/isa-timer.c +++ b/arch/arm/mach-footbridge/isa-timer.c @@ -62,10 +62,10 @@ static unsigned long isa_gettimeoffset(void) } static irqreturn_t -isa_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) +isa_timer_interrupt(int irq, void *dev_id) { write_seqlock(&xtime_lock); - timer_tick(regs); + timer_tick(); write_sequnlock(&xtime_lock); return IRQ_HANDLED; } diff --git a/arch/arm/mach-h720x/common.c b/arch/arm/mach-h720x/common.c index c096b456930..4719229a1a7 100644 --- a/arch/arm/mach-h720x/common.c +++ b/arch/arm/mach-h720x/common.c @@ -101,14 +101,14 @@ static void inline unmask_gpio_irq(u32 irq) static void h720x_gpio_handler(unsigned int mask, unsigned int irq, - struct irqdesc *desc, struct pt_regs *regs) + struct irqdesc *desc) { IRQDBG("%s irq: %d\n",__FUNCTION__,irq); desc = irq_desc + irq; while (mask) { if (mask & 1) { IRQDBG("handling irq %d\n", irq); - desc_handle_irq(irq, desc, regs); + desc_handle_irq(irq, desc); } irq++; desc++; @@ -117,63 +117,58 @@ h720x_gpio_handler(unsigned int mask, unsigned int irq, } static void -h720x_gpioa_demux_handler(unsigned int irq_unused, struct irqdesc *desc, - struct pt_regs *regs) +h720x_gpioa_demux_handler(unsigned int irq_unused, struct irqdesc *desc) { unsigned int mask, irq; mask = CPU_REG(GPIO_A_VIRT,GPIO_STAT); irq = IRQ_CHAINED_GPIOA(0); IRQDBG("%s mask: 0x%08x irq: %d\n",__FUNCTION__,mask,irq); - h720x_gpio_handler(mask, irq, desc, regs); + h720x_gpio_handler(mask, irq, desc); } static void -h720x_gpiob_demux_handler(unsigned int irq_unused, struct irqdesc *desc, - struct pt_regs *regs) +h720x_gpiob_demux_handler(unsigned int irq_unused, struct irqdesc *desc) { unsigned int mask, irq; mask = CPU_REG(GPIO_B_VIRT,GPIO_STAT); irq = IRQ_CHAINED_GPIOB(0); IRQDBG("%s mask: 0x%08x irq: %d\n",__FUNCTION__,mask,irq); - h720x_gpio_handler(mask, irq, desc, regs); + h720x_gpio_handler(mask, irq, desc); } static void -h720x_gpioc_demux_handler(unsigned int irq_unused, struct irqdesc *desc, - struct pt_regs *regs) +h720x_gpioc_demux_handler(unsigned int irq_unused, struct irqdesc *desc) { unsigned int mask, irq; mask = CPU_REG(GPIO_C_VIRT,GPIO_STAT); irq = IRQ_CHAINED_GPIOC(0); IRQDBG("%s mask: 0x%08x irq: %d\n",__FUNCTION__,mask,irq); - h720x_gpio_handler(mask, irq, desc, regs); + h720x_gpio_handler(mask, irq, desc); } static void -h720x_gpiod_demux_handler(unsigned int irq_unused, struct irqdesc *desc, - struct pt_regs *regs) +h720x_gpiod_demux_handler(unsigned int irq_unused, struct irqdesc *desc) { unsigned int mask, irq; mask = CPU_REG(GPIO_D_VIRT,GPIO_STAT); irq = IRQ_CHAINED_GPIOD(0); IRQDBG("%s mask: 0x%08x irq: %d\n",__FUNCTION__,mask,irq); - h720x_gpio_handler(mask, irq, desc, regs); + h720x_gpio_handler(mask, irq, desc); } #ifdef CONFIG_CPU_H7202 static void -h720x_gpioe_demux_handler(unsigned int irq_unused, struct irqdesc *desc, - struct pt_regs *regs) +h720x_gpioe_demux_handler(unsigned int irq_unused, struct irqdesc *desc) { unsigned int mask, irq; mask = CPU_REG(GPIO_E_VIRT,GPIO_STAT); irq = IRQ_CHAINED_GPIOE(0); IRQDBG("%s mask: 0x%08x irq: %d\n",__FUNCTION__,mask,irq); - h720x_gpio_handler(mask, irq, desc, regs); + h720x_gpio_handler(mask, irq, desc); } #endif diff --git a/arch/arm/mach-h720x/cpu-h7201.c b/arch/arm/mach-h720x/cpu-h7201.c index a9a8255a3a0..13f76bdb3d9 100644 --- a/arch/arm/mach-h720x/cpu-h7201.c +++ b/arch/arm/mach-h720x/cpu-h7201.c @@ -27,12 +27,12 @@ * Timer interrupt handler */ static irqreturn_t -h7201_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) +h7201_timer_interrupt(int irq, void *dev_id) { write_seqlock(&xtime_lock); CPU_REG (TIMER_VIRT, TIMER_TOPSTAT); - timer_tick(regs); + timer_tick(); write_sequnlock(&xtime_lock); diff --git a/arch/arm/mach-h720x/cpu-h7202.c b/arch/arm/mach-h720x/cpu-h7202.c index da678d163fd..06fecaefd8d 100644 --- a/arch/arm/mach-h720x/cpu-h7202.c +++ b/arch/arm/mach-h720x/cpu-h7202.c @@ -106,8 +106,7 @@ static struct platform_device *devices[] __initdata = { * we have to handle all timer interrupts in one place. */ static void -h7202_timerx_demux_handler(unsigned int irq_unused, struct irqdesc *desc, - struct pt_regs *regs) +h7202_timerx_demux_handler(unsigned int irq_unused, struct irqdesc *desc) { unsigned int mask, irq; @@ -115,7 +114,7 @@ h7202_timerx_demux_handler(unsigned int irq_unused, struct irqdesc *desc, if ( mask & TSTAT_T0INT ) { write_seqlock(&xtime_lock); - timer_tick(regs); + timer_tick(); write_sequnlock(&xtime_lock); if( mask == TSTAT_T0INT ) return; @@ -126,7 +125,7 @@ h7202_timerx_demux_handler(unsigned int irq_unused, struct irqdesc *desc, desc = irq_desc + irq; while (mask) { if (mask & 1) - desc_handle_irq(irq, desc, regs); + desc_handle_irq(irq, desc); irq++; desc++; mask >>= 1; @@ -137,9 +136,9 @@ h7202_timerx_demux_handler(unsigned int irq_unused, struct irqdesc *desc, * Timer interrupt handler */ static irqreturn_t -h7202_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) +h7202_timer_interrupt(int irq, void *dev_id) { - h7202_timerx_demux_handler(0, NULL, regs); + h7202_timerx_demux_handler(0, NULL); return IRQ_HANDLED; } diff --git a/arch/arm/mach-imx/dma.c b/arch/arm/mach-imx/dma.c index 36578871ecc..6d50d85a618 100644 --- a/arch/arm/mach-imx/dma.c +++ b/arch/arm/mach-imx/dma.c @@ -279,8 +279,8 @@ imx_dma_setup_sg(imx_dmach_t dma_ch, */ int imx_dma_setup_handlers(imx_dmach_t dma_ch, - void (*irq_handler) (int, void *, struct pt_regs *), - void (*err_handler) (int, void *, struct pt_regs *, int), + void (*irq_handler) (int, void *), + void (*err_handler) (int, void *, int), void *data) { struct imx_dma_channel *imxdma = &imx_dma_channels[dma_ch]; @@ -461,7 +461,7 @@ imx_dma_request_by_prio(imx_dmach_t * pdma_ch, const char *name, return -ENODEV; } -static irqreturn_t dma_err_handler(int irq, void *dev_id, struct pt_regs *regs) +static irqreturn_t dma_err_handler(int irq, void *dev_id) { int i, disr = DISR; struct imx_dma_channel *channel; @@ -500,7 +500,7 @@ static irqreturn_t dma_err_handler(int irq, void *dev_id, struct pt_regs *regs) /*imx_dma_channels[i].sg = NULL;*/ if (channel->name && channel->err_handler) { - channel->err_handler(i, channel->data, regs, errcode); + channel->err_handler(i, channel->data, errcode); continue; } @@ -517,7 +517,7 @@ static irqreturn_t dma_err_handler(int irq, void *dev_id, struct pt_regs *regs) return IRQ_HANDLED; } -static irqreturn_t dma_irq_handler(int irq, void *dev_id, struct pt_regs *regs) +static irqreturn_t dma_irq_handler(int irq, void *dev_id) { int i, disr = DISR; @@ -536,7 +536,7 @@ static irqreturn_t dma_irq_handler(int irq, void *dev_id, struct pt_regs *regs) } else { if (channel->irq_handler) channel->irq_handler(i, - channel->data, regs); + channel->data); } } else { /* diff --git a/arch/arm/mach-imx/irq.c b/arch/arm/mach-imx/irq.c index 2688bd82c2a..368b13b058a 100644 --- a/arch/arm/mach-imx/irq.c +++ b/arch/arm/mach-imx/irq.c @@ -146,13 +146,13 @@ imx_gpio_unmask_irq(unsigned int irq) static void imx_gpio_handler(unsigned int mask, unsigned int irq, - struct irqdesc *desc, struct pt_regs *regs) + struct irqdesc *desc) { desc = irq_desc + irq; while (mask) { if (mask & 1) { DEBUG_IRQ("handling irq %d\n", irq); - desc_handle_irq(irq, desc, regs); + desc_handle_irq(irq, desc); } irq++; desc++; @@ -161,47 +161,43 @@ imx_gpio_handler(unsigned int mask, unsigned int irq, } static void -imx_gpioa_demux_handler(unsigned int irq_unused, struct irqdesc *desc, - struct pt_regs *regs) +imx_gpioa_demux_handler(unsigned int irq_unused, struct irqdesc *desc) { unsigned int mask, irq; mask = ISR(0); irq = IRQ_GPIOA(0); - imx_gpio_handler(mask, irq, desc, regs); + imx_gpio_handler(mask, irq, desc); } static void -imx_gpiob_demux_handler(unsigned int irq_unused, struct irqdesc *desc, - struct pt_regs *regs) +imx_gpiob_demux_handler(unsigned int irq_unused, struct irqdesc *desc) { unsigned int mask, irq; mask = ISR(1); irq = IRQ_GPIOB(0); - imx_gpio_handler(mask, irq, desc, regs); + imx_gpio_handler(mask, irq, desc); } static void -imx_gpioc_demux_handler(unsigned int irq_unused, struct irqdesc *desc, - struct pt_regs *regs) +imx_gpioc_demux_handler(unsigned int irq_unused, struct irqdesc *desc) { unsigned int mask, irq; mask = ISR(2); irq = IRQ_GPIOC(0); - imx_gpio_handler(mask, irq, desc, regs); + imx_gpio_handler(mask, irq, desc); } static void -imx_gpiod_demux_handler(unsigned int irq_unused, struct irqdesc *desc, - struct pt_regs *regs) +imx_gpiod_demux_handler(unsigned int irq_unused, struct irqdesc *desc) { unsigned int mask, irq; mask = ISR(3); irq = IRQ_GPIOD(0); - imx_gpio_handler(mask, irq, desc, regs); + imx_gpio_handler(mask, irq, desc); } static struct irq_chip imx_internal_chip = { diff --git a/arch/arm/mach-imx/time.c b/arch/arm/mach-imx/time.c index 6ed7523c65b..8ae4a2c5066 100644 --- a/arch/arm/mach-imx/time.c +++ b/arch/arm/mach-imx/time.c @@ -56,7 +56,7 @@ static unsigned long imx_gettimeoffset(void) * IRQ handler for the timer */ static irqreturn_t -imx_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) +imx_timer_interrupt(int irq, void *dev_id) { write_seqlock(&xtime_lock); @@ -64,7 +64,7 @@ imx_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) if (IMX_TSTAT(TIMER_BASE)) IMX_TSTAT(TIMER_BASE) = 0; - timer_tick(regs); + timer_tick(); write_sequnlock(&xtime_lock); return IRQ_HANDLED; diff --git a/arch/arm/mach-integrator/core.c b/arch/arm/mach-integrator/core.c index 42021fdfa0c..8d880cb9ba3 100644 --- a/arch/arm/mach-integrator/core.c +++ b/arch/arm/mach-integrator/core.c @@ -248,7 +248,7 @@ unsigned long integrator_gettimeoffset(void) * IRQ handler for the timer */ static irqreturn_t -integrator_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) +integrator_timer_interrupt(int irq, void *dev_id) { write_seqlock(&xtime_lock); @@ -262,7 +262,7 @@ integrator_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) * primary CPU */ if (hard_smp_processor_id() == 0) { - timer_tick(regs); + timer_tick(); #ifdef CONFIG_SMP smp_send_timer(); #endif @@ -272,7 +272,7 @@ integrator_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) /* * this is the ARM equivalent of the APIC timer interrupt */ - update_process_times(user_mode(regs)); + update_process_times(user_mode(get_irq_regs())); #endif /* CONFIG_SMP */ write_sequnlock(&xtime_lock); diff --git a/arch/arm/mach-integrator/integrator_cp.c b/arch/arm/mach-integrator/integrator_cp.c index 678b6ba2b46..771b65bffe6 100644 --- a/arch/arm/mach-integrator/integrator_cp.c +++ b/arch/arm/mach-integrator/integrator_cp.c @@ -202,12 +202,12 @@ static struct irq_chip sic_chip = { }; static void -sic_handle_irq(unsigned int irq, struct irqdesc *desc, struct pt_regs *regs) +sic_handle_irq(unsigned int irq, struct irqdesc *desc) { unsigned long status = sic_readl(INTCP_VA_SIC_BASE + IRQ_STATUS); if (status == 0) { - do_bad_IRQ(irq, desc, regs); + do_bad_IRQ(irq, desc); return; } @@ -218,7 +218,7 @@ sic_handle_irq(unsigned int irq, struct irqdesc *desc, struct pt_regs *regs) irq += IRQ_SIC_START; desc = irq_desc + irq; - desc_handle_irq(irq, desc, regs); + desc_handle_irq(irq, desc); } while (status); } diff --git a/arch/arm/mach-integrator/pci_v3.c b/arch/arm/mach-integrator/pci_v3.c index 4418f6d7572..fb8c6d97b22 100644 --- a/arch/arm/mach-integrator/pci_v3.c +++ b/arch/arm/mach-integrator/pci_v3.c @@ -440,9 +440,10 @@ v3_pci_fault(unsigned long addr, unsigned int fsr, struct pt_regs *regs) return 1; } -static irqreturn_t v3_irq(int irq, void *devid, struct pt_regs *regs) +static irqreturn_t v3_irq(int irq, void *devid) { #ifdef CONFIG_DEBUG_LL + struct pt_regs *regs = get_irq_regs(); unsigned long pc = instruction_pointer(regs); unsigned long instr = *(unsigned long *)pc; char buf[128]; diff --git a/arch/arm/mach-integrator/time.c b/arch/arm/mach-integrator/time.c index ee49cf790da..5278f589fce 100644 --- a/arch/arm/mach-integrator/time.c +++ b/arch/arm/mach-integrator/time.c @@ -96,8 +96,7 @@ static struct rtc_ops rtc_ops = { .set_alarm = integrator_rtc_set_alarm, }; -static irqreturn_t arm_rtc_interrupt(int irq, void *dev_id, - struct pt_regs *regs) +static irqreturn_t arm_rtc_interrupt(int irq, void *dev_id) { writel(0, rtc_base + RTC_EOI); return IRQ_HANDLED; diff --git a/arch/arm/mach-ixp2000/core.c b/arch/arm/mach-ixp2000/core.c index 7f91f689a04..22c98e9dad2 100644 --- a/arch/arm/mach-ixp2000/core.c +++ b/arch/arm/mach-ixp2000/core.c @@ -204,7 +204,7 @@ unsigned long ixp2000_gettimeoffset (void) return offset / ticks_per_usec; } -static int ixp2000_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) +static int ixp2000_timer_interrupt(int irq, void *dev_id) { write_seqlock(&xtime_lock); @@ -213,7 +213,7 @@ static int ixp2000_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) while ((signed long)(next_jiffy_time - *missing_jiffy_timer_csr) >= ticks_per_jiffy) { - timer_tick(regs); + timer_tick(); next_jiffy_time -= ticks_per_jiffy; } @@ -308,7 +308,7 @@ EXPORT_SYMBOL(gpio_line_config); /************************************************************************* * IRQ handling IXP2000 *************************************************************************/ -static void ixp2000_GPIO_irq_handler(unsigned int irq, struct irqdesc *desc, struct pt_regs *regs) +static void ixp2000_GPIO_irq_handler(unsigned int irq, struct irqdesc *desc) { int i; unsigned long status = *IXP2000_GPIO_INST; @@ -316,7 +316,7 @@ static void ixp2000_GPIO_irq_handler(unsigned int irq, struct irqdesc *desc, str for (i = 0; i <= 7; i++) { if (status & (1<<i)) { desc = irq_desc + i + IRQ_IXP2000_GPIO0; - desc_handle_irq(i + IRQ_IXP2000_GPIO0, desc, regs); + desc_handle_irq(i + IRQ_IXP2000_GPIO0, desc); } } } @@ -401,7 +401,7 @@ static void ixp2000_pci_irq_unmask(unsigned int irq) /* * Error interrupts. These are used extensively by the microengine drivers */ -static void ixp2000_err_irq_handler(unsigned int irq, struct irqdesc *desc, struct pt_regs *regs) +static void ixp2000_err_irq_handler(unsigned int irq, struct irqdesc *desc) { int i; unsigned long status = *IXP2000_IRQ_ERR_STATUS; @@ -409,7 +409,7 @@ static void ixp2000_err_irq_handler(unsigned int irq, struct irqdesc *desc, str for(i = 31; i >= 0; i--) { if(status & (1 << i)) { desc = irq_desc + IRQ_IXP2000_DRAM0_MIN_ERR + i; - desc_handle_irq(IRQ_IXP2000_DRAM0_MIN_ERR + i, desc, regs); + desc_handle_irq(IRQ_IXP2000_DRAM0_MIN_ERR + i, desc); } } } diff --git a/arch/arm/mach-ixp2000/ixdp2x00.c b/arch/arm/mach-ixp2000/ixdp2x00.c index 40eef8b3674..af48cb52dfc 100644 --- a/arch/arm/mach-ixp2000/ixdp2x00.c +++ b/arch/arm/mach-ixp2000/ixdp2x00.c @@ -106,7 +106,7 @@ static void ixdp2x00_irq_unmask(unsigned int irq) ixp2000_release_slowport(&old_cfg); } -static void ixdp2x00_irq_handler(unsigned int irq, struct irqdesc *desc, struct pt_regs *regs) +static void ixdp2x00_irq_handler(unsigned int irq, struct irqdesc *desc) { volatile u32 ex_interrupt = 0; static struct slowport_cfg old_cfg; @@ -132,7 +132,7 @@ static void ixdp2x00_irq_handler(unsigned int irq, struct irqdesc *desc, struct struct irqdesc *cpld_desc; int cpld_irq = IXP2000_BOARD_IRQ(0) + i; cpld_desc = irq_desc + cpld_irq; - desc_handle_irq(cpld_irq, cpld_desc, regs); + desc_handle_irq(cpld_irq, cpld_desc); } } diff --git a/arch/arm/mach-ixp2000/ixdp2x01.c b/arch/arm/mach-ixp2000/ixdp2x01.c index 7f42366f60d..9ccae9e63f7 100644 --- a/arch/arm/mach-ixp2000/ixdp2x01.c +++ b/arch/arm/mach-ixp2000/ixdp2x01.c @@ -63,7 +63,7 @@ static void ixdp2x01_irq_unmask(unsigned int irq) static u32 valid_irq_mask; -static void ixdp2x01_irq_handler(unsigned int irq, struct irqdesc *desc, struct pt_regs *regs) +static void ixdp2x01_irq_handler(unsigned int irq, struct irqdesc *desc) { u32 ex_interrupt; int i; @@ -82,7 +82,7 @@ static void ixdp2x01_irq_handler(unsigned int irq, struct irqdesc *desc, struct struct irqdesc *cpld_desc; int cpld_irq = IXP2000_BOARD_IRQ(0) + i; cpld_desc = irq_desc + cpld_irq; - desc_handle_irq(cpld_irq, cpld_desc, regs); + desc_handle_irq(cpld_irq, cpld_desc); } } diff --git a/arch/arm/mach-ixp23xx/core.c b/arch/arm/mach-ixp23xx/core.c index 566a07821c7..a704a182004 100644 --- a/arch/arm/mach-ixp23xx/core.c +++ b/arch/arm/mach-ixp23xx/core.c @@ -251,7 +251,7 @@ static void ixp23xx_pci_irq_unmask(unsigned int irq) /* * TODO: Should this just be done at ASM level? */ -static void pci_handler(unsigned int irq, struct irqdesc *desc, struct pt_regs *regs) +static void pci_handler(unsigned int irq, struct irqdesc *desc) { u32 pci_interrupt; unsigned int irqno; @@ -271,7 +271,7 @@ static void pci_handler(unsigned int irq, struct irqdesc *desc, struct pt_regs * } int_desc = irq_desc + irqno; - desc_handle_irq(irqno, int_desc, regs); + desc_handle_irq(irqno, int_desc); desc->chip->unmask(irq); } @@ -348,12 +348,12 @@ ixp23xx_gettimeoffset(void) } static irqreturn_t -ixp23xx_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) +ixp23xx_timer_interrupt(int irq, void *dev_id) { /* Clear Pending Interrupt by writing '1' to it */ *IXP23XX_TIMER_STATUS = IXP23XX_TIMER1_INT_PEND; while ((signed long)(*IXP23XX_TIMER_CONT - next_jiffy_time) >= LATCH) { - timer_tick(regs); + timer_tick(); next_jiffy_time += LATCH; } diff --git a/arch/arm/mach-ixp23xx/ixdp2351.c b/arch/arm/mach-ixp23xx/ixdp2351.c index 37a32e6bcca..b6ab0e8bb5e 100644 --- a/arch/arm/mach-ixp23xx/ixdp2351.c +++ b/arch/arm/mach-ixp23xx/ixdp2351.c @@ -60,7 +60,7 @@ static void ixdp2351_inta_unmask(unsigned int irq) *IXDP2351_CPLD_INTA_MASK_CLR_REG = IXDP2351_INTA_IRQ_MASK(irq); } -static void ixdp2351_inta_handler(unsigned int irq, struct irqdesc *desc, struct pt_regs *regs) +static void ixdp2351_inta_handler(unsigned int irq, struct irqdesc *desc) { u16 ex_interrupt = *IXDP2351_CPLD_INTA_STAT_REG & IXDP2351_INTA_IRQ_VALID; @@ -74,7 +74,7 @@ static void ixdp2351_inta_handler(unsigned int irq, struct irqdesc *desc, struct int cpld_irq = IXP23XX_MACH_IRQ(IXDP2351_INTA_IRQ_BASE + i); cpld_desc = irq_desc + cpld_irq; - desc_handle_irq(cpld_irq, cpld_desc, regs); + desc_handle_irq(cpld_irq, cpld_desc); } } @@ -97,7 +97,7 @@ static void ixdp2351_intb_unmask(unsigned int irq) *IXDP2351_CPLD_INTB_MASK_CLR_REG = IXDP2351_INTB_IRQ_MASK(irq); } -static void ixdp2351_intb_handler(unsigned int irq, struct irqdesc *desc, struct pt_regs *regs) +static void ixdp2351_intb_handler(unsigned int irq, struct irqdesc *desc) { u16 ex_interrupt = *IXDP2351_CPLD_INTB_STAT_REG & IXDP2351_INTB_IRQ_VALID; @@ -111,7 +111,7 @@ static void ixdp2351_intb_handler(unsigned int irq, struct irqdesc *desc, struct int cpld_irq = IXP23XX_MACH_IRQ(IXDP2351_INTB_IRQ_BASE + i); cpld_desc = irq_desc + cpld_irq; - desc_handle_irq(cpld_irq, cpld_desc, regs); + desc_handle_irq(cpld_irq, cpld_desc); } } diff --git a/arch/arm/mach-ixp4xx/common.c b/arch/arm/mach-ixp4xx/common.c index 35dd8b3824b..c7513f6eb50 100644 --- a/arch/arm/mach-ixp4xx/common.c +++ b/arch/arm/mach-ixp4xx/common.c @@ -256,7 +256,7 @@ static unsigned volatile last_jiffy_time; #define CLOCK_TICKS_PER_USEC ((CLOCK_TICK_RATE + USEC_PER_SEC/2) / USEC_PER_SEC) -static irqreturn_t ixp4xx_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) +static irqreturn_t ixp4xx_timer_interrupt(int irq, void *dev_id) { write_seqlock(&xtime_lock); @@ -267,7 +267,7 @@ static irqreturn_t ixp4xx_timer_interrupt(int irq, void *dev_id, struct pt_regs * Catch up with the real idea of time */ while ((signed long)(*IXP4XX_OSTS - last_jiffy_time) >= LATCH) { - timer_tick(regs); + timer_tick(); last_jiffy_time += LATCH; } diff --git a/arch/arm/mach-ixp4xx/nas100d-power.c b/arch/arm/mach-ixp4xx/nas100d-power.c index 81ffcae1f56..29aa98d3a7f 100644 --- a/arch/arm/mach-ixp4xx/nas100d-power.c +++ b/arch/arm/mach-ixp4xx/nas100d-power.c @@ -24,7 +24,7 @@ #include <asm/mach-types.h> -static irqreturn_t nas100d_reset_handler(int irq, void *dev_id, struct pt_regs *regs) +static irqreturn_t nas100d_reset_handler(int irq, void *dev_id) { /* Signal init to do the ctrlaltdel action, this will bypass init if * it hasn't started and do a kernel_restart. diff --git a/arch/arm/mach-ixp4xx/nslu2-power.c b/arch/arm/mach-ixp4xx/nslu2-power.c index a29b3b2b61b..acd71e9c38a 100644 --- a/arch/arm/mach-ixp4xx/nslu2-power.c +++ b/arch/arm/mach-ixp4xx/nslu2-power.c @@ -25,7 +25,7 @@ #include <asm/mach-types.h> -static irqreturn_t nslu2_power_handler(int irq, void *dev_id, struct pt_regs *regs) +static irqreturn_t nslu2_power_handler(int irq, void *dev_id) { /* Signal init to do the ctrlaltdel action, this will bypass init if * it hasn't started and do a kernel_restart. @@ -35,7 +35,7 @@ static irqreturn_t nslu2_power_handler(int irq, void *dev_id, struct pt_regs *re return IRQ_HANDLED; } -static irqreturn_t nslu2_reset_handler(int irq, void *dev_id, struct pt_regs *regs) +static irqreturn_t nslu2_reset_handler(int irq, void *dev_id) { /* This is the paper-clip reset, it shuts the machine down directly. */ diff --git a/arch/arm/mach-lh7a40x/arch-kev7a400.c b/arch/arm/mach-lh7a40x/arch-kev7a400.c index 4f2ab48800a..15fbcc911fe 100644 --- a/arch/arm/mach-lh7a40x/arch-kev7a400.c +++ b/arch/arm/mach-lh7a40x/arch-kev7a400.c @@ -71,14 +71,13 @@ static struct irq_chip kev7a400_cpld_chip = { }; -static void kev7a400_cpld_handler (unsigned int irq, struct irqdesc *desc, - struct pt_regs *regs) +static void kev7a400_cpld_handler (unsigned int irq, struct irqdesc *desc) { u32 mask = CPLD_LATCHED_INTS; irq = IRQ_KEV7A400_CPLD; for (; mask; mask >>= 1, ++irq) { if (mask & 1) - desc[irq].handle (irq, desc, regs); + desc[irq].handle (irq, desc); } } diff --git a/arch/arm/mach-lh7a40x/arch-lpd7a40x.c b/arch/arm/mach-lh7a40x/arch-lpd7a40x.c index a21b12f06c6..8441e0a156c 100644 --- a/arch/arm/mach-lh7a40x/arch-lpd7a40x.c +++ b/arch/arm/mach-lh7a40x/arch-lpd7a40x.c @@ -207,8 +207,7 @@ static struct irq_chip lpd7a40x_cpld_chip = { .unmask = lh7a40x_unmask_cpld_irq, }; -static void lpd7a40x_cpld_handler (unsigned int irq, struct irqdesc *desc, - struct pt_regs *regs) +static void lpd7a40x_cpld_handler (unsigned int irq, struct irqdesc *desc) { unsigned int mask = CPLD_INTERRUPTS; diff --git a/arch/arm/mach-lh7a40x/irq-kev7a400.c b/arch/arm/mach-lh7a40x/irq-kev7a400.c index f9b3fe9174a..646071334b8 100644 --- a/arch/arm/mach-lh7a40x/irq-kev7a400.c +++ b/arch/arm/mach-lh7a40x/irq-kev7a400.c @@ -51,14 +51,13 @@ irq_chip lh7a400_cpld_chip = { }; static void -lh7a400_cpld_handler (unsigned int irq, struct irqdesc *desc, - struct pt_regs *regs) +lh7a400_cpld_handler (unsigned int irq, struct irqdesc *desc) { u32 mask = CPLD_LATCHED_INTS; irq = IRQ_KEV_7A400_CPLD; for (; mask; mask >>= 1, ++irq) { if (mask & 1) - desc[irq].handle (irq, desc, regs); + desc[irq].handle (irq, desc); } } diff --git a/arch/arm/mach-lh7a40x/irq-lpd7a40x.c b/arch/arm/mach-lh7a40x/irq-lpd7a40x.c index d6055dde646..b20376804bb 100644 --- a/arch/arm/mach-lh7a40x/irq-lpd7a40x.c +++ b/arch/arm/mach-lh7a40x/irq-lpd7a40x.c @@ -57,8 +57,7 @@ static struct irq_chip lh7a40x_cpld_chip = { .unmask = lh7a40x_unmask_cpld_irq, }; -static void lh7a40x_cpld_handler (unsigned int irq, struct irqdesc *desc, - struct pt_regs *regs) +static void lh7a40x_cpld_handler (unsigned int irq, struct irqdesc *desc) { unsigned int mask = CPLD_INTERRUPTS; diff --git a/arch/arm/mach-lh7a40x/time.c b/arch/arm/mach-lh7a40x/time.c index ad5652e0150..bef3c4b68d3 100644 --- a/arch/arm/mach-lh7a40x/time.c +++ b/arch/arm/mach-lh7a40x/time.c @@ -39,12 +39,12 @@ #endif static irqreturn_t -lh7a40x_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) +lh7a40x_timer_interrupt(int irq, void *dev_id) { write_seqlock(&xtime_lock); TIMER_EOI = 0; - timer_tick(regs); + timer_tick(); write_sequnlock(&xtime_lock); diff --git a/arch/arm/mach-netx/generic.c b/arch/arm/mach-netx/generic.c index af0b13534cf..edbbbdc3b06 100644 --- a/arch/arm/mach-netx/generic.c +++ b/arch/arm/mach-netx/generic.c @@ -69,8 +69,7 @@ static struct platform_device *devices[] __initdata = { #endif static void -netx_hif_demux_handler(unsigned int irq_unused, struct irqdesc *desc, - struct pt_regs *regs) +netx_hif_demux_handler(unsigned int irq_unused, struct irqdesc *desc) { unsigned int irq = NETX_IRQ_HIF_CHAINED(0); unsigned int stat; @@ -83,7 +82,7 @@ netx_hif_demux_handler(unsigned int irq_unused, struct irqdesc *desc, while (stat) { if (stat & 1) { DEBUG_IRQ("handling irq %d\n", irq); - desc_handle_irq(irq, desc, regs); + desc_handle_irq(irq, desc); } irq++; desc++; diff --git a/arch/arm/mach-netx/time.c b/arch/arm/mach-netx/time.c index 6d72c81b7d9..0993336c0b5 100644 --- a/arch/arm/mach-netx/time.c +++ b/arch/arm/mach-netx/time.c @@ -38,11 +38,11 @@ static unsigned long netx_gettimeoffset(void) * IRQ handler for the timer */ static irqreturn_t -netx_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) +netx_timer_interrupt(int irq, void *dev_id) { write_seqlock(&xtime_lock); - timer_tick(regs); + timer_tick(); write_sequnlock(&xtime_lock); /* acknowledge interrupt */ diff --git a/arch/arm/mach-omap1/board-osk.c b/arch/arm/mach-omap1/board-osk.c index 6b05647a6c0..3a622801d7b 100644 --- a/arch/arm/mach-omap1/board-osk.c +++ b/arch/arm/mach-omap1/board-osk.c @@ -327,7 +327,7 @@ static struct spi_board_info __initdata mistral_boardinfo[] = { { #ifdef CONFIG_PM static irqreturn_t -osk_mistral_wake_interrupt(int irq, void *ignored, struct pt_regs *regs) +osk_mistral_wake_interrupt(int irq, void *ignored) { return IRQ_HANDLED; } diff --git a/arch/arm/mach-omap1/fpga.c b/arch/arm/mach-omap1/fpga.c index efe9bfc6e55..8e40208b10b 100644 --- a/arch/arm/mach-omap1/fpga.c +++ b/arch/arm/mach-omap1/fpga.c @@ -84,8 +84,7 @@ static void fpga_mask_ack_irq(unsigned int irq) fpga_ack_irq(irq); } -void innovator_fpga_IRQ_demux(unsigned int irq, struct irqdesc *desc, - struct pt_regs *regs) +void innovator_fpga_IRQ_demux(unsigned int irq, struct irqdesc *desc) { struct irqdesc *d; u32 stat; @@ -101,7 +100,7 @@ void innovator_fpga_IRQ_demux(unsigned int irq, struct irqdesc *desc, fpga_irq++, stat >>= 1) { if (stat & 1) { d = irq_desc + fpga_irq; - desc_handle_irq(fpga_irq, d, regs); + desc_handle_irq(fpga_irq, d); } } } diff --git a/arch/arm/mach-omap1/pm.c b/arch/arm/mach-omap1/pm.c index cd76185bab7..4834758d340 100644 --- a/arch/arm/mach-omap1/pm.c +++ b/arch/arm/mach-omap1/pm.c @@ -682,8 +682,7 @@ static int omap_pm_finish(suspend_state_t state) } -static irqreturn_t omap_wakeup_interrupt(int irq, void * dev, - struct pt_regs * regs) +static irqreturn_t omap_wakeup_interrupt(int irq, void *dev) { return IRQ_HANDLED; } diff --git a/arch/arm/mach-omap1/serial.c b/arch/arm/mach-omap1/serial.c index c4b790217a5..4cc98a578e4 100644 --- a/arch/arm/mach-omap1/serial.c +++ b/arch/arm/mach-omap1/serial.c @@ -204,8 +204,7 @@ void __init omap_serial_init(void) #ifdef CONFIG_OMAP_SERIAL_WAKE -static irqreturn_t omap_serial_wake_interrupt(int irq, void *dev_id, - struct pt_regs *regs) +static irqreturn_t omap_serial_wake_interrupt(int irq, void *dev_id) { /* Need to do something with serial port right after wake-up? */ return IRQ_HANDLED; diff --git a/arch/arm/mach-omap1/time.c b/arch/arm/mach-omap1/time.c index 4d91b9f5108..1b7e4a506c2 100644 --- a/arch/arm/mach-omap1/time.c +++ b/arch/arm/mach-omap1/time.c @@ -160,8 +160,7 @@ static unsigned long omap_mpu_timer_gettimeoffset(void) * Latency during the interrupt is calculated using timer1. * Both timer0 and timer1 are counting at 6MHz (P2 6.5MHz). */ -static irqreturn_t omap_mpu_timer_interrupt(int irq, void *dev_id, - struct pt_regs *regs) +static irqreturn_t omap_mpu_timer_interrupt(int irq, void *dev_id) { unsigned long now, latency; @@ -169,7 +168,7 @@ static irqreturn_t omap_mpu_timer_interrupt(int irq, void *dev_id, now = 0 - omap_mpu_timer_read(0); latency = MPU_TICKS_PER_SEC / HZ - omap_mpu_timer_read(1); omap_mpu_timer_last = now - latency; - timer_tick(regs); + timer_tick(); write_sequnlock(&xtime_lock); return IRQ_HANDLED; @@ -182,8 +181,7 @@ static struct irqaction omap_mpu_timer_irq = { }; static unsigned long omap_mpu_timer1_overflows; -static irqreturn_t omap_mpu_timer1_interrupt(int irq, void *dev_id, - struct pt_regs *regs) +static irqreturn_t omap_mpu_timer1_interrupt(int irq, void *dev_id) { omap_mpu_timer1_overflows++; return IRQ_HANDLED; diff --git a/arch/arm/mach-omap2/board-apollon.c b/arch/arm/mach-omap2/board-apollon.c index c37b0e6d124..03d6905ba49 100644 --- a/arch/arm/mach-omap2/board-apollon.c +++ b/arch/arm/mach-omap2/board-apollon.c @@ -203,7 +203,7 @@ static void __init apollon_led_init(void) omap_set_gpio_dataout(LED2_GPIO15, 0); } -static irqreturn_t apollon_sw_interrupt(int irq, void *ignored, struct pt_regs *regs) +static irqreturn_t apollon_sw_interrupt(int irq, void *ignored) { static unsigned int led0, led1, led2; diff --git a/arch/arm/mach-omap2/timer-gp.c b/arch/arm/mach-omap2/timer-gp.c index fe5fd6d42de..973189cd976 100644 --- a/arch/arm/mach-omap2/timer-gp.c +++ b/arch/arm/mach-omap2/timer-gp.c @@ -37,13 +37,12 @@ static inline void omap2_gp_timer_start(unsigned long load_val) omap_dm_timer_start(gptimer); } -static irqreturn_t omap2_gp_timer_interrupt(int irq, void *dev_id, - struct pt_regs *regs) +static irqreturn_t omap2_gp_timer_interrupt(int irq, void *dev_id) { write_seqlock(&xtime_lock); omap_dm_timer_write_status(gptimer, OMAP_TIMER_INT_OVERFLOW); - timer_tick(regs); + timer_tick(); write_sequnlock(&xtime_lock); diff --git a/arch/arm/mach-pnx4008/dma.c b/arch/arm/mach-pnx4008/dma.c index ec01574f88a..d6a279e4b52 100644 --- a/arch/arm/mach-pnx4008/dma.c +++ b/arch/arm/mach-pnx4008/dma.c @@ -32,7 +32,7 @@ static struct dma_channel { char *name; - void (*irq_handler) (int, int, void *, struct pt_regs *); + void (*irq_handler) (int, int, void *); void *data; struct pnx4008_dma_ll *ll; u32 ll_dma; @@ -150,8 +150,7 @@ static inline void pnx4008_dma_unlock(void) #define VALID_CHANNEL(c) (((c) >= 0) && ((c) < MAX_DMA_CHANNELS)) int pnx4008_request_channel(char *name, int ch, - void (*irq_handler) (int, int, void *, - struct pt_regs *), void *data) + void (*irq_handler) (int, int, void *), void *data) { int i, found = 0; @@ -1033,7 +1032,7 @@ int pnx4008_dma_ch_enabled(int ch) EXPORT_SYMBOL_GPL(pnx4008_dma_ch_enabled); -static irqreturn_t dma_irq_handler(int irq, void *dev_id, struct pt_regs *regs) +static irqreturn_t dma_irq_handler(int irq, void *dev_id) { int i; unsigned long dint = __raw_readl(DMAC_INT_STAT); @@ -1053,8 +1052,7 @@ static irqreturn_t dma_irq_handler(int irq, void *dev_id, struct pt_regs *regs) cause |= DMA_ERR_INT; if (tcint & i_bit) cause |= DMA_TC_INT; - channel->irq_handler(i, cause, channel->data, - regs); + channel->irq_handler(i, cause, channel->data); } else { /* * IRQ for an unregistered DMA channel diff --git a/arch/arm/mach-pnx4008/time.c b/arch/arm/mach-pnx4008/time.c index b986065cd0f..8621c206ac8 100644 --- a/arch/arm/mach-pnx4008/time.c +++ b/arch/arm/mach-pnx4008/time.c @@ -47,15 +47,14 @@ static unsigned long pnx4008_gettimeoffset(void) /*! * IRQ handler for the timer */ -static irqreturn_t pnx4008_timer_interrupt(int irq, void *dev_id, - struct pt_regs *regs) +static irqreturn_t pnx4008_timer_interrupt(int irq, void *dev_id) { if (__raw_readl(HSTIM_INT) & MATCH0_INT) { write_seqlock(&xtime_lock); do { - timer_tick(regs); + timer_tick(); /* * this algorithm takes care of possible delay diff --git a/arch/arm/mach-pxa/corgi.c b/arch/arm/mach-pxa/corgi.c index 337c01c4ac3..74f8378d7bb 100644 --- a/arch/arm/mach-pxa/corgi.c +++ b/arch/arm/mach-pxa/corgi.c @@ -212,7 +212,7 @@ static struct platform_device corgits_device = { */ static struct pxamci_platform_data corgi_mci_platform_data; -static int corgi_mci_init(struct device *dev, irqreturn_t (*corgi_detect_int)(int, void *, struct pt_regs *), void *data) +static int corgi_mci_init(struct device *dev, irqreturn_t (*corgi_detect_int)(int, void *), void *data) { int err; diff --git a/arch/arm/mach-pxa/dma.c b/arch/arm/mach-pxa/dma.c index 7d8c85486c6..4440babe7b9 100644 --- a/arch/arm/mach-pxa/dma.c +++ b/arch/arm/mach-pxa/dma.c @@ -27,13 +27,13 @@ static struct dma_channel { char *name; - void (*irq_handler)(int, void *, struct pt_regs *); + void (*irq_handler)(int, void *); void *data; } dma_channels[PXA_DMA_CHANNELS]; int pxa_request_dma (char *name, pxa_dma_prio prio, - void (*irq_handler)(int, void *, struct pt_regs *), + void (*irq_handler)(int, void *), void *data) { unsigned long flags; @@ -87,7 +87,7 @@ void pxa_free_dma (int dma_ch) local_irq_restore(flags); } -static irqreturn_t dma_irq_handler(int irq, void *dev_id, struct pt_regs *regs) +static irqreturn_t dma_irq_handler(int irq, void *dev_id) { int i, dint = DINT; @@ -95,7 +95,7 @@ static irqreturn_t dma_irq_handler(int irq, void *dev_id, struct pt_regs *regs) if (dint & (1 << i)) { struct dma_channel *channel = &dma_channels[i]; if (channel->name && channel->irq_handler) { - channel->irq_handler(i, channel->data, regs); + channel->irq_handler(i, channel->data); } else { /* * IRQ for an unregistered DMA channel: diff --git a/arch/arm/mach-pxa/idp.c b/arch/arm/mach-pxa/idp.c index 3e4b0ab71c6..a4cb875b748 100644 --- a/arch/arm/mach-pxa/idp.c +++ b/arch/arm/mach-pxa/idp.c @@ -125,7 +125,7 @@ static struct pxafb_mach_info sharp_lm8v31 = { .pxafb_lcd_power = &idp_lcd_power }; -static int idp_mci_init(struct device *dev, irqreturn_t (*idp_detect_int)(int, void *, struct pt_regs *), void *data) +static int idp_mci_init(struct device *dev, irqreturn_t (*idp_detect_int)(int, void *), void *data) { /* setup GPIO for PXA25x MMC controller */ pxa_gpio_mode(GPIO6_MMCCLK_MD); diff --git a/arch/arm/mach-pxa/irq.c b/arch/arm/mach-pxa/irq.c index 12141e2a50c..ab1a16025d5 100644 --- a/arch/arm/mach-pxa/irq.c +++ b/arch/arm/mach-pxa/irq.c @@ -143,8 +143,7 @@ static struct irq_chip pxa_low_gpio_chip = { * Demux handler for GPIO>=2 edge detect interrupts */ -static void pxa_gpio_demux_handler(unsigned int irq, struct irqdesc *desc, - struct pt_regs *regs) +static void pxa_gpio_demux_handler(unsigned int irq, struct irqdesc *desc) { unsigned int mask; int loop; @@ -160,7 +159,7 @@ static void pxa_gpio_demux_handler(unsigned int irq, struct irqdesc *desc, mask >>= 2; do { if (mask & 1) - desc_handle_irq(irq, desc, regs); + desc_handle_irq(irq, desc); irq++; desc++; mask >>= 1; @@ -175,7 +174,7 @@ static void pxa_gpio_demux_handler(unsigned int irq, struct irqdesc *desc, desc = irq_desc + irq; do { if (mask & 1) - desc_handle_irq(irq, desc, regs); + desc_handle_irq(irq, desc); irq++; desc++; mask >>= 1; @@ -190,7 +189,7 @@ static void pxa_gpio_demux_handler(unsigned int irq, struct irqdesc *desc, desc = irq_desc + irq; do { if (mask & 1) - desc_handle_irq(irq, desc, regs); + desc_handle_irq(irq, desc); irq++; desc++; mask >>= 1; @@ -206,7 +205,7 @@ static void pxa_gpio_demux_handler(unsigned int irq, struct irqdesc *desc, desc = irq_desc + irq; do { if (mask & 1) - desc_handle_irq(irq, desc, regs); + desc_handle_irq(irq, desc); irq++; desc++; mask >>= 1; diff --git a/arch/arm/mach-pxa/lpd270.c b/arch/arm/mach-pxa/lpd270.c index eff2a91b256..5749f6b72e1 100644 --- a/arch/arm/mach-pxa/lpd270.c +++ b/arch/arm/mach-pxa/lpd270.c @@ -75,8 +75,7 @@ static struct irq_chip lpd270_irq_chip = { .unmask = lpd270_unmask_irq, }; -static void lpd270_irq_handler(unsigned int irq, struct irqdesc *desc, - struct pt_regs *regs) +static void lpd270_irq_handler(unsigned int irq, struct irqdesc *desc) { unsigned long pending; @@ -86,7 +85,7 @@ static void lpd270_irq_handler(unsigned int irq, struct irqdesc *desc, if (likely(pending)) { irq = LPD270_IRQ(0) + __ffs(pending); desc = irq_desc + irq; - desc_handle_irq(irq, desc, regs); + desc_handle_irq(irq, desc); pending = __raw_readw(LPD270_INT_STATUS) & lpd270_irq_enabled; diff --git a/arch/arm/mach-pxa/lubbock.c b/arch/arm/mach-pxa/lubbock.c index 157cf47cbe6..b1e77bd85a3 100644 --- a/arch/arm/mach-pxa/lubbock.c +++ b/arch/arm/mach-pxa/lubbock.c @@ -85,8 +85,7 @@ static struct irq_chip lubbock_irq_chip = { .unmask = lubbock_unmask_irq, }; -static void lubbock_irq_handler(unsigned int irq, struct irqdesc *desc, - struct pt_regs *regs) +static void lubbock_irq_handler(unsigned int irq, struct irqdesc *desc) { unsigned long pending = LUB_IRQ_SET_CLR & lubbock_irq_enabled; do { @@ -94,7 +93,7 @@ static void lubbock_irq_handler(unsigned int irq, struct irqdesc *desc, if (likely(pending)) { irq = LUBBOCK_IRQ(0) + __ffs(pending); desc = irq_desc + irq; - desc_handle_irq(irq, desc, regs); + desc_handle_irq(irq, desc); } pending = LUB_IRQ_SET_CLR & lubbock_irq_enabled; } while (pending); @@ -379,7 +378,7 @@ static struct pxafb_mach_info sharp_lm8v31 = { #define MMC_POLL_RATE msecs_to_jiffies(1000) static void lubbock_mmc_poll(unsigned long); -static irqreturn_t (*mmc_detect_int)(int, void *, struct pt_regs *); +static irqreturn_t (*mmc_detect_int)(int, void *); static struct timer_list mmc_timer = { .function = lubbock_mmc_poll, @@ -403,17 +402,17 @@ static void lubbock_mmc_poll(unsigned long data) } } -static irqreturn_t lubbock_detect_int(int irq, void *data, struct pt_regs *regs) +static irqreturn_t lubbock_detect_int(int irq, void *data) { /* IRQ is level triggered; disable, and poll for removal */ disable_irq(irq); mod_timer(&mmc_timer, jiffies + MMC_POLL_RATE); - return mmc_detect_int(irq, data, regs); + return mmc_detect_int(irq, data); } static int lubbock_mci_init(struct device *dev, - irqreturn_t (*detect_int)(int, void *, struct pt_regs *), + irqreturn_t (*detect_int)(int, void *), void *data) { /* setup GPIO for PXA25x MMC controller */ diff --git a/arch/arm/mach-pxa/mainstone.c b/arch/arm/mach-pxa/mainstone.c index 7ba0447d6fa..8c301978491 100644 --- a/arch/arm/mach-pxa/mainstone.c +++ b/arch/arm/mach-pxa/mainstone.c @@ -71,8 +71,7 @@ static struct irq_chip mainstone_irq_chip = { .unmask = mainstone_unmask_irq, }; -static void mainstone_irq_handler(unsigned int irq, struct irqdesc *desc, - struct pt_regs *regs) +static void mainstone_irq_handler(unsigned int irq, struct irqdesc *desc) { unsigned long pending = MST_INTSETCLR & mainstone_irq_enabled; do { @@ -80,7 +79,7 @@ static void mainstone_irq_handler(unsigned int irq, struct irqdesc *desc, if (likely(pending)) { irq = MAINSTONE_IRQ(0) + __ffs(pending); desc = irq_desc + irq; - desc_handle_irq(irq, desc, regs); + desc_handle_irq(irq, desc); } pending = MST_INTSETCLR & mainstone_irq_enabled; } while (pending); @@ -314,7 +313,7 @@ static struct pxafb_mach_info mainstone_pxafb_info = { .pxafb_backlight_power = mainstone_backlight_power, }; -static int mainstone_mci_init(struct device *dev, irqreturn_t (*mstone_detect_int)(int, void *, struct pt_regs *), void *data) +static int mainstone_mci_init(struct device *dev, irqreturn_t (*mstone_detect_int)(int, void *), void *data) { int err; diff --git a/arch/arm/mach-pxa/poodle.c b/arch/arm/mach-pxa/poodle.c index 5e8c098ca13..9052a971c8a 100644 --- a/arch/arm/mach-pxa/poodle.c +++ b/arch/arm/mach-pxa/poodle.c @@ -197,7 +197,7 @@ static struct platform_device poodle_ts_device = { */ static struct pxamci_platform_data poodle_mci_platform_data; -static int poodle_mci_init(struct device *dev, irqreturn_t (*poodle_detect_int)(int, void *, struct pt_regs *), void *data) +static int poodle_mci_init(struct device *dev, irqreturn_t (*poodle_detect_int)(int, void *), void *data) { int err; diff --git a/arch/arm/mach-pxa/spitz.c b/arch/arm/mach-pxa/spitz.c index 401cdb850fb..911452dd0b4 100644 --- a/arch/arm/mach-pxa/spitz.c +++ b/arch/arm/mach-pxa/spitz.c @@ -291,7 +291,7 @@ static struct platform_device spitzts_device = { static struct pxamci_platform_data spitz_mci_platform_data; -static int spitz_mci_init(struct device *dev, irqreturn_t (*spitz_detect_int)(int, void *, struct pt_regs *), void *data) +static int spitz_mci_init(struct device *dev, irqreturn_t (*spitz_detect_int)(int, void *), void *data) { int err; diff --git a/arch/arm/mach-pxa/ssp.c b/arch/arm/mach-pxa/ssp.c index 1fddfeaa630..6cc202755fb 100644 --- a/arch/arm/mach-pxa/ssp.c +++ b/arch/arm/mach-pxa/ssp.c @@ -65,7 +65,7 @@ static const struct ssp_info_ ssp_info[PXA_SSP_PORTS] = { static DEFINE_MUTEX(mutex); static int use_count[PXA_SSP_PORTS] = {0, 0, 0}; -static irqreturn_t ssp_interrupt(int irq, void *dev_id, struct pt_regs *regs) +static irqreturn_t ssp_interrupt(int irq, void *dev_id) { struct ssp_dev *dev = (struct ssp_dev*) dev_id; unsigned int status = SSSR_P(dev->port); diff --git a/arch/arm/mach-pxa/time.c b/arch/arm/mach-pxa/time.c index 5dbd191c57c..3ac268fa419 100644 --- a/arch/arm/mach-pxa/time.c +++ b/arch/arm/mach-pxa/time.c @@ -75,7 +75,7 @@ static int match_posponed; #endif static irqreturn_t -pxa_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) +pxa_timer_interrupt(int irq, void *dev_id) { int next_match; @@ -105,7 +105,7 @@ pxa_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) * exactly one tick period which should be a pretty rare event. */ do { - timer_tick(regs); + timer_tick(); OSSR = OSSR_M0; /* Clear match on timer 0 */ next_match = (OSMR0 += LATCH); } while( (signed long)(next_match - OSCR) <= 8 ); @@ -157,13 +157,13 @@ static void pxa_dyn_tick_reprogram(unsigned long ticks) } static irqreturn_t -pxa_dyn_tick_handler(int irq, void *dev_id, struct pt_regs *regs) +pxa_dyn_tick_handler(int irq, void *dev_id) { if (match_posponed) { match_posponed = 0; OSMR0 = initial_match; if ( (signed long)(initial_match - OSCR) <= 8 ) - return pxa_timer_interrupt(irq, dev_id, regs); + return pxa_timer_interrupt(irq, dev_id); } return IRQ_NONE; } diff --git a/arch/arm/mach-pxa/tosa.c b/arch/arm/mach-pxa/tosa.c index 249353616ab..17e46c1060b 100644 --- a/arch/arm/mach-pxa/tosa.c +++ b/arch/arm/mach-pxa/tosa.c @@ -174,7 +174,7 @@ static struct pxa2xx_udc_mach_info udc_info __initdata = { */ static struct pxamci_platform_data tosa_mci_platform_data; -static int tosa_mci_init(struct device *dev, irqreturn_t (*tosa_detect_int)(int, void *, struct pt_regs *), void *data) +static int tosa_mci_init(struct device *dev, irqreturn_t (*tosa_detect_int)(int, void *), void *data) { int err; diff --git a/arch/arm/mach-pxa/trizeps4.c b/arch/arm/mach-pxa/trizeps4.c index 910571e9a19..a2c05a840a2 100644 --- a/arch/arm/mach-pxa/trizeps4.c +++ b/arch/arm/mach-pxa/trizeps4.c @@ -270,7 +270,7 @@ void board_pcmcia_power(int power) {;} #endif /* CONFIG_MACH_TRIZEPS4_CONXS */ EXPORT_SYMBOL(board_pcmcia_power); -static int trizeps4_mci_init(struct device *dev, irqreturn_t (*mci_detect_int)(int, void *, struct pt_regs *), void *data) +static int trizeps4_mci_init(struct device *dev, irqreturn_t (*mci_detect_int)(int, void *), void *data) { int err; /* setup GPIO for PXA27x MMC controller */ diff --git a/arch/arm/mach-realview/core.c b/arch/arm/mach-realview/core.c index da028697382..68c67053f47 100644 --- a/arch/arm/mach-realview/core.c +++ b/arch/arm/mach-realview/core.c @@ -515,18 +515,18 @@ static unsigned long realview_gettimeoffset(void) /* * IRQ handler for the timer */ -static irqreturn_t realview_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) +static irqreturn_t realview_timer_interrupt(int irq, void *dev_id) { write_seqlock(&xtime_lock); // ...clear the interrupt writel(1, TIMER0_VA_BASE + TIMER_INTCLR); - timer_tick(regs); + timer_tick(); #if defined(CONFIG_SMP) && !defined(CONFIG_LOCAL_TIMERS) smp_send_timer(); - update_process_times(user_mode(regs)); + update_process_times(user_mode(get_irq_regs())); #endif write_sequnlock(&xtime_lock); diff --git a/arch/arm/mach-rpc/dma.c b/arch/arm/mach-rpc/dma.c index ac511d41d4d..596379a4cf8 100644 --- a/arch/arm/mach-rpc/dma.c +++ b/arch/arm/mach-rpc/dma.c @@ -83,7 +83,7 @@ static void iomd_get_next_sg(struct scatterlist *sg, dma_t *dma) sg->length |= flags; } -static irqreturn_t iomd_dma_handle(int irq, void *dev_id, struct pt_regs *regs) +static irqreturn_t iomd_dma_handle(int irq, void *dev_id) { dma_t *dma = (dma_t *)dev_id; unsigned long base = dma->dma_base; diff --git a/arch/arm/mach-s3c2410/bast-irq.c b/arch/arm/mach-s3c2410/bast-irq.c index 440e9aa0211..23d5beea556 100644 --- a/arch/arm/mach-s3c2410/bast-irq.c +++ b/arch/arm/mach-s3c2410/bast-irq.c @@ -112,8 +112,7 @@ static struct irqchip bast_pc104_chip = { static void bast_irq_pc104_demux(unsigned int irq, - struct irqdesc *desc, - struct pt_regs *regs) + struct irqdesc *desc) { unsigned int stat; unsigned int irqno; @@ -133,7 +132,7 @@ bast_irq_pc104_demux(unsigned int irq, if (stat & 1) { irqno = bast_pc104_irqs[i]; desc = irq_desc + irqno; - desc_handle_irq(irqno, desc, regs); + desc_handle_irq(irqno, desc); } } } diff --git a/arch/arm/mach-s3c2410/dma.c b/arch/arm/mach-s3c2410/dma.c index d264bbbd8be..3d211dc2f2f 100644 --- a/arch/arm/mach-s3c2410/dma.c +++ b/arch/arm/mach-s3c2410/dma.c @@ -595,7 +595,7 @@ s3c2410_dma_lastxfer(struct s3c2410_dma_chan *chan) #define dmadbg2(x...) static irqreturn_t -s3c2410_dma_irq(int irq, void *devpw, struct pt_regs *regs) +s3c2410_dma_irq(int irq, void *devpw) { struct s3c2410_dma_chan *chan = (struct s3c2410_dma_chan *)devpw; struct s3c2410_dma_buf *buf; diff --git a/arch/arm/mach-s3c2410/irq.c b/arch/arm/mach-s3c2410/irq.c index 3e9f3462c61..683b3491ba3 100644 --- a/arch/arm/mach-s3c2410/irq.c +++ b/arch/arm/mach-s3c2410/irq.c @@ -480,8 +480,7 @@ static struct irqchip s3c_irq_adc = { /* irq demux for adc */ static void s3c_irq_demux_adc(unsigned int irq, - struct irqdesc *desc, - struct pt_regs *regs) + struct irqdesc *desc) { unsigned int subsrc, submsk; unsigned int offset = 9; @@ -500,17 +499,16 @@ static void s3c_irq_demux_adc(unsigned int irq, if (subsrc != 0) { if (subsrc & 1) { mydesc = irq_desc + IRQ_TC; - desc_handle_irq(IRQ_TC, mydesc, regs); + desc_handle_irq(IRQ_TC, mydesc); } if (subsrc & 2) { mydesc = irq_desc + IRQ_ADC; - desc_handle_irq(IRQ_ADC, mydesc, regs); + desc_handle_irq(IRQ_ADC, mydesc); } } } -static void s3c_irq_demux_uart(unsigned int start, - struct pt_regs *regs) +static void s3c_irq_demux_uart(unsigned int start) { unsigned int subsrc, submsk; unsigned int offset = start - IRQ_S3CUART_RX0; @@ -533,17 +531,17 @@ static void s3c_irq_demux_uart(unsigned int start, desc = irq_desc + start; if (subsrc & 1) - desc_handle_irq(start, desc, regs); + desc_handle_irq(start, desc); desc++; if (subsrc & 2) - desc_handle_irq(start+1, desc, regs); + desc_handle_irq(start+1, desc); desc++; if (subsrc & 4) - desc_handle_irq(start+2, desc, regs); + desc_handle_irq(start+2, desc); } } @@ -551,35 +549,31 @@ static void s3c_irq_demux_uart(unsigned int start, static void s3c_irq_demux_uart0(unsigned int irq, - struct irqdesc *desc, - struct pt_regs *regs) + struct irqdesc *desc) { irq = irq; - s3c_irq_demux_uart(IRQ_S3CUART_RX0, regs); + s3c_irq_demux_uart(IRQ_S3CUART_RX0); } static void s3c_irq_demux_uart1(unsigned int irq, - struct irqdesc *desc, - struct pt_regs *regs) + struct irqdesc *desc) { irq = irq; - s3c_irq_demux_uart(IRQ_S3CUART_RX1, regs); + s3c_irq_demux_uart(IRQ_S3CUART_RX1); } static void s3c_irq_demux_uart2(unsigned int irq, - struct irqdesc *desc, - struct pt_regs *regs) + struct irqdesc *desc) { irq = irq; - s3c_irq_demux_uart(IRQ_S3CUART_RX2, regs); + s3c_irq_demux_uart(IRQ_S3CUART_RX2); } static void s3c_irq_demux_extint8(unsigned int irq, - struct irqdesc *desc, - struct pt_regs *regs) + struct irqdesc *desc) { unsigned long eintpnd = __raw_readl(S3C24XX_EINTPEND); unsigned long eintmsk = __raw_readl(S3C24XX_EINTMASK); @@ -594,15 +588,14 @@ s3c_irq_demux_extint8(unsigned int irq, eintpnd &= ~(1<<irq); irq += (IRQ_EINT4 - 4); - desc_handle_irq(irq, irq_desc + irq, regs); + desc_handle_irq(irq, irq_desc + irq); } } static void s3c_irq_demux_extint4t7(unsigned int irq, - struct irqdesc *desc, - struct pt_regs *regs) + struct irqdesc *desc) { unsigned long eintpnd = __raw_readl(S3C24XX_EINTPEND); unsigned long eintmsk = __raw_readl(S3C24XX_EINTMASK); @@ -618,7 +611,7 @@ s3c_irq_demux_extint4t7(unsigned int irq, irq += (IRQ_EINT4 - 4); - desc_handle_irq(irq, irq_desc + irq, regs); + desc_handle_irq(irq, irq_desc + irq); } } diff --git a/arch/arm/mach-s3c2410/mach-amlm5900.c b/arch/arm/mach-s3c2410/mach-amlm5900.c index ba5109af40b..817e2c68441 100644 --- a/arch/arm/mach-s3c2410/mach-amlm5900.c +++ b/arch/arm/mach-s3c2410/mach-amlm5900.c @@ -226,7 +226,7 @@ static struct s3c2410fb_mach_info __initdata amlm5900_lcd_info = { #endif static irqreturn_t -amlm5900_wake_interrupt(int irq, void *ignored, struct pt_regs *regs) +amlm5900_wake_interrupt(int irq, void *ignored) { return IRQ_HANDLED; } diff --git a/arch/arm/mach-s3c2410/s3c2440-irq.c b/arch/arm/mach-s3c2410/s3c2440-irq.c index fc08febe2e5..39db0752d53 100644 --- a/arch/arm/mach-s3c2410/s3c2440-irq.c +++ b/arch/arm/mach-s3c2410/s3c2440-irq.c @@ -42,8 +42,7 @@ /* WDT/AC97 */ static void s3c_irq_demux_wdtac97(unsigned int irq, - struct irqdesc *desc, - struct pt_regs *regs) + struct irqdesc *desc) { unsigned int subsrc, submsk; struct irqdesc *mydesc; @@ -61,11 +60,11 @@ static void s3c_irq_demux_wdtac97(unsigned int irq, if (subsrc != 0) { if (subsrc & 1) { mydesc = irq_desc + IRQ_S3C2440_WDT; - desc_handle_irq(IRQ_S3C2440_WDT, mydesc, regs); + desc_handle_irq(IRQ_S3C2440_WDT, mydesc); } if (subsrc & 2) { mydesc = irq_desc + IRQ_S3C2440_AC97; - desc_handle_irq(IRQ_S3C2440_AC97, mydesc, regs); + desc_handle_irq(IRQ_S3C2440_AC97, mydesc); } } } diff --git a/arch/arm/mach-s3c2410/s3c244x-irq.c b/arch/arm/mach-s3c2410/s3c244x-irq.c index ec702f88b29..146f2109dd9 100644 --- a/arch/arm/mach-s3c2410/s3c244x-irq.c +++ b/arch/arm/mach-s3c2410/s3c244x-irq.c @@ -42,8 +42,7 @@ /* camera irq */ static void s3c_irq_demux_cam(unsigned int irq, - struct irqdesc *desc, - struct pt_regs *regs) + struct irqdesc *desc) { unsigned int subsrc, submsk; struct irqdesc *mydesc; @@ -61,11 +60,11 @@ static void s3c_irq_demux_cam(unsigned int irq, if (subsrc != 0) { if (subsrc & 1) { mydesc = irq_desc + IRQ_S3C2440_CAM_C; - desc_handle_irq(IRQ_S3C2440_CAM_C, mydesc, regs); + desc_handle_irq(IRQ_S3C2440_CAM_C, mydesc); } if (subsrc & 2) { mydesc = irq_desc + IRQ_S3C2440_CAM_P; - desc_handle_irq(IRQ_S3C2440_CAM_P, mydesc, regs); + desc_handle_irq(IRQ_S3C2440_CAM_P, mydesc); } } } diff --git a/arch/arm/mach-s3c2410/time.c b/arch/arm/mach-s3c2410/time.c index 00d1cfca971..9910bf0f2ce 100644 --- a/arch/arm/mach-s3c2410/time.c +++ b/arch/arm/mach-s3c2410/time.c @@ -128,10 +128,10 @@ static unsigned long s3c2410_gettimeoffset (void) * IRQ handler for the timer */ static irqreturn_t -s3c2410_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) +s3c2410_timer_interrupt(int irq, void *dev_id) { write_seqlock(&xtime_lock); - timer_tick(regs); + timer_tick(); write_sequnlock(&xtime_lock); return IRQ_HANDLED; } diff --git a/arch/arm/mach-s3c2410/usb-simtec.c b/arch/arm/mach-s3c2410/usb-simtec.c index c635efa7cd3..22b0e1cdd4b 100644 --- a/arch/arm/mach-s3c2410/usb-simtec.c +++ b/arch/arm/mach-s3c2410/usb-simtec.c @@ -58,7 +58,7 @@ usb_simtec_powercontrol(int port, int to) } static irqreturn_t -usb_simtec_ocirq(int irq, void *pw, struct pt_regs *regs) +usb_simtec_ocirq(int irq, void *pw) { struct s3c2410_hcd_info *info = (struct s3c2410_hcd_info *)pw; diff --git a/arch/arm/mach-sa1100/dma.c b/arch/arm/mach-sa1100/dma.c index 2ea2a657a03..1fbe053e8b5 100644 --- a/arch/arm/mach-sa1100/dma.c +++ b/arch/arm/mach-sa1100/dma.c @@ -42,7 +42,7 @@ static sa1100_dma_t dma_chan[SA1100_DMA_CHANNELS]; static spinlock_t dma_list_lock; -static irqreturn_t dma_irq_handler(int irq, void *dev_id, struct pt_regs *regs) +static irqreturn_t dma_irq_handler(int irq, void *dev_id) { dma_regs_t *dma_regs = dev_id; sa1100_dma_t *dma = dma_chan + (((u_int)dma_regs >> 5) & 7); diff --git a/arch/arm/mach-sa1100/h3600.c b/arch/arm/mach-sa1100/h3600.c index 7364478cec1..fa6dc71bd6a 100644 --- a/arch/arm/mach-sa1100/h3600.c +++ b/arch/arm/mach-sa1100/h3600.c @@ -702,7 +702,7 @@ static u32 gpio_irq_mask[] = { GPIO2_SD_CON_SLT, }; -static void h3800_IRQ_demux(unsigned int irq, struct irqdesc *desc, struct pt_regs *regs) +static void h3800_IRQ_demux(unsigned int irq, struct irqdesc *desc) { int i; @@ -719,14 +719,14 @@ static void h3800_IRQ_demux(unsigned int irq, struct irqdesc *desc, struct pt_re if (0) printk("%s KPIO 0x%08X\n", __FUNCTION__, irq); for (j = 0; j < H3800_KPIO_IRQ_COUNT; j++) if (irq & kpio_irq_mask[j]) - do_edge_IRQ(H3800_KPIO_IRQ_COUNT + j, irq_desc + H3800_KPIO_IRQ_COUNT + j, regs); + do_edge_IRQ(H3800_KPIO_IRQ_COUNT + j, irq_desc + H3800_KPIO_IRQ_COUNT + j); /* GPIO2 */ irq = H3800_ASIC2_GPIINTFLAG; if (0) printk("%s GPIO 0x%08X\n", __FUNCTION__, irq); for (j = 0; j < H3800_GPIO_IRQ_COUNT; j++) if (irq & gpio_irq_mask[j]) - do_edge_IRQ(H3800_GPIO_IRQ_COUNT + j, irq_desc + H3800_GPIO_IRQ_COUNT + j , regs); + do_edge_IRQ(H3800_GPIO_IRQ_COUNT + j, irq_desc + H3800_GPIO_IRQ_COUNT + j); } if (i >= MAX_ASIC_ISR_LOOPS) diff --git a/arch/arm/mach-sa1100/irq.c b/arch/arm/mach-sa1100/irq.c index b55b90a2e8f..f4c6322ca33 100644 --- a/arch/arm/mach-sa1100/irq.c +++ b/arch/arm/mach-sa1100/irq.c @@ -110,8 +110,7 @@ static struct irq_chip sa1100_low_gpio_chip = { * and call the handler. */ static void -sa1100_high_gpio_handler(unsigned int irq, struct irqdesc *desc, - struct pt_regs *regs) +sa1100_high_gpio_handler(unsigned int irq, struct irqdesc *desc) { unsigned int mask; @@ -128,7 +127,7 @@ sa1100_high_gpio_handler(unsigned int irq, struct irqdesc *desc, mask >>= 11; do { if (mask & 1) - desc_handle_irq(irq, desc, regs); + desc_handle_irq(irq, desc); mask >>= 1; irq++; desc++; diff --git a/arch/arm/mach-sa1100/neponset.c b/arch/arm/mach-sa1100/neponset.c index af6d2775cf8..354d5e91da5 100644 --- a/arch/arm/mach-sa1100/neponset.c +++ b/arch/arm/mach-sa1100/neponset.c @@ -29,7 +29,7 @@ * is rather unfortunate. */ static void -neponset_irq_handler(unsigned int irq, struct irqdesc *desc, struct pt_regs *regs) +neponset_irq_handler(unsigned int irq, struct irqdesc *desc) { unsigned int irr; @@ -69,12 +69,12 @@ neponset_irq_handler(unsigned int irq, struct irqdesc *desc, struct pt_regs *reg if (irr & IRR_ETHERNET) { d = irq_desc + IRQ_NEPONSET_SMC9196; - desc_handle_irq(IRQ_NEPONSET_SMC9196, d, regs); + desc_handle_irq(IRQ_NEPONSET_SMC9196, d); } if (irr & IRR_USAR) { d = irq_desc + IRQ_NEPONSET_USAR; - desc_handle_irq(IRQ_NEPONSET_USAR, d, regs); + desc_handle_irq(IRQ_NEPONSET_USAR, d); } desc->chip->unmask(irq); @@ -82,7 +82,7 @@ neponset_irq_handler(unsigned int irq, struct irqdesc *desc, struct pt_regs *reg if (irr & IRR_SA1111) { d = irq_desc + IRQ_NEPONSET_SA1111; - desc_handle_irq(IRQ_NEPONSET_SA1111, d, regs); + desc_handle_irq(IRQ_NEPONSET_SA1111, d); } } } diff --git a/arch/arm/mach-sa1100/ssp.c b/arch/arm/mach-sa1100/ssp.c index 5eba5fbbb56..59703c6fb29 100644 --- a/arch/arm/mach-sa1100/ssp.c +++ b/arch/arm/mach-sa1100/ssp.c @@ -25,7 +25,7 @@ #define TIMEOUT 100000 -static irqreturn_t ssp_interrupt(int irq, void *dev_id, struct pt_regs *regs) +static irqreturn_t ssp_interrupt(int irq, void *dev_id) { unsigned int status = Ser4SSSR; diff --git a/arch/arm/mach-sa1100/time.c b/arch/arm/mach-sa1100/time.c index 49ae716e16c..4284bd6f7a1 100644 --- a/arch/arm/mach-sa1100/time.c +++ b/arch/arm/mach-sa1100/time.c @@ -77,7 +77,7 @@ static int match_posponed; #endif static irqreturn_t -sa1100_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) +sa1100_timer_interrupt(int irq, void *dev_id) { unsigned int next_match; @@ -99,7 +99,7 @@ sa1100_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) * handlers. */ do { - timer_tick(regs); + timer_tick(); OSSR = OSSR_M0; /* Clear match on timer 0 */ next_match = (OSMR0 += LATCH); } while ((signed long)(next_match - OSCR) <= 0); @@ -151,13 +151,13 @@ static void sa1100_dyn_tick_reprogram(unsigned long ticks) } static irqreturn_t -sa1100_dyn_tick_handler(int irq, void *dev_id, struct pt_regs *regs) +sa1100_dyn_tick_handler(int irq, void *dev_id) { if (match_posponed) { match_posponed = 0; OSMR0 = initial_match; if ((signed long)(initial_match - OSCR) <= 0) - return sa1100_timer_interrupt(irq, dev_id, regs); + return sa1100_timer_interrupt(irq, dev_id); } return IRQ_NONE; } diff --git a/arch/arm/mach-shark/core.c b/arch/arm/mach-shark/core.c index 1095df34fec..0e480fae8ec 100644 --- a/arch/arm/mach-shark/core.c +++ b/arch/arm/mach-shark/core.c @@ -80,10 +80,10 @@ static void __init shark_map_io(void) #define HZ_TIME ((1193180 + HZ/2) / HZ) static irqreturn_t -shark_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) +shark_timer_interrupt(int irq, void *dev_id) { write_seqlock(&xtime_lock); - timer_tick(regs); + timer_tick(); write_sequnlock(&xtime_lock); return IRQ_HANDLED; } diff --git a/arch/arm/mach-shark/irq.c b/arch/arm/mach-shark/irq.c index b227052296c..297ecf13065 100644 --- a/arch/arm/mach-shark/irq.c +++ b/arch/arm/mach-shark/irq.c @@ -61,7 +61,7 @@ static void shark_enable_8259A_irq(unsigned int irq) static void shark_ack_8259A_irq(unsigned int irq){} -static irqreturn_t bogus_int(int irq, void *dev_id, struct pt_regs *regs) +static irqreturn_t bogus_int(int irq, void *dev_id) { printk("Got interrupt %i!\n",irq); return IRQ_NONE; diff --git a/arch/arm/mach-versatile/core.c b/arch/arm/mach-versatile/core.c index f2bbef07b1e..2aa150b57ba 100644 --- a/arch/arm/mach-versatile/core.c +++ b/arch/arm/mach-versatile/core.c @@ -77,12 +77,12 @@ static struct irq_chip sic_chip = { }; static void -sic_handle_irq(unsigned int irq, struct irqdesc *desc, struct pt_regs *regs) +sic_handle_irq(unsigned int irq, struct irqdesc *desc) { unsigned long status = readl(VA_SIC_BASE + SIC_IRQ_STATUS); if (status == 0) { - do_bad_IRQ(irq, desc, regs); + do_bad_IRQ(irq, desc); return; } @@ -93,7 +93,7 @@ sic_handle_irq(unsigned int irq, struct irqdesc *desc, struct pt_regs *regs) irq += IRQ_SIC_START; desc = irq_desc + irq; - desc_handle_irq(irq, desc, regs); + desc_handle_irq(irq, desc); } while (status); } @@ -851,14 +851,14 @@ static unsigned long versatile_gettimeoffset(void) /* * IRQ handler for the timer */ -static irqreturn_t versatile_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) +static irqreturn_t versatile_timer_interrupt(int irq, void *dev_id) { write_seqlock(&xtime_lock); // ...clear the interrupt writel(1, TIMER0_VA_BASE + TIMER_INTCLR); - timer_tick(regs); + timer_tick(); write_sequnlock(&xtime_lock); diff --git a/arch/arm/oprofile/op_model_xscale.c b/arch/arm/oprofile/op_model_xscale.c index 726ad2b3b43..7899d3ca75a 100644 --- a/arch/arm/oprofile/op_model_xscale.c +++ b/arch/arm/oprofile/op_model_xscale.c @@ -341,7 +341,7 @@ static void inline __xsc2_check_ctrs(void) __asm__ __volatile__ ("mcr p14, 0, %0, c5, c1, 0" : : "r" (flag)); } -static irqreturn_t xscale_pmu_interrupt(int irq, void *arg, struct pt_regs *regs) +static irqreturn_t xscale_pmu_interrupt(int irq, void *arg) { int i; u32 pmnc; @@ -356,7 +356,7 @@ static irqreturn_t xscale_pmu_interrupt(int irq, void *arg, struct pt_regs *regs continue; write_counter(i, -(u32)results[i].reset_counter); - oprofile_add_sample(regs, i); + oprofile_add_sample(get_irq_regs(), i); results[i].ovf--; } diff --git a/arch/arm/plat-iop/time.c b/arch/arm/plat-iop/time.c index 06282dffbdc..f530abdaa7a 100644 --- a/arch/arm/plat-iop/time.c +++ b/arch/arm/plat-iop/time.c @@ -47,7 +47,7 @@ unsigned long iop3xx_gettimeoffset(void) } static irqreturn_t -iop3xx_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) +iop3xx_timer_interrupt(int irq, void *dev_id) { write_seqlock(&xtime_lock); @@ -57,7 +57,7 @@ iop3xx_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) while ((signed long)(next_jiffy_time - *IOP3XX_TU_TCR1) >= ticks_per_jiffy) { - timer_tick(regs); + timer_tick(); next_jiffy_time -= ticks_per_jiffy; } diff --git a/arch/arm/plat-omap/dma.c b/arch/arm/plat-omap/dma.c index 1bbb431843c..bb045e5ddbd 100644 --- a/arch/arm/plat-omap/dma.c +++ b/arch/arm/plat-omap/dma.c @@ -899,8 +899,7 @@ static int omap1_dma_handle_ch(int ch) return 1; } -static irqreturn_t omap1_dma_irq_handler(int irq, void *dev_id, - struct pt_regs *regs) +static irqreturn_t omap1_dma_irq_handler(int irq, void *dev_id) { int ch = ((int) dev_id) - 1; int handled = 0; @@ -962,8 +961,7 @@ static int omap2_dma_handle_ch(int ch) } /* STATUS register count is from 1-32 while our is 0-31 */ -static irqreturn_t omap2_dma_irq_handler(int irq, void *dev_id, - struct pt_regs *regs) +static irqreturn_t omap2_dma_irq_handler(int irq, void *dev_id) { u32 val; int i; @@ -1220,8 +1218,7 @@ static void set_b1_regs(void) omap_writew(fi, OMAP1610_DMA_LCD_SRC_FI_B1_L); } -static irqreturn_t lcd_dma_irq_handler(int irq, void *dev_id, - struct pt_regs *regs) +static irqreturn_t lcd_dma_irq_handler(int irq, void *dev_id) { u16 w; diff --git a/arch/arm/plat-omap/gpio.c b/arch/arm/plat-omap/gpio.c index f55f99ae58a..8162eed8b50 100644 --- a/arch/arm/plat-omap/gpio.c +++ b/arch/arm/plat-omap/gpio.c @@ -783,8 +783,7 @@ void omap_free_gpio(int gpio) * line's interrupt handler has been run, we may miss some nested * interrupts. */ -static void gpio_irq_handler(unsigned int irq, struct irqdesc *desc, - struct pt_regs *regs) +static void gpio_irq_handler(unsigned int irq, struct irqdesc *desc) { void __iomem *isr_reg = NULL; u32 isr; @@ -882,7 +881,7 @@ static void gpio_irq_handler(unsigned int irq, struct irqdesc *desc, continue; } - desc_handle_irq(gpio_irq, d, regs); + desc_handle_irq(gpio_irq, d); if (unlikely((d->status & IRQ_PENDING) && !d->depth)) { irq_mask = 1 << diff --git a/arch/arm/plat-omap/mcbsp.c b/arch/arm/plat-omap/mcbsp.c index ade9a0fa6ef..ec50008a2df 100644 --- a/arch/arm/plat-omap/mcbsp.c +++ b/arch/arm/plat-omap/mcbsp.c @@ -96,7 +96,7 @@ static void omap_mcbsp_dump_reg(u8 id) DBG("***********************\n"); } -static irqreturn_t omap_mcbsp_tx_irq_handler(int irq, void *dev_id, struct pt_regs *regs) +static irqreturn_t omap_mcbsp_tx_irq_handler(int irq, void *dev_id) { struct omap_mcbsp * mcbsp_tx = (struct omap_mcbsp *)(dev_id); @@ -106,7 +106,7 @@ static irqreturn_t omap_mcbsp_tx_irq_handler(int irq, void *dev_id, struct pt_re return IRQ_HANDLED; } -static irqreturn_t omap_mcbsp_rx_irq_handler(int irq, void *dev_id, struct pt_regs *regs) +static irqreturn_t omap_mcbsp_rx_irq_handler(int irq, void *dev_id) { struct omap_mcbsp * mcbsp_rx = (struct omap_mcbsp *)(dev_id); diff --git a/arch/arm/plat-omap/timer32k.c b/arch/arm/plat-omap/timer32k.c index cf6df3378d3..26531060116 100644 --- a/arch/arm/plat-omap/timer32k.c +++ b/arch/arm/plat-omap/timer32k.c @@ -194,8 +194,7 @@ unsigned long long sched_clock(void) * issues with dynamic tick. In the dynamic tick case, we need to lock * with irqsave. */ -static inline irqreturn_t _omap_32k_timer_interrupt(int irq, void *dev_id, - struct pt_regs *regs) +static inline irqreturn_t _omap_32k_timer_interrupt(int irq, void *dev_id) { unsigned long now; @@ -205,7 +204,7 @@ static inline irqreturn_t _omap_32k_timer_interrupt(int irq, void *dev_id, while ((signed long)(now - omap_32k_last_tick) >= OMAP_32K_TICKS_PER_HZ) { omap_32k_last_tick += OMAP_32K_TICKS_PER_HZ; - timer_tick(regs); + timer_tick(); } /* Restart timer so we don't drift off due to modulo or dynamic tick. @@ -218,19 +217,17 @@ static inline irqreturn_t _omap_32k_timer_interrupt(int irq, void *dev_id, return IRQ_HANDLED; } -static irqreturn_t omap_32k_timer_handler(int irq, void *dev_id, - struct pt_regs *regs) +static irqreturn_t omap_32k_timer_handler(int irq, void *dev_id) { - return _omap_32k_timer_interrupt(irq, dev_id, regs); + return _omap_32k_timer_interrupt(irq, dev_id); } -static irqreturn_t omap_32k_timer_interrupt(int irq, void *dev_id, - struct pt_regs *regs) +static irqreturn_t omap_32k_timer_interrupt(int irq, void *dev_id) { unsigned long flags; write_seqlock_irqsave(&xtime_lock, flags); - _omap_32k_timer_interrupt(irq, dev_id, regs); + _omap_32k_timer_interrupt(irq, dev_id); write_sequnlock_irqrestore(&xtime_lock, flags); return IRQ_HANDLED; diff --git a/arch/i386/kernel/apic.c b/arch/i386/kernel/apic.c index 7d500da0e63..2fd4b7d927c 100644 --- a/arch/i386/kernel/apic.c +++ b/arch/i386/kernel/apic.c @@ -1197,7 +1197,7 @@ inline void smp_local_timer_interrupt(void) { profile_tick(CPU_PROFILING); #ifdef CONFIG_SMP - update_process_times(user_mode_vm(irq_regs)); + update_process_times(user_mode_vm(get_irq_regs())); #endif /* diff --git a/arch/ia64/kernel/irq.c b/arch/ia64/kernel/irq.c index 7852382de2f..f07c0864b0b 100644 --- a/arch/ia64/kernel/irq.c +++ b/arch/ia64/kernel/irq.c @@ -194,8 +194,11 @@ void fixup_irqs(void) */ for (irq=0; irq < NR_IRQS; irq++) { if (vectors_in_migration[irq]) { + struct pt_regs *old_regs = set_irq_regs(NULL); + vectors_in_migration[irq]=0; - __do_IRQ(irq, NULL); + __do_IRQ(irq); + set_irq_regs(old_regs); } } diff --git a/arch/ia64/kernel/irq_ia64.c b/arch/ia64/kernel/irq_ia64.c index 7fd3ef9e064..68339dd0c9e 100644 --- a/arch/ia64/kernel/irq_ia64.c +++ b/arch/ia64/kernel/irq_ia64.c @@ -226,6 +226,8 @@ void ia64_process_pending_intr(void) */ while (vector != IA64_SPURIOUS_INT_VECTOR) { if (!IS_RESCHEDULE(vector)) { + struct pt_regs *old_regs = set_irq_regs(NULL); + ia64_setreg(_IA64_REG_CR_TPR, vector); ia64_srlz_d(); @@ -236,7 +238,8 @@ void ia64_process_pending_intr(void) * Probably could shared code. */ vectors_in_migration[local_vector_to_irq(vector)]=0; - __do_IRQ(local_vector_to_irq(vector), NULL); + __do_IRQ(local_vector_to_irq(vector)); + set_irq_regs(old_regs); /* * Disable interrupts and send EOI @@ -253,7 +256,7 @@ void ia64_process_pending_intr(void) #ifdef CONFIG_SMP -extern irqreturn_t handle_IPI (int irq, void *dev_id, struct pt_regs *regs); +extern irqreturn_t handle_IPI (int irq, void *dev_id); static struct irqaction ipi_irqaction = { .handler = handle_IPI, diff --git a/arch/ia64/sn/kernel/sn2/timer_interrupt.c b/arch/ia64/sn/kernel/sn2/timer_interrupt.c index fa7f6994591..103d6ea8e94 100644 --- a/arch/ia64/sn/kernel/sn2/timer_interrupt.c +++ b/arch/ia64/sn/kernel/sn2/timer_interrupt.c @@ -36,7 +36,7 @@ extern irqreturn_t timer_interrupt(int irq, void *dev_id, struct pt_regs *regs); #define SN_LB_INT_WAR_INTERVAL 100 -void sn_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) +void sn_timer_interrupt(int irq, void *dev_id) { /* LED blinking */ if (!pda->hb_count--) { diff --git a/arch/m68k/kernel/dma.c b/arch/m68k/kernel/dma.c index fc449f8b204..9d4e4b5b6bd 100644 --- a/arch/m68k/kernel/dma.c +++ b/arch/m68k/kernel/dma.c @@ -15,7 +15,7 @@ #include <asm/scatterlist.h> void *dma_alloc_coherent(struct device *dev, size_t size, - dma_addr_t *handle, int flag) + dma_addr_t *handle, gfp_t flag) { struct page *page, **map; pgprot_t pgprot; @@ -51,7 +51,7 @@ void *dma_alloc_coherent(struct device *dev, size_t size, pgprot_val(pgprot) |= _PAGE_GLOBAL040 | _PAGE_NOCACHE_S; else pgprot_val(pgprot) |= _PAGE_NOCACHE030; - addr = vmap(map, size, flag, pgprot); + addr = vmap(map, size, VM_MAP, pgprot); kfree(map); return addr; diff --git a/arch/m68k/kernel/m68k_ksyms.c b/arch/m68k/kernel/m68k_ksyms.c index aff26a52167..f9636e84e6a 100644 --- a/arch/m68k/kernel/m68k_ksyms.c +++ b/arch/m68k/kernel/m68k_ksyms.c @@ -1,7 +1,6 @@ #include <linux/module.h> #include <linux/linkage.h> #include <linux/sched.h> -#include <linux/string.h> #include <linux/mm.h> #include <linux/user.h> #include <linux/elfcore.h> @@ -53,9 +52,6 @@ EXPORT_SYMBOL(mach_beep); #endif EXPORT_SYMBOL(dump_fpu); EXPORT_SYMBOL(dump_thread); -EXPORT_SYMBOL(strnlen); -EXPORT_SYMBOL(strrchr); -EXPORT_SYMBOL(strstr); EXPORT_SYMBOL(kernel_thread); #ifdef CONFIG_VME EXPORT_SYMBOL(vme_brdtype); diff --git a/arch/m68k/lib/string.c b/arch/m68k/lib/string.c index b92b89e1ea0..891e1347bc4 100644 --- a/arch/m68k/lib/string.c +++ b/arch/m68k/lib/string.c @@ -1,6 +1,19 @@ +/* + * This file is subject to the terms and conditions of the GNU General Public + * License. See the file COPYING in the main directory of this archive + * for more details. + */ + +#define __IN_STRING_C -#include <linux/types.h> #include <linux/module.h> +#include <linux/string.h> + +char *strcpy(char *dest, const char *src) +{ + return __kernel_strcpy(dest, src); +} +EXPORT_SYMBOL(strcpy); void *memset(void *s, int c, size_t count) { diff --git a/arch/m68k/lib/uaccess.c b/arch/m68k/lib/uaccess.c index 1bc188c0d98..865f9fb9e68 100644 --- a/arch/m68k/lib/uaccess.c +++ b/arch/m68k/lib/uaccess.c @@ -84,7 +84,7 @@ unsigned long __generic_copy_to_user(void __user *to, const void *from, " .even\n" "20: lsl.l #2,%0\n" "50: add.l %5,%0\n" - " jra 7b\n" + " jra 8b\n" " .previous\n" "\n" " .section __ex_table,\"a\"\n" diff --git a/arch/s390/Kconfig b/arch/s390/Kconfig index 51c2dfe89c6..608193cfe43 100644 --- a/arch/s390/Kconfig +++ b/arch/s390/Kconfig @@ -30,6 +30,9 @@ config GENERIC_CALIBRATE_DELAY bool default y +config GENERIC_TIME + def_bool y + config GENERIC_BUST_SPINLOCK bool diff --git a/arch/s390/defconfig b/arch/s390/defconfig index b6cad75fd1f..a3257398ea8 100644 --- a/arch/s390/defconfig +++ b/arch/s390/defconfig @@ -9,6 +9,7 @@ CONFIG_STACKTRACE_SUPPORT=y CONFIG_RWSEM_XCHGADD_ALGORITHM=y CONFIG_GENERIC_HWEIGHT=y CONFIG_GENERIC_CALIBRATE_DELAY=y +CONFIG_GENERIC_TIME=y CONFIG_S390=y CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" diff --git a/arch/s390/kernel/s390_ext.c b/arch/s390/kernel/s390_ext.c index c1b383537fe..c49ab8c784d 100644 --- a/arch/s390/kernel/s390_ext.c +++ b/arch/s390/kernel/s390_ext.c @@ -16,6 +16,7 @@ #include <asm/lowcore.h> #include <asm/s390_ext.h> +#include <asm/irq_regs.h> #include <asm/irq.h> /* @@ -114,26 +115,28 @@ void do_extint(struct pt_regs *regs, unsigned short code) { ext_int_info_t *p; int index; + struct pt_regs *old_regs; irq_enter(); + old_regs = set_irq_regs(regs); asm volatile ("mc 0,0"); if (S390_lowcore.int_clock >= S390_lowcore.jiffy_timer) /** * Make sure that the i/o interrupt did not "overtake" * the last HZ timer interrupt. */ - account_ticks(regs); + account_ticks(); kstat_cpu(smp_processor_id()).irqs[EXTERNAL_INTERRUPT]++; index = ext_hash(code); for (p = ext_int_hash[index]; p; p = p->next) { if (likely(p->code == code)) { if (likely(p->handler)) - p->handler(regs, code); + p->handler(code); } } + set_irq_regs(old_regs); irq_exit(); } EXPORT_SYMBOL(register_external_interrupt); EXPORT_SYMBOL(unregister_external_interrupt); - diff --git a/arch/s390/kernel/smp.c b/arch/s390/kernel/smp.c index a8e6199755d..62822245f9b 100644 --- a/arch/s390/kernel/smp.c +++ b/arch/s390/kernel/smp.c @@ -339,7 +339,7 @@ void machine_power_off_smp(void) * cpus are handled. */ -void do_ext_call_interrupt(struct pt_regs *regs, __u16 code) +void do_ext_call_interrupt(__u16 code) { unsigned long bits; diff --git a/arch/s390/kernel/time.c b/arch/s390/kernel/time.c index 4bf66cc4a26..6cceed4df73 100644 --- a/arch/s390/kernel/time.c +++ b/arch/s390/kernel/time.c @@ -28,12 +28,14 @@ #include <linux/profile.h> #include <linux/timex.h> #include <linux/notifier.h> +#include <linux/clocksource.h> #include <asm/uaccess.h> #include <asm/delay.h> #include <asm/s390_ext.h> #include <asm/div64.h> #include <asm/irq.h> +#include <asm/irq_regs.h> #include <asm/timer.h> /* change this if you have some constant time drift */ @@ -81,78 +83,10 @@ void tod_to_timeval(__u64 todval, struct timespec *xtime) xtime->tv_nsec = ((todval * 1000) >> 12); } -static inline unsigned long do_gettimeoffset(void) -{ - __u64 now; - - now = (get_clock() - jiffies_timer_cc) >> 12; - now -= (__u64) jiffies * USECS_PER_JIFFY; - return (unsigned long) now; -} - -/* - * This version of gettimeofday has microsecond resolution. - */ -void do_gettimeofday(struct timeval *tv) -{ - unsigned long flags; - unsigned long seq; - unsigned long usec, sec; - - do { - seq = read_seqbegin_irqsave(&xtime_lock, flags); - - sec = xtime.tv_sec; - usec = xtime.tv_nsec / 1000 + do_gettimeoffset(); - } while (read_seqretry_irqrestore(&xtime_lock, seq, flags)); - - while (usec >= 1000000) { - usec -= 1000000; - sec++; - } - - tv->tv_sec = sec; - tv->tv_usec = usec; -} - -EXPORT_SYMBOL(do_gettimeofday); - -int do_settimeofday(struct timespec *tv) -{ - time_t wtm_sec, sec = tv->tv_sec; - long wtm_nsec, nsec = tv->tv_nsec; - - if ((unsigned long)tv->tv_nsec >= NSEC_PER_SEC) - return -EINVAL; - - write_seqlock_irq(&xtime_lock); - /* This is revolting. We need to set the xtime.tv_nsec - * correctly. However, the value in this location is - * is value at the last tick. - * Discover what correction gettimeofday - * would have done, and then undo it! - */ - nsec -= do_gettimeoffset() * 1000; - - wtm_sec = wall_to_monotonic.tv_sec + (xtime.tv_sec - sec); - wtm_nsec = wall_to_monotonic.tv_nsec + (xtime.tv_nsec - nsec); - - set_normalized_timespec(&xtime, sec, nsec); - set_normalized_timespec(&wall_to_monotonic, wtm_sec, wtm_nsec); - - ntp_clear(); - write_sequnlock_irq(&xtime_lock); - clock_was_set(); - return 0; -} - -EXPORT_SYMBOL(do_settimeofday); - - #ifdef CONFIG_PROFILING -#define s390_do_profile(regs) profile_tick(CPU_PROFILING, regs) +#define s390_do_profile() profile_tick(CPU_PROFILING) #else -#define s390_do_profile(regs) do { ; } while(0) +#define s390_do_profile() do { ; } while(0) #endif /* CONFIG_PROFILING */ @@ -160,7 +94,7 @@ EXPORT_SYMBOL(do_settimeofday); * timer_interrupt() needs to keep up the real-time clock, * as well as call the "do_timer()" routine every clocktick */ -void account_ticks(struct pt_regs *regs) +void account_ticks(void) { __u64 tmp; __u32 ticks; @@ -221,10 +155,10 @@ void account_ticks(struct pt_regs *regs) account_tick_vtime(current); #else while (ticks--) - update_process_times(user_mode(regs)); + update_process_times(user_mode(get_irq_regs())); #endif - s390_do_profile(regs); + s390_do_profile(); } #ifdef CONFIG_NO_IDLE_HZ @@ -285,9 +219,11 @@ static inline void stop_hz_timer(void) */ static inline void start_hz_timer(void) { + BUG_ON(!in_interrupt()); + if (!cpu_isset(smp_processor_id(), nohz_cpu_mask)) return; - account_ticks(task_pt_regs(current)); + account_ticks(); cpu_clear(smp_processor_id(), nohz_cpu_mask); } @@ -337,6 +273,22 @@ void init_cpu_timer(void) extern void vtime_init(void); +static cycle_t read_tod_clock(void) +{ + return get_clock(); +} + +static struct clocksource clocksource_tod = { + .name = "tod", + .rating = 100, + .read = read_tod_clock, + .mask = -1ULL, + .mult = 1000, + .shift = 12, + .is_continuous = 1, +}; + + /* * Initialize the TOD clock and the CPU timer of * the boot cpu. @@ -381,6 +333,9 @@ void __init time_init(void) &ext_int_info_cc) != 0) panic("Couldn't request external interrupt 0x1004"); + if (clocksource_register(&clocksource_tod) != 0) + panic("Could not register TOD clock source"); + init_cpu_timer(); #ifdef CONFIG_NO_IDLE_HZ diff --git a/arch/s390/kernel/traps.c b/arch/s390/kernel/traps.c index 3eb4fab048b..05bf3cc8530 100644 --- a/arch/s390/kernel/traps.c +++ b/arch/s390/kernel/traps.c @@ -61,7 +61,7 @@ extern pgm_check_handler_t do_dat_exception; #ifdef CONFIG_PFAULT extern int pfault_init(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; #endif extern pgm_check_handler_t do_monitor_call; diff --git a/arch/s390/kernel/vtime.c b/arch/s390/kernel/vtime.c index 2306cd83fca..1d7d3938b2b 100644 --- a/arch/s390/kernel/vtime.c +++ b/arch/s390/kernel/vtime.c @@ -22,6 +22,7 @@ #include <asm/s390_ext.h> #include <asm/timer.h> +#include <asm/irq_regs.h> static ext_int_info_t ext_int_info_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) /* * 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; __u64 next, delta; @@ -274,7 +275,7 @@ static void do_cpu_timer_interrupt(struct pt_regs *regs, __u16 error_code) list_move_tail(&event->entry, &cb_list); } spin_unlock(&vt_list->lock); - do_callbacks(&cb_list, regs); + do_callbacks(&cb_list, get_irq_regs()); /* next event is first in list */ spin_lock(&vt_list->lock); diff --git a/arch/s390/mm/fault.c b/arch/s390/mm/fault.c index 9c3c19fe62f..1c323bbfda9 100644 --- a/arch/s390/mm/fault.c +++ b/arch/s390/mm/fault.c @@ -451,7 +451,7 @@ void pfault_fini(void) } asmlinkage void -pfault_interrupt(struct pt_regs *regs, __u16 error_code) +pfault_interrupt(__u16 error_code) { struct task_struct *tsk; __u16 subcode; diff --git a/arch/um/kernel/irq.c b/arch/um/kernel/irq.c index eee97bb81ba..7c41dabe7a2 100644 --- a/arch/um/kernel/irq.c +++ b/arch/um/kernel/irq.c @@ -356,7 +356,7 @@ void forward_interrupts(int pid) unsigned int do_IRQ(int irq, union uml_pt_regs *regs) { irq_enter(); - __do_IRQ(irq, (struct pt_regs *)regs); + __do_IRQ(irq); irq_exit(); return 1; } diff --git a/drivers/char/sysrq.c b/drivers/char/sysrq.c index 4c0e0868570..5f49280779f 100644 --- a/drivers/char/sysrq.c +++ b/drivers/char/sysrq.c @@ -38,6 +38,7 @@ #include <linux/irq.h> #include <asm/ptrace.h> +#include <asm/irq_regs.h> /* Whether we react on sysrq keys or just ignore them */ int sysrq_enabled = 1; diff --git a/drivers/ide/mips/swarm.c b/drivers/ide/mips/swarm.c index 66f6064f464..09c9e7936b0 100644 --- a/drivers/ide/mips/swarm.c +++ b/drivers/ide/mips/swarm.c @@ -4,6 +4,7 @@ * Author: Manish Lachwani, mlachwani@mvista.com * Copyright (C) 2004 MIPS Technologies, Inc. All rights reserved. * Author: Maciej W. Rozycki <macro@mips.com> + * Copyright (c) 2006 Maciej W. Rozycki * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -127,6 +128,7 @@ static int __devinit swarm_ide_probe(struct device *dev) memcpy(hwif->io_ports, hwif->hw.io_ports, sizeof(hwif->io_ports)); hwif->irq = hwif->hw.irq; + probe_hwif_init(hwif); dev_set_drvdata(dev, hwif); return 0; diff --git a/drivers/md/md.c b/drivers/md/md.c index cb8281605be..57fa64f93e5 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c @@ -3849,6 +3849,7 @@ static int hot_add_disk(mddev_t * mddev, dev_t dev) } clear_bit(In_sync, &rdev->flags); rdev->desc_nr = -1; + rdev->saved_raid_disk = -1; err = bind_rdev_to_array(rdev, mddev); if (err) goto abort_export; diff --git a/drivers/mmc/mmc_block.c b/drivers/mmc/mmc_block.c index c1293f1bda8..f9027c8db79 100644 --- a/drivers/mmc/mmc_block.c +++ b/drivers/mmc/mmc_block.c @@ -28,6 +28,7 @@ #include <linux/kdev_t.h> #include <linux/blkdev.h> #include <linux/mutex.h> +#include <linux/scatterlist.h> #include <linux/mmc/card.h> #include <linux/mmc/host.h> @@ -154,6 +155,71 @@ static int mmc_blk_prep_rq(struct mmc_queue *mq, struct request *req) return stat; } +static u32 mmc_sd_num_wr_blocks(struct mmc_card *card) +{ + int err; + u32 blocks; + + struct mmc_request mrq; + struct mmc_command cmd; + struct mmc_data data; + unsigned int timeout_us; + + struct scatterlist sg; + + memset(&cmd, 0, sizeof(struct mmc_command)); + + cmd.opcode = MMC_APP_CMD; + cmd.arg = card->rca << 16; + cmd.flags = MMC_RSP_R1 | MMC_CMD_AC; + + err = mmc_wait_for_cmd(card->host, &cmd, 0); + if ((err != MMC_ERR_NONE) || !(cmd.resp[0] & R1_APP_CMD)) + return (u32)-1; + + memset(&cmd, 0, sizeof(struct mmc_command)); + + cmd.opcode = SD_APP_SEND_NUM_WR_BLKS; + cmd.arg = 0; + cmd.flags = MMC_RSP_R1 | MMC_CMD_ADTC; + + memset(&data, 0, sizeof(struct mmc_data)); + + data.timeout_ns = card->csd.tacc_ns * 100; + data.timeout_clks = card->csd.tacc_clks * 100; + + timeout_us = data.timeout_ns / 1000; + timeout_us += data.timeout_clks * 1000 / + (card->host->ios.clock / 1000); + + if (timeout_us > 100000) { + data.timeout_ns = 100000000; + data.timeout_clks = 0; + } + + data.blksz = 4; + data.blocks = 1; + data.flags = MMC_DATA_READ; + data.sg = &sg; + data.sg_len = 1; + + memset(&mrq, 0, sizeof(struct mmc_request)); + + mrq.cmd = &cmd; + mrq.data = &data; + + sg_init_one(&sg, &blocks, 4); + + mmc_wait_for_req(card->host, &mrq); + + if (cmd.error != MMC_ERR_NONE || data.error != MMC_ERR_NONE) + return (u32)-1; + + blocks = ntohl(blocks); + + return blocks; +} + static int mmc_blk_issue_rq(struct mmc_queue *mq, struct request *req) { struct mmc_blk_data *md = mq->data; @@ -184,10 +250,13 @@ static int mmc_blk_issue_rq(struct mmc_queue *mq, struct request *req) /* * If the host doesn't support multiple block writes, force - * block writes to single block. + * block writes to single block. SD cards are excepted from + * this rule as they support querying the number of + * successfully written sectors. */ if (rq_data_dir(req) != READ && - !(card->host->caps & MMC_CAP_MULTIWRITE)) + !(card->host->caps & MMC_CAP_MULTIWRITE) && + !mmc_card_sd(card)) brq.data.blocks = 1; if (brq.data.blocks > 1) { @@ -276,24 +345,41 @@ static int mmc_blk_issue_rq(struct mmc_queue *mq, struct request *req) return 1; cmd_err: - mmc_card_release_host(card); - ret = 1; - /* - * For writes and where the host claims to support proper - * error reporting, we first ok the successful blocks. + /* + * If this is an SD card and we're writing, we can first + * mark the known good sectors as ok. + * + * If the card is not SD, we can still ok written sectors + * if the controller can do proper error reporting. * * For reads we just fail the entire chunk as that should * be safe in all cases. */ - if (rq_data_dir(req) != READ && - (card->host->caps & MMC_CAP_MULTIWRITE)) { + if (rq_data_dir(req) != READ && mmc_card_sd(card)) { + u32 blocks; + unsigned int bytes; + + blocks = mmc_sd_num_wr_blocks(card); + if (blocks != (u32)-1) { + if (card->csd.write_partial) + bytes = blocks << md->block_bits; + else + bytes = blocks << 9; + spin_lock_irq(&md->lock); + ret = end_that_request_chunk(req, 1, bytes); + spin_unlock_irq(&md->lock); + } + } else if (rq_data_dir(req) != READ && + (card->host->caps & MMC_CAP_MULTIWRITE)) { spin_lock_irq(&md->lock); ret = end_that_request_chunk(req, 1, brq.data.bytes_xfered); spin_unlock_irq(&md->lock); } + mmc_card_release_host(card); + spin_lock_irq(&md->lock); while (ret) { ret = end_that_request_chunk(req, 0, diff --git a/drivers/s390/block/dasd_diag.c b/drivers/s390/block/dasd_diag.c index 222a8a71a5e..53db58a6861 100644 --- a/drivers/s390/block/dasd_diag.c +++ b/drivers/s390/block/dasd_diag.c @@ -218,7 +218,7 @@ dasd_diag_term_IO(struct dasd_ccw_req * cqr) /* Handle external interruption. */ static void -dasd_ext_handler(struct pt_regs *regs, __u16 code) +dasd_ext_handler(__u16 code) { struct dasd_ccw_req *cqr, *next; struct dasd_device *device; diff --git a/drivers/s390/char/ctrlchar.c b/drivers/s390/char/ctrlchar.c index d83eb6358ba..49e9628d929 100644 --- a/drivers/s390/char/ctrlchar.c +++ b/drivers/s390/char/ctrlchar.c @@ -20,7 +20,7 @@ static int ctrlchar_sysrq_key; static void 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); diff --git a/drivers/s390/char/keyboard.c b/drivers/s390/char/keyboard.c index 3be06569180..e3491a5f521 100644 --- a/drivers/s390/char/keyboard.c +++ b/drivers/s390/char/keyboard.c @@ -304,7 +304,7 @@ kbd_keycode(struct kbd_data *kbd, unsigned int keycode) if (kbd->sysrq) { if (kbd->sysrq == K(KT_LATIN, '-')) { kbd->sysrq = 0; - handle_sysrq(value, NULL, kbd->tty); + handle_sysrq(value, kbd->tty); return; } if (value == '-') { diff --git a/drivers/s390/char/monwriter.c b/drivers/s390/char/monwriter.c index 1e3939aeb8a..4362ff26024 100644 --- a/drivers/s390/char/monwriter.c +++ b/drivers/s390/char/monwriter.c @@ -26,6 +26,7 @@ #define MONWRITE_MAX_DATALEN 4024 static int mon_max_bufs = 255; +static int mon_buf_count; struct mon_buf { struct list_head list; @@ -40,7 +41,6 @@ struct mon_private { size_t hdr_to_read; size_t data_to_read; struct mon_buf *current_buf; - int mon_buf_count; }; /* @@ -99,13 +99,13 @@ static int monwrite_new_hdr(struct mon_private *monpriv) rc = monwrite_diag(monhdr, monbuf->data, APPLDATA_STOP_REC); list_del(&monbuf->list); - monpriv->mon_buf_count--; + mon_buf_count--; kfree(monbuf->data); kfree(monbuf); monbuf = NULL; } } else { - if (monpriv->mon_buf_count >= mon_max_bufs) + if (mon_buf_count >= mon_max_bufs) return -ENOSPC; monbuf = kzalloc(sizeof(struct mon_buf), GFP_KERNEL); if (!monbuf) @@ -118,7 +118,7 @@ static int monwrite_new_hdr(struct mon_private *monpriv) } monbuf->hdr = *monhdr; list_add_tail(&monbuf->list, &monpriv->list); - monpriv->mon_buf_count++; + mon_buf_count++; } monpriv->current_buf = monbuf; return 0; @@ -186,7 +186,7 @@ static int monwrite_close(struct inode *inode, struct file *filp) if (entry->hdr.mon_function != MONWRITE_GEN_EVENT) monwrite_diag(&entry->hdr, entry->data, APPLDATA_STOP_REC); - monpriv->mon_buf_count--; + mon_buf_count--; list_del(&entry->list); kfree(entry->data); kfree(entry); diff --git a/drivers/s390/char/sclp.c b/drivers/s390/char/sclp.c index 31e335751d6..8a056df09d6 100644 --- a/drivers/s390/char/sclp.c +++ b/drivers/s390/char/sclp.c @@ -324,7 +324,7 @@ __sclp_find_req(u32 sccb) * Prepare read event data request if necessary. Start processing of next * request on queue. */ static void -sclp_interrupt_handler(struct pt_regs *regs, __u16 code) +sclp_interrupt_handler(__u16 code) { struct sclp_req *req; u32 finished_sccb; @@ -743,7 +743,7 @@ EXPORT_SYMBOL(sclp_reactivate); /* Handler for external interruption used during initialization. Modify * request state to done. */ static void -sclp_check_handler(struct pt_regs *regs, __u16 code) +sclp_check_handler(__u16 code) { u32 finished_sccb; diff --git a/drivers/s390/cio/chsc.c b/drivers/s390/cio/chsc.c index 3bb4e472d73..07c7f19339d 100644 --- a/drivers/s390/cio/chsc.c +++ b/drivers/s390/cio/chsc.c @@ -200,11 +200,13 @@ css_get_ssd_info(struct subchannel *sch) spin_unlock_irq(&sch->lock); free_page((unsigned long)page); if (!ret) { - int j, chpid; + int j, chpid, mask; /* Allocate channel path structures, if needed. */ for (j = 0; j < 8; j++) { + mask = 0x80 >> j; chpid = sch->ssd_info.chpid[j]; - if (chpid && (get_chp_status(chpid) < 0)) + if ((sch->schib.pmcw.pim & mask) && + (get_chp_status(chpid) < 0)) new_channel_path(chpid); } } @@ -222,13 +224,15 @@ s390_subchannel_remove_chpid(struct device *dev, void *data) sch = to_subchannel(dev); chpid = data; - for (j = 0; j < 8; j++) - if (sch->schib.pmcw.chpid[j] == chpid->id) + for (j = 0; j < 8; j++) { + mask = 0x80 >> j; + if ((sch->schib.pmcw.pim & mask) && + (sch->schib.pmcw.chpid[j] == chpid->id)) break; + } if (j >= 8) return 0; - mask = 0x80 >> j; spin_lock_irq(&sch->lock); stsch(sch->schid, &schib); @@ -620,7 +624,7 @@ __chp_add_new_sch(struct subchannel_id schid) static int __chp_add(struct subchannel_id schid, void *data) { - int i; + int i, mask; struct channel_path *chp; struct subchannel *sch; @@ -630,8 +634,10 @@ __chp_add(struct subchannel_id schid, void *data) /* Check if the subchannel is now available. */ return __chp_add_new_sch(schid); spin_lock_irq(&sch->lock); - for (i=0; i<8; i++) - if (sch->schib.pmcw.chpid[i] == chp->id) { + for (i=0; i<8; i++) { + mask = 0x80 >> i; + if ((sch->schib.pmcw.pim & mask) && + (sch->schib.pmcw.chpid[i] == chp->id)) { if (stsch(sch->schid, &sch->schib) != 0) { /* Endgame. */ spin_unlock_irq(&sch->lock); @@ -639,6 +645,7 @@ __chp_add(struct subchannel_id schid, void *data) } break; } + } if (i==8) { spin_unlock_irq(&sch->lock); return 0; @@ -646,7 +653,7 @@ __chp_add(struct subchannel_id schid, void *data) sch->lpm = ((sch->schib.pmcw.pim & sch->schib.pmcw.pam & sch->schib.pmcw.pom) - | 0x80 >> i) & sch->opm; + | mask) & sch->opm; if (sch->driver && sch->driver->verify) sch->driver->verify(&sch->dev); diff --git a/drivers/s390/cio/cio.c b/drivers/s390/cio/cio.c index 2e2882daefb..f18b1623cad 100644 --- a/drivers/s390/cio/cio.c +++ b/drivers/s390/cio/cio.c @@ -19,6 +19,7 @@ #include <asm/cio.h> #include <asm/delay.h> #include <asm/irq.h> +#include <asm/irq_regs.h> #include <asm/setup.h> #include "airq.h" #include "cio.h" @@ -606,15 +607,17 @@ do_IRQ (struct pt_regs *regs) struct tpi_info *tpi_info; struct subchannel *sch; struct irb *irb; + struct pt_regs *old_regs; irq_enter (); + old_regs = set_irq_regs(regs); asm volatile ("mc 0,0"); if (S390_lowcore.int_clock >= S390_lowcore.jiffy_timer) /** * Make sure that the i/o interrupt did not "overtake" * the last HZ timer interrupt. */ - account_ticks(regs); + account_ticks(); /* * Get interrupt information from lowcore */ @@ -652,6 +655,7 @@ do_IRQ (struct pt_regs *regs) * out of the sie which costs more cycles than it saves. */ } while (!MACHINE_IS_VM && tpi (NULL) != 0); + set_irq_regs(old_regs); irq_exit (); } diff --git a/drivers/s390/crypto/ap_bus.c b/drivers/s390/crypto/ap_bus.c index cd30f37fcea..c5ccd20b110 100644 --- a/drivers/s390/crypto/ap_bus.c +++ b/drivers/s390/crypto/ap_bus.c @@ -1062,7 +1062,7 @@ static int ap_poll_thread(void *data) unsigned long flags; int requests; - set_user_nice(current, -20); + set_user_nice(current, 19); while (1) { if (need_resched()) { schedule(); diff --git a/drivers/s390/net/iucv.c b/drivers/s390/net/iucv.c index 809dd8d7f47..1476ce2b437 100644 --- a/drivers/s390/net/iucv.c +++ b/drivers/s390/net/iucv.c @@ -116,7 +116,7 @@ static DEFINE_SPINLOCK(iucv_irq_queue_lock); *Internal function prototypes */ 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); @@ -2251,7 +2251,7 @@ iucv_sever(__u16 pathid, __u8 user_data[16]) * Places the interrupt buffer on a queue and schedules iucv_tasklet_handler(). */ static void -iucv_irq_handler(struct pt_regs *regs, __u16 code) +iucv_irq_handler(__u16 code) { iucv_irqdata *irqdata; diff --git a/drivers/scsi/mesh.c b/drivers/scsi/mesh.c index c773e35dace..1fd3c7590d3 100644 --- a/drivers/scsi/mesh.c +++ b/drivers/scsi/mesh.c @@ -466,7 +466,7 @@ static void mesh_start_cmd(struct mesh_state *ms, struct scsi_cmnd *cmd) dlog(ms, "intr b4 arb, intr/exc/err/fc=%.8x", MKWORD(mr->interrupt, mr->exception, mr->error, mr->fifo_count)); - mesh_interrupt(0, (void *)ms, NULL); + mesh_interrupt(0, (void *)ms); if (ms->phase != arbitrating) return; } @@ -504,7 +504,7 @@ static void mesh_start_cmd(struct mesh_state *ms, struct scsi_cmnd *cmd) dlog(ms, "intr after disresel, intr/exc/err/fc=%.8x", MKWORD(mr->interrupt, mr->exception, mr->error, mr->fifo_count)); - mesh_interrupt(0, (void *)ms, NULL); + mesh_interrupt(0, (void *)ms); if (ms->phase != arbitrating) return; dlog(ms, "after intr after disresel, intr/exc/err/fc=%.8x", diff --git a/drivers/serial/sn_console.c b/drivers/serial/sn_console.c index 709f93a6c18..956b2cf08e1 100644 --- a/drivers/serial/sn_console.c +++ b/drivers/serial/sn_console.c @@ -674,7 +674,7 @@ static void sn_sal_timer_poll(unsigned long data) if (!port->sc_port.irq) { spin_lock_irqsave(&port->sc_port.lock, flags); if (sn_process_input) - sn_receive_chars(port, NULL, flags); + sn_receive_chars(port, flags); sn_transmit_chars(port, TRANSMIT_RAW); spin_unlock_irqrestore(&port->sc_port.lock, flags); mod_timer(&port->sc_timer, diff --git a/drivers/usb/host/ohci-q.c b/drivers/usb/host/ohci-q.c index e08d1a2664e..fe1fe2f97cb 100644 --- a/drivers/usb/host/ohci-q.c +++ b/drivers/usb/host/ohci-q.c @@ -925,7 +925,7 @@ rescan_all: /* only take off EDs that the HC isn't using, accounting for * frame counter wraps and EDs with partially retired TDs */ - if (likely (get_irq_regs() && HC_IS_RUNNING(ohci_to_hcd(ohci)->state))) { + if (likely (HC_IS_RUNNING(ohci_to_hcd(ohci)->state))) { if (tick_before (tick, ed->tick)) { skip_ed: last = &ed->ed_next; diff --git a/fs/nfsd/nfssvc.c b/fs/nfsd/nfssvc.c index 6fa6340a5fb..013b38996e6 100644 --- a/fs/nfsd/nfssvc.c +++ b/fs/nfsd/nfssvc.c @@ -217,7 +217,7 @@ int nfsd_create_serv(void) atomic_set(&nfsd_busy, 0); nfsd_serv = svc_create_pooled(&nfsd_program, - NFSD_BUFSIZE - NFSSVC_MAXBLKSIZE + nfsd_max_blksize, + nfsd_max_blksize, nfsd_last_thread, nfsd, SIG_NOCLEAN, THIS_MODULE); if (nfsd_serv == NULL) diff --git a/include/asm-arm/arch-clps711x/time.h b/include/asm-arm/arch-clps711x/time.h index 0e4a3901d3b..5edaae1c61d 100644 --- a/include/asm-arm/arch-clps711x/time.h +++ b/include/asm-arm/arch-clps711x/time.h @@ -26,8 +26,9 @@ extern void clps711x_setup_timer(void); * IRQ handler for the timer */ static irqreturn_t -p720t_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) +p720t_timer_interrupt(int irq, void *dev_id) { + struct pt_regs *regs = get_irq_regs(); do_leds(); do_timer(1); #ifndef CONFIG_SMP diff --git a/include/asm-arm/arch-imx/imx-dma.h b/include/asm-arm/arch-imx/imx-dma.h index 599f03e5a9e..5b1066da4e1 100644 --- a/include/asm-arm/arch-imx/imx-dma.h +++ b/include/asm-arm/arch-imx/imx-dma.h @@ -45,8 +45,8 @@ struct imx_dma_channel { const char *name; - void (*irq_handler) (int, void *, struct pt_regs *); - void (*err_handler) (int, void *, struct pt_regs *, int errcode); + void (*irq_handler) (int, void *); + void (*err_handler) (int, void *, int errcode); void *data; dmamode_t dma_mode; struct scatterlist *sg; @@ -77,8 +77,8 @@ imx_dma_setup_sg(imx_dmach_t dma_ch, int imx_dma_setup_handlers(imx_dmach_t dma_ch, - void (*irq_handler) (int, void *, struct pt_regs *), - void (*err_handler) (int, void *, struct pt_regs *, int), void *data); + void (*irq_handler) (int, void *), + void (*err_handler) (int, void *, int), void *data); void imx_dma_enable(imx_dmach_t dma_ch); diff --git a/include/asm-arm/arch-l7200/time.h b/include/asm-arm/arch-l7200/time.h index c69cb508735..ea22f7fff9c 100644 --- a/include/asm-arm/arch-l7200/time.h +++ b/include/asm-arm/arch-l7200/time.h @@ -43,8 +43,9 @@ * Handler for RTC timer interrupt */ static irqreturn_t -timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) +timer_interrupt(int irq, void *dev_id) { + struct pt_regs *regs = get_irq_regs(); do_timer(1); #ifndef CONFIG_SMP update_process_times(user_mode(regs)); diff --git a/include/asm-arm/arch-pnx4008/dma.h b/include/asm-arm/arch-pnx4008/dma.h index 3aee1204795..418f15283ff 100644 --- a/include/asm-arm/arch-pnx4008/dma.h +++ b/include/asm-arm/arch-pnx4008/dma.h @@ -137,7 +137,7 @@ extern void pnx4008_free_ll_entry(struct pnx4008_dma_ll *, dma_addr_t); extern void pnx4008_free_ll(u32 ll_dma, struct pnx4008_dma_ll *); extern int pnx4008_request_channel(char *, int, - void (*)(int, int, void *, struct pt_regs *), + void (*)(int, int, void *), void *); extern void pnx4008_free_channel(int); extern int pnx4008_config_dma(int, int, int); diff --git a/include/asm-arm/arch-pxa/dma.h b/include/asm-arm/arch-pxa/dma.h index a008150abc5..bed042d71d6 100644 --- a/include/asm-arm/arch-pxa/dma.h +++ b/include/asm-arm/arch-pxa/dma.h @@ -56,7 +56,7 @@ for ( \ int pxa_request_dma (char *name, pxa_dma_prio prio, - void (*irq_handler)(int, void *, struct pt_regs *), + void (*irq_handler)(int, void *), void *data); void pxa_free_dma (int dma_ch); diff --git a/include/asm-arm/arch-pxa/mmc.h b/include/asm-arm/arch-pxa/mmc.h index 88c17dd02ed..b704c4f05f4 100644 --- a/include/asm-arm/arch-pxa/mmc.h +++ b/include/asm-arm/arch-pxa/mmc.h @@ -10,7 +10,7 @@ struct mmc_host; struct pxamci_platform_data { unsigned int ocr_mask; /* available voltages */ unsigned long detect_delay; /* delay in jiffies before detecting cards after interrupt */ - int (*init)(struct device *, irqreturn_t (*)(int, void *, struct pt_regs *), void *); + int (*init)(struct device *, irqreturn_t (*)(int, void *), void *); int (*get_ro)(struct device *); void (*setpower)(struct device *, unsigned int); void (*exit)(struct device *, void *); diff --git a/include/asm-arm/hardware/sharpsl_pm.h b/include/asm-arm/hardware/sharpsl_pm.h index a836e76a14f..2d00db22b98 100644 --- a/include/asm-arm/hardware/sharpsl_pm.h +++ b/include/asm-arm/hardware/sharpsl_pm.h @@ -100,7 +100,7 @@ extern struct sharpsl_pm_status sharpsl_pm; void sharpsl_battery_kick(void); void sharpsl_pm_led(int val); -irqreturn_t sharpsl_ac_isr(int irq, void *dev_id, struct pt_regs *fp); -irqreturn_t sharpsl_chrg_full_isr(int irq, void *dev_id, struct pt_regs *fp); -irqreturn_t sharpsl_fatal_isr(int irq, void *dev_id, struct pt_regs *fp); +irqreturn_t sharpsl_ac_isr(int irq, void *dev_id); +irqreturn_t sharpsl_chrg_full_isr(int irq, void *dev_id); +irqreturn_t sharpsl_fatal_isr(int irq, void *dev_id); diff --git a/include/asm-arm/irq_regs.h b/include/asm-arm/irq_regs.h new file mode 100644 index 00000000000..3dd9c0b7027 --- /dev/null +++ b/include/asm-arm/irq_regs.h @@ -0,0 +1 @@ +#include <asm-generic/irq_regs.h> diff --git a/include/asm-arm/mach/irq.h b/include/asm-arm/mach/irq.h index 131f33733d2..0e017ecf209 100644 --- a/include/asm-arm/mach/irq.h +++ b/include/asm-arm/mach/irq.h @@ -30,10 +30,9 @@ extern int show_fiq_list(struct seq_file *, void *); /* * Obsolete inline function for calling irq descriptor handlers. */ -static inline void desc_handle_irq(unsigned int irq, struct irq_desc *desc, - struct pt_regs *regs) +static inline void desc_handle_irq(unsigned int irq, struct irq_desc *desc) { - desc->handle_irq(irq, desc, regs); + desc->handle_irq(irq, desc); } void set_irq_flags(unsigned int irq, unsigned int flags); @@ -51,10 +50,10 @@ void set_irq_flags(unsigned int irq, unsigned int flags); #define irqdesc irq_desc #define irqchip irq_chip -#define do_bad_IRQ(irq,desc,regs) \ +#define do_bad_IRQ(irq,desc) \ do { \ spin_lock(&desc->lock); \ - handle_bad_irq(irq, desc, regs); \ + handle_bad_irq(irq, desc); \ spin_unlock(&desc->lock); \ } while(0) diff --git a/include/asm-arm/mach/time.h b/include/asm-arm/mach/time.h index 1eb93f5c0d6..5dc357013b7 100644 --- a/include/asm-arm/mach/time.h +++ b/include/asm-arm/mach/time.h @@ -57,7 +57,7 @@ struct dyn_tick_timer { int (*enable)(void); /* Enables dynamic tick */ int (*disable)(void); /* Disables dynamic tick */ void (*reprogram)(unsigned long); /* Reprograms the timer */ - int (*handler)(int, void *, struct pt_regs *); + int (*handler)(int, void *); }; void timer_dyn_reprogram(void); @@ -66,7 +66,7 @@ void timer_dyn_reprogram(void); #endif extern struct sys_timer *system_timer; -extern void timer_tick(struct pt_regs *); +extern void timer_tick(void); /* * Kernel time keeping support. diff --git a/include/asm-generic/bug.h b/include/asm-generic/bug.h index a5250895155..1d9573cf4a0 100644 --- a/include/asm-generic/bug.h +++ b/include/asm-generic/bug.h @@ -41,14 +41,14 @@ #endif #endif -#define WARN_ON_ONCE(condition) ({ \ - static int __warn_once = 1; \ - typeof(condition) __ret_warn_once = (condition);\ - \ - if (likely(__warn_once)) \ - if (WARN_ON(__ret_warn_once)) \ - __warn_once = 0; \ - unlikely(__ret_warn_once); \ +#define WARN_ON_ONCE(condition) ({ \ + static int __warned; \ + typeof(condition) __ret_warn_once = (condition); \ + \ + if (unlikely(__ret_warn_once)) \ + if (WARN_ON(!__warned)) \ + __warned = 1; \ + unlikely(__ret_warn_once); \ }) #ifdef CONFIG_SMP diff --git a/include/asm-generic/percpu.h b/include/asm-generic/percpu.h index 6d45ee5472a..19637626224 100644 --- a/include/asm-generic/percpu.h +++ b/include/asm-generic/percpu.h @@ -15,7 +15,7 @@ extern unsigned long __per_cpu_offset[NR_CPUS]; /* var is in discarded region: offset to particular copy we want */ #define per_cpu(var, cpu) (*({ \ - extern int simple_indentifier_##var(void); \ + extern int simple_identifier_##var(void); \ RELOC_HIDE(&per_cpu__##var, __per_cpu_offset[cpu]); })) #define __get_cpu_var(var) per_cpu(var, smp_processor_id()) #define __raw_get_cpu_var(var) per_cpu(var, raw_smp_processor_id()) diff --git a/include/asm-i386/smp.h b/include/asm-i386/smp.h index 6aa1206f6e2..bd59c1508e7 100644 --- a/include/asm-i386/smp.h +++ b/include/asm-i386/smp.h @@ -46,8 +46,6 @@ extern u8 x86_cpu_to_apicid[]; #define cpu_physical_id(cpu) x86_cpu_to_apicid[cpu] -extern u8 apicid_2_node[]; - #ifdef CONFIG_HOTPLUG_CPU extern void cpu_exit_clear(void); extern void cpu_uninit(void); @@ -101,6 +99,9 @@ extern unsigned int num_processors; #endif #ifndef __ASSEMBLY__ + +extern u8 apicid_2_node[]; + #ifdef CONFIG_X86_LOCAL_APIC static __inline int logical_smp_processor_id(void) { diff --git a/include/asm-m68k/dma-mapping.h b/include/asm-m68k/dma-mapping.h index cebbb03370e..c1299c3beb5 100644 --- a/include/asm-m68k/dma-mapping.h +++ b/include/asm-m68k/dma-mapping.h @@ -26,7 +26,7 @@ static inline int dma_is_consistent(dma_addr_t dma_addr) } extern void *dma_alloc_coherent(struct device *, size_t, - dma_addr_t *, int); + dma_addr_t *, gfp_t); extern void dma_free_coherent(struct device *, size_t, void *, dma_addr_t); diff --git a/include/asm-m68k/string.h b/include/asm-m68k/string.h index 6c59215b285..2eb7df1e0f5 100644 --- a/include/asm-m68k/string.h +++ b/include/asm-m68k/string.h @@ -1,138 +1,114 @@ #ifndef _M68K_STRING_H_ #define _M68K_STRING_H_ -#include <asm/setup.h> -#include <asm/page.h> +#include <linux/types.h> +#include <linux/compiler.h> -#define __HAVE_ARCH_STRCPY -static inline char * strcpy(char * dest,const char *src) +static inline size_t __kernel_strlen(const char *s) { - char *xdest = dest; - - __asm__ __volatile__ - ("1:\tmoveb %1@+,%0@+\n\t" - "jne 1b" - : "=a" (dest), "=a" (src) - : "0" (dest), "1" (src) : "memory"); - return xdest; -} + const char *sc; -#define __HAVE_ARCH_STRNCPY -static inline char * strncpy(char *dest, const char *src, size_t n) -{ - char *xdest = dest; - - if (n == 0) - return xdest; - - __asm__ __volatile__ - ("1:\tmoveb %1@+,%0@+\n\t" - "jeq 2f\n\t" - "subql #1,%2\n\t" - "jne 1b\n\t" - "2:" - : "=a" (dest), "=a" (src), "=d" (n) - : "0" (dest), "1" (src), "2" (n) - : "memory"); - return xdest; + for (sc = s; *sc++; ) + ; + return sc - s - 1; } -#define __HAVE_ARCH_STRCAT -static inline char * strcat(char * dest, const char * src) +static inline char *__kernel_strcpy(char *dest, const char *src) { - char *tmp = dest; - - while (*dest) - dest++; - while ((*dest++ = *src++)) - ; - - return tmp; + char *xdest = dest; + + asm volatile ("\n" + "1: move.b (%1)+,(%0)+\n" + " jne 1b" + : "+a" (dest), "+a" (src) + : : "memory"); + return xdest; } -#define __HAVE_ARCH_STRNCAT -static inline char * strncat(char *dest, const char *src, size_t count) -{ - char *tmp = dest; - - if (count) { - while (*dest) - dest++; - while ((*dest++ = *src++)) { - if (--count == 0) { - *dest++='\0'; - break; - } - } - } +#ifndef __IN_STRING_C - return tmp; -} +#define __HAVE_ARCH_STRLEN +#define strlen(s) (__builtin_constant_p(s) ? \ + __builtin_strlen(s) : \ + __kernel_strlen(s)) -#define __HAVE_ARCH_STRCHR -static inline char * strchr(const char * s, int c) +#define __HAVE_ARCH_STRNLEN +static inline size_t strnlen(const char *s, size_t count) { - const char ch = c; - - for(; *s != ch; ++s) - if (*s == '\0') - return( NULL ); - return( (char *) s); + const char *sc = s; + + asm volatile ("\n" + "1: subq.l #1,%1\n" + " jcs 2f\n" + " tst.b (%0)+\n" + " jne 1b\n" + " subq.l #1,%0\n" + "2:" + : "+a" (sc), "+d" (count)); + return sc - s; } -/* strstr !! */ +#define __HAVE_ARCH_STRCPY +#if __GNUC__ >= 4 +#define strcpy(d, s) (__builtin_constant_p(s) && \ + __builtin_strlen(s) <= 32 ? \ + __builtin_strcpy(d, s) : \ + __kernel_strcpy(d, s)) +#else +#define strcpy(d, s) __kernel_strcpy(d, s) +#endif -#define __HAVE_ARCH_STRLEN -static inline size_t strlen(const char * s) +#define __HAVE_ARCH_STRNCPY +static inline char *strncpy(char *dest, const char *src, size_t n) { - const char *sc; - for (sc = s; *sc != '\0'; ++sc) ; - return(sc - s); + char *xdest = dest; + + asm volatile ("\n" + " jra 2f\n" + "1: move.b (%1),(%0)+\n" + " jeq 2f\n" + " addq.l #1,%1\n" + "2: subq.l #1,%2\n" + " jcc 1b\n" + : "+a" (dest), "+a" (src), "+d" (n) + : : "memory"); + return xdest; } -/* strnlen !! */ +#define __HAVE_ARCH_STRCAT +#define strcat(d, s) ({ \ + char *__d = (d); \ + strcpy(__d + strlen(__d), (s)); \ +}) -#define __HAVE_ARCH_STRCMP -static inline int strcmp(const char * cs,const char * ct) +#define __HAVE_ARCH_STRCHR +static inline char *strchr(const char *s, int c) { - char __res; - - __asm__ - ("1:\tmoveb %0@+,%2\n\t" /* get *cs */ - "cmpb %1@+,%2\n\t" /* compare a byte */ - "jne 2f\n\t" /* not equal, break out */ - "tstb %2\n\t" /* at end of cs? */ - "jne 1b\n\t" /* no, keep going */ - "jra 3f\n\t" /* strings are equal */ - "2:\tsubb %1@-,%2\n\t" /* *cs - *ct */ - "3:" - : "=a" (cs), "=a" (ct), "=d" (__res) - : "0" (cs), "1" (ct)); - return __res; + char sc, ch = c; + + for (; (sc = *s++) != ch; ) { + if (!sc) + return NULL; + } + return (char *)s - 1; } -#define __HAVE_ARCH_STRNCMP -static inline int strncmp(const char * cs,const char * ct,size_t count) +#define __HAVE_ARCH_STRCMP +static inline int strcmp(const char *cs, const char *ct) { - char __res; - - if (!count) - return 0; - __asm__ - ("1:\tmovb %0@+,%3\n\t" /* get *cs */ - "cmpb %1@+,%3\n\t" /* compare a byte */ - "jne 3f\n\t" /* not equal, break out */ - "tstb %3\n\t" /* at end of cs? */ - "jeq 4f\n\t" /* yes, all done */ - "subql #1,%2\n\t" /* no, adjust count */ - "jne 1b\n\t" /* more to do, keep going */ - "2:\tmoveq #0,%3\n\t" /* strings are equal */ - "jra 4f\n\t" - "3:\tsubb %1@-,%3\n\t" /* *cs - *ct */ - "4:" - : "=a" (cs), "=a" (ct), "=d" (count), "=d" (__res) - : "0" (cs), "1" (ct), "2" (count)); - return __res; + char res; + + asm ("\n" + "1: move.b (%0)+,%2\n" /* get *cs */ + " cmp.b (%1)+,%2\n" /* compare a byte */ + " jne 2f\n" /* not equal, break out */ + " tst.b %2\n" /* at end of cs? */ + " jne 1b\n" /* no, keep going */ + " jra 3f\n" /* strings are equal */ + "2: sub.b -(%1),%2\n" /* *cs - *ct */ + "3:" + : "+a" (cs), "+a" (ct), "=d" (res)); + return res; } #define __HAVE_ARCH_MEMSET @@ -150,4 +126,6 @@ extern void *memmove(void *, const void *, __kernel_size_t); extern int memcmp(const void *, const void *, __kernel_size_t); #define memcmp(d, s, n) __builtin_memcmp(d, s, n) +#endif + #endif /* _M68K_STRING_H_ */ diff --git a/include/asm-m68k/system.h b/include/asm-m68k/system.h index 131a0cb0f49..243dd13e6bf 100644 --- a/include/asm-m68k/system.h +++ b/include/asm-m68k/system.h @@ -78,13 +78,13 @@ static inline int irqs_disabled(void) #define mb() barrier() #define rmb() barrier() #define wmb() barrier() -#define read_barrier_depends() do { } while(0) -#define set_mb(var, value) do { xchg(&var, value); } while (0) +#define read_barrier_depends() ((void)0) +#define set_mb(var, value) ({ (var) = (value); wmb(); }) #define smp_mb() barrier() #define smp_rmb() barrier() #define smp_wmb() barrier() -#define smp_read_barrier_depends() do { } while(0) +#define smp_read_barrier_depends() ((void)0) #define xchg(ptr,x) ((__typeof__(*(ptr)))__xchg((unsigned long)(x),(ptr),sizeof(*(ptr)))) diff --git a/include/asm-m68k/user.h b/include/asm-m68k/user.h index e8d5a64c7e7..d7c0b109bd4 100644 --- a/include/asm-m68k/user.h +++ b/include/asm-m68k/user.h @@ -81,7 +81,7 @@ struct user{ unsigned long magic; /* To uniquely identify a core file */ char u_comm[32]; /* User command that was responsible */ }; -#define NBPG PAGE_SIZE +#define NBPG 4096 #define UPAGES 1 #define HOST_TEXT_START_ADDR (u.start_code) #define HOST_STACK_END_ADDR (u.start_stack + u.u_ssize * NBPG) diff --git a/include/asm-s390/hardirq.h b/include/asm-s390/hardirq.h index e84b7ef54aa..c2f6a8782d3 100644 --- a/include/asm-s390/hardirq.h +++ b/include/asm-s390/hardirq.h @@ -32,6 +32,6 @@ typedef struct { #define HARDIRQ_BITS 8 -extern void account_ticks(struct pt_regs *); +extern void account_ticks(void); #endif /* __ASM_HARDIRQ_H */ diff --git a/include/asm-s390/irq_regs.h b/include/asm-s390/irq_regs.h new file mode 100644 index 00000000000..3dd9c0b7027 --- /dev/null +++ b/include/asm-s390/irq_regs.h @@ -0,0 +1 @@ +#include <asm-generic/irq_regs.h> diff --git a/include/asm-s390/percpu.h b/include/asm-s390/percpu.h index 495ad99c763..9ea7f1023e5 100644 --- a/include/asm-s390/percpu.h +++ b/include/asm-s390/percpu.h @@ -16,7 +16,7 @@ #if defined(__s390x__) && defined(MODULE) #define __reloc_hide(var,offset) (*({ \ - extern int simple_indentifier_##var(void); \ + extern int simple_identifier_##var(void); \ unsigned long *__ptr; \ asm ( "larl %0,per_cpu__"#var"@GOTENT" \ : "=a" (__ptr) : "X" (per_cpu__##var) ); \ @@ -25,7 +25,7 @@ #else #define __reloc_hide(var, offset) (*({ \ - extern int simple_indentifier_##var(void); \ + extern int simple_identifier_##var(void); \ unsigned long __ptr; \ asm ( "" : "=a" (__ptr) : "0" (&per_cpu__##var) ); \ (typeof(&per_cpu__##var)) (__ptr + (offset)); })) diff --git a/include/asm-s390/s390_ext.h b/include/asm-s390/s390_ext.h index e9a2862b230..df9b1017b70 100644 --- a/include/asm-s390/s390_ext.h +++ b/include/asm-s390/s390_ext.h @@ -10,7 +10,7 @@ * 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 diff --git a/include/asm-um/irq_regs.h b/include/asm-um/irq_regs.h new file mode 100644 index 00000000000..3dd9c0b7027 --- /dev/null +++ b/include/asm-um/irq_regs.h @@ -0,0 +1 @@ +#include <asm-generic/irq_regs.h> diff --git a/include/asm-x86_64/percpu.h b/include/asm-x86_64/percpu.h index 285756010c5..5ed0ef34084 100644 --- a/include/asm-x86_64/percpu.h +++ b/include/asm-x86_64/percpu.h @@ -32,13 +32,13 @@ /* var is in discarded region: offset to particular copy we want */ #define per_cpu(var, cpu) (*({ \ - extern int simple_indentifier_##var(void); \ + extern int simple_identifier_##var(void); \ RELOC_HIDE(&per_cpu__##var, __per_cpu_offset(cpu)); })) #define __get_cpu_var(var) (*({ \ - extern int simple_indentifier_##var(void); \ + extern int simple_identifier_##var(void); \ RELOC_HIDE(&per_cpu__##var, __my_cpu_offset()); })) #define __raw_get_cpu_var(var) (*({ \ - extern int simple_indentifier_##var(void); \ + extern int simple_identifier_##var(void); \ RELOC_HIDE(&per_cpu__##var, __my_cpu_offset()); })) /* A macro to avoid #include hell... */ diff --git a/include/linux/mm.h b/include/linux/mm.h index b7966ab8cb6..26146623be2 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h @@ -593,6 +593,7 @@ static inline int page_mapped(struct page *page) */ #define NOPAGE_SIGBUS (NULL) #define NOPAGE_OOM ((struct page *) (-1)) +#define NOPAGE_REFAULT ((struct page *) (-2)) /* Return to userspace, rerun */ /* * Error return values for the *_nopfn functions diff --git a/include/linux/mmc/protocol.h b/include/linux/mmc/protocol.h index 81c3f77f652..08dec8d9e70 100644 --- a/include/linux/mmc/protocol.h +++ b/include/linux/mmc/protocol.h @@ -83,6 +83,7 @@ /* Application commands */ #define SD_APP_SET_BUS_WIDTH 6 /* ac [1:0] bus width R1 */ +#define SD_APP_SEND_NUM_WR_BLKS 22 /* adtc R1 */ #define SD_APP_OP_COND 41 /* bcr [31:0] OCR R3 */ #define SD_APP_SEND_SCR 51 /* adtc R1 */ diff --git a/include/linux/percpu.h b/include/linux/percpu.h index 46ec72fa2c8..600e3d387ff 100644 --- a/include/linux/percpu.h +++ b/include/linux/percpu.h @@ -19,7 +19,7 @@ * we force a syntax error here if it isn't. */ #define get_cpu_var(var) (*({ \ - extern int simple_indentifier_##var(void); \ + extern int simple_identifier_##var(void); \ preempt_disable(); \ &__get_cpu_var(var); })) #define put_cpu_var(var) preempt_enable() diff --git a/include/linux/sched.h b/include/linux/sched.h index 331f4502e92..6735c1cf334 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -1065,9 +1065,10 @@ static inline int pid_alive(struct task_struct *p) } /** - * is_init - check if a task structure is the first user space - * task the kernel created. - * @p: Task structure to be checked. + * is_init - check if a task structure is init + * @tsk: Task structure to be checked. + * + * Check if a task structure is the first user space task the kernel created. */ static inline int is_init(struct task_struct *tsk) { diff --git a/include/linux/sunrpc/svc.h b/include/linux/sunrpc/svc.h index d6288e89fd9..9c9a8ad9247 100644 --- a/include/linux/sunrpc/svc.h +++ b/include/linux/sunrpc/svc.h @@ -57,7 +57,8 @@ struct svc_serv { struct svc_stat * sv_stats; /* RPC statistics */ spinlock_t sv_lock; unsigned int sv_nrthreads; /* # of server threads */ - unsigned int sv_bufsz; /* datagram buffer size */ + unsigned int sv_max_payload; /* datagram payload size */ + unsigned int sv_max_mesg; /* max_payload + 1 page for overheads */ unsigned int sv_xdrsize; /* XDR buffer size */ struct list_head sv_permsocks; /* all permanent sockets */ diff --git a/include/linux/timex.h b/include/linux/timex.h index 049dfe4a11f..db501dc23c2 100644 --- a/include/linux/timex.h +++ b/include/linux/timex.h @@ -293,6 +293,9 @@ extern void second_overflow(void); extern void update_ntp_one_tick(void); extern int do_adjtimex(struct timex *); +/* Don't use! Compatibility define for existing users. */ +#define tickadj (500/HZ ? : 1) + #endif /* KERNEL */ #endif /* LINUX_TIMEX_H */ diff --git a/include/sound/core.h b/include/sound/core.h index b056ea925ec..fa1ca0127ba 100644 --- a/include/sound/core.h +++ b/include/sound/core.h @@ -89,10 +89,10 @@ struct snd_device { struct snd_monitor_file { struct file *file; struct snd_monitor_file *next; + const struct file_operations *disconnected_f_op; + struct list_head shutdown_list; }; -struct snd_shutdown_f_ops; /* define it later in init.c */ - /* main structure for soundcard */ struct snd_card { diff --git a/include/sound/version.h b/include/sound/version.h index 2ee849d0e19..4ad86eb6440 100644 --- a/include/sound/version.h +++ b/include/sound/version.h @@ -1,3 +1,3 @@ -/* include/version.h. Generated by configure. */ -#define CONFIG_SND_VERSION "1.0.12rc1" -#define CONFIG_SND_DATE " (Thu Jun 22 13:55:50 2006 UTC)" +/* include/version.h. Generated by alsa/ksync script. */ +#define CONFIG_SND_VERSION "1.0.13" +#define CONFIG_SND_DATE " (Fri Oct 06 18:28:19 2006 UTC)" diff --git a/kernel/audit.c b/kernel/audit.c index f9889ee7782..98106f6078b 100644 --- a/kernel/audit.c +++ b/kernel/audit.c @@ -340,7 +340,7 @@ static int kauditd_thread(void *dummy) { struct sk_buff *skb; - while (1) { + while (!kthread_should_stop()) { skb = skb_dequeue(&audit_skb_queue); wake_up(&audit_backlog_wait); if (skb) { @@ -369,6 +369,7 @@ static int kauditd_thread(void *dummy) remove_wait_queue(&kauditd_wait, &wait); } } + return 0; } int audit_send_list(void *_dest) diff --git a/kernel/irq/resend.c b/kernel/irq/resend.c index 35f10f7ff94..5bfeaed7e48 100644 --- a/kernel/irq/resend.c +++ b/kernel/irq/resend.c @@ -38,7 +38,7 @@ static void resend_irqs(unsigned long arg) clear_bit(irq, irqs_resend); desc = irq_desc + irq; local_irq_disable(); - desc->handle_irq(irq, desc, NULL); + desc->handle_irq(irq, desc); local_irq_enable(); } } diff --git a/lib/irq_regs.c b/lib/irq_regs.c index 101b1a4f9b1..753880a5440 100644 --- a/lib/irq_regs.c +++ b/lib/irq_regs.c @@ -8,8 +8,10 @@ * as published by the Free Software Foundation; either version * 2 of the License, or (at your option) any later version. */ +#include <linux/module.h> #include <asm/irq_regs.h> #ifndef ARCH_HAS_OWN_IRQ_REGS DEFINE_PER_CPU(struct pt_regs *, __irq_regs); +EXPORT_PER_CPU_SYMBOL(__irq_regs); #endif diff --git a/mm/memory.c b/mm/memory.c index 9cf3f341a28..b5a4aadd961 100644 --- a/mm/memory.c +++ b/mm/memory.c @@ -1086,6 +1086,7 @@ int get_user_pages(struct task_struct *tsk, struct mm_struct *mm, default: BUG(); } + cond_resched(); } if (pages) { pages[i] = page; @@ -2169,11 +2170,13 @@ retry: * after the next truncate_count read. */ - /* no page was available -- either SIGBUS or OOM */ - if (new_page == NOPAGE_SIGBUS) + /* no page was available -- either SIGBUS, OOM or REFAULT */ + if (unlikely(new_page == NOPAGE_SIGBUS)) return VM_FAULT_SIGBUS; - if (new_page == NOPAGE_OOM) + else if (unlikely(new_page == NOPAGE_OOM)) return VM_FAULT_OOM; + else if (unlikely(new_page == NOPAGE_REFAULT)) + return VM_FAULT_MINOR; /* * Should we do an early C-O-W break? diff --git a/mm/slab.c b/mm/slab.c index e9a63b5a7fb..64fb0d770b0 100644 --- a/mm/slab.c +++ b/mm/slab.c @@ -1106,15 +1106,18 @@ static inline int cache_free_alien(struct kmem_cache *cachep, void *objp) int nodeid = slabp->nodeid; struct kmem_list3 *l3; struct array_cache *alien = NULL; + int node; + + node = numa_node_id(); /* * Make sure we are not freeing a object from another node to the array * cache on this cpu. */ - if (likely(slabp->nodeid == numa_node_id())) + if (likely(slabp->nodeid == node)) return 0; - l3 = cachep->nodelists[numa_node_id()]; + l3 = cachep->nodelists[node]; STATS_INC_NODEFREES(cachep); if (l3->alien && l3->alien[nodeid]) { alien = l3->alien[nodeid]; @@ -1352,6 +1355,7 @@ void __init kmem_cache_init(void) struct cache_names *names; int i; int order; + int node; for (i = 0; i < NUM_INIT_LISTS; i++) { kmem_list3_init(&initkmem_list3[i]); @@ -1386,12 +1390,14 @@ void __init kmem_cache_init(void) * 6) Resize the head arrays of the kmalloc caches to their final sizes. */ + node = numa_node_id(); + /* 1) create the cache_cache */ INIT_LIST_HEAD(&cache_chain); list_add(&cache_cache.next, &cache_chain); cache_cache.colour_off = cache_line_size(); cache_cache.array[smp_processor_id()] = &initarray_cache.cache; - cache_cache.nodelists[numa_node_id()] = &initkmem_list3[CACHE_CACHE]; + cache_cache.nodelists[node] = &initkmem_list3[CACHE_CACHE]; cache_cache.buffer_size = ALIGN(cache_cache.buffer_size, cache_line_size()); @@ -1496,19 +1502,18 @@ void __init kmem_cache_init(void) } /* 5) Replace the bootstrap kmem_list3's */ { - int node; + int nid; + /* Replace the static kmem_list3 structures for the boot cpu */ - init_list(&cache_cache, &initkmem_list3[CACHE_CACHE], - numa_node_id()); + init_list(&cache_cache, &initkmem_list3[CACHE_CACHE], node); - for_each_online_node(node) { + for_each_online_node(nid) { init_list(malloc_sizes[INDEX_AC].cs_cachep, - &initkmem_list3[SIZE_AC + node], node); + &initkmem_list3[SIZE_AC + nid], nid); if (INDEX_AC != INDEX_L3) { init_list(malloc_sizes[INDEX_L3].cs_cachep, - &initkmem_list3[SIZE_L3 + node], - node); + &initkmem_list3[SIZE_L3 + nid], nid); } } } @@ -2918,6 +2923,9 @@ static void *cache_alloc_refill(struct kmem_cache *cachep, gfp_t flags) int batchcount; struct kmem_list3 *l3; struct array_cache *ac; + int node; + + node = numa_node_id(); check_irq_off(); ac = cpu_cache_get(cachep); @@ -2931,7 +2939,7 @@ retry: */ batchcount = BATCHREFILL_LIMIT; } - l3 = cachep->nodelists[numa_node_id()]; + l3 = cachep->nodelists[node]; BUG_ON(ac->avail > 0 || !l3); spin_lock(&l3->list_lock); @@ -2961,7 +2969,7 @@ retry: STATS_SET_HIGH(cachep); ac->entry[ac->avail++] = slab_get_obj(cachep, slabp, - numa_node_id()); + node); } check_slabp(cachep, slabp); @@ -2980,7 +2988,7 @@ alloc_done: if (unlikely(!ac->avail)) { int x; - x = cache_grow(cachep, flags, numa_node_id()); + x = cache_grow(cachep, flags, node); /* cache_grow can reenable interrupts, then ac could change. */ ac = cpu_cache_get(cachep); diff --git a/net/sunrpc/svc.c b/net/sunrpc/svc.c index c2c8bb20d07..2807fa0eab4 100644 --- a/net/sunrpc/svc.c +++ b/net/sunrpc/svc.c @@ -282,7 +282,10 @@ __svc_create(struct svc_program *prog, unsigned int bufsize, int npools, serv->sv_program = prog; serv->sv_nrthreads = 1; serv->sv_stats = prog->pg_stats; - serv->sv_bufsz = bufsize? bufsize : 4096; + if (bufsize > RPCSVC_MAXPAYLOAD) + bufsize = RPCSVC_MAXPAYLOAD; + serv->sv_max_payload = bufsize? bufsize : 4096; + serv->sv_max_mesg = roundup(serv->sv_max_payload + PAGE_SIZE, PAGE_SIZE); serv->sv_shutdown = shutdown; xdrsize = 0; while (prog) { @@ -414,9 +417,9 @@ svc_init_buffer(struct svc_rqst *rqstp, unsigned int size) int pages; int arghi; - if (size > RPCSVC_MAXPAYLOAD) - size = RPCSVC_MAXPAYLOAD; - pages = 2 + (size+ PAGE_SIZE -1) / PAGE_SIZE; + pages = size / PAGE_SIZE + 1; /* extra page as we hold both request and reply. + * We assume one is at most one page + */ arghi = 0; BUG_ON(pages > RPCSVC_MAXPAGES); while (pages) { @@ -463,7 +466,7 @@ __svc_create_thread(svc_thread_fn func, struct svc_serv *serv, if (!(rqstp->rq_argp = kmalloc(serv->sv_xdrsize, GFP_KERNEL)) || !(rqstp->rq_resp = kmalloc(serv->sv_xdrsize, GFP_KERNEL)) - || !svc_init_buffer(rqstp, serv->sv_bufsz)) + || !svc_init_buffer(rqstp, serv->sv_max_mesg)) goto out_thread; serv->sv_nrthreads++; @@ -938,8 +941,8 @@ u32 svc_max_payload(const struct svc_rqst *rqstp) if (rqstp->rq_sock->sk_sock->type == SOCK_DGRAM) max = RPCSVC_MAXPAYLOAD_UDP; - if (rqstp->rq_server->sv_bufsz < max) - max = rqstp->rq_server->sv_bufsz; + if (rqstp->rq_server->sv_max_payload < max) + max = rqstp->rq_server->sv_max_payload; return max; } EXPORT_SYMBOL_GPL(svc_max_payload); diff --git a/net/sunrpc/svcsock.c b/net/sunrpc/svcsock.c index b39e7e2b648..61e307cca13 100644 --- a/net/sunrpc/svcsock.c +++ b/net/sunrpc/svcsock.c @@ -192,13 +192,13 @@ svc_sock_enqueue(struct svc_sock *svsk) svsk->sk_pool = pool; set_bit(SOCK_NOSPACE, &svsk->sk_sock->flags); - if (((atomic_read(&svsk->sk_reserved) + serv->sv_bufsz)*2 + if (((atomic_read(&svsk->sk_reserved) + serv->sv_max_mesg)*2 > svc_sock_wspace(svsk)) && !test_bit(SK_CLOSE, &svsk->sk_flags) && !test_bit(SK_CONN, &svsk->sk_flags)) { /* Don't enqueue while not enough space for reply */ dprintk("svc: socket %p no space, %d*2 > %ld, not enqueued\n", - svsk->sk_sk, atomic_read(&svsk->sk_reserved)+serv->sv_bufsz, + svsk->sk_sk, atomic_read(&svsk->sk_reserved)+serv->sv_max_mesg, svc_sock_wspace(svsk)); svsk->sk_pool = NULL; clear_bit(SK_BUSY, &svsk->sk_flags); @@ -220,7 +220,7 @@ svc_sock_enqueue(struct svc_sock *svsk) rqstp, rqstp->rq_sock); rqstp->rq_sock = svsk; atomic_inc(&svsk->sk_inuse); - rqstp->rq_reserved = serv->sv_bufsz; + rqstp->rq_reserved = serv->sv_max_mesg; atomic_add(rqstp->rq_reserved, &svsk->sk_reserved); BUG_ON(svsk->sk_pool != pool); wake_up(&rqstp->rq_wait); @@ -639,8 +639,8 @@ svc_udp_recvfrom(struct svc_rqst *rqstp) * which will access the socket. */ svc_sock_setbufsize(svsk->sk_sock, - (serv->sv_nrthreads+3) * serv->sv_bufsz, - (serv->sv_nrthreads+3) * serv->sv_bufsz); + (serv->sv_nrthreads+3) * serv->sv_max_mesg, + (serv->sv_nrthreads+3) * serv->sv_max_mesg); if ((rqstp->rq_deferred = svc_deferred_dequeue(svsk))) { svc_sock_received(svsk); @@ -749,8 +749,8 @@ svc_udp_init(struct svc_sock *svsk) * svc_udp_recvfrom will re-adjust if necessary */ svc_sock_setbufsize(svsk->sk_sock, - 3 * svsk->sk_server->sv_bufsz, - 3 * svsk->sk_server->sv_bufsz); + 3 * svsk->sk_server->sv_max_mesg, + 3 * svsk->sk_server->sv_max_mesg); set_bit(SK_DATA, &svsk->sk_flags); /* might have come in before data_ready set up */ set_bit(SK_CHNGBUF, &svsk->sk_flags); @@ -993,8 +993,8 @@ svc_tcp_recvfrom(struct svc_rqst *rqstp) * as soon a a complete request arrives. */ svc_sock_setbufsize(svsk->sk_sock, - (serv->sv_nrthreads+3) * serv->sv_bufsz, - 3 * serv->sv_bufsz); + (serv->sv_nrthreads+3) * serv->sv_max_mesg, + 3 * serv->sv_max_mesg); clear_bit(SK_DATA, &svsk->sk_flags); @@ -1032,7 +1032,7 @@ svc_tcp_recvfrom(struct svc_rqst *rqstp) } svsk->sk_reclen &= 0x7fffffff; dprintk("svc: TCP record, %d bytes\n", svsk->sk_reclen); - if (svsk->sk_reclen > serv->sv_bufsz) { + if (svsk->sk_reclen > serv->sv_max_mesg) { printk(KERN_NOTICE "RPC: bad TCP reclen 0x%08lx (large)\n", (unsigned long) svsk->sk_reclen); goto err_delete; @@ -1171,8 +1171,8 @@ svc_tcp_init(struct svc_sock *svsk) * svc_tcp_recvfrom will re-adjust if necessary */ svc_sock_setbufsize(svsk->sk_sock, - 3 * svsk->sk_server->sv_bufsz, - 3 * svsk->sk_server->sv_bufsz); + 3 * svsk->sk_server->sv_max_mesg, + 3 * svsk->sk_server->sv_max_mesg); set_bit(SK_CHNGBUF, &svsk->sk_flags); set_bit(SK_DATA, &svsk->sk_flags); @@ -1234,7 +1234,7 @@ svc_recv(struct svc_rqst *rqstp, long timeout) /* now allocate needed pages. If we get a failure, sleep briefly */ - pages = 2 + (serv->sv_bufsz + PAGE_SIZE -1) / PAGE_SIZE; + pages = (serv->sv_max_mesg + PAGE_SIZE) / PAGE_SIZE; for (i=0; i < pages ; i++) while (rqstp->rq_pages[i] == NULL) { struct page *p = alloc_page(GFP_KERNEL); @@ -1263,7 +1263,7 @@ svc_recv(struct svc_rqst *rqstp, long timeout) if ((svsk = svc_sock_dequeue(pool)) != NULL) { rqstp->rq_sock = svsk; atomic_inc(&svsk->sk_inuse); - rqstp->rq_reserved = serv->sv_bufsz; + rqstp->rq_reserved = serv->sv_max_mesg; atomic_add(rqstp->rq_reserved, &svsk->sk_reserved); } else { /* No data pending. Go to sleep */ diff --git a/sound/core/hwdep.c b/sound/core/hwdep.c index 9aa9d94891f..46b47689362 100644 --- a/sound/core/hwdep.c +++ b/sound/core/hwdep.c @@ -158,6 +158,7 @@ static int snd_hwdep_release(struct inode *inode, struct file * file) { int err = -ENXIO; struct snd_hwdep *hw = file->private_data; + struct module *mod = hw->card->module; mutex_lock(&hw->open_mutex); if (hw->ops.release) { err = hw->ops.release(hw, file); @@ -167,7 +168,7 @@ static int snd_hwdep_release(struct inode *inode, struct file * file) hw->used--; snd_card_file_remove(hw->card, file); mutex_unlock(&hw->open_mutex); - module_put(hw->card->module); + module_put(mod); return err; } diff --git a/sound/core/init.c b/sound/core/init.c index d7607a25acd..3058d626a90 100644 --- a/sound/core/init.c +++ b/sound/core/init.c @@ -33,10 +33,10 @@ #include <sound/control.h> #include <sound/info.h> -struct snd_shutdown_f_ops { - struct file_operations f_ops; - struct snd_shutdown_f_ops *next; -}; +static DEFINE_SPINLOCK(shutdown_lock); +static LIST_HEAD(shutdown_files); + +static struct file_operations snd_shutdown_f_ops; static unsigned int snd_cards_lock; /* locked for registering/using */ struct snd_card *snd_cards[SNDRV_CARDS]; @@ -198,6 +198,25 @@ static ssize_t snd_disconnect_write(struct file *file, const char __user *buf, return -ENODEV; } +static int snd_disconnect_release(struct inode *inode, struct file *file) +{ + struct snd_monitor_file *df = NULL, *_df; + + spin_lock(&shutdown_lock); + list_for_each_entry(_df, &shutdown_files, shutdown_list) { + if (_df->file == file) { + df = _df; + break; + } + } + spin_unlock(&shutdown_lock); + + if (likely(df)) + return df->disconnected_f_op->release(inode, file); + + panic("%s(%p, %p) failed!", __FUNCTION__, inode, file); +} + static unsigned int snd_disconnect_poll(struct file * file, poll_table * wait) { return POLLERR | POLLNVAL; @@ -219,6 +238,22 @@ static int snd_disconnect_fasync(int fd, struct file *file, int on) return -ENODEV; } +static struct file_operations snd_shutdown_f_ops = +{ + .owner = THIS_MODULE, + .llseek = snd_disconnect_llseek, + .read = snd_disconnect_read, + .write = snd_disconnect_write, + .release = snd_disconnect_release, + .poll = snd_disconnect_poll, + .unlocked_ioctl = snd_disconnect_ioctl, +#ifdef CONFIG_COMPAT + .compat_ioctl = snd_disconnect_ioctl, +#endif + .mmap = snd_disconnect_mmap, + .fasync = snd_disconnect_fasync +}; + /** * snd_card_disconnect - disconnect all APIs from the file-operations (user space) * @card: soundcard structure @@ -234,9 +269,6 @@ int snd_card_disconnect(struct snd_card *card) { struct snd_monitor_file *mfile; struct file *file; - struct snd_shutdown_f_ops *s_f_ops; - struct file_operations *f_ops; - const struct file_operations *old_f_ops; int err; spin_lock(&card->files_lock); @@ -261,34 +293,14 @@ int snd_card_disconnect(struct snd_card *card) /* it's critical part, use endless loop */ /* we have no room to fail */ - s_f_ops = kmalloc(sizeof(struct snd_shutdown_f_ops), GFP_ATOMIC); - if (s_f_ops == NULL) - panic("Atomic allocation failed for snd_shutdown_f_ops!"); - - f_ops = &s_f_ops->f_ops; - - memset(f_ops, 0, sizeof(*f_ops)); - f_ops->owner = file->f_op->owner; - f_ops->release = file->f_op->release; - f_ops->llseek = snd_disconnect_llseek; - f_ops->read = snd_disconnect_read; - f_ops->write = snd_disconnect_write; - f_ops->poll = snd_disconnect_poll; - f_ops->unlocked_ioctl = snd_disconnect_ioctl; -#ifdef CONFIG_COMPAT - f_ops->compat_ioctl = snd_disconnect_ioctl; -#endif - f_ops->mmap = snd_disconnect_mmap; - f_ops->fasync = snd_disconnect_fasync; + mfile->disconnected_f_op = mfile->file->f_op; - s_f_ops->next = card->s_f_ops; - card->s_f_ops = s_f_ops; - - f_ops = fops_get(f_ops); + spin_lock(&shutdown_lock); + list_add(&mfile->shutdown_list, &shutdown_files); + spin_unlock(&shutdown_lock); - old_f_ops = file->f_op; - file->f_op = f_ops; /* must be atomic */ - fops_put(old_f_ops); + fops_get(&snd_shutdown_f_ops); + mfile->file->f_op = &snd_shutdown_f_ops; mfile = mfile->next; } @@ -326,8 +338,6 @@ EXPORT_SYMBOL(snd_card_disconnect); */ static int snd_card_do_free(struct snd_card *card) { - struct snd_shutdown_f_ops *s_f_ops; - #if defined(CONFIG_SND_MIXER_OSS) || defined(CONFIG_SND_MIXER_OSS_MODULE) if (snd_mixer_oss_notify_callback) snd_mixer_oss_notify_callback(card, SND_MIXER_OSS_NOTIFY_FREE); @@ -351,11 +361,6 @@ static int snd_card_do_free(struct snd_card *card) snd_printk(KERN_WARNING "unable to free card info\n"); /* Not fatal error */ } - while (card->s_f_ops) { - s_f_ops = card->s_f_ops; - card->s_f_ops = s_f_ops->next; - kfree(s_f_ops); - } kfree(card); return 0; } @@ -670,6 +675,7 @@ int snd_card_file_add(struct snd_card *card, struct file *file) if (mfile == NULL) return -ENOMEM; mfile->file = file; + mfile->disconnected_f_op = NULL; mfile->next = NULL; spin_lock(&card->files_lock); if (card->shutdown) { @@ -716,6 +722,12 @@ int snd_card_file_remove(struct snd_card *card, struct file *file) pfile = mfile; mfile = mfile->next; } + if (mfile && mfile->disconnected_f_op) { + fops_put(mfile->disconnected_f_op); + spin_lock(&shutdown_lock); + list_del(&mfile->shutdown_list); + spin_unlock(&shutdown_lock); + } if (card->files == NULL) last_close = 1; spin_unlock(&card->files_lock); diff --git a/sound/isa/es18xx.c b/sound/isa/es18xx.c index 2398d2c55fe..725c115ff97 100644 --- a/sound/isa/es18xx.c +++ b/sound/isa/es18xx.c @@ -2154,6 +2154,7 @@ static int __devinit snd_audiodrive_pnpc(int dev, struct snd_audiodrive *acard, } /* Control port initialization */ if (pnp_activate_dev(acard->devc) < 0) { + kfree(cfg); snd_printk(KERN_ERR PFX "PnP control configure failure (out of resources?)\n"); return -EAGAIN; } diff --git a/sound/pci/ac97/ac97_patch.c b/sound/pci/ac97/ac97_patch.c index dc28b111a06..15be6ba87c8 100644 --- a/sound/pci/ac97/ac97_patch.c +++ b/sound/pci/ac97/ac97_patch.c @@ -530,7 +530,7 @@ AC97_ENUM("ALC Headphone Mux", wm9711_enum[1]), AC97_SINGLE("ALC Headphone Volume", AC97_VIDEO, 7, 7, 1), AC97_SINGLE("Out3 Switch", AC97_AUX, 15, 1, 1), -AC97_SINGLE("Out3 ZC Switch", AC97_AUX, 7, 1, 1), +AC97_SINGLE("Out3 ZC Switch", AC97_AUX, 7, 1, 0), AC97_ENUM("Out3 Mux", wm9711_enum[2]), AC97_ENUM("Out3 LR Mux", wm9711_enum[3]), AC97_SINGLE("Out3 Volume", AC97_AUX, 0, 31, 1), @@ -575,13 +575,14 @@ AC97_SINGLE("Playback Attenuate (-6dB) Switch", AC97_MASTER_TONE, 6, 1, 0), AC97_SINGLE("ADC Switch", AC97_REC_GAIN, 15, 1, 1), AC97_ENUM("Capture Volume Steps", wm9711_enum[6]), -AC97_DOUBLE("Capture Volume", AC97_REC_GAIN, 8, 0, 15, 1), +AC97_DOUBLE("Capture Volume", AC97_REC_GAIN, 8, 0, 63, 1), AC97_SINGLE("Capture ZC Switch", AC97_REC_GAIN, 7, 1, 0), AC97_SINGLE("Mic 1 to Phone Switch", AC97_MIC, 14, 1, 1), AC97_SINGLE("Mic 2 to Phone Switch", AC97_MIC, 13, 1, 1), AC97_ENUM("Mic Select Source", wm9711_enum[7]), -AC97_SINGLE("Mic 1 Volume", AC97_MIC, 8, 32, 1), +AC97_SINGLE("Mic 1 Volume", AC97_MIC, 8, 31, 1), +AC97_SINGLE("Mic 2 Volume", AC97_MIC, 0, 31, 1), AC97_SINGLE("Mic 20dB Boost Switch", AC97_MIC, 7, 1, 0), AC97_SINGLE("Master ZC Switch", AC97_MASTER, 7, 1, 0), diff --git a/sound/pci/au88x0/au88x0.c b/sound/pci/au88x0/au88x0.c index ef189d7f09d..6ed5ad59f5b 100644 --- a/sound/pci/au88x0/au88x0.c +++ b/sound/pci/au88x0/au88x0.c @@ -128,6 +128,7 @@ static int snd_vortex_dev_free(struct snd_device *device) // Take down PCI interface. synchronize_irq(vortex->irq); free_irq(vortex->irq, vortex); + iounmap(vortex->mmio); pci_release_regions(vortex->pci_dev); pci_disable_device(vortex->pci_dev); kfree(vortex); diff --git a/sound/pci/emu10k1/emu10k1_main.c b/sound/pci/emu10k1/emu10k1_main.c index be65d4db8e2..8058059c56e 100644 --- a/sound/pci/emu10k1/emu10k1_main.c +++ b/sound/pci/emu10k1/emu10k1_main.c @@ -1461,8 +1461,8 @@ void snd_emu10k1_resume_regs(struct snd_emu10k1 *emu) /* resore for spdif */ if (emu->audigy) - outl(emu->port + A_IOCFG, emu->saved_a_iocfg); - outl(emu->port + HCFG, emu->saved_hcfg); + outl(emu->saved_a_iocfg, emu->port + A_IOCFG); + outl(emu->saved_hcfg, emu->port + HCFG); val = emu->saved_ptr; for (reg = saved_regs; *reg != 0xff; reg++) diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c index a76a778d0a1..feeed12920b 100644 --- a/sound/pci/hda/hda_intel.c +++ b/sound/pci/hda/hda_intel.c @@ -1682,6 +1682,7 @@ static struct pci_device_id azx_ids[] = { { 0x10b9, 0x5461, PCI_ANY_ID, PCI_ANY_ID, 0, 0, AZX_DRIVER_ULI }, /* ULI M5461 */ { 0x10de, 0x026c, PCI_ANY_ID, PCI_ANY_ID, 0, 0, AZX_DRIVER_NVIDIA }, /* NVIDIA 026c */ { 0x10de, 0x0371, PCI_ANY_ID, PCI_ANY_ID, 0, 0, AZX_DRIVER_NVIDIA }, /* NVIDIA 0371 */ + { 0x10de, 0x03f0, PCI_ANY_ID, PCI_ANY_ID, 0, 0, AZX_DRIVER_NVIDIA }, /* NVIDIA 03f0 */ { 0, } }; MODULE_DEVICE_TABLE(pci, azx_ids); diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index d08d2e399c8..84a3eb8aacc 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c @@ -5076,6 +5076,10 @@ static struct hda_board_config alc883_cfg_tbl[] = { { .modelname = "acer", .config = ALC883_ACER }, { .pci_subvendor = 0x1025, .pci_subdevice = 0/*0x0102*/, .config = ALC883_ACER }, + { .pci_subvendor = 0x1025, .pci_subdevice = 0x0102, + .config = ALC883_ACER }, + { .pci_subvendor = 0x1025, .pci_subdevice = 0x009f, + .config = ALC883_ACER }, { .modelname = "auto", .config = ALC883_AUTO }, {} }; diff --git a/sound/pci/hda/patch_si3054.c b/sound/pci/hda/patch_si3054.c index 76ec3d75fa9..cc87dff1eb5 100644 --- a/sound/pci/hda/patch_si3054.c +++ b/sound/pci/hda/patch_si3054.c @@ -297,8 +297,13 @@ static int patch_si3054(struct hda_codec *codec) struct hda_codec_preset snd_hda_preset_si3054[] = { { .id = 0x163c3055, .name = "Si3054", .patch = patch_si3054 }, { .id = 0x163c3155, .name = "Si3054", .patch = patch_si3054 }, + { .id = 0x11c11040, .name = "Si3054", .patch = patch_si3054 }, { .id = 0x11c13026, .name = "Si3054", .patch = patch_si3054 }, + { .id = 0x11c13055, .name = "Si3054", .patch = patch_si3054 }, + { .id = 0x11c13155, .name = "Si3054", .patch = patch_si3054 }, + { .id = 0x10573055, .name = "Si3054", .patch = patch_si3054 }, { .id = 0x10573057, .name = "Si3054", .patch = patch_si3054 }, + { .id = 0x10573155, .name = "Si3054", .patch = patch_si3054 }, {} }; diff --git a/sound/usb/usx2y/usbusx2yaudio.c b/sound/usb/usx2y/usbusx2yaudio.c index e662281a751..367f8a32a66 100644 --- a/sound/usb/usx2y/usbusx2yaudio.c +++ b/sound/usb/usx2y/usbusx2yaudio.c @@ -322,7 +322,7 @@ static void i_usX2Y_urb_complete(struct urb *urb) usX2Y_error_urb_status(usX2Y, subs, urb); return; } - if (likely((0xFFFF & urb->start_frame) == usX2Y->wait_iso_frame)) + if (likely(urb->start_frame == usX2Y->wait_iso_frame)) subs->completed_urb = urb; else { usX2Y_error_sequence(usX2Y, subs, urb); @@ -335,13 +335,9 @@ static void i_usX2Y_urb_complete(struct urb *urb) atomic_read(&capsubs->state) >= state_PREPARED && (playbacksubs->completed_urb || atomic_read(&playbacksubs->state) < state_PREPARED)) { - if (!usX2Y_usbframe_complete(capsubs, playbacksubs, urb->start_frame)) { - if (nr_of_packs() <= urb->start_frame && - urb->start_frame <= (2 * nr_of_packs() - 1)) // uhci and ohci - usX2Y->wait_iso_frame = urb->start_frame - nr_of_packs(); - else - usX2Y->wait_iso_frame += nr_of_packs(); - } else { + if (!usX2Y_usbframe_complete(capsubs, playbacksubs, urb->start_frame)) + usX2Y->wait_iso_frame += nr_of_packs(); + else { snd_printdd("\n"); usX2Y_clients_stop(usX2Y); } @@ -495,7 +491,6 @@ static int usX2Y_urbs_start(struct snd_usX2Y_substream *subs) if (subs != NULL && atomic_read(&subs->state) >= state_PREPARED) goto start; } - usX2Y->wait_iso_frame = -1; start: usX2Y_subs_startup(subs); @@ -516,10 +511,9 @@ static int usX2Y_urbs_start(struct snd_usX2Y_substream *subs) snd_printk (KERN_ERR "cannot submit datapipe for urb %d, err = %d\n", i, err); err = -EPIPE; goto cleanup; - } else { - if (0 > usX2Y->wait_iso_frame) + } else + if (i == 0) usX2Y->wait_iso_frame = urb->start_frame; - } urb->transfer_flags = 0; } else { atomic_set(&subs->state, state_STARTING1); diff --git a/sound/usb/usx2y/usx2yhwdeppcm.c b/sound/usb/usx2y/usx2yhwdeppcm.c index 9acef9d9054..8f3e35e24e7 100644 --- a/sound/usb/usx2y/usx2yhwdeppcm.c +++ b/sound/usb/usx2y/usx2yhwdeppcm.c @@ -243,7 +243,7 @@ static void i_usX2Y_usbpcm_urb_complete(struct urb *urb) usX2Y_error_urb_status(usX2Y, subs, urb); return; } - if (likely((0xFFFF & urb->start_frame) == usX2Y->wait_iso_frame)) + if (likely(urb->start_frame == usX2Y->wait_iso_frame)) subs->completed_urb = urb; else { usX2Y_error_sequence(usX2Y, subs, urb); @@ -256,13 +256,9 @@ static void i_usX2Y_usbpcm_urb_complete(struct urb *urb) if (capsubs->completed_urb && atomic_read(&capsubs->state) >= state_PREPARED && (NULL == capsubs2 || capsubs2->completed_urb) && (playbacksubs->completed_urb || atomic_read(&playbacksubs->state) < state_PREPARED)) { - if (!usX2Y_usbpcm_usbframe_complete(capsubs, capsubs2, playbacksubs, urb->start_frame)) { - if (nr_of_packs() <= urb->start_frame && - urb->start_frame <= (2 * nr_of_packs() - 1)) // uhci and ohci - usX2Y->wait_iso_frame = urb->start_frame - nr_of_packs(); - else - usX2Y->wait_iso_frame += nr_of_packs(); - } else { + if (!usX2Y_usbpcm_usbframe_complete(capsubs, capsubs2, playbacksubs, urb->start_frame)) + usX2Y->wait_iso_frame += nr_of_packs(); + else { snd_printdd("\n"); usX2Y_clients_stop(usX2Y); } @@ -433,7 +429,6 @@ static int usX2Y_usbpcm_urbs_start(struct snd_usX2Y_substream *subs) if (subs != NULL && atomic_read(&subs->state) >= state_PREPARED) goto start; } - usX2Y->wait_iso_frame = -1; start: usX2Y_usbpcm_subs_startup(subs); @@ -459,7 +454,7 @@ static int usX2Y_usbpcm_urbs_start(struct snd_usX2Y_substream *subs) goto cleanup; } else { snd_printdd("%i\n", urb->start_frame); - if (0 > usX2Y->wait_iso_frame) + if (u == 0) usX2Y->wait_iso_frame = urb->start_frame; } urb->transfer_flags = 0; @@ -632,7 +627,7 @@ static int usX2Y_pcms_lock_check(struct snd_card *card) for (s = 0; s < 2; ++s) { struct snd_pcm_substream *substream; substream = pcm->streams[s].substream; - if (SUBSTREAM_BUSY(substream)) + if (substream && SUBSTREAM_BUSY(substream)) err = -EBUSY; } } |