ACK: [PATCH 0/2] [Y/raspi2] [SRU] [Config] BCM2835_WDT=y

Stefan Bader stefan.bader at canonical.com
Thu Jun 8 09:54:18 UTC 2017


On 07.06.2017 16:41, Paolo Pisati wrote:
> BugLink: https://bugs.launchpad.net/bugs/1696436
> 
> The 'reboot' command doesn't work in the arm64 variant of the raspi2 kernel:
> after issuing 'reboot' the board starts the reboot process, reaches its end and
> prints '[ 451.761674] reboot: Restarting system' but then it sits there forever
> - the only way to reboot the board is to phisically pull the plug. It only
> affects Yakkety.
> 
> After some investigation i found what's going on: the reboot process for the
> armhf and arm64 variants of the raspi2 kernel is significanly different, even
> if it uses the same hardware mechanism.
> 
> On armhf, in the board code
> (arch/arm/mach-bcm2709/bcm2709.c::bcm2709_restart()) that is executed early
> during boot, bcm2709_restart() is registered as the restart callback in the
> board data structure, and whenever we execute 'reboot' the function is called:
> it directly initializes the watchdog hardware with a very short timeout, kicks
> it and then sits there waiting for the timer to expire (and the watchdog to
> reboot the board)
> 
> For arm64, on the other hard, there's no board code (the board code is a relic
> from the pre-dt period and when arm64 was started they went DT only from the
> get go), so there isn't a board structure containing custom functions for every
> board (init board call back, post init callback, restart call back, etc),
> instead the arm64 reboot code (arch/arm64/kernel/process.c::machine_restart())
> invokes the generic reboot code (kernel/reboot.c::do_kernel_restart()) which in
> turn walks and invokes, every reboot handler that was registered on the
> restart_handler_list (kernel/reboot::restart_handler_list) - in other words, it
> relies on another piece of code (able to reset the board) to register its
> reboot function on that handler list and then it uses it. In the raspberry
> board, the hardware capable of rebooting the board is the hardware watchdog
> (that among the other things register a reboot handler once it attaches), but
> on Y/arm64 the kernel driver for such hardware was built as a module and it
> doesn't autoload on boot, so restart_handler_list results empy when 'reboot' is
> invoked.
> 
> Paolo Pisati (2):
>   UBUNTU: [Config] BCM2835_WDT=y
>   UBUNTU: abi: remove bcm2835_wdt from the modules list
> 
>  debian.raspi2/abi/4.8.0-1037.40/arm64/raspi2.modules | 1 -
>  debian.raspi2/abi/4.8.0-1037.40/armhf/raspi2.modules | 1 -
>  debian.raspi2/config/config.common.ubuntu            | 2 +-
>  3 files changed, 1 insertion(+), 3 deletions(-)
> 
Acked-by: Stefan Bader <stefan.bader at canonical.com>


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <https://lists.ubuntu.com/archives/kernel-team/attachments/20170608/109f8b20/attachment.sig>


More information about the kernel-team mailing list