projects/linux·commit 6aa2fdb8

Merge branch 'irq-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

6aa2fdb8 · Linus Torvalds <[email protected]> · 2015-11-03 14:40:01 -08:00

Pull irq updates from Thomas Gleixner:
 "The irq departement delivers:

   - Rework the irqdomain core infrastructure to accomodate ACPI based
     systems.  This is required to support ARM64 without creating
     artificial device tree nodes.

   - Sanitize the ACPI based ARM GIC initialization by making use of the
     new firmware independent irqdomain core

   - Further improvements to the generic MSI management

   - Generalize the irq migration on CPU hotplug

   - Improvements to the threaded interrupt infrastructure

   - Allow the migration of "chained" low level interrupt handlers

   - Allow optional force masking of interrupts in disable_irq[_nosysnc]

   - Support for two new interrupt chips - Sigh!

   - A larger set of errata fixes for ARM gicv3

   - The usual pile of fixes, updates, improvements and cleanups all
     over the place"

* 'irq-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (71 commits)
  Document that IRQ_NONE should be returned when IRQ not actually handled
  PCI/MSI: Allow the MSI domain to be device-specific
  PCI: Add per-device MSI domain hook
  of/irq: Use the msi-map property to provide device-specific MSI domain
  of/irq: Split of_msi_map_rid to reuse msi-map lookup
  irqchip/gic-v3-its: Parse new version of msi-parent property
  PCI/MSI: Use of_msi_get_domain instead of open-coded "msi-parent" parsing
  of/irq: Use of_msi_get_domain instead of open-coded "msi-parent" parsing
  of/irq: Add support code for multi-parent version of "msi-parent"
  irqchip/gic-v3-its: Add handling of PCI requester id.
  PCI/MSI: Add helper function pci_msi_domain_get_msi_rid().
  of/irq: Add new function of_msi_map_rid()
  Docs: dt: Add PCI MSI map bindings
  irqchip/gic-v2m: Add support for multiple MSI frames
  irqchip/gic-v3: Fix translation of LPIs after conversion to irq_fwspec
  irqchip/mxs: Add Alphascale ASM9260 support
  irqchip/mxs: Prepare driver for hardware with different offsets
  irqchip/mxs: Panic if ioremap or domain creation fails
  irqdomain: Documentation updates
  irqdomain/msi: Use fwnode instead of of_node
  ...
Commit
6aa2fdb87cf01d7746955c600cbac352dc04d451
Parents
7b2a4306 · d9e4ad5b

Merge commit. Changes below are compared with the first parent: 7b2a4306.

Changes

90 files changed · +2575 −888

FileStatusAddDelContent
Documentation/IRQ-domain.txtmodified+4−4View file
Documentation/arm64/booting.txtmodified+10−1View file
Documentation/devicetree/bindings/arm/gic.txtmodified+20−4View file
Documentation/devicetree/bindings/interrupt-controller/renesas,irqc.txtmodified+1−0View file
Documentation/devicetree/bindings/pci/pci-msi.txtadded+220−0View file
arch/arm/Kconfigmodified+1−0View file
arch/arm/include/asm/arch_gicv3.hadded+188−0View file
arch/arm/mach-exynos/suspend.cmodified+29−26View file
arch/arm/mach-imx/gpc.cmodified+29−26View file
arch/arm/mach-omap2/omap-wakeupgen.cmodified+29−26View file
arch/arm64/Kconfigmodified+27−0View file
arch/arm64/include/asm/arch_gicv3.hadded+170−0View file
arch/arm64/include/asm/cpufeature.hmodified+2−1View file
arch/arm64/include/asm/cputype.hmodified+10−7View file
arch/arm64/kernel/cpu_errata.cmodified+9−0View file
arch/arm64/kernel/cpufeature.cmodified+18−1View file
arch/arm64/kernel/head.Smodified+2−0View file
arch/arm64/kvm/Kconfigmodified+4−0View file
arch/c6x/platforms/megamod-pic.cmodified+1−1View file
arch/mips/cavium-octeon/octeon-irq.cmodified+2−2View file
arch/powerpc/platforms/cell/axon_msi.cmodified+1−1View file
arch/powerpc/platforms/cell/spider-pic.cmodified+6−3View file
arch/powerpc/platforms/pasemi/msi.cmodified+4−2View file
arch/powerpc/platforms/powernv/opal-irqchip.cmodified+1−1View file
arch/powerpc/sysdev/ehv_pic.cmodified+2−1View file
arch/powerpc/sysdev/fsl_msi.cmodified+1−1View file
arch/powerpc/sysdev/i8259.cmodified+2−1View file
arch/powerpc/sysdev/ipic.cmodified+2−1View file
arch/powerpc/sysdev/mpic.cmodified+2−1View file
arch/powerpc/sysdev/mpic_msi.cmodified+1−1View file
arch/powerpc/sysdev/qe_lib/qe_ic.cmodified+2−1View file
drivers/acpi/gsi.cmodified+33−21View file
drivers/base/platform-msi.cmodified+3−3View file
drivers/gpio/gpio-sodaville.cmodified+1−1View file
drivers/irqchip/Kconfigmodified+6−0View file
drivers/irqchip/Makefilemodified+1−1View file
drivers/irqchip/alphascale_asm9260-icoll.hadded+109−0View file
drivers/irqchip/exynos-combiner.cmodified+1−1View file
drivers/irqchip/irq-atmel-aic-common.cmodified+1−1View file
drivers/irqchip/irq-atmel-aic5.cmodified+27−35View file
drivers/irqchip/irq-crossbar.cmodified+34−28View file
drivers/irqchip/irq-gic-common.cmodified+11−0View file
drivers/irqchip/irq-gic-common.hmodified+9−0View file
drivers/irqchip/irq-gic-v2m.cmodified+111−52View file
drivers/irqchip/irq-gic-v3-its-pci-msi.cmodified+3−4View file
drivers/irqchip/irq-gic-v3-its-platform-msi.cmodified+17−4View file
drivers/irqchip/irq-gic-v3-its.cmodified+70−13View file
drivers/irqchip/irq-gic-v3.cmodified+69−92View file
drivers/irqchip/irq-gic.cmodified+70−40View file
drivers/irqchip/irq-hip04.cmodified+1−1View file
drivers/irqchip/irq-i8259.cmodified+2−2View file
drivers/irqchip/irq-imx-gpcv2.cmodified+29−35View file
drivers/irqchip/irq-mtk-sysirq.cmodified+26−23View file
drivers/irqchip/irq-mxs.cmodified+153−18View file
drivers/irqchip/irq-nvic.cmodified+14−4View file
drivers/irqchip/irq-renesas-intc-irqpin.cmodified+4−2View file
drivers/irqchip/irq-renesas-irqc.cmodified+30−56View file
drivers/irqchip/irq-s3c24xx.cmodified+2−2View file
drivers/irqchip/irq-sunxi-nmi.cmodified+12−10View file
drivers/irqchip/irq-tegra.cmodified+29−26View file
drivers/irqchip/irq-vf610-mscm-ir.cmodified+31−14View file
drivers/of/irq.cmodified+175−10View file
drivers/pci/host/pci-xgene-msi.cmodified+1−1View file
drivers/pci/msi.cmodified+56−7View file
drivers/pci/of.cmodified+6−7View file
drivers/pci/probe.cmodified+38−5View file
drivers/spmi/spmi-pmic-arb.cmodified+1−1View file
include/kvm/arm_vgic.hmodified+2−2View file
include/linux/acpi.hmodified+3−0View file
include/linux/fwnode.hmodified+1−0View file
include/linux/interrupt.hmodified+2−0View file
include/linux/irq.hmodified+6−17View file
include/linux/irqchip/arm-gic-v3.hmodified+26−79View file
include/linux/irqchip/arm-gic.hmodified+2−7View file
include/linux/irqdomain.hmodified+83−23View file
include/linux/irqreturn.hmodified+1−1View file
include/linux/msi.hmodified+12−4View file
include/linux/of_irq.hmodified+23−0View file
kernel/irq/Kconfigmodified+4−0View file
kernel/irq/Makefilemodified+1−0View file
kernel/irq/chip.cmodified+27−1View file
kernel/irq/cpuhotplug.cadded+82−0View file
kernel/irq/handle.cmodified+3−4View file
kernel/irq/internals.hmodified+3−1View file
kernel/irq/irqdomain.cmodified+140−37View file
kernel/irq/manage.cmodified+149−72View file
kernel/irq/msi.cmodified+4−4View file
kernel/irq/proc.cmodified+1−1View file
kernel/irq/settings.hmodified+12−0View file
virt/kvm/arm/vgic.cmodified+2−2View file

Only the first 600 diff lines are shown. Download the complete patch.

Documentation/IRQ-domain.txt

View file
diff --git a/Documentation/IRQ-domain.txt b/Documentation/IRQ-domain.txt
index 3a8e15c..8d990bd 100644
--- a/Documentation/IRQ-domain.txt
+++ b/Documentation/IRQ-domain.txt
@@ -32,9 +32,9 @@ top of the irq_alloc_desc*() API. An irq_domain to manage mapping is
preferred over interrupt controller drivers open coding their own
reverse mapping scheme.
-irq_domain also implements translation from Device Tree interrupt
-specifiers to hwirq numbers, and can be easily extended to support
-other IRQ topology data sources.
+irq_domain also implements translation from an abstract irq_fwspec
+structure to hwirq numbers (Device Tree and ACPI GSI so far), and can
+be easily extended to support other IRQ topology data sources.
=== irq_domain usage ===
An interrupt controller driver creates and registers an irq_domain by
@@ -184,7 +184,7 @@ There are four major interfaces to use hierarchy irq_domain:
related resources associated with these interrupts.
3) irq_domain_activate_irq(): activate interrupt controller hardware to
deliver the interrupt.
-3) irq_domain_deactivate_irq(): deactivate interrupt controller hardware
+4) irq_domain_deactivate_irq(): deactivate interrupt controller hardware
to stop delivering the interrupt.
Following changes are needed to support hierarchy irq_domain.

Documentation/arm64/booting.txt

View file
diff --git a/Documentation/arm64/booting.txt b/Documentation/arm64/booting.txt
index 7d9d3c2..369a4f4 100644
--- a/Documentation/arm64/booting.txt
+++ b/Documentation/arm64/booting.txt
@@ -173,13 +173,22 @@ Before jumping into the kernel, the following conditions must be met:
the kernel image will be entered must be initialised by software at a
higher exception level to prevent execution in an UNKNOWN state.
- For systems with a GICv3 interrupt controller:
+ For systems with a GICv3 interrupt controller to be used in v3 mode:
- If EL3 is present:
ICC_SRE_EL3.Enable (bit 3) must be initialiased to 0b1.
ICC_SRE_EL3.SRE (bit 0) must be initialised to 0b1.
- If the kernel is entered at EL1:
ICC.SRE_EL2.Enable (bit 3) must be initialised to 0b1
ICC_SRE_EL2.SRE (bit 0) must be initialised to 0b1.
+ - The DT or ACPI tables must describe a GICv3 interrupt controller.
+
+ For systems with a GICv3 interrupt controller to be used in
+ compatibility (v2) mode:
+ - If EL3 is present:
+ ICC_SRE_EL3.SRE (bit 0) must be initialised to 0b0.
+ - If the kernel is entered at EL1:
+ ICC_SRE_EL2.SRE (bit 0) must be initialised to 0b0.
+ - The DT or ACPI tables must describe a GICv2 interrupt controller.
The requirements described above for CPU mode, caches, MMUs, architected
timers, coherency and system registers apply to all CPUs. All CPUs must

Documentation/devicetree/bindings/arm/gic.txt

View file
diff --git a/Documentation/devicetree/bindings/arm/gic.txt b/Documentation/devicetree/bindings/arm/gic.txt
index 2da059a..cc56021 100644
--- a/Documentation/devicetree/bindings/arm/gic.txt
+++ b/Documentation/devicetree/bindings/arm/gic.txt
@@ -11,13 +11,14 @@ have PPIs or SGIs.
Main node required properties:
- compatible : should be one of:
- "arm,gic-400"
+ "arm,arm1176jzf-devchip-gic"
+ "arm,arm11mp-gic"
"arm,cortex-a15-gic"
- "arm,cortex-a9-gic"
"arm,cortex-a7-gic"
- "arm,arm11mp-gic"
+ "arm,cortex-a9-gic"
+ "arm,gic-400"
+ "arm,pl390"
"brcm,brahma-b15-gic"
- "arm,arm1176jzf-devchip-gic"
"qcom,msm-8660-qgic"
"qcom,msm-qgic2"
- interrupt-controller : Identifies the node as an interrupt controller
@@ -58,6 +59,21 @@ Optional
regions, used when the GIC doesn't have banked registers. The offset is
cpu-offset * cpu-nr.
+- clocks : List of phandle and clock-specific pairs, one for each entry
+ in clock-names.
+- clock-names : List of names for the GIC clock input(s). Valid clock names
+ depend on the GIC variant:
+ "ic_clk" (for "arm,arm11mp-gic")
+ "PERIPHCLKEN" (for "arm,cortex-a15-gic")
+ "PERIPHCLK", "PERIPHCLKEN" (for "arm,cortex-a9-gic")
+ "clk" (for "arm,gic-400")
+ "gclk" (for "arm,pl390")
+
+- power-domains : A phandle and PM domain specifier as defined by bindings of
+ the power controller specified by phandle, used when the GIC
+ is part of a Power or Clock Domain.
+
+
Example:
intc: interrupt-controller@fff11000 {

Documentation/devicetree/bindings/interrupt-controller/renesas,irqc.txt

View file
diff --git a/Documentation/devicetree/bindings/interrupt-controller/renesas,irqc.txt b/Documentation/devicetree/bindings/interrupt-controller/renesas,irqc.txt
index 63633bd..ae5054c 100644
--- a/Documentation/devicetree/bindings/interrupt-controller/renesas,irqc.txt
+++ b/Documentation/devicetree/bindings/interrupt-controller/renesas,irqc.txt
@@ -10,6 +10,7 @@ Required properties:
- "renesas,irqc-r8a7792" (R-Car V2H)
- "renesas,irqc-r8a7793" (R-Car M2-N)
- "renesas,irqc-r8a7794" (R-Car E2)
+ - "renesas,intc-ex-r8a7795" (R-Car H3)
- #interrupt-cells: has to be <2>: an interrupt index and flags, as defined in
interrupts.txt in this directory
- clocks: Must contain a reference to the functional clock.

Documentation/devicetree/bindings/pci/pci-msi.txt

View file
diff --git a/Documentation/devicetree/bindings/pci/pci-msi.txt b/Documentation/devicetree/bindings/pci/pci-msi.txt
new file mode 100644
index 0000000..9b3cc81
--- /dev/null
+++ b/Documentation/devicetree/bindings/pci/pci-msi.txt
@@ -0,0 +1,220 @@
+This document describes the generic device tree binding for describing the
+relationship between PCI devices and MSI controllers.
+
+Each PCI device under a root complex is uniquely identified by its Requester ID
+(AKA RID). A Requester ID is a triplet of a Bus number, Device number, and
+Function number.
+
+For the purpose of this document, when treated as a numeric value, a RID is
+formatted such that:
+
+* Bits [15:8] are the Bus number.
+* Bits [7:3] are the Device number.
+* Bits [2:0] are the Function number.
+* Any other bits required for padding must be zero.
+
+MSIs may be distinguished in part through the use of sideband data accompanying
+writes. In the case of PCI devices, this sideband data may be derived from the
+Requester ID. A mechanism is required to associate a device with both the MSI
+controllers it can address, and the sideband data that will be associated with
+its writes to those controllers.
+
+For generic MSI bindings, see
+Documentation/devicetree/bindings/interrupt-controller/msi.txt.
+
+
+PCI root complex
+================
+
+Optional properties
+-------------------
+
+- msi-map: Maps a Requester ID to an MSI controller and associated
+ msi-specifier data. The property is an arbitrary number of tuples of
+ (rid-base,msi-controller,msi-base,length), where:
+
+ * rid-base is a single cell describing the first RID matched by the entry.
+
+ * msi-controller is a single phandle to an MSI controller
+
+ * msi-base is an msi-specifier describing the msi-specifier produced for the
+ first RID matched by the entry.
+
+ * length is a single cell describing how many consecutive RIDs are matched
+ following the rid-base.
+
+ Any RID r in the interval [rid-base, rid-base + length) is associated with
+ the listed msi-controller, with the msi-specifier (r - rid-base + msi-base).
+
+- msi-map-mask: A mask to be applied to each Requester ID prior to being mapped
+ to an msi-specifier per the msi-map property.
+
+- msi-parent: Describes the MSI parent of the root complex itself. Where
+ the root complex and MSI controller do not pass sideband data with MSI
+ writes, this property may be used to describe the MSI controller(s)
+ used by PCI devices under the root complex, if defined as such in the
+ binding for the root complex.
+
+
+Example (1)
+===========
+
+/ {
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ msi: msi-controller@a {
+ reg = <0xa 0x1>;
+ compatible = "vendor,some-controller";
+ msi-controller;
+ #msi-cells = <1>;
+ };
+
+ pci: pci@f {
+ reg = <0xf 0x1>;
+ compatible = "vendor,pcie-root-complex";
+ device_type = "pci";
+
+ /*
+ * The sideband data provided to the MSI controller is
+ * the RID, identity-mapped.
+ */
+ msi-map = <0x0 &msi_a 0x0 0x10000>,
+ };
+};
+
+
+Example (2)
+===========
+
+/ {
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ msi: msi-controller@a {
+ reg = <0xa 0x1>;
+ compatible = "vendor,some-controller";
+ msi-controller;
+ #msi-cells = <1>;
+ };
+
+ pci: pci@f {
+ reg = <0xf 0x1>;
+ compatible = "vendor,pcie-root-complex";
+ device_type = "pci";
+
+ /*
+ * The sideband data provided to the MSI controller is
+ * the RID, masked to only the device and function bits.
+ */
+ msi-map = <0x0 &msi_a 0x0 0x100>,
+ msi-map-mask = <0xff>
+ };
+};
+
+
+Example (3)
+===========
+
+/ {
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ msi: msi-controller@a {
+ reg = <0xa 0x1>;
+ compatible = "vendor,some-controller";
+ msi-controller;
+ #msi-cells = <1>;
+ };
+
+ pci: pci@f {
+ reg = <0xf 0x1>;
+ compatible = "vendor,pcie-root-complex";
+ device_type = "pci";
+
+ /*
+ * The sideband data provided to the MSI controller is
+ * the RID, but the high bit of the bus number is
+ * ignored.
+ */
+ msi-map = <0x0000 &msi 0x0000 0x8000>,
+ <0x8000 &msi 0x0000 0x8000>;
+ };
+};
+
+
+Example (4)
+===========
+
+/ {
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ msi: msi-controller@a {
+ reg = <0xa 0x1>;
+ compatible = "vendor,some-controller";
+ msi-controller;
+ #msi-cells = <1>;
+ };
+
+ pci: pci@f {
+ reg = <0xf 0x1>;
+ compatible = "vendor,pcie-root-complex";
+ device_type = "pci";
+
+ /*
+ * The sideband data provided to the MSI controller is
+ * the RID, but the high bit of the bus number is
+ * negated.
+ */
+ msi-map = <0x0000 &msi 0x8000 0x8000>,
+ <0x8000 &msi 0x0000 0x8000>;
+ };
+};
+
+
+Example (5)
+===========
+
+/ {
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ msi_a: msi-controller@a {
+ reg = <0xa 0x1>;
+ compatible = "vendor,some-controller";
+ msi-controller;
+ #msi-cells = <1>;
+ };
+
+ msi_b: msi-controller@b {
+ reg = <0xb 0x1>;
+ compatible = "vendor,some-controller";
+ msi-controller;
+ #msi-cells = <1>;
+ };
+
+ msi_c: msi-controller@c {
+ reg = <0xc 0x1>;
+ compatible = "vendor,some-controller";
+ msi-controller;
+ #msi-cells = <1>;
+ };
+
+ pci: pci@c {
+ reg = <0xf 0x1>;
+ compatible = "vendor,pcie-root-complex";
+ device_type = "pci";
+
+ /*
+ * The sideband data provided to MSI controller a is the
+ * RID, but the high bit of the bus number is negated.
+ * The sideband data provided to MSI controller b is the
+ * RID, identity-mapped.
+ * MSI controller c is not addressable.
+ */
+ msi-map = <0x0000 &msi_a 0x8000 0x08000>,
+ <0x8000 &msi_a 0x0000 0x08000>,
+ <0x0000 &msi_b 0x0000 0x10000>;
+ };
+};

arch/arm/Kconfig

View file
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 823f90e..f1ed110 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -820,6 +820,7 @@ config ARCH_VIRT
bool "Dummy Virtual Machine" if ARCH_MULTI_V7
select ARM_AMBA
select ARM_GIC
+ select ARM_GIC_V3
select ARM_PSCI
select HAVE_ARM_ARCH_TIMER

arch/arm/include/asm/arch_gicv3.h

View file
diff --git a/arch/arm/include/asm/arch_gicv3.h b/arch/arm/include/asm/arch_gicv3.h
new file mode 100644
index 0000000..6607d97
--- /dev/null
+++ b/arch/arm/include/asm/arch_gicv3.h
@@ -0,0 +1,188 @@
+/*
+ * arch/arm/include/asm/arch_gicv3.h
+ *
+ * Copyright (C) 2015 ARM Ltd.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+#ifndef __ASM_ARCH_GICV3_H
+#define __ASM_ARCH_GICV3_H
+
+#ifndef __ASSEMBLY__
+
+#include <linux/io.h>
+
+#define __ACCESS_CP15(CRn, Op1, CRm, Op2) p15, Op1, %0, CRn, CRm, Op2
+#define __ACCESS_CP15_64(Op1, CRm) p15, Op1, %Q0, %R0, CRm
+
+#define ICC_EOIR1 __ACCESS_CP15(c12, 0, c12, 1)
+#define ICC_DIR __ACCESS_CP15(c12, 0, c11, 1)
+#define ICC_IAR1 __ACCESS_CP15(c12, 0, c12, 0)
+#define ICC_SGI1R __ACCESS_CP15_64(0, c12)
+#define ICC_PMR __ACCESS_CP15(c4, 0, c6, 0)
+#define ICC_CTLR __ACCESS_CP15(c12, 0, c12, 4)
+#define ICC_SRE __ACCESS_CP15(c12, 0, c12, 5)
+#define ICC_IGRPEN1 __ACCESS_CP15(c12, 0, c12, 7)
+
+#define ICC_HSRE __ACCESS_CP15(c12, 4, c9, 5)
+
+#define ICH_VSEIR __ACCESS_CP15(c12, 4, c9, 4)
+#define ICH_HCR __ACCESS_CP15(c12, 4, c11, 0)
+#define ICH_VTR __ACCESS_CP15(c12, 4, c11, 1)
+#define ICH_MISR __ACCESS_CP15(c12, 4, c11, 2)
+#define ICH_EISR __ACCESS_CP15(c12, 4, c11, 3)
+#define ICH_ELSR __ACCESS_CP15(c12, 4, c11, 5)
+#define ICH_VMCR __ACCESS_CP15(c12, 4, c11, 7)
+
+#define __LR0(x) __ACCESS_CP15(c12, 4, c12, x)
+#define __LR8(x) __ACCESS_CP15(c12, 4, c13, x)
+
+#define ICH_LR0 __LR0(0)
+#define ICH_LR1 __LR0(1)
+#define ICH_LR2 __LR0(2)
+#define ICH_LR3 __LR0(3)
+#define ICH_LR4 __LR0(4)
+#define ICH_LR5 __LR0(5)
+#define ICH_LR6 __LR0(6)
+#define ICH_LR7 __LR0(7)
+#define ICH_LR8 __LR8(0)
+#define ICH_LR9 __LR8(1)
+#define ICH_LR10 __LR8(2)
+#define ICH_LR11 __LR8(3)
+#define ICH_LR12 __LR8(4)
+#define ICH_LR13 __LR8(5)
+#define ICH_LR14 __LR8(6)
+#define ICH_LR15 __LR8(7)
+
+/* LR top half */
+#define __LRC0(x) __ACCESS_CP15(c12, 4, c14, x)
+#define __LRC8(x) __ACCESS_CP15(c12, 4, c15, x)
+
+#define ICH_LRC0 __LRC0(0)
+#define ICH_LRC1 __LRC0(1)
+#define ICH_LRC2 __LRC0(2)
+#define ICH_LRC3 __LRC0(3)
+#define ICH_LRC4 __LRC0(4)
+#define ICH_LRC5 __LRC0(5)
+#define ICH_LRC6 __LRC0(6)
+#define ICH_LRC7 __LRC0(7)
+#define ICH_LRC8 __LRC8(0)
+#define ICH_LRC9 __LRC8(1)
+#define ICH_LRC10 __LRC8(2)
+#define ICH_LRC11 __LRC8(3)
+#define ICH_LRC12 __LRC8(4)
+#define ICH_LRC13 __LRC8(5)
+#define ICH_LRC14 __LRC8(6)
+#define ICH_LRC15 __LRC8(7)
+
+#define __AP0Rx(x) __ACCESS_CP15(c12, 4, c8, x)
+#define ICH_AP0R0 __AP0Rx(0)
+#define ICH_AP0R1 __AP0Rx(1)
+#define ICH_AP0R2 __AP0Rx(2)
+#define ICH_AP0R3 __AP0Rx(3)
+
+#define __AP1Rx(x) __ACCESS_CP15(c12, 4, c9, x)
+#define ICH_AP1R0 __AP1Rx(0)
+#define ICH_AP1R1 __AP1Rx(1)
+#define ICH_AP1R2 __AP1Rx(2)
+#define ICH_AP1R3 __AP1Rx(3)
+
+/* Low-level accessors */
+
+static inline void gic_write_eoir(u32 irq)
+{
+ asm volatile("mcr " __stringify(ICC_EOIR1) : : "r" (irq));
+ isb();
+}
+
+static inline void gic_write_dir(u32 val)
+{
+ asm volatile("mcr " __stringify(ICC_DIR) : : "r" (val));
+ isb();
+}
+
+static inline u32 gic_read_iar(void)
+{
+ u32 irqstat;
+
+ asm volatile("mrc " __stringify(ICC_IAR1) : "=r" (irqstat));
+ return irqstat;
+}
+
+static inline void gic_write_pmr(u32 val)
+{
+ asm volatile("mcr " __stringify(ICC_PMR) : : "r" (val));
+}
+
+static inline void gic_write_ctlr(u32 val)
+{
+ asm volatile("mcr " __stringify(ICC_CTLR) : : "r" (val));
+ isb();
+}
+
+static inline void gic_write_grpen1(u32 val)
+{
+ asm volatile("mcr " __stringify(ICC_IGRPEN1) : : "r" (val));
+ isb();
+}
+
+static inline void gic_write_sgi1r(u64 val)
+{
+ asm volatile("mcrr " __stringify(ICC_SGI1R) : : "r" (val));
+}
+
+static inline u32 gic_read_sre(void)
+{
+ u32 val;
+
+ asm volatile("mrc " __stringify(ICC_SRE) : "=r" (val));
+ return val;
+}
+
+static inline void gic_write_sre(u32 val)
+{
+ asm volatile("mcr " __stringify(ICC_SRE) : : "r" (val));
+ isb();
+}
+
+/*
+ * Even in 32bit systems that use LPAE, there is no guarantee that the I/O
+ * interface provides true 64bit atomic accesses, so using strd/ldrd doesn't
+ * make much sense.
+ * Moreover, 64bit I/O emulation is extremely difficult to implement on
+ * AArch32, since the syndrome register doesn't provide any information for
+ * them.
+ * Consequently, the following IO helpers use 32bit accesses.
+ *
+ * There are only two registers that need 64bit accesses in this driver:
+ * - GICD_IROUTERn, contain the affinity values associated to each interrupt.
+ * The upper-word (aff3) will always be 0, so there is no need for a lock.
+ * - GICR_TYPER is an ID register and doesn't need atomicity.
+ */
+static inline void gic_write_irouter(u64 val, volatile void __iomem *addr)
+{
+ writel_relaxed((u32)val, addr);
+ writel_relaxed((u32)(val >> 32), addr + 4);
+}
+
+static inline u64 gic_read_typer(const volatile void __iomem *addr)
+{
+ u64 val;
+
+ val = readl_relaxed(addr);
+ val |= (u64)readl_relaxed(addr + 4) << 32;
+ return val;
+}
+
+#endif /* !__ASSEMBLY__ */
+#endif /* !__ASM_ARCH_GICV3_H */

arch/arm/mach-exynos/suspend.c

View file
diff --git a/arch/arm/mach-exynos/suspend.c b/arch/arm/mach-exynos/suspend.c
index e00eb39..5a7e47c 100644
--- a/arch/arm/mach-exynos/suspend.c
+++ b/arch/arm/mach-exynos/suspend.c
@@ -177,54 +177,57 @@ static struct irq_chip exynos_pmu_chip = {
#endif
};
-static int exynos_pmu_domain_xlate(struct irq_domain *domain,
- struct device_node *controller,
- const u32 *intspec,
- unsigned int intsize,
- unsigned long *out_hwirq,
- unsigned int *out_type)
+static int exynos_pmu_domain_translate(struct irq_domain *d,
+ struct irq_fwspec *fwspec,
+ unsigned long *hwirq,
+ unsigned int *type)
{
- if (domain->of_node != controller)
- return -EINVAL; /* Shouldn't happen, really... */
- if (intsize != 3)
- return -EINVAL; /* Not GIC compliant */
- if (intspec[0] != 0)
- return -EINVAL; /* No PPI should point to this domain */
+ if (is_of_node(fwspec->fwnode)) {
+ if (fwspec->param_count != 3)
+ return -EINVAL;
- *out_hwirq = intspec[1];
- *out_type = intspec[2];
- return 0;
+ /* No PPI should point to this domain */
+ if (fwspec->param[0] != 0)
+ return -EINVAL;
+
+ *hwirq = fwspec->param[1];
+ *type = fwspec->param[2];
+ return 0;
+ }
+
+ return -EINVAL;
}
static int exynos_pmu_domain_alloc(struct irq_domain *domain,
unsigned int virq,
unsigned int nr_irqs, void *data)
{
- struct of_phandle_args *args = data;
- struct of_phandle_args parent_args;
+ struct irq_fwspec *fwspec = data;
+ struct irq_fwspec parent_fwspec;
irq_hw_number_t hwirq;
int i;
- if (args->args_count != 3)
+ if (fwspec->param_count != 3)

This diff is incomplete. Download the complete patch.

arch/arm/mach-imx/gpc.c

View file

This diff is incomplete. Download the complete patch.

arch/arm/mach-omap2/omap-wakeupgen.c

View file

This diff is incomplete. Download the complete patch.

arch/arm64/Kconfig

View file

This diff is incomplete. Download the complete patch.

arch/arm64/include/asm/arch_gicv3.h

View file

This diff is incomplete. Download the complete patch.

arch/arm64/include/asm/cpufeature.h

View file

This diff is incomplete. Download the complete patch.

arch/arm64/include/asm/cputype.h

View file

This diff is incomplete. Download the complete patch.

arch/arm64/kernel/cpu_errata.c

View file

This diff is incomplete. Download the complete patch.

arch/arm64/kernel/cpufeature.c

View file

This diff is incomplete. Download the complete patch.

arch/arm64/kernel/head.S

View file

This diff is incomplete. Download the complete patch.

arch/arm64/kvm/Kconfig

View file

This diff is incomplete. Download the complete patch.

arch/c6x/platforms/megamod-pic.c

View file

This diff is incomplete. Download the complete patch.

arch/mips/cavium-octeon/octeon-irq.c

View file

This diff is incomplete. Download the complete patch.

arch/powerpc/platforms/cell/axon_msi.c

View file

This diff is incomplete. Download the complete patch.

arch/powerpc/platforms/cell/spider-pic.c

View file

This diff is incomplete. Download the complete patch.

arch/powerpc/platforms/pasemi/msi.c

View file

This diff is incomplete. Download the complete patch.

arch/powerpc/platforms/powernv/opal-irqchip.c

View file

This diff is incomplete. Download the complete patch.

arch/powerpc/sysdev/ehv_pic.c

View file

This diff is incomplete. Download the complete patch.

arch/powerpc/sysdev/fsl_msi.c

View file

This diff is incomplete. Download the complete patch.

arch/powerpc/sysdev/i8259.c

View file

This diff is incomplete. Download the complete patch.

arch/powerpc/sysdev/ipic.c

View file

This diff is incomplete. Download the complete patch.

arch/powerpc/sysdev/mpic.c

View file

This diff is incomplete. Download the complete patch.

arch/powerpc/sysdev/mpic_msi.c

View file

This diff is incomplete. Download the complete patch.

arch/powerpc/sysdev/qe_lib/qe_ic.c

View file

This diff is incomplete. Download the complete patch.

drivers/acpi/gsi.c

View file

This diff is incomplete. Download the complete patch.

drivers/base/platform-msi.c

View file

This diff is incomplete. Download the complete patch.

drivers/gpio/gpio-sodaville.c

View file

This diff is incomplete. Download the complete patch.

drivers/irqchip/Kconfig

View file

This diff is incomplete. Download the complete patch.

drivers/irqchip/Makefile

View file

This diff is incomplete. Download the complete patch.

drivers/irqchip/alphascale_asm9260-icoll.h

View file

This diff is incomplete. Download the complete patch.

drivers/irqchip/exynos-combiner.c

View file

This diff is incomplete. Download the complete patch.

drivers/irqchip/irq-atmel-aic-common.c

View file

This diff is incomplete. Download the complete patch.

drivers/irqchip/irq-atmel-aic5.c

View file

This diff is incomplete. Download the complete patch.

drivers/irqchip/irq-crossbar.c

View file

This diff is incomplete. Download the complete patch.

drivers/irqchip/irq-gic-common.c

View file

This diff is incomplete. Download the complete patch.

drivers/irqchip/irq-gic-common.h

View file

This diff is incomplete. Download the complete patch.

drivers/irqchip/irq-gic-v2m.c

View file

This diff is incomplete. Download the complete patch.

drivers/irqchip/irq-gic-v3-its-pci-msi.c

View file

This diff is incomplete. Download the complete patch.

drivers/irqchip/irq-gic-v3-its-platform-msi.c

View file

This diff is incomplete. Download the complete patch.

drivers/irqchip/irq-gic-v3-its.c

View file

This diff is incomplete. Download the complete patch.

drivers/irqchip/irq-gic-v3.c

View file

This diff is incomplete. Download the complete patch.

drivers/irqchip/irq-gic.c

View file

This diff is incomplete. Download the complete patch.

drivers/irqchip/irq-hip04.c

View file

This diff is incomplete. Download the complete patch.

drivers/irqchip/irq-i8259.c

View file

This diff is incomplete. Download the complete patch.

drivers/irqchip/irq-imx-gpcv2.c

View file

This diff is incomplete. Download the complete patch.

drivers/irqchip/irq-mtk-sysirq.c

View file

This diff is incomplete. Download the complete patch.

drivers/irqchip/irq-mxs.c

View file

This diff is incomplete. Download the complete patch.

drivers/irqchip/irq-nvic.c

View file

This diff is incomplete. Download the complete patch.

drivers/irqchip/irq-renesas-intc-irqpin.c

View file

This diff is incomplete. Download the complete patch.

drivers/irqchip/irq-renesas-irqc.c

View file

This diff is incomplete. Download the complete patch.

drivers/irqchip/irq-s3c24xx.c

View file

This diff is incomplete. Download the complete patch.

drivers/irqchip/irq-sunxi-nmi.c

View file

This diff is incomplete. Download the complete patch.

drivers/irqchip/irq-tegra.c

View file

This diff is incomplete. Download the complete patch.

drivers/irqchip/irq-vf610-mscm-ir.c

View file

This diff is incomplete. Download the complete patch.

drivers/of/irq.c

View file

This diff is incomplete. Download the complete patch.

drivers/pci/host/pci-xgene-msi.c

View file

This diff is incomplete. Download the complete patch.

drivers/pci/msi.c

View file

This diff is incomplete. Download the complete patch.

drivers/pci/of.c

View file

This diff is incomplete. Download the complete patch.

drivers/pci/probe.c

View file

This diff is incomplete. Download the complete patch.

drivers/spmi/spmi-pmic-arb.c

View file

This diff is incomplete. Download the complete patch.

include/kvm/arm_vgic.h

View file

This diff is incomplete. Download the complete patch.

include/linux/acpi.h

View file

This diff is incomplete. Download the complete patch.

include/linux/fwnode.h

View file

This diff is incomplete. Download the complete patch.

include/linux/interrupt.h

View file

This diff is incomplete. Download the complete patch.

include/linux/irq.h

View file

This diff is incomplete. Download the complete patch.

include/linux/irqchip/arm-gic-v3.h

View file

This diff is incomplete. Download the complete patch.

include/linux/irqchip/arm-gic.h

View file

This diff is incomplete. Download the complete patch.

include/linux/irqdomain.h

View file

This diff is incomplete. Download the complete patch.

include/linux/irqreturn.h

View file

This diff is incomplete. Download the complete patch.

include/linux/msi.h

View file

This diff is incomplete. Download the complete patch.

include/linux/of_irq.h

View file

This diff is incomplete. Download the complete patch.

kernel/irq/Kconfig

View file

This diff is incomplete. Download the complete patch.

kernel/irq/Makefile

View file

This diff is incomplete. Download the complete patch.

kernel/irq/chip.c

View file

This diff is incomplete. Download the complete patch.

kernel/irq/cpuhotplug.c

View file

This diff is incomplete. Download the complete patch.

kernel/irq/handle.c

View file

This diff is incomplete. Download the complete patch.

kernel/irq/internals.h

View file

This diff is incomplete. Download the complete patch.

kernel/irq/irqdomain.c

View file

This diff is incomplete. Download the complete patch.

kernel/irq/manage.c

View file

This diff is incomplete. Download the complete patch.

kernel/irq/msi.c

View file

This diff is incomplete. Download the complete patch.

kernel/irq/proc.c

View file

This diff is incomplete. Download the complete patch.

kernel/irq/settings.h

View file

This diff is incomplete. Download the complete patch.

virt/kvm/arm/vgic.c

View file

This diff is incomplete. Download the complete patch.