diff options
author | Matt Fleming <matt.fleming@intel.com> | 2013-07-02 12:50:54 +0100 |
---|---|---|
committer | Matt Fleming <matt.fleming@intel.com> | 2013-07-02 13:03:14 +0100 |
commit | 6bdbba2ff6d6e6235ba59e083eebaa6baa42350f (patch) | |
tree | 4b7afec7eaeff877422c5570d7fc310667744050 | |
parent | 9d4ab9d6ae3149465368e19334bf8f162cc36051 (diff) | |
download | syslinux-6bdbba2ff6d6e6235ba59e083eebaa6baa42350f.tar.gz |
core: we only need one reset_idle()
We don't need both an assembly version of reset_idle and an
implementation in C. Having these two functions has led to a bug where
we may idle with interrupts disabled because an 'sti' is only performed
in the assembly version. This lead to a hang waiting for user input.
Cc: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
-rw-r--r-- | core/idle.c | 1 | ||||
-rw-r--r-- | core/idle.inc | 8 | ||||
-rw-r--r-- | core/pxelinux.asm | 3 |
3 files changed, 3 insertions, 9 deletions
diff --git a/core/idle.c b/core/idle.c index a089b088..7f76a14c 100644 --- a/core/idle.c +++ b/core/idle.c @@ -32,6 +32,7 @@ int (*idle_hook_func)(void); void reset_idle(void) { _IdleTimer = jiffies(); + sti(); /* Guard against BIOS/PXE brokenness... */ } __export void __idle(void) diff --git a/core/idle.inc b/core/idle.inc index 65d6c5c8..c5ac7ef3 100644 --- a/core/idle.inc +++ b/core/idle.inc @@ -14,14 +14,6 @@ section .text16 TICKS_TO_IDLE equ 4 ; Also in idle.c -reset_idle: - push eax - mov eax,[cs:__jiffies] - mov [cs:_IdleTimer],eax - pop eax - sti ; Guard against BIOS/PXE brokenness... - ret - global do_idle:function hidden do_idle: push eax diff --git a/core/pxelinux.asm b/core/pxelinux.asm index 5c93d983..414078a6 100644 --- a/core/pxelinux.asm +++ b/core/pxelinux.asm @@ -171,7 +171,8 @@ ROOT_FS_OPS: ; ; Initialize the idle mechanism ; - call reset_idle + extern reset_idle + pm_call reset_idle ; ; Now we're all set to start with our *real* business. |