lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Thu, 15 Mar 2007 00:30:20 +0100
From:	Giuliano Pochini <pochini@...ny.it>
To:	Russell King <rmk+lkml@....linux.org.uk>
Cc:	heiko.carstens@...ibm.com, schwab@...e.de, pochini@...ise.shiny.it,
	linuxppc-dev@...abs.org, linux-kernel@...r.kernel.org,
	suresh.b.siddha@...el.com
Subject: Re: /sys/devices/system/cpu/cpuX/online are missing

On Tue, 13 Mar 2007 09:56:52 +0000
Russell King <rmk+lkml@....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@...ny.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.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ