Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 113768
b: refs/heads/master
c: 55f2fea
h: refs/heads/master
v: v3
  • Loading branch information
Graf Yang authored and Bryan Wu committed Oct 9, 2008
1 parent 29749db commit 5a574a9
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 47664c1f86c833c4b6398885fdb2b80fc4945c6a
refs/heads/master: 55f2feae3a1e075d9b4b0e73a6024f3e25717878
14 changes: 10 additions & 4 deletions trunk/arch/blackfin/kernel/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -1000,7 +1000,7 @@ static int show_cpuinfo(struct seq_file *m, void *v)
"cpu family\t: 0x%x\n"
"model name\t: ADSP-%s %lu(MHz CCLK) %lu(MHz SCLK) (%s)\n"
"stepping\t: %d\n",
0,
*(unsigned int *)v,
vendor,
(bfin_read_CHIPID() & CHIPID_FAMILY),
cpu, cclk/1000000, sclk/1000000,
Expand Down Expand Up @@ -1048,7 +1048,7 @@ static int show_cpuinfo(struct seq_file *m, void *v)
if ((bfin_read_DMEM_CONTROL() & (ENDCPLB | DMC_ENABLE)) != (ENDCPLB | DMC_ENABLE))
dcache_size = 0;

if ((bfin_read_IMEM_CONTROL() & (IMC | ENICPLB)) == (IMC | ENICPLB))
if ((bfin_read_IMEM_CONTROL() & (IMC | ENICPLB)) != (IMC | ENICPLB))
icache_size = 0;

seq_printf(m, "cache size\t: %d KB(L1 icache) "
Expand Down Expand Up @@ -1137,12 +1137,18 @@ static int show_cpuinfo(struct seq_file *m, void *v)

static void *c_start(struct seq_file *m, loff_t *pos)
{
return *pos < NR_CPUS ? ((void *)0x12345678) : NULL;
if (*pos == 0)
*pos = first_cpu(cpu_online_map);
if (*pos >= num_online_cpus())
return NULL;

return pos;
}

static void *c_next(struct seq_file *m, void *v, loff_t *pos)
{
++*pos;
*pos = next_cpu(*pos, cpu_online_map);

return c_start(m, pos);
}

Expand Down

0 comments on commit 5a574a9

Please sign in to comment.