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

Commit 5fa9da50 authored by Russell King's avatar Russell King
Browse files

ARM: get rid of horrible *(unsigned int *)(regs + 1)



Get rid of the horrible "*(unsigned int *)(regs + 1)" to get at the
parent context domain access register value, instead using the newly
introduced svc_pt_regs structure.

Acked-by: default avatarWill Deacon <will.deacon@arm.com>
Signed-off-by: default avatarRussell King <rmk+kernel@armlinux.org.uk>
parent e6a9dc61
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -25,6 +25,8 @@ struct svc_pt_regs {
	u32 unused;
};

#define to_svc_pt_regs(r) container_of(r, struct svc_pt_regs, regs)

#define user_mode(regs)	\
	(((regs)->ARM_cpsr & 0xf) == 0)

+1 −1
Original line number Diff line number Diff line
@@ -106,7 +106,7 @@ void __show_regs(struct pt_regs *regs)
	if (user_mode(regs))
		domain = DACR_UACCESS_ENABLE;
	else
		domain = *(unsigned int *)(regs + 1);
		domain = to_svc_pt_regs(regs)->dacr;
#else
	domain = get_domain();
#endif