From owner-freebsd-arch@FreeBSD.ORG Wed Apr 29 20:05:54 2015 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4120E79B for ; Wed, 29 Apr 2015 20:05:54 +0000 (UTC) Received: from mail-pa0-f46.google.com (mail-pa0-f46.google.com [209.85.220.46]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0D15F10AD for ; Wed, 29 Apr 2015 20:05:53 +0000 (UTC) Received: by pacwv17 with SMTP id wv17so37335632pac.0 for ; Wed, 29 Apr 2015 13:05:47 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:subject:mime-version:content-type:from :in-reply-to:date:cc:message-id:references:to; bh=zf3QgncH7y1pFVp9phBTSTMoawrxRjhv0poiCdeXuQc=; b=eL4eUBaN39AYt6T5V9Wc6UH9iP4wxTLRCaT/R1hemV9xbeN0NrqPu+BqC+BtMDQ8q8 tOyA/Ne9WFyCWJJe6NvlV3PhR+BjgB+JmGv0IYbObyLgqnlFDhrOKgUdk1KBWuz59Y60 pTe+MSzkOrGq7ow7V0Dr5VO0YJA1cVweaQgrHB0cBg94O4WvIDCbGjLtXk+WLbcAUOcq 6qaEpCSFq0pu7b8FSlnipyGo5XlZUaGYTADJEuPse5jf9CR+JIKfB0IqlDLflq6jl555 B1PsT0ebsLUOJrxgIPZ4uj+FAfbR3nVEq8EfCTB4RGjzRhYfbDvPFBn74+BV5at5EGfe 36CA== X-Gm-Message-State: ALoCoQm/YnWkcWlGZSVUXKZAAvWRupzCYzj2hUmjforXY3ItcKfydrsFjPrbYL1hU0Uf05SKDVFc X-Received: by 10.70.124.233 with SMTP id ml9mr1432149pdb.9.1430337946909; Wed, 29 Apr 2015 13:05:46 -0700 (PDT) Received: from lgwl-sram.corp.netflix.com ([69.53.236.236]) by mx.google.com with ESMTPSA id c8sm32559pdj.65.2015.04.29.13.05.44 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 29 Apr 2015 13:05:45 -0700 (PDT) Sender: Warner Losh Subject: Re: bus_dmamap_sync() for bounced client buffers from user address space Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2098\)) Content-Type: multipart/signed; boundary="Apple-Mail=_BE24FC7E-A878-4059-963E-1A19E29BB82A"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail 2.5b6 From: Warner Losh In-Reply-To: Date: Wed, 29 Apr 2015 14:05:42 -0600 Cc: Konstantin Belousov , Svatopluk Kraus , John Baldwin , Adrian Chadd , freebsd-arch Message-Id: <9807ECB0-5218-42D1-9BD9-94F6BB5C69C8@bsdimp.com> References: <38574E63-2D74-4ECB-8D68-09AC76DFB30C@bsdimp.com> <1761247.Bq816CMB8v@ralph.baldwin.cx> <20150429132017.GM2390@kib.kiev.ua> <20150429165432.GN2390@kib.kiev.ua> <20150429185019.GO2390@kib.kiev.ua> To: Jason Harmening X-Mailer: Apple Mail (2.2098) X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Apr 2015 20:05:54 -0000 --Apple-Mail=_BE24FC7E-A878-4059-963E-1A19E29BB82A Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii > On Apr 29, 2015, at 1:17 PM, Jason Harmening = wrote: >=20 >=20 >=20 >=20 > Yes, that needs to be done regardless of how the pages are wired. The = particular problem here is that some caches on arm and mips are = virtually-indexed (usually virtually-indexed, physically-tagged (VIPT)). = That means the flush/invalidate instructions need virtual addresses, so = figuring out the correct UVA to use for those could be a challenge. As = I understand it, VIPT caches usually do have some hardware logic for = finding all the cachelines that correspond to a physical address, so = they can handle multiple VA mappings of the same PA. But it is unclear = to me how cross-processor cache maintenance is supposed to work with = VIPT caches on SMP systems. >=20 > If the caches were physically-indexed, then I don't think there would = be an issue. You'd just pass the PA to the flush/invalidate = instruction, and presumably a sane SMP implementation would propagate = that to other cores via IPI. I know on MIPS you cannot have more than one mapping to a page you are = doing DMA to/from ever. Warner --Apple-Mail=_BE24FC7E-A878-4059-963E-1A19E29BB82A Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJVQTmXAAoJEGwc0Sh9sBEAk9UP/0EXZ/oWomX5qr9eSByKloVy m7MthNOYTTFnHhJlrtOSspQ/OZdsBoK1lzgNhcvjQRtXzDyelK1fDP5iYla1w5Lt XAwcL8yIjUBUm1SmHdY9O/rBLrMaeg03sEUJzaLGtF1V5dRrvHr/UsQpegcEy2Kw +4m5aSAZmr9MPIJ+r/1ztilvZv9k26pDQ1UdUvCpq7/c28A9JWdhbGSwuNpFzOI/ WSy+7fxBH4WbeC9ikRkkoIqmAEO2EAaecMnRAHbTzoPhKnQahtzXC14BSUzpNKL2 HSkXZK0INc12VEocr/rovNP4iTRe4HrcN4nPHIeyKNjJdm2Pu8bo39yU4FWBzTkt efnTd9jGAy3Sqy+YJFZSKkRxYjMDSP6qmp+bD/8vRUf7z5AiB20zUxPQ0fCmXdLX F5MTlAjRdQ/I9+HHEOIqk1ZkPAQJP5Zz6KzTm7WLBBIdSC7sqewOsw5iSXufssCl 80pg/er17pyCm4PsmR+i4fwi5UtgGkNt0gUcScWDqHcItFX9tHTrSb/OpFEa5WvW pcordomq6pOQ3f23lG/R964yLu3hlCf9Jrhznom9/FwzMoS1cKsNQVGUS0Pwa6aa M+egJHSmhz8weoGry4ygBrIq8jLOHB+xnobLGHPqiPk/q5IGwI5o1m0ODquO2pD8 g2ckIm17cRCNmvLJzhAu =axbV -----END PGP SIGNATURE----- --Apple-Mail=_BE24FC7E-A878-4059-963E-1A19E29BB82A--