On Sun, 31 Dec 2017, Mathieu Desnoyers wrote:
> > Granted, it's not obvious and ideally we convert those this_cpu_read/writes
> > to __this_cpu_read/writes() to get the immediate fail reported on the first
> > access.
> 
> Indeed, if this function is expected to be called from non-preempt context,
> the __this_cpu_*() would be appropriate.
> 
> Moreover, clear_asid_other() could use a "static" definition, given that it's 
> only ever
> used from arch/x86/mm/tlb.c:choose_new_asid(). Otherwise nothing prevents 
> other users
> from unrelated areas of the kernel from calling it, and then we should 
> document that
> preemption needs to be disabled around its invocation.
> 
> While we are there (discussing preemption and migration), I'm puzzled about 
> the
> preempt_disable/enable in __native_flush_tlb(). First, it should cover the
> invalidate_user_asid() call too. Also, if the __ prefixed functions in this 
> header

You're late to that discussion. That has been fixed already....

Thanks,

        tglx

Reply via email to