From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.3 required=5.0 tests=MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 15635 invoked from network); 23 Jul 2020 16:47:15 -0000 Received: from mother.openwall.net (195.42.179.200) by inbox.vuxu.org with ESMTPUTF8; 23 Jul 2020 16:47:15 -0000 Received: (qmail 7348 invoked by uid 550); 23 Jul 2020 16:47:10 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Reply-To: musl@lists.openwall.com Received: (qmail 7318 invoked from network); 23 Jul 2020 16:47:10 -0000 X-Virus-Scanned: Debian amavisd-new at c-s.fr Date: Thu, 23 Jul 2020 18:48:14 +0200 Message-ID: <20200723184814.Horde.pk5BO9iFqyGX5D4TW5wqmg1@messagerie.si.c-s.fr> From: Christophe Leroy To: Michael Ellerman Cc: linux-api@vger.kernel.org, musl@lists.openwall.com, libc-dev@lists.llvm.org, linuxppc-dev@lists.ozlabs.org, Nicholas Piggin References: <20200611081203.995112-1-npiggin@gmail.com> <20200611081203.995112-3-npiggin@gmail.com> <871rl2ralk.fsf@mpe.ellerman.id.au> In-Reply-To: <871rl2ralk.fsf@mpe.ellerman.id.au> User-Agent: Internet Messaging Program (IMP) H5 (6.2.3) Content-Type: text/plain; charset=UTF-8; format=flowed; DelSp=Yes MIME-Version: 1.0 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Subject: [musl] Re: [PATCH 2/2] powerpc/64s: system call support for scv/rfscv instructions Michael Ellerman a =C3=A9crit=C2=A0: > Nicholas Piggin writes: >> diff --git a/arch/powerpc/include/asm/ppc-opcode.h=20=20 >>=20b/arch/powerpc/include/asm/ppc-opcode.h >> index 2a39c716c343..b2bdc4de1292 100644 >> --- a/arch/powerpc/include/asm/ppc-opcode.h >> +++ b/arch/powerpc/include/asm/ppc-opcode.h >> @@ -257,6 +257,7 @@ >> #define PPC_INST_MFVSRD 0x7c000066 >> #define PPC_INST_MTVSRD 0x7c000166 >> #define PPC_INST_SC 0x44000002 >> +#define PPC_INST_SCV 0x44000001 > ... >> @@ -411,6 +412,7 @@ > ... >> +#define __PPC_LEV(l) (((l) & 0x7f) << 5) > > These conflicted and didn't seem to be used so I dropped them. > >> diff --git a/arch/powerpc/lib/sstep.c b/arch/powerpc/lib/sstep.c >> index 5abe98216dc2..161bfccbc309 100644 >> --- a/arch/powerpc/lib/sstep.c >> +++ b/arch/powerpc/lib/sstep.c >> @@ -3378,6 +3382,16 @@ int emulate_step(struct pt_regs *regs,=20=20 >>=20struct ppc_inst instr) >> regs->msr =3D MSR_KERNEL; >> return 1; >> >> + case SYSCALL_VECTORED_0: /* scv 0 */ >> + regs->gpr[9] =3D regs->gpr[13]; >> + regs->gpr[10] =3D MSR_KERNEL; >> + regs->gpr[11] =3D regs->nip + 4; >> + regs->gpr[12] =3D regs->msr & MSR_MASK; >> + regs->gpr[13] =3D (unsigned long) get_paca(); >> + regs->nip =3D (unsigned long) &system_call_vectored_emulate; >> + regs->msr =3D MSR_KERNEL; >> + return 1; >> + > > This broke the ppc64e build: > > ld: arch/powerpc/lib/sstep.o:(.toc+0x0): undefined reference to=20=20 >=20`system_call_vectored_emulate' > make[1]: *** [/home/michael/linux/Makefile:1139: vmlinux] Error 1 > > I wrapped it in #ifdef CONFIG_PPC64_BOOK3S. You mean CONFIG_PPC_BOOK3S_64 ? Christophe > > cheers