Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/11] ARM: Use invalid opcode also for warnings
@ 2026-10-09 22:21 Sebastian Andrzej Siewior
  2026-10-09 22:21 ` [PATCH 01/11] ARM: BUG: Move the assembly out of __BUG() macro Sebastian Andrzej Siewior
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: Sebastian Andrzej Siewior @ 2026-10-09 22:21 UTC (permalink / raw)
  To: linux-arm-kernel; +Cc: Sebastian Andrzej Siewior, Russell King, Arnd Bergmann

ARM is already using an invalid opcode for BUG(). WARN_ON() an its
variants are not optimised this way. The series here massages the BUG()
implementation until __WARN_FLAGS() can make use of it. Here is
comparison build of the defconfig with and without the series:

|    text  data     bss    filename
| 19678700 10728606 407364 vmlinux
| 19434880 10814198 407748 vmlinux-patched
text -238KiB, data +84KiB, bss +384

| 19680276 10699150 408132 vmlinux-!DEBUG_BUGVERBOSE
| 19443392 10735644 408516 vmlinux-patched-!DEBUG_BUGVERBOSE
text -231KiB, data +36KiB, +384

In general the text savings are greater than the increment in data.

Signed-off-by: Sebastian Andrzej Siewior <sebastian@breakpoint.cc>
---
Sebastian Andrzej Siewior (11):
      ARM: BUG: Move the assembly out of __BUG() macro
      ARM: BUG: Spent each entry in __BUG__LINE() its own line
      ARM: BUG: Move the section right after the opcode
      ARM: BUG: Move file/ line encoding into a custom macro
      ARM: BUG: Move __bug_table creation to __BUG_ENTRY_GENERIC() macro
      ARM: BUG: Move the __BUG() out of CONFIG_DEBUG_BUGVERBOSE
      ARM: BUG: Pass a flags argument to __BUG__LINE()
      ARM: BUG: Move BUG() into the do-while loop
      ARM: traps: Move the BUG handling from die() to do_undefinstr()
      ARM: traps: Add handling for warnings to handle_bug_opcode()
      ARM: BUG: Add WARN support via __WARN_FLAGS()

 arch/arm/include/asm/bug.h | 61 ++++++++++++++++++++++++++++------------------
 arch/arm/kernel/traps.c    | 40 +++++++++++++++++++++++++-----
 2 files changed, 71 insertions(+), 30 deletions(-)
---
base-commit: 4eeccbed21e50c19f97be9d325511f3de6343f2d
change-id: 20261004-arm_warning-3ac1e2aea65f

Best regards,
--  
Sebastian Andrzej Siewior <sebastian@breakpoint.cc>



^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2026-10-09 22:22 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-09 22:21 [PATCH 00/11] ARM: Use invalid opcode also for warnings Sebastian Andrzej Siewior
2026-10-09 22:21 ` [PATCH 01/11] ARM: BUG: Move the assembly out of __BUG() macro Sebastian Andrzej Siewior
2026-10-09 22:21 ` [PATCH 02/11] ARM: BUG: Spent each entry in __BUG__LINE() its own line Sebastian Andrzej Siewior
2026-10-09 22:21 ` [PATCH 03/11] ARM: BUG: Move the section right after the opcode Sebastian Andrzej Siewior
2026-10-09 22:21 ` [PATCH 04/11] ARM: BUG: Move file/ line encoding into a custom macro Sebastian Andrzej Siewior
2026-10-09 22:21 ` [PATCH 05/11] ARM: BUG: Move __bug_table creation to __BUG_ENTRY_GENERIC() macro Sebastian Andrzej Siewior
2026-10-09 22:21 ` [PATCH 06/11] ARM: BUG: Move the __BUG() out of CONFIG_DEBUG_BUGVERBOSE Sebastian Andrzej Siewior
2026-10-09 22:21 ` [PATCH 07/11] ARM: BUG: Pass a flags argument to __BUG__LINE() Sebastian Andrzej Siewior
2026-10-09 22:21 ` [PATCH 08/11] ARM: BUG: Move BUG() into the do-while loop Sebastian Andrzej Siewior
2026-10-09 22:21 ` [PATCH 09/11] ARM: traps: Move the BUG handling from die() to do_undefinstr() Sebastian Andrzej Siewior
2026-10-09 22:21 ` [PATCH 10/11] ARM: traps: Add handling for warnings to handle_bug_opcode() Sebastian Andrzej Siewior
2026-10-09 22:21 ` [PATCH 11/11] ARM: BUG: Add WARN support via __WARN_FLAGS() Sebastian Andrzej Siewior

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox