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: 2902431 Return-Path: X-Original-To: patchwork-linux-omap@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 3F080BFF05 for ; Tue, 17 Sep 2013 12:47:39 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 862C22038B for ; Tue, 17 Sep 2013 12:47:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B16EE2037E for ; Tue, 17 Sep 2013 12:47:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752859Ab3IQMnz (ORCPT ); Tue, 17 Sep 2013 08:43:55 -0400 Received: from mail-pd0-f171.google.com ([209.85.192.171]:33357 "EHLO mail-pd0-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752835Ab3IQMny (ORCPT ); Tue, 17 Sep 2013 08:43:54 -0400 Received: by mail-pd0-f171.google.com with SMTP id g10so5527072pdj.16 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 Cc: linux-kbuild@vger.kernel.org, Ard Biesheuvel , mans@mansr.com, Shawn Guo , Dave Martin , Russell King - ARM Linux 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> Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=ham 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;