From: linux@arm.linux.org.uk (Russell King - ARM Linux)
To: linux-arm-kernel@lists.infradead.org
Subject: hotplug and init section
Date: Wed, 4 Aug 2010 00:05:41 +0100 [thread overview]
Message-ID: <20100803230541.GA30769@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <4C5898AD.9020300@codeaurora.org>
On Tue, Aug 03, 2010 at 03:31:09PM -0700, Jeff Ohlstein wrote:
> So I've been looking into this, and it does look like I need to change
> the linker script. I need the secondary_startup function to be around at
> hotplug time, and it appears that the whole head section gets freed with
> the init section. Does it seem sane to make it so the head section isn't
> freed when hotplug is configured? Or should I move the secondary startup
> function out of the head section?
Try this - I've only build-tested this so far:
diff --git a/arch/arm/kernel/head-common.S b/arch/arm/kernel/head-common.S
index b9505aa..98949b2 100644
--- a/arch/arm/kernel/head-common.S
+++ b/arch/arm/kernel/head-common.S
@@ -143,7 +143,7 @@ __error:
b 1b
ENDPROC(__error)
-
+ __CPUINIT
/*
* Read processor ID register (CP#15, CR0), and look up in the linker-built
* supported processor list. Note that we can't use the absolute addresses
@@ -235,6 +235,7 @@ ENTRY(lookup_machine_type)
ldmfd sp!, {r4 - r6, pc}
ENDPROC(lookup_machine_type)
+ __HEAD
/* Determine validity of the r2 atags pointer. The heuristic requires
* that the pointer be aligned, in the first 16k of physical RAM and
* that the ATAG_CORE marker is first and present. Future revisions
diff --git a/arch/arm/kernel/head.S b/arch/arm/kernel/head.S
index eb62bf9..7e0a673 100644
--- a/arch/arm/kernel/head.S
+++ b/arch/arm/kernel/head.S
@@ -104,6 +104,7 @@ ENTRY(stext)
ENDPROC(stext)
#if defined(CONFIG_SMP)
+ __CPUINIT
ENTRY(secondary_startup)
/*
* Common entry point for secondary CPUs.
@@ -202,7 +203,7 @@ __turn_mmu_on:
mov pc, r3
ENDPROC(__turn_mmu_on)
-
+ __HEAD
/*
* Setup the initial page tables. We only setup the barest
* amount which are required to get the kernel running, which
next prev parent reply other threads:[~2010-08-03 23:05 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-22 19:33 hotplug and init section smuckle at codeaurora.org
2010-07-22 20:57 ` Russell King - ARM Linux
2010-08-03 22:31 ` Jeff Ohlstein
2010-08-03 23:05 ` Russell King - ARM Linux [this message]
2010-08-04 0:51 ` Jeff Ohlstein
2010-08-04 17:56 ` Russell King - ARM Linux
2010-07-23 5:20 ` Shilimkar, Santosh
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=20100803230541.GA30769@n2100.arm.linux.org.uk \
--to=linux@arm.linux.org.uk \
--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).