diff options
author | Stefan Reinauer <reinauer@chromium.org> | 2012-12-02 04:49:50 +0000 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2012-12-06 14:30:39 -0800 |
commit | 095593c0301399ae834050e2008862451a72b8b0 (patch) | |
tree | 6ebf30f48a3ec3db8111ecfb815044db5bcfa4a4 /arch/x86/include/asm/cache.h | |
parent | 9a7da182fa936d28658daadef83e0b8f7104487b (diff) |
x86: Add basic cache operations
Add functions to enable/disable the data cache.
Signed-off-by: Stefan Reinauer <reinauer@chromium.org>
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'arch/x86/include/asm/cache.h')
-rw-r--r-- | arch/x86/include/asm/cache.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/arch/x86/include/asm/cache.h b/arch/x86/include/asm/cache.h index 87c9e0be42..d4678d4916 100644 --- a/arch/x86/include/asm/cache.h +++ b/arch/x86/include/asm/cache.h @@ -32,4 +32,20 @@ #define ARCH_DMA_MINALIGN 64 #endif +static inline void wbinvd(void) +{ + asm volatile ("wbinvd" : : : "memory"); +} + +static inline void invd(void) +{ + asm volatile("invd" : : : "memory"); +} + +/* Enable caches and write buffer */ +void enable_caches(void); + +/* Disable caches and write buffer */ +void disable_caches(void); + #endif /* __X86_CACHE_H__ */ |