Received: by 2002:a05:6a10:a852:0:0:0:0 with SMTP id d18csp1470327pxy; Thu, 6 May 2021 08:35:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy6fNYBo1jmHDTKsLIecJR/jWgml3tIWJJ+8YGW4frzjufip4/GhahTnJYq1kRbc8ENIYIF X-Received: by 2002:a62:ce85:0:b029:28e:1637:3fc9 with SMTP id y127-20020a62ce850000b029028e16373fc9mr5396155pfg.41.1620315352514; Thu, 06 May 2021 08:35:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620315352; cv=none; d=google.com; s=arc-20160816; b=ojUvx0Phw7hDJPtD+igl3JrUEg8yJ1qnay6obcLXKiLRLYohJ2D3V8EDbUXSsymMRs qkMmDOXiuNpy7KPyGwO2eKc84TbESbOwxM3Hs/ZNizg0uqR7hxTSvSBVSH1XGPadnDaN rNkttjDlohg9DgOF4Sfcv4QAz2L3nAHH+VmYY8VtDOvl4d7hqCmLQt/8KkLn/HFunmeV GMS3KhC9mzgi4DdLwTW+WYiwPjy4DhO6snLiK6M65sQ5+aDxSlk9LNcpC78MiPnOpE/b SN/P8RPDf9LsqUnF6WcBtHyNPGAgZDrwvn0Y9uZ+6g7iujEc458kYeQIAwkjJttN7Lb6 861g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=Jp+mrUc/wGQaU+9p4JknmDbra4B73k7NjEXegSHf2ng=; b=PHUV4f61139mpOAmWuh64XPIqzRliVOCpIYlf95AHSAoAS7QQjGASVFKT5wHQO/TTb rUut3FJR0AOo5EYCcAi84LiODyt/dnNbS6IbYVgpMrKJBwToiyC0Os1jwaZ1zyi2RFry bBUIIAzEFVr5LNUgK7iU4IUxUA81HPK1wZQWdZMLVXCZ2DlsqyV0jCVRxdxi9r6RQQLT dU1ehrE9D2GoxajXwbxx8NZlzyyxOHZkg8E3i5qMNnMfediY7usJL5N3GqzLTOTWdc6i WOjsps99MMSP7we+KLSnrZlC45pz9jcIAhbGePiniKCiBo8RJYyrJMWo5LTGWag4i/EW NuWA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=kslpnpwN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x6si6997164pju.146.2021.05.06.08.35.38; Thu, 06 May 2021 08:35:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=kslpnpwN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235975AbhEFPe0 (ORCPT + 99 others); Thu, 6 May 2021 11:34:26 -0400 Received: from mail.kernel.org ([198.145.29.99]:45940 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235404AbhEFPdq (ORCPT ); Thu, 6 May 2021 11:33:46 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 5090E6140C; Thu, 6 May 2021 15:32:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1620315168; bh=MTTPn1JuU+d3/eQ+Q7Ef/sfL+sWMGgOEsQXP78mZRIE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kslpnpwNQOUTAzurn5Gss4CnU3SYYP2rwxKtVz9ioqugqtuiH4OXS6sIpxE+JI/xf LMd1ClbrzJlXfcBZYlNaJT0aZlYZSHqjj2X0d2yP9u7/ZF6IL8snkqS76vrVf1fPR+ A5+D8ByYQDrCxORx+Zh22+kxRZzHVGvUhJJv+69M/fjDBpGJk1eFGEwQribgq00DDc vNcuaf3WCZTK4+OskzWUWLSnQiD6tTuGrz4y0U1NgR80opzxy6/HPeATRo4SYTazDW NoFjAcNtH5oYDkBXP35FvAzMFcGCDDCKCwI3mloPLkd2dUeWnUBnCoqknAxPJgjKZ4 bvuh+Ckpfi5fA== Received: by pali.im (Postfix) id 57DF8129A; Thu, 6 May 2021 17:32:47 +0200 (CEST) From: =?UTF-8?q?Pali=20Roh=C3=A1r?= To: Lorenzo Pieralisi , Thomas Petazzoni , Rob Herring , Bjorn Helgaas Cc: Russell King , =?UTF-8?q?Marek=20Beh=C3=BAn?= , Remi Pommarel , Xogium , Tomasz Maciej Nowak , Marc Zyngier , linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 12/42] PCI: aardvark: Check for virq mapping when processing INTx IRQ Date: Thu, 6 May 2021 17:31:23 +0200 Message-Id: <20210506153153.30454-13-pali@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210506153153.30454-1-pali@kernel.org> References: <20210506153153.30454-1-pali@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org It is possible that we receive spurious INTx interrupt. So add needed check before calling generic_handle_irq() function. Signed-off-by: Pali Rohár Reviewed-by: Marek Behún Cc: stable@vger.kernel.org --- drivers/pci/controller/pci-aardvark.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/pci/controller/pci-aardvark.c b/drivers/pci/controller/pci-aardvark.c index 362faddae935..e7089db11f79 100644 --- a/drivers/pci/controller/pci-aardvark.c +++ b/drivers/pci/controller/pci-aardvark.c @@ -1106,7 +1106,10 @@ static void advk_pcie_handle_int(struct advk_pcie *pcie) PCIE_ISR1_REG); virq = irq_find_mapping(pcie->irq_domain, i); - generic_handle_irq(virq); + if (virq) + generic_handle_irq(virq); + else + dev_err(&pcie->pdev->dev, "unexpected INT%c IRQ\n", (char)i+'A'); } } -- 2.20.1