Merge branch 'irq-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
authorLinus Torvalds <torvalds@linux-foundation.org>
Mon, 8 Jul 2019 18:01:13 +0000 (11:01 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Mon, 8 Jul 2019 18:01:13 +0000 (11:01 -0700)
Pull irq updates from Thomas Gleixner:
 "The irq departement provides the usual mixed bag:

  Core:

   - Further improvements to the irq timings code which aims to predict
     the next interrupt for power state selection to achieve better
     latency/power balance

   - Add interrupt statistics to the core NMI handlers

   - The usual small fixes and cleanups

  Drivers:

   - Support for Renesas RZ/A1, Annapurna Labs FIC, Meson-G12A SoC and
     Amazon Gravition AMR/GIC interrupt controllers.

   - Rework of the Renesas INTC controller driver

   - ACPI support for Socionext SoCs

   - Enhancements to the CSKY interrupt controller

   - The usual small fixes and cleanups"

* 'irq-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (39 commits)
  irq/irqdomain: Fix comment typo
  genirq: Update irq stats from NMI handlers
  irqchip/gic-pm: Remove PM_CLK dependency
  irqchip/al-fic: Introduce Amazon's Annapurna Labs Fabric Interrupt Controller Driver
  dt-bindings: interrupt-controller: Add Amazon's Annapurna Labs FIC
  softirq: Use __this_cpu_write() in takeover_tasklets()
  irqchip/mbigen: Stop printing kernel addresses
  irqchip/gic: Add dependency for ARM_GIC_MAX_NR
  genirq/affinity: Remove unused argument from [__]irq_build_affinity_masks()
  genirq/timings: Add selftest for next event computation
  genirq/timings: Add selftest for irqs circular buffer
  genirq/timings: Add selftest for circular array
  genirq/timings: Encapsulate storing function
  genirq/timings: Encapsulate timings push
  genirq/timings: Optimize the period detection speed
  genirq/timings: Fix timings buffer inspection
  genirq/timings: Fix next event index function
  irqchip/qcom: Use struct_size() in devm_kzalloc()
  irqchip/irq-csky-mpintc: Remove unnecessary loop in interrupt handler
  dt-bindings: interrupt-controller: Update csky mpintc
  ...

16 files changed:
1  2 
MAINTAINERS
drivers/acpi/irq.c
drivers/gpio/gpio-mb86s7x.c
drivers/irqchip/irq-csky-mpintc.c
drivers/irqchip/irq-gic-v2m.c
drivers/irqchip/irq-gic-v3.c
drivers/irqchip/irq-mbigen.c
drivers/irqchip/irq-meson-gpio.c
drivers/irqchip/irq-sni-exiu.c
drivers/irqchip/qcom-irq-combiner.c
include/linux/acpi.h
include/linux/irqchip/arm-gic-common.h
include/linux/irqchip/arm-gic.h
kernel/irq/irqdesc.c
kernel/softirq.c
lib/Kconfig.debug

diff --combined MAINTAINERS
@@@ -364,7 -364,7 +364,7 @@@ F: drivers/acpi/fan.
  
  ACPI FOR ARM64 (ACPI/arm64)
  M:    Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
 -M:    Hanjun Guo <hanjun.guo@linaro.org>
 +M:    Hanjun Guo <guohanjun@huawei.com>
  M:    Sudeep Holla <sudeep.holla@arm.com>
  L:    linux-acpi@vger.kernel.org
  L:    linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
@@@ -696,7 -696,6 +696,7 @@@ F: drivers/input/mouse/alps.
  ALTERA I2C CONTROLLER DRIVER
  M:    Thor Thayer <thor.thayer@linux.intel.com>
  S:    Maintained
 +F:    Documentation/devicetree/bindings/i2c/i2c-altera.txt
  F:    drivers/i2c/busses/i2c-altera.c
  
  ALTERA MAILBOX DRIVER
@@@ -1175,7 -1174,6 +1175,7 @@@ S:      Maintaine
  F:    Documentation/devicetree/bindings/arm/arm-boards
  F:    Documentation/devicetree/bindings/auxdisplay/arm-charlcd.txt
  F:    Documentation/devicetree/bindings/clock/arm-integrator.txt
 +F:    Documentation/devicetree/bindings/i2c/i2c-versatile.txt
  F:    Documentation/devicetree/bindings/interrupt-controller/arm,versatile-fpga-irq.txt
  F:    Documentation/devicetree/bindings/mtd/arm-versatile.txt
  F:    arch/arm/mach-integrator/
@@@ -1235,7 -1233,7 +1235,7 @@@ F:      arch/arm/lib/floppydma.
  F:    arch/arm/include/asm/floppy.h
  
  ARM PMU PROFILING AND DEBUGGING
 -M:    Will Deacon <will.deacon@arm.com>
 +M:    Will Deacon <will@kernel.org>
  M:    Mark Rutland <mark.rutland@arm.com>
  S:    Maintained
  L:    linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
@@@ -1306,8 -1304,14 +1306,14 @@@ S:    Maintaine
  F:    Documentation/devicetree/bindings/interrupt-controller/arm,vic.txt
  F:    drivers/irqchip/irq-vic.c
  
+ AMAZON ANNAPURNA LABS FIC DRIVER
+ M:    Talel Shenhar <talel@amazon.com>
+ S:    Maintained
+ F:    Documentation/devicetree/bindings/interrupt-controller/amazon,al-fic.txt
+ F:    drivers/irqchip/irq-al-fic.c
  ARM SMMU DRIVERS
 -M:    Will Deacon <will.deacon@arm.com>
 +M:    Will Deacon <will@kernel.org>
  R:    Robin Murphy <robin.murphy@arm.com>
  L:    linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
  S:    Maintained
@@@ -1783,7 -1787,6 +1789,7 @@@ ARM/LPC18XX ARCHITECTUR
  M:    Vladimir Zapolskiy <vz@mleia.com>
  L:    linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
  S:    Maintained
 +F:    Documentation/devicetree/bindings/i2c/i2c-lpc2k.txt
  F:    arch/arm/boot/dts/lpc43*
  F:    drivers/i2c/busses/i2c-lpc2k.c
  F:    drivers/memory/pl172.c
@@@ -1797,7 -1800,6 +1803,7 @@@ M:      Sylvain Lemieux <slemieux.tyco@gmail
  L:    linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
  T:    git git://github.com/vzapolskiy/linux-lpc32xx.git
  S:    Maintained
 +F:    Documentation/devicetree/bindings/i2c/i2c-pnx.txt
  F:    arch/arm/boot/dts/lpc32*
  F:    arch/arm/mach-lpc32xx/
  F:    drivers/i2c/busses/i2c-pnx.c
@@@ -1922,8 -1924,6 +1928,8 @@@ ARM/NOMADIK/U300/Ux500 ARCHITECTURE
  M:    Linus Walleij <linus.walleij@linaro.org>
  L:    linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
  S:    Maintained
 +F:    Documentation/devicetree/bindings/i2c/i2c-nomadik.txt
 +F:    Documentation/devicetree/bindings/i2c/i2c-stu300.txt
  F:    arch/arm/mach-nomadik/
  F:    arch/arm/mach-u300/
  F:    arch/arm/mach-ux500/
@@@ -2085,7 -2085,7 +2091,7 @@@ F:      drivers/tty/serial/msm_serial.
  F:    drivers/usb/dwc3/dwc3-qcom.c
  F:    include/dt-bindings/*/qcom*
  F:    include/linux/*/qcom*
 -T:    git git://git.kernel.org/pub/scm/linux/kernel/git/agross/linux.git
 +T:    git git://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux.git
  
  ARM/RADISYS ENP2611 MACHINE SUPPORT
  M:    Lennert Buytenhek <kernel@wantstofly.org>
@@@ -2146,7 -2146,6 +2152,7 @@@ L:      linux-arm-kernel@lists.infradead.or
  L:    linux-rockchip@lists.infradead.org
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip.git
  S:    Maintained
 +F:    Documentation/devicetree/bindings/i2c/i2c-rk3x.txt
  F:    arch/arm/boot/dts/rk3*
  F:    arch/arm/boot/dts/rv1108*
  F:    arch/arm/mach-rockchip/
@@@ -2282,7 -2281,6 +2288,7 @@@ M:      Patrice Chotard <patrice.chotard@st.
  L:    linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
  W:    http://www.stlinux.com
  S:    Maintained
 +F:    Documentation/devicetree/bindings/i2c/i2c-st.txt
  F:    arch/arm/mach-sti/
  F:    arch/arm/boot/dts/sti*
  F:    drivers/char/hw_random/st-rng.c
@@@ -2474,7 -2472,6 +2480,7 @@@ ARM/VT8500 ARM ARCHITECTUR
  M:    Tony Prisk <linux@prisktech.co.nz>
  L:    linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
  S:    Maintained
 +F:    Documentation/devicetree/bindings/i2c/i2c-wmt.txt
  F:    arch/arm/mach-vt8500/
  F:    drivers/clocksource/timer-vt8500.c
  F:    drivers/i2c/busses/i2c-wmt.c
@@@ -2540,8 -2537,6 +2546,8 @@@ F:      drivers/cpuidle/cpuidle-zynq.
  F:    drivers/block/xsysace.c
  N:    zynq
  N:    xilinx
 +F:    Documentation/devicetree/bindings/i2c/i2c-cadence.txt
 +F:    Documentation/devicetree/bindings/i2c/i2c-xiic.txt
  F:    drivers/clocksource/timer-cadence-ttc.c
  F:    drivers/i2c/busses/i2c-cadence.c
  F:    drivers/mmc/host/sdhci-of-arasan.c
@@@ -2550,7 -2545,7 +2556,7 @@@ F:      drivers/i2c/busses/i2c-xiic.
  
  ARM64 PORT (AARCH64 ARCHITECTURE)
  M:    Catalin Marinas <catalin.marinas@arm.com>
 -M:    Will Deacon <will.deacon@arm.com>
 +M:    Will Deacon <will@kernel.org>
  L:    linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git
  S:    Maintained
@@@ -2734,7 -2729,7 +2740,7 @@@ S:      Maintaine
  F:    drivers/net/wireless/atmel/atmel*
  
  ATOMIC INFRASTRUCTURE
 -M:    Will Deacon <will.deacon@arm.com>
 +M:    Will Deacon <will@kernel.org>
  M:    Peter Zijlstra <peterz@infradead.org>
  R:    Boqun Feng <boqun.feng@gmail.com>
  L:    linux-kernel@vger.kernel.org
@@@ -3060,9 -3055,8 +3066,9 @@@ S:      Maintaine
  F:    arch/riscv/net/
  
  BPF JIT for S390
 -M:    Martin Schwidefsky <schwidefsky@de.ibm.com>
  M:    Heiko Carstens <heiko.carstens@de.ibm.com>
 +M:    Vasily Gorbik <gor@linux.ibm.com>
 +M:    Christian Borntraeger <borntraeger@de.ibm.com>
  L:    netdev@vger.kernel.org
  L:    bpf@vger.kernel.org
  S:    Maintained
@@@ -3121,8 -3115,7 +3127,8 @@@ F:      arch/arm/mach-bcm
  
  BROADCOM BCM2835 ARM ARCHITECTURE
  M:    Eric Anholt <eric@anholt.net>
 -M:    Stefan Wahren <stefan.wahren@i2se.com>
 +M:    Stefan Wahren <wahrenst@gmx.net>
 +L:    bcm-kernel-feedback-list@broadcom.com
  L:    linux-rpi-kernel@lists.infradead.org (moderated for non-subscribers)
  L:    linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
  T:    git git://github.com/anholt/linux
@@@ -3152,7 -3145,6 +3158,7 @@@ F:      arch/arm/boot/dts/bcm953012
  
  BROADCOM BCM53573 ARM ARCHITECTURE
  M:    Rafał Miłecki <rafal@milecki.pl>
 +L:    bcm-kernel-feedback-list@broadcom.com
  L:    linux-arm-kernel@lists.infradead.org
  S:    Maintained
  F:    arch/arm/boot/dts/bcm53573*
@@@ -3942,14 -3934,6 +3948,14 @@@ M:    Miguel Ojeda <miguel.ojeda.sandonis@
  S:    Maintained
  F:    .clang-format
  
 +CLANG/LLVM BUILD SUPPORT
 +L:    clang-built-linux@googlegroups.com
 +W:    https://clangbuiltlinux.github.io/
 +B:    https://github.com/ClangBuiltLinux/linux/issues
 +C:    irc://chat.freenode.net/clangbuiltlinux
 +S:    Supported
 +K:    \b(?i:clang|llvm)\b
 +
  CLEANCACHE API
  M:    Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
  L:    linux-kernel@vger.kernel.org
@@@ -6244,6 -6228,7 +6250,6 @@@ F:      include/linux/ipmi-fru.
  K:    fmc_d.*register
  
  FPGA MANAGER FRAMEWORK
 -M:    Alan Tull <atull@kernel.org>
  M:    Moritz Fischer <mdf@kernel.org>
  L:    linux-fpga@vger.kernel.org
  S:    Maintained
@@@ -6337,13 -6322,6 +6343,13 @@@ L:    linux-i2c@vger.kernel.or
  S:    Maintained
  F:    drivers/i2c/busses/i2c-cpm.c
  
 +FREESCALE IMX DDR PMU DRIVER
 +M:    Frank Li <Frank.li@nxp.com>
 +L:    linux-arm-kernel@lists.infradead.org
 +S:    Maintained
 +F:    drivers/perf/fsl_imx8_ddr_perf.c
 +F:    Documentation/devicetree/bindings/perf/fsl-imx-ddr.txt
 +
  FREESCALE IMX LPI2C DRIVER
  M:    Dong Aisheng <aisheng.dong@nxp.com>
  L:    linux-i2c@vger.kernel.org
@@@ -7369,7 -7347,6 +7375,7 @@@ I2C MV64XXX MARVELL AND ALLWINNER DRIVE
  M:    Gregory CLEMENT <gregory.clement@bootlin.com>
  L:    linux-i2c@vger.kernel.org
  S:    Maintained
 +F:    Documentation/devicetree/bindings/i2c/i2c-mv64xxx.txt
  F:    drivers/i2c/busses/i2c-mv64xxx.c
  
  I2C OVER PARALLEL PORT
@@@ -7817,7 -7794,7 +7823,7 @@@ INGENIC JZ4780 NAND DRIVE
  M:    Harvey Hunt <harveyhuntnexus@gmail.com>
  L:    linux-mtd@lists.infradead.org
  S:    Maintained
 -F:    drivers/mtd/nand/raw/jz4780_*
 +F:    drivers/mtd/nand/raw/ingenic/
  
  INOTIFY
  M:    Jan Kara <jack@suse.cz>
@@@ -8582,7 -8559,7 +8588,7 @@@ S:      Odd Fixe
  
  KERNEL NFSD, SUNRPC, AND LOCKD SERVERS
  M:    "J. Bruce Fields" <bfields@fieldses.org>
 -M:    Jeff Layton <jlayton@kernel.org>
 +M:    Chuck Lever <chuck.lever@oracle.com>
  L:    linux-nfs@vger.kernel.org
  W:    http://nfs.sourceforge.net/
  T:    git git://linux-nfs.org/~bfields/linux.git
@@@ -9137,7 -9114,7 +9143,7 @@@ F:      drivers/misc/lkdtm/
  LINUX KERNEL MEMORY CONSISTENCY MODEL (LKMM)
  M:    Alan Stern <stern@rowland.harvard.edu>
  M:    Andrea Parri <andrea.parri@amarulasolutions.com>
 -M:    Will Deacon <will.deacon@arm.com>
 +M:    Will Deacon <will@kernel.org>
  M:    Peter Zijlstra <peterz@infradead.org>
  M:    Boqun Feng <boqun.feng@gmail.com>
  M:    Nicholas Piggin <npiggin@gmail.com>
@@@ -9245,7 -9222,7 +9251,7 @@@ F:      Documentation/admin-guide/LSM/LoadPi
  LOCKING PRIMITIVES
  M:    Peter Zijlstra <peterz@infradead.org>
  M:    Ingo Molnar <mingo@redhat.com>
 -M:    Will Deacon <will.deacon@arm.com>
 +M:    Will Deacon <will@kernel.org>
  L:    linux-kernel@vger.kernel.org
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git locking/core
  S:    Maintained
@@@ -10566,7 -10543,7 +10572,7 @@@ F:   arch/arm/boot/dts/mmp
  F:    arch/arm/mach-mmp/
  
  MMU GATHER AND TLB INVALIDATION
 -M:    Will Deacon <will.deacon@arm.com>
 +M:    Will Deacon <will@kernel.org>
  M:    "Aneesh Kumar K.V" <aneesh.kumar@linux.ibm.com>
  M:    Andrew Morton <akpm@linux-foundation.org>
  M:    Nick Piggin <npiggin@gmail.com>
@@@ -11753,7 -11730,6 +11759,7 @@@ M:   Peter Korsgaard <peter@korsgaard.com
  M:    Andrew Lunn <andrew@lunn.ch>
  L:    linux-i2c@vger.kernel.org
  S:    Maintained
 +F:    Documentation/devicetree/bindings/i2c/i2c-ocores.txt
  F:    Documentation/i2c/busses/i2c-ocores
  F:    drivers/i2c/busses/i2c-ocores.c
  F:    include/linux/platform_data/i2c-ocores.h
@@@ -12055,7 -12031,7 +12061,7 @@@ S:   Maintaine
  F:    drivers/pci/controller/dwc/*layerscape*
  
  PCI DRIVER FOR GENERIC OF HOSTS
 -M:    Will Deacon <will.deacon@arm.com>
 +M:    Will Deacon <will@kernel.org>
  L:    linux-pci@vger.kernel.org
  L:    linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
  S:    Maintained
@@@ -13073,6 -13049,7 +13079,6 @@@ F:   Documentation/devicetree/bindings/ne
  
  QUALCOMM GENERIC INTERFACE I2C DRIVER
  M:    Alok Chauhan <alokc@codeaurora.org>
 -M:    Karthikeyan Ramasubramanian <kramasub@codeaurora.org>
  L:    linux-i2c@vger.kernel.org
  L:    linux-arm-msm@vger.kernel.org
  S:    Supported
@@@ -13392,7 -13369,6 +13398,7 @@@ F:   drivers/clk/renesas
  RENESAS EMEV2 I2C DRIVER
  M:    Wolfram Sang <wsa+renesas@sang-engineering.com>
  S:    Supported
 +F:    Documentation/devicetree/bindings/i2c/i2c-emev2.txt
  F:    drivers/i2c/busses/i2c-emev2.c
  
  RENESAS ETHERNET DRIVERS
@@@ -13414,8 -13390,6 +13420,8 @@@ F:   drivers/iio/adc/rcar-gyroadc.
  RENESAS R-CAR I2C DRIVERS
  M:    Wolfram Sang <wsa+renesas@sang-engineering.com>
  S:    Supported
 +F:    Documentation/devicetree/bindings/i2c/i2c-rcar.txt
 +F:    Documentation/devicetree/bindings/i2c/i2c-sh_mobile.txt
  F:    drivers/i2c/busses/i2c-rcar.c
  F:    drivers/i2c/busses/i2c-sh_mobile.c
  
@@@ -13646,9 -13620,8 +13652,9 @@@ S:   Maintaine
  F:    drivers/video/fbdev/savage/
  
  S390
 -M:    Martin Schwidefsky <schwidefsky@de.ibm.com>
  M:    Heiko Carstens <heiko.carstens@de.ibm.com>
 +M:    Vasily Gorbik <gor@linux.ibm.com>
 +M:    Christian Borntraeger <borntraeger@de.ibm.com>
  L:    linux-s390@vger.kernel.org
  W:    http://www.ibm.com/developerworks/linux/linux390/
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux.git
@@@ -13718,7 -13691,7 +13724,7 @@@ L:   linux-s390@vger.kernel.or
  L:    kvm@vger.kernel.org
  S:    Supported
  F:    drivers/s390/cio/vfio_ccw*
 -F:    Documentation/s390/vfio-ccw.txt
 +F:    Documentation/s390/vfio-ccw.rst
  F:    include/uapi/linux/vfio_ccw.h
  
  S390 ZCRYPT DRIVER
@@@ -13738,7 -13711,7 +13744,7 @@@ S:   Supporte
  F:    drivers/s390/crypto/vfio_ap_drv.c
  F:    drivers/s390/crypto/vfio_ap_private.h
  F:    drivers/s390/crypto/vfio_ap_ops.c
 -F:    Documentation/s390/vfio-ap.txt
 +F:    Documentation/s390/vfio-ap.rst
  
  S390 ZFCP DRIVER
  M:    Steffen Maier <maier@linux.ibm.com>
@@@ -14351,15 -14324,6 +14357,15 @@@ S: Supporte
  K:    sifive
  N:    sifive
  
 +SIFIVE FU540 SYSTEM-ON-CHIP
 +M:    Paul Walmsley <paul.walmsley@sifive.com>
 +M:    Palmer Dabbelt <palmer@sifive.com>
 +L:    linux-riscv@lists.infradead.org
 +T:    git git://git.kernel.org/pub/scm/linux/kernel/git/pjw/sifive.git
 +S:    Supported
 +K:    fu540
 +N:    fu540
 +
  SILEAD TOUCHSCREEN DRIVER
  M:    Hans de Goede <hdegoede@redhat.com>
  L:    linux-input@vger.kernel.org
@@@ -14420,7 -14384,7 +14426,7 @@@ F:   lib/test_siphash.
  F:    include/linux/siphash.h
  
  SIOX
 -M:    Gavin Schenk <g.schenk@eckelmann.de>
 +M:    Thorsten Scherer <t.scherer@eckelmann.de>
  M:    Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
  R:    Pengutronix Kernel Team <kernel@pengutronix.de>
  S:    Supported
@@@ -15019,7 -14983,7 +15025,7 @@@ S:   Odd Fixe
  F:    drivers/net/ethernet/adaptec/starfire*
  
  STEC S1220 SKD DRIVER
 -M:    Bart Van Assche <bart.vanassche@wdc.com>
 +M:    Damien Le Moal <Damien.LeMoal@wdc.com>
  L:    linux-block@vger.kernel.org
  S:    Maintained
  F:    drivers/block/skd*[ch]
@@@ -15510,7 -15474,6 +15516,7 @@@ F:   drivers/dma/tegra
  
  TEGRA I2C DRIVER
  M:    Laxman Dewangan <ldewangan@nvidia.com>
 +R:    Dmitry Osipenko <digetx@gmail.com>
  S:    Supported
  F:    drivers/i2c/busses/i2c-tegra.c
  
@@@ -15715,7 -15678,6 +15721,7 @@@ R:   Bartosz Golaszewski <bgolaszewski@ba
  L:    linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/nsekhar/linux-davinci.git
  S:    Supported
 +F:    Documentation/devicetree/bindings/i2c/i2c-davinci.txt
  F:    arch/arm/mach-davinci/
  F:    drivers/i2c/busses/i2c-davinci.c
  F:    arch/arm/boot/dts/da850*
@@@ -17337,7 -17299,7 +17343,7 @@@ F:   Documentation/ABI/stable/sysfs-hyper
  F:    Documentation/ABI/testing/sysfs-hypervisor-xen
  
  XEN NETWORK BACKEND DRIVER
 -M:    Wei Liu <wei.liu2@citrix.com>
 +M:    Wei Liu <wei.liu@kernel.org>
  M:    Paul Durrant <paul.durrant@citrix.com>
  L:    xen-devel@lists.xenproject.org (moderated for non-subscribers)
  L:    netdev@vger.kernel.org
@@@ -17419,7 -17381,6 +17425,7 @@@ M:   Jan Glauber <jglauber@cavium.com
  L:    linux-i2c@vger.kernel.org
  W:    http://www.cavium.com
  S:    Supported
 +F:    Documentation/devicetree/bindings/i2c/i2c-xlp9xx.txt
  F:    drivers/i2c/busses/i2c-xlp9xx.c
  
  XRA1403 GPIO EXPANDER
diff --combined drivers/acpi/irq.c
@@@ -1,9 -1,12 +1,9 @@@
 +// SPDX-License-Identifier: GPL-2.0-only
  /*
   * ACPI GSI IRQ layer
   *
   * Copyright (C) 2015 ARM Ltd.
   * Author: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
 - *
 - * 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.
   */
  #include <linux/acpi.h>
  #include <linux/irq.h>
@@@ -292,3 -295,29 +292,29 @@@ void __init acpi_set_irq_model(enum acp
        acpi_irq_model = model;
        acpi_gsi_domain_id = fwnode;
  }
+ /**
+  * acpi_irq_create_hierarchy - Create a hierarchical IRQ domain with the default
+  *                             GSI domain as its parent.
+  * @flags:      Irq domain flags associated with the domain
+  * @size:       Size of the domain.
+  * @fwnode:     Optional fwnode of the interrupt controller
+  * @ops:        Pointer to the interrupt domain callbacks
+  * @host_data:  Controller private data pointer
+  */
+ struct irq_domain *acpi_irq_create_hierarchy(unsigned int flags,
+                                            unsigned int size,
+                                            struct fwnode_handle *fwnode,
+                                            const struct irq_domain_ops *ops,
+                                            void *host_data)
+ {
+       struct irq_domain *d = irq_find_matching_fwnode(acpi_gsi_domain_id,
+                                                       DOMAIN_BUS_ANY);
+       if (!d)
+               return NULL;
+       return irq_domain_create_hierarchy(d, flags, size, fwnode, ops,
+                                          host_data);
+ }
+ EXPORT_SYMBOL_GPL(acpi_irq_create_hierarchy);
@@@ -1,11 -1,20 +1,12 @@@
 +// SPDX-License-Identifier: GPL-2.0-only
  /*
   *  linux/drivers/gpio/gpio-mb86s7x.c
   *
   *  Copyright (C) 2015 Fujitsu Semiconductor Limited
   *  Copyright (C) 2015 Linaro Ltd.
 - *
 - *  This program is free software: you can redistribute it and/or modify
 - *  it under the terms of the GNU General Public License as published by
 - *  the Free Software Foundation, version 2 of the License.
 - *
 - *  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.
   */
  
+ #include <linux/acpi.h>
  #include <linux/io.h>
  #include <linux/init.h>
  #include <linux/clk.h>
@@@ -19,6 -28,8 +20,8 @@@
  #include <linux/spinlock.h>
  #include <linux/slab.h>
  
+ #include "gpiolib.h"
  /*
   * Only first 8bits of a register correspond to each pin,
   * so there are 4 registers for 32 pins.
@@@ -135,6 -146,20 +138,20 @@@ static void mb86s70_gpio_set(struct gpi
        spin_unlock_irqrestore(&gchip->lock, flags);
  }
  
+ static int mb86s70_gpio_to_irq(struct gpio_chip *gc, unsigned int offset)
+ {
+       int irq, index;
+       for (index = 0;; index++) {
+               irq = platform_get_irq(to_platform_device(gc->parent), index);
+               if (irq <= 0)
+                       break;
+               if (irq_get_irq_data(irq)->hwirq == offset)
+                       return irq;
+       }
+       return -EINVAL;
+ }
  static int mb86s70_gpio_probe(struct platform_device *pdev)
  {
        struct mb86s70_gpio_chip *gchip;
        if (IS_ERR(gchip->base))
                return PTR_ERR(gchip->base);
  
-       gchip->clk = devm_clk_get(&pdev->dev, NULL);
-       if (IS_ERR(gchip->clk))
-               return PTR_ERR(gchip->clk);
+       if (!has_acpi_companion(&pdev->dev)) {
+               gchip->clk = devm_clk_get(&pdev->dev, NULL);
+               if (IS_ERR(gchip->clk))
+                       return PTR_ERR(gchip->clk);
  
-       ret = clk_prepare_enable(gchip->clk);
-       if (ret)
-               return ret;
+               ret = clk_prepare_enable(gchip->clk);
+               if (ret)
+                       return ret;
+       }
  
        spin_lock_init(&gchip->lock);
  
        gchip->gc.parent = &pdev->dev;
        gchip->gc.base = -1;
  
+       if (has_acpi_companion(&pdev->dev))
+               gchip->gc.to_irq = mb86s70_gpio_to_irq;
        ret = gpiochip_add_data(&gchip->gc, gchip);
        if (ret) {
                dev_err(&pdev->dev, "couldn't register gpio driver\n");
                clk_disable_unprepare(gchip->clk);
+               return ret;
        }
  
-       return ret;
+       if (has_acpi_companion(&pdev->dev))
+               acpi_gpiochip_request_interrupts(&gchip->gc);
+       return 0;
  }
  
  static int mb86s70_gpio_remove(struct platform_device *pdev)
  {
        struct mb86s70_gpio_chip *gchip = platform_get_drvdata(pdev);
  
+       if (has_acpi_companion(&pdev->dev))
+               acpi_gpiochip_free_interrupts(&gchip->gc);
        gpiochip_remove(&gchip->gc);
        clk_disable_unprepare(gchip->clk);
  
@@@ -197,10 -233,19 +225,19 @@@ static const struct of_device_id mb86s7
  };
  MODULE_DEVICE_TABLE(of, mb86s70_gpio_dt_ids);
  
+ #ifdef CONFIG_ACPI
+ static const struct acpi_device_id mb86s70_gpio_acpi_ids[] = {
+       { "SCX0007" },
+       { /* sentinel */ }
+ };
+ MODULE_DEVICE_TABLE(acpi, mb86s70_gpio_acpi_ids);
+ #endif
  static struct platform_driver mb86s70_gpio_driver = {
        .driver = {
                .name = "mb86s70-gpio",
                .of_match_table = mb86s70_gpio_dt_ids,
+               .acpi_match_table = ACPI_PTR(mb86s70_gpio_acpi_ids),
        },
        .probe = mb86s70_gpio_probe,
        .remove = mb86s70_gpio_remove,
@@@ -32,8 -32,8 +32,8 @@@ static void __iomem *INTCL_base
  #define INTCG_CIDSTR  0x1000
  
  #define INTCL_PICTLR  0x0
+ #define INTCL_CFGR    0x14
  #define INTCL_SIGR    0x60
- #define INTCL_HPPIR   0x68
  #define INTCL_RDYIR   0x6c
  #define INTCL_SENR    0xa0
  #define INTCL_CENR    0xa4
  
  static DEFINE_PER_CPU(void __iomem *, intcl_reg);
  
+ static unsigned long *__trigger;
+ #define IRQ_OFFSET(irq) ((irq < COMM_IRQ_BASE) ? irq : (irq - COMM_IRQ_BASE))
+ #define TRIG_BYTE_OFFSET(i)   ((((i) * 2) / 32) * 4)
+ #define TRIG_BIT_OFFSET(i)     (((i) * 2) % 32)
+ #define TRIG_VAL(trigger, irq)        (trigger << TRIG_BIT_OFFSET(IRQ_OFFSET(irq)))
+ #define TRIG_VAL_MSK(irq)         (~(3 << TRIG_BIT_OFFSET(IRQ_OFFSET(irq))))
+ #define TRIG_BASE(irq) \
+       (TRIG_BYTE_OFFSET(IRQ_OFFSET(irq)) + ((irq < COMM_IRQ_BASE) ? \
+       (this_cpu_read(intcl_reg) + INTCL_CFGR) : (INTCG_base + INTCG_CICFGR)))
+ static DEFINE_SPINLOCK(setup_lock);
+ static void setup_trigger(unsigned long irq, unsigned long trigger)
+ {
+       unsigned int tmp;
+       spin_lock(&setup_lock);
+       /* setup trigger */
+       tmp = readl_relaxed(TRIG_BASE(irq)) & TRIG_VAL_MSK(irq);
+       writel_relaxed(tmp | TRIG_VAL(trigger, irq), TRIG_BASE(irq));
+       spin_unlock(&setup_lock);
+ }
  static void csky_mpintc_handler(struct pt_regs *regs)
  {
        void __iomem *reg_base = this_cpu_read(intcl_reg);
  
-       do {
-               handle_domain_irq(root_domain,
-                                 readl_relaxed(reg_base + INTCL_RDYIR),
-                                 regs);
-       } while (readl_relaxed(reg_base + INTCL_HPPIR) & BIT(31));
+       handle_domain_irq(root_domain,
+               readl_relaxed(reg_base + INTCL_RDYIR), regs);
  }
  
  static void csky_mpintc_enable(struct irq_data *d)
  {
        void __iomem *reg_base = this_cpu_read(intcl_reg);
  
+       setup_trigger(d->hwirq, __trigger[d->hwirq]);
        writel_relaxed(d->hwirq, reg_base + INTCL_SENR);
  }
  
@@@ -73,6 -101,28 +101,28 @@@ static void csky_mpintc_eoi(struct irq_
        writel_relaxed(d->hwirq, reg_base + INTCL_CACR);
  }
  
+ static int csky_mpintc_set_type(struct irq_data *d, unsigned int type)
+ {
+       switch (type & IRQ_TYPE_SENSE_MASK) {
+       case IRQ_TYPE_LEVEL_HIGH:
+               __trigger[d->hwirq] = 0;
+               break;
+       case IRQ_TYPE_LEVEL_LOW:
+               __trigger[d->hwirq] = 1;
+               break;
+       case IRQ_TYPE_EDGE_RISING:
+               __trigger[d->hwirq] = 2;
+               break;
+       case IRQ_TYPE_EDGE_FALLING:
+               __trigger[d->hwirq] = 3;
+               break;
+       default:
+               return -EINVAL;
+       }
+       return 0;
+ }
  #ifdef CONFIG_SMP
  static int csky_irq_set_affinity(struct irq_data *d,
                                 const struct cpumask *mask_val,
        if (cpu >= nr_cpu_ids)
                return -EINVAL;
  
 -      /* Enable interrupt destination */
 -      cpu |= BIT(31);
 +      /*
 +       * The csky,mpintc could support auto irq deliver, but it only
 +       * could deliver external irq to one cpu or all cpus. So it
 +       * doesn't support deliver external irq to a group of cpus
 +       * with cpu_mask.
 +       * SO we only use auto deliver mode when affinity mask_val is
 +       * equal to cpu_present_mask.
 +       *
 +       */
 +      if (cpumask_equal(mask_val, cpu_present_mask))
 +              cpu = 0;
 +      else
 +              cpu |= BIT(31);
  
        writel_relaxed(cpu, INTCG_base + INTCG_CIDSTR + offset);
  
@@@ -116,6 -155,7 +166,7 @@@ static struct irq_chip csky_irq_chip = 
        .irq_eoi        = csky_mpintc_eoi,
        .irq_enable     = csky_mpintc_enable,
        .irq_disable    = csky_mpintc_disable,
+       .irq_set_type   = csky_mpintc_set_type,
  #ifdef CONFIG_SMP
        .irq_set_affinity = csky_irq_set_affinity,
  #endif
@@@ -136,9 -176,26 +187,26 @@@ static int csky_irqdomain_map(struct ir
        return 0;
  }
  
+ static int csky_irq_domain_xlate_cells(struct irq_domain *d,
+               struct device_node *ctrlr, const u32 *intspec,
+               unsigned int intsize, unsigned long *out_hwirq,
+               unsigned int *out_type)
+ {
+       if (WARN_ON(intsize < 1))
+               return -EINVAL;
+       *out_hwirq = intspec[0];
+       if (intsize > 1)
+               *out_type = intspec[1] & IRQ_TYPE_SENSE_MASK;
+       else
+               *out_type = IRQ_TYPE_LEVEL_HIGH;
+       return 0;
+ }
  static const struct irq_domain_ops csky_irqdomain_ops = {
        .map    = csky_irqdomain_map,
-       .xlate  = irq_domain_xlate_onecell,
+       .xlate  = csky_irq_domain_xlate_cells,
  };
  
  #ifdef CONFIG_SMP
@@@ -172,6 -229,10 +240,10 @@@ csky_mpintc_init(struct device_node *no
        if (ret < 0)
                nr_irq = INTC_IRQS;
  
+       __trigger  = kcalloc(nr_irq, sizeof(unsigned long), GFP_KERNEL);
+       if (__trigger == NULL)
+               return -ENXIO;
        if (INTCG_base == NULL) {
                INTCG_base = ioremap(mfcr("cr<31, 14>"),
                                     INTCL_SIZE*nr_cpu_ids + INTCG_SIZE);
@@@ -1,4 -1,3 +1,4 @@@
 +// SPDX-License-Identifier: GPL-2.0-only
  /*
   * ARM GIC v2m MSI(-X) support
   * Support for Message Signaled Interrupts for systems that
@@@ -8,6 -7,10 +8,6 @@@
   * Authors: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
   *        Harish Kasiviswanathan <harish.kasiviswanathan@amd.com>
   *        Brandon Anderson <brandon.anderson@amd.com>
 - *
 - * 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.
   */
  
  #define pr_fmt(fmt) "GICv2m: " fmt
@@@ -53,6 -56,7 +53,7 @@@
  
  /* List of flags for specific v2m implementation */
  #define GICV2M_NEEDS_SPI_OFFSET               0x00000001
+ #define GICV2M_GRAVITON_ADDRESS_ONLY  0x00000002
  
  static LIST_HEAD(v2m_nodes);
  static DEFINE_SPINLOCK(v2m_lock);
@@@ -95,15 -99,26 +96,26 @@@ static struct msi_domain_info gicv2m_ms
        .chip   = &gicv2m_msi_irq_chip,
  };
  
+ static phys_addr_t gicv2m_get_msi_addr(struct v2m_data *v2m, int hwirq)
+ {
+       if (v2m->flags & GICV2M_GRAVITON_ADDRESS_ONLY)
+               return v2m->res.start | ((hwirq - 32) << 3);
+       else
+               return v2m->res.start + V2M_MSI_SETSPI_NS;
+ }
  static void gicv2m_compose_msi_msg(struct irq_data *data, struct msi_msg *msg)
  {
        struct v2m_data *v2m = irq_data_get_irq_chip_data(data);
-       phys_addr_t addr = v2m->res.start + V2M_MSI_SETSPI_NS;
+       phys_addr_t addr = gicv2m_get_msi_addr(v2m, data->hwirq);
  
        msg->address_hi = upper_32_bits(addr);
        msg->address_lo = lower_32_bits(addr);
-       msg->data = data->hwirq;
  
+       if (v2m->flags & GICV2M_GRAVITON_ADDRESS_ONLY)
+               msg->data = 0;
+       else
+               msg->data = data->hwirq;
        if (v2m->flags & GICV2M_NEEDS_SPI_OFFSET)
                msg->data -= v2m->spi_offset;
  
@@@ -185,7 -200,7 +197,7 @@@ static int gicv2m_irq_domain_alloc(stru
        hwirq = v2m->spi_start + offset;
  
        err = iommu_dma_prepare_msi(info->desc,
-                                   v2m->res.start + V2M_MSI_SETSPI_NS);
+                                   gicv2m_get_msi_addr(v2m, hwirq));
        if (err)
                return err;
  
@@@ -304,7 -319,7 +316,7 @@@ static int gicv2m_allocate_domains(stru
  
  static int __init gicv2m_init_one(struct fwnode_handle *fwnode,
                                  u32 spi_start, u32 nr_spis,
-                                 struct resource *res)
+                                 struct resource *res, u32 flags)
  {
        int ret;
        struct v2m_data *v2m;
  
        INIT_LIST_HEAD(&v2m->entry);
        v2m->fwnode = fwnode;
+       v2m->flags = flags;
  
        memcpy(&v2m->res, res, sizeof(struct resource));
  
                v2m->spi_start = spi_start;
                v2m->nr_spis = nr_spis;
        } else {
-               u32 typer = readl_relaxed(v2m->base + V2M_MSI_TYPER);
+               u32 typer;
+               /* Graviton should always have explicit spi_start/nr_spis */
+               if (v2m->flags & GICV2M_GRAVITON_ADDRESS_ONLY) {
+                       ret = -EINVAL;
+                       goto err_iounmap;
+               }
+               typer = readl_relaxed(v2m->base + V2M_MSI_TYPER);
  
                v2m->spi_start = V2M_MSI_TYPER_BASE_SPI(typer);
                v2m->nr_spis = V2M_MSI_TYPER_NUM_SPI(typer);
         *
         * Broadom NS2 GICv2m implementation has an erratum where the MSI data
         * is 'spi_number - 32'
+        *
+        * Reading that register fails on the Graviton implementation
         */
-       switch (readl_relaxed(v2m->base + V2M_MSI_IIDR)) {
-       case XGENE_GICV2M_MSI_IIDR:
-               v2m->flags |= GICV2M_NEEDS_SPI_OFFSET;
-               v2m->spi_offset = v2m->spi_start;
-               break;
-       case BCM_NS2_GICV2M_MSI_IIDR:
-               v2m->flags |= GICV2M_NEEDS_SPI_OFFSET;
-               v2m->spi_offset = 32;
-               break;
+       if (!(v2m->flags & GICV2M_GRAVITON_ADDRESS_ONLY)) {
+               switch (readl_relaxed(v2m->base + V2M_MSI_IIDR)) {
+               case XGENE_GICV2M_MSI_IIDR:
+                       v2m->flags |= GICV2M_NEEDS_SPI_OFFSET;
+                       v2m->spi_offset = v2m->spi_start;
+                       break;
+               case BCM_NS2_GICV2M_MSI_IIDR:
+                       v2m->flags |= GICV2M_NEEDS_SPI_OFFSET;
+                       v2m->spi_offset = 32;
+                       break;
+               }
        }
        v2m->bm = kcalloc(BITS_TO_LONGS(v2m->nr_spis), sizeof(long),
                          GFP_KERNEL);
        if (!v2m->bm) {
@@@ -416,7 -442,8 +439,8 @@@ static int __init gicv2m_of_init(struc
                        pr_info("DT overriding V2M MSI_TYPER (base:%u, num:%u)\n",
                                spi_start, nr_spis);
  
-               ret = gicv2m_init_one(&child->fwnode, spi_start, nr_spis, &res);
+               ret = gicv2m_init_one(&child->fwnode, spi_start, nr_spis,
+                                     &res, 0);
                if (ret) {
                        of_node_put(child);
                        break;
@@@ -448,6 -475,25 +472,25 @@@ static struct fwnode_handle *gicv2m_get
        return data->fwnode;
  }
  
+ static bool acpi_check_amazon_graviton_quirks(void)
+ {
+       static struct acpi_table_madt *madt;
+       acpi_status status;
+       bool rc = false;
+ #define ACPI_AMZN_OEM_ID              "AMAZON"
+       status = acpi_get_table(ACPI_SIG_MADT, 0,
+                               (struct acpi_table_header **)&madt);
+       if (ACPI_FAILURE(status) || !madt)
+               return rc;
+       rc = !memcmp(madt->header.oem_id, ACPI_AMZN_OEM_ID, ACPI_OEM_ID_SIZE);
+       acpi_put_table((struct acpi_table_header *)madt);
+       return rc;
+ }
  static int __init
  acpi_parse_madt_msi(union acpi_subtable_headers *header,
                    const unsigned long end)
        u32 spi_start = 0, nr_spis = 0;
        struct acpi_madt_generic_msi_frame *m;
        struct fwnode_handle *fwnode;
+       u32 flags = 0;
  
        m = (struct acpi_madt_generic_msi_frame *)header;
        if (BAD_MADT_ENTRY(m, end))
        res.end = m->base_address + SZ_4K - 1;
        res.flags = IORESOURCE_MEM;
  
+       if (acpi_check_amazon_graviton_quirks()) {
+               pr_info("applying Amazon Graviton quirk\n");
+               res.end = res.start + SZ_8K - 1;
+               flags |= GICV2M_GRAVITON_ADDRESS_ONLY;
+               gicv2m_msi_domain_info.flags &= ~MSI_FLAG_MULTI_PCI_MSI;
+       }
        if (m->flags & ACPI_MADT_OVERRIDE_SPI_VALUES) {
                spi_start = m->spi_base;
                nr_spis = m->spi_count;
                return -EINVAL;
        }
  
-       ret = gicv2m_init_one(fwnode, spi_start, nr_spis, &res);
+       ret = gicv2m_init_one(fwnode, spi_start, nr_spis, &res, flags);
        if (ret)
                irq_domain_free_fwnode(fwnode);
  
@@@ -1,7 -1,18 +1,7 @@@
 +// SPDX-License-Identifier: GPL-2.0-only
  /*
   * Copyright (C) 2013-2017 ARM Limited, All Rights Reserved.
   * Author: Marc Zyngier <marc.zyngier@arm.com>
 - *
 - * 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/>.
   */
  
  #define pr_fmt(fmt)   "GICv3: " fmt
@@@ -461,12 -472,8 +461,12 @@@ static void gic_deactivate_unhandled(u3
  
  static inline void gic_handle_nmi(u32 irqnr, struct pt_regs *regs)
  {
 +      bool irqs_enabled = interrupts_enabled(regs);
        int err;
  
 +      if (irqs_enabled)
 +              nmi_enter();
 +
        if (static_branch_likely(&supports_deactivate_key))
                gic_write_eoir(irqnr);
        /*
        err = handle_domain_nmi(gic_data.domain, irqnr, regs);
        if (err)
                gic_deactivate_unhandled(irqnr);
 +
 +      if (irqs_enabled)
 +              nmi_exit();
  }
  
  static asmlinkage void __exception_irq_entry gic_handle_irq(struct pt_regs *regs)
@@@ -1339,6 -1343,9 +1339,9 @@@ static int __init gic_init_bases(void _
        if (gic_dist_supports_lpis()) {
                its_init(handle, &gic_data.rdists, gic_data.domain);
                its_cpu_init();
+       } else {
+               if (IS_ENABLED(CONFIG_ARM_GIC_V2M))
+                       gicv2m_init(handle, gic_data.domain);
        }
  
        if (gic_prio_masking_enabled()) {
@@@ -1,8 -1,19 +1,8 @@@
 +// SPDX-License-Identifier: GPL-2.0-only
  /*
   * Copyright (C) 2015 Hisilicon Limited, All Rights Reserved.
   * Author: Jun Ma <majun258@huawei.com>
   * Author: Yun Wu <wuyun.wu@huawei.com>
 - *
 - * 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/>.
   */
  
  #include <linux/acpi.h>
@@@ -344,8 -355,7 +344,7 @@@ static int mbigen_device_probe(struct p
                err = -EINVAL;
  
        if (err) {
-               dev_err(&pdev->dev, "Failed to create mbi-gen@%p irqdomain",
-                       mgn_chip->base);
+               dev_err(&pdev->dev, "Failed to create mbi-gen irqdomain\n");
                return err;
        }
  
@@@ -1,9 -1,22 +1,9 @@@
 +// SPDX-License-Identifier: GPL-2.0-only
  /*
   * Copyright (c) 2015 Endless Mobile, Inc.
   * Author: Carlo Caione <carlo@endlessm.com>
   * Copyright (c) 2016 BayLibre, SAS.
   * Author: Jerome Brunet <jbrunet@baylibre.com>
 - *
 - * This program is free software; you can redistribute it and/or modify
 - * it under the terms of version 2 of the GNU General Public License 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/>.
 - * The full GNU General Public License is included in this distribution
 - * in the file called COPYING.
   */
  
  #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
@@@ -60,6 -73,7 +60,7 @@@ static const struct of_device_id meson_
        { .compatible = "amlogic,meson-gxbb-gpio-intc", .data = &gxbb_params },
        { .compatible = "amlogic,meson-gxl-gpio-intc", .data = &gxl_params },
        { .compatible = "amlogic,meson-axg-gpio-intc", .data = &axg_params },
+       { .compatible = "amlogic,meson-g12a-gpio-intc", .data = &axg_params },
        { }
  };
  
@@@ -1,12 -1,15 +1,12 @@@
 +// SPDX-License-Identifier: GPL-2.0-only
  /*
   * Driver for Socionext External Interrupt Unit (EXIU)
   *
-  * Copyright (c) 2017 Linaro, Ltd. <ard.biesheuvel@linaro.org>
+  * Copyright (c) 2017-2019 Linaro, Ltd. <ard.biesheuvel@linaro.org>
   *
   * Based on irq-tegra.c:
   *   Copyright (C) 2011 Google, Inc.
   *   Copyright (C) 2010,2013, NVIDIA Corporation
 - *
 - * 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.
   */
  
  #include <linux/interrupt.h>
@@@ -17,6 -20,7 +17,7 @@@
  #include <linux/of.h>
  #include <linux/of_address.h>
  #include <linux/of_irq.h>
+ #include <linux/platform_device.h>
  
  #include <dt-bindings/interrupt-controller/arm-gic.h>
  
@@@ -131,9 -135,13 +132,13 @@@ static int exiu_domain_translate(struc
  
                *hwirq = fwspec->param[1] - info->spi_base;
                *type = fwspec->param[2] & IRQ_TYPE_SENSE_MASK;
-               return 0;
+       } else {
+               if (fwspec->param_count != 2)
+                       return -EINVAL;
+               *hwirq = fwspec->param[0];
+               *type = fwspec->param[2] & IRQ_TYPE_SENSE_MASK;
        }
-       return -EINVAL;
+       return 0;
  }
  
  static int exiu_domain_alloc(struct irq_domain *dom, unsigned int virq,
        struct exiu_irq_data *info = dom->host_data;
        irq_hw_number_t hwirq;
  
-       if (fwspec->param_count != 3)
-               return -EINVAL; /* Not GIC compliant */
-       if (fwspec->param[0] != GIC_SPI)
-               return -EINVAL; /* No PPI should point to this domain */
+       parent_fwspec = *fwspec;
+       if (is_of_node(dom->parent->fwnode)) {
+               if (fwspec->param_count != 3)
+                       return -EINVAL; /* Not GIC compliant */
+               if (fwspec->param[0] != GIC_SPI)
+                       return -EINVAL; /* No PPI should point to this domain */
  
+               hwirq = fwspec->param[1] - info->spi_base;
+       } else {
+               hwirq = fwspec->param[0];
+               parent_fwspec.param[0] = hwirq + info->spi_base + 32;
+       }
        WARN_ON(nr_irqs != 1);
-       hwirq = fwspec->param[1] - info->spi_base;
        irq_domain_set_hwirq_and_chip(dom, virq, hwirq, &exiu_irq_chip, info);
  
-       parent_fwspec = *fwspec;
        parent_fwspec.fwnode = dom->parent->fwnode;
        return irq_domain_alloc_irqs_parent(dom, virq, nr_irqs, &parent_fwspec);
  }
@@@ -164,35 -177,23 +174,23 @@@ static const struct irq_domain_ops exiu
        .free           = irq_domain_free_irqs_common,
  };
  
- static int __init exiu_init(struct device_node *node,
-                           struct device_node *parent)
+ static struct exiu_irq_data *exiu_init(const struct fwnode_handle *fwnode,
+                                      struct resource *res)
  {
-       struct irq_domain *parent_domain, *domain;
        struct exiu_irq_data *data;
        int err;
  
-       if (!parent) {
-               pr_err("%pOF: no parent, giving up\n", node);
-               return -ENODEV;
-       }
-       parent_domain = irq_find_host(parent);
-       if (!parent_domain) {
-               pr_err("%pOF: unable to obtain parent domain\n", node);
-               return -ENXIO;
-       }
        data = kzalloc(sizeof(*data), GFP_KERNEL);
        if (!data)
-               return -ENOMEM;
+               return ERR_PTR(-ENOMEM);
  
-       if (of_property_read_u32(node, "socionext,spi-base", &data->spi_base)) {
-               pr_err("%pOF: failed to parse 'spi-base' property\n", node);
+       if (fwnode_property_read_u32_array(fwnode, "socionext,spi-base",
+                                          &data->spi_base, 1)) {
                err = -ENODEV;
                goto out_free;
        }
  
-       data->base = of_iomap(node, 0);
+       data->base = ioremap(res->start, resource_size(res));
        if (!data->base) {
                err = -ENODEV;
                goto out_free;
        writel_relaxed(0xFFFFFFFF, data->base + EIREQCLR);
        writel_relaxed(0xFFFFFFFF, data->base + EIMASK);
  
+       return data;
+ out_free:
+       kfree(data);
+       return ERR_PTR(err);
+ }
+ static int __init exiu_dt_init(struct device_node *node,
+                              struct device_node *parent)
+ {
+       struct irq_domain *parent_domain, *domain;
+       struct exiu_irq_data *data;
+       struct resource res;
+       if (!parent) {
+               pr_err("%pOF: no parent, giving up\n", node);
+               return -ENODEV;
+       }
+       parent_domain = irq_find_host(parent);
+       if (!parent_domain) {
+               pr_err("%pOF: unable to obtain parent domain\n", node);
+               return -ENXIO;
+       }
+       if (of_address_to_resource(node, 0, &res)) {
+               pr_err("%pOF: failed to parse memory resource\n", node);
+               return -ENXIO;
+       }
+       data = exiu_init(of_node_to_fwnode(node), &res);
+       if (IS_ERR(data))
+               return PTR_ERR(data);
        domain = irq_domain_add_hierarchy(parent_domain, 0, NUM_IRQS, node,
                                          &exiu_domain_ops, data);
        if (!domain) {
                pr_err("%pOF: failed to allocate domain\n", node);
-               err = -ENOMEM;
                goto out_unmap;
        }
  
  
  out_unmap:
        iounmap(data->base);
- out_free:
        kfree(data);
-       return err;
+       return -ENOMEM;
  }
- IRQCHIP_DECLARE(exiu, "socionext,synquacer-exiu", exiu_init);
+ IRQCHIP_DECLARE(exiu, "socionext,synquacer-exiu", exiu_dt_init);
+ #ifdef CONFIG_ACPI
+ static int exiu_acpi_probe(struct platform_device *pdev)
+ {
+       struct irq_domain *domain;
+       struct exiu_irq_data *data;
+       struct resource *res;
+       res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+       if (!res) {
+               dev_err(&pdev->dev, "failed to parse memory resource\n");
+               return -ENXIO;
+       }
+       data = exiu_init(dev_fwnode(&pdev->dev), res);
+       if (IS_ERR(data))
+               return PTR_ERR(data);
+       domain = acpi_irq_create_hierarchy(0, NUM_IRQS, dev_fwnode(&pdev->dev),
+                                          &exiu_domain_ops, data);
+       if (!domain) {
+               dev_err(&pdev->dev, "failed to create IRQ domain\n");
+               goto out_unmap;
+       }
+       dev_info(&pdev->dev, "%d interrupts forwarded\n", NUM_IRQS);
+       return 0;
+ out_unmap:
+       iounmap(data->base);
+       kfree(data);
+       return -ENOMEM;
+ }
+ static const struct acpi_device_id exiu_acpi_ids[] = {
+       { "SCX0008" },
+       { /* sentinel */ }
+ };
+ MODULE_DEVICE_TABLE(acpi, exiu_acpi_ids);
+ static struct platform_driver exiu_driver = {
+       .driver = {
+               .name = "exiu",
+               .acpi_match_table = exiu_acpi_ids,
+       },
+       .probe = exiu_acpi_probe,
+ };
+ builtin_platform_driver(exiu_driver);
+ #endif
@@@ -1,5 -1,13 +1,5 @@@
 +// SPDX-License-Identifier: GPL-2.0-only
  /* Copyright (c) 2015-2018, The Linux Foundation. All rights reserved.
 - *
 - * This program is free software; you can redistribute it and/or modify
 - * it under the terms of the GNU General Public License version 2 and
 - * only 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.
   */
  
  /*
@@@ -229,7 -237,6 +229,6 @@@ static int get_registers(struct platfor
  static int __init combiner_probe(struct platform_device *pdev)
  {
        struct combiner *combiner;
-       size_t alloc_sz;
        int nregs;
        int err;
  
                return -EINVAL;
        }
  
-       alloc_sz = sizeof(*combiner) + sizeof(struct combiner_reg) * nregs;
-       combiner = devm_kzalloc(&pdev->dev, alloc_sz, GFP_KERNEL);
+       combiner = devm_kzalloc(&pdev->dev, struct_size(combiner, regs, nregs),
+                               GFP_KERNEL);
        if (!combiner)
                return -ENOMEM;
  
diff --combined include/linux/acpi.h
@@@ -1,8 -1,21 +1,8 @@@
 +/* SPDX-License-Identifier: GPL-2.0-or-later */
  /*
   * acpi.h - ACPI Interface
   *
   * Copyright (C) 2001 Paul Diefenbaugh <paul.s.diefenbaugh@intel.com>
 - *
 - * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 - *
 - * This program is free software; you can redistribute it and/or modify
 - * it under the terms of the GNU General Public License as published by
 - * the Free Software Foundation; either version 2 of the License, or
 - * (at your option) any later version.
 - *
 - * 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.
 - *
 - * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   */
  
  #ifndef _LINUX_ACPI_H
@@@ -10,6 -23,7 +10,7 @@@
  
  #include <linux/errno.h>
  #include <linux/ioport.h>     /* for struct resource */
+ #include <linux/irqdomain.h>
  #include <linux/resource_ext.h>
  #include <linux/device.h>
  #include <linux/property.h>
@@@ -314,6 -328,12 +315,12 @@@ int acpi_isa_irq_to_gsi (unsigned isa_i
  void acpi_set_irq_model(enum acpi_irq_model_id model,
                        struct fwnode_handle *fwnode);
  
+ struct irq_domain *acpi_irq_create_hierarchy(unsigned int flags,
+                                            unsigned int size,
+                                            struct fwnode_handle *fwnode,
+                                            const struct irq_domain_ops *ops,
+                                            void *host_data);
  #ifdef CONFIG_X86_IO_APIC
  extern int acpi_get_override_irq(u32 gsi, int *trigger, int *polarity);
  #else
@@@ -1303,7 -1323,6 +1310,7 @@@ static inline int lpit_read_residency_c
  #ifdef CONFIG_ACPI_PPTT
  int find_acpi_cpu_topology(unsigned int cpu, int level);
  int find_acpi_cpu_topology_package(unsigned int cpu);
 +int find_acpi_cpu_topology_hetero_id(unsigned int cpu);
  int find_acpi_cpu_cache_topology(unsigned int cpu, int level);
  #else
  static inline int find_acpi_cpu_topology(unsigned int cpu, int level)
@@@ -1314,10 -1333,6 +1321,10 @@@ static inline int find_acpi_cpu_topolog
  {
        return -EINVAL;
  }
 +static inline int find_acpi_cpu_topology_hetero_id(unsigned int cpu)
 +{
 +      return -EINVAL;
 +}
  static inline int find_acpi_cpu_cache_topology(unsigned int cpu, int level)
  {
        return -EINVAL;
@@@ -1,8 -1,11 +1,8 @@@
 +/* SPDX-License-Identifier: GPL-2.0-only */
  /*
   * include/linux/irqchip/arm-gic-common.h
   *
   * Copyright (C) 2016 ARM Limited, All Rights Reserved.
 - *
 - * 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.
   */
  #ifndef __LINUX_IRQCHIP_ARM_GIC_COMMON_H
  #define __LINUX_IRQCHIP_ARM_GIC_COMMON_H
@@@ -36,4 -39,9 +36,9 @@@ struct gic_kvm_info 
  
  const struct gic_kvm_info *gic_get_kvm_info(void);
  
+ struct irq_domain;
+ struct fwnode_handle;
+ int gicv2m_init(struct fwnode_handle *parent_handle,
+               struct irq_domain *parent);
  #endif /* __LINUX_IRQCHIP_ARM_GIC_COMMON_H */
@@@ -1,8 -1,11 +1,8 @@@
 +/* SPDX-License-Identifier: GPL-2.0-only */
  /*
   *  include/linux/irqchip/arm-gic.h
   *
   *  Copyright (C) 2002 ARM Limited, All Rights Reserved.
 - *
 - * 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.
   */
  #ifndef __LINUX_IRQCHIP_ARM_GIC_H
  #define __LINUX_IRQCHIP_ARM_GIC_H
@@@ -157,9 -160,6 +157,6 @@@ int gic_of_init_child(struct device *de
   */
  void gic_init(void __iomem *dist , void __iomem *cpu);
  
- int gicv2m_init(struct fwnode_handle *parent_handle,
-               struct irq_domain *parent);
  void gic_send_sgi(unsigned int cpu_id, unsigned int irq);
  int gic_get_cpu_id(unsigned int cpu);
  void gic_migrate_target(unsigned int new_cpu_id);
diff --combined kernel/irq/irqdesc.c
@@@ -680,8 -680,6 +680,8 @@@ int __handle_domain_irq(struct irq_doma
   * @hwirq:    The HW irq number to convert to a logical one
   * @regs:     Register file coming from the low-level handling code
   *
 + *            This function must be called from an NMI context.
 + *
   * Returns:   0 on success, or -EINVAL if conversion has failed
   */
  int handle_domain_nmi(struct irq_domain *domain, unsigned int hwirq,
        unsigned int irq;
        int ret = 0;
  
 -      nmi_enter();
 +      /*
 +       * NMI context needs to be setup earlier in order to deal with tracing.
 +       */
 +      WARN_ON(!in_nmi());
  
        irq = irq_find_mapping(domain, hwirq);
  
        else
                ret = -EINVAL;
  
 -      nmi_exit();
        set_irq_regs(old_regs);
        return ret;
  }
@@@ -950,6 -946,11 +950,11 @@@ unsigned int kstat_irqs_cpu(unsigned in
                        *per_cpu_ptr(desc->kstat_irqs, cpu) : 0;
  }
  
+ static bool irq_is_nmi(struct irq_desc *desc)
+ {
+       return desc->istate & IRQS_NMI;
+ }
  /**
   * kstat_irqs - Get the statistics for an interrupt
   * @irq:      The interrupt number
@@@ -967,7 -968,8 +972,8 @@@ unsigned int kstat_irqs(unsigned int ir
        if (!desc || !desc->kstat_irqs)
                return 0;
        if (!irq_settings_is_per_cpu_devid(desc) &&
-           !irq_settings_is_per_cpu(desc))
+           !irq_settings_is_per_cpu(desc) &&
+           !irq_is_nmi(desc))
            return desc->tot_count;
  
        for_each_possible_cpu(cpu)
diff --combined kernel/softirq.c
@@@ -1,9 -1,10 +1,9 @@@
 +// SPDX-License-Identifier: GPL-2.0-only
  /*
   *    linux/kernel/softirq.c
   *
   *    Copyright (C) 1992 Linus Torvalds
   *
 - *    Distribute under GPLv2.
 - *
   *    Rewritten. Old one was good in 2.2, but in 2.3 it was immoral. --ANK (990903)
   */
  
@@@ -649,7 -650,7 +649,7 @@@ static int takeover_tasklets(unsigned i
        /* Find end, append list for that CPU. */
        if (&per_cpu(tasklet_vec, cpu).head != per_cpu(tasklet_vec, cpu).tail) {
                *__this_cpu_read(tasklet_vec.tail) = per_cpu(tasklet_vec, cpu).head;
-               this_cpu_write(tasklet_vec.tail, per_cpu(tasklet_vec, cpu).tail);
+               __this_cpu_write(tasklet_vec.tail, per_cpu(tasklet_vec, cpu).tail);
                per_cpu(tasklet_vec, cpu).head = NULL;
                per_cpu(tasklet_vec, cpu).tail = &per_cpu(tasklet_vec, cpu).head;
        }
diff --combined lib/Kconfig.debug
@@@ -1754,18 -1754,6 +1754,18 @@@ config RBTREE_TES
          A benchmark measuring the performance of the rbtree library.
          Also includes rbtree invariant checks.
  
 +config REED_SOLOMON_TEST
 +      tristate "Reed-Solomon library test"
 +      depends on DEBUG_KERNEL || m
 +      select REED_SOLOMON
 +      select REED_SOLOMON_ENC16
 +      select REED_SOLOMON_DEC16
 +      help
 +        This option enables the self-test function of rslib at boot,
 +        or at module load time.
 +
 +        If unsure, say N.
 +
  config INTERVAL_TREE_TEST
        tristate "Interval tree test"
        depends on DEBUG_KERNEL
@@@ -1870,6 -1858,14 +1870,14 @@@ config TEST_PARMA
  
          If unsure, say N.
  
+ config TEST_IRQ_TIMINGS
+       bool "IRQ timings selftest"
+       depends on IRQ_TIMINGS
+       help
+         Enable this option to test the irq timings code on boot.
+         If unsure, say N.
  config TEST_LKM
        tristate "Test module loading with 'hello world' module"
        depends on m