metag: Fix ioremap_wc/ioremap_cached build errors
authorJames Hogan <james.hogan@imgtec.com>
Mon, 23 Mar 2015 11:17:56 +0000 (11:17 +0000)
committerJames Hogan <james.hogan@imgtec.com>
Mon, 23 Mar 2015 12:32:37 +0000 (12:32 +0000)
commit0164a711c97b0beeb7994b7d32ccddf586b6d81a
tree77f2335e48a7faf8d469fd91171546b93b43c841
parent9eccca0843205f87c00404b663188b88eb248051
metag: Fix ioremap_wc/ioremap_cached build errors

When ioremap_wc() or ioremap_cached() are used without first including
asm/pgtable.h, the _PAGE_CACHEABLE or _PAGE_WR_COMBINE definitions
aren't found, resulting in build errors like the following (in
next-20150323 due to "lib: devres: add a helper function for
ioremap_wc"):

lib/devres.c: In function ‘devm_ioremap_wc’:
lib/devres.c:91: error: ‘_PAGE_WR_COMBINE’ undeclared

We can't easily include asm/pgtable.h in asm/io.h due to dependency
problems, so split out the _PAGE_* definitions from asm/pgtable.h into a
separate asm/pgtable-bits.h header (as a couple of other architectures
already do), and include that in io.h instead.

Signed-off-by: James Hogan <james.hogan@imgtec.com>
Cc: linux-metag@vger.kernel.org
Cc: Abhilash Kesavan <a.kesavan@samsung.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/metag/include/asm/io.h
arch/metag/include/asm/pgtable-bits.h [new file with mode: 0644]
arch/metag/include/asm/pgtable.h