From patchwork Fri Feb 8 12:52:49 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe Leroy X-Patchwork-Id: 1038661 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 43wxKR5g43z9sN9 for ; Sat, 9 Feb 2019 00:46:03 +1100 (AEDT) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=c-s.fr Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=c-s.fr header.i=@c-s.fr header.b="b+RNrtoI"; dkim-atps=neutral Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 43wxKR47qfzDqF7 for ; Sat, 9 Feb 2019 00:46:03 +1100 (AEDT) X-Original-To: linuxppc-dev@lists.ozlabs.org Delivered-To: linuxppc-dev@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=c-s.fr (client-ip=93.17.236.30; helo=pegase1.c-s.fr; envelope-from=christophe.leroy@c-s.fr; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=c-s.fr Authentication-Results: lists.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=c-s.fr header.i=@c-s.fr header.b="b+RNrtoI"; dkim-atps=neutral Received: from pegase1.c-s.fr (pegase1.c-s.fr [93.17.236.30]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 43ww860LsbzDqW3 for ; Fri, 8 Feb 2019 23:52:53 +1100 (AEDT) Received: from localhost (mailhub1-int [192.168.12.234]) by localhost (Postfix) with ESMTP id 43ww805yzcz9v0dM; Fri, 8 Feb 2019 13:52:48 +0100 (CET) Authentication-Results: localhost; dkim=pass reason="1024-bit key; insecure key" header.d=c-s.fr header.i=@c-s.fr header.b=b+RNrtoI; dkim-adsp=pass; dkim-atps=neutral X-Virus-Scanned: Debian amavisd-new at c-s.fr Received: from pegase1.c-s.fr ([192.168.12.234]) by localhost (pegase1.c-s.fr [192.168.12.234]) (amavisd-new, port 10024) with ESMTP id 3Hj8E3XDvFOq; Fri, 8 Feb 2019 13:52:48 +0100 (CET) Received: from messagerie.si.c-s.fr (messagerie.si.c-s.fr [192.168.25.192]) by pegase1.c-s.fr (Postfix) with ESMTP id 43ww804yZ0z9v0dH; Fri, 8 Feb 2019 13:52:48 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=c-s.fr; s=mail; t=1549630368; bh=77j0wGUnvUgbpHVhTJyROpdDSW+dwdzLxURZEG3jqb0=; h=In-Reply-To:References:From:Subject:To:Cc:Date:From; b=b+RNrtoIn2FEyqUD2dikw6CcErmTWeO8elSPxhty3NtPQIZYK8WLPwTRn+7nNBdAP xzD9G2tmJ3ZeiXcPr2GMUpBPSBRgdPyqUqnatz4gfQPaVPhTNIHDCihQHn0yJxdhpT gBGDDfwyohivI+xhXtj9Vi/LJXbiUfNmUv8TF0tA= Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 075C38B8D7; Fri, 8 Feb 2019 13:52:50 +0100 (CET) X-Virus-Scanned: amavisd-new at c-s.fr Received: from messagerie.si.c-s.fr ([127.0.0.1]) by localhost (messagerie.si.c-s.fr [127.0.0.1]) (amavisd-new, port 10023) with ESMTP id WyCDRsC37F5J; Fri, 8 Feb 2019 13:52:49 +0100 (CET) Received: from po16846vm.idsi0.si.c-s.fr (po15451.idsi0.si.c-s.fr [172.25.231.2]) by messagerie.si.c-s.fr (Postfix) with ESMTP id E2DB08B756; Fri, 8 Feb 2019 13:52:49 +0100 (CET) Received: by po16846vm.idsi0.si.c-s.fr (Postfix, from userid 0) id A6F46653E8; Fri, 8 Feb 2019 12:52:49 +0000 (UTC) Message-Id: In-Reply-To: References: From: Christophe Leroy Subject: [RFC PATCH v1 16/16] powerpc/32: don't do syscall stuff in transfer_to_handler on non BOOKE To: Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman , Nicholas Piggin Date: Fri, 8 Feb 2019 12:52:49 +0000 (UTC) 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: linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Sender: "Linuxppc-dev" As syscalls are now handled via a fast entry path, syscall related actions can be removed from the generic transfer_to_handler path. Signed-off-by: Christophe Leroy --- arch/powerpc/kernel/entry_32.S | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/arch/powerpc/kernel/entry_32.S b/arch/powerpc/kernel/entry_32.S index 0927d5ff1e79..85f1fc88c237 100644 --- a/arch/powerpc/kernel/entry_32.S +++ b/arch/powerpc/kernel/entry_32.S @@ -211,7 +211,9 @@ transfer_to_handler_cont: */ tophys(r12, r1) lwz r12,_MSR(r12) +#ifdef CONFIG_BOOKE /* to be removed once BOOKE uses fast syscall entry */ xor r12,r10,r12 +#endif andi. r12,r12,MSR_EE bne 1f @@ -252,8 +254,10 @@ reenable_mmu: * the rest is restored from the exception frame. */ +#ifdef CONFIG_BOOKE /* to be removed once BOOKE uses fast syscall entry */ /* Are we enabling or disabling interrupts ? */ andi. r0,r10,MSR_EE +#endif stwu r1,-32(r1) stw r9,8(r1) @@ -262,7 +266,9 @@ reenable_mmu: stw r4,20(r1) stw r5,24(r1) +#ifdef CONFIG_BOOKE /* to be removed once BOOKE uses fast syscall entry */ bne- 0f +#endif /* If we are disabling interrupts (normal case), simply log it with * lockdep @@ -282,6 +288,7 @@ reenable_mmu: mtlr r9 bctr /* jump to handler */ +#ifdef CONFIG_BOOKE /* to be removed once BOOKE uses fast syscall entry */ /* If we are enabling interrupt, this is a syscall. They shouldn't * happen while interrupts are disabled, so let's do a warning here. */ @@ -294,6 +301,7 @@ reenable_mmu: ori r10,r10,MSR_EE mtmsr r10 b 2b +#endif #endif /* CONFIG_TRACE_IRQFLAGS */ #if defined (CONFIG_PPC_BOOK3S_32) || defined(CONFIG_E500)