From owner-svn-src-head@FreeBSD.ORG Wed Aug 20 08:02:38 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CE73D10F; Wed, 20 Aug 2014 08:02:38 +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 B9E713BD4; Wed, 20 Aug 2014 08:02:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7K82cX1059611; Wed, 20 Aug 2014 08:02:38 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7K82cJ6059609; Wed, 20 Aug 2014 08:02:38 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201408200802.s7K82cJ6059609@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 20 Aug 2014 08:02:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270201 - in head/sys: powerpc/include sys 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: Wed, 20 Aug 2014 08:02:38 -0000 Author: kib Date: Wed Aug 20 08:02:38 2014 New Revision: 270201 URL: http://svnweb.freebsd.org/changeset/base/270201 Log: Add arch-specific macro SFBUF_PHYS_DMAP(), which should translate the physical address of the page to direct map address, in case SFBUF_OPTIONAL_DIRECT_MAP returns true. The case of PowerPC AIM 64bit, where the page physical address is identical to the direct map address, is accidental. Reviewed by: alc Sponsored by: The FreeBSD Foundation Modified: head/sys/powerpc/include/vmparam.h head/sys/sys/sf_buf.h Modified: head/sys/powerpc/include/vmparam.h ============================================================================== --- head/sys/powerpc/include/vmparam.h Wed Aug 20 07:48:09 2014 (r270200) +++ head/sys/powerpc/include/vmparam.h Wed Aug 20 08:02:38 2014 (r270201) @@ -210,5 +210,6 @@ struct pmap_physseg { #define SFBUF #define SFBUF_NOMD #define SFBUF_OPTIONAL_DIRECT_MAP hw_direct_map +#define SFBUF_PHYS_DMAP(x) (x) #endif /* _MACHINE_VMPARAM_H_ */ Modified: head/sys/sys/sf_buf.h ============================================================================== --- head/sys/sys/sf_buf.h Wed Aug 20 07:48:09 2014 (r270200) +++ head/sys/sys/sf_buf.h Wed Aug 20 08:02:38 2014 (r270201) @@ -113,7 +113,7 @@ sf_buf_kva(struct sf_buf *sf) { #ifdef SFBUF_OPTIONAL_DIRECT_MAP if (SFBUF_OPTIONAL_DIRECT_MAP) - return (VM_PAGE_TO_PHYS((vm_page_t)sf)); + return (SFBUF_PHYS_DMAP(VM_PAGE_TO_PHYS((vm_page_t)sf))); #endif return (sf->kva);