aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@linux.intel.com>2013-01-31 17:00:48 -0500
committerH. Peter Anvin <hpa@linux.intel.com>2013-01-31 17:12:30 -0500
commit07f4207a305c834f528d08428df4531744e25678 (patch)
tree1982055a7249edfde75db1519960e2b8dc941bfc
parentbb112aec5ee41427e9b9726e3d57b896709598ed (diff)
x86-32, mm: Remove reference to alloc_remap()
We have removed the remap allocator for x86-32, and x86-64 never had it (and doesn't need it). Remove residual reference to it. Reported-by: Yinghai Lu <yinghai@kernel.org> Signed-off-by: H. Peter Anvin <hpa@linux.intel.com> Cc: Dave Hansen <dave@linux.vnet.ibm.com> Cc: <stable@vger.kernel.org> Link: http://lkml.kernel.org/r/CAE9FiQVn6_QZi3fNQ-JHYiR-7jeDJ5hT0SyT_%2BzVvfOj=PzF3w@mail.gmail.com
-rw-r--r--arch/x86/mm/numa.c29
1 files changed, 11 insertions, 18 deletions
diff --git a/arch/x86/mm/numa.c b/arch/x86/mm/numa.c
index 61c2b6f5ff88..8504f3698753 100644
--- a/arch/x86/mm/numa.c
+++ b/arch/x86/mm/numa.c
@@ -193,7 +193,6 @@ int __init numa_add_memblk(int nid, u64 start, u64 end)
193static void __init setup_node_data(int nid, u64 start, u64 end) 193static void __init setup_node_data(int nid, u64 start, u64 end)
194{ 194{
195 const size_t nd_size = roundup(sizeof(pg_data_t), PAGE_SIZE); 195 const size_t nd_size = roundup(sizeof(pg_data_t), PAGE_SIZE);
196 bool remapped = false;
197 u64 nd_pa; 196 u64 nd_pa;
198 void *nd; 197 void *nd;
199 int tnid; 198 int tnid;
@@ -211,28 +210,22 @@ static void __init setup_node_data(int nid, u64 start, u64 end)
211 nid, start, end - 1); 210 nid, start, end - 1);
212 211
213 /* 212 /*
214 * Allocate node data. Try remap allocator first, node-local 213 * Allocate node data. Try node-local memory and then any node.
215 * memory and then any node. Never allocate in DMA zone. 214 * Never allocate in DMA zone.
216 */ 215 */
217 nd = alloc_remap(nid, nd_size); 216 nd_pa = memblock_alloc_nid(nd_size, SMP_CACHE_BYTES, nid);
218 if (nd) { 217 if (!nd_pa) {
219 nd_pa = __pa_nodebug(nd); 218 pr_err("Cannot find %zu bytes in node %d\n",
220 remapped = true; 219 nd_size, nid);
221 } else { 220 return;
222 nd_pa = memblock_alloc_nid(nd_size, SMP_CACHE_BYTES, nid);
223 if (!nd_pa) {
224 pr_err("Cannot find %zu bytes in node %d\n",
225 nd_size, nid);
226 return;
227 }
228 nd = __va(nd_pa);
229 } 221 }
222 nd = __va(nd_pa);
230 223
231 /* report and initialize */ 224 /* report and initialize */
232 printk(KERN_INFO " NODE_DATA [mem %#010Lx-%#010Lx]%s\n", 225 printk(KERN_INFO " NODE_DATA [mem %#010Lx-%#010Lx]\n",
233 nd_pa, nd_pa + nd_size - 1, remapped ? " (remapped)" : ""); 226 nd_pa, nd_pa + nd_size - 1);
234 tnid = early_pfn_to_nid(nd_pa >> PAGE_SHIFT); 227 tnid = early_pfn_to_nid(nd_pa >> PAGE_SHIFT);
235 if (!remapped && tnid != nid) 228 if (tnid != nid)
236 printk(KERN_INFO " NODE_DATA(%d) on node %d\n", nid, tnid); 229 printk(KERN_INFO " NODE_DATA(%d) on node %d\n", nid, tnid);
237 230
238 node_data[nid] = nd; 231 node_data[nid] = nd;