[RBTREE] Add explicit alignment to sizeof(long) for struct rb_node.
authorDavid Woodhouse <dwmw2@infradead.org>
Fri, 21 Apr 2006 22:15:39 +0000 (23:15 +0100)
committerDavid Woodhouse <dwmw2@infradead.org>
Fri, 21 Apr 2006 22:15:39 +0000 (23:15 +0100)
Seems like a strange requirement, but allegedly it was necessary for
struct address_space on CRIS, because it otherwise ended up being only
byte-aligned. It's harmless enough, and easier to just do it than to
prove it isn't necessary... although I really ought to dig out my etrax
board and test it some time.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
include/linux/rbtree.h

index 748be50329d87dc3e36c0020125dba2b86db89a1..3cc30b0ab8283768e8552a5aaed4a0558fd88c64 100644 (file)
@@ -104,7 +104,8 @@ struct rb_node
 #define        RB_BLACK        1
        struct rb_node *rb_right;
        struct rb_node *rb_left;
-};
+} __attribute__((aligned(sizeof(long))));
+    /* The alignment might seem pointless, but allegedly CRIS needs it */
 
 struct rb_root
 {