Received: by 2002:a05:6358:5282:b0:b5:90e7:25cb with SMTP id g2csp3409100rwa; Tue, 23 Aug 2022 04:24:57 -0700 (PDT) X-Google-Smtp-Source: AA6agR7G0pQPBjMNgVE/gciVUHVvsSMA0F2ugKHUVTFPKIPQ1ePNcA6q1Wp72L8UUpn9eYgNNiRk X-Received: by 2002:a62:6347:0:b0:531:c5a7:b209 with SMTP id x68-20020a626347000000b00531c5a7b209mr24839598pfb.60.1661253896995; Tue, 23 Aug 2022 04:24:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661253896; cv=none; d=google.com; s=arc-20160816; b=Z3d50vBDZAyOhXHo72nBOjdkyFBET3duyGxnzuXUsxWCf43P2/caZGjKg/XC3d3UNf YD3gt69kBbRk1RUWztdUKvyZTtkEUV8P0y68iCq6Tfz+8mhb1lfC4he31pVzzEA6GNul LUQ+mM5iBF38nGimc8UBGILy2Chkd0VC5LYJ3Ko5BtdX0aU7pSblSZuLaJC1N6ZVlWSx n0gXTK3KKYGVfJ1s0wQivu6uOxkzvzOUentQRO/x1CkO7msbzHSCgJfJzTWXCvu29FIH ElLc6ndQ5rp7eyr++PLziW7tjo1x4VFN0prprj73eItU5/qXWhaPcRgRXqPKCTqINOPh GOWw== 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=t2UHoNgtgvYgHx94JP8TAZ9A2ar2uwpUS9P9qLZKMKs=; b=n8bjYRCjZVRFZuHiBfqswEJGXlcTw+sHW2kCrx1foELgajzWKcWYinmzcUkWBpwDq6 dK7e5GvaxsnOjXw7eI/gdBXEZ2wPJ8hQw0glxAEQOH/rMByKKGnQL+kbO1cCteWuYcGD uxypge59zMvc6Rxthr6kIDTDyLDBydhqYY2KApJ7Ik+h/XHm+KSz2iONlg4bbL00HOkq wJj2koab0/gVMnPxbJhTJpcftsm284OyA9QD9P52TCWruBxN9tpEypufkiK7NqY7Mi6r FWxFE4Vzr5XLc5aZ1uQFHYd8CdaJdLeRj8W7gcGfHzbJcTL8TFzZbIXrlTpLOmtxljkz 2l4g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=XP7+8gwU; 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 z13-20020a056a00240d00b0052b8a92ed84si16261789pfh.172.2022.08.23.04.24.45; Tue, 23 Aug 2022 04:24:56 -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=XP7+8gwU; 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 S1352451AbiHWKHk (ORCPT + 99 others); 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-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: 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/platforms/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 = &pnv_ioda1_iommu_ops; pe->table_group.tce32_start = tbl->it_offset << tbl->it_page_shift; pe->table_group.tce32_size = tbl->it_size << tbl->it_page_shift; + tbl->it_index = (phb->hose->global_number << 16) | pe->pe_number; if (!iommu_init_table(tbl, phb->hose->node, 0, 0)) panic("Failed to initialize iommu table"); @@ -1779,6 +1780,7 @@ static long pnv_pci_ioda2_setup_default_config(struct pnv_ioda_pe *pe) res_end = min(window_size, SZ_4G) >> tbl->it_page_shift; } + tbl->it_index = (pe->phb->hose->global_number << 16) | pe->pe_number; if (iommu_init_table(tbl, pe->phb->hose->node, res_start, res_end)) rc = pnv_pci_ioda2_set_window(&pe->table_group, 0, tbl); else -- 2.35.1