Skip to content

ARM: Use invalid opcode also for warnings

Sebastian Andrzej Siewior linux-arm-kernel 1 version New

Get series with b4
b4 am [email protected] change-id 20261004-arm_warning-3ac1e2aea65f

Versions newest first

  1. v1 Latest11 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/11ARM: BUG: Move the assembly out of __BUG() macroarch/arm/include/asm/bug.h+15 -100 replies
2/11ARM: BUG: Spent each entry in __BUG__LINE() its own linearch/arm/include/asm/bug.h+5 -20 replies
3/11ARM: BUG: Move the section right after the opcodearch/arm/include/asm/bug.h+3 -30 replies
4/11ARM: BUG: Move file/ line encoding into a custom macroarch/arm/include/asm/bug.h+9 -60 replies
5/11ARM: BUG: Move __bug_table creation to __BUG_ENTRY_GENERIC() macroarch/arm/include/asm/bug.h+11 -30 replies
6/11ARM: BUG: Move the __BUG() out of CONFIG_DEBUG_BUGVERBOSEarch/arm/include/asm/bug.h+4 -120 replies
7/11ARM: BUG: Pass a flags argument to __BUG__LINE()arch/arm/include/asm/bug.h+9 -90 replies
8/11ARM: BUG: Move BUG() into the do-while looparch/arm/include/asm/bug.h+4 -50 replies
9/11ARM: traps: Move the BUG handling from die() to do_undefinstr()arch/arm/kernel/traps.c+26 -60 replies
10/11ARM: traps: Add handling for warnings to handle_bug_opcode()arch/arm/kernel/traps.c+8 -00 replies
11/11ARM: BUG: Add WARN support via __WARN_FLAGS()arch/arm/include/asm/bug.h+3 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 00/11] ARM: Use invalid opcode also for warnings

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.

---
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,

Signature · 1 line
Sebastian Andrzej Siewior <[email protected]>