2 * Copyright (C) 1996 Paul Mackerras.
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License
6 * as published by the Free Software Foundation; either version
7 * 2 of the License, or (at your option) any later version.
11 static inline unsigned long get_ ## reg (void) \
12 { unsigned long ret; asm volatile ("mf" #reg " %0" : "=r" (ret) :); return ret; }
15 static inline void set_ ## reg (unsigned long val) \
16 { asm volatile ("mt" #reg " %0" : : "r" (val)); }
22 #define GSETSPR(n, name) \
23 static inline long get_ ## name (void) \
24 { long ret; asm volatile ("mfspr %0," #n : "=r" (ret) : ); return ret; } \
25 static inline void set_ ## name (long val) \
26 { asm volatile ("mtspr " #n ",%0" : : "r" (val)); }
52 static inline void store_inst(void *p
)
54 asm volatile ("dcbst 0,%0; sync; icbi 0,%0; isync" : : "r" (p
));
57 static inline void cflush(void *p
)
59 asm volatile ("dcbf 0,%0; icbi 0,%0" : : "r" (p
));
62 static inline void cinval(void *p
)
64 asm volatile ("dcbi 0,%0; icbi 0,%0" : : "r" (p
));