* [PATCH] Remove no longer used cpu_possible definitions
@ 2011-03-16 7:16 Juergen Gross
2011-03-16 8:17 ` Keir Fraser
0 siblings, 1 reply; 3+ messages in thread
From: Juergen Gross @ 2011-03-16 7:16 UTC (permalink / raw)
To: xen-devel
[-- Attachment #1: Type: text/plain, Size: 287 bytes --]
cpu_possible_mask and related macros are no longer used in Xen. Remove them
and adjust comments accordingly.
Signed-off-by: juergen.gross@ts.fujitsu.com
1 file changed, 11 insertions(+), 40 deletions(-)
xen/include/xen/cpumask.h | 51 +++++++++------------------------------------
[-- Attachment #2: xen-work.patch --]
[-- Type: text/x-patch, Size: 5262 bytes --]
# HG changeset patch
# User Juergen Gross <juergen.gross@ts.fujitsu.com>
# 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.
Signed-off-by: juergen.gross@ts.fujitsu.com
diff -r c426a7140c99 -r 1e234bd952d3 xen/include/xen/cpumask.h
--- a/xen/include/xen/cpumask.h Tue Mar 15 18:20:46 2011 +0000
+++ b/xen/include/xen/cpumask.h Wed Mar 16 08:15:53 2011 +0100
@@ -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)
[-- Attachment #3: Type: text/plain, Size: 138 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Remove no longer used cpu_possible definitions
2011-03-16 7:16 [PATCH] Remove no longer used cpu_possible definitions Juergen Gross
@ 2011-03-16 8:17 ` Keir Fraser
2011-03-16 8:22 ` Juergen Gross
0 siblings, 1 reply; 3+ messages in thread
From: Keir Fraser @ 2011-03-16 8:17 UTC (permalink / raw)
To: Juergen Gross, xen-devel
A cursory glance indicates it's used a lot in ia64 arch. Was your usage
search really that blinkered?
-- Keir
On 16/03/2011 07:16, "Juergen Gross" <juergen.gross@ts.fujitsu.com> wrote:
> cpu_possible_mask and related macros are no longer used in Xen. Remove them
> and adjust comments accordingly.
>
> Signed-off-by: juergen.gross@ts.fujitsu.com
>
>
> 1 file changed, 11 insertions(+), 40 deletions(-)
> xen/include/xen/cpumask.h | 51 +++++++++------------------------------------
>
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xensource.com
> http://lists.xensource.com/xen-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Remove no longer used cpu_possible definitions
2011-03-16 8:17 ` Keir Fraser
@ 2011-03-16 8:22 ` Juergen Gross
0 siblings, 0 replies; 3+ messages in thread
From: Juergen Gross @ 2011-03-16 8:22 UTC (permalink / raw)
To: Keir Fraser; +Cc: xen-devel
On 03/16/11 09:17, Keir Fraser wrote:
> 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
>
> -- Keir
>
> On 16/03/2011 07:16, "Juergen Gross"<juergen.gross@ts.fujitsu.com> wrote:
>
>> cpu_possible_mask and related macros are no longer used in Xen. Remove them
>> and adjust comments accordingly.
>>
>> Signed-off-by: juergen.gross@ts.fujitsu.com
>>
>>
>> 1 file changed, 11 insertions(+), 40 deletions(-)
>> xen/include/xen/cpumask.h | 51 +++++++++------------------------------------
>>
>>
>> _______________________________________________
>> Xen-devel mailing list
>> Xen-devel@lists.xensource.com
>> http://lists.xensource.com/xen-devel
>
>
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xensource.com
> http://lists.xensource.com/xen-devel
>
>
--
Juergen Gross Principal Developer Operating Systems
TSP ES&S SWE OS6 Telephone: +49 (0) 89 3222 2967
Fujitsu Technology Solutions e-mail: juergen.gross@ts.fujitsu.com
Domagkstr. 28 Internet: ts.fujitsu.com
D-80807 Muenchen Company details: ts.fujitsu.com/imprint.html
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-03-16 8:22 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-16 7:16 [PATCH] Remove no longer used cpu_possible definitions Juergen Gross
2011-03-16 8:17 ` Keir Fraser
2011-03-16 8:22 ` Juergen Gross
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).