* [PATCH 1/1] x86: Use x2apic physical mode based on FADT setting
@ 2012-04-24 22:38 Greg Pearson
2012-04-24 22:53 ` Suresh Siddha
0 siblings, 1 reply; 2+ messages in thread
From: Greg Pearson @ 2012-04-24 22:38 UTC (permalink / raw)
To: Thomas Gleixner, Ingo Molnar, H. Peter Anvin, x86
Cc: Suresh Siddha, linux-kernel, Greg Pearson
Provide systems that do not support x2apic cluster mode
a mechanism to select x2apic physical mode using the
FADT FORCE_APIC_PHYSICAL_DESTINATION_MODE bit.
Signed-off-by: Greg Pearson <greg.pearson@hp.com>
---
arch/x86/kernel/apic/x2apic_phys.c | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/arch/x86/kernel/apic/x2apic_phys.c b/arch/x86/kernel/apic/x2apic_phys.c
index 8a778db..c372926 100644
--- a/arch/x86/kernel/apic/x2apic_phys.c
+++ b/arch/x86/kernel/apic/x2apic_phys.c
@@ -6,6 +6,10 @@
#include <linux/init.h>
#include <linux/dmar.h>
+#ifdef CONFIG_ACPI
+#include <linux/acpi.h>
+#endif
+
#include <asm/smp.h>
#include <asm/x2apic.h>
@@ -24,6 +28,14 @@ static int x2apic_acpi_madt_oem_check(char *oem_id, char *oem_table_id)
{
if (x2apic_phys)
return x2apic_enabled();
+#ifdef CONFIG_ACPI
+ else if ((acpi_gbl_FADT.header.revision >= FADT2_REVISION_ID) &&
+ (acpi_gbl_FADT.flags & ACPI_FADT_APIC_PHYSICAL) &&
+ x2apic_enabled()) {
+ printk(KERN_DEBUG "System requires x2apic physical mode\n");
+ return 1;
+ }
+#endif
else
return 0;
}
--
1.7.5.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH 1/1] x86: Use x2apic physical mode based on FADT setting
2012-04-24 22:38 [PATCH 1/1] x86: Use x2apic physical mode based on FADT setting Greg Pearson
@ 2012-04-24 22:53 ` Suresh Siddha
0 siblings, 0 replies; 2+ messages in thread
From: Suresh Siddha @ 2012-04-24 22:53 UTC (permalink / raw)
To: Greg Pearson
Cc: Thomas Gleixner, Ingo Molnar, H. Peter Anvin, x86, linux-kernel
On Tue, 2012-04-24 at 16:38 -0600, Greg Pearson wrote:
> Provide systems that do not support x2apic cluster mode
> a mechanism to select x2apic physical mode using the
> FADT FORCE_APIC_PHYSICAL_DESTINATION_MODE bit.
>
> Signed-off-by: Greg Pearson <greg.pearson@hp.com>
> ---
> arch/x86/kernel/apic/x2apic_phys.c | 12 ++++++++++++
> 1 files changed, 12 insertions(+), 0 deletions(-)
>
> diff --git a/arch/x86/kernel/apic/x2apic_phys.c b/arch/x86/kernel/apic/x2apic_phys.c
> index 8a778db..c372926 100644
> --- a/arch/x86/kernel/apic/x2apic_phys.c
> +++ b/arch/x86/kernel/apic/x2apic_phys.c
> @@ -6,6 +6,10 @@
> #include <linux/init.h>
> #include <linux/dmar.h>
>
> +#ifdef CONFIG_ACPI
> +#include <linux/acpi.h>
> +#endif
dmar.h already includes acpi.h
> +
> #include <asm/smp.h>
> #include <asm/x2apic.h>
>
> @@ -24,6 +28,14 @@ static int x2apic_acpi_madt_oem_check(char *oem_id, char *oem_table_id)
> {
> if (x2apic_phys)
> return x2apic_enabled();
> +#ifdef CONFIG_ACPI
> + else if ((acpi_gbl_FADT.header.revision >= FADT2_REVISION_ID) &&
> + (acpi_gbl_FADT.flags & ACPI_FADT_APIC_PHYSICAL) &&
> + x2apic_enabled()) {
> + printk(KERN_DEBUG "System requires x2apic physical mode\n");
> + return 1;
> + }
> +#endif
x2apic is already dependent on irq-remapping which depends on ACPI. So I
think you can do away with those ifdef CONFIG_ACPI.
Also, which system requires this? If you can include the information in
the changelog that will be great.
thanks,
suresh
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-04-24 22:50 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-24 22:38 [PATCH 1/1] x86: Use x2apic physical mode based on FADT setting Greg Pearson
2012-04-24 22:53 ` Suresh Siddha
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.