|
@@ -756,6 +756,14 @@ static void __cpuinit do_fork_idle(struct work_struct *work)
|
|
|
}
|
|
|
|
|
|
#ifdef CONFIG_X86_64
|
|
|
+
|
|
|
+/* __ref because it's safe to call free_bootmem when after_bootmem == 0. */
|
|
|
+static void __ref free_bootmem_pda(struct x8664_pda *oldpda)
|
|
|
+{
|
|
|
+ if (!after_bootmem)
|
|
|
+ free_bootmem((unsigned long)oldpda, sizeof(*oldpda));
|
|
|
+}
|
|
|
+
|
|
|
/*
|
|
|
* Allocate node local memory for the AP pda.
|
|
|
*
|
|
@@ -784,8 +792,7 @@ int __cpuinit get_local_pda(int cpu)
|
|
|
|
|
|
if (oldpda) {
|
|
|
memcpy(newpda, oldpda, size);
|
|
|
- if (!after_bootmem)
|
|
|
- free_bootmem((unsigned long)oldpda, size);
|
|
|
+ free_bootmem_pda(oldpda);
|
|
|
}
|
|
|
|
|
|
newpda->in_bootmem = 0;
|