From patchwork Tue Sep 17 12:43:27 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Russ Dill X-Patchwork-Id: 2902121 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 11535BFF05 for ; Tue, 17 Sep 2013 12:44:38 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 115C520397 for ; Tue, 17 Sep 2013 12:44:34 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 997A22038B for ; Tue, 17 Sep 2013 12:44:29 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1VLudm-00007f-Ie; Tue, 17 Sep 2013 12:44:26 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1VLudk-00047S-8y; Tue, 17 Sep 2013 12:44:24 +0000 Received: from mail-pa0-x235.google.com ([2607:f8b0:400e:c03::235]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1VLudd-00045W-Go for linux-arm-kernel@lists.infradead.org; Tue, 17 Sep 2013 12:44:21 +0000 Received: by mail-pa0-f53.google.com with SMTP id lb1so6708527pab.40 for ; Tue, 17 Sep 2013 05:43:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=BlHjAbtuv5IaGQLk0yoyzdFjG9W2SKLXqn9EDtR1j7Q=; b=NtJoPFOe2y4EpqktzOdXr0O+oljpcC5SUo0OYJsQwGCwg+FsZ8/UOwxhsPDHjD7lqx HlMzZtfOUDKqf3zpjSrPz7BHKmP1CaFa5N2O+A7Q+NK+BCiKQN5qCfIrWy14h+19N7+O 3alQdxg7bhj3nUHFhNUVFwcqFr23fksEPRJ+VmFp6fgDwnPcJNjvPQ/3N0zFBy7cTW36 wBbumFVGBL5Xt9yCdXNHwprysWeXhPHyyuZ9urJv2wPK+bpjJd2XpDku02uBKpCoU/Sl bviRS2W5wy94L+HCB4wrXfHzpZcWhCLbu/LfDoGd1NJWkEh2NVZBSOM9S91JmsomNidB GpIw== X-Received: by 10.66.155.102 with SMTP id vv6mr36875145pab.89.1379421833509; Tue, 17 Sep 2013 05:43:53 -0700 (PDT) Received: from localhost (pool-71-189-49-9.lsanca.fios.verizon.net. [71.189.49.9]) by mx.google.com with ESMTPSA id fk4sm45797481pab.23.1969.12.31.16.00.00 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Tue, 17 Sep 2013 05:43:52 -0700 (PDT) From: Russ Dill To: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-omap@vger.kernel.org Subject: [RFC PATCH 01/11] asm-generic: io: Add exec versions of ioremap Date: Tue, 17 Sep 2013 05:43:27 -0700 Message-Id: <1379421817-15759-2-git-send-email-Russ.Dill@ti.com> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1379421817-15759-1-git-send-email-Russ.Dill@ti.com> References: <1379421817-15759-1-git-send-email-Russ.Dill@ti.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130917_084417_651549_99E4C12C X-CRM114-Status: GOOD ( 10.94 ) X-Spam-Score: -1.9 (-) Cc: mans@mansr.com, Russell King - ARM Linux , Ard Biesheuvel , linux-kbuild@vger.kernel.org, Shawn Guo , Dave Martin X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP If code is to be copied into and area (such as SRAM) and run, it needs to be marked as exec. Currently only an ARM version of this exists. Signed-off-by: Russ Dill --- arch/arm/include/asm/io.h | 2 ++ include/asm-generic/iomap.h | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/arch/arm/include/asm/io.h b/arch/arm/include/asm/io.h index d070741..212d095 100644 --- a/arch/arm/include/asm/io.h +++ b/arch/arm/include/asm/io.h @@ -329,6 +329,8 @@ extern void _memset_io(volatile void __iomem *, int, size_t); #define ioremap_nocache(cookie,size) __arm_ioremap((cookie), (size), MT_DEVICE) #define ioremap_cached(cookie,size) __arm_ioremap((cookie), (size), MT_DEVICE_CACHED) #define ioremap_wc(cookie,size) __arm_ioremap((cookie), (size), MT_DEVICE_WC) +#define ioremap_exec(cookie,size) __arm_ioremap_exec((cookie), (size), true) +#define ioremap_exec_nocache(cookie,size) __arm_ioremap_exec((cookie), (size), false) #define iounmap __arm_iounmap /* diff --git a/include/asm-generic/iomap.h b/include/asm-generic/iomap.h index 6afd7d6..e72c451 100644 --- a/include/asm-generic/iomap.h +++ b/include/asm-generic/iomap.h @@ -66,6 +66,11 @@ extern void ioport_unmap(void __iomem *); #define ioremap_wc ioremap_nocache #endif +#ifndef ARCH_HAS_IOREMAP_EXEC +#define ioremap_exec ioremap +#define ioremap_exec_nocache ioremap_nocache +#endif + #ifdef CONFIG_PCI /* Destroy a virtual mapping cookie for a PCI BAR (memory or IO) */ struct pci_dev;