From patchwork Fri Mar 10 20:54:48 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: tip-bot2 for Thomas Gleixner X-Patchwork-Id: 67695 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp1101382wrd; Fri, 10 Mar 2023 13:11:20 -0800 (PST) X-Google-Smtp-Source: AK7set8L2fHUXcyWSkio8fTJvhalWd+we2th4Z6aNbYnlzGNfTO2v6KCS5Jp6kcb/okIluOey14D X-Received: by 2002:a17:90b:1c01:b0:233:f371:35db with SMTP id oc1-20020a17090b1c0100b00233f37135dbmr28595829pjb.4.1678482680197; Fri, 10 Mar 2023 13:11:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1678482680; cv=none; d=google.com; s=arc-20160816; b=m0gBIFgI5/YCnSpLheZo7vUk0NVqINicXFz0EM5D+JyOPkWC27yGJxr7XTywjNvDrC Amlj/3hlKN0ZBzwe4hN26BgtFrFHd+h5Vc7f9Hr2f7Yj2dfqRNXEBrl2WLZxQgNhnaUF Nk/CyNlvWNbObcloCNlJYZs9rEHPnMY1VaawBt8vBUDDEfp8LILfvJYFU1Dqxvako/D7 RPa1c6apLYFql/YXUDuCma9hFFW50DcxYUxl6xLY6gWydDkZ3f2sFyE2OP9BvH4OBiY/ LIihFPB6mr/YoY3GFGIBnvEnhHc2ZM2yZOE6dtTaYRP4QCiJ1l1GVsaIVCgR5MaXrYji 4qNQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:robot-unsubscribe :robot-id:message-id:mime-version:references:in-reply-to:cc:subject :to:reply-to:sender:from:dkim-signature:dkim-signature:date; bh=2Pme1mZWT9w+DK9ozTfU1RohPKgGVKNL82bcnqvKx2c=; b=AeNoXOazAFAHrHPGlrecqrwftfUIvro20lngqNLWUt4M+8sJbMNbm6hVAoLr5stp+t FkZhUdT29vWrLrfRhg2hD4+f8FoNbA8co5smZpe49OR360MSgpt5pgE3swYY5aVMolWW lumdS7uLUuHst8vZB0/Y3mLhCWTKf7nwgVuZs5gM8gXbgdPDaYWMLa6plg0niCVsxOT7 ww/I/xd8Mh7kPmpQgC9zSeyqJ4NV0NFK9yozPpIJglOCIV0NHnwuI0mw0etGxouKMwVT Iy0d9DkrlgAjHJ1SQzXUbUkp/Cx7HlFACMAyrTmuv21ZXm03Jii+/z79fFlre3bokQN2 Mbzw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=Na4SEKka; dkim=neutral (no key) header.i=@linutronix.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j191-20020a6380c8000000b0050734329d96si648330pgd.431.2023.03.10.13.10.59; Fri, 10 Mar 2023 13:11:20 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=Na4SEKka; dkim=neutral (no key) header.i=@linutronix.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231559AbjCJUzK (ORCPT + 99 others); Fri, 10 Mar 2023 15:55:10 -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 X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1757789464101883993?= X-GMAIL-MSGID: =?utf-8?q?1760016654598197440?= 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 */