Skip to content

Commit

Permalink
[ARM] 5298/1: Drop desc_handle_irq()
Browse files Browse the repository at this point in the history
desc_handle_irq() was declared as obsolete since long ago.
Replace it with generic_handle_irq()

Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
  • Loading branch information
lumag authored and Russell King committed Oct 9, 2008
1 parent 27c4cae commit d8aa025
Show file tree
Hide file tree
Showing 42 changed files with 72 additions and 162 deletions.
14 changes: 3 additions & 11 deletions arch/arm/common/it8152.c
Original file line number Diff line number Diff line change
Expand Up @@ -66,14 +66,6 @@ static void it8152_unmask_irq(unsigned int irq)
}
}

static inline void it8152_irq(int irq)
{
struct irq_desc *desc;

desc = irq_desc + irq;
desc_handle_irq(irq, desc);
}

static struct irq_chip it8152_irq_chip = {
.name = "it8152",
.ack = it8152_mask_irq,
Expand Down Expand Up @@ -128,21 +120,21 @@ void it8152_irq_demux(unsigned int irq, struct irq_desc *desc)
bits_pd &= ((1 << IT8152_PD_IRQ_COUNT) - 1);
while (bits_pd) {
i = __ffs(bits_pd);
it8152_irq(IT8152_PD_IRQ(i));
generic_handle_irq(IT8152_PD_IRQ(i));
bits_pd &= ~(1 << i);
}

bits_lp &= ((1 << IT8152_LP_IRQ_COUNT) - 1);
while (bits_lp) {
i = __ffs(bits_lp);
it8152_irq(IT8152_LP_IRQ(i));
generic_handle_irq(IT8152_LP_IRQ(i));
bits_lp &= ~(1 << i);
}

bits_ld &= ((1 << IT8152_LD_IRQ_COUNT) - 1);
while (bits_ld) {
i = __ffs(bits_ld);
it8152_irq(IT8152_LD_IRQ(i));
generic_handle_irq(IT8152_LD_IRQ(i));
bits_ld &= ~(1 << i);
}
}
Expand Down
26 changes: 8 additions & 18 deletions arch/arm/common/locomo.c
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,6 @@ static struct locomo_dev_info locomo_devices[] = {
static void locomo_handler(unsigned int irq, struct irq_desc *desc)
{
int req, i;
struct irq_desc *d;
void __iomem *mapbase = get_irq_chip_data(irq);

/* Acknowledge the parent IRQ */
Expand All @@ -181,10 +180,9 @@ static void locomo_handler(unsigned int irq, struct irq_desc *desc)
if (req) {
/* generate the next interrupt(s) */
irq = LOCOMO_IRQ_START;
d = irq_desc + irq;
for (i = 0; i <= 3; i++, d++, irq++) {
for (i = 0; i <= 3; i++, irq++) {
if (req & (0x0100 << i)) {
desc_handle_irq(irq, d);
generic_handle_irq(irq);
}

}
Expand Down Expand Up @@ -222,12 +220,10 @@ static struct irq_chip locomo_chip = {

static void locomo_key_handler(unsigned int irq, struct irq_desc *desc)
{
struct irq_desc *d;
void __iomem *mapbase = get_irq_chip_data(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);
generic_handle_irq(LOCOMO_IRQ_KEY_START);
}
}

Expand Down Expand Up @@ -268,7 +264,6 @@ static struct irq_chip locomo_key_chip = {
static void locomo_gpio_handler(unsigned int irq, struct irq_desc *desc)
{
int req, i;
struct irq_desc *d;
void __iomem *mapbase = get_irq_chip_data(irq);

req = locomo_readl(mapbase + LOCOMO_GIR) &
Expand All @@ -277,10 +272,9 @@ static void locomo_gpio_handler(unsigned int irq, struct irq_desc *desc)

if (req) {
irq = LOCOMO_IRQ_GPIO_START;
d = irq_desc + LOCOMO_IRQ_GPIO_START;
for (i = 0; i <= 15; i++, irq++, d++) {
for (i = 0; i <= 15; i++, irq++) {
if (req & (0x0001 << i)) {
desc_handle_irq(irq, d);
generic_handle_irq(irq);
}
}
}
Expand Down Expand Up @@ -361,12 +355,10 @@ static struct irq_chip locomo_gpio_chip = {

static void locomo_lt_handler(unsigned int irq, struct irq_desc *desc)
{
struct irq_desc *d;
void __iomem *mapbase = get_irq_chip_data(irq);

if (locomo_readl(mapbase + LOCOMO_LTINT) & 0x0001) {
d = irq_desc + LOCOMO_IRQ_LT_START;
desc_handle_irq(LOCOMO_IRQ_LT_START, d);
generic_handle_irq(LOCOMO_IRQ_LT_START);
}
}

Expand Down Expand Up @@ -407,17 +399,15 @@ static struct irq_chip locomo_lt_chip = {
static void locomo_spi_handler(unsigned int irq, struct irq_desc *desc)
{
int req, i;
struct irq_desc *d;
void __iomem *mapbase = get_irq_chip_data(irq);

req = locomo_readl(mapbase + LOCOMO_SPI + LOCOMO_SPIIR) & 0x000F;
if (req) {
irq = LOCOMO_IRQ_SPI_START;
d = irq_desc + irq;

for (i = 0; i <= 3; i++, irq++, d++) {
for (i = 0; i <= 3; i++, irq++) {
if (req & (0x0001 << i)) {
desc_handle_irq(irq, d);
generic_handle_irq(irq);
}
}
}
Expand Down
6 changes: 2 additions & 4 deletions arch/arm/kernel/ecard.c
Original file line number Diff line number Diff line change
Expand Up @@ -587,8 +587,7 @@ ecard_irq_handler(unsigned int irq, struct irq_desc *desc)
pending = ecard_default_ops.irqpending(ec);

if (pending) {
struct irq_desc *d = irq_desc + ec->irq;
desc_handle_irq(ec->irq, d);
generic_handle_irq(ec->irq);
called ++;
}
}
Expand Down Expand Up @@ -622,7 +621,6 @@ ecard_irqexp_handler(unsigned int irq, struct irq_desc *desc)
ecard_t *ec = slot_to_ecard(slot);

if (ec->claimed) {
struct irq_desc *d = irq_desc + ec->irq;
/*
* this ugly code is so that we can operate a
* prioritorising system:
Expand All @@ -635,7 +633,7 @@ ecard_irqexp_handler(unsigned int irq, struct irq_desc *desc)
* 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);
generic_handle_irq(ec->irq);
} else {
printk(KERN_WARNING "card%d: interrupt from unclaimed "
"card???\n", slot);
Expand Down
11 changes: 5 additions & 6 deletions arch/arm/kernel/irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -112,18 +112,17 @@ static struct irq_desc bad_irq_desc = {
asmlinkage void __exception asm_do_IRQ(unsigned int irq, struct pt_regs *regs)
{
struct pt_regs *old_regs = set_irq_regs(regs);
struct irq_desc *desc = irq_desc + irq;

irq_enter();

/*
* Some hardware gives randomly wrong interrupts. Rather
* than crashing, do something sensible.
*/
if (irq >= NR_IRQS)
desc = &bad_irq_desc;

irq_enter();

desc_handle_irq(irq, desc);
handle_bad_irq(irq, &bad_irq_desc);
else
generic_handle_irq(irq);

/* AT91 specific workaround */
irq_finish(irq);
Expand Down
3 changes: 1 addition & 2 deletions arch/arm/mach-at91/gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,6 @@ static void gpio_irq_handler(unsigned irq, struct irq_desc *desc)
}

pin = bank->chipbase;
gpio = &irq_desc[pin];

while (isr) {
if (isr & 1) {
Expand All @@ -417,7 +416,7 @@ static void gpio_irq_handler(unsigned irq, struct irq_desc *desc)
gpio_irq_mask(pin);
}
else
desc_handle_irq(pin, gpio);
generic_handle_irq(pin);
}
pin++;
gpio++;
Expand Down
5 changes: 1 addition & 4 deletions arch/arm/mach-davinci/gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,6 @@ gpio_irq_handler(unsigned irq, struct irq_desc *desc)
desc->chip->ack(irq);
while (1) {
u32 status;
struct irq_desc *gpio;
int n;
int res;

Expand All @@ -215,12 +214,10 @@ gpio_irq_handler(unsigned irq, struct irq_desc *desc)

/* now demux them to the right lowlevel handler */
n = (int)get_irq_data(irq);
gpio = &irq_desc[n];
while (status) {
res = ffs(status);
n += res;
gpio += res;
desc_handle_irq(n - 1, gpio - 1);
generic_handle_irq(n - 1);
status >>= res;
}
}
Expand Down
7 changes: 3 additions & 4 deletions arch/arm/mach-ep93xx/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -192,8 +192,7 @@ static void ep93xx_gpio_ab_irq_handler(unsigned int irq, struct irq_desc *desc)
for (i = 0; i < 8; i++) {
if (status & (1 << i)) {
int gpio_irq = gpio_to_irq(EP93XX_GPIO_LINE_A(0)) + i;
desc = irq_desc + gpio_irq;
desc_handle_irq(gpio_irq, desc);
generic_handle_irq(gpio_irq);
}
}

Expand All @@ -202,7 +201,7 @@ static void ep93xx_gpio_ab_irq_handler(unsigned int irq, struct irq_desc *desc)
if (status & (1 << i)) {
int gpio_irq = gpio_to_irq(EP93XX_GPIO_LINE_B(0)) + i;
desc = irq_desc + gpio_irq;
desc_handle_irq(gpio_irq, desc);
generic_handle_irq(gpio_irq);
}
}
}
Expand All @@ -217,7 +216,7 @@ static void ep93xx_gpio_f_irq_handler(unsigned int irq, struct irq_desc *desc)
int port_f_idx = ((irq + 1) & 7) ^ 4; /* {19..22,47..50} -> {0..7} */
int gpio_irq = gpio_to_irq(EP93XX_GPIO_LINE_F(0)) + port_f_idx;

desc_handle_irq(gpio_irq, irq_desc + gpio_irq);
generic_handle_irq(gpio_irq);
}

static void ep93xx_gpio_irq_ack(unsigned int irq)
Expand Down
3 changes: 1 addition & 2 deletions arch/arm/mach-footbridge/isa-irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,7 @@ isa_irq_handler(unsigned int irq, struct irq_desc *desc)
return;
}

desc = irq_desc + isa_irq;
desc_handle_irq(isa_irq, desc);
generic_handle_irq(isa_irq);
}

static struct irqaction irq_cascade = {
Expand Down
4 changes: 1 addition & 3 deletions arch/arm/mach-h720x/common.c
Original file line number Diff line number Diff line change
Expand Up @@ -104,14 +104,12 @@ h720x_gpio_handler(unsigned int mask, unsigned int irq,
struct irq_desc *desc)
{
IRQDBG("%s irq: %d\n", __func__, irq);
desc = irq_desc + irq;
while (mask) {
if (mask & 1) {
IRQDBG("handling irq %d\n", irq);
desc_handle_irq(irq, desc);
generic_handle_irq(irq);
}
irq++;
desc++;
mask >>= 1;
}
}
Expand Down
4 changes: 1 addition & 3 deletions arch/arm/mach-h720x/cpu-h7202.c
Original file line number Diff line number Diff line change
Expand Up @@ -120,12 +120,10 @@ h7202_timerx_demux_handler(unsigned int irq_unused, struct irq_desc *desc)

mask >>= 1;
irq = IRQ_TIMER1;
desc = irq_desc + irq;
while (mask) {
if (mask & 1)
desc_handle_irq(irq, desc);
generic_handle_irq(irq);
irq++;
desc++;
mask >>= 1;
}
}
Expand Down
4 changes: 1 addition & 3 deletions arch/arm/mach-imx/irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -182,14 +182,12 @@ static void
imx_gpio_handler(unsigned int mask, unsigned int irq,
struct irq_desc *desc)
{
desc = irq_desc + irq;
while (mask) {
if (mask & 1) {
DEBUG_IRQ("handling irq %d\n", irq);
desc_handle_irq(irq, desc);
generic_handle_irq(irq);
}
irq++;
desc++;
mask >>= 1;
}
}
Expand Down
3 changes: 1 addition & 2 deletions arch/arm/mach-integrator/integrator_cp.c
Original file line number Diff line number Diff line change
Expand Up @@ -217,8 +217,7 @@ sic_handle_irq(unsigned int irq, struct irq_desc *desc)

irq += IRQ_SIC_START;

desc = irq_desc + irq;
desc_handle_irq(irq, desc);
generic_handle_irq(irq);
} while (status);
}

Expand Down
3 changes: 1 addition & 2 deletions arch/arm/mach-iop13xx/msi.c
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,7 @@ static void iop13xx_msi_handler(unsigned int irq, struct irq_desc *desc)
do {
j = find_first_bit(&status, 32);
(write_imipr[i])(1 << j); /* write back to clear bit */
desc = irq_desc + IRQ_IOP13XX_MSI_0 + j + (32*i);
desc_handle_irq(IRQ_IOP13XX_MSI_0 + j + (32*i), desc);
generic_handle_irq(IRQ_IOP13XX_MSI_0 + j + (32*i));
status = (read_imipr[i])();
} while (status);
}
Expand Down
6 changes: 2 additions & 4 deletions arch/arm/mach-ixp2000/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -311,8 +311,7 @@ static void ixp2000_GPIO_irq_handler(unsigned int irq, struct irq_desc *desc)

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);
generic_handle_irq(i + IRQ_IXP2000_GPIO0);
}
}
}
Expand Down Expand Up @@ -404,8 +403,7 @@ static void ixp2000_err_irq_handler(unsigned int irq, struct irq_desc *desc)

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);
generic_handle_irq(IRQ_IXP2000_DRAM0_MIN_ERR + i);
}
}
}
Expand Down
4 changes: 1 addition & 3 deletions arch/arm/mach-ixp2000/ixdp2x00.c
Original file line number Diff line number Diff line change
Expand Up @@ -129,10 +129,8 @@ static void ixdp2x00_irq_handler(unsigned int irq, struct irq_desc *desc)

for(i = 0; i < board_irq_count; i++) {
if(ex_interrupt & (1 << i)) {
struct irq_desc *cpld_desc;
int cpld_irq = IXP2000_BOARD_IRQ(0) + i;
cpld_desc = irq_desc + cpld_irq;
desc_handle_irq(cpld_irq, cpld_desc);
generic_handle_irq(cpld_irq);
}
}

Expand Down
4 changes: 1 addition & 3 deletions arch/arm/mach-ixp2000/ixdp2x01.c
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,8 @@ static void ixdp2x01_irq_handler(unsigned int irq, struct irq_desc *desc)

for (i = 0; i < IXP2000_BOARD_IRQS; i++) {
if (ex_interrupt & (1 << i)) {
struct irq_desc *cpld_desc;
int cpld_irq = IXP2000_BOARD_IRQ(0) + i;
cpld_desc = irq_desc + cpld_irq;
desc_handle_irq(cpld_irq, cpld_desc);
generic_handle_irq(cpld_irq);
}
}

Expand Down
4 changes: 1 addition & 3 deletions arch/arm/mach-ixp23xx/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,6 @@ static void pci_handler(unsigned int irq, struct irq_desc *desc)
{
u32 pci_interrupt;
unsigned int irqno;
struct irq_desc *int_desc;

pci_interrupt = *IXP23XX_PCI_XSCALE_INT_STATUS;

Expand All @@ -268,8 +267,7 @@ static void pci_handler(unsigned int irq, struct irq_desc *desc)
BUG();
}

int_desc = irq_desc + irqno;
desc_handle_irq(irqno, int_desc);
generic_handle_irq(irqno);

desc->chip->unmask(irq);
}
Expand Down
Loading

0 comments on commit d8aa025

Please sign in to comment.