ACPI: Disable ARB_DISABLE on platforms where it is not needed

Previous thread: ACPI: Rename ACPI processor device bus ID by Linux Kernel Mailing List on Wednesday, June 24, 2009 - 12:00 pm. (1 message)

Next thread: ACPI: use LNXCPU, not ACPI_CPU, for Linux-specific processor _HID by Linux Kernel Mailing List on Wednesday, June 24, 2009 - 12:00 pm. (1 message)
From: Linux Kernel Mailing List
Date: Wednesday, June 24, 2009 - 12:00 pm

Gitweb:     http://git.kernel.org/linus/ee1ca48fae7e575d5e399d4fdcfe0afc1212a64c
Commit:     ee1ca48fae7e575d5e399d4fdcfe0afc1212a64c
Parent:     cd86a536c81e9300d984327517548ca0652eebf9
Author:     Pallipadi, Venkatesh <venkatesh.pallipadi@intel.com>
AuthorDate: Thu May 21 17:09:10 2009 -0700
Committer:  Len Brown <len.brown@intel.com>
CommitDate: Wed May 27 21:57:30 2009 -0400

    ACPI: Disable ARB_DISABLE on platforms where it is not needed
    
    ARB_DISABLE is a NOP on all of the recent Intel platforms.
    
    For such platforms, reduce contention on c3_lock
    by skipping the fake ARB_DISABLE.
    
    Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
    Signed-off-by: Len Brown <len.brown@intel.com>
---
 arch/x86/kernel/acpi/cstate.c |   16 +++++++++++++---
 drivers/acpi/processor_idle.c |    7 +++++--
 2 files changed, 18 insertions(+), 5 deletions(-)

diff --git a/arch/x86/kernel/acpi/cstate.c b/arch/x86/kernel/acpi/cstate.c
index bbbe4bb..8c44c23 100644
--- a/arch/x86/kernel/acpi/cstate.c
+++ b/arch/x86/kernel/acpi/cstate.c
@@ -34,12 +34,22 @@ void acpi_processor_power_init_bm_check(struct acpi_processor_flags *flags,
 		flags->bm_check = 1;
 	else if (c->x86_vendor == X86_VENDOR_INTEL) {
 		/*
-		 * Today all CPUs that support C3 share cache.
-		 * TBD: This needs to look at cache shared map, once
-		 * multi-core detection patch makes to the base.
+		 * Today all MP CPUs that support C3 share cache.
+		 * And caches should not be flushed by software while
+		 * entering C3 type state.
 		 */
 		flags->bm_check = 1;
 	}
+
+	/*
+	 * On all recent Intel platforms, ARB_DISABLE is a nop.
+	 * So, set bm_control to zero to indicate that ARB_DISABLE
+	 * is not required while entering C3 type state on
+	 * P4, Core and beyond CPUs
+	 */
+	if (c->x86_vendor == X86_VENDOR_INTEL &&
+	    (c->x86 > 0x6 || (c->x86 == 6 && c->x86_model >= 14)))
+			flags->bm_control = 0;
 }
 EXPORT_SYMBOL(acpi_processor_power_init_bm_check);
 
diff ...
Previous thread: ACPI: Rename ACPI processor device bus ID by Linux Kernel Mailing List on Wednesday, June 24, 2009 - 12:00 pm. (1 message)

Next thread: ACPI: use LNXCPU, not ACPI_CPU, for Linux-specific processor _HID by Linux Kernel Mailing List on Wednesday, June 24, 2009 - 12:00 pm. (1 message)