lkml.org 
[lkml]   [2014]   [May]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: rcu alignment warning tripping on m68k
On 29/05/14 23:11, One Thousand Gnomes wrote:
> On Thu, 29 May 2014 12:08:32 +1000
> Greg Ungerer <gerg@uclinux.org> wrote:
>
>> Hi All,
>>
>> Inside kernel/rcy/tree.c in __call_rcu() it does an alignment check on
>> the head pointer passed in. This trips on m68k systems, because they only
>> need alignment of 32bit quantities to 16bit boundaries.
>
> __alignof perhaps ?

That might do. Change then becomes something like:

--- a/kernel/rcu/tree.c
+++ b/kernel/rcu/tree.c
@@ -2467,7 +2467,7 @@ __call_rcu(struct rcu_head *head, void (*func)(struct rcu_
unsigned long flags;
struct rcu_data *rdp;

- WARN_ON_ONCE((unsigned long)head & 0x3); /* Misaligned rcu_head! */
+ WARN_ON_ONCE((unsigned long)head & (__alignof__(head) - 1)); /* Misaligned rcu_head! */
if (debug_rcu_head_queue(head)) {
/* Probable double call_rcu(), so leak the callback. */
ACCESS_ONCE(head->func) = rcu_leak_callback;
Thanks
Greg




\
 
 \ /
  Last update: 2014-05-30 04:21    [W:0.072 / U:0.076 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site