From: Len Brown Date: Mon, 15 Mar 2010 01:30:17 +0000 (-0400) Subject: Merge branches 'battery-2.6.34', 'bugzilla-10805', 'bugzilla-14668', 'bugzilla-531916... X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=ec28dcc6b4c00b78ad269ad5b85ebd5c2d504825;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git Merge branches 'battery-2.6.34', 'bugzilla-10805', 'bugzilla-14668', 'bugzilla-531916-power-state', 'ht-warn-2.6.34', 'pnp', 'processor-rename', 'sony-2.6.34', 'suse-bugzilla-531547', 'tz-check', 'video' and 'misc-2.6.34' into release --- ec28dcc6b4c00b78ad269ad5b85ebd5c2d504825 diff --cc arch/x86/kernel/acpi/boot.c index fb1035cd9a6a,af1c5833ff23,af1c5833ff23,fb1035cd9a6a,7914ab0ad76e,a54d714545ff,d635a93ae59c,fb1035cd9a6a,af1c5833ff23,af1c5833ff23,af1c5833ff23,0acbcdfa5ca4..0061ea263061 --- a/arch/x86/kernel/acpi/boot.c +++ b/arch/x86/kernel/acpi/boot.c @@@@@@@@@@@@@ -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 ++++ +++++ ++++ +++++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) { @@@@@@@@@@@@@ -539,7 -539,7 -539,7 -539,7 -567,8 -567,8 -568,10 -539,7 -539,7 -539,7 -539,7 -539,7 +568,10 @@@@@@@@@@@@@ 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 "), ---- ------- 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 */ diff --cc drivers/acpi/ec.c index fd1801bdee66,d6471bb6852f,19f93e114225,fd1801bdee66,d7a6bbbb834c,d7a6bbbb834c,d7a6bbbb834c,fd1801bdee66,d6471bb6852f,d6471bb6852f,d6471bb6852f,d6471bb6852f..1ac28c6a672e --- a/drivers/acpi/ec.c +++ b/drivers/acpi/ec.c @@@@@@@@@@@@@ -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; } + + + pr_debug(PREFIX "transaction start\n"); + + + /* disable GPE during transaction if storm is detected */ + + + if (test_bit(EC_FLAGS_GPE_STORM, &ec->flags)) { -- ---- acpi_disable_gpe(NULL, ec->gpe); ++++ +++++ /* ++++ +++++ * 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); + + + + + + /* 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 GPE outside of transaction */ -- ---- acpi_enable_gpe(NULL, ec->gpe); ++++ +++++ /* ++++ +++++ * 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;