]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - arch/xtensa/kernel/asm-offsets.c
xtensa: support hardware breakpoints/watchpoints
[mirror_ubuntu-bionic-kernel.git] / arch / xtensa / kernel / asm-offsets.c
index b123ace3b67c7651c1e25505a5649e45be3fe874..8e10e357ee329bcd6cdafcd2e34bddc3ddd3e02c 100644 (file)
@@ -23,6 +23,7 @@
 #include <linux/kbuild.h>
 
 #include <asm/ptrace.h>
+#include <asm/traps.h>
 #include <asm/uaccess.h>
 
 int main(void)
@@ -117,5 +118,16 @@ int main(void)
        DEFINE(_CLONE_UNTRACED, CLONE_UNTRACED);
        DEFINE(PG_ARCH_1, PG_arch_1);
 
+       /* struct debug_table */
+       DEFINE(DT_DEBUG_EXCEPTION,
+              offsetof(struct debug_table, debug_exception));
+       DEFINE(DT_DEBUG_SAVE, offsetof(struct debug_table, debug_save));
+#ifdef CONFIG_HAVE_HW_BREAKPOINT
+       DEFINE(DT_DBREAKC_SAVE, offsetof(struct debug_table, dbreakc_save));
+       DEFINE(DT_ICOUNT_SAVE, offsetof(struct debug_table, icount_save));
+       DEFINE(DT_ICOUNT_LEVEL_SAVE,
+              offsetof(struct debug_table, icount_level_save));
+#endif
+
        return 0;
 }