Skip to contentSkip to conversation

arch/csky: Fix the compile error when use abiv1

PATCH RESEND Applied Ma Jun 2 participants 2 messages Feb 10, 2020 – Feb 11, 2020 C-sky architecture

lore
Share & tools
lore

Ma Jun

author
#0 lore raw

PATCH RESEND 1/1 arch/csky: Fix the compile error when use abiv1

From: MaJun <[email protected]>

Fix the bug caused by csky_regs. Because this struct has no member r1, only a1.

---
 linux/csky/get_scno.c | 2 +-
 linux/csky/set_scno.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
linux/csky/get_scno.c +1 -1
index 9efb202..9d4397a 100644
@@ -12,7 +12,7 @@ arch_get_scno(struct tcb *tcp)
 #if defined(__CSKYABIV2__)
 	tcp->scno = csky_regs.regs[3];
 #else
-	tcp->scno = csky_regs.r1;
+	tcp->scno = csky_regs.a1;
 #endif
 	return 1;
 }
linux/csky/set_scno.c +1 -1
index 655d108..c1e1c18 100644
@@ -13,7 +13,7 @@ arch_set_scno(struct tcb *tcp, kernel_ulong_t scno)
 #if defined(__CSKYABIV2__)
 	csky_regs.regs[3] = scno;
 #else
-	csky_regs.r1 = scno;
+	csky_regs.a1 = scno;
 #endif
 	return set_regs(tcp->pid);
 }
Signature · 1 line
1.8.3.1
#1 lore raw
Quoted 29 lines · Ma Jun

From: MaJun <[email protected]>

Fix the bug caused by csky_regs. Because this struct has no member r1, only a1.

---
 linux/csky/get_scno.c | 2 +-
 linux/csky/set_scno.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
linux/csky/get_scno.c +1 -1
index 9efb202..9d4397a 100644
@@ -12,7 +12,7 @@ arch_get_scno(struct tcb *tcp)
 #if defined(__CSKYABIV2__)
 	tcp->scno = csky_regs.regs[3];
 #else
-	tcp->scno = csky_regs.r1;
+	tcp->scno = csky_regs.a1;
 #endif
 	return 1;
 }
linux/csky/set_scno.c +0 -0
index 655d108..c1e1c18 100644

linux/csky/set_scno.c arch_set_scno(struct tcb *tcp, kernel_ulong_t scno) · line 19

Quoted 8 lines
linux/csky/set_scno.c +1 -1
@@ -13,7 +13,7 @@ arch_set_scno(struct tcb *tcp, kernel_ulong_t scno)
 #if defined(__CSKYABIV2__)
 	csky_regs.regs[3] = scno;
 #else
-	csky_regs.r1 = scno;
+	csky_regs.a1 = scno;
 #endif
 	return set_regs(tcp->pid);
 }

Applied, thanks.

Signature · 1 line
ldv