[parisc-linux] Prefetch macros for PA-RISC

Matthew Wilcox matthew@wil.cx
Wed, 21 Feb 2001 11:11:41 -0700


on PA, we have prefetch for read and prefetch for write.  They're encoded
as loads to the 0 register.  prefetch read is ldd (load 64-bit quantity)
and prefetch-write is ldw (load 32-bit quantity).

Off the top of my head, untested (and someone on the list please correct
me if I'm wrong):

#define prefetch_read(addr) __asm__("ldd 0(%%sr0, %0), %%r0" : : "r" (addr))
#define prefetch_write(addr) __asm__("ldw 0(%%sr0, %0), %%r0" : : "r" (addr))

i think these are only defined for PA 2.0, so we might need to be more
clever than this.

-- 
Revolutions do not require corporate support.