diff options
author | David S. Miller <davem@davemloft.net> | 2012-05-11 20:57:29 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-05-11 20:57:29 -0700 |
commit | 59a0c3d91e038f97be5df5243a41a0e33db53122 (patch) | |
tree | 608a231ebe20634c81049c2bd177f400f1c7a9b5 | |
parent | 4419f11b45e2f1fdcdc8e29fae5900de4b8ef461 (diff) | |
download | blackbird-op-linux-59a0c3d91e038f97be5df5243a41a0e33db53122.tar.gz blackbird-op-linux-59a0c3d91e038f97be5df5243a41a0e33db53122.zip |
sparc32: Put back SPARC_BRANCH.
It's needed for the floppy interrupt trap table patching.
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | arch/sparc/include/asm/traps.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/sparc/include/asm/traps.h b/arch/sparc/include/asm/traps.h index 5fac90f18da3..3aa62dde343f 100644 --- a/arch/sparc/include/asm/traps.h +++ b/arch/sparc/include/asm/traps.h @@ -31,6 +31,13 @@ extern struct tt_entry *sparc_ttable; #define SPARC_MOV_CONST_L3(const) (0xa6102000 | (const&0xfff)) +/* The following assumes that the branch lies before the place we + * are branching to. This is the case for a trap vector... + * You have been warned. + */ +#define SPARC_BRANCH(dest_addr, inst_addr) \ + (0x10800000 | (((dest_addr-inst_addr)>>2)&0x3fffff)) + #define SPARC_RD_PSR_L0 (0xa1480000) #define SPARC_RD_WIM_L3 (0xa7500000) #define SPARC_NOP (0x01000000) |