From 058624b9e4a079ebb2a27283276c5e31ff301fc6 Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Sat, 24 Feb 2018 01:52:30 -0500 Subject: [PATCH] arm: move arm_log_exception into .c file Avoid need for qemu/log.h inclusion, and make the function static too. Backports commit 27a7ea8a1f351578ce869b41ba1ba662c063fd62 from qemu --- qemu/target-arm/helper.c | 15 +++++++++++++++ qemu/target-arm/internals.h | 15 --------------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/qemu/target-arm/helper.c b/qemu/target-arm/helper.c index 240670b2..4c5d819c 100644 --- a/qemu/target-arm/helper.c +++ b/qemu/target-arm/helper.c @@ -5066,6 +5066,21 @@ static void do_v7m_exception_exit(CPUARMState *env) pointer. */ } +static void arm_log_exception(int idx) +{ + if (qemu_loglevel_mask(CPU_LOG_INT)) { + const char *exc = NULL; + + if (idx >= 0 && idx < ARRAY_SIZE(excnames)) { + exc = excnames[idx]; + } + if (!exc) { + exc = "unknown"; + } + qemu_log_mask(CPU_LOG_INT, "Taking exception %d [%s]\n", idx, exc); + } +} + void arm_v7m_cpu_do_interrupt(CPUState *cs) { CPUARMState *env = cs->env_ptr; diff --git a/qemu/target-arm/internals.h b/qemu/target-arm/internals.h index 73b45a81..a9d3e5de 100644 --- a/qemu/target-arm/internals.h +++ b/qemu/target-arm/internals.h @@ -73,21 +73,6 @@ static const char * const excnames[] = { "Semihosting call", }; -static inline void arm_log_exception(int idx) -{ - if (qemu_loglevel_mask(CPU_LOG_INT)) { - const char *exc = NULL; - - if (idx >= 0 && idx < ARRAY_SIZE(excnames)) { - exc = excnames[idx]; - } - if (!exc) { - exc = "unknown"; - } - qemu_log_mask(CPU_LOG_INT, "Taking exception %d [%s]\n", idx, exc); - } -} - /* Scale factor for generic timers, ie number of ns per tick. * This gives a 62.5MHz timer. */