Re: [PATCH] powerpc: Add ppc_inst_as_u64()

2020-06-08 Thread Michael Ellerman
On Mon, 25 May 2020 15:50:04 +1000, Michael Ellerman wrote: > The code patching code wants to get the value of a struct ppc_inst as > a u64 when the instruction is prefixed, so we can pass the u64 down to > __put_user_asm() and write it with a single store. > > This is a bit awkward because the va

Re: [PATCH] powerpc: Add ppc_inst_as_u64()

2020-05-25 Thread Jordan Niethe
On Mon, May 25, 2020 at 3:49 PM Michael Ellerman wrote: > > The code patching code wants to get the value of a struct ppc_inst as Might need to change the wording here as it also gets used in arch_prepare_optimized_kprobe() > a u64 when the instruction is prefixed, so we can pass the u64 down to >

[PATCH] powerpc: Add ppc_inst_as_u64()

2020-05-24 Thread Michael Ellerman
The code patching code wants to get the value of a struct ppc_inst as a u64 when the instruction is prefixed, so we can pass the u64 down to __put_user_asm() and write it with a single store. This is a bit awkward because the value differs based on the CPU endianness, so add a helper to do the con