mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] pmdomain: fix collision in names when registering
@ 2025-12-16 10:24 Maud Spierings via B4 Relay
  2025-12-16 10:35 ` Ahmad Fatoum
  0 siblings, 1 reply; 4+ messages in thread
From: Maud Spierings via B4 Relay @ 2025-12-16 10:24 UTC (permalink / raw)
  To: Sascha Hauer, BAREBOX; +Cc: Maud Spierings

From: Maud Spierings <maudspierings@gocontroll.com>

After adding the imx8m-blk-ctrl driver errors started appearing about
the genpd device already being registered.

incorperate some extra device details in the device name so this
possible collision goes away.

Signed-off-by: Maud Spierings <maudspierings@gocontroll.com>
---
It wasn't just errors, it started crashing but that is a seperate issue.
It at least loads normally with this change
---
 drivers/base/power.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/base/power.c b/drivers/base/power.c
index c71389422a..af06f984c0 100644
--- a/drivers/base/power.c
+++ b/drivers/base/power.c
@@ -506,7 +506,7 @@ struct device *genpd_dev_pm_attach_by_id(struct device *dev,
 	if (!virt_dev)
 		return ERR_PTR(-ENOMEM);
 
-	dev_set_name(virt_dev, "genpd");
+	dev_set_name(virt_dev, "genpd:%u:%s", index, dev_name(dev));
 	virt_dev->bus = &genpd_bus_type;
 	virt_dev->parent = dev;
 	virt_dev->of_node = dev->of_node;

---
base-commit: 63898c48611dfe51409ff1f4e1c30de4b2737c48
change-id: 20251216-genpd_fix-0f1ed7d8cbb2

Best regards,
-- 
Maud Spierings <maudspierings@gocontroll.com>





^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] pmdomain: fix collision in names when registering
  2025-12-16 10:24 [PATCH] pmdomain: fix collision in names when registering Maud Spierings via B4 Relay
@ 2025-12-16 10:35 ` Ahmad Fatoum
  2025-12-16 10:39   ` Maud Spierings
  0 siblings, 1 reply; 4+ messages in thread
From: Ahmad Fatoum @ 2025-12-16 10:35 UTC (permalink / raw)
  To: maudspierings, Sascha Hauer, BAREBOX

Hello Maud,

On 12/16/25 11:24 AM, Maud Spierings via B4 Relay wrote:
> From: Maud Spierings <maudspierings@gocontroll.com>
> 
> After adding the imx8m-blk-ctrl driver errors started appearing about
> the genpd device already being registered.
> 
> incorperate some extra device details in the device name so this
> possible collision goes away.
> 
> Signed-off-by: Maud Spierings <maudspierings@gocontroll.com>

Thanks for your patch. Did you check what the device is called now?

Do we need to change virt_dev->id = DEVICE_ID_SINGLE; just after the
context to get rid of a trailing 0?

Cheers,
Ahmad

> ---
> It wasn't just errors, it started crashing but that is a seperate issue.
> It at least loads normally with this change
> ---
>  drivers/base/power.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/base/power.c b/drivers/base/power.c
> index c71389422a..af06f984c0 100644
> --- a/drivers/base/power.c
> +++ b/drivers/base/power.c
> @@ -506,7 +506,7 @@ struct device *genpd_dev_pm_attach_by_id(struct device *dev,
>  	if (!virt_dev)
>  		return ERR_PTR(-ENOMEM);
>  
> -	dev_set_name(virt_dev, "genpd");
> +	dev_set_name(virt_dev, "genpd:%u:%s", index, dev_name(dev));
>  	virt_dev->bus = &genpd_bus_type;
>  	virt_dev->parent = dev;
>  	virt_dev->of_node = dev->of_node;
> 
> ---
> base-commit: 63898c48611dfe51409ff1f4e1c30de4b2737c48
> change-id: 20251216-genpd_fix-0f1ed7d8cbb2
> 
> Best regards,

-- 
Pengutronix e.K.                  |                             |
Steuerwalder Str. 21              | http://www.pengutronix.de/  |
31137 Hildesheim, Germany         | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686  | Fax:   +49-5121-206917-5555 |




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] pmdomain: fix collision in names when registering
  2025-12-16 10:35 ` Ahmad Fatoum
@ 2025-12-16 10:39   ` Maud Spierings
  2025-12-16 10:43     ` Ahmad Fatoum
  0 siblings, 1 reply; 4+ messages in thread
From: Maud Spierings @ 2025-12-16 10:39 UTC (permalink / raw)
  To: Ahmad Fatoum, Sascha Hauer, BAREBOX

On 12/16/25 11:35, Ahmad Fatoum wrote:
> Hello Maud,
> 
> On 12/16/25 11:24 AM, Maud Spierings via B4 Relay wrote:
>> From: Maud Spierings <maudspierings@gocontroll.com>
>>
>> After adding the imx8m-blk-ctrl driver errors started appearing about
>> the genpd device already being registered.
>>
>> incorperate some extra device details in the device name so this
>> possible collision goes away.
>>
>> Signed-off-by: Maud Spierings <maudspierings@gocontroll.com>
> 
> Thanks for your patch. Did you check what the device is called now?
> 
> Do we need to change virt_dev->id = DEVICE_ID_SINGLE; just after the
> context to get rid of a trailing 0?

`-- genpd:0:32ec0000.blk-ctrl@32ec0000.of0
`-- genpd:1:32ec0000.blk-ctrl@32ec0000.of1
`-- genpd:2:32ec0000.blk-ctrl@32ec0000.of2
`-- genpd:3:32ec0000.blk-ctrl@32ec0000.of3
`-- genpd:4:32ec0000.blk-ctrl@32ec0000.of4
`-- genpd:5:32ec0000.blk-ctrl@32ec0000.of5
`-- genpd:6:32ec0000.blk-ctrl@32ec0000.of6
`-- genpd:7:32ec0000.blk-ctrl@32ec0000.of7
`-- genpd:8:32ec0000.blk-ctrl@32ec0000.of8
`-- genpd:9:32ec0000.blk-ctrl@32ec0000.of9

`-- genpd:0:32f10000.blk-ctrl@32f10000.of0
`-- genpd:1:32f10000.blk-ctrl@32f10000.of1
`-- genpd:2:32f10000.blk-ctrl@32f10000.of2
`-- genpd:3:32f10000.blk-ctrl@32f10000.of3
`-- genpd:4:32f10000.blk-ctrl@32f10000.of4
`-- genpd:5:32f10000.blk-ctrl@32f10000.of5

I guess that means .of#
So I should set that option?

Kind regards,
Maud




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] pmdomain: fix collision in names when registering
  2025-12-16 10:39   ` Maud Spierings
@ 2025-12-16 10:43     ` Ahmad Fatoum
  0 siblings, 0 replies; 4+ messages in thread
From: Ahmad Fatoum @ 2025-12-16 10:43 UTC (permalink / raw)
  To: Maud Spierings, Sascha Hauer, BAREBOX

Hi,

On 12/16/25 11:39 AM, Maud Spierings wrote:
> On 12/16/25 11:35, Ahmad Fatoum wrote:
>> Hello Maud,
>>
>> On 12/16/25 11:24 AM, Maud Spierings via B4 Relay wrote:
>>> From: Maud Spierings <maudspierings@gocontroll.com>
>>>
>>> After adding the imx8m-blk-ctrl driver errors started appearing about
>>> the genpd device already being registered.
>>>
>>> incorperate some extra device details in the device name so this
>>> possible collision goes away.
>>>
>>> Signed-off-by: Maud Spierings <maudspierings@gocontroll.com>
>>
>> Thanks for your patch. Did you check what the device is called now?
>>
>> Do we need to change virt_dev->id = DEVICE_ID_SINGLE; just after the
>> context to get rid of a trailing 0?
> 
> `-- genpd:0:32ec0000.blk-ctrl@32ec0000.of0
> `-- genpd:1:32ec0000.blk-ctrl@32ec0000.of1
> `-- genpd:2:32ec0000.blk-ctrl@32ec0000.of2
> `-- genpd:3:32ec0000.blk-ctrl@32ec0000.of3
> `-- genpd:4:32ec0000.blk-ctrl@32ec0000.of4
> `-- genpd:5:32ec0000.blk-ctrl@32ec0000.of5
> `-- genpd:6:32ec0000.blk-ctrl@32ec0000.of6
> `-- genpd:7:32ec0000.blk-ctrl@32ec0000.of7
> `-- genpd:8:32ec0000.blk-ctrl@32ec0000.of8
> `-- genpd:9:32ec0000.blk-ctrl@32ec0000.of9
> 
> `-- genpd:0:32f10000.blk-ctrl@32f10000.of0
> `-- genpd:1:32f10000.blk-ctrl@32f10000.of1
> `-- genpd:2:32f10000.blk-ctrl@32f10000.of2
> `-- genpd:3:32f10000.blk-ctrl@32f10000.of3
> `-- genpd:4:32f10000.blk-ctrl@32f10000.of4
> `-- genpd:5:32f10000.blk-ctrl@32f10000.of5
> 
> I guess that means .of#
> So I should set that option?

Yes, please replace the existing virt_dev->id = index; with that.

Thanks,
Ahmad

> 
> Kind regards,
> Maud
> 
> 

-- 
Pengutronix e.K.                  |                             |
Steuerwalder Str. 21              | http://www.pengutronix.de/  |
31137 Hildesheim, Germany         | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686  | Fax:   +49-5121-206917-5555 |




^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2025-12-16 11:05 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-12-16 10:24 [PATCH] pmdomain: fix collision in names when registering Maud Spierings via B4 Relay
2025-12-16 10:35 ` Ahmad Fatoum
2025-12-16 10:39   ` Maud Spierings
2025-12-16 10:43     ` Ahmad Fatoum

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox