From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751907AbcAQRtI (ORCPT ); Sun, 17 Jan 2016 12:49:08 -0500 Received: from mx2.suse.de ([195.135.220.15]:41662 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751396AbcAQRtH (ORCPT ); Sun, 17 Jan 2016 12:49:07 -0500 Date: Sun, 17 Jan 2016 18:48:44 +0100 From: Borislav Petkov To: Alexander Kuleshov Cc: Thomas Gleixner , Ingo Molnar , "H . Peter Anvin" , x86@kernel.org, Andy Lutomirski , Denys Vlasenko , linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] x86/traps.c: refactor preemption and interrupt flag handling Message-ID: <20160117174844.GD8549@pd.tnic> References: <1453036184-15077-1-git-send-email-kuleshovmail@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1453036184-15077-1-git-send-email-kuleshovmail@gmail.com> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Jan 17, 2016 at 07:09:44PM +0600, Alexander Kuleshov wrote: > The arch/x86/kernel/traps.c contains definition of two pair of helpers > conditional_{sti,cli} to enable/disable interrupts depends on state of > the interrupt flag and *preempt* versions of these helpers. > > This patch tries to make the preemption and interrupt flag handling more > readable by removing preempt_conditional_sti() and > preempt_conditional_cli() helpers and usage preempt_disable() and > preempt_enable_no_resched() for preemption in place, instead of these helpers. > > The contitional_sti() and conditional_cli() are renamed to more understandable > names: cond_local_irq_enable() and cond_local_irq_disable() respectively. So > so that one doesn't have to go and lookup the function definition when > looking at the code flow. > > Signed-off-by: Alexander Kuleshov > Suggested-by: Borislav Petkov > --- > Changelog v2: > 1. Use preempt_enable_no_resched() instead of sched_preempt_enable_no_resched() > > arch/x86/kernel/traps.c | 47 +++++++++++++++++++---------------------------- > 1 file changed, 19 insertions(+), 28 deletions(-) Applied, thanks. -- Regards/Gruss, Boris. SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nürnberg) --