All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] xen/sched_rt: Use the correct type for _cpumask_scratch
@ 2015-06-02 15:07 Julien Grall
  2015-06-04  8:57 ` Dario Faggioli
  0 siblings, 1 reply; 3+ messages in thread
From: Julien Grall @ 2015-06-02 15:07 UTC (permalink / raw)
  To: xen-devel
  Cc: ian.campbell, George Dunlap, Dario Faggioli, tim, Julien Grall,
	stefano.stabellini

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>
Cc: Dario Faggioli <dario.faggioli@citrix.com>
Cc: George Dunlap <george.dunlap@eu.citrix.com>
---
 xen/common/sched_rt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xen/common/sched_rt.c b/xen/common/sched_rt.c
index 59ead57..5836d27 100644
--- a/xen/common/sched_rt.c
+++ b/xen/common/sched_rt.c
@@ -127,7 +127,7 @@
  /*
   * 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()]
 
 /*
-- 
2.1.4


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] xen/sched_rt: Use the correct type for _cpumask_scratch
  2015-06-02 15:07 [PATCH] xen/sched_rt: Use the correct type for _cpumask_scratch Julien Grall
@ 2015-06-04  8:57 ` Dario Faggioli
  2015-06-04  9:00   ` Julien Grall
  0 siblings, 1 reply; 3+ messages in thread
From: Dario Faggioli @ 2015-06-04  8:57 UTC (permalink / raw)
  To: Julien Grall
  Cc: George Dunlap, xen-devel, tim, ian.campbell, stefano.stabellini


[-- Attachment #1.1: Type: text/plain, Size: 1204 bytes --]

On Tue, 2015-06-02 at 16:07 +0100, Julien Grall wrote:
> 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.
> 
Oh, right.

Sorry for this, I didn't have an ARM build test sat up when working on
this patch and, although now I have it, I did not run it through it when
resending the patch (although, this is probably not only ARM related!).

Sorry also for not replying to this promptly, I was on leave until today
(good that this has been picked already anyway :-)).

Dario

[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

[-- Attachment #2: Type: text/plain, Size: 126 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] xen/sched_rt: Use the correct type for _cpumask_scratch
  2015-06-04  8:57 ` Dario Faggioli
@ 2015-06-04  9:00   ` Julien Grall
  0 siblings, 0 replies; 3+ messages in thread
From: Julien Grall @ 2015-06-04  9:00 UTC (permalink / raw)
  To: Dario Faggioli
  Cc: George Dunlap, xen-devel, tim, ian.campbell, stefano.stabellini

Hi Dario,

On 04/06/2015 09:57, Dario Faggioli wrote:
> On Tue, 2015-06-02 at 16:07 +0100, Julien Grall wrote:
>> 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.
>>
> Oh, right.
>
> Sorry for this, I didn't have an ARM build test sat up when working on
> this patch and, although now I have it, I did not run it through it when
> resending the patch (although, this is probably not only ARM related!).

It's only present on ARM64 build. ARM32 build perfectly fine.

Regards,

-- 
Julien Grall

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-06-04  9:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-02 15:07 [PATCH] xen/sched_rt: Use the correct type for _cpumask_scratch Julien Grall
2015-06-04  8:57 ` Dario Faggioli
2015-06-04  9:00   ` Julien Grall

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.