Displaying 11 results from an estimated 11 matches for "is_swiotlb_active".
2019 Feb 05
0
[vhost:linux-next 3/23] include/linux/swiotlb.h:105:20: error: static declaration of 'is_swiotlb_active' follows non-static declaration
tree: https://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git linux-next
head: 104f89a60ef5ec77d6f559eac4676844b3480740
commit: 155fcd8511de5f99c27a726e9153b87cce528b6e [3/23] swiotlb: Add is_swiotlb_active() function
config: i386-tinyconfig (attached as .config)
compiler: gcc-8 (Debian 8.2.0-14) 8.2.0
reproduce:
git checkout 155fcd8511de5f99c27a726e9153b87cce528b6e
# save the attached .config to linux build tree
make ARCH=i386
All errors (new ones prefixed by >>):...
2023 May 18
1
[PATCH 3/4] drm/nouveau: stop using is_swiotlb_active
...used. Unfortunstely the DRM core is still broken and
tries to do plain page allocations instead of using DMA API allocators
by default and uses various bandaids on when to use dma_alloc_coherent.
Switch nouveau to use the same (broken) scheme as amdgpu and radeon
to remove the last driver user of is_swiotlb_active.
Signed-off-by: Christoph Hellwig <hch at lst.de>
---
drivers/gpu/drm/nouveau/nouveau_ttm.c | 10 +++-------
1 file changed, 3 insertions(+), 7 deletions(-)
diff --git a/drivers/gpu/drm/nouveau/nouveau_ttm.c b/drivers/gpu/drm/nouveau/nouveau_ttm.c
index 1469a88910e45d..486f39f31a38df 10064...
2019 Feb 07
0
[PATCH v7 2/5] swiotlb: Add is_swiotlb_active() function
...83 100644
--- a/include/linux/swiotlb.h
+++ b/include/linux/swiotlb.h
@@ -77,6 +77,7 @@ bool swiotlb_map(struct device *dev, phys_addr_t *phys, dma_addr_t *dma_addr,
void __init swiotlb_exit(void);
unsigned int swiotlb_max_segment(void);
size_t swiotlb_max_mapping_size(struct device *dev);
+bool is_swiotlb_active(void);
#else
#define swiotlb_force SWIOTLB_NO_FORCE
static inline bool is_swiotlb_buffer(phys_addr_t paddr)
@@ -100,6 +101,11 @@ static inline size_t swiotlb_max_mapping_size(struct device *dev)
{
return SIZE_MAX;
}
+
+static inline bool is_swiotlb_active(void)
+{
+ return false;
+}
#endif...
2023 May 18
0
[PATCH 4/4] swiotlb: unexport is_swiotlb_active
...Signed-off-by: Christoph Hellwig <hch at lst.de>
---
kernel/dma/swiotlb.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/kernel/dma/swiotlb.c b/kernel/dma/swiotlb.c
index af2e304c672c43..9f1fd28264a067 100644
--- a/kernel/dma/swiotlb.c
+++ b/kernel/dma/swiotlb.c
@@ -921,7 +921,6 @@ bool is_swiotlb_active(struct device *dev)
return mem && mem->nslabs;
}
-EXPORT_SYMBOL_GPL(is_swiotlb_active);
#ifdef CONFIG_DEBUG_FS
--
2.39.2
2023 May 18
4
unexport swiotlb_active
Hi all,
this little series removes the last swiotlb API exposed to modules.
Diffstat:
arch/x86/include/asm/xen/swiotlb-xen.h | 6 ------
arch/x86/kernel/pci-dma.c | 28 ++++------------------------
drivers/gpu/drm/nouveau/nouveau_ttm.c | 10 +++-------
drivers/pci/xen-pcifront.c | 6 ------
kernel/dma/swiotlb.c | 1 -
5 files changed, 7
2019 Feb 07
5
[PATCH v7 0/5] Fix virtio-blk issue with SWIOTLB
...driver tries to read/write a block larger than that, the
allocation of the dma-handle fails and an IO error is reported.
Changes to v6 are:
- Fix build errors with CONFIG_SWIOTLB=n
Please review.
Thanks,
Joerg
Joerg Roedel (5):
swiotlb: Introduce swiotlb_max_mapping_size()
swiotlb: Add is_swiotlb_active() function
dma: Introduce dma_max_mapping_size()
virtio: Introduce virtio_max_dma_size()
virtio-blk: Consider virtio_max_dma_size() for maximum segment size
Documentation/DMA-API.txt | 8 ++++++++
drivers/block/virtio_blk.c | 10 ++++++----
drivers/virtio/virtio_ring.c | 11 ++++++++++...
2024 Jan 30
0
GT216M [GeForce GT 240M] (NV50/Tesla) sddm fails to start since commit 0a2f6372a43ff5e948b8b10be34d4473f6c2ef6c
...80000024 (err: INVALID_CMD) push 00400040
I've bisected this to:
0a2f6372a43ff5e948b8b10be34d4473f6c2ef6c is the first bad commit
commit 0a2f6372a43ff5e948b8b10be34d4473f6c2ef6c
Author: Christoph Hellwig <hch at lst.de>
Date:?? Fri Apr 7 08:31:30 2023 +0200
??? drm/nouveau: stop using is_swiotlb_active
??? Drivers have no business looking into dma-mapping internals and check
??? what backend is used.? Unfortunstely the DRM core is still broken and
??? tries to do plain page allocations instead of using DMA API allocators
??? by default and uses various bandaids on when to use dma_alloc_coherent....
2019 Mar 10
0
[PULL] virtio,vhost: cleanups and fixes
...y return a negative cookie
virtio-ccw: wire up ->bus_name callback
virtio: hint if callbacks surprisingly might sleep
Halil Pasic (1):
s390/virtio: handle find on invalid queue gracefully
Joerg Roedel (5):
swiotlb: Introduce swiotlb_max_mapping_size()
swiotlb: Add is_swiotlb_active() function
dma: Introduce dma_max_mapping_size()
virtio: Introduce virtio_max_dma_size()
virtio-blk: Consider virtio_max_dma_size() for maximum segment size
Wei Wang (2):
virtio-balloon: improve update_balloon_size_func
virtio_balloon: remove the unnecessary 0-initial...
2019 Feb 05
2
[PATCH 0/5 v6] Fix virtio-blk issue with SWIOTLB
...ost, can I ask you to pls include
the version in all patches? Both --subject-prefix
and -v flags to git format-patch will do this for you.
> Please review.
>
> Thanks,
>
> Joerg
>
> Joerg Roedel (5):
> swiotlb: Introduce swiotlb_max_mapping_size()
> swiotlb: Add is_swiotlb_active() function
> dma: Introduce dma_max_mapping_size()
> virtio: Introduce virtio_max_dma_size()
> virtio-blk: Consider virtio_max_dma_size() for maximum segment size
>
> Documentation/DMA-API.txt | 8 ++++++++
> drivers/block/virtio_blk.c | 10 ++++++----
> drivers/v...
2019 Feb 05
2
[PATCH 0/5 v6] Fix virtio-blk issue with SWIOTLB
...ost, can I ask you to pls include
the version in all patches? Both --subject-prefix
and -v flags to git format-patch will do this for you.
> Please review.
>
> Thanks,
>
> Joerg
>
> Joerg Roedel (5):
> swiotlb: Introduce swiotlb_max_mapping_size()
> swiotlb: Add is_swiotlb_active() function
> dma: Introduce dma_max_mapping_size()
> virtio: Introduce virtio_max_dma_size()
> virtio-blk: Consider virtio_max_dma_size() for maximum segment size
>
> Documentation/DMA-API.txt | 8 ++++++++
> drivers/block/virtio_blk.c | 10 ++++++----
> drivers/v...
2019 Feb 07
0
[PATCH v7 3/5] dma: Introduce dma_max_mapping_size()
...a/direct.c
@@ -380,3 +380,14 @@ int dma_direct_supported(struct device *dev, u64 mask)
*/
return mask >= __phys_to_dma(dev, min_mask);
}
+
+size_t dma_direct_max_mapping_size(struct device *dev)
+{
+ size_t size = SIZE_MAX;
+
+ /* If SWIOTLB is active, use its maximum mapping size */
+ if (is_swiotlb_active())
+ size = swiotlb_max_mapping_size(dev);
+
+ return size;
+}
diff --git a/kernel/dma/mapping.c b/kernel/dma/mapping.c
index a11006b6d8e8..5753008ab286 100644
--- a/kernel/dma/mapping.c
+++ b/kernel/dma/mapping.c
@@ -357,3 +357,17 @@ void dma_cache_sync(struct device *dev, void *vaddr, size_t siz...