From: Jan Kiszka <[email protected]> It was not enough to only rename lapic_timer_period back to lapic_timer_frequency for older kernels. First, our macro RESOLVE_EXTERNAL_SYMBOL was not prepared to be provided a macro as well and was still using the untranslated 5.3-name. And if we do not want to break up that macro, we need to map lapic_timer_period_sym as well.
Reported-by: Ralf Ramsauer <[email protected]> Fixes: e7674ea7425f ("driver: Account for renaming of lapic_timer_frequency in 5.3") Signed-off-by: Jan Kiszka <[email protected]> --- driver/main.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/driver/main.c b/driver/main.c index b3896609..a9bd3384 100644 --- a/driver/main.c +++ b/driver/main.c @@ -102,6 +102,7 @@ static typeof(ioremap_page_range) *ioremap_page_range_sym; #ifdef CONFIG_X86 #if LINUX_VERSION_CODE < KERNEL_VERSION(5,3,0) #define lapic_timer_period lapic_timer_frequency +#define lapic_timer_period_sym lapic_timer_frequency_sym #endif static typeof(lapic_timer_period) *lapic_timer_period_sym; #endif @@ -889,14 +890,15 @@ static int __init jailhouse_init(void) int err; #ifdef CONFIG_KALLSYMS_ALL -#define RESOLVE_EXTERNAL_SYMBOL(symbol) \ +#define __RESOLVE_EXTERNAL_SYMBOL(symbol) \ symbol##_sym = (void *)kallsyms_lookup_name(#symbol); \ if (!symbol##_sym) \ return -EINVAL #else -#define RESOLVE_EXTERNAL_SYMBOL(symbol) \ +#define __RESOLVE_EXTERNAL_SYMBOL(symbol) \ symbol##_sym = &symbol #endif +#define RESOLVE_EXTERNAL_SYMBOL(symbol...) __RESOLVE_EXTERNAL_SYMBOL(symbol) RESOLVE_EXTERNAL_SYMBOL(ioremap_page_range); #ifdef CONFIG_X86 -- 2.16.4 -- You received this message because you are subscribed to the Google Groups "Jailhouse" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jailhouse-dev/33316540-6f94-515c-4199-aa5d046d2953%40web.de.
