Date: Sat, 13 Mar 2004 00:40:14 -0800 (PST) From: Juli Mallett <jmallett@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 48878 for review Message-ID: <200403130840.i2D8eECb054668@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=48878 Change 48878 by jmallett@jmallett_oingo on 2004/03/13 00:39:31 Go nuts with using KSEG1 instead of KSEG0. This fixes some incoherent issues. This mess needs fixed in the future, but I can't figure out now where we have problems. Affected files ... .. //depot/projects/mips/sys/mips/mips/pmap.c#33 edit Differences ... ==== //depot/projects/mips/sys/mips/mips/pmap.c#33 (text+ko) ==== @@ -247,7 +247,7 @@ pa = phys_avail[0]; phys_avail[0] += size; - va = MIPS_PHYS_TO_KSEG0(pa); + va = MIPS_PHYS_TO_KSEG1(pa); bzero((caddr_t) va, size); return va; } @@ -332,7 +332,7 @@ break; } - va = (void *)MIPS_PHYS_TO_KSEG0(m->phys_addr); + va = (void *)MIPS_PHYS_TO_KSEG1(m->phys_addr); if ((wait & M_ZERO) && (m->flags & PG_ZERO) == 0) bzero(va, PAGE_SIZE); return (va); @@ -343,7 +343,7 @@ { vm_page_t m; - m = PHYS_TO_VM_PAGE(MIPS_KSEG0_TO_PHYS((vm_offset_t)mem)); + m = PHYS_TO_VM_PAGE(MIPS_KSEG1_TO_PHYS((vm_offset_t)mem)); vm_page_lock_queues(); vm_page_free(m); vm_page_unlock_queues(); @@ -520,8 +520,8 @@ { vm_offset_t pa; - if (va >= MIPS_KSEG0_START && va <= MIPS_KSEG0_END) - pa = MIPS_KSEG0_TO_PHYS(va); + if (va >= MIPS_KSEG1_START && va <= MIPS_KSEG1_END) + pa = MIPS_KSEG1_TO_PHYS(va); else pa = pmap_extract(kernel_pmap, va); return pa; @@ -649,7 +649,7 @@ #if 0 /* XXX notyet, need pmap_extract etc., to love us. */ return MIPS_PHYS_TO_XKPHYS(MIPS_XKPHYS_UC, start); #endif - return MIPS_PHYS_TO_KSEG0(start); + return MIPS_PHYS_TO_KSEG1(start); } void @@ -699,7 +699,7 @@ vm_page_unlock_queues(); VM_OBJECT_UNLOCK(pmap->pm_pteobj); - pmap->pm_lev1 = (pt_entry_t*) MIPS_PHYS_TO_KSEG0(VM_PAGE_TO_PHYS(lev1pg)); + pmap->pm_lev1 = (pt_entry_t*) MIPS_PHYS_TO_KSEG1(VM_PAGE_TO_PHYS(lev1pg)); if ((lev1pg->flags & PG_ZERO) == 0) bzero(pmap->pm_lev1, PAGE_SIZE); @@ -1181,7 +1181,7 @@ void * pmap_kenter_temporary(vm_offset_t pa, int i) { - return (void *) MIPS_PHYS_TO_KSEG0(pa - (i * PAGE_SIZE)); + return (void *) MIPS_PHYS_TO_KSEG1(pa - (i * PAGE_SIZE)); } vm_page_t @@ -1266,7 +1266,7 @@ void pmap_zero_page(vm_page_t m) { - vm_offset_t va = MIPS_PHYS_TO_KSEG0(VM_PAGE_TO_PHYS(m)); + vm_offset_t va = MIPS_PHYS_TO_KSEG1(VM_PAGE_TO_PHYS(m)); bzero((caddr_t) va, PAGE_SIZE); } @@ -1282,7 +1282,7 @@ void pmap_zero_page_area(vm_page_t m, int off, int size) { - vm_offset_t va = MIPS_PHYS_TO_KSEG0(VM_PAGE_TO_PHYS(m)); + vm_offset_t va = MIPS_PHYS_TO_KSEG1(VM_PAGE_TO_PHYS(m)); bzero((char *)(caddr_t)va + off, size); } @@ -1296,7 +1296,7 @@ void pmap_zero_page_idle(vm_page_t m) { - vm_offset_t va = MIPS_PHYS_TO_KSEG0(VM_PAGE_TO_PHYS(m)); + vm_offset_t va = MIPS_PHYS_TO_KSEG1(VM_PAGE_TO_PHYS(m)); bzero((caddr_t) va, PAGE_SIZE); } @@ -1310,8 +1310,8 @@ void pmap_copy_page(vm_page_t msrc, vm_page_t mdst) { - vm_offset_t src = MIPS_PHYS_TO_KSEG0(VM_PAGE_TO_PHYS(msrc)); - vm_offset_t dst = MIPS_PHYS_TO_KSEG0(VM_PAGE_TO_PHYS(mdst)); + vm_offset_t src = MIPS_PHYS_TO_KSEG1(VM_PAGE_TO_PHYS(msrc)); + vm_offset_t dst = MIPS_PHYS_TO_KSEG1(VM_PAGE_TO_PHYS(mdst)); bcopy((caddr_t) src, (caddr_t) dst, PAGE_SIZE); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200403130840.i2D8eECb054668>