[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <tip-f841d792e38f75f5e25b0b66f7b5d235d180a735@git.kernel.org>
Date: Thu, 24 May 2012 14:23:23 -0700
From: tip-bot for Jiang Liu <liuj97@...il.com>
To: linux-tip-commits@...r.kernel.org
Cc: linux-kernel@...r.kernel.org, hpa@...or.com, mingo@...nel.org,
yinghai@...nel.org, cpw@....com, nagananda.chumbalkar@...com,
chenkeping@...wei.com, suresh.b.siddha@...el.com,
tglx@...utronix.de, liuj97@...il.com, jiang.liu@...wei.com,
jacob.jun.pan@...ux.intel.com
Subject: [tip:x86/cleanups] x86:
Return IRQ_SET_MASK_OK_NOCOPY from irq affinity functions
Commit-ID: f841d792e38f75f5e25b0b66f7b5d235d180a735
Gitweb: http://git.kernel.org/tip/f841d792e38f75f5e25b0b66f7b5d235d180a735
Author: Jiang Liu <liuj97@...il.com>
AuthorDate: Fri, 30 Mar 2012 23:11:35 +0800
Committer: Thomas Gleixner <tglx@...utronix.de>
CommitDate: Thu, 24 May 2012 23:16:33 +0200
x86: Return IRQ_SET_MASK_OK_NOCOPY from irq affinity functions
The interrupt chip irq_set_affinity() functions copy the affinity mask
to irq_data->affinity but return 0, i.e. IRQ_SET_MASK_OK.
IRQ_SET_MASK_OK causes the core code to do another redundant copy.
Return IRQ_SET_MASK_OK_NOCOPY to avoid this.
Signed-off-by: Jiang Liu <jiang.liu@...wei.com>
Cc: Suresh Siddha <suresh.b.siddha@...el.com>
Cc: Yinghai Lu <yinghai@...nel.org>
Cc: Naga Chumbalkar <nagananda.chumbalkar@...com>
Cc: Jacob Pan <jacob.jun.pan@...ux.intel.com>
Cc: Cliff Wickman <cpw@....com>
Cc: Jiang Liu <liuj97@...il.com>
Cc: Keping Chen <chenkeping@...wei.com>
Link: http://lkml.kernel.org/r/1333120296-13563-4-git-send-email-jiang.liu@huawei.com
Signed-off-by: Thomas Gleixner <tglx@...utronix.de>
---
arch/x86/kernel/apic/io_apic.c | 9 +++++----
arch/x86/platform/uv/uv_irq.c | 2 +-
2 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c
index ac96561..bce2001 100644
--- a/arch/x86/kernel/apic/io_apic.c
+++ b/arch/x86/kernel/apic/io_apic.c
@@ -2270,6 +2270,7 @@ ioapic_set_affinity(struct irq_data *data, const struct cpumask *mask,
/* Only the high 8 bits are valid. */
dest = SET_APIC_LOGICAL_ID(dest);
__target_IO_APIC_irq(irq, dest, data->chip_data);
+ ret = IRQ_SET_MASK_OK_NOCOPY;
}
raw_spin_unlock_irqrestore(&ioapic_lock, flags);
return ret;
@@ -3092,7 +3093,7 @@ msi_set_affinity(struct irq_data *data, const struct cpumask *mask, bool force)
__write_msi_msg(data->msi_desc, &msg);
- return 0;
+ return IRQ_SET_MASK_OK_NOCOPY;
}
#endif /* CONFIG_SMP */
@@ -3214,7 +3215,7 @@ dmar_msi_set_affinity(struct irq_data *data, const struct cpumask *mask,
dmar_msi_write(irq, &msg);
- return 0;
+ return IRQ_SET_MASK_OK_NOCOPY;
}
#endif /* CONFIG_SMP */
@@ -3267,7 +3268,7 @@ static int hpet_msi_set_affinity(struct irq_data *data,
hpet_msi_write(data->handler_data, &msg);
- return 0;
+ return IRQ_SET_MASK_OK_NOCOPY;
}
#endif /* CONFIG_SMP */
@@ -3340,7 +3341,7 @@ ht_set_affinity(struct irq_data *data, const struct cpumask *mask, bool force)
return -1;
target_ht_irq(data->irq, dest, cfg->vector);
- return 0;
+ return IRQ_SET_MASK_OK_NOCOPY;
}
#endif
diff --git a/arch/x86/platform/uv/uv_irq.c b/arch/x86/platform/uv/uv_irq.c
index f25c276..a22c416 100644
--- a/arch/x86/platform/uv/uv_irq.c
+++ b/arch/x86/platform/uv/uv_irq.c
@@ -222,7 +222,7 @@ uv_set_irq_affinity(struct irq_data *data, const struct cpumask *mask,
if (cfg->move_in_progress)
send_cleanup_vector(cfg);
- return 0;
+ return IRQ_SET_MASK_OK_NOCOPY;
}
/*
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists