lkml.org 
[lkml]   [2004]   [Oct]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] anon cris align address_space
CRIS does not demand alignment, so PageAnon's PAGE_MAPPING_ANON bit got
mixed up with the low bit of the struct address_space *mapping pointer.

Patch based on that from Mikael Starvik, but moved the alignment to the
declaration of struct address_space itself, and align to sizeof(long)
so it's well-aligned on all architectures.

Signed-off-by: Hugh Dickins <hugh@veritas.com>
---
include/linux/fs.h | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletion(-)

--- 2.6.10-rc1/include/linux/fs.h 2004-10-23 12:44:10.000000000 +0100
+++ linux/include/linux/fs.h 2004-10-23 20:43:24.000000000 +0100
@@ -348,7 +348,12 @@ struct address_space {
spinlock_t private_lock; /* for use by the address_space */
struct list_head private_list; /* ditto */
struct address_space *assoc_mapping; /* ditto */
-};
+} __attribute__((aligned(sizeof(long))));
+ /*
+ * On most architectures that alignment is already the case; but
+ * must be enforced here for CRIS, to let the least signficant bit
+ * of struct page's "mapping" pointer be used for PAGE_MAPPING_ANON.
+ */

struct block_device {
dev_t bd_dev; /* not a kdev_t - it's a search key */
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:07    [W:1.787 / U:0.068 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site