[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <f66a649a-60dc-44ba-b8b0-b049c9e357fb@linaro.org>
Date: Fri, 8 Nov 2024 12:03:09 +0100
From: Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>
To: Yoshihiro Furudera <fj5100bi@...itsu.com>, Will Deacon <will@...nel.org>,
Mark Rutland <mark.rutland@....com>, Jonathan Corbet <corbet@....net>,
Catalin Marinas <catalin.marinas@....com>,
linux-arm-kernel@...ts.infradead.org,
Bjorn Andersson <quic_bjorande@...cinc.com>,
Geert Uytterhoeven <geert+renesas@...der.be>,
Dmitry Baryshkov <dmitry.baryshkov@...aro.org>,
Konrad Dybcio <konradybcio@...nel.org>,
Neil Armstrong <neil.armstrong@...aro.org>, Arnd Bergmann <arnd@...db.de>,
NĂcolas F. R. A. Prado <nfraprado@...labora.com>,
Thomas Gleixner <tglx@...utronix.de>, Peter Zijlstra <peterz@...radead.org>,
linux-doc@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/2] perf: Fujitsu: Add the Uncore MAC PMU driver
On 08/11/2024 06:40, Yoshihiro Furudera wrote:
> This adds a new dynamic PMU to the Perf Events framework to program and
> control the Uncore MAC PMUs in Fujitsu chips.
>
> This driver was created with reference to drivers/perf/qcom_l3_pmu.c.
>
> This driver exports formatting and event information to sysfs so it can
> be used by the perf user space tools with the syntaxes:
>
> perf stat -e mac_iod0_mac0_ch0/ea-mac/ ls
> perf stat -e mac_iod0_mac0_ch0/event=0x80/ ls
>
> FUJITSU-MONAKA Specification URL:
> https://github.com/fujitsu/FUJITSU-MONAKA
>
> Signed-off-by: Yoshihiro Furudera <fj5100bi@...itsu.com>
> ---
> .../admin-guide/perf/fujitsu_mac_pmu.rst | 20 +
> arch/arm64/configs/defconfig | 1 +
defconfig goes via your SoC maintainer. Split the patch and Cc the SoC
folks.
Which ARCH is it, BTW?
> drivers/perf/Kconfig | 9 +
> drivers/perf/Makefile | 1 +
> drivers/perf/fujitsu_mac_pmu.c | 633 ++++++++++++++++++
> include/linux/cpuhotplug.h | 1 +
> 6 files changed, 665 insertions(+)
> create mode 100644 Documentation/admin-guide/perf/fujitsu_mac_pmu.rst
> create mode 100644 drivers/perf/fujitsu_mac_pmu.c
>
> diff --git a/Documentation/admin-guide/perf/fujitsu_mac_pmu.rst b/Documentation/admin-guide/perf/fujitsu_mac_pmu.rst
> new file mode 100644
> index 000000000000..ddb3dcff3c61
> --- /dev/null
> +++ b/Documentation/admin-guide/perf/fujitsu_mac_pmu.rst
> @@ -0,0 +1,20 @@
> +===========================================================================
> +Fujitsu Uncore MAC Performance Monitoring Unit (PMU)
> +===========================================================================
> +
> +This driver supports the Uncore MAC PMUs found in Fujitsu chips.
> +Each MAC PMU on these chips is exposed as a uncore perf PMU with device name
> +mac_iod<iod>_mac<mac>_ch<ch>.
> +
> +The driver provides a description of its available events and configuration
> +options in sysfs, see /sys/bus/event_sources/devices/mac_iod<iod>_mac<mac>_ch<ch>/.
> +Given that these are uncore PMUs the driver also exposes a "cpumask" sysfs
> +attribute which contains a mask consisting of one CPU which will be used to
> +handle all the PMU events.
> +
> +Examples for use with perf::
> +
> + perf stat -e mac_iod0_mac0_ch0/ea-mac/ ls
> +
> +Given that these are uncore PMUs the driver does not support sampling, therefore
> +"perf record" will not work. Per-task perf sessions are not supported.
> diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig
> index 5fdbfea7a5b2..2ef412937228 100644
> --- a/arch/arm64/configs/defconfig
> +++ b/arch/arm64/configs/defconfig
> @@ -1575,6 +1575,7 @@ CONFIG_ARM_CMN=m
> CONFIG_ARM_SMMU_V3_PMU=m
> CONFIG_ARM_DSU_PMU=m
> CONFIG_FSL_IMX8_DDR_PMU=m
> +CONFIG_FUJITSU_MAC_PMU=y
> CONFIG_QCOM_L2_PMU=y
> CONFIG_QCOM_L3_PMU=y
> CONFIG_ARM_SPE_PMU=m
> diff --git a/drivers/perf/Kconfig b/drivers/perf/Kconfig
> index bab8ba64162f..4705c605e286 100644
> --- a/drivers/perf/Kconfig
> +++ b/drivers/perf/Kconfig
> @@ -178,6 +178,15 @@ config FSL_IMX9_DDR_PMU
> can give information about memory throughput and other related
> events.
>
> +config FUJITSU_MAC_PMU
> + bool "Fujitsu Uncore MAC PMU"
> + depends on (ARM64 && ACPI) || (COMPILE_TEST && 64BIT)
Missing depends on specific ARCH.
Sorry, this looks like work for some out of tree arch support. I don't
think we have any interest in taking it... unless it is part of bigger
patchset/work? If so, then provide *lore* link to relevant patchset.
Best regards,
Krzysztof
Powered by blists - more mailing lists