Linux IOMMU Development
 help / color / mirror / Atom feed
  • * [Patch Part3 v4 33/38] x86, irq: Move check of cfg->move_in_progress into send_cleanup_vector()
           [not found] <1416901802-24211-1-git-send-email-jiang.liu@linux.intel.com>
           [not found] ` <1416901802-24211-1-git-send-email-jiang.liu-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
    @ 2014-11-25  7:49 ` Jiang Liu
      1 sibling, 0 replies; 13+ messages in thread
    From: Jiang Liu @ 2014-11-25  7:49 UTC (permalink / raw)
      To: Bjorn Helgaas, Benjamin Herrenschmidt, Thomas Gleixner,
    	Ingo Molnar, H. Peter Anvin, Rafael J. Wysocki, Randy Dunlap,
    	Yinghai Lu, Borislav Petkov, x86, Joerg Roedel, Jiang Liu
      Cc: Konrad Rzeszutek Wilk, Andrew Morton, Tony Luck,
    	Greg Kroah-Hartman, linux-kernel, linux-pci, linux-acpi, iommu
    
    Move check of cfg->move_in_progress into send_cleanup_vector() to
    prepare for simplifying struct irq_cfg.
    
    Signed-off-by: Jiang Liu <jiang.liu@linux.intel.com>
    Tested-by: Joerg Roedel <jroedel@suse.de>
    ---
     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 436a3400d9ac..a5ce2eef0528 100644
    --- a/arch/x86/kernel/apic/vector.c
    +++ b/arch/x86/kernel/apic/vector.c
    @@ -495,7 +495,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;
     
    @@ -513,6 +513,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;
    @@ -583,7 +589,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 c237ed34a498..b242e0aada19 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 2e8bbe5e164d..a5c59b434c77 100644
    --- a/drivers/iommu/amd_iommu.c
    +++ b/drivers/iommu/amd_iommu.c
    @@ -4331,8 +4331,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 acff8493191e..f6da3b2651c0 100644
    --- a/drivers/iommu/intel_irq_remapping.c
    +++ b/drivers/iommu/intel_irq_remapping.c
    @@ -997,8 +997,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;
     }
    -- 
    1.7.10.4
    
    
    ^ permalink raw reply related	[flat|nested] 13+ messages in thread

  • end of thread, other threads:[~2014-12-02  0:21 UTC | newest]
    
    Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
    -- links below jump to the message on this page --
         [not found] <1416901802-24211-1-git-send-email-jiang.liu@linux.intel.com>
         [not found] ` <1416901802-24211-1-git-send-email-jiang.liu-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
    2014-11-25  7:49   ` [Patch Part3 v4 12/38] x86, irq: Kill x86_io_apic_ops.print_entries and related interfaces Jiang Liu
    2014-11-25  7:49   ` [Patch Part3 v4 13/38] x86, irq: Kill x86_io_apic_ops.setup_entry " Jiang Liu
    2014-11-25  7:49   ` [Patch Part3 v4 14/38] x86, irq: Kill x86_io_apic_ops.set_affinity " Jiang Liu
    2014-11-25  7:49   ` [Patch Part3 v4 15/38] x86, irq: Kill x86_io_apic_ops.eoi_ioapic_pin " Jiang Liu
    2014-11-25  7:49   ` [Patch Part3 v4 18/38] x86: irq_remapping: Clean up unsued code Jiang Liu
         [not found]     ` <1416901802-24211-19-git-send-email-jiang.liu-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
    2014-12-02  0:21       ` Bjorn Helgaas
    2014-11-25  7:49   ` [Patch Part3 v4 19/38] iommu/vt-d: " Jiang Liu
    2014-11-25  7:49   ` [Patch Part3 v4 20/38] iommu/amd: " Jiang Liu
    2014-11-25  7:49   ` [Patch Part3 v4 21/38] x86: irq_remapping: Clean up unused interfaces Jiang Liu
    2014-11-25  7:49   ` [Patch Part3 v4 22/38] x86, irq: Kill irq_cfg.irq_remapped Jiang Liu
    2014-11-25  7:49   ` [Patch Part3 v4 23/38] iommu/vt-d: Move struct irq_2_iommu into intel_irq_remapping.c Jiang Liu
    2014-11-25  7:49   ` [Patch Part3 v4 24/38] iommu/amd: Move struct irq_2_irte into amd_iommu.c Jiang Liu
    2014-11-25  7:49 ` [Patch Part3 v4 33/38] x86, irq: Move check of cfg->move_in_progress into send_cleanup_vector() Jiang Liu
    

    This is a public inbox, see mirroring instructions
    for how to clone and mirror all data and code used for this inbox