diff options
author | Graf Yang <graf.yang@analog.com> | 2008-10-09 03:37:47 -0400 |
---|---|---|
committer | Bryan Wu <cooloney@kernel.org> | 2008-10-09 03:37:47 -0400 |
commit | 55f2feae3a1e075d9b4b0e73a6024f3e25717878 (patch) | |
tree | 96e337c0cd5ff11a4423815efb58821a53940091 /arch | |
parent | 47664c1f86c833c4b6398885fdb2b80fc4945c6a (diff) |
Blackfin arch: correct icache size in show_cpuinfo(), let c_start() return proper pointer
Signed-off-by: Graf Yang <graf.yang@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
Diffstat (limited to 'arch')
-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 | ||