]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/xen.git/commitdiff
sched_rt: use the correct type for _cpumask_scratch
authorJulien Grall <julien.grall@citrix.com>
Wed, 3 Jun 2015 07:24:50 +0000 (09:24 +0200)
committerJan Beulich <jbeulich@suse.com>
Wed, 3 Jun 2015 07:24:50 +0000 (09:24 +0200)
The commit 376bbbabbda607d2039b8f839f15ff02721597d2 "sched_rt: print useful
affinity info when dumping" breaks build on ARM64:

sched_rt.c: In function ‘rt_init’:
sched_rt.c:442:26: error: assignment from incompatible pointer type [-Werror]
         _cpumask_scratch = xmalloc_array(cpumask_var_t, nr_cpu_ids);
                          ^
sched_rt.c: In function ‘rt_alloc_pdata’:
sched_rt.c:489:29: error: passing argument 1 of ‘alloc_cpumask_var’ from incompatible pointer type [-Werror]
     if ( !alloc_cpumask_var(&_cpumask_scratch[cpu]) )

This is because cpumask_var_t is not a type alias to cpumask_t** when
the number of CPU > 2 * BITS_PER_LONG. The correct type for
_cpumask_scratch should be cpumask_var_t*.

Signed-off-by: Julien Grall <julien.grall@citrix.com>
xen/common/sched_rt.c

index 59ead57e2b255a3a33850b10ed9bebd33253732c..5836d274b2df469158838f539b7b26ebf6ea5fb5 100644 (file)
  /*
   * Useful to avoid too many cpumask_var_t on the stack.
   */
-static cpumask_t **_cpumask_scratch;
+static cpumask_var_t *_cpumask_scratch;
 #define cpumask_scratch _cpumask_scratch[smp_processor_id()]
 
 /*