All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: "Wu, Feng" <feng.wu@intel.com>,
	"tglx@linutronix.de" <tglx@linutronix.de>
Cc: "kvm@vger.kernel.org" <kvm@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Jiang Liu <jiang.liu@linux.intel.com>
Subject: Re: [PATCH] genirq: Move irq_set_vcpu_affinity out of "#ifdef CONFIG_SMP"
Date: Fri, 9 Oct 2015 13:18:50 +0200	[thread overview]
Message-ID: <5617A29A.8060108@redhat.com> (raw)
In-Reply-To: <E959C4978C3B6342920538CF579893F00ADB8FFE@SHSMSX104.ccr.corp.intel.com>



On 08/10/2015 06:43, Wu, Feng wrote:
> Hi Thomas & Paolo,
> 
> What is your option about this patch, Thanks a lot!
> 
> Thanks,
> Feng
> 
>>> diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c
>>> index 1c58655..90b378d 100644
>>> --- a/kernel/irq/manage.c
>>> +++ b/kernel/irq/manage.c
>>> @@ -258,37 +258,6 @@ int irq_set_affinity_hint(unsigned int irq, const struct cpumask *m)
>>>  }
>>>  EXPORT_SYMBOL_GPL(irq_set_affinity_hint);
>>>
>>> -/**
>>> - *	irq_set_vcpu_affinity - Set vcpu affinity for the interrupt
>>> - *	@irq: interrupt number to set affinity
>>> - *	@vcpu_info: vCPU specific data
>>> - *
>>> - *	This function uses the vCPU specific data to set the vCPU
>>> - *	affinity for an irq. The vCPU specific data is passed from
>>> - *	outside, such as KVM. One example code path is as below:
>>> - *	KVM -> IOMMU -> irq_set_vcpu_affinity().
>>> - */
>>> -int irq_set_vcpu_affinity(unsigned int irq, void *vcpu_info)
>>> -{
>>> -	unsigned long flags;
>>> -	struct irq_desc *desc = irq_get_desc_lock(irq, &flags, 0);
>>> -	struct irq_data *data;
>>> -	struct irq_chip *chip;
>>> -	int ret = -ENOSYS;
>>> -
>>> -	if (!desc)
>>> -		return -EINVAL;
>>> -
>>> -	data = irq_desc_get_irq_data(desc);
>>> -	chip = irq_data_get_irq_chip(data);
>>> -	if (chip && chip->irq_set_vcpu_affinity)
>>> -		ret = chip->irq_set_vcpu_affinity(data, vcpu_info);
>>> -	irq_put_desc_unlock(desc, flags);
>>> -
>>> -	return ret;
>>> -}
>>> -EXPORT_SYMBOL_GPL(irq_set_vcpu_affinity);
>>> -
>>>  static void irq_affinity_notify(struct work_struct *work)
>>>  {
>>>  	struct irq_affinity_notify *notify =
>>> @@ -424,6 +393,37 @@ setup_affinity(struct irq_desc *desc, struct
>> cpumask *mask)
>>>  }
>>>  #endif
>>>
>>> +/**
>>> + *	irq_set_vcpu_affinity - Set vcpu affinity for the interrupt
>>> + *	@irq: interrupt number to set affinity
>>> + *	@vcpu_info: vCPU specific data
>>> + *
>>> + *	This function uses the vCPU specific data to set the vCPU
>>> + *	affinity for an irq. The vCPU specific data is passed from
>>> + *	outside, such as KVM. One example code path is as below:
>>> + *	KVM -> IOMMU -> irq_set_vcpu_affinity().
>>> + */
>>> +int irq_set_vcpu_affinity(unsigned int irq, void *vcpu_info)
>>> +{
>>> +	unsigned long flags;
>>> +	struct irq_desc *desc = irq_get_desc_lock(irq, &flags, 0);
>>> +	struct irq_data *data;
>>> +	struct irq_chip *chip;
>>> +	int ret = -ENOSYS;
>>> +
>>> +	if (!desc)
>>> +		return -EINVAL;
>>> +
>>> +	data = irq_desc_get_irq_data(desc);
>>> +	chip = irq_data_get_irq_chip(data);
>>> +	if (chip && chip->irq_set_vcpu_affinity)
>>> +		ret = chip->irq_set_vcpu_affinity(data, vcpu_info);
>>> +	irq_put_desc_unlock(desc, flags);
>>> +
>>> +	return ret;
>>> +}
>>> +EXPORT_SYMBOL_GPL(irq_set_vcpu_affinity);
>>> +
>>>  void __disable_irq(struct irq_desc *desc)
>>>  {
>>>  	if (!desc->depth++)
>>>

Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>

Paolo

  reply	other threads:[~2015-10-09 11:18 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-03  8:20 [PATCH] genirq: Move irq_set_vcpu_affinity out of "#ifdef CONFIG_SMP" Feng Wu
2015-10-03  9:10 ` Jiang Liu
2015-10-08  4:43   ` Wu, Feng
2015-10-09 11:18     ` Paolo Bonzini [this message]
2015-10-09 20:54 ` [tip:irq/core] genirq: Make irq_set_vcpu_affinity available for CONFIG_SMP=n tip-bot for Feng Wu

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=5617A29A.8060108@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=feng.wu@intel.com \
    --cc=jiang.liu@linux.intel.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tglx@linutronix.de \
    /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.