mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2026-06-08 01:54:44 +00:00
hv: pgtable: fix 'Use of function like macro'
Convert HPA2HVA, HVA2HPA, GPA2HVA and HVA2GPA to inline functions.
v1 -> v2:
* Modify the following statement.
rsdp = biosacpi_search_rsdp((char *)hpa2hva((uint64_t)(*addr << 4)),
0x400);
Instead of "(uint64_t)(*addr << 4)", "(uint64_t)(*addr) << 4U" would
be clearer.
Tracked-On: #861
Signed-off-by: Shiqing Gao <shiqing.gao@intel.com>
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
This commit is contained in:
@@ -73,7 +73,7 @@ int parse_hv_cmdline(void)
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
mbi = (struct multiboot_info *)(HPA2HVA((uint64_t)boot_regs[1]));
|
||||
mbi = (struct multiboot_info *)(hpa2hva((uint64_t)boot_regs[1]));
|
||||
dev_dbg(ACRN_DBG_PARSE, "Multiboot detected, flag=0x%x", mbi->mi_flags);
|
||||
|
||||
if (!(mbi->mi_flags & MULTIBOOT_INFO_HAS_CMDLINE)) {
|
||||
@@ -81,7 +81,7 @@ int parse_hv_cmdline(void)
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
start = (char *)HPA2HVA((uint64_t)mbi->mi_cmdline);
|
||||
start = (char *)hpa2hva((uint64_t)mbi->mi_cmdline);
|
||||
dev_dbg(ACRN_DBG_PARSE, "hv cmdline: %s", start);
|
||||
|
||||
do {
|
||||
|
||||
Reference in New Issue
Block a user