[Top] [All Lists]

Re: troubles writing to a mmapped PCI BAR

Subject: Re: troubles writing to a mmapped PCI BAR
From: Clem Taylor <>
Date: Fri, 22 Apr 2005 16:22:53 -0400
Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta;; h=received:message-id:date:from:reply-to:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=jgOv23GgDYzMVoBt9g3jg7KUPuNsdZI0z9UhZgjN3kGWAP96OkDO6UUngbicHrGBID1tl9hyS/3aIayDsmuPSpUAS6kJzODhhrc77YoYzE95DtgBJsuOy8Tf2XWSplFAVrMAMC64RoVMiIKX3eyrClx8gAfYwl3+YSoYihTmJ2c=
In-reply-to: <>
Original-recipient: rfc822;
References: <>
Reply-to: Clem Taylor <>
On 4/21/05, Clem Taylor <> 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?


<Prev in Thread] Current Thread [Next in Thread>