Skip to content

Commit

Permalink
kernel/smp.c: remove 'priv' of call_single_data
Browse files Browse the repository at this point in the history
The 'priv' field is redundant; we can pass data via 'info'.

Signed-off-by: liguang <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Oleg Nesterov <[email protected]>
Cc: Ingo Molnar <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
liguang authored and torvalds committed May 1, 2013

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent 1def1dc commit 3440a1c
Showing 2 changed files with 2 additions and 5 deletions.
1 change: 0 additions & 1 deletion include/linux/smp.h
Original file line number Diff line number Diff line change
@@ -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) */
6 changes: 2 additions & 4 deletions kernel/softirq.c
Original file line number Diff line number Diff line change
@@ -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;

0 comments on commit 3440a1c

Please sign in to comment.