From owner-svn-src-all@FreeBSD.ORG Sun Aug 10 16:59:40 2014 Return-Path: Delivered-To: svn-src-all@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 913A5448 for ; Sun, 10 Aug 2014 16:59:40 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5F5812701 for ; Sun, 10 Aug 2014 16:59:40 +0000 (UTC) Received: from kib (uid 1100) (envelope-from kib@FreeBSD.org) id 2898 by svn.freebsd.org (DragonFly Mail Agent v0.9+); Sun, 10 Aug 2014 16:59:39 +0000 From: Konstantin Belousov Date: Sun, 10 Aug 2014 16:59:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r269782 - in head/sys/sparc64: include sparc64 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Message-Id: <53e7a4fc.2898.352aa941@svn.freebsd.org> X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Aug 2014 16:59:40 -0000 Author: kib Date: Sun Aug 10 16:59:39 2014 New Revision: 269782 URL: http://svnweb.freebsd.org/changeset/base/269782 Log: On sparc64, do not keep mappings for the destroyed sf_bufs. Sparc64 pmap, unlike i386, and similar to i386/xen pv, does not tolerate abandoned mappings for the freed pages. Reported and tested by: dumbbell Diagnosed and reviewed by: alc Sponsored by: The FreeBSD Foundation Added: head/sys/sparc64/include/sf_buf.h - copied, changed from r269781, head/sys/i386/include/sf_buf.h Modified: head/sys/sparc64/include/vmparam.h head/sys/sparc64/sparc64/vm_machdep.c Copied and modified: head/sys/sparc64/include/sf_buf.h (from r269781, head/sys/i386/include/sf_buf.h) ============================================================================== --- head/sys/i386/include/sf_buf.h Sun Aug 10 15:21:26 2014 (r269781, copy source) +++ head/sys/sparc64/include/sf_buf.h Sun Aug 10 16:59:39 2014 (r269782) @@ -31,6 +31,5 @@ void sf_buf_map(struct sf_buf *, int); int sf_buf_unmap(struct sf_buf *); -boolean_t sf_buf_invalidate_cache(vm_page_t); #endif /* !_MACHINE_SF_BUF_H_ */ Modified: head/sys/sparc64/include/vmparam.h ============================================================================== --- head/sys/sparc64/include/vmparam.h Sun Aug 10 15:21:26 2014 (r269781) +++ head/sys/sparc64/include/vmparam.h Sun Aug 10 16:59:39 2014 (r269782) @@ -240,6 +240,6 @@ extern vm_offset_t vm_max_kernel_address #define ZERO_REGION_SIZE PAGE_SIZE #define SFBUF -#define SFBUF_NOMD +#define SFBUF_MAP #endif /* !_MACHINE_VMPARAM_H_ */ Modified: head/sys/sparc64/sparc64/vm_machdep.c ============================================================================== --- head/sys/sparc64/sparc64/vm_machdep.c Sun Aug 10 15:21:26 2014 (r269781) +++ head/sys/sparc64/sparc64/vm_machdep.c Sun Aug 10 16:59:39 2014 (r269782) @@ -54,6 +54,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -443,3 +444,18 @@ uma_small_free(void *mem, int size, u_in vm_page_free(m); atomic_subtract_int(&vm_cnt.v_wire_count, 1); } + +void +sf_buf_map(struct sf_buf *sf, int flags) +{ + + pmap_qenter(sf->kva, &sf->m, 1); +} + +int +sf_buf_unmap(struct sf_buf *sf) +{ + + pmap_qremove(sf->kva, 1); + return (1); +}