aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBorislav Petkov <bp@suse.de>2016-03-29 11:42:03 -0400
committerIngo Molnar <mingo@kernel.org>2016-03-31 07:35:10 -0400
commit16bf92261b1b6cb1a1c0671b445a2fcb5a1ecc96 (patch)
tree3893658bb15c550e88bfb01615939f6c964bb78d
parentc109bf95992b391bb40bc37c5d309d13fead99b5 (diff)
x86/cpufeature: Remove cpu_has_pse
Signed-off-by: Borislav Petkov <bp@suse.de> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Link: http://lkml.kernel.org/r/1459266123-21878-11-git-send-email-bp@alien8.de Signed-off-by: Ingo Molnar <mingo@kernel.org>
-rw-r--r--arch/x86/include/asm/cpufeature.h1
-rw-r--r--arch/x86/include/asm/pgtable.h2
-rw-r--r--arch/x86/mm/init.c4
-rw-r--r--arch/x86/mm/init_32.c2
-rw-r--r--arch/x86/mm/init_64.c4
-rw-r--r--arch/x86/mm/ioremap.c2
-rw-r--r--arch/x86/power/hibernate_32.c2
-rw-r--r--arch/x86/xen/enlighten.c2
8 files changed, 9 insertions, 10 deletions
diff --git a/arch/x86/include/asm/cpufeature.h b/arch/x86/include/asm/cpufeature.h
index f97b53417d44..97e5f13ea471 100644
--- a/arch/x86/include/asm/cpufeature.h
+++ b/arch/x86/include/asm/cpufeature.h
@@ -119,7 +119,6 @@ extern const char * const x86_bug_flags[NBUGINTS*32];
119} while (0) 119} while (0)
120 120
121#define cpu_has_fpu boot_cpu_has(X86_FEATURE_FPU) 121#define cpu_has_fpu boot_cpu_has(X86_FEATURE_FPU)
122#define cpu_has_pse boot_cpu_has(X86_FEATURE_PSE)
123#define cpu_has_tsc boot_cpu_has(X86_FEATURE_TSC) 122#define cpu_has_tsc boot_cpu_has(X86_FEATURE_TSC)
124#define cpu_has_apic boot_cpu_has(X86_FEATURE_APIC) 123#define cpu_has_apic boot_cpu_has(X86_FEATURE_APIC)
125#define cpu_has_fxsr boot_cpu_has(X86_FEATURE_FXSR) 124#define cpu_has_fxsr boot_cpu_has(X86_FEATURE_FXSR)
diff --git a/arch/x86/include/asm/pgtable.h b/arch/x86/include/asm/pgtable.h
index 97f3242e133c..f86491a7bc9d 100644
--- a/arch/x86/include/asm/pgtable.h
+++ b/arch/x86/include/asm/pgtable.h
@@ -183,7 +183,7 @@ static inline int pmd_trans_huge(pmd_t pmd)
183 183
184static inline int has_transparent_hugepage(void) 184static inline int has_transparent_hugepage(void)
185{ 185{
186 return cpu_has_pse; 186 return boot_cpu_has(X86_FEATURE_PSE);
187} 187}
188 188
189#ifdef __HAVE_ARCH_PTE_DEVMAP 189#ifdef __HAVE_ARCH_PTE_DEVMAP
diff --git a/arch/x86/mm/init.c b/arch/x86/mm/init.c
index 05ff46a9c261..372aad2b3291 100644
--- a/arch/x86/mm/init.c
+++ b/arch/x86/mm/init.c
@@ -157,12 +157,12 @@ static void __init probe_page_size_mask(void)
157 * This will simplify cpa(), which otherwise needs to support splitting 157 * This will simplify cpa(), which otherwise needs to support splitting
158 * large pages into small in interrupt context, etc. 158 * large pages into small in interrupt context, etc.
159 */ 159 */
160 if (cpu_has_pse && !debug_pagealloc_enabled()) 160 if (boot_cpu_has(X86_FEATURE_PSE) && !debug_pagealloc_enabled())
161 page_size_mask |= 1 << PG_LEVEL_2M; 161 page_size_mask |= 1 << PG_LEVEL_2M;
162#endif 162#endif
163 163
164 /* Enable PSE if available */ 164 /* Enable PSE if available */
165 if (cpu_has_pse) 165 if (boot_cpu_has(X86_FEATURE_PSE))
166 cr4_set_bits_and_update_boot(X86_CR4_PSE); 166 cr4_set_bits_and_update_boot(X86_CR4_PSE);
167 167
168 /* Enable PGE if available */ 168 /* Enable PGE if available */
diff --git a/arch/x86/mm/init_32.c b/arch/x86/mm/init_32.c
index bd7a9b9e2e14..85af914e3d27 100644
--- a/arch/x86/mm/init_32.c
+++ b/arch/x86/mm/init_32.c
@@ -284,7 +284,7 @@ kernel_physical_mapping_init(unsigned long start,
284 */ 284 */
285 mapping_iter = 1; 285 mapping_iter = 1;
286 286
287 if (!cpu_has_pse) 287 if (!boot_cpu_has(X86_FEATURE_PSE))
288 use_pse = 0; 288 use_pse = 0;
289 289
290repeat: 290repeat:
diff --git a/arch/x86/mm/init_64.c b/arch/x86/mm/init_64.c
index 214afda97911..89d97477c1d9 100644
--- a/arch/x86/mm/init_64.c
+++ b/arch/x86/mm/init_64.c
@@ -1295,7 +1295,7 @@ int __meminit vmemmap_populate(unsigned long start, unsigned long end, int node)
1295 struct vmem_altmap *altmap = to_vmem_altmap(start); 1295 struct vmem_altmap *altmap = to_vmem_altmap(start);
1296 int err; 1296 int err;
1297 1297
1298 if (cpu_has_pse) 1298 if (boot_cpu_has(X86_FEATURE_PSE))
1299 err = vmemmap_populate_hugepages(start, end, node, altmap); 1299 err = vmemmap_populate_hugepages(start, end, node, altmap);
1300 else if (altmap) { 1300 else if (altmap) {
1301 pr_err_once("%s: no cpu support for altmap allocations\n", 1301 pr_err_once("%s: no cpu support for altmap allocations\n",
@@ -1338,7 +1338,7 @@ void register_page_bootmem_memmap(unsigned long section_nr,
1338 } 1338 }
1339 get_page_bootmem(section_nr, pud_page(*pud), MIX_SECTION_INFO); 1339 get_page_bootmem(section_nr, pud_page(*pud), MIX_SECTION_INFO);
1340 1340
1341 if (!cpu_has_pse) { 1341 if (!boot_cpu_has(X86_FEATURE_PSE)) {
1342 next = (addr + PAGE_SIZE) & PAGE_MASK; 1342 next = (addr + PAGE_SIZE) & PAGE_MASK;
1343 pmd = pmd_offset(pud, addr); 1343 pmd = pmd_offset(pud, addr);
1344 if (pmd_none(*pmd)) 1344 if (pmd_none(*pmd))
diff --git a/arch/x86/mm/ioremap.c b/arch/x86/mm/ioremap.c
index 5a116ace9cbb..f0894910bdd7 100644
--- a/arch/x86/mm/ioremap.c
+++ b/arch/x86/mm/ioremap.c
@@ -386,7 +386,7 @@ int __init arch_ioremap_pud_supported(void)
386 386
387int __init arch_ioremap_pmd_supported(void) 387int __init arch_ioremap_pmd_supported(void)
388{ 388{
389 return cpu_has_pse; 389 return boot_cpu_has(X86_FEATURE_PSE);
390} 390}
391 391
392/* 392/*
diff --git a/arch/x86/power/hibernate_32.c b/arch/x86/power/hibernate_32.c
index 291226b952a9..9f14bd34581d 100644
--- a/arch/x86/power/hibernate_32.c
+++ b/arch/x86/power/hibernate_32.c
@@ -106,7 +106,7 @@ static int resume_physical_mapping_init(pgd_t *pgd_base)
106 * normal page tables. 106 * normal page tables.
107 * NOTE: We can mark everything as executable here 107 * NOTE: We can mark everything as executable here
108 */ 108 */
109 if (cpu_has_pse) { 109 if (boot_cpu_has(X86_FEATURE_PSE)) {
110 set_pmd(pmd, pfn_pmd(pfn, PAGE_KERNEL_LARGE_EXEC)); 110 set_pmd(pmd, pfn_pmd(pfn, PAGE_KERNEL_LARGE_EXEC));
111 pfn += PTRS_PER_PTE; 111 pfn += PTRS_PER_PTE;
112 } else { 112 } else {
diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c
index 055f48ddb03c..ff2a2e6ef7af 100644
--- a/arch/x86/xen/enlighten.c
+++ b/arch/x86/xen/enlighten.c
@@ -1469,7 +1469,7 @@ static void xen_pvh_set_cr_flags(int cpu)
1469 * For BSP, PSE PGE are set in probe_page_size_mask(), for APs 1469 * For BSP, PSE PGE are set in probe_page_size_mask(), for APs
1470 * set them here. For all, OSFXSR OSXMMEXCPT are set in fpu__init_cpu(). 1470 * set them here. For all, OSFXSR OSXMMEXCPT are set in fpu__init_cpu().
1471 */ 1471 */
1472 if (cpu_has_pse) 1472 if (boot_cpu_has(X86_FEATURE_PSE))
1473 cr4_set_bits_and_update_boot(X86_CR4_PSE); 1473 cr4_set_bits_and_update_boot(X86_CR4_PSE);
1474 1474
1475 if (boot_cpu_has(X86_FEATURE_PGE)) 1475 if (boot_cpu_has(X86_FEATURE_PGE))