diff options
author | Noam Camus <noamc@ezchip.com> | 2016-10-19 13:25:03 +0200 |
---|---|---|
committer | Vineet Gupta <vgupta@synopsys.com> | 2016-10-19 19:01:55 +0200 |
commit | 3da43104d3187184d7417569cb3360511229f761 (patch) | |
tree | c749270ed6b3f0e941835d13be3bf5e9f6946da4 /arch | |
parent | ARC: [build] Support gz, lzma compressed uImage (diff) | |
download | linux-3da43104d3187184d7417569cb3360511229f761.tar.xz linux-3da43104d3187184d7417569cb3360511229f761.zip |
ARC: Adjust cpuinfo for non-continuous cpu ids
num_possible_cpus() returns how many CPUs may be present on system.
However we want the highest possible CPU number.
This may be differ in a sparsed possible CPUs map.
Such map achived by OF for plat-eznps.
For example if we have:
possible cpus mask 0,3
Then:
num_possible_cpus() is equal 2
while
nr_cpu_ids is equal 4.
Only for value 4 c_start() will provide correct cpuinfo at procfs.
Signed-off-by: Noam Camus <noamc@ezchip.com>
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arc/kernel/setup.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arc/kernel/setup.c b/arch/arc/kernel/setup.c index 3df7f9c72f42..75e540972135 100644 --- a/arch/arc/kernel/setup.c +++ b/arch/arc/kernel/setup.c @@ -507,7 +507,7 @@ static void *c_start(struct seq_file *m, loff_t *pos) * way to pass it w/o having to kmalloc/free a 2 byte string. * Encode cpu-id as 0xFFcccc, which is decoded by show routine. */ - return *pos < num_possible_cpus() ? cpu_to_ptr(*pos) : NULL; + return *pos < nr_cpu_ids ? cpu_to_ptr(*pos) : NULL; } static void *c_next(struct seq_file *m, void *v, loff_t *pos) |