mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-23 09:19:51 +00:00
ARC: fix /proc/cpuinfo for offline cpus
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
This commit is contained in:
parent
26bc420b59
commit
4c86231c14
1 changed files with 6 additions and 1 deletions
|
@ -412,6 +412,11 @@ static int show_cpuinfo(struct seq_file *m, void *v)
|
|||
char *str;
|
||||
int cpu_id = ptr_to_cpu(v);
|
||||
|
||||
if (!cpu_online(cpu_id)) {
|
||||
seq_printf(m, "processor [%d]\t: Offline\n", cpu_id);
|
||||
goto done;
|
||||
}
|
||||
|
||||
str = (char *)__get_free_page(GFP_TEMPORARY);
|
||||
if (!str)
|
||||
goto done;
|
||||
|
@ -429,7 +434,7 @@ static int show_cpuinfo(struct seq_file *m, void *v)
|
|||
|
||||
free_page((unsigned long)str);
|
||||
done:
|
||||
seq_printf(m, "\n\n");
|
||||
seq_printf(m, "\n");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue