From patchwork Sun May 21 13:15:49 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicholas Piggin X-Patchwork-Id: 765100 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 3wW2hr17fsz9s5L for ; Sun, 21 May 2017 23:30:04 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="trMyLFFW"; 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 3wW2hr03HhzDqhg for ; Sun, 21 May 2017 23:30:04 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="trMyLFFW"; dkim-atps=neutral X-Original-To: linuxppc-dev@lists.ozlabs.org Delivered-To: linuxppc-dev@lists.ozlabs.org Received: from mail-pf0-x243.google.com (mail-pf0-x243.google.com [IPv6:2607:f8b0:400e:c00::243]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3wW2PH0Cs0zDqLp for ; Sun, 21 May 2017 23:16:35 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="trMyLFFW"; dkim-atps=neutral Received: by mail-pf0-x243.google.com with SMTP id n23so14487093pfb.3 for ; Sun, 21 May 2017 06:16:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=S8fUNxnm+r/MaZ4i85P0BsRaeWHLS9OXP8sZBd/1gM8=; b=trMyLFFWXzWa26gkYF6s2nkslxctyRY3gEWnE6BZCQayDXkUBB3UAcNJvcowuhWLTE 4/d3ux8zIN1wIlbQKksTWTrHBi9oguOlauL5FQT0QQEF4/zF1PFyDcJ+l/LYr/pVY2gg YTyrZLO2A3wiBhqgttnSb24FsLOXk8cV/xOTij7jdj0ad/C0XNqVom6HTNFuAZxo3M0A gexjsG2fJ+qJOgoAQ3bs6Eutcg4xkVfWjnocxtOpnvUGvGP+WrlnmELwYCeYfEebOOKQ 4HhroCPoIpfEb+p0e5i3UoSlP6Lyc7kFZu2FMwdQzBFoNde3w3enBTDJRGpCVzDRdoU6 OH8g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=S8fUNxnm+r/MaZ4i85P0BsRaeWHLS9OXP8sZBd/1gM8=; b=n71zk7TKoARQmo4xQ/aWakNmVFWbBkIHMLG/MsOa4CYyuVRtxKKVi5nxo+FDqZt5nN ozJvjSnaWo3Dg3+jM/nBCcRNP8osvdsWw4BKR+8jHUonggq4fl/Bb9d0YOBx84fE18Dc +ZrkOz3QrVT38kxojTxgZgX71nwHb7rcPuDwJAYQ0xpUcP76Kjngj1c2tEjgIcCcaq9O VhtirBVJsg1o4rpmZr+EGq660rJcN2sivyhAwtz9BkvFuWZ+QnG9mZ0E4BIYHCquONuC hn6buZ04z2+o0bDk2XOLrNH3WM8y/vTOZGHjQ/5GjN8F4qqqIwFquWQyaluimVGdhSyp pWjg== X-Gm-Message-State: AODbwcCKL2CLP6ErcDlm9f4X4gOcufcayKVkuaca/y/PRF0zk/o+vA24 M304cESnzPjJrQ== X-Received: by 10.98.206.201 with SMTP id y192mr19643651pfg.60.1495372593421; Sun, 21 May 2017 06:16:33 -0700 (PDT) Received: from roar.ozlabs.ibm.com (149.45.218.139.dynamic.dsl.dv.iprimus.net.au. [139.218.45.149]) by smtp.gmail.com with ESMTPSA id x80sm26285428pff.105.2017.05.21.06.16.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 21 May 2017 06:16:32 -0700 (PDT) From: Nicholas Piggin To: linuxppc-dev@lists.ozlabs.org Subject: [PATCH 8/9] powerpc/64s: paca EX_R3 can be merged with EX_DAR Date: Sun, 21 May 2017 23:15:49 +1000 Message-Id: <20170521131550.25813-9-npiggin@gmail.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170521131550.25813-1-npiggin@gmail.com> References: <20170521131550.25813-1-npiggin@gmail.com> X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Nicholas Piggin Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Sender: "Linuxppc-dev" EX_R3 is used only for a small section of the bad stack handler. Merge it with EX_DAR. Signed-off-by: Nicholas Piggin --- arch/powerpc/include/asm/exception-64s.h | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/arch/powerpc/include/asm/exception-64s.h b/arch/powerpc/include/asm/exception-64s.h index ba03db14e1e8..aaee57f0e5ad 100644 --- a/arch/powerpc/include/asm/exception-64s.h +++ b/arch/powerpc/include/asm/exception-64s.h @@ -34,12 +34,11 @@ #define EX_DAR 40 #define EX_DSISR 48 #define EX_CCR 52 -#define EX_R3 56 -#define EX_CFAR 64 -#define EX_PPR 72 -#define EX_CTR 80 +#define EX_CFAR 56 +#define EX_PPR 64 +#define EX_CTR 72 -#define EX_SIZE 11 /* size in u64 units */ +#define EX_SIZE 10 /* size in u64 units */ /* * EX_LR is only used in EXSLB and where it does not overlap with EX_DAR @@ -49,6 +48,13 @@ */ #define EX_LR EX_DAR +/* + * EX_R3 is only used by the bad_stack handler. bad_stack reloads and + * saves DAR from SPRN_DAR, and EX_DAR is not used. So EX_R3 can overlap + * with EX_DAR. + */ +#define EX_R3 EX_DAR + #ifdef __ASSEMBLY__ /*