From nobody Thu Dec 18 13:07:57 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D4020C32772 for ; Tue, 23 Aug 2022 10:07:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1352460AbiHWKHk (ORCPT ); Tue, 23 Aug 2022 06:07:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45178 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1352430AbiHWKBx (ORCPT ); Tue, 23 Aug 2022 06:01:53 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7E4357C1C3; Tue, 23 Aug 2022 01:49:42 -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 ams.source.kernel.org (Postfix) with ESMTPS id 7BA2FB81C4C; Tue, 23 Aug 2022 08:34:30 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B2DD1C433D6; Tue, 23 Aug 2022 08:34:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1661243669; bh=t0TSqAFuhyH1+CMJ7UbBnSE+KHqu5QO/EWY90mPSeHY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=XP7+8gwUK+RlQ2syisO10kgb1tEsOGEEzUmfmF9BqL+gxersn460Fc7bOkFAyHVdS 4yhfjEvV1FlNaebmIYF1SEdYWwOQpGMVJa92YflI5eYMDUy6uTmq1ePzTkYohW2u1F 6V9p9sVvVagBwFFK2kIoglQ/WaszmlurbV1QoUXA= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Alexey Kardashevskiy , Michael Ellerman , Sasha Levin Subject: [PATCH 5.19 350/365] powerpc/ioda/iommu/debugfs: Generate unique debugfs entries Date: Tue, 23 Aug 2022 10:04:11 +0200 Message-Id: <20220823080132.903219215@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220823080118.128342613@linuxfoundation.org> References: <20220823080118.128342613@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Alexey Kardashevskiy [ Upstream commit d73b46c3c1449bf27f793b9d9ee86ed70c7a7163 ] The iommu_table::it_index is a LIOBN which is not initialized on PowerNV as it is not used except IOMMU debugfs where it is used for a node name. This initializes it_index witn a unique number to avoid warnings and have a node for every iommu_table. This should not cause any behavioral change without CONFIG_IOMMU_DEBUGFS. Signed-off-by: Alexey Kardashevskiy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20220714080800.3712998-1-aik@ozlabs.ru Signed-off-by: Sasha Levin --- arch/powerpc/platforms/powernv/pci-ioda.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/powerpc/platforms/powernv/pci-ioda.c b/arch/powerpc/platf= orms/powernv/pci-ioda.c index c8cf2728031a..9de9b2fb163d 100644 --- a/arch/powerpc/platforms/powernv/pci-ioda.c +++ b/arch/powerpc/platforms/powernv/pci-ioda.c @@ -1609,6 +1609,7 @@ static void pnv_pci_ioda1_setup_dma_pe(struct pnv_phb= *phb, tbl->it_ops =3D &pnv_ioda1_iommu_ops; pe->table_group.tce32_start =3D tbl->it_offset << tbl->it_page_shift; pe->table_group.tce32_size =3D tbl->it_size << tbl->it_page_shift; + tbl->it_index =3D (phb->hose->global_number << 16) | pe->pe_number; if (!iommu_init_table(tbl, phb->hose->node, 0, 0)) panic("Failed to initialize iommu table"); =20 @@ -1779,6 +1780,7 @@ static long pnv_pci_ioda2_setup_default_config(struct= pnv_ioda_pe *pe) res_end =3D min(window_size, SZ_4G) >> tbl->it_page_shift; } =20 + tbl->it_index =3D (pe->phb->hose->global_number << 16) | pe->pe_number; if (iommu_init_table(tbl, pe->phb->hose->node, res_start, res_end)) rc =3D pnv_pci_ioda2_set_window(&pe->table_group, 0, tbl); else --=20 2.35.1