From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755082AbbE1W1c (ORCPT ); Thu, 28 May 2015 18:27:32 -0400 Received: from mail-wi0-f180.google.com ([209.85.212.180]:35986 "EHLO mail-wi0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754961AbbE1W1Y (ORCPT ); Thu, 28 May 2015 18:27:24 -0400 From: Pali =?utf-8?q?Roh=C3=A1r?= To: Tony Lindgren Subject: Re: runtime check for omap-aes bus access permission (was: Re: 3.13-rc3 (commit 7ce93f3) breaks Nokia N900 DT boot) Date: Fri, 29 May 2015 00:27:21 +0200 User-Agent: KMail/1.13.7 (Linux/3.13.0-53-generic; KDE/4.14.2; x86_64; ; ) Cc: Matthijs van Duin , "linux-arm-kernel@lists.infradead.org" , Sebastian Reichel , "linux-omap" , Aaro Koskinen , Pavel Machek , lkml , Nishanth Menon References: <20131206213613.GA19648@earth.universe> <20150528222412.GM30984@atomide.com> In-Reply-To: <20150528222412.GM30984@atomide.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart2873422.ihz4BV8RMA"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <201505290027.21231@pali> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --nextPart2873422.ihz4BV8RMA Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable On Friday 29 May 2015 00:24:13 Tony Lindgren wrote: > * Matthijs van Duin [150528 13:28]: > > On 28 May 2015 at 18:01, Tony Lindgren wrote: > > > For failed device access you get an interrupt > >=20 > > Well for failed reads you get a bus error, and "catching" those > > (e.g. using the existing exception mechanism used to catch MMU > > faults) is the whole issue. > >=20 > > Though now that you mention it, it is true that for writes you > > won't get any fault (at least on the DM814x and AM335x the posting > > point appears to be the async bridge from MPUSS to the L3 > > interconnect) but an interconnect error irq instead. It may be > > easier to make some kind of harmless write (e.g. to the version > > register), wait a bit, and check if the write triggered an > > interconnect error. > >=20 > > Feels hackish though: you'd need to be sure you waited long enough > > (though using a read from another device on the same L4 > > interconnect should be a reliable barrier in this case), and > > drivers for receiving/interpreting interconnect errors are not > > implemented yet on all SoCs (for some, like the AM335x, TI didn't > > even bother publishing the relevant data in its TRM). Interconnect > > errors can also be lost in some cases (multiple errors involving > > the same target in a short time window) though that problem > > shouldn't arise in this particular case. >=20 > Hmm I believe the interrupt happens immediately trying to access an > invalid device. But maybe I'm thinking about just errors if a device > is not powered or clocked. So obviously some experiments need to be > done :) >=20 > The advantage here would be that the l3 driver actually already knows > quite a bit about the devices on the bus. >=20 > > Also, presumably interconnect error reporting is unavailable on HS > > devices given the fact that all interconnect registers seemed to be > > inaccessible? >=20 > Oh OK yeah then that would not work for Pali's case. I guess it just > needs to be tested. >=20 > Regards, >=20 > Tony Ok, thanks for info. Do you have some quick small patches for testing?=20 Or some pointers what is needed to modify and how? =2D-=20 Pali Roh=C3=A1r pali.rohar@gmail.com --nextPart2873422.ihz4BV8RMA Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iEYEABECAAYFAlVnlkkACgkQi/DJPQPkQ1IYsACdG47flm6/JReQuk5++1WGVjCO 53cAn10gPl8wLuSW8DKxEuMcPxDZTbpd =/OoG -----END PGP SIGNATURE----- --nextPart2873422.ihz4BV8RMA--