[PATCH 13/15] ppc/pseries: iommu cleanup
Grant Likely
grant.likely at secretlab.ca
Thu Sep 16 04:34:35 EST 2010
On Wed, Sep 15, 2010 at 12:05 PM, Nishanth Aravamudan <nacc at us.ibm.com> wrote:
> No need to initialize per-cpu pointer to NULL, it is the default.
>
> Direct dma ops and no setup are the defaults, no need to set for
> iommu-off.
>
> Signed-off-by: Milton Miller <miltonm at bga.com>
> Signed-off-by: Nishanth Aravamudan <nacc at us.ibm.com>
Also looks correct.
Reviewed-by: Grant Likely <grant.likely at secretlab.ca>
g.
> ---
> arch/powerpc/platforms/pseries/iommu.c | 9 ++-------
> 1 files changed, 2 insertions(+), 7 deletions(-)
>
> diff --git a/arch/powerpc/platforms/pseries/iommu.c b/arch/powerpc/platforms/pseries/iommu.c
> index a77bcae..9184db3 100644
> --- a/arch/powerpc/platforms/pseries/iommu.c
> +++ b/arch/powerpc/platforms/pseries/iommu.c
> @@ -140,7 +140,7 @@ static int tce_build_pSeriesLP(struct iommu_table *tbl, long tcenum,
> return ret;
> }
>
> -static DEFINE_PER_CPU(u64 *, tce_page) = NULL;
> +static DEFINE_PER_CPU(u64 *, tce_page);
>
> static int tce_buildmulti_pSeriesLP(struct iommu_table *tbl, long tcenum,
> long npages, unsigned long uaddr,
> @@ -589,13 +589,8 @@ static struct notifier_block iommu_reconfig_nb = {
> /* These are called very early. */
> void iommu_init_early_pSeries(void)
> {
> - if (of_chosen && of_get_property(of_chosen, "linux,iommu-off", NULL)) {
> - /* Direct I/O, IOMMU off */
> - ppc_md.pci_dma_dev_setup = NULL;
> - ppc_md.pci_dma_bus_setup = NULL;
> - set_pci_dma_ops(&dma_direct_ops);
> + if (of_chosen && of_get_property(of_chosen, "linux,iommu-off", NULL))
> return;
> - }
>
> if (firmware_has_feature(FW_FEATURE_LPAR)) {
> if (firmware_has_feature(FW_FEATURE_MULTITCE)) {
> --
> 1.7.0.4
>
>
--
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
More information about the Linuxppc-dev
mailing list