Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 38a9ff6d authored by Vineet Gupta's avatar Vineet Gupta
Browse files

ARC: Remove explicit passing around of ECR



With ECR now part of pt_regs

* No need to propagate from lowest asm handlers as arg
* No need to save it in tsk->thread.cause_code
* Avoid bit chopping to access the bit-fields

More code consolidation, cleanup

Signed-off-by: default avatarVineet Gupta <vgupta@synopsys.com>
parent 502a0c77
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -18,9 +18,8 @@ struct task_struct;
void show_regs(struct pt_regs *regs);
void show_stacktrace(struct task_struct *tsk, struct pt_regs *regs);
void show_kernel_fault_diag(const char *str, struct pt_regs *regs,
			    unsigned long address, unsigned long cause_reg);
void die(const char *str, struct pt_regs *regs, unsigned long address,
	 unsigned long cause_reg);
			    unsigned long address);
void die(const char *str, struct pt_regs *regs, unsigned long address);

#define BUG()	do {				\
	dump_stack();					\
+2 −2
Original line number Diff line number Diff line
@@ -31,7 +31,7 @@ static inline void arch_kgdb_breakpoint(void)
	__asm__ __volatile__ ("trap_s	0x4\n");
}

extern void kgdb_trap(struct pt_regs *regs, int param);
extern void kgdb_trap(struct pt_regs *regs);

enum arc700_linux_regnums {
	_R0		= 0,
@@ -53,7 +53,7 @@ enum arc700_linux_regnums {
};

#else
#define kgdb_trap(regs, param)
#define kgdb_trap(regs)
#endif

#endif	/* __ARC_KGDB_H__ */
+2 −4
Original line number Diff line number Diff line
@@ -50,11 +50,9 @@ struct kprobe_ctlblk {

int kprobe_fault_handler(struct pt_regs *regs, unsigned long cause);
void kretprobe_trampoline(void);
void trap_is_kprobe(unsigned long cause, unsigned long address,
			   struct pt_regs *regs);
void trap_is_kprobe(unsigned long address, struct pt_regs *regs);
#else
static void trap_is_kprobe(unsigned long cause, unsigned long address,
			   struct pt_regs *regs)
static void trap_is_kprobe(unsigned long address, struct pt_regs *regs)
{
}
#endif
+0 −1
Original line number Diff line number Diff line
@@ -29,7 +29,6 @@ struct thread_struct {
	unsigned long ksp;	/* kernel mode stack pointer */
	unsigned long callee_reg;	/* pointer to callee regs */
	unsigned long fault_address;	/* dbls as brkpt holder as well */
	unsigned long cause_code;	/* Exception Cause Code (ECR) */
#ifdef CONFIG_ARC_FPU_SAVE_RESTORE
	struct arc_fpu fpu;
#endif
+2 −2
Original line number Diff line number Diff line
@@ -16,11 +16,11 @@

#ifdef CONFIG_ARC_MISALIGN_ACCESS
int misaligned_fixup(unsigned long address, struct pt_regs *regs,
		     unsigned long cause, struct callee_regs *cregs);
		     struct callee_regs *cregs);
#else
static inline int
misaligned_fixup(unsigned long address, struct pt_regs *regs,
		 unsigned long cause, struct callee_regs *cregs)
		 struct callee_regs *cregs)
{
	return 0;
}
Loading