New immediates will be defined in the future. To keep track of the
immediates allocated, gather all of them in a separate header.
Also rename BRK_BUG_FRAME to BKR_BUG_FRAME_IMM.
Signed-off-by: Julien Grall <julien.grall@arm.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
switch (hsr.brk.comment)
{
- case BRK_BUG_FRAME:
+ case BRK_BUG_FRAME_IMM:
if ( do_bug_frame(regs, regs->pc) )
goto die;
--- /dev/null
+/*
+ * Copyright (C) 2016 ARM Ltd.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+#ifndef __ASM_ARM_ARM64_BRK
+#define __ASM_ARM_ARM64_BRK
+
+/*
+ * #imm16 values used for BRK instruction generation
+ * 0x001: xen-mode BUG() and WARN() traps
+ */
+#define BRK_BUG_FRAME_IMM 1
+
+#endif /* !__ASM_ARM_ARM64_BRK */
+/*
+ * Local variables:
+ * mode: C
+ * c-file-style: "BSD"
+ * c-basic-offset: 4
+ * indent-tabs-mode: nil
+ * End:
+ */
#define __ARM_ARM64_BUG_H__
#include <xen/stringify.h>
+#include <asm/arm64/brk.h>
-#define BRK_BUG_FRAME 1
-
-#define BUG_INSTR "brk " __stringify(BRK_BUG_FRAME)
+#define BUG_INSTR "brk " __stringify(BRK_BUG_FRAME_IMM)
#endif /* __ARM_ARM64_BUG_H__ */