[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Kernel build fails



I remembered something about 'lwsync' i read about it in 2013
suddenly, and came to the following proposal to deal with remove the
PPC64 requirement for BARRIER_LWSYNC, but i've literally really just
started poking about the kernel side of powerpc and reading around.
But i do remember the penalty in using 'sync' in place of 'lwsync'
https://gcc.gnu.org/legacy-ml/gcc-patches/2006-11/msg01238.html
https://gcc.gnu.org/legacy-ml/gcc-patches/2012-07/msg01062.html

So something like this
diff --git a/media/thread/12fd50d6-d14c-42af-ad1d-a595e5f080cd/dev/linux-main/linux/arch/powerpc/lib/sstep.c
b/home/thread/dev/linus/linux/arch/powerpc/lib/sstep.c
index 4ffd679..39861d3 100644
--- a/media/thread/12fd50d6-d14c-42af-ad1d-a595e5f080cd/dev/linux-main/linux/arch/powerpc/lib/sstep.c
+++ b/home/thread/dev/linus/linux/arch/powerpc/lib/sstep.c
@@ -3265,7 +3265,11 @@ void emulate_update_regs(struct pt_regs *regs,
struct instruction_op *op)
                        eieio();
                        break;
                case BARRIER_LWSYNC:
+#if defined (CONFIG_40x || CONFIG_44x || CONFIG_E500 ||
CONFIG_PPA8548 || CONFIG_TQM8548 || CONFIG_MPC8540_ADS ||
CONFIG_PPC_BOOK3S_603)
+                       asm volatile("sync" : : : "memory");
+#else
                        asm volatile("lwsync" : : : "memory");
+#endif
                        break;
 #ifdef CONFIG_PPC64
                case BARRIER_PTESYNC:


On Sun, 23 Jan 2022 at 14:50, Mike <michael.heltne@gmail.com> wrote:
>
> I've sent in a patch with my remaining concerns attached to the mailing lists and set up a linux-next branch finally.
> https://github.com/threader/linux/tree/master-build-ppc
>
> In regards to asm/io.h:
> ---
> Will there come a mail saying this broke the PPC6'ish based CPU
> someone made in their garage? And lwesync is a valid PPC32
> instruction, should i just follow the example above where
> BARRIER_LWESYNC is PPC64 only?
> ---
>
> -Michael
> On Sat, Jan 22, 2022, 10:48 Mike <michael.heltne@gmail.com> wrote:
>>
>> It should be just CONFIG_POWER6_CPU unless ppc64 also require this?iv
>>
>> -Mike
>>
>> On Sat, Jan 22, 2022, 10:36 Mike <michael.heltne@gmail.com> wrote:
>>>
>>> I think I need to add a || CONFIG_POWER6_CPU to that 'stbcix' condition..
>>>
>>> -Mike
>>>
>>>
>>>
>>> On Sat, Jan 22, 2022, 09:42 John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de> wrote:
>>>>
>>>> Hello Mike!
>>>>
>>>> On 1/21/22 23:07, Mike wrote:
>>>> > Waiting for git to do it's thing, but do we need a voodoo priest(es)
>>>> > here? The attached patch is building.
>>>>
>>>> I will have a look at this issue next week myself. We need to make sure
>>>> that it not only fixes 32-bit PowerPC but also 64-bit PowerPC big-endian.
>>>>
>>>> Also, test builds of Debian the packages are necessary as well.
>>>>
>>>> Adrian
>>>>
>>>> --
>>>>  .''`.  John Paul Adrian Glaubitz
>>>> : :' :  Debian Developer - glaubitz@debian.org
>>>> `. `'   Freie Universitaet Berlin - glaubitz@physik.fu-berlin.de
>>>>   `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913
>>>>


Reply to: