linux-omap.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tony Lindgren <tony@atomide.com>
To: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: linux-omap@vger.kernel.org, Thomas Petazzoni <t-petazzoni@ti.com>
Subject: Re: [PATCH 1/6] Add infrastructure for conditional code and data sections
Date: Wed, 22 Dec 2010 11:02:56 -0800	[thread overview]
Message-ID: <20101222190256.GD7771@atomide.com> (raw)
In-Reply-To: <20101222194247.35b571fc@surf>

* Thomas Petazzoni <thomas.petazzoni@free-electrons.com> [101222 10:55]:
> On Wed, 22 Dec 2010 10:28:41 -0800
> Tony Lindgren <tony@atomide.com> wrote:
> 
> > > Nice to see that the idea is welcome. Did you had a look at the
> > > implementation in patch 1/6 ?
> > 
> > No not yet, will take a look after we're done with this upcoming
> > merge window..
> 
> Great, thanks.
> 
> > Ideally the new sections would be arch/arm generic sections and not
> > omap specific. I could see ARMv6 and ARMv7 sections being one way
> > to group them, but that does not help to drop omap3 specific data
> > on omap4.
> 
> The mechanism is architecture independent, not OMAP-specific or even
> ARM-specific (the only architecture-dependent part is the modification
> of the kernel linker script, but it's trivial to adapt to other arches).
> You can put as many sections as you want, you just need to declare some
> macros:
> 
> #define __something_data cond_data_section(something)
> #define __something_text cond_text_section(something)
> 
> and then mark whatever you want with __something_data or
> __something_text. It will then be part of separate sections, that are
> page-aligned so that they can independently be freed.

OK sounds like you've already made it generic :)
 
> For the moment, the API allows to tell which sections you want to
> *free*, but I think I should turn it into an API that allows to tell
> which sections you want to *keep*. This way, if you have sections for
> 100 machines and you boot on a given machine, you only need to say "I'm
> using this section". At the end of the kernel boot process, all
> sections that have not been marked as useful would be removed.

Yeah keeping only the code for the current machine might be easier.

Regards,

Tony

  reply	other threads:[~2010-12-22 19:03 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-21 18:19 [RFC] Infrastructure for dynamic removal of code and data sections Thomas Petazzoni
2010-12-21 18:19 ` [PATCH 1/6] Add infrastructure for conditional " Thomas Petazzoni
2010-12-21 19:27   ` Tony Lindgren
2010-12-21 22:00     ` Thomas Petazzoni
2010-12-22 18:28       ` Tony Lindgren
2010-12-22 18:42         ` Thomas Petazzoni
2010-12-22 19:02           ` Tony Lindgren [this message]
2010-12-23 12:31         ` Aaro Koskinen
2010-12-23 12:44           ` Thomas Petazzoni
2010-12-23 18:02           ` Tony Lindgren
2011-01-03  3:37   ` Paul Walmsley
2011-01-03  8:08     ` Paul Walmsley
2010-12-21 18:20 ` [PATCH 2/6] omap: add macros to mark SoC-specific data/code Thomas Petazzoni
2010-12-21 18:20 ` [PATCH 4/6] omap3: mark some data as omap3-specific Thomas Petazzoni
2010-12-21 18:20 ` [PATCH 5/6] omap4: mark some data as omap4-specific Thomas Petazzoni
2010-12-21 18:20 ` [PATCH 6/6] omap3: beagle: get rid of unused omap2/omap4 specific code/data Thomas Petazzoni
2010-12-21 19:15   ` Menon, Nishanth
2010-12-21 21:57     ` Thomas Petazzoni

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=20101222190256.GD7771@atomide.com \
    --to=tony@atomide.com \
    --cc=linux-omap@vger.kernel.org \
    --cc=t-petazzoni@ti.com \
    --cc=thomas.petazzoni@free-electrons.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).