Message ID | a64f0de38fe32da9154d1944195ff6b852ae3310.1719917348.git.oleksii.kurochko@gmail.com (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | Enable build of full Xen for RISC-V | expand |
On 02.07.2024 13:01, Oleksii Kurochko wrote: > Support for specifying "raw" insns was added only in 2.38. > To support older version it would be better switch to .insn > with operands. > > The following compilation error occurs: > ./arch/riscv/include/asm/processor.h: Assembler messages: > ./arch/riscv/include/asm/processor.h:70: Error: unrecognized opcode `0x0100000F' > In case of the following Binutils: > $ riscv64-linux-gnu-as --version > GNU assembler (GNU Binutils for Debian) 2.35.2 > > Suggested-by: Andrew Cooper <andrew.cooper3@citrix.com> > Signed-off-by: Oleksii Kurochko <oleksii.kurochko@gmail.com> > Suggested-by: Jan Beulich <jbeulich@suse.com> Reviewed-by: Jan Beulich <jbeulich@suse.com> > Andrew, > > Could you please take a look if you are okay with suggested > changes. > > Thanks in advance. I won't wait for too long for a reply here (perhaps until EOD tomorrow), as I expect the change to be pretty uncontroversial. However, to put it in at this point I'll need a release ack first anyway. Jan
On Tue, 2024-07-02 at 14:02 +0200, Jan Beulich wrote: > On 02.07.2024 13:01, Oleksii Kurochko wrote: > > Support for specifying "raw" insns was added only in 2.38. > > To support older version it would be better switch to .insn > > with operands. > > > > The following compilation error occurs: > > ./arch/riscv/include/asm/processor.h: Assembler messages: > > ./arch/riscv/include/asm/processor.h:70: Error: unrecognized > > opcode `0x0100000F' > > In case of the following Binutils: > > $ riscv64-linux-gnu-as --version > > GNU assembler (GNU Binutils for Debian) 2.35.2 > > > > Suggested-by: Andrew Cooper <andrew.cooper3@citrix.com> > > Signed-off-by: Oleksii Kurochko <oleksii.kurochko@gmail.com> > > Suggested-by: Jan Beulich <jbeulich@suse.com> > > Reviewed-by: Jan Beulich <jbeulich@suse.com> > > > Andrew, > > > > Could you please take a look if you are okay with suggested > > changes. > > > > Thanks in advance. > > I won't wait for too long for a reply here (perhaps until EOD > tomorrow), as > I expect the change to be pretty uncontroversial. However, to put it > in at > this point I'll need a release ack first anyway. Release-Acked-By: Oleksii Kurochko <oleksii.kurochko@gmail.com> ~ Oleksii
diff --git a/xen/arch/riscv/include/asm/processor.h b/xen/arch/riscv/include/asm/processor.h index 6846151717..3ae164c265 100644 --- a/xen/arch/riscv/include/asm/processor.h +++ b/xen/arch/riscv/include/asm/processor.h @@ -67,7 +67,7 @@ static inline void cpu_relax(void) __asm__ __volatile__ ( "pause" ); #else /* Encoding of the pause instruction */ - __asm__ __volatile__ ( ".insn 0x0100000F" ); + __asm__ __volatile__ ( ".insn r MISC_MEM, 0, 0, x0, x0, x16" ); #endif barrier();
Support for specifying "raw" insns was added only in 2.38. To support older version it would be better switch to .insn with operands. The following compilation error occurs: ./arch/riscv/include/asm/processor.h: Assembler messages: ./arch/riscv/include/asm/processor.h:70: Error: unrecognized opcode `0x0100000F' In case of the following Binutils: $ riscv64-linux-gnu-as --version GNU assembler (GNU Binutils for Debian) 2.35.2 Suggested-by: Andrew Cooper <andrew.cooper3@citrix.com> Signed-off-by: Oleksii Kurochko <oleksii.kurochko@gmail.com> Suggested-by: Jan Beulich <jbeulich@suse.com> --- Andrew, Could you please take a look if you are okay with suggested changes. Thanks in advance. --- Changes in V14: - add Suggested-By: Jan Beulich <jbeulich@suse.com> - switch from "raw" insn to .insn with operands to support older gas. --- Changes in V13: - new patch --- xen/arch/riscv/include/asm/processor.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)