Function loongarch_cpu_has_work() is defined as static, it is used
by files target/loongarch/cpu.c and target/loongarch/tcg/tcg_cpu.c,
set it as public and declare it in header file target/loongarch/cpu.h
The same with function cpu_loongarch_hw_interrupts_pending().
Signed-off-by: Bibo Mao <maobibo@loongson.cn>
---
target/loongarch/cpu.c | 4 ++--
target/loongarch/cpu.h | 3 +++
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/target/loongarch/cpu.c b/target/loongarch/cpu.c
index 20ef221fb2..6eb8c3214a 100644
--- a/target/loongarch/cpu.c
+++ b/target/loongarch/cpu.c
@@ -141,7 +141,7 @@ void loongarch_cpu_set_irq(void *opaque, int irq, int level)
}
/* Check if there is pending and not masked out interrupt */
-static inline bool cpu_loongarch_hw_interrupts_pending(CPULoongArchState *env)
+bool cpu_loongarch_hw_interrupts_pending(CPULoongArchState *env)
{
uint32_t pending;
uint32_t status;
@@ -154,7 +154,7 @@ static inline bool cpu_loongarch_hw_interrupts_pending(CPULoongArchState *env)
#endif
#ifndef CONFIG_USER_ONLY
-static bool loongarch_cpu_has_work(CPUState *cs)
+bool loongarch_cpu_has_work(CPUState *cs)
{
bool has_work = false;
diff --git a/target/loongarch/cpu.h b/target/loongarch/cpu.h
index c8b96f74dc..5475b6e44f 100644
--- a/target/loongarch/cpu.h
+++ b/target/loongarch/cpu.h
@@ -478,6 +478,9 @@ static inline void set_pc(CPULoongArchState *env, uint64_t value)
}
}
+bool loongarch_cpu_has_work(CPUState *cs);
+bool cpu_loongarch_hw_interrupts_pending(CPULoongArchState *env);
+
/*
* LoongArch CPUs hardware flags.
*/
--
2.39.3