Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp109069ybv; Wed, 5 Feb 2020 02:10:20 -0800 (PST) X-Google-Smtp-Source: APXvYqzCiEChYJL7hTE8aq21kmbqgycM/onAMhyFNhp7Xl7cfzTNb4+tIpiCW88hJqoEl7H823Hx X-Received: by 2002:a05:6808:244:: with SMTP id m4mr2360285oie.125.1580897420340; Wed, 05 Feb 2020 02:10:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1580897420; cv=none; d=google.com; s=arc-20160816; b=P81STSVSaaucY47b4+KEwjEcr+vA3vFM30VQobv57TVFCUOmQoQs0PAAZ7PuTurkYd +XQoYDtLrkolvI75yhVInMFXrJudbip4aOhMC7TbpMXk9/WPnzga89jwJI221HxQ5yxl sRUs76JxBqPIcGqjY+ucjdX4P5Ge7DjFCs5WrtbkTxfLQbRdFXG8AuSNxMThTmDQr/ND VRUYIrgMXZry2HhdaCDDvZib+lyFVyrTcaBwyGQ29RuqdSqbaKePpmJQSBxPbOKLePjW w6o6Pre/iI9CyPT4m36RkBOSQ1duf0n/aJLDY2VW85na/ewrJQ34PXsgMaxdSun+hJY5 PQ5Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=kmN+kD4FSA2ah1VtoMNYp6bLpdHdftqa8imfp5qvFQQ=; b=lBSlJjZyFFx1LzrdF5SQIvuauR3cNHmior0mBKvNcl39BACPK9+ubZD3qKyP5ffg2Y GElvzH6was2kMJttrxsvZWT7w6DnJXktn0y1tpHznSBKbTkpTOHhIeifby1EbJz1eRyz lLKqFfvcKIu/OSJ/caCd4BO3RAldsN1QY0SkSWmVyIT3m9oHeIliVShuNcrLcbzPNqth K15jf3iFgKlQErqWEONEYQVt7UYYmQTA4giw72yJMgisvzzGdnpYbBjLGm1sAEy5ySRr 58hpTGC3Es5g0StMQ5K/Ezok1EpHW29qVsJvno1Z7WmDw2NM62eBAQi+BHUTCcEcb8fi hwLw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b="uxf/4cY/"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t3si9792389otp.230.2020.02.05.02.10.00; Wed, 05 Feb 2020 02:10:20 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b="uxf/4cY/"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728035AbgBEKHy (ORCPT + 99 others); Wed, 5 Feb 2020 05:07:54 -0500 Received: from mail-wr1-f66.google.com ([209.85.221.66]:40568 "EHLO mail-wr1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727068AbgBEKHy (ORCPT ); Wed, 5 Feb 2020 05:07:54 -0500 Received: by mail-wr1-f66.google.com with SMTP id t3so1906942wru.7 for ; Wed, 05 Feb 2020 02:07:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=kmN+kD4FSA2ah1VtoMNYp6bLpdHdftqa8imfp5qvFQQ=; b=uxf/4cY/d5W+AsY1/8m+Expm55bXJmtngFXF/rHWedksM3UV1Uqnw4P36T43Wxhnl/ 6O8akDYn3n3HAzBLUpGu0izJUtiD6fAWnB4lCcRSGBbCO+R4Em5OXJR7owAENDJJIAj9 DiUIb1l3suJk4ZcFTBJvN04tvEvYXu9k0XekjeRrh49oAXJve69+wUSvPAuj+G1VjqDq NMlA0I384Ho7Nwq2w4mO3jQXRzJCtorUIvSKctFGSe0Zwc7lPnm0VeQhh6xhKJ/FpHHN vLpsRjRhg6d6DQBR/w1yUs4Ti42eK42Y5LlrG7ijZ4NoHTxTdWrmSo0qvPMdNQZSN7WO LnNA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :mime-version:content-transfer-encoding; bh=kmN+kD4FSA2ah1VtoMNYp6bLpdHdftqa8imfp5qvFQQ=; b=gJRPkad37iI1JVbSGK8GgJtwU0R+B/Nf9PG9sBHgz/gfN6vaNdk8Fn+7kGGYpnTn5S wR7cKLL/g4pKWoXksnfKlbbwNloIWOXq2LCere3b0B0+KeO6tWR4HuUD1HxIi59PdRtW isemna3GgdZHEkLxhUQG4WJZUCcePfyfrhH+IlNJzaEdPXJUMz2RoFuVkvSFbxyfc9lf ORSifpXAH8NZ3AxHMH26erNfa2hyLmKjwJcKeQbZGR/llezKiIb415I4X9h2PLnlgIE/ TnlqA6b4VCDhS3VKj8uOfCeB0towu2ne2y7NjBnWwejpX6XN3ht7EGoBvGBmTBCxSeH9 xTxw== X-Gm-Message-State: APjAAAUbP/I4SAo3S1z3fnl3ZuGgnSTUISsp+Mw3DwWNWHMvrmhVk4nB 1O3tyfje0fju/rd/6qYRfa6ldHurH+Y= X-Received: by 2002:adf:ee0c:: with SMTP id y12mr28029051wrn.341.1580897270947; Wed, 05 Feb 2020 02:07:50 -0800 (PST) Received: from cizrna.lan ([109.72.12.137]) by smtp.gmail.com with ESMTPSA id y6sm33749863wrl.17.2020.02.05.02.07.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Feb 2020 02:07:50 -0800 (PST) From: Tomeu Vizoso To: linux-kernel@vger.kernel.org Cc: Tomeu Vizoso , Rob Herring , Steven Price , Alyssa Rosenzweig , David Airlie , Daniel Vetter , dri-devel@lists.freedesktop.org Subject: [PATCH] drm/panfrost: Don't try to map on error faults Date: Wed, 5 Feb 2020 11:07:16 +0100 Message-Id: <20200205100719.24999-1-tomeu.vizoso@collabora.com> X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org If the exception type isn't one of the normal faults, don't try to map and instead go straight to a terminal fault. Otherwise, we can get flooded by kernel warnings and further faults. Signed-off-by: Tomeu Vizoso --- 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) { -- 2.21.0