From owner-svn-src-all@freebsd.org Thu Oct 29 14:10:18 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 46488A1FC83; Thu, 29 Oct 2015 14:10:18 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 22FD71D3B; Thu, 29 Oct 2015 14:10:18 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from ralph.baldwin.cx (c-73-231-226-104.hsd1.ca.comcast.net [73.231.226.104]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 35D8DB9AB; Thu, 29 Oct 2015 10:10:17 -0400 (EDT) From: John Baldwin To: "Conrad E. Meyer" Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r290130 - head/sys/dev/ntb/ntb_hw Date: Thu, 29 Oct 2015 06:39:59 -0700 Message-ID: <2379504.sY8Moxo3YJ@ralph.baldwin.cx> User-Agent: KMail/4.14.3 (FreeBSD/10.2-STABLE; KDE/4.14.3; amd64; ; ) In-Reply-To: <201510290416.t9T4GSG7044279@repo.freebsd.org> References: <201510290416.t9T4GSG7044279@repo.freebsd.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Thu, 29 Oct 2015 10:10:17 -0400 (EDT) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 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: Thu, 29 Oct 2015 14:10:18 -0000 On Thursday, October 29, 2015 04:16:28 AM Conrad E. Meyer wrote: > Author: cem > Date: Thu Oct 29 04:16:28 2015 > New Revision: 290130 > URL: https://svnweb.freebsd.org/changeset/base/290130 > > Log: > ntb: Do not attempt to set write-combining on MWs > > AMD64 pmap assumes ranges will be in the DMAP, which isn't necessarily > true for NTB memory windows (especially 64-bit BARs). > > Suggested by: pmap_change_attr_locked -> kassert_panic > Sponsored by: EMC / Isilon Storage Division Hmm, pmap_mapdev_attr() does the right thing, but there isn't a good way to call that directly (and still get a valid bus handle/tag). I have on my todo to add a bus_map_resource() that would let you allocate a bus handle/tag that 1) is a subset of a resource, and 2) specifies a memory attribute. It would allow you to do this sanely. -- John Baldwin