Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757748AbZJHWmt (ORCPT ); Thu, 8 Oct 2009 18:42:49 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754491AbZJHWmq (ORCPT ); Thu, 8 Oct 2009 18:42:46 -0400 Received: from casper.infradead.org ([85.118.1.10]:57742 "EHLO casper.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753094AbZJHWmq (ORCPT ); Thu, 8 Oct 2009 18:42:46 -0400 Subject: Re: [RFC][PATCH] kmap_atomic_push From: Peter Zijlstra To: Linus Torvalds Cc: Ingo Molnar , Andrew Morton , "hugh.dickins" , David Howells , lkml , linux-arch , jim owens , David Howells In-Reply-To: <1255016123.17055.17.camel@laptop> References: <1255016123.17055.17.camel@laptop> Content-Type: text/plain Date: Fri, 09 Oct 2009 00:42:00 +0200 Message-Id: <1255041720.17055.30.camel@laptop> Mime-Version: 1.0 X-Mailer: Evolution 2.26.1 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 749 Lines: 29 Just to make it clear, the stack design gets rid of crap like: -#define __KM_PTE \ - (in_nmi() ? KM_NMI_PTE : \ - in_irq() ? KM_IRQ_PTE : \ - KM_PTE0) and -static inline enum km_type crypto_kmap_type(int out) -{ - enum km_type type; - - if (in_softirq()) - type = out * (KM_SOFTIRQ1 - KM_SOFTIRQ0) + KM_SOFTIRQ0; - else - type = out * (KM_USER1 - KM_USER0) + KM_USER0; - - return type; -} -- 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/