mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: Feng Wu <feng.wu@intel.com>
Cc: mingo@redhat.com, hpa@zytor.com, linux-kernel@vger.kernel.org,
	jiang.liu@linux.intel.com
Subject: Re: [v4 1/3] genirq: Introduce irq_set_vcpu_affinity() to target an interrupt to a VCPU
Date: Fri, 15 May 2015 15:18:00 +0200 (CEST)	[thread overview]
Message-ID: <alpine.DEB.2.11.1505151510190.4225@nanos> (raw)
In-Reply-To: <1430377608-10490-2-git-send-email-feng.wu@intel.com>

On Thu, 30 Apr 2015, Feng Wu wrote:
> 
> Signed-off-by: Jiang Liu <jiang.liu@linux.intel.com>

So I assume Jiang is the author, right?

> Signed-off-by: Feng Wu <feng.wu@intel.com>

>  /**
> + * irq_chip_set_vcpu_affinity_parent - Set vcpu affinity on the parent interrupt
> + * @data:	Pointer to interrupt specific data
> + * @dest:	The vcpu affinity information
> + */
> +int irq_chip_set_vcpu_affinity_parent(struct irq_data *data, void *vcpu_info)
> +{
> +	data = data->parent_data;
> +	if (data->chip->irq_set_vcpu_affinity)
> +		return data->chip->irq_set_vcpu_affinity(data, vcpu_info);
> +
> +	return -ENOSYS;
> +}

That needs a prototype in irq.h, methinks

> +int irq_set_vcpu_affinity(unsigned int irq, void *vcpu_info)
> +{
> +	struct irq_desc *desc = irq_to_desc(irq);

  	irq_get_desc_lock() please

> +	struct irq_chip *chip;
> +	unsigned long flags;
> +	int ret = -ENOSYS;
> +
> +	if (!desc)
> +		return -EINVAL;
> +
> +	raw_spin_lock_irqsave(&desc->lock, flags);
> +	chip = desc->irq_data.chip;
> +	if (chip && chip->irq_set_vcpu_affinity)
> +		ret = chip->irq_set_vcpu_affinity(irq_desc_get_irq_data(desc),

Above you fiddle with desc->irq_data directly. Why using the accessor here?

> +						  vcpu_info);
> +	raw_spin_unlock_irqrestore(&desc->lock, flags);

Otherwise this looks good.

Thanks,

	tglx

  parent reply	other threads:[~2015-05-15 13:18 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-30  7:06 [v4 0/3] prerequisite changes for VT-d posted-interrupts Feng Wu
2015-04-30  7:06 ` [v4 1/3] genirq: Introduce irq_set_vcpu_affinity() to target an interrupt to a VCPU Feng Wu
2015-05-13  8:09   ` Jiang Liu
2015-05-13 21:03     ` Thomas Gleixner
2015-05-14  1:04       ` Wu, Feng
2015-05-15 13:18   ` Thomas Gleixner [this message]
2015-05-18  2:42     ` Wu, Feng
2015-04-30  7:06 ` [v4 2/3] x86, irq: Implement irq_set_vcpu_affinity for pci_msi_ir_controller Feng Wu
2015-05-15 13:19   ` Thomas Gleixner
2015-04-30  7:06 ` [v4 3/3] x86, irq: Define a global vector for VT-d Posted-Interrupts Feng Wu
2015-05-15 13:27   ` Thomas Gleixner
2015-05-18  2:44     ` Wu, Feng
2015-05-07  2:05 ` [v4 0/3] prerequisite changes for VT-d posted-interrupts Wu, Feng

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=alpine.DEB.2.11.1505151510190.4225@nanos \
    --to=tglx@linutronix.de \
    --cc=feng.wu@intel.com \
    --cc=hpa@zytor.com \
    --cc=jiang.liu@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.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®