| To: | Ralf Baechle <ralf@linux-mips.org>, Thomas Gleixner <tglx@linutronix.de>, Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>, x86@kernel.org, Linus Torvalds <torvalds@linux-foundation.org>, Michal Marek <mmarek@suse.cz> |
|---|---|
| Subject: | [PATCH v2 2/5] extable: Skip sorting if sorted at build time. |
| From: | David Daney <ddaney.cavm@gmail.com> |
| Date: | Thu, 19 Apr 2012 14:59:56 -0700 |
| Cc: | linux-kernel@vger.kernel.org, linux-mips@linux-mips.org, Andrew Morton <akpm@linux-foundation.org>, David Daney <david.daney@cavium.com> |
| Dkim-signature: | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; bh=JAZFN0rrR5RwoS38mMQQ6FuAa7XM8IRQfDR5QS02QSQ=; b=xdxrnq97LC4QtQCBEkuFs0hGnj/8VEjhd7Juj7RwY0gxPXzxIGSWDFPfdADYoaqgiG OLY2S4gJr52DgZmQiXxJ0cE0G0a25mpG3XgIHEgO7ErLMLVEq561f6Uj4LLAh8ziTmul 79cd0tNcYujaBrah41FfxHDXJmammF9ZRQEGj9ttjrM6jmXVIeNnaUs+Ah/cGlvbavx9 b5p5PJh+7BORacNzPdSvqqwZnwoOJUJ0RIwOUzeOm3GwTEv6j8rI6PQzU1qxECOBs99I DgB7wUHrMx2hTBLMyH1LR75hXYpRhrLJW/DZMfOoqZ9FRv9BNUoYTfvaO1NrhhSY+ivf 2Omw== |
| In-reply-to: | <1334872799-14589-1-git-send-email-ddaney.cavm@gmail.com> |
| References: | <1334872799-14589-1-git-send-email-ddaney.cavm@gmail.com> |
| Sender: | linux-mips-bounce@linux-mips.org |
From: David Daney <david.daney@cavium.com>
If the build program sortextable has already sorted the exception
table, don't sort it again.
Signed-off-by: David Daney <david.daney@cavium.com>
---
kernel/extable.c | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/kernel/extable.c b/kernel/extable.c
index 5339705..fe35a63 100644
--- a/kernel/extable.c
+++ b/kernel/extable.c
@@ -35,10 +35,16 @@ DEFINE_MUTEX(text_mutex);
extern struct exception_table_entry __start___ex_table[];
extern struct exception_table_entry __stop___ex_table[];
+/* Cleared by build time tools if the table is already sorted. */
+u32 __initdata main_extable_sort_needed = 1;
+
/* Sort the kernel's built-in exception table */
void __init sort_main_extable(void)
{
- sort_extable(__start___ex_table, __stop___ex_table);
+ if (main_extable_sort_needed)
+ sort_extable(__start___ex_table, __stop___ex_table);
+ else
+ pr_notice("__ex_table already sorted, skipping sort\n");
}
/* Given an address, look for it in the exception tables. */
--
1.7.2.3
|
| Previous by Date: | [PATCH v2] MIPS HIGHMEM fixes for cache aliasing and non-DMA I/O., Steven J. Hill |
|---|---|
| Next by Date: | [PATCH v2 5/5] x86: Select BUILDTIME_EXTABLE_SORT, David Daney |
| Previous by Thread: | [PATCH v2 0/5] Speed booting by sorting exception tables at build time., David Daney |
| Next by Thread: | [PATCH v2 5/5] x86: Select BUILDTIME_EXTABLE_SORT, David Daney |
| Indexes: | [Date] [Thread] [Top] [All Lists] |