Re: [PATCH] powerpc: Fixed duplicate copying in the early boot.

2024-06-18 Thread Segher Boessenkool
On Tue, Jun 18, 2024 at 10:12:54PM +1000, Michael Ellerman wrote: > Segher Boessenkool writes: > > On Mon, Jun 17, 2024 at 10:35:09AM +0800, Jinglin Wen wrote: > >> + cmplwi cr0,r4,0/* runtime base addr is zero */ > > > > Just write > >cmpwi r4,0 > > > > cr0 is the default, also impl

Re: [PATCH] powerpc: Fixed duplicate copying in the early boot.

2024-06-18 Thread Michael Ellerman
Segher Boessenkool writes: > Hi! > > On Mon, Jun 17, 2024 at 10:35:09AM +0800, Jinglin Wen wrote: >> +cmplwi cr0,r4,0/* runtime base addr is zero */ > > Just write >cmpwi r4,0 > > cr0 is the default, also implicit in many other instructions, please > don't clutter the source code.

Re: [PATCH] powerpc: Fixed duplicate copying in the early boot.

2024-06-18 Thread Jinglin Wen
Hi Segher Boessenkool, Segher Boessenkool writes: > Hi! > > On Mon, Jun 17, 2024 at 10:35:09AM +0800, Jinglin Wen wrote: > > + cmplwi cr0,r4,0/* runtime base addr is zero */ > > Just write >cmpwi r4,0 > > cr0 is the default, also implicit in many other instructions, please > don

Re: [PATCH] powerpc: Fixed duplicate copying in the early boot.

2024-06-18 Thread Jinglin Wen
Hi Michael Ellerman, Michael Ellerman writes: > Jinglin Wen writes: > > According to the code logic, when the kernel is loaded to address 0, > > no copying operation should be performed, but it is currently being > > done. > > > > This patch fixes the issue where the kernel code was incorrectly

Re: [PATCH] powerpc: Fixed duplicate copying in the early boot.

2024-06-17 Thread Segher Boessenkool
Hi! On Mon, Jun 17, 2024 at 10:35:09AM +0800, Jinglin Wen wrote: > + cmplwi cr0,r4,0/* runtime base addr is zero */ Just write cmpwi r4,0 cr0 is the default, also implicit in many other instructions, please don't clutter the source code. All the extra stuff makes you miss the th

Re: [PATCH] powerpc: Fixed duplicate copying in the early boot.

2024-06-17 Thread Michael Ellerman
Jinglin Wen writes: > According to the code logic, when the kernel is loaded to address 0, > no copying operation should be performed, but it is currently being > done. > > This patch fixes the issue where the kernel code was incorrectly > duplicated to address 0 when booting from address 0. > > S

[PATCH] powerpc: Fixed duplicate copying in the early boot.

2024-06-16 Thread Jinglin Wen
According to the code logic, when the kernel is loaded to address 0, no copying operation should be performed, but it is currently being done. This patch fixes the issue where the kernel code was incorrectly duplicated to address 0 when booting from address 0. Signed-off-by: Jinglin Wen --- arc