mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-20 05:31:15 +00:00
[PATCH] Convert highest_possible_processor_id to nr_cpu_ids
We frequently need the maximum number of possible processors in order to allocate arrays for all processors. So far this was done using highest_possible_processor_id(). However, we do need the number of processors not the highest id. Moreover the number was so far dynamically calculated on each invokation. The number of possible processors does not change when the system is running. We can therefore calculate that number once. Signed-off-by: Christoph Lameter <clameter@sgi.com> Cc: Frederik Deweerdt <frederik.deweerdt@gmail.com> Cc: Neil Brown <neilb@suse.de> Cc: Trond Myklebust <trond.myklebust@fys.uio.no> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
74c7aa8b85
commit
53b8a315b7
5 changed files with 17 additions and 29 deletions
|
@ -398,11 +398,11 @@ extern cpumask_t cpu_present_map;
|
|||
#endif
|
||||
|
||||
#ifdef CONFIG_SMP
|
||||
int highest_possible_processor_id(void);
|
||||
extern int nr_cpu_ids;
|
||||
#define any_online_cpu(mask) __any_online_cpu(&(mask))
|
||||
int __any_online_cpu(const cpumask_t *mask);
|
||||
#else
|
||||
#define highest_possible_processor_id() 0
|
||||
#define nr_cpu_ids 1
|
||||
#define any_online_cpu(mask) 0
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue