lkml.org 
[lkml]   [2011]   [Aug]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [patch v2 21/35] Hexagon: Add SMP support
From
Date
On Tue, 2011-08-30 at 14:07 -0500, Richard Kuo wrote:
> plain text document attachment (smp.diff)
> Signed-off-by: Richard Kuo <rkuo@codeaurora.org>
[]
> +static inline void __handle_ipi(unsigned long *ops, struct ipi_data *ipi,
> + int cpu)
> +{
> + do {
> + unsigned long msg = msg = ffz(~*ops);

Really? That's unlikely to be the right code.
Maybe just one msg?

> +
> + *ops &= ~(1 << msg);
> +
> + switch (msg) {
> + case IPI_TIMER:
> + ipi_timer();
> + break;
> + case IPI_CALL_FUNC:
> + {

> + struct smp_call_struct *data =
> + smp_call_function_data;
> + void (*func) (void *info) =
> + data->func;

No need to wrap either of these.

> + void *info = data->info;
> + int wait = data->wait;
> +
> + smp_mb();
> + cpumask_clear_cpu(cpu, &data->pending);
> +
> + (*func)(info);
> +
> + smp_mb();
> + if (wait)
> + cpumask_clear_cpu(cpu,
> + &data->unfinished);

or here.




\
 
 \ /
  Last update: 2011-08-30 21:33    [W:0.352 / U:0.036 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site