RFC restart cleanups
Get series with b4
b4 am [email protected]Versions newest first
- v1 RFC Latest2 of 5 patches 0 repliesNew
2 of 5 patches are in this archive. The cover letter announces 5.
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 5/5 | ARM: restart: only perform setup for restart when soft-restarting | +0 | 1 reply | |
| 5/5 | ARM: restart: only perform setup for restart when soft-restarting | +0 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [RFC 0/5] restart cleanups
Quoted 5 lines · Russell King - ARM Linux
The other thing is that the generic code shouldn't care what value 'mode' actually is - we just pass it through to the platform handler (via
arm_pm_restart()) and if the platform handler wants to ignore it and just do the software reboot thing, it usessoft_restart(addr)which does all the necessary setup for that.
Ah yes, you're right. I think it might be worth defining 'h' as REBOOT_MODE_HARD and 's' as REBOOT_MODE_SOFT, but there's no reason to disallow other combinations giving that the core code no longer has to do anything with these.
Quoted 2 lines
The nice thing about that is we no longer have to worry about calling
arm_pm_restart()with 'h' and a platform doing a soft-reboot instead.
Yes, that's truly horrific. It's a miracle soft reboot worked at all from v6 onwards.
Quoted 11 lines
Quoted 10 lines
I'm definitely in favour of this change, but be aware that I plan to modify
setup_mm_for_rebootin the future to:(a) Use a static identity mapping so we don't have to
pgd_allocexplicitly [I can't see this affecting anything](b) Extend the identity mapping into kernel space, leaving some room for the kernel image. If this is all called from
soft_reboot, which just does thecpu_reset(addr)afterwards, then we're fine. I have code to take care of changing stack and switching to the new mapping.
Quoted 5 lines
Well, bear in mind that (1) + (5) produce something really self-contained. We no longer fiddle with MMU tables for anything but the 'soft reboot' path. That means things like hardware based reset (eg, using watchdogs, asserting GPIOs, etc) are all dealt with without fiddling with the MMU and caches.
Yup, so we should be able to add the scary MMU and cache stuff into soft_reboot. We can even call this function from the kexec code.
Quoted 7 lines
arm_machine_restart()has become almost empty - I want to move the IRQ disables out intomachine_restart()and kill offarm_machine_restart()entirely (at the moment its the 'default' action, which is to call the oldarch_reset()thing.)Eventually, when we have everyone hooking into
arm_pm_restart()instead,arm_machine_restart()will be unused and meaningless to keep around.
That's where our friend Coccinelle comes in at the end of my patch series.
Will