Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus
* 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus: [MIPS] Increase cp0 compare clockevent min_delta_ns from 0x30 to 0x300. [MIPS] Cache: Provide more information on cache policy on bootup. [MIPS] Fix aliasing bug in copy_user_highpage, take 2. [MIPS] VPE loader: convert from struct class_ device to struct device [MIPS] MIPSsim: Fix booting from NFS root [MIPS] Alchemy: Get rid of au1xxx_irq_map_t. [MIPS] Alchemy: Get rid of au_ffz(). [MIPS] Alchemy: Get rid of au_ffs(). [MIPS] Alchemy: cleanup interrupt code. [MIPS] Lasat: Fix build by conversion to irq_cpu.c. [MIPS] Lasat: Add #ifndef ... #endif include warpper to lasatint.h. [MIPS] IP22: Enable -Werror. [MIPS] IP22: Fix warning. [MIPS] IP22: Complain if requesting the front panel irq failed. [MIPS] vmlinux.lds.S: Handle KPROBES_TEXT. [MIPS] vmlinux.lds.S: Fix handling of .notes in final link. [MIPS] vmlinux.lds.S: Remove duplicate comment. [MIPS] MSP71XX: Add workarounds file. [MIPS] IP32: Fix build by conversion to irq_cpu.c.
This commit is contained in:
@@ -983,11 +983,15 @@ static void __init probe_pcache(void)
|
||||
|
||||
printk("Primary instruction cache %ldkB, %s, %s, linesize %d bytes.\n",
|
||||
icache_size >> 10,
|
||||
cpu_has_vtag_icache ? "virtually tagged" : "physically tagged",
|
||||
cpu_has_vtag_icache ? "VIVT" : "VIPT",
|
||||
way_string[c->icache.ways], c->icache.linesz);
|
||||
|
||||
printk("Primary data cache %ldkB, %s, linesize %d bytes.\n",
|
||||
dcache_size >> 10, way_string[c->dcache.ways], c->dcache.linesz);
|
||||
printk("Primary data cache %ldkB, %s, %s, %s, linesize %d bytes\n",
|
||||
dcache_size >> 10, way_string[c->dcache.ways],
|
||||
(c->dcache.flags & MIPS_CACHE_PINDEX) ? "PIPT" : "VIPT",
|
||||
(c->dcache.flags & MIPS_CACHE_ALIASES) ?
|
||||
"cache aliases" : "no aliases",
|
||||
c->dcache.linesz);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@@ -211,7 +211,7 @@ void copy_user_highpage(struct page *to, struct page *from,
|
||||
void *vfrom, *vto;
|
||||
|
||||
vto = kmap_atomic(to, KM_USER1);
|
||||
if (cpu_has_dc_aliases && !Page_dcache_dirty(from)) {
|
||||
if (cpu_has_dc_aliases && page_mapped(from)) {
|
||||
vfrom = kmap_coherent(from, vaddr);
|
||||
copy_page(vto, vfrom);
|
||||
kunmap_coherent();
|
||||
@@ -234,12 +234,15 @@ void copy_to_user_page(struct vm_area_struct *vma,
|
||||
struct page *page, unsigned long vaddr, void *dst, const void *src,
|
||||
unsigned long len)
|
||||
{
|
||||
if (cpu_has_dc_aliases) {
|
||||
if (cpu_has_dc_aliases && page_mapped(page)) {
|
||||
void *vto = kmap_coherent(page, vaddr) + (vaddr & ~PAGE_MASK);
|
||||
memcpy(vto, src, len);
|
||||
kunmap_coherent();
|
||||
} else
|
||||
} else {
|
||||
memcpy(dst, src, len);
|
||||
if (cpu_has_dc_aliases)
|
||||
SetPageDcacheDirty(page);
|
||||
}
|
||||
if ((vma->vm_flags & VM_EXEC) && !cpu_has_ic_fills_f_dc)
|
||||
flush_cache_page(vma, vaddr, page_to_pfn(page));
|
||||
}
|
||||
@@ -250,13 +253,15 @@ void copy_from_user_page(struct vm_area_struct *vma,
|
||||
struct page *page, unsigned long vaddr, void *dst, const void *src,
|
||||
unsigned long len)
|
||||
{
|
||||
if (cpu_has_dc_aliases) {
|
||||
void *vfrom =
|
||||
kmap_coherent(page, vaddr) + (vaddr & ~PAGE_MASK);
|
||||
if (cpu_has_dc_aliases && page_mapped(page)) {
|
||||
void *vfrom = kmap_coherent(page, vaddr) + (vaddr & ~PAGE_MASK);
|
||||
memcpy(dst, vfrom, len);
|
||||
kunmap_coherent();
|
||||
} else
|
||||
} else {
|
||||
memcpy(dst, src, len);
|
||||
if (cpu_has_dc_aliases)
|
||||
SetPageDcacheDirty(page);
|
||||
}
|
||||
}
|
||||
|
||||
EXPORT_SYMBOL(copy_from_user_page);
|
||||
|
Reference in New Issue
Block a user