[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <6ac7d093-b11c-b37f-8058-72c8d41fba73@arm.com>
Date: Mon, 20 Mar 2023 11:07:51 +0530
From: Anshuman Khandual <anshuman.khandual@....com>
To: Suzuki K Poulose <suzuki.poulose@....com>,
Rob Herring <robh+dt@...nel.org>
Cc: linux-arm-kernel@...ts.infradead.org, coresight@...ts.linaro.org,
scclevenger@...amperecomputing.com,
Frank Rowand <frowand.list@...il.com>,
Russell King <linux@...linux.org.uk>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
"Rafael J. Wysocki" <rafael@...nel.org>,
Len Brown <lenb@...nel.org>,
Sudeep Holla <sudeep.holla@....com>,
Lorenzo Pieralisi <lpieralisi@...nel.org>,
Mathieu Poirier <mathieu.poirier@...aro.org>,
Mike Leach <mike.leach@...aro.org>,
Leo Yan <leo.yan@...aro.org>, devicetree@...r.kernel.org,
linux-acpi@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 6/7] of/platform: Skip coresight etm4x devices from AMBA
bus
On 3/17/23 21:33, Suzuki K Poulose wrote:
>>> drivers/of/platform.c | 10 +++++++++-
>>> 1 file changed, 9 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/drivers/of/platform.c b/drivers/of/platform.c
>>> index b2bd2e783445..59ff1a38ccaa 100644
>>> --- a/drivers/of/platform.c
>>> +++ b/drivers/of/platform.c
>>> @@ -325,6 +325,13 @@ static const struct of_dev_auxdata *of_dev_lookup(const struct of_dev_auxdata *l
>>> return NULL;
>>> }
>>>
>>> +static const struct of_device_id of_ignore_amba_table[] = {
>>> +#ifdef CONFIG_CORESIGHT_SOURCE_ETM4X
>>> + { .compatible = "arm,coresight-etm4x" },
>>> +#endif
>>> + {} /* NULL terminated */
>>> +};
>>> +
>>> /**
>>> * of_platform_bus_create() - Create a device for a node and its children.
>>> * @bus: device node of the bus to instantiate
>>> @@ -373,7 +380,8 @@ static int of_platform_bus_create(struct device_node *bus,
>>> platform_data = auxdata->platform_data;
>>> }
>>>
>>> - if (of_device_is_compatible(bus, "arm,primecell")) {
>>> + if (of_device_is_compatible(bus, "arm,primecell") &&
>>> + unlikely(!of_match_node(of_ignore_amba_table, bus))) {
>>
>> of_match_node is going to take orders of magnitude longer than any
>> difference unlikely() would make. Drop it.
>
> Agreed.
Sure, will drop the unlikely() here.
Powered by blists - more mailing lists