mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-07-31 07:20:55 +00:00
hv: clean up udelay/mdelay related code
- replace the usage of mdelay with udelay - remove lib/mdelay.c - rename udelay.c to misc.c future other small APIs could put in misc.c Tracked-On: #861 Signed-off-by: Shiqing Gao <shiqing.gao@intel.com> Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
parent
7cab77dace
commit
d84f7a4fd5
@ -152,8 +152,7 @@ C_SRCS += arch/x86/guest/instr_emul.c
|
|||||||
C_SRCS += arch/x86/guest/ucode.c
|
C_SRCS += arch/x86/guest/ucode.c
|
||||||
C_SRCS += arch/x86/guest/pm.c
|
C_SRCS += arch/x86/guest/pm.c
|
||||||
C_SRCS += lib/spinlock.c
|
C_SRCS += lib/spinlock.c
|
||||||
C_SRCS += lib/udelay.c
|
C_SRCS += lib/misc.c
|
||||||
C_SRCS += lib/mdelay.c
|
|
||||||
C_SRCS += lib/string.c
|
C_SRCS += lib/string.c
|
||||||
C_SRCS += lib/memory.c
|
C_SRCS += lib/memory.c
|
||||||
C_SRCS += lib/crypto/hkdf_wrap.c
|
C_SRCS += lib/crypto/hkdf_wrap.c
|
||||||
|
@ -382,8 +382,10 @@ send_startup_ipi(enum intr_cpu_startup_shorthand cpu_startup_shorthand,
|
|||||||
/* Give 10ms for INIT sequence to complete for old processors.
|
/* Give 10ms for INIT sequence to complete for old processors.
|
||||||
* Modern processors (family == 6) don't need to wait here.
|
* Modern processors (family == 6) don't need to wait here.
|
||||||
*/
|
*/
|
||||||
if (boot_cpu_data.family != 6U)
|
if (boot_cpu_data.family != 6U) {
|
||||||
mdelay(10U);
|
/* delay 10ms */
|
||||||
|
udelay(10000U);
|
||||||
|
}
|
||||||
|
|
||||||
/* De-assert INIT IPI */
|
/* De-assert INIT IPI */
|
||||||
write_lapic_reg32(LAPIC_INT_COMMAND_REGISTER_1, icr.value_32.hi_32);
|
write_lapic_reg32(LAPIC_INT_COMMAND_REGISTER_1, icr.value_32.hi_32);
|
||||||
|
@ -27,7 +27,6 @@ int strncmp(const char *s1_arg, const char *s2_arg, size_t n_arg);
|
|||||||
char *strcpy_s(char *d_arg, size_t dmax, const char *s_arg);
|
char *strcpy_s(char *d_arg, size_t dmax, const char *s_arg);
|
||||||
char *strncpy_s(char *d_arg, size_t dmax, const char *s_arg, size_t slen_arg);
|
char *strncpy_s(char *d_arg, size_t dmax, const char *s_arg, size_t slen_arg);
|
||||||
char *strchr(const char *s_arg, int ch);
|
char *strchr(const char *s_arg, int ch);
|
||||||
void mdelay(uint32_t loop_count_arg);
|
|
||||||
size_t strnlen_s(const char *str_arg, size_t maxlen_arg);
|
size_t strnlen_s(const char *str_arg, size_t maxlen_arg);
|
||||||
void *memset(void *base, uint8_t v, size_t n);
|
void *memset(void *base, uint8_t v, size_t n);
|
||||||
void *memcpy_s(void *d, size_t dmax, const void *s, size_t slen_arg);
|
void *memcpy_s(void *d, size_t dmax, const void *s, size_t slen_arg);
|
||||||
|
@ -1,18 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (C) 2018 Intel Corporation. All rights reserved.
|
|
||||||
*
|
|
||||||
* SPDX-License-Identifier: BSD-3-Clause
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <hv_lib.h>
|
|
||||||
|
|
||||||
void mdelay(uint32_t loop_count_arg)
|
|
||||||
{
|
|
||||||
uint32_t loop_count = loop_count_arg;
|
|
||||||
/* Loop until done */
|
|
||||||
while (loop_count != 0U) {
|
|
||||||
/* Delay for 1 ms */
|
|
||||||
udelay(1000U);
|
|
||||||
loop_count--;
|
|
||||||
}
|
|
||||||
}
|
|
Loading…
Reference in New Issue
Block a user