Received: by 10.192.165.148 with SMTP id m20csp535410imm; Wed, 25 Apr 2018 03:52:18 -0700 (PDT) X-Google-Smtp-Source: AIpwx49/mtHrlJSVvWDJkl7WIZwPwc/2uTlhTgGj4QbluqkI0NHv1d1kmIgcg97FTkCjPvkeSQKb X-Received: by 2002:a17:902:362:: with SMTP id 89-v6mr29345744pld.270.1524653538405; Wed, 25 Apr 2018 03:52:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524653538; cv=none; d=google.com; s=arc-20160816; b=EKloB5M9du81Ez0IQPFfmWumiWTY09xr81yLJUsza3dCs/HLAkXN7hP+3RkjxRkLKl ogAvFNLExE2bIz/JFdNzTiGyR3utTV5yysqBh+z67N6bHYrs8uuCunVuW24vZ92G9BMo LpxDaX3DaXVUzzgUcMD/uk753onXQRbJcBH0J3NpCyiHnoy9zL4xThiNd/tGZusUYB+E DNvXpLWKceB5Tkt+1Rt0yxazmwddk107dsiB4gJM4MRGp9+kyDuuxurjiY44ZPWHmy40 sqPe2TV+phbJkgl0lUqX5Cv/5FkHPYlSMCSJiUG8CWhoj539pHFEesxbaENZ+nlP8bmC ZF2g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=b5yKsCtSErAdNjN82tSeOkdI5A8i6VVeOB7Yi0u7I2Y=; b=UVmGj5L0NFT3E+aBlmVjb39tHLu6JL7XXIMEzMvxp3RmyRcpR9AKSfVlzRTYsMbPDV WbSpnkwSKv9jdf3///zY3RfCHRRWW+wAEWSsfH6Kx87tUeq9nBwIqOo2YCI9nbrokf8A x0aJyL49N8VQ4NXSekU1hcPnFcTE7+BnUsqGpdmKspHt+DakI7Gdha/o58VkLEWdZK0W sYhCchOg7ZJsklcTqmTK9Hz438xVnMlXACf2Q5zqshCxTiHBjJKTkoXRgvh+/VJZ/PsF PG8v94qifRsrMv0XPEbk0USoD6Yo//ik99GdjAVDGVaBWmanoVszGrreqrC6wpU1PDmM P/9A== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 1-v6si15844047plw.519.2018.04.25.03.52.04; Wed, 25 Apr 2018 03:52:18 -0700 (PDT) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753514AbeDYKvC (ORCPT + 99 others); Wed, 25 Apr 2018 06:51:02 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:53290 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754346AbeDYKoW (ORCPT ); Wed, 25 Apr 2018 06:44:22 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 394B6266; Wed, 25 Apr 2018 10:44:21 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Stuart Yoder , Laurentiu Tudor , Marc Zyngier , Rajendra Nayak , Stephen Boyd , Sasha Levin Subject: [PATCH 4.14 169/183] irqchip/gic-v3: Ignore disabled ITS nodes Date: Wed, 25 Apr 2018 12:36:29 +0200 Message-Id: <20180425103249.310787551@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180425103242.532713678@linuxfoundation.org> References: <20180425103242.532713678@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.14-stable review patch. If anyone has any objections, please let me know. ------------------ From: Stephen Boyd [ Upstream commit 95a2562590c2f64a0398183f978d5cf3db6d0284 ] On some platforms there's an ITS available but it's not enabled because reading or writing the registers is denied by the firmware. In fact, reading or writing them will cause the system to reset. We could remove the node from DT in such a case, but it's better to skip nodes that are marked as "disabled" in DT so that we can describe the hardware that exists and use the status property to indicate how the firmware has configured things. Cc: Stuart Yoder Cc: Laurentiu Tudor Cc: Greg Kroah-Hartman Cc: Marc Zyngier Cc: Rajendra Nayak Signed-off-by: Stephen Boyd Signed-off-by: Marc Zyngier Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- drivers/irqchip/irq-gic-v3-its-pci-msi.c | 2 ++ drivers/irqchip/irq-gic-v3-its-platform-msi.c | 2 ++ drivers/irqchip/irq-gic-v3-its.c | 2 ++ drivers/staging/fsl-mc/bus/irq-gic-v3-its-fsl-mc-msi.c | 2 ++ 4 files changed, 8 insertions(+) --- a/drivers/irqchip/irq-gic-v3-its-pci-msi.c +++ b/drivers/irqchip/irq-gic-v3-its-pci-msi.c @@ -132,6 +132,8 @@ static int __init its_pci_of_msi_init(vo for (np = of_find_matching_node(NULL, its_device_id); np; np = of_find_matching_node(np, its_device_id)) { + if (!of_device_is_available(np)) + continue; if (!of_property_read_bool(np, "msi-controller")) continue; --- a/drivers/irqchip/irq-gic-v3-its-platform-msi.c +++ b/drivers/irqchip/irq-gic-v3-its-platform-msi.c @@ -154,6 +154,8 @@ static void __init its_pmsi_of_init(void for (np = of_find_matching_node(NULL, its_device_id); np; np = of_find_matching_node(np, its_device_id)) { + if (!of_device_is_available(np)) + continue; if (!of_property_read_bool(np, "msi-controller")) continue; --- a/drivers/irqchip/irq-gic-v3-its.c +++ b/drivers/irqchip/irq-gic-v3-its.c @@ -3083,6 +3083,8 @@ static int __init its_of_probe(struct de for (np = of_find_matching_node(node, its_device_id); np; np = of_find_matching_node(np, its_device_id)) { + if (!of_device_is_available(np)) + continue; if (!of_property_read_bool(np, "msi-controller")) { pr_warn("%pOF: no msi-controller property, ITS ignored\n", np); --- a/drivers/staging/fsl-mc/bus/irq-gic-v3-its-fsl-mc-msi.c +++ b/drivers/staging/fsl-mc/bus/irq-gic-v3-its-fsl-mc-msi.c @@ -75,6 +75,8 @@ int __init its_fsl_mc_msi_init(void) for (np = of_find_matching_node(NULL, its_device_id); np; np = of_find_matching_node(np, its_device_id)) { + if (!of_device_is_available(np)) + continue; if (!of_property_read_bool(np, "msi-controller")) continue;