On Tue, Feb 18, 2025 at 10:31:42AM +0800, Robin Murphy wrote:
On 2025-02-18 1:21 am, Yin Fengwei wrote:Sorry. Forgot the link for the new proposed fix:
Currently, arm-cmn PMU driver assumes ACPI claim resource
for CMN600 + ACPI. But with CMN700 + ACPI, the device probe
failed because of resource claim failes when ioremap() is
called:
[ 10.837300] arm-cmn ARMHC700:00: error -EBUSY: can't request region for resource [mem 0x40000000-0x4fffffff]
[ 10.847310] arm-cmn ARMHC700:00: probe with driver arm-cmn failed with error -16
[ 10.854726] arm-cmn ARMHC700:02: error -EBUSY: can't request region for resource [mem 0x40040000000-0x4004fffffff]
[ 10.865085] arm-cmn ARMHC700:02: probe with driver arm-cmn failed with error -16
Let CMN700 + ACPI do same as CMN600 + ACPI to allow CMN700
work in ACPI env.
No, the CMN-600 routine is a special case for CMN-600 having two nested
memory resources of its own. CMN-700 and everything else only have one
memory resource, so that is not appropriate. What else is claiming the
region to cause a conflict?
https://lore.kernel.org/all/Z7QYlUP6nfBNMXsv@U-V2QX163P-2032.local/
My understanding is that there are two problems here:
1. ACPI claim the memory range and that's why we see this -EBUSY error
with correct code path for CMN700 + ACPI table.
2. It's not correct to apply CMN600 probe method to CMN700 because
CMN600 has two nested memory resouces while CMN700 should only have
one memory resource. And you don't want to introduce trick to handle
incorect ACPI DSDT.
Regards
Yin, Fengwei
Thanks,
Robin.