Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp3027848rwb; Mon, 15 Aug 2022 16:26:14 -0700 (PDT) X-Google-Smtp-Source: AA6agR4Y/cIhXyj6uCTSs6mcVL1+E6k6NUGFBkNyrV60ekHAG4SXEp1t0pa3oSj51jst7qye5XMb X-Received: by 2002:a05:6402:5008:b0:440:941a:93c3 with SMTP id p8-20020a056402500800b00440941a93c3mr16498611eda.47.1660605974392; Mon, 15 Aug 2022 16:26:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660605974; cv=none; d=google.com; s=arc-20160816; b=XzJdvP3nDA6ooG7OYZQ2dPOWWoP1MH89ARlJK5yzswFFFfiybodD9XCIAHU6Ou64eh +YvuxU0M2tnqT1O/CVAk0EeyFZpPvBJlR+c/lgOhpwQdBnxNtjBbOH4xWKu0lyvM6c+1 DUV0jHSVDUvDLNSj1xWvfnVmUWSlzFfaZRjPTrCnkEgvIZwL5CQqeXrjCqHa/FVfBeJu Bth5LrfQ1QUVs4ntL7KWBRAFS6PINPpBIhP9EoNcwN9d5877mnH6CO68IfO+vbkSaww/ zSiTyf2fWUtCUnfYaSYgLkul7FGys7+rFEbvlGly9aptHfX+6k9uurzuf8wj2PfQZqvJ KfIw== 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=t7HEQe3Ckjw7oI0EaMYJcA6RFUH54UW1EGrtSnGHw54=; b=STy3hH794ZaSeIHpLS6Yf54wy82W/65Z5I5hzbv4NgiMmRr7LBBEs9Jwhaj7Yobe1w /5KOuMxy51yQeBLkeuNFEduQ5QZbDSFckWlIIiJTcnk1IzUfbrbO0F39aq0UwNl5s1UO mDyHhh3S8FSD+gCOwrTar8N6AIg/GBOpg9/MmvEQV8kHcH756VT8FYHfP5SSCx3AkSuc ozQZo8JfKU95R0TiMMsf3u41YbDIMXFDh7pnfB1xu3hJ+BImzkpkrGdnv8r/sB1rd0T5 IZ3P3m+sy7p6sMsu3VWpiKsiVJa4UEjTNrs4uTWY6M3SND/i40BbTotGCq3XEo2UMvZx iAhg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Age8BI9r; 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 jv22-20020a170907769600b007307f95bc5dsi7460850ejc.383.2022.08.15.16.25.48; Mon, 15 Aug 2022 16:26:14 -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=Age8BI9r; 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 S1347931AbiHOXIt (ORCPT + 99 others); Mon, 15 Aug 2022 19:08:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59936 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1353070AbiHOXHH (ORCPT ); Mon, 15 Aug 2022 19:07:07 -0400 Received: from sin.source.kernel.org (sin.source.kernel.org [IPv6:2604:1380:40e1:4800::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A2BA286730; Mon, 15 Aug 2022 12:59:10 -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 sin.source.kernel.org (Postfix) with ESMTPS id 090C8CE12C1; Mon, 15 Aug 2022 19:59:09 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0EECBC433D6; Mon, 15 Aug 2022 19:59:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660593547; bh=N9TJ94ZoPUoNsloQHfrpn0GyEU2bxkyC7I82FkaGEUI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Age8BI9rsFZdRfFRoWWw+w7x1X2FV9anAzkbtiD2wcU7b39F49XTbhBRIL/iwEttg l7Czhx70Em5FADiPzIo2oEhgB8BesuIuiM2oMEWQlFVt/6NAbCoWg625bkWApVkdsB doeFA9VB/Rl+TyjfuBReQlWujiO2J8DiTtL3WTeQ= 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.19 0286/1157] irqdomain: Report irq number for NOMAP domains Date: Mon, 15 Aug 2022 19:54:02 +0200 Message-Id: <20220815180451.059458446@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220815180439.416659447@linuxfoundation.org> References: <20220815180439.416659447@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 d5ce96510549..481abb885d61 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