All of lore.kernel.org
 help / color / mirror / Atom feed
From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
To: Zhenzhong Duan <zhenzhong.duan@oracle.com>
Cc: xen-devel@lists.xensource.com,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Feng Jin <joe.jin@oracle.com>,
	ben@guthro.net
Subject: Re: [PATCH] xen: minor fix in apic ipi interface func
Date: Tue, 9 Apr 2013 15:20:54 -0400	[thread overview]
Message-ID: <20130409192054.GA1768@phenom.dumpdata.com> (raw)
In-Reply-To: <5163F29D.6080605@oracle.com>

On Tue, Apr 09, 2013 at 06:51:09PM +0800, Zhenzhong Duan wrote:
> xen_send_IPI_mask_allbutself uses native vector as input other than xen_vector.

Ouch. But it looks as the only user of the .send_IPI_mask_allbutself
is just xen_send_IPI_allbutself? Or is there another user of this?


Is there a particular bug that was found with this?
> 
> xen_send_IPI_one need to be called to pass xen_vector in xen_send_IPI_mask_allbutself.

Right, as we are using now 'xen_vector'.

> 
> Signed-off-by: Zhenzhong Duan <zhenzhong.duan@oracle.com>
> ---
>  arch/x86/xen/smp.c |   11 ++++++-----
>  1 files changed, 6 insertions(+), 5 deletions(-)
> 
> diff --git a/arch/x86/xen/smp.c b/arch/x86/xen/smp.c
> index 09ea61d..bf27868 100644
> --- a/arch/x86/xen/smp.c
> +++ b/arch/x86/xen/smp.c
> @@ -565,6 +565,10 @@ void xen_send_IPI_mask_allbutself(const struct cpumask *mask,
>  {
>  	unsigned cpu;
>  	unsigned int this_cpu = smp_processor_id();
> +	int xen_vector = xen_map_vector(vector);
> +
> +	if (xen_vector < 0)
> +		return;
>  
>  	if (!(num_online_cpus() > 1))
>  		return;
> @@ -573,16 +577,13 @@ void xen_send_IPI_mask_allbutself(const struct cpumask *mask,
>  		if (this_cpu == cpu)
>  			continue;
>  
> -		xen_smp_send_call_function_single_ipi(cpu);
> +		xen_send_IPI_one(cpu, xen_vector);
>  	}
>  }
>  
>  void xen_send_IPI_allbutself(int vector)
>  {
> -	int xen_vector = xen_map_vector(vector);
> -
> -	if (xen_vector >= 0)
> -		xen_send_IPI_mask_allbutself(cpu_online_mask, xen_vector);
> +	xen_send_IPI_mask_allbutself(cpu_online_mask, vector);
>  }
>  
>  static irqreturn_t xen_call_function_interrupt(int irq, void *dev_id)
> -- 
> 1.7.3
> 

  reply	other threads:[~2013-04-09 19:21 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-09 10:51 [PATCH] xen: minor fix in apic ipi interface func Zhenzhong Duan
2013-04-09 19:20 ` Konrad Rzeszutek Wilk [this message]
2013-04-10  2:25   ` Zhenzhong Duan

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=20130409192054.GA1768@phenom.dumpdata.com \
    --to=konrad.wilk@oracle.com \
    --cc=ben@guthro.net \
    --cc=joe.jin@oracle.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=xen-devel@lists.xensource.com \
    --cc=zhenzhong.duan@oracle.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.