Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp1217797rwb; Wed, 16 Nov 2022 14:03:52 -0800 (PST) X-Google-Smtp-Source: AA0mqf7eIYiO1WMPLC9bBE3Z+bc4gRhDnFE4hX0+N7f2pyKM3M7lsOGQr7/dG81Rhw1vQbmhQIc7 X-Received: by 2002:a17:907:6d9d:b0:7ae:63b8:d688 with SMTP id sb29-20020a1709076d9d00b007ae63b8d688mr19727714ejc.222.1668636232083; Wed, 16 Nov 2022 14:03:52 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1668636232; cv=pass; d=google.com; s=arc-20160816; b=gl2MHL8bdVBz4S1z4NtLTG7UW3WnEtxDCwzDhJHZIRTZr0DCUnaTrTv3qiqNQ7yCaG m0CtHSjk2wz5NjeVOAiuTq/hyhUIibc9e41+iwTBJ7AoW1t4PPvzG5uQPbNIpQYUlvJs AJ4mdZZ+eigwp9Sp3NmTSWFIphj2Vmo+4i5nOFAfgT4CN5JVglOcKOizsFvImaTTDVOC zc/oQXQJV/6a1USdhpu2hyCE3LFRml1EMK7uNQhtT59Tq/v0ZQjBMda1qo97frLDUCdB tGch2t4N7RRF23IOSHzPZh0uLn24Q3MZlzlS8s2ah8LTFViCNlxmSPpfB8BT8j/9ypPq 80EA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature:dkim-signature; bh=FBOy/qrNE2LepDHPiTcH8lZ4QjwqMgdDISjHDIOKtDE=; b=0OEOYFuwtHFmsWQZ2Jgnd4XmJDkV8jAhIY6ndSYL/4tBBU+ruL0DIkRVkxb1UhBTME hmLyKogFcoRxt1/+ZIJP7/vOVhMtyeFEvctXNY9gbGXR33KjdxS76bTX+V6OAdtbELeM 12YgQY9KYZrB3NJA1LKTQ/mE6Vw4MhijjVqQ1r79EBWiVy4YKrUMXw726zVH71b5j5Aa 4WX0JQvQHmaLLp9L0s+eFPNC+PipKy8lfKL8zZHlWPcsQQoUGnXay0C26eJr3KMuEXfO Gjh89VbHCmelfJNiVR7BUi3Jx9jCgj/RucR5lknpSROzp00qCTzX89lll+t9Pt34wxP7 5NFw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2022-7-12 header.b=gphGceHa; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b="UoaMOK/F"; arc=pass (i=1 spf=pass spfdomain=oracle.com dkim=pass dkdomain=oracle.com dmarc=pass fromdomain=oracle.com); 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=oracle.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id nc11-20020a1709071c0b00b0079330b37fb6si15505935ejc.880.2022.11.16.14.03.16; Wed, 16 Nov 2022 14:03:52 -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=@oracle.com header.s=corp-2022-7-12 header.b=gphGceHa; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b="UoaMOK/F"; arc=pass (i=1 spf=pass spfdomain=oracle.com dkim=pass dkdomain=oracle.com dmarc=pass fromdomain=oracle.com); 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=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233687AbiKPVsB (ORCPT + 91 others); Wed, 16 Nov 2022 16:48:01 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49352 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234174AbiKPVrf (ORCPT ); Wed, 16 Nov 2022 16:47:35 -0500 Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D5AE018399 for ; Wed, 16 Nov 2022 13:47:32 -0800 (PST) Received: from pps.filterd (m0246617.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 2AGJDxk7021268; Wed, 16 Nov 2022 21:47:08 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-transfer-encoding : content-type : mime-version; s=corp-2022-7-12; bh=FBOy/qrNE2LepDHPiTcH8lZ4QjwqMgdDISjHDIOKtDE=; b=gphGceHaIo0HnCNId2MQnPNld7Iw7kXHkmSvEoChcnWjTbVfW1js7c1OUQekNbKzvuqZ 5y8ma9qWNHXZ45/faNYeUeZTVU85SOUFc3CiBjYIKIaos3Al3p/Nf6k+FxzSWf1sWvdl /z19cfgTQNKkVa1yL5LtsjUCP2e6wpJb8qImi0dKCeerq1k6bHGus0suDX+EBkJ60igw K/8nB8PGFUiKmG+GASfxMMydkkyEo38qw9N2C06ExA/Nf1Wz2bSqqtYk55GnJcnNK+WP Q71XAaO2ilEgq/H4ylxGK/giZarnGwT2FChACowbKg2IMcA4pzV78k+GLq17fufJ422b 1Q== Received: from iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta03.appoci.oracle.com [130.35.103.27]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3kv3ns6pgv-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 16 Nov 2022 21:47:07 +0000 Received: from pps.filterd (iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.5/8.17.1.5) with ESMTP id 2AGKiJtD000432; Wed, 16 Nov 2022 21:47:06 GMT Received: from nam10-mw2-obe.outbound.protection.outlook.com (mail-mw2nam10lp2103.outbound.protection.outlook.com [104.47.55.103]) by iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3ku3k8y3u8-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 16 Nov 2022 21:47:06 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kv8GxNT8ASYluY1ZbH77d2A2cSfQ+V6NhYyBJNxZ0ugfgP95UfthE43PCfiVRLUS4JEvhi/EbIci0GvndVQG8L6emyUXrEhx7l1V3uKsyBumIAcPHascDlkYNsQSUCbNUnUaRAbR9bI30pIynlKcAamgfXr6M/couDWEr121O4uNpTb3Qou4nH9foP4ANv51HV3kWk6r4SzvBFGuJkIqWwPPUJ1TweY+VSnOn+dWdV/U/ldmEpF2/t8jiYZBwWDPmH0nHjnWJ8CIvyVTkyBf68jommqO1o6Gl8DbY2HbOYoyzOTWzrTpx2AZl5NIwKfFEGWKUNm0NyFEjC+vrGNGVQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=FBOy/qrNE2LepDHPiTcH8lZ4QjwqMgdDISjHDIOKtDE=; b=T2I4Vs+u/6Cs8L1V6YYzZxd0lsKsO8Xv0F0nMRLyskI7/qqgCQ5WdBeszQK5deNj19n30vt/qinKu+CYAMP07e+BjxtPzJcLRxybF9TBgP9cfLeyYoLnBnSZYZUTfK1hV1bwbMHsaI1E7LVuUGT95DAL5k50nsLbfhvFqIsDlE89kZZpEQYqKp64sr5QHiK+UQNpZd1bq5pErKwYYm+JQyuSw7eYYgdWFLq8T6asTaxCfBv1PhEtM0lNWm5VnBj5t0mAnferffyMhKnWNYjv27YANraqYn/mck51XZxfpvQhgFxfncNLRDU7NoNdNTzx2m34y4p6uOaLaua820d5xw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=FBOy/qrNE2LepDHPiTcH8lZ4QjwqMgdDISjHDIOKtDE=; b=UoaMOK/F9oNYiHCthgCd9X1x0yrBWVYf4UF0M5idKiqgjr8rFgQyNtj4Vyi7woUfGrTHcMxj0dnesWylNPDXV8gMG3oQSS0xVH66JSouBWfCW+iuguEXY6UZbP99UeSENTp1ZR8vAdcFkvvP491wbKN8pV5nj9C9PKbxYp6GKP0= Received: from CO1PR10MB4531.namprd10.prod.outlook.com (2603:10b6:303:6c::22) by SJ0PR10MB6376.namprd10.prod.outlook.com (2603:10b6:a03:485::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5813.19; Wed, 16 Nov 2022 21:47:03 +0000 Received: from CO1PR10MB4531.namprd10.prod.outlook.com ([fe80::f7b2:af85:fe37:31a7]) by CO1PR10MB4531.namprd10.prod.outlook.com ([fe80::f7b2:af85:fe37:31a7%9]) with mapi id 15.20.5813.019; Wed, 16 Nov 2022 21:47:03 +0000 From: Eric DeVolder To: linux-kernel@vger.kernel.org, x86@kernel.org, kexec@lists.infradead.org, ebiederm@xmission.com, dyoung@redhat.com, bhe@redhat.com, vgoyal@redhat.com Cc: tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, dave.hansen@linux.intel.com, hpa@zytor.com, nramas@linux.microsoft.com, thomas.lendacky@amd.com, robh@kernel.org, efault@gmx.de, rppt@kernel.org, david@redhat.com, sourabhjain@linux.ibm.com, konrad.wilk@oracle.com, boris.ostrovsky@oracle.com, eric.devolder@oracle.com Subject: [PATCH v14 5/7] kexec: exclude hot remove cpu from elfcorehdr notes Date: Wed, 16 Nov 2022 16:46:41 -0500 Message-Id: <20221116214643.6384-6-eric.devolder@oracle.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20221116214643.6384-1-eric.devolder@oracle.com> References: <20221116214643.6384-1-eric.devolder@oracle.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: SN1PR12CA0050.namprd12.prod.outlook.com (2603:10b6:802:20::21) To CO1PR10MB4531.namprd10.prod.outlook.com (2603:10b6:303:6c::22) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO1PR10MB4531:EE_|SJ0PR10MB6376:EE_ X-MS-Office365-Filtering-Correlation-Id: 7b30f633-edaa-4698-a496-08dac81c193c X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: OqHFaLbXyZRSAecE8TXYVxacT+9FCGG/6W0TGKYHoxYs8LYCw6UD/NUwiuwxwsQtPoHEXL7DugSwxznGDZu41cbN877A4yF+11eDbOYXPKbJLGYp2md9UhXcsgdCTGVr/N1cDR6MHtsIVagvk0k4Pi78fcrlYJ2JmeiwzEhVjQxuxOA7aD1HRgest+zvY4qcGFQdFJsFyOpm2G3T5ODLzJyGqBYJH43LY3/I8l1kLwLnmv/MmvQDDzPL3PK2H0fmwbcH7dxbvt9kAi6sQO7aA4PSTns4Pyhm8dgSqrOBzSTNJrKm3oE+8QcKma1VLanWRiDh1xPyU6J70go6DBtndLFoOnws3uy78PuY6BdH0EZtiouQUGYXNEdxlHGTCF37SrSGWJlsaUCOf+/VaGxlukqrAcLyhaUfdn0IaETcmMOFksjB8gGa8h90swDkMT3jAGGFaDVB85RtgRQT4cGcQ1yMJ3RgpX/dUtt3fvtLu/qd21YIt3cXW8MOd3m/RB2mY5K1kSfC3mcQ6U+ZJm/iMJXezwIfxbr5uPAQUS66G6d6+s9uc9hXSJMn0tLivr64ZRhEwfTSBMP/OKRVdeK/vI2O48gzxemxYMh9nA5ZoVHCQez8NHGylzZs7wFRS2byhbkDfxCTAt93RDzhXOMbzwgPHdKVPzGZITrMucPSv0vX+bVx9o0nqSYi6XBVTYyG1nw+cCZavl+y6g6IBqnDBA== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:CO1PR10MB4531.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230022)(39860400002)(396003)(346002)(136003)(366004)(376002)(451199015)(38100700002)(186003)(86362001)(6666004)(5660300002)(6486002)(478600001)(2616005)(8936002)(7416002)(107886003)(6506007)(8676002)(4326008)(316002)(66556008)(66476007)(66946007)(41300700001)(1076003)(83380400001)(6512007)(2906002)(26005)(36756003);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?Ao4Bb+FP03WmIB/3YbbHwhOjiL7LSABhrM8I6i5CfZV57rOPevJMsD2KqMie?= =?us-ascii?Q?gBHFOSeYlOQbXVIu7EKruLk2Gq4I6lhvqJPq/UWjSD4U2KvG5jtVhWP6+enC?= =?us-ascii?Q?ysVDVDf2+TPgL1UvRwNDNE5T8/Ep07mTtxvqVHvL2PJw9YihRLUe51kmgbzF?= =?us-ascii?Q?P108ZZJu6Yb8NC4dZTc/lCCXY5AR5+1vg8FkVBLvnPVPqYBQDvajlFzLpmm/?= =?us-ascii?Q?c/yUaxvK8hp78MQJ4oslcwpX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Ir?= =?us-ascii?Q?exaIwUyVymhEcOg0aYxBkq+YSNnez5dUAGXxEF+3Ukx8kLLY4k+mQ4k/fcJi?= =?us-ascii?Q?/68CNLlJVu+xDIIJoi2uSe3HtWa58XavQt9kb1OriTa8bqjSSh/MEyVS6XdR?= =?us-ascii?Q?djtP3RM1vISJM7k8uymwUleb1w3Je/K2oQ9lNOBPjqwTPyLwNf5QcmtxSbG5?= =?us-ascii?Q?6knU2tCotdJlhO78wt79yqS1bYGH7JceEZFD/CCF1XuECixfFp7QSB1voTFc?= =?us-ascii?Q?xPx5Lz0Zbet8qz15jeirgns5L8sYaAw8HXPTMNnnRszCAO0I8g5LrXfVjYFH?= =?us-ascii?Q?4Y9+2neUg6+PgaEVCXEZb9VkA/izOcO7YvVsao7+KgN2Adu0Diq48ZYyhRzW?= =?us-ascii?Q?cdu4tWm1wFsBKiQT2j5s9vo7/EZt4K1vQXzpUKKyDA1Bf9d6/YjI4UP0qB8t?= =?us-ascii?Q?+0MllkuQXRSGmQVe7JLSOeYfZf6zM785c8AgFGhTffuS2oRUDg2n/hc01fSq?= =?us-ascii?Q?Lw=3D=3D?= X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: =?us-ascii?Q?luIJE1ZCWX9rMdP4/KKU2OptHb78lnhmMqpcSaIQGthgTUiCYbTC2uQZ+i7X?= =?us-ascii?Q?sIwAaG9yytsmhy/xn4E0vkf0sSX+42eJO5R/ly8rANo17IvTtdsdted1mxLw?= =?us-ascii?Q?EVRVv9FP+oUZfJOKOkZM/XG1gZMY/mCalmsoZJ7ycUhdRLJjbEN0RLMYoVNA?= =?us-ascii?Q?/pbEJfe/c1CLvldYnud9NLLtYDwOU4GJG5XsZw8e9Mzxqk1rUYHDQ8QfYO/5?= =?us-ascii?Q?D21aVsoLKOcaP6WXThcUfhAFcXTwUIkhEubuTzm8jhbv+evRRUqT1p6q8nkK?= =?us-ascii?Q?FqUC7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QoA1CHUuitdoDz?= =?us-ascii?Q?VzcrtEB7b6FLnZw7vZiq/MvKTX20sHb6I9PHOTMVhONfSzzbGkDSxNcvUH0l?= =?us-ascii?Q?2LzN1PDSsiCmytQXEDFD+Gn48pZxS6+oamYxiEpU+6B/3hM1gsALFHjQo9Ki?= =?us-ascii?Q?dEPZwbjkTKUlxGNysZHmnrRI2oTb9LeZ8clFIawSM60ZgQ=3D=3D?= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 7b30f633-edaa-4698-a496-08dac81c193c X-MS-Exchange-CrossTenant-AuthSource: CO1PR10MB4531.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Nov 2022 21:47:03.5483 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: F86+AcivgNO4yc4K3LNu0ejtr32yFw5eSsrW6n7A5GpgGuWrZ/k0fa9Xh3k9C0teZTH3lCTefs7Hc+6k2mvgmCO+zMRB+DLr/8r1+6RGLNw= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR10MB6376 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.219,Aquarius:18.0.895,Hydra:6.0.545,FMLib:17.11.122.1 definitions=2022-11-16_03,2022-11-16_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0 mlxscore=0 adultscore=0 phishscore=0 malwarescore=0 suspectscore=0 mlxlogscore=999 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2210170000 definitions=main-2211160148 X-Proofpoint-GUID: JiLGyF5UOqtVT6qOz8_Hx3_yE309Jf3a X-Proofpoint-ORIG-GUID: JiLGyF5UOqtVT6qOz8_Hx3_yE309Jf3a X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE 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 Due to use of CPUHP_AP_ONLINE_DYN, upon CPU unplug, the CPU is still in the for_each_present_cpu() list when within the handle_hotplug_event(). Thus the CPU must be explicitly excluded when building the new list of CPUs. This change identifies in handle_hotplug_event() the CPU to be excluded, and the check for excluding the CPU in crash_prepare_elf64_headers(). Signed-off-by: Eric DeVolder Acked-by: Baoquan He --- kernel/crash_core.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/kernel/crash_core.c b/kernel/crash_core.c index 4e7221226976..5c90a90f3fe3 100644 --- a/kernel/crash_core.c +++ b/kernel/crash_core.c @@ -366,6 +366,13 @@ int crash_prepare_elf64_headers(struct kimage *image, struct crash_mem *mem, /* Prepare one phdr of type PT_NOTE for each present CPU */ for_each_present_cpu(cpu) { +#ifdef CONFIG_CRASH_HOTPLUG + if (IS_ENABLED(CONFIG_HOTPLUG_CPU)) { + /* Skip the soon-to-be offlined cpu */ + if (image->hotplug_event && (cpu == image->offlinecpu)) + continue; + } +#endif phdr->p_type = PT_NOTE; notes_addr = per_cpu_ptr_to_phys(per_cpu_ptr(crash_notes, cpu)); phdr->p_offset = phdr->p_paddr = notes_addr; @@ -684,6 +691,16 @@ static void handle_hotplug_event(unsigned int hp_action, unsigned int cpu) /* Flag to differentiate between normal load and hotplug */ image->hotplug_event = true; + /* + * Due to use of CPUHP_AP_ONLINE_DYN, upon unplug and during + * this callback, the CPU is still in the for_each_present_cpu() + * list. Must explicitly look to exclude this CPU when building + * new list. + */ + image->offlinecpu = + (hp_action == KEXEC_CRASH_HP_REMOVE_CPU) ? + cpu : KEXEC_CRASH_HP_INVALID_CPU; + /* Now invoke arch-specific update handler */ arch_crash_handle_hotplug_event(image); -- 2.31.1