From: liguang <lig.fnst@cn.fujitsu.com>
To: tglx@linutronix.de, peterz@infradead.org,
akpm@linux-foundation.org, shli@fusionio.com,
srivatsa.bhat@linux.vnet.ibm.com, suresh.b.siddha@intel.com,
fweisbec@gmail.com, sedat.dilek@gmail.com,
paulmck@linux.vnet.ibm.com, linux-kernel@vger.kernel.org
Cc: liguang <lig.fnst@cn.fujitsu.com>
Subject: [PATCH 2/2] smp: remove 'priv' of call_single_data
Date: Mon, 22 Apr 2013 13:47:23 +0800 [thread overview]
Message-ID: <1366609643-17628-2-git-send-email-lig.fnst@cn.fujitsu.com> (raw)
In-Reply-To: <1366609643-17628-1-git-send-email-lig.fnst@cn.fujitsu.com>
the 'priv' field seems a little redundant,
because we can pass data via 'info'.
Signed-off-by: liguang <lig.fnst@cn.fujitsu.com>
---
include/linux/smp.h | 1 -
kernel/softirq.c | 6 ++----
2 files changed, 2 insertions(+), 5 deletions(-)
diff --git a/include/linux/smp.h b/include/linux/smp.h
index 3e07a7d..e6564c1 100644
--- a/include/linux/smp.h
+++ b/include/linux/smp.h
@@ -20,7 +20,6 @@ struct call_single_data {
smp_call_func_t func;
void *info;
u16 flags;
- u16 priv;
};
/* total number of cpus in this system (may exceed NR_CPUS) */
diff --git a/kernel/softirq.c b/kernel/softirq.c
index 14d7758..aa82723 100644
--- a/kernel/softirq.c
+++ b/kernel/softirq.c
@@ -620,8 +620,7 @@ static void remote_softirq_receive(void *data)
unsigned long flags;
int softirq;
- softirq = cp->priv;
-
+ softirq = *(int *)cp->info;
local_irq_save(flags);
__local_trigger(cp, softirq);
local_irq_restore(flags);
@@ -631,9 +630,8 @@ static int __try_remote_softirq(struct call_single_data *cp, int cpu, int softir
{
if (cpu_online(cpu)) {
cp->func = remote_softirq_receive;
- cp->info = cp;
+ cp->info = &softirq;
cp->flags = 0;
- cp->priv = softirq;
__smp_call_function_single(cpu, cp, 0);
return 0;
--
1.7.2.5
next prev parent reply other threads:[~2013-04-22 5:49 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-22 5:47 [PATCH 1/2] smp: use '|=' for csd_lock liguang
2013-04-22 5:47 ` liguang [this message]
2013-04-22 6:18 ` Sedat Dilek
2013-04-22 6:22 ` li guang
2013-04-22 6:30 ` Sedat Dilek
2013-04-22 6:49 ` Sedat Dilek
2013-04-23 22:40 ` Andrew Morton
2013-04-24 0:08 ` li guang
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=1366609643-17628-2-git-send-email-lig.fnst@cn.fujitsu.com \
--to=lig.fnst@cn.fujitsu.com \
--cc=akpm@linux-foundation.org \
--cc=fweisbec@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=paulmck@linux.vnet.ibm.com \
--cc=peterz@infradead.org \
--cc=sedat.dilek@gmail.com \
--cc=shli@fusionio.com \
--cc=srivatsa.bhat@linux.vnet.ibm.com \
--cc=suresh.b.siddha@intel.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
all inboxes | Powered by JetHome®