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 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 BB7C3E7719B for ; Wed, 8 Jan 2025 10:22:43 +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-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=WH86RupiIpV7nQbN+Vsb8WGy3K790/g1ula/5WgtslI=; b=sS6nj6yacspGLyepxH7SvDYUu+ cPWweS6UDmXSNe4QCqAWIG4jxBkCwWP0BMO1/ULlI+JYy4mTzuyZLnYpPkIt03ALyhrNnlM0sHT8I 2eRnAMTV4nB9VY+zCzHJBZOKIl/j7Mk1XtiwyRwKqeyjBWbM6L4Ha7wFTJN0jVbH88ssuNaPba33U adgjjABKBPuELdukcrI0JBY0dXmvbLr1EKat09Qs6FsWlUsr9/evO8k2oWHHMFDXPcvUU58Q3p1qF iSlcKaKM3nFEU2BF2sLbPAxYux58EIJADokt8lje4HlW1s82KhXMTIWfR7o6/njlnwNUcDyLk4CzV pl0NLu1Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tVTD1-00000007y1q-1gRU; Wed, 08 Jan 2025 10:22:43 +0000 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tVT5u-00000007wJM-2iP5 for kexec@lists.infradead.org; Wed, 08 Jan 2025 10:15:23 +0000 Received: from pps.filterd (m0360083.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 5083qIGC015541; Wed, 8 Jan 2025 10:15:16 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=cc :content-transfer-encoding:date:from:in-reply-to:message-id :mime-version:references:subject:to; s=pp1; bh=WH86RupiIpV7nQbN+ Vsb8WGy3K790/g1ula/5WgtslI=; b=Rk9fqRVuqa7odLD4BTQcXAJYI41zebH3V jWRzSJmqnaxSIE/k6ywZKDb9a9HhUU4WVITDdqBuZuyF1v52JmODq9DSQvN0il7t mnKOKCzmwLuFGNh6I/FT88fD9yw8k/LxsuF2W3Xlnj+wiMC5L2S2Pqf85fNt94kk DwUW2JqjREiuE6F4aTPEk5U8j7U+8oZaxh8R0x10m+wGHtf1hkXz74sfJb9K3JlI 881ZnesWiqOQaZQOEOIBAMsxmhVAnz3Nxd7yjy91z0EQM5xWcSKSVKNJSJ+2LDad iQaVp/S+psCOUrexwKruHFIzC5HNaekxjJCHo2U/gTE9uLb1/3igQ== Received: from ppma12.dal12v.mail.ibm.com (dc.9e.1632.ip4.static.sl-reverse.com [50.22.158.220]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 441huc1kyd-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 08 Jan 2025 10:15:15 +0000 (GMT) Received: from pps.filterd (ppma12.dal12v.mail.ibm.com [127.0.0.1]) by ppma12.dal12v.mail.ibm.com (8.18.1.2/8.18.1.2) with ESMTP id 5088usZE003572; Wed, 8 Jan 2025 10:15:15 GMT Received: from smtprelay07.fra02v.mail.ibm.com ([9.218.2.229]) by ppma12.dal12v.mail.ibm.com (PPS) with ESMTPS id 43yfat7cr2-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 08 Jan 2025 10:15:14 +0000 Received: from smtpav07.fra02v.mail.ibm.com (smtpav07.fra02v.mail.ibm.com [10.20.54.106]) by smtprelay07.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 508AFB1c62849368 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 8 Jan 2025 10:15:11 GMT Received: from smtpav07.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id A210620063; Wed, 8 Jan 2025 10:15:11 +0000 (GMT) Received: from smtpav07.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id DC76D2005A; Wed, 8 Jan 2025 10:15:09 +0000 (GMT) Received: from li-4f5ba44c-27d4-11b2-a85c-a08f5b49eada.in.ibm.com (unknown [9.109.204.94]) by smtpav07.fra02v.mail.ibm.com (Postfix) with ESMTP; Wed, 8 Jan 2025 10:15:09 +0000 (GMT) From: Sourabh Jain To: linuxppc-dev@lists.ozlabs.org Cc: Sourabh Jain , Andrew Morton , Baoquan he , Hari Bathini , Madhavan Srinivasan , Michael Ellerman , kexec@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH RESEND v1 3/5] powerpc/kdump: preserve user-specified memory limit Date: Wed, 8 Jan 2025 15:44:56 +0530 Message-ID: <20250108101458.406806-4-sourabhjain@linux.ibm.com> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250108101458.406806-1-sourabhjain@linux.ibm.com> References: <20250108101458.406806-1-sourabhjain@linux.ibm.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: kDhiDl_36xQYGBEydg-wKwqaOHwyAhJ_ X-Proofpoint-GUID: kDhiDl_36xQYGBEydg-wKwqaOHwyAhJ_ X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1051,Hydra:6.0.680,FMLib:17.12.62.30 definitions=2024-10-15_01,2024-10-11_01,2024-09-30_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 impostorscore=0 spamscore=0 phishscore=0 suspectscore=0 lowpriorityscore=0 mlxlogscore=999 bulkscore=0 mlxscore=0 malwarescore=0 adultscore=0 priorityscore=1501 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2411120000 definitions=main-2501080082 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250108_021522_689711_8846D74A X-CRM114-Status: GOOD ( 13.39 ) X-BeenThere: kexec@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "kexec" Errors-To: kexec-bounces+kexec=archiver.kernel.org@lists.infradead.org Commit 59d58189f3d9 ("crash: fix crash memory reserve exceed system memory bug") fails crashkernel parsing if the crash size is found to be higher than system RAM, which makes the memory_limit adjustment code ineffective due to an early exit from reserve_crashkernel(). Regardless lets not violated the user-specified memory limit by adjusting it. Remove this adjustment to ensure all reservations stay within the limit. Commit f94f5ac07983 ("powerpc/fadump: Don't update the user-specified memory limit") did the same for fadump. Cc: Andrew Morton Cc: Baoquan he Cc: Hari Bathini CC: Madhavan Srinivasan Cc: Michael Ellerman Cc: kexec@lists.infradead.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Sourabh Jain --- arch/powerpc/kexec/core.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/arch/powerpc/kexec/core.c b/arch/powerpc/kexec/core.c index b8333a49ea5d..4945b33322ae 100644 --- a/arch/powerpc/kexec/core.c +++ b/arch/powerpc/kexec/core.c @@ -150,14 +150,6 @@ void __init reserve_crashkernel(void) return; } - /* Crash kernel trumps memory limit */ - if (memory_limit && memory_limit <= crashk_res.end) { - memory_limit = crashk_res.end + 1; - total_mem_sz = memory_limit; - printk("Adjusted memory limit for crashkernel, now 0x%llx\n", - memory_limit); - } - printk(KERN_INFO "Reserving %ldMB of memory at %ldMB " "for crashkernel (System RAM: %ldMB)\n", (unsigned long)(crash_size >> 20), -- 2.47.1