Go to the documentation of this file.
7 #ifndef __ASM_CTL_REG_H
8 #define __ASM_CTL_REG_H
12 #define __ctl_load(array, low, high) ({ \
13 typedef struct { char _[sizeof(array)]; } addrtype; \
16 : : "Q" (*(addrtype *)(&array)), \
17 "i" (low), "i" (high)); \
20 #define __ctl_store(array, low, high) ({ \
21 typedef struct { char _[sizeof(array)]; } addrtype; \
24 : "=Q" (*(addrtype *)(&array)) \
25 : "i" (low), "i" (high)); \
30 #define __ctl_load(array, low, high) ({ \
31 typedef struct { char _[sizeof(array)]; } addrtype; \
34 : : "Q" (*(addrtype *)(&array)), \
35 "i" (low), "i" (high)); \
38 #define __ctl_store(array, low, high) ({ \
39 typedef struct { char _[sizeof(array)]; } addrtype; \
42 : "=Q" (*(addrtype *)(&array)) \
43 : "i" (low), "i" (high)); \
48 #define __ctl_set_bit(cr, bit) ({ \
49 unsigned long __dummy; \
50 __ctl_store(__dummy, cr, cr); \
51 __dummy |= 1UL << (bit); \
52 __ctl_load(__dummy, cr, cr); \
55 #define __ctl_clear_bit(cr, bit) ({ \
56 unsigned long __dummy; \
57 __ctl_store(__dummy, cr, cr); \
58 __dummy &= ~(1UL << (bit)); \
59 __ctl_load(__dummy, cr, cr); \
66 #define ctl_set_bit(cr, bit) smp_ctl_set_bit(cr, bit)
67 #define ctl_clear_bit(cr, bit) smp_ctl_clear_bit(cr, bit)
71 #define ctl_set_bit(cr, bit) __ctl_set_bit(cr, bit)
72 #define ctl_clear_bit(cr, bit) __ctl_clear_bit(cr, bit)