History log of /arch/arm/common/gic.c
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
12679a2d7e3bfbdc7586e3e86d1ca90c46659363 30-Mar-2012 Linus Torvalds <torvalds@linux-foundation.org> Merge branch 'for-linus' of git://git.linaro.org/people/rmk/linux-arm

Pull more ARM updates from Russell King.

This got a fair number of conflicts with the <asm/system.h> split, but
also with some other sparse-irq and header file include cleanups. They
all looked pretty trivial, though.

* 'for-linus' of git://git.linaro.org/people/rmk/linux-arm: (59 commits)
ARM: fix Kconfig warning for HAVE_BPF_JIT
ARM: 7361/1: provide XIP_VIRT_ADDR for no-MMU builds
ARM: 7349/1: integrator: convert to sparse irqs
ARM: 7259/3: net: JIT compiler for packet filters
ARM: 7334/1: add jump label support
ARM: 7333/2: jump label: detect %c support for ARM
ARM: 7338/1: add support for early console output via semihosting
ARM: use set_current_blocked() and block_sigmask()
ARM: exec: remove redundant set_fs(USER_DS)
ARM: 7332/1: extract out code patch function from kprobes
ARM: 7331/1: extract out insn generation code from ftrace
ARM: 7330/1: ftrace: use canonical Thumb-2 wide instruction format
ARM: 7351/1: ftrace: remove useless memory checks
ARM: 7316/1: kexec: EOI active and mask all interrupts in kexec crash path
ARM: Versatile Express: add NO_IOPORT
ARM: get rid of asm/irq.h in asm/prom.h
ARM: 7319/1: Print debug info for SIGBUS in user faults
ARM: 7318/1: gic: refactor irq_start assignment
ARM: 7317/1: irq: avoid NULL check in for_each_irq_desc loop
ARM: 7315/1: perf: add support for the Cortex-A7 PMU
...
e0b823e9a543527dbb0f806252ee03a60f2aefbc 03-Feb-2012 Will Deacon <will.deacon@arm.com> ARM: 7318/1: gic: refactor irq_start assignment

The irq_start and hwirq_base assignment code is fairly hairy and ended
up being difficult to read following a conflict resolution for 3.2.

This patch rearranges the code slightly to make it easier to read.

Cc: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
/arch/arm/common/gic.c
15a25980d450c81e514c2a8724b575461961a30d 26-Jan-2012 Grant Likely <grant.likely@secretlab.ca> irq_domain/c6x: constify irq_domain structures

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Cc: Mark Salter <msalter@redhat.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
/arch/arm/common/gic.c
75294957be1dee7d22dd7d90bd31334ba410e836 14-Feb-2012 Grant Likely <grant.likely@secretlab.ca> irq_domain: Remove 'new' irq_domain in favour of the ppc one

This patch removes the simplistic implementation of irq_domains and enables
the powerpc infrastructure for all irq_domain users. The powerpc
infrastructure includes support for complex mappings between Linux and
hardware irq numbers, and can manage allocation of irq_descs.

This patch also converts the few users of irq_domain_add()/irq_domain_del()
to call irq_domain_add_legacy() instead.

v3: Fix bug that set up too many irqs in translation range.
v2: Fix removal of irq_alloc_descs() call in gic driver

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Cc: Rob Herring <rob.herring@calxeda.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Milton Miller <miltonm@bga.com>
Tested-by: Olof Johansson <olof@lixom.net>
/arch/arm/common/gic.c
7bb69bade0d41715bdf1b24f5ef0b8f798769fe9 14-Feb-2012 Grant Likely <grant.likely@secretlab.ca> irq_domain: Make irq_domain structure match powerpc's irq_host

Part of the series to unify the irq remapping mechanisms in the
kernel. A follow up patch will copy the powerpc implementation into
kernel/irq/irqdomain.c, which will be a lot easier if the structures
are identical.

Where they differ, I've chose to use the powerpc names since there is
a lot more code using those names.

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Cc: Rob Herring <rob.herring@calxeda.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Milton Miller <miltonm@bga.com>
Tested-by: Olof Johansson <olof@lixom.net>
/arch/arm/common/gic.c
eb50439b92b6298bf209a982f295ba9c0f7cb30b 20-Jan-2012 Will Deacon <will.deacon@arm.com> ARM: 7293/1: logical_cpu_map: decouple CPU mapping from SMP

It turns out that the logical CPU mapping is useful even when !CONFIG_SMP
for manipulation of devices like interrupt and power controllers when
running a UP kernel on a CPU other than 0. This can happen when kexecing
a UP image from an SMP kernel.

In the future, multi-cluster systems running AMP configurations will
require something similar for mapping cluster IDs, so it makes sense to
decouple this logic in preparation for this support.

Acked-by: Yang Bai <hamo.by@gmail.com>
Acked-by: Marc Zyngier <marc.zyngier@arm.com>
Reported-by: Joerg Roedel <joerg.roedel@amd.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
/arch/arm/common/gic.c
742eaa6a6e356a16788ce6530271de89bc4f8fb5 06-Dec-2011 Russell King <rmk+kernel@arm.linux.org.uk> Merge branch 'for-rmk' of git://git.kernel.org/pub/scm/linux/kernel/git/will/linux into devel-stable

Conflicts:
arch/arm/common/gic.c
arch/arm/plat-omap/include/plat/common.h
fe41db7b3aca512e19b8ef4fbd5ad55545005d25 25-Nov-2011 Will Deacon <will.deacon@arm.com> ARM: 7177/1: GIC: avoid skipping non-existent PPIs in irq_start calculation

Commit 4294f8baa ("ARM: gic: add irq_domain support") defines irq_start
as irq_start = (irq_start & ~31) + 16; On a platform with a GIC and a
CPU without PPIs, this results in irq_start being off by 16.

This patch fixes gic_init so that we only carve out a PPI space when
PPIs exist for the GIC being initialised.

Cc: Rob Herring <rob.herring@calxeda.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
/arch/arm/common/gic.c
abdd7b91dab2f8b2e32e90e4b7e809ffb462a662 25-Nov-2011 Marc Zyngier <Marc.Zyngier@arm.com> ARM: 7176/1: cpu_pm: register GIC PM notifier only once

When multiple GICs exist on a platform (RealView PB1176/11MP),
we must make sure the PM notifier block is only registered
once, otherwise we end up corrupting the PM notifier list.

The fix is to only register the notifier when initializing
the first GIC, as the power management functions seem
to iterate over all the registered GICs.

Tested on PB11MP and PB1176.

Reported-by: Will Deacon <will.deacon@arm.com>
Tested-by: Will Deacon <will.deacon@arm.com>
Cc: Colin Cross <ccross@android.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
/arch/arm/common/gic.c
08d33b27f7063ba2b4a29f9e3a2dcb65f30dec0b 06-Sep-2011 Marc Zyngier <marc.zyngier@arm.com> ARM: GIC: Make MULTI_IRQ_HANDLER mandatory

Now that MULTI_IRQ_HANDLER is selected by all the in-tree
GIC users, make it mandatory and remove the unused macros.

Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
/arch/arm/common/gic.c
562e0027d21bf64838178e2f5157df3d5833972e 06-Sep-2011 Marc Zyngier <marc.zyngier@arm.com> ARM: GIC: Add global gic_handle_irq() function

Provide the GIC code with a low level handler that can be used
by platforms using CONFIG_MULTI_IRQ_HANDLER.

Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
/arch/arm/common/gic.c
db0d4db22a78d31c59087f7057b8f1612fecc35d 12-Nov-2011 Marc Zyngier <marc.zyngier@arm.com> ARM: gic: allow GIC to support non-banked setups

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>
/arch/arm/common/gic.c
367069f16e32e188d4687fe2c3e30f2ca583836f 02-Nov-2011 Linus Torvalds <torvalds@linux-foundation.org> Merge branch 'next/dt' of git://git.linaro.org/people/arnd/arm-soc

* 'next/dt' of git://git.linaro.org/people/arnd/arm-soc:
ARM: gic: use module.h instead of export.h
ARM: gic: fix irq_alloc_descs handling for sparse irq
ARM: gic: add OF based initialization
ARM: gic: add irq_domain support
irq: support domains with non-zero hwirq base
of/irq: introduce of_irq_init
ARM: at91: add at91sam9g20 and Calao USB A9G20 DT support
ARM: at91: dt: at91sam9g45 family and board device tree files
arm/mx5: add device tree support for imx51 babbage
arm/mx5: add device tree support for imx53 boards
ARM: msm: Add devicetree support for msm8660-surf
msm_serial: Add devicetree support
msm_serial: Use relative resources for iomem

Fix up conflicts in arch/arm/mach-at91/{at91sam9260.c,at91sam9g45.c}
7e1efcf5d2039fb7a91e21df32f4175dbca4d61c 01-Nov-2011 Arnd Bergmann <arnd@arndb.de> ARM: gic: use module.h instead of export.h

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>
/arch/arm/common/gic.c
f37a53cc5d8a8fb199e41386d125d8c2ed9e54ef 22-Oct-2011 Rob Herring <rob.herring@calxeda.com> ARM: gic: fix irq_alloc_descs handling for sparse irq

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>
/arch/arm/common/gic.c
b3f7ed0324091e2cb23fe1b3c10570700f614014 29-Sep-2011 Rob Herring <rob.herring@calxeda.com> ARM: gic: add OF based initialization

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>
/arch/arm/common/gic.c
4294f8baaf174c9aa57886e7ed27caf4b02578f6 29-Sep-2011 Rob Herring <rob.herring@calxeda.com> ARM: gic: add irq_domain support

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>
/arch/arm/common/gic.c
1fdb24e969110fafea36d3b393bea438f702c87f 28-Oct-2011 Linus Torvalds <torvalds@linux-foundation.org> Merge branch 'devel-stable' of http://ftp.arm.linux.org.uk/pub/linux/arm/kernel/git-cur/linux-2.6-arm

* 'devel-stable' of http://ftp.arm.linux.org.uk/pub/linux/arm/kernel/git-cur/linux-2.6-arm: (178 commits)
ARM: 7139/1: fix compilation with CONFIG_ARM_ATAG_DTB_COMPAT and large TEXT_OFFSET
ARM: gic, local timers: use the request_percpu_irq() interface
ARM: gic: consolidate PPI handling
ARM: switch from NO_MACH_MEMORY_H to NEED_MACH_MEMORY_H
ARM: mach-s5p64x0: remove mach/memory.h
ARM: mach-s3c64xx: remove mach/memory.h
ARM: plat-mxc: remove mach/memory.h
ARM: mach-prima2: remove mach/memory.h
ARM: mach-zynq: remove mach/memory.h
ARM: mach-bcmring: remove mach/memory.h
ARM: mach-davinci: remove mach/memory.h
ARM: mach-pxa: remove mach/memory.h
ARM: mach-ixp4xx: remove mach/memory.h
ARM: mach-h720x: remove mach/memory.h
ARM: mach-vt8500: remove mach/memory.h
ARM: mach-s5pc100: remove mach/memory.h
ARM: mach-tegra: remove mach/memory.h
ARM: plat-tcc: remove mach/memory.h
ARM: mach-mmp: remove mach/memory.h
ARM: mach-cns3xxx: remove mach/memory.h
...

Fix up mostly pretty trivial conflicts in:
- arch/arm/Kconfig
- arch/arm/include/asm/localtimer.h
- arch/arm/kernel/Makefile
- arch/arm/mach-shmobile/board-ap4evb.c
- arch/arm/mach-u300/core.c
- arch/arm/mm/dma-mapping.c
- arch/arm/mm/proc-v7.S
- arch/arm/plat-omap/Kconfig
largely due to some CONFIG option renaming (ie CONFIG_PM_SLEEP ->
CONFIG_ARM_CPU_SUSPEND for the arm-specific suspend code etc) and
addition of NEED_MACH_MEMORY_H next to HAVE_IDE.
3cfef9524677a4ecb392d6fbffe6ebce6302f1d4 26-Oct-2011 Linus Torvalds <torvalds@linux-foundation.org> Merge branch 'core-locking-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

* 'core-locking-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (27 commits)
rtmutex: Add missing rcu_read_unlock() in debug_rt_mutex_print_deadlock()
lockdep: Comment all warnings
lib: atomic64: Change the type of local lock to raw_spinlock_t
locking, lib/atomic64: Annotate atomic64_lock::lock as raw
locking, x86, iommu: Annotate qi->q_lock as raw
locking, x86, iommu: Annotate irq_2_ir_lock as raw
locking, x86, iommu: Annotate iommu->register_lock as raw
locking, dma, ipu: Annotate bank_lock as raw
locking, ARM: Annotate low level hw locks as raw
locking, drivers/dca: Annotate dca_lock as raw
locking, powerpc: Annotate uic->lock as raw
locking, x86: mce: Annotate cmci_discover_lock as raw
locking, ACPI: Annotate c3_lock as raw
locking, oprofile: Annotate oprofilefs lock as raw
locking, video: Annotate vga console lock as raw
locking, latencytop: Annotate latency_lock as raw
locking, timer_stats: Annotate table_lock as raw
locking, rwsem: Annotate inner lock as raw
locking, semaphores: Annotate inner lock as raw
locking, sched: Annotate thread_group_cputimer as raw
...

Fix up conflicts in kernel/posix-cpu-timers.c manually: making
cputimer->cputime a raw lock conflicted with the ABBA fix in commit
bcd5cff7216f ("cputimer: Cure lock inversion").
34471a9168c8bfd7f0d00989a7b0797ad27d585e 23-Oct-2011 Russell King <rmk+kernel@arm.linux.org.uk> Merge branch 'ppi-irq-core-for-rmk' of git://github.com/mzyngier/arm-platforms into devel-stable
28af690a284dfcb627bd69d0963db1c0f412cb8c 22-Jul-2011 Marc Zyngier <marc.zyngier@arm.com> ARM: gic, local timers: use the request_percpu_irq() interface

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>
/arch/arm/common/gic.c
292b293ceef2eda1f96f0c90b96e954d7bdabd1c 20-Jul-2011 Marc Zyngier <marc.zyngier@arm.com> ARM: gic: consolidate PPI handling

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>
/arch/arm/common/gic.c
267840f3397fd9f6a2bdde14de38b9d29d525d7b 23-Aug-2011 Will Deacon <will.deacon@arm.com> ARM: 7061/1: gic: convert logical CPU numbers into physical numbers

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>
/arch/arm/common/gic.c
9c12845ee49716209cb2b087c0b47c3e37096bde 13-Jun-2011 Colin Cross <ccross@android.com> ARM: gic: Allow gic arch extensions to provide irqchip flags

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>
/arch/arm/common/gic.c
254056f3b12563c11e6dbcfad2fbfce20a4f3302 10-Feb-2011 Colin Cross <ccross@android.com> ARM: gic: Use cpu pm notifiers to save gic state

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>
/arch/arm/common/gic.c
bd31b85960a7fcb2d7ede216460b8da71a88411c 03-Jul-2009 Thomas Gleixner <tglx@linutronix.de> locking, ARM: Annotate low level hw locks as raw

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>
/arch/arm/common/gic.c
69f1d1a6acbaa7d83ef3f4ee26209c58cd000204 27-Jul-2011 Linus Torvalds <torvalds@linux-foundation.org> Merge branch 'next/devel' of ssh://master.kernel.org/pub/scm/linux/kernel/git/arm/linux-arm-soc

* 'next/devel' of ssh://master.kernel.org/pub/scm/linux/kernel/git/arm/linux-arm-soc: (128 commits)
ARM: S5P64X0: External Interrupt Support
ARM: EXYNOS4: Enable MFC on Samsung NURI
ARM: EXYNOS4: Enable MFC on universal_c210
ARM: S5PV210: Enable MFC on Goni
ARM: S5P: Add support for MFC device
ARM: EXYNOS4: Add support FIMD on SMDKC210
ARM: EXYNOS4: Add platform device and helper functions for FIMD
ARM: EXYNOS4: Add resource definition for FIMD
ARM: EXYNOS4: Change devname for FIMD clkdev
ARM: SAMSUNG: Add IRQ_I2S0 definition
ARM: SAMSUNG: Add platform device for idma
ARM: EXYNOS4: Add more registers to be saved and restored for PM
ARM: EXYNOS4: Add more register addresses of CMU
ARM: EXYNOS4: Add platform device for dwmci driver
ARM: EXYNOS4: configure rtc-s3c on NURI
ARM: EXYNOS4: configure MAX8903 secondary charger on NURI
ARM: EXYNOS4: configure ADC on NURI
ARM: EXYNOS4: configure MAX17042 fuel gauge on NURI
ARM: EXYNOS4: configure regulators and PMIC(MAX8997) on NURI
ARM: EXYNOS4: Increase NR_IRQS for devices with more IRQs
...

Fix up tons of silly conflicts:
- arch/arm/mach-davinci/include/mach/psc.h
- arch/arm/mach-exynos4/Kconfig
- arch/arm/mach-exynos4/mach-smdkc210.c
- arch/arm/mach-exynos4/pm.c
- arch/arm/mach-imx/mm-imx1.c
- arch/arm/mach-imx/mm-imx21.c
- arch/arm/mach-imx/mm-imx25.c
- arch/arm/mach-imx/mm-imx27.c
- arch/arm/mach-imx/mm-imx31.c
- arch/arm/mach-imx/mm-imx35.c
- arch/arm/mach-mx5/mm.c
- arch/arm/mach-s5pv210/mach-goni.c
- arch/arm/mm/Kconfig
5dfc54e087c15f823ee9b6541d2f0f314e69cbed 21-Jul-2011 Russell King <rmk+kernel@arm.linux.org.uk> ARM: GIC: avoid routing interrupts to offline CPUs

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>
/arch/arm/common/gic.c
2ef75701d1711a1feee2a82b42a2597ddc05f88b 21-Jul-2011 Russell King <rmk+kernel@arm.linux.org.uk> ARM: CPU hotplug: fix abuse of irqdesc->node

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>
/arch/arm/common/gic.c
e807acbc6fd1d5ff115f9a8eae0c1af6cf1c46c6 16-Jul-2011 Changhwan Youn <chaos.youn@samsung.com> ARM: GIC: move gic_chip_data structure declaration to header

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>
/arch/arm/common/gic.c
6ac77e469e991e9dd91b28e503fa24b5609eedba 28-Mar-2011 Santosh Shilimkar <santosh.shilimkar@ti.com> ARM: GIC: Convert GIC library to use the IO relaxed operations

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>
/arch/arm/common/gic.c
1a01753ed90a4fb84357b9b592e50564c07737f7 09-Feb-2011 Will Deacon <will.deacon@arm.com> 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>
/arch/arm/common/gic.c
f38c02f3b338651e145aac2889ba976baf6b28b3 24-Mar-2011 Thomas Gleixner <tglx@linutronix.de> arm: Fold irq_set_chip/irq_set_handler

Use irq_set_chip_and_handler() instead. Converted with coccinelle.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
/arch/arm/common/gic.c
9323f26186403433293e87e717a7785f74f75d80 24-Mar-2011 Thomas Gleixner <tglx@linutronix.de> arm: Reorder irq_set_ function calls

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>
/arch/arm/common/gic.c
6845664a6a7d443f03883db59d10749d38d98b8e 24-Mar-2011 Thomas Gleixner <tglx@linutronix.de> arm: Cleanup the irq namespace

Convert to the new function names. Automated with coccinelle.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
/arch/arm/common/gic.c
fdea77b88ea19525cce3b850f9183286b8a554e0 24-Mar-2011 Thomas Gleixner <tglx@linutronix.de> arm: gic: Use proper accessor functions

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
/arch/arm/common/gic.c
d7ed36a4ea84e3a850f9932e2058ceef987d1acd 02-Mar-2011 Santosh Shilimkar <santosh.shilimkar@ti.com> ARM: 6777/1: gic: Add hooks for architecture specific extensions

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>
/arch/arm/common/gic.c
c191789c787f488fdb74de0ee55258f71a427704 23-Jan-2011 Russell King <rmk+kernel@arm.linux.org.uk> ARM: irq migration: update GIC migration code

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>
/arch/arm/common/gic.c
7d1f4288ac077b3fc734acd1e034b288b1b9d3d2 29-Nov-2010 Lennert Buytenhek <buytenh@wantstofly.org> ARM: gic: irq_data conversion.

Signed-off-by: Lennert Buytenhek <buytenh@secretlab.ca>
Acked-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
/arch/arm/common/gic.c
ac61d143ffe2a6db4d4bcf47c21a5159d6a1b644 06-Dec-2010 Russell King <rmk+kernel@arm.linux.org.uk> ARM: GIC: move enablement of PPI interrupts to gic.c

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>
/arch/arm/common/gic.c
bef8f9ee32511a28f1c9a7d3b8c51cdac030b564 04-Dec-2010 Russell King <rmk+kernel@arm.linux.org.uk> ARM: GIC: move gic_data[] initialization into gic_init()

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>
/arch/arm/common/gic.c
ff2e27ae0b17f53a6a289c87d325f706598f3788 04-Dec-2010 Russell King <rmk+kernel@arm.linux.org.uk> ARM: GIC: consolidate gic_cpu_base_addr to common GIC code

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>
/arch/arm/common/gic.c
384895330e0f3954d9478fd0853145f9c169df12 04-Dec-2010 Russell King <rmk+kernel@arm.linux.org.uk> ARM: GIC: Remove MMIO address from gic_cpu_init, rename to gic_secondary_init

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>
/arch/arm/common/gic.c
b580b899dd05a007ad232ee49a07b32d91876462 04-Dec-2010 Russell King <rmk+kernel@arm.linux.org.uk> ARM: GIC: provide a single initialization function for boot CPU

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>
/arch/arm/common/gic.c
87507500b7fc3620e467abb617a3452f0cccc72d 06-Dec-2010 Chao Xie <xiechao.linux@gmail.com> ARM: 6524/1: GIC irq desciptor bug fix

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>
/arch/arm/common/gic.c
e6afec9b6808eff6dc392ac07c1552e87aebcdf7 26-Nov-2010 Pawel Moll <pawel.moll@arm.com> ARM: 6496/1: GIC: Do not try to register more then NR_IRQS interrupts

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>
/arch/arm/common/gic.c
9395f6ea3c61d80ccc7a13668d27afbb8d9436ba 12-Nov-2010 Russell King <rmk+kernel@arm.linux.org.uk> ARM: GIC: don't disable software generated interrupts

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>
/arch/arm/common/gic.c
846afbd1fe015e082c89d56dd42c484d896ef58e 25-Aug-2010 Abhijeet Dharmapurikar <adharmap@codeaurora.org> GIC: Dont disable INT in ack callback

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>
/arch/arm/common/gic.c
5c0c1f08abf094273f40a6d6fd4519fcacc6c58d 28-May-2010 Rabin Vincent <rabin.vincent@stericsson.com> ARM: 6150/1: gic: implement set_type

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>
/arch/arm/common/gic.c
41184f6a5ef0d88529904d54f06f88b67fb76f4a 19-Jun-2009 Catalin Marinas <catalin.marinas@arm.com> [ARM] 5556/1: Fix the irq_desc.cpu references

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>
/arch/arm/common/gic.c
3d58f48ba05caed9118bce62b3047f8683438835 01-Jun-2009 Ingo Molnar <mingo@elte.hu> Merge branch 'linus' into irq/numa

Conflicts:
arch/mips/sibyte/bcm1480/irq.c
arch/mips/sibyte/sb1250/irq.c

Merge reason: we gathered a few conflicts plus update to latest upstream fixes.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
826681043d7184b4d650cab5b007b9a86b628eb5 17-May-2009 Russell King <rmk@dyn-67.arm.linux.org.uk> [ARM] smp: fix cpumask usage in ARM SMP code

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>
/arch/arm/common/gic.c
d5dedd4507d307eb3f35f21b6e16f336fdc0d82a 28-Apr-2009 Yinghai Lu <yinghai@kernel.org> irq: change ->set_affinity() to return status

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>
/arch/arm/common/gic.c
0de26520c7cabf36e1de090ea8092f011a6106ce 13-Dec-2008 Rusty Russell <rusty@rustcorp.com.au> cpumask: make irq_set_affinity() take a const struct cpumask

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>
/arch/arm/common/gic.c
fced80c735941fa518ac67c0b61bbe153fb8c050 06-Sep-2008 Russell King <rmk@dyn-67.arm.linux.org.uk> [ARM] Convert asm/io.h to linux/io.h

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
/arch/arm/common/gic.c
6cbdc8c5357276307a77deeada3f04626ff17da6 11-May-2007 Simon Arlott <simon@fire.lp0.eu> [ARM] spelling fixes

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>
/arch/arm/common/gic.c
0f347bb9136f55ff575d55441a29e92c16e87fb0 17-May-2007 Russell King <rmk@dyn-67.arm.linux.org.uk> [ARM] gic: Fix gic cascade irq handling

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>
/arch/arm/common/gic.c
b3a1bde4db9889feb116330bff21214811c940e4 14-Feb-2007 Catalin Marinas <catalin.marinas@arm.com> [ARM] 4108/2: Allow multiple GIC interrupt controllers in a system

The current implementation only assumes one GIC to be present in the
system. However, there are platforms with more than one cascaded interrupt
controllers (RealView/EB MPCore for example).

Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
/arch/arm/common/gic.c
10dd5ce28d78e2440e8fa1135d17e33399d75340 23-Nov-2006 Russell King <rmk@dyn-67.arm.linux.org.uk> [ARM] Remove compatibility layer for ARM irqs

set_irq_chipdata -> set_irq_chip_data
get_irq_chipdata -> get_irq_chip_data
do_level_IRQ -> handle_level_irq
do_edge_IRQ -> handle_edge_irq
do_simple_IRQ -> handle_simple_irq
irqdesc -> irq_desc
irqchip -> irq_chip

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
/arch/arm/common/gic.c
38c677cb9a683c9d477f845484b74b0a1b23e1fb 01-Aug-2006 David Brownell <david-b@pacbell.net> [ARM] 3739/1: genirq updates: irq_chip, add and use irq_chip.name

Patch from David Brownell

ARM genirq cleanups/updates:

- Start switching platforms to newer APIs
* use "irq_chip" name, not "irqchip"
* providing irq_chip.name

- Show irq_chip.name in /proc/interrupts, like on x86.

This update a bit more than half of the ARM code. The irq_chip.name
values were chosen to match docs (if I have them) or be otherwise
obvious ("FPGA", "CPLD", or matching the code).

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
/arch/arm/common/gic.c
c4bfa28aec58c588de55babe99f4c172ec534704 01-Jul-2006 Thomas Gleixner <tglx@linutronix.de> [ARM] 3686/1: ARM: arm/common: convert irq handling

Patch from Thomas Gleixner

From: Thomas Gleixner <tglx@linutronix.de>

Convert the files in arch/arm/common to use the generic
irq handling functions.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
/arch/arm/common/gic.c
a06f5466c4576dcbf838a50a87903b0082774da7 30-Sep-2005 Catalin Marinas <catalin.marinas@arm.com> [ARM] 2942/1: Fix the warning in arch/arm/common/gic.c

Patch from Catalin Marinas

The warning is caused by the gic_set_cpu() function being defined but not
used if CONFIG_SMP is not defined.

Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
/arch/arm/common/gic.c
dcb86e8cbd66c5bd6b51a5485ea3ff35bb4ced22 31-Aug-2005 Catalin Marinas <catalin.marinas@arm.com> [ARM] 2868/1: Include linux/cpumask.h in arch/arm/common/gic.c

Patch from Catalin Marinas

Minor compilation error fix.

Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
/arch/arm/common/gic.c
f27ecacc54cc0e5397c9b35f6c25065f07c4448d 18-Aug-2005 Russell King <rmk@dyn-67.arm.linux.org.uk> [ARM] Add support for ARM GIC

Add support for the ARM Generic Interrupt Controller.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
/arch/arm/common/gic.c