Re: [RFC PATCH 1/4] powerpc: Optimize register usage for esr register

2021-08-06 Thread Segher Boessenkool
On Fri, Aug 06, 2021 at 04:53:14PM +1000, Michael Ellerman wrote: > But I'm not sure about the use of anonymous unions in UAPI headers. Old > compilers don't support them, so there's a risk of breakage. More precisely, it exists only since C11, so even with all not-so-ancient compilers it will not

Re: [RFC PATCH 1/4] powerpc: Optimize register usage for esr register

2021-08-06 Thread Xiongwei Song
On Fri, Aug 6, 2021 at 3:32 PM Christophe Leroy wrote: > > > > Le 06/08/2021 à 05:16, Xiongwei Song a écrit : > > On Thu, Aug 5, 2021 at 6:06 PM Christophe Leroy > > wrote: > >> > >> > >> > >> Le 26/07/2021 à 16:30, sxwj...@me.com a écrit : > >>> From: Xiongwei Song > >>> > >>> Create an anonymo

Re: [RFC PATCH 1/4] powerpc: Optimize register usage for esr register

2021-08-06 Thread Xiongwei Song
On Fri, Aug 6, 2021 at 2:53 PM Michael Ellerman wrote: > > sxwj...@me.com writes: > > From: Xiongwei Song > > > > Create an anonymous union for dsisr and esr regsiters, we can reference > > esr to get the exception detail when CONFIG_4xx=y or CONFIG_BOOKE=y. > > Otherwise, reference dsisr. This m

Re: [RFC PATCH 1/4] powerpc: Optimize register usage for esr register

2021-08-06 Thread Christophe Leroy
Le 06/08/2021 à 05:16, Xiongwei Song a écrit : On Thu, Aug 5, 2021 at 6:06 PM Christophe Leroy wrote: Le 26/07/2021 à 16:30, sxwj...@me.com a écrit : From: Xiongwei Song Create an anonymous union for dsisr and esr regsiters, we can reference esr to get the exception detail when CONFIG_

Re: [RFC PATCH 1/4] powerpc: Optimize register usage for esr register

2021-08-05 Thread Michael Ellerman
sxwj...@me.com writes: > From: Xiongwei Song > > Create an anonymous union for dsisr and esr regsiters, we can reference > esr to get the exception detail when CONFIG_4xx=y or CONFIG_BOOKE=y. > Otherwise, reference dsisr. This makes code more clear. > > Signed-off-by: Xiongwei Song > --- > arch/

Re: [RFC PATCH 1/4] powerpc: Optimize register usage for esr register

2021-08-05 Thread Xiongwei Song
On Thu, Aug 5, 2021 at 6:06 PM Christophe Leroy wrote: > > > > Le 26/07/2021 à 16:30, sxwj...@me.com a écrit : > > From: Xiongwei Song > > > > Create an anonymous union for dsisr and esr regsiters, we can reference > > esr to get the exception detail when CONFIG_4xx=y or CONFIG_BOOKE=y. > > Other

Re: [RFC PATCH 1/4] powerpc: Optimize register usage for esr register

2021-08-05 Thread Christophe Leroy
Le 26/07/2021 à 16:30, sxwj...@me.com a écrit : From: Xiongwei Song Create an anonymous union for dsisr and esr regsiters, we can reference esr to get the exception detail when CONFIG_4xx=y or CONFIG_BOOKE=y. Otherwise, reference dsisr. This makes code more clear. I'm not sure it is worth

[RFC PATCH 1/4] powerpc: Optimize register usage for esr register

2021-07-26 Thread sxwjean
From: Xiongwei Song Create an anonymous union for dsisr and esr regsiters, we can reference esr to get the exception detail when CONFIG_4xx=y or CONFIG_BOOKE=y. Otherwise, reference dsisr. This makes code more clear. Signed-off-by: Xiongwei Song --- arch/powerpc/include/asm/ptrace.h |