Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 6 Sep 2014 22:38:33 +0000 (UTC)
From:      Adrian Chadd <adrian@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r271213 - head/sys/mips/include
Message-ID:  <201409062238.s86McXJE068463@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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_ */



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201409062238.s86McXJE068463>