Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=6cda2e90588ba2f70543abf68b4815e10c86aef1
Commit:     6cda2e90588ba2f70543abf68b4815e10c86aef1
Parent:     a680ae9bdd8746ea4338e843db388fa67f1d1920
Author:     Michael Hennerich <[EMAIL PROTECTED]>
AuthorDate: Sat Feb 2 15:10:51 2008 +0800
Committer:  Bryan Wu <[EMAIL PROTECTED]>
CommitDate: Sat Feb 2 15:10:51 2008 +0800

    [Blackfin] arch: Fix BUG - Enable ISP1362 driver to work ok with BF561
    
    This fixes a bug (zero pointer access) only seen on BF561, during USB
    Mass Storage/SCSI Host initialization.
    
    It appears to be related to registering a none existing CPU
    
    Signed-off-by: Michael Hennerich <[EMAIL PROTECTED]>
    Signed-off-by: Bryan Wu <[EMAIL PROTECTED]>
---
 arch/blackfin/kernel/setup.c |   18 ++++++++++--------
 1 files changed, 10 insertions(+), 8 deletions(-)

diff --git a/arch/blackfin/kernel/setup.c b/arch/blackfin/kernel/setup.c
index 2f156bf..aca5e6e 100644
--- a/arch/blackfin/kernel/setup.c
+++ b/arch/blackfin/kernel/setup.c
@@ -48,6 +48,8 @@
 #include <asm/fixed_code.h>
 #include <asm/early_printk.h>
 
+static DEFINE_PER_CPU(struct cpu, cpu_devices);
+
 u16 _bfin_swrst;
 
 unsigned long memory_start, memory_end, physical_mem_end;
@@ -763,15 +765,15 @@ void __init setup_arch(char **cmdline_p)
 
 static int __init topology_init(void)
 {
-#if defined (CONFIG_BF561)
-       static struct cpu cpu[2];
-       register_cpu(&cpu[0], 0);
-       register_cpu(&cpu[1], 1);
+       int cpu;
+
+       for_each_possible_cpu(cpu) {
+               struct cpu *c = &per_cpu(cpu_devices, cpu);
+
+               register_cpu(c, cpu);
+       }
+
        return 0;
-#else
-       static struct cpu cpu[1];
-       return register_cpu(cpu, 0);
-#endif
 }
 
 subsys_initcall(topology_init);
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to