[RFC v2 PATCH 1/4] ARM: add support for kernel mode NEON in atomic context
Nicolas Pitre
nicolas.pitre at linaro.org
Wed Oct 9 23:45:30 EDT 2013
On Wed, 9 Oct 2013, Ard Biesheuvel wrote:
> On 9 October 2013 21:24, Nicolas Pitre <nicolas.pitre at linaro.org> wrote:
> > On Wed, 9 Oct 2013, Ard Biesheuvel wrote:
> >
> >> +static inline void __kernel_neon_begin_atomic(struct vfp_partial_state *regs)
> >> +{
> >> + if (!in_interrupt())
> >> + kernel_neon_begin();
> >
> > Surely you want "if (!in_atomic())" here?
> >
> >> + else
> >> + vfp_save_partial_state(regs);
> >> +}
> >> +
> >> +static inline void __kernel_neon_end_atomic(struct vfp_partial_state *regs)
> >> +{
> >> + if (!in_interrupt())
> >> + kernel_neon_end();
> >
> > Ditto.
> >
>
> If I am reading (and understanding) the source correctly, in_atomic()
> is also true when running with preemption disabled, and in that case,
> you should be able to just do a normal preserve / lazy restore.
Hmmm... OK I agree.
Nicolas
More information about the linux-arm-kernel
mailing list