Received: by 10.213.65.68 with SMTP id h4csp2117428imn; Sun, 8 Apr 2018 20:08:28 -0700 (PDT) X-Google-Smtp-Source: AIpwx48Lc+qLBqNECPVeD2wrvaiNbpbbiNgDqqOBCBYyP4tHQPdB265tuskQJ7AcnUD4So0UXrlM X-Received: by 10.101.78.145 with SMTP id b17mr19122361pgs.350.1523243308398; Sun, 08 Apr 2018 20:08:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523243308; cv=none; d=google.com; s=arc-20160816; b=xJSMcXHCi2xEA1ThZCSt0CTLRIvupeQd2smjH1g7fYWgn5e26iIcOiEjBkYn1Pah3t XorVIi+4o04so9gVle7rFelyF4tIspmXnIxzmuXeQjDqgbYaE3OguetB2ciDX0Xc9b2q c1V9rtIuPH8avX60bhqh5wVKT/FeJJkUt16TXQ3LN2VR4wVq252yY6wOfSl1BmS+9atR 8IF++9H0SqEzGnqpIJkCCK6Bex3P8y8z1UMhyXSxNjmetEntP36eUAnT9aRD4/uOobOK mzMmlJeAx1H+sTmRIfNfpUdBkUvPnkWMosXkxl1FzweAtofUJTo+biJ0VjltjxVpQBDN fOYA== 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=q5qJbVhQbxlknUqU1dHtPm6O50Jz/i9mzzR+bxv4mRE=; b=vOlB8fwOP0n2raM+wFf3Sdr5LFqTmepVyPcXbJscqfO1oLHiKpFweq0Z/Y1u+o3zAn 0AK5/mT9HqzsRSeEP/Hp4lbuzSN6Z1Pi510a32sQMl20NaHsbexBp1iPAAEGjNNdwEqV 3BWt7tdyNe0/9w0o5noTTMGiIAnh4C27LQ45QhPbzRVk/d0SJBfY/GqL7r/hgJmYHXdR 6z4PgsGwAFFn4TzrIFFKAUTY18pDFsX9rOtJajaEHxxWJ9Q1v9qj/p32W0eoR7Zft3/N Aa09OdCcgWM0xSL+MtFPuJjondONUO6I9Ai1hQTFDYmRT9sN4RbJt4Ic7q48ehVgGKG+ hIbA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=YRz6ho6T; 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 12-v6si13752563plb.342.2018.04.08.20.07.51; Sun, 08 Apr 2018 20:08:28 -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=YRz6ho6T; 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 S1757489AbeDICAH (ORCPT + 99 others); Sun, 8 Apr 2018 22:00:07 -0400 Received: from mail-sn1nam01on0103.outbound.protection.outlook.com ([104.47.32.103]:45281 "EHLO NAM01-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1756474AbeDIAcQ (ORCPT ); Sun, 8 Apr 2018 20:32:16 -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=q5qJbVhQbxlknUqU1dHtPm6O50Jz/i9mzzR+bxv4mRE=; b=YRz6ho6TvF2BPbJBBRSx1rzPH5PBgBQf5eOIRk6rAcKzqDzARgkQPPgGTa8fR4dLpv16QwUgW2lo4JOwaddK23EVKYmIPOYrvz12jzhWZFYjkNa7/6GHVFjj5C1YovJctjyRG2LAkB3snI7WUxFjl9G5adFm7X3JbrZZKdQ5dgg= Received: from DM5PR2101MB1032.namprd21.prod.outlook.com (52.132.128.13) by DM5PR2101MB0870.namprd21.prod.outlook.com (10.167.110.165) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.696.0; Mon, 9 Apr 2018 00:32:10 +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:32:09 +0000 From: Sasha Levin To: "stable@vger.kernel.org" , "linux-kernel@vger.kernel.org" CC: Suzuki K Poulose , Marc Zyngier , Sasha Levin Subject: [PATCH AUTOSEL for 4.9 205/293] irqchip/gic-v3: Report failures in gic_irq_domain_alloc Thread-Topic: [PATCH AUTOSEL for 4.9 205/293] irqchip/gic-v3: Report failures in gic_irq_domain_alloc Thread-Index: AQHTz5lG3PosLW9DP02npwe30wwDAg== Date: Mon, 9 Apr 2018 00:25:33 +0000 Message-ID: <20180409002239.163177-205-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;DM5PR2101MB0870;7:/iGxAStPtvuejygmH6xEaWabouqHA/PzNa9gFYtmUA65Xy1JP8Swr0SJYwbfa6Gx/D5666bNPd9pQGqIJUs0jXjOZwjaStsV18F6z/x5G6OhfELFEJpM6UIhE1I73Sia4y584erNbrQzV5QaGzyeEdBk6JccKRMISr36VABb7Zq9qxOOPcp5Fq6S/qj6Yp3kVIrwvwwKeB2NN5qYF8VuvfNiaaH7ohgUZk96t+YYnE/32OcFHcXQTCSt8KVXfTC9;20:SvvoX6GY/g8oESk9wt4pGvLdFq336oYYr5jgQ/qDX3VufR9mCLvlpEXqzfoqJuwnn0AB6cCBV6mCx2lT5lpRxngciPamlrJIu+jGCdiBBwzFwuCRd/3MT1u5Rqo+0Fq6MuxVeEHxHidw21h7KeOWgo4mF1ke053JcEKKIx4Tcgk= x-ms-office365-filtering-ht: Tenant X-MS-Office365-Filtering-Correlation-Id: 854a81b6-b4f9-432a-f6b2-08d59db154c4 x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(48565401081)(5600026)(4604075)(3008032)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7193020);SRVR:DM5PR2101MB0870; x-ms-traffictypediagnostic: DM5PR2101MB0870: 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); x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(8211001083)(61425038)(6040522)(2401047)(8121501046)(5005006)(3002001)(10201501046)(3231221)(944501327)(52105095)(93006095)(93001095)(6055026)(61426038)(61427038)(6041310)(20161123558120)(20161123560045)(20161123564045)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011);SRVR:DM5PR2101MB0870;BCL:0;PCL:0;RULEID:;SRVR:DM5PR2101MB0870; x-forefront-prvs: 0637FCE711 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(346002)(39860400002)(366004)(396003)(39380400002)(376002)(199004)(189003)(53936002)(2906002)(6512007)(102836004)(2616005)(76176011)(14454004)(446003)(10090500001)(11346002)(476003)(486006)(107886003)(59450400001)(2900100001)(97736004)(66066001)(6506007)(6436002)(106356001)(99286004)(105586002)(3660700001)(6116002)(86612001)(3280700002)(6666003)(2501003)(10290500003)(26005)(8676002)(8936002)(478600001)(68736007)(5250100002)(5660300001)(316002)(4326008)(72206003)(186003)(110136005)(6486002)(7736002)(25786009)(3846002)(86362001)(36756003)(22452003)(81156014)(81166006)(575784001)(305945005)(54906003)(1076002)(22906009)(217873001);DIR:OUT;SFP:1102;SCL:1;SRVR:DM5PR2101MB0870;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: I237fOSaiqnzt4ARkacte3mOh3/e1qylMO9utbchpsflhgDEO3WbvOnVzpvF4nfNVBpHGjVVX0JEAZ570huuI7YhysYQ1IXqID/MqoWHkhqKPcrC9/D/dGyV7+CIrwVWiInoeqfSL5s1j/XxumKEW4whp/iRvXnU4l0IJFdspoB5/tN1ez4heRYAHbCfj7iRzdrgI9A7O2w7o0PNMxnmNWiV/F4gEfaysmN4Ug0kwidKhUOKe3LxD3kx3SABRCE6tiAZvktd/8Qw36Hav0bSb9oNCqG3llS83aIuzWeundQoqxw8a7WCmB8Ay6TmvDZ8a9YdHx2p/AvswDQdGNgRbtX8I5zLIU6+FKdo+nboOQOG7JljKcFlUmo6Xo0qOykm61a0ut3v2lp7c37fiZVv8+je1v9hAvugg/McbWyabYo= 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: 854a81b6-b4f9-432a-f6b2-08d59db154c4 X-MS-Exchange-CrossTenant-originalarrivaltime: 09 Apr 2018 00:25:33.9878 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR2101MB0870 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Suzuki K Poulose [ Upstream commit 63c16c6eacb69d0cbdaee5dea0dd56d238375fe6 ] If the GIC cannot map an IRQ via irq_domain_ops->alloc(), it doesn't return an error code. This can cause a problem with drivers, where it thinks it has successfully got an IRQ for the device, but requesting the same ends up failure with -ENOSYS (as the IRQ's chip is not set). Fixes: commit 443acc4f37f6 ("irqchip: GICv3: Convert to domain hierarchy") Cc: Marc Zyngier Signed-off-by: Suzuki K Poulose Signed-off-by: Marc Zyngier Signed-off-by: Sasha Levin --- drivers/irqchip/irq-gic-v3.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/irqchip/irq-gic-v3.c b/drivers/irqchip/irq-gic-v3.c index fd4a78296b48..8c7f02318a6b 100644 --- a/drivers/irqchip/irq-gic-v3.c +++ b/drivers/irqchip/irq-gic-v3.c @@ -832,8 +832,11 @@ static int gic_irq_domain_alloc(struct irq_domain *dom= ain, unsigned int virq, if (ret) return ret; =20 - for (i =3D 0; i < nr_irqs; i++) - gic_irq_domain_map(domain, virq + i, hwirq + i); + for (i =3D 0; i < nr_irqs; i++) { + ret =3D gic_irq_domain_map(domain, virq + i, hwirq + i); + if (ret) + return ret; + } =20 return 0; } --=20 2.15.1