Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp326510imu; Thu, 8 Nov 2018 08:53:04 -0800 (PST) X-Google-Smtp-Source: AJdET5eJw5Xo3HYhlokwefokRsRe10SFWhnqpddbefJwUQCqIZlErXimNSLAs2VKE8GB7k22IaSC X-Received: by 2002:a62:7982:: with SMTP id u124-v6mr5140885pfc.95.1541695984174; Thu, 08 Nov 2018 08:53:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541695984; cv=none; d=google.com; s=arc-20160816; b=QV3PIUB6ADYDSiX/aMW3gS+igKMUaTz8q85l9iyEvQPiqJeDjWMV9qrwLKvhw0VyAN SieYKVc2P8d+zR23NQxFmpEN4mWEE7jk2MSQQeEhoEdySRyuONrvuF/mJGDYn3bEFUiV kIIAS5nJ8Lhe3x5Tj7kHaqJC9/cETZFMyBykD8cuFtneimS0YUjopYY6jmLo0xfQYSFf rRspt9jlkai82ItCTQ7Y7PI6ng9Mnj4jpb7ebyC2yvnbgX1JWMk5pWr14rGY25EUiH8I q5SG7prWPxB8twK/uBM2eBaETXD6s/n3hLdZMWlmwdRRSsyBmly+qCTPP3jDZ70bgveD 0dKQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=TKULIo4ASmNvjp1YpRNpUwtyaGfLJx4yq7YqnzqAegk=; b=pg+zZ0TLYcF9lFxsM3P8a8H38cid3SAcc64Ga9NUHroH/5Qisa5MRiuAm0OtZSnxrQ exwyj2cISoSqxT3/HGQO9vOt/PzeGk5O0+aZPk0baknApb7C0zrakoFcLXeDF5NJgDqn OWtsk1VC6rG0rLw4MsaOOPKq0/5c66bqIs1olaqyevBS7+0u95y2t0bJsMdGAEdtWWq5 h78ZqC4A+QCm1c93LcmEwky7CvafPYZjc6C7AlSCXhL8mtA/MqNmnIwxcCyNeBHU+23j NGlLvHqutiWvNANqgrfHpO1+yfELpZ3tQtAAOMwXsJSEnSAT0/BbnQicJ0PFWHGtKZk1 NGQw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h20-v6si4691812plr.343.2018.11.08.08.52.48; Thu, 08 Nov 2018 08:53:04 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727326AbeKIC2l convert rfc822-to-8bit (ORCPT + 99 others); Thu, 8 Nov 2018 21:28:41 -0500 Received: from mx2.suse.de ([195.135.220.15]:49364 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726862AbeKIC2k (ORCPT ); Thu, 8 Nov 2018 21:28:40 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 6A50FAFF4; Thu, 8 Nov 2018 16:52:18 +0000 (UTC) Date: Thu, 8 Nov 2018 17:52:17 +0100 From: Thomas Bogendoerfer To: Mike Rapoport Cc: Ralf Baechle , Paul Burton , James Hogan , Huacai Chen , linux-mips@linux-mips.org, linux-kernel@vger.kernel.org, rppt@linux.vnet.ibm.com Subject: Re: [[PATCH]] mips: Fix switch to NO_BOOTMEM for SGI-IP27/loongons3 NUMA Message-Id: <20181108175217.f55065d6115edbafd6aa3487@suse.de> In-Reply-To: <20181108161823.GB15707@rapoport-lnx> References: <20181108144428.28149-1-tbogendoerfer@suse.de> <20181108161823.GB15707@rapoport-lnx> X-Mailer: Sylpheed 3.5.1 (GTK+ 2.24.31; x86_64-suse-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 8 Nov 2018 18:18:23 +0200 Mike Rapoport wrote: > On Thu, Nov 08, 2018 at 03:44:28PM +0100, Thomas Bogendoerfer wrote: > > Commit bcec54bf3118 ("mips: switch to NO_BOOTMEM") broke SGI-IP27 > > and NUMA enabled loongson3 by doing memblock_set_current_limit() > > before max_low_pfn has been evaluated. Both platforms need to do the > > memblock_set_current_limit() in platform specific code. For > > consistency the call to memblock_set_current_limit() is moved > > to the common bootmem_init(), where max_low_pfn is calculated > > for non NUMA enabled platforms. > [..] > > As for SGI-IP27, the initialization of max_low_pfn as late as in > paging_init() seems to be broken because it's value is used in > arch_mem_init() and in finalize_initrd() anyway. well, the patch is tested on real hardware and the first caller of a memblock_alloc* function is in a function called by free_area_init_nodes(). > AFAIU, both platforms set max_low_pfn to last available pfn, so it seems we > can simply do > > max_low_pfn = PFN_PHYS(memblock_end_of_DRAM()) > > in the prom_meminit() function for both platforms and drop the loop > evaluating max_low_pfn in paging_init(). sounds like a better plan. I'll prepare a new patch. Thomas. -- SUSE Linux GmbH GF: Felix Imend?rffer, Jane Smithard, Graham Norton HRB 21284 (AG N?rnberg)