From patchwork Mon Apr 17 10:46:45 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: 84177 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp2041435vqo; Mon, 17 Apr 2023 04:17:59 -0700 (PDT) X-Google-Smtp-Source: AKy350Zm4RiM7w+slr/ax13Y1S9uBZ+TJf5UZKtkeKVMWF/z8gNNLDdOMrFYYChm3hzmkOakQak3 X-Received: by 2002:a17:90a:6305:b0:246:91d0:9e6f with SMTP id e5-20020a17090a630500b0024691d09e6fmr15106235pjj.3.1681730279157; Mon, 17 Apr 2023 04:17:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681730279; cv=none; d=google.com; s=arc-20160816; b=AHTAaT2K7cSviBcbG/9YYlbM9lwx2NCH8Ihwz0XOAzfrsv6bvF3ArkISzMFKTuhYWM MWYeclPJzTzU76iz7D0DAvzGgWo+azOyWSj1x2+0b4wehCfYGSq1qQIK+l7gvqrBVPOX yvD5uvKg+o0GLHciVJEZuOqpXqb7VFSwwdLo/EDlzwaszlf4S8El2TW9pBp853oqMlYn VrlYLotV0aMBS/Ou/HPSOjI+4lz7FH7RUjyDn8XIoPuaEkqMQNCC5A9IkqGPWD37azpX vhE/AdQcp/uaF49jUMGVJj7vbKzHu5zQtSbAPQnk9eCQxHXhKDs2fyRjij55hxrTYBIg n1yg== 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=EygwRbB8JyZnkTtOgv8diB/DIMVBm1/6K4FuPOI9bXM=; b=kry88pwq0iIClBzIA7S6YhfOav3eGlH8CCA6AL4eqNXu8wRuhnGvwTRhkNyn8YE+06 V31VNH0/vhNBqKASyGg0wHxxchTwraYME7grHeWUiOQvp6JgP/yjrf09AWT0Y2UQH09u aNiPD+HUvMwPltEM13YyP9Sz3kU9FB+Oeg3f/V930xgjVZ5lZXqS97daadRuns/UIFX7 gacxV4vMI0WxMn3Nvkhe2QVq+ao+duxF1Hj6l6wNFng09qEOeuUZeV0pffzzFi8eB2AF m1xkBRGXINUPWGlhKyAYn98sZxtHGCjGma+zmvUsDNbSWboxtjtdsFXzYaMWTHJ6kVGI pHMA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=tuIQyVEw; 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 cq17-20020a17090af99100b00240263ef11bsi11186097pjb.120.2023.04.17.04.17.47; Mon, 17 Apr 2023 04:17:59 -0700 (PDT) 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=tuIQyVEw; 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 S230346AbjDQKtT (ORCPT + 99 others); Mon, 17 Apr 2023 06:49:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48826 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230271AbjDQKtC (ORCPT ); Mon, 17 Apr 2023 06:49:02 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5B3E8ED; Mon, 17 Apr 2023 03:48:12 -0700 (PDT) Date: Mon, 17 Apr 2023 10:46:45 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1681728406; 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=EygwRbB8JyZnkTtOgv8diB/DIMVBm1/6K4FuPOI9bXM=; b=tuIQyVEw8pRS8KPuqNfCmSr+gP6U/gQ8phJzhksfq379Z2dKY8Vfiy4UFyw4Xmi65VM3ls A3EvHolwJWpq+om49n8p1DIM5Vog16IBXMu++UVU4kwAa6d1l0tzVFBQ5mitZ5fTrbWLOK xvbRhKapeXp7qmA7NCYqjCDGMuaHTaluIk5UINBCngsWZIvQSNWzcvqQrxHwuTug+Zk30C yWz7z9S9e4wyZVNiw2xW6nLD7tgvyT6zMgtGjGYs92t/mVSo7cBVCibHrKi3jo5EFrRcCv eO3yuFdVzrRSni+njxErBojpGIr0FhTz7mbzGKEfaK8WFGQ/QONXjug2SBcaNg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1681728406; 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=EygwRbB8JyZnkTtOgv8diB/DIMVBm1/6K4FuPOI9bXM=; b=aezQTuIGs1lQVIWSLljq6polu1aPIiEFkZRDZUjd961NT5pFZfqRH0ky11tS+5MajtFmfp RBAUK5O7yl77N+CA== 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] x86/cpu: Mark {hlt,resume}_play_dead() __noreturn Cc: kernel test robot , Josh Poimboeuf , "Peter Zijlstra (Intel)" , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: References: MIME-Version: 1.0 Message-ID: <168172840596.404.15545078409070467274.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,T_SCC_BODY_TEXT_LINE 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?1763016447846351785?= X-GMAIL-MSGID: =?utf-8?q?1763422009343939503?= The following commit has been merged into the objtool/core branch of tip: Commit-ID: 52668badd34b4b346f32c33a9bcba069a06c3caa Gitweb: https://git.kernel.org/tip/52668badd34b4b346f32c33a9bcba069a06c3caa Author: Josh Poimboeuf AuthorDate: Wed, 12 Apr 2023 16:49:39 -07:00 Committer: Peter Zijlstra CommitterDate: Fri, 14 Apr 2023 17:31:27 +02:00 x86/cpu: Mark {hlt,resume}_play_dead() __noreturn Fixes the following warning: vmlinux.o: warning: objtool: resume_play_dead+0x21: unreachable instruction Reported-by: kernel test robot Signed-off-by: Josh Poimboeuf Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/ce1407c4bf88b1334fe40413126343792a77ca50.1681342859.git.jpoimboe@kernel.org --- arch/x86/include/asm/smp.h | 2 +- arch/x86/kernel/smpboot.c | 2 +- arch/x86/power/cpu.c | 2 +- tools/objtool/check.c | 2 ++ 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/arch/x86/include/asm/smp.h b/arch/x86/include/asm/smp.h index e6d1d28..47ce4c7 100644 --- a/arch/x86/include/asm/smp.h +++ b/arch/x86/include/asm/smp.h @@ -125,7 +125,7 @@ int native_cpu_up(unsigned int cpunum, struct task_struct *tidle); int native_cpu_disable(void); int common_cpu_die(unsigned int cpu); void native_cpu_die(unsigned int cpu); -void hlt_play_dead(void); +void __noreturn hlt_play_dead(void); void native_play_dead(void); void play_dead_common(void); void wbinvd_on_cpu(int cpu); diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c index 9013bb2..a6da3f9 100644 --- a/arch/x86/kernel/smpboot.c +++ b/arch/x86/kernel/smpboot.c @@ -1816,7 +1816,7 @@ static inline void mwait_play_dead(void) } } -void hlt_play_dead(void) +void __noreturn hlt_play_dead(void) { if (__this_cpu_read(cpu_info.x86) >= 4) wbinvd(); diff --git a/arch/x86/power/cpu.c b/arch/x86/power/cpu.c index 236447e..7a4d5e9 100644 --- a/arch/x86/power/cpu.c +++ b/arch/x86/power/cpu.c @@ -288,7 +288,7 @@ EXPORT_SYMBOL(restore_processor_state); #endif #if defined(CONFIG_HIBERNATION) && defined(CONFIG_HOTPLUG_CPU) -static void resume_play_dead(void) +static void __noreturn resume_play_dead(void) { play_dead_common(); tboot_shutdown(TB_SHUTDOWN_WFS); diff --git a/tools/objtool/check.c b/tools/objtool/check.c index ceb9848..724a63b 100644 --- a/tools/objtool/check.c +++ b/tools/objtool/check.c @@ -212,6 +212,7 @@ static bool __dead_end_function(struct objtool_file *file, struct symbol *func, "do_task_dead", "ex_handler_msr_mce", "fortify_panic", + "hlt_play_dead", "kthread_complete_and_exit", "kthread_exit", "kunit_try_catch_throw", @@ -222,6 +223,7 @@ static bool __dead_end_function(struct objtool_file *file, struct symbol *func, "panic", "panic_smp_self_stop", "rest_init", + "resume_play_dead", "rewind_stack_and_make_dead", "sev_es_terminate", "snp_abort",