* [PATCH 0/2] genirq: minor fixes for setting MSI affinity
@ 2015-03-17 8:41 Yun Wu
2015-03-17 8:41 ` [PATCH 1/2] genirq: use proper interface Yun Wu
2015-03-17 8:41 ` [PATCH 2/2] genirq: use sensible function name Yun Wu
0 siblings, 2 replies; 3+ messages in thread
From: Yun Wu @ 2015-03-17 8:41 UTC (permalink / raw)
To: tglx, jiang.liu; +Cc: linux-kernel, Yun Wu
This patch series only contains minor fixes for setting affinity of
MSI interrupts.
Based on:
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git irq/core
Yun Wu (2):
genirq: use proper interface
genirq: use sensible function name
include/linux/msi.h | 4 ++--
kernel/irq/msi.c | 9 ++++-----
2 files changed, 6 insertions(+), 7 deletions(-)
--
1.8.0
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH 1/2] genirq: use proper interface
2015-03-17 8:41 [PATCH 0/2] genirq: minor fixes for setting MSI affinity Yun Wu
@ 2015-03-17 8:41 ` Yun Wu
2015-03-17 8:41 ` [PATCH 2/2] genirq: use sensible function name Yun Wu
1 sibling, 0 replies; 3+ messages in thread
From: Yun Wu @ 2015-03-17 8:41 UTC (permalink / raw)
To: tglx, jiang.liu; +Cc: linux-kernel, Yun Wu
An interface provided by kernel/irq/chip.c is designed to do the
same thing, so just use it.
Signed-off-by: Yun Wu <wuyun.wu@huawei.com>
---
kernel/irq/msi.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/kernel/irq/msi.c b/kernel/irq/msi.c
index 3e18163..b773708 100644
--- a/kernel/irq/msi.c
+++ b/kernel/irq/msi.c
@@ -50,11 +50,10 @@ static inline void irq_chip_write_msi_msg(struct irq_data *data,
int msi_domain_set_affinity(struct irq_data *irq_data,
const struct cpumask *mask, bool force)
{
- struct irq_data *parent = irq_data->parent_data;
struct msi_msg msg;
int ret;
- ret = parent->chip->irq_set_affinity(parent, mask, force);
+ ret = irq_chip_set_affinity_parent(irq_data, mask, force);
if (ret >= 0 && ret != IRQ_SET_MASK_OK_DONE) {
BUG_ON(irq_chip_compose_msi_msg(irq_data, &msg));
irq_chip_write_msi_msg(irq_data, &msg);
--
1.8.0
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH 2/2] genirq: use sensible function name
2015-03-17 8:41 [PATCH 0/2] genirq: minor fixes for setting MSI affinity Yun Wu
2015-03-17 8:41 ` [PATCH 1/2] genirq: use proper interface Yun Wu
@ 2015-03-17 8:41 ` Yun Wu
1 sibling, 0 replies; 3+ messages in thread
From: Yun Wu @ 2015-03-17 8:41 UTC (permalink / raw)
To: tglx, jiang.liu; +Cc: linux-kernel, Yun Wu
It's easier to accept the name of msi_chip_set_affinity() than
msi_domain_set_affinity(), since function of setting interrupt
affinity is actually provided by IRQ chips.
Signed-off-by: Yun Wu <wuyun.wu@huawei.com>
---
include/linux/msi.h | 4 ++--
kernel/irq/msi.c | 6 +++---
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/include/linux/msi.h b/include/linux/msi.h
index 8ac4a68..c099e6c 100644
--- a/include/linux/msi.h
+++ b/include/linux/msi.h
@@ -210,8 +210,8 @@ enum {
MSI_FLAG_PCI_MSIX = (1 << 4),
};
-int msi_domain_set_affinity(struct irq_data *data, const struct cpumask *mask,
- bool force);
+int msi_chip_set_affinity(struct irq_data *data, const struct cpumask *mask,
+ bool force);
struct irq_domain *msi_create_irq_domain(struct device_node *of_node,
struct msi_domain_info *info,
diff --git a/kernel/irq/msi.c b/kernel/irq/msi.c
index b773708..3261480 100644
--- a/kernel/irq/msi.c
+++ b/kernel/irq/msi.c
@@ -39,7 +39,7 @@ static inline void irq_chip_write_msi_msg(struct irq_data *data,
}
/**
- * msi_domain_set_affinity - Generic affinity setter function for MSI domains
+ * msi_chip_set_affinity - Generic affinity setter function for MSI domains
* @irq_data: The irq data associated to the interrupt
* @mask: The affinity mask to set
* @force: Flag to enforce setting (disable online checks)
@@ -47,7 +47,7 @@ static inline void irq_chip_write_msi_msg(struct irq_data *data,
* Intended to be used by MSI interrupt controllers which are
* implemented with hierarchical domains.
*/
-int msi_domain_set_affinity(struct irq_data *irq_data,
+int msi_chip_set_affinity(struct irq_data *irq_data,
const struct cpumask *mask, bool force)
{
struct msi_msg msg;
@@ -216,7 +216,7 @@ static void msi_domain_update_chip_ops(struct msi_domain_info *info)
if (!chip->irq_unmask)
chip->irq_unmask = pci_msi_unmask_irq;
if (!chip->irq_set_affinity)
- chip->irq_set_affinity = msi_domain_set_affinity;
+ chip->irq_set_affinity = msi_chip_set_affinity;
}
/**
--
1.8.0
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-03-17 9:49 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-17 8:41 [PATCH 0/2] genirq: minor fixes for setting MSI affinity Yun Wu
2015-03-17 8:41 ` [PATCH 1/2] genirq: use proper interface Yun Wu
2015-03-17 8:41 ` [PATCH 2/2] genirq: use sensible function name Yun Wu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®