LKML Archive on lore.kernel.org help / color / mirror / Atom feed
* [PATCH] arm64: skip cpu nodes marked as disabled in DT @ 2018-04-25 23:08 Rohit Khanna 2018-04-25 23:36 ` Rohit Khanna 0 siblings, 1 reply; 6+ messages in thread From: Rohit Khanna @ 2018-04-25 23:08 UTC (permalink / raw) To: catalin.marinas, will.deacon; +Cc: linux-kernel, Rohit Khanna Skip the CPU nodes that are marked as disabled in DT. Bug 1828570 Signed-off-by: Rohit Khanna <rokhanna@nvidia.com> Reviewed-on: http://git-master/r/1245333 Reviewed-by: Alexander Van Brunt <avanbrunt@nvidia.com> --- arch/arm64/kernel/smp.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/arm64/kernel/smp.c b/arch/arm64/kernel/smp.c index f3e2e3aec0b0..2b4371b0948d 100644 --- a/arch/arm64/kernel/smp.c +++ b/arch/arm64/kernel/smp.c @@ -578,6 +578,10 @@ static void __init of_parse_and_init_cpus(void) for_each_node_by_type(dn, "cpu") { u64 hwid = of_get_cpu_mpidr(dn); + /* Check to see if the cpu is disabled */ + if (!of_device_is_available(dn)) + goto next; + if (hwid == INVALID_HWID) goto next; -- 2.1.4 ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] arm64: skip cpu nodes marked as disabled in DT 2018-04-25 23:08 [PATCH] arm64: skip cpu nodes marked as disabled in DT Rohit Khanna @ 2018-04-25 23:36 ` Rohit Khanna 2018-04-26 7:25 ` Catalin Marinas 0 siblings, 1 reply; 6+ messages in thread From: Rohit Khanna @ 2018-04-25 23:36 UTC (permalink / raw) To: catalin.marinas, will.deacon Cc: linux-kernel, Thierry Reding, Alexander Van Brunt, Bo Yan, Jason Sequeira Adding few other folks. Thanks Rohit ________________________________________ From: Rohit Khanna Sent: Wednesday, April 25, 2018 4:08 PM To: catalin.marinas@arm.com; will.deacon@arm.com Cc: linux-kernel@vger.kernel.org; Rohit Khanna Subject: [PATCH] arm64: skip cpu nodes marked as disabled in DT Skip the CPU nodes that are marked as disabled in DT. Bug 1828570 Signed-off-by: Rohit Khanna <rokhanna@nvidia.com> Reviewed-on: http://git-master/r/1245333 Reviewed-by: Alexander Van Brunt <avanbrunt@nvidia.com> --- arch/arm64/kernel/smp.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/arm64/kernel/smp.c b/arch/arm64/kernel/smp.c index f3e2e3aec0b0..2b4371b0948d 100644 --- a/arch/arm64/kernel/smp.c +++ b/arch/arm64/kernel/smp.c @@ -578,6 +578,10 @@ static void __init of_parse_and_init_cpus(void) for_each_node_by_type(dn, "cpu") { u64 hwid = of_get_cpu_mpidr(dn); + /* Check to see if the cpu is disabled */ + if (!of_device_is_available(dn)) + goto next; + if (hwid == INVALID_HWID) goto next; -- 2.1.4 ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] arm64: skip cpu nodes marked as disabled in DT 2018-04-25 23:36 ` Rohit Khanna @ 2018-04-26 7:25 ` Catalin Marinas 2018-04-26 10:18 ` Lorenzo Pieralisi 0 siblings, 1 reply; 6+ messages in thread From: Catalin Marinas @ 2018-04-26 7:25 UTC (permalink / raw) To: Rohit Khanna Cc: will.deacon, linux-kernel, Thierry Reding, Alexander Van Brunt, Bo Yan, Jason Sequeira, Mark Rutland, Lorenzo Pieralisi On Wed, Apr 25, 2018 at 11:36:06PM +0000, Rohit Khanna wrote: > Adding few other folks. It looks fine to me but cc'ing Mark and Lorenzo (and it should have been posted on linux-arm-kernel@lists.infradead.org). > From: Rohit Khanna > Sent: Wednesday, April 25, 2018 4:08 PM > To: catalin.marinas@arm.com; will.deacon@arm.com > Cc: linux-kernel@vger.kernel.org; Rohit Khanna > Subject: [PATCH] arm64: skip cpu nodes marked as disabled in DT > > Skip the CPU nodes that are marked as disabled in DT. > > Bug 1828570 > > Signed-off-by: Rohit Khanna <rokhanna@nvidia.com> > Reviewed-on: http://git-master/r/1245333 > Reviewed-by: Alexander Van Brunt <avanbrunt@nvidia.com> > --- > arch/arm64/kernel/smp.c | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/arch/arm64/kernel/smp.c b/arch/arm64/kernel/smp.c > index f3e2e3aec0b0..2b4371b0948d 100644 > --- a/arch/arm64/kernel/smp.c > +++ b/arch/arm64/kernel/smp.c > @@ -578,6 +578,10 @@ static void __init of_parse_and_init_cpus(void) > for_each_node_by_type(dn, "cpu") { > u64 hwid = of_get_cpu_mpidr(dn); > > + /* Check to see if the cpu is disabled */ > + if (!of_device_is_available(dn)) > + goto next; > + > if (hwid == INVALID_HWID) > goto next; > > -- > 2.1.4 ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] arm64: skip cpu nodes marked as disabled in DT 2018-04-26 7:25 ` Catalin Marinas @ 2018-04-26 10:18 ` Lorenzo Pieralisi 2018-04-26 19:54 ` Rohit Khanna 0 siblings, 1 reply; 6+ messages in thread From: Lorenzo Pieralisi @ 2018-04-26 10:18 UTC (permalink / raw) To: Catalin Marinas, Rohit Khanna Cc: will.deacon, linux-kernel, Thierry Reding, Alexander Van Brunt, Bo Yan, Jason Sequeira, Mark Rutland On Thu, Apr 26, 2018 at 08:25:14AM +0100, Catalin Marinas wrote: > On Wed, Apr 25, 2018 at 11:36:06PM +0000, Rohit Khanna wrote: > > Adding few other folks. > > It looks fine to me but cc'ing Mark and Lorenzo (and it should have been > posted on linux-arm-kernel@lists.infradead.org). > > > From: Rohit Khanna > > Sent: Wednesday, April 25, 2018 4:08 PM > > To: catalin.marinas@arm.com; will.deacon@arm.com > > Cc: linux-kernel@vger.kernel.org; Rohit Khanna > > Subject: [PATCH] arm64: skip cpu nodes marked as disabled in DT > > > > Skip the CPU nodes that are marked as disabled in DT. > > > > Bug 1828570 That's not information that can be used in its current form, which bug-tracking system ? > > Signed-off-by: Rohit Khanna <rokhanna@nvidia.com> > > Reviewed-on: http://git-master/r/1245333 If it is a public mailing list discussion the Link: tag and the lkml redirector should be used, I do not know what the redirector used here is though. Process is defined here: https://www.kernel.org/doc/html/latest/process/submitting-patches.html > > Reviewed-by: Alexander Van Brunt <avanbrunt@nvidia.com> > > --- > > arch/arm64/kernel/smp.c | 4 ++++ > > 1 file changed, 4 insertions(+) > > > > diff --git a/arch/arm64/kernel/smp.c b/arch/arm64/kernel/smp.c > > index f3e2e3aec0b0..2b4371b0948d 100644 > > --- a/arch/arm64/kernel/smp.c > > +++ b/arch/arm64/kernel/smp.c > > @@ -578,6 +578,10 @@ static void __init of_parse_and_init_cpus(void) > > for_each_node_by_type(dn, "cpu") { > > u64 hwid = of_get_cpu_mpidr(dn); > > > > + /* Check to see if the cpu is disabled */ > > + if (!of_device_is_available(dn)) > > + goto next; > > + This was discussed a long time ago and kind of dropped - I digged the thread out of archives for everyone's information: http://lists.infradead.org/pipermail/linux-arm-kernel/2013-June/174324.html Lorenzo ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] arm64: skip cpu nodes marked as disabled in DT 2018-04-26 10:18 ` Lorenzo Pieralisi @ 2018-04-26 19:54 ` Rohit Khanna 2018-04-30 9:54 ` Lorenzo Pieralisi 0 siblings, 1 reply; 6+ messages in thread From: Rohit Khanna @ 2018-04-26 19:54 UTC (permalink / raw) To: Lorenzo Pieralisi, Catalin Marinas Cc: will.deacon, linux-kernel, Thierry Reding, Alexander Van Brunt, Bo Yan, Jason Sequeira, Mark Rutland, Vignesh Radhakrishnan, Krishna Sitaraman Thanks Lorenzo for pulling out the old thread. So just to make sure my understanding is correct from the discussion on that thread, below is not a preferred approach. "If CPUs are marked as disabled in the devicetree, make sure they do not exist in the system CPU information and CPU topology information." The reason is because - "The meaning of disabled for cpus in ePAPR is that the cpu is offline (i.e. in a spinloop or wfi), not that the cpu is unavailable." Preferred approach is - "Since with this approach the DT should change anyway if on different > hardware devices based on the same chip you want to allow booting a > different number of CPUs, why do not we remove the cpu nodes instead of > disabling them" Thanks Rohit ________________________________________ From: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> Sent: Thursday, April 26, 2018 3:18 AM To: Catalin Marinas; Rohit Khanna Cc: will.deacon@arm.com; linux-kernel@vger.kernel.org; Thierry Reding; Alexander Van Brunt; Bo Yan; Jason Sequeira; Mark Rutland Subject: Re: [PATCH] arm64: skip cpu nodes marked as disabled in DT On Thu, Apr 26, 2018 at 08:25:14AM +0100, Catalin Marinas wrote: > On Wed, Apr 25, 2018 at 11:36:06PM +0000, Rohit Khanna wrote: > > Adding few other folks. > > It looks fine to me but cc'ing Mark and Lorenzo (and it should have been > posted on linux-arm-kernel@lists.infradead.org). > > > From: Rohit Khanna > > Sent: Wednesday, April 25, 2018 4:08 PM > > To: catalin.marinas@arm.com; will.deacon@arm.com > > Cc: linux-kernel@vger.kernel.org; Rohit Khanna > > Subject: [PATCH] arm64: skip cpu nodes marked as disabled in DT > > > > Skip the CPU nodes that are marked as disabled in DT. > > > > Bug 1828570 That's not information that can be used in its current form, which bug-tracking system ? > > Signed-off-by: Rohit Khanna <rokhanna@nvidia.com> > > Reviewed-on: http://git-master/r/1245333 If it is a public mailing list discussion the Link: tag and the lkml redirector should be used, I do not know what the redirector used here is though. Process is defined here: https://www.kernel.org/doc/html/latest/process/submitting-patches.html > > Reviewed-by: Alexander Van Brunt <avanbrunt@nvidia.com> > > --- > > arch/arm64/kernel/smp.c | 4 ++++ > > 1 file changed, 4 insertions(+) > > > > diff --git a/arch/arm64/kernel/smp.c b/arch/arm64/kernel/smp.c > > index f3e2e3aec0b0..2b4371b0948d 100644 > > --- a/arch/arm64/kernel/smp.c > > +++ b/arch/arm64/kernel/smp.c > > @@ -578,6 +578,10 @@ static void __init of_parse_and_init_cpus(void) > > for_each_node_by_type(dn, "cpu") { > > u64 hwid = of_get_cpu_mpidr(dn); > > > > + /* Check to see if the cpu is disabled */ > > + if (!of_device_is_available(dn)) > > + goto next; > > + This was discussed a long time ago and kind of dropped - I digged the thread out of archives for everyone's information: http://lists.infradead.org/pipermail/linux-arm-kernel/2013-June/174324.html Lorenzo ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] arm64: skip cpu nodes marked as disabled in DT 2018-04-26 19:54 ` Rohit Khanna @ 2018-04-30 9:54 ` Lorenzo Pieralisi 0 siblings, 0 replies; 6+ messages in thread From: Lorenzo Pieralisi @ 2018-04-30 9:54 UTC (permalink / raw) To: Rohit Khanna Cc: Catalin Marinas, will.deacon, linux-kernel, Thierry Reding, Alexander Van Brunt, Bo Yan, Jason Sequeira, Mark Rutland, Vignesh Radhakrishnan, Krishna Sitaraman On Thu, Apr 26, 2018 at 07:54:06PM +0000, Rohit Khanna wrote: > Thanks Lorenzo for pulling out the old thread. > > So just to make sure my understanding is correct from the discussion > on that thread, below is not a preferred approach. > > "If CPUs are marked as disabled in the devicetree, make sure they do > not exist in the system CPU information and CPU topology information." > > > The reason is because - "The meaning of disabled for cpus in ePAPR is > that the cpu is offline (i.e. in a spinloop or wfi), not that the cpu > is unavailable." > > > Preferred approach is - > "Since with this approach the DT should change anyway if on different > > hardware devices based on the same chip you want to allow booting a > > different number of CPUs, why do not we remove the cpu nodes instead of > > disabling them" Yes, I think that's the best course of action and it was the outcome of that email thread. Lorenzo > Thanks > Rohit > ________________________________________ > From: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> > Sent: Thursday, April 26, 2018 3:18 AM > To: Catalin Marinas; Rohit Khanna > Cc: will.deacon@arm.com; linux-kernel@vger.kernel.org; Thierry Reding; Alexander Van Brunt; Bo Yan; Jason Sequeira; Mark Rutland > Subject: Re: [PATCH] arm64: skip cpu nodes marked as disabled in DT > > On Thu, Apr 26, 2018 at 08:25:14AM +0100, Catalin Marinas wrote: > > On Wed, Apr 25, 2018 at 11:36:06PM +0000, Rohit Khanna wrote: > > > Adding few other folks. > > > > It looks fine to me but cc'ing Mark and Lorenzo (and it should have been > > posted on linux-arm-kernel@lists.infradead.org). > > > > > From: Rohit Khanna > > > Sent: Wednesday, April 25, 2018 4:08 PM > > > To: catalin.marinas@arm.com; will.deacon@arm.com > > > Cc: linux-kernel@vger.kernel.org; Rohit Khanna > > > Subject: [PATCH] arm64: skip cpu nodes marked as disabled in DT > > > > > > Skip the CPU nodes that are marked as disabled in DT. > > > > > > Bug 1828570 > > That's not information that can be used in its current form, which > bug-tracking system ? > > > > Signed-off-by: Rohit Khanna <rokhanna@nvidia.com> > > > Reviewed-on: http://git-master/r/1245333 > > If it is a public mailing list discussion the > > Link: > > tag and the lkml redirector should be used, I do not know what the > redirector used here is though. > > Process is defined here: > > https://www.kernel.org/doc/html/latest/process/submitting-patches.html > > > > Reviewed-by: Alexander Van Brunt <avanbrunt@nvidia.com> > > > --- > > > arch/arm64/kernel/smp.c | 4 ++++ > > > 1 file changed, 4 insertions(+) > > > > > > diff --git a/arch/arm64/kernel/smp.c b/arch/arm64/kernel/smp.c > > > index f3e2e3aec0b0..2b4371b0948d 100644 > > > --- a/arch/arm64/kernel/smp.c > > > +++ b/arch/arm64/kernel/smp.c > > > @@ -578,6 +578,10 @@ static void __init of_parse_and_init_cpus(void) > > > for_each_node_by_type(dn, "cpu") { > > > u64 hwid = of_get_cpu_mpidr(dn); > > > > > > + /* Check to see if the cpu is disabled */ > > > + if (!of_device_is_available(dn)) > > > + goto next; > > > + > > This was discussed a long time ago and kind of dropped - I digged the > thread out of archives for everyone's information: > > http://lists.infradead.org/pipermail/linux-arm-kernel/2013-June/174324.html > > Lorenzo ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2018-04-30 9:54 UTC | newest] Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2018-04-25 23:08 [PATCH] arm64: skip cpu nodes marked as disabled in DT Rohit Khanna 2018-04-25 23:36 ` Rohit Khanna 2018-04-26 7:25 ` Catalin Marinas 2018-04-26 10:18 ` Lorenzo Pieralisi 2018-04-26 19:54 ` Rohit Khanna 2018-04-30 9:54 ` Lorenzo Pieralisi
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).