From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S966826AbbDXQDF (ORCPT ); Fri, 24 Apr 2015 12:03:05 -0400 Received: from terminus.zytor.com ([198.137.202.10]:45078 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965348AbbDXQDA (ORCPT ); Fri, 24 Apr 2015 12:03:00 -0400 Date: Fri, 24 Apr 2015 09:01:50 -0700 From: tip-bot for Jiang Liu Message-ID: Cc: linux@eikelenboom.it, bp@alien8.de, linux-kernel@vger.kernel.org, jroedel@suse.de, gregkh@linuxfoundation.org, rdunlap@infradead.org, yinghai@kernel.org, sivanich@sgi.com, david.vrabel@citrix.com, joro@8bytes.org, tony.luck@intel.com, david.a.cohen@linux.intel.com, hpa@zytor.com, tglx@linutronix.de, bhelgaas@google.com, mingo@kernel.org, benh@kernel.crashing.org, rjw@rjwysocki.net, jiang.liu@linux.intel.com, konrad.wilk@oracle.com Reply-To: linux-kernel@vger.kernel.org, bp@alien8.de, linux@eikelenboom.it, yinghai@kernel.org, rdunlap@infradead.org, gregkh@linuxfoundation.org, jroedel@suse.de, bhelgaas@google.com, tglx@linutronix.de, hpa@zytor.com, tony.luck@intel.com, david.a.cohen@linux.intel.com, joro@8bytes.org, david.vrabel@citrix.com, sivanich@sgi.com, konrad.wilk@oracle.com, jiang.liu@linux.intel.com, rjw@rjwysocki.net, benh@kernel.crashing.org, mingo@kernel.org In-Reply-To: <1428978610-28986-26-git-send-email-jiang.liu@linux.intel.com> References: <1428978610-28986-26-git-send-email-jiang.liu@linux.intel.com> To: linux-tip-commits@vger.kernel.org Subject: [tip:x86/apic] x86/irq: Move check of cfg-> move_in_progress into send_cleanup_vector() Git-Commit-ID: c6c2002b744215810c770dd73f45da954bcfa9d5 X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: c6c2002b744215810c770dd73f45da954bcfa9d5 Gitweb: http://git.kernel.org/tip/c6c2002b744215810c770dd73f45da954bcfa9d5 Author: Jiang Liu AuthorDate: Tue, 14 Apr 2015 10:30:02 +0800 Committer: Thomas Gleixner CommitDate: Fri, 24 Apr 2015 15:36:54 +0200 x86/irq: Move check of cfg->move_in_progress into send_cleanup_vector() Move check of cfg->move_in_progress into send_cleanup_vector() to prepare for simplifying struct irq_cfg. Signed-off-by: Jiang Liu Tested-by: Joerg Roedel Cc: Konrad Rzeszutek Wilk Cc: David Cohen Cc: Sander Eikelenboom Cc: David Vrabel Cc: Tony Luck Cc: Greg Kroah-Hartman Cc: iommu@lists.linux-foundation.org Cc: Bjorn Helgaas Cc: Benjamin Herrenschmidt Cc: Rafael J. Wysocki Cc: Randy Dunlap Cc: Yinghai Lu Cc: Borislav Petkov Cc: Dimitri Sivanich Cc: Joerg Roedel Link: http://lkml.kernel.org/r/1428978610-28986-26-git-send-email-jiang.liu@linux.intel.com Signed-off-by: Thomas Gleixner --- arch/x86/kernel/apic/vector.c | 10 ++++++++-- arch/x86/platform/uv/uv_irq.c | 3 +-- drivers/iommu/amd_iommu.c | 3 +-- drivers/iommu/intel_irq_remapping.c | 3 +-- 4 files changed, 11 insertions(+), 8 deletions(-) diff --git a/arch/x86/kernel/apic/vector.c b/arch/x86/kernel/apic/vector.c index 1aea62d..0092a6e 100644 --- a/arch/x86/kernel/apic/vector.c +++ b/arch/x86/kernel/apic/vector.c @@ -494,7 +494,7 @@ static struct irq_chip lapic_controller = { }; #ifdef CONFIG_SMP -void send_cleanup_vector(struct irq_cfg *cfg) +static void __send_cleanup_vector(struct irq_cfg *cfg) { cpumask_var_t cleanup_mask; @@ -512,6 +512,12 @@ void send_cleanup_vector(struct irq_cfg *cfg) cfg->move_in_progress = 0; } +void send_cleanup_vector(struct irq_cfg *cfg) +{ + if (cfg->move_in_progress) + __send_cleanup_vector(cfg); +} + asmlinkage __visible void smp_irq_move_cleanup_interrupt(void) { unsigned vector, me; @@ -582,7 +588,7 @@ static void __irq_complete_move(struct irq_cfg *cfg, unsigned vector) me = smp_processor_id(); if (vector == cfg->vector && cpumask_test_cpu(me, cfg->domain)) - send_cleanup_vector(cfg); + __send_cleanup_vector(cfg); } void irq_complete_move(struct irq_cfg *cfg) diff --git a/arch/x86/platform/uv/uv_irq.c b/arch/x86/platform/uv/uv_irq.c index 54af6e3..091b36a 100644 --- a/arch/x86/platform/uv/uv_irq.c +++ b/arch/x86/platform/uv/uv_irq.c @@ -63,8 +63,7 @@ uv_set_irq_affinity(struct irq_data *data, const struct cpumask *mask, ret = parent->chip->irq_set_affinity(parent, mask, force); if (ret >= 0) { uv_program_mmr(cfg, data->chip_data); - if (cfg->move_in_progress) - send_cleanup_vector(cfg); + send_cleanup_vector(cfg); } return ret; diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c index b5d903c..cbe8c1f 100644 --- a/drivers/iommu/amd_iommu.c +++ b/drivers/iommu/amd_iommu.c @@ -4327,8 +4327,7 @@ static int amd_ir_set_affinity(struct irq_data *data, * at the new destination. So, time to cleanup the previous * vector allocation. */ - if (cfg->move_in_progress) - send_cleanup_vector(cfg); + send_cleanup_vector(cfg); return IRQ_SET_MASK_OK_DONE; } diff --git a/drivers/iommu/intel_irq_remapping.c b/drivers/iommu/intel_irq_remapping.c index 34642d3..14d9569 100644 --- a/drivers/iommu/intel_irq_remapping.c +++ b/drivers/iommu/intel_irq_remapping.c @@ -1003,8 +1003,7 @@ intel_ir_set_affinity(struct irq_data *data, const struct cpumask *mask, * at the new destination. So, time to cleanup the previous * vector allocation. */ - if (cfg->move_in_progress) - send_cleanup_vector(cfg); + send_cleanup_vector(cfg); return IRQ_SET_MASK_OK_DONE; }