linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: sboyd@codeaurora.org (Stephen Boyd)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM: Sort exception table at compile time
Date: Tue, 31 Jul 2012 13:01:19 -0700	[thread overview]
Message-ID: <5018398F.5010800@codeaurora.org> (raw)
In-Reply-To: <50170CF8.9010307@codeaurora.org>

On 07/30/12 15:38, Stephen Boyd wrote:
> On 07/30/12 14:56, Russell King - ARM Linux wrote:
>> On Mon, Jul 30, 2012 at 02:30:03PM -0700, Stephen Boyd wrote:
>>> Add the ARM machine identifier to sortextable and select the
>>> config option so that we can sort the exception table at compile
>>> time. sortextable relies on a section named __ex_table existing
>>> in the vmlinux, but ARM's linker script places the exception
>>> table in the data section. Give the exception table its own
>>> section so that sortextable can find it.
>>>
>>> This allows us to skip the runtime sorting step during boot.
>>>
>>> Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
>>> Cc: David Daney <david.daney@cavium.com>
>>> ---
>>>
>>> I can't find any information on why the exception table lives in the data
>>> section. If there's a good reason for that, I'll look into changing
>>> sortextable to look for the __start___ex_table symbol.
>> Be careful about the placement of this, especially with XIP.
>>
> Thanks for the hint. I'm unfamiliar with how XIP works so I'll take a
> closer look there.
>

Ok. It looks like the exception table is placed in the data section so
that XIP kernels can boot up and sort the exception table (otherwise the
exception table would be in read-only flash). Now that the exception
table is sorted at compile time, we should be able to place the
exception table in the rodata area, essentially placing the table in the
non-volatile storage on XIP kernels.

I propose we move the exception table right after the rodata. Other
arches (x86/mips) may actually want to put the exception table into the
rodata, but that looks like a larger change.

-- 
Sent by an employee of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.

  reply	other threads:[~2012-07-31 20:01 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-30 21:30 [PATCH] ARM: Sort exception table at compile time Stephen Boyd
2012-07-30 21:51 ` Sam Ravnborg
2012-07-30 22:19   ` Russell King - ARM Linux
2012-07-30 22:40     ` Stephen Boyd
2012-07-30 21:56 ` Russell King - ARM Linux
2012-07-30 22:38   ` Stephen Boyd
2012-07-31 20:01     ` Stephen Boyd [this message]
2012-08-22 18:56 ` [PATCHv2] " Stephen Boyd

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=5018398F.5010800@codeaurora.org \
    --to=sboyd@codeaurora.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).