[Bug 193400] [mips] r269577 broke operation on MIPS32

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Sat Sep 6 22:34:30 UTC 2014


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=193400

--- Comment #3 from Adrian Chadd <adrian at freebsd.org> ---
Actually, here's a potential fix:

Index: sys/mips/include/sf_buf.h
===================================================================
--- sys/mips/include/sf_buf.h   (revision 271210)
+++ sys/mips/include/sf_buf.h   (working copy)
@@ -48,4 +48,23 @@
 }

 #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_ */
Index: sys/mips/include/vmparam.h
===================================================================
--- sys/mips/include/vmparam.h  (revision 271210)
+++ sys/mips/include/vmparam.h  (working copy)
@@ -189,6 +189,7 @@

 #ifndef __mips_n64
 #define        SFBUF
+#define        SFBUF_MAP
 #endif

 #endif /* !_MACHINE_VMPARAM_H_ */


.. the MIPS sfbuf code didn't keep the temporarily mapped kva bits around. It
recycled them each time.

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-bugs mailing list