From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id BD111C433EF for ; Tue, 18 Jan 2022 00:20:18 +0000 (UTC) Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4Jd8YY08Lmz3bP9 for ; Tue, 18 Jan 2022 11:20:17 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=BuWgcwr4; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gmail.com (client-ip=2607:f8b0:4864:20::92a; helo=mail-ua1-x92a.google.com; envelope-from=michael.heltne@gmail.com; receiver=) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=BuWgcwr4; dkim-atps=neutral Received: from mail-ua1-x92a.google.com (mail-ua1-x92a.google.com [IPv6:2607:f8b0:4864:20::92a]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4JcqFb4j0Bz2xYK for ; Mon, 17 Jan 2022 22:20:17 +1100 (AEDT) Received: by mail-ua1-x92a.google.com with SMTP id u6so29878485uaq.0 for ; Mon, 17 Jan 2022 03:20:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=7+0QLt/2KMcCjhN9/2zxd8eYhuPBPa8CitQhgDorhuU=; b=BuWgcwr4j9KKhEf9kSqCfc0E5YE1q7l8ndqzZHWtBJEqW5ry1UHlzYJ6wrc+OXfSBz 3QGcKUiTV/aGaGneV5h8yEOVHo+MlJb5oMTCKD5tP0MeO2qbiwHj9p4VN9qxvlzfi+uc csmAU4rkfOz0zzqQW2jDUOECL+Hl5dHN2Y8xu/TdgCAW8gt35X4KTJB7GEqleSsYFNDu XVbA8CSklKmUtH3fjAmUAvlyHBt/MM5VeOFSfoY6JHobhYyicp6voFE4dfSOYozu1GQ3 9WAURCEmtn9u2FrUpkUtOSm6NDM+cTn7iM5fvm/nGgvxldAhVYAB5Jn/wvW9+BoJjhcC tHfg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=7+0QLt/2KMcCjhN9/2zxd8eYhuPBPa8CitQhgDorhuU=; b=QOKoMpNobRl10AB8wLg5kgvwTCoGw6eVKXYWtqwBRAR4nRdHNbr7m2whrRU8SYWmbq yjrdGCCk/Rykof/F8FvgNJa5u0UsglZoPC72m1gyEyfzZKa+tfxXoBmmxPty75aOfdqo UAdRhNYhzzv4EtvDXReS8/Fy4MyrSoITlLqnqMyQw+4XfM10wq/Np9EjQdiZwQqW/r1b Xsywy2UYuppZ7JPNs5dOcfyUQf9e5CxHqs97iBdDnf5aMENMM5Ybos+SmDypiFTnVn49 /n/Ys92VaCPWzB7/wWDNWiobhL1iFAy0oKsDUr+YWbg+4mSVs0UzgJAX+tHjC+MIIo/P MZSw== X-Gm-Message-State: AOAM531ZqGl3o6L+HuC65OuY+mk+QiwD9sYzEEZvPlTVykVkW1gskIAY g5fTifyg5V7gf/Q71AToG+og+5bXmIgXt1TKnV4= X-Google-Smtp-Source: ABdhPJyW/B74e5xytSTLKuEDOF7S9w6uUx7uCB6+QjoEMzuaNcQQ4B+z+fMb46IOhH1UzRB34lLNSUS0RoPd0n34jec= X-Received: by 2002:a67:d390:: with SMTP id b16mr6044019vsj.34.1642418413523; Mon, 17 Jan 2022 03:20:13 -0800 (PST) MIME-Version: 1.0 References: <3b039cad-be82-3376-144c-bdee09c7adbf@csgroup.eu> In-Reply-To: <3b039cad-be82-3376-144c-bdee09c7adbf@csgroup.eu> From: Mike Date: Mon, 17 Jan 2022 12:20:03 +0100 Message-ID: Subject: Re: [5.16.0] build error on unrecognized opcode: ptesync To: Christophe Leroy Content-Type: multipart/alternative; boundary="0000000000001c57d605d5c556af" X-Mailman-Approved-At: Tue, 18 Jan 2022 11:19:40 +1100 X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "open list:LINUX FOR POWERPC..." Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" --0000000000001c57d605d5c556af Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable It booted at least. I'll try your suggestions as soon as I can, I'm progressing slower than ever, concentration is somewhat lapse still.... Thanks. Best regards Michael On Tue, Jan 11, 2022, 10:51 Christophe Leroy wrote: > > > Le 11/01/2022 =C3=A0 10:32, Mike a =C3=A9crit : > > I managed to fix it in the end, patch attached, though i should have > > done a $(call cc-option-, -maltivec, -mabi=3Daltivec) in the > > arch/powerpc/mm/Makefile > > I wrongly assumed that the manual i had downloaded at 4.44am was for > > 32bit ppc only and found ptesync to be ppc64 only. > > > > binutils-2.37.50 - GNU assembler version 2.37.50 (powerpc-linux-gnu) > > using BFD version (GNU Binutils for Debian) 2.37.50.20220106 > > gcc version 11.2.0 (Debian 11.2.0-13) > > ld.lld is missing but with LLVM/CLANG and LD=3Dld.bfd > > arch/powerpc/kernel/vdso32/gettimeofday.S:72:8: > > error: unsupported directive '.stabs' .stabs > > "_restgpr_31_x:F-1",36,0,0,_restgpr_31_x; .globl _restgpr_31_x; > > _restgpr_31_x: > > > > Attached the config i'm using, and the debian config 5.15.0-2. It's > > still building. > > Ok, I tried with your config on my Fedora Core 35 where I have: > > powerpc64-linux-gnu-gcc (GCC) 11.2.1 20210728 (Red Hat Cross 11.2.1-1) > GNU ld version 2.37-3.fc35 > > From packages: > - binutils-powerpc64-linux-gnu-2.37-3.fc35.x86_64 > - gcc-powerpc64-linux-gnu-11.2.1-1.fc35.x86_64 > > And I don't have the problems you mention, so it must be something > special with Debian GCC. > > > Your change regarding ptesync is probably OK but is fragile I think, > because for instance there is also a 'ptesync' in > arch/powerpc/mm/pageattr.c and probably many other places. > > Also please prefer CONFIG_PPC64 to __powerpc64__ > > Regarding the DSSALL issue, the following commit will probably help: > > d51f86cfd8e3 ("powerpc/mm: Switch obsolete dssall to .long") > > Regarding the .stabs with LLVM there is a patch at > > https://patchwork.ozlabs.org/project/linuxppc-dev/patch/68932ec2ba6b868d3= 5006b96e90f0890f3da3c05.1638273868.git.christophe.leroy@csgroup.eu/ > > Thanks > Christophe > > > > > > > Cheers > > Michael > > > > On Tue, 11 Jan 2022 at 07:20, Christophe Leroy > > wrote: > >> > >> > >> > >> Le 10/01/2022 =C3=A0 13:32, Mike a =C3=A9crit : > >>> Hey, so I originally sat down to compile the fast headers V2 patch, b= ut > >>> quickly discovered other things at play, and grabbed 5.16.0 a few hou= rs > >>> after it lifted off, arch/powerpc/mm/mmu_context.c I had to > >>> specifically say had to include -maltivec or it barfed on a 'dssall', > >>> I'm fine with that, I've spent years in kernel land, I can deal with > >>> that, then came arch/powerpc/lib/step.c with the ptesync. This seems > >>> like a totally normal instruction that shouldn't need any extra flags > or > >>> anything, yet the assembler throws up, and no flag I can think of fix= es > >>> it. This is a G4 7447. I reverted back to the Debian 5.15. defconfig > >>> before dropping this mail as I had tweaked my config to be more G4. > >>> > >> > >> Hi Mike, > >> > >> Can you provide a bit more details about your setup and config ? > >> > >> Are you using GCC or LLVM ? > >> What version of GCC and BINUTILS or what version of LLVM ? > >> > >> What is DEBIAN defconfig ? Does it correspond to one of the standard > >> mainline kernel defconfigs ? If not can you provide it ? > >> > >> Thanks > >> Christophe --0000000000001c57d605d5c556af Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
It booted at least. I'll try your suggestions as soon= as I can, I'm progressing slower than ever, concentration is somewhat = lapse still....=C2=A0

Thanks.= =C2=A0
Best regards
Michael

On Tue, Jan 11, 2022, 10:51 Christophe Leroy <christophe.le= roy@csgroup.eu> wrote:


Le 11/01/2022 =C3=A0 10:32, Mike a =C3=A9crit=C2=A0:
> I managed to fix it in the end, patch attached, though i should have > done a $(call cc-option-, -maltivec, -mabi=3Daltivec) in the
> arch/powerpc/mm/Makefile
>=C2=A0 =C2=A0I wrongly assumed that the manual i had downloaded at 4.44= am was for
> 32bit ppc only and found ptesync to be ppc64 only.
>
> binutils-2.37.50 - GNU assembler version 2.37.50 (powerpc-linux-gnu) > using BFD version (GNU Binutils for Debian) 2.37.50.20220106
> gcc version 11.2.0 (Debian 11.2.0-13)
> ld.lld is missing but with LLVM/CLANG and LD=3Dld.bfd
> arch/powerpc/kernel/vdso32/gettimeofday.S:72:8:
> error: unsupported directive '.stabs'=C2=A0 =C2=A0 .stabs
> "_restgpr_31_x:F-1",36,0,0,_restgpr_31_x; .globl _restgpr_31= _x;
> _restgpr_31_x:
>
> Attached the config i'm using, and the debian config 5.15.0-2. It&= #39;s
> still building.

Ok, I tried with your config on my Fedora Core 35 where I have:

powerpc64-linux-gnu-gcc (GCC) 11.2.1 20210728 (Red Hat Cross 11.2.1-1)
GNU ld version 2.37-3.fc35

=C2=A0From packages:
- binutils-powerpc64-linux-gnu-2.37-3.fc35.x86_64
- gcc-powerpc64-linux-gnu-11.2.1-1.fc35.x86_64

And I don't have the problems you mention, so it must be something
special with Debian GCC.


Your change regarding ptesync is probably OK but is fragile I think,
because for instance there is also a 'ptesync' in
arch/powerpc/mm/pageattr.c and probably many other places.

Also please prefer CONFIG_PPC64 to __powerpc64__

Regarding the DSSALL issue, the following commit will probably help:

d51f86cfd8e3 ("powerpc/mm: Switch obsolete dssall to .long")

Regarding the .stabs with LLVM there is a patch at
https://patch= work.ozlabs.org/project/linuxppc-dev/patch/68932ec2ba6b868d35006b96e90f0890= f3da3c05.1638273868.git.christophe.leroy@csgroup.eu/

Thanks
Christophe



>
> Cheers
> Michael
>
> On Tue, 11 Jan 2022 at 07:20, Christophe Leroy
> <christophe.leroy@csgroup.eu> wrote:
>>
>>
>>
>> Le 10/01/2022 =C3=A0 13:32, Mike a =C3=A9crit :
>>> Hey, so I originally sat down to compile the fast headers V2 p= atch, but
>>> quickly discovered other things at play, and grabbed 5.16.0 a = few hours
>>> after it lifted off,=C2=A0 arch/powerpc/mm/mmu_context.c I had= to
>>> specifically say had to include -maltivec or it barfed on a &#= 39;dssall',
>>> I'm fine with that, I've spent years in kernel land, I= can deal with
>>> that, then came arch/powerpc/lib/step.c with the ptesync. This= seems
>>> like a totally normal instruction that shouldn't need any = extra flags or
>>> anything, yet the assembler throws up, and no flag I can think= of fixes
>>> it. This is a G4 7447. I reverted back to the Debian 5.15. def= config
>>> before dropping this mail as I had tweaked my config to be mor= e G4.
>>>
>>
>> Hi Mike,
>>
>> Can you provide a bit more details about your setup and config ? >>
>> Are you using GCC or LLVM ?
>> What version of GCC and BINUTILS or what version of LLVM ?
>>
>> What is DEBIAN defconfig ? Does it correspond to one of the standa= rd
>> mainline kernel defconfigs ? If not can you provide it ?
>>
>> Thanks
>> Christophe
--0000000000001c57d605d5c556af--