Re: [PATCH v2] iommu/qcom: Fix local_base status check

2020-04-19 Thread Markus Elfring
> The function qcom_iommu_device_probe() does not perform sufficient > error checking after executing devm_ioremap_resource(), which can > result in crashes if a critical error path is encountered. Your update suggestion will be rechecked once more. * Can it be that the patch would need a higher

Re: [PATCH 3/4] dma-mapping: add a dma_ops_bypass flag to struct device

2020-04-19 Thread Christoph Hellwig
On Sat, Apr 18, 2020 at 02:42:05PM +0200, Joerg Roedel wrote: > Hi Christoph, > > On Tue, Apr 14, 2020 at 02:25:05PM +0200, Christoph Hellwig wrote: > > +static inline bool dma_map_direct(struct device *dev, > > + const struct dma_map_ops *ops) > > +{ > > + if (likely(!ops)) > > +

Re: [PATCH 3/4] dma-mapping: add a dma_ops_bypass flag to struct device

2020-04-19 Thread Joerg Roedel
On Sun, Apr 19, 2020 at 10:00:58AM +0200, Christoph Hellwig wrote: > The difference is that NULL ops mean imply the direct mapping is always > used, dma_ops_bypass means a direct mapping is used if no bounce buffering > using swiotlb is needed, which should also answer your first question. > The

Re: [PATCH v2] iommu/qcom: Fix local_base status check

2020-04-19 Thread Markus Elfring
> … >> +++ b/drivers/iommu/qcom_iommu.c >> @@ -813,8 +813,11 @@ static int qcom_iommu_device_probe(struct >> platform_device *pdev) >> qcom_iommu->dev = dev; >> >> res = platform_get_resource(pdev, IORESOURCE_MEM, 0); … >> qcom_iommu->local_base = devm_ioremap_resource(dev,

Re: [PATCH v2] of_device: removed #include that caused a recursion in included headers

2020-04-19 Thread Stephen Boyd
Quoting Hadar Gat (2020-04-16 02:49:03) > Both of_platform.h and of_device.h were included each other. > In of_device.h, removed unneeded #include to of_platform.h > and added include to of_platform.h in the files that needs it. > > Signed-off-by: Hadar Gat > --- Acked-by: Stephen Boyd # clk

Re: [PATCH 3/4] dma-mapping: add a dma_ops_bypass flag to struct device

2020-04-19 Thread Alexey Kardashevskiy
On 19/04/2020 22:25, Joerg Roedel wrote: > On Sun, Apr 19, 2020 at 10:00:58AM +0200, Christoph Hellwig wrote: >> The difference is that NULL ops mean imply the direct mapping is always >> used, dma_ops_bypass means a direct mapping is used if no bounce buffering >> using swiotlb is needed,

Re: [PATCH v2]iommu/qcom:fix local_base status check

2020-04-19 Thread Bjorn Andersson
On Sat 18 Apr 06:47 PDT 2020, Tang Bin wrote: > The function qcom_iommu_device_probe() does not perform sufficient > error checking after executing devm_ioremap_resource(), which can > result in crashes if a critical error path is encountered. > Thanks, that's much better. Reviewed-by: Bjorn

Re: [RFC PATCH] iommu/amd: fix a race in fetch_pte()

2020-04-19 Thread Qian Cai
> On Apr 18, 2020, at 2:34 PM, Joerg Roedel wrote: > > On Sat, Apr 18, 2020 at 09:01:35AM -0400, Qian Cai wrote: >> Hard to tell without testing further. I’ll leave that optimization in >> the future, and focus on fixing those races first. > > Yeah right, we should fix the existing races

Re: [PATCH] iommu: spapr_tce: Disable compile testing to fix build on book3s_32 config

2020-04-19 Thread Michael Ellerman
Christophe Leroy writes: > On 04/14/2020 02:26 PM, Krzysztof Kozlowski wrote: >> Although SPAPR_TCE_IOMMU itself can be compile tested on certain PowerPC >> configurations, its presence makes arch/powerpc/kvm/Makefile to select >> modules which do not build in such configuration. >> >> The