summaryrefslogtreecommitdiffstats
path: root/sys/mips/include/sf_buf.h
diff options
context:
space:
mode:
authoradrian <adrian@FreeBSD.org>2014-09-06 22:38:32 +0000
committeradrian <adrian@FreeBSD.org>2014-09-06 22:38:32 +0000
commite5f8f27ad74b6c82d3e5b272e369673a9521431c (patch)
tree7d7cf518c5f1230ef914675f8a78e3b5c77219a9 /sys/mips/include/sf_buf.h
parent65ac57de621eb7d24690712b3f4935438bcd73ae (diff)
downloadFreeBSD-src-e5f8f27ad74b6c82d3e5b272e369673a9521431c.zip
FreeBSD-src-e5f8f27ad74b6c82d3e5b272e369673a9521431c.tar.gz
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
Diffstat (limited to 'sys/mips/include/sf_buf.h')
-rw-r--r--sys/mips/include/sf_buf.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/sys/mips/include/sf_buf.h b/sys/mips/include/sf_buf.h
index 76fb993..01ecd23 100644
--- a/sys/mips/include/sf_buf.h
+++ b/sys/mips/include/sf_buf.h
@@ -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_ */
OpenPOWER on IntegriCloud