aboutsummaryrefslogtreecommitdiff
path: root/include/asm-ppc64
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-ppc64')
-rw-r--r--include/asm-ppc64/processor.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/asm-ppc64/processor.h b/include/asm-ppc64/processor.h
index eb33d33cfd6..cae65b30adb 100644
--- a/include/asm-ppc64/processor.h
+++ b/include/asm-ppc64/processor.h
@@ -642,11 +642,17 @@ static inline unsigned long __pack_fe01(unsigned int fpmode)
static inline void prefetch(const void *x)
{
+ if (unlikely(!x))
+ return;
+
__asm__ __volatile__ ("dcbt 0,%0" : : "r" (x));
}
static inline void prefetchw(const void *x)
{
+ if (unlikely(!x))
+ return;
+
__asm__ __volatile__ ("dcbtst 0,%0" : : "r" (x));
}