diff mbox series

[RFC,10/22] drivers: base: Move cpu_dev_init() after node_dev_init()

Message ID E1r0JLV-00CTxS-QB@rmk-PC.armlinux.org.uk (mailing list archive)
State New, archived
Headers show
Series Initial cleanups for vCPU hotplug | expand

Commit Message

Russell King (Oracle) Nov. 7, 2023, 10:30 a.m. UTC
From: James Morse <james.morse@arm.com>

NUMA systems require the node descriptions to be ready before CPUs are
registered. This is so that the node symlinks can be created in sysfs.

Currently no NUMA platform uses GENERIC_CPU_DEVICES, meaning that CPUs
are registered by arch code, instead of cpu_dev_init().

Move cpu_dev_init() after node_dev_init() so that NUMA architectures
can use GENERIC_CPU_DEVICES.

Signed-off-by: James Morse <james.morse@arm.com>
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
---
Note: Jonathan's comment still needs addressing - see
  https://lore.kernel.org/r/20230914121612.00006ac7@Huawei.com
---
 drivers/base/init.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Gavin Shan Nov. 13, 2023, 12:58 a.m. UTC | #1
On 11/7/23 20:30, Russell King (Oracle) wrote:
> From: James Morse <james.morse@arm.com>
> 
> NUMA systems require the node descriptions to be ready before CPUs are
> registered. This is so that the node symlinks can be created in sysfs.
> 
> Currently no NUMA platform uses GENERIC_CPU_DEVICES, meaning that CPUs
> are registered by arch code, instead of cpu_dev_init().
> 
> Move cpu_dev_init() after node_dev_init() so that NUMA architectures
> can use GENERIC_CPU_DEVICES.
> 
> Signed-off-by: James Morse <james.morse@arm.com>
> Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
> ---
> Note: Jonathan's comment still needs addressing - see
>    https://lore.kernel.org/r/20230914121612.00006ac7@Huawei.com
> ---
>   drivers/base/init.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 

With Jonathan's comments addressed:

Reviewed-by: Gavin Shan <gshan@redhat.com>
Russell King (Oracle) Nov. 13, 2023, 8 a.m. UTC | #2
On Mon, Nov 13, 2023 at 10:58:46AM +1000, Gavin Shan wrote:
> 
> 
> On 11/7/23 20:30, Russell King (Oracle) wrote:
> > From: James Morse <james.morse@arm.com>
> > 
> > NUMA systems require the node descriptions to be ready before CPUs are
> > registered. This is so that the node symlinks can be created in sysfs.
> > 
> > Currently no NUMA platform uses GENERIC_CPU_DEVICES, meaning that CPUs
> > are registered by arch code, instead of cpu_dev_init().
> > 
> > Move cpu_dev_init() after node_dev_init() so that NUMA architectures
> > can use GENERIC_CPU_DEVICES.
> > 
> > Signed-off-by: James Morse <james.morse@arm.com>
> > Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
> > ---
> > Note: Jonathan's comment still needs addressing - see
> >    https://lore.kernel.org/r/20230914121612.00006ac7@Huawei.com
> > ---
> >   drivers/base/init.c | 2 +-
> >   1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> 
> With Jonathan's comments addressed:

That needs James' input, which is why I made the note on the patch.
Russell King (Oracle) Nov. 21, 2023, 1:27 p.m. UTC | #3
On Mon, Nov 13, 2023 at 08:00:19AM +0000, Russell King (Oracle) wrote:
> On Mon, Nov 13, 2023 at 10:58:46AM +1000, Gavin Shan wrote:
> > 
> > 
> > On 11/7/23 20:30, Russell King (Oracle) wrote:
> > > From: James Morse <james.morse@arm.com>
> > > 
> > > NUMA systems require the node descriptions to be ready before CPUs are
> > > registered. This is so that the node symlinks can be created in sysfs.
> > > 
> > > Currently no NUMA platform uses GENERIC_CPU_DEVICES, meaning that CPUs
> > > are registered by arch code, instead of cpu_dev_init().
> > > 
> > > Move cpu_dev_init() after node_dev_init() so that NUMA architectures
> > > can use GENERIC_CPU_DEVICES.
> > > 
> > > Signed-off-by: James Morse <james.morse@arm.com>
> > > Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
> > > ---
> > > Note: Jonathan's comment still needs addressing - see
> > >    https://lore.kernel.org/r/20230914121612.00006ac7@Huawei.com
> > > ---
> > >   drivers/base/init.c | 2 +-
> > >   1 file changed, 1 insertion(+), 1 deletion(-)
> > > 
> > 
> > With Jonathan's comments addressed:
> 
> That needs James' input, which is why I made the note on the patch.

I'm going to be posting the series without RFC soon, and it will be
with Jonathan's comment unaddressed - because as I've said several
times it needs James' input and we have sadly not yet received that.

Short of waiting until James can respond, I don't think there are
any other alternatives.

I do hope we can get this queued up for v6.8 though.
Jonathan Cameron Nov. 28, 2023, 1:55 p.m. UTC | #4
On Tue, 21 Nov 2023 13:27:08 +0000
"Russell King (Oracle)" <linux@armlinux.org.uk> wrote:

> On Mon, Nov 13, 2023 at 08:00:19AM +0000, Russell King (Oracle) wrote:
> > On Mon, Nov 13, 2023 at 10:58:46AM +1000, Gavin Shan wrote:  
> > > 
> > > 
> > > On 11/7/23 20:30, Russell King (Oracle) wrote:  
> > > > From: James Morse <james.morse@arm.com>
> > > > 
> > > > NUMA systems require the node descriptions to be ready before CPUs are
> > > > registered. This is so that the node symlinks can be created in sysfs.
> > > > 
> > > > Currently no NUMA platform uses GENERIC_CPU_DEVICES, meaning that CPUs
> > > > are registered by arch code, instead of cpu_dev_init().
> > > > 
> > > > Move cpu_dev_init() after node_dev_init() so that NUMA architectures
> > > > can use GENERIC_CPU_DEVICES.
> > > > 
> > > > Signed-off-by: James Morse <james.morse@arm.com>
> > > > Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
> > > > ---
> > > > Note: Jonathan's comment still needs addressing - see
> > > >    https://lore.kernel.org/r/20230914121612.00006ac7@Huawei.com
> > > > ---
> > > >   drivers/base/init.c | 2 +-
> > > >   1 file changed, 1 insertion(+), 1 deletion(-)
> > > >   
> > > 
> > > With Jonathan's comments addressed:  
> > 
> > That needs James' input, which is why I made the note on the patch.  
> 
> I'm going to be posting the series without RFC soon, and it will be
> with Jonathan's comment unaddressed - because as I've said several
> times it needs James' input and we have sadly not yet received that.
> 
> Short of waiting until James can respond, I don't think there are
> any other alternatives.

In the interests of expediency I'm fine with that.  (To be honest I'd
forgotten I even made that comment ;)

Jonathan

> 
> I do hope we can get this queued up for v6.8 though.
>
Jonathan Cameron Nov. 28, 2023, 3 p.m. UTC | #5
On Tue, 28 Nov 2023 13:55:36 +0000
Jonathan Cameron <Jonathan.Cameron@Huawei.com> wrote:

> On Tue, 21 Nov 2023 13:27:08 +0000
> "Russell King (Oracle)" <linux@armlinux.org.uk> wrote:
> 
> > On Mon, Nov 13, 2023 at 08:00:19AM +0000, Russell King (Oracle) wrote:  
> > > On Mon, Nov 13, 2023 at 10:58:46AM +1000, Gavin Shan wrote:    
> > > > 
> > > > 
> > > > On 11/7/23 20:30, Russell King (Oracle) wrote:    
> > > > > From: James Morse <james.morse@arm.com>
> > > > > 
> > > > > NUMA systems require the node descriptions to be ready before CPUs are
> > > > > registered. This is so that the node symlinks can be created in sysfs.
> > > > > 
> > > > > Currently no NUMA platform uses GENERIC_CPU_DEVICES, meaning that CPUs
> > > > > are registered by arch code, instead of cpu_dev_init().
> > > > > 
> > > > > Move cpu_dev_init() after node_dev_init() so that NUMA architectures
> > > > > can use GENERIC_CPU_DEVICES.
> > > > > 
> > > > > Signed-off-by: James Morse <james.morse@arm.com>
> > > > > Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
> > > > > ---
> > > > > Note: Jonathan's comment still needs addressing - see
> > > > >    https://lore.kernel.org/r/20230914121612.00006ac7@Huawei.com
> > > > > ---
> > > > >   drivers/base/init.c | 2 +-
> > > > >   1 file changed, 1 insertion(+), 1 deletion(-)
> > > > >     
> > > > 
> > > > With Jonathan's comments addressed:    
> > > 
> > > That needs James' input, which is why I made the note on the patch.    
> > 
> > I'm going to be posting the series without RFC soon, and it will be
> > with Jonathan's comment unaddressed - because as I've said several
> > times it needs James' input and we have sadly not yet received that.
> > 
> > Short of waiting until James can respond, I don't think there are
> > any other alternatives.  
> 
> In the interests of expediency I'm fine with that.  (To be honest I'd
> forgotten I even made that comment ;)
>
 
Given what I was looking for was a 'nice to have' extra bit of info in the
patch description and I'm fine with the actual change even without that:

Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

> Jonathan
> 
> > 
> > I do hope we can get this queued up for v6.8 though.
*fingers crossed* !
> >   
> 
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Russell King (Oracle) Nov. 30, 2023, 12:17 p.m. UTC | #6
On Mon, Nov 13, 2023 at 10:58:46AM +1000, Gavin Shan wrote:
> 
> 
> On 11/7/23 20:30, Russell King (Oracle) wrote:
> > From: James Morse <james.morse@arm.com>
> > 
> > NUMA systems require the node descriptions to be ready before CPUs are
> > registered. This is so that the node symlinks can be created in sysfs.
> > 
> > Currently no NUMA platform uses GENERIC_CPU_DEVICES, meaning that CPUs
> > are registered by arch code, instead of cpu_dev_init().
> > 
> > Move cpu_dev_init() after node_dev_init() so that NUMA architectures
> > can use GENERIC_CPU_DEVICES.
> > 
> > Signed-off-by: James Morse <james.morse@arm.com>
> > Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
> > ---
> > Note: Jonathan's comment still needs addressing - see
> >    https://lore.kernel.org/r/20230914121612.00006ac7@Huawei.com
> > ---
> >   drivers/base/init.c | 2 +-
> >   1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> 
> With Jonathan's comments addressed:
> 
> Reviewed-by: Gavin Shan <gshan@redhat.com>

Can I assume, given Jonathan's reply later in this sub-thread, that you
are happy for me to add your r-b without the referred comment having
been addressed - Jonathan says tit was a "nice to have" and he's fine
without the requested change.

See https://lore.kernel.org/r/20231128150017.000069eb@Huawei.com

Thanks.
diff mbox series

Patch

diff --git a/drivers/base/init.c b/drivers/base/init.c
index 397eb9880cec..c4954835128c 100644
--- a/drivers/base/init.c
+++ b/drivers/base/init.c
@@ -35,8 +35,8 @@  void __init driver_init(void)
 	of_core_init();
 	platform_bus_init();
 	auxiliary_bus_init();
-	cpu_dev_init();
 	memory_dev_init();
 	node_dev_init();
+	cpu_dev_init();
 	container_dev_init();
 }