From: Saeed Mahameed <sae...@mellanox.com> Date: Thu, 25 Feb 2016 18:33:19 +0200
> @@ -246,11 +246,11 @@ int mlx5_alloc_map_uar(struct mlx5_core_dev *mdev, > struct mlx5_uar *uar) > err = -ENOMEM; > goto err_free_uar; > } > - > - if (mdev->priv.bf_mapping) > - uar->bf_map = io_mapping_map_wc(mdev->priv.bf_mapping, > - uar->index << PAGE_SHIFT); > - > +#ifdef ARCH_HAS_IOREMAP_WC > + uar->bf_map = ioremap_wc(pfn << PAGE_SHIFT, PAGE_SIZE); > + if (!uar->bf_map) > + mlx5_core_warn(mdev, "ioremap_wc() failed\n"); > +#endif Sorry, this looks very wrong to me. It makes no sense to only map this resource if ARCH_HAS_IOREMAP_WC defined. The interface _always_ exists, and ARCH_HAS_IOREMAP_WC is an internal symbol that include/asm-generic/iomap.h uses to determine whether to provide a generic implementation of the interface or not. I'm not applying this series until you either fix or explain what you are doing here in the commit message. Thanks.