27 Sep, 2022

1 commit

  • This is the 5.15.70 stable release

    * tag 'v5.15.70': (2444 commits)
    Linux 5.15.70
    ALSA: hda/sigmatel: Fix unused variable warning for beep power change
    cgroup: Add missing cpus_read_lock() to cgroup_attach_task_all()
    ...

    Signed-off-by: Jason Liu

    Conflicts:
    arch/arm/boot/dts/imx6ul.dtsi
    arch/arm/mm/mmu.c
    arch/arm64/boot/dts/freescale/imx8mp-evk.dts
    drivers/gpu/drm/imx/dcss/dcss-kms.c
    drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c
    drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.h
    drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c
    drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c
    drivers/soc/fsl/Kconfig
    drivers/soc/imx/gpcv2.c
    drivers/usb/dwc3/host.c
    net/dsa/slave.c
    sound/soc/fsl/imx-card.c

    Jason Liu
     

20 Sep, 2022

1 commit


17 Aug, 2022

1 commit

  • [ Upstream commit 92f2b8bafa3d6e89c750e9d301a8b7ab76aaa8b6 ]

    The arm_spe_pmu driver will enable SYS_PMSCR_EL1.CX in order to add CONTEXT
    packets into the traces, if the owner of the perf event runs with required
    capabilities i.e CAP_PERFMON or CAP_SYS_ADMIN via perfmon_capable() helper.

    The value of this bit is computed in the arm_spe_event_to_pmscr() function
    but the check for capabilities happens in the pmu event init callback i.e
    arm_spe_pmu_event_init(). This suggests that the value of the CX bit should
    remain consistent for the duration of the perf session.

    However, the function arm_spe_event_to_pmscr() may be called later during
    the event start callback i.e arm_spe_pmu_start() when the "current" process
    is not the owner of the perf session, hence the CX bit setting is currently
    not consistent.

    One way to fix this, is by caching the required value of the CX bit during
    the initialization of the PMU event, so that it remains consistent for the
    duration of the session. It uses currently unused 'event->hw.flags' element
    to cache perfmon_capable() value, which can be referred during event start
    callback to compute SYS_PMSCR_EL1.CX. This ensures consistent availability
    of context packets in the trace as per event owner capabilities.

    Drop BIT(SYS_PMSCR_EL1_CX_SHIFT) check in arm_spe_pmu_event_init(), because
    now CX bit cannot be set in arm_spe_event_to_pmscr() with perfmon_capable()
    disabled.

    Cc: Will Deacon
    Cc: Mark Rutland
    Cc: Alexey Budankov
    Cc: linux-arm-kernel@lists.infradead.org
    Cc: linux-kernel@vger.kernel.org
    Fixes: d5d9696b0380 ("drivers/perf: Add support for ARMv8.2 Statistical Profiling Extension")
    Reported-by: German Gomez
    Signed-off-by: Anshuman Khandual
    Reviewed-by: Suzuki K Poulose
    Link: https://lore.kernel.org/r/20220714061302.2715102-1-anshuman.khandual@arm.com
    Signed-off-by: Will Deacon
    Signed-off-by: Sasha Levin

    Anshuman Khandual
     

26 Jul, 2022

1 commit

  • Add driver for i.MX9 DDR PerfMon.

    Usage:
    1. cycles event
    # perf stat -a -I 1000 -e imx9_ddr0/cycles,counter=0/ or perf stat -a -I -e 1000 imx9_ddr0/cycles/
    2. reference events
    # perf stat -a -I 1000 -e imx9_ddr0/ddrc_ddrc1_rmw_for_ecc,counter=X/
    3. counter specific events, such as counter 5
    # perf stat -a -I 1000 -e imx9_ddr0/eddrtq_pmon_ld_rdq1,counter=5/

    Axi filtering feature:
    4. for read transaction:
    # perf stat -a -I 1000 -e imx9_ddr0/eddrtq_pm_rd_trans_filt,counter=2,axi_mask=ID_MASK,axi_id=ID/
    5. for write transaction:
    # perf stat -a -I 1000 -e imx9_ddr0/eddrtq_pm_wr_trans_filt,counter=3,axi_mask=ID_MASK,axi_id=ID/
    6. for read beat:
    # perf stat -a -I 1000 -e imx9_ddr0/eddrtq_pm_rd_beat_filt,counter=4,axi_mask=ID_MASK,axi_id=ID/

    For example (for cortex-a55):
    # perf stat -a -I 1000 -e imx9_ddr0/eddrtq_pm_rd_trans_filt,counter=2,axi_mask=0xe00f,axi_id=0x0006/
    # perf stat -a -I 1000 -e imx9_ddr0/eddrtq_pm_wr_trans_filt,counter=3,axi_mask=0xe00f,axi_id=0x0006/
    # perf stat -a -I 1000 -e imx9_ddr0/eddrtq_pm_rd_beat_filt,counter=4,axi_mask=0xe00f,axi_id=0x0006/

    v2:
    - using platform_get_irq()

    Signed-off-by: Xu Yang
    Reviewed-by: Peng Fan

    Xu Yang
     

30 Jun, 2022

1 commit

  • This is the 5.15.41 stable release

    * tag 'v5.15.41': (1977 commits)
    Linux 5.15.41
    usb: gadget: uvc: allow for application to cleanly shutdown
    usb: gadget: uvc: rename function to be more consistent
    ...

    Signed-off-by: Jason Liu

    Conflicts:
    arch/arm64/boot/dts/freescale/fsl-ls1043a.dtsi
    arch/arm64/boot/dts/freescale/fsl-ls1046a.dtsi
    arch/arm64/configs/defconfig
    drivers/clk/imx/clk-imx8qxp-lpcg.c
    drivers/dma/imx-sdma.c
    drivers/gpu/drm/bridge/nwl-dsi.c
    drivers/mailbox/imx-mailbox.c
    drivers/net/phy/at803x.c
    drivers/tty/serial/fsl_lpuart.c
    security/keys/trusted-keys/trusted_core.c

    Jason Liu
     

27 Apr, 2022

1 commit

  • commit e5c23779f93d45e39a52758ca593bd7e62e9b4be upstream.

    In the case where there is only a cycle counter available (i.e.
    PMCR_EL0.N is 0) and an event other than CPU cycles is opened, the open
    should fail as the event can never possibly be scheduled. However, the
    event validation when an event is opened is skipped when the group
    leader is opened. Fix this by always validating the group leader events.

    Reported-by: Al Grant
    Cc: Will Deacon
    Cc: Mark Rutland
    Signed-off-by: Rob Herring
    Acked-by: Mark Rutland
    Link: https://lore.kernel.org/r/20220408203330.4014015-1-robh@kernel.org
    Cc:
    Signed-off-by: Will Deacon
    Signed-off-by: Greg Kroah-Hartman

    Rob Herring
     

20 Apr, 2022

1 commit

  • [ Upstream commit d02b4dd84e1a90f7f1444d027c0289bf355b0d5a ]

    Fix:

    In file included from :0:0:
    In function ‘ddr_perf_counter_enable’,
    inlined from ‘ddr_perf_irq_handler’ at drivers/perf/fsl_imx8_ddr_perf.c:651:2:
    ././include/linux/compiler_types.h:352:38: error: call to ‘__compiletime_assert_729’ \
    declared with attribute error: FIELD_PREP: mask is not constant
    _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
    ...

    See https://lore.kernel.org/r/YkwQ6%2BtIH8GQpuct@zn.tnic for the gory
    details as to why it triggers with older gccs only.

    Signed-off-by: Borislav Petkov
    Cc: Frank Li
    Cc: Will Deacon
    Cc: Mark Rutland
    Cc: Shawn Guo
    Cc: Sascha Hauer
    Cc: Pengutronix Kernel Team
    Cc: Fabio Estevam
    Cc: NXP Linux Team
    Cc: linux-arm-kernel@lists.infradead.org
    Acked-by: Will Deacon
    Link: https://lore.kernel.org/r/20220405151517.29753-10-bp@alien8.de
    Signed-off-by: Will Deacon
    Signed-off-by: Sasha Levin

    Borislav Petkov
     

14 Apr, 2022

1 commit

  • commit 2012a9e279013933885983cbe0a5fe828052563b upstream.

    The bug is here:
    return cluster;

    The list iterator value 'cluster' will *always* be set and non-NULL
    by list_for_each_entry(), so it is incorrect to assume that the
    iterator value will be NULL if the list is empty or no element
    is found.

    To fix the bug, return 'cluster' when found, otherwise return NULL.

    Cc: stable@vger.kernel.org
    Fixes: 21bdbb7102ed ("perf: add qcom l2 cache perf events driver")
    Signed-off-by: Xiaomeng Tong
    Link: https://lore.kernel.org/r/20220327055733.4070-1-xiam0nd.tong@gmail.com
    Signed-off-by: Will Deacon
    Signed-off-by: Greg Kroah-Hartman

    Xiaomeng Tong
     

11 Mar, 2022

1 commit

  • This is the 5.15.27 stable release

    * tag 'v5.15.27': (3069 commits)
    Linux 5.15.27
    hamradio: fix macro redefine warning
    KVM: x86/mmu: Passing up the error state of mmu_alloc_shadow_roots()
    ...

    Signed-off-by: Jason Liu

    Conflicts:
    arch/arm/boot/dts/imx7ulp.dtsi
    arch/arm64/boot/dts/freescale/fsl-ls1028a-qds.dts
    arch/arm64/boot/dts/freescale/imx8mq.dtsi
    drivers/dma-buf/heaps/cma_heap.c
    drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
    drivers/gpu/drm/mxsfb/mxsfb_kms.c
    drivers/mmc/host/sdhci-esdhc-imx.c
    drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c
    drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c
    drivers/rpmsg/rpmsg_char.c
    drivers/soc/imx/gpcv2.c
    drivers/thermal/imx_thermal.c

    Jason Liu
     

27 Jan, 2022

1 commit

  • [ Upstream commit 56c7c6eaf3eb8ac1ec40d56096c0f2b27250da5f ]

    Attempting to migrate the PMU context after we've unregistered the PMU
    device, or especially if we never successfully registered it in the
    first place, is a woefully bad idea. It's also fundamentally pointless
    anyway. Make sure to unregister an instance from the hotplug handler
    *without* invoking the teardown callback.

    Fixes: 0ba64770a2f2 ("perf: Add Arm CMN-600 PMU driver")
    Signed-off-by: Robin Murphy
    Link: https://lore.kernel.org/r/2c221d745544774e4b07583b65b5d4d94f7e0fe4.1638530442.git.robin.murphy@arm.com
    Signed-off-by: Will Deacon
    Signed-off-by: Sasha Levin

    Robin Murphy
     

02 Nov, 2021

8 commits


20 Sep, 2021

1 commit

  • Russell reported that since 5.13, KVM's probing of the PMU has
    started to fail on his HW. As it turns out, there is an implicit
    ordering dependency between the architectural PMU probing code and
    and KVM's own probing. If, due to probe ordering reasons, KVM probes
    before the PMU driver, it will fail to detect the PMU and prevent it
    from being advertised to guests as well as the VMM.

    Obviously, this is one probing too many, and we should be able to
    deal with any ordering.

    Add a callback from the PMU code into KVM to advertise the registration
    of a host CPU PMU, allowing for any probing order.

    Fixes: 5421db1be3b1 ("KVM: arm64: Divorce the perf code from oprofile helpers")
    Reported-by: "Russell King (Oracle)"
    Tested-by: Russell King (Oracle)
    Signed-off-by: Marc Zyngier
    Link: https://lore.kernel.org/r/YUYRKVflRtUytzy5@shell.armlinux.org.uk
    Cc: stable@vger.kernel.org

    Marc Zyngier
     

18 Jun, 2021

2 commits


11 Jun, 2021

6 commits

  • Use common macro PMU_EVENT_ATTR_ID to simplify IMX8_DDR_PMU_EVENT_ATTR

    Reviewed by Frank Li

    Cc: Frank Li
    Cc: Will Deacon
    Cc: Mark Rutland
    Signed-off-by: Qi Liu
    Link: https://lore.kernel.org/r/1623220863-58233-7-git-send-email-liuqi115@huawei.com
    Signed-off-by: Will Deacon

    Qi Liu
     
  • Use common macro PMU_EVENT_ATTR_ID to simplify XGENE_PMU_EVENT_ATTR

    Cc: Khuong Dinh
    Cc: Will Deacon
    Cc: Mark Rutland
    Signed-off-by: Qi Liu
    Link: https://lore.kernel.org/r/1623220863-58233-6-git-send-email-liuqi115@huawei.com
    Signed-off-by: Will Deacon

    Qi Liu
     
  • Use common macro PMU_EVENT_ATTR_ID to simplify L3CACHE_EVENT_ATTR

    Cc: Andy Gross
    Cc: Will Deacon
    Cc: Mark Rutland
    Signed-off-by: Qi Liu
    Link: https://lore.kernel.org/r/1623220863-58233-5-git-send-email-liuqi115@huawei.com
    Signed-off-by: Will Deacon

    Qi Liu
     
  • Use common macro PMU_EVENT_ATTR_ID to simplify L2CACHE_EVENT_ATTR

    Cc: Andy Gross
    Cc: Will Deacon
    Cc: Mark Rutland
    Signed-off-by: Qi Liu
    Link: https://lore.kernel.org/r/1623220863-58233-4-git-send-email-liuqi115@huawei.com
    Signed-off-by: Will Deacon

    Qi Liu
     
  • Use common macro PMU_EVENT_ATTR_ID to simplify SMMU_EVENT_ATTR

    Cc: Will Deacon
    Cc: Mark Rutland
    Signed-off-by: Qi Liu
    Link: https://lore.kernel.org/r/1623220863-58233-3-git-send-email-liuqi115@huawei.com
    Signed-off-by: Will Deacon

    Qi Liu
     
  • With global filtering, we only allow an event to be scheduled if its
    filter settings exactly match those of any existing events, therefore
    it is pointless to reapply the filter in that case. Much worse, though,
    is that in doing that we trample the event type of counter 0 if it's
    already active, and never touch the appropriate PMEVTYPERn so the new
    event is likely not counting the right thing either. Don't do that.

    CC: stable@vger.kernel.org
    Signed-off-by: Robin Murphy
    Link: https://lore.kernel.org/r/32c80c0e46237f49ad8da0c9f8864e13c4a803aa.1623153312.git.robin.murphy@arm.com
    Signed-off-by: Will Deacon

    Robin Murphy
     

08 Jun, 2021

2 commits


05 Jun, 2021

1 commit

  • 'Data source' is a new function for HHA PMU and config / clear
    interface was wrong by mistake. 'HHA_DATSRC_CTRL' register is
    mainly used for data source configuration, if we enable bit0
    as driver, it will go on count the event and we didn't check
    it carefully. So fix the issue and do as the initial purpose.

    Fixes: 932f6a99f9b0 ("drivers/perf: hisi: Add new functions for HHA PMU")
    Reported-by: kernel test robot
    Cc: Will Deacon
    Cc: Mark Rutland
    Signed-off-by: Shaokun Zhang
    Link: https://lore.kernel.org/r/1622709291-37996-1-git-send-email-zhangshaokun@hisilicon.com
    Signed-off-by: Will Deacon

    Shaokun Zhang
     

02 Jun, 2021

2 commits

  • request_irq() after setting IRQ_NOAUTOEN as below
    irq_set_status_flags(irq, IRQ_NOAUTOEN); request_irq(dev, irq...); can
    be replaced by request_irq() with IRQF_NO_AUTOEN flag.

    this patch is made base on "add IRQF_NO_AUTOEN for request_irq" which
    is being merged: https://lore.kernel.org/patchwork/patch/1388765/

    Signed-off-by: Tian Tao
    Acked-by: Mark Rutland
    Link: https://lore.kernel.org/r/1622595642-61678-3-git-send-email-tiantao6@hisilicon.com
    Signed-off-by: Will Deacon

    Tian Tao
     
  • request_irq() after setting IRQ_NOAUTOEN as below
    irq_set_status_flags(irq, IRQ_NOAUTOEN);
    request_irq(dev, irq...);
    can be replaced by request_irq() with IRQF_NO_AUTOEN flag.

    this patch is made base on "add IRQF_NO_AUTOEN for request_irq" which
    is being merged: https://lore.kernel.org/patchwork/patch/1388765/

    Signed-off-by: Tian Tao
    Acked-by: Mark Rutland
    Link: https://lore.kernel.org/r/1622595642-61678-2-git-send-email-tiantao6@hisilicon.com
    Signed-off-by: Will Deacon

    Tian Tao
     

01 Jun, 2021

5 commits

  • Use DEVICE_ATTR_RO() helper instead of plain DEVICE_ATTR(),
    which makes the code a bit shorter and easier to read.

    Signed-off-by: YueHaibing
    Link: https://lore.kernel.org/r/20210528061738.23392-1-yuehaibing@huawei.com
    Signed-off-by: Will Deacon

    YueHaibing
     
  • Use DEVICE_ATTR_RO() helper instead of plain DEVICE_ATTR(),
    which makes the code a bit shorter and easier to read.

    Signed-off-by: YueHaibing
    Link: https://lore.kernel.org/r/20210528014940.4184-1-yuehaibing@huawei.com
    Signed-off-by: Will Deacon

    YueHaibing
     
  • Use DEVICE_ATTR_RO() helper instead of plain DEVICE_ATTR(),
    which makes the code a bit shorter and easier to read.

    Signed-off-by: YueHaibing
    Link: https://lore.kernel.org/r/20210528014749.24068-1-yuehaibing@huawei.com
    Signed-off-by: Will Deacon

    YueHaibing
     
  • Use DEVICE_ATTR_RO helper instead of plain DEVICE_ATTR,
    which makes the code a bit shorter and easier to read.

    Signed-off-by: YueHaibing
    Link: https://lore.kernel.org/r/20210528014130.7708-1-yuehaibing@huawei.com
    Signed-off-by: Will Deacon

    YueHaibing
     
  • s/Hisilicon/HiSilicon/.
    It should use capital S, according to the official website
    https://www.hisilicon.com/en.

    Signed-off-by: Hao Fang
    Link: https://lore.kernel.org/r/1621679037-15323-1-git-send-email-fanghao11@huawei.com
    Signed-off-by: Will Deacon

    Hao Fang
     

26 May, 2021

3 commits

  • Fix some coding style issues reported by checkpatch.pl, including
    following types:

    ERROR: need consistent spacing around '-' (ctx:WxV)
    ERROR: space required before the open parenthesis '('

    Signed-off-by: Junhao He
    Signed-off-by: Jay Fang
    Link: https://lore.kernel.org/r/1620736054-58412-5-git-send-email-f.fangjian@huawei.com
    Signed-off-by: Will Deacon

    Junhao He
     
  • Fix a warning from checkpatch.pl.

    ERROR: space required after that ',' (ctx:VxV)

    Signed-off-by: Junhao He
    Signed-off-by: Jay Fang
    Link: https://lore.kernel.org/r/1620736054-58412-4-git-send-email-f.fangjian@huawei.com
    Signed-off-by: Will Deacon

    Junhao He
     
  • Fix some coding style issues reported by checkpatch.pl, including
    following types:

    ERROR: spaces required around that '=' (ctx:VxW)
    WARNING: Possible unnecessary 'out of memory' message

    Signed-off-by: Junhao He
    Signed-off-by: Jay Fang
    Link: https://lore.kernel.org/r/1620736054-58412-3-git-send-email-f.fangjian@huawei.com
    Signed-off-by: Will Deacon

    Junhao He