diff options
Diffstat (limited to 'include/asm-ppc64/processor.h')
-rw-r--r-- | include/asm-ppc64/processor.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/asm-ppc64/processor.h b/include/asm-ppc64/processor.h index eb33d33cfd6d..cae65b30adb8 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) | |||
642 | 642 | ||
643 | static inline void prefetch(const void *x) | 643 | static inline void prefetch(const void *x) |
644 | { | 644 | { |
645 | if (unlikely(!x)) | ||
646 | return; | ||
647 | |||
645 | __asm__ __volatile__ ("dcbt 0,%0" : : "r" (x)); | 648 | __asm__ __volatile__ ("dcbt 0,%0" : : "r" (x)); |
646 | } | 649 | } |
647 | 650 | ||
648 | static inline void prefetchw(const void *x) | 651 | static inline void prefetchw(const void *x) |
649 | { | 652 | { |
653 | if (unlikely(!x)) | ||
654 | return; | ||
655 | |||
650 | __asm__ __volatile__ ("dcbtst 0,%0" : : "r" (x)); | 656 | __asm__ __volatile__ ("dcbtst 0,%0" : : "r" (x)); |
651 | } | 657 | } |
652 | 658 | ||