|
14 | 14 | #ifndef _ASM_X86_FIXMAP_H
|
15 | 15 | #define _ASM_X86_FIXMAP_H
|
16 | 16 |
|
| 17 | +#include <asm/kmap_size.h> |
| 18 | + |
17 | 19 | /*
|
18 | 20 | * Exposed to assembly code for setting up initial page tables. Cannot be
|
19 | 21 | * calculated in assembly code (fixmap entries are an enum), but is sanity
|
20 | 22 | * checked in the actual fixmap C code to make sure that the fixmap is
|
21 | 23 | * covered fully.
|
22 | 24 | */
|
23 |
| -#define FIXMAP_PMD_NUM 2 |
| 25 | +#ifndef CONFIG_DEBUG_KMAP_LOCAL_FORCE_MAP |
| 26 | +# define FIXMAP_PMD_NUM 2 |
| 27 | +#else |
| 28 | +# define KM_PMDS (KM_MAX_IDX * ((CONFIG_NR_CPUS + 511) / 512)) |
| 29 | +# define FIXMAP_PMD_NUM (KM_PMDS + 2) |
| 30 | +#endif |
24 | 31 | /* fixmap starts downwards from the 507th entry in level2_fixmap_pgt */
|
25 | 32 | #define FIXMAP_PMD_TOP 507
|
26 | 33 |
|
|
31 | 38 | #include <asm/pgtable_types.h>
|
32 | 39 | #ifdef CONFIG_X86_32
|
33 | 40 | #include <linux/threads.h>
|
34 |
| -#include <asm/kmap_size.h> |
35 | 41 | #else
|
36 | 42 | #include <uapi/asm/vsyscall.h>
|
37 | 43 | #endif
|
@@ -92,7 +98,7 @@ enum fixed_addresses {
|
92 | 98 | FIX_IO_APIC_BASE_0,
|
93 | 99 | FIX_IO_APIC_BASE_END = FIX_IO_APIC_BASE_0 + MAX_IO_APICS - 1,
|
94 | 100 | #endif
|
95 |
| -#ifdef CONFIG_X86_32 |
| 101 | +#ifdef CONFIG_KMAP_LOCAL |
96 | 102 | FIX_KMAP_BEGIN, /* reserved pte's for temporary kernel mappings */
|
97 | 103 | FIX_KMAP_END = FIX_KMAP_BEGIN + (KM_MAX_IDX * NR_CPUS) - 1,
|
98 | 104 | #ifdef CONFIG_PCI_MMCONFIG
|
|
0 commit comments