From: Robin Murphy <robin.murphy@arm.com>
To: Tomeu Vizoso <tomeu.vizoso@collabora.com>, linux-kernel@vger.kernel.org
Cc: David Airlie <airlied@linux.ie>,
dri-devel@lists.freedesktop.org,
Steven Price <steven.price@arm.com>,
Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Subject: Re: [PATCH] drm/panfrost: Don't try to map on error faults
Date: Wed, 5 Feb 2020 13:25:48 +0000 [thread overview]
Message-ID: <3500c501-b166-6a1e-267b-31a4e5c62619@arm.com> (raw)
In-Reply-To: <20200205100719.24999-1-tomeu.vizoso@collabora.com>
On 05/02/2020 10:07 am, Tomeu Vizoso wrote:
> If the exception type isn't one of the normal faults, don't try to map
> and instead go straight to a terminal fault.
"One of the the normal faults" seems a rather vague way of saying "a
translation fault", which is what we're specifically handling here, and
logically the only fault reflecting something not yet mapped rather than
mapped inappropriately ;)
(Who knows how the level ended up as 1-4 rather than 0-3 as it really
should be - another Mali Mystery(TM)...)
> Otherwise, we can get flooded by kernel warnings and further faults.
Either way,
Reviewed-by: Robin Murphy <robin.murphy@arm.com>
> Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
> ---
> drivers/gpu/drm/panfrost/panfrost_mmu.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/panfrost/panfrost_mmu.c b/drivers/gpu/drm/panfrost/panfrost_mmu.c
> index 763cfca886a7..80abddb4544c 100644
> --- a/drivers/gpu/drm/panfrost/panfrost_mmu.c
> +++ b/drivers/gpu/drm/panfrost/panfrost_mmu.c
> @@ -596,8 +596,9 @@ static irqreturn_t panfrost_mmu_irq_handler_thread(int irq, void *data)
> source_id = (fault_status >> 16);
>
> /* Page fault only */
> - if ((status & mask) == BIT(i)) {
> - WARN_ON(exception_type < 0xC1 || exception_type > 0xC4);
> + if ((status & mask) == BIT(i) &&
> + exception_type >= 0xC1 &&
> + exception_type <= 0xC4) {
>
> ret = panfrost_mmu_map_fault_addr(pfdev, i, addr);
> if (!ret) {
>
next prev parent reply other threads:[~2020-02-05 13:25 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-05 10:07 [PATCH] drm/panfrost: Don't try to map on error faults Tomeu Vizoso
2020-02-05 12:24 ` Alyssa Rosenzweig
2020-02-05 13:25 ` Robin Murphy [this message]
2020-02-05 14:01 ` Steven Price
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=3500c501-b166-6a1e-267b-31a4e5c62619@arm.com \
--to=robin.murphy@arm.com \
--cc=airlied@linux.ie \
--cc=alyssa.rosenzweig@collabora.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=steven.price@arm.com \
--cc=tomeu.vizoso@collabora.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox