All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tony Lindgren <tony@atomide.com>
To: Dave Gerlach <d-gerlach@ti.com>
Cc: linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, linux-omap@vger.kernel.org,
	Russ Dill <russ.dill@ti.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Arnd Bergmann <arnd@arndb.de>, Shawn Guo <shawnguo@kernel.org>,
	Alexandre Belloni <alexandre.belloni@free-electrons.com>,
	Russell King <linux@arm.linux.org.uk>, Nishanth Menon <nm@ti.com>
Subject: Re: [RFC PATCH 0/3] Add ioremap_exec and extend drivers/misc/sram.c
Date: Thu, 12 May 2016 09:30:34 -0700	[thread overview]
Message-ID: <20160512163033.GP5995@atomide.com> (raw)
In-Reply-To: <1462830111-28172-1-git-send-email-d-gerlach@ti.com>

* Dave Gerlach <d-gerlach@ti.com> [160509 14:44]:
> Hi,
> There are several instances when one would want to execute out of on-chip
> SRAM, such as PM code on ARM platforms, so once again revisiting this
> series to allow that. Seems that having a solution for allowing SRAM to be
> mapped as executable will help clean up PM code on several ARM platforms and
> also open the door for others like TI AM335x and AM437x. This was first sent
> here [1] but this is rebased and updated for v4.6-rc.
> 
> Many platforms have migrated to using the generic SRAM driver at
> drivers/misc/sram.c but it doesn't seem like there is a clean solution
> for the common problem of needing to map executable pages.
> 
> Currently I see several platforms (at-91, imx6, socfpga) taking the
> address allocated by the genpool given by the SRAM driver and then calling
> __arm_ioremap_exec on it again to get a new address that can be executed.
> This doesn't seem like the cleanest solution, but maybe it works for code
> that is under mach-xxx but what about code that migrates outside into the
> drivers layer? Do any other architectures have a requirement for this?
> 
> I've converted omap3 PM code to use the generic SRAM driver which I'll send
> in a series right after this one, and AM335x and AM437x can both make use of
> this series as well and even go as far as to move a chunk of the PM
> code into drivers (needs to be updated but sent long ago here [2]), but
> that will be blocked if we don't have a generic way to ioremap memory as
> exec, or at least a way to do it from drivers/.
> 
> If we don't want to go down this path, is there a better idea for how to
> call ioremap_exec from drivers/ that we can all agree on?

Looks to me that this should allow moving the current SRAM code
into drivers. So feel free to add:

Acked-by: Tony Lindgren <tony@atomide.com>

WARNING: multiple messages have this Message-ID (diff)
From: tony@atomide.com (Tony Lindgren)
To: linux-arm-kernel@lists.infradead.org
Subject: [RFC PATCH 0/3] Add ioremap_exec and extend drivers/misc/sram.c
Date: Thu, 12 May 2016 09:30:34 -0700	[thread overview]
Message-ID: <20160512163033.GP5995@atomide.com> (raw)
In-Reply-To: <1462830111-28172-1-git-send-email-d-gerlach@ti.com>

* Dave Gerlach <d-gerlach@ti.com> [160509 14:44]:
> Hi,
> There are several instances when one would want to execute out of on-chip
> SRAM, such as PM code on ARM platforms, so once again revisiting this
> series to allow that. Seems that having a solution for allowing SRAM to be
> mapped as executable will help clean up PM code on several ARM platforms and
> also open the door for others like TI AM335x and AM437x. This was first sent
> here [1] but this is rebased and updated for v4.6-rc.
> 
> Many platforms have migrated to using the generic SRAM driver at
> drivers/misc/sram.c but it doesn't seem like there is a clean solution
> for the common problem of needing to map executable pages.
> 
> Currently I see several platforms (at-91, imx6, socfpga) taking the
> address allocated by the genpool given by the SRAM driver and then calling
> __arm_ioremap_exec on it again to get a new address that can be executed.
> This doesn't seem like the cleanest solution, but maybe it works for code
> that is under mach-xxx but what about code that migrates outside into the
> drivers layer? Do any other architectures have a requirement for this?
> 
> I've converted omap3 PM code to use the generic SRAM driver which I'll send
> in a series right after this one, and AM335x and AM437x can both make use of
> this series as well and even go as far as to move a chunk of the PM
> code into drivers (needs to be updated but sent long ago here [2]), but
> that will be blocked if we don't have a generic way to ioremap memory as
> exec, or at least a way to do it from drivers/.
> 
> If we don't want to go down this path, is there a better idea for how to
> call ioremap_exec from drivers/ that we can all agree on?

Looks to me that this should allow moving the current SRAM code
into drivers. So feel free to add:

Acked-by: Tony Lindgren <tony@atomide.com>

  parent reply	other threads:[~2016-05-12 16:30 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-09 21:41 [RFC PATCH 0/3] Add ioremap_exec and extend drivers/misc/sram.c Dave Gerlach
2016-05-09 21:41 ` Dave Gerlach
2016-05-09 21:41 ` Dave Gerlach
2016-05-09 21:41 ` [RFC PATCH 1/3] asm-generic: io: Add exec versions of ioremap Dave Gerlach
2016-05-09 21:41   ` Dave Gerlach
2016-05-09 21:41   ` Dave Gerlach
2016-05-12 16:37   ` Russell King - ARM Linux
2016-05-12 16:37     ` Russell King - ARM Linux
2016-05-18 14:12     ` Dave Gerlach
2016-05-18 14:12       ` Dave Gerlach
2016-05-18 14:12       ` Dave Gerlach
2016-05-18 17:51       ` Russell King - ARM Linux
2016-05-18 17:51         ` Russell King - ARM Linux
2016-05-18 20:25         ` Arnd Bergmann
2016-05-18 20:25           ` Arnd Bergmann
2016-05-18 20:25           ` Arnd Bergmann
2016-05-18 20:57           ` Russell King - ARM Linux
2016-05-18 20:57             ` Russell King - ARM Linux
2016-05-25 15:45             ` Dave Gerlach
2016-05-25 15:45               ` Dave Gerlach
2016-05-25 15:45               ` Dave Gerlach
2016-05-09 21:41 ` [RFC PATCH 2/3] lib: devres: Add exec and exec_nocache versions of devm_ioremap Dave Gerlach
2016-05-09 21:41   ` Dave Gerlach
2016-05-09 21:41   ` Dave Gerlach
2016-05-09 21:41 ` [RFC PATCH 3/3] misc: SRAM: Add option to map SRAM to allow code execution Dave Gerlach
2016-05-09 21:41   ` Dave Gerlach
2016-05-09 21:41   ` Dave Gerlach
2016-05-12 16:30 ` Tony Lindgren [this message]
2016-05-12 16:30   ` [RFC PATCH 0/3] Add ioremap_exec and extend drivers/misc/sram.c Tony Lindgren

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160512163033.GP5995@atomide.com \
    --to=tony@atomide.com \
    --cc=alexandre.belloni@free-electrons.com \
    --cc=arnd@arndb.de \
    --cc=d-gerlach@ti.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=nm@ti.com \
    --cc=russ.dill@ti.com \
    --cc=shawnguo@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.