Message ID | 20240529171236.32002-6-Jonathan.Cameron@huawei.com |
---|---|
State | New, archived |
Headers | show |
Series | arm64/memblock: Handling of CXL Fixed Memory Windows. | expand |
On Wed, May 29, 2024 at 06:12:33PM +0100, Jonathan Cameron wrote: > Setting the reserved region entries to the appropriate Node ID means > that they can be used to establish the node to which we should add > hotplugged CXL memory within a CXL fixed memory window. > > Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> > --- > drivers/base/arch_numa.c | 7 +++++++ > 1 file changed, 7 insertions(+) > > diff --git a/drivers/base/arch_numa.c b/drivers/base/arch_numa.c > index 0630efb696ab..568dbabeb636 100644 > --- a/drivers/base/arch_numa.c > +++ b/drivers/base/arch_numa.c > @@ -208,6 +208,13 @@ int __init numa_add_memblk(int nid, u64 start, u64 end) > start, (end - 1), nid); > return ret; > } > + /* Also set reserved nodes nid */ > + ret = memblock_set_node(start, (end - start), &memblock.reserved, nid); > + if (ret < 0) { > + pr_err("memblock [0x%llx - 0x%llx] failed to add on node %d\n", > + start, (end - 1), nid); > + return ret; > + } > > node_set(nid, numa_nodes_parsed); > return ret; > -- > 2.39.2 > Tested-off-by: Yuquan Wang <wangyuquan1236@phytium.com.cn>
diff --git a/drivers/base/arch_numa.c b/drivers/base/arch_numa.c index 0630efb696ab..568dbabeb636 100644 --- a/drivers/base/arch_numa.c +++ b/drivers/base/arch_numa.c @@ -208,6 +208,13 @@ int __init numa_add_memblk(int nid, u64 start, u64 end) start, (end - 1), nid); return ret; } + /* Also set reserved nodes nid */ + ret = memblock_set_node(start, (end - start), &memblock.reserved, nid); + if (ret < 0) { + pr_err("memblock [0x%llx - 0x%llx] failed to add on node %d\n", + start, (end - 1), nid); + return ret; + } node_set(nid, numa_nodes_parsed); return ret;
Setting the reserved region entries to the appropriate Node ID means that they can be used to establish the node to which we should add hotplugged CXL memory within a CXL fixed memory window. Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> --- drivers/base/arch_numa.c | 7 +++++++ 1 file changed, 7 insertions(+)