From patchwork Wed Feb 5 10:07:16 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomeu Vizoso X-Patchwork-Id: 183088 Delivered-To: patch@linaro.org Received: by 2002:a92:1f12:0:0:0:0:0 with SMTP id i18csp80878ile; Wed, 5 Feb 2020 02:07:56 -0800 (PST) X-Google-Smtp-Source: APXvYqwyaa9LjihVYiklJrDoKfCH7RDjQnLfNaWmKTN5eusQGaXxa6YQQ3wBIU//ZabsGUhMssCg X-Received: by 2002:a17:90a:33a1:: with SMTP id n30mr4540063pjb.6.1580897276092; Wed, 05 Feb 2020 02:07:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1580897276; cv=none; d=google.com; s=arc-20160816; b=ioMf6Yt8I7uxXmasmQPyu5akGIukuK/sHEPQm+QQHIYIcadBrq/w7kzzRzsQe8/wjr 60v/tle4PSSiU++iEq+0cxAhGSuJ9wiOag2x8a0++vzML8CEW6Xu4AC1Fth8R67wgifV sUo/JbeFP2uBIMw1VZxhulQ2riN0JosP8Hm3YqFEodEFIGo9eeJFYHbifmdVEYRUBP3D er61SLeVRxZySKX2nHB9mx+snllzbQI7ZM8iN3ReVAtRY+a0ZMcsip8NP1yfb0nzxHvL zO+HDIk8bcleSmgok2YKOC89quk9SM+0OiEJ97IDEWUnHizGt1Dd5hca1YfRJKljSEDX EXOw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:mime-version:message-id:date:subject:to:from :dkim-signature:delivered-to; bh=RfS2YPK0YhNrhWPVVuJlDHac7ldpc7Hm03Y5bBZJL1A=; b=0DDnMjbEoKKGjwCSpnJueNcPK6IU7aydT7gKnY3nzI9kfVLuIRHKhAkbaacnvsfr6/ sCyuIu72HhfQwyndtqnQIQnTAz+hxiS79nARXkqxX0HLy1DKJ5GwxnTUsTcikv7bOjqZ HcUwjawprzRwzyYKy7qD7GnmpcDGonaTFFZ1qrdnkC79e0QJJmrrm/+E5zTMuBVg6JkP Btx+8TbqS6tDG1xL83SQusSq+NWMceHY2XTYfwQD1yMlCLsdDekYVVdnfwfJwvOqc+ax tx2SK6BHlmEZDA2XqjXVtKAsaBWqvaijAOAbJ+4XOFtsq1m/xiyMW/cqsemIc1hW2PX+ nRJw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b="uxf/4cY/"; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from gabe.freedesktop.org (gabe.freedesktop.org. [131.252.210.177]) by mx.google.com with ESMTPS id a24si13786392pfl.135.2020.02.05.02.07.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Feb 2020 02:07:56 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) client-ip=131.252.210.177; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b="uxf/4cY/"; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 164716F51D; Wed, 5 Feb 2020 10:07:53 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wr1-x441.google.com (mail-wr1-x441.google.com [IPv6:2a00:1450:4864:20::441]) by gabe.freedesktop.org (Postfix) with ESMTPS id 40CA46F51D for ; Wed, 5 Feb 2020 10:07:52 +0000 (UTC) Received: by mail-wr1-x441.google.com with SMTP id u6so1952877wrt.0 for ; Wed, 05 Feb 2020 02:07:52 -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=T+4ZN7Nk78swCsldfiG9b0natvGrUAotuUoCLwBWLVOIFFVI1OhT5233Sdz76/SjVI vfdoH/+c6GtCP+RMfhW/QUaywT39imeJNN2Mxsm++cFA0ScGfwIMWQvwg3yNvdSbiCtV PKr/kVRSjV4hEo9xGABVD7jUQHnpyuYcmrPH+D1SO/+Z+sthGMveLU3CXUB2EIotbsEq cqsNtUNqZWYm3StFm60BwDxZOEtqlSWN65AotHR0wreVQ79IE8W1V8Gw6hcE5G/qu1EL 5u1IGtPqgGiyttKzUECvOssUjpr1Jndwznpgq39Z8nn7cc/dQrcjuEBujNOUa3rY5YN8 JG6w== X-Gm-Message-State: APjAAAWS3vVrFBMb5cs29pEZtRjLG1pQ+xC5J+xrfHamiAoGKyMNVkro b1RWgzHEnntxk0cEo8nqbyc= 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 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 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Tomeu Vizoso , David Airlie , dri-devel@lists.freedesktop.org, Steven Price , Alyssa Rosenzweig Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" 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(-) -- 2.21.0 _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel Reviewed-by: Alyssa Rosenzweig Reviewed-by: Robin Murphy 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) {