* [PATCH kernel] powerpc/ioda/iommu/debugfs: Generate unique debugfs entries
@ 2022-07-14 8:08 Alexey Kardashevskiy
2022-07-29 13:02 ` Michael Ellerman
0 siblings, 1 reply; 2+ messages in thread
From: Alexey Kardashevskiy @ 2022-07-14 8:08 UTC (permalink / raw)
To: linuxppc-dev; +Cc: Alexey Kardashevskiy
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 <aik@ozlabs.ru>
---
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.30.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH kernel] powerpc/ioda/iommu/debugfs: Generate unique debugfs entries
2022-07-14 8:08 [PATCH kernel] powerpc/ioda/iommu/debugfs: Generate unique debugfs entries Alexey Kardashevskiy
@ 2022-07-29 13:02 ` Michael Ellerman
0 siblings, 0 replies; 2+ messages in thread
From: Michael Ellerman @ 2022-07-29 13:02 UTC (permalink / raw)
To: Alexey Kardashevskiy, linuxppc-dev
On Thu, 14 Jul 2022 18:08:00 +1000, Alexey Kardashevskiy wrote:
> 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.
>
> [...]
Applied to powerpc/next.
[1/1] powerpc/ioda/iommu/debugfs: Generate unique debugfs entries
https://git.kernel.org/powerpc/c/d73b46c3c1449bf27f793b9d9ee86ed70c7a7163
cheers
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-07-29 13:11 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-07-14 8:08 [PATCH kernel] powerpc/ioda/iommu/debugfs: Generate unique debugfs entries Alexey Kardashevskiy
2022-07-29 13:02 ` Michael Ellerman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).