nios2: fix wrong access to "SP" register in user_pt_regs
authorRomain Naour <romain.naour@smile.fr>
Tue, 4 Jul 2017 16:37:18 +0000 (18:37 +0200)
committerDmitry V. Levin <ldv@altlinux.org>
Tue, 4 Jul 2017 17:29:18 +0000 (17:29 +0000)
Starting with linux commit v4.0-rc4~21^2, "SP" register
is available via regs[PTR_SP] member of struct user_pt_regs.

* linux/nios2/arch_regs.h (nios2_sp_ptr): Change type
to "unsigned int *".
* linux/nios2/arch_regs.c (nios2_sp_ptr): Likewise.
Replace .sp with .regs[PTR_SP].

Fixes: http://autobuild.buildroot.net/results/b9f/b9fc25b82f3280872fe1593ac252a8529ba83576
Fixes: v4.16-34-g6117728a ("nios2: export nios2_sp_ptr")
Signed-off-by: Romain Naour <romain.naour@smile.fr>
Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
linux/nios2/arch_regs.c
linux/nios2/arch_regs.h

index 8a668bce9df76b191d0071d6bb6561a92e9b0700..c18a3aa53010c8cd664d28ee5b47adb3ab00c424 100644 (file)
@@ -1,4 +1,4 @@
 static struct user_pt_regs nios2_regs;
-unsigned long *const nios2_sp_ptr = &nios2_regs.sp;
+unsigned int *const nios2_sp_ptr = &nios2_regs.regs[PTR_SP];
 # define ARCH_REGS_FOR_GETREGSET nios2_regs
 #define ARCH_PC_REG nios2_regs.regs[PTR_EA]
index 7f344b53eb41152720d6454b8e5e9a20d0b245e7..c4230eda36872b2d39d5e2e1dc3529b5dc981307 100644 (file)
@@ -1 +1 @@
-extern unsigned long *const nios2_sp_ptr;
+extern unsigned int *const nios2_sp_ptr;