From: Brice Goglin <Brice.Goglin@inria.fr>
To: Keith Busch <keith.busch@intel.com>,
linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org,
linux-mm@kvack.org
Cc: Rafael Wysocki <rafael@kernel.org>,
Dave Hansen <dave.hansen@intel.com>,
Dan Williams <dan.j.williams@intel.com>
Subject: Re: [PATCHv2 2/2] hmat: Register attributes for memory hot add
Date: Tue, 16 Apr 2019 16:55:21 +0200 [thread overview]
Message-ID: <9f130b73-e5ae-0529-69a1-28bd2ca29581@inria.fr> (raw)
In-Reply-To: <20190415151654.15913-3-keith.busch@intel.com>
[-- Attachment #1: Type: text/plain, Size: 1371 bytes --]
Hello Keith
Several issues:
* We always get a memory_side_cache, even if nothing was found in ACPI.
You should at least ignore the cache if size==0?
* Your code seems to only work with a single level of cache, since
there's a single cache_attrs entry in each target structure.
* I was getting a section mismatch warning and a crash on PMEM node
hotplug until I applied the patch below.
WARNING: vmlinux.o(.text+0x47d3f7): Section mismatch in reference from the function hmat_callback() to the function .init.text:hmat_register_target()
The function hmat_callback() references
the function __init hmat_register_target().
This is often because hmat_callback lacks a __init
annotation or the annotation of hmat_register_target is wrong.
Thanks
Brice
acpi/hmat: hmat_register_target() isn't __init only
It's called during PMEM node hotplug with kmem dax driver.
Signed-off-by: Brice Goglin <Brice.Goglin@inria.fr>
--- a/drivers/acpi/hmat/hmat.c
+++ b/drivers/acpi/hmat/hmat.c
@@ -598,7 +598,7 @@ static void hmat_register_target_perf(struct memory_target *target)
node_set_perf_attrs(mem_nid, &target->hmem_attrs, 0);
}
-static __init void hmat_register_target(struct memory_target *target)
+static void hmat_register_target(struct memory_target *target)
{
if (!node_online(pxm_to_node(target->memory_pxm)))
return;
[-- Attachment #2: Type: text/html, Size: 1634 bytes --]
next prev parent reply other threads:[~2019-04-16 14:55 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-15 15:16 [PATCHv2 0/2] HMAT memroy hotplug support Keith Busch
2019-04-15 15:16 ` [PATCHv2 1/2] hmat: Register memory-side cache after parsing Keith Busch
2019-04-15 15:16 ` [PATCHv2 2/2] hmat: Register attributes for memory hot add Keith Busch
2019-04-16 14:55 ` Brice Goglin [this message]
2019-04-16 15:01 ` Keith Busch
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=9f130b73-e5ae-0529-69a1-28bd2ca29581@inria.fr \
--to=brice.goglin@inria.fr \
--cc=dan.j.williams@intel.com \
--cc=dave.hansen@intel.com \
--cc=keith.busch@intel.com \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=rafael@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox