On Thu, May 14, 2020 at 10:06 PM Alistair Popple <alist...@popple.id.au> wrote: > > On Thursday, 14 May 2020 4:11:43 PM AEST Christophe Leroy wrote: > > @@ -249,7 +249,7 @@ int arch_prepare_optimized_kprobe(struct > > optimized_kprobe *op, struct kprobe *p) > > > * Fixup the template with instructions to: > > > * 1. load the address of the actual probepoint > > > */ > > > - patch_imm64_load_insns((unsigned long)op, buff + TMPL_OP_IDX); > > > + patch_imm64_load_insns((unsigned long)op, 3, buff + TMPL_OP_IDX); > > > > > > /* > > > * 2. branch to optimized_callback() and emulate_step() > > > @@ -282,7 +282,11 @@ int arch_prepare_optimized_kprobe(struct > > > optimized_kprobe *op, struct kprobe *p) /* > > > * 3. load instruction to be emulated into relevant register, and > > > */ > > > - patch_imm32_load_insns(*p->ainsn.insn, buff + TMPL_INSN_IDX); > > > + temp = ppc_inst_read((struct ppc_inst *)p->ainsn.insn); > > > + patch_imm64_load_insns(ppc_inst_val(temp) | > > > + ((u64)ppc_inst_suffix(temp) << 32), > > > + 4, > > > > So now we are also using r4 ? Any explanation somewhere on the way it > > works ? This change seems unrelated to this patch, nothing in the > > description about it. Can we suddenly use a new register without problem ? > > Unless I missed something there is no change in register usage here that I > could see. patch_imm32_load_insns() was/is hardcoded to use register r4. Yes, that is right. > > - Alistair > >
- [PATCH v8 18/30] powerpc/xmon: Use a function for reading... Jordan Niethe
- [PATCH v8 19/30] powerpc/xmon: Move insertion of breakpoi... Jordan Niethe
- [PATCH v8 20/30] powerpc: Make test_translate_branch() in... Jordan Niethe
- [PATCH v8 21/30] powerpc: Enable Prefixed Instructions Jordan Niethe
- [PATCH v8 22/30] powerpc: Define new SRR1 bits for a futu... Jordan Niethe
- Re: [PATCH v8 22/30] powerpc: Define new SRR1 bits f... Jordan Niethe
- [PATCH v8 23/30] powerpc: Add prefixed instructions to in... Jordan Niethe
- Re: [PATCH v8 23/30] powerpc: Add prefixed instructi... Jordan Niethe
- Re: [PATCH v8 23/30] powerpc: Add prefixed instructi... Christophe Leroy
- Re: [PATCH v8 23/30] powerpc: Add prefixed instr... Alistair Popple
- Re: [PATCH v8 23/30] powerpc: Add prefixed i... Jordan Niethe
- Re: [PATCH v8 23/30] powerpc: Add prefixed i... Christophe Leroy
- Re: [PATCH v8 23/30] powerpc: Add prefixed instr... Jordan Niethe
- Re: [PATCH v8 23/30] powerpc: Add prefixed instr... Michael Ellerman
- Re: [PATCH v8 23/30] powerpc: Add prefixed i... Jordan Niethe
- [PATCH v8 22.5/30] powerpc/optprobes: Add register a... Michael Ellerman
- Re: [PATCH v8 22.5/30] powerpc/optprobes: Add re... Michael Ellerman
- [PATCH v8 24/30] powerpc: Test prefixed code patching Jordan Niethe
- Re: [PATCH v8 24/30] powerpc: Test prefixed code pat... Jordan Niethe
- [PATCH v8 25/30] powerpc: Test prefixed instructions in f... Jordan Niethe
- Re: [PATCH v8 25/30] powerpc: Test prefixed instruct... Jordan Niethe