[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160817080531.GA5601@arm.com>
Date: Wed, 17 Aug 2016 09:05:31 +0100
From: Will Deacon <will.deacon@....com>
To: Chris Metcalf <cmetcalf@...lanox.com>
Cc: Gilad Ben Yossef <giladb@...lanox.com>,
Steven Rostedt <rostedt@...dmis.org>,
Ingo Molnar <mingo@...nel.org>,
Peter Zijlstra <peterz@...radead.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Rik van Riel <riel@...hat.com>, Tejun Heo <tj@...nel.org>,
Frederic Weisbecker <fweisbec@...il.com>,
Thomas Gleixner <tglx@...utronix.de>,
"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>,
Christoph Lameter <cl@...ux.com>,
Viresh Kumar <viresh.kumar@...aro.org>,
Catalin Marinas <catalin.marinas@....com>,
Andy Lutomirski <luto@...capital.net>,
Mark Rutland <mark.rutland@....com>,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v15 07/13] arm64: factor work_pending state machine to C
Hi Chris,
On Tue, Aug 16, 2016 at 05:19:30PM -0400, Chris Metcalf wrote:
> Currently ret_fast_syscall, work_pending, and ret_to_user form an ad-hoc
> state machine that can be difficult to reason about due to duplicated
> code and a large number of branch targets.
>
> This patch factors the common logic out into the existing
> do_notify_resume function, converting the code to C in the process,
> making the code more legible.
>
> This patch tries to closely mirror the existing behaviour while using
> the usual C control flow primitives. As local_irq_{disable,enable} may
> be instrumented, we balance exception entry (where we will almost most
> likely enable IRQs) with a call to trace_hardirqs_on just before the
> return to userspace.
>
> Signed-off-by: Chris Metcalf <cmetcalf@...lanox.com>
> ---
> arch/arm64/kernel/entry.S | 12 ++++--------
> arch/arm64/kernel/signal.c | 36 ++++++++++++++++++++++++++----------
> 2 files changed, 30 insertions(+), 18 deletions(-)
I plan to queue this one in the arm64 tree for 4.9. Should hit -next
sometime next week.
Will
Powered by blists - more mailing lists