From patchwork Fri Aug 14 01:47:06 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yinghai Lu X-Patchwork-Id: 41325 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n7E1mhGV004501 for ; Fri, 14 Aug 2009 01:48:43 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753658AbZHNBsl (ORCPT ); Thu, 13 Aug 2009 21:48:41 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753980AbZHNBsl (ORCPT ); Thu, 13 Aug 2009 21:48:41 -0400 Received: from hera.kernel.org ([140.211.167.34]:49900 "EHLO hera.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750868AbZHNBsk (ORCPT ); Thu, 13 Aug 2009 21:48:40 -0400 Received: from [10.6.76.26] (sca-ea-fw-1.Sun.COM [192.18.43.225]) (authenticated bits=0) by hera.kernel.org (8.14.2/8.13.8) with ESMTP id n7E1lhh3022430 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 14 Aug 2009 01:47:44 GMT Message-ID: <4A84C21A.4000705@kernel.org> Date: Thu, 13 Aug 2009 18:47:06 -0700 From: Yinghai Lu User-Agent: Thunderbird 2.0.0.22 (X11/20090605) MIME-Version: 1.0 To: Ingo Molnar , Thomas Gleixner , "H. Peter Anvin" , Andrew Morton , Jesse Barnes CC: "linux-kernel@vger.kernel.org" , "linux-pci@vger.kernel.org" , Suresh Siddha Subject: [PATCH] pci/intr_remapping: allocate irq_iommu on node -v3 References: <4A84C13E.5050606@kernel.org> <4A84C190.1060005@kernel.org> In-Reply-To: <4A84C190.1060005@kernel.org> X-Virus-Scanned: ClamAV 0.93.3/9695/Thu Aug 13 21:08:01 2009 on hera.kernel.org X-Virus-Status: Clean Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org make it use node from irq_desc. v3: use irq_node Signed-off-by: Yinghai Lu Acked-by: Jesse Barnes --- drivers/pci/intr_remapping.c | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-pci" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Index: linux-2.6/drivers/pci/intr_remapping.c =================================================================== --- linux-2.6.orig/drivers/pci/intr_remapping.c +++ linux-2.6/drivers/pci/intr_remapping.c @@ -55,15 +55,12 @@ static struct irq_2_iommu *irq_2_iommu(u return desc->irq_2_iommu; } -static struct irq_2_iommu *irq_2_iommu_alloc_node(unsigned int irq, int node) +static struct irq_2_iommu *irq_2_iommu_alloc(unsigned int irq) { struct irq_desc *desc; struct irq_2_iommu *irq_iommu; - /* - * alloc irq desc if not allocated already. - */ - desc = irq_to_desc_alloc_node(irq, node); + desc = irq_to_desc(irq); if (!desc) { printk(KERN_INFO "can not get irq_desc for %d\n", irq); return NULL; @@ -72,16 +69,11 @@ static struct irq_2_iommu *irq_2_iommu_a irq_iommu = desc->irq_2_iommu; if (!irq_iommu) - desc->irq_2_iommu = get_one_free_irq_2_iommu(node); + desc->irq_2_iommu = get_one_free_irq_2_iommu(irq_node(irq)); return desc->irq_2_iommu; } -static struct irq_2_iommu *irq_2_iommu_alloc(unsigned int irq) -{ - return irq_2_iommu_alloc_node(irq, cpu_to_node(boot_cpu_id)); -} - #else /* !CONFIG_SPARSE_IRQ */ static struct irq_2_iommu irq_2_iommuX[NR_IRQS];