From: Clem Taylor <clem.taylor@gmail.com>
To: linux-mips@linux-mips.org
Subject: Re: troubles writing to a mmapped PCI BAR
Date: Fri, 22 Apr 2005 16:22:53 -0400 [thread overview]
Message-ID: <ecb4efd105042213221c30cac4@mail.gmail.com> (raw)
In-Reply-To: <ecb4efd10504211231748d2525@mail.gmail.com>
On 4/21/05, Clem Taylor <clem.taylor@gmail.com> wrote:
> I'm working on a Au1550 driver for a PCI based co-processor. The
> driver provides mmap() that allows the mapping of a PCI BAR. From
> userspace I can happily read from the mmaped region, but writes just
> hang the user space program. gdb shows that the user program is
> sitting at the write statement. The read() and write() system calls
> work just fine as well.
I saw in drivers/video/epson1356fb.c it was doing:
// FIXME: shouldn't have to do this. If the pages are marked writeable,
// the TLB fault handlers should set these.
pgprot_val(vma->vm_page_prot) |= (_PAGE_DIRTY | _PAGE_VALID);
So I tried adding this before my io_remap_page_range() and it seems to
have fixed my problem. My mmap() write to a PCI device is working now.
I tried setting just the _PAGE_DIRTY bit and that seems to be the
trick. Any ideas why I would need do to this or what is going on?
--Clem
next prev parent reply other threads:[~2005-04-22 20:23 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-04-21 19:31 troubles writing to a mmapped PCI BAR Clem Taylor
2005-04-22 20:22 ` Clem Taylor [this message]
2005-04-22 20:27 ` Ralf Baechle
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=ecb4efd105042213221c30cac4@mail.gmail.com \
--to=clem.taylor@gmail.com \
--cc=linux-mips@linux-mips.org \
/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