ARC: Fix wrong access to "sp" member in user_regs_struct

Message ID 20170630131414.32627-1-Eugeniy.Paltsev@synopsys.com
State New
Headers show

Commit Message

Eugeniy Paltsev June 30, 2017, 1:14 p.m.
"sp" register is member of "scratch" structure (which is nested
in user_regs_struct)

Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
---
 linux/arc/arch_regs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Dmitry V. Levin July 1, 2017, 10:47 a.m. | #1
On Fri, Jun 30, 2017 at 04:14:14PM +0300, Eugeniy Paltsev wrote:
> "sp" register is member of "scratch" structure (which is nested
> in user_regs_struct)
> 
> Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
> ---
>  linux/arc/arch_regs.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/linux/arc/arch_regs.c b/linux/arc/arch_regs.c
> index 9a5c2df..88bb799 100644
> --- a/linux/arc/arch_regs.c
> +++ b/linux/arc/arch_regs.c
> @@ -1,4 +1,4 @@
>  static struct user_regs_struct arc_regs;
> -unsigned long *const arc_sp_ptr = &arc_regs.sp;
> +unsigned long *const arc_sp_ptr = &arc_regs.scratch.sp;
>  #define ARCH_REGS_FOR_GETREGSET arc_regs
>  #define ARCH_PC_REG arc_regs.efa

Applied, thanks.

Patch

diff --git a/linux/arc/arch_regs.c b/linux/arc/arch_regs.c
index 9a5c2df..88bb799 100644
--- a/linux/arc/arch_regs.c
+++ b/linux/arc/arch_regs.c
@@ -1,4 +1,4 @@ 
 static struct user_regs_struct arc_regs;
-unsigned long *const arc_sp_ptr = &arc_regs.sp;
+unsigned long *const arc_sp_ptr = &arc_regs.scratch.sp;
 #define ARCH_REGS_FOR_GETREGSET arc_regs
 #define ARCH_PC_REG arc_regs.efa