Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp6841494pxv; Fri, 30 Jul 2021 03:52:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwZfLqO/Eq42PIJkvbSrupiAVTcwS/csUfYotbZ1908oAPCl6c1r0W8AYnrtpyFNVCdEIbJ X-Received: by 2002:a50:8dcc:: with SMTP id s12mr2231435edh.105.1627642357542; Fri, 30 Jul 2021 03:52:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627642357; cv=none; d=google.com; s=arc-20160816; b=F7FjIYMWY6Iq3v96CM1J+BK48OI6AzaB64Dta0CyamzcWQDxfcdJVWvo9+Apq3Lz0o m3cL2OkbI4chBIPFRe4snci/tRidXVpOaa7hm+72CzrshX+O0bvLb9Q/GeGNxn3+HZIL rjteBNRsiL7a6pt9l8giJ7vAz4TWLx6WTnu9AxoofBDWyaKl6Tb9dc1tobGhdzCpMw/Z ZvtrSbTmSo5lQ0mvYbahf/aHj8NXJjTD7LroFVU5w+bJqw5bOj17IRAIQiuo/ynSeSmA X0TfD9CngfG+3w029hl2orjcr2zdyZV3QOYyaDk341F4BJjEFxk7dKGdy+6aryZgFfp7 U4Vg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=WD2Ag4JED4QIsvoIQN/gUdEl19MyG+gX26ckt/2TnRM=; b=sAvFfWlua4bfVmzIp+dvh5ZAh/2djUnr52bFkiWOY1OHC9KASkTJlX4TSMxX7O1Gxs Zq1kiCI+nHeA44UcycV1fL39LH/SIT4qAUZrMdSDakjIif1uYxNJ9NIT8GAk/7SiwyZp YywUo51f9enHO02PhgiQ59wnH3KvPE8VkRE9l+TFpbMMoq04VLO5eyJCMVYsnhaDfs4w tzQVQYTSUfOTk+HICCJ3b7LxtBLldrLy/ouoFTJ1zEGPK2jxpyZn4JdCPkBNHIi7sZOD PHFZQC9NKRhy+SE3FDu5OjRoJpKIGr+4siKtKkVPat2W8UtMH9kGDe+1yE0FJOOEuRWj rttg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=wNjsq2UU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f19si1291673eds.480.2021.07.30.03.52.12; Fri, 30 Jul 2021 03:52:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=wNjsq2UU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238548AbhG3Krs (ORCPT + 99 others); Fri, 30 Jul 2021 06:47:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41022 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238487AbhG3Krr (ORCPT ); Fri, 30 Jul 2021 06:47:47 -0400 Received: from pandora.armlinux.org.uk (pandora.armlinux.org.uk [IPv6:2001:4d48:ad52:32c8:5054:ff:fe00:142]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B0633C0613CF; Fri, 30 Jul 2021 03:47:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=WD2Ag4JED4QIsvoIQN/gUdEl19MyG+gX26ckt/2TnRM=; b=wNjsq2UUJjLuncBCL1YsnTrm0 YXYmurFWsXKUm2L2J6I/ypUlXwg6ahaMW1adauhejdybPNoV1znnmnxnBQE7zBZc3hiHNA70er0TI QnYpssBHkV8KBet2y5hmFMhE39l0DvuwgvbgZ0fqc5k0GCfAVD82AU47p5lagEFMKX6EwrPmcUuQf 0RzJNbNT94GC9OKKBbbhwI8Po+HCAFRODBNYzP5zCse901ce9un9gcI6vTyY548AnZny/xjNRDv6s Lb108Ee4PLeZUMVJX0zUdAchyPz3c4fqfDYw0Cckeo3R8jGRFEZmHnrutm/pKoieeyzfQfhmhr16V 0fey8HIUw==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:46754) by pandora.armlinux.org.uk with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m9Q2U-0002GT-LV; Fri, 30 Jul 2021 11:46:50 +0100 Received: from linux by shell.armlinux.org.uk with local (Exim 4.92) (envelope-from ) id 1m9Q2N-0008Nd-T1; Fri, 30 Jul 2021 11:46:43 +0100 Date: Fri, 30 Jul 2021 11:46:43 +0100 From: "Russell King (Oracle)" To: Mike Rapoport Cc: Andrew Morton , Albert Ou , Andy Lutomirski , Borislav Petkov , Catalin Marinas , Christian Borntraeger , Dave Hansen , Frank Rowand , Greg Kroah-Hartman , "H. Peter Anvin" , Heiko Carstens , Ingo Molnar , "Kirill A. Shutemov" , Len Brown , Marc Zyngier , Mike Rapoport , Palmer Dabbelt , Paul Walmsley , Peter Zijlstra , "Rafael J. Wysocki" , Rob Herring , Thomas Bogendoerfer , Thomas Gleixner , Vasily Gorbik , Will Deacon , devicetree@vger.kernel.org, kvmarm@lists.cs.columbia.edu, linux-acpi@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-mips@vger.kernel.org, linux-mm@kvack.org, linux-riscv@lists.infradead.org, linux-s390@vger.kernel.org, x86@kernel.org Subject: Re: [PATCH] memblock: make memblock_find_in_range method private Message-ID: <20210730104643.GG22278@shell.armlinux.org.uk> References: <20210730104039.7047-1-rppt@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210730104039.7047-1-rppt@kernel.org> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: Russell King (Oracle) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jul 30, 2021 at 01:40:39PM +0300, Mike Rapoport wrote: > diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c > index f97eb2371672..1f8ef9fd5215 100644 > --- a/arch/arm/kernel/setup.c > +++ b/arch/arm/kernel/setup.c > @@ -1012,31 +1012,25 @@ static void __init reserve_crashkernel(void) > unsigned long long lowmem_max = __pa(high_memory - 1) + 1; > if (crash_max > lowmem_max) > crash_max = lowmem_max; > - crash_base = memblock_find_in_range(CRASH_ALIGN, crash_max, > - crash_size, CRASH_ALIGN); > + > + crash_base = memblock_phys_alloc_range(crash_size, CRASH_ALIGN, > + CRASH_ALIGN, crash_max); > if (!crash_base) { > pr_err("crashkernel reservation failed - No suitable area found.\n"); > return; > } > } else { > + unsigned long long crash_max = crash_base + crash_size; > unsigned long long start; > > - start = memblock_find_in_range(crash_base, > - crash_base + crash_size, > - crash_size, SECTION_SIZE); > + start = memblock_phys_alloc_range(crash_size, SECTION_SIZE, > + crash_base, crash_max); > if (start != crash_base) { > - pr_err("crashkernel reservation failed - memory is in use.\n"); > + pr_err("crashkernel reservation failed - No suitable area found.\n"); This change to the error message is incorrect. In this code block, we are trying to get the exact specified memory block - it is not about there being "no suitable area" - the requested memory block is not available. So, the original message carries the exact correct meaning. -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!