[PATCH v2 06/16] arm64: entry.S: convert elX_sync

James Morse james.morse at arm.com
Fri Aug 11 10:24:59 PDT 2017


Hi Catalin,

On 10/08/17 17:57, James Morse wrote:
> On 09/08/17 18:25, Catalin Marinas wrote:
>> On Fri, Jul 28, 2017 at 03:10:09PM +0100, James Morse wrote:
>>> @@ -520,9 +514,16 @@ el1_preempt:
>>>  el0_sync:
>>>  	kernel_entry 0
>>>  	mrs	x25, esr_el1			// read the syndrome register
>>> +	mrs	x26, far_el1
>>
>> Just checking, since we are going to access far_el1 even when we get a
>> syscall, have you noticed any overhead?

(I can get rid of the extra far_el1 reads by doing a better job of this patch.)


> Good point, I haven't checked because I've been doing all this with the software
> model.
> 
> I will set this running on Seattle overnight, results in v3's cover letter.

So the series does make microbenchmarks like calling getpid() in a loop slower,
but its not the far_el1 read causing this, its the unconditional masking of
exceptions in kernel_exit. This doesn't show up once I start doing real work
(like fork or exec).

I may be able to get rid of this but keep SError unmasked in the kernel and
masked over eret by merging EL0-returns disable_daif with its existing
irq-masked ret-to-user loop.



Thanks,

James



More information about the linux-arm-kernel mailing list