lkml.org 
[lkml]   [2020]   [May]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [patch V4 part 3 04/29] x86/traps: Make interrupt enable/disable symmetric in C code
From
Date

On 5/5/20 3:43 PM, Thomas Gleixner wrote:
> Traps enable interrupts conditionally but rely on the ASM return code to
> disable them again. That results in redundant interrupt disable and trace
> calls.
>
> Make the trap handlers disable interrupts before returning to avoid that,
> which allows simplification of the ASM entry code.
>
> Originally-by: Peter Zijlstra <peterz@infradead.org>
> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
>
> ---
> arch/x86/kernel/traps.c | 28 +++++++++++++++++++---------
> arch/x86/mm/fault.c | 15 +++++++++++++--
> 2 files changed, 32 insertions(+), 11 deletions(-)
>

So this patch makes C trap handlers disable interrupts on return but there's no
change to the ASM entry code, which will still (also) disable interrupts. I suppose
this is cleaned up in a next patch. So it's worth mentioning that the "simplification
of the ASM entry code" is not in this patch.

alex.

\
 
 \ /
  Last update: 2020-05-07 17:29    [W:0.508 / U:0.400 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site