
From: Hugh Dickins <hugh@veritas.com>

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>
Signed-off-by: Andrew Morton <akpm@osdl.org>
---

 25-akpm/include/linux/fs.h |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletion(-)

diff -puN include/linux/fs.h~anon-cris-align-address_space include/linux/fs.h
--- 25/include/linux/fs.h~anon-cris-align-address_space	2004-10-24 23:13:56.879315216 -0700
+++ 25-akpm/include/linux/fs.h	2004-10-24 23:13:56.884314456 -0700
@@ -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 */
_
