Source
320
320
} else {
321
321
phys_addr_t addr = 0;
322
322
323
323
/*
324
324
* All pages in the reserved area must come from the same zone.
325
325
* If the requested region crosses the low/high memory boundary,
326
326
* try allocating from high memory first and fall back to low
327
327
* memory in case of failure.
328
328
*/
329
329
if (base < highmem_start && limit > highmem_start) {
330
-
addr = memblock_alloc_range(size, alignment,
331
-
highmem_start, limit,
332
-
MEMBLOCK_NONE);
330
+
addr = memblock_phys_alloc_range(size, alignment,
331
+
highmem_start, limit);
333
332
limit = highmem_start;
334
333
}
335
334
336
335
if (!addr) {
337
-
addr = memblock_alloc_range(size, alignment, base,
338
-
limit,
339
-
MEMBLOCK_NONE);
336
+
addr = memblock_phys_alloc_range(size, alignment, base,
337
+
limit);
340
338
if (!addr) {
341
339
ret = -ENOMEM;
342
340
goto err;
343
341
}
344
342
}
345
343
346
344
/*
347
345
* kmemleak scans/reads tracked objects for pointers to other
348
346
* objects but this address isn't mapped and accessible
349
347
*/