From: Andrew Morton empty_zero_page is an arch-specific thing. Alpha does not implement it. Use ZERO_PAGE(). Only mips seems to actually use the `vaddr' arg to ZERO_PAGE. Randomly pick zero for it. Generally, this seems to be a fairly weird way of handling holes. It would be much more straightforward to simply do a clear_user() right there and be done with it. Does a flush_dcache_page() on the zero page work correctly on all architectures? Why are we testing mapping_writably_mapped() there? flush_dcache_page() should be able to handle that? Why are we running flush_dcache_page() at all? That's only supposed to be used when the kernel modifies a possibly-mmapped pagecache page by hand. But here we're _reading_ from the page which ->direct_access() returned. Why isn't __inode_direct_access() in a generic file? Please fix up coding style in fs/ext2/xip.c: int ext2_clear_xip_target(struct inode *inode, int block) { Who made that up? It should be int ext2_clear_xip_target(struct inode *inode, int block) { Please clean up ext2_get_xip_page() - it's quite nutty. The ->direct_access() API seems poorly designed. a) It returns an unsigned long. What if an architecture supports highmem and wants to return data in highmem pages? For this, ->direct_access() should return a pageframe. b) But then again, ->get_xip_page() is supposed to return the directly-addressed memory as a pageframe! This means that the architecture can only perform xip access to memory which is described in its pageframe array. This seems weird. What if there's some random piece of ROM somewhere in the memory map which isn't inside the mem_map[] arena? In this case we want ->get_xip_page() to return a kernel-virtual address. Cc: Carsten Otte Signed-off-by: Andrew Morton --- mm/filemap_xip.c | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) diff -puN mm/filemap_xip.c~xip-empty_zero_page-build-fix mm/filemap_xip.c --- devel/mm/filemap_xip.c~xip-empty_zero_page-build-fix 2005-07-02 00:53:20.000000000 -0700 +++ devel-akpm/mm/filemap_xip.c 2005-07-02 00:57:02.000000000 -0700 @@ -68,7 +68,7 @@ do_xip_mapping_read(struct address_space if (unlikely(IS_ERR(page))) { if (PTR_ERR(page) == -ENODATA) { /* sparse */ - page = virt_to_page(empty_zero_page); + page = ZERO_PAGE(0); } else { desc->error = PTR_ERR(page); goto out; _