Skip to content

Commit

Permalink
Automatic merge of 'next' into merge (2025-01-13 18:04)
Browse files Browse the repository at this point in the history
  • Loading branch information
maddy-kerneldev committed Jan 13, 2025
2 parents df6c128 + 2bf66e6 commit 9295162
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 30 deletions.
2 changes: 1 addition & 1 deletion arch/powerpc/kernel/iommu.c
Original file line number Diff line number Diff line change
Expand Up @@ -687,7 +687,7 @@ void iommu_table_clear(struct iommu_table *tbl)
void iommu_table_reserve_pages(struct iommu_table *tbl,
unsigned long res_start, unsigned long res_end)
{
int i;
unsigned long i;

WARN_ON_ONCE(res_end < res_start);
/*
Expand Down
39 changes: 14 additions & 25 deletions arch/powerpc/kernel/prom_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -2792,7 +2792,6 @@ static void __init flatten_device_tree(void)
dt_struct_start, dt_struct_end);
}

#ifdef CONFIG_PPC_CHRP
/*
* Pegasos and BriQ lacks the "ranges" property in the isa node
* Pegasos needs decimal IRQ 14/15, not hexadecimal
Expand Down Expand Up @@ -2843,11 +2842,7 @@ static void __init fixup_device_tree_chrp(void)
}
}
}
#else
#define fixup_device_tree_chrp()
#endif

#if defined(CONFIG_PPC64) && defined(CONFIG_PPC_PMAC)
static void __init fixup_device_tree_pmac64(void)
{
phandle u3, i2c, mpic;
Expand Down Expand Up @@ -2887,11 +2882,7 @@ static void __init fixup_device_tree_pmac64(void)
prom_setprop(i2c, "/u3@0,f8000000/i2c@f8001000", "interrupt-parent",
&parent, sizeof(parent));
}
#else
#define fixup_device_tree_pmac64()
#endif

#ifdef CONFIG_PPC_PMAC
static void __init fixup_device_tree_pmac(void)
{
__be32 val = 1;

Check warning on line 2888 in arch/powerpc/kernel/prom_init.c

View workflow job for this annotation

GitHub Actions / sparse (pmac32, fedora-40, ppc64)

incorrect type in initializer (different base types)

Check warning on line 2888 in arch/powerpc/kernel/prom_init.c

View workflow job for this annotation

GitHub Actions / sparse (ppc64le, ppc64le, fedora-40)

incorrect type in initializer (different base types)

Check warning on line 2888 in arch/powerpc/kernel/prom_init.c

View workflow job for this annotation

GitHub Actions / sparse (ppc64, fedora-40, ppc64)

incorrect type in initializer (different base types)
Expand All @@ -2911,11 +2902,7 @@ static void __init fixup_device_tree_pmac(void)
prom_setprop(node, NULL, "#size-cells", &val, sizeof(val));
}
}
#else
static inline void fixup_device_tree_pmac(void) { }
#endif

#ifdef CONFIG_PPC_EFIKA
/*
* The MPC5200 FEC driver requires an phy-handle property to tell it how
* to talk to the phy. If the phy-handle property is missing, then this
Expand Down Expand Up @@ -3047,11 +3034,7 @@ static void __init fixup_device_tree_efika(void)
/* Make sure ethernet phy-handle property exists */
fixup_device_tree_efika_add_phy();
}
#else
#define fixup_device_tree_efika()
#endif

#ifdef CONFIG_PPC_PASEMI_NEMO
/*
* CFE supplied on Nemo is broken in several ways, biggest
* problem is that it reassigns ISA interrupts to unused mpic ints.
Expand Down Expand Up @@ -3127,17 +3110,23 @@ static void __init fixup_device_tree_pasemi(void)

prom_setprop(iob, name, "device_type", "isa", sizeof("isa"));
}
#else /* !CONFIG_PPC_PASEMI_NEMO */
static inline void fixup_device_tree_pasemi(void) { }
#endif

static void __init fixup_device_tree(void)
{
fixup_device_tree_chrp();
fixup_device_tree_pmac();
fixup_device_tree_pmac64();
fixup_device_tree_efika();
fixup_device_tree_pasemi();
if (IS_ENABLED(CONFIG_PPC_CHRP))
fixup_device_tree_chrp();

if (IS_ENABLED(CONFIG_PPC_PMAC))
fixup_device_tree_pmac();

if (IS_ENABLED(CONFIG_PPC_PMAC) && IS_ENABLED(CONFIG_PPC64))
fixup_device_tree_pmac64();

if (IS_ENABLED(CONFIG_PPC_EFIKA))
fixup_device_tree_efika();

if (IS_ENABLED(CONFIG_PPC_PASEMI_NEMO))
fixup_device_tree_pasemi();
}

static void __init prom_find_boot_cpu(void)
Expand Down
9 changes: 6 additions & 3 deletions arch/powerpc/platforms/pseries/iommu.c
Original file line number Diff line number Diff line change
Expand Up @@ -1650,7 +1650,8 @@ static bool enable_ddw(struct pci_dev *dev, struct device_node *pdn)
iommu_table_setparms_common(newtbl, pci->phb->bus->number, create.liobn,
dynamic_addr, dynamic_len, page_shift, NULL,
&iommu_table_lpar_multi_ops);
iommu_init_table(newtbl, pci->phb->node, start, end);
iommu_init_table(newtbl, pci->phb->node,
start >> page_shift, end >> page_shift);

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

Expand Down Expand Up @@ -2065,7 +2066,9 @@ static long spapr_tce_create_table(struct iommu_table_group *table_group, int nu
offset, 1UL << window_shift,
IOMMU_PAGE_SHIFT_4K, NULL,
&iommu_table_lpar_multi_ops);
iommu_init_table(tbl, pci->phb->node, start, end);
iommu_init_table(tbl, pci->phb->node,
start >> IOMMU_PAGE_SHIFT_4K,
end >> IOMMU_PAGE_SHIFT_4K);

table_group->tables[0] = tbl;

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

pci->table_group->tables[num] = tbl;
set_iommu_table_base(&pdev->dev, tbl);
Expand Down
2 changes: 1 addition & 1 deletion tools/testing/selftests/powerpc/benchmarks/gettimeofday.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ static int test_gettimeofday(void)
gettimeofday(&tv_end, NULL);
}

timersub(&tv_start, &tv_end, &tv_diff);
timersub(&tv_end, &tv_start, &tv_diff);

printf("time = %.6f\n", tv_diff.tv_sec + (tv_diff.tv_usec) * 1e-6);

Expand Down

0 comments on commit 9295162

Please sign in to comment.