aboutsummaryrefslogtreecommitdiffstats
path: root/arch/parisc/include
diff options
context:
space:
mode:
authorHelge Deller <deller@gmx.de>2022-05-17 17:03:01 +0200
committerHelge Deller <deller@gmx.de>2022-05-23 13:44:24 +0200
commitcdd00fe6aa52870b54797e1386aac6202d916763 (patch)
tree88f093733af489d38857ab7cbee0433b1d93044e /arch/parisc/include
parentparisc: Fix wrong comment for shr macro (diff)
downloadlinux-dev-cdd00fe6aa52870b54797e1386aac6202d916763.tar.xz
linux-dev-cdd00fe6aa52870b54797e1386aac6202d916763.zip
parisc: Add dep_safe() macro to deposit a register in 32- and 64-kernels
Signed-off-by: Helge Deller <deller@gmx.de>
Diffstat (limited to 'arch/parisc/include')
-rw-r--r--arch/parisc/include/asm/assembly.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/arch/parisc/include/asm/assembly.h b/arch/parisc/include/asm/assembly.h
index be784b41048c..0f0d4a496fef 100644
--- a/arch/parisc/include/asm/assembly.h
+++ b/arch/parisc/include/asm/assembly.h
@@ -174,6 +174,16 @@
#endif
.endm
+ /* The depw instruction leaves the most significant 32 bits of the
+ * target register in an undefined state on PA 2.0 systems. */
+ .macro dep_safe i, p, len, t
+#ifdef CONFIG_64BIT
+ depd \i, 32+(\p), \len, \t
+#else
+ depw \i, \p, \len, \t
+#endif
+ .endm
+
/* load 32-bit 'value' into 'reg' compensating for the ldil
* sign-extension when running in wide mode.
* WARNING!! neither 'value' nor 'reg' can be expressions