Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 16bf9226 authored by Borislav Petkov's avatar Borislav Petkov Committed by Ingo Molnar
Browse files

x86/cpufeature: Remove cpu_has_pse



Signed-off-by: default avatarBorislav 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: default avatarIngo Molnar <mingo@kernel.org>
parent c109bf95
Loading
Loading
Loading
Loading
+0 −1
Original line number Original line Diff line number Diff line
@@ -119,7 +119,6 @@ extern const char * const x86_bug_flags[NBUGINTS*32];
} while (0)
} while (0)


#define cpu_has_fpu		boot_cpu_has(X86_FEATURE_FPU)
#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_tsc		boot_cpu_has(X86_FEATURE_TSC)
#define cpu_has_apic		boot_cpu_has(X86_FEATURE_APIC)
#define cpu_has_apic		boot_cpu_has(X86_FEATURE_APIC)
#define cpu_has_fxsr		boot_cpu_has(X86_FEATURE_FXSR)
#define cpu_has_fxsr		boot_cpu_has(X86_FEATURE_FXSR)
+1 −1
Original line number Original line Diff line number Diff line
@@ -183,7 +183,7 @@ static inline int pmd_trans_huge(pmd_t pmd)


static inline int has_transparent_hugepage(void)
static inline int has_transparent_hugepage(void)
{
{
	return cpu_has_pse;
	return boot_cpu_has(X86_FEATURE_PSE);
}
}


#ifdef __HAVE_ARCH_PTE_DEVMAP
#ifdef __HAVE_ARCH_PTE_DEVMAP
+2 −2
Original line number Original line Diff line number Diff line
@@ -157,12 +157,12 @@ static void __init probe_page_size_mask(void)
	 * This will simplify cpa(), which otherwise needs to support splitting
	 * This will simplify cpa(), which otherwise needs to support splitting
	 * large pages into small in interrupt context, etc.
	 * 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;
		page_size_mask |= 1 << PG_LEVEL_2M;
#endif
#endif


	/* Enable PSE if available */
	/* Enable PSE if available */
	if (cpu_has_pse)
	if (boot_cpu_has(X86_FEATURE_PSE))
		cr4_set_bits_and_update_boot(X86_CR4_PSE);
		cr4_set_bits_and_update_boot(X86_CR4_PSE);


	/* Enable PGE if available */
	/* Enable PGE if available */
+1 −1
Original line number Original line Diff line number Diff line
@@ -284,7 +284,7 @@ kernel_physical_mapping_init(unsigned long start,
	 */
	 */
	mapping_iter = 1;
	mapping_iter = 1;


	if (!cpu_has_pse)
	if (!boot_cpu_has(X86_FEATURE_PSE))
		use_pse = 0;
		use_pse = 0;


repeat:
repeat:
+2 −2
Original line number Original line Diff line number Diff line
@@ -1295,7 +1295,7 @@ int __meminit vmemmap_populate(unsigned long start, unsigned long end, int node)
	struct vmem_altmap *altmap = to_vmem_altmap(start);
	struct vmem_altmap *altmap = to_vmem_altmap(start);
	int err;
	int err;


	if (cpu_has_pse)
	if (boot_cpu_has(X86_FEATURE_PSE))
		err = vmemmap_populate_hugepages(start, end, node, altmap);
		err = vmemmap_populate_hugepages(start, end, node, altmap);
	else if (altmap) {
	else if (altmap) {
		pr_err_once("%s: no cpu support for altmap allocations\n",
		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);
		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;
			next = (addr + PAGE_SIZE) & PAGE_MASK;
			pmd = pmd_offset(pud, addr);
			pmd = pmd_offset(pud, addr);
			if (pmd_none(*pmd))
			if (pmd_none(*pmd))
Loading