Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp5043056pxu; Tue, 13 Oct 2020 13:19:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwXwAHwacGx3giLMA0+OjH1w64aUnROJsfA4sbv7KlGbQHo6xBAS19CzytvqHLRJRRtJvoL X-Received: by 2002:a05:6402:2208:: with SMTP id cq8mr1370001edb.191.1602620373788; Tue, 13 Oct 2020 13:19:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602620373; cv=none; d=google.com; s=arc-20160816; b=nu6lwbeIjk/5VIcJuFagpuiTYBKEzXgKatZ+sReELKvoZOpakmltuFe8e8vv7C4rZD htDg8THSKRRGlCejHKCCei36Vf4KExd/zrs111DDY+KkNFoPn9FoYc9Qqfe0d1W1RZo+ nH4M/5fkGdYsXbA5+dlqH7MqEyH7pD/HZ/f5oqJP9uujgwvM1PL72igethiMWt7ync3k AlCHu18JYnBZnaEyMGTODAaRNhKoNK6gbjGiBYljInKNRnsODXmETP9yhWnJEbq8kb0X y5DOEtaMotCAFGaUsfdfe4ApI1Tyc70w7zSH+lAhHNy8/MpZzWFMgEHuHFC9ERWC4YJv SU2Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:message-id:in-reply-to :subject:cc:to:from:date; bh=w0hrbn/9K36F5iQAuTmV1ZAGsmqKSdk6k7e0hAuAcn0=; b=o9KYpID/5t50oPyfOn5Mq+mIhHn6svyHT4XReTICHBNHLQSV+Q+QJMvrfhIWDCMANS qSMwDq0AzBdx764dSLvzUoE7o8PwgksMa5Sl4GIQoNEgx2IlzplQ8oGtD7Qm3f/nr7CB evsuNQe4V3KV7nwtoOhADY+88xgMX8HoUQ03Uor2quBjSwJVlpq093pkw/68OXWAXvDA 3Y8Fjm1SSCMMppPIPyqKz3LqvlCXDgYYxFg8iX2uzIR+UWX54j2/uf6VRrH+U65RdBOc qCHRDPQHURJpbICGV+QirifkVWTJILpo2zGCF+BlkVPv4OU9Aio+B113zbahyxad+lpq UOCw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i8si513904edr.518.2020.10.13.13.19.09; Tue, 13 Oct 2020 13:19:33 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732271AbgJMUQO (ORCPT + 99 others); Tue, 13 Oct 2020 16:16:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33112 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727436AbgJMUQO (ORCPT ); Tue, 13 Oct 2020 16:16:14 -0400 Received: from orcam.me.uk (unknown [IPv6:2001:4190:8020::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 4E8E8C061755; Tue, 13 Oct 2020 13:16:14 -0700 (PDT) Received: from bugs.linux-mips.org (eddie.linux-mips.org [IPv6:2a01:4f8:201:92aa::3]) by orcam.me.uk (Postfix) with ESMTPS id 9FAE72BE086; Tue, 13 Oct 2020 21:16:10 +0100 (BST) Date: Tue, 13 Oct 2020 21:16:10 +0100 (BST) From: "Maciej W. Rozycki" To: Jinyang He cc: Thomas Bogendoerfer , Huacai Chen , Jiaxun Yang , linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] MIPS: Add set_memory_node() In-Reply-To: <1602559183-12225-1-git-send-email-hejinyang@loongson.cn> Message-ID: References: <1602559183-12225-1-git-send-email-hejinyang@loongson.cn> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 13 Oct 2020, Jinyang He wrote: > Commit e7ae8d174eec ("MIPS: replace add_memory_region with memblock") > replaced add_memory_region(, , BOOT_MEM_RAM) with memblock_add(). But > it doesn't work well on some platforms which have NUMA like Loongson64. Please note this is not a full review, I haven't investigated the fitness for purpose of this change and instead just addressed one aspect of coding style. > diff --git a/arch/mips/include/asm/bootinfo.h b/arch/mips/include/asm/bootinfo.h > index aa03b12..29e2d9c 100644 > --- a/arch/mips/include/asm/bootinfo.h > +++ b/arch/mips/include/asm/bootinfo.h > @@ -92,6 +92,10 @@ extern unsigned long mips_machtype; > > extern void detect_memory_region(phys_addr_t start, phys_addr_t sz_min, phys_addr_t sz_max); > > +#ifdef CONFIG_NUMA > +extern void set_memory_node(phys_addr_t start, phys_addr_t size); > +#endif > + If anything this needs to be: #ifdef CONFIG_NUMA extern void set_memory_node(phys_addr_t start, phys_addr_t size); #else static inline void set_memory_node(phys_addr_t start, phys_addr_t size) {} #endif so as to avoid #ifdef clutter across call places. Maciej