Re: How to make mmap'ed kernel buffer non-cacheable

2007-05-02 Thread Nick Piggin
You can do down_interruptible to make the down interruptible. Bhuvan Kumar MITTAL wrote: I'll rephrase the problem as follow: I have a userthread which makes ioctl calls to the kernel and once it reaches inside the kernel it waits on a semaphore. It then does some work inside the kernel and

RE: How to make mmap'ed kernel buffer non-cacheable

2007-05-02 Thread Bhuvan Kumar MITTAL
I'll rephrase the problem as follow: I have a userthread which makes ioctl calls to the kernel and once it reaches inside the kernel it waits on a semaphore. It then does some work inside the kernel and continuously keeps looping between the kernel and user space in an endless while loop. I

RE: How to make mmap'ed kernel buffer non-cacheable

2007-05-02 Thread Bhuvan Kumar MITTAL
I'll rephrase the problem as follow: I have a userthread which makes ioctl calls to the kernel and once it reaches inside the kernel it waits on a semaphore. It then does some work inside the kernel and continuously keeps looping between the kernel and user space in an endless while loop. I

Re: How to make mmap'ed kernel buffer non-cacheable

2007-05-02 Thread Nick Piggin
You can do down_interruptible to make the down interruptible. Bhuvan Kumar MITTAL wrote: I'll rephrase the problem as follow: I have a userthread which makes ioctl calls to the kernel and once it reaches inside the kernel it waits on a semaphore. It then does some work inside the kernel and

Re: How to make mmap'ed kernel buffer non-cacheable

2007-05-01 Thread Nick Piggin
Bhuvan Kumar MITTAL wrote: Hi Alan,Nick Thanks for your inputs. I was able to solve the problem of mapping kernel buffer to user space. Just FYI, I am working on a sh4 based architecture proprietary board with Linux kernel 2.6.17.3 So... you used flush_dcache_page? Or what? Initially I

Re: How to make mmap'ed kernel buffer non-cacheable

2007-05-01 Thread Nick Piggin
Bhuvan Kumar MITTAL wrote: Hi Alan,Nick Thanks for your inputs. I was able to solve the problem of mapping kernel buffer to user space. Just FYI, I am working on a sh4 based architecture proprietary board with Linux kernel 2.6.17.3 So... you used flush_dcache_page? Or what? Initially I

RE: How to make mmap'ed kernel buffer non-cacheable

2007-04-30 Thread Bhuvan Kumar MITTAL
inux-kernel@vger.kernel.org Subject: Re: How to make mmap'ed kernel buffer non-cacheable Bhuvan Kumar MITTAL wrote: > Hi Alan, > > I believe that dma_alloc_coherent will mark the kernel buffer as uncached at > alocation time. > But that is not my intention. I have mapped som

RE: How to make mmap'ed kernel buffer non-cacheable

2007-04-30 Thread Bhuvan Kumar MITTAL
mmap'ed kernel buffer non-cacheable Bhuvan Kumar MITTAL wrote: Hi Alan, I believe that dma_alloc_coherent will mark the kernel buffer as uncached at alocation time. But that is not my intention. I have mapped some user space memory to the kernel buffer and I wish to ensure

Re: How to make mmap'ed kernel buffer non-cacheable

2007-04-22 Thread Nick Piggin
Bhuvan Kumar MITTAL wrote: Hi Alan, I believe that dma_alloc_coherent will mark the kernel buffer as uncached at alocation time. But that is not my intention. I have mapped some user space memory to the kernel buffer and I wish to ensure that the contents of both are coherent and correctly

RE: How to make mmap'ed kernel buffer non-cacheable

2007-04-22 Thread Bhuvan Kumar MITTAL
Hi Alan, I believe that dma_alloc_coherent will mark the kernel buffer as uncached at alocation time. But that is not my intention. I have mapped some user space memory to the kernel buffer and I wish to ensure that the contents of both are coherent and correctly ordered. In other words I

RE: How to make mmap'ed kernel buffer non-cacheable

2007-04-22 Thread Bhuvan Kumar MITTAL
Hi Alan, I believe that dma_alloc_coherent will mark the kernel buffer as uncached at alocation time. But that is not my intention. I have mapped some user space memory to the kernel buffer and I wish to ensure that the contents of both are coherent and correctly ordered. In other words I

Re: How to make mmap'ed kernel buffer non-cacheable

2007-04-22 Thread Nick Piggin
Bhuvan Kumar MITTAL wrote: Hi Alan, I believe that dma_alloc_coherent will mark the kernel buffer as uncached at alocation time. But that is not my intention. I have mapped some user space memory to the kernel buffer and I wish to ensure that the contents of both are coherent and correctly

Re: How to make mmap'ed kernel buffer non-cacheable

2007-04-20 Thread Alan Cox
On Fri, 20 Apr 2007 18:30:25 +0530 Bhuvan Kumar MITTAL <[EMAIL PROTECTED]> wrote: > Hi, > I am working on an audio device driver development on Linux. I have a > kernel buffer which I have mapped to user space using mmap call from user > space. My problem is that the data which comes to the

Re: How to make mmap'ed kernel buffer non-cacheable

2007-04-20 Thread Daniel J Blueman
On 20 Apr, 14:20, Bhuvan Kumar MITTAL <[EMAIL PROTECTED]> wrote: Hi, I am working on an audio device driver development on Linux. I have a kernel buffer which I have mapped to user space using mmap call from user space. My problem is that the data which comes to the kernel buffer is getting

How to make mmap'ed kernel buffer non-cacheable

2007-04-20 Thread Bhuvan Kumar MITTAL
Hi, I am working on an audio device driver development on Linux. I have a kernel buffer which I have mapped to user space using mmap call from user space. My problem is that the data which comes to the kernel buffer is getting dropped in user space and I get only 50-60% of the data which is

Re: How to make mmap'ed kernel buffer non-cacheable

2007-04-20 Thread Daniel J Blueman
On 20 Apr, 14:20, Bhuvan Kumar MITTAL [EMAIL PROTECTED] wrote: Hi, I am working on an audio device driver development on Linux. I have a kernel buffer which I have mapped to user space using mmap call from user space. My problem is that the data which comes to the kernel buffer is getting

Re: How to make mmap'ed kernel buffer non-cacheable

2007-04-20 Thread Alan Cox
On Fri, 20 Apr 2007 18:30:25 +0530 Bhuvan Kumar MITTAL [EMAIL PROTECTED] wrote: Hi, I am working on an audio device driver development on Linux. I have a kernel buffer which I have mapped to user space using mmap call from user space. My problem is that the data which comes to the kernel

How to make mmap'ed kernel buffer non-cacheable

2007-04-20 Thread Bhuvan Kumar MITTAL
Hi, I am working on an audio device driver development on Linux. I have a kernel buffer which I have mapped to user space using mmap call from user space. My problem is that the data which comes to the kernel buffer is getting dropped in user space and I get only 50-60% of the data which is