From patchwork Mon Dec 20 11:08:52 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Nicholas Piggin X-Patchwork-Id: 1570974 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=Vwotkumh; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ozlabs.org (client-ip=112.213.38.117; helo=lists.ozlabs.org; envelope-from=skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org; receiver=) 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 RSA-PSS (4096 bits)) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4JHcKj4k2Hz9s1l for ; Mon, 20 Dec 2021 22:09:12 +1100 (AEDT) Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4JHcKc4H3dz2yw9 for ; Mon, 20 Dec 2021 22:09:08 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=Vwotkumh; dkim-atps=neutral X-Original-To: skiboot@lists.ozlabs.org Delivered-To: skiboot@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gmail.com (client-ip=2607:f8b0:4864:20::1029; helo=mail-pj1-x1029.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=Vwotkumh; dkim-atps=neutral Received: from mail-pj1-x1029.google.com (mail-pj1-x1029.google.com [IPv6:2607:f8b0:4864:20::1029]) (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 4JHcKZ06FBz2yjS for ; Mon, 20 Dec 2021 22:09:03 +1100 (AEDT) Received: by mail-pj1-x1029.google.com with SMTP id jw3so5576166pjb.4 for ; Mon, 20 Dec 2021 03:09:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=z8+ooleyn1QCuyQPY8Tbs784s9ZK8hHmY7fagBc24c0=; b=Vwotkumh6I8VJaGr0PlUJcyPpRpAGdXBBJdGiRKTyrvhfNu5cZNlSgP6fFOmpcdKTX ejCYE3epF0zzOEDjP8sApFV8IoG5ALCrwzGHExT71OxEmcQtqOwFGlfjDsIn9Pn1dMgE Eg4khLZX/amMTuucIiWbqB4aL2rSrz+v36gtq++7+UST8CjgyGcl0IKlPvs6R9yDPx+o qxo9jtwV9VZ2CA3atOdefeJ8hog8lMF0yj16KaaQd7R39eLhcZX5vAtM0eUa2t+HTUgT sl25rxbsANWnnFsK29dDSdPfWg8AKs8A85KsUF00Y05wc9pD3+03E8h9Iq0xlY6pUccL J7yA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=z8+ooleyn1QCuyQPY8Tbs784s9ZK8hHmY7fagBc24c0=; b=2MG3BtCieQ1a2/Slt5/Eyqq5QLZmfA/tjAtCSVaFrUJUJ6gotapBXFb4w6dvgIpzey 27INuXy7LoDnjqqbi0lerUvi9/KEXRa/Wsc8EpjsO4Eu3/u+BLgGtej8npRiohT7uPPM +oU+8gObtWNg3dO5jN8lzMsUW/0rhmmSa0zqksmsHVK/asN+y2ohPCbmmPx1YoI+mno+ k5e9DcQi2sRdG18jQPBrNsnJEiqGx/jfetCjdVOrJl1+F4rCqxKYUCQCq03k5RnApyzW DKvqzTy1ot/7Lg+YSd0IlAFiLaAs37SKdjNbWzb7/WDlJN3fUovZSWDEP1t7uVpyE1eW q3gg== X-Gm-Message-State: AOAM533s2EAin7gQUNhzBfBba6ODTE91/dJRoraF9UtWNTlEEvxKSjAf q2+v7VTf13uolSgrVcBspul+ZZWQNAE= X-Google-Smtp-Source: ABdhPJwQZB4cC6qcqsXcLQaGKF/jFr52nIK0nLqPW1pDShz/Z1zI8vaZw4fWnDXuiFh6do+mFH/0dA== X-Received: by 2002:a17:90b:4a8c:: with SMTP id lp12mr11013603pjb.224.1639998538902; Mon, 20 Dec 2021 03:08:58 -0800 (PST) Received: from bobo.ozlabs.ibm.com (121-44-67-22.tpgi.com.au. [121.44.67.22]) by smtp.gmail.com with ESMTPSA id t136sm3497185pfc.124.2021.12.20.03.08.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Dec 2021 03:08:58 -0800 (PST) From: Nicholas Piggin To: skiboot@lists.ozlabs.org Date: Mon, 20 Dec 2021 21:08:52 +1000 Message-Id: <20211220110852.954111-1-npiggin@gmail.com> X-Mailer: git-send-email 2.23.0 MIME-Version: 1.0 Subject: [Skiboot] [PATCH] fast-reboot: fix TLB cleanup after fast reboot X-BeenThere: skiboot@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Mailing list for skiboot development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?q?C=C3=A9dric_Le_Goater?= Errors-To: skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Skiboot" POWER9/10 are missing TLB flushing after fast reboot. Add it back to cpu_fast_reboot_complete(), which is where fast-reboot code thinks it should be. Suggested-by: Cédric Le Goater Fixes: 53ef0db6e2 ("asm/head.S: set POWER9 radix HID bit at entry") Signed-off-by: Nicholas Piggin --- core/cpu.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/core/cpu.c b/core/cpu.c index 6f37358a9..016c52375 100644 --- a/core/cpu.c +++ b/core/cpu.c @@ -1563,6 +1563,10 @@ void cpu_fast_reboot_complete(void) /* and set HID0:RADIX */ if (proc_gen == proc_gen_p9) current_radix_mode = true; + + /* P8 clears TLBs in cleanup_cpu_state() */ + if (proc_gen >= proc_gen_p9) + cleanup_global_tlb(); } static int64_t opal_reinit_cpus(uint64_t flags)