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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 682ACC433EF for ; Tue, 11 Jan 2022 20:44:48 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id AF9346B00C3; Tue, 11 Jan 2022 15:44:47 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id AA7466B00CD; Tue, 11 Jan 2022 15:44:47 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 995FC6B00CE; Tue, 11 Jan 2022 15:44:47 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0082.hostedemail.com [216.40.44.82]) by kanga.kvack.org (Postfix) with ESMTP id 8ABF96B00C3 for ; Tue, 11 Jan 2022 15:44:47 -0500 (EST) Received: from smtpin03.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 4531B94FB4 for ; Tue, 11 Jan 2022 20:44:47 +0000 (UTC) X-FDA: 79019185014.03.C56DC85 Received: from smtp-fw-6002.amazon.com (smtp-fw-6002.amazon.com [52.95.49.90]) by imf03.hostedemail.com (Postfix) with ESMTP id B42F720010 for ; Tue, 11 Jan 2022 20:44:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazon201209; t=1641933886; x=1673469886; h=date:from:to:cc:message-id:references:mime-version: in-reply-to:subject; bh=X+iEdzMsEoTMpcwwqvHDzvTqGb+6u2LSzv5AVOuyP5w=; b=eRgL5YJoSw9+ZVP5luZ4UHA01nXrMmgfFLqgZzcObCSDd0K7J3ckaVRk W2RSOp3XOZCSj/HOsbr2fLMRErMmzfYWEJqBlM6bNBu1TRWA1xHvOMsAz 4bT3bynMHKpgbNYKNTDHj/Bvng49xU+EPP/ONMzKL2u8LT8VZ7DuxyHvT 0=; X-IronPort-AV: E=Sophos;i="5.88,279,1635206400"; d="scan'208";a="168282843" Subject: Re: [PATCH 1/3] memblock: define functions to set the usable memory range Received: from iad12-co-svc-p1-lb1-vlan2.amazon.com (HELO email-inbound-relay-pdx-2c-34cb9e7b.us-west-2.amazon.com) ([10.43.8.2]) by smtp-border-fw-6002.iad6.amazon.com with ESMTP; 11 Jan 2022 20:44:44 +0000 Received: from EX13MTAUEA002.ant.amazon.com (pdx1-ws-svc-p6-lb9-vlan2.pdx.amazon.com [10.236.137.194]) by email-inbound-relay-pdx-2c-34cb9e7b.us-west-2.amazon.com (Postfix) with ESMTPS id 459BE4151D; Tue, 11 Jan 2022 20:44:44 +0000 (UTC) Received: from EX13D31UEA001.ant.amazon.com (10.43.61.114) by EX13MTAUEA002.ant.amazon.com (10.43.61.77) with Microsoft SMTP Server (TLS) id 15.0.1497.26; Tue, 11 Jan 2022 20:44:42 +0000 Received: from EX13MTAUEA001.ant.amazon.com (10.43.61.82) by EX13D31UEA001.ant.amazon.com (10.43.61.114) with Microsoft SMTP Server (TLS) id 15.0.1497.26; Tue, 11 Jan 2022 20:44:42 +0000 Received: from dev-dsk-fllinden-2c-d7720709.us-west-2.amazon.com (172.19.206.175) by mail-relay.amazon.com (10.43.61.243) with Microsoft SMTP Server id 15.0.1497.26 via Frontend Transport; Tue, 11 Jan 2022 20:44:42 +0000 Received: by dev-dsk-fllinden-2c-d7720709.us-west-2.amazon.com (Postfix, from userid 6262777) id 20514A1; Tue, 11 Jan 2022 20:44:41 +0000 (UTC) Date: Tue, 11 Jan 2022 20:44:41 +0000 From: Frank van der Linden To: Mike Rapoport CC: , , , , , , , , , , , Message-ID: <20220111204441.GA36458@dev-dsk-fllinden-2c-d7720709.us-west-2.amazon.com> References: <20220110210809.3528-1-fllinden@amazon.com> <20220110210809.3528-2-fllinden@amazon.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-Rspamd-Queue-Id: B42F720010 X-Stat-Signature: jz7ncqaraak6rijwo3nnncrmu7pqb5uk Authentication-Results: imf03.hostedemail.com; dkim=pass header.d=amazon.com header.s=amazon201209 header.b=eRgL5YJo; dmarc=pass (policy=quarantine) header.from=amazon.com; spf=pass (imf03.hostedemail.com: domain of "prvs=00334b01f=fllinden@amazon.com" designates 52.95.49.90 as permitted sender) smtp.mailfrom="prvs=00334b01f=fllinden@amazon.com" X-Rspamd-Server: rspam03 X-HE-Tag: 1641933886-459439 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000016, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Tue, Jan 11, 2022 at 12:31:58PM +0200, Mike Rapoport wrote: > > --- a/include/linux/memblock.h > > +++ b/include/linux/memblock.h > > @@ -481,6 +481,8 @@ phys_addr_t memblock_reserved_size(void); > > phys_addr_t memblock_start_of_DRAM(void); > > phys_addr_t memblock_end_of_DRAM(void); > > void memblock_enforce_memory_limit(phys_addr_t memory_limit); > > +void memblock_set_usable_range(phys_addr_t base, phys_addr_t size); > > +void memblock_enforce_usable_range(void); > > void memblock_cap_memory_range(phys_addr_t base, phys_addr_t size); > > void memblock_mem_limit_remove_map(phys_addr_t limit); > > We already have 3 very similar interfaces that deal with memory capping. > Now you suggest to add fourth that will "generically" solve a single use > case of DT, EFI and kdump interaction on arm64. > > Looks like a workaround for a fundamental issue of incompatibility between > DT and EFI wrt memory registration. Yep, I figured this would be the main argument against this - arm64 already added several other more-or-less special cased interfaces over time. I'm more than happy to solve this in a different way. What would you suggest: 1) Try to merge the similar interfaces in to one. 2) Just deal with it at a lower (arm64) level? 3) Some other way? Thanks, - Frank