函数源码

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source File:arch\x86\include\asm\msr.h Create Date:2022-07-27 06:38:57
首页 Copyright©Brick

309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
#define rdpmc(counter, low, high)           \
do {                            \
    u64 _l = native_read_pmc((counter));        \
    (low)  = (u32)_l;               \
    (high) = (u32)(_l >> 32);           \
} while (0)
 
#define rdpmcl(counter, val) ((val) = native_read_pmc(counter))
 
#endif  /* !CONFIG_PARAVIRT_XXL */
 
/*
 * 64-bit version of wrmsr_safe():
 */
static inline int wrmsrl_safe(u32 msr, u64 val)
{
    return wrmsr_safe(msr, (u32)val,  (u32)(val >> 32));
}