All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kevin Hilman <khilman@linaro.org>
To: Russ Dill <Russ.Dill@ti.com>
Cc: "Vaibhav Bedia" <vaibhav.bedia@gmail.com>,
	devicetree@vger.kernel.org, "Jan Lübbe" <jlu@pengutronix.de>,
	"Mark Brown" <broonie@kernel.org>,
	"linux-omap@vger.kernel.org" <linux-omap@vger.kernel.org>,
	"Linux ARM Kernel List" <linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH v4 0/4] ARM: OMAP2+: AM33XX: VDD CORE OPP50 support
Date: Fri, 30 Aug 2013 09:06:50 -0700	[thread overview]
Message-ID: <87eh9bqi1x.fsf@linaro.org> (raw)
In-Reply-To: <CA+Bv8XaQgOiSiScQW=CVxzXBuG0soafQotApjoVEZ0P9U3netg@mail.gmail.com> (Russ Dill's message of "Thu, 29 Aug 2013 17:25:24 -0700")

Russ Dill <Russ.Dill@ti.com> writes:

> On Thu, Aug 29, 2013 at 2:33 PM, Kevin Hilman <khilman@linaro.org> wrote:
>> Vaibhav Bedia <vaibhav.bedia@gmail.com> writes:
> [snip]
>>> Morevoer, all the suggestions on how to keep the code in Linux working
>>> around the complications due to the main memory not being accessible
>>> will need to be replicated on the non-Linux s/w stacks and that's just
>>> make it more difficult for them.
>>
>> The linux code has to be very self-contained (in assembler or C), so I'm
>> not sure how it's difficult to replicated in any other OS (or non-OS.)
>
> Let me pull on this thread a little bit. Would this involve defining a
> bunch of different sections for each arch so that I could do:
>
> void __sram_am33xx am33xx_some_pm_function(args....)
> {
> }
>
> static struct am33xx_foo_dyn *blargity __sramdata_am33xx = { ...};
>
> static const struct am33xx_foo_const *blarg __sramconst_am33xx = { ... };
>
> The sram push code could then push these sections into sram. There
> would then be a set of inlines or macros for converting addresses
> within these sections to SRAM addresses, maybe also inlines or macros
> for calling code that has been pushed into sram by wrapping the
> original function pointer. The macros or inlines that call SRAM code
> could perform the trampoline as well.

Well, I was thinking of something much dumber.

I was thinking about just _carefully_ writing a single, self-contained C
function, with all of its data on the stack (and consts as #defines).
Think of it is a step up in readability from straight assembly (which
was the stated reason for moving the code to the M3 in the first place.)

Kevin

WARNING: multiple messages have this Message-ID (diff)
From: khilman@linaro.org (Kevin Hilman)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v4 0/4] ARM: OMAP2+: AM33XX: VDD CORE OPP50 support
Date: Fri, 30 Aug 2013 09:06:50 -0700	[thread overview]
Message-ID: <87eh9bqi1x.fsf@linaro.org> (raw)
In-Reply-To: <CA+Bv8XaQgOiSiScQW=CVxzXBuG0soafQotApjoVEZ0P9U3netg@mail.gmail.com> (Russ Dill's message of "Thu, 29 Aug 2013 17:25:24 -0700")

Russ Dill <Russ.Dill@ti.com> writes:

> On Thu, Aug 29, 2013 at 2:33 PM, Kevin Hilman <khilman@linaro.org> wrote:
>> Vaibhav Bedia <vaibhav.bedia@gmail.com> writes:
> [snip]
>>> Morevoer, all the suggestions on how to keep the code in Linux working
>>> around the complications due to the main memory not being accessible
>>> will need to be replicated on the non-Linux s/w stacks and that's just
>>> make it more difficult for them.
>>
>> The linux code has to be very self-contained (in assembler or C), so I'm
>> not sure how it's difficult to replicated in any other OS (or non-OS.)
>
> Let me pull on this thread a little bit. Would this involve defining a
> bunch of different sections for each arch so that I could do:
>
> void __sram_am33xx am33xx_some_pm_function(args....)
> {
> }
>
> static struct am33xx_foo_dyn *blargity __sramdata_am33xx = { ...};
>
> static const struct am33xx_foo_const *blarg __sramconst_am33xx = { ... };
>
> The sram push code could then push these sections into sram. There
> would then be a set of inlines or macros for converting addresses
> within these sections to SRAM addresses, maybe also inlines or macros
> for calling code that has been pushed into sram by wrapping the
> original function pointer. The macros or inlines that call SRAM code
> could perform the trampoline as well.

Well, I was thinking of something much dumber.

I was thinking about just _carefully_ writing a single, self-contained C
function, with all of its data on the stack (and consts as #defines).
Think of it is a step up in readability from straight assembly (which
was the stated reason for moving the code to the M3 in the first place.)

Kevin

  reply	other threads:[~2013-08-30 16:06 UTC|newest]

Thread overview: 84+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-13 22:20 [PATCH v4 0/4] ARM: OMAP2+: AM33XX: VDD CORE OPP50 support Russ Dill
2013-08-13 22:20 ` Russ Dill
2013-08-13 22:20 ` [PATCH v4 1/4] ARM: OMAP2+: AM33XX: I2C Sleep/wake sequence support Russ Dill
2013-08-13 22:20   ` Russ Dill
2013-08-14 10:18   ` Gururaja Hebbar
2013-08-14 10:18     ` Gururaja Hebbar
2013-08-14 22:34     ` Russ Dill
2013-08-14 22:34       ` Russ Dill
2013-08-16  7:16       ` Gururaja Hebbar
2013-08-16  7:16         ` Gururaja Hebbar
2013-08-19  5:49       ` Gururaja Hebbar
2013-08-19  5:49         ` Gururaja Hebbar
2013-08-20 16:33         ` Russ Dill
2013-08-20 16:33           ` Russ Dill
2013-08-21  8:29           ` Gururaja Hebbar
2013-08-21  8:29             ` Gururaja Hebbar
2013-08-13 22:20 ` [PATCH v4 2/4] ARM: dts: add AM33XX vdd core opp50 suspend for Beaglebone Russ Dill
2013-08-13 22:20   ` Russ Dill
2013-08-14  8:59   ` Gururaja Hebbar
2013-08-14  8:59     ` Gururaja Hebbar
2013-08-14 22:21     ` Russ Dill
2013-08-14 22:21       ` Russ Dill
2013-08-13 22:20 ` [PATCH v4 3/4] ARM: dts: add AM33XX vdd core opp50 suspend for AM335X GP EVM Russ Dill
2013-08-13 22:20   ` Russ Dill
2013-08-13 22:20 ` [PATCH v4 4/4] ARM: dts: AM33XX vdd core opp50 suspend for EVM-SK Russ Dill
2013-08-13 22:20   ` Russ Dill
2013-08-14 13:38 ` [PATCH v4 0/4] ARM: OMAP2+: AM33XX: VDD CORE OPP50 support Jan Lübbe
2013-08-14 13:38   ` Jan Lübbe
2013-08-14 22:21   ` Russ Dill
2013-08-14 22:21     ` Russ Dill
2013-08-15  8:00     ` Jan Lübbe
2013-08-15  8:00       ` Jan Lübbe
2013-08-27 22:44     ` Kevin Hilman
2013-08-27 22:44       ` Kevin Hilman
2013-08-28  1:05       ` Russ Dill
2013-08-28  1:05         ` Russ Dill
2013-08-29 11:05         ` Mark Brown
2013-08-29 11:05           ` Mark Brown
2013-08-29 15:29           ` Kevin Hilman
2013-08-29 15:29             ` Kevin Hilman
2013-08-29 15:49             ` Mark Brown
2013-08-29 15:49               ` Mark Brown
2013-08-29 16:31               ` Russ Dill
2013-08-29 16:31                 ` Russ Dill
2013-08-29 17:30                 ` Mark Brown
2013-08-29 17:30                   ` Mark Brown
2013-08-29 17:47                   ` Russ Dill
2013-08-29 17:47                     ` Russ Dill
2013-08-29 18:03                     ` Mark Brown
2013-08-29 18:03                       ` Mark Brown
2013-08-29 18:28                       ` Russ Dill
2013-08-29 18:28                         ` Russ Dill
2013-08-29 15:42           ` Russ Dill
2013-08-29 15:42             ` Russ Dill
2013-08-29 18:01             ` Mark Brown
2013-08-29 18:01               ` Mark Brown
2013-08-29 18:25               ` Russ Dill
2013-08-29 18:25                 ` Russ Dill
2013-08-29 19:10                 ` Mark Brown
2013-08-29 19:10                   ` Mark Brown
2013-09-03 14:06                   ` Russ Dill
2013-09-03 14:06                     ` Russ Dill
2013-09-03 14:39                     ` Mark Brown
2013-09-03 14:39                       ` Mark Brown
2013-08-29 15:17         ` Kevin Hilman
2013-08-29 15:17           ` Kevin Hilman
2013-08-29 16:10           ` Russ Dill
2013-08-29 16:10             ` Russ Dill
2013-08-29 19:11             ` Kevin Hilman
2013-08-29 19:11               ` Kevin Hilman
2013-08-29 20:09               ` Vaibhav Bedia
2013-08-29 20:09                 ` Vaibhav Bedia
2013-08-29 21:33                 ` Kevin Hilman
2013-08-29 21:33                   ` Kevin Hilman
2013-08-30  0:25                   ` Russ Dill
2013-08-30  0:25                     ` Russ Dill
2013-08-30 16:06                     ` Kevin Hilman [this message]
2013-08-30 16:06                       ` Kevin Hilman
2013-09-03 18:55                       ` Russ Dill
2013-09-03 18:55                         ` Russ Dill
2013-09-03 19:07                         ` Kevin Hilman
2013-09-03 19:07                           ` Kevin Hilman
2013-08-30 17:57                   ` Vaibhav Bedia
2013-08-30 17:57                     ` Vaibhav Bedia

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=87eh9bqi1x.fsf@linaro.org \
    --to=khilman@linaro.org \
    --cc=Russ.Dill@ti.com \
    --cc=broonie@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=jlu@pengutronix.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=vaibhav.bedia@gmail.com \
    /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.