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? -- To unsubscribe from this list: send the line "unsubscribe linux-arch" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html