From: Akinobu Mita <akinobu.mita@gmail.com>
To: linux-kernel@vger.kernel.org
Cc: Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>
Subject: [patch 5/9] x86: use cpumask_of_cpu()
Date: Sat, 05 Apr 2008 22:39:08 +0900 [thread overview]
Message-ID: <47f783a6.19ac7e0a.525e.5161@mx.google.com> (raw)
In-Reply-To: 20080405133903.770639386@gmail.com
[-- Attachment #1: x86-use-cpumask_of_cpu.patch --]
[-- Type: text/plain, Size: 1981 bytes --]
Use cpumask_of_cpu() rather than the pair of cpus_clear() and cpu_set().
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
---
arch/x86/kernel/cpu/mcheck/mce_amd_64.c | 4 ++--
arch/x86/kernel/genapic_flat_64.c | 5 +----
arch/x86/kernel/io_apic_64.c | 4 +---
3 files changed, 4 insertions(+), 9 deletions(-)
Index: 2.6-git/arch/x86/kernel/genapic_flat_64.c
===================================================================
--- 2.6-git.orig/arch/x86/kernel/genapic_flat_64.c
+++ 2.6-git/arch/x86/kernel/genapic_flat_64.c
@@ -138,12 +138,9 @@ static cpumask_t physflat_target_cpus(vo
static cpumask_t physflat_vector_allocation_domain(int cpu)
{
- cpumask_t domain = CPU_MASK_NONE;
- cpu_set(cpu, domain);
- return domain;
+ return cpumask_of_cpu(cpu);
}
-
static void physflat_send_IPI_mask(cpumask_t cpumask, int vector)
{
send_IPI_mask_sequence(cpumask, vector);
Index: 2.6-git/arch/x86/kernel/cpu/mcheck/mce_amd_64.c
===================================================================
--- 2.6-git.orig/arch/x86/kernel/cpu/mcheck/mce_amd_64.c
+++ 2.6-git/arch/x86/kernel/cpu/mcheck/mce_amd_64.c
@@ -254,8 +254,8 @@ struct threshold_attr {
static cpumask_t affinity_set(unsigned int cpu)
{
cpumask_t oldmask = current->cpus_allowed;
- cpumask_t newmask = CPU_MASK_NONE;
- cpu_set(cpu, newmask);
+ cpumask_t newmask = cpumask_of_cpu(cpu);
+
set_cpus_allowed(current, newmask);
return oldmask;
}
Index: 2.6-git/arch/x86/kernel/io_apic_64.c
===================================================================
--- 2.6-git.orig/arch/x86/kernel/io_apic_64.c
+++ 2.6-git/arch/x86/kernel/io_apic_64.c
@@ -1351,9 +1351,7 @@ static int ioapic_retrigger_irq(unsigned
unsigned long flags;
spin_lock_irqsave(&vector_lock, flags);
- cpus_clear(mask);
- cpu_set(first_cpu(cfg->domain), mask);
-
+ mask = cpumask_of_cpu(first_cpu(cfg->domain));
send_IPI_mask(mask, cfg->vector);
spin_unlock_irqrestore(&vector_lock, flags);
--
next prev parent reply other threads:[~2008-04-05 13:51 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20080405133903.770639386@gmail.com>
2008-04-05 13:39 ` [patch 1/9] x86: avoid redundant loop in io_apic_level_ack_pending() Akinobu Mita
2008-04-05 13:39 ` [patch 2/9] x86: use ioapic_read_entry() and ioapic_write_entry() Akinobu Mita
2008-04-05 13:39 ` [patch 3/9] x86: remove unnecessary memset() Akinobu Mita
2008-04-05 13:39 ` [patch 4/9] x86: remove unnecessary tmp local variable Akinobu Mita
2008-04-05 13:39 ` Akinobu Mita [this message]
2008-04-05 13:39 ` [patch 6/9] x86: use cpu_online() Akinobu Mita
2008-04-05 13:39 ` [patch 7/9] use BUILD_BUG_ON() for the size of struct intel_mp_floating Akinobu Mita
2008-04-05 13:39 ` [patch 8/9] x86_64: use MP_intsrc_info() Akinobu Mita
2008-04-05 13:39 ` [patch 9/9] x86: use bitmap library for pin_programmed Akinobu Mita
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=47f783a6.19ac7e0a.525e.5161@mx.google.com \
--to=akinobu.mita@gmail.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
/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