Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 38CC8C6FA99 for ; Fri, 10 Mar 2023 20:55:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231597AbjCJUzM (ORCPT ); Fri, 10 Mar 2023 15:55:12 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56932 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231303AbjCJUyw (ORCPT ); Fri, 10 Mar 2023 15:54:52 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4D4FD132AAD; Fri, 10 Mar 2023 12:54:50 -0800 (PST) Date: Fri, 10 Mar 2023 20:54:48 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1678481689; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=2Pme1mZWT9w+DK9ozTfU1RohPKgGVKNL82bcnqvKx2c=; b=Na4SEKkaIi53vgpH77Fc57wc9XgZhBn6De9IVKibzE3m3j5QYMKz1PyEfHpr7dR4Mvl1OY TcPYNc3+qKufpFmgb/zev3Pw7LdhzE9vC2dA1Cle8RSqQBzcxQk07PRsxBKVAIkfd/oUE9 2ltn4d4w9s98mpnLIO04dcPpcQcAPvflSEMayHu4I7UnQ7DV15YZUFOCaKwrBKtMg5PH2E ID080d1i8xyQijLx/2m/Bn7WpXnDygqVs5BcPjjRKJziKgIrACAO2qkNmMMvQW2+UoNy4F wtEEmtG34/NVjzAJ49lQl5KOE3AAiorgds2C7fgbRMHG3rOHFExox1mDXLf+tA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1678481689; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=2Pme1mZWT9w+DK9ozTfU1RohPKgGVKNL82bcnqvKx2c=; b=meAvjA792dH5jAKjBHbn080fAq5BKxDNL+VQkLt9kPgTWabbO455FqD+Dwkq0zIROmBDWP 9A5hURNcFjFuQWAQ== From: "tip-bot2 for Josh Poimboeuf" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: objtool/core] xtensa/cpu: Make sure cpu_die() doesn't return Cc: Josh Poimboeuf , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: References: MIME-Version: 1.0 Message-ID: <167848168863.5837.637085090455640645.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The following commit has been merged into the objtool/core branch of tip: Commit-ID: d08e12e8126ec88d6cb1a7eb160d8d7b52c8699f Gitweb: https://git.kernel.org/tip/d08e12e8126ec88d6cb1a7eb160d8d7b52c8699f Author: Josh Poimboeuf AuthorDate: Mon, 13 Feb 2023 23:05:53 -08:00 Committer: Josh Poimboeuf CommitterDate: Wed, 08 Mar 2023 08:44:27 -08:00 xtensa/cpu: Make sure cpu_die() doesn't return cpu_die() doesn't return. Make that more explicit with a BUG(). BUG() is preferable to unreachable() because BUG() is a more explicit failure mode and avoids undefined behavior like falling off the edge of the function into whatever code happens to be next. Link: https://lore.kernel.org/r/cca346b5c87693499e630291d78fb0bf12c24290.1676358308.git.jpoimboe@kernel.org Signed-off-by: Josh Poimboeuf --- arch/xtensa/kernel/smp.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/xtensa/kernel/smp.c b/arch/xtensa/kernel/smp.c index 4dc109d..7bad784 100644 --- a/arch/xtensa/kernel/smp.c +++ b/arch/xtensa/kernel/smp.c @@ -341,6 +341,8 @@ void __ref cpu_die(void) __asm__ __volatile__( " movi a2, cpu_restart\n" " jx a2\n"); + + BUG(); } #endif /* CONFIG_HOTPLUG_CPU */