[PATCH v3 11/14] powerpc/kprobes: Support kprobes on prefixed instructions
Nicholas Piggin
npiggin at gmail.com
Fri Feb 28 12:56:11 AEDT 2020
Nicholas Piggin's on February 28, 2020 11:47 am:
> Jordan Niethe's on February 27, 2020 10:58 am:
>> On Wed, Feb 26, 2020 at 6:18 PM Nicholas Piggin <npiggin at gmail.com> wrote:
>> +
>> +#define DEREF_PPC_INST_PTR(ptr) \
>> +({ \
>> + ppc_inst __inst; \
>> + __inst.w = *(unsigned int *)(ptr); \
>> + if (PPC_INST_IS_PREFIXED(__inst)) \
>> + __inst.p = *(ppc_prefixed_inst *)(ptr); \
>> + __inst; \
>> +})
>
> I'd go an inline with shorter lowercase names. ppc_inst_read(&inst);
Probably inst = ppc_inst_read(mem), rather.
Thanks,
Nick
More information about the Linuxppc-dev
mailing list