Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757500AbZJLSLQ (ORCPT ); Mon, 12 Oct 2009 14:11:16 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1757477AbZJLSLP (ORCPT ); Mon, 12 Oct 2009 14:11:15 -0400 Received: from one.firstfloor.org ([213.235.205.2]:34902 "EHLO one.firstfloor.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757470AbZJLSLO (ORCPT ); Mon, 12 Oct 2009 14:11:14 -0400 To: Peter Zijlstra Cc: Linus Torvalds , Ingo Molnar , Andrew Morton , "hugh.dickins" , David Howells , lkml , linux-arch Subject: Re: [RFC][PATCH] kmap_atomic_push From: Andi Kleen References: <1255016123.17055.17.camel@laptop> Date: Mon, 12 Oct 2009 20:10:37 +0200 In-Reply-To: <1255016123.17055.17.camel@laptop> (Peter Zijlstra's message of "Thu, 08 Oct 2009 17:35:23 +0200") Message-ID: <87ws30fppe.fsf@basil.nowhere.org> User-Agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/22.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 669 Lines: 19 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. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/