Skip to content

Commit be8b490

Browse files
author
Fox Snowpatch
committed
1 parent 1ecdccb commit be8b490

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

arch/powerpc/kernel/iommu.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -687,7 +687,7 @@ void iommu_table_clear(struct iommu_table *tbl)
687687
void iommu_table_reserve_pages(struct iommu_table *tbl,
688688
unsigned long res_start, unsigned long res_end)
689689
{
690-
int i;
690+
unsigned long i;
691691

692692
WARN_ON_ONCE(res_end < res_start);
693693
/*

arch/powerpc/platforms/pseries/iommu.c

+6-3
Original file line numberDiff line numberDiff line change
@@ -1650,7 +1650,8 @@ static bool enable_ddw(struct pci_dev *dev, struct device_node *pdn)
16501650
iommu_table_setparms_common(newtbl, pci->phb->bus->number, create.liobn,
16511651
dynamic_addr, dynamic_len, page_shift, NULL,
16521652
&iommu_table_lpar_multi_ops);
1653-
iommu_init_table(newtbl, pci->phb->node, start, end);
1653+
iommu_init_table(newtbl, pci->phb->node,
1654+
start >> page_shift, end >> page_shift);
16541655

16551656
pci->table_group->tables[default_win_removed ? 0 : 1] = newtbl;
16561657

@@ -2065,7 +2066,9 @@ static long spapr_tce_create_table(struct iommu_table_group *table_group, int nu
20652066
offset, 1UL << window_shift,
20662067
IOMMU_PAGE_SHIFT_4K, NULL,
20672068
&iommu_table_lpar_multi_ops);
2068-
iommu_init_table(tbl, pci->phb->node, start, end);
2069+
iommu_init_table(tbl, pci->phb->node,
2070+
start >> IOMMU_PAGE_SHIFT_4K,
2071+
end >> IOMMU_PAGE_SHIFT_4K);
20692072

20702073
table_group->tables[0] = tbl;
20712074

@@ -2136,7 +2139,7 @@ static long spapr_tce_create_table(struct iommu_table_group *table_group, int nu
21362139
/* New table for using DDW instead of the default DMA window */
21372140
iommu_table_setparms_common(tbl, pci->phb->bus->number, create.liobn, win_addr,
21382141
1UL << len, page_shift, NULL, &iommu_table_lpar_multi_ops);
2139-
iommu_init_table(tbl, pci->phb->node, start, end);
2142+
iommu_init_table(tbl, pci->phb->node, start >> page_shift, end >> page_shift);
21402143

21412144
pci->table_group->tables[num] = tbl;
21422145
set_iommu_table_base(&pdev->dev, tbl);

0 commit comments

Comments
 (0)