Re: [PATCH] dma-mapping: clear mark DMA ops as an architecture feature

2024-08-27 Thread Robin Murphy
nfusion from drivers/iommu is no more, I too thoroughly approve of the overall idea. Acked-by: Robin Murphy

Re: [PATCH v6] numa: make node_to_cpumask_map() NUMA_NO_NODE aware

2019-10-09 Thread Robin Murphy
On 2019-10-08 9:38 am, Yunsheng Lin wrote: On 2019/9/25 18:41, Peter Zijlstra wrote: On Wed, Sep 25, 2019 at 05:14:20PM +0800, Yunsheng Lin wrote: From the discussion above, It seems making the node_to_cpumask_map() NUMA_NO_NODE aware is the most feasible way to move forwad. That's still wro

Re: [PATCH 01/23] dma-mapping: provide a generic DMA_MAPPING_ERROR

2018-12-04 Thread Robin Murphy
difference though, so either way, Reviewed-by: Robin Murphy

Re: [PATCH v2 03/20] perf/core: add PERF_PMU_CAP_EXCLUDE for exclusion capable PMUs

2018-11-26 Thread Robin Murphy
Hi Andrew, On 26/11/2018 11:12, Andrew Murray wrote: Many PMU drivers do not have the capability to exclude counting events that occur in specific contexts such as idle, kernel, guest, etc. These drivers indicate this by returning an error in their event_init upon testing the events attribute fl

Re: remove the ->mapping_error method from dma_map_ops V2

2018-11-22 Thread Robin Murphy
On 22/11/2018 17:09, Linus Torvalds wrote: On Thu, Nov 22, 2018 at 9:07 AM Russell King - ARM Linux wrote: I'm afraid that won't work very well - 32 bit platforms with 64-bit addresses (LPAE) would have dma_addr_t as a 64-bit value, which wouldn't fit into an unsigned long. Good point. So we

Re: [PATCH 1/2] dma-mapping: remove ->mapping_error

2018-11-09 Thread Robin Murphy
On 09/11/2018 08:46, Christoph Hellwig wrote: [...] diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c index 1167ff0416cf..cfb422e17049 100644 --- a/drivers/iommu/amd_iommu.c +++ b/drivers/iommu/amd_iommu.c @@ -55,8 +55,6 @@ #include "amd_iommu_types.h" #include "irq_remapping

Re: [PATCH 3/3] dma-debug: unexport dma_debug_resize_entries and debug_dma_dump_mappings

2018-05-08 Thread Robin Murphy
f low-level dma-debug internals *only* called by a couple of IOMMU drivers, but that can wait for another day. Reviewed-by: Robin Murphy Signed-off-by: Christoph Hellwig --- lib/dma-debug.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/lib/dma-debug.c b/lib/dma-debug.c index 075253c

Re: [PATCH 4/3] dma-debug: remove CONFIG_HAVE_DMA_API_DEBUG

2018-05-08 Thread Robin Murphy
On 27/04/18 16:53, Christoph Hellwig wrote: There is no arch specific code required for dma-debug, so there is no need to opt into the support either. Makes sense, and a purely negative diffstat is always pleasing :) Reviewed-by: Robin Murphy Signed-off-by: Christoph Hellwig --- .../io

Re: [PATCH 2/3] dma-debug: simplify counting of preallocated requests

2018-05-08 Thread Robin Murphy
On 24/04/18 15:02, Christoph Hellwig wrote: Just keep a single variable with a descriptive name instead of two with confusing names. Reviewed-by: Robin Murphy Signed-off-by: Christoph Hellwig --- lib/dma-debug.c | 20 1 file changed, 4 insertions(+), 16 deletions

Re: [PATCH 1/3] dma-debug: move initialization to common code

2018-05-08 Thread Robin Murphy
as a core_initcall, which for many architectures means much earlier, and provides dma-debug functionality earlier in the boot process. This should be safe as it only relies on the memory allocator already being available. Reviewed-by: Robin Murphy Signed-off-by: Christoph Hellwig --- arch/arm/m

Re: [PATCH 01/22] dma-debug: move initialization to common code

2018-04-20 Thread Robin Murphy
Hi Christoph, Nice cleanup! Looks good overall, just a couple of nits. On 20/04/18 09:02, Christoph Hellwig wrote: [...] diff --git a/lib/dma-debug.c b/lib/dma-debug.c index 7f5cdc1e6b29..712a897174e4 100644 --- a/lib/dma-debug.c +++ b/lib/dma-debug.c @@ -41,6 +41,11 @@ #define HASH_FN_SHIFT

Re: [PATCH 31/33] dma-direct: reject too small dma masks

2018-01-10 Thread Robin Murphy
On 10/01/18 15:32, Christoph Hellwig wrote: On Wed, Jan 10, 2018 at 11:49:34AM +, Robin Murphy wrote: +#ifdef CONFIG_ZONE_DMA + if (mask < DMA_BIT_MASK(ARCH_ZONE_DMA_BITS)) + return 0; +#else + /* +* Because 32-bit DMA masks are so common we expect ev

Re: [PATCH 27/33] dma-direct: use node local allocations for coherent memory

2018-01-10 Thread Robin Murphy
On 10/01/18 15:30, Christoph Hellwig wrote: On Wed, Jan 10, 2018 at 12:06:22PM +, Robin Murphy wrote: On 10/01/18 08:00, Christoph Hellwig wrote: To preserve the x86 behavior. And combined with patch 10/22 of the SWIOTLB refactoring, this means SWIOTLB allocations will also end up NUMA

Re: [PATCH 11/33] dma-mapping: move swiotlb arch helpers to a new header

2018-01-10 Thread Robin Murphy
On 10/01/18 15:26, Christoph Hellwig wrote: On Wed, Jan 10, 2018 at 02:56:01PM +, Robin Murphy wrote: I took a look at these, and it seems their phys_to_dma() usage is doing the thing which we subsequently formalised as dma_map_resource(). I've had a crack at a quick patch to updat

Re: [PATCH 11/33] dma-mapping: move swiotlb arch helpers to a new header

2018-01-10 Thread Robin Murphy
On 10/01/18 08:00, Christoph Hellwig wrote: phys_to_dma, dma_to_phys and dma_capable are helpers published by architecture code for use of swiotlb and xen-swiotlb only. Drivers are not supposed to use these directly, but use the DMA API instead. Move these to a new asm/dma-direct.h helper, incl

Re: [PATCH 27/33] dma-direct: use node local allocations for coherent memory

2018-01-10 Thread Robin Murphy
On 10/01/18 08:00, Christoph Hellwig wrote: To preserve the x86 behavior. And combined with patch 10/22 of the SWIOTLB refactoring, this means SWIOTLB allocations will also end up NUMA-aware, right? Great, that's what we want on arm64 too :) Reviewed-by: Robin Murphy Signed-o

Re: [PATCH 20/33] dma-mapping: clear harmful GFP_* flags in common code

2018-01-10 Thread Robin Murphy
On 10/01/18 08:00, Christoph Hellwig wrote: [...] diff --git a/include/linux/dma-mapping.h b/include/linux/dma-mapping.h index 9f28b2fa329e..88bcb1a8211d 100644 --- a/include/linux/dma-mapping.h +++ b/include/linux/dma-mapping.h @@ -518,6 +518,13 @@ static inline void *dma_alloc_attrs(struct devi

Re: [PATCH 31/33] dma-direct: reject too small dma masks

2018-01-10 Thread Robin Murphy
hardware which probably associates with host systems packing equivalently small amounts of RAM. Otherwise though, Reviewed-by: Robin Murphy Robin. +#endif + return 1; +} + static int dma_direct_mapping_error(struct device *dev, dma_addr_t dma_addr) { r

Re: [PATCH 10/33] arm64: don't override dma_max_pfn

2018-01-10 Thread Robin Murphy
On 10/01/18 08:00, Christoph Hellwig wrote: The generic version now takes dma_pfn_offset into account, so there is no more need for an architecture override. Reviewed-by: Robin Murphy Signed-off-by: Christoph Hellwig --- arch/arm64/include/asm/dma-mapping.h | 9 - 1 file changed

Re: [PATCH 09/33] dma-mapping: take dma_pfn_offset into account in dma_max_pfn

2018-01-10 Thread Robin Murphy
On 10/01/18 08:00, Christoph Hellwig wrote: This makes sure the generic version can be used with architectures / devices that have a DMA offset in the direct mapping. Reviewed-by: Robin Murphy Signed-off-by: Christoph Hellwig --- include/linux/dma-mapping.h | 2 +- 1 file changed, 1