Received: by 10.213.65.68 with SMTP id h4csp2119447imn; Sun, 8 Apr 2018 20:11:07 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+kU9ybpfib4UmPnjBx5IJ+15Zs9S06Gxlf4cwwDnBSXpAWeGg0kYHtdt5AUbKnDRfsW/ke X-Received: by 2002:a17:902:b907:: with SMTP id bf7-v6mr11403084plb.399.1523243377752; Sun, 08 Apr 2018 20:09:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523243377; cv=none; d=google.com; s=arc-20160816; b=lufEihy8BCqCHQS+N/1ODRjixsWQxkpJuqGEgeI5w2hVx+vyHWn+3SPQk+us+YIDvb 9s5FrqPTJD19V9Depi6sl0IlmZnDbliOBXNnirmhR1NmH+mdSpDSeWSsVo0YfPS4pLSP UxFs3J4OIOm2Ef2Iecc2ezHm9Vy3PvTwzojIoy6nFiwuwjRe0NtjRceUssxaloZsHQoz hv252xmJ6Cofp8fCxpLokiSZlN3u4Slt95fGVItx9CgvgJT8lByp0e0HyIPk/mUT7gNK iJMAUt5+6xXGGOJ409844dIPbgcvcSNv5cMiZzHax3rgyVQVGbIaqrD54d/kguauZfNd t9KA== 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=XulxUIFdhHZDdGKXd2K0KQKa+bKjnPUefq/SOyen564=; b=rnrfulNfF3LUM7n9Z0a5lVOGyZQ5A/yTYujv+XX3+dVDOsL3BKyXx187JUJlWjO/aS 58YWcevUJljxYCUXm4wTz/XlZvh2XAgjiimen1K36saWEVNbgcfXY/fMmiv4kDHQY65z 6xDqcrdp3ONUduMuRfVu/dXchEo4L9t8T9ExM7DxOzgWURU2tW+APvWDIwApHm771LWv Vk3CrOf8tYQb5gWQ6xOzAumT6mlq+cEwJ4up5JuNyBpbDRkIXNHcW0JlXPyDGEkb0WKC 6uHD/1jxPNIzab/T3qEs+ExJNZdTW+RZ/2+UNx9lZC6q2Xtp8mCWgtK3HagIT84NRqZP rXWQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=eEoN9BOp; 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 z1-v6si13220301plb.101.2018.04.08.20.09.00; Sun, 08 Apr 2018 20:09:37 -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=eEoN9BOp; 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 S1757272AbeDIBSv (ORCPT + 99 others); Sun, 8 Apr 2018 21:18:51 -0400 Received: from mail-bl2nam02on0103.outbound.protection.outlook.com ([104.47.38.103]:27456 "EHLO NAM02-BL2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S932824AbeDIAhr (ORCPT ); Sun, 8 Apr 2018 20:37:47 -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=XulxUIFdhHZDdGKXd2K0KQKa+bKjnPUefq/SOyen564=; b=eEoN9BOpMd2xfol83eK/aV1UxRNjfECSM+oUk8S8A4PPwqZ0gq1Fq2o9z+VdxbYRVIfeq+Tun7Np77ZwJM2HC/oInt7agDq/hxt2onsmetSJfv8rlMacbuVPgBiF6cX4NMWeB4rTDqCvOdG26pLban61RuRMkEJ8RYs/MpcfErk= Received: from DM5PR2101MB1032.namprd21.prod.outlook.com (52.132.128.13) by DM5PR2101MB1110.namprd21.prod.outlook.com (52.132.131.167) 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:37:44 +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:37:44 +0000 From: Sasha Levin To: "stable@vger.kernel.org" , "linux-kernel@vger.kernel.org" CC: Suzuki K Poulose , Yingjoe Chen , Marc Zyngier , Sasha Levin Subject: [PATCH AUTOSEL for 4.4 101/162] irqchip/gic-v2: Report failures in gic_irq_domain_alloc Thread-Topic: [PATCH AUTOSEL for 4.4 101/162] irqchip/gic-v2: Report failures in gic_irq_domain_alloc Thread-Index: AQHTz5nBg2svcAuZeEiWgsn17yEWoQ== Date: Mon, 9 Apr 2018 00:29:00 +0000 Message-ID: <20180409002738.163941-101-alexander.levin@microsoft.com> References: <20180409002738.163941-1-alexander.levin@microsoft.com> In-Reply-To: <20180409002738.163941-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;DM5PR2101MB1110;7:XPu656OxJdrKjuGnXUMggPDhNKbuwjiZuckHa4vt8mUGeps5R528gbs7Vj2kENvAEuZU7TGIp5dL4loD7GJutd05ET+06PIQl6ZLp3kw7+ehPUT449sDqHjFdm8MWLBxUCZNoEV5Hkf+oGCMXEcMaCwpLcQnMyhqAzSjn4HB2mILivFEcwzNrPRNfzyMKDh6KBbkL65n+5CbZ8g5ojU1Vfcz45O4oSI2pDDDbJaGU8/1KI2a4NdRaku4QEHRxCx4;20:tFw9UlgbqXz2fhM9iGkratlhOZaVLkB1GIFbhicS3lyEp2C+FsN5R9EeoGI0brA/TGrwpjVzaTZXzShUvTfcAYb+JzZ46y5lgRRvrBaKayIiBqIys53XIPCPMZihgmBzMpQqPDoR4QA/4DexUh9IeXEFWC3etquiLV3H6r4AkNM= x-ms-office365-filtering-ht: Tenant X-MS-Office365-Filtering-Correlation-Id: 3e6b9763-8d43-4508-1fda-08d59db21c65 x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(48565401081)(5600026)(4604075)(3008032)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7193020);SRVR:DM5PR2101MB1110; x-ms-traffictypediagnostic: DM5PR2101MB1110: 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)(5005006)(8121501046)(93006095)(93001095)(3231221)(944501327)(52105095)(3002001)(10201501046)(6055026)(61426038)(61427038)(6041310)(20161123558120)(20161123562045)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(6072148)(201708071742011);SRVR:DM5PR2101MB1110;BCL:0;PCL:0;RULEID:;SRVR:DM5PR2101MB1110; x-forefront-prvs: 0637FCE711 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(39860400002)(39380400002)(346002)(396003)(376002)(366004)(199004)(189003)(53936002)(186003)(5250100002)(105586002)(11346002)(99286004)(476003)(66066001)(6512007)(86362001)(3660700001)(1076002)(54906003)(68736007)(110136005)(3280700002)(316002)(305945005)(4326008)(107886003)(22452003)(14454004)(7736002)(446003)(6666003)(2501003)(10290500003)(3846002)(6116002)(72206003)(106356001)(25786009)(6486002)(6436002)(8936002)(478600001)(5660300001)(86612001)(8676002)(81156014)(59450400001)(2906002)(102836004)(81166006)(6506007)(2900100001)(76176011)(2616005)(486006)(26005)(36756003)(10090500001)(97736004)(22906009)(217873001);DIR:OUT;SFP:1102;SCL:1;SRVR:DM5PR2101MB1110;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: ewy1JfafUdoVXgx5umgYqEJXqKbN5CGAAKYnsTEv03xVdB9o/TX9gjhw//DvL+Hl2ga7jbu/nytFqv3uzZpGD/7hM6CkYSqkjd6hAbQTg+IgvD5REh/Cs/5JI7bE70meZ2ZnKqAHIAAqUuwvJHC7KIPq8PvfIAT+72RzsFUXLopShprO1avr2B18FHocwLpGJ6Lk/Ur2ZOOh/GvDApDJ9rnLv1LoW+iBq7A0c88/BbS9047w92JEWiAsNjEVRAy0vNVAjgbUqscEgWFB0r36Td1+eItxaDPCUeXbCHrPb8zj/LG+HfYtktRwjTnBYkLKbPtUy7mRB+M9kf2pDROhqMdflPmu8l4SopQ+xQXxIkyqZPMPP2m/y0gfUcK7dbEDE83CHW0HaIcql/hsQ/KFnv4ucP3OrxqlF3Z+vSEuFQM= 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: 3e6b9763-8d43-4508-1fda-08d59db21c65 X-MS-Exchange-CrossTenant-originalarrivaltime: 09 Apr 2018 00:29:00.7241 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR2101MB1110 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 456c59c31c5126fe31c64956c43670060ea9debd ] 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 9a1091ef0017c ("irqchip: gic: Support hierarchy irq domain.") Cc: Yingjoe Chen Cc: Marc Zyngier Signed-off-by: Suzuki K Poulose Signed-off-by: Marc Zyngier Signed-off-by: Sasha Levin --- drivers/irqchip/irq-gic.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/irqchip/irq-gic.c b/drivers/irqchip/irq-gic.c index cebd8efe651a..c3ddd80d16e0 100644 --- a/drivers/irqchip/irq-gic.c +++ b/drivers/irqchip/irq-gic.c @@ -1023,8 +1023,11 @@ static int gic_irq_domain_alloc(struct irq_domain *d= omain, 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