From owner-svn-src-head@freebsd.org Thu Jun 2 21:06:52 2016 Return-Path: Delivered-To: svn-src-head@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 D39DDB65E0C; Thu, 2 Jun 2016 21:06:52 +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 AF07017B8; Thu, 2 Jun 2016 21:06:52 +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 AD4F0B977; Thu, 2 Jun 2016 17:06:51 -0400 (EDT) From: John Baldwin To: Ian Lepore Cc: Zbigniew Bodek , =?utf-8?B?TWljaGHFgg==?= Stanek , Zbigniew Bodek , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r301220 - in head/sys: arm/mv dev/cesa Date: Thu, 02 Jun 2016 14:05:33 -0700 Message-ID: <1946366.I33PJXpI92@ralph.baldwin.cx> User-Agent: KMail/4.14.3 (FreeBSD/10.2-STABLE; KDE/4.14.3; amd64; ; ) In-Reply-To: <1464895468.1204.188.camel@freebsd.org> References: <201606021831.u52IVb1O006883@repo.freebsd.org> <1464895468.1204.188.camel@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, 02 Jun 2016 17:06:51 -0400 (EDT) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.22 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: Thu, 02 Jun 2016 21:06:52 -0000 On Thursday, June 02, 2016 01:24:28 PM Ian Lepore wrote: > On Thu, 2016-06-02 at 21:03 +0200, Zbigniew Bodek wrote: > > 2016-06-02 20:48 GMT+02:00 Ian Lepore : > > > > > On Thu, 2016-06-02 at 18:31 +0000, Zbigniew Bodek wrote: > > > > Author: zbb > > > > Date: Thu Jun 2 18:31:36 2016 > > > > New Revision: 301220 > > > > URL: https://svnweb.freebsd.org/changeset/base/301220 > > > > > > > > Log: > > > > Map CESA SRAM memory in driver attach for Armada38x > > > > > > > > On other platforms with CESA accelerator the SRAM memory is > > > > mapped > > > > in > > > > early init before driver is attached. This method only works > > > > correctly > > > > with mappings no smaller than L1 section size (1MB). There may > > > > be > > > > more > > > > SRAM blocks and they may have smaller sizes than 1MB as is the > > > > case > > > > for Armada38x. Instead, map SRAM memory with bus_space_map() in > > > > CESA > > > > driver attach. Note that we can no longer assume that VA == PA > > > > for > > > > the > > > > SRAM. > > > > > > > > Submitted by: Michal Stanek > > > Obtained from: Semihalf > > > > Sponsored by: Stormshield > > > > Differential revision: https://reviews.freebsd.org/D6215 > > > > [...] > > > > - > > > > + rv = OF_getprop(sram_node, "reg", (void *)sram_reg, > > > > sizeof(sram_reg)); > > > > + if (rv <= 0) > > > > + return (rv); > > > > + > > > > + sc->sc_sram_base_pa = fdt32_to_cpu(sram_reg[0]); > > > > + /* Store SRAM size to be able to unmap in detach() */ > > > > + sc->sc_sram_size = fdt32_to_cpu(sram_reg[1]); > > > > + > > > > > > OF_getprop() followed by fdt32_to_cpu() calls is properly spelled > > > OF_getencprop() (with no fdt32_to_cpu calls). > > > > > > > +#if defined(SOC_MV_ARMADA38X) > > > > + /* SRAM memory was not mapped in platform_sram_devmap(), > > > > map > > > > it now */ > > > > + rv = bus_space_map(fdtbus_bs_tag, sc->sc_sram_base_pa, sc > > > > ->sc_sram_size, > > > > + 0, &(sc->sc_sram_base_va)); > > > > > > bus_space_map() returns a bus_space_handle_t for use with other > > > bus_space functions. The handle is not necessarily "just the > > > virtual > > > address" (although that happens to be the case right now on arm). > > > I > > > don't see any bus_space_xxxxx() calls using this handle, that means > > > that probably the correct function to use is pmap_mapdev(), not > > > bus_space_map(). > > > > > > -- Ian > > > > > > Thanks Ian, > > > > We will fix this ASAP. > > BTW. It would be better to get this review prior to committing the > > patch > > ;-) > > Phabricator revision didn't attract anyone's attention: > > https://reviews.freebsd.org/D6215 > > > I've always said that phabricator was primarily a spam-generation tool, > and now that seems to be true in spades. It apparently only delivers > html-formatted mail now, and my mail client is smart enough to just > route html-only messages directly to the trash. There's a config option to turn off the HTML bit. A recent "upgrade" of phab silently turned on HTML e-mails by default. -- John Baldwin