Skip to contentSkip to conversation

microblaze: Fix MB_MANAGER build with older binutils

PATCH Applied Karl Mehltretter 2 participants 4 messages Aug 13 – Aug 31

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 microblaze: Fix MB_MANAGER build with older binutils

Commit 88707ebe77e2 ("microblaze: Add custom break vector handler for mb manager") added the suspend mnemonic to the MB Manager break handler.

GNU as only learned this mnemonic in binutils 2.42. Linux supports binutils 2.30, where enabling CONFIG_MB_MANAGER fails:

arch/microblaze/kernel/entry.S:946: Error: unknown opcode "suspend"

The suspend mnemonic is an alias for mbar 24, and both encode as 0xbb020004. Use the underlying instruction, which GNU as 2.30 already supports.

Fixes 88707ebe77e2 ("microblaze: Add custom break vector handler for mb manager")
Assisted-by Codex:gpt-5.6-sol
---
 arch/microblaze/kernel/entry.S | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/microblaze/kernel/entry.S +1 -1
index 582d7256d8154..ad44341a5dbc7 100644
@@ -943,7 +943,7 @@ ret_from_break:
 	mbar	1
 	mbar	2
 	bri	4
-	suspend
+	mbar	24 /* suspend */
 	nop
 #endif
 
Signature · 1 line
2.53.0
#1 lore raw
Quoted 11 lines · Karl Mehltretter

The suspend mnemonic is an alias for mbar 24, and both encode as 0xbb020004. Use the underlying instruction, which GNU as 2.30 already supports.

Fixes 88707ebe77e2 ("microblaze: Add custom break vector handler for mb manager")
Assisted-by Codex:gpt-5.6-sol

Just a friendly ping in case this got missed.

Thanks,
Karl

maintainer
#2 lore raw
Quoted 13 lines · Karl Mehltretter
Quoted 11 lines · Karl Mehltretter

The suspend mnemonic is an alias for mbar 24, and both encode as 0xbb020004. Use the underlying instruction, which GNU as 2.30 already supports.

Fixes 88707ebe77e2 ("microblaze: Add custom break vector handler for mb manager")
Assisted-by Codex:gpt-5.6-sol
Quoted 1 line

Just a friendly ping in case this got missed.

will look at it after rc1.

M

Signature · 6 lines
Michal Simek, Ing. (M.Eng), OpenPGP -> KeyID: FE3D1F91
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel - Xilinx Microblaze
Maintainer of Linux kernel - Xilinx Zynq ARM and ZynqMP/Versal ARM64 SoCs
U-Boot custodian - Xilinx Microblaze/Zynq/ZynqMP/Versal/Versal NET SoCs
TF-A maintainer - Xilinx ZynqMP/Versal/Versal NET SoCs
maintainer Applied
#3 lore raw
In reply to Karl Mehltretter
Quoted 28 lines · Karl Mehltretter

Commit 88707ebe77e2 ("microblaze: Add custom break vector handler for mb manager") added the suspend mnemonic to the MB Manager break handler.

GNU as only learned this mnemonic in binutils 2.42. Linux supports binutils 2.30, where enabling CONFIG_MB_MANAGER fails:

arch/microblaze/kernel/entry.S:946: Error: unknown opcode "suspend"

The suspend mnemonic is an alias for mbar 24, and both encode as 0xbb020004. Use the underlying instruction, which GNU as 2.30 already supports.

Fixes 88707ebe77e2 ("microblaze: Add custom break vector handler for mb manager")
Assisted-by Codex:gpt-5.6-sol
---
  arch/microblaze/kernel/entry.S | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
arch/microblaze/kernel/entry.S +0 -0
index 582d7256d8154..ad44341a5dbc7 100644

arch/microblaze/kernel/entry.S ret_from_break: · line 949

Quoted 8 lines
arch/microblaze/kernel/entry.S +1 -1
@@ -943,7 +943,7 @@ ret_from_break:
  	mbar	1
  	mbar	2
  	bri	4
-	suspend
+	mbar	24 /* suspend */
  	nop
  #endif
 

Applied.
M

Signature · 6 lines
Michal Simek, Ing. (M.Eng), OpenPGP -> KeyID: FE3D1F91
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel - Xilinx Microblaze
Maintainer of Linux kernel - Xilinx Zynq ARM and ZynqMP/Versal ARM64 SoCs
U-Boot custodian - Xilinx Microblaze/Zynq/ZynqMP/Versal/Versal NET SoCs
TF-A maintainer - Xilinx ZynqMP/Versal/Versal NET SoCs