From 729a263d5f153bb7cfac6fee94809aebfe74766c Mon Sep 17 00:00:00 2001 From: Arne Welzel Date: Thu, 22 Mar 2018 14:27:32 +0100 Subject: [PATCH] arm/archconst: use values defined in armreg.h Change-Id: Ic401e277792b5114792c0412b7fcc21f5fc95d7b --- minix/kernel/arch/earm/include/archconst.h | 23 +++++++--------------- 1 file changed, 7 insertions(+), 16 deletions(-) diff --git a/minix/kernel/arch/earm/include/archconst.h b/minix/kernel/arch/earm/include/archconst.h index b52fe6a59..d85dd81e0 100644 --- a/minix/kernel/arch/earm/include/archconst.h +++ b/minix/kernel/arch/earm/include/archconst.h @@ -21,24 +21,15 @@ #define INTERRUPT_VECTOR 6 #define FAST_INTERRUPT_VECTOR 7 +/* Data abort helper */ +#define is_align_fault(fault_status) \ + ((fault_status) == FAULT_ALIGN_0) -/* Known fault status bits */ -#define DFSR_FS_ALIGNMENT_FAULT 0x01 -#define DFSR_FS_TRANSLATION_FAULT_PAGE 0x07 -#define DFSR_FS_TRANSLATION_FAULT_SECTION 0x05 -#define DFSR_FS_PERMISSION_FAULT_PAGE 0x0F -#define DFSR_FS_PERMISSION_FAULT_SECTION 0x0D +#define is_trans_fault(fault_status) \ + (((fault_status) == FAULT_TRANS_S) || ((fault_status) == FAULT_TRANS_P)) -#define is_alignment_fault(fault_status) \ - ((fault_status) == DFSR_FS_ALIGNMENT_FAULT) - -#define is_translation_fault(fault_status) \ - (((fault_status) == DFSR_FS_TRANSLATION_FAULT_PAGE) \ - || ((fault_status) == DFSR_FS_TRANSLATION_FAULT_SECTION)) - -#define is_permission_fault(fault_status) \ - (((fault_status) == DFSR_FS_PERMISSION_FAULT_PAGE) \ - || ((fault_status) == DFSR_FS_PERMISSION_FAULT_SECTION)) +#define is_perm_fault(fault_status) \ + (((fault_status) == FAULT_PERM_S) || ((fault_status) == FAULT_PERM_P)) /* * defines how many bytes are reserved at the top of the kernel stack for global