arm64: dts: allwinner: h5: Fix PMU compatible
Subsystems (2)
PATCH 1/2 arm64: dts: allwinner: h5: Fix PMU compatible
The commit c35a516a4618 ("arm64: dts: allwinner: H5: Add PMU node") introduced support for the PMU found on the Allwinner H5. However, the binding only allows for a single compatible, while the patch was adding two.
Make sure we follow the binding.
--- arch/arm64/boot/dts/allwinner/sun50i-h5.dtsi | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
arch/arm64/boot/dts/allwinner/sun50i-h5.dtsi +1 -2
@@ -38,8 +38,7 @@ cpu3: cpu@3 { }; pmu { - compatible = "arm,cortex-a53-pmu", - "arm,armv8-pmuv3"; + compatible = "arm,cortex-a53-pmu"; interrupts = <GIC_SPI 116 IRQ_TYPE_LEVEL_HIGH>, <GIC_SPI 117 IRQ_TYPE_LEVEL_HIGH>, <GIC_SPI 118 IRQ_TYPE_LEVEL_HIGH>,
Signature · 7 lines
2.24.1 _______________________________________________ linux-arm-kernel mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
PATCH 2/2 arm64: dts: allwinner: h6: Fix PMU compatible
The commit 7aa9b9eb7d6a ("arm64: dts: allwinner: H6: Add PMU mode") introduced support for the PMU found on the Allwinner H6. However, the binding only allows for a single compatible, while the patch was adding two.
Make sure we follow the binding.
--- arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi +1 -2
@@ -70,8 +70,7 @@ ext_osc32k: ext_osc32k_clk { }; pmu { - compatible = "arm,cortex-a53-pmu", - "arm,armv8-pmuv3"; + compatible = "arm,cortex-a53-pmu"; interrupts = <GIC_SPI 140 IRQ_TYPE_LEVEL_HIGH>, <GIC_SPI 141 IRQ_TYPE_LEVEL_HIGH>, <GIC_SPI 142 IRQ_TYPE_LEVEL_HIGH>,
Signature · 7 lines
2.24.1 _______________________________________________ linux-arm-kernel mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Re: [PATCH 2/2] arm64: dts: allwinner: h6: Fix PMU compatible
Quoted 9 lines · Maxime Ripard
The commit
7aa9b9eb7d6a("arm64: dts: allwinner: H6: Add PMU mode") introduced support for the PMU found on the Allwinner H6. However, the binding only allows for a single compatible, while the patch was adding two.Make sure we follow the binding.
Fixes 7aa9b9eb7d6a ("arm64: dts: allwinner: H6: Add PMU mode")Signed-off-by Maxime Ripard <[email protected]>
Applied both
Maxime
_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
On Mon, 10 Feb 2020 10:55:59 +0100
Maxime Ripard <[email protected]> wrote:
Hi,
Quoted 4 lines
The commit
c35a516a4618("arm64: dts: allwinner: H5: Add PMU node") introduced support for the PMU found on the Allwinner H5. However, the binding only allows for a single compatible, while the patch was adding two.
Maxime, thanks for bringing this up, was that found by some validation tool?
And while this is true, I wonder if this was intentional? I see several other combinations of PMU compatibles in the tree.
Mark, Rob, can you shed any light on this?
Actually I am wondering why we would need the PMU type in the first place, isn't that discoverable via the MIDR? And all we actually need from the DT is the interrupts and maybe some quirk info?
It looks like ACPI is always using the generic PMUv3 map, so wouldn't it actually be better to replace the compatible string matching with MIDR matching? Or are those core specific maps somewhat obsolete anyway? Since I don't see any newer cores in there?
Cheers,
Andre
Quoted 15 lines
Make sure we follow the binding.
Fixes c35a516a4618 ("arm64: dts: allwinner: H5: Add PMU node")Signed-off-by Maxime Ripard <[email protected]>--- arch/arm64/boot/dts/allwinner/sun50i-h5.dtsi | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)arch/arm64/boot/dts/allwinner/sun50i-h5.dtsi +0
-0
arch/arm64/boot/dts/allwinner/sun50i-h5.dtsi cpu3: cpu@3 { · line 44
Quoted 9 lines
arch/arm64/boot/dts/allwinner/sun50i-h5.dtsi +1
-2@@ -38,8 +38,7 @@ cpu3: cpu@3 { }; pmu { - compatible = "arm,cortex-a53-pmu", - "arm,armv8-pmuv3"; + compatible = "arm,cortex-a53-pmu"; interrupts = <GIC_SPI 116 IRQ_TYPE_LEVEL_HIGH>, <GIC_SPI 117 IRQ_TYPE_LEVEL_HIGH>, <GIC_SPI 118 IRQ_TYPE_LEVEL_HIGH>,
_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Quoted 10 lines · Andre Przywara
On Mon, 10 Feb 2020 10:55:59 +0100
Maxime Ripard <[email protected]> wrote:Hi,
Quoted 4 lines
The commit
c35a516a4618("arm64: dts: allwinner: H5: Add PMU node") introduced support for the PMU found on the Allwinner H5. However, the binding only allows for a single compatible, while the patch was adding two.
Quoted 8 lines
Maxime, thanks for bringing this up, was that found by some validation tool?
And while this is true, I wonder if this was intentional? I see several other combinations of PMU compatibles in the tree.
Mark, Rob, can you shed any light on this?
Actually I am wondering why we would need the PMU type in the first place, isn't that discoverable via the MIDR?
"the" MIDR... ;)
Usual big.LITTLE vs. CPU hotplug rules apply.
Quoted 3 lines
And all we actually need from the DT is the interrupts and maybe some quirk info?
It looks like ACPI is always using the generic PMUv3 map, so wouldn't it actually be better to replace the compatible string matching with MIDR matching? Or are those core specific maps somewhat obsolete anyway? Since I don't see any newer cores in there?
Mostly they're just long overdue for an update (and somewhat mitigated by the userspace JSON stuff in perf tools, but in principle there are still other users of perf_events). IIRC, the generic PMUv3 compatible was only ever meant to be for things like the AEM without a specific microarchitecture (cf. the "arm,armv8" CPU binding).
Robin.
Quoted 21 lines
Cheers,
AndreQuoted 17 lines
Make sure we follow the binding.
Fixes c35a516a4618 ("arm64: dts: allwinner: H5: Add PMU node")Signed-off-by Maxime Ripard <[email protected]>--- arch/arm64/boot/dts/allwinner/sun50i-h5.dtsi | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)arch/arm64/boot/dts/allwinner/sun50i-h5.dtsi +0
-0@@ -38,8 +38,7 @@ cpu3: cpu@3 { };
Quoted 14 lines
arch/arm64/boot/dts/allwinner/sun50i-h5.dtsi cpu3: cpu@3 { · line 44
Quoted 7 lines
arch/arm64/boot/dts/allwinner/sun50i-h5.dtsi +1
-2pmu { - compatible = "arm,cortex-a53-pmu", - "arm,armv8-pmuv3"; + compatible = "arm,cortex-a53-pmu"; interrupts = <GIC_SPI 116 IRQ_TYPE_LEVEL_HIGH>, <GIC_SPI 117 IRQ_TYPE_LEVEL_HIGH>, <GIC_SPI 118 IRQ_TYPE_LEVEL_HIGH>,_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Hi Andre,
Quoted 7 lines · Andre Przywara
Quoted 4 lines
The commit
c35a516a4618("arm64: dts: allwinner: H5: Add PMU node") introduced support for the PMU found on the Allwinner H5. However, the binding only allows for a single compatible, while the patch was adding two.Maxime, thanks for bringing this up, was that found by some validation tool?
Indeed.
Quoted 1 line
And while this is true, I wonder if this was intentional?
Either the YAML file:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/devicetree/bindings/arm/pmu.yaml
Or the text file that was there before it:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/devicetree/bindings/arm/pmu.txt?id=v5.0
Make it pretty clear that only a single entry is expected
Quoted 1 line
I see several other combinations of PMU compatibles in the tree.
I've probably sent around 50-100 patches for DT not following the binding on Allwinner platforms alone, so it doesn't really surprise me :)
Maxime
_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel