Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp2887596rwb; Mon, 15 Aug 2022 13:20:37 -0700 (PDT) X-Google-Smtp-Source: AA6agR7rMjq2MuNCPwXFTa0uTNlxFYk9gFskJjotk4/y/zjG1tVmDcnaXxie1A2jeHSocMoidq1z X-Received: by 2002:a05:6402:34c6:b0:43d:8cea:76c0 with SMTP id w6-20020a05640234c600b0043d8cea76c0mr16403149edc.268.1660594717941; Mon, 15 Aug 2022 13:18:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660594717; cv=none; d=google.com; s=arc-20160816; b=HmVxfzhXlvj73Em5y1gMMM7VUnByqAq0+fffv45Xv/ajwgy26tZxUSV2Yjgvhqt/Yg 6UAxQjQQKyDx972uLyXOJeieLbY56TCcl6ynujI+o/KKjOjt0u1OSs4Xhn/kUdgloh16 pTv+EVJvklAFKvgKHbIGesjtiKOw0isFdz7qBw6GWnn6V3Ny/5D5/cltprLetrLFaNWn KURjT1zWbMz73GgSk1Gt8mE+Um3MAAnIdLpxLikHhA0b8hLrrNb6iSFrKlJZ4ZTIfvJQ bl6tYgf72Cs8DV5Zc9PeE73NndyFXHcoqKO9sPyffSH2Byg/qrf0o/QRDmingw+LmcBS 8kHQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=8MCmT24HZPrSicEHKiJcr54h2/B44bdOkIq0hFm0+24=; b=BbkLwRTdJZYkNjfxfOdKR7Gi4IhG1oDLC0ihoW+5H5tOZeOTk47MVCDgKfSgFtj1TQ 6Q2b83lojooWM2i9Bc7rWSvd8PgQGVE59xxBo+ILcQ/zAOrA4QJP8YWvr5uTBw6z7RMU bxL0D+zUV37mYDRt0t7EpH6KD1RrsjUXdg9Dse7Ylygyaw10TKppKMfVXZQrIPuVDzPJ Q4pM7HhR6pYEnNrJ9ECP0WNSpVf/ciu7uw3BXlFptUkHqQz/Vlmy+taK5bugyC3DKnB2 Sx7DnGItz1vaRArQvcnEtYV3IOMWT41lacZed3cwDqj5GkKqSwi4+OZNePBpBZWKe+ZE cPmQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=pa53CDpH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n12-20020a05640205cc00b0043da63439c0si10074461edx.239.2022.08.15.13.18.12; Mon, 15 Aug 2022 13:18:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=pa53CDpH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232009AbiHOSsL (ORCPT + 99 others); Mon, 15 Aug 2022 14:48:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38144 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242868AbiHOSnF (ORCPT ); Mon, 15 Aug 2022 14:43:05 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4A21C2A7; Mon, 15 Aug 2022 11:26:37 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id DC47760FC4; Mon, 15 Aug 2022 18:26:36 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D41C1C433C1; Mon, 15 Aug 2022 18:26:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660587996; bh=2U69VoSm4UpXK3h1vY5AEo5exNg8mkLjEbQ48eUiu1I=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=pa53CDpHF4y0KZvcvBKS+S8q1HS4WJwn2MQkXTqhImIiNsP8q4L2Y2IGgzUJbI7/T d8snWy6KL2TV6WamgXq100KhCw4aAU6pVxwu/UN41h6LaBCwoE/zrVkBYroaHpHvuy sBhjgbepsB66PcuqEcU7XEBvvCICcpgtfX9OGS24= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Xu Qiang , Marc Zyngier , Sasha Levin Subject: [PATCH 5.15 221/779] irqdomain: Report irq number for NOMAP domains Date: Mon, 15 Aug 2022 19:57:45 +0200 Message-Id: <20220815180346.730050414@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220815180337.130757997@linuxfoundation.org> References: <20220815180337.130757997@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Xu Qiang [ Upstream commit 6f194c99f466147148cc08452718b46664112548 ] When using a NOMAP domain, __irq_resolve_mapping() doesn't store the Linux IRQ number at the address optionally provided by the caller. While this isn't a huge deal (the returned value is guaranteed to the hwirq that was passed as a parameter), let's honour the letter of the API by writing the expected value. Fixes: d22558dd0a6c (“irqdomain: Introduce irq_resolve_mapping()”) Signed-off-by: Xu Qiang [maz: commit message] Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20220719063641.56541-2-xuqiang36@huawei.com Signed-off-by: Sasha Levin --- kernel/irq/irqdomain.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/kernel/irq/irqdomain.c b/kernel/irq/irqdomain.c index 4d8fc65cf38f..035e3038c4de 100644 --- a/kernel/irq/irqdomain.c +++ b/kernel/irq/irqdomain.c @@ -910,6 +910,8 @@ struct irq_desc *__irq_resolve_mapping(struct irq_domain *domain, data = irq_domain_get_irq_data(domain, hwirq); if (data && data->hwirq == hwirq) desc = irq_data_to_desc(data); + if (irq && desc) + *irq = hwirq; } return desc; -- 2.35.1