mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-26 21:54:11 +08:00
4b3073e1c5
On VIVT ARM, when we have multiple shared mappings of the same file in the same MM, we need to ensure that we have coherency across all copies. We do this via make_coherent() by making the pages uncacheable. This used to work fine, until we allowed highmem with highpte - we now have a page table which is mapped as required, and is not available for modification via update_mmu_cache(). Ralf Beache suggested getting rid of the PTE value passed to update_mmu_cache(): On MIPS update_mmu_cache() calls __update_tlb() which walks pagetables to construct a pointer to the pte again. Passing a pte_t * is much more elegant. Maybe we might even replace the pte argument with the pte_t? Ben Herrenschmidt would also like the pte pointer for PowerPC: Passing the ptep in there is exactly what I want. I want that -instead- of the PTE value, because I have issue on some ppc cases, for I$/D$ coherency, where set_pte_at() may decide to mask out the _PAGE_EXEC. So, pass in the mapped page table pointer into update_mmu_cache(), and remove the PTE value, updating all implementations and call sites to suit. Includes a fix from Stephen Rothwell: sparc: fix fallout from update_mmu_cache API change Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
78 lines
1.5 KiB
C
78 lines
1.5 KiB
C
/*
|
|
* nosun4c.c: This file is a bunch of dummies for SMP compiles,
|
|
* so that it does not need sun4c and avoid ifdefs.
|
|
*
|
|
* Copyright (C) 1998 Jakub Jelinek (jj@sunsite.mff.cuni.cz)
|
|
*/
|
|
|
|
#include <linux/kernel.h>
|
|
#include <linux/mm.h>
|
|
#include <linux/init.h>
|
|
#include <asm/pgtable.h>
|
|
|
|
static char shouldnothappen[] __initdata = "32bit SMP kernel only supports sun4m and sun4d\n";
|
|
|
|
/* Dummies */
|
|
struct sun4c_mmu_ring {
|
|
unsigned long xxx1[3];
|
|
unsigned char xxx2[2];
|
|
int xxx3;
|
|
};
|
|
struct sun4c_mmu_ring sun4c_kernel_ring;
|
|
struct sun4c_mmu_ring sun4c_kfree_ring;
|
|
unsigned long sun4c_kernel_faults;
|
|
unsigned long *sun4c_memerr_reg;
|
|
|
|
static void __init should_not_happen(void)
|
|
{
|
|
prom_printf(shouldnothappen);
|
|
prom_halt();
|
|
}
|
|
|
|
unsigned long __init sun4c_paging_init(unsigned long start_mem, unsigned long end_mem)
|
|
{
|
|
should_not_happen();
|
|
return 0;
|
|
}
|
|
|
|
void __init ld_mmu_sun4c(void)
|
|
{
|
|
should_not_happen();
|
|
}
|
|
|
|
void sun4c_mapioaddr(unsigned long physaddr, unsigned long virt_addr, int bus_type, int rdonly)
|
|
{
|
|
}
|
|
|
|
void sun4c_unmapioaddr(unsigned long virt_addr)
|
|
{
|
|
}
|
|
|
|
void sun4c_complete_all_stores(void)
|
|
{
|
|
}
|
|
|
|
pte_t *sun4c_pte_offset(pmd_t * dir, unsigned long address)
|
|
{
|
|
return NULL;
|
|
}
|
|
|
|
pte_t *sun4c_pte_offset_kernel(pmd_t *dir, unsigned long address)
|
|
{
|
|
return NULL;
|
|
}
|
|
|
|
void sun4c_update_mmu_cache(struct vm_area_struct *vma, unsigned long address, pte_t *ptep)
|
|
{
|
|
}
|
|
|
|
void __init sun4c_probe_vac(void)
|
|
{
|
|
should_not_happen();
|
|
}
|
|
|
|
void __init sun4c_probe_memerr_reg(void)
|
|
{
|
|
should_not_happen();
|
|
}
|