X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=arch%2Fsparc%2Fmm%2Fsrmmu.c;h=533946c574c760090efd77ed974aa136e846fbc4;hb=20fcd31c96d8a7938e49ec2bc2249a5256b1ab2f;hp=b873e84215afd4704a34ea26f61de9f922c394f7;hpb=433e2af4175021d339b067f6e7ee0a4e4c4f7e2d;p=linux-2.6.git diff --git a/arch/sparc/mm/srmmu.c b/arch/sparc/mm/srmmu.c index b873e8421..533946c57 100644 --- a/arch/sparc/mm/srmmu.c +++ b/arch/sparc/mm/srmmu.c @@ -88,7 +88,7 @@ ctxd_t *srmmu_ctx_table_phys; ctxd_t *srmmu_context_table; int viking_mxcc_present; -static spinlock_t srmmu_context_spinlock = SPIN_LOCK_UNLOCKED; +static DEFINE_SPINLOCK(srmmu_context_spinlock); int is_hypersparc; @@ -133,11 +133,12 @@ static struct bit_map srmmu_nocache_map; static unsigned long srmmu_pte_pfn(pte_t pte) { if (srmmu_device_memory(pte_val(pte))) { - /* XXX Anton obviously had something in mind when he did this. - * But what? + /* Just return something that will cause + * pfn_valid() to return false. This makes + * copy_one_pte() to just directly copy to + * PTE over. */ - /* return (struct page *)~0; */ - BUG(); + return ~0UL; } return (pte_val(pte) & SRMMU_PTE_PMASK) >> (PAGE_SHIFT-4); } @@ -2197,6 +2198,7 @@ void __init ld_mmu_srmmu(void) BTFIXUPSET_CALL(free_pgd_fast, srmmu_free_pgd_fast, BTFIXUPCALL_NORM); BTFIXUPSET_CALL(get_pgd_fast, srmmu_get_pgd_fast, BTFIXUPCALL_NORM); + BTFIXUPSET_HALF(pte_readi, SRMMU_NOREAD); BTFIXUPSET_HALF(pte_writei, SRMMU_WRITE); BTFIXUPSET_HALF(pte_dirtyi, SRMMU_DIRTY); BTFIXUPSET_HALF(pte_youngi, SRMMU_REF);