Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 67386
b: refs/heads/master
c: 8fd7675
h: refs/heads/master
v: v3
  • Loading branch information
Satyam Sharma authored and Paul Mackerras committed Sep 22, 2007
1 parent d0649c9 commit fd17287
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 10 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 17b5ee04c09a158129eb538933eae7be956190e9
refs/heads/master: 8fd7675c092f79f240246c76728477ec4e7f7f09
27 changes: 18 additions & 9 deletions trunk/arch/powerpc/kernel/smp.c
Original file line number Diff line number Diff line change
Expand Up @@ -152,11 +152,6 @@ static void stop_this_cpu(void *dummy)
;
}

void smp_send_stop(void)
{
smp_call_function(stop_this_cpu, NULL, 1, 0);
}

/*
* Structure and data for smp_call_function(). This is designed to minimise
* static memory requirements. It also looks cleaner.
Expand Down Expand Up @@ -198,9 +193,6 @@ int smp_call_function_map(void (*func) (void *info), void *info, int nonatomic,
int cpu;
u64 timeout;

/* Can deadlock when called with interrupts disabled */
WARN_ON(irqs_disabled());

if (unlikely(smp_ops == NULL))
return ret;

Expand Down Expand Up @@ -270,10 +262,19 @@ int smp_call_function_map(void (*func) (void *info), void *info, int nonatomic,
return ret;
}

static int __smp_call_function(void (*func)(void *info), void *info,
int nonatomic, int wait)
{
return smp_call_function_map(func,info,nonatomic,wait,cpu_online_map);
}

int smp_call_function(void (*func) (void *info), void *info, int nonatomic,
int wait)
{
return smp_call_function_map(func,info,nonatomic,wait,cpu_online_map);
/* Can deadlock when called with interrupts disabled */
WARN_ON(irqs_disabled());

return __smp_call_function(func, info, nonatomic, wait);
}
EXPORT_SYMBOL(smp_call_function);

Expand All @@ -283,6 +284,9 @@ int smp_call_function_single(int cpu, void (*func) (void *info), void *info, int
cpumask_t map = CPU_MASK_NONE;
int ret = 0;

/* Can deadlock when called with interrupts disabled */
WARN_ON(irqs_disabled());

if (!cpu_online(cpu))
return -EINVAL;

Expand All @@ -299,6 +303,11 @@ int smp_call_function_single(int cpu, void (*func) (void *info), void *info, int
}
EXPORT_SYMBOL(smp_call_function_single);

void smp_send_stop(void)
{
__smp_call_function(stop_this_cpu, NULL, 1, 0);
}

void smp_call_function_interrupt(void)
{
void (*func) (void *info);
Expand Down

0 comments on commit fd17287

Please sign in to comment.