lkml.org 
[lkml]   [2009]   [May]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH FIXED] x86: use flush_tlb_others to implement flush_tlb_all
Ian Campbell wrote:
> get_cpu() returns smp_processor_id() so wouldn't this be more normally
> written as:
> /* flush_tlb_others expects preempt to be disabled */
> unsigned long cpu = get_cpu();
> [....]
> if ([....] == TLBSTATE_LAZY)
> leave_mm(cpu)
> put_cpu();
>

Quite so. In theory gcc should be able to CSE smp_processor_id(), but
the intent of get_cpu() is that you use its return value...

J


\
 
 \ /
  Last update: 2009-05-13 19:39    [W:0.067 / U:0.552 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site