From: Peter Desnoyers <pdesnoyers@chinook.com>
To: "Justin (Gus) Hurwitz" <ghurwitz@dyndns.com>
Cc: Daris A Nevil <dnevil@snmc.com>, linuxppc-embedded@lists.linuxppc.org
Subject: Re: Non-cacheable memory
Date: Thu, 09 Aug 2001 15:27:09 -0400 [thread overview]
Message-ID: <3B72E40D.3080600@chinook.com> (raw)
In-Reply-To: Pine.LNX.4.33.0108091838380.11077-100000@localhost.localdomain
Justin (Gus) Hurwitz wrote:
> On Tue, 7 Aug 2001, Daris A Nevil wrote:
>>
>>Here is the procedure I used to allocate pages and mark them as non-cached in
>>the 2.2.5 kernel (SNMC's QSLinux):
>>
>> mem_addr = __get_free_page(GFP_KERNEL);
>> pte = va_to_pe(&init_task, mem_addr);
>> pte_val(*pte) |= _PAGE_NO_CACHE;
>> flush_tlb_page(current->mm_mmap, mem_addr);
>>
>>I used these pages for SCC buffer descriptors, so they were never returned to
>>the system. I'm not sure if this is the preferred way, but it certainly works.
>>I have not tried this in the 2.4 kernel yet. The functions __get_free_page()
>>and flush_tlb_page() do exist in 2.4.4, but I could not locate va_to_pe() (I
>>think that was a macro in 2.2.5).
In 2.4 you can use consistent_alloc() - this allocates memory and makes
it non-cachable. (well, it makes it consistent w.r.t. PCI DMA, but for
860s it's the same thing.) It returns a virtual address plus a DMA
address in an arg ptr - throw away the DMA address, as that's
PCI-specific, and run the virtual address through virt_to_phys().
--
.....................................................................
Peter Desnoyers (781) 457-1165 pdesnoyers@chinook.com
Chinook Communications (617) 661-1979 pjd@fred.cambridge.ma.us
100 Hayden Ave, Lexington MA 02421
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
next prev parent reply other threads:[~2001-08-09 19:27 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-08-07 18:49 Non-cacheable memory Justin (Gus) Hurwitz
2001-08-07 15:59 ` Tom Roberts
2001-08-07 18:34 ` Daris A Nevil
2001-08-09 22:49 ` Justin (Gus) Hurwitz
2001-08-09 19:27 ` Peter Desnoyers [this message]
2001-08-11 3:47 ` Dan Malek
2001-08-13 15:47 ` Peter Desnoyers
2001-08-14 21:26 ` Dan Malek
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=3B72E40D.3080600@chinook.com \
--to=pdesnoyers@chinook.com \
--cc=dnevil@snmc.com \
--cc=ghurwitz@dyndns.com \
--cc=linuxppc-embedded@lists.linuxppc.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;
as well as URLs for NNTP newsgroup(s).