1 /* SPDX-License-Identifier: GPL-2.0-only */ 1 2 /* 3 * Helpers/definitions related to MSR access. 4 */ 5 6 #ifndef BOOT_MSR_H 7 #define BOOT_MSR_H 8 9 #include <asm/shared/msr.h> 10 11 /* 12 * The kernel proper already defines rdmsr()/w 13 * boot kernel since they rely on tracepoint/e 14 * that's not available here. 15 */ 16 static inline void boot_rdmsr(unsigned int reg 17 { 18 asm volatile("rdmsr" : "=a" (m->l), "= 19 } 20 21 static inline void boot_wrmsr(unsigned int reg 22 { 23 asm volatile("wrmsr" : : "c" (reg), "a 24 } 25 26 #endif /* BOOT_MSR_H */ 27
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.