linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v5 0/8] kexec fixes and soft restart code
@ 2011-11-08 15:52 Will Deacon
  2011-11-08 15:52 ` [PATCH v5 1/8] Revert "ARM: 7098/1: kdump: copy kernel relocation code at the kexec prepare stage" Will Deacon
                   ` (7 more replies)
  0 siblings, 8 replies; 11+ messages in thread
From: Will Deacon @ 2011-11-08 15:52 UTC (permalink / raw)
  To: linux-arm-kernel

Hello,

This is version 5 of the patches originally posted here:

v1: http://lists.infradead.org/pipermail/linux-arm-kernel/2011-June/052157.html
v2: http://lists.infradead.org/pipermail/linux-arm-kernel/2011-June/052559.html
v3: http://lists.infradead.org/pipermail/linux-arm-kernel/2011-June/053252.html
v4: http://lists.infradead.org/pipermail/linux-arm-kernel/2011-August/062305.html

This time around, the patches are based on top of Russell's reset branch,
where soft restart on ARMv6 onwards is starting to look like a reality.

Notable changes from previous versions of this code are:
	- The identity map pgd is now populated at init time and is
	  static to idmap.c
	- The reserved stack page is no more
	- The temporary restart stack is simply a static array

The reserved stack page disappeared after feedback from Nicolas suggesting
that using a known physical location for the secondary CPU pen is ripe for
bootloader abuse. Although I can think of ways around this, having to maintain
this in future kernels could become tricky so I got rid of the idea.
Furthermore, talks at the ARM workshop in Prague revealed that most SMP SoCs
have hardware for controlling SMP boot anyway, so a purely software solution
is not usually needed (the exception being boards from ARM Ltd.).

The removal of the stack page means that we need to use a static array for
the stack prior to turning off the MMU. It looks to me like we currently only
need 6 stack slots [__soft_restart (-4), setup_mm_for_reboot (-2)] so I've
allocated 32 to be safe. Is there a way GCC can help us here?

The first patch (revert) is present in Russell's fixes branch but I'm
including it here for completeness. The fourth and fifth patches may
also need to be combined as it doesn't make sense to apply one without
the other.

As per usual, all feedback is welcome.

Cheers,

Will


Will Deacon (8):
  Revert "ARM: 7098/1: kdump: copy kernel relocation code at the kexec
    prepare stage"
  ARM: lib: add call_with_stack function for safely changing stack
  ARM: idmap: populate identity map pgd at init time
  ARM: reset: allow kernelspace mappings to be flat mapped during reset
  ARM: reset: implement soft_restart for jumping to a physical address
  ARM: soft_restart: disable the outer L2 when the last CPU is going
    down
  ARM: stop: execute platform callback from cpu_stop code
  ARM: kexec: use soft_restart for branching to the reboot buffer

 arch/arm/Kconfig                |    2 +-
 arch/arm/kernel/machine_kexec.c |   50 ++++++++++++++---------------------
 arch/arm/kernel/process.c       |   55 ++++++++++++++++++++++++++++++--------
 arch/arm/kernel/smp.c           |    4 +++
 arch/arm/lib/Makefile           |    3 +-
 arch/arm/lib/call_with_stack.S  |   44 +++++++++++++++++++++++++++++++
 arch/arm/mm/idmap.c             |   37 ++++++++++++++++++++------
 7 files changed, 142 insertions(+), 53 deletions(-)
 create mode 100644 arch/arm/lib/call_with_stack.S

-- 
1.7.4.1

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2011-11-13 12:20 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-08 15:52 [PATCH v5 0/8] kexec fixes and soft restart code Will Deacon
2011-11-08 15:52 ` [PATCH v5 1/8] Revert "ARM: 7098/1: kdump: copy kernel relocation code at the kexec prepare stage" Will Deacon
2011-11-08 15:52 ` [PATCH v5 2/8] ARM: lib: add call_with_stack function for safely changing stack Will Deacon
2011-11-08 15:52 ` [PATCH v5 3/8] ARM: idmap: populate identity map pgd at init time Will Deacon
2011-11-12 11:14   ` Russell King - ARM Linux
2011-11-13 12:20     ` Will Deacon
2011-11-08 15:52 ` [PATCH v5 4/8] ARM: reset: allow kernelspace mappings to be flat mapped during reset Will Deacon
2011-11-08 15:53 ` [PATCH v5 5/8] ARM: reset: implement soft_restart for jumping to a physical address Will Deacon
2011-11-08 15:53 ` [PATCH v5 6/8] ARM: soft_restart: disable the outer L2 when the last CPU is going down Will Deacon
2011-11-08 15:53 ` [PATCH v5 7/8] ARM: stop: execute platform callback from cpu_stop code Will Deacon
2011-11-08 15:53 ` [PATCH v5 8/8] ARM: kexec: use soft_restart for branching to the reboot buffer Will Deacon

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).