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.1 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, 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 2093 invoked from network); 23 Jul 2020 10:06:37 -0000 Received: from mother.openwall.net (195.42.179.200) by inbox.vuxu.org with ESMTPUTF8; 23 Jul 2020 10:06:37 -0000 Received: (qmail 3423 invoked by uid 550); 23 Jul 2020 10:06:33 -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 15796 invoked from network); 23 Jul 2020 06:48:07 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ellerman.id.au; s=201909; t=1595486873; bh=OeNPhpHvBcuXZex2aPYrGLTVDAkNiyf0rppWSgiCxS8=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=HohM+0bPBvgVW9/HLN4IMf5yi02AnIfVZnPyIdTtAqHC444cFOH1CKBqWpDM7Lwon NsM2R52CvAiwEd0oX+42uRFpfb/YABuNwOZBc3DeK4/+VbhCdDG6tHlBPeBneiYZuW x/sjp2Pc9GDKywfRjjOwgwst4SPVzzgNXME3MASoNfD6aqfhLT8wAtukHrEuE6y5h5 0AOqS5iR7BzgP5uZOc2BfOKaLT4d9hdVadOEuqIlPGilDO/5G5Z+CFWTi+jic2wAc3 oZ6pwqxKCRUOOvrVii1xzFbG1V85GZ0g85dphJPcJZYxt2e93/P/e/b5BBlJGk5abE SUl2R+mpqXtVQ== From: Michael Ellerman To: Nicholas Piggin , linuxppc-dev@lists.ozlabs.org Cc: libc-dev@lists.llvm.org, musl@lists.openwall.com, Nicholas Piggin , linux-api@vger.kernel.org In-Reply-To: <20200611081203.995112-3-npiggin@gmail.com> References: <20200611081203.995112-1-npiggin@gmail.com> <20200611081203.995112-3-npiggin@gmail.com> Date: Thu, 23 Jul 2020 16:47:51 +1000 Message-ID: <871rl2ralk.fsf@mpe.ellerman.id.au> MIME-Version: 1.0 Content-Type: text/plain Subject: [musl] Re: [PATCH 2/2] powerpc/64s: system call support for scv/rfscv instructions Nicholas Piggin writes: > diff --git a/arch/powerpc/include/asm/ppc-opcode.h b/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, struct ppc_inst instr) > regs->msr = MSR_KERNEL; > return 1; > > + case SYSCALL_VECTORED_0: /* scv 0 */ > + regs->gpr[9] = regs->gpr[13]; > + regs->gpr[10] = MSR_KERNEL; > + regs->gpr[11] = regs->nip + 4; > + regs->gpr[12] = regs->msr & MSR_MASK; > + regs->gpr[13] = (unsigned long) get_paca(); > + regs->nip = (unsigned long) &system_call_vectored_emulate; > + regs->msr = MSR_KERNEL; > + return 1; > + This broke the ppc64e build: ld: arch/powerpc/lib/sstep.o:(.toc+0x0): undefined reference to `system_call_vectored_emulate' make[1]: *** [/home/michael/linux/Makefile:1139: vmlinux] Error 1 I wrapped it in #ifdef CONFIG_PPC64_BOOK3S. cheers