diff options
-rw-r--r-- | arch/blackfin/kernel/setup.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/arch/blackfin/kernel/setup.c b/arch/blackfin/kernel/setup.c index ea4f60978c66..e9054e0b4555 100644 --- a/arch/blackfin/kernel/setup.c +++ b/arch/blackfin/kernel/setup.c | |||
@@ -1000,7 +1000,7 @@ static int show_cpuinfo(struct seq_file *m, void *v) | |||
1000 | "cpu family\t: 0x%x\n" | 1000 | "cpu family\t: 0x%x\n" |
1001 | "model name\t: ADSP-%s %lu(MHz CCLK) %lu(MHz SCLK) (%s)\n" | 1001 | "model name\t: ADSP-%s %lu(MHz CCLK) %lu(MHz SCLK) (%s)\n" |
1002 | "stepping\t: %d\n", | 1002 | "stepping\t: %d\n", |
1003 | 0, | 1003 | *(unsigned int *)v, |
1004 | vendor, | 1004 | vendor, |
1005 | (bfin_read_CHIPID() & CHIPID_FAMILY), | 1005 | (bfin_read_CHIPID() & CHIPID_FAMILY), |
1006 | cpu, cclk/1000000, sclk/1000000, | 1006 | cpu, cclk/1000000, sclk/1000000, |
@@ -1048,7 +1048,7 @@ static int show_cpuinfo(struct seq_file *m, void *v) | |||
1048 | if ((bfin_read_DMEM_CONTROL() & (ENDCPLB | DMC_ENABLE)) != (ENDCPLB | DMC_ENABLE)) | 1048 | if ((bfin_read_DMEM_CONTROL() & (ENDCPLB | DMC_ENABLE)) != (ENDCPLB | DMC_ENABLE)) |
1049 | dcache_size = 0; | 1049 | dcache_size = 0; |
1050 | 1050 | ||
1051 | if ((bfin_read_IMEM_CONTROL() & (IMC | ENICPLB)) == (IMC | ENICPLB)) | 1051 | if ((bfin_read_IMEM_CONTROL() & (IMC | ENICPLB)) != (IMC | ENICPLB)) |
1052 | icache_size = 0; | 1052 | icache_size = 0; |
1053 | 1053 | ||
1054 | seq_printf(m, "cache size\t: %d KB(L1 icache) " | 1054 | seq_printf(m, "cache size\t: %d KB(L1 icache) " |
@@ -1137,12 +1137,18 @@ static int show_cpuinfo(struct seq_file *m, void *v) | |||
1137 | 1137 | ||
1138 | static void *c_start(struct seq_file *m, loff_t *pos) | 1138 | static void *c_start(struct seq_file *m, loff_t *pos) |
1139 | { | 1139 | { |
1140 | return *pos < NR_CPUS ? ((void *)0x12345678) : NULL; | 1140 | if (*pos == 0) |
1141 | *pos = first_cpu(cpu_online_map); | ||
1142 | if (*pos >= num_online_cpus()) | ||
1143 | return NULL; | ||
1144 | |||
1145 | return pos; | ||
1141 | } | 1146 | } |
1142 | 1147 | ||
1143 | static void *c_next(struct seq_file *m, void *v, loff_t *pos) | 1148 | static void *c_next(struct seq_file *m, void *v, loff_t *pos) |
1144 | { | 1149 | { |
1145 | ++*pos; | 1150 | *pos = next_cpu(*pos, cpu_online_map); |
1151 | |||
1146 | return c_start(m, pos); | 1152 | return c_start(m, pos); |
1147 | } | 1153 | } |
1148 | 1154 | ||