Loading
sw64: fix kernel crash caused by unaligned access exception
Sunway inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/IBDJNZ -------------------------------- If ACPI enabled, unaligned access occurs when parsing ACPI tables in function acpi_boot_table_init(). since SW64 does not support handling unaligned access exception via hardware, the related trap entry should be initialized first. A feasible solution for this issue is that BIOS register the trap entry and make it as a runtime service. But this solution causes the kernel to have an ugly dependence on BIOS. To address this issue within the kernel, this commit invoke trap_init() at the beginning of setup_arch(). BTW, there is a redundant call to the function trap_init() for the bootstrap core, which may be deprecated some day. Signed-off-by:Jing Li <jingli@wxiat.com> Reviewed-by:
He Sheng <hesheng@wxiat.com> Signed-off-by:
Gu Zitao <guzitao@wxiat.com>