summaryrefslogtreecommitdiffstats
path: root/arch/sh/include/asm/page.h
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2009-07-22 12:20:49 +0200
committerPaul Mundt <lethal@linux-sh.org>2009-07-22 12:20:49 +0200
commit2277ab4a1df50e05bc732fe9488d4e902bb8399a (patch)
treef41cb47f15e02bbd1f79bf08ef7762d3bba934f6 /arch/sh/include/asm/page.h
parentsh: Provide _PAGE_SPECIAL for 32-bit. (diff)
downloadlinux-2277ab4a1df50e05bc732fe9488d4e902bb8399a.tar.xz
linux-2277ab4a1df50e05bc732fe9488d4e902bb8399a.zip
sh: Migrate from PG_mapped to PG_dcache_dirty.
This inverts the delayed dcache flush a bit to be more in line with other platforms. At the same time this also gives us the ability to do some more optimizations and cleanup. Now that the update_mmu_cache() callsite only tests for the bit, the implementation can gradually be split out and made generic, rather than relying on special implementations for each of the peculiar CPU types. SH7705 in 32kB mode and SH-4 still need slightly different handling, but this is something that can remain isolated in the varying page copy/clear routines. On top of that, SH-X3 is dcache coherent, so there is no need to bother with any of these tests in the PTEAEX version of update_mmu_cache(), so we kill that off too. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/include/asm/page.h')
-rw-r--r--arch/sh/include/asm/page.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/sh/include/asm/page.h b/arch/sh/include/asm/page.h
index 49592c780a6e..a31ab40040f0 100644
--- a/arch/sh/include/asm/page.h
+++ b/arch/sh/include/asm/page.h
@@ -50,6 +50,12 @@ extern unsigned long shm_align_mask;
extern unsigned long max_low_pfn, min_low_pfn;
extern unsigned long memory_start, memory_end;
+static inline unsigned long
+pages_do_alias(unsigned long addr1, unsigned long addr2)
+{
+ return (addr1 ^ addr2) & shm_align_mask;
+}
+
extern void clear_page(void *to);
extern void copy_page(void *to, void *from);