Re: [PATCH 1/9] arm64: assembler: add cond_yield macro

2021-01-28 Thread Ard Biesheuvel
On Thu, 28 Jan 2021 at 21:25, Will Deacon wrote: > > On Thu, Jan 28, 2021 at 08:24:01PM +, Will Deacon wrote: > > On Thu, Jan 28, 2021 at 02:06:17PM +0100, Ard Biesheuvel wrote: > > > Add a macro cond_yield that branches to a specified label when called if > > > the TIF_NEED_RESCHED flag is se

Re: [PATCH 1/9] arm64: assembler: add cond_yield macro

2021-01-28 Thread Will Deacon
On Thu, Jan 28, 2021 at 08:24:01PM +, Will Deacon wrote: > On Thu, Jan 28, 2021 at 02:06:17PM +0100, Ard Biesheuvel wrote: > > Add a macro cond_yield that branches to a specified label when called if > > the TIF_NEED_RESCHED flag is set and decreasing the preempt count would > > make the task p

Re: [PATCH 1/9] arm64: assembler: add cond_yield macro

2021-01-28 Thread Will Deacon
On Thu, Jan 28, 2021 at 02:06:17PM +0100, Ard Biesheuvel wrote: > Add a macro cond_yield that branches to a specified label when called if > the TIF_NEED_RESCHED flag is set and decreasing the preempt count would > make the task preemptible again, resulting in a schedule to occur. This > can be use

[PATCH 1/9] arm64: assembler: add cond_yield macro

2021-01-28 Thread Ard Biesheuvel
Add a macro cond_yield that branches to a specified label when called if the TIF_NEED_RESCHED flag is set and decreasing the preempt count would make the task preemptible again, resulting in a schedule to occur. This can be used by kernel mode SIMD code that keeps a lot of state in SIMD registers,