From: Claudio.Fontana@huawei•com (Claudio Fontana)
To: linux-arm-kernel@lists•infradead.org
Subject: [PATCH 0/1 RESEND 2] ARM: plat-versatile: move secondary CPU startup out of .init.
Date: Tue, 27 Nov 2012 09:39:13 +0100 [thread overview]
Message-ID: <50B47C31.2040709@huawei.com> (raw)
Hello,
I am implementing virtual CPU hotplug for the the ARM Cortex A-15 VExpress motherboard.
This is mainly a QEMU feature, which allows dynamically changing the number
of CPUs in the guest.
I stumbled upon a limitation in the kernel support for plat-versatile,
which contains the secondary CPU startup code for the VExpress.
Basically, the secondary CPU startup code is preceded by the macro __INIT,
which causes the code to be freed in free_initmem() during kernel_init().
This means that any attempt at hot-booting CPUs in the guest results in
VCPUs jumping to a memory address that was freed, after which the VCPU
behaves erratically, as can be expected.
With this patch applied, we use __CPUINIT instead of __INIT, so that
the right thing happens:
under CONFIG_HOTPLUG_CPU, the secondary CPU startup code is not freed,
the secondary VCPUs start successfully, and it's all gardens and blue skies.
Tested successfully using the ARM fast models for the Cortex-A15.
--
Claudio Fontana (1):
ARM: plat-versatile: move secondary CPU startup code out of .init.
arch/arm/plat-versatile/headsmp.S | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--
1.7.12.1
next reply other threads:[~2012-11-27 8:39 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-27 8:39 Claudio Fontana [this message]
2012-11-27 8:43 ` [PATCH 1/1 RESEND 2] ARM: plat-versatile: move secondary CPU startup out of .init Claudio Fontana
2012-12-12 8:59 ` [PATCH RESEND 3] ARM: plat-versatile: move secondary CPU startup into cpuinit Claudio Fontana
2012-12-18 8:42 ` [PATCH RESEND 4] " Claudio Fontana
2012-12-30 4:09 ` Christoffer Dall
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=50B47C31.2040709@huawei.com \
--to=claudio.fontana@huawei$(echo .)com \
--cc=linux-arm-kernel@lists$(echo .)infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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