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 X-Spam-Level: X-Spam-Status: No, score=-7.0 required=3.0 tests=INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 28E5EC433E0 for ; Tue, 7 Jul 2020 11:54:59 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id E8DDA206BE for ; Tue, 7 Jul 2020 11:54:58 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E8DDA206BE Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 8260A8D0026; Tue, 7 Jul 2020 07:54:58 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 7D59C8D001D; Tue, 7 Jul 2020 07:54:58 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 69ED08D0026; Tue, 7 Jul 2020 07:54:58 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0150.hostedemail.com [216.40.44.150]) by kanga.kvack.org (Postfix) with ESMTP id 54D2A8D001D for ; Tue, 7 Jul 2020 07:54:58 -0400 (EDT) Received: from smtpin24.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 100D0181AEF09 for ; Tue, 7 Jul 2020 11:54:58 +0000 (UTC) X-FDA: 77011123476.24.push20_1e0397f26eb4 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin24.hostedemail.com (Postfix) with ESMTP id DB0C91A4AC for ; Tue, 7 Jul 2020 11:54:57 +0000 (UTC) X-HE-Tag: push20_1e0397f26eb4 X-Filterd-Recvd-Size: 4132 Received: from mail-wr1-f66.google.com (mail-wr1-f66.google.com [209.85.221.66]) by imf28.hostedemail.com (Postfix) with ESMTP for ; Tue, 7 Jul 2020 11:54:57 +0000 (UTC) Received: by mail-wr1-f66.google.com with SMTP id f7so41820045wrw.1 for ; Tue, 07 Jul 2020 04:54:57 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=PaBT0lPoXs7IdlUtnsvP+VH1DgYh/P2jJzUAU6vUbNU=; b=ALWE9pC7OUwQkseag/N5OztLQuUUYNSJ9yiegZiKam0nRfb+dUZLQXfoM/0FNcW6YD 58l20iqS99dRcyoxE7+XBhC279OfKruhw+1K7AK/aveqUTj95EB3FL1UX2uFXbXJ/7n+ 4R37OOcQuO3gz+ECTSeGhvvXfqA0x6281VToDAvPCZx/QsZmEopjFLUanUAxmH20tsEt w6N3ay44jWVhu5gfLTvaZsqCL2f5qfv6AI4k4VqUgdfRD0m1XPheUglHDsjtnLFdhrgC rWEJ6a/ICI5tsCQRdoUKY0zp+yu4DbkYqr0wUSQLhB5mP2OTDF9t7DM3nKqxBzy32yDD Cbgg== X-Gm-Message-State: AOAM533lC1TrxFuB6pG3Jjb83o+sgWybwxY4KTWrIN+mWqxEzvsAo664 MNc2lEw2LtS2zBkTCZBY5q4= X-Google-Smtp-Source: ABdhPJzjupRW40+WN4FUZja0iCFY7iXyazV3EiU8SfOuII8h8MCdacV4SFghHmY4jlkuWGms463J9Q== X-Received: by 2002:a5d:4dc2:: with SMTP id f2mr54625097wru.399.1594122896601; Tue, 07 Jul 2020 04:54:56 -0700 (PDT) Received: from localhost (ip-37-188-179-51.eurotel.cz. [37.188.179.51]) by smtp.gmail.com with ESMTPSA id m10sm791787wru.4.2020.07.07.04.54.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Jul 2020 04:54:55 -0700 (PDT) Date: Tue, 7 Jul 2020 13:54:54 +0200 From: Michal Hocko To: Jia He Cc: Catalin Marinas , Will Deacon , Dan Williams , Vishal Verma , Dave Jiang , Andrew Morton , Mike Rapoport , Baoquan He , Chuhong Yuan , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-nvdimm@lists.01.org, Kaly Xin Subject: Re: [PATCH v2 1/3] arm64/numa: export memory_add_physaddr_to_nid as EXPORT_SYMBOL_GPL Message-ID: <20200707115454.GN5913@dhcp22.suse.cz> References: <20200707055917.143653-1-justin.he@arm.com> <20200707055917.143653-2-justin.he@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200707055917.143653-2-justin.he@arm.com> X-Rspamd-Queue-Id: DB0C91A4AC X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam02 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Tue 07-07-20 13:59:15, Jia He wrote: > This exports memory_add_physaddr_to_nid() for module driver to use. > > memory_add_physaddr_to_nid() is a fallback option to get the nid in case > NUMA_NO_NID is detected. > > Suggested-by: David Hildenbrand > Signed-off-by: Jia He > --- > arch/arm64/mm/numa.c | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git a/arch/arm64/mm/numa.c b/arch/arm64/mm/numa.c > index aafcee3e3f7e..7eeb31740248 100644 > --- a/arch/arm64/mm/numa.c > +++ b/arch/arm64/mm/numa.c > @@ -464,10 +464,11 @@ void __init arm64_numa_init(void) > > /* > * We hope that we will be hotplugging memory on nodes we already know about, > - * such that acpi_get_node() succeeds and we never fall back to this... > + * such that acpi_get_node() succeeds. But when SRAT is not present, the node > + * id may be probed as NUMA_NO_NODE by acpi, Here provide a fallback option. > */ > int memory_add_physaddr_to_nid(u64 addr) > { > - pr_warn("Unknown node for memory at 0x%llx, assuming node 0\n", addr); > return 0; > } > +EXPORT_SYMBOL_GPL(memory_add_physaddr_to_nid); Does it make sense to export a noop function? Wouldn't make more sense to simply make it static inline somewhere in a header? I haven't checked whether there is an easy way to do that sanely bu this just hit my eyes. -- Michal Hocko SUSE Labs