>> In addition, because of the possibility of kpreemption (but aarch64 has = >no KPREEMPT yet), >> the acquisition of curcpu() is moved to after DISABLE_INTERRUPT and got = >the following. >> >[snip] > > >> >> Is this ok? >> > >Looks good - I wonder if the fact that curcpu is an invariant for the >idlelwp helps here too?
Ah, You are quite right! idle/# lwp is provided and assigned for each CPU, so curcpu() obtained from idle lwp was always the same. So, there's no need to move curcpu() to after DISABLE_INTERRUPT. Thanks -- ryo shimizu