Merge branches 'battery-2.6.34', 'bugzilla-10805', 'bugzilla-14668', 'bugzilla-531916...
authorLen Brown <len.brown@intel.com>
Mon, 15 Mar 2010 01:30:17 +0000 (21:30 -0400)
committerLen Brown <len.brown@intel.com>
Mon, 15 Mar 2010 01:30:17 +0000 (21:30 -0400)
13 files changed:
1  2  3  4  5  6  7  8  9  10  11  12 
arch/x86/kernel/acpi/boot.c
drivers/acpi/acpica/exmutex.c
drivers/acpi/battery.c
drivers/acpi/bus.c
drivers/acpi/ec.c
drivers/acpi/internal.h
drivers/acpi/processor_throttling.c
drivers/acpi/sbs.c
drivers/acpi/sleep.c
drivers/acpi/thermal.c
drivers/acpi/utils.c
drivers/acpi/video.c
drivers/platform/x86/sony-laptop.c

index fb1035cd9a6a9763ddd20fece684228a1239a543,af1c5833ff23dd4d026f6a6a7e06df67af652068,af1c5833ff23dd4d026f6a6a7e06df67af652068,fb1035cd9a6a9763ddd20fece684228a1239a543,7914ab0ad76e452ab2c570dac2a37bfd6cdc4ac0,a54d714545ff826fba14badabf1af6401809b712,d635a93ae59c9d952e0e11c1a232c11c0abbd17e,fb1035cd9a6a9763ddd20fece684228a1239a543,af1c5833ff23dd4d026f6a6a7e06df67af652068,af1c5833ff23dd4d026f6a6a7e06df67af652068,af1c5833ff23dd4d026f6a6a7e06df67af652068,0acbcdfa5ca43d5533b8ec42939e7d05888e2cc4..0061ea2630615efe9e1f3af3fd8d851821c9f3b0
@@@@@@@@@@@@@ -481,6 -481,6 -481,6 -481,6 -490,25 -490,25 -490,26 -481,6 -481,6 -481,6 -481,6 -481,6 +490,26 @@@@@@@@@@@@@ int acpi_register_gsi(struct device *de
             *  ACPI based hotplug support for CPU
             */
            #ifdef CONFIG_ACPI_HOTPLUG_CPU
++++++ +++++#include <acpi/processor.h>
++++   +++++
++++   +++++static void acpi_map_cpu2node(acpi_handle handle, int cpu, int physid)
++++   +++++{
++++   +++++#ifdef CONFIG_ACPI_NUMA
++++   +++++    int nid;
++++   +++++
++++   +++++    nid = acpi_get_node(handle);
++++   +++++    if (nid == -1 || !node_online(nid))
++++   +++++            return;
++++   +++++#ifdef CONFIG_X86_64
++++   +++++    apicid_to_node[physid] = nid;
++++   +++++    numa_set_node(cpu, nid);
++++   +++++#else /* CONFIG_X86_32 */
++++   +++++    apicid_2_node[physid] = nid;
++++   +++++    cpu_to_node_map[cpu] = nid;
++++   +++++#endif
++++   +++++
++++   +++++#endif
++++   +++++}
            
            static int __cpuinit _acpi_map_lsapic(acpi_handle handle, int *pcpu)
            {
                        goto free_new_map;
                }
            
++++++ +++++    acpi_processor_set_pdc(handle);
++++++ +++++
                cpu = cpumask_first(new_map);
++++   +++++    acpi_map_cpu2node(handle, cpu, physid);
            
                *pcpu = cpu;
                retval = 0;
@@@@@@@@@@@@@ -1320,90 -1315,82 -1315,82 -1320,90 -1327,6 -1344,82 -1347,82 -1320,90 -1315,82 -1315,82 -1315,82 -1315,90 +1330,6 @@@@@@@@@@@@@ static struct dmi_system_id __initdata 
                             },
                 },
            
---- -------    /*
---- -------     * Boxes that need acpi=ht
---- -------     */
---- -------    {
---- -------     .callback = force_acpi_ht,
---- -------     .ident = "FSC Primergy T850",
---- -------     .matches = {
---- -------                 DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU SIEMENS"),
---- -------                 DMI_MATCH(DMI_PRODUCT_NAME, "PRIMERGY T850"),
---- -------                 },
---- -------     },
---- -------    {
---- -------     .callback = force_acpi_ht,
---- -------     .ident = "HP VISUALIZE NT Workstation",
---- -------     .matches = {
---- -------                 DMI_MATCH(DMI_BOARD_VENDOR, "Hewlett-Packard"),
---- -------                 DMI_MATCH(DMI_PRODUCT_NAME, "HP VISUALIZE NT Workstation"),
---- -------                 },
---- -------     },
---- -------    {
---- -------     .callback = force_acpi_ht,
---- -------     .ident = "Compaq Workstation W8000",
---- -------     .matches = {
---- -------                 DMI_MATCH(DMI_SYS_VENDOR, "Compaq"),
---- -------                 DMI_MATCH(DMI_PRODUCT_NAME, "Workstation W8000"),
-  -   -   -                 },
-  -   -   -     },
-  -   -   -    {
-  -   -   -     .callback = force_acpi_ht,
-  -   -   -     .ident = "ASUS P2B-DS",
-  -   -   -     .matches = {
-  -   -   -                 DMI_MATCH(DMI_BOARD_VENDOR, "ASUSTeK Computer INC."),
-  -   -   -                 DMI_MATCH(DMI_BOARD_NAME, "P2B-DS"),
---- -------                 },
---- -------     },
---- -------    {
---- -------     .callback = force_acpi_ht,
---- -------     .ident = "ASUS CUR-DLS",
---- -------     .matches = {
---- -------                 DMI_MATCH(DMI_BOARD_VENDOR, "ASUSTeK Computer INC."),
---- -------                 DMI_MATCH(DMI_BOARD_NAME, "CUR-DLS"),
---- -------                 },
---- -------     },
---- -------    {
---- -------     .callback = force_acpi_ht,
---- -------     .ident = "ABIT i440BX-W83977",
---- -------     .matches = {
---- -------                 DMI_MATCH(DMI_BOARD_VENDOR, "ABIT <http://www.abit.com>"),
---- -------                 DMI_MATCH(DMI_BOARD_NAME, "i440BX-W83977 (BP6)"),
---- -------                 },
---- -------     },
---- -------    {
---- -------     .callback = force_acpi_ht,
---- -------     .ident = "IBM Bladecenter",
---- -------     .matches = {
---- -------                 DMI_MATCH(DMI_BOARD_VENDOR, "IBM"),
---- -------                 DMI_MATCH(DMI_BOARD_NAME, "IBM eServer BladeCenter HS20"),
---- -------                 },
---- -------     },
---- -------    {
---- -------     .callback = force_acpi_ht,
---- -------     .ident = "IBM eServer xSeries 360",
---- -------     .matches = {
---- -------                 DMI_MATCH(DMI_BOARD_VENDOR, "IBM"),
---- -------                 DMI_MATCH(DMI_BOARD_NAME, "eServer xSeries 360"),
---- -------                 },
---- -------     },
---- -------    {
---- -------     .callback = force_acpi_ht,
---- -------     .ident = "IBM eserver xSeries 330",
---- -------     .matches = {
---- -------                 DMI_MATCH(DMI_BOARD_VENDOR, "IBM"),
---- -------                 DMI_MATCH(DMI_BOARD_NAME, "eserver xSeries 330"),
---- -------                 },
---- -------     },
---- -------    {
---- -------     .callback = force_acpi_ht,
---- -------     .ident = "IBM eserver xSeries 440",
---- -------     .matches = {
---- -------                 DMI_MATCH(DMI_BOARD_VENDOR, "IBM"),
---- -------                 DMI_MATCH(DMI_PRODUCT_NAME, "eserver xSeries 440"),
---- -------                 },
---- -------     },
---- -------
                /*
                 * Boxes that need ACPI PCI IRQ routing disabled
                 */
Simple merge
Simple merge
Simple merge
index fd1801bdee66de41bffe16aec7afc07f4db171d5,d6471bb6852fb58802a5c9153dcb63fb2c642429,19f93e114225f7cca2d712a532fc2f8286625f45,fd1801bdee66de41bffe16aec7afc07f4db171d5,d7a6bbbb834cb6d266682183c0ccf46436ca7008,d7a6bbbb834cb6d266682183c0ccf46436ca7008,d7a6bbbb834cb6d266682183c0ccf46436ca7008,fd1801bdee66de41bffe16aec7afc07f4db171d5,d6471bb6852fb58802a5c9153dcb63fb2c642429,d6471bb6852fb58802a5c9153dcb63fb2c642429,d6471bb6852fb58802a5c9153dcb63fb2c642429,d6471bb6852fb58802a5c9153dcb63fb2c642429..1ac28c6a672ea3667331772f5535515d8b129e9d
@@@@@@@@@@@@@ -321,7 -304,26 -309,26 -321,7 -304,34 -304,34 -304,34 -321,7 -304,26 -304,26 -304,26 -304,26 +309,34 @@@@@@@@@@@@@ static int acpi_ec_transaction(struct a
                        status = -ETIME;
                        goto end;
                }
 --     ----            acpi_disable_gpe(NULL, ec->gpe);
+  +   +        pr_debug(PREFIX "transaction start\n");
+  +   +        /* disable GPE during transaction if storm is detected */
+  +   +        if (test_bit(EC_FLAGS_GPE_STORM, &ec->flags)) {
++++   +++++            /*
++++   +++++             * It has to be disabled at the hardware level regardless of the
++++   +++++             * GPE reference counting, so that it doesn't trigger.
++++   +++++             */
++++   +++++            acpi_set_gpe(NULL, ec->gpe, ACPI_GPE_DISABLE);
+  +   +        }
+  +   +    
                status = acpi_ec_transaction_unlocked(ec, t);
 --     ----            /* it is safe to enable GPE outside of transaction */
 --     ----            acpi_enable_gpe(NULL, ec->gpe);
+  +   +    
+  +   +        /* check if we received SCI during transaction */
+  +   +        ec_check_sci_sync(ec, acpi_ec_read_status(ec));
+  +   +        if (test_bit(EC_FLAGS_GPE_STORM, &ec->flags)) {
+  +   +                msleep(1);
++++   +++++            /*
++++   +++++             * It is safe to enable the GPE outside of the transaction.  Use
++++   +++++             * acpi_set_gpe() for that, since we used it to disable the GPE
++++   +++++             * above.
++++   +++++             */
++++   +++++            acpi_set_gpe(NULL, ec->gpe, ACPI_GPE_ENABLE);
+  +   +        } else if (t->irq_count > ACPI_EC_STORM_THRESHOLD) {
+  +   +                pr_info(PREFIX "GPE storm detected, "
+  +   +                        "transactions will use polling mode\n");
+  +   +                set_bit(EC_FLAGS_GPE_STORM, &ec->flags);
+  +   +        }
+  +   +        pr_debug(PREFIX "transaction end\n");
            end:
                if (ec->global_lock)
                        acpi_release_global_lock(glk);
@@@@@@@@@@@@@ -443,7 -445,7 -450,33 -443,7 -453,7 -453,7 -453,7 -443,7 -445,7 -445,7 -445,7 -445,7 +458,33 @@@@@@@@@@@@@ int ec_transaction(u8 command
            
            EXPORT_SYMBOL(ec_transaction);
            
-  -   -    static int acpi_ec_query(struct acpi_ec *ec, u8 * data)
++ +++++++++void acpi_ec_suspend_transactions(void)
++ +++++++++{
++ +++++++++    struct acpi_ec *ec = first_ec;
++ +++++++++
++ +++++++++    if (!ec)
++ +++++++++            return;
++ +++++++++
++ +++++++++    mutex_lock(&ec->lock);
++ +++++++++    /* Prevent transactions from being carried out */
++ +++++++++    set_bit(EC_FLAGS_FROZEN, &ec->flags);
++ +++++++++    mutex_unlock(&ec->lock);
++ +++++++++}
++ +++++++++
++ +++++++++void acpi_ec_resume_transactions(void)
++ +++++++++{
++ +++++++++    struct acpi_ec *ec = first_ec;
++ +++++++++
++ +++++++++    if (!ec)
++ +++++++++            return;
++ +++++++++
++ +++++++++    mutex_lock(&ec->lock);
++ +++++++++    /* Allow transactions to be carried out again */
++ +++++++++    clear_bit(EC_FLAGS_FROZEN, &ec->flags);
++ +++++++++    mutex_unlock(&ec->lock);
++ +++++++++}
++ +++++++++
+  +   +    static int acpi_ec_query_unlocked(struct acpi_ec *ec, u8 * data)
            {
                int result;
                u8 d;
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge