Author: adrian
Date: Sat Sep  6 22:38:32 2014
New Revision: 271213
URL: http://svnweb.freebsd.org/changeset/base/271213

Log:
  Implement local sfbuf_map and sfbuf_unmap for MIPS32.
  
  The pre-rework behaviour was not to keep the cached mappings around after
  the sfbuf was used but instead to recycle said mappings.
  
  PR:           kern/193400

Modified:
  head/sys/mips/include/sf_buf.h
  head/sys/mips/include/vmparam.h

Modified: head/sys/mips/include/sf_buf.h
==============================================================================
--- head/sys/mips/include/sf_buf.h      Sat Sep  6 22:37:47 2014        
(r271212)
+++ head/sys/mips/include/sf_buf.h      Sat Sep  6 22:38:32 2014        
(r271213)
@@ -48,4 +48,23 @@ sf_buf_page(struct sf_buf *sf)
 }
 
 #endif /* __mips_n64 */
+
+#ifndef        __mips_n64      /* in 32 bit mode we manage our own mappings */
+
+static inline void
+sf_buf_map(struct sf_buf *sf, int flags)
+{
+
+       pmap_qenter(sf->kva, &sf->m, 1);
+}
+
+static inline int
+sf_buf_unmap(struct sf_buf *sf)
+{
+       pmap_qremove(sf->kva, 1);
+       return (1);
+}
+
+#endif /* ! __mips_n64 */
+
 #endif /* !_MACHINE_SF_BUF_H_ */

Modified: head/sys/mips/include/vmparam.h
==============================================================================
--- head/sys/mips/include/vmparam.h     Sat Sep  6 22:37:47 2014        
(r271212)
+++ head/sys/mips/include/vmparam.h     Sat Sep  6 22:38:32 2014        
(r271213)
@@ -189,6 +189,7 @@
 
 #ifndef __mips_n64
 #define        SFBUF
+#define        SFBUF_MAP
 #endif
 
 #endif /* !_MACHINE_VMPARAM_H_ */
_______________________________________________
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to