From patchwork Thu Jul 18 03:54:41 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jinjie Ruan X-Patchwork-Id: 13735993 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 9C16FC3DA49 for ; Thu, 18 Jul 2024 03:50:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Type: Content-Transfer-Encoding:MIME-Version:Message-ID:Date:Subject:CC:To:From: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=Mll5RfYJbBPnc24WyFLoyOpA/98kGmaJyQjqEiuZ4TA=; b=pH4HYMOap1UuBqEQB4xkEUtLT9 Q6hXgjXYoPTJQE15ILTTKhDvmZ/lxGAaH+a7uAj3ry9Y0GDWPnJEAuhag10ChHGZ/MmkafKKAD1gu 98VbyMKUI6E2Z0T5tPSXQefdrD/a68/X1Rbt3JK4gMPWgXBX6czdGABNKp+VQTyNzq9iOFEtp53g9 xmU/Wz4I/ZYatkOikWtxKSPMgEWKD6iOoh8hkoWrxtO07Ckqp8J/YN8CUf7FyiSvyla61w1paUpCX /nBTOBqbSbhKFPFBXCYIKcJ8K2osNuGMRAUgUhAFI3SRBsBeTkpkDK7yyh5E8tecgmPcpFUitk3wK 1YQrw0Gw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sUIA6-0000000FfPS-2rSj; Thu, 18 Jul 2024 03:50:34 +0000 Received: from szxga08-in.huawei.com ([45.249.212.255]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sUI9i-0000000FfJD-1d3V; Thu, 18 Jul 2024 03:50:15 +0000 Received: from mail.maildlp.com (unknown [172.19.88.105]) by szxga08-in.huawei.com (SkyGuard) with ESMTP id 4WPdx33lvqz1JCft; Thu, 18 Jul 2024 11:45:11 +0800 (CST) Received: from kwepemi100008.china.huawei.com (unknown [7.221.188.57]) by mail.maildlp.com (Postfix) with ESMTPS id 31B2C140109; Thu, 18 Jul 2024 11:50:04 +0800 (CST) Received: from huawei.com (10.90.53.73) by kwepemi100008.china.huawei.com (7.221.188.57) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.39; Thu, 18 Jul 2024 11:50:03 +0800 From: Jinjie Ruan To: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , CC: Subject: [PATCH v3 0/3] crash: Fix x86_32 memory reserve dead loop bug Date: Thu, 18 Jul 2024 11:54:41 +0800 Message-ID: <20240718035444.2977105-1-ruanjinjie@huawei.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-Originating-IP: [10.90.53.73] X-ClientProxiedBy: dggems705-chm.china.huawei.com (10.3.19.182) To kwepemi100008.china.huawei.com (7.221.188.57) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240717_205013_898409_E2EEC07D X-CRM114-Status: UNSURE ( 8.68 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Fix two bugs for x86_32 crash memory reserve, and prepare to apply generic crashkernel reservation to 32bit system. Then use generic interface to simplify crashkernel reservation for ARM32. changes in v3: - Fix it as Baoquan suggested. - Update the commit message. changes in v2: - Peel off the other two patches. - Update the commit message and fix tag. Jinjie Ruan (3): crash: Fix x86_32 crash memory reserve dead loop bug crash: Fix x86_32 crash memory reserve dead loop bug at high ARM: Use generic interface to simplify crashkernel reservation arch/arm/Kconfig | 3 ++ arch/arm/include/asm/crash_reserve.h | 24 ++++++++++ arch/arm/kernel/setup.c | 63 ++++---------------------- arch/arm64/include/asm/crash_reserve.h | 2 + arch/riscv/include/asm/crash_reserve.h | 2 + arch/x86/include/asm/crash_reserve.h | 1 + kernel/crash_reserve.c | 5 +- 7 files changed, 44 insertions(+), 56 deletions(-) create mode 100644 arch/arm/include/asm/crash_reserve.h