From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 00F9DC433EF for ; Mon, 9 May 2022 04:26:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232701AbiEIE1B (ORCPT ); Mon, 9 May 2022 00:27:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55424 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234220AbiEIERT (ORCPT ); Mon, 9 May 2022 00:17:19 -0400 Received: from mail-pj1-x1034.google.com (mail-pj1-x1034.google.com [IPv6:2607:f8b0:4864:20::1034]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D391A11922A; Sun, 8 May 2022 21:13:25 -0700 (PDT) Received: by mail-pj1-x1034.google.com with SMTP id cq17-20020a17090af99100b001dc0386cd8fso11719142pjb.5; Sun, 08 May 2022 21:13:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=i4ZmSEZyae107M7woQKre9aBPoaep2udL6cDHmolvx4=; b=EelE4Sk2rLVbk1vLK9xnYcqXSyseWXVcrB40eFirQUnctT0lgrGQBnNU9A2L6k+bb7 OjDg+CYdzVjkdzqvx5z0D/d1zRh6WjH0+7K8OQrg1yKK/yaIsti73fDLvugPzgRgE98p Po61z8180HgTwzAO1H7b46taafqDlg2GeN2Z8lI+6hpgcfQhlQV2ivduSA92N8HYX79q 6qN07SFMZpwKLDRQr2aKIJiRfiaTUsp0HBUDbIAPm+s4S8xU32heA+KWOUxMF3xvaVvn fTGg+jDPKbodCq8Vtpj2sSfKIvQXG4tMqXOx/iBl9keMTJkMEduWgBvuxY1EFLa/QuB1 Egqg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=i4ZmSEZyae107M7woQKre9aBPoaep2udL6cDHmolvx4=; b=ULAP5IHq7nPoYoWagFHgca4TVzdX6PcHk8CSjbkKR2uql9cD4ftNojc6sDAtfNhzfZ gs/DPPBF5eSecSP3E4ww3H44ebF++e4mmUXt3x5NkFLak2WpbRH3wtZtd8GW9OWLSWd0 UWzdHQP1nMXIxwvrGBoGFowdggGALWfO0jFPLtC0/Y2+D4jK1EvCVQhlBIJ5rHYhxRjq ZiOq91IbI6Zwh9dfRLzZ3KiprRZZnVRDBcp6kzibUtK9HuJELV32pavYPlvcKevQkpR3 Sbm2ew4AaFuVPdMMzxOeqQaXYi23P0R7wmDGgfZJxQrOoYycYttrYaX6evgudR7cUa/k oKqA== X-Gm-Message-State: AOAM533s9h/53jyabYEWfvDRyFjQ2Ea7mZpZr1UXzprsOKkXkJjsRPe4 9OjfTEYK5H2IfIkBAq3rnZgdH70RPRsx X-Google-Smtp-Source: ABdhPJwA12GMNtxipiY1QrrqNCB1QXJ3EJmQp3Iv9uD5xQEH9BSDFsZL5vlxX/0LpgkUo1SfW2hNOg== X-Received: by 2002:a17:903:1211:b0:15e:8208:8cc0 with SMTP id l17-20020a170903121100b0015e82088cc0mr14708514plh.52.1652069600512; Sun, 08 May 2022 21:13:20 -0700 (PDT) Received: from piliu.users.ipa.redhat.com ([209.132.188.80]) by smtp.gmail.com with ESMTPSA id m19-20020a17090a7f9300b001cd60246575sm11478545pjl.17.2022.05.08.21.13.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 08 May 2022 21:13:20 -0700 (PDT) From: Pingfan Liu To: linux-ia64@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: Pingfan Liu , Eric Biederman , Peter Zijlstra , Thomas Gleixner , Valentin Schneider , Vincent Donnefort , Ingo Molnar , YueHaibing , Baokun Li , Randy Dunlap , kexec@lists.infradead.org, Geert Uytterhoeven , Kees Cook , Jens Axboe , Russell King , Guenter Roeck , Arnd Bergmann , Wolfram Sang , Lee Jones , Catalin Marinas , Will Deacon , Mark Rutland , Peter Collingbourne , Marc Zyngier Subject: [PATCHv3 0/2] cpu/hotplug: Keep cpu hotplug disabled until the rebooting cpu is stable Date: Mon, 9 May 2022 12:13:03 +0800 Message-Id: <20220509041305.15056-1-kernelfans@gmail.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org For the arches (arm/arm64/ia64/riscv), which relies on the cpu hot-removing mechanism to implement "kexec -e", it is important to make sure that the rebooting happens on a valid online cpu. And this logic should have been guaranteed in migrate_to_reboot_cpu(). But the current code has either contradict (resolved by [2/2]) or redundancy (resolved by [1/2]) about the logic. V2 -> V3: Taking in [2/2], which also has problem with the valid rebooting cpu. (I had sent three patches for different arches. But maybe it is better to collapse them into one and collect acks from different arches' maintainers ) Cc: Eric Biederman Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Valentin Schneider Cc: Vincent Donnefort Cc: Ingo Molnar Cc: YueHaibing Cc: Baokun Li Cc: Randy Dunlap Cc: Valentin Schneider Cc: kexec@lists.infradead.org Cc: Geert Uytterhoeven Cc: Kees Cook Cc: Jens Axboe To: linux-ia64@vger.kernel.org Cc: Russell King Cc: Guenter Roeck Cc: Arnd Bergmann Cc: Wolfram Sang Cc: Lee Jones Cc: Catalin Marinas Cc: Will Deacon Cc: Mark Rutland Cc: Peter Collingbourne Cc: Marc Zyngier To: linux-arm-kernel@lists.infradead.org To: linux-kernel@vger.kernel.org Pingfan Liu (2): cpu/hotplug: Keep cpu hotplug disabled until the rebooting cpu is stable arm/arm64/ia64: kexec: fix the primary cpu passed to smp_shutdown_nonboot_cpus() arch/arm/kernel/reboot.c | 2 +- arch/arm64/kernel/process.c | 2 +- arch/ia64/kernel/process.c | 2 +- kernel/cpu.c | 16 ++++++++++------ kernel/kexec_core.c | 10 ++++------ 5 files changed, 17 insertions(+), 15 deletions(-) -- 2.31.1