Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933860AbYAaNBW (ORCPT ); Thu, 31 Jan 2008 08:01:22 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1764439AbYAaNBL (ORCPT ); Thu, 31 Jan 2008 08:01:11 -0500 Received: from www.tglx.de ([62.245.132.106]:40987 "EHLO www.tglx.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758631AbYAaNBK (ORCPT ); Thu, 31 Jan 2008 08:01:10 -0500 Date: Thu, 31 Jan 2008 14:00:34 +0100 (CET) From: Thomas Gleixner To: "Huang, Ying" cc: Ingo Molnar , "H. Peter Anvin" , Andi Kleen , linux-kernel@vger.kernel.org Subject: Re: [PATCH 4/5] x86: add executable mapping support to ioremap In-Reply-To: <1201764967.12950.25.camel@caritas-dev.intel.com> Message-ID: References: <1201764967.12950.25.camel@caritas-dev.intel.com> User-Agent: Alpine 1.00 (LFD 882 2007-12-20) 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: 1262 Lines: 36 On Thu, 31 Jan 2008, Huang, Ying wrote: > This patch makes ioremap() can be used to map pages as executable, > this is needed by EFI support. > +extern void __iomem *__ioremap(unsigned long phys_addr, unsigned long size, > + enum ioremap_mode mode, > + enum ioremap_xmode xmode); > + Why do you want to add a new API? addr = ioremap(phys_addr, len); set_memory_x(addr); should do what you want already. I think Arjan was not very clear in his reply yesterday. We tried to avoid the intermingling of ioremap and the page attribute settings. We just kept the cached/uncached part. Now thinking about it further, we should probably fully decouple the mapping and the attribute change and remove the enum argument from __ioremap and change the implementations of ioremap_cached and ioremap_uncached to do the attribute setting after the remap. That way ioremap_chached and ioremap_uncached just would become what they should be: conveniance functions for the developers. Thanks, tglx -- 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/