From patchwork Thu Mar 9 00:45:39 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Herrenschmidt X-Patchwork-Id: 736796 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.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 3vdsHk6d0Jz9s8B for ; Thu, 9 Mar 2017 11:50:10 +1100 (AEDT) Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 3vdsHk5q59zDqXc for ; Thu, 9 Mar 2017 11:50:10 +1100 (AEDT) X-Original-To: skiboot@lists.ozlabs.org Delivered-To: skiboot@lists.ozlabs.org Received: from gate.crashing.org (gate.crashing.org [63.228.1.57]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3vdsHF03fWzDqXv for ; Thu, 9 Mar 2017 11:49:44 +1100 (AEDT) Received: from pasglop.ozlabs.ibm.com (localhost.localdomain [127.0.0.1]) by gate.crashing.org (8.14.1/8.13.8) with ESMTP id v290k2Di026078; Wed, 8 Mar 2017 18:46:11 -0600 From: Benjamin Herrenschmidt To: skiboot@lists.ozlabs.org Date: Thu, 9 Mar 2017 11:45:39 +1100 Message-Id: <20170309004543.16745-6-benh@kernel.crashing.org> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20170309004543.16745-1-benh@kernel.crashing.org> References: <20170309004543.16745-1-benh@kernel.crashing.org> Subject: [Skiboot] [PATCH 06/10] asm: Don't try to set LPCR:LPES1 on P8 and P9 X-BeenThere: skiboot@lists.ozlabs.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Mailing list for skiboot development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Skiboot" The bit doesn't exist Signed-off-by: Benjamin Herrenschmidt --- asm/head.S | 30 ++++++++++++++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) diff --git a/asm/head.S b/asm/head.S index 04eb959..23daa72 100644 --- a/asm/head.S +++ b/asm/head.S @@ -722,12 +722,38 @@ init_shared_sprs: .global init_replicated_sprs init_replicated_sprs: + mfspr %r3,SPR_PVR + srdi %r3,%r3,16 + cmpwi cr0,%r3,PVR_TYPE_P7 + beq 1f + cmpwi cr0,%r3,PVR_TYPE_P7P + beq 1f + cmpwi cr0,%r3,PVR_TYPE_P8E + beq 3f + cmpwi cr0,%r3,PVR_TYPE_P8 + beq 3f + cmpwi cr0,%r3,PVR_TYPE_P8NVL + beq 3f + cmpwi cr0,%r3,PVR_TYPE_P9 + beq 3f + /* Unsupported CPU type... what do we do ? */ + b 9f + +1: /* P7, P7+ */ /* LPCR: sane value */ LOAD_IMM64(%r3,0x0040000000000004) mtspr SPR_LPCR, %r3 + sync + isync + b 9f - /* XXX TODO: Add more */ - blr +3: /* P8, P8E, P9 */ + /* LPCR: sane value */ + LOAD_IMM64(%r3,0x0040000000000000) + mtspr SPR_LPCR, %r3 + sync + isync +9: blr .global enter_nap enter_nap: