Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 06 Sep 2014 22:34:30 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-bugs@FreeBSD.org
Subject:   [Bug 193400] [mips] r269577 broke operation on MIPS32
Message-ID:  <bug-193400-8-8CbC4HzmBk@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-193400-8@https.bugs.freebsd.org/bugzilla/>
References:  <bug-193400-8@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=193400

--- Comment #3 from Adrian Chadd <adrian@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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-193400-8-8CbC4HzmBk>