mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-20 19:23:57 +08:00
ARC: Make pt_regs regs unsigned
KGDB fails to build afterf51e2f1911
("ARC: make sure instruction_pointer() returns unsigned value") The hack to force one specific reg to unsigned backfired. There's no reason to keep the regs signed after all. | CC arch/arc/kernel/kgdb.o |../arch/arc/kernel/kgdb.c: In function 'kgdb_trap': | ../arch/arc/kernel/kgdb.c:180:29: error: lvalue required as left operand of assignment | instruction_pointer(regs) -= BREAK_INSTR_SIZE; Reported-by: Yuriy Kolerov <yuriy.kolerov@synopsys.com> Fixes:f51e2f1911
("ARC: make sure instruction_pointer() returns unsigned value") Cc: Alexey Brodkin <abrodkin@synopsys.com> Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
This commit is contained in:
parent
b89aa12c17
commit
87ce62802f
@ -20,20 +20,20 @@
|
|||||||
struct pt_regs {
|
struct pt_regs {
|
||||||
|
|
||||||
/* Real registers */
|
/* Real registers */
|
||||||
long bta; /* bta_l1, bta_l2, erbta */
|
unsigned long bta; /* bta_l1, bta_l2, erbta */
|
||||||
|
|
||||||
long lp_start, lp_end, lp_count;
|
unsigned long lp_start, lp_end, lp_count;
|
||||||
|
|
||||||
long status32; /* status32_l1, status32_l2, erstatus */
|
unsigned long status32; /* status32_l1, status32_l2, erstatus */
|
||||||
long ret; /* ilink1, ilink2 or eret */
|
unsigned long ret; /* ilink1, ilink2 or eret */
|
||||||
long blink;
|
unsigned long blink;
|
||||||
long fp;
|
unsigned long fp;
|
||||||
long r26; /* gp */
|
unsigned long r26; /* gp */
|
||||||
|
|
||||||
long r12, r11, r10, r9, r8, r7, r6, r5, r4, r3, r2, r1, r0;
|
unsigned long r12, r11, r10, r9, r8, r7, r6, r5, r4, r3, r2, r1, r0;
|
||||||
|
|
||||||
long sp; /* user/kernel sp depending on where we came from */
|
unsigned long sp; /* User/Kernel depending on where we came from */
|
||||||
long orig_r0;
|
unsigned long orig_r0;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* To distinguish bet excp, syscall, irq
|
* To distinguish bet excp, syscall, irq
|
||||||
@ -55,13 +55,13 @@ struct pt_regs {
|
|||||||
unsigned long event;
|
unsigned long event;
|
||||||
};
|
};
|
||||||
|
|
||||||
long user_r25;
|
unsigned long user_r25;
|
||||||
};
|
};
|
||||||
#else
|
#else
|
||||||
|
|
||||||
struct pt_regs {
|
struct pt_regs {
|
||||||
|
|
||||||
long orig_r0;
|
unsigned long orig_r0;
|
||||||
|
|
||||||
union {
|
union {
|
||||||
struct {
|
struct {
|
||||||
@ -76,26 +76,26 @@ struct pt_regs {
|
|||||||
unsigned long event;
|
unsigned long event;
|
||||||
};
|
};
|
||||||
|
|
||||||
long bta; /* bta_l1, bta_l2, erbta */
|
unsigned long bta; /* bta_l1, bta_l2, erbta */
|
||||||
|
|
||||||
long user_r25;
|
unsigned long user_r25;
|
||||||
|
|
||||||
long r26; /* gp */
|
unsigned long r26; /* gp */
|
||||||
long fp;
|
unsigned long fp;
|
||||||
long sp; /* user/kernel sp depending on where we came from */
|
unsigned long sp; /* user/kernel sp depending on where we came from */
|
||||||
|
|
||||||
long r12;
|
unsigned long r12;
|
||||||
|
|
||||||
/*------- Below list auto saved by h/w -----------*/
|
/*------- Below list auto saved by h/w -----------*/
|
||||||
long r0, r1, r2, r3, r4, r5, r6, r7, r8, r9, r10, r11;
|
unsigned long r0, r1, r2, r3, r4, r5, r6, r7, r8, r9, r10, r11;
|
||||||
|
|
||||||
long blink;
|
unsigned long blink;
|
||||||
long lp_end, lp_start, lp_count;
|
unsigned long lp_end, lp_start, lp_count;
|
||||||
|
|
||||||
long ei, ldi, jli;
|
unsigned long ei, ldi, jli;
|
||||||
|
|
||||||
long ret;
|
unsigned long ret;
|
||||||
long status32;
|
unsigned long status32;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
@ -103,10 +103,10 @@ struct pt_regs {
|
|||||||
/* Callee saved registers - need to be saved only when you are scheduled out */
|
/* Callee saved registers - need to be saved only when you are scheduled out */
|
||||||
|
|
||||||
struct callee_regs {
|
struct callee_regs {
|
||||||
long r25, r24, r23, r22, r21, r20, r19, r18, r17, r16, r15, r14, r13;
|
unsigned long r25, r24, r23, r22, r21, r20, r19, r18, r17, r16, r15, r14, r13;
|
||||||
};
|
};
|
||||||
|
|
||||||
#define instruction_pointer(regs) (unsigned long)((regs)->ret)
|
#define instruction_pointer(regs) ((regs)->ret)
|
||||||
#define profile_pc(regs) instruction_pointer(regs)
|
#define profile_pc(regs) instruction_pointer(regs)
|
||||||
|
|
||||||
/* return 1 if user mode or 0 if kernel mode */
|
/* return 1 if user mode or 0 if kernel mode */
|
||||||
@ -142,7 +142,7 @@ struct callee_regs {
|
|||||||
|
|
||||||
static inline long regs_return_value(struct pt_regs *regs)
|
static inline long regs_return_value(struct pt_regs *regs)
|
||||||
{
|
{
|
||||||
return regs->r0;
|
return (long)regs->r0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* !__ASSEMBLY__ */
|
#endif /* !__ASSEMBLY__ */
|
||||||
|
@ -32,20 +32,20 @@
|
|||||||
*/
|
*/
|
||||||
struct user_regs_struct {
|
struct user_regs_struct {
|
||||||
|
|
||||||
long pad;
|
unsigned long pad;
|
||||||
struct {
|
struct {
|
||||||
long bta, lp_start, lp_end, lp_count;
|
unsigned long bta, lp_start, lp_end, lp_count;
|
||||||
long status32, ret, blink, fp, gp;
|
unsigned long status32, ret, blink, fp, gp;
|
||||||
long r12, r11, r10, r9, r8, r7, r6, r5, r4, r3, r2, r1, r0;
|
unsigned long r12, r11, r10, r9, r8, r7, r6, r5, r4, r3, r2, r1, r0;
|
||||||
long sp;
|
unsigned long sp;
|
||||||
} scratch;
|
} scratch;
|
||||||
long pad2;
|
unsigned long pad2;
|
||||||
struct {
|
struct {
|
||||||
long r25, r24, r23, r22, r21, r20;
|
unsigned long r25, r24, r23, r22, r21, r20;
|
||||||
long r19, r18, r17, r16, r15, r14, r13;
|
unsigned long r19, r18, r17, r16, r15, r14, r13;
|
||||||
} callee;
|
} callee;
|
||||||
long efa; /* break pt addr, for break points in delay slots */
|
unsigned long efa; /* break pt addr, for break points in delay slots */
|
||||||
long stop_pc; /* give dbg stop_pc after ensuring brkpt trap */
|
unsigned long stop_pc; /* give dbg stop_pc after ensuring brkpt trap */
|
||||||
};
|
};
|
||||||
#endif /* !__ASSEMBLY__ */
|
#endif /* !__ASSEMBLY__ */
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user