lkml.org 
[lkml]   [2013]   [Sep]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [gcv v4 05/38] percpu: Add preemption checks to __this_cpu ops
On Tue, Sep 03, 2013 at 10:33:20PM +0000, Christoph Lameter wrote:
> We define a check function in order to avoid trouble with the
> include files. Then the higher level __this_cpu macros are
> modified to involve the check before any operation.
>

So this_cpu_ptr() is the one with the check, and __this_cpu_ptr() is the
one without. But for the other this_cpu ops __this_cpu_$OP() is going to
be the one with a check and this_cpu_$OP() the one without?

Sounds like a bloody marvelous idea :/



> Index: linux/include/linux/percpu.h
> ===================================================================
> --- linux.orig/include/linux/percpu.h 2013-09-03 13:38:49.818888738 -0500
> +++ linux/include/linux/percpu.h 2013-09-03 13:38:49.810888819 -0500
> @@ -172,6 +172,12 @@ extern phys_addr_t per_cpu_ptr_to_phys(v
>
> extern void __bad_size_call_parameter(void);
>
> +#ifdef CONFIG_PREEMPT
> +extern void this_cpu_preempt_check(void);
> +#else
> +static inline void this_cpu_preempt_check(void) { }
> +#endif

How about re-using debug_smp_processor_id() instead?


\
 
 \ /
  Last update: 2013-09-16 12:41    [W:0.039 / U:1.696 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site