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 0/5] Add generic macros for declaring various CPU structs
Date: Tue, 14 Jun 2011 11:58:20 +0100	[thread overview]
Message-ID: <1308049105-16080-1-git-send-email-dave.martin@linaro.org> (raw)

Based on previous discussions, this series provides an alternative
macro for defining CPU-specific structures compactly.

I don't get to have so much fun with macros in this version, but
it's more straightforward and actually allows the declarations to
be collapsed down further by taking advantage of common naming
conventions.

In this RFC, only the arch names, processor_functions and
cache_functions are turned into macros, to show how this could
work.  This could be straightforwardly extended to cover tlb_fns,
but proc_info is more complex and may require a bit more thought.

A couple of files are ported to use the macros as an example.

These patches are for illustration only and **untested** (although
I have build-tested omap2plus_defconfig).

Unresolved issues:

 * The architecture/CPU name strings were previously split out into
   separate places, with the CPU name in .text and the other
   strings in .rodata.  This looked anomalous, so now a common
   mergeable string section .rodata.str is used instead.  This can
   be changed if needed.

 * For consistency, I've renamed the arch/CPU name string labels.
   If that is seen as unnecessary churn, it can be undone.

 * It's unclear whether it's better to switch sections inside the
   macros or outside.  Currently I switch inside, but the previous
   section is always restored using .popsection at the end of the
   macro to avoid confusion.  I'm assuming that there will never
   be a need to put any of this data in a custom section: if that's
   a bad assumption, we could move the section directives back
   outside the macros.

Dave Martin (5):
  ARM: mm: Add generic proc/arch struct definition macros
  ARM: proc-v7: Use new generic struct definition macros
  ARM: cache-v7: Use new generic struct definition macros
  ARM: proc-v6: Use new generic struct definition macros
  ARM: cache-v6: Use new generic struct definition macros

 arch/arm/mm/cache-v6.S    |   16 +--------
 arch/arm/mm/cache-v7.S    |   16 +--------
 arch/arm/mm/proc-macros.S |   79 +++++++++++++++++++++++++++++++++++++++++++++
 arch/arm/mm/proc-v6.S     |   43 +++---------------------
 arch/arm/mm/proc-v7.S     |   46 ++++---------------------
 5 files changed, 94 insertions(+), 106 deletions(-)

-- 
1.7.4.1

             reply	other threads:[~2011-06-14 10:58 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-14 10:58 Dave Martin [this message]
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
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=1308049105-16080-1-git-send-email-dave.martin@linaro.org \
    --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).