From: Anders Torger <torger@ludd.luth.se>
To: linux-kernel@vger.kernel.org
Subject: mmap'ing IO memory on i386
Date: Fri, 15 Dec 2000 18:52:20 +0100 [thread overview]
Message-ID: <00121518522008.21281@paganini> (raw)
I'm writing an ALSA sound card driver, for a card that does not support DMA,
thus the CPU need to do the copying to and from the onboard buffer. ALSA
allows for optional mmap'd access, that is accessing the in memory dma buffer
directly from user space. However, for this card that does not support DMA,
it would be best to mmap its IO memory directly, this way I get rid of a copy
in the interrupt handler to an intermediate kernel buffer. This should be
possible on the i386 as far as I know.
I use a 2.2.14 kernel, and ioremap (also tested ioremap_nocache) to relocate
the IO memory. In kernel space it works fine to access the ioremap'd area
just like any other kernel buffer. However, when the ioremap'd area is mmap'd
from user space, problems occur. In user space: when the memory is read, all
bytes are always 0xFF, and when written to, nothing happens (the memory being
on the sound card is unchanged).
I have two questions: (1) why is this happening? (2) is it possible to make
it work?
Please reply to my address directly, since I'm not on the mailing list.
/Anders Torger
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/
reply other threads:[~2000-12-15 18:26 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=00121518522008.21281@paganini \
--to=torger@ludd.luth.se \
--cc=linux-kernel@vger.kernel.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