From: Benjamin Herrenschmidt <bh40@calva.net>
To: Ronald Wahl <rwa@peppercon.de>, <linuxppc-dev@lists.linuxppc.org>
Subject: Re: allocating uncachable memory
Date: Wed, 23 Aug 2000 16:03:27 +0200 [thread overview]
Message-ID: <20000823140327.30773@mailhost.mipsys.com> (raw)
In-Reply-To: <Pine.LNX.4.21.0008231540530.12497-100000@goliath.issistance.de>
>I'm writing a driver for a PCI controller in a PPC system. That driver
>"exports" a bit of local ram into the PCI space. Now if some PCI device is
>writing into this memory the local system won't notice it in all cases
>since this memory is cached. How can i allocate uncached memory in linux?
>Or if this does not work how can I remap it as non-cachable. I already
>tried ioremap_nocache but this does not work for real memory. It would be
>nice if someone could give me a short code fragment...
Depending on the host PCI controller, the machine will or will not be
cache-coherent. Most PPC machines out there (all PCI PPC machines) are,
AFAIK, cache coherents. PPC NuBus powermacs are not. That means that any
access done to memory from the PCI is "snooped" by the CPU and the cache
is kept up-to-date.
There are routines in 2.4 for allocating PCI "consistent" memory (will be
uncached on archs that are not coherent and normal on others). See
pci_alloc_consistent() or something like that (I don't have my kernel
sources with me).
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
next prev parent reply other threads:[~2000-08-23 14:03 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-08-23 13:50 allocating uncachable memory Ronald Wahl
2000-08-23 14:03 ` Benjamin Herrenschmidt [this message]
2000-08-23 17:37 ` Dan Malek
2000-08-24 7:42 ` Ronald Wahl
2000-08-25 7:12 ` Ronald Wahl
2000-08-25 17:39 ` Dan Malek
2000-08-26 16:34 ` Roman Zippel
2000-08-27 19:46 ` Dan Malek
2000-08-27 21:26 ` Roman Zippel
2000-08-27 22:52 ` Dan Malek
2000-08-28 20:04 ` Roman Zippel
2000-08-28 20:34 ` Dan Malek
2000-08-28 21:33 ` Roman Zippel
2000-08-28 12:05 ` Ronald Wahl
2000-08-28 15:25 ` Dan Malek
2000-08-29 7:29 ` Ronald Wahl
2000-08-23 14:11 ` Gabriel Paubert
2000-08-24 9:14 ` Ronald Wahl
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=20000823140327.30773@mailhost.mipsys.com \
--to=bh40@calva.net \
--cc=linuxppc-dev@lists.linuxppc.org \
--cc=rwa@peppercon.de \
/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;
as well as URLs for NNTP newsgroup(s).