bsps: Default to CPU counter benchmark timer

Most BSPs which used the stubbed benachmark timer provide a CPU counter.
All BSPs provide at least a stub CPU counter.  Simply use the benchmark
timer implementation using the CPU counter.
This commit is contained in:
Sebastian Huber
2022-01-15 19:45:46 +01:00
parent 944c210b3d
commit 4e530464b0
22 changed files with 21 additions and 51 deletions

View File

@@ -1,30 +0,0 @@
/*
* This file implements a stub benchmark timer that is sufficient to
* satisfy linking the RTEMS Benchmarks.
*
* COPYRIGHT (c) 1989-2001.
* On-Line Applications Research Corporation (OAR).
*/
#include <bsp.h>
#include <rtems/btimer.h>
bool benchmark_timer_find_average_overhead;
void benchmark_timer_initialize(void)
{
}
benchmark_timer_t benchmark_timer_read(void)
{
if (benchmark_timer_find_average_overhead)
return 1;
return 0;
}
void benchmark_timer_disable_subtracting_average_overhead(
bool find_flag
)
{
benchmark_timer_find_average_overhead = find_flag;
}

View File

@@ -129,7 +129,7 @@ source:
- bsps/arm/shared/cp15/arm-cp15-set-exception-handler.c
- bsps/arm/shared/cp15/arm-cp15-set-ttb-entries.c
- bsps/arm/shared/start/bsp-start-memcpy.S
- bsps/shared/dev/btimer/btimer-stub.c
- bsps/shared/dev/btimer/btimer-cpucounter.c
- bsps/shared/dev/getentropy/getentropy-cpucounter.c
- bsps/shared/dev/irq/arm-gicv2.c
- bsps/shared/dev/irq/arm-gicv2-get-attributes.c

View File

@@ -400,7 +400,7 @@ source:
- bsps/arm/shared/irq/irq-dispatch-armv7m.c
- bsps/arm/shared/start/bsp-start-memcpy.S
- bsps/arm/shared/start/bspreset-armv7m.c
- bsps/shared/dev/btimer/btimer-stub.c
- bsps/shared/dev/btimer/btimer-cpucounter.c
- bsps/shared/dev/rtc/rtc-support.c
- bsps/shared/dev/serial/console-termios.c
- bsps/shared/irq/irq-default-handler.c

View File

@@ -47,7 +47,7 @@ source:
- bsps/arm/shared/cp15/arm-cp15-set-exception-handler.c
- bsps/arm/shared/cp15/arm-cp15-set-ttb-entries.c
- bsps/arm/shared/start/bsp-start-memcpy.S
- bsps/shared/dev/btimer/btimer-stub.c
- bsps/shared/dev/btimer/btimer-cpucounter.c
- bsps/shared/dev/cpucounter/cpucounterfrequency.c
- bsps/shared/dev/cpucounter/cpucounterread.c
- bsps/shared/dev/getentropy/getentropy-cpucounter.c

View File

@@ -98,7 +98,7 @@ source:
- bsps/arm/shared/pins/imx-gpio.c
- bsps/arm/shared/pins/imx_iomux.c
- bsps/arm/shared/start/bsp-start-memcpy.S
- bsps/shared/dev/btimer/btimer-stub.c
- bsps/shared/dev/btimer/btimer-cpucounter.c
- bsps/shared/dev/clock/arm-generic-timer.c
- bsps/shared/dev/getentropy/getentropy-cpucounter.c
- bsps/shared/dev/irq/arm-gicv2.c

View File

@@ -258,7 +258,7 @@ source:
- bsps/arm/shared/pins/imx_iomux.c
- bsps/arm/shared/start/bsp-start-memcpy.S
- bsps/arm/shared/start/bspreset-armv7m.c
- bsps/shared/dev/btimer/btimer-stub.c
- bsps/shared/dev/btimer/btimer-cpucounter.c
- bsps/shared/dev/getentropy/getentropy-cpucounter.c
- bsps/shared/dev/serial/console-termios.c
- bsps/shared/irq/irq-default-handler.c

View File

@@ -40,7 +40,7 @@ source:
- bsps/arm/shared/start/bsp-start-memcpy.S
- bsps/arm/shared/start/bspreset-armv7m.c
- bsps/shared/cache/nocache.c
- bsps/shared/dev/btimer/btimer-stub.c
- bsps/shared/dev/btimer/btimer-cpucounter.c
- bsps/shared/dev/cpucounter/cpucounterfrequency.c
- bsps/shared/dev/cpucounter/cpucounterread.c
- bsps/shared/dev/getentropy/getentropy-cpucounter.c

View File

@@ -71,7 +71,7 @@ source:
- bsps/arm/shared/fb/arm-pl111.c
- bsps/arm/shared/serial/arm-pl050.c
- bsps/arm/shared/start/bsp-start-memcpy.S
- bsps/shared/dev/btimer/btimer-stub.c
- bsps/shared/dev/btimer/btimer-cpucounter.c
- bsps/shared/dev/getentropy/getentropy-cpucounter.c
- bsps/shared/dev/irq/arm-gicv2.c
- bsps/shared/dev/irq/arm-gicv2-get-attributes.c

View File

@@ -55,7 +55,7 @@ source:
- bsps/arm/stm32f4/start/rcc.c
- bsps/arm/stm32f4/start/start-config-io.c
- bsps/shared/cache/nocache.c
- bsps/shared/dev/btimer/btimer-stub.c
- bsps/shared/dev/btimer/btimer-cpucounter.c
- bsps/shared/dev/cpucounter/cpucounterfrequency.c
- bsps/shared/dev/cpucounter/cpucounterread.c
- bsps/shared/dev/getentropy/getentropy-cpucounter.c

View File

@@ -330,7 +330,7 @@ source:
- bsps/arm/stm32h7/start/stm32h7-hal-uart.c
- bsps/arm/stm32h7/start/stm32h7-hal.c
- bsps/arm/stm32h7/start/system_stm32h7xx.c
- bsps/shared/dev/btimer/btimer-stub.c
- bsps/shared/dev/btimer/btimer-cpucounter.c
- bsps/shared/dev/rtc/rtc-support.c
- bsps/shared/dev/serial/console-termios.c
- bsps/shared/irq/irq-default-handler.c

View File

@@ -70,7 +70,7 @@ source:
- bsps/arm/xen/start/bspstart.c
- bsps/arm/xen/start/bspstarthooks.c
- bsps/arm/xen/start/bspstartmmu.c
- bsps/shared/dev/btimer/btimer-stub.c
- bsps/shared/dev/btimer/btimer-cpucounter.c
- bsps/shared/dev/clock/arm-generic-timer.c
- bsps/shared/dev/getentropy/getentropy-cpucounter.c
- bsps/shared/dev/irq/arm-gicv2.c

View File

@@ -35,7 +35,7 @@ source:
- bsps/arm/xilinx-zynq/start/bspstart.c
- bsps/arm/xilinx-zynq/start/bspstarthooks.c
- bsps/arm/xilinx-zynq/start/bspstartmmu.c
- bsps/shared/dev/btimer/btimer-stub.c
- bsps/shared/dev/btimer/btimer-cpucounter.c
- bsps/shared/dev/getentropy/getentropy-cpucounter.c
- bsps/shared/dev/irq/arm-gicv2.c
- bsps/shared/dev/irq/arm-gicv2-get-attributes.c

View File

@@ -93,7 +93,7 @@ source:
- bsps/arm/xilinx-zynqmp/start/bspstart.c
- bsps/arm/xilinx-zynqmp/start/bspstarthooks.c
- bsps/arm/xilinx-zynqmp/start/bspstartmmu.c
- bsps/shared/dev/btimer/btimer-stub.c
- bsps/shared/dev/btimer/btimer-cpucounter.c
- bsps/shared/dev/clock/arm-generic-timer.c
- bsps/shared/dev/getentropy/getentropy-cpucounter.c
- bsps/shared/dev/irq/arm-gicv2.c

View File

@@ -57,7 +57,7 @@ source:
- bsps/mips/shared/irq/vectorexceptions.c
- bsps/mips/shared/start/idttlb.S
- bsps/shared/cache/nocache.c
- bsps/shared/dev/btimer/btimer-stub.c
- bsps/shared/dev/btimer/btimer-cpucounter.c
- bsps/shared/dev/getentropy/getentropy-cpucounter.c
- bsps/shared/dev/pci/pci_find_device.c
- bsps/shared/dev/serial/legacy-console-control.c

View File

@@ -43,7 +43,7 @@ source:
- bsps/moxie/moxiesim/console/console-io.c
- bsps/moxie/moxiesim/console/syscalls.S
- bsps/shared/cache/nocache.c
- bsps/shared/dev/btimer/btimer-stub.c
- bsps/shared/dev/btimer/btimer-cpucounter.c
- bsps/shared/dev/clock/clock-simidle.c
- bsps/shared/dev/getentropy/getentropy-cpucounter.c
- bsps/shared/dev/serial/console-polled.c

View File

@@ -62,7 +62,7 @@ source:
- bsps/powerpc/t32mppc/irq/irq.c
- bsps/powerpc/t32mppc/start/bspreset.c
- bsps/powerpc/t32mppc/start/bspstart.c
- bsps/shared/dev/btimer/btimer-stub.c
- bsps/shared/dev/btimer/btimer-cpucounter.c
- bsps/shared/dev/getentropy/getentropy-cpucounter.c
- bsps/shared/dev/serial/console-termios.c
- bsps/shared/irq/irq-default-handler.c

View File

@@ -26,7 +26,7 @@ source:
- bsps/riscv/griscv/start/bsp_fatal_halt.c
- bsps/riscv/griscv/start/bspstart.c
- bsps/shared/cache/nocache.c
- bsps/shared/dev/btimer/btimer-stub.c
- bsps/shared/dev/btimer/btimer-cpucounter.c
- bsps/shared/dev/getentropy/getentropy-cpucounter.c
- bsps/shared/dev/serial/console-termios.c
- bsps/shared/irq/irq-default-handler.c

View File

@@ -30,7 +30,7 @@ source:
- bsps/sh/shsim/start/ispshgdb.c
- bsps/sh/shsim/start/sysexit.c
- bsps/shared/cache/nocache.c
- bsps/shared/dev/btimer/btimer-stub.c
- bsps/shared/dev/btimer/btimer-cpucounter.c
- bsps/shared/dev/clock/clock-simidle.c
- bsps/shared/dev/getentropy/getentropy-cpucounter.c
- bsps/shared/dev/serial/console-polled.c

View File

@@ -40,7 +40,7 @@ links:
uid: ../../bspopts
source:
- bsps/shared/cache/nocache.c
- bsps/shared/dev/btimer/btimer-stub.c
- bsps/shared/dev/btimer/btimer-cpucounter.c
- bsps/shared/dev/getentropy/getentropy-cpucounter.c
- bsps/shared/dev/serial/legacy-console-control.c
- bsps/shared/dev/serial/legacy-console-select.c

View File

@@ -42,7 +42,7 @@ links:
uid: ../../bspopts
source:
- bsps/shared/cache/nocache.c
- bsps/shared/dev/btimer/btimer-stub.c
- bsps/shared/dev/btimer/btimer-cpucounter.c
- bsps/shared/dev/getentropy/getentropy-cpucounter.c
- bsps/shared/dev/serial/legacy-console-control.c
- bsps/shared/dev/serial/legacy-console-select.c

View File

@@ -22,7 +22,7 @@ install:
links: []
source:
- bsps/shared/cache/nocache.c
- bsps/shared/dev/btimer/btimer-stub.c
- bsps/shared/dev/btimer/btimer-cpucounter.c
- bsps/shared/dev/clock/clock-simidle.c
- bsps/shared/dev/getentropy/getentropy-cpucounter.c
- bsps/shared/dev/serial/console-polled.c

View File

@@ -40,7 +40,7 @@ links:
uid: ../../bspopts
source:
- bsps/shared/cache/nocache.c
- bsps/shared/dev/btimer/btimer-stub.c
- bsps/shared/dev/btimer/btimer-cpucounter.c
- bsps/shared/dev/getentropy/getentropy-cpucounter.c
- bsps/shared/dev/serial/console-termios-init.c
- bsps/shared/dev/serial/console-termios.c