There is no need for the overhead of a call to a separate translation unit.
While moving the implementation, update them to use uint64_t over u64
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
#endif
string_param("nmi", opt_nmi);
-DEFINE_PER_CPU(u64, efer);
+DEFINE_PER_CPU(uint64_t, efer);
static DEFINE_PER_CPU(unsigned long, last_extable_addr);
DEFINE_PER_CPU_READ_MOSTLY(u32, ler_msr);
return;
}
-u64 read_efer(void)
-{
- return this_cpu(efer);
-}
-
-void write_efer(u64 val)
-{
- this_cpu(efer) = val;
- wrmsrl(MSR_EFER, val);
-}
-
static void ler_enable(void)
{
u64 debugctl;
wrmsrl(MSR_GS_BASE, base);
}
-DECLARE_PER_CPU(u64, efer);
-u64 read_efer(void);
-void write_efer(u64 val);
+DECLARE_PER_CPU(uint64_t, efer);
+static inline uint64_t read_efer(void)
+{
+ return this_cpu(efer);
+}
+
+static inline void write_efer(uint64_t val)
+{
+ this_cpu(efer) = val;
+ wrmsrl(MSR_EFER, val);
+}
DECLARE_PER_CPU(u32, ler_msr);