Re: [RFC][PATCH] kmap_atomic_push

Andi Kleen
2009-10-12T18:11:14Z

Peter Zijlstra <peterz@infradead.org> writes:
> -
> -static inline void debug_kmap_atomic(enum km_type type)
> +static inline int kmap_atomic_push_idx(void)
> {
> + int idx = __get_cpu_var(__kmap_atomic_depth)++;

The counter needs to be of local atomic type. Otherwise kmap_atomic cannot
be done from interrupts/nmis, which is unfortunately occasionally needed.

-Andi

--
ak@linux.intel.com -- Speaking for myself only.