* [PATCH for-next] xen/x86: Remove APIC_INTEGRATED() checks
@ 2017-05-08 12:40 Andrew Cooper
2017-05-08 13:00 ` Jan Beulich
2017-05-08 13:36 ` Wei Liu
0 siblings, 2 replies; 3+ messages in thread
From: Andrew Cooper @ 2017-05-08 12:40 UTC (permalink / raw)
To: Xen-devel; +Cc: Andrew Cooper, Wei Liu, Jan Beulich
All 64bit processors have integrated APICs. Xen has no need to attempt to
cope with external APICs.
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
CC: Jan Beulich <JBeulich@suse.com>
---
xen/arch/x86/apic.c | 9 +++------
xen/arch/x86/smpboot.c | 6 +-----
xen/include/asm-x86/apicdef.h | 1 -
3 files changed, 4 insertions(+), 12 deletions(-)
diff --git a/xen/arch/x86/apic.c b/xen/arch/x86/apic.c
index e32dcd7..1dd188a 100644
--- a/xen/arch/x86/apic.c
+++ b/xen/arch/x86/apic.c
@@ -522,7 +522,7 @@ static void resume_x2apic(void)
void setup_local_APIC(void)
{
- unsigned long oldvalue, value, ver, maxlvt;
+ unsigned long oldvalue, value, maxlvt;
int i, j;
/* Pound the ESR really hard over the head with a big hammer - mbligh */
@@ -533,15 +533,12 @@ void setup_local_APIC(void)
apic_write(APIC_ESR, 0);
}
- value = apic_read(APIC_LVR);
- ver = GET_APIC_VERSION(value);
-
BUILD_BUG_ON((SPURIOUS_APIC_VECTOR & 0x0f) != 0x0f);
/*
* Double-check whether this APIC is really registered.
*/
- if (!APIC_INTEGRATED(ver) || !apic_id_registered())
+ if (!apic_id_registered())
BUG();
/*
@@ -1358,7 +1355,7 @@ int __init APIC_init_uniprocessor (void)
/*
* Complain if the BIOS pretends there is one.
*/
- if (!cpu_has_apic && APIC_INTEGRATED(apic_version[boot_cpu_physical_apicid])) {
+ if (!cpu_has_apic) {
printk(KERN_ERR "BIOS bug, local APIC #%d not detected!...\n",
boot_cpu_physical_apicid);
skip_ioapic_setup = 1;
diff --git a/xen/arch/x86/smpboot.c b/xen/arch/x86/smpboot.c
index 50b907b..92fe4f2 100644
--- a/xen/arch/x86/smpboot.c
+++ b/xen/arch/x86/smpboot.c
@@ -385,9 +385,6 @@ static int wakeup_secondary_cpu(int phys_apicid, unsigned long start_eip)
/*
* Be paranoid about clearing APIC errors.
*/
- if ( !APIC_INTEGRATED(apic_version[phys_apicid]) )
- return -ENODEV;
-
apic_read_around(APIC_SPIV);
apic_write(APIC_ESR, 0);
apic_read(APIC_ESR);
@@ -835,8 +832,7 @@ void __init smp_prepare_cpus(unsigned int max_cpus)
}
/* If we couldn't find a local APIC, then get out of here now! */
- if ( !APIC_INTEGRATED(apic_version[boot_cpu_physical_apicid])
- || !cpu_has_apic )
+ if ( !cpu_has_apic )
{
printk(KERN_ERR "BIOS bug, local APIC #%d not detected!...\n",
boot_cpu_physical_apicid);
diff --git a/xen/include/asm-x86/apicdef.h b/xen/include/asm-x86/apicdef.h
index da7f4d3..1b2c452 100644
--- a/xen/include/asm-x86/apicdef.h
+++ b/xen/include/asm-x86/apicdef.h
@@ -19,7 +19,6 @@
#define APIC_LVR_DIRECTED_EOI (1 << 24)
#define GET_APIC_VERSION(x) ((x)&0xFF)
#define GET_APIC_MAXLVT(x) (((x)>>16)&0xFF)
-#define APIC_INTEGRATED(x) ((x)&0xF0)
#define APIC_XAPIC(x) ((x) >= 0x14)
#define APIC_TASKPRI 0x80
#define APIC_TPRI_MASK 0xFF
--
2.1.4
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH for-next] xen/x86: Remove APIC_INTEGRATED() checks
2017-05-08 12:40 [PATCH for-next] xen/x86: Remove APIC_INTEGRATED() checks Andrew Cooper
@ 2017-05-08 13:00 ` Jan Beulich
2017-05-08 13:36 ` Wei Liu
1 sibling, 0 replies; 3+ messages in thread
From: Jan Beulich @ 2017-05-08 13:00 UTC (permalink / raw)
To: Andrew Cooper; +Cc: Wei Liu, Xen-devel
>>> On 08.05.17 at 14:40, <andrew.cooper3@citrix.com> wrote:
> All 64bit processors have integrated APICs. Xen has no need to attempt to
> cope with external APICs.
>
> Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH for-next] xen/x86: Remove APIC_INTEGRATED() checks
2017-05-08 12:40 [PATCH for-next] xen/x86: Remove APIC_INTEGRATED() checks Andrew Cooper
2017-05-08 13:00 ` Jan Beulich
@ 2017-05-08 13:36 ` Wei Liu
1 sibling, 0 replies; 3+ messages in thread
From: Wei Liu @ 2017-05-08 13:36 UTC (permalink / raw)
To: Andrew Cooper; +Cc: Wei Liu, Jan Beulich, Xen-devel
On Mon, May 08, 2017 at 01:40:36PM +0100, Andrew Cooper wrote:
> All 64bit processors have integrated APICs. Xen has no need to attempt to
> cope with external APICs.
>
> Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Wei Liu <wei.liu2@citrix.com>
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-05-08 13:36 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-08 12:40 [PATCH for-next] xen/x86: Remove APIC_INTEGRATED() checks Andrew Cooper
2017-05-08 13:00 ` Jan Beulich
2017-05-08 13:36 ` Wei Liu
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.