From patchwork Fri Feb 3 11:38:56 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicholas Piggin X-Patchwork-Id: 1736947 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ozlabs.org (client-ip=112.213.38.117; helo=lists.ozlabs.org; envelope-from=linuxppc-dev-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=JWnRZsCt; dkim-atps=neutral Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4P7YcP0WHyz23h0 for ; Fri, 3 Feb 2023 22:40:21 +1100 (AEDT) Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4P7YcN6k1bz3f8S for ; Fri, 3 Feb 2023 22:40:20 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=JWnRZsCt; dkim-atps=neutral X-Original-To: linuxppc-dev@lists.ozlabs.org Delivered-To: linuxppc-dev@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gmail.com (client-ip=2607:f8b0:4864:20::630; helo=mail-pl1-x630.google.com; envelope-from=npiggin@gmail.com; receiver=) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=JWnRZsCt; dkim-atps=neutral Received: from mail-pl1-x630.google.com (mail-pl1-x630.google.com [IPv6:2607:f8b0:4864:20::630]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4P7Yb305nPz3bjc for ; Fri, 3 Feb 2023 22:39:10 +1100 (AEDT) Received: by mail-pl1-x630.google.com with SMTP id u9so672108plf.3 for ; Fri, 03 Feb 2023 03:39:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Ma0wbLtCFYB5ylQTg157Oylqmn66Hh9pwai7hOvvLGY=; b=JWnRZsCtAfLoXF5irEYgp4viFfcf41LM4OJhhAiK/yrpeedNyogFWICLxY1fd3ke4m PQh2acM79oy706oVNkHGzVM67t2xnpVMVw/7Ayyj721XAjbLDj4Hk7SgNk6l/yIyM68l NsjFTRFVCbQXG7RPyH0wOhl70JYNtoh6e5AjomcNUO9ZboUnTWyxoDPfzXmbk+3fM/Kr gIiDln//Nt3F4kTC8eFhzzCdRTOEMc/0MpRtJqIuFr1tnayFYo3oNA1QCIguEggIMaWI 4H4l0cxJAfcVr1mUFukQcnA72Ju+s6Y34AAL4QfxcUXBIbYCIYJ7wJmbYrk1AfwLBYRt VO+g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Ma0wbLtCFYB5ylQTg157Oylqmn66Hh9pwai7hOvvLGY=; b=hlPvq4IOu/jkzuE2ULAVn6dc2fjb9GYUH/a6BjBlEaqysmePO7fue8bHp7NF8EX0IG 4vBGkqQSjcnFGP8qvNdbciO7fGzykOhvzszPRiuidRN7MlLNwBY0bXFqx5N+ewrRqXW3 6tBWmsL+uYx7f8wDCZjFQnpFLw13TUFd2g8/V4yrSbd1wwtg29mdQ3vEmwgiVdEhKDNp /REEIruH7UR6GoiFd37vz61Yp9NYPCKZnP/MIJ2Ir1orumbDiQXDV1StPmXx6QFs8PUo KIFFm5F/sTILrkJPDlt2cVOlZls+z2OmsYMZwpQ0xw6uViHfsL6Mt8qQFoKglbEbcE91 ouHg== X-Gm-Message-State: AO0yUKW4El3+bU6kIwJHHIgesLpd3L1XsFVvMM4LHk384sRaonpqnYxf EHZ5OBmTwvf+PysIsm/G+5ZanJDzNFE= X-Google-Smtp-Source: AK7set9FIHPe+XWZ6OEkeWhTZRywaA4pQmTFzgxLo4RCZ5ZDHq/y/WEms45m9QBVq4znfTEI+/scfQ== X-Received: by 2002:a17:90b:1b4b:b0:22c:4d85:1725 with SMTP id nv11-20020a17090b1b4b00b0022c4d851725mr10377813pjb.9.1675424348074; Fri, 03 Feb 2023 03:39:08 -0800 (PST) Received: from bobo.ozlabs.ibm.com (193-116-117-77.tpgi.com.au. [193.116.117.77]) by smtp.gmail.com with ESMTPSA id k92-20020a17090a4ce500b0022bf4d0f912sm4792964pjh.22.2023.02.03.03.39.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Feb 2023 03:39:07 -0800 (PST) From: Nicholas Piggin To: linuxppc-dev@lists.ozlabs.org Subject: [PATCH 1/3] crypto: powerpc - Use address generation helper for asm Date: Fri, 3 Feb 2023 21:38:56 +1000 Message-Id: <20230203113858.1152093-2-npiggin@gmail.com> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20230203113858.1152093-1-npiggin@gmail.com> References: <20230203113858.1152093-1-npiggin@gmail.com> MIME-Version: 1.0 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: Nicholas Piggin Errors-To: linuxppc-dev-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Linuxppc-dev" Replace open-coded toc-relative address calculation with helper macros, commit dab3b8f4fd09 ("powerpc/64: asm use consistent global variable declaration and access") made similar conversions already but missed this one. This allows data addressing model to be changed more easily. Signed-off-by: Nicholas Piggin --- arch/powerpc/crypto/crc32-vpmsum_core.S | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/arch/powerpc/crypto/crc32-vpmsum_core.S b/arch/powerpc/crypto/crc32-vpmsum_core.S index a16a717c809c..b0f87f595b26 100644 --- a/arch/powerpc/crypto/crc32-vpmsum_core.S +++ b/arch/powerpc/crypto/crc32-vpmsum_core.S @@ -113,9 +113,7 @@ FUNC_START(CRC_FUNCTION_NAME) #endif #ifdef BYTESWAP_DATA - addis r3,r2,.byteswap_constant@toc@ha - addi r3,r3,.byteswap_constant@toc@l - + LOAD_REG_ADDR(r3, .byteswap_constant) lvx byteswap,0,r3 addi r3,r3,16 #endif @@ -150,8 +148,7 @@ FUNC_START(CRC_FUNCTION_NAME) addi r7,r7,-1 mtctr r7 - addis r3,r2,.constants@toc@ha - addi r3,r3,.constants@toc@l + LOAD_REG_ADDR(r3, .constants) /* Find the start of our constants */ add r3,r3,r8 @@ -506,8 +503,7 @@ FUNC_START(CRC_FUNCTION_NAME) .Lbarrett_reduction: /* Barrett constants */ - addis r3,r2,.barrett_constants@toc@ha - addi r3,r3,.barrett_constants@toc@l + LOAD_REG_ADDR(r3, .barrett_constants) lvx const1,0,r3 lvx const2,off16,r3 @@ -610,8 +606,7 @@ FUNC_START(CRC_FUNCTION_NAME) cmpdi r5,0 beq .Lzero - addis r3,r2,.short_constants@toc@ha - addi r3,r3,.short_constants@toc@l + LOAD_REG_ADDR(r3, .short_constants) /* Calculate where in the constant table we need to start */ subfic r6,r5,256 From patchwork Fri Feb 3 11:38:57 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicholas Piggin X-Patchwork-Id: 1736948 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ozlabs.org (client-ip=112.213.38.117; helo=lists.ozlabs.org; envelope-from=linuxppc-dev-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=AkTin+jU; dkim-atps=neutral Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4P7YdQ0chhz23h0 for ; Fri, 3 Feb 2023 22:41:13 +1100 (AEDT) Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4P7YdP3QDbz3f7W for ; Fri, 3 Feb 2023 22:41:13 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=AkTin+jU; dkim-atps=neutral X-Original-To: linuxppc-dev@lists.ozlabs.org Delivered-To: linuxppc-dev@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gmail.com (client-ip=2607:f8b0:4864:20::630; helo=mail-pl1-x630.google.com; envelope-from=npiggin@gmail.com; receiver=) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=AkTin+jU; dkim-atps=neutral Received: from mail-pl1-x630.google.com (mail-pl1-x630.google.com [IPv6:2607:f8b0:4864:20::630]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4P7Yb43BV2z3bjc for ; Fri, 3 Feb 2023 22:39:12 +1100 (AEDT) Received: by mail-pl1-x630.google.com with SMTP id g13so135594ple.10 for ; Fri, 03 Feb 2023 03:39:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=XF8rQF5x5iL8Nz/hflDvxt+4w8zOZbVoF0ANzAFoMt8=; b=AkTin+jU4KvSGGJFIwffEcfIgGw8V+mmBb8bbo9b/0zL5oXnPBIEcF1TTx7n5unmwp Q6wx3hGdfW5WayFCor8bgmXB0OrcNv3wNNorGSEU7A4Lnm+c3ePS7up6TXcT+xPn3t12 jhMS7w6hlY9R/zb+D1W2p3i+nzYIMqsq2OVzdDYzJKPA+ed78zAabKqVB+2EU9W2xkor DJv8PpIxeoGYCJ1rtPmx3mk0YuAciY1QZJuI2EShoQBxWOy6e1qu8gTZO1CR0hWqbPRB xLFY5EEVvE0UpEAjqtVsrTRD8kxAqXmtmXOgYQp71pJWNRZukJparZiiVWD6H0RwHuVx NTeA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=XF8rQF5x5iL8Nz/hflDvxt+4w8zOZbVoF0ANzAFoMt8=; b=6VoUpQp6dGShRbK123lVPvrdeGdnyRiO3WMly/jtC75E9tZjh8XuINb5DduYz+LLHR Ul6vvDvtzdWJRxnYKFeNfabXAgfmajj1zOYJZIlvCD4TCnu+6hd1GaYXjvQf11yvLreW bFQcwmZjv6u8h4XRekZNfLZi9Sh5wI8+MwQ7IqFCIEh+DapfCGQ4nZBRuax7ksMzCkkn g1oNXkJbCDJQEStZ2CSxxika1uDlX/PmPrMweIIPska0/prg2beOqgIbfl7EwlhivEXL QyyP2S/zQ/CpwghBqvPwPAzCN56pG94fRgYVUHlDikwF1U3pyvFf0SgxVUyUVKbxJFm5 yHSA== X-Gm-Message-State: AO0yUKVNv3VH04t89E9/rssjFXeYxRvy+L555IBAtj9sgG4XnJcEW4NY HElYVPfCtpkGkibeJQRP5XmIBmBOP2s= X-Google-Smtp-Source: AK7set/EHzzMGYg9JnivQAhMCS2soDbBrphBWnub3mbAjpls9YHSQ8scbCPo4AG1M5X+uB6MUOYukQ== X-Received: by 2002:a17:90a:19:b0:230:2226:d10 with SMTP id 25-20020a17090a001900b0023022260d10mr10085822pja.45.1675424350231; Fri, 03 Feb 2023 03:39:10 -0800 (PST) Received: from bobo.ozlabs.ibm.com (193-116-117-77.tpgi.com.au. [193.116.117.77]) by smtp.gmail.com with ESMTPSA id k92-20020a17090a4ce500b0022bf4d0f912sm4792964pjh.22.2023.02.03.03.39.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Feb 2023 03:39:09 -0800 (PST) From: Nicholas Piggin To: linuxppc-dev@lists.ozlabs.org Subject: [PATCH 2/3] powerpc/64s: Refactor initialisation after prom Date: Fri, 3 Feb 2023 21:38:57 +1000 Message-Id: <20230203113858.1152093-3-npiggin@gmail.com> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20230203113858.1152093-1-npiggin@gmail.com> References: <20230203113858.1152093-1-npiggin@gmail.com> MIME-Version: 1.0 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: Nicholas Piggin Errors-To: linuxppc-dev-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Linuxppc-dev" Move some basic Book3S initialisation after prom to a function similar to what Book3E looks like. Book3E returns from this function at the virtual address mapping, and Book3S will do the same in a later change, so making them look similar helps with that. Signed-off-by: Nicholas Piggin --- arch/powerpc/kernel/head_64.S | 44 ++++++++++++++++++++--------------- 1 file changed, 25 insertions(+), 19 deletions(-) diff --git a/arch/powerpc/kernel/head_64.S b/arch/powerpc/kernel/head_64.S index 7558ba4eb864..5af2e473b195 100644 --- a/arch/powerpc/kernel/head_64.S +++ b/arch/powerpc/kernel/head_64.S @@ -475,8 +475,30 @@ SYM_FUNC_START_LOCAL(__mmu_off) rfid b . /* prevent speculative execution */ SYM_FUNC_END(__mmu_off) -#endif +start_initialization_book3s: + mflr r25 + + /* Setup some critical 970 SPRs before switching MMU off */ + mfspr r0,SPRN_PVR + srwi r0,r0,16 + cmpwi r0,0x39 /* 970 */ + beq 1f + cmpwi r0,0x3c /* 970FX */ + beq 1f + cmpwi r0,0x44 /* 970MP */ + beq 1f + cmpwi r0,0x45 /* 970GX */ + bne 2f +1: bl __cpu_preinit_ppc970 +2: + + /* Switch off MMU if not already off */ + bl __mmu_off + + mtlr r25 + blr +#endif /* * Here is our main kernel entry point. We support currently 2 kind of entries @@ -523,26 +545,10 @@ __start_initialization_multiplatform: #ifdef CONFIG_PPC_BOOK3E_64 bl start_initialization_book3e - b __after_prom_start #else - /* Setup some critical 970 SPRs before switching MMU off */ - mfspr r0,SPRN_PVR - srwi r0,r0,16 - cmpwi r0,0x39 /* 970 */ - beq 1f - cmpwi r0,0x3c /* 970FX */ - beq 1f - cmpwi r0,0x44 /* 970MP */ - beq 1f - cmpwi r0,0x45 /* 970GX */ - bne 2f -1: bl __cpu_preinit_ppc970 -2: - - /* Switch off MMU if not already off */ - bl __mmu_off - b __after_prom_start + bl start_initialization_book3s #endif /* CONFIG_PPC_BOOK3E_64 */ + b __after_prom_start __REF __boot_from_prom: From patchwork Fri Feb 3 11:38:58 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicholas Piggin X-Patchwork-Id: 1736949 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ozlabs.org (client-ip=112.213.38.117; helo=lists.ozlabs.org; envelope-from=linuxppc-dev-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=l7xrIlOp; dkim-atps=neutral Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4P7YfP753Bz23h0 for ; Fri, 3 Feb 2023 22:42:05 +1100 (AEDT) Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4P7YfP5vFCz3f8y for ; Fri, 3 Feb 2023 22:42:05 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=l7xrIlOp; dkim-atps=neutral X-Original-To: linuxppc-dev@lists.ozlabs.org Delivered-To: linuxppc-dev@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gmail.com (client-ip=2607:f8b0:4864:20::630; helo=mail-pl1-x630.google.com; envelope-from=npiggin@gmail.com; receiver=) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=l7xrIlOp; dkim-atps=neutral Received: from mail-pl1-x630.google.com (mail-pl1-x630.google.com [IPv6:2607:f8b0:4864:20::630]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4P7Yb51rNJz3bjy for ; Fri, 3 Feb 2023 22:39:13 +1100 (AEDT) Received: by mail-pl1-x630.google.com with SMTP id u9so672302plf.3 for ; Fri, 03 Feb 2023 03:39:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=SnMiVTD741omx7hmBiiezop4Htb8xxqKLHF8EW8IS4A=; b=l7xrIlOpvcJyGWla9ECP9y3nvtoP0PjzkHTpL2Uhh6eCJp/mCBJi0Vny0zIkXW7XS/ +oRIIGSOPr3S8RP6+L6jV+LD4pZo1a9GRrNNNFyBrGhKFMkCaLiVyO9hoVOR9NN5IfRp 4V+BhLG1mdYsMhJKCJPRI6h40siGwOQMj93e8AOhTe8uoz2ZtQpLBUZDp2tv70RoJWjn +bRQp8DSRiwz4lvp1QUJXb9dra0tUs8XWAAWO8xWnDmLhYi06xGegCzoDdeULzaGWNZH CrxleP+28P3oca0SrI8EDJphy5QHhQyusQq/v0OvEYjGvgm6jyul79T59zkfopQYPD+J VSQA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=SnMiVTD741omx7hmBiiezop4Htb8xxqKLHF8EW8IS4A=; b=bmBTjA6NlIRdy2UZf8a4wDfvAuirlwUl1Mwd5sHDR0i1NcZi17/+tar1Dbm5WWJpQ8 pmWgDdxkUbCR8VunrJxDCkMeeq5zl0aU0vmD9lUAVTLkWS2BL209QzbtvHv1qHCXXumf lvDwvauA/JgYlWkMdovr4ac86RnoxAnrQUDDaxzIKl+5UMkiPaW+l6naRIjEJ/KkureN 3EXdsc1yeycZLy/8PPWV2C0+iY4cZLuNX1FHctB4JOLvHltZui6RKTF4zZpIeZx+IwZd ZfF5ECMkxfknK8Y43pJH7XjDR6K27ou3BNm6QnC0P7COdNJwK9JI8kdBsHRVnPrPXHF6 ij2Q== X-Gm-Message-State: AO0yUKWHqtLq9ooV3N+FUjmdGlxx1qXApXsrruCzmjYRn/3mGg0o6cIz ZImk11RDf2Y4ecpniTRAYphkeMwCA5U= X-Google-Smtp-Source: AK7set9fzjKQ1av4cV4CKhH7hKqqiNGBGZPzv9qJTDq722+LplkhsCrHetoz3oioTJEhwpnVt9JChw== X-Received: by 2002:a17:90b:4ac5:b0:22c:9794:206c with SMTP id mh5-20020a17090b4ac500b0022c9794206cmr10553465pjb.6.1675424352542; Fri, 03 Feb 2023 03:39:12 -0800 (PST) Received: from bobo.ozlabs.ibm.com (193-116-117-77.tpgi.com.au. [193.116.117.77]) by smtp.gmail.com with ESMTPSA id k92-20020a17090a4ce500b0022bf4d0f912sm4792964pjh.22.2023.02.03.03.39.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Feb 2023 03:39:12 -0800 (PST) From: Nicholas Piggin To: linuxppc-dev@lists.ozlabs.org Subject: [PATCH 3/3] powerpc/64e: Simplify address calculation in secondary hold loop Date: Fri, 3 Feb 2023 21:38:58 +1000 Message-Id: <20230203113858.1152093-4-npiggin@gmail.com> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20230203113858.1152093-1-npiggin@gmail.com> References: <20230203113858.1152093-1-npiggin@gmail.com> MIME-Version: 1.0 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: Nicholas Piggin Errors-To: linuxppc-dev-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Linuxppc-dev" As the earlier comment explains, __secondary_hold_spinloop does not have to be accessed at its virtual address, slightly simplifying code. Signed-off-by: Nicholas Piggin --- arch/powerpc/kernel/head_64.S | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/arch/powerpc/kernel/head_64.S b/arch/powerpc/kernel/head_64.S index 5af2e473b195..3a7266fa8a18 100644 --- a/arch/powerpc/kernel/head_64.S +++ b/arch/powerpc/kernel/head_64.S @@ -160,12 +160,8 @@ __secondary_hold: std r24,(ABS_ADDR(__secondary_hold_acknowledge, first_256B))(0) sync - li r26,0 -#ifdef CONFIG_PPC_BOOK3E_64 - tovirt(r26,r26) -#endif /* All secondary cpus wait here until told to start. */ -100: ld r12,(ABS_ADDR(__secondary_hold_spinloop, first_256B))(r26) +100: ld r12,(ABS_ADDR(__secondary_hold_spinloop, first_256B))(0) cmpdi 0,r12,0 beq 100b