Merge tag 'usb-5.11-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb
[linux/fpc-iii.git] / arch / parisc / include / asm / prefetch.h
blob6e63f720024dac4d173caafa31588ea1981fef49
1 /* SPDX-License-Identifier: GPL-2.0 */
2 /*
3 * include/asm-parisc/prefetch.h
5 * PA 2.0 defines data prefetch instructions on page 6-11 of the Kane book.
6 * In addition, many implementations do hardware prefetching of both
7 * instructions and data.
9 * PA7300LC (page 14-4 of the ERS) also implements prefetching by a load
10 * to gr0 but not in a way that Linux can use. If the load would cause an
11 * interruption (eg due to prefetching 0), it is suppressed on PA2.0
12 * processors, but not on 7300LC.
16 #ifndef __ASM_PARISC_PREFETCH_H
17 #define __ASM_PARISC_PREFETCH_H
19 #ifndef __ASSEMBLY__
20 #ifdef CONFIG_PREFETCH
22 #define ARCH_HAS_PREFETCH
23 static inline void prefetch(const void *addr)
25 __asm__(
26 #ifndef CONFIG_PA20
27 /* Need to avoid prefetch of NULL on PA7300LC */
28 " extrw,u,= %0,31,32,%%r0\n"
29 #endif
30 " ldw 0(%0), %%r0" : : "r" (addr));
33 /* LDD is a PA2.0 addition. */
34 #ifdef CONFIG_PA20
35 #define ARCH_HAS_PREFETCHW
36 static inline void prefetchw(const void *addr)
38 __asm__("ldd 0(%0), %%r0" : : "r" (addr));
40 #endif /* CONFIG_PA20 */
42 #endif /* CONFIG_PREFETCH */
43 #endif /* __ASSEMBLY__ */
45 #endif /* __ASM_PARISC_PROCESSOR_H */