Fix debug interrupts on 64-bit Book-E
Use a WORD_SIZE macro to define the correct offset to the second word needed. This corrects the offset calculation in 64-bit builds.
This commit is contained in:
@@ -57,6 +57,7 @@
|
||||
#define THREAD_REG %r13
|
||||
#define ADDR(x) \
|
||||
.llong x
|
||||
#define WORD_SIZE 8
|
||||
#else
|
||||
#define GET_TOCBASE(r)
|
||||
#define TOC_RESTORE
|
||||
@@ -72,6 +73,7 @@
|
||||
#define THREAD_REG %r2
|
||||
#define ADDR(x) \
|
||||
.long x
|
||||
#define WORD_SIZE 4
|
||||
#endif
|
||||
|
||||
.text
|
||||
|
||||
@@ -970,19 +970,14 @@ int_debug_int:
|
||||
GET_CPUINFO(%r3)
|
||||
LOAD %r3, (PC_BOOKE_CRITSAVE+CPUSAVE_SRR0)(%r3)
|
||||
bl 0f
|
||||
#ifdef __powerpc64__
|
||||
.llong interrupt_vector_base-.
|
||||
.llong interrupt_vector_top-.
|
||||
#else
|
||||
.long interrupt_vector_base-.
|
||||
.long interrupt_vector_top-.
|
||||
#endif
|
||||
ADDR(interrupt_vector_base-.)
|
||||
ADDR(interrupt_vector_top-.)
|
||||
0: mflr %r5
|
||||
LOAD %r4,0(%r5) /* interrupt_vector_base in r4 */
|
||||
add %r4,%r4,%r5
|
||||
CMPL cr0, %r3, %r4
|
||||
blt trap_common
|
||||
LOAD %r4,4(%r5) /* interrupt_vector_top in r4 */
|
||||
LOAD %r4,WORD_SIZE(%r5) /* interrupt_vector_top in r4 */
|
||||
add %r4,%r4,%r5
|
||||
addi %r4,%r4,4
|
||||
CMPL cr0, %r3, %r4
|
||||
|
||||
Reference in New Issue
Block a user