summaryrefslogtreecommitdiff
path: root/arch/x86/machine/pmap.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/machine/pmap.c')
-rw-r--r--arch/x86/machine/pmap.c46
1 files changed, 23 insertions, 23 deletions
diff --git a/arch/x86/machine/pmap.c b/arch/x86/machine/pmap.c
index 07b8a707..0448d07d 100644
--- a/arch/x86/machine/pmap.c
+++ b/arch/x86/machine/pmap.c
@@ -82,7 +82,7 @@ struct pmap_cpu_table {
};
struct pmap {
- struct pmap_cpu_table *cpu_tables[X15_MAX_CPUS];
+ struct pmap_cpu_table *cpu_tables[CONFIG_MAX_CPUS];
};
/*
@@ -98,13 +98,13 @@ typedef void (*pmap_walk_fn_t)(phys_addr_t pa, unsigned int index,
* that using a percpu variable would actually become ugly. This array
* is rather small anyway.
*/
-static struct pmap_cpu_table pmap_kernel_cpu_tables[X15_MAX_CPUS] __read_mostly;
+static struct pmap_cpu_table pmap_kernel_cpu_tables[CONFIG_MAX_CPUS] __read_mostly;
struct pmap pmap_kernel_pmap;
struct pmap *pmap_current_ptr __percpu;
-#ifdef X15_X86_PAE
+#ifdef CONFIG_X86_PAE
/*
* Alignment required on page directory pointer tables.
@@ -115,9 +115,9 @@ struct pmap *pmap_current_ptr __percpu;
* "Hidden" kernel root page tables for PAE mode.
*/
static alignas(PMAP_PDPT_ALIGN) pmap_pte_t
- pmap_cpu_kpdpts[X15_MAX_CPUS][PMAP_L2_PTES_PER_PT] __read_mostly;
+ pmap_cpu_kpdpts[CONFIG_MAX_CPUS][PMAP_L2_PTES_PER_PT] __read_mostly;
-#endif /* X15_X86_PAE */
+#endif /* CONFIG_X86_PAE */
/*
* Flags related to page protection.
@@ -260,7 +260,7 @@ struct pmap_update_request {
* on remote processors.
*/
struct pmap_update_request_array {
- struct pmap_update_request requests[X15_MAX_CPUS];
+ struct pmap_update_request requests[CONFIG_MAX_CPUS];
struct mutex lock;
};
@@ -270,10 +270,10 @@ static int pmap_do_remote_updates __read_mostly;
static struct kmem_cache pmap_cache;
-#ifdef X15_X86_PAE
+#ifdef CONFIG_X86_PAE
static char pmap_panic_no_pae[] __bootdata
= "pmap: PAE not supported";
-#endif /* X15_X86_PAE */
+#endif /* CONFIG_X86_PAE */
static char pmap_panic_inval_msg[] __bootdata
= "pmap: invalid physical address";
static char pmap_panic_directmap_msg[] __bootdata
@@ -369,17 +369,17 @@ out:
eax = 1;
cpu_cpuid(&eax, &ebx, &ecx, &edx);
-#ifdef X15_X86_PAE
+#ifdef CONFIG_X86_PAE
if (!(edx & CPU_FEATURE2_PAE)) {
boot_panic(pmap_panic_no_pae);
}
return (1 << PMAP_L1_SKIP);
-#else /* X15_X86_PAE */
+#else /* CONFIG_X86_PAE */
if (edx & CPU_FEATURE2_PSE) {
return (1 << PMAP_L1_SKIP);
}
-#endif /* X15_X86_PAE */
+#endif /* CONFIG_X86_PAE */
out:
return PAGE_SIZE;
@@ -401,11 +401,11 @@ pmap_boot_enable_pgext(unsigned long pgsize)
*
* See the boot module.
*/
-#ifdef X15_X86_PAE
+#ifdef CONFIG_X86_PAE
cpu_enable_pae();
-#else /* X15_X86_PAE */
+#else /* CONFIG_X86_PAE */
cpu_enable_pse();
-#endif /* X15_X86_PAE */
+#endif /* CONFIG_X86_PAE */
}
#endif /* __LP64__ */
@@ -428,11 +428,11 @@ pmap_setup_paging(void)
* direct physical mapping of physical memory.
*/
-#ifdef X15_X86_PAE
+#ifdef CONFIG_X86_PAE
root_ptp = (void *)BOOT_VTOP((uintptr_t)pmap_cpu_kpdpts[0]);
-#else /* X15_X86_PAE */
+#else /* CONFIG_X86_PAE */
root_ptp = biosmem_bootalloc(1);
-#endif /* X15_X86_PAE */
+#endif /* CONFIG_X86_PAE */
va = vm_page_trunc((uintptr_t)&_boot);
pa = va;
@@ -496,11 +496,11 @@ pmap_ap_setup_paging(void)
pmap = (void *)BOOT_VTOP((uintptr_t)&pmap_kernel_pmap);
cpu_table = (void *)BOOT_VTOP((uintptr_t)pmap->cpu_tables[boot_ap_id]);
-#ifdef X15_X86_PAE
+#ifdef CONFIG_X86_PAE
return (void *)(uint32_t)cpu_table->root_ptp_pa;
-#else /* X15_X86_PAE */
+#else /* CONFIG_X86_PAE */
return (void *)cpu_table->root_ptp_pa;
-#endif /* X15_X86_PAE */
+#endif /* CONFIG_X86_PAE */
}
/*
@@ -1004,10 +1004,10 @@ pmap_copy_cpu_table(unsigned int cpu)
kernel_pmap = pmap_get_kernel_pmap();
sptp = pmap_ptp_from_pa(kernel_pmap->cpu_tables[cpu_id()]->root_ptp_pa);
-#ifdef X15_X86_PAE
+#ifdef CONFIG_X86_PAE
cpu_table->root_ptp_pa = BOOT_VTOP((uintptr_t)pmap_cpu_kpdpts[cpu]);
dptp = pmap_ptp_from_pa(cpu_table->root_ptp_pa);
-#else /* X15_X86_PAE */
+#else /* CONFIG_X86_PAE */
struct vm_page *page;
page = vm_page_alloc(0, VM_PAGE_SEL_DIRECTMAP, VM_PAGE_PMAP);
@@ -1018,7 +1018,7 @@ pmap_copy_cpu_table(unsigned int cpu)
cpu_table->root_ptp_pa = vm_page_to_pa(page);
dptp = vm_page_direct_ptr(page);
-#endif /* X15_X86_PAE */
+#endif /* CONFIG_X86_PAE */
pmap_copy_cpu_table_recursive(sptp, level, dptp, PMAP_START_ADDRESS);
}