From: Ian Campbell <Ian.Campbell@eu.citrix.com>
To: Jeremy Fitzhardinge <jeremy@goop.org>
Cc: "H. Peter Anvin" <hpa@zytor.com>, Ingo Molnar <mingo@elte.hu>,
the arch/x86 maintainers <x86@kernel.org>,
Xen-devel <xen-devel@lists.xensource.com>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH FIXED] x86: use flush_tlb_others to implement flush_tlb_all
Date: Wed, 13 May 2009 09:52:55 +0100 [thread overview]
Message-ID: <1242204775.24976.7.camel@zakaz.uk.xensource.com> (raw)
In-Reply-To: <4A0A154C.9080000@goop.org>
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.
next prev parent reply other threads:[~2009-05-13 8:53 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-12 21:11 Jeremy Fitzhardinge
2009-05-12 23:59 ` H. Peter Anvin
2009-05-13 0:33 ` Jeremy Fitzhardinge
2009-05-13 8:52 ` Ian Campbell [this message]
2009-05-13 17:36 ` Jeremy Fitzhardinge
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1242204775.24976.7.camel@zakaz.uk.xensource.com \
--to=ian.campbell@eu.citrix.com \
--cc=hpa@zytor.com \
--cc=jeremy@goop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=x86@kernel.org \
--cc=xen-devel@lists.xensource.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®