Re: [PATCH RT v3] arm64: fpsimd: use preemp_disable in addition to local_bh_disable()

2018-07-27 Thread Sebastian Andrzej Siewior
On 2018-07-27 16:35:59 [+0100], Dave Martin wrote: > On Thu, Jul 26, 2018 at 05:06:34PM +0200, Sebastian Andrzej Siewior wrote: > > In v4.16-RT I noticed a number of warnings from task_fpsimd_load(). The > > code disables BH and expects that it is not preemptible. On -RT the > > task remains

Re: [PATCH RT v3] arm64: fpsimd: use preemp_disable in addition to local_bh_disable()

2018-07-27 Thread Sebastian Andrzej Siewior
On 2018-07-27 16:35:59 [+0100], Dave Martin wrote: > On Thu, Jul 26, 2018 at 05:06:34PM +0200, Sebastian Andrzej Siewior wrote: > > In v4.16-RT I noticed a number of warnings from task_fpsimd_load(). The > > code disables BH and expects that it is not preemptible. On -RT the > > task remains

Re: [PATCH RT v3] arm64: fpsimd: use preemp_disable in addition to local_bh_disable()

2018-07-27 Thread Dave Martin
On Thu, Jul 26, 2018 at 05:06:34PM +0200, Sebastian Andrzej Siewior wrote: > In v4.16-RT I noticed a number of warnings from task_fpsimd_load(). The > code disables BH and expects that it is not preemptible. On -RT the > task remains preemptible but remains the same CPU. This may corrupt the >

Re: [PATCH RT v3] arm64: fpsimd: use preemp_disable in addition to local_bh_disable()

2018-07-27 Thread Dave Martin
On Thu, Jul 26, 2018 at 05:06:34PM +0200, Sebastian Andrzej Siewior wrote: > In v4.16-RT I noticed a number of warnings from task_fpsimd_load(). The > code disables BH and expects that it is not preemptible. On -RT the > task remains preemptible but remains the same CPU. This may corrupt the >

Re: [PATCH RT v3] arm64: fpsimd: use preemp_disable in addition to local_bh_disable()

2018-07-27 Thread Sebastian Andrzej Siewior
On 2018-07-27 05:17:23 [+0200], Mike Galbraith wrote: > On Thu, 2018-07-26 at 17:06 +0200, Sebastian Andrzej Siewior wrote: > > > > @@ -1115,6 +1139,7 @@ void kernel_neon_begin(void) > > > > BUG_ON(!may_use_simd()); > > > > + preempt_disable(); > > local_bh_disable(); > > > >

Re: [PATCH RT v3] arm64: fpsimd: use preemp_disable in addition to local_bh_disable()

2018-07-27 Thread Sebastian Andrzej Siewior
On 2018-07-27 05:17:23 [+0200], Mike Galbraith wrote: > On Thu, 2018-07-26 at 17:06 +0200, Sebastian Andrzej Siewior wrote: > > > > @@ -1115,6 +1139,7 @@ void kernel_neon_begin(void) > > > > BUG_ON(!may_use_simd()); > > > > + preempt_disable(); > > local_bh_disable(); > > > >

Re: [PATCH RT v3] arm64: fpsimd: use preemp_disable in addition to local_bh_disable()

2018-07-26 Thread Mike Galbraith
On Thu, 2018-07-26 at 17:06 +0200, Sebastian Andrzej Siewior wrote: > > @@ -1115,6 +1139,7 @@ void kernel_neon_begin(void) > > BUG_ON(!may_use_simd()); > > + preempt_disable(); > local_bh_disable(); > > __this_cpu_write(kernel_neon_busy, true); > @@ -1131,6 +1156,7 @@

Re: [PATCH RT v3] arm64: fpsimd: use preemp_disable in addition to local_bh_disable()

2018-07-26 Thread Mike Galbraith
On Thu, 2018-07-26 at 17:06 +0200, Sebastian Andrzej Siewior wrote: > > @@ -1115,6 +1139,7 @@ void kernel_neon_begin(void) > > BUG_ON(!may_use_simd()); > > + preempt_disable(); > local_bh_disable(); > > __this_cpu_write(kernel_neon_busy, true); > @@ -1131,6 +1156,7 @@

[PATCH RT v3] arm64: fpsimd: use preemp_disable in addition to local_bh_disable()

2018-07-26 Thread Sebastian Andrzej Siewior
In v4.16-RT I noticed a number of warnings from task_fpsimd_load(). The code disables BH and expects that it is not preemptible. On -RT the task remains preemptible but remains the same CPU. This may corrupt the content of the SIMD registers if the task is preempted during saving/restoring those

[PATCH RT v3] arm64: fpsimd: use preemp_disable in addition to local_bh_disable()

2018-07-26 Thread Sebastian Andrzej Siewior
In v4.16-RT I noticed a number of warnings from task_fpsimd_load(). The code disables BH and expects that it is not preemptible. On -RT the task remains preemptible but remains the same CPU. This may corrupt the content of the SIMD registers if the task is preempted during saving/restoring those