linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: dave.martin@linaro.org (Dave Martin)
To: linux-arm-kernel@lists.infradead.org
Subject: [RFC PATCH v2 1/5] ARM: mm: Add generic proc/arch struct definition macros
Date: Mon, 20 Jun 2011 11:56:05 +0100	[thread overview]
Message-ID: <20110620105605.GA2067@arm.com> (raw)
In-Reply-To: <alpine.LFD.2.00.1106192311080.2142@xanadu.home>

On Sun, Jun 19, 2011 at 11:13:46PM -0400, Nicolas Pitre wrote:
> On Thu, 16 Jun 2011, Dave Martin wrote:
> 
> > Alternatively, we could propose a change <linux/init.h> to split the
> > __INITDATA macro up, and define the related macros in a sane way:
> > 
> > #define __INITDATA_NAME .init.data
> > #define __INITDATA_FLAGS "aw",%progbtis
> > #define __initdata __section(__INITDATA_NAME)
> > #define __INITDATA .section __stringify(__INITDATA_NAME),__INITDATA_FLAGS
> > 
> > Any thoughts on that?
> 
> I do like it.

I think that all this data (the cache, tlb and processor funcs tables, and
the name strings) should theoretically go in __INITRODATA, since it is not
written and is only referenced via .proc.info.init so is not findable after
init data has been discarded anyway.  This data is all copied by setup.c
during startup, AFAICT.

However, the current section assignment situation is somewhat
inconsistent.

 * processor_functions, cache_fns: __INITDATA (writable)
 * tlb_fns: various (tlb-v3.S has __INITDATA; tlb-v7.S has __INIT)
 * name strings: .rodata (not initdata)


I don't really understand how this stuff interacts with CPU hotplug however;
maybe this stuff should all be in __CPUINITRODATA instead.


Since I will likely patch all the proc-*.S and cache-*.S files, I will
try to avoid any potential breakage in the initial series; so I'll keep
the section directives out of the macros so that we can prove in an
automated way that there is zero change the generated binaries.

This still brings much of the benefits.

Moving the section directives in the macros could possibly occur as a
separate follow-up.

Cheers
---Dave

  reply	other threads:[~2011-06-20 10:56 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-14 10:58 [RFC PATCH v2 0/5] Add generic macros for declaring various CPU structs Dave Martin
2011-06-14 10:58 ` [RFC PATCH v2 1/5] ARM: mm: Add generic proc/arch struct definition macros Dave Martin
2011-06-15 23:57   ` Nicolas Pitre
2011-06-16 10:03     ` Dave Martin
2011-06-20  3:13       ` Nicolas Pitre
2011-06-20 10:56         ` Dave Martin [this message]
2011-06-14 10:58 ` [RFC PATCH v2 2/5] ARM: proc-v7: Use new generic " Dave Martin
2011-06-16 10:15   ` Will Deacon
2011-06-14 10:58 ` [RFC PATCH v2 3/5] ARM: cache-v7: " Dave Martin
2011-06-14 10:58 ` [RFC PATCH v2 4/5] ARM: proc-v6: " Dave Martin
2011-06-14 10:58 ` [RFC PATCH v2 5/5] ARM: cache-v6: " Dave Martin
2011-06-16 10:12 ` [RFC PATCH v2 0/5] Add generic macros for declaring various CPU structs Will Deacon
2011-06-16 10:15   ` Russell King - ARM Linux
2011-06-16 10:34     ` Dave Martin
2011-06-16 10:43   ` Dave Martin

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=20110620105605.GA2067@arm.com \
    --to=dave.martin@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.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 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).