From patchwork Mon Nov 11 11:17:20 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jean-Philippe Brucker X-Patchwork-Id: 11236783 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 0E40A14ED for ; Mon, 11 Nov 2019 11:20:02 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id DE5992184C for ; Mon, 11 Nov 2019 11:20:01 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="NWY/erdk"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="NWvxUvQ/" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DE5992184C Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=chIhtKOydYJzKtJwlAJFbhVwytVZ+HOGyyuxaqcwfic=; b=NWY/erdkR3CtL0 kHk2IN/jupTWjEhstusoXYaJnhTlf7xD/QxlBtdZB8A/ugKMryKivxvTFCh/40nMMpB2p2TPNjE14 BV87EuCuW3kCHwtd7rlICUjhe8pex/Vi6DpwGSN0RQS6gArUKYTw6DXMJHMBcaTC+Ymn6acmN/bF3 c5RSWUdm0vhBB0+xvbFNCQhz/1t3LDh/M9G1KX4M+pfuFX1xdK3vWvOwlsGbqxuqRivEcrJNDyDi3 SD+EHDnUQJIfZofdRGFYA40R0aakCZtwm2P5wV5HNT3LEf12lw7XKDRhj7PMzvrNWJj1+u1WzGIyK IRwTeTh8bZnUlwG8WV2Q==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1iU7jg-00089i-Bx; Mon, 11 Nov 2019 11:19:56 +0000 Received: from mail-wm1-x342.google.com ([2a00:1450:4864:20::342]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1iU7jb-00088f-6P for linux-arm-kernel@lists.infradead.org; Mon, 11 Nov 2019 11:19:54 +0000 Received: by mail-wm1-x342.google.com with SMTP id a17so11810157wmb.0 for ; Mon, 11 Nov 2019 03:19:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=XnVW9bguitmUqMyEzPyrdobpTBV9agELBQFiFzsMASE=; b=NWvxUvQ/prTUimwY97GIQlgTgNl41e08mLpTMGv4KJOq+UxyJg2fFHfs8X53ApnHNi f8mkVM+dSc3xmlUFNqXsZHg6sjI4gaqzEBowrn5OwZtialhqeJc/8JncFwyY8Xh+BNmO W2GYyvTyGA/OWpzGjmf/+z6PPmvHSbvZR5oiC/zeER9ex5CPm3JbqAfxLkiuPiWViGd1 ++E7W3ZTxlTvdALC10siBBEdVTHq/2s6inIh/EPoIOQp/T22gWIpNfYQnL6UveTRnWMK HpSJrD02yRFG0OiLQZKPgunG43Y4sJgRjaROuvwomWrfmeqsMsRJVuP4dZDtEjGerz7+ TOMQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=XnVW9bguitmUqMyEzPyrdobpTBV9agELBQFiFzsMASE=; b=klbXAm24fsE5O5qI8GMn1Bg9SFoOZOgJapAu69YwJ+GprbX1isC/59En12b1XugzPZ S9PSDe05Ds1HkSk+LUkQSANgucWTy6DN+PFV5NgebHsIVK24RtSiII5oqti/veOhvz+W LXhs5G1mGXgGwrZC8I+cxom1O1aga26PnXNSXKUcHOALmWWvssriTKZKaKh79US8zsZm fPjnCzSlImSlvXEtmmEVzBuAoOHcblwzUM+MB4OJNikWGr7Pis75Ik7Ar12EcVh6idsb CZ43UdJxv0/YCsp4Q0RJ4CwgRcyjjnCOR8QUlXk0Ln0f7TvZxlu8o4tZxaEq/UwG6CLS SA6Q== X-Gm-Message-State: APjAAAVu/TSovpJjk+sV2JAXWhquWJlVRG7MTAVhRMiO3Veq8r8jy8jd RaHv0gbxqWbp1dXdg6/YCx2EjE6gSoM= X-Google-Smtp-Source: APXvYqzGQ3QVzcNTYM4NAqtpCqAkQsd1J3dJLZz7ae1spgUxQRXgtYMtpooW/xUzp4UWOAct7GnneA== X-Received: by 2002:a1c:9c54:: with SMTP id f81mr9244871wme.89.1573471188204; Mon, 11 Nov 2019 03:19:48 -0800 (PST) Received: from localhost.localdomain (xdsl-188-155-204-106.adslplus.ch. [188.155.204.106]) by smtp.gmail.com with ESMTPSA id w81sm22933452wmg.5.2019.11.11.03.19.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Nov 2019 03:19:47 -0800 (PST) From: Jean-Philippe Brucker To: linux-arm-kernel@lists.infradead.org, iommu@lists.linux-foundation.org Subject: [PATCH 1/2] iommu/arm-smmu-v3: Don't display an error when IRQ lines are missing Date: Mon, 11 Nov 2019 12:17:20 +0100 Message-Id: <20191111111721.4145919-1-jean-philippe@linaro.org> X-Mailer: git-send-email 2.23.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191111_031951_441590_CA8F5B9A X-CRM114-Status: GOOD ( 11.40 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:342 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: robin.murphy@arm.com, joro@8bytes.org, will@kernel.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Since commit 7723f4c5ecdb ("driver core: platform: Add an error message to platform_get_irq*()"), platform_get_irq_byname() displays an error when the IRQ isn't found. Since the SMMUv3 driver uses that function to query which interrupt method is available, the message is now displayed during boot for any SMMUv3 that doesn't implement the combined interrupt, or that implements MSIs. [ 20.700337] arm-smmu-v3 arm-smmu-v3.7.auto: IRQ combined not found [ 20.706508] arm-smmu-v3 arm-smmu-v3.7.auto: IRQ eventq not found [ 20.712503] arm-smmu-v3 arm-smmu-v3.7.auto: IRQ priq not found [ 20.718325] arm-smmu-v3 arm-smmu-v3.7.auto: IRQ gerror not found Use platform_get_irq_byname_optional() to avoid displaying a spurious error. Fixes: 7723f4c5ecdb ("driver core: platform: Add an error message to platform_get_irq*()") Signed-off-by: Jean-Philippe Brucker Tested-by: John Garry Acked-by: Will Deacon --- drivers/iommu/arm-smmu-v3.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/iommu/arm-smmu-v3.c b/drivers/iommu/arm-smmu-v3.c index bfa4a0f39ed0..a89797f346a4 100644 --- a/drivers/iommu/arm-smmu-v3.c +++ b/drivers/iommu/arm-smmu-v3.c @@ -5207,19 +5207,19 @@ static int arm_smmu_device_probe(struct platform_device *pdev) /* Interrupt lines */ - irq = platform_get_irq_byname(pdev, "combined"); + irq = platform_get_irq_byname_optional(pdev, "combined"); if (irq > 0) smmu->combined_irq = irq; else { - irq = platform_get_irq_byname(pdev, "eventq"); + irq = platform_get_irq_byname_optional(pdev, "eventq"); if (irq > 0) smmu->evtq.q.irq = irq; - irq = platform_get_irq_byname(pdev, "priq"); + irq = platform_get_irq_byname_optional(pdev, "priq"); if (irq > 0) smmu->priq.q.irq = irq; - irq = platform_get_irq_byname(pdev, "gerror"); + irq = platform_get_irq_byname_optional(pdev, "gerror"); if (irq > 0) smmu->gerr_irq = irq; } From patchwork Mon Nov 11 11:17:21 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jean-Philippe Brucker X-Patchwork-Id: 11236785 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E5C411515 for ; Mon, 11 Nov 2019 11:20:38 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C2DDE20856 for ; Mon, 11 Nov 2019 11:20:38 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="LdgWMcmC"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="KDHXmduj" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C2DDE20856 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=OOv0fonlW4dJausoz1xjPESG+MqdRYgWsqxh+Omm++A=; b=LdgWMcmCV5g61w EmzqOjjKEopR9aFgamBRsOC6/KjXQev9rLa97Gr1mrI5v04eQHqVikDGVXnGainRJyVNkTEQU0uP0 bfJztshKdihH8+ekX+XwQzkDn0hXQTEtmEBfzcBBu9zjj8NNaxQAFwnEXJ5y8K4WS7vNs6ADzMwOm CKCJVUI7slWhdPWA100sEto2Hu9rwWjlIc39TEHeaTb0dvA1BoVn0R0Jq6RAgCulkBl9i+GZCvdDC Yptin5xaVBiD+Whf8xtRZwmkJiTgtvah1Ah1U7ChanW0dW4UqRh8ABR5MWSFxkOCHAKCO1ZOYCcrb 7uj7JXQJFt+KC/oUy4VA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1iU7k3-0008IJ-3m; Mon, 11 Nov 2019 11:20:19 +0000 Received: from mail-wr1-x442.google.com ([2a00:1450:4864:20::442]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1iU7je-00089B-Fl for linux-arm-kernel@lists.infradead.org; Mon, 11 Nov 2019 11:19:56 +0000 Received: by mail-wr1-x442.google.com with SMTP id e6so14245017wrw.1 for ; Mon, 11 Nov 2019 03:19:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=fse92Wud5bezxZYvhZ7ctPlPrYXVpEQegC0mUXWfzdA=; b=KDHXmdujPpOVoxwCfokYbPDdczVXKG3NR0DDqhzWCWFa1XWwtDgSeMSlCFb6aXEReo VrNJQdA0QUpBIEGr6ZyQbp8nTNpcKFQezlXGhh+4yxbNEJA3MWtGlXRiLe8nP0U8ZJE8 kIhb20pUWG3ttEfHm7g91TDX8wnGr2HMefzQZOmiZD7BVOGzZQ9NLt81UcSeajHTbdIk dLcbZHwUJGGiuku5HStUWVxOQMOvg7SEj4IEkln6XyD1w3XZr4NddHgBkjh5LGtVHca6 aI/K1djQoD9/uvzqE8WzwYMxLKaKhW3AqHivxb1OkRbEA5/6vo7wNUeypsYSXjmUp8Tp RGuQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=fse92Wud5bezxZYvhZ7ctPlPrYXVpEQegC0mUXWfzdA=; b=aR/H15DkMuOzBI9vZIM7zed2JkozOS9fuRncC6gZFcoFjMAaJH2znO2SdGVq11NFol JO4gB0v0PhlBuWb4+SnP0cd5Fg7GD5MopvgU1ETeJPMEtpNyu0G29q4zk62oYicUvjBL 4Y2sOVUx5FefwlDG6wi3rfXlVbTTYwjnF4w2uNTTAtQ3TxoPpIMHnRWUTCsY3FgQXBNW M3uodNHS68n5ipjfq+SP8uRfHMV6i0v2vebZ3Ugs5pPiy+1utrDU/qMPqrXfe3kXDNg4 H7l92OjvXibqg97+e6XwWqSvbFPUt/tfqPF1gQvsr9Va6TT+xQZipXvpK1axdK57APfK dNIA== X-Gm-Message-State: APjAAAXLvtYcsVt3iCKxAoHIZjDCObb6VX3ClvLZ04MdeQyY8Dm39CNq 58VBQGDXJ2nS7p30sixnxTX4hiDWHec= X-Google-Smtp-Source: APXvYqxzlDnHmYA4fbPKCb3MThMMHYCJFylL3vcWwjWHDLrqEvnOebecSDuj2VoS/pRaTVqEnIIb8g== X-Received: by 2002:adf:ea8d:: with SMTP id s13mr20648267wrm.366.1573471192731; Mon, 11 Nov 2019 03:19:52 -0800 (PST) Received: from localhost.localdomain (xdsl-188-155-204-106.adslplus.ch. [188.155.204.106]) by smtp.gmail.com with ESMTPSA id w81sm22933452wmg.5.2019.11.11.03.19.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Nov 2019 03:19:52 -0800 (PST) From: Jean-Philippe Brucker To: linux-arm-kernel@lists.infradead.org, iommu@lists.linux-foundation.org Subject: [PATCH 2/2] iommu/arm-smmu: Remove duplicate error message Date: Mon, 11 Nov 2019 12:17:21 +0100 Message-Id: <20191111111721.4145919-2-jean-philippe@linaro.org> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191111111721.4145919-1-jean-philippe@linaro.org> References: <20191111111721.4145919-1-jean-philippe@linaro.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191111_031954_532212_8F6FF853 X-CRM114-Status: GOOD ( 12.50 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:442 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: robin.murphy@arm.com, joro@8bytes.org, will@kernel.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Since commit 7723f4c5ecdb ("driver core: platform: Add an error message to platform_get_irq*()"), platform_get_irq() displays an error when the IRQ isn't found. Remove the error print from the SMMU driver. Note the slight change of behaviour: no message is printed if platform_get_irq() returns -EPROBE_DEFER, which probably doesn't concern the SMMU. Fixes: 7723f4c5ecdb ("driver core: platform: Add an error message to platform_get_irq*()") Signed-off-by: Jean-Philippe Brucker Acked-by: Will Deacon --- drivers/iommu/arm-smmu.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/iommu/arm-smmu.c b/drivers/iommu/arm-smmu.c index 7c503a6bc585..6f676686752c 100644 --- a/drivers/iommu/arm-smmu.c +++ b/drivers/iommu/arm-smmu.c @@ -2062,10 +2062,8 @@ static int arm_smmu_device_probe(struct platform_device *pdev) for (i = 0; i < num_irqs; ++i) { int irq = platform_get_irq(pdev, i); - if (irq < 0) { - dev_err(dev, "failed to get irq index %d\n", i); + if (irq < 0) return -ENODEV; - } smmu->irqs[i] = irq; }