Displaying 20 results from an estimated 663 matches for "vaddr".
Did you mean:
addr
2019 Jul 03
1
[PATCH 1/5] drm/client: Support unmapping of DRM client buffers
...> --- a/drivers/gpu/drm/drm_client.c
> +++ b/drivers/gpu/drm/drm_client.c
> @@ -235,7 +235,8 @@ static void drm_client_buffer_delete(struct drm_client_buffer *buffer)
> {
> struct drm_device *dev = buffer->client->dev;
>
> - drm_gem_vunmap(buffer->gem, buffer->vaddr);
> + if (buffer->vaddr)
No need for this, drm_gem_vunmap() has a NULL check.
> + drm_gem_vunmap(buffer->gem, buffer->vaddr);
>
> if (buffer->gem)
> drm_gem_object_put_unlocked(buffer->gem);
> @@ -281,6 +282,43 @@ drm_client_buffer_create(struct drm_client...
2020 Sep 29
0
[PATCH v3 4/7] drm/gem: Update internal GEM vmap/vunmap interfaces to use struct dma_buf_map
...inux/dma-buf-map.h>
#include <linux/list.h>
#include <linux/module.h>
#include <linux/mutex.h>
@@ -304,7 +305,8 @@ drm_client_buffer_create(struct drm_client_dev *client, u32 width, u32 height, u
*/
void *drm_client_buffer_vmap(struct drm_client_buffer *buffer)
{
- void *vaddr;
+ struct dma_buf_map map;
+ int ret;
if (buffer->vaddr)
return buffer->vaddr;
@@ -317,13 +319,13 @@ void *drm_client_buffer_vmap(struct drm_client_buffer *buffer)
* fd_install step out of the driver backend hooks, to make that
* final step optional for internal users.
*/
- va...
2020 Oct 22
2
[PATCH v5 08/10] drm/gem: Store client buffer mappings as struct dma_buf_map
...> --- a/drivers/gpu/drm/drm_client.c
> +++ b/drivers/gpu/drm/drm_client.c
> @@ -235,7 +235,7 @@ static void drm_client_buffer_delete(struct drm_client_buffer *buffer)
> {
> struct drm_device *dev = buffer->client->dev;
>
> - drm_gem_vunmap(buffer->gem, buffer->vaddr);
> + drm_gem_vunmap(buffer->gem, &buffer->map);
>
> if (buffer->gem)
> drm_gem_object_put(buffer->gem);
> @@ -291,25 +291,31 @@ drm_client_buffer_create(struct drm_client_dev *client, u32 width, u32 height, u
> /**
> * drm_client_buffer_vmap - Map DRM...
2020 Nov 03
0
[patch V3 10/37] ARM: highmem: Switch to generic kmap atomic
...eturn NULL;
}
-#endif
+#endif /* !ARCH_NEEDS_KMAP_HIGH_GET */
-/*
- * The following functions are already defined by <linux/highmem.h>
- * when CONFIG_HIGHMEM is not set.
- */
-#ifdef CONFIG_HIGHMEM
-extern void *kmap_atomic_pfn(unsigned long pfn);
-#endif
+#define arch_kmap_local_post_map(vaddr, pteval) \
+ local_flush_tlb_kernel_page(vaddr)
+
+#define arch_kmap_local_pre_unmap(vaddr) \
+do { \
+ if (cache_is_vivt()) \
+ __cpuc_flush_dcache_area((void *)vaddr, PAGE_SIZE); \
+} while (0)
+
+#define arch_kmap_local_post_unmap(vaddr) \
+ local_flush_tlb_kernel_page(vad...
2015 Nov 09
2
[PATCH] instmem/gk20a: fix race conditions
...(-)
diff --git a/drm/nouveau/nvkm/subdev/instmem/gk20a.c b/drm/nouveau/nvkm/subdev/instmem/gk20a.c
index fc419bb8eab7..681b2541229a 100644
--- a/drm/nouveau/nvkm/subdev/instmem/gk20a.c
+++ b/drm/nouveau/nvkm/subdev/instmem/gk20a.c
@@ -57,6 +57,8 @@ struct gk20a_instobj {
/* CPU mapping */
u32 *vaddr;
struct list_head vaddr_node;
+ /* How many clients are using vaddr? */
+ u32 use_cpt;
};
#define gk20a_instobj(p) container_of((p), struct gk20a_instobj, memory)
@@ -158,27 +160,35 @@ gk20a_instobj_cpu_map_iommu(struct nvkm_memory *memory)
}
/*
- * Must be called while holding gk20a_inst...
2019 Jul 03
0
[PATCH 1/5] drm/client: Support unmapping of DRM client buffers
...x 410572f14257..d04660c4470a 100644
--- a/drivers/gpu/drm/drm_client.c
+++ b/drivers/gpu/drm/drm_client.c
@@ -235,7 +235,8 @@ static void drm_client_buffer_delete(struct drm_client_buffer *buffer)
{
struct drm_device *dev = buffer->client->dev;
- drm_gem_vunmap(buffer->gem, buffer->vaddr);
+ if (buffer->vaddr)
+ drm_gem_vunmap(buffer->gem, buffer->vaddr);
if (buffer->gem)
drm_gem_object_put_unlocked(buffer->gem);
@@ -281,6 +282,43 @@ drm_client_buffer_create(struct drm_client_dev *client, u32 width, u32 height, u
buffer->gem = obj;
+ vaddr = drm_clie...
2020 Sep 29
14
[PATCH v3 0/7] Support GEM object mappings from I/O memory
DRM's fbdev console uses regular load and store operations to update
framebuffer memory. The bochs driver on sparc64 requires the use of
I/O-specific load and store operations. We have a workaround, but need
a long-term solution to the problem.
This patchset changes GEM's vmap/vunmap interfaces to forward pointers
of type struct dma_buf_map and updates the generic fbdev emulation to
use
2020 Sep 29
14
[PATCH v3 0/7] Support GEM object mappings from I/O memory
DRM's fbdev console uses regular load and store operations to update
framebuffer memory. The bochs driver on sparc64 requires the use of
I/O-specific load and store operations. We have a workaround, but need
a long-term solution to the problem.
This patchset changes GEM's vmap/vunmap interfaces to forward pointers
of type struct dma_buf_map and updates the generic fbdev emulation to
use
2020 Sep 29
0
[PATCH v3 3/7] drm/gem: Use struct dma_buf_map in GEM vmap ops and convert GEM backends
...,
&bo->dma_buf_vmap);
if (ret)
- return ERR_PTR(ret);
+ return ret;
+ ttm_kmap_obj_to_dma_buf_map(&bo->dma_buf_vmap, map);
- return bo->dma_buf_vmap.virtual;
+ return 0;
}
/**
* amdgpu_gem_prime_vunmap - &dma_buf_ops.vunmap implementation
* @obj: GEM BO
- * @vaddr: Virtual address (unused)
+ * @map: Virtual address (unused)
*
* Tears down the in-kernel virtual mapping of the BO's memory.
*/
-void amdgpu_gem_prime_vunmap(struct drm_gem_object *obj, void *vaddr)
+void amdgpu_gem_prime_vunmap(struct drm_gem_object *obj, struct dma_buf_map *map)
{
s...
2015 Nov 11
2
[PATCH] instmem/gk20a: use DMA API CPU mapping
...)
diff --git a/drm/nouveau/nvkm/subdev/instmem/gk20a.c b/drm/nouveau/nvkm/subdev/instmem/gk20a.c
index 681b2541229a..4c20fec64d96 100644
--- a/drm/nouveau/nvkm/subdev/instmem/gk20a.c
+++ b/drm/nouveau/nvkm/subdev/instmem/gk20a.c
@@ -56,9 +56,6 @@ struct gk20a_instobj {
/* CPU mapping */
u32 *vaddr;
- struct list_head vaddr_node;
- /* How many clients are using vaddr? */
- u32 use_cpt;
};
#define gk20a_instobj(p) container_of((p), struct gk20a_instobj, memory)
@@ -68,7 +65,6 @@ struct gk20a_instobj {
struct gk20a_instobj_dma {
struct gk20a_instobj base;
- u32 *cpuaddr;
dma_addr_t h...
2020 Nov 03
45
[patch V3 00/37] mm/highmem: Preemptible variant of kmap_atomic & friends
...| 7
b/arch/sh/include/asm/fixmap.h | 8
b/arch/sh/mm/init.c | 8
b/arch/sparc/Kconfig | 1
b/arch/sparc/include/asm/highmem.h | 8
b/arch/sparc/include/asm/vaddrs.h | 4
b/arch/sparc/mm/Makefile | 3
b/arch/sparc/mm/srmmu.c | 2
b/arch/um/include/asm/fixmap.h | 1
b/arch/x86/Kconfig | 3
b/arch/x86/incl...
2020 Nov 03
45
[patch V3 00/37] mm/highmem: Preemptible variant of kmap_atomic & friends
...| 7
b/arch/sh/include/asm/fixmap.h | 8
b/arch/sh/mm/init.c | 8
b/arch/sparc/Kconfig | 1
b/arch/sparc/include/asm/highmem.h | 8
b/arch/sparc/include/asm/vaddrs.h | 4
b/arch/sparc/mm/Makefile | 3
b/arch/sparc/mm/srmmu.c | 2
b/arch/um/include/asm/fixmap.h | 1
b/arch/x86/Kconfig | 3
b/arch/x86/incl...
2020 Nov 03
45
[patch V3 00/37] mm/highmem: Preemptible variant of kmap_atomic & friends
...| 7
b/arch/sh/include/asm/fixmap.h | 8
b/arch/sh/mm/init.c | 8
b/arch/sparc/Kconfig | 1
b/arch/sparc/include/asm/highmem.h | 8
b/arch/sparc/include/asm/vaddrs.h | 4
b/arch/sparc/mm/Makefile | 3
b/arch/sparc/mm/srmmu.c | 2
b/arch/um/include/asm/fixmap.h | 1
b/arch/x86/Kconfig | 3
b/arch/x86/incl...
2020 Oct 15
1
[PATCH v4 06/10] drm/gem: Use struct dma_buf_map in GEM vmap ops and convert GEM backends
...amdgpu_bo(obj);
- int ret;
-
- ret = ttm_bo_kmap(&bo->tbo, 0, bo->tbo.num_pages,
- &bo->dma_buf_vmap);
- if (ret)
- return ERR_PTR(ret);
-
- return bo->dma_buf_vmap.virtual;
-}
-
-/**
- * amdgpu_gem_prime_vunmap - &dma_buf_ops.vunmap implementation
- * @obj: GEM BO
- * @vaddr: Virtual address (unused)
- *
- * Tears down the in-kernel virtual mapping of the BO's memory.
- */
-void amdgpu_gem_prime_vunmap(struct drm_gem_object *obj, void *vaddr)
-{
- struct amdgpu_bo *bo = gem_to_amdgpu_bo(obj);
-
- ttm_bo_kunmap(&bo->dma_buf_vmap);
-}
-
/**
* amdgpu_gem_pri...
2017 Aug 02
2
Understanding the contents of virsh dump --memory-only
...d.
I specifically am trying to understand the loadable segments of this ELF
file.
I ran readelf -a <filename> to get the information that I need. Below shows
the details of the loadable segments in a much better format :-
Loading ELF header #1. offset: 1320 filesize: 655360 memsize: 655360 vaddr:
0 paddr: 0 align: 0 flags: 0
Loading ELF header #2. offset: 656680 filesize: 65536 memsize: 65536 vaddr:
0 paddr: a0000 align: 0 flags: 0
Loading ELF header #3. offset: 722216 filesize: 1072955392 memsize:
1072955392 vaddr: 0 paddr: c0000 align: 0 flags: 0
Loading ELF header #4. offset: 1073677608...
2007 Apr 18
0
[PATCH 5/9] 00mm6 kpte flush.patch
...page.
Signed-off-by: Zachary Amsden <zach@vmware.com>
===================================================================
--- a/arch/i386/mm/highmem.c
+++ b/arch/i386/mm/highmem.c
@@ -44,22 +44,19 @@ void *kmap_atomic(struct page *page, enu
idx = type + KM_TYPE_NR*smp_processor_id();
vaddr = __fix_to_virt(FIX_KMAP_BEGIN + idx);
-#ifdef CONFIG_DEBUG_HIGHMEM
if (!pte_none(*(kmap_pte-idx)))
BUG();
-#endif
set_pte(kmap_pte-idx, mk_pte(page, kmap_prot));
- __flush_tlb_one(vaddr);
return (void*) vaddr;
}
void kunmap_atomic(void *kvaddr, enum km_type type)
{
-#ifdef CONFIG_D...
2020 Sep 29
0
[PATCH v3 5/7] drm/gem: Store client buffer mappings as struct dma_buf_map
...x ac0082bed966..fe573acf1067 100644
--- a/drivers/gpu/drm/drm_client.c
+++ b/drivers/gpu/drm/drm_client.c
@@ -235,7 +235,7 @@ static void drm_client_buffer_delete(struct drm_client_buffer *buffer)
{
struct drm_device *dev = buffer->client->dev;
- drm_gem_vunmap(buffer->gem, buffer->vaddr);
+ drm_gem_vunmap(buffer->gem, &buffer->map);
if (buffer->gem)
drm_gem_object_put(buffer->gem);
@@ -291,25 +291,31 @@ drm_client_buffer_create(struct drm_client_dev *client, u32 width, u32 height, u
/**
* drm_client_buffer_vmap - Map DRM client buffer into address space...
2020 Oct 15
0
[PATCH v4 06/10] drm/gem: Use struct dma_buf_map in GEM vmap ops and convert GEM backends
...o->tbo, 0, bo->tbo.num_pages,
> - &bo->dma_buf_vmap);
> - if (ret)
> - return ERR_PTR(ret);
> -
> - return bo->dma_buf_vmap.virtual;
> -}
> -
> -/**
> - * amdgpu_gem_prime_vunmap - &dma_buf_ops.vunmap implementation
> - * @obj: GEM BO
> - * @vaddr: Virtual address (unused)
> - *
> - * Tears down the in-kernel virtual mapping of the BO's memory.
> - */
> -void amdgpu_gem_prime_vunmap(struct drm_gem_object *obj, void *vaddr)
> -{
> - struct amdgpu_bo *bo = gem_to_amdgpu_bo(obj);
> -
> - ttm_bo_kunmap(&bo->dma...
2019 Jul 05
0
[PATCH v2 1/6] drm/client: Support unmapping of DRM client buffers
...ivers/gpu/drm/drm_client.c b/drivers/gpu/drm/drm_client.c
index 410572f14257..66d8d645ac79 100644
--- a/drivers/gpu/drm/drm_client.c
+++ b/drivers/gpu/drm/drm_client.c
@@ -281,6 +281,43 @@ drm_client_buffer_create(struct drm_client_dev *client, u32 width, u32 height, u
buffer->gem = obj;
+ vaddr = drm_client_buffer_vmap(buffer);
+ if (IS_ERR(vaddr)) {
+ ret = PTR_ERR(vaddr);
+ goto err_delete;
+ }
+
+ return buffer;
+
+err_delete:
+ drm_client_buffer_delete(buffer);
+
+ return ERR_PTR(ret);
+}
+
+/**
+ * drm_client_buffer_vmap - Map DRM client buffer into address space
+ * @buffer: DRM c...
2020 Oct 20
0
[PATCH v5 08/10] drm/gem: Store client buffer mappings as struct dma_buf_map
...x ac0082bed966..fe573acf1067 100644
--- a/drivers/gpu/drm/drm_client.c
+++ b/drivers/gpu/drm/drm_client.c
@@ -235,7 +235,7 @@ static void drm_client_buffer_delete(struct drm_client_buffer *buffer)
{
struct drm_device *dev = buffer->client->dev;
- drm_gem_vunmap(buffer->gem, buffer->vaddr);
+ drm_gem_vunmap(buffer->gem, &buffer->map);
if (buffer->gem)
drm_gem_object_put(buffer->gem);
@@ -291,25 +291,31 @@ drm_client_buffer_create(struct drm_client_dev *client, u32 width, u32 height, u
/**
* drm_client_buffer_vmap - Map DRM client buffer into address space...