public inbox for linux-parisc@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] parisc: use long branch in fork_like macro
@ 2013-05-16 19:28 Helge Deller
  0 siblings, 0 replies; 2+ messages in thread
From: Helge Deller @ 2013-05-16 19:28 UTC (permalink / raw)
  To: stable, linux-parisc

please add to stable kernel v3.9
upstream commit bbbfde782084b4f0d85ddffb88f1cf4650ff40e4

From: John David Anglin <dave.anglin@bell.net>

The "b" branch instruction used in the fork_like macro only can handle
17-bit pc-relative offsets.
This fails with an out of range offset with some .config files.
Rewrite to use the "be" instruction which
can branch to any address in a space.

Signed-off-by: John David Anglin  <dave.anglin@bell.net>
Signed-off-by: Helge Deller <deller@gmx.de>

diff --git a/arch/parisc/kernel/entry.S b/arch/parisc/kernel/entry.S
index aa486e4..36f4f1d 100644
--- a/arch/parisc/kernel/entry.S
+++ b/arch/parisc/kernel/entry.S
@@ -1702,7 +1702,8 @@ ENTRY(sys_\name\()_wrapper)
 	ldo	TASK_REGS(%r1),%r1
 	reg_save %r1
 	mfctl	%cr27, %r28
-	b	sys_\name
+	ldil	L%sys_\name, %r31
+	be	R%sys_\name(%sr4,%r31)
 	STREG	%r28, PT_CR27(%r1)
 ENDPROC(sys_\name\()_wrapper)
 	.endm


^ permalink raw reply related	[flat|nested] 2+ messages in thread
* [PATCH] parisc: use long branch in fork_like macro
@ 2013-05-04 19:16 John David Anglin
  0 siblings, 0 replies; 2+ messages in thread
From: John David Anglin @ 2013-05-04 19:16 UTC (permalink / raw)
  To: linux-parisc List; +Cc: Helge Deller, James Bottomley

[-- Attachment #1: Type: text/plain, Size: 312 bytes --]

The "b" branch instruction used in the fork_like macro only can handle  
17-bit pc-relative offsets.
This fails with an out of range offset with some .config files.   
Rewrite to use the "be" instruction which
can branch to any address in a space.

Signed-off-by: John David Anglin  <dave.anglin@bell.net>
---



[-- Attachment #2: fork_like.d.txt --]
[-- Type: text/plain, Size: 408 bytes --]

diff --git a/arch/parisc/kernel/entry.S b/arch/parisc/kernel/entry.S
index f33201b..3a6bb7b 100644
--- a/arch/parisc/kernel/entry.S
+++ b/arch/parisc/kernel/entry.S
@@ -1694,7 +1695,8 @@ ENTRY(sys_\name\()_wrapper)
 	ldo	TASK_REGS(%r1),%r1
 	reg_save %r1
 	mfctl	%cr27, %r28
-	b	sys_\name
+	ldil	L%sys_\name, %r31
+	be	R%sys_\name(%sr4,%r31)
 	STREG	%r28, PT_CR27(%r1)
 ENDPROC(sys_\name\()_wrapper)
 	.endm

[-- Attachment #3: Type: text/plain, Size: 45 bytes --]



--
John David Anglin	dave.anglin@bell.net


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-05-16 19:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-16 19:28 [PATCH] parisc: use long branch in fork_like macro Helge Deller
  -- strict thread matches above, loose matches on Subject: below --
2013-05-04 19:16 John David Anglin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox