Re: [PATCH v3 1/6] powerpc/code-patching: Implement generic text patching function

2022-10-06 Thread Benjamin Gray
On Thu, 2022-10-06 at 09:19 +, Christophe Leroy wrote: > > > Le 06/10/2022 à 05:36, Benjamin Gray a écrit : > > On Wed, 2022-10-05 at 17:55 +, Christophe Leroy wrote: > > > I'm on business trip this week so I can't test it on hardware, > > > but > > > the > > > generated code looks horrid

Re: [PATCH v3 1/6] powerpc/code-patching: Implement generic text patching function

2022-10-06 Thread Christophe Leroy
Le 06/10/2022 à 05:36, Benjamin Gray a écrit : > On Wed, 2022-10-05 at 17:55 +, Christophe Leroy wrote: >> I'm on business trip this week so I can't test it on hardware, but >> the >> generated code looks horrid and sub-optimal, with a stack frame and >> so >> many registers saved into it. Th

Re: [PATCH v3 1/6] powerpc/code-patching: Implement generic text patching function

2022-10-05 Thread Benjamin Gray
On Wed, 2022-10-05 at 17:55 +, Christophe Leroy wrote: > I'm on business trip this week so I can't test it on hardware, but > the > generated code looks horrid and sub-optimal, with a stack frame and > so > many registers saved into it. That's mpc885_ads_defconfig built with > GCC > 12, with

Re: [PATCH v3 1/6] powerpc/code-patching: Implement generic text patching function

2022-10-05 Thread Christophe Leroy
Hi, Le 05/10/2022 à 07:32, Benjamin Gray a écrit : > Adds a generic text patching mechanism for patches of size int or long > bytes. > > The patch_instruction function is reimplemented in terms of this > more generic function. This generic implementation allows patching of > arbitrary long data,

[PATCH v3 1/6] powerpc/code-patching: Implement generic text patching function

2022-10-04 Thread Benjamin Gray
Adds a generic text patching mechanism for patches of size int or long bytes. The patch_instruction function is reimplemented in terms of this more generic function. This generic implementation allows patching of arbitrary long data, such as pointers on 64-bit. On 32-bit patch_int is marked noinl