From patchwork Sat Oct 7 02:28:12 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sukadev Bhattiprolu X-Patchwork-Id: 822897 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.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3y89qq0XF5z9t3t for ; Sat, 7 Oct 2017 13:46:15 +1100 (AEDT) Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 3y89qp6q0jzDsjG for ; Sat, 7 Oct 2017 13:46:14 +1100 (AEDT) X-Original-To: linuxppc-dev@lists.ozlabs.org Delivered-To: linuxppc-dev@lists.ozlabs.org Received: from ozlabs.org (ozlabs.org [IPv6:2401:3900:2:1::2]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3y89Rm5RWxzDqnQ for ; Sat, 7 Oct 2017 13:28:52 +1100 (AEDT) Received: from ozlabs.org (ozlabs.org [IPv6:2401:3900:2:1::2]) by bilbo.ozlabs.org (Postfix) with ESMTP id 3y89Rm1X5Zz8vjG for ; Sat, 7 Oct 2017 13:28:52 +1100 (AEDT) Received: by ozlabs.org (Postfix) id 3y89Rm0V6zz9t88; Sat, 7 Oct 2017 13:28:52 +1100 (AEDT) Delivered-To: linuxppc-dev@ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=linux.vnet.ibm.com (client-ip=148.163.158.5; helo=mx0a-001b2d01.pphosted.com; envelope-from=sukadev@linux.vnet.ibm.com; receiver=) Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3y89Rl0ql4z9t84 for ; Sat, 7 Oct 2017 13:28:50 +1100 (AEDT) Received: from pps.filterd (m0098417.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id v972OcpL039663 for ; Fri, 6 Oct 2017 22:28:48 -0400 Received: from e38.co.us.ibm.com (e38.co.us.ibm.com [32.97.110.159]) by mx0a-001b2d01.pphosted.com with ESMTP id 2deehw0pb9-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Fri, 06 Oct 2017 22:28:48 -0400 Received: from localhost by e38.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 6 Oct 2017 20:28:48 -0600 Received: from b03cxnp07029.gho.boulder.ibm.com (9.17.130.16) by e38.co.us.ibm.com (192.168.1.138) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Fri, 6 Oct 2017 20:28:44 -0600 Received: from b03ledav004.gho.boulder.ibm.com (b03ledav004.gho.boulder.ibm.com [9.17.130.235]) by b03cxnp07029.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id v972SiZ29306444; Fri, 6 Oct 2017 19:28:44 -0700 Received: from b03ledav004.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 3F9E678041; Fri, 6 Oct 2017 20:28:44 -0600 (MDT) Received: from suka-w540.usor.ibm.com (unknown [9.70.94.25]) by b03ledav004.gho.boulder.ibm.com (Postfix) with ESMTP id A1B467803F; Fri, 6 Oct 2017 20:28:43 -0600 (MDT) From: Sukadev Bhattiprolu To: Michael Ellerman Subject: [PATCH v2 12/18] powerpc: have copy depend on CONFIG_BOOK3S_64 Date: Fri, 6 Oct 2017 19:28:12 -0700 X-Mailer: git-send-email 2.7.4 In-Reply-To: <1507343298-27496-1-git-send-email-sukadev@linux.vnet.ibm.com> References: <1507343298-27496-1-git-send-email-sukadev@linux.vnet.ibm.com> X-TM-AS-GCONF: 00 x-cbid: 17100702-0028-0000-0000-000008773276 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00007853; HX=3.00000241; KW=3.00000007; PH=3.00000004; SC=3.00000235; SDB=6.00927531; UDB=6.00466725; IPR=6.00707787; BA=6.00005623; NDR=6.00000001; ZLA=6.00000005; ZF=6.00000009; ZB=6.00000000; ZP=6.00000000; ZH=6.00000000; ZU=6.00000002; MB=3.00017431; XFM=3.00000015; UTC=2017-10-07 02:28:47 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17100702-0029-0000-0000-000037D6CF88 Message-Id: <1507343298-27496-13-git-send-email-sukadev@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2017-10-07_01:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1707230000 definitions=main-1710070033 X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.24 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: mikey@neuling.org, linux-kernel@vger.kernel.org, nicholas.piggin@gmail.com, linuxppc-dev@ozlabs.org Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Sender: "Linuxppc-dev" Have the COPY/PASTE instructions depend on CONFIG_BOOK3S_64 rather than CONFIG_PPC_STD_MMU_64. Signed-off-by: Sukadev Bhattiprolu --- arch/powerpc/kernel/process.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c index a0c74bb..37ed60b 100644 --- a/arch/powerpc/kernel/process.c +++ b/arch/powerpc/kernel/process.c @@ -1215,10 +1215,14 @@ struct task_struct *__switch_to(struct task_struct *prev, batch = this_cpu_ptr(&ppc64_tlb_batch); batch->active = 1; } +#endif /* CONFIG_PPC_STD_MMU_64 */ if (current_thread_info()->task->thread.regs) { +#ifdef CONFIG_PPC_STD_MMU_64 restore_math(current_thread_info()->task->thread.regs); +#endif /* CONFIG_PPC_STD_MMU_64 */ +#ifdef CONFIG_PPC_BOOK3S_64 /* * The copy-paste buffer can only store into foreign real * addresses, so unprivileged processes can not see the @@ -1237,8 +1241,8 @@ struct task_struct *__switch_to(struct task_struct *prev, asm volatile(PPC_COPY(%0, %1) : : "r"(dummy_copy_buffer), "r"(0)); } +#endif /* CONFIG_PPC_BOOK3S_64 */ } -#endif /* CONFIG_PPC_STD_MMU_64 */ return last; }