Message ID | 20170103100453.GB5605@leverpostej |
---|---|
State | New |
Headers | show |
On Tue, 03 Jan 2017, Mark Rutland wrote:
>Does the below help?
It does, yes. Performance is pretty much the same with either function
without sysreg. With arm no longer in the picture, I'll send up another
patchset with this change as well as Peter's cleanup remarks.
Thanks,
Davidlohr
On Tue, Jan 03, 2017 at 10:06:58AM -0800, Davidlohr Bueso wrote: > On Tue, 03 Jan 2017, Mark Rutland wrote: > > >Does the below help? > > It does, yes. Performance is pretty much the same with either function > without sysreg. Great! > With arm no longer in the picture, I'll send up another patchset with > this change as well as Peter's cleanup remarks. I intend to send a cleaned up version of the arm64 patch to Catalin in a moment; the read_sysreg() issue is a regression introduced in v4.10-rc1, so we should be able to get it in as a fix. Thanks, Mark.
diff --git a/arch/arm64/include/asm/current.h b/arch/arm64/include/asm/current.h index f2bcbe2..c9ba5ac 100644 --- a/arch/arm64/include/asm/current.h +++ b/arch/arm64/include/asm/current.h @@ -11,7 +11,11 @@ static __always_inline struct task_struct *get_current(void) { - return (struct task_struct *)read_sysreg(sp_el0); + struct task_struct *tsk; + + asm ("mrs %0, sp_el0" : "=r" (tsk)); + + return tsk; } #define current get_current()