Commit 4603fbaa authored by John David Anglin's avatar John David Anglin Committed by Helge Deller

parisc: Avoid clobbering the C/B bits in the PSW with tophys and tovirt macros

Use add,l to avoid clobbering the C/B bits in the PSW.
Signed-off-by: default avatarJohn David Anglin <dave.anglin@bell.net>
Signed-off-by: default avatarHelge Deller <deller@gmx.de>
Cc: stable@vger.kernel.org # v5.10+
parent e5db6a74
...@@ -97,26 +97,28 @@ ...@@ -97,26 +97,28 @@
* version takes two arguments: a src and destination register. * version takes two arguments: a src and destination register.
* However, the source and destination registers can not be * However, the source and destination registers can not be
* the same register. * the same register.
*
* We use add,l to avoid clobbering the C/B bits in the PSW.
*/ */
.macro tophys grvirt, grphys .macro tophys grvirt, grphys
ldil L%(__PAGE_OFFSET), \grphys ldil L%(-__PAGE_OFFSET), \grphys
sub \grvirt, \grphys, \grphys addl \grvirt, \grphys, \grphys
.endm .endm
.macro tovirt grphys, grvirt .macro tovirt grphys, grvirt
ldil L%(__PAGE_OFFSET), \grvirt ldil L%(__PAGE_OFFSET), \grvirt
add \grphys, \grvirt, \grvirt addl \grphys, \grvirt, \grvirt
.endm .endm
.macro tophys_r1 gr .macro tophys_r1 gr
ldil L%(__PAGE_OFFSET), %r1 ldil L%(-__PAGE_OFFSET), %r1
sub \gr, %r1, \gr addl \gr, %r1, \gr
.endm .endm
.macro tovirt_r1 gr .macro tovirt_r1 gr
ldil L%(__PAGE_OFFSET), %r1 ldil L%(__PAGE_OFFSET), %r1
add \gr, %r1, \gr addl \gr, %r1, \gr
.endm .endm
.macro delay value .macro delay value
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment