Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 73895
b: refs/heads/master
c: c0c52d2
h: refs/heads/master
i:
  73893: 5a2bc9c
  73891: 908bca5
  73887: 57a7928
v: v3
  • Loading branch information
Andreas Herrmann authored and Thomas Gleixner committed Nov 17, 2007
1 parent e6a9cc3 commit d79068d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 11 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: 903675569e278af86aa08c2af238b0ab997065d1
refs/heads/master: c0c52d28e05e8bdaa2126570c02ecb1a7358cecc
8 changes: 3 additions & 5 deletions trunk/arch/x86/kernel/cpu/proc.c
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,6 @@ static int show_cpuinfo(struct seq_file *m, void *v)
int fpu_exception;

#ifdef CONFIG_SMP
if (!cpu_online(n))
return 0;
n = c->cpu_index;
#endif
seq_printf(m, "processor\t: %d\n"
Expand Down Expand Up @@ -177,14 +175,14 @@ static int show_cpuinfo(struct seq_file *m, void *v)
static void *c_start(struct seq_file *m, loff_t *pos)
{
if (*pos == 0) /* just in case, cpu 0 is not the first */
*pos = first_cpu(cpu_possible_map);
if ((*pos) < NR_CPUS && cpu_possible(*pos))
*pos = first_cpu(cpu_online_map);
if ((*pos) < NR_CPUS && cpu_online(*pos))
return &cpu_data(*pos);
return NULL;
}
static void *c_next(struct seq_file *m, void *v, loff_t *pos)
{
*pos = next_cpu(*pos, cpu_possible_map);
*pos = next_cpu(*pos, cpu_online_map);
return c_start(m, pos);
}
static void c_stop(struct seq_file *m, void *v)
Expand Down
8 changes: 3 additions & 5 deletions trunk/arch/x86/kernel/setup_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -1078,8 +1078,6 @@ static int show_cpuinfo(struct seq_file *m, void *v)


#ifdef CONFIG_SMP
if (!cpu_online(c->cpu_index))
return 0;
cpu = c->cpu_index;
#endif

Expand Down Expand Up @@ -1171,15 +1169,15 @@ static int show_cpuinfo(struct seq_file *m, void *v)
static void *c_start(struct seq_file *m, loff_t *pos)
{
if (*pos == 0) /* just in case, cpu 0 is not the first */
*pos = first_cpu(cpu_possible_map);
if ((*pos) < NR_CPUS && cpu_possible(*pos))
*pos = first_cpu(cpu_online_map);
if ((*pos) < NR_CPUS && cpu_online(*pos))
return &cpu_data(*pos);
return NULL;
}

static void *c_next(struct seq_file *m, void *v, loff_t *pos)
{
*pos = next_cpu(*pos, cpu_possible_map);
*pos = next_cpu(*pos, cpu_online_map);
return c_start(m, pos);
}

Expand Down

0 comments on commit d79068d

Please sign in to comment.