From: Borislav Petkov <bp@alien8.de>
To: X86 ML <x86@kernel.org>
Cc: LKML <linux-kernel@vger.kernel.org>
Subject: [PATCH 10/10] x86/cpufeature: Kill cpu_has_pse
Date: Tue, 29 Mar 2016 17:42:03 +0200 [thread overview]
Message-ID: <1459266123-21878-11-git-send-email-bp@alien8.de> (raw)
In-Reply-To: <1459266123-21878-1-git-send-email-bp@alien8.de>
From: Borislav Petkov <bp@suse.de>
Signed-off-by: Borislav Petkov <bp@suse.de>
---
arch/x86/include/asm/cpufeature.h | 1 -
arch/x86/include/asm/pgtable.h | 2 +-
arch/x86/mm/init.c | 4 ++--
arch/x86/mm/init_32.c | 2 +-
arch/x86/mm/init_64.c | 4 ++--
arch/x86/mm/ioremap.c | 2 +-
arch/x86/power/hibernate_32.c | 2 +-
arch/x86/xen/enlighten.c | 2 +-
8 files changed, 9 insertions(+), 10 deletions(-)
diff --git a/arch/x86/include/asm/cpufeature.h b/arch/x86/include/asm/cpufeature.h
index adc383a28e99..c594e04bf529 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];
} while (0)
#define cpu_has_fpu boot_cpu_has(X86_FEATURE_FPU)
-#define cpu_has_pse boot_cpu_has(X86_FEATURE_PSE)
#define cpu_has_tsc boot_cpu_has(X86_FEATURE_TSC)
#define cpu_has_apic boot_cpu_has(X86_FEATURE_APIC)
#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)
static inline int has_transparent_hugepage(void)
{
- return cpu_has_pse;
+ return boot_cpu_has(X86_FEATURE_PSE);
}
#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)
* This will simplify cpa(), which otherwise needs to support splitting
* large pages into small in interrupt context, etc.
*/
- if (cpu_has_pse && !debug_pagealloc_enabled())
+ if (boot_cpu_has(X86_FEATURE_PSE) && !debug_pagealloc_enabled())
page_size_mask |= 1 << PG_LEVEL_2M;
#endif
/* Enable PSE if available */
- if (cpu_has_pse)
+ if (boot_cpu_has(X86_FEATURE_PSE))
cr4_set_bits_and_update_boot(X86_CR4_PSE);
/* 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,
*/
mapping_iter = 1;
- if (!cpu_has_pse)
+ if (!boot_cpu_has(X86_FEATURE_PSE))
use_pse = 0;
repeat:
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)
struct vmem_altmap *altmap = to_vmem_altmap(start);
int err;
- if (cpu_has_pse)
+ if (boot_cpu_has(X86_FEATURE_PSE))
err = vmemmap_populate_hugepages(start, end, node, altmap);
else if (altmap) {
pr_err_once("%s: no cpu support for altmap allocations\n",
@@ -1338,7 +1338,7 @@ void register_page_bootmem_memmap(unsigned long section_nr,
}
get_page_bootmem(section_nr, pud_page(*pud), MIX_SECTION_INFO);
- if (!cpu_has_pse) {
+ if (!boot_cpu_has(X86_FEATURE_PSE)) {
next = (addr + PAGE_SIZE) & PAGE_MASK;
pmd = pmd_offset(pud, addr);
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)
int __init arch_ioremap_pmd_supported(void)
{
- return cpu_has_pse;
+ return boot_cpu_has(X86_FEATURE_PSE);
}
/*
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)
* normal page tables.
* NOTE: We can mark everything as executable here
*/
- if (cpu_has_pse) {
+ if (boot_cpu_has(X86_FEATURE_PSE)) {
set_pmd(pmd, pfn_pmd(pfn, PAGE_KERNEL_LARGE_EXEC));
pfn += PTRS_PER_PTE;
} 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)
* For BSP, PSE PGE are set in probe_page_size_mask(), for APs
* set them here. For all, OSFXSR OSXMMEXCPT are set in fpu__init_cpu().
*/
- if (cpu_has_pse)
+ if (boot_cpu_has(X86_FEATURE_PSE))
cr4_set_bits_and_update_boot(X86_CR4_PSE);
if (boot_cpu_has(X86_FEATURE_PGE))
--
2.7.3
next prev parent reply other threads:[~2016-03-29 15:43 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-29 15:41 [PATCH 00/10] x86/cpu: Some more cpu_has_YYY removal Borislav Petkov
2016-03-29 15:41 ` [PATCH 01/10] x86/cpufeature: Kill cpu_has_arch_perfmon Borislav Petkov
2016-03-31 13:01 ` [tip:x86/cpu] x86/cpufeature: Remove cpu_has_arch_perfmon tip-bot for Borislav Petkov
2016-03-29 15:41 ` [PATCH 02/10] x86/cpufeature: Kill cpu_has_hypervisor Borislav Petkov
2016-03-29 18:03 ` Kershner, David A
2016-03-31 13:01 ` [tip:x86/cpu] x86/cpufeature: Remove cpu_has_hypervisor tip-bot for Borislav Petkov
2016-04-01 7:40 ` [tip:x86/cpu] x86/cpufeature: Fix build bug caused by merge artifact with the removal of cpu_has_hypervisor tip-bot for Ingo Molnar
2016-04-01 7:51 ` Borislav Petkov
2016-03-29 15:41 ` [PATCH 03/10] x86/cpufeature: Kill cpu_has_osxsave Borislav Petkov
2016-03-31 13:01 ` [tip:x86/cpu] x86/cpufeature: Remove cpu_has_osxsave tip-bot for Borislav Petkov
2016-03-29 15:41 ` [PATCH 04/10] x86/cpufeature: Kill cpu_has_x2apic Borislav Petkov
2016-03-29 16:16 ` Luck, Tony
2016-03-31 13:02 ` [tip:x86/cpu] x86/cpufeature: Remove cpu_has_x2apic tip-bot for Borislav Petkov
2016-03-29 15:41 ` [PATCH 05/10] x86/cpufeature: Kill cpu_has_gbpages Borislav Petkov
2016-03-31 13:02 ` [tip:x86/cpu] x86/cpufeature: Remove cpu_has_gbpages tip-bot for Borislav Petkov
2016-03-29 15:41 ` [PATCH 06/10] x86/cpufeature: Kill cpu_has_clflush Borislav Petkov
2016-03-31 13:03 ` [tip:x86/cpu] x86/cpufeature: Remove cpu_has_clflush tip-bot for Borislav Petkov
2016-03-29 15:42 ` [PATCH 07/10] x86/cpufeature: Kill cpu_has_xmm2 Borislav Petkov
2016-03-31 13:03 ` [tip:x86/cpu] x86/cpufeature: Remove cpu_has_xmm2 tip-bot for Borislav Petkov
2016-03-29 15:42 ` [PATCH 08/10] x86/cpufeature: Kill cpu_has_pat Borislav Petkov
2016-03-30 11:28 ` [Intel-gfx] " Daniel Vetter
2016-03-31 13:00 ` [tip:x86/mm] x86/mm/pat, x86/cpufeature: Remove cpu_has_pat tip-bot for Borislav Petkov
2016-03-29 15:42 ` [PATCH 09/10] x86/cpufeature: Kill cpu_has_pge Borislav Petkov
2016-03-31 13:03 ` [tip:x86/cpu] x86/cpufeature: Remove cpu_has_pge tip-bot for Borislav Petkov
2016-03-29 15:42 ` Borislav Petkov [this message]
2016-03-31 13:04 ` [tip:x86/cpu] x86/cpufeature: Remove cpu_has_pse tip-bot for Borislav Petkov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1459266123-21878-11-git-send-email-bp@alien8.de \
--to=bp@alien8.de \
--cc=linux-kernel@vger.kernel.org \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).