*  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;
                             },
                 },
            
---- -------    /*
---- -------     * 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
                 */
 
                        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);
            
            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;