From owner-svn-src-head@FreeBSD.ORG Sat Sep 6 22:38:33 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7F6885C4; Sat, 6 Sep 2014 22:38:33 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6AF0C1E2A; Sat, 6 Sep 2014 22:38:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s86McXi5068467; Sat, 6 Sep 2014 22:38:33 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s86McXJE068463; Sat, 6 Sep 2014 22:38:33 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201409062238.s86McXJE068463@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sat, 6 Sep 2014 22:38:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271213 - head/sys/mips/include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Sep 2014 22:38:33 -0000 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_ */