From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andi Kleen Subject: Re: [RFC][PATCH] kmap_atomic_push Date: Mon, 12 Oct 2009 20:10:37 +0200 Message-ID: <87ws30fppe.fsf@basil.nowhere.org> References: <1255016123.17055.17.camel@laptop> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: In-Reply-To: <1255016123.17055.17.camel@laptop> (Peter Zijlstra's message of "Thu, 08 Oct 2009 17:35:23 +0200") Sender: linux-kernel-owner@vger.kernel.org To: Peter Zijlstra Cc: Linus Torvalds , Ingo Molnar , Andrew Morton , "hugh.dickins" , David Howells , lkml , linux-arch List-Id: linux-arch.vger.kernel.org Peter Zijlstra 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.