]> git.karo-electronics.de Git - karo-tx-linux.git/commit
ENGR00172374-5: GPIO: use chained_irq_enter/exit pair
authorJason Liu <r64343@freescale.com>
Mon, 9 Jan 2012 07:28:39 +0000 (15:28 +0800)
committerLothar Waßmann <LW@KARO-electronics.de>
Fri, 24 May 2013 06:33:49 +0000 (08:33 +0200)
commit42c99b2a1f1d4bb4985cbf9c474c9a04f2d06c83
treeba01f635fdc18124d6f7fe3d0a8cf097a57805c0
parent7273d602405df4d9588f8e39237349f922514d50
ENGR00172374-5: GPIO: use chained_irq_enter/exit pair

Kernel oops when plug in/out sd card and throw out null pointer

this is due to: commit: 1a01753 ARM: gic: use handle_fasteoi_irq for SPIs

commit 1a01753ed90a4fb84357b9b592e50564c07737f7
Author: Will Deacon <will.deacon@arm.com>
Date:   Wed Feb 9 12:01:12 2011 +0000

    ARM: gic: use handle_fasteoi_irq for SPIs

    Currently, the gic uses handle_level_irq for handling SPIs (Shared
    Peripheral Interrupts), requiring active interrupts to be masked at
    the distributor level during IRQ handling.

    On a virtualised system, only the CPU interfaces are virtualised in
    hardware. Accesses to the distributor must be trapped by the
    hypervisor, adding latency to the critical interrupt path in Linux.

    This patch modifies the GIC code to use handle_fasteoi_irq for handling
    interrupts, which only requires us to signal EOI to the CPU interface
    when handling is complete. Cascaded IRQ handling is also updated to use
    the chained IRQ enter/exit functions to honour the flow control of the
    parent chip.

    Note that commit 846afbd1 ("GIC: Dont disable INT in ack callback")
    broke cascading interrupts by forgetting to add IRQ masking. This is
    no longer an issue because the unmask call is now unnecessary.

    Tested on Versatile Express and Realview EB (1176 w/ cascaded GICs).

Tested-and-reviewed-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
Tested-and-acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
the above commit has removed the irq_ack from gic chip tus the following call:
desc->irq_data.chip->irq_ack(&desc->irq_data);
will trow the kernel oops, to fix it, just involve the pair to fix it.

chained_irq_enter(chip, desc);
chained_irq_exit(chip, desc);

This also aligns the upstream kernel doing such as v3.2

Signed-off-by: Jason Liu <r64343@freescale.com>
arch/arm/plat-mxc/gpio.c