Message ID | 20200317131753.4074-4-srikar@linux.vnet.ibm.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | Fix kmalloc_node on offline nodes | expand |
diff --git a/include/asm-generic/topology.h b/include/asm-generic/topology.h index 238873739550..e803ee7850e6 100644 --- a/include/asm-generic/topology.h +++ b/include/asm-generic/topology.h @@ -68,6 +68,9 @@ #ifndef set_numa_mem #define set_numa_mem(node) #endif +#ifndef reset_numa_mem +#define reset_numa_mem(node) +#endif #ifndef set_cpu_numa_mem #define set_cpu_numa_mem(cpu, node) #endif diff --git a/include/linux/topology.h b/include/linux/topology.h index eb2fe6edd73c..bebda80038bf 100644 --- a/include/linux/topology.h +++ b/include/linux/topology.h @@ -147,6 +147,13 @@ static inline int node_to_mem_node(int node) } #endif +#ifndef reset_numa_mem +static inline void reset_numa_mem(int node) +{ + _node_numa_mem_[node] = first_memory_node; +} +#endif + #ifndef numa_mem_id /* Returns the number of the nearest Node with memory */ static inline int numa_mem_id(void)