Skip to content

Commit

Permalink
MIPS: Redefine value of BRK_BUG.
Browse files Browse the repository at this point in the history
The BRK_BUG value is used in the BUG and __BUG_ON inline macros. For
standard MIPS cores the code in the 'tne' instruction is 10-bits long.
In microMIPS, the 'tne' instruction is recoded and the code can only be
4-bits long. We change the value to 12 instead of 512 so that both classic
and microMIPS kernels build.

[ralf@linux-mips.org: Many of the break codes starting from 0 are used
across many MIPS UNIX variants.  Codes starting from 512 are operating
system specific additions.  1023 again is also used by other operating
systems]

Signed-off-by: Steven J. Hill <sjhill@mips.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
  • Loading branch information
Steven J. Hill authored and Ralf Baechle committed Feb 15, 2013
1 parent a96102b commit 8e8dc33
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/mips/include/uapi/asm/break.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
#define BRK_STACKOVERFLOW 9 /* For Ada stackchecking */
#define BRK_NORLD 10 /* No rld found - not used by Linux/MIPS */
#define _BRK_THREADBP 11 /* For threads, user bp (used by debuggers) */
#define BRK_BUG 512 /* Used by BUG() */
#define BRK_BUG 12 /* Used by BUG() */
#define BRK_KDB 513 /* Used in KDB_ENTER() */
#define BRK_MEMU 514 /* Used by FPU emulator */
#define BRK_KPROBE_BP 515 /* Kprobe break */
Expand Down

0 comments on commit 8e8dc33

Please sign in to comment.