Date: Wed, 14 Apr 2010 00:50:10 +0000 (UTC) From: Juli Mallett <jmallett@FreeBSD.org> To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r206574 - in user/jmallett/octeon/sys/mips: include mips Message-ID: <201004140050.o3E0oA9D014801@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: jmallett Date: Wed Apr 14 00:50:09 2010 New Revision: 206574 URL: http://svn.freebsd.org/changeset/base/206574 Log: Hide floating page support on N64. Modified: user/jmallett/octeon/sys/mips/include/pmap.h user/jmallett/octeon/sys/mips/mips/mem.c user/jmallett/octeon/sys/mips/mips/pmap.c Modified: user/jmallett/octeon/sys/mips/include/pmap.h ============================================================================== --- user/jmallett/octeon/sys/mips/include/pmap.h Wed Apr 14 00:33:36 2010 (r206573) +++ user/jmallett/octeon/sys/mips/include/pmap.h Wed Apr 14 00:50:09 2010 (r206574) @@ -180,6 +180,7 @@ int pmap_compute_pages_to_dump(void); void pmap_update_page(pmap_t pmap, vm_offset_t va, pt_entry_t pte); void pmap_flush_pvcache(vm_page_t m); +#if !defined(__mips_n64) /* * floating virtual pages (FPAGES) * @@ -210,6 +211,7 @@ vm_offset_t pmap_map_fpage(vm_paddr_t pa, struct fpage *fp, boolean_t check_unmaped); void pmap_unmap_fpage(vm_paddr_t pa, struct fpage *fp); +#endif #endif /* _KERNEL */ Modified: user/jmallett/octeon/sys/mips/mips/mem.c ============================================================================== --- user/jmallett/octeon/sys/mips/mips/mem.c Wed Apr 14 00:33:36 2010 (r206573) +++ user/jmallett/octeon/sys/mips/mips/mem.c Wed Apr 14 00:50:09 2010 (r206574) @@ -102,6 +102,7 @@ memrw(dev, uio, flags) if (is_cacheable_mem(v) && is_cacheable_mem(v + c - 1)) { +#if !defined(__mips_n64) struct fpage *fp; struct sysmaps *sysmaps; @@ -110,17 +111,24 @@ memrw(dev, uio, flags) sched_pin(); fp = &sysmaps->fp[PMAP_FPAGE1]; +#endif pa = uio->uio_offset & ~PAGE_MASK; +#if !defined(__mips_n64) va = pmap_map_fpage(pa, fp, FALSE); +#else + va = MIPS_PHYS_TO_XKPHYS(XKPHYS_CCA, pa); +#endif o = (int)uio->uio_offset & PAGE_MASK; c = (u_int)(PAGE_SIZE - ((uintptr_t)iov->iov_base & PAGE_MASK)); c = min(c, (u_int)(PAGE_SIZE - o)); c = min(c, (u_int)iov->iov_len); error = uiomove((caddr_t)(va + o), (int)c, uio); +#if !defined(__mips_n64) pmap_unmap_fpage(pa, fp); sched_unpin(); mtx_unlock(&sysmaps->lock); +#endif } else return (EFAULT); continue; Modified: user/jmallett/octeon/sys/mips/mips/pmap.c ============================================================================== --- user/jmallett/octeon/sys/mips/mips/pmap.c Wed Apr 14 00:33:36 2010 (r206573) +++ user/jmallett/octeon/sys/mips/mips/pmap.c Wed Apr 14 00:50:09 2010 (r206574) @@ -160,9 +160,11 @@ static uma_zone_t pvzone; static struct vm_object pvzone_obj; static int pv_entry_count = 0, pv_entry_max = 0, pv_entry_high_water = 0; +#if !defined(__mips_n64) struct fpage fpages_shared[FPAGES_SHARED]; struct sysmaps sysmaps_pcpu[MAXCPU]; +#endif static PMAP_INLINE void free_pv_entry(pv_entry_t pv); static pv_entry_t get_pv_entry(pmap_t locked_pmap); @@ -187,7 +189,9 @@ static vm_page_t pmap_allocpte(pmap_t pm static vm_page_t _pmap_allocpte(pmap_t pmap, unsigned ptepindex, int flags); static int pmap_unuse_pt(pmap_t, vm_offset_t, vm_page_t); static int init_pte_prot(vm_offset_t va, vm_page_t m, vm_prot_t prot); +#if !defined(__mips_n64) static void pmap_init_fpage(void); +#endif #ifdef SMP static void pmap_invalidate_page_action(void *arg); @@ -493,8 +497,10 @@ void pmap_init(void) { +#if !defined(__mips_n64) if (need_wired_tlb_page_pool) pmap_init_fpage(); +#endif /* * Initialize the address space (zone) for the pv entries. Set a * high water mark so that the system can recover from excessive @@ -816,6 +822,7 @@ pmap_qremove(vm_offset_t va, int count) * Page table page management routines..... ***************************************************/ +#if !defined(__mips_n64) /* * floating pages (FPAGES) management routines * @@ -921,6 +928,7 @@ pmap_unmap_fpage(vm_paddr_t pa, struct f * Should there be any flush operation at the end? */ } +#endif /* Revision 1.507 *
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201004140050.o3E0oA9D014801>