* flush_dcache_page()/flush_icache_page() for larger page sizes
@ 2004-10-29 23:03 William Lee Irwin III
2004-10-31 1:50 ` David S. Miller
2004-10-31 2:16 ` William Lee Irwin III
0 siblings, 2 replies; 3+ messages in thread
From: William Lee Irwin III @ 2004-10-29 23:03 UTC (permalink / raw)
To: sparclinux
I'm trying to figure out how to implement analogues of flush_icache_page()
and flush_dcache_page() for larger pagesizes (or otherwise determine if
I need to at all) on UltraSPARC, and am having trouble tracking down
the relevant documentation. If someone could name some relevant
document(s), I'd be much obliged.
Thanks.
-- wli
P.S.: I'm also looking for similar information about Super-H and its
64-bit analogue, but I'm not even sure what mailing list to look for.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: flush_dcache_page()/flush_icache_page() for larger page sizes
2004-10-29 23:03 flush_dcache_page()/flush_icache_page() for larger page sizes William Lee Irwin III
@ 2004-10-31 1:50 ` David S. Miller
2004-10-31 2:16 ` William Lee Irwin III
1 sibling, 0 replies; 3+ messages in thread
From: David S. Miller @ 2004-10-31 1:50 UTC (permalink / raw)
To: sparclinux
On Fri, 29 Oct 2004 16:03:47 -0700
William Lee Irwin III <wli@holomorphy.com> wrote:
> I'm trying to figure out how to implement analogues of flush_icache_page()
> and flush_dcache_page() for larger pagesizes (or otherwise determine if
> I need to at all) on UltraSPARC, and am having trouble tracking down
> the relevant documentation. If someone could name some relevant
> document(s), I'd be much obliged.
If you use a 16K or larger page size (which means anything other
than the current 8K) flush_dcache_page() is totally unnecessary
as D-cache aliases become impossible with 16K and larger page sizes.
See the L1DCACHE_SIZE > PAGE_SIZE checks in routines such as
arch/sparc64/mm/init.c:fluah_dcache_page_impl() and friends.
flush_icache_page() is really easy to cons up. Just do a loop
of "flushi %0" for the first address in each 32-byte block of
the page. Use virtual addresses. Ie:
#include <asm/system.h>
for (addr = page_vaddr; addr < page_vaddr + PAGE_SIZE; addr += 32)
flushi(addr);
There is a lot of code in the sparc64 port which is there explicitly
to handle multiple page sizes.
Actually, __flush_dcache_page() as written will handle any page size.
It searches the entire 16K D-cache for the matching physical addresses.
Everywhere I look there is code handling the various page sizes
appropriately. If you're asking for how to implement these
flushes you must see some case which isn't handled, what might
that be?
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: flush_dcache_page()/flush_icache_page() for larger page sizes
2004-10-29 23:03 flush_dcache_page()/flush_icache_page() for larger page sizes William Lee Irwin III
2004-10-31 1:50 ` David S. Miller
@ 2004-10-31 2:16 ` William Lee Irwin III
1 sibling, 0 replies; 3+ messages in thread
From: William Lee Irwin III @ 2004-10-31 2:16 UTC (permalink / raw)
To: sparclinux
On Sat, Oct 30, 2004 at 06:50:31PM -0700, David S. Miller wrote:
> Actually, __flush_dcache_page() as written will handle any page size.
> It searches the entire 16K D-cache for the matching physical addresses.
> Everywhere I look there is code handling the various page sizes
> appropriately. If you're asking for how to implement these
> flushes you must see some case which isn't handled, what might
> that be?
No, I presumed aliases could occur when they could not. The "totally
unnecessary" part for >= 16K page sizes part handles the whole of my
concerns.
-- wli
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2004-10-31 2:16 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-10-29 23:03 flush_dcache_page()/flush_icache_page() for larger page sizes William Lee Irwin III
2004-10-31 1:50 ` David S. Miller
2004-10-31 2:16 ` William Lee Irwin III
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.