From: Jiang Liu <liuj97@gmail.com>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: Jiang Liu <jiang.liu@huawei.com>, Jiang Liu <liuj97@gmail.com>,
Keping Chen <chenkeping@huawei.com>,
x86@kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 1/4] IRQ,x86: remove redundant memory copy operations in chip->irq_set_affinity()
Date: Mon, 2 Apr 2012 00:33:49 +0800 [thread overview]
Message-ID: <1333298032-4047-1-git-send-email-jiang.liu@huawei.com> (raw)
In-Reply-To: <4F772F2A.9020903@gmail.com>
Changeset 3b8249e7 has introduced standard return value IRQ_SET_MASK_OK(0) and
IRQ_SET_MASK_OK_NOCOPY(1) for interrupt controller chip's set_irq_affinity()
method. If chip->irq_set_affinity() doesn't change the affinity mask passed in,
it should return IRQ_SET_MASK_OK and the core logic will copy the affinity
mask to irq_data->affinity field.
Several xxx_irq_set_affinity() methods for x86 platforms still return
0(IRQ_SET_MASK_OK) after copying the affinity mask to irq_data->affinity field,
so remove the redundant memory copy operations.
Signed-off-by: Jiang Liu <jiang.liu@huawei.com>
---
arch/x86/kernel/apic/io_apic.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c
index 6d10a66..c68954e 100644
--- a/arch/x86/kernel/apic/io_apic.c
+++ b/arch/x86/kernel/apic/io_apic.c
@@ -2326,9 +2326,8 @@ int __ioapic_set_affinity(struct irq_data *data, const struct cpumask *mask,
if (assign_irq_vector(data->irq, data->chip_data, mask))
return -1;
- cpumask_copy(data->affinity, mask);
-
*dest_id = apic->cpu_mask_to_apicid_and(mask, cfg->domain);
+
return 0;
}
@@ -2403,7 +2402,6 @@ ir_ioapic_set_affinity(struct irq_data *data, const struct cpumask *mask,
if (cfg->move_in_progress)
send_cleanup_vector(cfg);
- cpumask_copy(data->affinity, mask);
return 0;
}
@@ -3832,6 +3830,8 @@ void __init setup_ioapic_dest(void)
ir_ioapic_set_affinity(idata, mask, false);
else
ioapic_set_affinity(idata, mask, false);
+
+ cpumask_copy(idata->affinity, mask);
}
}
--
1.7.5.4
next prev parent reply other threads:[~2012-04-01 16:36 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 ` Jiang Liu [this message]
2012-04-01 16:33 ` [PATCH 2/4] " 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:x86/cleanups] x86: Return IRQ_SET_MASK_OK_NOCOPY from irq affinity functions tip-bot for Jiang Liu
2012-03-30 15:11 ` [PATCH v3 4/4] IRQ,IA64: normalize return value of chip->irq_set_affinity() method 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=1333298032-4047-1-git-send-email-jiang.liu@huawei.com \
--to=liuj97@gmail.com \
--cc=chenkeping@huawei.com \
--cc=jiang.liu@huawei.com \
--cc=linux-kernel@vger.kernel.org \
--cc=tglx@linutronix.de \
--cc=x86@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
all inboxes | Powered by JetHome®