From: Borislav Petkov <bp@alien8.de>
To: X86 ML <x86@kernel.org>
Cc: LKML <linux-kernel@vger.kernel.org>, Tony Luck <tony.luck@intel.com>
Subject: [PATCH 04/10] x86/cpufeature: Kill cpu_has_x2apic
Date: Tue, 29 Mar 2016 17:41:57 +0200 [thread overview]
Message-ID: <1459266123-21878-5-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>
Cc: Tony Luck <tony.luck@intel.com>
---
Tony, it looks like that cpu_has_x2apic in asm/iommu.h has been
forgotten and can go now?
The other usages are all in arch/x86/.
arch/ia64/include/asm/iommu.h | 1 -
arch/x86/include/asm/apic.h | 4 ++--
arch/x86/include/asm/cpufeature.h | 1 -
arch/x86/kernel/apic/apic.c | 2 +-
4 files changed, 3 insertions(+), 5 deletions(-)
diff --git a/arch/ia64/include/asm/iommu.h b/arch/ia64/include/asm/iommu.h
index 105c93b00b1b..1d1212901ae7 100644
--- a/arch/ia64/include/asm/iommu.h
+++ b/arch/ia64/include/asm/iommu.h
@@ -1,7 +1,6 @@
#ifndef _ASM_IA64_IOMMU_H
#define _ASM_IA64_IOMMU_H 1
-#define cpu_has_x2apic 0
/* 10 seconds */
#define DMAR_OPERATION_TIMEOUT (((cycles_t) local_cpu_data->itc_freq)*10)
diff --git a/arch/x86/include/asm/apic.h b/arch/x86/include/asm/apic.h
index 98f25bbafac4..bc27611fa58f 100644
--- a/arch/x86/include/asm/apic.h
+++ b/arch/x86/include/asm/apic.h
@@ -239,10 +239,10 @@ extern void __init check_x2apic(void);
extern void x2apic_setup(void);
static inline int x2apic_enabled(void)
{
- return cpu_has_x2apic && apic_is_x2apic_enabled();
+ return boot_cpu_has(X86_FEATURE_X2APIC) && apic_is_x2apic_enabled();
}
-#define x2apic_supported() (cpu_has_x2apic)
+#define x2apic_supported() (boot_cpu_has(X86_FEATURE_X2APIC))
#else /* !CONFIG_X86_X2APIC */
static inline void check_x2apic(void) { }
static inline void x2apic_setup(void) { }
diff --git a/arch/x86/include/asm/cpufeature.h b/arch/x86/include/asm/cpufeature.h
index 33c29aabc9aa..3da7aec9fca1 100644
--- a/arch/x86/include/asm/cpufeature.h
+++ b/arch/x86/include/asm/cpufeature.h
@@ -132,7 +132,6 @@ extern const char * const x86_bug_flags[NBUGINTS*32];
#define cpu_has_clflush boot_cpu_has(X86_FEATURE_CLFLUSH)
#define cpu_has_gbpages boot_cpu_has(X86_FEATURE_GBPAGES)
#define cpu_has_pat boot_cpu_has(X86_FEATURE_PAT)
-#define cpu_has_x2apic boot_cpu_has(X86_FEATURE_X2APIC)
#define cpu_has_xsave boot_cpu_has(X86_FEATURE_XSAVE)
#define cpu_has_xsaves boot_cpu_has(X86_FEATURE_XSAVES)
/*
diff --git a/arch/x86/kernel/apic/apic.c b/arch/x86/kernel/apic/apic.c
index d356987a04e9..d7867c885bf8 100644
--- a/arch/x86/kernel/apic/apic.c
+++ b/arch/x86/kernel/apic/apic.c
@@ -1561,7 +1561,7 @@ void __init check_x2apic(void)
pr_info("x2apic: enabled by BIOS, switching to x2apic ops\n");
x2apic_mode = 1;
x2apic_state = X2APIC_ON;
- } else if (!cpu_has_x2apic) {
+ } else if (!boot_cpu_has(X86_FEATURE_X2APIC)) {
x2apic_state = X2APIC_DISABLED;
}
}
--
2.7.3
next prev parent reply other threads:[~2016-03-29 15:42 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 ` Borislav Petkov [this message]
2016-03-29 16:16 ` [PATCH 04/10] x86/cpufeature: Kill cpu_has_x2apic 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 ` [PATCH 10/10] x86/cpufeature: Kill cpu_has_pse Borislav Petkov
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-5-git-send-email-bp@alien8.de \
--to=bp@alien8.de \
--cc=linux-kernel@vger.kernel.org \
--cc=tony.luck@intel.com \
--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).