23 Oct, 2020

2 commits


20 Oct, 2020

1 commit


08 Oct, 2020

1 commit

  • * tag 'v5.4.70': (3051 commits)
    Linux 5.4.70
    netfilter: ctnetlink: add a range check for l3/l4 protonum
    ep_create_wakeup_source(): dentry name can change under you...
    ...

    Conflicts:
    arch/arm/mach-imx/pm-imx6.c
    arch/arm64/boot/dts/freescale/imx8mm-evk.dts
    arch/arm64/boot/dts/freescale/imx8mn-ddr4-evk.dts
    drivers/crypto/caam/caamalg.c
    drivers/gpu/drm/imx/dw_hdmi-imx.c
    drivers/gpu/drm/imx/imx-ldb.c
    drivers/gpu/drm/imx/ipuv3/ipuv3-crtc.c
    drivers/mmc/host/sdhci-esdhc-imx.c
    drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c
    drivers/net/ethernet/freescale/enetc/enetc.c
    drivers/net/ethernet/freescale/enetc/enetc_pf.c
    drivers/thermal/imx_thermal.c
    drivers/usb/cdns3/ep0.c
    drivers/xen/swiotlb-xen.c
    sound/soc/fsl/fsl_esai.c
    sound/soc/fsl/fsl_sai.c

    Signed-off-by: Jason Liu

    Jason Liu
     

03 Sep, 2020

1 commit

  • commit e579076ac0a3bebb440fab101aef3c42c9f4c709 upstream.

    In the current code, when the eoi callback of the exti clears the pending
    bit of the current interrupt, it will first read the values of fpr and
    rpr, then logically OR the corresponding bit of the interrupt number,
    and finally write back to fpr and rpr.

    We found through experiments that if two exti interrupts,
    we call them int1/int2, arrive almost at the same time. in our scenario,
    the time difference is 30 microseconds, assuming int1 is triggered first.

    there will be an extreme scenario: both int's pending bit are set to 1,
    the irq handle of int1 is executed first, and eoi handle is then executed,
    at this moment, all pending bits are cleared, but the int 2 has not
    finally been reported to the cpu yet, which eventually lost int2.

    According to stm32's TRM description about rpr and fpr: Writing a 1 to this
    bit will trigger a rising edge event on event x, Writing 0 has no
    effect.

    Therefore, when clearing the pending bit, we only need to clear the
    pending bit of the irq.

    Fixes: 927abfc4461e7 ("irqchip/stm32: Add stm32mp1 support with hierarchy domain")
    Signed-off-by: qiuguorui1
    Signed-off-by: Marc Zyngier
    Cc: stable@vger.kernel.org # v4.18+
    Link: https://lore.kernel.org/r/20200820031629.15582-1-qiuguorui1@huawei.com
    Signed-off-by: Greg Kroah-Hartman

    qiuguorui1
     

21 Aug, 2020

1 commit

  • commit f0c7baca180046824e07fc5f1326e83a8fd150c7 upstream.

    John reported that on a RK3288 system the perf per CPU interrupts are all
    affine to CPU0 and provided the analysis:

    "It looks like what happens is that because the interrupts are not per-CPU
    in the hardware, armpmu_request_irq() calls irq_force_affinity() while
    the interrupt is deactivated and then request_irq() with IRQF_PERCPU |
    IRQF_NOBALANCING.

    Now when irq_startup() runs with IRQ_STARTUP_NORMAL, it calls
    irq_setup_affinity() which returns early because IRQF_PERCPU and
    IRQF_NOBALANCING are set, leaving the interrupt on its original CPU."

    This was broken by the recent commit which blocked interrupt affinity
    setting in hardware before activation of the interrupt. While this works in
    general, it does not work for this particular case. As contrary to the
    initial analysis not all interrupt chip drivers implement an activate
    callback, the safe cure is to make the deferred interrupt affinity setting
    at activation time opt-in.

    Implement the necessary core logic and make the two irqchip implementations
    for which this is required opt-in. In hindsight this would have been the
    right thing to do, but ...

    Fixes: baedb87d1b53 ("genirq/affinity: Handle affinity setting on inactive interrupts correctly")
    Reported-by: John Keeping
    Signed-off-by: Thomas Gleixner
    Tested-by: Marc Zyngier
    Acked-by: Marc Zyngier
    Cc: stable@vger.kernel.org
    Link: https://lkml.kernel.org/r/87blk4tzgm.fsf@nanos.tec.linutronix.de
    Signed-off-by: Greg Kroah-Hartman

    Thomas Gleixner
     

19 Aug, 2020

2 commits

  • [ Upstream commit 6eeb997ab5075e770a002c51351fa4ec2c6b5c39 ]

    This driver may take a regular spinlock when a raw spinlock
    (irq_desc->lock) is already taken which results in the following
    lockdep splat:

    =============================
    [ BUG: Invalid wait context ]
    5.7.0-rc7 #1 Not tainted
    -----------------------------
    swapper/0/0 is trying to lock:
    ffffff800303b798 (&chip_data->lock){....}-{3:3}, at: mtk_sysirq_set_type+0x48/0xc0
    other info that might help us debug this:
    context-{5:5}
    2 locks held by swapper/0/0:
    #0: ffffff800302ee68 (&desc->request_mutex){....}-{4:4}, at: __setup_irq+0xc4/0x8a0
    #1: ffffff800302ecf0 (&irq_desc_lock_class){....}-{2:2}, at: __setup_irq+0xe4/0x8a0
    stack backtrace:
    CPU: 0 PID: 0 Comm: swapper/0 Not tainted 5.7.0-rc7 #1
    Hardware name: Pumpkin MT8516 (DT)
    Call trace:
    dump_backtrace+0x0/0x180
    show_stack+0x14/0x20
    dump_stack+0xd0/0x118
    __lock_acquire+0x8c8/0x2270
    lock_acquire+0xf8/0x470
    _raw_spin_lock_irqsave+0x50/0x78
    mtk_sysirq_set_type+0x48/0xc0
    __irq_set_trigger+0x58/0x170
    __setup_irq+0x420/0x8a0
    request_threaded_irq+0xd8/0x190
    timer_of_init+0x1e8/0x2c4
    mtk_gpt_init+0x5c/0x1dc
    timer_probe+0x74/0xf4
    time_init+0x14/0x44
    start_kernel+0x394/0x4f0

    Replace the spinlock_t with raw_spinlock_t to avoid this warning.

    Signed-off-by: Bartosz Golaszewski
    Signed-off-by: Marc Zyngier
    Link: https://lore.kernel.org/r/20200615074445.3579-1-brgl@bgdev.pl
    Signed-off-by: Sasha Levin

    Bartosz Golaszewski
     
  • [ Upstream commit 4b127a14cb1385dd355c7673d975258d5d668922 ]

    When call function devm_ioremap_resource(), we should use IS_ERR()
    to check the return value and return PTR_ERR() if failed.

    Fixes: 9f1463b86c13 ("irqchip/ti-sci-inta: Add support for Interrupt Aggregator driver")
    Signed-off-by: Tiezhu Yang
    Signed-off-by: Marc Zyngier
    Reviewed-by: Grygorii Strashko
    Link: https://lore.kernel.org/r/1591437017-5295-2-git-send-email-yangtiezhu@loongson.cn
    Signed-off-by: Sasha Levin

    Tiezhu Yang
     

09 Jul, 2020

3 commits

  • Add runtime pm support for intmux interrupt controller.

    Reviewed-by: Fugang Duan
    Signed-off-by: Joakim Zhang

    Joakim Zhang
     
  • Add system PM support for intmux interrupt controller.

    Reviewed-by: Fugang Duan
    Signed-off-by: Joakim Zhang

    Joakim Zhang
     
  • commit 005c34ae4b44f085120d7f371121ec7ded677761 upstream.

    The GIC driver uses a RMW sequence to update the affinity, and
    relies on the gic_lock_irqsave/gic_unlock_irqrestore sequences
    to update it atomically.

    But these sequences only expand into anything meaningful if
    the BL_SWITCHER option is selected, which almost never happens.

    It also turns out that using a RMW and locks is just as silly,
    as the GIC distributor supports byte accesses for the GICD_TARGETRn
    registers, which when used make the update atomic by definition.

    Drop the terminally broken code and replace it by a byte write.

    Fixes: 04c8b0f82c7d ("irqchip/gic: Make locking a BL_SWITCHER only feature")
    Cc: stable@vger.kernel.org
    Signed-off-by: Marc Zyngier
    Signed-off-by: Greg Kroah-Hartman

    Marc Zyngier
     

19 Jun, 2020

1 commit

  • * tag 'v5.4.47': (2193 commits)
    Linux 5.4.47
    KVM: arm64: Save the host's PtrAuth keys in non-preemptible context
    KVM: arm64: Synchronize sysreg state on injecting an AArch32 exception
    ...

    Conflicts:
    arch/arm/boot/dts/imx6qdl.dtsi
    arch/arm/mach-imx/Kconfig
    arch/arm/mach-imx/common.h
    arch/arm/mach-imx/suspend-imx6.S
    arch/arm64/boot/dts/freescale/imx8qxp-mek.dts
    arch/powerpc/include/asm/cacheflush.h
    drivers/cpufreq/imx6q-cpufreq.c
    drivers/dma/imx-sdma.c
    drivers/edac/synopsys_edac.c
    drivers/firmware/imx/imx-scu.c
    drivers/net/ethernet/freescale/fec.h
    drivers/net/ethernet/freescale/fec_main.c
    drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
    drivers/net/phy/phy_device.c
    drivers/perf/fsl_imx8_ddr_perf.c
    drivers/usb/cdns3/gadget.c
    drivers/usb/dwc3/gadget.c
    include/uapi/linux/dma-buf.h

    Signed-off-by: Jason Liu

    Jason Liu
     

18 May, 2020

1 commit

  • Coverity report: CID = 4327643

    incompatible_cast: Pointer &irqchip_data->irqstat points to an object whose
    effective type is unsigned int (32 bits, unsigned) but is dereferenced as a
    wider unsigned long (64 bits, unsigned). This may lead to memory corruption.

    Reviewed-by: Fugang Duan
    Signed-off-by: Joakim Zhang

    Joakim Zhang
     

23 Apr, 2020

1 commit

  • commit edfc23f6f9fdbd7825d50ac1f380243cde19b679 upstream.

    Using irq_domain_free_irqs_common() on the irqdomain free path will
    leave the MSI descriptor unfreed when platform devices get removed.
    Properly free it by MSI domain free function.

    Fixes: 9650c60ebfec0 ("irqchip/mbigen: Create irq domain for each mbigen device")
    Signed-off-by: Zenghui Yu
    Signed-off-by: Marc Zyngier
    Link: https://lore.kernel.org/r/20200408114352.1604-1-yuzenghui@huawei.com
    Signed-off-by: Greg Kroah-Hartman

    Zenghui Yu
     

21 Apr, 2020

1 commit

  • commit 3688b0db5c331f4ec3fa5eb9f670a4b04f530700 upstream.

    The ti_sci_inta_irq_handler() does not take into account INTA IRQs state
    (masked/unmasked) as it uses INTA_STATUS_CLEAR_j register to get INTA IRQs
    status, which provides raw status value.
    This causes hard IRQ handlers to be called or threaded handlers to be
    scheduled many times even if corresponding INTA IRQ is masked.
    Above, first of all, affects the LEVEL interrupts processing and causes
    unexpected behavior up the system stack or crash.

    Fix it by using the Interrupt Masked Status INTA_STATUSM_j register which
    provides masked INTA IRQs status.

    Fixes: 9f1463b86c13 ("irqchip/ti-sci-inta: Add support for Interrupt Aggregator driver")
    Signed-off-by: Grygorii Strashko
    Signed-off-by: Marc Zyngier
    Reviewed-by: Lokesh Vutla
    Link: https://lore.kernel.org/r/20200408191532.31252-1-grygorii.strashko@ti.com
    Cc: stable@vger.kernel.org
    Signed-off-by: Greg Kroah-Hartman

    Grygorii Strashko
     

17 Apr, 2020

3 commits

  • commit 6a214a28132f19ace3d835a6d8f6422ec80ad200 upstream.

    Clear its own IRQs before the parent IRQ get enabled, so that the
    remaining IRQs do not accidentally interrupt the parent IRQ controller.

    This patch also fixes a reboot bug on OX820 SoC, where the remaining
    rps-timer IRQ raises a GIC interrupt that is left pending. After that,
    the rps-timer IRQ is cleared during driver initialization, and there's
    no IRQ left in rps-irq when local_irq_enable() is called, which evokes
    an error message "unexpected IRQ trap".

    Fixes: bdd272cbb97a ("irqchip: versatile FPGA: support cascaded interrupts from DT")
    Signed-off-by: Sungbo Eo
    Signed-off-by: Marc Zyngier
    Reviewed-by: Linus Walleij
    Cc: stable@vger.kernel.org
    Link: https://lore.kernel.org/r/20200321133842.2408823-1-mans0n@gorani.run
    Signed-off-by: Greg Kroah-Hartman

    Sungbo Eo
     
  • [ Upstream commit 7809f7011c3bce650e502a98afeb05961470d865 ]

    On a very heavily loaded D05 with GICv4, I managed to trigger the
    following lockdep splat:

    [ 6022.598864] ======================================================
    [ 6022.605031] WARNING: possible circular locking dependency detected
    [ 6022.611200] 5.6.0-rc4-00026-geee7c7b0f498 #680 Tainted: G E
    [ 6022.618061] ------------------------------------------------------
    [ 6022.624227] qemu-system-aar/7569 is trying to acquire lock:
    [ 6022.629789] ffff042f97606808 (&p->pi_lock){-.-.}, at: try_to_wake_up+0x54/0x7a0
    [ 6022.637102]
    [ 6022.637102] but task is already holding lock:
    [ 6022.642921] ffff002fae424cf0 (&irq_desc_lock_class){-.-.}, at: __irq_get_desc_lock+0x5c/0x98
    [ 6022.651350]
    [ 6022.651350] which lock already depends on the new lock.
    [ 6022.651350]
    [ 6022.659512]
    [ 6022.659512] the existing dependency chain (in reverse order) is:
    [ 6022.666980]
    [ 6022.666980] -> #2 (&irq_desc_lock_class){-.-.}:
    [ 6022.672983] _raw_spin_lock_irqsave+0x50/0x78
    [ 6022.677848] __irq_get_desc_lock+0x5c/0x98
    [ 6022.682453] irq_set_vcpu_affinity+0x40/0xc0
    [ 6022.687236] its_make_vpe_non_resident+0x6c/0xb8
    [ 6022.692364] vgic_v4_put+0x54/0x70
    [ 6022.696273] vgic_v3_put+0x20/0xd8
    [ 6022.700183] kvm_vgic_put+0x30/0x48
    [ 6022.704182] kvm_arch_vcpu_put+0x34/0x50
    [ 6022.708614] kvm_sched_out+0x34/0x50
    [ 6022.712700] __schedule+0x4bc/0x7f8
    [ 6022.716697] schedule+0x50/0xd8
    [ 6022.720347] kvm_arch_vcpu_ioctl_run+0x5f0/0x978
    [ 6022.725473] kvm_vcpu_ioctl+0x3d4/0x8f8
    [ 6022.729820] ksys_ioctl+0x90/0xd0
    [ 6022.733642] __arm64_sys_ioctl+0x24/0x30
    [ 6022.738074] el0_svc_common.constprop.3+0xa8/0x1e8
    [ 6022.743373] do_el0_svc+0x28/0x88
    [ 6022.747198] el0_svc+0x14/0x40
    [ 6022.750761] el0_sync_handler+0x124/0x2b8
    [ 6022.755278] el0_sync+0x140/0x180
    [ 6022.759100]
    [ 6022.759100] -> #1 (&rq->lock){-.-.}:
    [ 6022.764143] _raw_spin_lock+0x38/0x50
    [ 6022.768314] task_fork_fair+0x40/0x128
    [ 6022.772572] sched_fork+0xe0/0x210
    [ 6022.776484] copy_process+0x8c4/0x18d8
    [ 6022.780742] _do_fork+0x88/0x6d8
    [ 6022.784478] kernel_thread+0x64/0x88
    [ 6022.788563] rest_init+0x30/0x270
    [ 6022.792390] arch_call_rest_init+0x14/0x1c
    [ 6022.796995] start_kernel+0x498/0x4c4
    [ 6022.801164]
    [ 6022.801164] -> #0 (&p->pi_lock){-.-.}:
    [ 6022.806382] __lock_acquire+0xdd8/0x15c8
    [ 6022.810813] lock_acquire+0xd0/0x218
    [ 6022.814896] _raw_spin_lock_irqsave+0x50/0x78
    [ 6022.819761] try_to_wake_up+0x54/0x7a0
    [ 6022.824018] wake_up_process+0x1c/0x28
    [ 6022.828276] wakeup_softirqd+0x38/0x40
    [ 6022.832533] __tasklet_schedule_common+0xc4/0xf0
    [ 6022.837658] __tasklet_schedule+0x24/0x30
    [ 6022.842176] check_irq_resend+0xc8/0x158
    [ 6022.846609] irq_startup+0x74/0x128
    [ 6022.850606] __enable_irq+0x6c/0x78
    [ 6022.854602] enable_irq+0x54/0xa0
    [ 6022.858431] its_make_vpe_non_resident+0xa4/0xb8
    [ 6022.863557] vgic_v4_put+0x54/0x70
    [ 6022.867469] kvm_arch_vcpu_blocking+0x28/0x38
    [ 6022.872336] kvm_vcpu_block+0x48/0x490
    [ 6022.876594] kvm_handle_wfx+0x18c/0x310
    [ 6022.880938] handle_exit+0x138/0x198
    [ 6022.885022] kvm_arch_vcpu_ioctl_run+0x4d4/0x978
    [ 6022.890148] kvm_vcpu_ioctl+0x3d4/0x8f8
    [ 6022.894494] ksys_ioctl+0x90/0xd0
    [ 6022.898317] __arm64_sys_ioctl+0x24/0x30
    [ 6022.902748] el0_svc_common.constprop.3+0xa8/0x1e8
    [ 6022.908046] do_el0_svc+0x28/0x88
    [ 6022.911871] el0_svc+0x14/0x40
    [ 6022.915434] el0_sync_handler+0x124/0x2b8
    [ 6022.919951] el0_sync+0x140/0x180
    [ 6022.923773]
    [ 6022.923773] other info that might help us debug this:
    [ 6022.923773]
    [ 6022.931762] Chain exists of:
    [ 6022.931762] &p->pi_lock --> &rq->lock --> &irq_desc_lock_class
    [ 6022.931762]
    [ 6022.942101] Possible unsafe locking scenario:
    [ 6022.942101]
    [ 6022.948007] CPU0 CPU1
    [ 6022.952523] ---- ----
    [ 6022.957039] lock(&irq_desc_lock_class);
    [ 6022.961036] lock(&rq->lock);
    [ 6022.966595] lock(&irq_desc_lock_class);
    [ 6022.973109] lock(&p->pi_lock);
    [ 6022.976324]
    [ 6022.976324] *** DEADLOCK ***

    This is happening because we have a pending doorbell that requires
    retrigger. As SW retriggering is done in a tasklet, we trigger the
    circular dependency above.

    The easy cop-out is to provide a retrigger callback that doesn't
    require acquiring any extra lock.

    Signed-off-by: Marc Zyngier
    Link: https://lore.kernel.org/r/20200310184921.23552-5-maz@kernel.org
    Signed-off-by: Sasha Levin

    Marc Zyngier
     
  • [ Upstream commit 486562da598c59e9f835b551d7cf19507de2d681 ]

    Enclose the chained handler with chained_irq_{enter,exit}(), so that the
    muxed interrupts get properly acked.

    This patch also fixes a reboot bug on OX820 SoC, where the jiffies timer
    interrupt is never acked. The kernel waits a clock tick forever in
    calibrate_delay_converge(), which leads to a boot hang.

    Fixes: c41b16f8c9d9 ("ARM: integrator/versatile: consolidate FPGA IRQ handling code")
    Signed-off-by: Sungbo Eo
    Signed-off-by: Marc Zyngier
    Link: https://lore.kernel.org/r/20200319023448.1479701-1-mans0n@gorani.run
    Signed-off-by: Sasha Levin

    Sungbo Eo
     

08 Apr, 2020

2 commits


08 Mar, 2020

1 commit

  • Merge Linux stable release v5.4.24 into imx_5.4.y

    * tag 'v5.4.24': (3306 commits)
    Linux 5.4.24
    blktrace: Protect q->blk_trace with RCU
    kvm: nVMX: VMWRITE checks unsupported field before read-only field
    ...

    Signed-off-by: Jason Liu

    Conflicts:
    arch/arm/boot/dts/imx6sll-evk.dts
    arch/arm/boot/dts/imx7ulp.dtsi
    arch/arm64/boot/dts/freescale/fsl-ls1028a.dtsi
    drivers/clk/imx/clk-composite-8m.c
    drivers/gpio/gpio-mxc.c
    drivers/irqchip/Kconfig
    drivers/mmc/host/sdhci-of-esdhc.c
    drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c
    drivers/net/can/flexcan.c
    drivers/net/ethernet/freescale/dpaa/dpaa_eth.c
    drivers/net/ethernet/mscc/ocelot.c
    drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
    drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
    drivers/net/phy/realtek.c
    drivers/pci/controller/mobiveil/pcie-mobiveil-host.c
    drivers/perf/fsl_imx8_ddr_perf.c
    drivers/tee/optee/shm_pool.c
    drivers/usb/cdns3/gadget.c
    kernel/sched/cpufreq.c
    net/core/xdp.c
    sound/soc/fsl/fsl_esai.c
    sound/soc/fsl/fsl_sai.c
    sound/soc/sof/core.c
    sound/soc/sof/imx/Kconfig
    sound/soc/sof/loader.c

    Jason Liu
     

24 Feb, 2020

4 commits

  • [ Upstream commit 107945227ac5d4c37911c7841b27c64b489ce9a9 ]

    It looks like an obvious mistake to use its_mapc_cmd descriptor when
    building the INVALL command block. It so far worked by luck because
    both its_mapc_cmd.col and its_invall_cmd.col sit at the same offset of
    the ITS command descriptor, but we should not rely on it.

    Fixes: cc2d3216f53c ("irqchip: GICv3: ITS command queue")
    Signed-off-by: Zenghui Yu
    Signed-off-by: Marc Zyngier
    Link: https://lore.kernel.org/r/20191202071021.1251-1-yuzenghui@huawei.com
    Signed-off-by: Sasha Levin

    Zenghui Yu
     
  • [ Upstream commit 926b5dfa6b8dc666ff398044af6906b156e1d949 ]

    We currently allocate redistributor region structures for
    individual redistributors when ACPI doesn't present us with
    compact MMIO regions covering multiple redistributors.

    It turns out that we allocate these structures even when
    the redistributor is flagged as disabled by ACPI. It works
    fine until someone actually tries to tarse one of these
    structures, and access the corresponding MMIO region.

    Instead, track the number of enabled redistributors, and
    only allocate what is required. This makes sure that there
    is no invalid data to misuse.

    Signed-off-by: Marc Zyngier
    Reported-by: Heyi Guo
    Tested-by: Heyi Guo
    Link: https://lore.kernel.org/r/20191216062745.63397-1-guoheyi@huawei.com
    Signed-off-by: Sasha Levin

    Marc Zyngier
     
  • [ Upstream commit d6152e6ec9e2171280436f7b31a571509b9287e1 ]

    The following crash can be seen for setting
    CONFIG_DEBUG_TEST_DRIVER_REMOVE=y for DT FW (which some people still use):

    Hisilicon MBIGEN-V2 60080000.interrupt-controller: Failed to create mbi-gen irqdomain
    Hisilicon MBIGEN-V2: probe of 60080000.interrupt-controller failed with error -12

    [...]

    Unable to handle kernel paging request at virtual address 0000000000005008
    Mem abort info:
    ESR = 0x96000004
    EC = 0x25: DABT (current EL), IL = 32 bits
    SET = 0, FnV = 0
    EA = 0, S1PTW = 0
    Data abort info:
    ISV = 0, ISS = 0x00000004
    CM = 0, WnR = 0
    user pgtable: 4k pages, 48-bit VAs, pgdp=0000041fb9990000
    [0000000000005008] pgd=0000000000000000
    Internal error: Oops: 96000004 [#1] PREEMPT SMP
    Modules linked in:
    CPU: 7 PID: 1 Comm: swapper/0 Not tainted 5.5.0-rc6-00002-g3fc42638a506-dirty #1622
    Hardware name: Huawei Taishan 2280 /D05, BIOS Hisilicon D05 IT21 Nemo 2.0 RC0 04/18/2018
    pstate: 40000085 (nZcv daIf -PAN -UAO)
    pc : mbigen_set_type+0x38/0x60
    lr : __irq_set_trigger+0x6c/0x188
    sp : ffff800014b4b400
    x29: ffff800014b4b400 x28: 0000000000000007
    x27: 0000000000000000 x26: 0000000000000000
    x25: ffff041fd83bd0d4 x24: ffff041fd83bd188
    x23: 0000000000000000 x22: ffff80001193ce00
    x21: 0000000000000004 x20: 0000000000000000
    x19: ffff041fd83bd000 x18: ffffffffffffffff
    x17: 0000000000000000 x16: 0000000000000000
    x15: ffff8000119098c8 x14: ffff041fb94ec91c
    x13: ffff041fb94ec1a1 x12: 0000000000000030
    x11: 0101010101010101 x10: 0000000000000040
    x9 : 0000000000000000 x8 : ffff041fb98c6680
    x7 : ffff800014b4b380 x6 : ffff041fd81636c8
    x5 : 0000000000000000 x4 : 000000000000025f
    x3 : 0000000000005000 x2 : 0000000000005008
    x1 : 0000000000000004 x0 : 0000000080000000
    Call trace:
    mbigen_set_type+0x38/0x60
    __setup_irq+0x744/0x900
    request_threaded_irq+0xe0/0x198
    pcie_pme_probe+0x98/0x118
    pcie_port_probe_service+0x38/0x78
    really_probe+0xa0/0x3e0
    driver_probe_device+0x58/0x100
    __device_attach_driver+0x90/0xb0
    bus_for_each_drv+0x64/0xc8
    __device_attach+0xd8/0x138
    device_initial_probe+0x10/0x18
    bus_probe_device+0x90/0x98
    device_add+0x4c4/0x770
    device_register+0x1c/0x28
    pcie_port_device_register+0x1e4/0x4f0
    pcie_portdrv_probe+0x34/0xd8
    local_pci_probe+0x3c/0xa0
    pci_device_probe+0x128/0x1c0
    really_probe+0xa0/0x3e0
    driver_probe_device+0x58/0x100
    __device_attach_driver+0x90/0xb0
    bus_for_each_drv+0x64/0xc8
    __device_attach+0xd8/0x138
    device_attach+0x10/0x18
    pci_bus_add_device+0x4c/0xb8
    pci_bus_add_devices+0x38/0x88
    pci_host_probe+0x3c/0xc0
    pci_host_common_probe+0xf0/0x208
    hisi_pcie_almost_ecam_probe+0x24/0x30
    platform_drv_probe+0x50/0xa0
    really_probe+0xa0/0x3e0
    driver_probe_device+0x58/0x100
    device_driver_attach+0x6c/0x90
    __driver_attach+0x84/0xc8
    bus_for_each_dev+0x74/0xc8
    driver_attach+0x20/0x28
    bus_add_driver+0x148/0x1f0
    driver_register+0x60/0x110
    __platform_driver_register+0x40/0x48
    hisi_pcie_almost_ecam_driver_init+0x1c/0x24

    The specific problem here is that the mbigen driver real probe has failed
    as the mbigen_of_create_domain()->of_platform_device_create() call fails,
    the reason for that being that we never destroyed the platform device
    created during the remove test dry run and there is some conflict.

    Since we generally would never want to unbind this driver, and to save
    adding a driver tear down path for that, just set the driver
    .suppress_bind_attrs member to avoid this possibility.

    Signed-off-by: John Garry
    Signed-off-by: Marc Zyngier
    Reviewed-by: Hanjun Guo
    Link: https://lore.kernel.org/r/1579196323-180137-1-git-send-email-john.garry@huawei.com
    Signed-off-by: Sasha Levin

    John Garry
     
  • For i.MX8MP, the max irq numbers is 160, so correct the max irq number
    in GPCv2 driver to Fix the IRQ number get failure issue if requested
    irq number > 128.

    Signed-off-by: Jacky Bai
    Reviewed-by: Anson Huang

    Jacky Bai
     

21 Feb, 2020

1 commit

  • Add the wait mode workaround on i.MX8MP. it is just
    a provisional patch for Alpha release. it will be
    dropped in the future. As all the changes in this
    patch need to be revered for that time, just including
    all the changes of dts & driver in one patch to make
    it more easier to track all the changes.

    Coresight probe has some conlict with the IPI workaround.
    it is meaningless to put effort on resolve such conflict,
    and Coresight is not an must feature for Alpha release,
    disable the Coresight support directly.

    Signed-off-by: Jacky Bai
    Reviewed-by: Anson Huang

    Jacky Bai
     

23 Jan, 2020

1 commit

  • commit 0149385537e6d36f535fcd83cfcabf83a32f0836 upstream.

    Somehow CONFIG_SIFIVE_PLIC ended up outside of the "IRQ chip support"
    menu.

    Fixes: 8237f8bc4f6e ("irqchip: add a SiFive PLIC driver")
    Signed-off-by: Jonathan Neuschäfer
    Signed-off-by: Marc Zyngier
    Reviewed-by: Palmer Dabbelt
    Acked-by: Palmer Dabbelt
    Link: https://lore.kernel.org/r/20191002144452.10178-1-j.neuschaefer@gmx.net
    Signed-off-by: Greg Kroah-Hartman

    Jonathan Neuschäfer
     

19 Jan, 2020

1 commit


05 Jan, 2020

2 commits

  • [ Upstream commit 52ecc87642f273a599c9913b29fd179c13de457b ]

    If we cannot create the IRQ domain, the driver should fail to probe
    instead of succeeding with just a warning message.

    Signed-off-by: Paul Cercueil
    Signed-off-by: Marc Zyngier
    Link: https://lore.kernel.org/r/1570015525-27018-3-git-send-email-zhouyanjie@zoho.com
    Signed-off-by: Sasha Levin

    Paul Cercueil
     
  • [ Upstream commit 27eebb60357ed5aa6659442f92907c0f7368d6ae ]

    If the 'brcm,irq-can-wake' property is specified, make sure we also
    enable the corresponding parent interrupt we are attached to.

    Signed-off-by: Florian Fainelli
    Signed-off-by: Marc Zyngier
    Link: https://lore.kernel.org/r/20191024201415.23454-4-f.fainelli@gmail.com
    Signed-off-by: Sasha Levin

    Florian Fainelli
     

02 Dec, 2019

1 commit

  • * qe/next: (6 commits)
    config/qe: add irq-qeic support.
    QE: remove PPCisms for QE
    irqchip/qeic: remove PPCisms for QEIC
    irqchip/qeic: merge qeic_of_init into qe_ic_init
    irqchip/qeic: merge qeic init code from platforms to a common function
    ...

    Dong Aisheng
     

26 Nov, 2019

1 commit

  • Fix below build error when CONFIG_SMP is NOT selected:

    drivers/irqchip/irq-imx-gpcv2.c: In function "imx_gpcv2_wake_request_fixup":
    drivers/irqchip/irq-imx-gpcv2.c:123:2: error: implicit declaration of function
    "set_smp_cross_call" [-Werror=implicit-function-declaration]
    123 | set_smp_cross_call(imx_gpcv2_raise_softirq);
    | ^~~~~~~~~~~~~~~~~~
    cc1: some warnings being treated as errors
    make[3]: *** [drivers/irqchip/irq-imx-gpcv2.o] Error 1

    Signed-off-by: Anson Huang
    Reviewed-by: Robin Gong

    Anson Huang
     

25 Nov, 2019

8 commits

  • As of now, if somebody masks/unmasks any irq while the set_wake goes
    to TF-A, the masking/unmasking might be overwritten. So add new irq_chip ops
    that implement the masking, unmasking, set_wake and set_affinity and each
    calls into TF-A internally. Also add the ERR11171 knob that allows
    initializing the core wake-up workaround by registering our own
    smp_cross_call funtion and call the old one from within. The ERR11171 knob
    gets enabled by default if the machine is i.MX8MQ.

    Signed-off-by: Abel Vesa
    Reviewed-by: Jacky Bai

    Abel Vesa
     
  • Fix below build warning when built with imx_v6_v7_defconfig:

    drivers/irqchip/irq-imx-gpcv2.c: In function 'imx_gpcv2_irq_set_wake':
    drivers/irqchip/irq-imx-gpcv2.c:129:23: warning: unused variable 'res' [-Wunused-variable]
    struct arm_smccc_res res;
    ^

    Signed-off-by: Anson Huang

    Anson Huang
     
  • The wakeup irq info need to be provided to ATF side, then
    ATF side can config the correct wakeup IRQ when entering
    suspend.

    Signed-off-by: Jacky Bai

    Jacky Bai
     
  • Fix below build error when built with imx_v6_v7_defconfig:

    drivers/irqchip/irq-imx-gpcv2.c: In function 'imx_gpcv2_wake_request_fixup':
    drivers/irqchip/irq-imx-gpcv2.c:112:28: error: '__smp_cross_call' undeclared (first use in this function); did you mean 'set_smp_cross_call'?
    __gic_v3_smp_cross_call = __smp_cross_call;
    ^~~~~~~~~~~~~~~~
    set_smp_cross_call
    drivers/irqchip/irq-imx-gpcv2.c:112:28: note: each undeclared identifier is reported only once for each function it appears in

    Signed-off-by: Anson Huang

    Anson Huang
     
  • Not all EL3 have the FSL_SIP_CONFIG_GPC_CORE_WAKE, therefore disable
    the cpuidle to avoid all the cores going to sleep ending up with a
    hang. This allows all the EL3 implementations to work with i.MX8MQ
    even if they do not support core wake-up through GPC as a workaround.

    Signed-off-by: Abel Vesa

    Abel Vesa
     
  • i.MX8MQ is missing the wake_request signals from GIC to GPCv2. This indirectly
    breaks cpuidle support due to inability to wake target cores on IPIs.

    Here is the link to the errata (see e11171):

    https://www.nxp.com/docs/en/errata/IMX8MDQLQ_0N14W.pdf

    Now, in order to fix this, we can trigger IRQ 32 (hwirq 0) to all the cores by
    setting 12th bit in IOMUX_GPR1 register. In order to control the target cores
    only, that is, not waking up all the cores every time, we can unmask/mask the
    IRQ 32 in the first GPC IMR register. So basically we can leave the IOMUX_GPR1
    12th bit always set and just play with the masking and unmasking the IRO 32 for
    each independent core.

    Since EL3 is the one that deals with powering down/up the cores, and since the
    cores wake up in EL3, EL3 should be the one to control the IMRs in this case.
    This implies we need to get into EL3 on every IPI to do the unmasking, leaving
    the masking to be done on the power-up sequence by the core itself.

    In order to be able to get into EL3 on each IPI, we 'hijack' the registered smp
    cross call handler, in this case the gic_raise_softirq which is registered by
    the irq-gic-v3 driver and register our own handler instead. This new handler is
    basically a wrapper over the hijacked handler plus the call into EL3.

    To get into EL3, we use a custom vendor SIP id added just for this purpose.

    All of this is conditional for i.MX8MQ only.

    Signed-off-by: Abel Vesa

    Abel Vesa
     
  • In some subsystem of IMX8, irqsteer is under multi power domains
    and they need to be actived when irqsteer work.

    irqsteer of imx8qxp image subsystem need CSI and ISI power domains
    to be actived, so add multi-pd support as an optional feature for
    irqsteer driver

    The power-domains on imx8qxp are meant to look like this:
    power-domains = , ;
    power-domain-names = "pd_csi", "pd_isi_ch0";

    Signed-off-by: Guoniu.zhou

    Guoniu.zhou
     
  • Add intmux irq driver support.

    Signed-off-by: Joakim Zhang

    Joakim Zhang