Re: [RFC] Helper to abstract vma handling in media layer

2014-04-10 Thread Jan Kara
On Thu 10-04-14 14:22:20, Hans Verkuil wrote: On 04/10/14 14:15, Jan Kara wrote: On Thu 10-04-14 13:07:42, Hans Verkuil wrote: On 04/10/14 12:32, Jan Kara wrote: Hello, On Thu 10-04-14 12:02:50, Marek Szyprowski wrote: On 2014-03-17 20:49, Jan Kara wrote: The following patch

Re: [RFC] Helper to abstract vma handling in media layer

2014-04-10 Thread Jan Kara
On Thu 10-04-14 23:57:38, Jan Kara wrote: On Thu 10-04-14 14:22:20, Hans Verkuil wrote: On 04/10/14 14:15, Jan Kara wrote: On Thu 10-04-14 13:07:42, Hans Verkuil wrote: On 04/10/14 12:32, Jan Kara wrote: Hello, On Thu 10-04-14 12:02:50, Marek Szyprowski wrote: On 2014-03-17

Re: [PATCH 1/9] mm: Provide new get_vaddr_pfns() helper

2014-03-18 Thread Jan Kara
On Mon 17-03-14 13:53:35, Dave Hansen wrote: On 03/17/2014 12:49 PM, Jan Kara wrote: +int get_vaddr_pfns(unsigned long start, int nr_pfns, int write, int force, + struct pinned_pfns *pfns) +{ ... + if (!(vma-vm_flags (VM_IO | VM_PFNMAP))) { + pfns-got_ref = 1

[PATCH 9/9] staging: tidspbridge: Convert to get_vaddr_pfns()

2014-03-17 Thread Jan Kara
Convert the driver to use get_vaddr_pfns() instead of get_user_pages() or a hand made page table walk. This removes knowledge about vmas and mmap_sem locking from the driver. Signed-off-by: Jan Kara j...@suse.cz --- drivers/staging/tidspbridge/core/tiomap3430.c | 261

[PATCH 5/9] media: vb2: Convert vb2_vmalloc_get_userptr() to use pfns vector

2014-03-17 Thread Jan Kara
Convert vb2_vmalloc_get_userptr() to use passed vector of pfns. When we are doing that there's no need to allocate page array and some code can be simplified. Signed-off-by: Jan Kara j...@suse.cz --- drivers/media/v4l2-core/videobuf2-vmalloc.c | 86 +++-- 1 file changed

[PATCH 1/9] mm: Provide new get_vaddr_pfns() helper

2014-03-17 Thread Jan Kara
to VM_IO | VM_PFNMAP vma, we don't touch page structures. Caller should make sure pfns aren't reused for anything else while he is using them. This function is created for various drivers to simplify handling of their buffers. Signed-off-by: Jan Kara j...@suse.cz --- include/linux/mm.h | 46

[RFC] Helper to abstract vma handling in media layer

2014-03-17 Thread Jan Kara
Hello, The following patch series is my first stab at abstracting vma handling from the various media drivers. After this patch set drivers have to know much less details about vmas, their types, and locking. My motivation for the series is that I want to change get_user_pages() locking and I

[PATCH 7/9] media: vb2: Remove unused functions

2014-03-17 Thread Jan Kara
Conversion to the use of pinned pfns made some functions unused. Remove them. Also there's no need to lock mmap_sem in __buf_prepare() anymore. Signed-off-by: Jan Kara j...@suse.cz --- drivers/media/v4l2-core/videobuf2-core.c | 8 +- drivers/media/v4l2-core/videobuf2-memops.c | 114

[PATCH 2/9] media: omap_vout: Convert omap_vout_uservirt_to_phys() to use get_vaddr_pfns()

2014-03-17 Thread Jan Kara
-by: Jan Kara j...@suse.cz --- drivers/media/platform/omap/omap_vout.c | 63 +++-- 1 file changed, 29 insertions(+), 34 deletions(-) diff --git a/drivers/media/platform/omap/omap_vout.c b/drivers/media/platform/omap/omap_vout.c index dfd0a21a0658..8c5803e4ce15 100644

[PATCH 8/9] drm/exynos: Convert g2d_userptr_get_dma_addr() to use get_vaddr_pfn()

2014-03-17 Thread Jan Kara
Convert g2d_userptr_get_dma_addr() to pin pages using get_vaddr_pfn(). This removes the knowledge about vmas and mmap_sem locking from exynos driver. Also it fixes a problem that the function has been mapping user provided address without holding mmap_sem. Signed-off-by: Jan Kara j...@suse.cz

[PATCH 3/9] media: vb2: Teach vb2_queue_or_prepare_buf() to get pfns for user buffers

2014-03-17 Thread Jan Kara
Teach vb2_queue_or_prepare_buf() to get pfns underlying these buffers and propagate them down to get_userptr callback. Thus each buffer mapping method doesn't have to get pfns independently. Also this will remove the knowledge about mmap_sem locking from videobuf2 core. Signed-off-by: Jan Kara j

[PATCH 4/9] media: vb2: Convert vb2_dma_sg_get_userptr() to use pinned pfns

2014-03-17 Thread Jan Kara
Signed-off-by: Jan Kara j...@suse.cz --- drivers/media/v4l2-core/videobuf2-dma-sg.c | 85 ++ 1 file changed, 15 insertions(+), 70 deletions(-) diff --git a/drivers/media/v4l2-core/videobuf2-dma-sg.c b/drivers/media/v4l2-core/videobuf2-dma-sg.c index ef0b3f765d8e

Re: Handling of VM_IO vma in omap_vout_uservirt_to_phys()

2013-10-18 Thread Jan Kara
On Fri 18-10-13 14:59:17, Archit Taneja wrote: Hi, On Friday 18 October 2013 03:46 AM, Jan Kara wrote: Hello, I was auditing get_user_pages() users and I've noticed that omap_vout_uservirt_to_phys() is apparently called for arbitrary address passed from userspace. If this address

Handling of user address in vb2_dc_get_userptr()

2013-10-17 Thread Jan Kara
? Or for on which vmas this code is supposed to work? Thanks in advance for clarification. Honza -- Jan Kara j...@suse.cz SUSE Labs, CR -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord

Handling of VM_IO vma in omap_vout_uservirt_to_phys()

2013-10-17 Thread Jan Kara
this is a generally valid computation for arbitrary VM_IO vma. So do we expect vma to come from a particular source where this is true? If yes, where do we expect vma comes from? Thanks for clarification. Honza -- Jan Kara j...@suse.cz

Re: [PATCH 19/26] ivtv: Convert driver to use get_user_pages_unlocked()

2013-10-07 Thread Jan Kara
get_user_pages_unlocked(), then the patch below looks fine. Reviewed-by: Andy Walls awa...@md.metrocast.net Acked-by: Andy Walls awa...@md.metrocast.net Thanks. Honza On Wed, 2013-10-02 at 16:28 +0200, Jan Kara wrote: CC: Andy Walls awa

[PATCH 05/26] omap3isp: Make isp_video_buffer_prepare_user() use get_user_pages_fast()

2013-10-02 Thread Jan Kara
CC: Laurent Pinchart laurent.pinch...@ideasonboard.com CC: linux-media@vger.kernel.org Signed-off-by: Jan Kara j...@suse.cz --- drivers/media/platform/omap3isp/ispqueue.c | 10 +++--- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/drivers/media/platform/omap3isp/ispqueue.c b

[PATCH 19/26] ivtv: Convert driver to use get_user_pages_unlocked()

2013-10-02 Thread Jan Kara
CC: Andy Walls awa...@md.metrocast.net CC: linux-media@vger.kernel.org Signed-off-by: Jan Kara j...@suse.cz --- drivers/media/pci/ivtv/ivtv-udma.c | 6 ++ drivers/media/pci/ivtv/ivtv-yuv.c | 12 ++-- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/drivers/media/pci

Re: [PATCH 05/26] omap3isp: Make isp_video_buffer_prepare_user() use get_user_pages_fast()

2013-10-02 Thread Jan Kara
On Wed 02-10-13 21:41:10, Laurent Pinchart wrote: Hi Jan, Thank you for the patch. On Wednesday 02 October 2013 16:27:46 Jan Kara wrote: CC: Laurent Pinchart laurent.pinch...@ideasonboard.com CC: linux-media@vger.kernel.org Signed-off-by: Jan Kara j...@suse.cz Acked-by: Laurent

Re: [PATCH v2 01/10] string: introduce memweight

2012-06-04 Thread Jan Kara
Cc: Joel Becker jl...@evilplan.org Cc: ocfs2-de...@oss.oracle.com Cc: Jan Kara j...@suse.cz Cc: linux-e...@vger.kernel.org Cc: Andrew Morton a...@linux-foundation.org Cc: Andreas Dilger adilger.ker...@dilger.ca Cc: Theodore Ts'o ty...@mit.edu Cc: Matthew Wilcox matt...@wil.cx --- v2

Re: [PATCH v2 01/10] string: introduce memweight

2012-06-04 Thread Jan Kara
On Mon 04-06-12 20:46:14, Akinobu Mita wrote: 2012/6/4 Jan Kara j...@suse.cz: On Sat 02-06-12 22:40:07, Akinobu Mita wrote: memweight() is the function that counts the total number of bits set in memory area.  Unlike bitmap_weight(), memweight() takes pointer and size in bytes to specify

Re: [PATCH 01/10] string: introduce memweight

2012-05-23 Thread Jan Kara
On Wed 23-05-12 21:12:18, Akinobu Mita wrote: 2012/5/23 Jan Kara j...@suse.cz: On Sun 20-05-12 22:23:14, Akinobu Mita wrote: memweight() is the function that counts the total number of bits set in memory area.  The memory area doesn't need to be aligned to long-word boundary unlike

Re: Remaining BKL users, what to do

2010-09-16 Thread Jan Kara
/staging if there are no users left. I think some people still use this... fs/udf: Not completely trivial, but probably necessary to fix. Project web site is dead, I hope that Jan Kara can be motivated to fix it though. Yeah, I can have a look

<    1   2