Remove no longer used cpu_possible definitions
PATCH 1/1 Remove no longer used cpu_possible definitions
cpu_possible_mask and related macros are no longer used in Xen. Remove them and adjust comments accordingly.
1 file changed, 11 insertions(+), 40 deletions(-)
xen/include/xen/cpumask.h | 51 +++++++++------------------------------------
# HG changeset patch
# User Juergen Gross <[email protected]> # Date 1300259753 -3600
# Node ID 1e234bd952d3ede539e77aedb972a716f79c4ecc # Parent c426a7140c9923deefa9446f82fb96961f289616 Remove no longer used cpu_possible definitions.
cpu_possible_mask and related macros are no longer used in Xen. Remove them and adjust comments accordingly.
xen/include/xen/cpumask.h +11 -40
@@ -52,16 +52,13 @@* for_each_cpu_mask(cpu, mask) for-loop cpu over mask * * int num_online_cpus() Number of online CPUs -* int num_possible_cpus() Number of all possible CPUs * int num_present_cpus() Number of present CPUs * * int cpu_online(cpu) Is some cpu online? -* int cpu_possible(cpu) Is some cpu possible? * int cpu_present(cpu) Is some cpu present (can schedule)? * * int any_online_cpu(mask) First online cpu in mask, or NR_CPUS * -* for_each_possible_cpu(cpu) for-loop cpu over cpu_possible_map * for_each_online_cpu(cpu) for-loop cpu over cpu_online_map * for_each_present_cpu(cpu) for-loop cpu over cpu_present_map *
@@ -332,44 +329,24 @@ static inline int __cpulist_scnprintf(ch#endif /* NR_CPUS */ /* -* The following particular system cpumasks and operations manage -* possible, present and online cpus. Each of them is a fixed size -* bitmap of size NR_CPUS. +* The following particular system cpumasks and operations manage present and +* online cpus. Each of them is a fixed size bitmap of size NR_CPUS. * -* #ifdef CONFIG_HOTPLUG_CPU -* cpu_possible_map - has bit 'cpu' set iff cpu is populatable -* cpu_present_map - has bit 'cpu' set iff cpu is populated -* cpu_online_map - has bit 'cpu' set iff cpu available to scheduler -* #else -* cpu_possible_map - has bit 'cpu' set iff cpu is populated -* cpu_present_map - copy of cpu_possible_map -* cpu_online_map - has bit 'cpu' set iff cpu available to scheduler -* #endif +* cpu_present_map - has bit 'cpu' set iff cpu is populated +* cpu_online_map - has bit 'cpu' set iff cpu available to scheduler * -* In either case, NR_CPUS is fixed at compile time, as the static -* size of these bitmaps. The cpu_possible_map is fixed at boot -* time, as the set of CPU id's that it is possible might ever -* be plugged in at anytime during the life of that system boot. -* The cpu_present_map is dynamic(*), representing which CPUs -* are currently plugged in. And cpu_online_map is the dynamic -* subset of cpu_present_map, indicating those CPUs available -* for scheduling. +* NR_CPUS is fixed at compile time, as the static size of these bitmaps. +* The cpu_present_map is dynamic, representing which CPUs are currently +* plugged in. And cpu_online_map is the dynamic subset of cpu_present_map, +* indicating those CPUs available for scheduling. * -* If HOTPLUG is enabled, then cpu_possible_map is forced to have -* all NR_CPUS bits set, otherwise it is just the set of CPUs that -* ACPI reports present at boot. -* -* If HOTPLUG is enabled, then cpu_present_map varies dynamically, -* depending on what ACPI reports as currently plugged in, otherwise -* cpu_present_map is just a copy of cpu_possible_map. -* -* (*) Well, cpu_present_map is dynamic in the hotplug case. If not -* hotplug, it's a copy of cpu_possible_map, hence fixed at boot. +* cpu_present_map varies dynamically, depending on what ACPI reports as +* currently plugged in. * * Subtleties: * 1) UP arch's (NR_CPUS == 1, CONFIG_SMP not defined) hardcode * assumption that their single CPU is online. The UP -* cpu_{online,possible,present}_maps are placebos. Changing them +* cpu_{online,present}_maps are placebos. Changing them * will have no useful affect on the following num_*_cpus() * and cpu_*() macros in the UP case. This ugliness is a UP * optimization - don't waste any instructions or memory references
@@ -387,23 +364,18 @@ static inline int __cpulist_scnprintf(ch* main(){ set1(3); set2(5); } */ -extern cpumask_t cpu_possible_map;extern cpumask_t cpu_online_map;extern cpumask_t cpu_present_map;#if NR_CPUS >1 #define num_online_cpus () cpus_weight(cpu_online_map) -#define num_possible_cpus () cpus_weight(cpu_possible_map)#define num_present_cpus () cpus_weight(cpu_present_map)#define cpu_online (cpu) cpu_isset((cpu), cpu_online_map) -#define cpu_possible (cpu) cpu_isset((cpu), cpu_possible_map)#define cpu_present (cpu) cpu_isset((cpu), cpu_present_map)#else #define num_online_cpus () 1 -#define num_possible_cpus () 1#define num_present_cpus () 1#define cpu_online (cpu) ((cpu) == 0) -#define cpu_possible (cpu) ((cpu) == 0)#define cpu_present (cpu) ((cpu) == 0)#endif
@@ -416,7 +388,6 @@ extern cpumask_t cpu_present_map; cpu; \ }) -#define for_each_possible_cpu (cpu) for_each_cpu_mask((cpu), cpu_possible_map)#define for_each_online_cpu (cpu) for_each_cpu_mask((cpu), cpu_online_map)#define for_each_present_cpu (cpu) for_each_cpu_mask((cpu), cpu_present_map)
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
A cursory glance indicates it's used a lot in ia64 arch. Was your usage search really that blinkered?
-- Keir
Quoted 14 lines · Juergen Gross
cpu_possible_maskand related macros are no longer used in Xen. Remove them and adjust comments accordingly.Signed-off-by [email protected]1 file changed, 11 insertions(+), 40 deletions(-)
xen/include/xen/cpumask.h| 51 +++++++++------------------------------------_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
Quoted 2 lines · Keir Fraser
A cursory glance indicates it's used a lot in ia64 arch. Was your usage search really that blinkered?
Oops, sorry!
I used "make cscope" under xen and used cscope to search...
I wasn't aware at the moment that this will ignore other architectures...
Juergen
Quoted 28 lines
-- Keir
Quoted 6 lines · Juergen Gross
cpu_possible_maskand related macros are no longer used in Xen. Remove them and adjust comments accordingly.Signed-off-by [email protected]Quoted 8 lines
1 file changed, 11 insertions(+), 40 deletions(-)
xen/include/xen/cpumask.h| 51 +++++++++------------------------------------_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
Signature · 5 lines
Juergen Gross Principal Developer Operating Systems TSP ES&S SWE OS6 Telephone: +49 (0) 89 3222 2967 Fujitsu Technology Solutions e-mail: [email protected] Domagkstr. 28 Internet: ts.fujitsu.com D-80807 Muenchen Company details: ts.fujitsu.com/imprint.html