From cdd00fe6aa52870b54797e1386aac6202d916763 Mon Sep 17 00:00:00 2001 From: Helge Deller Date: Tue, 17 May 2022 17:03:01 +0200 Subject: parisc: Add dep_safe() macro to deposit a register in 32- and 64-kernels Signed-off-by: Helge Deller --- arch/parisc/include/asm/assembly.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'arch/parisc') 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 -- cgit v1.2.1