From: Vijay Kumar <vijaykumar@bravegnu.org>
To: "J.R. Mauro" <jrm8005@gmail.com>
Cc: Christoph Hellwig <hch@infradead.org>,
Paul Mackerras <paulus@samba.org>, Greg KH <greg@kroah.com>,
Stephen Rothwell <sfr@canb.auug.org.au>,
LKML <linux-kernel@vger.kernel.org>,
"David S. Miller" <davem@davemloft.net>,
"William L. Irwin" <wli@holomorphy.com>,
jayakumar.lkml@gmail.com, sparclinux@vger.kernel.org
Subject: Re: sparc/staging compile error
Date: Fri, 07 Nov 2008 14:10:01 +0530 [thread overview]
Message-ID: <4913FEE1.9030807@bravegnu.org> (raw)
In-Reply-To: <3aaafc130811060936u371e8b9eyccd0c52693f4c433@mail.gmail.com>
J.R. Mauro wrote:
> On Thu, Nov 6, 2008 at 12:32 PM, Christoph Hellwig <hch@infradead.org> wrote:
>> On Thu, Nov 06, 2008 at 09:06:36AM -0500, J.R. Mauro wrote:
>>> static int poch_ioctl(struct inode *inode, struct file *filp,
>>> unsigned int cmd, unsigned long arg)
>>> {
>>> /* ---snip---*/
>>> case POCH_IOC_SYNC_GROUP_FOR_USER:
>>> case POCH_IOC_SYNC_GROUP_FOR_DEVICE:
>>> vms = find_vma(current->mm, arg);
>>> if (!vms)
>>> /* Address not mapped. */
>>> return -EINVAL;
>>> if (vms->vm_file != filp)
>>> /* Address mapped from different device/file. */
>>> return -EINVAL;
>>>
>>> flush_cache_range(vms, arg, arg + channel->group_size);
>> This doesn't look like something a driver should ever do. Could someone
>> explain what it's trying to do from a high level point of view?
>
> CC'd driver maintainers mentioned in the README
May be the code is not doing what is supposed to do, but here is what the
driver is trying to achieve:
The driver allocates a set of buffers for DMA. These buffers are mapped
into user space, when the user does an mmap. In transmit, when the user
space writes to these buffers, the data has to reach physical memory so
that the device can access them. For receive, the cache has to be
invalidated before the user space reads the buffer.
Do let me know if further clarification is required. Any inputs and
suggestions are welcome.
BTW, please do send in the compiler error message.
Regards,
Vijay
next prev parent reply other threads:[~2008-11-07 9:01 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-06 5:36 sparc/staging compile error Stephen Rothwell
2008-11-06 6:37 ` Greg KH
2008-11-06 6:39 ` David Miller
2008-11-06 10:32 ` Paul Mackerras
2008-11-06 14:06 ` J.R. Mauro
2008-11-06 17:32 ` Christoph Hellwig
2008-11-06 17:36 ` J.R. Mauro
2008-11-07 8:40 ` Vijay Kumar [this message]
2008-11-07 23:06 ` Benjamin Herrenschmidt
2008-11-11 6:58 ` Vijay Kumar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4913FEE1.9030807@bravegnu.org \
--to=vijaykumar@bravegnu.org \
--cc=davem@davemloft.net \
--cc=greg@kroah.com \
--cc=hch@infradead.org \
--cc=jayakumar.lkml@gmail.com \
--cc=jrm8005@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=paulus@samba.org \
--cc=sfr@canb.auug.org.au \
--cc=sparclinux@vger.kernel.org \
--cc=wli@holomorphy.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox