public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jeremy Fitzhardinge <jeremy@goop.org>
To: Ian Campbell <Ian.Campbell@eu.citrix.com>
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 10:36:22 -0700	[thread overview]
Message-ID: <4A0B0516.8010104@goop.org> (raw)
In-Reply-To: <1242204775.24976.7.camel@zakaz.uk.xensource.com>

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

      reply	other threads:[~2009-05-13 17:36 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-12 21:11 [PATCH FIXED] x86: use flush_tlb_others to implement flush_tlb_all Jeremy Fitzhardinge
2009-05-12 23:59 ` H. Peter Anvin
2009-05-13  0:33   ` Jeremy Fitzhardinge
2009-05-13  8:52     ` Ian Campbell
2009-05-13 17:36       ` Jeremy Fitzhardinge [this message]

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=4A0B0516.8010104@goop.org \
    --to=jeremy@goop.org \
    --cc=Ian.Campbell@eu.citrix.com \
    --cc=hpa@zytor.com \
    --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