aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc/mm/srmmu.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@sunset.davemloft.net>2006-03-21 05:29:39 -0500
committerDavid S. Miller <davem@sunset.davemloft.net>2006-03-22 04:15:13 -0500
commit14778d9072e53d2171f66ffd9657daff41acfaed (patch)
tree3b60565ec1e957800fc3bf4743497202a24f8279 /arch/sparc/mm/srmmu.c
parente952f31bce6e9f64db01f607abc46529ba57ac9e (diff)
[SPARC]: Respect vm_page_prot in io_remap_page_range().
Make sure the callers do a pgprot_noncached() on vma->vm_page_prot. Pointed out by Hugh Dickens. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc/mm/srmmu.c')
-rw-r--r--arch/sparc/mm/srmmu.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/arch/sparc/mm/srmmu.c b/arch/sparc/mm/srmmu.c
index c664b962987c..27b0e0ba8581 100644
--- a/arch/sparc/mm/srmmu.c
+++ b/arch/sparc/mm/srmmu.c
@@ -2130,6 +2130,13 @@ static unsigned long srmmu_pte_to_pgoff(pte_t pte)
2130 return pte_val(pte) >> SRMMU_PTE_FILE_SHIFT; 2130 return pte_val(pte) >> SRMMU_PTE_FILE_SHIFT;
2131} 2131}
2132 2132
2133static pgprot_t srmmu_pgprot_noncached(pgprot_t prot)
2134{
2135 prot &= ~__pgprot(SRMMU_CACHE);
2136
2137 return prot;
2138}
2139
2133/* Load up routines and constants for sun4m and sun4d mmu */ 2140/* Load up routines and constants for sun4m and sun4d mmu */
2134void __init ld_mmu_srmmu(void) 2141void __init ld_mmu_srmmu(void)
2135{ 2142{
@@ -2150,9 +2157,9 @@ void __init ld_mmu_srmmu(void)
2150 BTFIXUPSET_INT(page_readonly, pgprot_val(SRMMU_PAGE_RDONLY)); 2157 BTFIXUPSET_INT(page_readonly, pgprot_val(SRMMU_PAGE_RDONLY));
2151 BTFIXUPSET_INT(page_kernel, pgprot_val(SRMMU_PAGE_KERNEL)); 2158 BTFIXUPSET_INT(page_kernel, pgprot_val(SRMMU_PAGE_KERNEL));
2152 page_kernel = pgprot_val(SRMMU_PAGE_KERNEL); 2159 page_kernel = pgprot_val(SRMMU_PAGE_KERNEL);
2153 pg_iobits = SRMMU_VALID | SRMMU_WRITE | SRMMU_REF;
2154 2160
2155 /* Functions */ 2161 /* Functions */
2162 BTFIXUPSET_CALL(pgprot_noncached, srmmu_pgprot_noncached, BTFIXUPCALL_NORM);
2156#ifndef CONFIG_SMP 2163#ifndef CONFIG_SMP
2157 BTFIXUPSET_CALL(___xchg32, ___xchg32_sun4md, BTFIXUPCALL_SWAPG1G2); 2164 BTFIXUPSET_CALL(___xchg32, ___xchg32_sun4md, BTFIXUPCALL_SWAPG1G2);
2158#endif 2165#endif