On Mon, Jan 23, 2023 at 11:05 PM Kirill A. Shutemov <kirill.shutemov@xxxxxxxxxxxxxxx> wrote: > > So far there's no need in atomic setting of MM context flags in > mm_context_t::flags. The flags set early in exec and never change > after that. > > LAM enabling requires atomic flag setting. The upcoming flag > MM_CONTEXT_FORCE_TAGGED_SVA can be set much later in the process > lifetime where multiple threads exist. > > Convert the field to unsigned long and do MM_CONTEXT_* accesses with > __set_bit() and test_bit(). > > No functional changes. > > Signed-off-by: Kirill A. Shutemov <kirill.shutemov@xxxxxxxxxxxxxxx> > Acked-by: Peter Zijlstra (Intel) <peterz@xxxxxxxxxxxxx> Tested-by: Alexander Potapenko <glider@xxxxxxxxxx>