Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / Atom feed
From: Robin Murphy <robin.murphy@arm.com>
To: Andre Przywara <andre.przywara@arm.com>,
	Maxime Ripard <maxime@cerno.tech>,
	Mark Rutland <Mark.Rutland@arm.com>,
	Rob Herring <robh@kernel.org>
Cc: Chen-Yu Tsai <wens@csie.org>, Maxime Ripard <mripard@kernel.org>,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 1/2] arm64: dts: allwinner: h5: Fix PMU compatible
Date: Fri, 14 Feb 2020 18:18:41 +0000
Message-ID: <8e9f3a0e-d803-77bf-8f0f-04a7f4a00687@arm.com> (raw)
In-Reply-To: <20200214180404.24d67f86@donnerap.cambridge.arm.com>

On 14/02/2020 6:04 pm, Andre Przywara wrote:
> On Mon, 10 Feb 2020 10:55:59 +0100
> Maxime Ripard <maxime@cerno.tech> wrote:
> 
> Hi,
> 
>> 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?

"the" MIDR... ;)

Usual big.LITTLE vs. CPU hotplug rules apply.

> 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.

> 
> Cheers,
> Andre
> 
>> Make sure we follow the binding.
> 
> 
>>
>> Fixes: c35a516a4618 ("arm64: dts: allwinner: H5: Add PMU node")
>> Signed-off-by: Maxime Ripard <maxime@cerno.tech>
>> ---
>>   arch/arm64/boot/dts/allwinner/sun50i-h5.dtsi | 3 +--
>>   1 file changed, 1 insertion(+), 2 deletions(-)
>>
>> diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h5.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h5.dtsi
>> index 9893aa64dd0b..4462a68c0681 100644
>> --- a/arch/arm64/boot/dts/allwinner/sun50i-h5.dtsi
>> +++ b/arch/arm64/boot/dts/allwinner/sun50i-h5.dtsi
>> @@ -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
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
> 

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply index

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-10  9:55 Maxime Ripard
2020-02-10  9:56 ` [PATCH 2/2] arm64: dts: allwinner: h6: " Maxime Ripard
2020-02-25  9:03   ` Maxime Ripard
2020-02-14 18:04 ` [PATCH 1/2] arm64: dts: allwinner: h5: " Andre Przywara
2020-02-14 18:18   ` Robin Murphy [this message]
2020-02-17 17:49   ` Maxime Ripard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8e9f3a0e-d803-77bf-8f0f-04a7f4a00687@arm.com \
    --to=robin.murphy@arm.com \
    --cc=Mark.Rutland@arm.com \
    --cc=andre.przywara@arm.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=maxime@cerno.tech \
    --cc=mripard@kernel.org \
    --cc=robh@kernel.org \
    --cc=wens@csie.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Linux-ARM-Kernel Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-arm-kernel/0 linux-arm-kernel/git/0.git
	git clone --mirror https://lore.kernel.org/linux-arm-kernel/1 linux-arm-kernel/git/1.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-arm-kernel linux-arm-kernel/ https://lore.kernel.org/linux-arm-kernel \
		linux-arm-kernel@lists.infradead.org
	public-inbox-index linux-arm-kernel

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.infradead.lists.linux-arm-kernel


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git