diff --git a/arch/x86/soc/intel_quark/quark_se/soc_power.S b/arch/x86/soc/intel_quark/quark_se/soc_power.S index aeda722ac30f..0ce64ab46513 100644 --- a/arch/x86/soc/intel_quark/quark_se/soc_power.S +++ b/arch/x86/soc/intel_quark/quark_se/soc_power.S @@ -21,7 +21,7 @@ SECTION_FUNC(TEXT, save_cpu_context) pushf /* save flags */ pusha /* save GPRs */ -#if defined (CONFIG_DEBUG) || defined (CONFIG_SOC_WATCH) +#if defined (CONFIG_DEBUG) /* save the debug registers */ movl %dr0, %edx pushl %edx @@ -47,7 +47,7 @@ SECTION_FUNC(TEXT, _power_restore_cpu_context) lgdtl _pm_save_gdtr /* restore gdtr */ lidtl _pm_save_idtr /* restore idtr */ movl _pm_save_esp, %esp /* restore saved stack ptr */ -#if defined (CONFIG_DEBUG) || defined (CONFIG_SOC_WATCH) +#if defined (CONFIG_DEBUG) /* restore the debug registers */ popl %edx movl %edx, %dr7 diff --git a/ext/hal/qmsi/Kconfig b/ext/hal/qmsi/Kconfig index 8a0bd5583842..973f7b5912e0 100644 --- a/ext/hal/qmsi/Kconfig +++ b/ext/hal/qmsi/Kconfig @@ -41,10 +41,4 @@ config QMSI_INSTALL_PATH installed. Make sure this option is properly set when QMSI_LIBRARY is enabled otherwise the build will fail. -config SOC_WATCH - bool "Enable SoCWatch drivers and related instrumentation" - depends on KERNEL_EVENT_LOGGER - help - This option enables the SoCWatch driver and related instrumentation. - endif diff --git a/tests/power/power_states/src/main.c b/tests/power/power_states/src/main.c index 21c1ed1315d3..efb3d97b9fab 100644 --- a/tests/power/power_states/src/main.c +++ b/tests/power/power_states/src/main.c @@ -16,7 +16,6 @@ #include #include #include -#include "soc_watch_logger.h" static enum power_states states_list[] = { SYS_POWER_STATE_CPU_LPS, @@ -411,11 +410,6 @@ void test_power_state(void) build_suspend_device_list(); -#ifdef CONFIG_SOC_WATCH - /* Start the event monitoring thread */ - soc_watch_logger_thread_start(); -#endif - /* All our application does is putting the task to sleep so the kernel * triggers the suspend operation. */ diff --git a/tests/power/power_states/src/soc_watch_logger.c b/tests/power/power_states/src/soc_watch_logger.c deleted file mode 100644 index c432b2fd62aa..000000000000 --- a/tests/power/power_states/src/soc_watch_logger.c +++ /dev/null @@ -1,99 +0,0 @@ -/* - * Copyright (c) 2016 Intel Corporation. - * - * SPDX-License-Identifier: Apache-2.0 - */ - -#include "soc_watch_logger.h" - -#define STSIZE 512 -static K_THREAD_STACK_DEFINE(soc_watch_event_logger_stack, STSIZE); -static struct k_thread soc_watch_event_logger_data; - -/** - * @brief soc_watch data collector thread - * - * @details Collect the kernel event messages and pass them to - * soc_watch - * - * @return No return value. - */ -void soc_watch_data_collector(void) -{ -#ifdef CONFIG_SOC_WATCH - int res; - u32_t data[4]; - u8_t dropped_count; - u16_t event_id; - - /* We register the thread as collector to avoid this thread generating a - * context switch event every time it collects the data - */ - sys_k_event_logger_register_as_collector(); - - while (1) { - /* collect the data */ - u8_t data_length = SIZE32_OF(data); - - res = sys_k_event_logger_get_wait(&event_id, &dropped_count, - data, &data_length); - - if (res > 0) { - - /* process the data */ - switch (event_id) { -#ifdef CONFIG_KERNEL_EVENT_LOGGER_CONTEXT_SWITCH - case KERNEL_EVENT_LOGGER_CONTEXT_SWITCH_EVENT_ID: - if (data_length != 2) { - PRINTF("\x1b[13;1HError in context switch message. " - "event_id = %d, Expected %d, received %d\n", - event_id, 2, data_length); - } else { - /* Log context switch event for SoCWatch */ - SOC_WATCH_LOG_APP_EVENT(SOCW_EVENT_APP, - event_id, data[1]); - } - break; -#endif -#ifdef CONFIG_KERNEL_EVENT_LOGGER_INTERRUPT - case KERNEL_EVENT_LOGGER_INTERRUPT_EVENT_ID: - if (data_length != 2) { - PRINTF("\x1b[13;1HError in interrupt message. " - "event_id = %d, Expected %d, received %d\n", - event_id, 2, data_length); - } else { - /* Log interrupt event for SoCWatch */ - SOC_WATCH_LOG_EVENT(SOCW_EVENT_INTERRUPT, data[1]); - } - break; -#endif - default: - PRINTF("unrecognized event id %d", event_id); - } - } else { - /* This error should never happen */ - if (res == -EMSGSIZE) { - PRINTF("FATAL ERROR. The buffer provided to collect the " - "profiling events is too small\n"); - } - } - } -#endif -} - -/** - * @brief Start the soc_watch logger thread - * - * @details Start the soc_watch data collector thread - * - * @return No return value. - */ -void soc_watch_logger_thread_start(void) -{ - PRINTF("\x1b[2J\x1b[15;1H"); - - k_thread_create(&soc_watch_event_logger_data, - soc_watch_event_logger_stack, STSIZE, - (k_thread_entry_t) soc_watch_data_collector, 0, 0, 0, - 6, 0, 0); -} diff --git a/tests/power/power_states/src/soc_watch_logger.h b/tests/power/power_states/src/soc_watch_logger.h deleted file mode 100644 index 12038d135978..000000000000 --- a/tests/power/power_states/src/soc_watch_logger.h +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Copyright (c) 2016 Intel Corporation. - * - * SPDX-License-Identifier: Apache-2.0 - */ - -#include -#include -#include -#include -#include "soc_watch.h" - -#if defined(CONFIG_STDOUT_CONSOLE) -#define PRINTF(...) { char output[256]; \ - sprintf(output, __VA_ARGS__); puts(output); } -#else -#define PRINTF(...) printk(__VA_ARGS__) -#endif - -void soc_watch_data_collector(void); -void soc_watch_logger_thread_start(void); diff --git a/tests/power/power_states/testcase.yaml b/tests/power/power_states/testcase.yaml index 26a66563a77a..289a19893ada 100644 --- a/tests/power/power_states/testcase.yaml +++ b/tests/power/power_states/testcase.yaml @@ -4,9 +4,3 @@ tests: platform_exclude: tinytile tags: power depends_on: rtc - power_management.power_states.socwatch: - extra_args: CONF_FILE="prj_socwatch.conf" - filter: CONFIG_SOC_QUARK_SE_C1000 - platform_exclude: tinytile - tags: power - depends_on: rtc