Messages in this thread Patch in this message | | | Date | Sun, 24 Oct 2004 16:39:42 +0100 (BST) | From | Hugh Dickins <> | 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/
| |