diff options
author | Ovidiu Panait <ovidiu.panait@windriver.com> | 2022-02-13 10:09:23 +0200 |
---|---|---|
committer | Michal Simek <michal.simek@xilinx.com> | 2022-02-15 13:11:43 +0100 |
commit | 339f489d524e8daa40a4ab0c64bfe65ef30f5fc6 (patch) | |
tree | 82bf3f6fd35de7f94f57db9896de223a54332821 | |
parent | ee8161f7d182e57ea828f77a6b246c884c70b7cd (diff) | |
download | u-boot-339f489d524e8daa40a4ab0c64bfe65ef30f5fc6.zip u-boot-339f489d524e8daa40a4ab0c64bfe65ef30f5fc6.tar.gz u-boot-339f489d524e8daa40a4ab0c64bfe65ef30f5fc6.tar.bz2 |
microblaze: exception: move unaligned access printfs inside switch case
The unaligned access messages are only valid in the case of an unaligned
data access exception. Do not print them for other types of hw exceptions.
Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com>
Link: https://lore.kernel.org/r/20220213080925.1548411-5-ovidiu.panait@windriver.com
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
-rw-r--r-- | arch/microblaze/cpu/exception.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/arch/microblaze/cpu/exception.c b/arch/microblaze/cpu/exception.c index f79e465..d37f043 100644 --- a/arch/microblaze/cpu/exception.c +++ b/arch/microblaze/cpu/exception.c @@ -35,6 +35,10 @@ void _hw_exception_handler (void) switch (state & 0x1f) { /* mask on exception cause */ case 0x1: puts("Unaligned data access exception\n"); + + printf("Unaligned %sword access\n", ((state & 0x800) ? "" : "half")); + printf("Unaligned %s access\n", ((state & 0x400) ? "store" : "load")); + printf("Register R%x\n", (state & 0x3E) >> 5); break; case 0x2: puts("Illegal op-code exception\n"); @@ -57,9 +61,6 @@ void _hw_exception_handler (void) } printf("Return address from exception 0x%x\n", address); - printf("Unaligned %sword access\n", ((state & 0x800) ? "" : "half")); - printf("Unaligned %s access\n", ((state & 0x400) ? "store" : "load")); - printf("Register R%x\n", (state & 0x3E) >> 5); hang(); } |