diff options
author | Helge Deller <deller@gmx.de> | 2022-05-17 17:03:01 +0200 |
---|---|---|
committer | Helge Deller <deller@gmx.de> | 2022-05-23 13:44:24 +0200 |
commit | cdd00fe6aa52870b54797e1386aac6202d916763 (patch) | |
tree | 88f093733af489d38857ab7cbee0433b1d93044e /arch/parisc | |
parent | be6aee1392c46cd6f537aea75b1ce7ec427d36f4 (diff) | |
download | linux-next-cdd00fe6aa52870b54797e1386aac6202d916763.tar.gz |
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')
-rw-r--r-- | arch/parisc/include/asm/assembly.h | 10 |
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 |