From: Robin Murphy <robin.murphy-5wv7dgnIgG8@public.gmane.org>
To: Stuart Yoder <stuart.yoder-3arQi8VN3Tc@public.gmane.org>,
Will Deacon <Will.Deacon-5wv7dgnIgG8@public.gmane.org>
Cc: "iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org"
<iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org>,
Bharat Bhushan <bharat.bhushan-3arQi8VN3Tc@public.gmane.org>,
Brian Starkey <brian.starkey-5wv7dgnIgG8@public.gmane.org>,
"linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org"
<linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org>
Subject: Re: SMMU driver and stall vs terminate mode
Date: Mon, 20 Jun 2016 17:08:45 +0100 [thread overview]
Message-ID: <5768150D.2070705@arm.com> (raw)
In-Reply-To: <HE1PR04MB1641B0F8442061E3437037628D2A0-6LN7OEpIatU5tNmRkpaxD89NdZoXdze2vxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
Hi Stuart,
On 20/06/16 16:28, Stuart Yoder wrote:
> Robin/Will,
>
> Right now the SMMU driver is hardcoded to configure 'stall' mode for
> context faults:
>
> /* SCTLR */
> reg = SCTLR_CFCFG | SCTLR_CFIE | SCTLR_CFRE | SCTLR_M | SCTLR_EAE_SBOP;
>
> We are running into an issue with a device where it seems behave sanely
> when SCTLR_CFCFG=0 ...i.e. 'terminate' mode, but in stall mode seems to be
> unaware that an access violation occurred.
Does the device keep issuing transactions after the initial faulting
one, by any chance? Brian (+cc) has seen similar-sounding issues in the
past (albeit with backports to some horrible Android kernel), and I
think we concluded that there's an inherent race window between writing
RESUME and acking the interrupt in which MMU-500 can process another
faulting transaction and reassert the IRQ without Linux realising, which
then gets lost and things go out of whack.
> Is there really some assumption that all devices that send transcactions
> through the SMMU _must_ be able to handle stall mode? I am trying to
> find out from our hw designers what is going on at the signal level for
> the device in question, but it seems to me that 'terminate' mode exists
> for a reason and I wonder what your thoughts are about providing a
> configuration option to allow configuration of terminate mode if a particular
> SoC requires it.
Personally, I'd quite happily leave it turned off (MMU-400/401 don't
support stalling anyway), but I recall Will having a fairly
reasonable-sounding argument in favour, which I now can't remember the
details of. Hopefully he might remind us, unless his conference is too
enthralling.
Robin.
>
> Thanks,
> Stuart
>
WARNING: multiple messages have this Message-ID (diff)
From: robin.murphy@arm.com (Robin Murphy)
To: linux-arm-kernel@lists.infradead.org
Subject: SMMU driver and stall vs terminate mode
Date: Mon, 20 Jun 2016 17:08:45 +0100 [thread overview]
Message-ID: <5768150D.2070705@arm.com> (raw)
In-Reply-To: <HE1PR04MB1641B0F8442061E3437037628D2A0@HE1PR04MB1641.eurprd04.prod.outlook.com>
Hi Stuart,
On 20/06/16 16:28, Stuart Yoder wrote:
> Robin/Will,
>
> Right now the SMMU driver is hardcoded to configure 'stall' mode for
> context faults:
>
> /* SCTLR */
> reg = SCTLR_CFCFG | SCTLR_CFIE | SCTLR_CFRE | SCTLR_M | SCTLR_EAE_SBOP;
>
> We are running into an issue with a device where it seems behave sanely
> when SCTLR_CFCFG=0 ...i.e. 'terminate' mode, but in stall mode seems to be
> unaware that an access violation occurred.
Does the device keep issuing transactions after the initial faulting
one, by any chance? Brian (+cc) has seen similar-sounding issues in the
past (albeit with backports to some horrible Android kernel), and I
think we concluded that there's an inherent race window between writing
RESUME and acking the interrupt in which MMU-500 can process another
faulting transaction and reassert the IRQ without Linux realising, which
then gets lost and things go out of whack.
> Is there really some assumption that all devices that send transcactions
> through the SMMU _must_ be able to handle stall mode? I am trying to
> find out from our hw designers what is going on at the signal level for
> the device in question, but it seems to me that 'terminate' mode exists
> for a reason and I wonder what your thoughts are about providing a
> configuration option to allow configuration of terminate mode if a particular
> SoC requires it.
Personally, I'd quite happily leave it turned off (MMU-400/401 don't
support stalling anyway), but I recall Will having a fairly
reasonable-sounding argument in favour, which I now can't remember the
details of. Hopefully he might remind us, unless his conference is too
enthralling.
Robin.
>
> Thanks,
> Stuart
>
next prev parent reply other threads:[~2016-06-20 16:08 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-20 15:28 SMMU driver and stall vs terminate mode Stuart Yoder
2016-06-20 15:28 ` Stuart Yoder
[not found] ` <HE1PR04MB1641B0F8442061E3437037628D2A0-6LN7OEpIatU5tNmRkpaxD89NdZoXdze2vxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2016-06-20 16:08 ` Robin Murphy [this message]
2016-06-20 16:08 ` Robin Murphy
[not found] ` <5768150D.2070705-5wv7dgnIgG8@public.gmane.org>
2016-06-21 9:42 ` Will Deacon
2016-06-21 9:42 ` Will Deacon
[not found] ` <20160621094237.GL29165-5wv7dgnIgG8@public.gmane.org>
2016-06-21 14:36 ` Stuart Yoder
2016-06-21 14:36 ` Stuart Yoder
2016-06-21 14:47 ` Brian Starkey
2016-06-21 14:47 ` Brian Starkey
2016-06-21 14:33 ` Stuart Yoder
2016-06-21 14:33 ` Stuart Yoder
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5768150D.2070705@arm.com \
--to=robin.murphy-5wv7dgnigg8@public.gmane.org \
--cc=Will.Deacon-5wv7dgnIgG8@public.gmane.org \
--cc=bharat.bhushan-3arQi8VN3Tc@public.gmane.org \
--cc=brian.starkey-5wv7dgnIgG8@public.gmane.org \
--cc=iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org \
--cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
--cc=stuart.yoder-3arQi8VN3Tc@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.