Skip to contentSkip to conversation

arm64: struct debug_info: Check CONFIG_HAVE_HW_BREAKPOINT

PATCH New Chris Redmon 2 participants 2 messages Mar 16, 2017 – Mar 21, 2017 arm64

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 arm64: struct debug_info: Check CONFIG_HAVE_HW_BREAKPOINT

Check if CONFIG_HAVE_HW_BREAKPOINT is enabled before compiling in extra data required for hardware breakpoints. Compiling out this code when hw breakpoints are disabled saves about 272 bytes per struct task_struct.

---
 arch/arm64/include/asm/processor.h | 2 ++
 1 file changed, 2 insertions(+)
arch/arm64/include/asm/processor.h +2 -0
index c97b8bd..9428b93 100644
@@ -50,6 +50,7 @@
 #define ARCH_LOW_ADDRESS_LIMIT	(arm64_dma_phys_limit - 1)
 
 struct debug_info {
+#ifdef CONFIG_HAVE_HW_BREAKPOINT
 	/* Have we suspended stepping by a debugger? */
 	int			suspended_step;
 	/* Allow breakpoints and watchpoints to be disabled for this thread. */
@@ -58,6 +59,7 @@ struct debug_info {
 	/* Hardware breakpoints pinned to this task. */
 	struct perf_event	*hbp_break[ARM_MAX_BRP];
 	struct perf_event	*hbp_watch[ARM_MAX_WRP];
+#endif
 };
 
 struct cpu_context {
Signature · 1 line
1.9.3
maintainer Applied
#1 lore raw

PATCH 1/1 arm64: struct debug_info: Check CONFIG_HAVE_HW_BREAKPOINT

Quoted 5 lines · Chris Redmon

Check if CONFIG_HAVE_HW_BREAKPOINT is enabled before compiling in extra data required for hardware breakpoints. Compiling out this code when hw breakpoints are disabled saves about 272 bytes per struct task_struct.

Queued for 4.12. Thanks.

Signature · 1 line
Catalin