From patchwork Fri Feb 3 22:05:10 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Josh Poimboeuf X-Patchwork-Id: 52668 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp1079959wrn; Fri, 3 Feb 2023 14:07:21 -0800 (PST) X-Google-Smtp-Source: AK7set/eVh+TfoltB0H+rvd5XfDY4IPhjPZig1NCnkjyIrY7vdXUfrRwJeFl8zsa4DdNwzy8k3wj X-Received: by 2002:a62:6385:0:b0:594:1f1c:3d2c with SMTP id x127-20020a626385000000b005941f1c3d2cmr4865049pfb.1.1675462041167; Fri, 03 Feb 2023 14:07:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675462041; cv=none; d=google.com; s=arc-20160816; b=BpLKGiKoBBVyYSylxvWEfGKm544/LL7WJM/s+DRLPKpx8zG++FTVY5vs6ThLNe4ZCo 4QARaSr1Yg3KBtvXHmbVc7mvFJQspr8O0ORPaapimwOTnlR0xchpNEO05HZevKaP+Me/ 48WbAB/u2zGYnmrajyHivLq4dLAnS/QgHj3qGdIHft35KgQkhYL8vnYqP+gwgGH0bwLT 5/ihhfX80Xjck+m5RmW5YquowRvpXhXC3L8Qzpc/Eq7H35gOl2TLIGQLsXNqmixFMmJS MxwtRLAk6IDliyzXCKvWh7xZ4YiuLHjuVBMA9QHAbVhqUTwPfMkn+EcP53trrE6JtD4H 86Cw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=OjuyRwGEJDg+L5sqLGBysgxjAVJLfz5t/4zFI93Gc9c=; b=We3yvzO5ag1GZR9auRUEjUUm7FjMf1XAciQvwQIc1NoSN4SQgWSCy0fN4kCnY/WM1J ZBMKS8MUJKC8bk1uQ2+HsN1+vMcM2hiFFxdeQtnCaEGjLRMratz0ic7vxCZvNXffwXS7 xbpRl8XeSyaKrbEVy2a4Lts3847ChlLe/oPI6GdRATV/5G7bkVhvmfNymTBMpiXfLkp7 YG0VXWwphJ9fmOkMPKlsmOOwUfdG214CFySexiq0lR4GEm4ZrVaBvDgNwtxpZQbTsVSc fBBNaFmB0/x4So/acXxpj/tWrKbx5b7wJF9I+hp6zmQSDa/hI7QrnQQX3SFsLxYbRwNs ChJA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=h1dFAKfF; 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=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a33-20020a056a001d2100b0058d8ec253f8si3465039pfx.259.2023.02.03.14.07.08; Fri, 03 Feb 2023 14:07:21 -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=@kernel.org header.s=k20201202 header.b=h1dFAKfF; 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=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233916AbjBCWFu (ORCPT + 99 others); Fri, 3 Feb 2023 17:05:50 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56278 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230114AbjBCWFq (ORCPT ); Fri, 3 Feb 2023 17:05:46 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AA3B799D58; Fri, 3 Feb 2023 14:05:45 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 5FA55B82C2D; Fri, 3 Feb 2023 22:05:44 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 58184C4339E; Fri, 3 Feb 2023 22:05:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1675461943; bh=NR8zbYs8EPLnwZAokhvxtM4d11Hejg/pklQk/07I+eg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=h1dFAKfFwo43O/p+mZtZ8A+pRz8y8sKCxvJSxAxf2YpW/jd7egSDVmzws1Zas8viu I1hsX05Ku4zp8diJUR/N6dJhSG9mAon5ZNQLSZol3jGec2QJ0I0pSVe2Bv6/fcXHXw TdnQjaONqw918RHo79XkwWmjiQlnJyFT7QgmZo+nwawn1ZL4JdU0tGamzFwTIX1g3k WpeqXBuX7b/QIa6fMLMBsGo5GJbYag1To0ffo6VmtPVndG48TG3eDYQMlosEKX4ZZ2 Q2OHoZnKg98XUe5DHtWW0te95HvWS2yWc5/MOqBVfViewE35c0040lS7kwSLzx4ju5 cyK5w4a7yqJyQ== From: Josh Poimboeuf To: linux-kernel@vger.kernel.org Cc: jgross@suse.com, richard.henderson@linaro.org, ink@jurassic.park.msu.ru, mattst88@gmail.com, linux-alpha@vger.kernel.org, linux@armlinux.org.uk, linux-arm-kernel@lists.infradead.org, catalin.marinas@arm.com, will@kernel.org, guoren@kernel.org, linux-csky@vger.kernel.org, linux-ia64@vger.kernel.org, chenhuacai@kernel.org, kernel@xen0n.name, loongarch@lists.linux.dev, f.fainelli@gmail.com, bcm-kernel-feedback-list@broadcom.com, tsbogend@alpha.franken.de, linux-mips@vger.kernel.org, jiaxun.yang@flygoat.com, mpe@ellerman.id.au, npiggin@gmail.com, christophe.leroy@csgroup.eu, linuxppc-dev@lists.ozlabs.org, ysato@users.sourceforge.jp, dalias@libc.org, linux-sh@vger.kernel.org, davem@davemloft.net, sparclinux@vger.kernel.org, tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, dave.hansen@linux.intel.com, x86@kernel.org, hpa@zytor.com, chris@zankel.net, jcmvbkbc@gmail.com, linux-xtensa@linux-xtensa.org, peterz@infradead.org, juri.lelli@redhat.com, vincent.guittot@linaro.org, dietmar.eggemann@arm.com, rostedt@goodmis.org, bsegall@google.com, mgorman@suse.de, bristot@redhat.com, vschneid@redhat.com, paulmck@kernel.org Subject: [PATCH 01/22] alpha/cpu: Expose arch_cpu_idle_dead()'s prototype declaration Date: Fri, 3 Feb 2023 14:05:10 -0800 Message-Id: X-Mailer: git-send-email 2.39.0 In-Reply-To: References: MIME-Version: 1.0 Content-type: text/plain X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS 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?1756849285566236282?= X-GMAIL-MSGID: =?utf-8?q?1756849285566236282?= Include to make sure arch_cpu_idle_dead() matches its prototype going forward. Signed-off-by: Josh Poimboeuf --- arch/alpha/kernel/process.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/alpha/kernel/process.c b/arch/alpha/kernel/process.c index 0eddd22c6212..4813172547b5 100644 --- a/arch/alpha/kernel/process.c +++ b/arch/alpha/kernel/process.c @@ -9,6 +9,7 @@ * This file handles the architecture-dependent parts of process handling. */ +#include #include #include #include From patchwork Fri Feb 3 22:05:11 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Josh Poimboeuf X-Patchwork-Id: 52670 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp1080018wrn; Fri, 3 Feb 2023 14:07:32 -0800 (PST) X-Google-Smtp-Source: AK7set/9ej//3TvhieMUsscQwBlU3+C6eRZzaHWd2anK2FVysTRzp3UkGOt4QatgFcD2OtEThFy6 X-Received: by 2002:a05:6a21:6d9d:b0:bd:c0c:1e56 with SMTP id wl29-20020a056a216d9d00b000bd0c0c1e56mr16307245pzb.3.1675462051761; Fri, 03 Feb 2023 14:07:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675462051; cv=none; d=google.com; s=arc-20160816; b=omT/AT+PHBau2KvV6EnjM8efIlIgswBeurp3naumHBwJDgAZVeXjJv9kRnm3FaRBpy ad4twvxlVx/htTCfIa/Eam2L5XIMZ8MFQRMa+fuCsJcLy+oa8aKRkrd5aq5awQXw8T2U xw+aB/X7e+KTOzY1uiQMH5UFAqlqwOkIqa0hK9f6P/LDmWLVliRwNLuwgmxEw1CiPqMF tG+AeK9QEMASCyB5nV+3V6SORSoWPTpykoIJ6HwLS5ILJHZNmIXAPXXcWgYU2HmaBpyq oFX2qPzm4hlEOLZn9WhFLYTAXQCWQr5RrPJePzvOvsMI9y9Ty9gIBPfyqLwaXkP0l2SR aBUw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=/Lyyp+SC9AUdQQfZILIAzyouh37TqrRtVqDGWBTTi5k=; b=cVLlAHn2Od1i6VVR2kRXv3WqBu0dOIo+RYtBWKZfPbvCAm5vMcTuJUXdg249iYaS/P Y3IejbrgGW3DAucXGeVBMYASoqGEmIRrPlm80ytaX2D61RR9EkXutbYGlwjZhqidi+xO e0ghqcwbpLLvSgN5Ache5vtmm7OFKd71d0xEmzFyxplcb2X1qO9ukqa3gU6LtJx1n7al LXx4v2PW5N50F7ekq34PkMwbTIyCiBsAoqmu121P3TCkQXMv1irrDCYV0BGX+0NhMANb uFS45GMHG8gYwSGz5Zfw38DyEasI7Mq6OigkGy1rkCoKOaX8Ld/4KkeK7B4TGoYaVhCV 1B9Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="Cnpsd3/v"; 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=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ij22-20020a170902ab5600b0019614fc188fsi3565529plb.443.2023.02.03.14.07.19; Fri, 03 Feb 2023 14:07:31 -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=@kernel.org header.s=k20201202 header.b="Cnpsd3/v"; 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=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233955AbjBCWF6 (ORCPT + 99 others); Fri, 3 Feb 2023 17:05:58 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56318 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233894AbjBCWFs (ORCPT ); Fri, 3 Feb 2023 17:05:48 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B3DB0991CB; Fri, 3 Feb 2023 14:05:47 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 50EC2B82C2C; Fri, 3 Feb 2023 22:05:46 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 31D78C433A4; Fri, 3 Feb 2023 22:05:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1675461944; bh=jwTvhfv5jui0rr++LUZmPhaoB7Jg1TFf9qG4O7JtMhQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Cnpsd3/vIh8cHXwxClTdwl8BAQrgBFDXI4Y6Wl3Yb8uKzKrXFmQjf4bLTlNruFSiS qCw5Tpiq0hGpIKAA9/3qXe8LcDIqt+HCuF23fCoKLHz2nfcNB+D+KHlrgpbh1U43BD pNBum+Kt2hjbGzQLzCB6YyRpQ9i7GLAoTP+jIcII2BpDc7lxQXJkdYAl8BjjAxWWgH vPRzYJ9cYKNr4qu0wK5oRu28WzJ1AZPjIEQJEuuC7Tw5qVQ5zZYaRMYRLjPSmjNcm2 38kusvC4L8FnSTzlZ9mjTaLmjfcLnDzYkadBZuZ4/c+gcGOlxpmeKS17HnHSBp6y7I T1Tc3i1z5DTLw== From: Josh Poimboeuf To: linux-kernel@vger.kernel.org Cc: jgross@suse.com, richard.henderson@linaro.org, ink@jurassic.park.msu.ru, mattst88@gmail.com, linux-alpha@vger.kernel.org, linux@armlinux.org.uk, linux-arm-kernel@lists.infradead.org, catalin.marinas@arm.com, will@kernel.org, guoren@kernel.org, linux-csky@vger.kernel.org, linux-ia64@vger.kernel.org, chenhuacai@kernel.org, kernel@xen0n.name, loongarch@lists.linux.dev, f.fainelli@gmail.com, bcm-kernel-feedback-list@broadcom.com, tsbogend@alpha.franken.de, linux-mips@vger.kernel.org, jiaxun.yang@flygoat.com, mpe@ellerman.id.au, npiggin@gmail.com, christophe.leroy@csgroup.eu, linuxppc-dev@lists.ozlabs.org, ysato@users.sourceforge.jp, dalias@libc.org, linux-sh@vger.kernel.org, davem@davemloft.net, sparclinux@vger.kernel.org, tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, dave.hansen@linux.intel.com, x86@kernel.org, hpa@zytor.com, chris@zankel.net, jcmvbkbc@gmail.com, linux-xtensa@linux-xtensa.org, peterz@infradead.org, juri.lelli@redhat.com, vincent.guittot@linaro.org, dietmar.eggemann@arm.com, rostedt@goodmis.org, bsegall@google.com, mgorman@suse.de, bristot@redhat.com, vschneid@redhat.com, paulmck@kernel.org Subject: [PATCH 02/22] alpha/cpu: Make sure arch_cpu_idle_dead() doesn't return Date: Fri, 3 Feb 2023 14:05:11 -0800 Message-Id: <543dffab94755ae8460b22e273213cbb9a72a173.1675461757.git.jpoimboe@kernel.org> X-Mailer: git-send-email 2.39.0 In-Reply-To: References: MIME-Version: 1.0 Content-type: text/plain X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS 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?1756849296299855144?= X-GMAIL-MSGID: =?utf-8?q?1756849296299855144?= arch_cpu_idle_dead() 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. Signed-off-by: Josh Poimboeuf --- arch/alpha/kernel/process.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/alpha/kernel/process.c b/arch/alpha/kernel/process.c index 4813172547b5..94938f856545 100644 --- a/arch/alpha/kernel/process.c +++ b/arch/alpha/kernel/process.c @@ -63,6 +63,7 @@ void arch_cpu_idle(void) void arch_cpu_idle_dead(void) { wtint(INT_MAX); + BUG(); } #endif /* ALPHA_WTINT */ From patchwork Fri Feb 3 22:05:12 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Josh Poimboeuf X-Patchwork-Id: 52669 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp1079977wrn; Fri, 3 Feb 2023 14:07:23 -0800 (PST) X-Google-Smtp-Source: AK7set9jHFMmyybkU1PAWK3E1Z5ndfppwwshIlN74WNcNfTbFT7topk++oU9mgTyZe77tyBlMa4Y X-Received: by 2002:a17:90a:185:b0:230:66c8:3e15 with SMTP id 5-20020a17090a018500b0023066c83e15mr6003561pjc.3.1675462043590; Fri, 03 Feb 2023 14:07:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675462043; cv=none; d=google.com; s=arc-20160816; b=V62Q9MCY+LZ85jmlB5bIX5sbNwQL/WOUz2Hhp83LXMg1iu5UnCXfKliILFY5WtDn3D VyQkmRjZrEZnXdJtLoo8aPaHLQKFr2dspmdO4thrT7NVAbPz6tl6X9Yv8RsP5kJYbplL l2HPj/HON2I99d0Mt4Y6B2OEHka+1NnxNy4yIPlYP4iSO0IAzMgjnetomfTDtaApG99n K9mBVq/HoaSL0ZTpYyF7GJWL75SpSWXFXYXLU+cFLphA574X75oYEyJzH3XkhwHvXCOL F6XHXtbbWHAqdZegY+DAq3R38hi//dl7RkyfZO1tV9mneFYllWWIlSAwLkIPVkF16ZrY 1ZJA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=SBQ+RTqi0RcF18ZSna+5hPIdkwEW0xnL/rAxr57XCWE=; b=nGITIQcFlobbUE9G+aZqjzwhgbz3J0EODrE+I5ih3QtF7OLZk5OGOg3QwjJOaJTc8r SkE0Hq7+/mLsihMfssrXlIuLNrKyTAlHRt9cbZoT2VElUP6r2l2FoWX0Ikl9Zay3VNJ5 okxvUbquR/LdOJWQAfqYir6UM/lEZ8xINLhaM0zPJb4G+XUU48k23+htF1Oi8JtYJeDM 4q9fAUjTP68dMqDO3K7/GH0udgtKsiOBcvx5hzR3jhZZlnuY2gEgU9mSZsJWvn6zy0iR Rm+tHU3U+pA3CxMCJfp7CVCIikxsSldOpzkIFt7mS/xV19AZNO7sk7Sji1OG2hWySrL6 NK9g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Z3i2Svvz; 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=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h1-20020a17090a580100b0023035600c54si3704370pji.84.2023.02.03.14.07.10; Fri, 03 Feb 2023 14:07:23 -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=@kernel.org header.s=k20201202 header.b=Z3i2Svvz; 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=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231205AbjBCWFy (ORCPT + 99 others); Fri, 3 Feb 2023 17:05:54 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56320 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233901AbjBCWFs (ORCPT ); Fri, 3 Feb 2023 17:05:48 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C66C8AB5D6; Fri, 3 Feb 2023 14:05:47 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 61F7062024; Fri, 3 Feb 2023 22:05:47 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1B087C433AC; Fri, 3 Feb 2023 22:05:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1675461946; bh=b34U778UNXN7FRC5Ic8t90JQ9Tx7F3W870Rcd50IB6g=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Z3i2Svvz2DgckJMayCk0gnjzplyWv/xWz4lNF/4iQturQRPy9bpRXkh6LHKDE0VTj hLT80F7fD7LkSFDdo5XVfokUo2iYIZIkb6RfMG4ZOdTlIUUKJz7jxdNBXJhwhDJi7k TtZBctqmDSxTE/uROnYS1JbhnFDadTX80kk2WDbnIWma9DW9nR8COcEuQ+AJZyfnGM 43FlnaF2H3EggZw3KAqoB2U390Knt/al5l2dzI1AD5mqnBV8xoNTaf+0YclHPcnzYS 7yH77W1niwbTQwyCnpJgLEmtK0D79wQ1JvuUdroyJZVYC4GQi6U4CJfIOFQxXXFLMP YxbeNerpjAahQ== From: Josh Poimboeuf To: linux-kernel@vger.kernel.org Cc: jgross@suse.com, richard.henderson@linaro.org, ink@jurassic.park.msu.ru, mattst88@gmail.com, linux-alpha@vger.kernel.org, linux@armlinux.org.uk, linux-arm-kernel@lists.infradead.org, catalin.marinas@arm.com, will@kernel.org, guoren@kernel.org, linux-csky@vger.kernel.org, linux-ia64@vger.kernel.org, chenhuacai@kernel.org, kernel@xen0n.name, loongarch@lists.linux.dev, f.fainelli@gmail.com, bcm-kernel-feedback-list@broadcom.com, tsbogend@alpha.franken.de, linux-mips@vger.kernel.org, jiaxun.yang@flygoat.com, mpe@ellerman.id.au, npiggin@gmail.com, christophe.leroy@csgroup.eu, linuxppc-dev@lists.ozlabs.org, ysato@users.sourceforge.jp, dalias@libc.org, linux-sh@vger.kernel.org, davem@davemloft.net, sparclinux@vger.kernel.org, tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, dave.hansen@linux.intel.com, x86@kernel.org, hpa@zytor.com, chris@zankel.net, jcmvbkbc@gmail.com, linux-xtensa@linux-xtensa.org, peterz@infradead.org, juri.lelli@redhat.com, vincent.guittot@linaro.org, dietmar.eggemann@arm.com, rostedt@goodmis.org, bsegall@google.com, mgorman@suse.de, bristot@redhat.com, vschneid@redhat.com, paulmck@kernel.org Subject: [PATCH 03/22] arm/cpu: Make sure arch_cpu_idle_dead() doesn't return Date: Fri, 3 Feb 2023 14:05:12 -0800 Message-Id: <5ef67c263f7602d0accfe7b50805a7eb576618c0.1675461757.git.jpoimboe@kernel.org> X-Mailer: git-send-email 2.39.0 In-Reply-To: References: MIME-Version: 1.0 Content-type: text/plain X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS 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?1756849287816042197?= X-GMAIL-MSGID: =?utf-8?q?1756849287816042197?= arch_cpu_idle_dead() 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. Signed-off-by: Josh Poimboeuf --- arch/arm/kernel/smp.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm/kernel/smp.c b/arch/arm/kernel/smp.c index 0b8c25763adc..adcd417c526b 100644 --- a/arch/arm/kernel/smp.c +++ b/arch/arm/kernel/smp.c @@ -382,6 +382,8 @@ void arch_cpu_idle_dead(void) : "r" (task_stack_page(current) + THREAD_SIZE - 8), "r" (current) : "r0"); + + BUG(); } #endif /* CONFIG_HOTPLUG_CPU */ From patchwork Fri Feb 3 22:05:13 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Josh Poimboeuf X-Patchwork-Id: 52681 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp1080493wrn; Fri, 3 Feb 2023 14:08:41 -0800 (PST) X-Google-Smtp-Source: AK7set+FQZUzwnxtXEU1gR0w/cRn2aUNIihLvZnWfrgOhXAuH+hj0BzbdxOtaG7as3xwsxsKxPcQ X-Received: by 2002:a05:6a20:aa93:b0:bd:c7b2:725e with SMTP id ck19-20020a056a20aa9300b000bdc7b2725emr10683382pzb.22.1675462121074; Fri, 03 Feb 2023 14:08:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675462121; cv=none; d=google.com; s=arc-20160816; b=R99tJ3DRFhpNOIbhCBY8AYMMdxpkKP6WxFDpcF/8nQ9gXosqBcXyrVQsOmx5dQDNVH gN+t3NgzL/WhkrMAiJXIRzId76gIYe6Ls5scCemdu8Zn0K9UTVYeqj4v9ZTDyI9gDimF YTKkvSzeVA2nSABmS3gwtcb1IIjymszkaLw9TURGn2tb5JB6+DilzP6gHh5n19Hv5YRN 0mkTf+Wy2HZsahUpjZGPoA89bBIihbGk6SIav8+YhdaY4hKYdD2kmT/f9hEgh8oZzjDI mVudeGLczjpYoi1WlyVV3XaeEWyTCAlYoOpZQ4xDTDi1HbcAiBpXhjJkeYdFPukSeZ6W 0Siw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=vfwwCAaEnFOVl7QXDi/38mMgtopLSSoi0IfOCPAEG2M=; b=gKWMAamnWH4NaUme9c7835awFEcps44WRu1zFR9hgT8fA1NOsoBLMMn2Xme53T4ISt ATPSbeBekcTGJDAMfClJ28NXHl6i8SxCGuQ8yj90GTMmfe2TT5dt/PdhdbWbdFqdoh8k 2BYAk6fcUEC+UwS1Ekprry6Hxpv5QKQP4EhHnrAEjNdfllSijsfTYzyQotKsJsTAKh/8 p0zMOdb9XtQeSRok8BD2sONnP/npsPbybLY/Rh3YZLleRPXGa744X2yFY8HDpstYWVdG mE5yAZiLjSePGRS3gO8rx6tB2ijaV9tVRN7KaCZs/D7kYSk8tqluUbvP4Lskud03RDyJ PqvA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=mDs+6rDG; 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=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t30-20020a63b25e000000b004cf0cc0dc35si3817132pgo.874.2023.02.03.14.08.28; Fri, 03 Feb 2023 14:08:41 -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=@kernel.org header.s=k20201202 header.b=mDs+6rDG; 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=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232593AbjBCWGB (ORCPT + 99 others); Fri, 3 Feb 2023 17:06:01 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56372 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230114AbjBCWFv (ORCPT ); Fri, 3 Feb 2023 17:05:51 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E8FDCA77BC; Fri, 3 Feb 2023 14:05:49 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 4667F62024; Fri, 3 Feb 2023 22:05:49 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id F222EC433A7; Fri, 3 Feb 2023 22:05:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1675461948; bh=IUG7346ru2LIaCtxjax/xlHvBhlssHCzq8SttudiekY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mDs+6rDG1dzYFDAxIKMUYCPpuI8xVxCk4vK7vY7SgBBbS+9M4fpuTaBD9RlOR4IpY 5NXqrjuw9ORKV94tm3vuwmSTrBJxoFJCTyK0InA92qEFqLJwQgCoGOouJ+2PtAAGkB tywZI2GzgHL8sm2n0h5hvEG303bBDNv1IbORapWkTJr9KSjXUHNAj+2yMiIMNQdWSe UL3lPmOXr1Dvb5uH4eKO4vP0s+38mGzfgCc7Dw5nVS3fnY1BCp6vQo477htt3OULlx 6ruyxQleCq0SasoQbj3h1mZCK0oMuduqz7cDOi0p2JVDR54NP7OttRvDrXst1X78to FA+WZR+13rHMw== From: Josh Poimboeuf To: linux-kernel@vger.kernel.org Cc: jgross@suse.com, richard.henderson@linaro.org, ink@jurassic.park.msu.ru, mattst88@gmail.com, linux-alpha@vger.kernel.org, linux@armlinux.org.uk, linux-arm-kernel@lists.infradead.org, catalin.marinas@arm.com, will@kernel.org, guoren@kernel.org, linux-csky@vger.kernel.org, linux-ia64@vger.kernel.org, chenhuacai@kernel.org, kernel@xen0n.name, loongarch@lists.linux.dev, f.fainelli@gmail.com, bcm-kernel-feedback-list@broadcom.com, tsbogend@alpha.franken.de, linux-mips@vger.kernel.org, jiaxun.yang@flygoat.com, mpe@ellerman.id.au, npiggin@gmail.com, christophe.leroy@csgroup.eu, linuxppc-dev@lists.ozlabs.org, ysato@users.sourceforge.jp, dalias@libc.org, linux-sh@vger.kernel.org, davem@davemloft.net, sparclinux@vger.kernel.org, tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, dave.hansen@linux.intel.com, x86@kernel.org, hpa@zytor.com, chris@zankel.net, jcmvbkbc@gmail.com, linux-xtensa@linux-xtensa.org, peterz@infradead.org, juri.lelli@redhat.com, vincent.guittot@linaro.org, dietmar.eggemann@arm.com, rostedt@goodmis.org, bsegall@google.com, mgorman@suse.de, bristot@redhat.com, vschneid@redhat.com, paulmck@kernel.org Subject: [PATCH 04/22] arm64/cpu: Mark cpu_die() __noreturn Date: Fri, 3 Feb 2023 14:05:13 -0800 Message-Id: X-Mailer: git-send-email 2.39.0 In-Reply-To: References: MIME-Version: 1.0 Content-type: text/plain X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS 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?1756849369318729487?= X-GMAIL-MSGID: =?utf-8?q?1756849369318729487?= cpu_die() doesn't return. Annotate it as such. By extension this also makes arch_cpu_idle_dead() noreturn. Signed-off-by: Josh Poimboeuf --- arch/arm64/include/asm/smp.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm64/include/asm/smp.h b/arch/arm64/include/asm/smp.h index fc55f5a57a06..5733a31bab08 100644 --- a/arch/arm64/include/asm/smp.h +++ b/arch/arm64/include/asm/smp.h @@ -100,7 +100,7 @@ static inline void arch_send_wakeup_ipi_mask(const struct cpumask *mask) extern int __cpu_disable(void); extern void __cpu_die(unsigned int cpu); -extern void cpu_die(void); +extern void __noreturn cpu_die(void); extern void cpu_die_early(void); static inline void cpu_park_loop(void) From patchwork Fri Feb 3 22:05:14 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Josh Poimboeuf X-Patchwork-Id: 52682 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp1080491wrn; Fri, 3 Feb 2023 14:08:41 -0800 (PST) X-Google-Smtp-Source: AK7set+aAnmpoxcKhLUU3beKzQUjIuOq2k+VYd5lqTR61aZLcff/MxIMGkH91NjrDuMC56rZN51w X-Received: by 2002:a62:1dc2:0:b0:592:4502:fb0 with SMTP id d185-20020a621dc2000000b0059245020fb0mr10940504pfd.0.1675462120877; Fri, 03 Feb 2023 14:08:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675462120; cv=none; d=google.com; s=arc-20160816; b=iNgcErg0SaJKmCsbX0j4Mt/tZHbgcWhYEIJn7C+6WUUsXx9N08VpRc7uoT0E+osE4r S5D2/CyRnJVr3vuphnj5DnQGgR00kvHjk2EeV9De40qtfbj3hbCZv0+/hq6uCT+MpXvc r/erfSwJo5dHKUun+lXOE5kfjxKAuqg6T+GBAOdgsdzdAZzmPaXv8s/bwagA2UKMW2vc eOSf3p1vqMvM1hz2zpTZjKqz+tA514wYiwE+JW86uVmk5zrRNe/vz3xLcxEP26pvXSLa ykuT6iPX4C+3wRnKtnReEU1t+THZu1OipUqYS3EXw6rJ6EOHNYPdRnhCSEyBsBpcbXOu 87Sw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=hlV1IOqgC/IRgshViIND178CsmpcnlF2zLWoTjFMsPk=; b=cUGXFox/C4blhX0AySMV5W9nIFqhBBzBK0BWdyKDHWguarDNkZkFgeIRiEJSwcV6fd CcQbCLIhhAVnphkr4EQeTImYhuE5zW3IxlpLPEngQr2w8n0Phxd8pKfEUoSAcUPsAUZm wL8u//yQw2KqJM/lpIq/+JoCmsmKR9bpiILkw8XkxGFRMuGKg+67S05APDIFXod77+eL 2yyjuLeyhBpUjJt200ZW774nuiSQzi2NevTdFe/cUl/zcAjfWszTKqrXtum2abd7Nr+6 4va92ZzNOdGceVJ1yV8aBpGGIAweACvpPF5wi+b39m2es7z2Cp1s/0pYEvytjR5EbW/K G62Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=YE3hiGii; 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=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x16-20020a056a00189000b0058db504f977si4141392pfh.294.2023.02.03.14.08.27; Fri, 03 Feb 2023 14:08:40 -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=@kernel.org header.s=k20201202 header.b=YE3hiGii; 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=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233187AbjBCWGE (ORCPT + 99 others); Fri, 3 Feb 2023 17:06:04 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56490 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233935AbjBCWFy (ORCPT ); Fri, 3 Feb 2023 17:05:54 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 47833AB5DE; Fri, 3 Feb 2023 14:05:53 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id EF6F5B82C32; Fri, 3 Feb 2023 22:05:51 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D9FD4C4339C; Fri, 3 Feb 2023 22:05:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1675461950; bh=bmnsttKFT2vt8nGO3aA3GL09+qkDKrC1WcjQyEBFYe0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=YE3hiGiiwH26Qr/K5PJOS+hNPeo3XuuCzqosW8oIqc0E3EJH0XGyBuNtXvJJ+SDrq JWmWDQWlcs+rYmML0rmuGU0SgDAh8zsWcPGWR/IeV9EOploqiQQdVC6qQ3Mjd98Kkp qRir1VJnOqGiyahlKVWc3Q3eeabaKpe08lyVFr75tS/LESPPL1b4z/fZbqVUOKw35u FmxMJjAAFN4EIAdXWaTf/CNUOG+n3QxS4Ayq9xfsJ63ylTjRXx8FH6ZqSSf9B9zOjo Do4XcGJmVDfvZbC1YhgBETGpx9fbFkRBfVkORFUvu04PjtpY5bUIjcbGas4InxOYCL W7lQoYSaYIxBA== From: Josh Poimboeuf To: linux-kernel@vger.kernel.org Cc: jgross@suse.com, richard.henderson@linaro.org, ink@jurassic.park.msu.ru, mattst88@gmail.com, linux-alpha@vger.kernel.org, linux@armlinux.org.uk, linux-arm-kernel@lists.infradead.org, catalin.marinas@arm.com, will@kernel.org, guoren@kernel.org, linux-csky@vger.kernel.org, linux-ia64@vger.kernel.org, chenhuacai@kernel.org, kernel@xen0n.name, loongarch@lists.linux.dev, f.fainelli@gmail.com, bcm-kernel-feedback-list@broadcom.com, tsbogend@alpha.franken.de, linux-mips@vger.kernel.org, jiaxun.yang@flygoat.com, mpe@ellerman.id.au, npiggin@gmail.com, christophe.leroy@csgroup.eu, linuxppc-dev@lists.ozlabs.org, ysato@users.sourceforge.jp, dalias@libc.org, linux-sh@vger.kernel.org, davem@davemloft.net, sparclinux@vger.kernel.org, tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, dave.hansen@linux.intel.com, x86@kernel.org, hpa@zytor.com, chris@zankel.net, jcmvbkbc@gmail.com, linux-xtensa@linux-xtensa.org, peterz@infradead.org, juri.lelli@redhat.com, vincent.guittot@linaro.org, dietmar.eggemann@arm.com, rostedt@goodmis.org, bsegall@google.com, mgorman@suse.de, bristot@redhat.com, vschneid@redhat.com, paulmck@kernel.org Subject: [PATCH 05/22] csky/cpu: Make sure arch_cpu_idle_dead() doesn't return Date: Fri, 3 Feb 2023 14:05:14 -0800 Message-Id: X-Mailer: git-send-email 2.39.0 In-Reply-To: References: MIME-Version: 1.0 Content-type: text/plain X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS 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?1756849368788201136?= X-GMAIL-MSGID: =?utf-8?q?1756849368788201136?= arch_cpu_idle_dead() 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. Signed-off-by: Josh Poimboeuf Acked-by: Guo Ren --- arch/csky/kernel/smp.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/csky/kernel/smp.c b/arch/csky/kernel/smp.c index b45d1073307f..0ec20efaf5fd 100644 --- a/arch/csky/kernel/smp.c +++ b/arch/csky/kernel/smp.c @@ -317,5 +317,7 @@ void arch_cpu_idle_dead(void) "jmpi csky_start_secondary" : : "r" (secondary_stack)); + + BUG(); } #endif From patchwork Fri Feb 3 22:05:15 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Josh Poimboeuf X-Patchwork-Id: 52672 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp1080095wrn; Fri, 3 Feb 2023 14:07:42 -0800 (PST) X-Google-Smtp-Source: AK7set/qdr2w3nY7z1cVm5WLMVCA6GCcJMiovW4XyoKH+vwsQEVxaP0M5AM4wR2RFNGdY3RtgNu8 X-Received: by 2002:a05:6a20:7fa0:b0:bc:c2a0:7811 with SMTP id d32-20020a056a207fa000b000bcc2a07811mr17084184pzj.48.1675462061693; Fri, 03 Feb 2023 14:07:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675462061; cv=none; d=google.com; s=arc-20160816; b=md8eyJKU4BVu+CkFXGX703LSQEsJC7vyD+Pj3COuQGGeI/R59VV7UDG5QT7dug/P+i RWlzYUJV9MeWZl7T9mJn4qXPSZJvyaQLeYHfZ7TA+SW8QUpV2lYOFGXlJlpv/eYdXMRd vKggnY50mLiEMdzQmTpu27LzOBLonWJDzNWuX2vz222M0hyS47yNoUwI0Uzuit98tqGs pLI3qYblMsML5p4Ksg0iFbRgNUNDdXrcCMxMxENgxGbXyvPlWLLalWLa+yYZPbW/oJ4H 9qbrkv6/IrAIjFikH/Tfhox5eB4FdYn8EIH2bl+eCfUSpB+iH6cXSzPsVVEk3U+dzQ+R lT6w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=7Dymd7p1LwrWQL4lstrHyi9fZFZzQCgb9n6zhYAkh7Y=; b=IiC2tsOuDhLbvq5Z+vAJwueORtkm3fFQO+S52Kemlksy1OGrvKO6oSETUcLFEi+0RO 47S5y/3L+6YqdWqw5dYS7ntsqbUYhH/84N4aG0jJsbCVKr7qatD4tkU68KPvCR7D00Cn +skCIoC2XHWj1ykUzoazipQQZErYBtfqICvoOXARV0ALpiVxgbiWaF/4r83hMBYHDzJt uBl4TAU4NBgmBeZ+2E5byCTvCuvjhxh7fT4GuTUYHpBVofxaLIXp1FptGtuBq8VdiFrv poSu01xZXehsaXvqp0LztFt0OjnZVjgsn3v8LKowrW0Y8EWLx9IzI51LrrhnQCYu2oVy cqlw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=KXcNjXr1; 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=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w5-20020a63a745000000b004e1bf0dbe7esi3688159pgo.477.2023.02.03.14.07.29; Fri, 03 Feb 2023 14:07:41 -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=@kernel.org header.s=k20201202 header.b=KXcNjXr1; 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=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233456AbjBCWGd (ORCPT + 99 others); Fri, 3 Feb 2023 17:06:33 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56446 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233944AbjBCWF4 (ORCPT ); Fri, 3 Feb 2023 17:05:56 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2BC74AE863; Fri, 3 Feb 2023 14:05:55 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id D7CDFB82C2C; Fri, 3 Feb 2023 22:05:53 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C77A1C433AC; Fri, 3 Feb 2023 22:05:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1675461952; bh=RidcRJTauwsqeDLmerjxLqYVUI6XglY5CdcD8pSGztk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=KXcNjXr1EZwGdeCXF6ct6qrEpj3XinY2X/TflAyD28fSnn1mIajf3vnubeZTGtUQl l0yW410nwCLxoQgmdOi/cbdDfcTaTxEU5p3jduOutHsGegq8ZkNTFQpISTnoZsLy+P QJnNOP7BHtikfMhdewJX2qeGyqyndO4WiZFm7Hw5CT9gPoXGP1c8PNd9LJWkPnyEf5 hkukFHzBIj0I5cMXibGKpPgHvkLlY++ZIYHcgNg8m5O45ONtbFtyexgjlNUBk3ArXY 2hvh9/Uq9Yk9bB50FB/IDGjk6U8WNpCVvt4vC6pZpbS7VMSsHlXGeiL3pK6jZtLrun QX2FcRMDD2dFQ== From: Josh Poimboeuf To: linux-kernel@vger.kernel.org Cc: jgross@suse.com, richard.henderson@linaro.org, ink@jurassic.park.msu.ru, mattst88@gmail.com, linux-alpha@vger.kernel.org, linux@armlinux.org.uk, linux-arm-kernel@lists.infradead.org, catalin.marinas@arm.com, will@kernel.org, guoren@kernel.org, linux-csky@vger.kernel.org, linux-ia64@vger.kernel.org, chenhuacai@kernel.org, kernel@xen0n.name, loongarch@lists.linux.dev, f.fainelli@gmail.com, bcm-kernel-feedback-list@broadcom.com, tsbogend@alpha.franken.de, linux-mips@vger.kernel.org, jiaxun.yang@flygoat.com, mpe@ellerman.id.au, npiggin@gmail.com, christophe.leroy@csgroup.eu, linuxppc-dev@lists.ozlabs.org, ysato@users.sourceforge.jp, dalias@libc.org, linux-sh@vger.kernel.org, davem@davemloft.net, sparclinux@vger.kernel.org, tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, dave.hansen@linux.intel.com, x86@kernel.org, hpa@zytor.com, chris@zankel.net, jcmvbkbc@gmail.com, linux-xtensa@linux-xtensa.org, peterz@infradead.org, juri.lelli@redhat.com, vincent.guittot@linaro.org, dietmar.eggemann@arm.com, rostedt@goodmis.org, bsegall@google.com, mgorman@suse.de, bristot@redhat.com, vschneid@redhat.com, paulmck@kernel.org Subject: [PATCH 06/22] ia64/cpu: Mark play_dead() __noreturn Date: Fri, 3 Feb 2023 14:05:15 -0800 Message-Id: <23142556bf02b84f108e17cda731d48449ce1532.1675461757.git.jpoimboe@kernel.org> X-Mailer: git-send-email 2.39.0 In-Reply-To: References: MIME-Version: 1.0 Content-type: text/plain X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS 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?1756849307034102172?= X-GMAIL-MSGID: =?utf-8?q?1756849307034102172?= play_dead() doesn't return. Annotate it as such. By extension this also makes arch_cpu_idle_dead() noreturn. Signed-off-by: Josh Poimboeuf --- arch/ia64/kernel/process.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/ia64/kernel/process.c b/arch/ia64/kernel/process.c index f6195a0a00ae..78f5794b2dde 100644 --- a/arch/ia64/kernel/process.c +++ b/arch/ia64/kernel/process.c @@ -201,7 +201,7 @@ __setup("nohalt", nohalt_setup); #ifdef CONFIG_HOTPLUG_CPU /* We don't actually take CPU down, just spin without interrupts. */ -static inline void play_dead(void) +static inline void __noreturn play_dead(void) { unsigned int this_cpu = smp_processor_id(); @@ -219,7 +219,7 @@ static inline void play_dead(void) BUG(); } #else -static inline void play_dead(void) +static inline void __noreturn play_dead(void) { BUG(); } From patchwork Fri Feb 3 22:05:16 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Josh Poimboeuf X-Patchwork-Id: 52673 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp1080102wrn; Fri, 3 Feb 2023 14:07:42 -0800 (PST) X-Google-Smtp-Source: AK7set93bQha9vQT3RI1qWRBGx+dOFGf9wYpSxd1B0Um9OmujKpolATt3H+WlDPeubKpfB+euzMG X-Received: by 2002:a17:902:d0ca:b0:198:efb7:a3ce with SMTP id n10-20020a170902d0ca00b00198efb7a3cemr501133pln.57.1675462062580; Fri, 03 Feb 2023 14:07:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675462062; cv=none; d=google.com; s=arc-20160816; b=WKtJS/Undu6pSvLKzzPtIYd42qWQym09MjK0fB6OqDzcGRUUVqivwtlRf3fAqeRhf3 +NlmHjd8IgX+UXol7uyVs/zth9dmK/8349F7wCap4pv8Xslh+FuWN44R3P9KMvThQlry iK/6kbsfaX5DqLhsQaM3UP3PfrWK3M+j3cumFhum4CcflJPcmBscBLlXgb8re/LOWCKL beUTUAhD54ss1F3T3rs56lglXLk+Up36Q30C95hh0EYE3TPC2NZeRUgcReWizPZPOCvw vOFmHCL3uqWkizP8NdB6h6/dE/X/8ugLwYSwCHUblF0CA8E+6X+pL84H4fHe7Fdq/HVh zmLw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=sm19sMmoDZgT24UZLjtTn4xF7YvWpUcQqJaGECYCAcQ=; b=CtrUpZ4xa9YlLiKbnS3yqInGqDBgjvHQMYS+KmDgnw5mBlPiC7qM3j24OqqONySko3 10scNpZviCcZ23M9fqOjhlNReuGkN7yurCGXj98hc8qyS3SY+O8ve0a6fADbIkKmsbZE t7cBZ5Z09rfATHZtijIdbVzTLdaRnCoqn803oT+iSDBzBAvP3TtVAtWkN4prLv2GMWxx EMofci8ABOkdZto8IwfsZoSOfFNY/4CxGpqQWZ/TYjkIdvE7ezNVrRf7oz7GPF0y763X yy47j+sUoM4tHPJlorW5gmUJVQYcSazAQiQn++XI5Visamwp8qwq6KoLV6kbK9YawJ30 ysKQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=EDbJ111u; 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=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 2-20020a170902c20200b0019317affa0dsi3303174pll.275.2023.02.03.14.07.30; Fri, 03 Feb 2023 14:07:42 -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=@kernel.org header.s=k20201202 header.b=EDbJ111u; 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=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233975AbjBCWGk (ORCPT + 99 others); Fri, 3 Feb 2023 17:06:40 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56428 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233958AbjBCWF6 (ORCPT ); Fri, 3 Feb 2023 17:05:58 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 00299AF0DD; Fri, 3 Feb 2023 14:05:56 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id AF36AB82C31; Fri, 3 Feb 2023 22:05:55 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id AFBCDC43333; Fri, 3 Feb 2023 22:05:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1675461954; bh=Nv4dCsRjZPJcR8Ogp1/tV2KDCC1o8+1g518bJ1o/vGk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=EDbJ111u3eCADaYKD54CpyZ0JMmqpOrzzMmnYjXzHZSsYrm/4CYyey2Z0wcm3Ug+i /wWTyRNufqtNN6FOu+4L4eJ5OWCxVh8O3T+8tp9PjOInweU1pbJeTJNuIlbkzad5f+ RGO/mzCZqaY3L+eYlLP4NxS9DPtcMKLHu9uOv6zqaV3nY1TK51Jj8i1APul/ewp0jQ VD5lhy+pfciXqGOTF81kCW9d5/GVuwdYAQQFFK4SbiHpSoFhV8oiJ7M5QGRozfNCnL VVODqRRYWtF0ME1xhs1u28HfcEyYdPw4BuNvmzLEotDSzhpKoG3CmU5LVplR+SCqRH MkVSqOzYgRMYw== From: Josh Poimboeuf To: linux-kernel@vger.kernel.org Cc: jgross@suse.com, richard.henderson@linaro.org, ink@jurassic.park.msu.ru, mattst88@gmail.com, linux-alpha@vger.kernel.org, linux@armlinux.org.uk, linux-arm-kernel@lists.infradead.org, catalin.marinas@arm.com, will@kernel.org, guoren@kernel.org, linux-csky@vger.kernel.org, linux-ia64@vger.kernel.org, chenhuacai@kernel.org, kernel@xen0n.name, loongarch@lists.linux.dev, f.fainelli@gmail.com, bcm-kernel-feedback-list@broadcom.com, tsbogend@alpha.franken.de, linux-mips@vger.kernel.org, jiaxun.yang@flygoat.com, mpe@ellerman.id.au, npiggin@gmail.com, christophe.leroy@csgroup.eu, linuxppc-dev@lists.ozlabs.org, ysato@users.sourceforge.jp, dalias@libc.org, linux-sh@vger.kernel.org, davem@davemloft.net, sparclinux@vger.kernel.org, tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, dave.hansen@linux.intel.com, x86@kernel.org, hpa@zytor.com, chris@zankel.net, jcmvbkbc@gmail.com, linux-xtensa@linux-xtensa.org, peterz@infradead.org, juri.lelli@redhat.com, vincent.guittot@linaro.org, dietmar.eggemann@arm.com, rostedt@goodmis.org, bsegall@google.com, mgorman@suse.de, bristot@redhat.com, vschneid@redhat.com, paulmck@kernel.org Subject: [PATCH 07/22] loongarch/cpu: Make sure play_dead() doesn't return Date: Fri, 3 Feb 2023 14:05:16 -0800 Message-Id: <054ac5118731ae340a8bb7026a15ab78bf57ae89.1675461757.git.jpoimboe@kernel.org> X-Mailer: git-send-email 2.39.0 In-Reply-To: References: MIME-Version: 1.0 Content-type: text/plain X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS 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?1756849307357689706?= X-GMAIL-MSGID: =?utf-8?q?1756849307357689706?= play_dead() 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. Signed-off-by: Josh Poimboeuf --- arch/loongarch/kernel/smp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/loongarch/kernel/smp.c b/arch/loongarch/kernel/smp.c index 8c6e227cb29d..51f328169a7b 100644 --- a/arch/loongarch/kernel/smp.c +++ b/arch/loongarch/kernel/smp.c @@ -336,7 +336,7 @@ void play_dead(void) iocsr_write32(0xffffffff, LOONGARCH_IOCSR_IPI_CLEAR); init_fn(); - unreachable(); + BUG(); } #endif From patchwork Fri Feb 3 22:05:17 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Josh Poimboeuf X-Patchwork-Id: 52671 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp1080096wrn; Fri, 3 Feb 2023 14:07:42 -0800 (PST) X-Google-Smtp-Source: AK7set+pA3pt2iKxV/fOMUQSUavedsG5vunGqAm8i8DSm6oQg6RpJb757LEpahd7FvC+h3Z1Ngqm X-Received: by 2002:a17:90b:3d0d:b0:230:3af9:172 with SMTP id pt13-20020a17090b3d0d00b002303af90172mr5298507pjb.3.1675462061861; Fri, 03 Feb 2023 14:07:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675462061; cv=none; d=google.com; s=arc-20160816; b=tbvw7FwXRHDkNNuXTDQUSCKU5+/pIxZ0/R665KPYRdkuQpULklXr4SiNU9E7peuDEQ Uqgs3IWYKdQuOW+f8RKx1Hb/zuYYgNRJbzDr7aj+/BWbZS/QGlesW1MKbf9YNfj9qc1R eTvqIlP5vxt44hryBRoHakG4XZG9iI4Jlqa8mIkDOR9eiTW2kXDqODxp5RpmRClISoRy hUpQBdioGABRh1xDMzWUivdUoQXoEnSyl+xXXvYlz1PoKrvXl8I2EMyFGZC4+tCzIB5+ Bq4WK9iosUz5jrXFqPDhfvKwZ4PFANqMFYxyDtauY581F3tQA+ODnnzbiVY8r2s0rg2P Wrlg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=3POz9k3exTx05Nizq3DKsnPrbhTZirwwzae5sq3euqw=; b=I3JCO3TZnxytqMbs6joAfj/2OH2BGa37VfKxbX/Cm7ViCkmL14RMakUfwDoUDmuaWf SFIYisdum1Ah3dt8JDEZnZcAcOCb+xTYtSAywOdI5IIVCntz7wox2e87of27tKos4EYV hq1F3CYmQQ3gNqGkixywrZ+2ZbSeAuvFdhci9m8MPc/72xMu4qrQxmWAjBxC5CAPBu7T mjetSCW0Xiu/HBCFi2HJtdlnv2iAYcsBTE9ODZUztrRw7kgaI5RykE31JGc2DF3y4xAp ntdaofETw0u2vKX3cdR5GzMirTivbT0HIA7Gp+PhBYQ93/S7suPDJOOeC7xkQ+LxAZC9 7BHQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=tptDeVHq; 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=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ci17-20020a17090afc9100b0022981e2b4c6si8845062pjb.150.2023.02.03.14.07.29; Fri, 03 Feb 2023 14:07:41 -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=@kernel.org header.s=k20201202 header.b=tptDeVHq; 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=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233959AbjBCWGh (ORCPT + 99 others); Fri, 3 Feb 2023 17:06:37 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56654 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233960AbjBCWF6 (ORCPT ); Fri, 3 Feb 2023 17:05:58 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7C3A6AF0F4; Fri, 3 Feb 2023 14:05:57 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id D802562029; Fri, 3 Feb 2023 22:05:56 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8EA0FC4339C; Fri, 3 Feb 2023 22:05:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1675461956; bh=c/F3dYyrvAqz6wprj56ksl9t+Sypivhl5og5kpg5L6s=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=tptDeVHqMjvz4+S0iYtQ6xPGjXx4/3Ccw0/deBnVQWH7nF/I1PUzMSxGVylz0Dgty AzsbQwHn8cZPxBUugokyhG+G0x2v6NoabtKRTQA82/NRgKmcfhf6btWGLkhuu4gvDr iPy6MN24l25pW+tYGwzziJgtrgbb/FUXeFjmOjDxILCnJVSlMUDQj2lEcR3JRnIesk Dw5PWj95Y97QxX9ZAyCSFBPbOnnhyZPRJSQlNLCo9O1M5lihchoQsVEP5LMfayPIdB kkNaXSVZQ/FMqtdgmpcj9piJkDTn0P0bTWRd5a6/2HOK7g3HyTWXT6NY4jitXMiTqa uDGktzLGFC0eg== From: Josh Poimboeuf To: linux-kernel@vger.kernel.org Cc: jgross@suse.com, richard.henderson@linaro.org, ink@jurassic.park.msu.ru, mattst88@gmail.com, linux-alpha@vger.kernel.org, linux@armlinux.org.uk, linux-arm-kernel@lists.infradead.org, catalin.marinas@arm.com, will@kernel.org, guoren@kernel.org, linux-csky@vger.kernel.org, linux-ia64@vger.kernel.org, chenhuacai@kernel.org, kernel@xen0n.name, loongarch@lists.linux.dev, f.fainelli@gmail.com, bcm-kernel-feedback-list@broadcom.com, tsbogend@alpha.franken.de, linux-mips@vger.kernel.org, jiaxun.yang@flygoat.com, mpe@ellerman.id.au, npiggin@gmail.com, christophe.leroy@csgroup.eu, linuxppc-dev@lists.ozlabs.org, ysato@users.sourceforge.jp, dalias@libc.org, linux-sh@vger.kernel.org, davem@davemloft.net, sparclinux@vger.kernel.org, tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, dave.hansen@linux.intel.com, x86@kernel.org, hpa@zytor.com, chris@zankel.net, jcmvbkbc@gmail.com, linux-xtensa@linux-xtensa.org, peterz@infradead.org, juri.lelli@redhat.com, vincent.guittot@linaro.org, dietmar.eggemann@arm.com, rostedt@goodmis.org, bsegall@google.com, mgorman@suse.de, bristot@redhat.com, vschneid@redhat.com, paulmck@kernel.org Subject: [PATCH 08/22] loongarch/cpu: Mark play_dead() __noreturn Date: Fri, 3 Feb 2023 14:05:17 -0800 Message-Id: <7b6c893031048242da4a7256cd5da876292b8abb.1675461757.git.jpoimboe@kernel.org> X-Mailer: git-send-email 2.39.0 In-Reply-To: References: MIME-Version: 1.0 Content-type: text/plain X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS 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?1756849306872679915?= X-GMAIL-MSGID: =?utf-8?q?1756849306872679915?= play_dead() doesn't return. Annotate it as such. By extension this also makes arch_cpu_idle_dead() noreturn. Signed-off-by: Josh Poimboeuf --- arch/loongarch/include/asm/smp.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/loongarch/include/asm/smp.h b/arch/loongarch/include/asm/smp.h index d82687390b4a..416b653bccb4 100644 --- a/arch/loongarch/include/asm/smp.h +++ b/arch/loongarch/include/asm/smp.h @@ -99,7 +99,7 @@ static inline void __cpu_die(unsigned int cpu) loongson_cpu_die(cpu); } -extern void play_dead(void); +extern void __noreturn play_dead(void); #endif #endif /* __ASM_SMP_H */ From patchwork Fri Feb 3 22:05:18 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Josh Poimboeuf X-Patchwork-Id: 52674 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp1080132wrn; Fri, 3 Feb 2023 14:07:49 -0800 (PST) X-Google-Smtp-Source: AK7set+rLjCWNnexdR33P7Eymm2JihMaDHi+B3RegJ2tJ7iF+oZitwiiUAeB7wKSjD1iHQlB8ZN9 X-Received: by 2002:a05:6a20:7d84:b0:be:b137:9d15 with SMTP id v4-20020a056a207d8400b000beb1379d15mr16008431pzj.36.1675462068708; Fri, 03 Feb 2023 14:07:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675462068; cv=none; d=google.com; s=arc-20160816; b=CBuj1ZER/8opoyL+uZrqkf6TrEKNekAh1R1wcb71HODy2ZM+rN5Sm6E7viQJNDORbS hyTuOBQK9d5sWfO64qhGEXcnEMtEc65M901ueVRNPYrSIn4fZFoatdfGhggUfx4WocS4 5zET3mES20oVHPdTZVgGJ5W88cw7W5MZuwYxJkjH/cl6sQhLRtfuRFnJYOexD0nHFxDb KjPtbP/2ZeOKL1lKtv5X2qu48MhLRlZsy161/aAUH5t6I8x9fg+ofYu3kw/tvPbsS5Vt K0kFIu5ah0HEJWZGt0KE8k5q4dVlCDJrqt7BGPBBOcfEmH4SfGO6OT5SbHKPHSAN4G7b 7aJA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=qDErEKvmB6ZaIIFT5k/fjIHkaaXMC42arfOskUA2gF4=; b=c1F3zo6flkabdyu4hyznzQShIe62k8bmoPITuK9WxlnuniatgGJXtfhg23lQltyTxY VYW78JldFWC7XbGUVSCkPiYOnIYQrfn6xw+P+Vcc9A43W+QpJ+KW7QCZiw4uao3JI8qA ZoSzzAn5Uv7IdLkJnpylNJlh3gk2Mdn1FDYnKh2Ia8eFGmxcoyaXl8Cx7JtUaFdef00F t4h//1E1zew8XOiA6wGaSdcX5l9ztD1QowaofPBWLUvTV6cyFoLNQhsb8e5MGKyi/s1m fw4Qn2HhWkw2RUg8THptuoxGOktdqHgmoZjPGQbssIF2R8xBQ8SsXyVmFdJradBd4fS9 iAGw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=bWyWlCGQ; 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=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id v5-20020a17090a458500b0023045a85186si3658384pjg.140.2023.02.03.14.07.36; Fri, 03 Feb 2023 14:07:48 -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=@kernel.org header.s=k20201202 header.b=bWyWlCGQ; 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=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233073AbjBCWHF (ORCPT + 99 others); Fri, 3 Feb 2023 17:07:05 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57710 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233568AbjBCWGa (ORCPT ); Fri, 3 Feb 2023 17:06:30 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 72628AF6A2; Fri, 3 Feb 2023 14:06:01 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 65018B82C2A; Fri, 3 Feb 2023 22:05:59 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7129AC433A7; Fri, 3 Feb 2023 22:05:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1675461958; bh=xE5ZmRzKMxAFPrHiSIoJTZlCDR5ti+ono/cm0PWjfeU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=bWyWlCGQ8ixOuALZdKCzLss/6SMXhh1P0jHxv5K8dz+pGFJWRKFe/rDpdYt/pbEBy Cv20t60IqNd4k2OPeeakryqDZQBCSnCIFbZYn4w8Wh4hZfyxfuwPiu4jwkipYMyAjx 3wjdyLJq2+oQSUZX9lPMnbCOK9kacUFdHpR/7gDTkVlFBlenq2ALG85m81cnxhAlqT DUmyvxZm4cJjdO0Y03EgNOuJPyX9ZAC+k2Whi2B9zytn0fu/YSFoO3CbU5ghN7eGNf AnlKFwVCJfplEUcEgqGsH3y9cSX006B8L7WqnSyPF5fCyXIzVXK57ufqsSU1oTeXrl yrsQBm2IXfrYQ== From: Josh Poimboeuf To: linux-kernel@vger.kernel.org Cc: jgross@suse.com, richard.henderson@linaro.org, ink@jurassic.park.msu.ru, mattst88@gmail.com, linux-alpha@vger.kernel.org, linux@armlinux.org.uk, linux-arm-kernel@lists.infradead.org, catalin.marinas@arm.com, will@kernel.org, guoren@kernel.org, linux-csky@vger.kernel.org, linux-ia64@vger.kernel.org, chenhuacai@kernel.org, kernel@xen0n.name, loongarch@lists.linux.dev, f.fainelli@gmail.com, bcm-kernel-feedback-list@broadcom.com, tsbogend@alpha.franken.de, linux-mips@vger.kernel.org, jiaxun.yang@flygoat.com, mpe@ellerman.id.au, npiggin@gmail.com, christophe.leroy@csgroup.eu, linuxppc-dev@lists.ozlabs.org, ysato@users.sourceforge.jp, dalias@libc.org, linux-sh@vger.kernel.org, davem@davemloft.net, sparclinux@vger.kernel.org, tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, dave.hansen@linux.intel.com, x86@kernel.org, hpa@zytor.com, chris@zankel.net, jcmvbkbc@gmail.com, linux-xtensa@linux-xtensa.org, peterz@infradead.org, juri.lelli@redhat.com, vincent.guittot@linaro.org, dietmar.eggemann@arm.com, rostedt@goodmis.org, bsegall@google.com, mgorman@suse.de, bristot@redhat.com, vschneid@redhat.com, paulmck@kernel.org Subject: [PATCH 09/22] mips/cpu: Expose play_dead()'s prototype definition Date: Fri, 3 Feb 2023 14:05:18 -0800 Message-Id: X-Mailer: git-send-email 2.39.0 In-Reply-To: References: MIME-Version: 1.0 Content-type: text/plain X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS 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?1756849313784398210?= X-GMAIL-MSGID: =?utf-8?q?1756849313784398210?= Include to make sure play_dead() matches its prototype going forward. Signed-off-by: Josh Poimboeuf Acked-by: Florian Fainelli --- arch/mips/kernel/smp-bmips.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/mips/kernel/smp-bmips.c b/arch/mips/kernel/smp-bmips.c index f5d7bfa3472a..df9158e8329d 100644 --- a/arch/mips/kernel/smp-bmips.c +++ b/arch/mips/kernel/smp-bmips.c @@ -38,6 +38,7 @@ #include #include #include +#include static int __maybe_unused max_cpus = 1; From patchwork Fri Feb 3 22:05:19 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Josh Poimboeuf X-Patchwork-Id: 52675 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp1080215wrn; Fri, 3 Feb 2023 14:08:00 -0800 (PST) X-Google-Smtp-Source: AK7set+6BW5+cIgoVef9EY2WpSDYTcJpgci/M5hsAZb75dmF+B8ViI6vpGZEi+xq0j/xrxODe3wp X-Received: by 2002:a05:6a20:8420:b0:bc:246c:9be4 with SMTP id c32-20020a056a20842000b000bc246c9be4mr16243568pzd.45.1675462080120; Fri, 03 Feb 2023 14:08:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675462080; cv=none; d=google.com; s=arc-20160816; b=JY7JlL/+dD1vcNgipNOwYvy5EBOo2+BS86QQvr8+X6+ikiRfYmmeXgsfR9dBhL3csL gA+evnsJEojPdDgqCfyJLP3RmbIBQDCWspm4ZRNAA5GmVH9at7quNMalDA19jH5VI11u AixTNlWtt6t314H5igwkYJ+PZ25iERuEkSB0v21H2pdsERTIdsoXvDhOsbmYWfhxgGD8 jZZMcLzJqklYg9irmsqIu9YQq7h0i3MVHtPsloJM/Ev4UtIzK0dCMWsUKp7awzSutbt/ lq/s6jZnLB/dRjAnT22FCMAEGzHG/zXnDw4qRi9MeFsM1qk0h+G3Ot31EY0kw6AIC2AL c1JQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=YJiNRREqhLfeZgDIxj23wyxkDCHcRkIYX+FaDIOr/S4=; b=ORaoGOM+a2kgPzSIvWScdryQVdyGnCwTgT0QX5A8Rqw6gS4TioY02j8+T/hD6m0cVJ R3++qG7IOHO16+kb/qvrkSBYZttPLz51z8Mpcpzb5NwNMn+7ruZecUi5OirYvJoxoiAH UIpLZFJ75GWWoTPJbkx/vT68P+Rwm5bz1U32WZDm1xZ5c+fiVv4/19ISGniz3T1k5oXm 3n0Qb7N0QJvyFWZ5cikwj5mM2fuXT822ls8fwWrRIe19Drq1OEILELfxIZ4bDQI6xcpW x4g0EBwXt6fcc0zC3aCXpA5UcuNv2tc/SUQj7VRWNffLfEDi3yZ0BTnt9zyTZa3XPcWX 3Csw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=aUxqaJ3w; 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=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 194-20020a6301cb000000b004efc4b6f17asi4524800pgb.588.2023.02.03.14.07.47; Fri, 03 Feb 2023 14:07:59 -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=@kernel.org header.s=k20201202 header.b=aUxqaJ3w; 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=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233986AbjBCWHC (ORCPT + 99 others); Fri, 3 Feb 2023 17:07:02 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56444 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233471AbjBCWGa (ORCPT ); Fri, 3 Feb 2023 17:06:30 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0D2CFAF69E; Fri, 3 Feb 2023 14:06:01 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 92CAC6202C; Fri, 3 Feb 2023 22:06:00 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5039DC433AA; Fri, 3 Feb 2023 22:05:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1675461960; bh=7d++Hui9U2QmrKVsgoxi792ojGAxFKsPKUzhCpj0Vz8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=aUxqaJ3ww87KOGdisOk/HBl19AfmCI5IwgU45YTMMCbIOEAKmYokeRwWgk458aBdz KAB2IA5A6KZwBO7KL27vUbssmzJh7ENV38QqtoqOcvWzHLrWYU0SayIkMkcSRT9MFV rTXdxTX48v4hwkeYdjTBdMWiSWGW97wTHOHIHCoTCLhuLDOSQ6E13CVInzoI5HdmNi 3mbcM1YB9zlDGO+z4veQYZkCQn+awXjDQLZSURiYJducHsArb8fWxtgCDFxv5s177E FUekw0iJc/v9Ta+STjHGBIEOmOzc69H99WWgT7FCYTGb4FUxkC0cXDeNCacXAzXnoD 6xgtVXdRGS0sg== From: Josh Poimboeuf To: linux-kernel@vger.kernel.org Cc: jgross@suse.com, richard.henderson@linaro.org, ink@jurassic.park.msu.ru, mattst88@gmail.com, linux-alpha@vger.kernel.org, linux@armlinux.org.uk, linux-arm-kernel@lists.infradead.org, catalin.marinas@arm.com, will@kernel.org, guoren@kernel.org, linux-csky@vger.kernel.org, linux-ia64@vger.kernel.org, chenhuacai@kernel.org, kernel@xen0n.name, loongarch@lists.linux.dev, f.fainelli@gmail.com, bcm-kernel-feedback-list@broadcom.com, tsbogend@alpha.franken.de, linux-mips@vger.kernel.org, jiaxun.yang@flygoat.com, mpe@ellerman.id.au, npiggin@gmail.com, christophe.leroy@csgroup.eu, linuxppc-dev@lists.ozlabs.org, ysato@users.sourceforge.jp, dalias@libc.org, linux-sh@vger.kernel.org, davem@davemloft.net, sparclinux@vger.kernel.org, tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, dave.hansen@linux.intel.com, x86@kernel.org, hpa@zytor.com, chris@zankel.net, jcmvbkbc@gmail.com, linux-xtensa@linux-xtensa.org, peterz@infradead.org, juri.lelli@redhat.com, vincent.guittot@linaro.org, dietmar.eggemann@arm.com, rostedt@goodmis.org, bsegall@google.com, mgorman@suse.de, bristot@redhat.com, vschneid@redhat.com, paulmck@kernel.org Subject: [PATCH 10/22] mips/cpu: Make sure play_dead() doesn't return Date: Fri, 3 Feb 2023 14:05:19 -0800 Message-Id: X-Mailer: git-send-email 2.39.0 In-Reply-To: References: MIME-Version: 1.0 Content-type: text/plain X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS 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?1756849326340448664?= X-GMAIL-MSGID: =?utf-8?q?1756849326340448664?= play_dead() 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. Signed-off-by: Josh Poimboeuf Acked-by: Florian Fainelli --- arch/mips/kernel/smp-bmips.c | 2 ++ arch/mips/loongson64/smp.c | 1 + 2 files changed, 3 insertions(+) diff --git a/arch/mips/kernel/smp-bmips.c b/arch/mips/kernel/smp-bmips.c index df9158e8329d..be85fa075830 100644 --- a/arch/mips/kernel/smp-bmips.c +++ b/arch/mips/kernel/smp-bmips.c @@ -414,6 +414,8 @@ void __ref play_dead(void) " wait\n" " j bmips_secondary_reentry\n" : : : "memory"); + + BUG(); } #endif /* CONFIG_HOTPLUG_CPU */ diff --git a/arch/mips/loongson64/smp.c b/arch/mips/loongson64/smp.c index 660e1de4412a..c81c2bd07c62 100644 --- a/arch/mips/loongson64/smp.c +++ b/arch/mips/loongson64/smp.c @@ -822,6 +822,7 @@ void play_dead(void) state_addr = &per_cpu(cpu_state, cpu); mb(); play_dead_at_ckseg1(state_addr); + BUG(); } static int loongson3_disable_clock(unsigned int cpu) From patchwork Fri Feb 3 22:05:20 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Josh Poimboeuf X-Patchwork-Id: 52677 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp1080237wrn; Fri, 3 Feb 2023 14:08:05 -0800 (PST) X-Google-Smtp-Source: AK7set8ukPF5w/i/T47/X3hLx9rf6szK1t7bd+y/MYry4G36BGxRvh2Tyx+TfMBxuuEIbauf3LfE X-Received: by 2002:a05:6a20:b917:b0:bc:6df2:f0cd with SMTP id fe23-20020a056a20b91700b000bc6df2f0cdmr11692315pzb.35.1675462084994; Fri, 03 Feb 2023 14:08:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675462084; cv=none; d=google.com; s=arc-20160816; b=eNQtu66V17SV+2VbpZbdWYe8DQZP93uHKKwYajU4lfqgviBIQOuhhB9AMT+KWnmi0L J1lUvv45ti266vkadXDbiWshkairkoRfpqE56Zwxh1f+jPupFkIkKdUurdo4LN3iBN5r lCING2bbRTvm4Htf/r6l5DQMj4R+ywBwJdLofUGP6Ut5tWMRgtNQcq8uCGpLDMZklNJV LpbbjaQUj+nJXPc9ROu2EYKaLfNIHOssgnoiMxTbXflTB9+9AL5XoEvz8PzvUGI/tLqF PwTdP6JfFUgsBHUDoDtWEuO+c0rhESsV6McOjaKEOkdrTZxwJjVlcsMGLrsEPfylH7M6 vhQQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=k3KkaH9QwVo1oFuS9bNpE+xwRYym1ixe602GVHhDV3E=; b=UaxsbGlxvHJjGwFYv5vJN5IhOmTj0FxCj5KaYqk+xhe/dJcA5sT+0t+TJWHVRBN6B3 rDfS91+DcSnI/1p/urbSu4S5qIQoq2dySw3VYZZyEeGMt5lLw7OY+dfDU+nbh6X7uF+1 i8eU6JeWspqe1+//nizKq3xxPE1EnleD8FGD18XN4+B34bzP0M3oD3n6KyS2V5gO17I4 b8sVm7gPjxG8RXFh2bXYD76vRKtK+m8f30uL/64TeOLcN6M1/o4Y4zqQhZdtP4AwlPAQ S6cj5pmjShI3X4y1MRVy9MMj8KGgFb2mBPf0a7Mxg931q0po3DNM1Dd6ewpeYxe483S4 aSPg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=aDL8Fbd7; 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=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id bs69-20020a632848000000b004dc05ba4698si3478403pgb.770.2023.02.03.14.07.51; Fri, 03 Feb 2023 14:08:04 -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=@kernel.org header.s=k20201202 header.b=aDL8Fbd7; 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=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233777AbjBCWHV (ORCPT + 99 others); Fri, 3 Feb 2023 17:07:21 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56470 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229782AbjBCWGw (ORCPT ); Fri, 3 Feb 2023 17:06:52 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8D6C0AF531; Fri, 3 Feb 2023 14:06:04 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 2DDDFB82C2E; Fri, 3 Feb 2023 22:06:03 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2CC2CC433EF; Fri, 3 Feb 2023 22:06:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1675461961; bh=2MPoJoU9iEV+5bmq/FA3r/36XSx62v4q4mPHZFDs3ww=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=aDL8Fbd7q5housqD8r1xvR5Q8U5/Aib+w8BpMXVKm3G1aZwcrHOxSP2YKKdovg1Uv 4ZkJB0Y2uOz0X6yT1wZTvr2Dy/qvqYM4TlvU7jidUr13tcMvpXuDDnfIChFnR0S114 XgCY83e9GokKgbEco/t+NyOFO0YdA+0HxBWOqEp5iV4oSvGtaYrTgda4ZJIFvXPgG4 KNCxMpS4uI9MMwQ1cXs+JGbGCrSe2MWzovJGkzBcoFy7ViFq8mzRs0yA10vH2OGy97 h7LmYagnQeYcVqvMzgJan512rASuYNR/WZMXFdmycbxKND3KFZ57oa/ITSZQBJhWyr EDE+zUhf9BZHA== From: Josh Poimboeuf To: linux-kernel@vger.kernel.org Cc: jgross@suse.com, richard.henderson@linaro.org, ink@jurassic.park.msu.ru, mattst88@gmail.com, linux-alpha@vger.kernel.org, linux@armlinux.org.uk, linux-arm-kernel@lists.infradead.org, catalin.marinas@arm.com, will@kernel.org, guoren@kernel.org, linux-csky@vger.kernel.org, linux-ia64@vger.kernel.org, chenhuacai@kernel.org, kernel@xen0n.name, loongarch@lists.linux.dev, f.fainelli@gmail.com, bcm-kernel-feedback-list@broadcom.com, tsbogend@alpha.franken.de, linux-mips@vger.kernel.org, jiaxun.yang@flygoat.com, mpe@ellerman.id.au, npiggin@gmail.com, christophe.leroy@csgroup.eu, linuxppc-dev@lists.ozlabs.org, ysato@users.sourceforge.jp, dalias@libc.org, linux-sh@vger.kernel.org, davem@davemloft.net, sparclinux@vger.kernel.org, tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, dave.hansen@linux.intel.com, x86@kernel.org, hpa@zytor.com, chris@zankel.net, jcmvbkbc@gmail.com, linux-xtensa@linux-xtensa.org, peterz@infradead.org, juri.lelli@redhat.com, vincent.guittot@linaro.org, dietmar.eggemann@arm.com, rostedt@goodmis.org, bsegall@google.com, mgorman@suse.de, bristot@redhat.com, vschneid@redhat.com, paulmck@kernel.org Subject: [PATCH 11/22] mips/cpu: Mark play_dead() __noreturn Date: Fri, 3 Feb 2023 14:05:20 -0800 Message-Id: <829d68d289ad4eeac27c5220be695cfa6ace33f4.1675461757.git.jpoimboe@kernel.org> X-Mailer: git-send-email 2.39.0 In-Reply-To: References: MIME-Version: 1.0 Content-type: text/plain X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS 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?1756849331359922772?= X-GMAIL-MSGID: =?utf-8?q?1756849331359922772?= play_dead() doesn't return. Annotate it as such. By extension this also makes arch_cpu_idle_dead() noreturn. Signed-off-by: Josh Poimboeuf Acked-by: Florian Fainelli --- arch/mips/include/asm/smp.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/mips/include/asm/smp.h b/arch/mips/include/asm/smp.h index 5d9ff61004ca..4eee29b7845c 100644 --- a/arch/mips/include/asm/smp.h +++ b/arch/mips/include/asm/smp.h @@ -88,7 +88,7 @@ static inline void __cpu_die(unsigned int cpu) mp_ops->cpu_die(cpu); } -extern void play_dead(void); +extern void __noreturn play_dead(void); #endif #ifdef CONFIG_KEXEC From patchwork Fri Feb 3 22:05:21 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Josh Poimboeuf X-Patchwork-Id: 52676 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp1080194wrn; Fri, 3 Feb 2023 14:07:57 -0800 (PST) X-Google-Smtp-Source: AK7set9KDsTu8RDxsOO4nXDdOpLS/dY35dHntCorvCOweRsHs6nyBtDLvT/ShuucZdqn6v1NRA2q X-Received: by 2002:a17:90b:4f44:b0:22c:4bc:2126 with SMTP id pj4-20020a17090b4f4400b0022c04bc2126mr12271641pjb.45.1675462077093; Fri, 03 Feb 2023 14:07:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675462077; cv=none; d=google.com; s=arc-20160816; b=U7EFOWY66DtYWs+hNrKgCaD4y+53Fs5BQjEBJpmF0iZ08YCJoN9IMsh9HT3/cuKtK5 aSwnzjC2y7c6BFpjoB4dPr+QeQwa1qhmaYZMk+XC9PCyRtQ2PSeo058BNtbHwIWFpmqI k0WnvYknYejm7jYgAfArqd9B1R4SnaeHyukVDR8rMCkyyaskis5bTh0ZBB8ARaN6cefi 7+J5hMfmahHCCyZ/YxL85N8gD0LGxnVcIn+jBnb6RO+XXpmOz6w+CIip5yeec3bGrfwX YdaFPOZJLzZliKmlO5SyEWbTCOu6CmCgZDw91bdLEENGhT8dmNluUmtefpYSEUHMWN1k ycqQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=cOSQhpL6fhGiM9s4xPZC5do7e8hAA2wOC4tTlUjnTbY=; b=GLasH4OgOMH839m2G9dAfy18zj3KAoTG4/fs0Jtw7Ezj2BVYx8xRVn5EO59775SJKK hL0WiUSu/CCdz6GUT5ik+6ebl8pBPzhlxHYhxEZuV9vqckc4lxKWemEXeMY0BaPMoAcB 8RfoC/D5fzcw0chSNt3OWVVI78q3PtxsWCv46BLlJJwAQhvLVl10bpYCgCUggg/Gn1Dq 6dOjMMOI76azfV8+xG7gocudTasTMobm9fVziIkU+soVgBzgBSX2KUUdXY+qTAj74DD+ QedCuVolz2hclcVVqwCGxKD6/Wsn69Tid64arnxbbH3h6cdgcod+XzXAMjyI2fhsTVwC YcFA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=bEfcJwL6; 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=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id v3-20020a17090a960300b0022c19e2e734si8690758pjo.151.2023.02.03.14.07.44; Fri, 03 Feb 2023 14:07:57 -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=@kernel.org header.s=k20201202 header.b=bEfcJwL6; 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=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233981AbjBCWHe (ORCPT + 99 others); Fri, 3 Feb 2023 17:07:34 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56654 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233593AbjBCWHB (ORCPT ); Fri, 3 Feb 2023 17:07:01 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AB58BAFCA0; Fri, 3 Feb 2023 14:06:06 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 0C680B82C30; Fri, 3 Feb 2023 22:06:05 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 08B2BC433A0; Fri, 3 Feb 2023 22:06:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1675461963; bh=NPua2qPyoi9+ZnTVjzJtwJIKtIAcOluqw/LQWD+kyG0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=bEfcJwL6SC/AjDrgqLZ4gobtYzzG+kaVTVeIraggyRhwgYWN4oAFuKJ77/RCNTRvY fup/m+ICRFhtxmQnpWwYUfJLena8YJAeJTm6ZcubnjXEQ/jgxWcSotzf3Y2mbjtquI yW5I485ZkkpQ6Jqy0xpqJWrVtVjUykBoHEcmO5kdnHPKSdwkiAEHBedDcPx5HCDW7z e56cpXGjpV9Wa9j+COiY6xVNqjbTa5hVFZNcyFwrdOvNi774RztXhcvRS8u2WNZfqm te78V+RaoPzaJRgp+oay8agBh6E4MO/A9zlyBZNVH/Oc0XYt+s1wdWgKe5Q1neeH/O i9bQ03yAKwMEA== From: Josh Poimboeuf To: linux-kernel@vger.kernel.org Cc: jgross@suse.com, richard.henderson@linaro.org, ink@jurassic.park.msu.ru, mattst88@gmail.com, linux-alpha@vger.kernel.org, linux@armlinux.org.uk, linux-arm-kernel@lists.infradead.org, catalin.marinas@arm.com, will@kernel.org, guoren@kernel.org, linux-csky@vger.kernel.org, linux-ia64@vger.kernel.org, chenhuacai@kernel.org, kernel@xen0n.name, loongarch@lists.linux.dev, f.fainelli@gmail.com, bcm-kernel-feedback-list@broadcom.com, tsbogend@alpha.franken.de, linux-mips@vger.kernel.org, jiaxun.yang@flygoat.com, mpe@ellerman.id.au, npiggin@gmail.com, christophe.leroy@csgroup.eu, linuxppc-dev@lists.ozlabs.org, ysato@users.sourceforge.jp, dalias@libc.org, linux-sh@vger.kernel.org, davem@davemloft.net, sparclinux@vger.kernel.org, tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, dave.hansen@linux.intel.com, x86@kernel.org, hpa@zytor.com, chris@zankel.net, jcmvbkbc@gmail.com, linux-xtensa@linux-xtensa.org, peterz@infradead.org, juri.lelli@redhat.com, vincent.guittot@linaro.org, dietmar.eggemann@arm.com, rostedt@goodmis.org, bsegall@google.com, mgorman@suse.de, bristot@redhat.com, vschneid@redhat.com, paulmck@kernel.org Subject: [PATCH 12/22] powerpc/cpu: Mark start_secondary_resume() __noreturn Date: Fri, 3 Feb 2023 14:05:21 -0800 Message-Id: X-Mailer: git-send-email 2.39.0 In-Reply-To: References: MIME-Version: 1.0 Content-type: text/plain X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS 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?1756849322908253299?= X-GMAIL-MSGID: =?utf-8?q?1756849322908253299?= start_secondary_resume() doesn't return. Annotate it as such. By extension this also makes arch_cpu_idle_dead() noreturn. Signed-off-by: Josh Poimboeuf Acked-by: Michael Ellerman (powerpc) --- arch/powerpc/include/asm/smp.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/include/asm/smp.h b/arch/powerpc/include/asm/smp.h index f63505d74932..cfd42ca8765c 100644 --- a/arch/powerpc/include/asm/smp.h +++ b/arch/powerpc/include/asm/smp.h @@ -66,7 +66,7 @@ void start_secondary(void *unused); extern int smp_send_nmi_ipi(int cpu, void (*fn)(struct pt_regs *), u64 delay_us); extern int smp_send_safe_nmi_ipi(int cpu, void (*fn)(struct pt_regs *), u64 delay_us); extern void smp_send_debugger_break(void); -extern void start_secondary_resume(void); +extern void __noreturn start_secondary_resume(void); extern void smp_generic_give_timebase(void); extern void smp_generic_take_timebase(void); From patchwork Fri Feb 3 22:05:22 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Josh Poimboeuf X-Patchwork-Id: 52678 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp1080240wrn; Fri, 3 Feb 2023 14:08:05 -0800 (PST) X-Google-Smtp-Source: AK7set+TirLyW5Lrf6wTs6upM6YBQWttYURDoEKuNUqDlY5kHoBub9O38zbVR/0W2FTmidn0CfoD X-Received: by 2002:a05:6a20:3d90:b0:bc:fe09:950b with SMTP id s16-20020a056a203d9000b000bcfe09950bmr15065693pzi.10.1675462085194; Fri, 03 Feb 2023 14:08:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675462085; cv=none; d=google.com; s=arc-20160816; b=K3Wi6fDuQYJgfWj3WqUpXOAwxR+wij9DX5mc1FIlKhg6LhJWmDMcuAqs2ygwhhdepH Ew8dYO5cS4/vlvZiyEhx4cSdTnA+X0h2czmlda9caVGFmLKfWBf2NqkMmpI6me79UqIZ jkM1Fse6oFJJRazRjaYFLSmyuAE6cRP7y00lMhui6uEDPQpjVGvXRBxcKxxbNj3H4b1N DEbF+JBtCD2JtmJ/PRxb5cULHOGAeYNnEn6lhD956xE69xhaQUvjcidC+4qsIhJaSiG7 NHtuKVUm95AFhEVRfHrnoZxTnclLoravoB1GOCRiOWCVBx9hEzZgxUryX22xo18WkwRf CQSw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=kcgOHM3rJbN88C4wuReQwX+tQJ0s9P4oqdWShATmfvE=; b=XGygekIsX4xrn/r0RCbsAK2mF9D7GaCv4a8t05wKdM2ZVrg2WG/+A7jW/yco3Bz3u+ EKH7LOZUrn3y9OSVNER6kxvjKVKx5tD9g376LQcSGgYM6ChRnX6ShePvKK6H7YOAlosD Jv19nfzmC3XDNdOllFOGlCAgSvMSEyJCiVJqTUEzX29QDj+XJ0hJrXlvlvoV6dFRJkEH y24zRAZAiAGnXDxEQKM4Bhwa590Uxe2s7AjN/E0Eak5eqog5L3mWqIuMiJ9s8fLhZjgG Zmdzyn4CN+gxnWrNg9v2V9HcAE9QQ+l61wVuwt8/LBr5wbaKWi0lpLTjJSAdr8IUDgBU nteQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=DhDkIMUj; 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=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g12-20020a63374c000000b004f29d323701si4073075pgn.619.2023.02.03.14.07.52; Fri, 03 Feb 2023 14:08:05 -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=@kernel.org header.s=k20201202 header.b=DhDkIMUj; 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=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234045AbjBCWHo (ORCPT + 99 others); Fri, 3 Feb 2023 17:07:44 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58246 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233929AbjBCWHD (ORCPT ); Fri, 3 Feb 2023 17:07:03 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B1A8FAF6BD; Fri, 3 Feb 2023 14:06:08 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id E77EDB82C2C; Fri, 3 Feb 2023 22:06:06 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E08DFC433EF; Fri, 3 Feb 2023 22:06:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1675461965; bh=X1eIlBV7mYZUrbC//4ufL+T75dx0a2gkyRGVpnoY/QM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=DhDkIMUjEJOyX2EMlHrPxdUnBWRX3se0vLGO731POCqHk9/VQrMV/gXm8Vb9/Z2m3 UvzerGv0nP8kmAJhO23jS42gvkc6o8sJJTyUd/dleHrvmoqm98KN02bKtkQZO7MfFL WiEZU6kpXcLgGxhn/vJpxLEiRCyGWZl3pjakg3znFOX8OkwD/QWUnY0u+Z51AYGuT1 3ZX1IoRQ7B7uGKZ1bvIOTbD3JdF+6rUUJYCcYypC+Tlbn/Ml8u53/6kdTb+Sog6/sv AsLRZWp+uNctE1zUajMgDNYRMYvTo3DPuPNnHQwSTW0D6vHT8JOdvEDURTxD2SUNqz O5cRPvgdcbiQQ== From: Josh Poimboeuf To: linux-kernel@vger.kernel.org Cc: jgross@suse.com, richard.henderson@linaro.org, ink@jurassic.park.msu.ru, mattst88@gmail.com, linux-alpha@vger.kernel.org, linux@armlinux.org.uk, linux-arm-kernel@lists.infradead.org, catalin.marinas@arm.com, will@kernel.org, guoren@kernel.org, linux-csky@vger.kernel.org, linux-ia64@vger.kernel.org, chenhuacai@kernel.org, kernel@xen0n.name, loongarch@lists.linux.dev, f.fainelli@gmail.com, bcm-kernel-feedback-list@broadcom.com, tsbogend@alpha.franken.de, linux-mips@vger.kernel.org, jiaxun.yang@flygoat.com, mpe@ellerman.id.au, npiggin@gmail.com, christophe.leroy@csgroup.eu, linuxppc-dev@lists.ozlabs.org, ysato@users.sourceforge.jp, dalias@libc.org, linux-sh@vger.kernel.org, davem@davemloft.net, sparclinux@vger.kernel.org, tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, dave.hansen@linux.intel.com, x86@kernel.org, hpa@zytor.com, chris@zankel.net, jcmvbkbc@gmail.com, linux-xtensa@linux-xtensa.org, peterz@infradead.org, juri.lelli@redhat.com, vincent.guittot@linaro.org, dietmar.eggemann@arm.com, rostedt@goodmis.org, bsegall@google.com, mgorman@suse.de, bristot@redhat.com, vschneid@redhat.com, paulmck@kernel.org Subject: [PATCH 13/22] sh/cpu: Make sure play_dead() doesn't return Date: Fri, 3 Feb 2023 14:05:22 -0800 Message-Id: X-Mailer: git-send-email 2.39.0 In-Reply-To: References: MIME-Version: 1.0 Content-type: text/plain X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS 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?1756849331527144884?= X-GMAIL-MSGID: =?utf-8?q?1756849331527144884?= play_dead() 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. Signed-off-by: Josh Poimboeuf --- arch/sh/include/asm/smp-ops.h | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/sh/include/asm/smp-ops.h b/arch/sh/include/asm/smp-ops.h index e27702130eb6..63866b1595a0 100644 --- a/arch/sh/include/asm/smp-ops.h +++ b/arch/sh/include/asm/smp-ops.h @@ -27,6 +27,7 @@ static inline void plat_smp_setup(void) static inline void play_dead(void) { mp_ops->play_dead(); + BUG(); } extern void register_smp_ops(struct plat_smp_ops *ops); From patchwork Fri Feb 3 22:05:23 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Josh Poimboeuf X-Patchwork-Id: 52680 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp1080471wrn; Fri, 3 Feb 2023 14:08:37 -0800 (PST) X-Google-Smtp-Source: AK7set97U4P3SI+mc+MPn1eTMP+HaefhElSEBt9h6ArVyLXbbNERRYaKcpn7IrCIey5EDkIDZk1/ X-Received: by 2002:a05:6a21:338d:b0:bc:ee04:275d with SMTP id yy13-20020a056a21338d00b000bcee04275dmr14273153pzb.61.1675462117176; Fri, 03 Feb 2023 14:08:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675462117; cv=none; d=google.com; s=arc-20160816; b=V8uMQOqf9nFmlwxkQHdApbxm+R115HSHMndWl0eSxVuHPwdsUrcT/hZyN/xB51hRQK IgByIIPJRS4lMUtbAXd4lDGyu39o+QbNnDP4yNhfNLdtQ7hEovGnR4JmGTiJIqB060Xz 23YjrpnQ70ekpsziGVsyFvtYNw/qHSXagfEWq6LYyKyiWXA5VIwfgWrX30lsDByfnSlu ysbvD/Ay2NNZl54wkGJvukno2AhYI+zygKYL6SL3V4TGc8xWRMuuD4Df8DPisltVbpII PbatgSPbwA3CgYutMqccNoCzyhQq/BMx56YYkf/MSc1v2FsRcBMlNaZuCU222LdYCnQT 1OPQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=iX/3rwAarF4QhZjv2ToBGYGSCQjR47e6bDYHgsLCfG8=; b=l6D0oaormmB7xJhNo6aJ4+diLT3cdYzIq+dDinwn1vT8eZ3T7toD2tuRUqPh4ioNVU 6WboVqVnQTrwyPkrAUGll6QScn2imO0ueZ7xYdyvx3P/rTzJzP8ze8/0V7sFZO3NEEoB uv1ZynuIFLAwcCd1LcBrLlMApEGvo5TWW7qZff6ACGg5c6ytCDm9MJsbukHgSPoHPnbV /k9ru5jUKjB5fUbNigt0dY567KwHuxu97ZcwXngvMTHL0jsyb7UBusq4pEtFHWKRGqVj smJjiLDOmIQ5tiodV9g8p+nobFZjL0XMXgoiJ65Saign2ZbxWsPRgoVC093qkIMt3ANl eXRQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=sMuRLeIe; 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=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i196-20020a636dcd000000b004ec369963bfsi3948076pgc.274.2023.02.03.14.08.24; Fri, 03 Feb 2023 14:08:37 -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=@kernel.org header.s=k20201202 header.b=sMuRLeIe; 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=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232835AbjBCWIC (ORCPT + 99 others); Fri, 3 Feb 2023 17:08:02 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57692 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233780AbjBCWHT (ORCPT ); Fri, 3 Feb 2023 17:07:19 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 84A19AF53D; Fri, 3 Feb 2023 14:06:10 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id C793EB82C2A; Fri, 3 Feb 2023 22:06:08 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id BF2DFC4339B; Fri, 3 Feb 2023 22:06:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1675461967; bh=NaTK1tR+V9DMn/hY0B5jpg7IE7MnPmPMawuvFBlMv1o=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=sMuRLeIeuX4e5NoLB6UdKdvNaRzHIa+b94PsGTQMufoRN5QA/zc/CEM69PsZyUbp1 MaysKmxIVcsGQzwrmnkKG0GvRbA9cxT/bDuVaZX4cKX13vFQry04JZub/7YbMzEr99 cLtBs39kcPbv3AEn9JqZbGlrlVJEq7+r29QctelrKOb+I+n2J4leC7FZUu7ApYfmKA q7vw8T+tBdwQiLYoZGWf3XGbln2suP3atmYw9fVnFbsEtKD9GU9f/vEgJntOx59T3k AYHnExlZzIdcgOgQulPOWNAktDPoSoVgTe6X9UFvqEgEZQgGo8/EaJPnZcpKZQib90 Jc9u1vCBV+1cA== From: Josh Poimboeuf To: linux-kernel@vger.kernel.org Cc: jgross@suse.com, richard.henderson@linaro.org, ink@jurassic.park.msu.ru, mattst88@gmail.com, linux-alpha@vger.kernel.org, linux@armlinux.org.uk, linux-arm-kernel@lists.infradead.org, catalin.marinas@arm.com, will@kernel.org, guoren@kernel.org, linux-csky@vger.kernel.org, linux-ia64@vger.kernel.org, chenhuacai@kernel.org, kernel@xen0n.name, loongarch@lists.linux.dev, f.fainelli@gmail.com, bcm-kernel-feedback-list@broadcom.com, tsbogend@alpha.franken.de, linux-mips@vger.kernel.org, jiaxun.yang@flygoat.com, mpe@ellerman.id.au, npiggin@gmail.com, christophe.leroy@csgroup.eu, linuxppc-dev@lists.ozlabs.org, ysato@users.sourceforge.jp, dalias@libc.org, linux-sh@vger.kernel.org, davem@davemloft.net, sparclinux@vger.kernel.org, tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, dave.hansen@linux.intel.com, x86@kernel.org, hpa@zytor.com, chris@zankel.net, jcmvbkbc@gmail.com, linux-xtensa@linux-xtensa.org, peterz@infradead.org, juri.lelli@redhat.com, vincent.guittot@linaro.org, dietmar.eggemann@arm.com, rostedt@goodmis.org, bsegall@google.com, mgorman@suse.de, bristot@redhat.com, vschneid@redhat.com, paulmck@kernel.org Subject: [PATCH 14/22] sh/cpu: Mark play_dead() __noreturn Date: Fri, 3 Feb 2023 14:05:23 -0800 Message-Id: X-Mailer: git-send-email 2.39.0 In-Reply-To: References: MIME-Version: 1.0 Content-type: text/plain X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS 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?1756849365001143523?= X-GMAIL-MSGID: =?utf-8?q?1756849365001143523?= play_dead() doesn't return. Annotate it as such. By extension this also makes arch_cpu_idle_dead() noreturn. Signed-off-by: Josh Poimboeuf --- arch/sh/include/asm/smp-ops.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/sh/include/asm/smp-ops.h b/arch/sh/include/asm/smp-ops.h index 63866b1595a0..97331fcb7b85 100644 --- a/arch/sh/include/asm/smp-ops.h +++ b/arch/sh/include/asm/smp-ops.h @@ -24,7 +24,7 @@ static inline void plat_smp_setup(void) mp_ops->smp_setup(); } -static inline void play_dead(void) +static inline void __noreturn play_dead(void) { mp_ops->play_dead(); BUG(); @@ -43,7 +43,7 @@ static inline void register_smp_ops(struct plat_smp_ops *ops) { } -static inline void play_dead(void) +static inline void __noreturn play_dead(void) { BUG(); } From patchwork Fri Feb 3 22:05:24 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Josh Poimboeuf X-Patchwork-Id: 52679 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp1080361wrn; Fri, 3 Feb 2023 14:08:22 -0800 (PST) X-Google-Smtp-Source: AK7set/rI1pWMbAoWsrHBaaUoVK8R576cQ68LEe2/iGOMbcT9M47mwNq7Aqd20CdiD04ErkulBdn X-Received: by 2002:aa7:96f6:0:b0:592:4d85:ecb1 with SMTP id i22-20020aa796f6000000b005924d85ecb1mr11199997pfq.33.1675462102104; Fri, 03 Feb 2023 14:08:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675462102; cv=none; d=google.com; s=arc-20160816; b=KnhaaRrrgs3P4ROlUmHqtoFF4mooQmgKBgBrO9PqYZZr39BZlMshiT6SGsWnBA+KQP CxVB9yGwFkPFWG4sqjOGLq2xcTHPVrqXIp+Ganvob/Tx6SKm2M8cnnQqtSkeIWe5w3Kh /+cECYJGYTvajBtBD/C/dwR1Im1KdFmfQEjH1/677jzGoXVlREJ4G7pyMG5J0Q+6pxlL itI8IlJDhmkslhCU87xDg3R2+y7tM90229qkCB4/XeWMWBHFr9Nz+HGCUYdNjsye3Nt7 h5x8VscmKQLUNxtMQ8851i2NVpeFJpBJ2+yC7MpMFof1NAqPeYg8uxhX5K4aPOq7AmAO wQMw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=EB5KrjEQ/a97t2fE/oQwEIv8DeolONPjeDRWcfNOpi8=; b=oerWiyZgk1ETRlI/3vXT7bh6C7tvJiwrngCoJhKIZbjtrOMrj6n5IbHDH2s/2177M4 W0VQdM7X6M3ydHEQvCWHg1oZo8eueeGwkMCU+60t8qwkWQqt9qtT97B+36aw0rmCP0e6 h1knQ2PbOxl5pmfK6+lqsQh/tk2ymviMx5e7tYCyA+7O/zSxzLmBDSPLnBIukWtNcAa/ zSY07quBEAg/9DAefeoImp7iycxwvWS/6/+muWat/XF2ef/K+SLC4md65Iv0CCrzWAo+ 66wy1G7gpzYnQHhWvBxs/DEgJpGKff77LbAsvwXf3FpM/WV1OLn4+AB7+MsngiTIsKGU 2vyQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=VsXyVxEz; 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=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w126-20020a628284000000b00593f197f5d5si3855528pfd.49.2023.02.03.14.08.05; Fri, 03 Feb 2023 14:08:22 -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=@kernel.org header.s=k20201202 header.b=VsXyVxEz; 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=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231701AbjBCWH6 (ORCPT + 99 others); Fri, 3 Feb 2023 17:07:58 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58638 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232835AbjBCWHR (ORCPT ); Fri, 3 Feb 2023 17:07:17 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 84C5AB0AA1; Fri, 3 Feb 2023 14:06:10 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id E8DDE6202B; Fri, 3 Feb 2023 22:06:09 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9F51EC433A4; Fri, 3 Feb 2023 22:06:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1675461969; bh=aYP90nun0m184p5nqJ440uJdYMPBc75BRwnXChmaA8w=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=VsXyVxEzpcXfilpsFzlk6M+CFr48cROlB/51bhZgU6jOeFjXZsnPEU0o5unZX/lCv 2s92UV6qDiMVkuwzYYUjibPqLJ0HXjNhVnjkYmHeRyzqPPq35RZXb4I0QJBtFIGHpB c05PiWxmuAZTCIhURQlmym/9FanZLhY6P9ATEQuCGE0TqcRKoW2+BmfvDSOl4rFdLQ XSQn6q+5Ug0Ma8OfVVzvmkDeLJyoNXKVlNE8zy8/Deb7fBUoAeD5LMKeY5LeE3R65b soPuLuhsbfOdSWeFsj5Fs8fj/wW9ZQHSRSDFTboVl+QsDtK3UkzNs6tqSgpIcVZYxl mpggjtNUkp/ng== From: Josh Poimboeuf To: linux-kernel@vger.kernel.org Cc: jgross@suse.com, richard.henderson@linaro.org, ink@jurassic.park.msu.ru, mattst88@gmail.com, linux-alpha@vger.kernel.org, linux@armlinux.org.uk, linux-arm-kernel@lists.infradead.org, catalin.marinas@arm.com, will@kernel.org, guoren@kernel.org, linux-csky@vger.kernel.org, linux-ia64@vger.kernel.org, chenhuacai@kernel.org, kernel@xen0n.name, loongarch@lists.linux.dev, f.fainelli@gmail.com, bcm-kernel-feedback-list@broadcom.com, tsbogend@alpha.franken.de, linux-mips@vger.kernel.org, jiaxun.yang@flygoat.com, mpe@ellerman.id.au, npiggin@gmail.com, christophe.leroy@csgroup.eu, linuxppc-dev@lists.ozlabs.org, ysato@users.sourceforge.jp, dalias@libc.org, linux-sh@vger.kernel.org, davem@davemloft.net, sparclinux@vger.kernel.org, tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, dave.hansen@linux.intel.com, x86@kernel.org, hpa@zytor.com, chris@zankel.net, jcmvbkbc@gmail.com, linux-xtensa@linux-xtensa.org, peterz@infradead.org, juri.lelli@redhat.com, vincent.guittot@linaro.org, dietmar.eggemann@arm.com, rostedt@goodmis.org, bsegall@google.com, mgorman@suse.de, bristot@redhat.com, vschneid@redhat.com, paulmck@kernel.org Subject: [PATCH 15/22] sh/cpu: Expose arch_cpu_idle_dead()'s prototype definition Date: Fri, 3 Feb 2023 14:05:24 -0800 Message-Id: X-Mailer: git-send-email 2.39.0 In-Reply-To: References: MIME-Version: 1.0 Content-type: text/plain X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS 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?1756849349171984050?= X-GMAIL-MSGID: =?utf-8?q?1756849349171984050?= Include to make sure arch_cpu_idle_dead() matches its prototype going forward. Signed-off-by: Josh Poimboeuf --- arch/sh/kernel/idle.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/sh/kernel/idle.c b/arch/sh/kernel/idle.c index 3418c40f0099..114f0c4abeac 100644 --- a/arch/sh/kernel/idle.c +++ b/arch/sh/kernel/idle.c @@ -4,6 +4,7 @@ * * Copyright (C) 2002 - 2009 Paul Mundt */ +#include #include #include #include From patchwork Fri Feb 3 22:05:25 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Josh Poimboeuf X-Patchwork-Id: 52683 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp1080598wrn; Fri, 3 Feb 2023 14:08:55 -0800 (PST) X-Google-Smtp-Source: AK7set/7N6npQ1hLaP7h0MzsiQ1ouwETHxvxZXf0d0OWzZUbELNfCjBii2F4TA1aeBeqdBHDoirE X-Received: by 2002:a62:4e0e:0:b0:593:b465:7167 with SMTP id c14-20020a624e0e000000b00593b4657167mr10332256pfb.34.1675462135192; Fri, 03 Feb 2023 14:08:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675462135; cv=none; d=google.com; s=arc-20160816; b=d2BV1zsC0qoENVSds1YZrQFQJTenxc8RJI3nO1N4HFQKbXmstxHhKvzgc7fLvT5iEm pnFTPD1A+0HRmasnAv6lWy1oQW5H77KQvl0YPfJuhYZ8Vgjth27cAI7s1ihnZ8at4P+C Eq9kO7gntXcYbhhRQUl7Crnhimvvl6GQU90mK+bZAAAxJO7hv6swDaIq5DsPXDCtuLIe QFP39WiucT3qTGMvyTzz6IWlYeepXn6OXK7K65n5IIZ5FpuaN6lQWkQQzq1J9Eem8in/ 38eJuF+vQGba44sRoy2agxZuVndU0+oC/GCzBtNjiVXER3XyuFx3G6ooRBMI2XguQteV cZQw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=LTQtk+zrhtsqvtM2S3wuq+WPL9fxR+fvAmuzr/uwNj0=; b=HCYpWrx+MAp0wi3vfQeJcOowwLfGTTBYhnD+P3/uh9g4DQo7BPgCP3bD4MNDrywtAW 0Hxa7DNklIXyb8TOFVuH/lvx9FgZu7AOsWBD33816k/5iv1zabiqRkVHpN4VKS5yR81c 7qjM10itHgvr/1XgUbuoSDYxEx8sQIacKnRGlIWcl31BNGAwSKQAFD28PslxTXBQbnam H+qW+fdAZshEgVUeqG2tn50scI1EP/be60Tl6w3SleCM2VO0Vzn1BPt2yd/ezcZqTFqh 781xGbQ0Q/UGwhmzPfbd0dcoYuTipdSTUku7z0oSrJOkfGtBmCfqolLWi12Czd23IzNc fuRA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=IbvLI9SG; 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=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c127-20020a624e85000000b0058b25f952b8si3528353pfb.267.2023.02.03.14.08.42; Fri, 03 Feb 2023 14:08:55 -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=@kernel.org header.s=k20201202 header.b=IbvLI9SG; 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=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233593AbjBCWIU (ORCPT + 99 others); Fri, 3 Feb 2023 17:08:20 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57738 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234028AbjBCWHd (ORCPT ); Fri, 3 Feb 2023 17:07:33 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E9943AF69A; Fri, 3 Feb 2023 14:06:15 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id C71246202D; Fri, 3 Feb 2023 22:06:11 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 85E24C433D2; Fri, 3 Feb 2023 22:06:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1675461971; bh=NrR4P0DY0KkRcvJJpvaBPY8nrqhj1/4WEFbiWkgx25U=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=IbvLI9SGR0mrEEcDvsTWGmRFY+xC5m55RleQxz9+JQteyCjIJS4oyATHgaLDKg8iT Mrcrj1tUqkDKFgDxhiACotXzzd+Ubb/npyitm47+khhnGTg6xyDpHKD0vy1jIB9u/5 Kl5ByQZatrNlKTDjf0rI7hwfhuNbRiRVWk5imgdvp/hM5rNayYJmTUSlZKkk4SlpVs hNm1EBHVifr87GODpz8fpV5UZtd7OqZtrW9RwJeMKf5neI0Evpzkv/91pLQ3MbT6JX YQvfjazaZO7Yyom9jcaMJyey9HktA0dUciIGj3r15+QMSD68NRS+h08TN3KaJVaVuz sRz7u8p3VLZNw== From: Josh Poimboeuf To: linux-kernel@vger.kernel.org Cc: jgross@suse.com, richard.henderson@linaro.org, ink@jurassic.park.msu.ru, mattst88@gmail.com, linux-alpha@vger.kernel.org, linux@armlinux.org.uk, linux-arm-kernel@lists.infradead.org, catalin.marinas@arm.com, will@kernel.org, guoren@kernel.org, linux-csky@vger.kernel.org, linux-ia64@vger.kernel.org, chenhuacai@kernel.org, kernel@xen0n.name, loongarch@lists.linux.dev, f.fainelli@gmail.com, bcm-kernel-feedback-list@broadcom.com, tsbogend@alpha.franken.de, linux-mips@vger.kernel.org, jiaxun.yang@flygoat.com, mpe@ellerman.id.au, npiggin@gmail.com, christophe.leroy@csgroup.eu, linuxppc-dev@lists.ozlabs.org, ysato@users.sourceforge.jp, dalias@libc.org, linux-sh@vger.kernel.org, davem@davemloft.net, sparclinux@vger.kernel.org, tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, dave.hansen@linux.intel.com, x86@kernel.org, hpa@zytor.com, chris@zankel.net, jcmvbkbc@gmail.com, linux-xtensa@linux-xtensa.org, peterz@infradead.org, juri.lelli@redhat.com, vincent.guittot@linaro.org, dietmar.eggemann@arm.com, rostedt@goodmis.org, bsegall@google.com, mgorman@suse.de, bristot@redhat.com, vschneid@redhat.com, paulmck@kernel.org Subject: [PATCH 16/22] sparc/cpu: Mark cpu_play_dead() __noreturn Date: Fri, 3 Feb 2023 14:05:25 -0800 Message-Id: X-Mailer: git-send-email 2.39.0 In-Reply-To: References: MIME-Version: 1.0 Content-type: text/plain X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS 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?1756849383501669302?= X-GMAIL-MSGID: =?utf-8?q?1756849383501669302?= cpu_play_dead() doesn't return. Annotate it as such. By extension this also makes arch_cpu_idle_dead() noreturn. Signed-off-by: Josh Poimboeuf --- arch/sparc/include/asm/smp_64.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/sparc/include/asm/smp_64.h b/arch/sparc/include/asm/smp_64.h index e75783b6abc4..505b6700805d 100644 --- a/arch/sparc/include/asm/smp_64.h +++ b/arch/sparc/include/asm/smp_64.h @@ -49,7 +49,7 @@ int hard_smp_processor_id(void); void smp_fill_in_cpu_possible_map(void); void smp_fill_in_sib_core_maps(void); -void cpu_play_dead(void); +void __noreturn cpu_play_dead(void); void smp_fetch_global_regs(void); void smp_fetch_global_pmu(void); From patchwork Fri Feb 3 22:05:26 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Josh Poimboeuf X-Patchwork-Id: 52686 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp1080706wrn; Fri, 3 Feb 2023 14:09:13 -0800 (PST) X-Google-Smtp-Source: AK7set/2YmW2M0QSVwxq0ZbUwW/f5u6iMwcaSh48yvwNzYd/uvz3Y3HukAiG0ziAINL4rmb6IT4k X-Received: by 2002:a05:6a21:33a1:b0:bf:58d1:ce92 with SMTP id yy33-20020a056a2133a100b000bf58d1ce92mr7435526pzb.17.1675462153318; Fri, 03 Feb 2023 14:09:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675462153; cv=none; d=google.com; s=arc-20160816; b=Rofea5Zg2nEBjn3/fMWC0WyDfMbI9zp0d5J5+s1Gi+Sh5L/qh8encVlXKLTM1P9z5u i7NnVpmQweC/3jOEyYpgHi0WTAVfp7F57r+hXTxv1xh8wr4OvvUFmkKTPYzXCAzt+hxa uDS/+EDw1v0d0d+Y6PtYSS2OrihJQtFSoMJmlmqVvJUnoqblZAb5pmrUV4rmtPwe+rpd aBiChzubdYw3KREgQ71jCo1hdwXebI2bcCiowbiXCLKso8AP/4Fusjy+mkuUPg1GX/l1 BNalbZr28mnloobWvsNLa2go/2uYVpOl95NtkcElHaL7hqKFD5aKLZ6f9Mx1b6WLAN0T hcDg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=o1qdqshdUKvlxJgFE7aO6GgjgWyBMjuRDdQbSrNWpKE=; b=w40JaTU77yidUbLQSyCx7agP8FNiMUnUtnfcA6JA41YutM87jUyVGbZBs4YLbEegOF 1gaLg9CtdhxnSpKVOUeh6CqcAeA7FZy1/Tbyf5Qcbo8da9CgmOl9g0r4bIKQ8xtcDfg1 aNjCC5tj/wMyeoECQiQOkvv421ZlJ6/1DwEa5BDuifEvJFnHE2ZP8VjBS4jx9xxUGCaN e4d/XGbbn8rlVqt/o3cbyR+kEeLiDIglYGbq/pfitU/uA27OevRU03r2YANCpltGcHJv p+twnTysj9bcyCtyuj7+rPdiPf+opkuiC2H61Rha76t09XH2v670Y0ZI0T2UJl1MoiHI A8Vg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="cz/e4Tiq"; 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=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z2-20020a637e02000000b004da5d3a8028si3895856pgc.223.2023.02.03.14.09.00; Fri, 03 Feb 2023 14:09:13 -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=@kernel.org header.s=k20201202 header.b="cz/e4Tiq"; 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=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231526AbjBCWIf (ORCPT + 99 others); Fri, 3 Feb 2023 17:08:35 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58396 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233338AbjBCWHw (ORCPT ); Fri, 3 Feb 2023 17:07:52 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ECAB5B0ABF; Fri, 3 Feb 2023 14:06:21 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id A2A3B62031; Fri, 3 Feb 2023 22:06:13 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 61D75C433A8; Fri, 3 Feb 2023 22:06:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1675461973; bh=Gy7oghtDbUapfyH6lmA7zeDcDutJ46pdh8WMl0cgvVU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=cz/e4Tiq0/BvLDX93eISE4dEcCFBPucrGZqH4/s6/uvyLanSuD8oY7sBMKXuYt07K mhzTK34NA4E1JWXtyejdLqJNsro+yA1Yj3Uz502TOQTJjfQrpQWQsJNvWHGo5sndOU phtWnBDv3YdyzJc4hPNyl2ZLxgw8Kbshx78FoeWjgczSitx7GhnaXT9X29zcTpGQXi U01QFLtvja2ffq22rVz1PFTU+/uSTGm4lN21v5c1bGlJrZZQ1k+Db3jT20KJrVcazD dzlT0LcCZCfDKhnovvW6WCWz4JZBeYAV+6FJaLKMYf4o9dmDrEbEXRuAD7jpQl0uB+ MCNtPX36W5EEw== From: Josh Poimboeuf To: linux-kernel@vger.kernel.org Cc: jgross@suse.com, richard.henderson@linaro.org, ink@jurassic.park.msu.ru, mattst88@gmail.com, linux-alpha@vger.kernel.org, linux@armlinux.org.uk, linux-arm-kernel@lists.infradead.org, catalin.marinas@arm.com, will@kernel.org, guoren@kernel.org, linux-csky@vger.kernel.org, linux-ia64@vger.kernel.org, chenhuacai@kernel.org, kernel@xen0n.name, loongarch@lists.linux.dev, f.fainelli@gmail.com, bcm-kernel-feedback-list@broadcom.com, tsbogend@alpha.franken.de, linux-mips@vger.kernel.org, jiaxun.yang@flygoat.com, mpe@ellerman.id.au, npiggin@gmail.com, christophe.leroy@csgroup.eu, linuxppc-dev@lists.ozlabs.org, ysato@users.sourceforge.jp, dalias@libc.org, linux-sh@vger.kernel.org, davem@davemloft.net, sparclinux@vger.kernel.org, tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, dave.hansen@linux.intel.com, x86@kernel.org, hpa@zytor.com, chris@zankel.net, jcmvbkbc@gmail.com, linux-xtensa@linux-xtensa.org, peterz@infradead.org, juri.lelli@redhat.com, vincent.guittot@linaro.org, dietmar.eggemann@arm.com, rostedt@goodmis.org, bsegall@google.com, mgorman@suse.de, bristot@redhat.com, vschneid@redhat.com, paulmck@kernel.org Subject: [PATCH 17/22] x86/cpu: Make sure play_dead() doesn't return Date: Fri, 3 Feb 2023 14:05:26 -0800 Message-Id: <7bfd319e3ebf5a3e56d668bee7a3b981b22b1863.1675461757.git.jpoimboe@kernel.org> X-Mailer: git-send-email 2.39.0 In-Reply-To: References: MIME-Version: 1.0 Content-type: text/plain X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS 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?1756849403245293494?= X-GMAIL-MSGID: =?utf-8?q?1756849403245293494?= After commit 076cbf5d2163 ("x86/xen: don't let xen_pv_play_dead() return"), play_dead() never returns. 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. Signed-off-by: Josh Poimboeuf --- arch/x86/include/asm/smp.h | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/x86/include/asm/smp.h b/arch/x86/include/asm/smp.h index b4dbb20dab1a..8f628e08b25a 100644 --- a/arch/x86/include/asm/smp.h +++ b/arch/x86/include/asm/smp.h @@ -96,6 +96,7 @@ static inline void __cpu_die(unsigned int cpu) static inline void play_dead(void) { smp_ops.play_dead(); + BUG(); } static inline void smp_send_reschedule(int cpu) From patchwork Fri Feb 3 22:05:27 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Josh Poimboeuf X-Patchwork-Id: 52688 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp1081052wrn; Fri, 3 Feb 2023 14:10:07 -0800 (PST) X-Google-Smtp-Source: AK7set9uWB8SDO3lB4PHnJNPHcHHBhnT2SJvVuKvS3KCZ6vIa0tpdTqZ1+7ZVDSb8ghoo5VOEoAH X-Received: by 2002:a05:6a20:e611:b0:bf:d9f0:aa27 with SMTP id my17-20020a056a20e61100b000bfd9f0aa27mr4737165pzb.55.1675462207656; Fri, 03 Feb 2023 14:10:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675462207; cv=none; d=google.com; s=arc-20160816; b=Q1IaVfRAotEu2Cfp3CdJ5lC2wV8a0O6gImQCP4jxFfDlv3+XmkIhbZNcKzvOqWEg1E t9Kkeua6ObbNUisoqLk0GZKZalUuXCzJ6167Qh+K0n6Mx+51e2YnHzT5RqTJWV0mxq50 AW9lzJGDetb673sssbzxX9oQoEVn1DvaD79OBmW8VfHCqaM5vBBcwe37X61TrNyTuQoB HkD3Uy7UtWQLzDP18vgdFQOXGwGZF+ezKqFrAOYreqUToAxVrR0FHyJFy/anNenRvxUl D+lY9VIXiT4VzlKEBJRD+71qo9DFHoH9mOw+EgY9YIqIpHrHbIZ8MNpKJoB7U/LK1Yj/ 8fKA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=gtzQ4f+Sl7IjL8DnmBcrYxcH/rm0pahW193n2c/GXw0=; b=OFCNv5q2Sqyqq5LhgBMehp16HfNgdAT2r8HfrJWy9Jcuu9S+sZkq4nY+fp7jRbD19n ulFUMxd3mnFgC9WWVjpQ6kCaj/SR9sNpp+6H5EjN8LfMSk5I1Qb3jaTACQ2tb8pwcxZC IQD6HTTcmHJnmC9n2UxALAaxA78FhSgsaK5a1wMHP3iKZIeZjt2z6ry/klpCTql81bJU 4NCUZUXLcG+vaV86WD9Q1gVjkLmWnJSM3kQJNxfGg4FI5LhfS2Orb3jU2cKBwVrA7RRQ XZm3yNeAgoWrko9BZOstFWdcDcVrTV2lGezv/LizTmIWzLpXtKUvHj4WFaKa1vJlBsFJ nCXQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=k2rixxjx; 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=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x11-20020a63aa4b000000b004e1f84a0049si3401887pgo.823.2023.02.03.14.09.54; Fri, 03 Feb 2023 14:10:07 -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=@kernel.org header.s=k20201202 header.b=k2rixxjx; 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=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234151AbjBCWJA (ORCPT + 99 others); Fri, 3 Feb 2023 17:09:00 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57714 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233533AbjBCWIF (ORCPT ); Fri, 3 Feb 2023 17:08:05 -0500 Received: from sin.source.kernel.org (sin.source.kernel.org [145.40.73.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3D939AF0DE; Fri, 3 Feb 2023 14:06:31 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sin.source.kernel.org (Postfix) with ESMTPS id F4222CE31C3; Fri, 3 Feb 2023 22:06:16 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3DF46C4339C; Fri, 3 Feb 2023 22:06:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1675461975; bh=bXJvKHvsodpO0BPlco2s0aMLVPJi3gp9AhXx9K2v2Lo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=k2rixxjxWrJRRyUMI/UIOonFKDfpZNhS5xd+/8CuXK0prPGkQnnv9Kfg10DIKZOUJ TnQ9bBPlqmYQDrXpQSFxMhJGIKsE/V+npKts3TEZNdT8iuM0s9Iq/8P0rYPzPyZwJ4 Jh6lhsIXNcEbx1B5mweJ3CQge57WG2SQxBM/6jESjWiE44sc6FKSEPhym1/PqmwKMO nhRytRWxyWzWSDDhS1ZWNY+LxbnIUqHAkuGjhF7/fQVzkTW/gQPTqo4uppxXJbVsVu u2gxECq3yVWPrt2pTsvgswuFgQhH6K6nVThvA924uuSIhWhkbCYXj3lDMkpQXXw5sZ tcWARjjzt2M+A== From: Josh Poimboeuf To: linux-kernel@vger.kernel.org Cc: jgross@suse.com, richard.henderson@linaro.org, ink@jurassic.park.msu.ru, mattst88@gmail.com, linux-alpha@vger.kernel.org, linux@armlinux.org.uk, linux-arm-kernel@lists.infradead.org, catalin.marinas@arm.com, will@kernel.org, guoren@kernel.org, linux-csky@vger.kernel.org, linux-ia64@vger.kernel.org, chenhuacai@kernel.org, kernel@xen0n.name, loongarch@lists.linux.dev, f.fainelli@gmail.com, bcm-kernel-feedback-list@broadcom.com, tsbogend@alpha.franken.de, linux-mips@vger.kernel.org, jiaxun.yang@flygoat.com, mpe@ellerman.id.au, npiggin@gmail.com, christophe.leroy@csgroup.eu, linuxppc-dev@lists.ozlabs.org, ysato@users.sourceforge.jp, dalias@libc.org, linux-sh@vger.kernel.org, davem@davemloft.net, sparclinux@vger.kernel.org, tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, dave.hansen@linux.intel.com, x86@kernel.org, hpa@zytor.com, chris@zankel.net, jcmvbkbc@gmail.com, linux-xtensa@linux-xtensa.org, peterz@infradead.org, juri.lelli@redhat.com, vincent.guittot@linaro.org, dietmar.eggemann@arm.com, rostedt@goodmis.org, bsegall@google.com, mgorman@suse.de, bristot@redhat.com, vschneid@redhat.com, paulmck@kernel.org Subject: [PATCH 18/22] x86/cpu: Mark play_dead() __noreturn Date: Fri, 3 Feb 2023 14:05:27 -0800 Message-Id: <6e322880a30ed582847702f400fa99f55be821d3.1675461757.git.jpoimboe@kernel.org> X-Mailer: git-send-email 2.39.0 In-Reply-To: References: MIME-Version: 1.0 Content-type: text/plain X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS 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?1756849460085162318?= X-GMAIL-MSGID: =?utf-8?q?1756849460085162318?= play_dead() doesn't return. Annotate it as such. By extension this also makes arch_cpu_idle_dead() noreturn. Signed-off-by: Josh Poimboeuf --- arch/x86/include/asm/smp.h | 2 +- arch/x86/kernel/process.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/x86/include/asm/smp.h b/arch/x86/include/asm/smp.h index 8f628e08b25a..e6d1d2810e38 100644 --- a/arch/x86/include/asm/smp.h +++ b/arch/x86/include/asm/smp.h @@ -93,7 +93,7 @@ static inline void __cpu_die(unsigned int cpu) smp_ops.cpu_die(cpu); } -static inline void play_dead(void) +static inline void __noreturn play_dead(void) { smp_ops.play_dead(); BUG(); diff --git a/arch/x86/kernel/process.c b/arch/x86/kernel/process.c index b650cde3f64d..f1ec36caf1d8 100644 --- a/arch/x86/kernel/process.c +++ b/arch/x86/kernel/process.c @@ -715,7 +715,7 @@ static bool x86_idle_set(void) } #ifndef CONFIG_SMP -static inline void play_dead(void) +static inline void __noreturn play_dead(void) { BUG(); } From patchwork Fri Feb 3 22:05:28 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Josh Poimboeuf X-Patchwork-Id: 52684 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp1080680wrn; Fri, 3 Feb 2023 14:09:07 -0800 (PST) X-Google-Smtp-Source: AK7set9+qzqRIXhss0soDHridCrE6bmus5TQ+T9OkjyzaOgWxpQCVlyaqifTbtsbkUSKEr2InSby X-Received: by 2002:a17:903:30c9:b0:198:eeb4:1d05 with SMTP id s9-20020a17090330c900b00198eeb41d05mr586969plc.3.1675462147478; Fri, 03 Feb 2023 14:09:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675462147; cv=none; d=google.com; s=arc-20160816; b=dbD4BR+N0KZ+KVs949N82/lT5k3NUkGRpVq5y636hjljTDe+fhmOwkqeI5ADdLrShZ CmNMP1aZmp/BImeR6PksNjr1nFZzbIVF0S+fRogftcW/3LHvDPIajRpnZ6pq3N3lE7pG Xx8NLYB+gyaB5BolZ7JyEchPeNFrW7nbIyvt3xkIG6OQf/UV0JkSVmWDfP2SHoeVBFe3 YQ/NS8rHuZzkOjQ+jFpd6hRKPC0JiywT+k+YMutvvPAXN8e++sHu+H2+qpf73wGWAj7s q4W3NTlYJPX8OUZ84ebZF9RIqQzVYg8ocGtcN+d8qO8lmMkvEujKFlbUbVZuEJAXECFe xnzQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=WLqw2UVnIWdWpIiBTQe7cdpFmbp5k7i/1vqLZuVa9nc=; b=Igg6rZtFe2DMsdeVQdGrl0Z3pR9bUW1krZMvby86koIeoCGZWBey5kAuBX+FSj6CVK mykksgiBTPSR2kgh47UlaTtqGi/XlYFAd8YFlAcMXbx0dp9Oud6qzTUiSBQGmOsscMuI GRerjcyGPxNvngtGR1hRhrhcUQ+8tlxNVVQFVTNer3JedFNtCztk3+05KNCgLWPIZ/3p 1XvjkiiLgUPEoX2+YmoYiZCR4bgljQh0z/seEOqgKM1HstrKipr8wL9AEvsP9XWANAGq hMRJzNpccvY/+X4LxFHK8ddmDVdt/IoYQsbwEkMZZCU87CC3BHpZ5il89RmUIMvj1zKO IgKQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=k65vkzVP; 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=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u7-20020a170902e5c700b00194d0ae0eedsi3715687plf.546.2023.02.03.14.08.55; Fri, 03 Feb 2023 14:09:07 -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=@kernel.org header.s=k20201202 header.b=k65vkzVP; 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=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233410AbjBCWIo (ORCPT + 99 others); Fri, 3 Feb 2023 17:08:44 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58638 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230114AbjBCWHz (ORCPT ); Fri, 3 Feb 2023 17:07:55 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 72F37B3DD1; Fri, 3 Feb 2023 14:06:26 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 69FDD6203A; Fri, 3 Feb 2023 22:06:17 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 265AEC433D2; Fri, 3 Feb 2023 22:06:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1675461976; bh=qzio4RRFUV3T4RxMjX88Z4lXma5TBrgxzmQ4rFvXUQ4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=k65vkzVP6z141oLnhjfrwBtKaSVH4NDImaR6KsAo5tm4t33CTjXSkk1Kc002UVteN xjJFsLbbmrzV/oEDThT0uVKwXiyt81xJhbaZw5d1W0aCS8iJi8ZN1n47ZmOxdaXlne brWwWunBne264Md4i+0bg1dx7gUqkbA9IFbPGDydUxEo11sw9DVpvqZHgK2MDBJDej trULeFzTKyDLcTkcAA8D9XSzTnv4n/e1IfgE/o/RMoSp7z0wipVfyAtH77G7/nVsy4 343nx2w/X70+IGMD3m7acnwGo130O5HOl5lHXueR8i/o1BQV7Ek1JE0i3Q3oOf9k9F DgZNg3mMxOn+w== From: Josh Poimboeuf To: linux-kernel@vger.kernel.org Cc: jgross@suse.com, richard.henderson@linaro.org, ink@jurassic.park.msu.ru, mattst88@gmail.com, linux-alpha@vger.kernel.org, linux@armlinux.org.uk, linux-arm-kernel@lists.infradead.org, catalin.marinas@arm.com, will@kernel.org, guoren@kernel.org, linux-csky@vger.kernel.org, linux-ia64@vger.kernel.org, chenhuacai@kernel.org, kernel@xen0n.name, loongarch@lists.linux.dev, f.fainelli@gmail.com, bcm-kernel-feedback-list@broadcom.com, tsbogend@alpha.franken.de, linux-mips@vger.kernel.org, jiaxun.yang@flygoat.com, mpe@ellerman.id.au, npiggin@gmail.com, christophe.leroy@csgroup.eu, linuxppc-dev@lists.ozlabs.org, ysato@users.sourceforge.jp, dalias@libc.org, linux-sh@vger.kernel.org, davem@davemloft.net, sparclinux@vger.kernel.org, tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, dave.hansen@linux.intel.com, x86@kernel.org, hpa@zytor.com, chris@zankel.net, jcmvbkbc@gmail.com, linux-xtensa@linux-xtensa.org, peterz@infradead.org, juri.lelli@redhat.com, vincent.guittot@linaro.org, dietmar.eggemann@arm.com, rostedt@goodmis.org, bsegall@google.com, mgorman@suse.de, bristot@redhat.com, vschneid@redhat.com, paulmck@kernel.org Subject: [PATCH 19/22] xtensa/cpu: Make sure cpu_die() doesn't return Date: Fri, 3 Feb 2023 14:05:28 -0800 Message-Id: <13cfde410b50047d778f535d12d928813e92c745.1675461757.git.jpoimboe@kernel.org> X-Mailer: git-send-email 2.39.0 In-Reply-To: References: MIME-Version: 1.0 Content-type: text/plain X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS 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?1756849396752764351?= X-GMAIL-MSGID: =?utf-8?q?1756849396752764351?= 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. 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 4dc109dd6214..7bad78495536 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 */ From patchwork Fri Feb 3 22:05:29 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Josh Poimboeuf X-Patchwork-Id: 52685 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp1080705wrn; Fri, 3 Feb 2023 14:09:13 -0800 (PST) X-Google-Smtp-Source: AK7set8nhVHgeuFzaGLlluA2rX4NuADheZEQtU8WvS/2D9KMMMXNgw3o95Aor+mg8vZ+HOI/iNZl X-Received: by 2002:a17:90b:4b90:b0:230:80a7:5361 with SMTP id lr16-20020a17090b4b9000b0023080a75361mr2582383pjb.6.1675462152699; Fri, 03 Feb 2023 14:09:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675462152; cv=none; d=google.com; s=arc-20160816; b=g9XfyMtSrxbr5SpQAXSwikPHf8DShZmuZDBBbBD1YQlQmv4As8HO+V6keEsclg4f6Q o+laOfJr0W/+y5FSwqVNVnYULlAREZ5ZxIGjKason3b8YJ9hPOpfRgRrA9Xnc5uKNYw6 eZ1QIJmHMDfMlBgnGsI8+xp/pT9GU+GvivRox+SeVujb61aRyTUDEsrGMcOTOVvKrsWY 70x65HypS8/00eAicnvBfkn9TzdQw0n4pUY2fEmnAasblBf56cB2kn9dewp0v97Zd2rf KVqzR32hmvbCvhbf1yMciRX76A7ZjpopUrR+4NbTiWbSmc2xjgSmJkrkr5JaykekCc2q tU2Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=wJ1lrID8eRWKgL8mDg5rk21gRO8kzofV1kcA+wI3p+E=; b=ugskQYnIoh8uncEprS8l4uQAmEJaZ9lcgTH0x4ZL4PWJ4PAIuh+TmyIAjR9LXL3R2n cqkLSwHp3KE9wZzWAG1//Y44A8yOIYUABTsm3xVd7S24qyXMNyaK9raP1NRyKVmZfNiU DsFab422chiKDiB47PvSDxsnYBvbnPxlQotB8UvZ148Ci0mMhSK63TQvfN8VlFOjJB8V RI+bUyBNELpX5iXL7p+wYBumYwvFs3tAPVvxgWlRAWDk6F9CkP6Sw4Pq3HqU3Mf13bE+ yCn+i21aDoUKafLTE4ac/2q3Zh5PiY+K2swamMBR/9N7+BhT/qwFa/ZGSuHT25uYzi5O T2cA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=YYnlpQSI; 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=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b16-20020a17090a551000b0022bb81526a9si3703520pji.8.2023.02.03.14.08.59; Fri, 03 Feb 2023 14:09:12 -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=@kernel.org header.s=k20201202 header.b=YYnlpQSI; 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=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234125AbjBCWIw (ORCPT + 99 others); Fri, 3 Feb 2023 17:08:52 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58072 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233501AbjBCWH7 (ORCPT ); Fri, 3 Feb 2023 17:07:59 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1022DAE87E; Fri, 3 Feb 2023 14:06:31 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 4D0856202F; Fri, 3 Feb 2023 22:06:19 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 00232C433AA; Fri, 3 Feb 2023 22:06:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1675461978; bh=ikmsAPzcHbKm4BPXAk4vCHLoc1MwBOQvSdhyskC8aqk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=YYnlpQSIhXfIuZtmwX80cwYo8HEVkuAoZxxjLbmDEqRvH2RxesFNwaeIQN8SzGBzW vLLgsYhL0lS45Fyp9Ve74Sw7eovpDoz9Guf5+yE5xWhW9jMzSmF6nhwFbdConwpN/q D9yipeu6g+D7RAafGUb1qRd6MBnXP+1xEKWp3ZVkISd4WH7IqGChCY1svitqCGUU2L JdWz9fBXaPuCoakVUsltIf7yUwqSNv7WF803g7r/quj+PbB+xvBjdfXD9xeqxTxmh5 kyPlNWlqjarxCrasQl1DO4ameVNS+OQy/bXqd6w2fDPppGX9mt+KVd1ga0sKukW8F6 dCgB90Ai6peWA== From: Josh Poimboeuf To: linux-kernel@vger.kernel.org Cc: jgross@suse.com, richard.henderson@linaro.org, ink@jurassic.park.msu.ru, mattst88@gmail.com, linux-alpha@vger.kernel.org, linux@armlinux.org.uk, linux-arm-kernel@lists.infradead.org, catalin.marinas@arm.com, will@kernel.org, guoren@kernel.org, linux-csky@vger.kernel.org, linux-ia64@vger.kernel.org, chenhuacai@kernel.org, kernel@xen0n.name, loongarch@lists.linux.dev, f.fainelli@gmail.com, bcm-kernel-feedback-list@broadcom.com, tsbogend@alpha.franken.de, linux-mips@vger.kernel.org, jiaxun.yang@flygoat.com, mpe@ellerman.id.au, npiggin@gmail.com, christophe.leroy@csgroup.eu, linuxppc-dev@lists.ozlabs.org, ysato@users.sourceforge.jp, dalias@libc.org, linux-sh@vger.kernel.org, davem@davemloft.net, sparclinux@vger.kernel.org, tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, dave.hansen@linux.intel.com, x86@kernel.org, hpa@zytor.com, chris@zankel.net, jcmvbkbc@gmail.com, linux-xtensa@linux-xtensa.org, peterz@infradead.org, juri.lelli@redhat.com, vincent.guittot@linaro.org, dietmar.eggemann@arm.com, rostedt@goodmis.org, bsegall@google.com, mgorman@suse.de, bristot@redhat.com, vschneid@redhat.com, paulmck@kernel.org Subject: [PATCH 20/22] xtensa/cpu: Mark cpu_die() __noreturn Date: Fri, 3 Feb 2023 14:05:29 -0800 Message-Id: X-Mailer: git-send-email 2.39.0 In-Reply-To: References: MIME-Version: 1.0 Content-type: text/plain X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS 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?1756849401853803353?= X-GMAIL-MSGID: =?utf-8?q?1756849401853803353?= cpu_die() doesn't return. Annotate it as such. By extension this also makes arch_cpu_idle_dead() noreturn. Signed-off-by: Josh Poimboeuf --- arch/xtensa/include/asm/smp.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/xtensa/include/asm/smp.h b/arch/xtensa/include/asm/smp.h index 4e43f5643891..5dc5bf8cdd77 100644 --- a/arch/xtensa/include/asm/smp.h +++ b/arch/xtensa/include/asm/smp.h @@ -33,7 +33,7 @@ void show_ipi_list(struct seq_file *p, int prec); void __cpu_die(unsigned int cpu); int __cpu_disable(void); -void cpu_die(void); +void __noreturn cpu_die(void); void cpu_restart(void); #endif /* CONFIG_HOTPLUG_CPU */ From patchwork Fri Feb 3 22:05:30 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Josh Poimboeuf X-Patchwork-Id: 52687 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp1080759wrn; Fri, 3 Feb 2023 14:09:22 -0800 (PST) X-Google-Smtp-Source: AK7set/2sh+MemZZOu/Wa+aRTm58/GDJFzl7gjLbJSJKgBjGq/NjYH9aOgx+a7PvelVmIrwW2BGn X-Received: by 2002:a05:6a21:6d8e:b0:ad:def6:af3 with SMTP id wl14-20020a056a216d8e00b000addef60af3mr14410211pzb.57.1675462161898; Fri, 03 Feb 2023 14:09:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675462161; cv=none; d=google.com; s=arc-20160816; b=woHqIn1iDoYMHx3R3RZMisftpbPu+eE/nriBvCdjKaxy8443QeW28RkAKAJYw2lxsZ AY+k0lW+bnED5zDK3SoqTym6LXmdo836Wopfsli3RmycnpsbGdflYc+Y+PudgVxPpzhL GM0El8o7aNEELFyu1jxdcuQ9REifz/pT557jlbZIDQpt2jcuYsYu8u23kwK2DNtMlSEL acMNsqhiXyENw3KnWN4kBW2YdPWr6B2LYfEdDy/Fi7hCJhI7yacg/e9qwfzWDmuRbu4T YynAqgA/8WoCkeKyMnFN888+R/O1T8OZ6r03wRJm8wZL0ZYlU0tOgjaJZPJ+q4GVB4mp qpSQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=KG6T9xBp4bpsefzY8iY0vQjJmZWfUaqQ9y2TqW+607Q=; b=ZVJr7RkLM2vjN9xoKDkm6dPt7ldn+Z7lgnhDL/Z/ft/uPTZv3/wZC2+LLd1a2qcU// TFP3AiunheRvy9ueue5TklrGGcNQDcliqruRMbiGtBv+UKU+j7SKMm8VTnVdv3apYxDT GvG/UhGwb6O4I6oHdThEdTy2fHHtzMHebXQrU6UWEP6lW7oVVI0uWHtg4RRzeWuj075O qCHHW0RQFD02O7LsVkqLzb29+TKLt0UEQWXduAWivkB1OpvrmqQbPVOoqKT3E5hIgC0t Om9y3mmnu7hhd5h4NK6UkpYNeh0Rw0e6qQrXG2S9t7VBJC28foAr0LGwOd8pf9K40Lxd aNUg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=mzBDKmAx; 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=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t30-20020a63b25e000000b004cf0cc0dc35si3817132pgo.874.2023.02.03.14.09.09; Fri, 03 Feb 2023 14:09:21 -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=@kernel.org header.s=k20201202 header.b=mzBDKmAx; 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=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232931AbjBCWI5 (ORCPT + 99 others); Fri, 3 Feb 2023 17:08:57 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58186 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232978AbjBCWIJ (ORCPT ); Fri, 3 Feb 2023 17:08:09 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 53F96A77BC; Fri, 3 Feb 2023 14:06:32 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 33CE562033; Fri, 3 Feb 2023 22:06:21 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id DBA2EC433D2; Fri, 3 Feb 2023 22:06:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1675461980; bh=cvjRNwH2kRiWR8c5UNqBmClynEmYqcho7035VrMra1c=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mzBDKmAx5z+R9uqapSiL6Cn1VpVHH7drD5XxGu9fuiYmqLWPLl1KOVTTd69GQOZd5 ARPsyjFCWJ2cab/VUgVf5aLu2kjehWHFLflwHnpV4ETtShxVzGqPJj3jYZnAXjZ6vZ ILdvD+LHRKRK52SNwHW1v5UeCOq0Mb/aTdvnASi6K9qK4VC6gz7+t8xuKUqURMG9ry A57A0tZJ6+ElGZjnAGmS3t0NQQ386BYUrN/eXS2nP/L90dcie8kCbHpV4WPfJtZW6M Rqh4LPiEGX0Wb2TD086V1ccTZQJggpkhl/Zc5pAPnq0twHUFHirhVfRcjsHHRHfB30 nNVhfg+wbZp4A== From: Josh Poimboeuf To: linux-kernel@vger.kernel.org Cc: jgross@suse.com, richard.henderson@linaro.org, ink@jurassic.park.msu.ru, mattst88@gmail.com, linux-alpha@vger.kernel.org, linux@armlinux.org.uk, linux-arm-kernel@lists.infradead.org, catalin.marinas@arm.com, will@kernel.org, guoren@kernel.org, linux-csky@vger.kernel.org, linux-ia64@vger.kernel.org, chenhuacai@kernel.org, kernel@xen0n.name, loongarch@lists.linux.dev, f.fainelli@gmail.com, bcm-kernel-feedback-list@broadcom.com, tsbogend@alpha.franken.de, linux-mips@vger.kernel.org, jiaxun.yang@flygoat.com, mpe@ellerman.id.au, npiggin@gmail.com, christophe.leroy@csgroup.eu, linuxppc-dev@lists.ozlabs.org, ysato@users.sourceforge.jp, dalias@libc.org, linux-sh@vger.kernel.org, davem@davemloft.net, sparclinux@vger.kernel.org, tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, dave.hansen@linux.intel.com, x86@kernel.org, hpa@zytor.com, chris@zankel.net, jcmvbkbc@gmail.com, linux-xtensa@linux-xtensa.org, peterz@infradead.org, juri.lelli@redhat.com, vincent.guittot@linaro.org, dietmar.eggemann@arm.com, rostedt@goodmis.org, bsegall@google.com, mgorman@suse.de, bristot@redhat.com, vschneid@redhat.com, paulmck@kernel.org Subject: [PATCH 21/22] sched/idle: Make sure weak version of arch_cpu_idle_dead() doesn't return Date: Fri, 3 Feb 2023 14:05:30 -0800 Message-Id: <52f887a01f8ee38fb710c915c1a3205983563736.1675461757.git.jpoimboe@kernel.org> X-Mailer: git-send-email 2.39.0 In-Reply-To: References: MIME-Version: 1.0 Content-type: text/plain X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS 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?1756849411894357087?= X-GMAIL-MSGID: =?utf-8?q?1756849411894357087?= arch_cpu_idle_dead() should never return. Make it so. Signed-off-by: Josh Poimboeuf --- kernel/sched/idle.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/sched/idle.c b/kernel/sched/idle.c index e9ef66be2870..56e152f06d0f 100644 --- a/kernel/sched/idle.c +++ b/kernel/sched/idle.c @@ -75,7 +75,7 @@ static noinline int __cpuidle cpu_idle_poll(void) void __weak arch_cpu_idle_prepare(void) { } void __weak arch_cpu_idle_enter(void) { } void __weak arch_cpu_idle_exit(void) { } -void __weak arch_cpu_idle_dead(void) { } +void __weak arch_cpu_idle_dead(void) { while (1); } void __weak arch_cpu_idle(void) { cpu_idle_force_poll = 1; From patchwork Fri Feb 3 22:05:31 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Josh Poimboeuf X-Patchwork-Id: 52689 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp1082172wrn; Fri, 3 Feb 2023 14:13:01 -0800 (PST) X-Google-Smtp-Source: AK7set9JOy8ofJQIOeBJaccP8juSa4I+P4FPR/46x8eNHljorfpEw6jA2yKGInKJIGpv6tOBTysC X-Received: by 2002:a17:906:c243:b0:87f:546d:7cb5 with SMTP id bl3-20020a170906c24300b0087f546d7cb5mr11476192ejb.37.1675462381473; Fri, 03 Feb 2023 14:13:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675462381; cv=none; d=google.com; s=arc-20160816; b=TT4GI2jHKY4s+v1DLqqwH70nfVcnOjtjsH41cBJsJV8ZwfPtkrE/cgX3CeqolAEfaX T3bCpYFWR/+MiIHmrpE4zkvyaRvdlxya1xRH0/ExY7fmJCMO5oI8tANXd5pbINSZRq4M AfqurZPKTnXDi2FdQ87Jp8H68x17FlXH8YvpoU7KPIYtKWqPbo2MXFmMXd+A3pA3YQ8m F/2KdXuszx7ukWRDUoncYw/7VJW1MyN+lWcojZ70eNKsJcGNIuIZvurCQmwNHRudA0ag guvasA25GVDRHvgFCgUOhHoROGaB3B3m0SIqAc/s3KXtSiDVSMerWIASOIXZS9g1OtyS WaSw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=p7pRaZjDGsvyfB7jdhVLOUDYk0tGHrRc6egR9vIlrmw=; b=xDTpaULEq+1qarwt84nypP54UFSDbrU4ZaM04HJwoL2MGsqJmwBAHt8094bELEQ2b0 EJ/zXV6O9lbzhYD6sKhQKbpVKSueudwQavWA1GMbbyqg6QjmmdiiQOy8U/mVgSxkVibv Cup28Svh1iiDa1ouh1jBqi2huG0B0AVOCufxgR8wkINvMEhqAGpkr9TLWCdvF7UpKUsX epUOCi5S7Qpk9GSrHMMoRvU689DihxrXdkAOa/65HUjlPaeIUMp5chpRGTkiNoFBhFtN I+2PzRi38soAZ2a1AuAfYwXoIqweVPYKyuWmfvtQscVtme1NDdLivtnBbH98jL78nqZ2 jL4Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=o8eHohIT; 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=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h10-20020a056402280a00b004a0916f3e12si5536103ede.218.2023.02.03.14.12.34; Fri, 03 Feb 2023 14:13:01 -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=@kernel.org header.s=k20201202 header.b=o8eHohIT; 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=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233390AbjBCWJJ (ORCPT + 99 others); Fri, 3 Feb 2023 17:09:09 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56654 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233871AbjBCWIQ (ORCPT ); Fri, 3 Feb 2023 17:08:16 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1AA32AF0FA; Fri, 3 Feb 2023 14:06:34 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 1361062038; Fri, 3 Feb 2023 22:06:23 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C566CC433EF; Fri, 3 Feb 2023 22:06:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1675461982; bh=nXrabXpKFkbXCMFjc3rmCrrnT82/WMJleHEGw691mcc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=o8eHohITAVmxjRXNbpfeL/cd8yNdoWWWFTWag8bI9FPvrbMJMbn7FDeWO6jeb5YOD 09wPFTEb38+tMtIgPe9CHEcvDL5qejhmyy++aNANFxprUQblrITcsG2eqHUbL8gmjP 4gSQVCoZOcsy77T+LMkCLBQL3ugwMFw9fYlynnFYPAuVOyx0fjaF1UNV9fyR8q62PB h633UkAqPNNQmIqlOFdeaLl3kp8E9fQrbTqg4QDEu+JRFrn1I6ApIrNEekrHOTvbXp jHiZ0SPsYXyBzSGzOGZrRgHnyMS++i5x/iAEJAM5eK7R7f/TB4A4nPAJaqn+bn24YL BOf5EfzEJfk4Q== From: Josh Poimboeuf To: linux-kernel@vger.kernel.org Cc: jgross@suse.com, richard.henderson@linaro.org, ink@jurassic.park.msu.ru, mattst88@gmail.com, linux-alpha@vger.kernel.org, linux@armlinux.org.uk, linux-arm-kernel@lists.infradead.org, catalin.marinas@arm.com, will@kernel.org, guoren@kernel.org, linux-csky@vger.kernel.org, linux-ia64@vger.kernel.org, chenhuacai@kernel.org, kernel@xen0n.name, loongarch@lists.linux.dev, f.fainelli@gmail.com, bcm-kernel-feedback-list@broadcom.com, tsbogend@alpha.franken.de, linux-mips@vger.kernel.org, jiaxun.yang@flygoat.com, mpe@ellerman.id.au, npiggin@gmail.com, christophe.leroy@csgroup.eu, linuxppc-dev@lists.ozlabs.org, ysato@users.sourceforge.jp, dalias@libc.org, linux-sh@vger.kernel.org, davem@davemloft.net, sparclinux@vger.kernel.org, tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, dave.hansen@linux.intel.com, x86@kernel.org, hpa@zytor.com, chris@zankel.net, jcmvbkbc@gmail.com, linux-xtensa@linux-xtensa.org, peterz@infradead.org, juri.lelli@redhat.com, vincent.guittot@linaro.org, dietmar.eggemann@arm.com, rostedt@goodmis.org, bsegall@google.com, mgorman@suse.de, bristot@redhat.com, vschneid@redhat.com, paulmck@kernel.org Subject: [PATCH 22/22] sched/idle: Mark arch_cpu_idle_dead() __noreturn Date: Fri, 3 Feb 2023 14:05:31 -0800 Message-Id: <2eeb4425572785d1f05d8761dba1cf88c2105304.1675461757.git.jpoimboe@kernel.org> X-Mailer: git-send-email 2.39.0 In-Reply-To: References: MIME-Version: 1.0 Content-type: text/plain X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS 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?1756849642175048377?= X-GMAIL-MSGID: =?utf-8?q?1756849642175048377?= Before commit 076cbf5d2163 ("x86/xen: don't let xen_pv_play_dead() return"), in Xen, when a previously offlined CPU was brought back online, it unexpectedly resumed execution where it left off in the middle of the idle loop. There were some hacks to make that work, but the behavior was surprising as do_idle() doesn't expect an offlined CPU to return from the dead (in arch_cpu_idle_dead()). Now that Xen has been fixed, and the arch-specific implementations of arch_cpu_idle_dead() also don't return, give it a __noreturn attribute. This will cause the compiler to complain if an arch-specific implementation might return. It also improves code generation for both caller and callee. Also fixes the following warning: vmlinux.o: warning: objtool: do_idle+0x25f: unreachable instruction Reported-by: Paul E. McKenney Tested-by: Paul E. McKenney Signed-off-by: Josh Poimboeuf --- include/linux/cpu.h | 2 +- tools/objtool/check.c | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/include/linux/cpu.h b/include/linux/cpu.h index f83e4519c5f0..8582a7142623 100644 --- a/include/linux/cpu.h +++ b/include/linux/cpu.h @@ -182,7 +182,7 @@ void arch_cpu_idle(void); void arch_cpu_idle_prepare(void); void arch_cpu_idle_enter(void); void arch_cpu_idle_exit(void); -void arch_cpu_idle_dead(void); +void __noreturn arch_cpu_idle_dead(void); int cpu_report_state(int cpu); int cpu_check_up_prepare(int cpu); diff --git a/tools/objtool/check.c b/tools/objtool/check.c index 0f67c6a8bc98..e3fa2279d612 100644 --- a/tools/objtool/check.c +++ b/tools/objtool/check.c @@ -167,6 +167,7 @@ static bool __dead_end_function(struct objtool_file *file, struct symbol *func, "__reiserfs_panic", "__stack_chk_fail", "__ubsan_handle_builtin_unreachable", + "arch_cpu_idle_dead", "cpu_bringup_and_idle", "cpu_startup_entry", "do_exit",