]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - arch/x86/kernel/setup_percpu.c
early_res: Add free_early_partial()
[net-next-2.6.git] / arch / x86 / kernel / setup_percpu.c
index 35abcb8b00e9fb45087ae671d7e1320db8b26a88..ef6370b00e70ce50ab73ed6b6ad5a1db48b749ab 100644 (file)
@@ -137,7 +137,13 @@ static void * __init pcpu_fc_alloc(unsigned int cpu, size_t size, size_t align)
 
 static void __init pcpu_fc_free(void *ptr, size_t size)
 {
+#ifdef CONFIG_NO_BOOTMEM
+       u64 start = __pa(ptr);
+       u64 end = start + size;
+       free_early_partial(start, end);
+#else
        free_bootmem(__pa(ptr), size);
+#endif
 }
 
 static int __init pcpu_cpu_distance(unsigned int from, unsigned int to)