* /sys/devices/system/cpu/cpuX/online are missing @ 2007-03-11 21:26 Giuliano Pochini 2007-03-11 21:42 ` Lee Revell 2007-03-12 8:58 ` Heiko Carstens 0 siblings, 2 replies; 11+ messages in thread From: Giuliano Pochini @ 2007-03-11 21:26 UTC (permalink / raw) To: linux-kernel Since 2.6.20 /sys/devices/system/cpu/cpuX/online isn't there anymore. The directories exist, though. I also tested linux-2.6.21rc3. I had a look at the archives and I found nothing about the removal of that file, which is still documented in Documentation/cpu-hotplug.txt. I don't know if other architectures are affected. $ uname -a Linux Jay 2.6.20 #1 SMP Mon Feb 5 22:42:18 CET 2007 ppc 7455, altivec supported PowerMac3,6 GNU/Linux No cpusets. CONFIG_HOTPLUG_CPU=y -- Giuliano. ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: /sys/devices/system/cpu/cpuX/online are missing 2007-03-11 21:26 /sys/devices/system/cpu/cpuX/online are missing Giuliano Pochini @ 2007-03-11 21:42 ` Lee Revell 2007-03-12 8:58 ` Heiko Carstens 1 sibling, 0 replies; 11+ messages in thread From: Lee Revell @ 2007-03-11 21:42 UTC (permalink / raw) To: Giuliano Pochini; +Cc: linux-kernel On 3/11/07, Giuliano Pochini <pochini@shiny.it> wrote: > > > Since 2.6.20 /sys/devices/system/cpu/cpuX/online isn't there anymore. The > directories exist, though. I also tested linux-2.6.21rc3. I had a look at the > archives and I found nothing about the removal of that file, which is still > documented in Documentation/cpu-hotplug.txt. I don't know if other > architectures are affected. What is CONFIG_SYSFS_DEPRECATED set to? Lee ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: /sys/devices/system/cpu/cpuX/online are missing 2007-03-11 21:26 /sys/devices/system/cpu/cpuX/online are missing Giuliano Pochini 2007-03-11 21:42 ` Lee Revell @ 2007-03-12 8:58 ` Heiko Carstens 2007-03-12 22:48 ` Giuliano Pochini 1 sibling, 1 reply; 11+ messages in thread From: Heiko Carstens @ 2007-03-12 8:58 UTC (permalink / raw) To: Giuliano Pochini; +Cc: linux-kernel On Sun, Mar 11, 2007 at 10:26:52PM +0100, Giuliano Pochini wrote: > > > Since 2.6.20 /sys/devices/system/cpu/cpuX/online isn't there anymore. The > directories exist, though. I also tested linux-2.6.21rc3. I had a look at the > archives and I found nothing about the removal of that file, which is still > documented in Documentation/cpu-hotplug.txt. I don't know if other > architectures are affected. > > $ uname -a > Linux Jay 2.6.20 #1 SMP Mon Feb 5 22:42:18 CET 2007 ppc 7455, altivec supported PowerMac3,6 GNU/Linux > > No cpusets. CONFIG_HOTPLUG_CPU=y Somebody inverted the logic when and if the 'online' attribute for cpu devices appear. See 72486f1f8f0a2bc828b9d30cf4690cf2dd6807fc. The fix for s390 is this: 6721f77810dfcb7cbf8e97be6fa43fe2740dd0aa. Looks like arch/ppc was left out as well. ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: /sys/devices/system/cpu/cpuX/online are missing 2007-03-12 8:58 ` Heiko Carstens @ 2007-03-12 22:48 ` Giuliano Pochini 2007-03-13 0:39 ` Andreas Schwab 0 siblings, 1 reply; 11+ messages in thread From: Giuliano Pochini @ 2007-03-12 22:48 UTC (permalink / raw) To: Heiko Carstens; +Cc: linux-kernel, linuxppc-dev On Mon, 12 Mar 2007, Heiko Carstens wrote: > On Sun, Mar 11, 2007 at 10:26:52PM +0100, Giuliano Pochini wrote: >> >> >> Since 2.6.20 /sys/devices/system/cpu/cpuX/online isn't there anymore. The >> directories exist, though. I also tested linux-2.6.21rc3. I had a look at the >> archives and I found nothing about the removal of that file, which is still >> documented in Documentation/cpu-hotplug.txt. I don't know if other >> architectures are affected. >> >> $ uname -a >> Linux Jay 2.6.20 #1 SMP Mon Feb 5 22:42:18 CET 2007 ppc 7455, altivec supported PowerMac3,6 GNU/Linux >> >> No cpusets. CONFIG_HOTPLUG_CPU=y > > Somebody inverted the logic when and if the 'online' attribute for cpu devices > appear. See 72486f1f8f0a2bc828b9d30cf4690cf2dd6807fc. > The fix for s390 is this: 6721f77810dfcb7cbf8e97be6fa43fe2740dd0aa. > Looks like arch/ppc was left out as well. I had a look at arch/powerpc/kernel/smp.c but I'm not familiar at all with those parts of the kernel. I'm cc'ing this message to linuxppc-dev. -- Giuliano. ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: /sys/devices/system/cpu/cpuX/online are missing 2007-03-12 22:48 ` Giuliano Pochini @ 2007-03-13 0:39 ` Andreas Schwab 2007-03-13 9:03 ` Heiko Carstens 0 siblings, 1 reply; 11+ messages in thread From: Andreas Schwab @ 2007-03-13 0:39 UTC (permalink / raw) To: Giuliano Pochini; +Cc: Heiko Carstens, linuxppc-dev, linux-kernel Giuliano Pochini <pochini@denise.shiny.it> writes: > I had a look at arch/powerpc/kernel/smp.c but I'm not familiar at all with > those parts of the kernel. See arch/powerpc/kernel/sysfs.c:topology_init. I don't think there is anything to do here. You probably don't have CONFIG_HOTPLUG_CPU enabled. Andreas. -- Andreas Schwab, SuSE Labs, schwab@suse.de SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany PGP key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different." ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: /sys/devices/system/cpu/cpuX/online are missing 2007-03-13 0:39 ` Andreas Schwab @ 2007-03-13 9:03 ` Heiko Carstens 2007-03-13 9:11 ` Heiko Carstens 2007-03-13 9:44 ` Andreas Schwab 0 siblings, 2 replies; 11+ messages in thread From: Heiko Carstens @ 2007-03-13 9:03 UTC (permalink / raw) To: Andreas Schwab; +Cc: Giuliano Pochini, linuxppc-dev, linux-kernel, spyro, rmk On Tue, Mar 13, 2007 at 01:39:25AM +0100, Andreas Schwab wrote: > Giuliano Pochini <pochini@denise.shiny.it> writes: > > > I had a look at arch/powerpc/kernel/smp.c but I'm not familiar at all with > > those parts of the kernel. > > See arch/powerpc/kernel/sysfs.c:topology_init. I don't think there is > anything to do here. You probably don't have CONFIG_HOTPLUG_CPU enabled. I was referring to arch/ppc not arch/powerpc. But it seems that arch/ppc doesn't support cpu hotplug anyway. So I guess it's indeed just a missing config option. Grepping a bit further shows that arm suffered by the change that inverted the logic if the 'online' attribute for cpus should appear. Since arm supports cpu hotplug but the patch left arm out, it doesn't work there anymore (cc'ing arm people: changeset 72486f1f8f0a2bc828b9d30cf4690cf2dd6807fc is most probably disabling cpu hotplug support on arm like it did on s390). ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: /sys/devices/system/cpu/cpuX/online are missing 2007-03-13 9:03 ` Heiko Carstens @ 2007-03-13 9:11 ` Heiko Carstens 2007-03-13 9:40 ` Russell King 2007-03-13 9:44 ` Andreas Schwab 1 sibling, 1 reply; 11+ messages in thread From: Heiko Carstens @ 2007-03-13 9:11 UTC (permalink / raw) To: Andreas Schwab Cc: Giuliano Pochini, linuxppc-dev, linux-kernel, spyro, rmk, Suresh Siddha On Tue, Mar 13, 2007 at 10:03:50AM +0100, Heiko Carstens wrote: > On Tue, Mar 13, 2007 at 01:39:25AM +0100, Andreas Schwab wrote: > > Giuliano Pochini <pochini@denise.shiny.it> writes: > > > > > I had a look at arch/powerpc/kernel/smp.c but I'm not familiar at all with > > > those parts of the kernel. > > > > See arch/powerpc/kernel/sysfs.c:topology_init. I don't think there is > > anything to do here. You probably don't have CONFIG_HOTPLUG_CPU enabled. > > I was referring to arch/ppc not arch/powerpc. But it seems that arch/ppc > doesn't support cpu hotplug anyway. So I guess it's indeed just a missing > config option. > > Grepping a bit further shows that arm suffered by the change that inverted > the logic if the 'online' attribute for cpus should appear. Since arm > supports cpu hotplug but the patch left arm out, it doesn't work there > anymore (cc'ing arm people: changeset 72486f1f8f0a2bc828b9d30cf4690cf2dd6807fc > is most probably disabling cpu hotplug support on arm like it did on s390). Should have cc'ed Suresh Siddha who caused the breakage ;) ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: /sys/devices/system/cpu/cpuX/online are missing 2007-03-13 9:11 ` Heiko Carstens @ 2007-03-13 9:40 ` Russell King 2007-03-13 9:56 ` Russell King 0 siblings, 1 reply; 11+ messages in thread From: Russell King @ 2007-03-13 9:40 UTC (permalink / raw) To: Heiko Carstens Cc: Andreas Schwab, Giuliano Pochini, linuxppc-dev, linux-kernel, Suresh Siddha On Tue, Mar 13, 2007 at 10:11:59AM +0100, Heiko Carstens wrote: > On Tue, Mar 13, 2007 at 10:03:50AM +0100, Heiko Carstens wrote: > > On Tue, Mar 13, 2007 at 01:39:25AM +0100, Andreas Schwab wrote: > > > Giuliano Pochini <pochini@denise.shiny.it> writes: > > > > > > > I had a look at arch/powerpc/kernel/smp.c but I'm not familiar at all with > > > > those parts of the kernel. > > > > > > See arch/powerpc/kernel/sysfs.c:topology_init. I don't think there is > > > anything to do here. You probably don't have CONFIG_HOTPLUG_CPU enabled. > > > > I was referring to arch/ppc not arch/powerpc. But it seems that arch/ppc > > doesn't support cpu hotplug anyway. So I guess it's indeed just a missing > > config option. > > > > Grepping a bit further shows that arm suffered by the change that inverted > > the logic if the 'online' attribute for cpus should appear. Since arm > > supports cpu hotplug but the patch left arm out, it doesn't work there > > anymore (cc'ing arm people: changeset 72486f1f8f0a2bc828b9d30cf4690cf2dd6807fc > > is most probably disabling cpu hotplug support on arm like it did on s390). > > Should have cc'ed Suresh Siddha who caused the breakage ;) Welcome to why cleanups are bad news. ;( Yes, ARM also needs to be fixed and I'd ask that in future people doing cleanups in core code take a little more time to review the code before submitting patches *AND* give heads-up to *EVERYONE* who might be affected by the change. -- Russell King Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/ maintainer of: ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: /sys/devices/system/cpu/cpuX/online are missing 2007-03-13 9:40 ` Russell King @ 2007-03-13 9:56 ` Russell King 2007-03-14 23:30 ` Giuliano Pochini 0 siblings, 1 reply; 11+ messages in thread From: Russell King @ 2007-03-13 9:56 UTC (permalink / raw) To: Heiko Carstens, Andreas Schwab, Giuliano Pochini, linuxppc-dev, linux-kernel, Suresh Siddha On Tue, Mar 13, 2007 at 09:40:39AM +0000, Russell King wrote: > On Tue, Mar 13, 2007 at 10:11:59AM +0100, Heiko Carstens wrote: > > On Tue, Mar 13, 2007 at 10:03:50AM +0100, Heiko Carstens wrote: > > > I was referring to arch/ppc not arch/powerpc. But it seems that arch/ppc > > > doesn't support cpu hotplug anyway. So I guess it's indeed just a missing > > > config option. > > > > > > Grepping a bit further shows that arm suffered by the change that inverted > > > the logic if the 'online' attribute for cpus should appear. Since arm > > > supports cpu hotplug but the patch left arm out, it doesn't work there > > > anymore (cc'ing arm people: changeset 72486f1f8f0a2bc828b9d30cf4690cf2dd6807fc > > > is most probably disabling cpu hotplug support on arm like it did on s390). > > > > Should have cc'ed Suresh Siddha who caused the breakage ;) > > Welcome to why cleanups are bad news. ;( Yes, ARM also needs to be fixed > and I'd ask that in future people doing cleanups in core code take a little > more time to review the code before submitting patches *AND* give heads-up > to *EVERYONE* who might be affected by the change. Right, here's the ARM fix which is now in the ARM tree: # Base git commit: 8b9909ded6922c33c221b105b26917780cfa497d # (Merge branch 'merge' of master.kernel.org:/pub/scm/linux/kernel/git/paulus/powerpc) # # Author: Russell King (Tue Mar 13 09:54:21 GMT 2007) # Committer: Russell King (Tue Mar 13 09:54:21 GMT 2007) # # [ARM] Fix breakage caused by 72486f1f8f0a2bc828b9d30cf4690cf2dd6807fc # # 72486f1f8f0a2bc828b9d30cf4690cf2dd6807fc inverted the sense for # enabling hotplug CPU controls without reference to any other # architecture other than i386, ia64 and PowerPC. This left # everyone else without hotplug CPU control. # # Fix ARM for this brain damage. # # Signed-off-by: Russell King # # arch/arm/kernel/setup.c | 7 +++++-- # 1 files changed, 5 insertions(+), 2 deletions(-) # diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c index 03e37af..0453dcc 100644 --- a/arch/arm/kernel/setup.c +++ b/arch/arm/kernel/setup.c @@ -839,8 +839,11 @@ static int __init topology_init(void) { int cpu; - for_each_possible_cpu(cpu) - register_cpu(&per_cpu(cpu_data, cpu).cpu, cpu); + for_each_possible_cpu(cpu) { + struct cpuinfo_arm *cpuinfo = &per_cpu(cpu_data, cpu); + cpuinfo->cpu.hotpluggable = 1; + register_cpu(&cpuinfo->cpu, cpu); + } return 0; } -- Russell King Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/ maintainer of: ^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: /sys/devices/system/cpu/cpuX/online are missing 2007-03-13 9:56 ` Russell King @ 2007-03-14 23:30 ` Giuliano Pochini 0 siblings, 0 replies; 11+ messages in thread From: Giuliano Pochini @ 2007-03-14 23:30 UTC (permalink / raw) To: Russell King Cc: heiko.carstens, schwab, pochini, linuxppc-dev, linux-kernel, suresh.b.siddha On Tue, 13 Mar 2007 09:56:52 +0000 Russell King <rmk+lkml@arm.linux.org.uk> wrote: > Right, here's the ARM fix which is now in the ARM tree: > [...] The following patch seems to fix the issue (+ minor style fix). I'm not sure it's ok due to my poor knowledge of this code. Signed-off-by: Giuliano Pochini <pochini@shiny.it> --- linux-2.6.21rc3/arch/powerpc/kernel/setup_32.c__orig 2007-03-15 00:05:02.000000000 +0100 +++ linux-2.6.21rc3/arch/powerpc/kernel/setup_32.c 2007-03-15 00:07:02.000000000 +0100 @@ -195,18 +195,22 @@ EXPORT_SYMBOL(nvram_sync); #endif /* CONFIG_NVRAM */ -static struct cpu cpu_devices[NR_CPUS]; +static DEFINE_PER_CPU(struct cpu, cpu_devices); int __init ppc_init(void) { - int i; + int cpu; /* clear the progress line */ - if ( ppc_md.progress ) ppc_md.progress(" ", 0xffff); + if (ppc_md.progress) + ppc_md.progress(" ", 0xffff); /* register CPU devices */ - for_each_possible_cpu(i) - register_cpu(&cpu_devices[i], i); + for_each_possible_cpu(cpu) { + struct cpu *c = &per_cpu(cpu_devices, cpu); + c->hotpluggable = 1; + register_cpu(c, cpu); + } /* call platform init */ if (ppc_md.init != NULL) { -- Giuliano. ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: /sys/devices/system/cpu/cpuX/online are missing 2007-03-13 9:03 ` Heiko Carstens 2007-03-13 9:11 ` Heiko Carstens @ 2007-03-13 9:44 ` Andreas Schwab 1 sibling, 0 replies; 11+ messages in thread From: Andreas Schwab @ 2007-03-13 9:44 UTC (permalink / raw) To: Heiko Carstens; +Cc: Giuliano Pochini, linuxppc-dev, linux-kernel, spyro, rmk Heiko Carstens <heiko.carstens@de.ibm.com> writes: > On Tue, Mar 13, 2007 at 01:39:25AM +0100, Andreas Schwab wrote: >> Giuliano Pochini <pochini@denise.shiny.it> writes: >> >> > I had a look at arch/powerpc/kernel/smp.c but I'm not familiar at all with >> > those parts of the kernel. >> >> See arch/powerpc/kernel/sysfs.c:topology_init. I don't think there is >> anything to do here. You probably don't have CONFIG_HOTPLUG_CPU enabled. > > I was referring to arch/ppc not arch/powerpc. Sorry, I missed that part. > But it seems that arch/ppc doesn't support cpu hotplug anyway. I think if there is no hotplug support then the file should not be created in the first place. Andreas. -- Andreas Schwab, SuSE Labs, schwab@suse.de SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany PGP key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different." ^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2007-03-14 23:40 UTC | newest] Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2007-03-11 21:26 /sys/devices/system/cpu/cpuX/online are missing Giuliano Pochini 2007-03-11 21:42 ` Lee Revell 2007-03-12 8:58 ` Heiko Carstens 2007-03-12 22:48 ` Giuliano Pochini 2007-03-13 0:39 ` Andreas Schwab 2007-03-13 9:03 ` Heiko Carstens 2007-03-13 9:11 ` Heiko Carstens 2007-03-13 9:40 ` Russell King 2007-03-13 9:56 ` Russell King 2007-03-14 23:30 ` Giuliano Pochini 2007-03-13 9:44 ` Andreas Schwab
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).