| .. | .. |
|---|
| 8 | 8 | #ifndef __ASM_CTL_REG_H |
|---|
| 9 | 9 | #define __ASM_CTL_REG_H |
|---|
| 10 | 10 | |
|---|
| 11 | | -#include <linux/const.h> |
|---|
| 11 | +#include <linux/bits.h> |
|---|
| 12 | 12 | |
|---|
| 13 | | -#define CR0_CLOCK_COMPARATOR_SIGN _BITUL(63 - 10) |
|---|
| 14 | | -#define CR0_EMERGENCY_SIGNAL_SUBMASK _BITUL(63 - 49) |
|---|
| 15 | | -#define CR0_EXTERNAL_CALL_SUBMASK _BITUL(63 - 50) |
|---|
| 16 | | -#define CR0_CLOCK_COMPARATOR_SUBMASK _BITUL(63 - 52) |
|---|
| 17 | | -#define CR0_CPU_TIMER_SUBMASK _BITUL(63 - 53) |
|---|
| 18 | | -#define CR0_SERVICE_SIGNAL_SUBMASK _BITUL(63 - 54) |
|---|
| 19 | | -#define CR0_UNUSED_56 _BITUL(63 - 56) |
|---|
| 20 | | -#define CR0_INTERRUPT_KEY_SUBMASK _BITUL(63 - 57) |
|---|
| 21 | | -#define CR0_MEASUREMENT_ALERT_SUBMASK _BITUL(63 - 58) |
|---|
| 13 | +#define CR0_CLOCK_COMPARATOR_SIGN BIT(63 - 10) |
|---|
| 14 | +#define CR0_LOW_ADDRESS_PROTECTION BIT(63 - 35) |
|---|
| 15 | +#define CR0_EMERGENCY_SIGNAL_SUBMASK BIT(63 - 49) |
|---|
| 16 | +#define CR0_EXTERNAL_CALL_SUBMASK BIT(63 - 50) |
|---|
| 17 | +#define CR0_CLOCK_COMPARATOR_SUBMASK BIT(63 - 52) |
|---|
| 18 | +#define CR0_CPU_TIMER_SUBMASK BIT(63 - 53) |
|---|
| 19 | +#define CR0_SERVICE_SIGNAL_SUBMASK BIT(63 - 54) |
|---|
| 20 | +#define CR0_UNUSED_56 BIT(63 - 56) |
|---|
| 21 | +#define CR0_INTERRUPT_KEY_SUBMASK BIT(63 - 57) |
|---|
| 22 | +#define CR0_MEASUREMENT_ALERT_SUBMASK BIT(63 - 58) |
|---|
| 22 | 23 | |
|---|
| 23 | | -#define CR2_GUARDED_STORAGE _BITUL(63 - 59) |
|---|
| 24 | +#define CR2_GUARDED_STORAGE BIT(63 - 59) |
|---|
| 24 | 25 | |
|---|
| 25 | | -#define CR14_UNUSED_32 _BITUL(63 - 32) |
|---|
| 26 | | -#define CR14_UNUSED_33 _BITUL(63 - 33) |
|---|
| 27 | | -#define CR14_CHANNEL_REPORT_SUBMASK _BITUL(63 - 35) |
|---|
| 28 | | -#define CR14_RECOVERY_SUBMASK _BITUL(63 - 36) |
|---|
| 29 | | -#define CR14_DEGRADATION_SUBMASK _BITUL(63 - 37) |
|---|
| 30 | | -#define CR14_EXTERNAL_DAMAGE_SUBMASK _BITUL(63 - 38) |
|---|
| 31 | | -#define CR14_WARNING_SUBMASK _BITUL(63 - 39) |
|---|
| 26 | +#define CR14_UNUSED_32 BIT(63 - 32) |
|---|
| 27 | +#define CR14_UNUSED_33 BIT(63 - 33) |
|---|
| 28 | +#define CR14_CHANNEL_REPORT_SUBMASK BIT(63 - 35) |
|---|
| 29 | +#define CR14_RECOVERY_SUBMASK BIT(63 - 36) |
|---|
| 30 | +#define CR14_DEGRADATION_SUBMASK BIT(63 - 37) |
|---|
| 31 | +#define CR14_EXTERNAL_DAMAGE_SUBMASK BIT(63 - 38) |
|---|
| 32 | +#define CR14_WARNING_SUBMASK BIT(63 - 39) |
|---|
| 32 | 33 | |
|---|
| 33 | 34 | #ifndef __ASSEMBLY__ |
|---|
| 34 | 35 | |
|---|
| .. | .. |
|---|
| 55 | 56 | : "i" (low), "i" (high)); \ |
|---|
| 56 | 57 | } while (0) |
|---|
| 57 | 58 | |
|---|
| 58 | | -static inline void __ctl_set_bit(unsigned int cr, unsigned int bit) |
|---|
| 59 | +static __always_inline void __ctl_set_bit(unsigned int cr, unsigned int bit) |
|---|
| 59 | 60 | { |
|---|
| 60 | 61 | unsigned long reg; |
|---|
| 61 | 62 | |
|---|
| .. | .. |
|---|
| 64 | 65 | __ctl_load(reg, cr, cr); |
|---|
| 65 | 66 | } |
|---|
| 66 | 67 | |
|---|
| 67 | | -static inline void __ctl_clear_bit(unsigned int cr, unsigned int bit) |
|---|
| 68 | +static __always_inline void __ctl_clear_bit(unsigned int cr, unsigned int bit) |
|---|
| 68 | 69 | { |
|---|
| 69 | 70 | unsigned long reg; |
|---|
| 70 | 71 | |
|---|
| .. | .. |
|---|
| 112 | 113 | }; |
|---|
| 113 | 114 | }; |
|---|
| 114 | 115 | |
|---|
| 115 | | -#ifdef CONFIG_SMP |
|---|
| 116 | | -# define ctl_set_bit(cr, bit) smp_ctl_set_bit(cr, bit) |
|---|
| 117 | | -# define ctl_clear_bit(cr, bit) smp_ctl_clear_bit(cr, bit) |
|---|
| 118 | | -#else |
|---|
| 119 | | -# define ctl_set_bit(cr, bit) __ctl_set_bit(cr, bit) |
|---|
| 120 | | -# define ctl_clear_bit(cr, bit) __ctl_clear_bit(cr, bit) |
|---|
| 121 | | -#endif |
|---|
| 116 | +#define ctl_set_bit(cr, bit) smp_ctl_set_bit(cr, bit) |
|---|
| 117 | +#define ctl_clear_bit(cr, bit) smp_ctl_clear_bit(cr, bit) |
|---|
| 122 | 118 | |
|---|
| 123 | 119 | #endif /* __ASSEMBLY__ */ |
|---|
| 124 | 120 | #endif /* __ASM_CTL_REG_H */ |
|---|