|
|
|
|
|
|
|
|
|
|
xen-devel
[Xen-devel] Re: [PATCH FIXED] x86: use flush_tlb_others to implement flu
To: |
Jeremy Fitzhardinge <jeremy@xxxxxxxx> |
Subject: |
[Xen-devel] Re: [PATCH FIXED] x86: use flush_tlb_others to implement flush_tlb_all |
From: |
Ian Campbell <Ian.Campbell@xxxxxxxxxxxxx> |
Date: |
Wed, 13 May 2009 09:52:55 +0100 |
Cc: |
Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>, arch/x86 maintainers <x86@xxxxxxxxxx>, Linux Kernel Mailing List <linux-kernel@xxxxxxxxxxxxxxx>, "H. Peter Anvin" <hpa@xxxxxxxxx>, Ingo Molnar <mingo@xxxxxxx>, the |
Delivery-date: |
Wed, 13 May 2009 01:53:25 -0700 |
Envelope-to: |
www-data@xxxxxxxxxxxxxxxxxxx |
In-reply-to: |
<4A0A154C.9080000@xxxxxxxx> |
List-help: |
<mailto:xen-devel-request@lists.xensource.com?subject=help> |
List-id: |
Xen developer discussion <xen-devel.lists.xensource.com> |
List-post: |
<mailto:xen-devel@lists.xensource.com> |
List-subscribe: |
<http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe> |
List-unsubscribe: |
<http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe> |
Organization: |
Citrix Systems, Inc. |
References: |
<4A09E5FE.2080507@xxxxxxxx> <4A0A0D7C.8050206@xxxxxxxxx> <4A0A154C.9080000@xxxxxxxx> |
Sender: |
xen-devel-bounces@xxxxxxxxxxxxxxxxxxx |
On Tue, 2009-05-12 at 20:33 -0400, Jeremy Fitzhardinge wrote:
> -static void do_flush_tlb_all(void *info)
> +void flush_tlb_all(void)
> {
> - unsigned long cpu = smp_processor_id();
> + /* flush_tlb_others expects preempt to be disabled */
> + get_cpu();
> +
> + flush_tlb_others(cpu_online_mask, NULL, TLB_FLUSH_ALL);
>
> __flush_tlb_all();
> if (percpu_read(cpu_tlbstate.state) == TLBSTATE_LAZY)
> - leave_mm(cpu);
> -}
> + leave_mm(smp_processor_id());
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();
Ian.
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
|
|
|
|