From owner-freebsd-mips@FreeBSD.ORG Thu Jan 8 22:55:29 2015 Return-Path: Delivered-To: freebsd-mips@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 B34C2671 for ; Thu, 8 Jan 2015 22:55:29 +0000 (UTC) Received: from mail-qg0-f50.google.com (mail-qg0-f50.google.com [209.85.192.50]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6C2097F7 for ; Thu, 8 Jan 2015 22:55:29 +0000 (UTC) Received: by mail-qg0-f50.google.com with SMTP id z60so5376742qgd.9 for ; Thu, 08 Jan 2015 14:55:22 -0800 (PST) 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=313xK05858N0p0v6OY+Tk2s8ql0HWA9yXYrEHwsenbI=; b=Iyo68l54574uLZvB+l5T/QsmjZ3y9a+1itAYW/jYphUl6wcz6lUJfTdHf4TXOOyVwI 4C98+sTR3ecVjvzsV61nHMK0/r2fJPGiS9kKcRFzWZkL0/ZfceSawAY5Z54PZwJ0dNQR ts8U/dPxZjFHjBfgy31DVzmv/18rqG3rjGIcUAG5WFeMoVxuHtpRrHLNYZQHvwM+7ZS+ dpsytNWMS0/jQ6GchRD8PqJWg2nO8wvKia0vzPQijMguZeN0qzR77TF8x8duxz0PXZ9M UZF5ajYqoTIf1u//eaWoCxY28v3oqAb/rerAZaBtSkfFsqKBAqAt42aN7uXa4stKnd+d kifg== X-Gm-Message-State: ALoCoQk9B7AODGyrWqRQW1w8c931bu7zSdP4VQMeSaBUzk9QHiTsoNpp4Bik7iK9M0lhZh6oEcsB X-Received: by 10.224.73.135 with SMTP id q7mr21029271qaj.6.1420757722028; Thu, 08 Jan 2015 14:55:22 -0800 (PST) Received: from [10.64.26.233] ([69.53.236.236]) by mx.google.com with ESMTPSA id j3sm5319003qas.19.2015.01.08.14.55.20 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 08 Jan 2015 14:55:21 -0800 (PST) Sender: Warner Losh Subject: Re: RFC: figuring out bus behaviour on these mips32r2 chips Mime-Version: 1.0 (Mac OS X Mail 8.1 \(1993\)) Content-Type: multipart/signed; boundary="Apple-Mail=_4C9D7E15-07E5-4239-9CA4-E0C2B2C7DEB8"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail 2.5b3 From: Warner Losh In-Reply-To: Date: Thu, 8 Jan 2015 15:55:18 -0700 Message-Id: References: To: Adrian Chadd X-Mailer: Apple Mail (2.1993) Cc: "freebsd-mips@freebsd.org" X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Jan 2015 22:55:29 -0000 --Apple-Mail=_4C9D7E15-07E5-4239-9CA4-E0C2B2C7DEB8 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii > On Jan 7, 2015, at 6:03 PM, Adrian Chadd wrote: >=20 > Hi, >=20 > I found that the new QCA955x chip (and some of the QCA934x things in > shipping products versus what I have on my desk at home) behave poorly > unless I do ye olde "write to register; read from register to flush" > paradigm. >=20 > In this specific instance, it's the MDIO controller on each MAC - if I > do a read-after-write to those registers, everything is peachy. > Without it - and even with a call to wmb() - it still barfs. >=20 > Now, I went digging through the mips code, and wmb() -> mips_sync() -> > just a sync operation. It doesn't do any other kind of barrier. >=20 > So - what's the mips32r2 spec require us to do for ensuring device IO > has made it out to devices and we enforce ordering? Are we missing > something in our mips_sync() implementation? SYNC is supposed to be SYNC. An absolute barrier, but that may have = weakened to being merely a strong ordering instruction such that all = writes before it happen before all writes after it. Warner --Apple-Mail=_4C9D7E15-07E5-4239-9CA4-E0C2B2C7DEB8 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 iQIcBAEBCgAGBQJUrwrWAAoJEGwc0Sh9sBEA0UcP+welGEUTosfVgi0nsAu2D3Bj lQblfrMKBXaQRUI9z05WoXaEmdEQCuemlK78HAM79ELKohsa8NUd2FS1ZhtbRhGQ OGln8OWIZ/8FxMRN7zDRgo0X4EqVHU2jXSrqxDCdnzmcypWE68KOpGjCWSux6k3N bdVez32dkqWkaa9Xv+azdqHfQPFWmNrIXxJFJMlSaviWusd4d+ZuCLzjNGlpELr1 7dSLzXMoxIv7Kor1zd2AQ1MSVmUd/niSVcKBG5+X1Ci/PD+Gz/v25Po/jqh19SHW 2Y0YD78r0mJeEVhkMdpQ2Yg607usyoOkTd4F1GNkEEdJFd8MTB8LGHVh7N2JzCNA xZg2Bq6KNwOlgLlpx3dVHjnnNoBc52B8d4GCoCEf/kcV5e7drfAlYkvaw1H/EZl3 P5Gl40em9fmX81Lx7QHwimXJwCdH4M4WEdT4jn5KFcvKGKPX+uXceNn8CuMa0ONi 6ZwMITz824yOsCR59oVcl619c3Y6O64ZKBz1aW+PrfK2MyLze+t6BHQdR9HzHLLN cyAKfhBLIrtdZ7hFOYo3GBY9M92vUOsAZTgrxJ56SlSAwCjRqZiy0nGypBRyMc2x LmR3H1jjyNy9FluSa78glc1JSMFZ2sm1g0cxZYOtJsP9J8sY5baOwFsUb3qzVH7O bB/JFVCBbUc3Fpert57M =vWA2 -----END PGP SIGNATURE----- --Apple-Mail=_4C9D7E15-07E5-4239-9CA4-E0C2B2C7DEB8--