printk: Fix alignment of buf causing crash on ARM EABI
Commit 7ff9554b, printk: convert byte-buffer to variable-length record buffer, causes systems using EABI to crash very early in the boot cycle. The first entry in struct log is a u64, which for EABI must be 8 byte aligned. Make use of __alignof__() so the compiler to decide the alignment, but allow it to be overridden using CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS, for systems which can perform unaligned access and want to save a few bytes of space. Tested on Orion5x and Kirkwood. Signed-off-by: NAndrew Lunn <andrew@lunn.ch> Tested-by: NStephen Warren <swarren@wwwdotorg.org> Acked-by: NStephen Warren <swarren@wwwdotorg.org> Acked-by: NKay Sievers <kay@vrfy.org> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Showing
想要评论请 注册 或 登录