mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2026-01-04 23:24:56 +00:00
hv: use asm_pause() to replace inline ASM to satisfy MISRAC
pause_cpu() --> asm_pause() hlt_cpu() --> asm_hlt() inline ASM pause --> asm_pause() Tracked-On: #1821 Signed-off-by: Shuo A Liu <shuo.a.liu@intel.com> Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
@@ -306,12 +306,12 @@ static inline void cpu_msr_write(uint32_t reg, uint64_t msr_val)
|
||||
asm volatile (" wrmsr " : : "c" (reg), "a" ((uint32_t)msr_val), "d" ((uint32_t)(msr_val >> 32U)));
|
||||
}
|
||||
|
||||
static inline void pause_cpu(void)
|
||||
static inline void asm_pause(void)
|
||||
{
|
||||
asm volatile ("pause" ::: "memory");
|
||||
}
|
||||
|
||||
static inline void hlt_cpu(void)
|
||||
static inline void asm_hlt(void)
|
||||
{
|
||||
asm volatile ("hlt");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user