@@ -109,32 +109,32 @@ int prepare_secondary_mm(int cpu)
#else
int prepare_secondary_mm(int cpu)
{
- lpae_t *first;
+ lpae_t *root = alloc_xenheap_page();
first = alloc_xenheap_page(); /* root == first level on 32-bit 3-level trie */
- if ( !first )
+ if ( !root )
{
- printk("CPU%u: Unable to allocate the first page-table\n", cpu);
+ printk("CPU%u: Unable to allocate the root page-table\n", cpu);
return -ENOMEM;
}
/* Initialise root pagetable from root of boot tables */
- memcpy(first, per_cpu(xen_pgtable, 0), PAGE_SIZE);
- per_cpu(xen_pgtable, cpu) = first;
+ memcpy(root, per_cpu(xen_pgtable, 0), PAGE_SIZE);
+ per_cpu(xen_pgtable, cpu) = root;
if ( !init_domheap_mappings(cpu) )
{
printk("CPU%u: Unable to prepare the domheap page-tables\n", cpu);
per_cpu(xen_pgtable, cpu) = NULL;
- free_xenheap_page(first);
+ free_xenheap_page(root);
return -ENOMEM;
}
clear_boot_pagetables();
/* Set init_ttbr for this CPU coming up */
- set_init_ttbr(first);
+ set_init_ttbr(root);
return 0;
}