- 15 Nov, 2011 1 commit
-
-
Marc Zyngier authored
The GIC support code is heavily using the fact that hardware implementations are exposing banked registers. Unfortunately, it looks like at least one GIC implementation (EXYNOS) offers both the distributor and the CPU interfaces at different addresses, depending on the CPU. This problem is solved by allowing the distributor and CPU interface addresses to be per-cpu variables for the platforms that require it. The EXYNOS code is updated not to mess with the GIC internals while handling interrupts, and struct gic_chip_data is back to being private. The DT binding for the gic is updated to allow an optional "cpu-offset" value, which is used to compute the various base addresses. Finally, a new config option (GIC_NON_BANKED) is used to control this feature, so the overhead is only present on kernels compiled with support for EXYNOS. Tested on Origen (EXYNOS4) and Panda (OMAP4). Cc: Kukjin Kim <kgene.kim@samsung.com> Cc: Will Deacon <will.deacon@arm.com> Cc: Thomas Abraham <thomas.abraham@linaro.org> Acked-by:
Rob Herring <rob.herring@calxeda.com> Signed-off-by:
Marc Zyngier <marc.zyngier@arm.com>
-
- 31 Oct, 2011 4 commits
-
-
Arnd Bergmann authored
The module.h cleanup series is not merged at this point, so use the older header file for now, to make it build either way. Signed-off-by:
Arnd Bergmann <arnd@arndb.de>
-
Rob Herring authored
Commit "ARM: gic: add irq_domain support" (b49b6ff) breaks SPARSE_IRQ on platforms with GIC. When SPARSE_IRQ is enabled, all NR_IRQS or mach_desc->nr_irqs will be allocated by arch_probe_nr_irqs(). This caused irq_alloc_descs to allocate irq_descs after the pre-allocated space. Make irq_alloc_descs search for an exact irq range and assume it has been pre-allocated on failure. For DT probing dynamic allocation is used. DT enabled platforms should set their nr_irqs to NR_IRQ_LEGACY and have all irq_chips allocate their irq_descs with irq_alloc_descs if SPARSE_IRQ is enabled. gic_init irq_start param is changed to be signed with negative meaning do dynamic Linux irq assigment. Signed-off-by:
Rob Herring <rob.herring@calxeda.com>
-
Rob Herring authored
This adds ARM gic interrupt controller initialization using device tree data. The initialization function is intended to be called by of_irq_init function like this: const static struct of_device_id irq_match[] = { { .compatible = "arm,cortex-a9-gic", .data = gic_of_init, }, {} }; static void __init init_irqs(void) { of_irq_init(irq_match); } Signed-off-by:
Rob Herring <rob.herring@calxeda.com> Reviewed-by:
Jamie Iles <jamie@jamieiles.com> Tested-by:
Thomas Abraham <thomas.abraham@linaro.org> Acked-by:
Grant Likely <grant.likely@secretlab.ca>
-
Rob Herring authored
Convert the gic interrupt controller to use irq domains in preparation for device-tree binding and MULTI_IRQ. This allows for translation between GIC interrupt IDs and Linux irq numbers. The meaning of irq_offset has changed. It now is just the number of skipped GIC interrupt IDs for the controller. It will be 16 for primary GIC and 32 for secondary GICs. Signed-off-by:
Rob Herring <rob.herring@calxeda.com> Cc: Marc Zyngier <marc.zyngier@arm.com> Reviewed-by:
Jamie Iles <jamie@jamieiles.com> Tested-by:
Thomas Abraham <thomas.abraham@linaro.org> Acked-by:
Grant Likely <grant.likely@secretlab.ca>
-
- 23 Oct, 2011 2 commits
-
-
Marc Zyngier authored
This patch remove the hardcoded link between local timers and PPIs, and convert the PPI users (TWD, MCT and MSM timers) to the new *_percpu_irq interface. Also some collateral cleanup (local_timer_ack() is gone, and the interrupt handler is strictly private to each driver). PPIs are now useable for more than just the local timers. Additional testing by David Brown (msm8250 and msm8660) and Shawn Guo (imx6q). Cc: David Brown <davidb@codeaurora.org> Cc: Thomas Gleixner <tglx@linutronix.de> Acked-by:
David Brown <davidb@codeaurora.org> Tested-by:
David Brown <davidb@codeaurora.org> Tested-by:
Shawn Guo <shawn.guo@linaro.org> Signed-off-by:
Marc Zyngier <marc.zyngier@arm.com>
-
Marc Zyngier authored
PPI handling is a bit of an odd beast. It uses its own low level handling code and is hardwired to the local timers (hence lacking a registration interface). Instead, switch the low handling to the normal SPI handling code. PPIs are handled by the handle_percpu_devid_irq flow. This also allows the removal of some duplicated code. Cc: Kukjin Kim <kgene.kim@samsung.com> Cc: David Brown <davidb@codeaurora.org> Cc: Bryan Huntsman <bryanh@codeaurora.org> Cc: Tony Lindgren <tony@atomide.com> Cc: Paul Mundt <lethal@linux-sh.org> Cc: Magnus Damm <magnus.damm@gmail.com> Cc: Thomas Gleixner <tglx@linutronix.de> Acked-by:
David Brown <davidb@codeaurora.org> Tested-by:
David Brown <davidb@codeaurora.org> Tested-by:
Shawn Guo <shawn.guo@linaro.org> Signed-off-by:
Marc Zyngier <marc.zyngier@arm.com>
-
- 17 Oct, 2011 1 commit
-
-
Will Deacon authored
The GIC driver must convert logical CPU numbers passed in from Linux into physical CPU numbers that are understood by the hardware. This patch uses the new cpu_logical_map macro for performing the conversion inside the GIC driver. Signed-off-by:
Will Deacon <will.deacon@arm.com> Signed-off-by:
Russell King <rmk+kernel@arm.linux.org.uk>
-
- 23 Sep, 2011 2 commits
-
-
Colin Cross authored
Tegra can benefit from the IRQCHIP_MASK_ON_SUSPEND flag, allow it to be passed to the gic irq chip. Signed-off-by:
Colin Cross <ccross@android.com> Signed-off-by:
Santosh Shilimkar <santosh.shilimkar@ti.com> Reviewed-by:
Kevin Hilman <khilman@ti.com> Tested-and-Acked-by:
Shawn Guo <shawn.guo@linaro.org> Tested-by:
Vishwanath BS <vishwanath.bs@ti.com>
-
Colin Cross authored
When the cpu is powered down in a low power mode, the gic cpu interface may be reset, and when the cpu cluster is powered down, the gic distributor may also be reset. This patch uses CPU_PM_ENTER and CPU_PM_EXIT notifiers to save and restore the gic cpu interface registers, and the CPU_CLUSTER_PM_ENTER and CPU_CLUSTER_PM_EXIT notifiers to save and restore the gic distributor registers. Original-author: Gary King <gking@nvidia.com> Signed-off-by:
Colin Cross <ccross@android.com> Signed-off-by:
Santosh Shilimkar <santosh.shilimkar@ti.com> Tested-and-Acked-by:
Shawn Guo <shawn.guo@linaro.org> Tested-by:
Vishwanath BS <vishwanath.bs@ti.com>
-
- 13 Sep, 2011 1 commit
-
-
Thomas Gleixner authored
Annotate the low level hardware locks which must not be preempted. In mainline this change documents the low level nature of the lock - otherwise there's no functional difference. Lockdep and Sparse checking will work as usual. Signed-off-by:
Thomas Gleixner <tglx@linutronix.de> Cc: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by:
Ingo Molnar <mingo@elte.hu>
-
- 21 Jul, 2011 2 commits
-
-
Russell King authored
The irq_set_affinity() method can be called with masks which include offline CPUs. This allows offline CPUs to have interrupts routed to them by writing to /proc/irq/*/smp_affinity after hotplug has taken a CPU offline. Fix this by ensuring that we select a target CPU present in both the required affinity and the online CPU mask. Ensure that we return IRQ_SET_MASK_OK (which happens to be 0) on success to ensure generic code copies the new mask into the irq_data structure. Signed-off-by:
Russell King <rmk+kernel@arm.linux.org.uk>
-
Russell King authored
irqdesc's node member is supposed to mark the numa node number for the interrupt. Our use of it is non-standard. Remove this, replacing the functionality with a test of the affinity mask. Signed-off-by:
Russell King <rmk+kernel@arm.linux.org.uk>
-
- 20 Jul, 2011 1 commit
-
-
Changhwan Youn authored
Since Samsung EXYNOS4210 cannot support register banking in GIC, so needs to update CPU interface base address. The 'gic_chip_data' is used for it, this patch moves gic_chip_data structure declaraton to arch/arm/include/asm/hardware/gic.h to use it. Cc: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by:
Changhwan Youn <chaos.youn@samsung.com> Signed-off-by:
Kukjin Kim <kgene.kim@samsung.com>
-
- 11 May, 2011 2 commits
-
-
Santosh Shilimkar authored
The GIC register accesses today make use of readl()/writel() which prove to be very expensive when used along with mandatory barriers. This mandatory barriers also introduces an un-necessary and expensive l2x0_sync() operation. On Cortex-A9 MP cores, GIC IO accesses from CPU are direct and doesn't go through L2X0 write buffer. A DSB before writel_relaxed() in gic_raise_softirq() is added to be compliant with the Barrier Litmus document - the mailbox scenario. Signed-off-by:
Santosh Shilimkar <santosh.shilimkar@ti.com> Acked-by:
Catalin Marinas <catalin.marinas@arm.com> Cc: Will Deacon <will.deacon@arm.com>
-
Will Deacon authored
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>
-
- 29 Mar, 2011 4 commits
-
-
Thomas Gleixner authored
Use irq_set_chip_and_handler() instead. Converted with coccinelle. Signed-off-by:
Thomas Gleixner <tglx@linutronix.de>
-
Thomas Gleixner authored
Reorder irq_set_chip() irq_set_chip_data() irq_set_handler() to irq_set_chip() irq_set_handler() irq_set_chip_data() so the next patch can combine irq_set_chip() and irq_set_handler() to irq_set_chip_and_handler(). Automated conversion with coccinelle. Signed-off-by:
Thomas Gleixner <tglx@linutronix.de>
-
Thomas Gleixner authored
Convert to the new function names. Automated with coccinelle. Signed-off-by:
Thomas Gleixner <tglx@linutronix.de>
-
Thomas Gleixner authored
Signed-off-by:
Thomas Gleixner <tglx@linutronix.de>
-
- 08 Mar, 2011 1 commit
-
-
Santosh Shilimkar authored
Few architectures combine the GIC with an external interrupt controller. On such systems it may be necessary to update both the GIC registers and the external controller's registers to control IRQ behavior. This can be addressed in couple of possible methods. 1. Export common GIC routines along with 'struct irq_chip gic_chip' and allow architectures to have custom function by override. 2. Provide architecture specific function pointer hooks within GIC library and leave platforms to add the necessary code as part of these hooks. First one might be non-intrusive but have few shortcomings like arch needs to have there own custom gic library. Locks used should be common since it caters to same IRQs etc. Maintenance point of view also it leads to multiple file fixes. The second probably is cleaner and portable. It ensures that all the common GIC infrastructure is not touched and also provides archs to address their specific issue. Cc: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by:
Santosh Shilimkar <santosh.shilimkar@ti.com> Acked-by:
Colin Cross <ccross@android.com> Tested-by:
Colin Cross <ccross@android.com> Signed-off-by:
Russell King <rmk+kernel@arm.linux.org.uk>
-
- 23 Feb, 2011 1 commit
-
-
Russell King authored
This cleans up after the conversion to irq_data. Rename the function to match the method, and remove the now useless lookup of the irq descriptor which is never used. Move the bitmask calculation out of the irq_controller_lock region. Signed-off-by:
Russell King <rmk+kernel@arm.linux.org.uk>
-
- 13 Jan, 2011 1 commit
-
-
Lennert Buytenhek authored
Signed-off-by:
Lennert Buytenhek <buytenh@secretlab.ca> Acked-by:
Abhijeet Dharmapurikar <adharmap@codeaurora.org>
-
- 14 Dec, 2010 5 commits
-
-
Russell King authored
Avoid adding nasty genirq-specific code to local timers to enable PPI interrupts. Instead, provide a gic function to do this. Signed-off-by:
Russell King <rmk+kernel@arm.linux.org.uk>
-
Russell King authored
This avoids writing unnecessarily to gic_data[] from other CPUs, making this a mostly read-only variable. Reviewed-by:
Catalin Marinas <catalin.marinas@arm.com> Tested-by:
Abhijeet Dharmapurikar <adharmap@codeaurora.org> Signed-off-by:
Russell King <rmk+kernel@arm.linux.org.uk>
-
Russell King authored
Every architecture using the GIC has a gic_cpu_base_addr pointer for GIC 0 for their entry assembly code to use to decode the cause of the current interrupt. Move this into the common GIC code. Reviewed-by:
Catalin Marinas <catalin.marinas@arm.com> Tested-by:
Abhijeet Dharmapurikar <adharmap@codeaurora.org> Signed-off-by:
Russell King <rmk+kernel@arm.linux.org.uk>
-
Russell King authored
We don't need to re-pass the base address for the CPU interfaces to the GIC for secondary CPUs, as it will never be different from the boot CPU - and even if it was, we'd overwrite the boot CPU's base address. Get rid of this argument, and rename to gic_secondary_init(). Reviewed-by:
Catalin Marinas <catalin.marinas@arm.com> Tested-by:
Abhijeet Dharmapurikar <adharmap@codeaurora.org> Signed-off-by:
Russell King <rmk+kernel@arm.linux.org.uk>
-
Russell King authored
Provide gic_init() which initializes the GIC distributor and current CPU's GIC interface for the boot (or single) CPU. Reviewed-by:
Catalin Marinas <catalin.marinas@arm.com> Tested-by:
Abhijeet Dharmapurikar <adharmap@codeaurora.org> Signed-off-by:
Russell King <rmk+kernel@arm.linux.org.uk>
-
- 06 Dec, 2010 1 commit
-
-
Chao Xie authored
gic_set_cpu will directly use irq_desc[]. If CONFIG_SPARSE_IRQ is enabled, there is no irq_desc[]. So we need use irq_to_desc(irq) to get the descriptor for irq. Signed-off-by:
Chao Xie <chao.xie@marvell.com> Acked-by:
Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by:
Russell King <rmk+kernel@arm.linux.org.uk>
-
- 30 Nov, 2010 1 commit
-
-
Pawel Moll authored
This change limits number of GIC-originating interrupts to the platform maximum (defined by NR_IRQS) while still initialising all distributor registers. Signed-off-by:
Pawel Moll <pawel.moll@arm.com> Signed-off-by:
Russell King <rmk+kernel@arm.linux.org.uk>
-
- 12 Nov, 2010 1 commit
-
-
Russell King authored
Software generated interrupts (SGI) are used for IPIs by the kernel. While previous revisions of the GIC hardware were specified not to implement enable bits for SGIs, more recent hardware is now permitted to implement these bits in a per-CPU banked register. The priority registers for the PPI and SGIs are also per-CPU banked registers, so ensure that these are also appropriately initialized. Reported-by:
Scott Valentine <svalentine@concentris-systems.com> Acked-by:
Abhijeet Dharmapurikar <adharmap@codeaurora.org> Acked-by:
Catalin Marinas <catalin.marinas@arm.com> Signed-off-by:
Russell King <rmk+kernel@arm.linux.org.uk>
-
- 06 Oct, 2010 1 commit
-
-
Abhijeet Dharmapurikar authored
Masking in the ack callback fails to work with handle_percpu_irq and handle_edge_irq. The interrupt stays disabled after the first invocation since percpu and edge irq do not unmask an interrupt after handling it. For handle_level_irq masking in the ack is redundant because ack is always called after mask in the mask_ack function. Masking in the ack function is required only when __do_IRQ was used instead of flow handlers, but using __do_IRQ has been deprecated. Remove the masking of interrupt from the ack callback. Signed-off-by:
Abhijeet Dharmapurikar <adharmap@codeaurora.org> Signed-off-by:
Jeff Ohlstein <johlstei@codeaurora.org> Signed-off-by:
Daniel Walker <dwalker@codeaurora.org>
-
- 16 Jun, 2010 1 commit
-
-
Rabin Vincent authored
Implement set_type() to allow configuration of the trigger type. Cc: Abhijeet Dharmapurikar <adharmap@quicinc.com> Acked-by:
Linus Walleij <linus.walleij@stericsson.com> Signed-off-by:
Rabin Vincent <rabin.vincent@stericsson.com> Signed-off-by:
Russell King <rmk+kernel@arm.linux.org.uk>
-
- 19 Jun, 2009 1 commit
-
-
Catalin Marinas authored
The cpu member of struct irq_desc was recently renamed to node. The patch renames the ARM references to the old member. Signed-off-by:
Catalin Marinas <catalin.marinas@arm.com> Signed-off-by:
Russell King <rmk+kernel@arm.linux.org.uk>
-
- 17 May, 2009 1 commit
-
-
Russell King authored
The ARM SMP code wasn't properly updated for the cpumask changes, which results in smp_timer_broadcast() broadcasting ticks to non-online CPUs. Signed-off-by:
Russell King <rmk+kernel@arm.linux.org.uk>
-
- 28 Apr, 2009 1 commit
-
-
Yinghai Lu authored
according to Ingo, change set_affinity() in irq_chip should return int, because that way we can handle failure cases in a much cleaner way, in the genirq layer. v2: fix two typos [ Impact: extend API ] Signed-off-by:
Yinghai Lu <yinghai@kernel.org> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Suresh Siddha <suresh.b.siddha@intel.com> Cc: "Eric W. Biederman" <ebiederm@xmission.com> Cc: Rusty Russell <rusty@rustcorp.com.au> Cc: linux-arch@vger.kernel.org LKML-Reference: <49F654E9.4070809@kernel.org> Signed-off-by:
Ingo Molnar <mingo@elte.hu>
-
- 13 Dec, 2008 1 commit
-
-
Rusty Russell authored
Impact: change existing irq_chip API Not much point with gentle transition here: the struct irq_chip's setaffinity method signature needs to change. Fortunately, not widely used code, but hits a few architectures. Note: In irq_select_affinity() I save a temporary in by mangling irq_desc[irq].affinity directly. Ingo, does this break anything? (Folded in fix from KOSAKI Motohiro) Signed-off-by:
Rusty Russell <rusty@rustcorp.com.au> Signed-off-by:
Mike Travis <travis@sgi.com> Reviewed-by:
Grant Grundler <grundler@parisc-linux.org> Acked-by:
Ingo Molnar <mingo@redhat.com> Cc: ralf@linux-mips.org Cc: grundler@parisc-linux.org Cc: jeremy@xensource.com Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
-
- 06 Sep, 2008 1 commit
-
-
Russell King authored
Signed-off-by:
Russell King <rmk+kernel@arm.linux.org.uk>
-
- 20 May, 2007 1 commit
-
-
Simon Arlott authored
Spelling fixes in arch/arm/. Signed-off-by:
Simon Arlott <simon@fire.lp0.eu> Signed-off-by:
Russell King <rmk+kernel@arm.linux.org.uk>
-
- 17 May, 2007 1 commit
-
-
Russell King authored
No need for the cascade irq function to have a "fastcall" annotation. Fix the range checking for valid IRQ numbers - comparing the value returned by the GIC with NR_IRQS is meaningless since we translate the GIC irq number to a Linux IRQ number afterwards. Check the GIC returned IRQ number is within limits first, then add the IRQ offset, and only then compare with NR_IRQS. Signed-off-by:
Russell King <rmk+kernel@arm.linux.org.uk>
-