powerpc: kill useless SMT code in prom_hold_cpus

Previous thread: powerpc: Fix vio build warnings by Linux Kernel Mailing List on Monday, July 28, 2008 - 10:09 am. (1 message)

Next thread: powerpc: register_cpu_online should be __cpuinit by Linux Kernel Mailing List on Monday, July 28, 2008 - 10:09 am. (1 message)
From: Linux Kernel Mailing List
Date: Monday, July 28, 2008 - 10:09 am

Gitweb:     http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=7d2f60...
Commit:     7d2f6075f992d33c7be829c3638b8cb72b782b19
Parent:     ff8dc7698c904f2a911e89b3d54e7c4a74f5575d
Author:     Nathan Lynch <ntl@pobox.com>
AuthorDate: Sun Jul 27 15:24:50 2008 +1000
Committer:  Benjamin Herrenschmidt <benh@kernel.crashing.org>
CommitDate: Mon Jul 28 16:30:48 2008 +1000

    powerpc: kill useless SMT code in prom_hold_cpus
    
    This piece of code is broken for >2 threads, and possibly in some
    other subtle ways (such as comparing a value obtained from an
    "ibm,ppc-interrupt-server#s" property to a value obtained from a
    "reg" property) and doesn't seem to have any useful purpose in the
    first place other than a dubious warning in case NR_CPUS is too
    small, which probably isn't the right place to do so.
    
    Signed-off-by: Nathan Lynch <ntl@pobox.com>
    Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
---
 arch/powerpc/kernel/prom_init.c |   39 +++------------------------------------
 1 files changed, 3 insertions(+), 36 deletions(-)

diff --git a/arch/powerpc/kernel/prom_init.c b/arch/powerpc/kernel/prom_init.c
index c4ab219..b72849a 100644
--- a/arch/powerpc/kernel/prom_init.c
+++ b/arch/powerpc/kernel/prom_init.c
@@ -205,8 +205,6 @@ static int __initdata mem_reserve_cnt;
 static cell_t __initdata regbuf[1024];
 
 
-#define MAX_CPU_THREADS 2
-
 /*
  * Error results ... some OF calls will return "-1" on error, some
  * will return 0, some will return either. To simplify, here are
@@ -1339,10 +1337,6 @@ static void __init prom_hold_cpus(void)
 	unsigned int reg;
 	phandle node;
 	char type[64];
-	int cpuid = 0;
-	unsigned int interrupt_server[MAX_CPU_THREADS];
-	unsigned int cpu_threads, hw_cpu_num;
-	int propsize;
 	struct prom_t *_prom = &RELOC(prom);
 	unsigned long *spinloop
 		= (void *) LOW_ADDR(__secondary_hold_spinloop);
@@ -1386,7 +1380,6 @@ static void __init ...
Previous thread: powerpc: Fix vio build warnings by Linux Kernel Mailing List on Monday, July 28, 2008 - 10:09 am. (1 message)

Next thread: powerpc: register_cpu_online should be __cpuinit by Linux Kernel Mailing List on Monday, July 28, 2008 - 10:09 am. (1 message)