* dcbz not used on ppc64?
@ 2005-01-03 22:54 Chris Friesen
2005-01-03 22:58 ` Anton Blanchard
0 siblings, 1 reply; 4+ messages in thread
From: Chris Friesen @ 2005-01-03 22:54 UTC (permalink / raw)
To: linuxppc-dev
I ran into some issues with the use of the dcbz instruction in the
kernel for ppc32. I'm now looking at porting our work to ppc64, and
when I looked around a bit, I found that the dcbz instruction doesn't
appear to be used in ppc64.
This leads me to ask:
1) Is it in fact true that ppc64 does not use dcbz in the kernel?
2) If so, why not? Presumably it would be a win in some cases,
otherwise they wouldn't be using it in ppc32. Is there some other
factore in play for ppc64?
Thanks,
Chris
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: dcbz not used on ppc64?
2005-01-03 22:54 dcbz not used on ppc64? Chris Friesen
@ 2005-01-03 22:58 ` Anton Blanchard
2005-01-03 23:34 ` Chris Friesen
0 siblings, 1 reply; 4+ messages in thread
From: Anton Blanchard @ 2005-01-03 22:58 UTC (permalink / raw)
To: Chris Friesen; +Cc: linuxppc-dev
Hi,
> I ran into some issues with the use of the dcbz instruction in the
> kernel for ppc32. I'm now looking at porting our work to ppc64, and
> when I looked around a bit, I found that the dcbz instruction doesn't
> appear to be used in ppc64.
>
> This leads me to ask:
>
> 1) Is it in fact true that ppc64 does not use dcbz in the kernel?
> 2) If so, why not? Presumably it would be a win in some cases,
> otherwise they wouldn't be using it in ppc32. Is there some other
> factore in play for ppc64?
include/asm-ppc64/page.h:clear_page() uses it:
static __inline__ void clear_page(void *addr)
{
unsigned long lines, line_size;
line_size = systemcfg->dCacheL1LineSize;
lines = naca->dCacheL1LinesPerPage;
__asm__ __volatile__(
"mtctr %1 # clear_page\n\
1: dcbz 0,%0\n\
add %0,%0,%3\n\
bdnz+ 1b"
: "=r" (addr)
: "r" (lines), "0" (addr), "r" (line_size)
: "ctr", "memory");
}
Anton
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: dcbz not used on ppc64?
2005-01-03 22:58 ` Anton Blanchard
@ 2005-01-03 23:34 ` Chris Friesen
2005-01-04 3:16 ` Anton Blanchard
0 siblings, 1 reply; 4+ messages in thread
From: Chris Friesen @ 2005-01-03 23:34 UTC (permalink / raw)
To: Anton Blanchard; +Cc: linuxppc-dev
Anton Blanchard wrote:
>>1) Is it in fact true that ppc64 does not use dcbz in the kernel?
>>2) If so, why not? Presumably it would be a win in some cases,
>>otherwise they wouldn't be using it in ppc32. Is there some other
>>factore in play for ppc64?
>
>
> include/asm-ppc64/page.h:clear_page() uses it:
Hmm. As of 2.6.9 at least, clear_page() is only ever called by
clear_user_page(), which in turn is only ever called by
drivers/media/video/video-buf.c. I'm not using that driver, which
explains why the instruction didn't show up when I disassembled the kernel.
Still, ppc32 also uses it in cacheable_memzero and __copy_tofrom_user.
It's also used in cacheable_memcpy, but that routine doesn't seem to be
used anywhere.
Chris
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: dcbz not used on ppc64?
2005-01-03 23:34 ` Chris Friesen
@ 2005-01-04 3:16 ` Anton Blanchard
0 siblings, 0 replies; 4+ messages in thread
From: Anton Blanchard @ 2005-01-04 3:16 UTC (permalink / raw)
To: Chris Friesen; +Cc: linuxppc-dev
> Hmm. As of 2.6.9 at least, clear_page() is only ever called by
> clear_user_page(), which in turn is only ever called by
> drivers/media/video/video-buf.c. I'm not using that driver, which
> explains why the instruction didn't show up when I disassembled the kernel.
Dont forget mm/memory.c:clear_user_highpage -> clear_user_page.
Anton
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2005-01-04 3:16 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-01-03 22:54 dcbz not used on ppc64? Chris Friesen
2005-01-03 22:58 ` Anton Blanchard
2005-01-03 23:34 ` Chris Friesen
2005-01-04 3:16 ` Anton Blanchard
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).