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:
Justin Hibbits
2017-11-01 02:40:15 +00:00
parent 1888bce26a
commit 61b9e7ef6a
2 changed files with 5 additions and 8 deletions
+2
View File
@@ -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
+3 -8
View File
@@ -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