Re: [PATCH 6/7] of/platform: Skip coresight etm4x devices from AMBA bus

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




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.



[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux