From 48301e3331e5df4bca7ce572f385aa1758b03d7f Mon Sep 17 00:00:00 2001 From: Olof Johansson Date: Sat, 16 Apr 2005 15:24:38 -0700 Subject: [PATCH] --- yaml --- r: 55 b: refs/heads/master c: e63f8f439de010b6227c0c9c6f56e2c44dbe5dae h: refs/heads/master i: 53: 05bbdac4501832103726ceefb6cc9d9ed6020d5c 51: ee5177db482e9ffc250308c03a97cd4944344274 47: d7416516642ccfe002702d3c443bcd53141bf6c7 v: v3 --- [refs] | 2 +- trunk/include/asm-ppc64/processor.h | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 9d322196caa1..2e40a2002fbb 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 89e09f5ebba4bcde9852e4be4af536d5b691f20a +refs/heads/master: e63f8f439de010b6227c0c9c6f56e2c44dbe5dae diff --git a/trunk/include/asm-ppc64/processor.h b/trunk/include/asm-ppc64/processor.h index eb33d33cfd6d..cae65b30adb8 100644 --- a/trunk/include/asm-ppc64/processor.h +++ b/trunk/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)); }