From 029256c2efe22746e4e4e7d3ab9c652b0f9e6e9b Mon Sep 17 00:00:00 2001 From: Stefan Lankes Date: Thu, 3 Aug 2017 11:52:52 +0200 Subject: [PATCH] add option to disable mwait support --- arch/x86/kernel/tasks.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/arch/x86/kernel/tasks.c b/arch/x86/kernel/tasks.c index 81d38aeca..656dbc820 100644 --- a/arch/x86/kernel/tasks.c +++ b/arch/x86/kernel/tasks.c @@ -193,9 +193,11 @@ int create_default_frame(task_t* task, entry_point_t ep, void* arg, uint32_t cor return 0; } +#define USE_MWAIT + void wait_for_task(void) { -#if 1 +#ifndef USE_MWAIT HALT; #else if (!has_mwait()) { @@ -214,7 +216,7 @@ void wait_for_task(void) void wakeup_core(uint32_t core_id) { -#if 0 +#ifdef USE_MWAIT // if mwait is available, an IPI isn't required to wakeup the core if (has_mwait()) return;