From: Grant Likely <grant.likely@secretlab.ca>
To: Robert Woodworth <rwoodworth@securics.com>
Cc: linuxppc-embedded <linuxppc-embedded@ozlabs.org>
Subject: Re: Cache control
Date: Sat, 18 Oct 2008 00:32:47 -0600 [thread overview]
Message-ID: <20081018063246.GA5594@secretlab.ca> (raw)
In-Reply-To: <1BA180A8-1655-4F10-ADDD-E5667DE182BE@securics.com>
On Thu, Oct 16, 2008 at 09:57:27AM -0600, Robert Woodworth wrote:
> I have a Virtex4 VF60 device with 256MB DDR2.
>
> I have told the Linux kernel that the device has only 128MB and its
> working fine. There is an HDL module that is populating the next 16MB
> with sensor data (0x08000000 - 0x09000000) I mapped the area into my
> driver via `ioremap()` and also via `mmap / remap_pfn_range()` It works
> fine.
>
> I know that PPC cache regions work in 128MB blocks. I assume that the
> kernel bootup is turning on cache in the first 128, because it thinks
> that its the full RAM range, and not cached in the next 128MB.
That's only true when the MMU is off. Linux runs with the MMU on and
the TLB entries specify the caching per mapping.
> I know that if I declare the area cached, and invalidate the region
> before I read it, the reads should be much faster than if it's not
> cached.
Correct.
> How can I control if the area is cached? and then invalidate it when new
> data arrives?
>
> Is there a PPC/Linux API call to declare the region cached and
> invalidate regions before read?
Take a look at dma_alloc_coherent() and related functions.
Cheers,
g.
prev parent reply other threads:[~2008-10-18 6:32 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-16 15:57 Cache control Robert Woodworth
2008-10-17 7:18 ` Marco Stornelli
2008-10-18 6:32 ` Grant Likely [this message]
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=20081018063246.GA5594@secretlab.ca \
--to=grant.likely@secretlab.ca \
--cc=linuxppc-embedded@ozlabs.org \
--cc=rwoodworth@securics.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;
as well as URLs for NNTP newsgroup(s).