Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp2928003rwb; Mon, 15 Aug 2022 14:13:30 -0700 (PDT) X-Google-Smtp-Source: AA6agR7PzPyH2oZIvIEppO1ft2YdF86/3vmzsMRp4WqKZGWHiCbhkOGtiFV14McpDSkCrjpaQDjK X-Received: by 2002:a63:fb52:0:b0:419:cb1e:6e2 with SMTP id w18-20020a63fb52000000b00419cb1e06e2mr15433556pgj.356.1660598010100; Mon, 15 Aug 2022 14:13:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660598010; cv=none; d=google.com; s=arc-20160816; b=oawVV85vVWClegJ39J3qF2OY2uptdUg29O3TeQf/rCVupeHATdyPbM6H7z54SAaU9D 7MOmf6NRSXMSLVvmaSA6qQpQbNUf6scYOr9AroaFqiOdDVrVcsGd82MI3Ghrx/BDHbMa rBPo8OugpNNhvGhrWersp9MrOzgEAY2nqN5xpPtbolxHxLqw/vQ27ORm6yw7k1qmx2+H ynToB+D9NfDdTq80uUIcvUz4Vc8y6RUs5SzcN5Y4aFZp8vf/jpNqfjqTI//gKiJ4Fjn6 HYOUCTpsgRpXmRPZDEJBzucNYSBEdwK1XS8axFTkvUxiykKIXKbfFmy0qkgmwpRweYfc ieKg== 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=YBBE/WymYMd5hGgo+3TbvK/p/wmppunETOiHUR6JN73FuqFLK+SzeyUxFWNflJ6EjD 52Sx6h+Kb64YiUW4mTIGxYXpbpkG2LLAj/4UqR6VMsNgsqZbGZCzHUQ/smL2XomQJVtf coMKdzCPUeyHjr/VhO0fG+3dPUdsW35AbYv9tk3jm6VKiPW9FcnBYWOdh6FpSSdQFjfu bnFb/vCXXT14+K4Baa4cvMU2/lmHG7puiuYxKBX+uiU4lJXCA0svGahlupxxjUiZk40B 150R17dBAIzeZpnKyAwvKwCuVNh5NC9WCkyis6VuQyPcMF11h6AQ9yHkBpmAfNvupeYX hZJQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=oWI+EoLd; 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 ij19-20020a170902ab5300b0016d856c7ce7si10295059plb.407.2022.08.15.14.13.18; Mon, 15 Aug 2022 14:13:30 -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=oWI+EoLd; 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 S1346286AbiHOUsE (ORCPT + 99 others); Mon, 15 Aug 2022 16:48:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36336 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346890AbiHOUqs (ORCPT ); Mon, 15 Aug 2022 16:46:48 -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 A6C6BB72B0; Mon, 15 Aug 2022 12:08:44 -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 9F2E160B0F; Mon, 15 Aug 2022 19:08:43 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 593CFC433C1; Mon, 15 Aug 2022 19:08:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660590523; bh=N9TJ94ZoPUoNsloQHfrpn0GyEU2bxkyC7I82FkaGEUI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=oWI+EoLdVadgnG349ZNHflt2Q8QNiagpJ3UmorDedCRm5cJdF61OMYjMy3j0nvzlE Nyd+M6yUGEW/xdI8bkJ0OOx1JP/Gol1aiq9BdhE7lbvaB4j58PWcJFuOxpdcsVKbPN ywQAaOh3Wie+1tAOnbo19OueRgzFpEcrNGUQrCx8= 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.18 0286/1095] irqdomain: Report irq number for NOMAP domains Date: Mon, 15 Aug 2022 19:54:45 +0200 Message-Id: <20220815180441.621576748@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220815180429.240518113@linuxfoundation.org> References: <20220815180429.240518113@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