projects
/
GitHub
/
LineageOS
/
G12
/
android_kernel_amlogic_linux-4.9.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
26bc420
)
ARC: fix /proc/cpuinfo for offline cpus
author
Vineet Gupta
<vgupta@synopsys.com>
Fri, 12 Dec 2014 04:35:03 +0000
(10:05 +0530)
committer
Vineet Gupta
<vgupta@synopsys.com>
Mon, 2 Feb 2015 11:38:37 +0000
(17:08 +0530)
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
arch/arc/kernel/setup.c
patch
|
blob
|
blame
|
history
diff --git
a/arch/arc/kernel/setup.c
b/arch/arc/kernel/setup.c
index 252bf603db9c7db023d75b5374580d8f5325c85d..900f68a7008832017296f3dc641e70203358c5d6 100644
(file)
--- a/
arch/arc/kernel/setup.c
+++ b/
arch/arc/kernel/setup.c
@@
-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;
}