From 7ee59313932398aa2781503d25154c56301b9b73 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Fri, 1 Jun 2018 07:11:12 +0200 Subject: Remove Clock_driver_support_shutdown_hardware() The aim of this clock driver hook was to stop clock tick interrupts at some late point in the exit() procedure. The use of atexit() pulls in malloc() which pulls in errno. It is incompatible with the intention of the CONFIGURE_DISABLE_NEWLIB_REENTRANCY configuration option. The exit() function must be called from thread context, so accompanied clock tick interrupts should cause no harm. On the contrary, someone may assume a normal operating system operation, e.g. working timeouts. Remove the Clock_driver_support_shutdown_hardware() clock driver hook. Close #3436. --- bsps/or1k/generic_or1k/clock/clockdrv.c | 17 ----------------- 1 file changed, 17 deletions(-) (limited to 'bsps/or1k/generic_or1k/clock/clockdrv.c') diff --git a/bsps/or1k/generic_or1k/clock/clockdrv.c b/bsps/or1k/generic_or1k/clock/clockdrv.c index 569421da6f..e2a8e4db17 100644 --- a/bsps/or1k/generic_or1k/clock/clockdrv.c +++ b/bsps/or1k/generic_or1k/clock/clockdrv.c @@ -112,21 +112,6 @@ static void generic_or1k_clock_initialize(void) rtems_timecounter_install(&or1ksim_tc); } -static void generic_or1k_clock_cleanup(void) -{ - uint32_t sr; - - sr = _OR1K_mfspr(CPU_OR1K_SPR_SR); - - /* Disable tick timer exceptions */ - _OR1K_mtspr(CPU_OR1K_SPR_SR, (sr & ~CPU_OR1K_SPR_SR_IEE) - & ~CPU_OR1K_SPR_SR_TEE); - - /* Invalidate tick timer config registers */ - _OR1K_mtspr(CPU_OR1K_SPR_TTCR, 0); - _OR1K_mtspr(CPU_OR1K_SPR_TTMR, 0); -} - CPU_Counter_ticks _CPU_Counter_difference( CPU_Counter_ticks second, CPU_Counter_ticks first @@ -142,6 +127,4 @@ CPU_Counter_ticks _CPU_Counter_difference( #define Clock_driver_support_install_isr(isr) \ generic_or1k_clock_handler_install(isr) -#define Clock_driver_support_shutdown_hardware() generic_or1k_clock_cleanup() - #include "../../../shared/dev/clock/clockimpl.h" -- cgit v1.2.3