From: tip-bot for Jiang Liu <liuj97@gmail.com>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@kernel.org,
yinghai@kernel.org, cpw@sgi.com, nagananda.chumbalkar@hp.com,
chenkeping@huawei.com, suresh.b.siddha@intel.com,
tglx@linutronix.de, liuj97@gmail.com, jiang.liu@huawei.com,
jacob.jun.pan@linux.intel.com
Subject: [tip:x86/cleanups] x86: Return IRQ_SET_MASK_OK_NOCOPY from irq affinity functions
Date: Thu, 24 May 2012 14:23:23 -0700 [thread overview]
Message-ID: <tip-f841d792e38f75f5e25b0b66f7b5d235d180a735@git.kernel.org> (raw)
In-Reply-To: <1333120296-13563-4-git-send-email-jiang.liu@huawei.com>
Commit-ID: f841d792e38f75f5e25b0b66f7b5d235d180a735
Gitweb: http://git.kernel.org/tip/f841d792e38f75f5e25b0b66f7b5d235d180a735
Author: Jiang Liu <liuj97@gmail.com>
AuthorDate: Fri, 30 Mar 2012 23:11:35 +0800
Committer: Thomas Gleixner <tglx@linutronix.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@huawei.com>
Cc: Suresh Siddha <suresh.b.siddha@intel.com>
Cc: Yinghai Lu <yinghai@kernel.org>
Cc: Naga Chumbalkar <nagananda.chumbalkar@hp.com>
Cc: Jacob Pan <jacob.jun.pan@linux.intel.com>
Cc: Cliff Wickman <cpw@sgi.com>
Cc: Jiang Liu <liuj97@gmail.com>
Cc: Keping Chen <chenkeping@huawei.com>
Link: http://lkml.kernel.org/r/1333120296-13563-4-git-send-email-jiang.liu@huawei.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.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;
}
/*
next prev parent reply other threads:[~2012-05-24 21:24 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-30 15:11 [PATCH v3 0/4] normalize return value of chip->irq_set_affinity() Jiang Liu
2012-03-30 15:11 ` [PATCH v3 1/4] IRQ: correctly handle return value from chip->irq_set_affinity() in irq_move_masked_irq() Jiang Liu
2012-03-30 21:31 ` [tip:irq/core] genirq: Adjust irq thread affinity on IRQ_SET_MASK_OK_NOCOPY return value tip-bot for Jiang Liu
2012-03-30 15:11 ` [PATCH v3 2/4] IRQ: introduce irq_do_set_affinity() to reduce duplicated code Jiang Liu
2012-05-24 20:53 ` [tip:irq/core] genirq: Introduce " tip-bot for Jiang Liu
2012-03-30 15:11 ` [PATCH v3 3/4] IRQ,x86: normalize return value of chip->irq_set_affinity() method Jiang Liu
2012-03-30 21:23 ` Thomas Gleixner
2012-03-31 16:22 ` Jiang Liu
2012-04-01 16:33 ` [PATCH 1/4] IRQ,x86: remove redundant memory copy operations in chip->irq_set_affinity() Jiang Liu
2012-04-01 16:33 ` [PATCH 2/4] IRQ,x86: normalize return value of chip->irq_set_affinity() method Jiang Liu
2012-04-01 16:33 ` [PATCH 3/4] IRQ,IA64: remove redundant memory copy operations in chip->irq_set_affinity() Jiang Liu
2012-04-01 16:33 ` [PATCH 4/4] IRQ,IA64: normalize return value of chip->irq_set_affinity() method Jiang Liu
2012-05-24 21:23 ` tip-bot for Jiang Liu [this message]
2012-03-30 15:11 ` [PATCH v3 " Jiang Liu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=tip-f841d792e38f75f5e25b0b66f7b5d235d180a735@git.kernel.org \
--to=liuj97@gmail.com \
--cc=chenkeping@huawei.com \
--cc=cpw@sgi.com \
--cc=hpa@zytor.com \
--cc=jacob.jun.pan@linux.intel.com \
--cc=jiang.liu@huawei.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=nagananda.chumbalkar@hp.com \
--cc=suresh.b.siddha@intel.com \
--cc=tglx@linutronix.de \
--cc=yinghai@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome