Received: by 2002:a05:6358:5282:b0:b5:90e7:25cb with SMTP id g2csp3469242rwa; Tue, 23 Aug 2022 05:23:54 -0700 (PDT) X-Google-Smtp-Source: AA6agR4OTpzsmKvMyj36miMbhXat6PNOiJAaaBUtEOVf5z+nd+N1q5CyVz5G2cdHcmFIaxBwYxmp X-Received: by 2002:a65:6d9a:0:b0:42a:e3d2:e783 with SMTP id bc26-20020a656d9a000000b0042ae3d2e783mr3212729pgb.386.1661257433920; Tue, 23 Aug 2022 05:23:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661257433; cv=none; d=google.com; s=arc-20160816; b=bLNfbtn3DRz+4RN1CKvkynXMmbci6Xo1vWleaL6vE2H2nNF2zrfMAa8wV1Xo1JSUS3 au9Zrhp5XyE8nwmAU4CefNmRCTxRRlGqK4yE2ZL/sVm0nWH2OtNWoYpaBz0CJrGuRtqi xm4xbuImffY8BiscwT1uCdwjV+ayOdWmy2TIgydHl/B4uuwwwGi4ZetPd+5kFSEHBtIP lJhKGew/2j01o44QrbpvINdCT939JdcKVf9Y1JxHMDDPiYr9HYEKsZwfDuGVzHBWWdxU eEkBCNlqgq+9/WjC1UmxDvNikICqELjR8Vpu1EiiNJlizGeTQI1nIE3kB3PFpy5txZUs pIkQ== 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=vDxhXDLJ8gaRBE1Ly5tDONGfP0i902ZixZb2zXoKI+k=; b=vHCZxqSQx72V3h3SlUOwvw+gL3VVCngWhtzixmihntFO/L08WhROeSx6hlH02hJKxj ac4vChmoNgy0tydoOlrsqyWcbjCgRuaHzr9F13gVVtQHhmg8nPtw5/+ielDdc6e4quu5 gUg8KccH4TNa/9QPBpO+iw4S8WzmV4f8b2ZRuL5UoN0FdOi6tId1sxv+meC8ef7OAF50 RKfS9Jm+y1qkGJcJi8x7yAys0oIuNZTxD+SubXYxQawv8rBLSdVcUlYSJgn8hjFeirwW lTNTWVrwhmv0NSg9OH9SYWYRH8H8g4Nb83WHME9X9waPChQCPqvlDQaoCl7QnyhP7K/h iWgg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=pDxLTLqM; 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 m17-20020a63fd51000000b0041a680d2831si13909601pgj.488.2022.08.23.05.23.42; Tue, 23 Aug 2022 05:23:53 -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=pDxLTLqM; 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 S1354390AbiHWK1p (ORCPT + 99 others); Tue, 23 Aug 2022 06:27:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60584 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1353936AbiHWKMT (ORCPT ); Tue, 23 Aug 2022 06:12:19 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 77A183B971; Tue, 23 Aug 2022 01:58:41 -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 39AE061524; Tue, 23 Aug 2022 08:58:41 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3B11CC433D7; Tue, 23 Aug 2022 08:58:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1661245120; bh=OTSD7ywY2HK6ow9eX5qqDkg99TBGdb+FkpGHMngwSc8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=pDxLTLqMvwap0EWj+Li01eBMEadv1hAXpCLhMwjGvmHD5HdLpTGCoyJqkbaIHi6+7 Fk6Jj9Ojiwl6mc+pP/ZJbKQASsNWctzlzVwJexkYG1s7iqSrXY95VaSyxYEgAw7wUe MCPQ60wcD0dhsa1HaTqE7aTMrmqZo9d6gSL+SL2M= 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.15 223/244] powerpc/ioda/iommu/debugfs: Generate unique debugfs entries Date: Tue, 23 Aug 2022 10:26:22 +0200 Message-Id: <20220823080106.985731897@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220823080059.091088642@linuxfoundation.org> References: <20220823080059.091088642@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 3dd35c327d1c..624822a81019 100644 --- a/arch/powerpc/platforms/powernv/pci-ioda.c +++ b/arch/powerpc/platforms/powernv/pci-ioda.c @@ -1618,6 +1618,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"); @@ -1788,6 +1789,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