test/driver_time: fix page-fault of ARMv8a variant

The get_cycles() call within the test doesn't apply to RDTSC
access when running on ARM but to arch_timer_read_counter, which
is an empty function pointer. By setting it to a function that
returns Genode::Trace::timestamp() we can enable the test for ARM.

Issue #4775
This commit is contained in:
Stefan Kalkowski 2023-03-28 15:45:57 +02:00 committed by Christian Helmuth
parent 2269f42e17
commit 0bc5bcce4a
4 changed files with 16 additions and 6 deletions

View File

@ -73,11 +73,6 @@ int _printk_deferred(const char * fmt,...)
}
#include <clocksource/arm_arch_timer.h>
u64 (*arch_timer_read_counter)(void);
#include <linux/context_tracking_irq.h>
noinstr void ct_irq_enter(void)

View File

@ -0,0 +1,6 @@
#include <clocksource/arm_arch_timer.h>
extern unsigned long long lx_emul_timestamp(void);
u64 (*arch_timer_read_counter)(void) = lx_emul_timestamp;

View File

@ -1,5 +1,7 @@
REQUIRES := arm_64
SRC_C += lx_emul/shadow/arch/arm64/kernel/smp.c
SRC_CC += timestamp.cc
SRC_C += lx_emul.c
SRC_C += lx_emul/shadow/arch/arm64/kernel/smp.c
include $(PRG_DIR)/../../target.inc

View File

@ -0,0 +1,7 @@
#include <trace/timestamp.h>
extern "C" unsigned long long lx_emul_timestamp();
extern "C" unsigned long long lx_emul_timestamp()
{
return Genode::Trace::timestamp();
}