Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751907AbbERCmd (ORCPT ); Sun, 17 May 2015 22:42:33 -0400 Received: from mga09.intel.com ([134.134.136.24]:46079 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750770AbbERCmY convert rfc822-to-8bit (ORCPT ); Sun, 17 May 2015 22:42:24 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.13,449,1427785200"; d="scan'208";a="572862189" From: "Wu, Feng" To: Thomas Gleixner CC: "mingo@redhat.com" , "hpa@zytor.com" , "linux-kernel@vger.kernel.org" , "jiang.liu@linux.intel.com" , "Wu, Feng" Subject: RE: [v4 1/3] genirq: Introduce irq_set_vcpu_affinity() to target an interrupt to a VCPU Thread-Topic: [v4 1/3] genirq: Introduce irq_set_vcpu_affinity() to target an interrupt to a VCPU Thread-Index: AQHQjxGTrBwCVEAhsk21C7AeTvyB7J2BCdDg Date: Mon, 18 May 2015 02:42:19 +0000 Message-ID: References: <1430377608-10490-1-git-send-email-feng.wu@intel.com> <1430377608-10490-2-git-send-email-feng.wu@intel.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2178 Lines: 80 Thanks for the review! > -----Original Message----- > From: Thomas Gleixner [mailto:tglx@linutronix.de] > Sent: Friday, May 15, 2015 9:18 PM > To: Wu, Feng > 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 > > On Thu, 30 Apr 2015, Feng Wu wrote: > > > > Signed-off-by: Jiang Liu > > So I assume Jiang is the author, right? Oh, yes, I think I made some mistakes while applying the patches. Thanks for pointing this out! > > > Signed-off-by: Feng Wu > > > /** > > + * 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? I will only use one style here. Thanks, Feng > > > + vcpu_info); > > + raw_spin_unlock_irqrestore(&desc->lock, flags); > > Otherwise this looks good. > > Thanks, > > tglx -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/