Received: by 10.213.65.68 with SMTP id h4csp2114409imn; Sun, 8 Apr 2018 20:04:40 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/IB7oY/C4tTWE+gIcsG2hkR5c/0ZVeWyI+dC2zOeybiV1yoh11pkScp5Btep/AJhEdSelo X-Received: by 10.98.237.18 with SMTP id u18mr27698263pfh.78.1523243080081; Sun, 08 Apr 2018 20:04:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523243080; cv=none; d=google.com; s=arc-20160816; b=eVVkahB6cOvHmUM+9xH+H/ziwDmxirj1MK2QLEKTBbAOMs1FCcadkIO3b/kmIX1w3k EnU/1wrRFyZSzRBczAgZOdbnb2z1Us8N5kSu1Ku0Z0N7OkyQwMysa81mkKprk+b7VF30 CxDVbSli5aiog9jqQjsrxcob4+6nz1EVVx5TRhe+6qEMJ+4ry156eLJZFZrDp+XV5wxz m15f/GrDygN7kfgrIMe6OAeFKOEzG1rtDo7CUzC18oo+QFPoGrcU3mc2LUO5CoEve9/Q sPZcoK+3XbwlIL0OCbYUYam69EDuQmodd1+Jfi4ZHDiw67V483RjlyHorNd/0GdT52Xs nQVA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :spamdiagnosticmetadata:spamdiagnosticoutput:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=r4MqWBszkIEpLx3my4YX6vqIKq3ETBVvtBUfe09/+oM=; b=C0+9IIjMg2spHiq9DmstNl2XYDEv32JiPA4HAdUYEfXtBz+ZlZYR/q4CU/hSA5ta2Q eebAkIOY3R1wvImHsqLFn/hzZuMxyulj4xa3zP44gZ8rq2rAS53XSvoZ7hKJjjdpUzHS xBYX7kBVNZPjG9riS6dC8Ee8FeOTqO2BoeVJBVWe8Aa/hjFHsaX5sdrYgBfDWX5/RDNa y5zK1TnaMYT396Nd4K5CEMMnqSOgotthfuNKQFEERv0Su+CW2IGwL+ey5xxSw4xG6F5y OuQFpd6l+xwZwK8qZ5X95qsPtCBVL+DR61RWQBYzvM9ezDcbGVSvYtaCLL8XrhD4368T rvBQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=mMMDlhkQ; 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=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id bc8-v6si3512954plb.141.2018.04.08.20.04.03; Sun, 08 Apr 2018 20:04:40 -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; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=mMMDlhkQ; 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=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932586AbeDIAfG (ORCPT + 99 others); Sun, 8 Apr 2018 20:35:06 -0400 Received: from mail-by2nam01on0123.outbound.protection.outlook.com ([104.47.34.123]:51296 "EHLO NAM01-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1755736AbeDIAey (ORCPT ); Sun, 8 Apr 2018 20:34:54 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=r4MqWBszkIEpLx3my4YX6vqIKq3ETBVvtBUfe09/+oM=; b=mMMDlhkQidZpGFMzS/IdYe88ZvSxr2z5MRprGVd7x+duNRvXswX9OLDppO+Ap62AJYb5yyqjTdGRlzx1tMZUu1H1RA6SsLfzzRfBHt3qXKcXPAeylmjnP/FW3NgOP49DAcyst7QURjCxpeLS400VQiipZ8NBSySmdN85CILQEuY= Received: from DM5PR2101MB1032.namprd21.prod.outlook.com (52.132.128.13) by DM5PR2101MB0806.namprd21.prod.outlook.com (10.167.107.156) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.696.3; Mon, 9 Apr 2018 00:34:48 +0000 Received: from DM5PR2101MB1032.namprd21.prod.outlook.com ([fe80::8109:aef0:a777:7059]) by DM5PR2101MB1032.namprd21.prod.outlook.com ([fe80::8109:aef0:a777:7059%2]) with mapi id 15.20.0696.003; Mon, 9 Apr 2018 00:34:47 +0000 From: Sasha Levin To: "stable@vger.kernel.org" , "linux-kernel@vger.kernel.org" CC: Stephen Boyd , Stuart Yoder , Laurentiu Tudor , Greg Kroah-Hartman , Marc Zyngier , Rajendra Nayak , Sasha Levin Subject: [PATCH AUTOSEL for 4.9 291/293] irqchip/gic-v3: Ignore disabled ITS nodes Thread-Topic: [PATCH AUTOSEL for 4.9 291/293] irqchip/gic-v3: Ignore disabled ITS nodes Thread-Index: AQHTz5lw17auk3dqCES/JDxsj9zu9g== Date: Mon, 9 Apr 2018 00:26:44 +0000 Message-ID: <20180409002239.163177-291-alexander.levin@microsoft.com> References: <20180409002239.163177-1-alexander.levin@microsoft.com> In-Reply-To: <20180409002239.163177-1-alexander.levin@microsoft.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [52.168.54.252] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;DM5PR2101MB0806;7:q3LBrwKaIE4/83uHBcJSb7oLqYzyoG4YkNnE2eF9pB8YkXd8WFn9jRrWHvAJPx/+MYUlyeAtYB6EPbEZUpbmXCqcGfQAcl+MMjhWyrVMTfYGMKPlyh1IFdTieGqcKgQOUoiHBn1bQi53QbfaJmHyPPRTgHbu07/sireXpU35EIRdoi9NTC5QvsQQq94/PTjOiyi8PL7LWK3AELFGL4/ILIJ1xbCrUsrUxCGJ9PjpLnqJ/bUJuZZw+ZlnDwa/zLSh;20:j7a0bgArmlskx9t2YT6u2K3lGWL/78Bk2W+M9D6lxEuX4zH68H06xLfVuQyxpmRfgE+XodeXPq+SzuqGDXNB5Vk8H86XnYSgSV6sUjZx1j6FtIy79g00GnZs4zOx1wuaMt2qMZJiUdsSQsO35N+KlGqJX+ck8B9H4m9nbwbwnBM= x-ms-office365-filtering-ht: Tenant X-MS-Office365-Filtering-Correlation-Id: 035c6c3e-f910-4637-a642-08d59db1b2ee x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(48565401081)(5600026)(4604075)(3008032)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7193020);SRVR:DM5PR2101MB0806; x-ms-traffictypediagnostic: DM5PR2101MB0806: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Alexander.Levin@microsoft.com; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(28532068793085)(180628864354917)(89211679590171)(185117386973197)(85827821059158); x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(8211001083)(61425038)(6040522)(2401047)(8121501046)(5005006)(3231221)(944501327)(52105095)(93006095)(93001095)(10201501046)(3002001)(6055026)(61426038)(61427038)(6041310)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123560045)(20161123558120)(6072148)(201708071742011);SRVR:DM5PR2101MB0806;BCL:0;PCL:0;RULEID:;SRVR:DM5PR2101MB0806; x-forefront-prvs: 0637FCE711 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(346002)(39860400002)(376002)(396003)(366004)(39380400002)(199004)(189003)(2906002)(25786009)(2501003)(10290500003)(476003)(11346002)(446003)(97736004)(5250100002)(68736007)(2616005)(102836004)(6506007)(59450400001)(3846002)(3660700001)(486006)(3280700002)(305945005)(6666003)(99286004)(5660300001)(76176011)(1076002)(186003)(26005)(7736002)(8656006)(6116002)(81156014)(81166006)(86612001)(4326008)(105586002)(10090500001)(2900100001)(54906003)(22452003)(316002)(36756003)(110136005)(107886003)(8676002)(39060400002)(6436002)(478600001)(53936002)(66066001)(6486002)(6512007)(86362001)(14454004)(72206003)(8936002)(106356001)(22906009)(217873001);DIR:OUT;SFP:1102;SCL:1;SRVR:DM5PR2101MB0806;H:DM5PR2101MB1032.namprd21.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: y38htmsNI+gcV+3CRT7ymm47E4yoEJPL5Mi/Nn3fTG5HEWBta+VGNzQqYmOyyyOcx9gIv2XJZNrM1A5RXJB49/7NB0LWccUK4LAVyz49lCZksiC3jxn55cSH9wKLVnbOJBO+f4EWnz30fRX40qNZRTvrFlAqAZz4HdUl/ZfBNI/2U6jNHVrGmYgduDmch1WyEIwcIe0Zz7zD8+3LaXIdjFQ36QNmDjF/0SUVq4cd9grAK8G0xU4S3XYbN291CUTSRzEYAGcvTzyR8fMvshj9Lx6biLVFtsRWH1UDb2/xmg8WF+fvvdEhA5J/SHq1rRBAhnhjBWKLAHZtaS6W5Iiym0YhUAayUTAeX5aoaza2kRo/bdLuZAuK3PsYvsBuJ8zGHnO1/qs6uNBAx7Y7x0qNdJ8xgARDWlanal1XdS+d2oE= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: 035c6c3e-f910-4637-a642-08d59db1b2ee X-MS-Exchange-CrossTenant-originalarrivaltime: 09 Apr 2018 00:26:44.1291 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR2101MB0806 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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(+) diff --git a/drivers/irqchip/irq-gic-v3-its-pci-msi.c b/drivers/irqchip/irq= -gic-v3-its-pci-msi.c index 77931214d954..6b5f50e1fc72 100644 --- 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(void) =20 for (np =3D of_find_matching_node(NULL, its_device_id); np; np =3D of_find_matching_node(np, its_device_id)) { + if (!of_device_is_available(np)) + continue; if (!of_property_read_bool(np, "msi-controller")) continue; =20 diff --git a/drivers/irqchip/irq-gic-v3-its-platform-msi.c b/drivers/irqchi= p/irq-gic-v3-its-platform-msi.c index 470b4aa7d62c..e4768fcdc672 100644 --- a/drivers/irqchip/irq-gic-v3-its-platform-msi.c +++ b/drivers/irqchip/irq-gic-v3-its-platform-msi.c @@ -80,6 +80,8 @@ static int __init its_pmsi_init(void) =20 for (np =3D of_find_matching_node(NULL, its_device_id); np; np =3D of_find_matching_node(np, its_device_id)) { + if (!of_device_is_available(np)) + continue; if (!of_property_read_bool(np, "msi-controller")) continue; =20 diff --git a/drivers/irqchip/irq-gic-v3-its.c b/drivers/irqchip/irq-gic-v3-= its.c index ac15e5d5d9b2..558c7589c329 100644 --- a/drivers/irqchip/irq-gic-v3-its.c +++ b/drivers/irqchip/irq-gic-v3-its.c @@ -1807,6 +1807,8 @@ static int __init its_of_probe(struct device_node *no= de) =20 for (np =3D of_find_matching_node(node, its_device_id); np; np =3D 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("%s: no msi-controller property, ITS ignored\n", np->full_name); diff --git a/drivers/staging/fsl-mc/bus/irq-gic-v3-its-fsl-mc-msi.c b/drive= rs/staging/fsl-mc/bus/irq-gic-v3-its-fsl-mc-msi.c index eaeb3c51e14b..cb95c3e940f1 100644 --- 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) =20 for (np =3D of_find_matching_node(NULL, its_device_id); np; np =3D of_find_matching_node(np, its_device_id)) { + if (!of_device_is_available(np)) + continue; if (!of_property_read_bool(np, "msi-controller")) continue; =20 --=20 2.15.1