diff options
author | Borislav Petkov <bp@suse.de> | 2016-03-29 11:41:58 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2016-03-31 07:35:08 -0400 |
commit | b8291adc191abec2095f03a130ac91506d345cae (patch) | |
tree | 2315c3d5345e339a21fcbe9d58a73dfd384b3ef5 | |
parent | 62436a4d36c94d202784cd8a997ff8bb4b880237 (diff) |
x86/cpufeature: Remove cpu_has_gbpages
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-6-git-send-email-bp@alien8.de
Signed-off-by: Ingo Molnar <mingo@kernel.org>
-rw-r--r-- | arch/x86/include/asm/cpufeature.h | 1 | ||||
-rw-r--r-- | arch/x86/kvm/mmu.c | 3 | ||||
-rw-r--r-- | arch/x86/mm/hugetlbpage.c | 4 | ||||
-rw-r--r-- | arch/x86/mm/init.c | 2 | ||||
-rw-r--r-- | arch/x86/mm/ioremap.c | 2 | ||||
-rw-r--r-- | arch/x86/mm/pageattr.c | 2 |
6 files changed, 7 insertions, 7 deletions
diff --git a/arch/x86/include/asm/cpufeature.h b/arch/x86/include/asm/cpufeature.h index 3da7aec9fca1..693b4aa43908 100644 --- a/arch/x86/include/asm/cpufeature.h +++ b/arch/x86/include/asm/cpufeature.h | |||
@@ -130,7 +130,6 @@ extern const char * const x86_bug_flags[NBUGINTS*32]; | |||
130 | #define cpu_has_avx boot_cpu_has(X86_FEATURE_AVX) | 130 | #define cpu_has_avx boot_cpu_has(X86_FEATURE_AVX) |
131 | #define cpu_has_avx2 boot_cpu_has(X86_FEATURE_AVX2) | 131 | #define cpu_has_avx2 boot_cpu_has(X86_FEATURE_AVX2) |
132 | #define cpu_has_clflush boot_cpu_has(X86_FEATURE_CLFLUSH) | 132 | #define cpu_has_clflush boot_cpu_has(X86_FEATURE_CLFLUSH) |
133 | #define cpu_has_gbpages boot_cpu_has(X86_FEATURE_GBPAGES) | ||
134 | #define cpu_has_pat boot_cpu_has(X86_FEATURE_PAT) | 133 | #define cpu_has_pat boot_cpu_has(X86_FEATURE_PAT) |
135 | #define cpu_has_xsave boot_cpu_has(X86_FEATURE_XSAVE) | 134 | #define cpu_has_xsave boot_cpu_has(X86_FEATURE_XSAVE) |
136 | #define cpu_has_xsaves boot_cpu_has(X86_FEATURE_XSAVES) | 135 | #define cpu_has_xsaves boot_cpu_has(X86_FEATURE_XSAVES) |
diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c index 70e95d097ef1..bc1e0b65909e 100644 --- a/arch/x86/kvm/mmu.c +++ b/arch/x86/kvm/mmu.c | |||
@@ -3836,7 +3836,8 @@ reset_tdp_shadow_zero_bits_mask(struct kvm_vcpu *vcpu, | |||
3836 | __reset_rsvds_bits_mask(vcpu, &context->shadow_zero_check, | 3836 | __reset_rsvds_bits_mask(vcpu, &context->shadow_zero_check, |
3837 | boot_cpu_data.x86_phys_bits, | 3837 | boot_cpu_data.x86_phys_bits, |
3838 | context->shadow_root_level, false, | 3838 | context->shadow_root_level, false, |
3839 | cpu_has_gbpages, true, true); | 3839 | boot_cpu_has(X86_FEATURE_GBPAGES), |
3840 | true, true); | ||
3840 | else | 3841 | else |
3841 | __reset_rsvds_bits_mask_ept(&context->shadow_zero_check, | 3842 | __reset_rsvds_bits_mask_ept(&context->shadow_zero_check, |
3842 | boot_cpu_data.x86_phys_bits, | 3843 | boot_cpu_data.x86_phys_bits, |
diff --git a/arch/x86/mm/hugetlbpage.c b/arch/x86/mm/hugetlbpage.c index 740d7ac03a55..14a95054d4e0 100644 --- a/arch/x86/mm/hugetlbpage.c +++ b/arch/x86/mm/hugetlbpage.c | |||
@@ -162,7 +162,7 @@ static __init int setup_hugepagesz(char *opt) | |||
162 | unsigned long ps = memparse(opt, &opt); | 162 | unsigned long ps = memparse(opt, &opt); |
163 | if (ps == PMD_SIZE) { | 163 | if (ps == PMD_SIZE) { |
164 | hugetlb_add_hstate(PMD_SHIFT - PAGE_SHIFT); | 164 | hugetlb_add_hstate(PMD_SHIFT - PAGE_SHIFT); |
165 | } else if (ps == PUD_SIZE && cpu_has_gbpages) { | 165 | } else if (ps == PUD_SIZE && boot_cpu_has(X86_FEATURE_GBPAGES)) { |
166 | hugetlb_add_hstate(PUD_SHIFT - PAGE_SHIFT); | 166 | hugetlb_add_hstate(PUD_SHIFT - PAGE_SHIFT); |
167 | } else { | 167 | } else { |
168 | printk(KERN_ERR "hugepagesz: Unsupported page size %lu M\n", | 168 | printk(KERN_ERR "hugepagesz: Unsupported page size %lu M\n", |
@@ -177,7 +177,7 @@ __setup("hugepagesz=", setup_hugepagesz); | |||
177 | static __init int gigantic_pages_init(void) | 177 | static __init int gigantic_pages_init(void) |
178 | { | 178 | { |
179 | /* With compaction or CMA we can allocate gigantic pages at runtime */ | 179 | /* With compaction or CMA we can allocate gigantic pages at runtime */ |
180 | if (cpu_has_gbpages && !size_to_hstate(1UL << PUD_SHIFT)) | 180 | if (boot_cpu_has(X86_FEATURE_GBPAGES) && !size_to_hstate(1UL << PUD_SHIFT)) |
181 | hugetlb_add_hstate(PUD_SHIFT - PAGE_SHIFT); | 181 | hugetlb_add_hstate(PUD_SHIFT - PAGE_SHIFT); |
182 | return 0; | 182 | return 0; |
183 | } | 183 | } |
diff --git a/arch/x86/mm/init.c b/arch/x86/mm/init.c index 9d56f271d519..14377e98f279 100644 --- a/arch/x86/mm/init.c +++ b/arch/x86/mm/init.c | |||
@@ -173,7 +173,7 @@ static void __init probe_page_size_mask(void) | |||
173 | __supported_pte_mask &= ~_PAGE_GLOBAL; | 173 | __supported_pte_mask &= ~_PAGE_GLOBAL; |
174 | 174 | ||
175 | /* Enable 1 GB linear kernel mappings if available: */ | 175 | /* Enable 1 GB linear kernel mappings if available: */ |
176 | if (direct_gbpages && cpu_has_gbpages) { | 176 | if (direct_gbpages && boot_cpu_has(X86_FEATURE_GBPAGES)) { |
177 | printk(KERN_INFO "Using GB pages for direct mapping\n"); | 177 | printk(KERN_INFO "Using GB pages for direct mapping\n"); |
178 | page_size_mask |= 1 << PG_LEVEL_1G; | 178 | page_size_mask |= 1 << PG_LEVEL_1G; |
179 | } else { | 179 | } else { |
diff --git a/arch/x86/mm/ioremap.c b/arch/x86/mm/ioremap.c index 0d8d53d1f5cc..5a116ace9cbb 100644 --- a/arch/x86/mm/ioremap.c +++ b/arch/x86/mm/ioremap.c | |||
@@ -378,7 +378,7 @@ EXPORT_SYMBOL(iounmap); | |||
378 | int __init arch_ioremap_pud_supported(void) | 378 | int __init arch_ioremap_pud_supported(void) |
379 | { | 379 | { |
380 | #ifdef CONFIG_X86_64 | 380 | #ifdef CONFIG_X86_64 |
381 | return cpu_has_gbpages; | 381 | return boot_cpu_has(X86_FEATURE_GBPAGES); |
382 | #else | 382 | #else |
383 | return 0; | 383 | return 0; |
384 | #endif | 384 | #endif |
diff --git a/arch/x86/mm/pageattr.c b/arch/x86/mm/pageattr.c index 01be9ec3bf79..fb20c2ee0092 100644 --- a/arch/x86/mm/pageattr.c +++ b/arch/x86/mm/pageattr.c | |||
@@ -1055,7 +1055,7 @@ static int populate_pud(struct cpa_data *cpa, unsigned long start, pgd_t *pgd, | |||
1055 | /* | 1055 | /* |
1056 | * Map everything starting from the Gb boundary, possibly with 1G pages | 1056 | * Map everything starting from the Gb boundary, possibly with 1G pages |
1057 | */ | 1057 | */ |
1058 | while (cpu_has_gbpages && end - start >= PUD_SIZE) { | 1058 | while (boot_cpu_has(X86_FEATURE_GBPAGES) && end - start >= PUD_SIZE) { |
1059 | set_pud(pud, __pud(cpa->pfn << PAGE_SHIFT | _PAGE_PSE | | 1059 | set_pud(pud, __pud(cpa->pfn << PAGE_SHIFT | _PAGE_PSE | |
1060 | massage_pgprot(pud_pgprot))); | 1060 | massage_pgprot(pud_pgprot))); |
1061 | 1061 | ||