]> bbs.cooldavid.org Git - net-next-2.6.git/commitdiff
Merge branch 'misc-2.6.33' into release
authorLen Brown <len.brown@intel.com>
Wed, 16 Dec 2009 19:22:32 +0000 (14:22 -0500)
committerLen Brown <len.brown@intel.com>
Wed, 16 Dec 2009 19:22:32 +0000 (14:22 -0500)
1  2 
drivers/acpi/numa.c
drivers/acpi/processor_core.c
drivers/platform/x86/acerhdf.c
drivers/thermal/thermal_sys.c
include/linux/acpi.h

diff --combined drivers/acpi/numa.c
index 2be2fb66204e53c18e63d30c9581dea4a9d71ade,90f1884e8a515016bf11691f9a98cc79f3102e1c..7ad48dfc12dbc838ab82275517e5521463c4319b
@@@ -28,6 -28,7 +28,7 @@@
  #include <linux/types.h>
  #include <linux/errno.h>
  #include <linux/acpi.h>
+ #include <linux/numa.h>
  #include <acpi/acpi_bus.h>
  
  #define PREFIX "ACPI: "
@@@ -40,14 -41,14 +41,14 @@@ static nodemask_t nodes_found_map = NOD
  
  /* maps to convert between proximity domain and logical node ID */
  static int pxm_to_node_map[MAX_PXM_DOMAINS]
-                               = { [0 ... MAX_PXM_DOMAINS - 1] = NID_INVAL };
+                       = { [0 ... MAX_PXM_DOMAINS - 1] = NUMA_NO_NODE };
  static int node_to_pxm_map[MAX_NUMNODES]
-                               = { [0 ... MAX_NUMNODES - 1] = PXM_INVAL };
+                       = { [0 ... MAX_NUMNODES - 1] = PXM_INVAL };
  
  int pxm_to_node(int pxm)
  {
        if (pxm < 0)
-               return NID_INVAL;
+               return NUMA_NO_NODE;
        return pxm_to_node_map[pxm];
  }
  
@@@ -68,9 -69,9 +69,9 @@@ int acpi_map_pxm_to_node(int pxm
  {
        int node = pxm_to_node_map[pxm];
  
-       if (node < 0){
+       if (node < 0) {
                if (nodes_weight(nodes_found_map) >= MAX_NUMNODES)
-                       return NID_INVAL;
+                       return NUMA_NO_NODE;
                node = first_unset_node(nodes_found_map);
                __acpi_map_pxm_to_node(pxm, node);
                node_set(node, nodes_found_map);
        return node;
  }
  
- #if 0
- void __cpuinit acpi_unmap_pxm_to_node(int node)
- {
-       int pxm = node_to_pxm_map[node];
-       pxm_to_node_map[pxm] = NID_INVAL;
-       node_to_pxm_map[node] = PXM_INVAL;
-       node_clear(node, nodes_found_map);
- }
- #endif  /*  0  */
  static void __init
  acpi_table_print_srat_entry(struct acpi_subtable_header *header)
  {
@@@ -283,24 -274,22 +274,24 @@@ acpi_table_parse_srat(enum acpi_srat_ty
  
  int __init acpi_numa_init(void)
  {
 +      int ret = 0;
 +
        /* SRAT: Static Resource Affinity Table */
        if (!acpi_table_parse(ACPI_SIG_SRAT, acpi_parse_srat)) {
                acpi_table_parse_srat(ACPI_SRAT_TYPE_X2APIC_CPU_AFFINITY,
                                      acpi_parse_x2apic_affinity, NR_CPUS);
                acpi_table_parse_srat(ACPI_SRAT_TYPE_CPU_AFFINITY,
                                      acpi_parse_processor_affinity, NR_CPUS);
 -              acpi_table_parse_srat(ACPI_SRAT_TYPE_MEMORY_AFFINITY,
 -                                    acpi_parse_memory_affinity,
 -                                    NR_NODE_MEMBLKS);
 +              ret = acpi_table_parse_srat(ACPI_SRAT_TYPE_MEMORY_AFFINITY,
 +                                          acpi_parse_memory_affinity,
 +                                          NR_NODE_MEMBLKS);
        }
  
        /* SLIT: System Locality Information Table */
        acpi_table_parse(ACPI_SIG_SLIT, acpi_parse_slit);
  
        acpi_numa_arch_fixup();
 -      return 0;
 +      return ret;
  }
  
  int acpi_get_pxm(acpi_handle h)
index 65b9f29ef10b2e66aefb14bec35f642630c226cc,709b590c2fb6409c6ce4f39615edc6d8bedd25c1..41731236f9a1a7eb7a2fd06790899fc256cc8dd4
@@@ -353,7 -353,7 +353,7 @@@ static int acpi_processor_info_open_fs(
                           PDE(inode)->data);
  }
  
- static int acpi_processor_add_fs(struct acpi_device *device)
+ static int __cpuinit acpi_processor_add_fs(struct acpi_device *device)
  {
        struct proc_dir_entry *entry = NULL;
  
@@@ -722,7 -722,7 +722,7 @@@ static void acpi_processor_notify(struc
        switch (event) {
        case ACPI_PROCESSOR_NOTIFY_PERFORMANCE:
                saved = pr->performance_platform_limit;
 -              acpi_processor_ppc_has_changed(pr);
 +              acpi_processor_ppc_has_changed(pr, 1);
                if (saved == pr->performance_platform_limit)
                        break;
                acpi_bus_generate_proc_event(device, event,
@@@ -758,7 -758,7 +758,7 @@@ static int acpi_cpu_soft_notify(struct 
        struct acpi_processor *pr = per_cpu(processors, cpu);
  
        if (action == CPU_ONLINE && pr) {
 -              acpi_processor_ppc_has_changed(pr);
 +              acpi_processor_ppc_has_changed(pr, 0);
                acpi_processor_cst_has_changed(pr);
                acpi_processor_tstate_has_changed(pr);
        }
@@@ -830,7 -830,7 +830,7 @@@ static int __cpuinit acpi_processor_add
        arch_acpi_processor_cleanup_pdc(pr);
  
  #ifdef CONFIG_CPU_FREQ
 -      acpi_processor_ppc_has_changed(pr);
 +      acpi_processor_ppc_has_changed(pr, 0);
  #endif
        acpi_processor_get_throttling_info(pr);
        acpi_processor_get_limit_info(pr);
                goto err_power_exit;
        }
  
-       dev_info(&device->dev, "registered as cooling_device%d\n",
+       dev_dbg(&device->dev, "registered as cooling_device%d\n",
                 pr->cdev->id);
  
        result = sysfs_create_link(&device->dev.kobj,
@@@ -1102,7 -1102,7 +1102,7 @@@ void acpi_processor_install_hotplug_not
        acpi_walk_namespace(ACPI_TYPE_PROCESSOR,
                            ACPI_ROOT_OBJECT,
                            ACPI_UINT32_MAX,
 -                          processor_walk_namespace_cb, &action, NULL);
 +                          processor_walk_namespace_cb, NULL, &action, NULL);
  #endif
        register_hotcpu_notifier(&acpi_cpu_notifier);
  }
@@@ -1115,7 -1115,7 +1115,7 @@@ void acpi_processor_uninstall_hotplug_n
        acpi_walk_namespace(ACPI_TYPE_PROCESSOR,
                            ACPI_ROOT_OBJECT,
                            ACPI_UINT32_MAX,
 -                          processor_walk_namespace_cb, &action, NULL);
 +                          processor_walk_namespace_cb, NULL, &action, NULL);
  #endif
        unregister_hotcpu_notifier(&acpi_cpu_notifier);
  }
index be27aa47e8101f0d55c77d3b9ff8b3d9c4a788fa,d8b4229108b8f3accd5ed91050dc4ae10710780b..79b15b9d9cf04bb6232cc5f18da215503b9803d0
@@@ -52,7 -52,7 +52,7 @@@
   */
  #undef START_IN_KERNEL_MODE
  
- #define DRV_VER "0.5.18"
+ #define DRV_VER "0.5.20"
  
  /*
   * According to the Atom N270 datasheet,
@@@ -112,12 -112,14 +112,14 @@@ module_param_string(force_product, forc
  MODULE_PARM_DESC(force_product, "Force BIOS product and omit BIOS check");
  
  /*
-  * cmd_off: to switch the fan completely off / to check if the fan is off
+  * cmd_off: to switch the fan completely off
+  * chk_off: to check if the fan is off
   *    cmd_auto: to set the BIOS in control of the fan. The BIOS regulates then
   *            the fan speed depending on the temperature
   */
  struct fancmd {
        u8 cmd_off;
+       u8 chk_off;
        u8 cmd_auto;
  };
  
@@@ -134,32 -136,41 +136,41 @@@ struct bios_settings_t 
  /* Register addresses and values for different BIOS versions */
  static const struct bios_settings_t bios_tbl[] = {
        /* AOA110 */
-       {"Acer", "AOA110", "v0.3109", 0x55, 0x58, {0x1f, 0x00} },
-       {"Acer", "AOA110", "v0.3114", 0x55, 0x58, {0x1f, 0x00} },
-       {"Acer", "AOA110", "v0.3301", 0x55, 0x58, {0xaf, 0x00} },
-       {"Acer", "AOA110", "v0.3304", 0x55, 0x58, {0xaf, 0x00} },
-       {"Acer", "AOA110", "v0.3305", 0x55, 0x58, {0xaf, 0x00} },
-       {"Acer", "AOA110", "v0.3307", 0x55, 0x58, {0xaf, 0x00} },
-       {"Acer", "AOA110", "v0.3308", 0x55, 0x58, {0x21, 0x00} },
-       {"Acer", "AOA110", "v0.3309", 0x55, 0x58, {0x21, 0x00} },
-       {"Acer", "AOA110", "v0.3310", 0x55, 0x58, {0x21, 0x00} },
+       {"Acer", "AOA110", "v0.3109", 0x55, 0x58, {0x1f, 0x1f, 0x00} },
+       {"Acer", "AOA110", "v0.3114", 0x55, 0x58, {0x1f, 0x1f, 0x00} },
+       {"Acer", "AOA110", "v0.3301", 0x55, 0x58, {0xaf, 0xaf, 0x00} },
+       {"Acer", "AOA110", "v0.3304", 0x55, 0x58, {0xaf, 0xaf, 0x00} },
+       {"Acer", "AOA110", "v0.3305", 0x55, 0x58, {0xaf, 0xaf, 0x00} },
+       {"Acer", "AOA110", "v0.3307", 0x55, 0x58, {0xaf, 0xaf, 0x00} },
+       {"Acer", "AOA110", "v0.3308", 0x55, 0x58, {0x21, 0x21, 0x00} },
+       {"Acer", "AOA110", "v0.3309", 0x55, 0x58, {0x21, 0x21, 0x00} },
+       {"Acer", "AOA110", "v0.3310", 0x55, 0x58, {0x21, 0x21, 0x00} },
        /* AOA150 */
-       {"Acer", "AOA150", "v0.3114", 0x55, 0x58, {0x20, 0x00} },
-       {"Acer", "AOA150", "v0.3301", 0x55, 0x58, {0x20, 0x00} },
-       {"Acer", "AOA150", "v0.3304", 0x55, 0x58, {0x20, 0x00} },
-       {"Acer", "AOA150", "v0.3305", 0x55, 0x58, {0x20, 0x00} },
-       {"Acer", "AOA150", "v0.3307", 0x55, 0x58, {0x20, 0x00} },
-       {"Acer", "AOA150", "v0.3308", 0x55, 0x58, {0x20, 0x00} },
-       {"Acer", "AOA150", "v0.3309", 0x55, 0x58, {0x20, 0x00} },
-       {"Acer", "AOA150", "v0.3310", 0x55, 0x58, {0x20, 0x00} },
+       {"Acer", "AOA150", "v0.3114", 0x55, 0x58, {0x20, 0x20, 0x00} },
+       {"Acer", "AOA150", "v0.3301", 0x55, 0x58, {0x20, 0x20, 0x00} },
+       {"Acer", "AOA150", "v0.3304", 0x55, 0x58, {0x20, 0x20, 0x00} },
+       {"Acer", "AOA150", "v0.3305", 0x55, 0x58, {0x20, 0x20, 0x00} },
+       {"Acer", "AOA150", "v0.3307", 0x55, 0x58, {0x20, 0x20, 0x00} },
+       {"Acer", "AOA150", "v0.3308", 0x55, 0x58, {0x20, 0x20, 0x00} },
+       {"Acer", "AOA150", "v0.3309", 0x55, 0x58, {0x20, 0x20, 0x00} },
+       {"Acer", "AOA150", "v0.3310", 0x55, 0x58, {0x20, 0x20, 0x00} },
+       /* Acer 1410 */
+       {"Acer", "Aspire 1410", "v0.3120", 0x55, 0x58, {0x9e, 0x9e, 0x00} },
        /* special BIOS / other */
-       {"Gateway", "AOA110", "v0.3103", 0x55, 0x58, {0x21, 0x00} },
-       {"Gateway", "AOA150", "v0.3103", 0x55, 0x58, {0x20, 0x00} },
-       {"Packard Bell", "DOA150", "v0.3104", 0x55, 0x58, {0x21, 0x00} },
-       {"Packard Bell", "AOA110", "v0.3105", 0x55, 0x58, {0x21, 0x00} },
-       {"Packard Bell", "AOA150", "v0.3105", 0x55, 0x58, {0x20, 0x00} },
+       {"Gateway", "AOA110", "v0.3103", 0x55, 0x58, {0x21, 0x21, 0x00} },
+       {"Gateway", "AOA150", "v0.3103", 0x55, 0x58, {0x20, 0x20, 0x00} },
+       {"Gateway         ", "LT31            ", "v1.3103 ", 0x55, 0x58,
+               {0x10, 0x0f, 0x00} },
+       {"Gateway         ", "LT31            ", "v1.3201 ", 0x55, 0x58,
+               {0x10, 0x0f, 0x00} },
+       {"Gateway         ", "LT31            ", "v1.3302 ", 0x55, 0x58,
+               {0x10, 0x0f, 0x00} },
+       {"Packard Bell", "DOA150", "v0.3104", 0x55, 0x58, {0x21, 0x21, 0x00} },
+       {"Packard Bell", "DOA150", "v0.3105", 0x55, 0x58, {0x20, 0x20, 0x00} },
+       {"Packard Bell", "AOA110", "v0.3105", 0x55, 0x58, {0x21, 0x21, 0x00} },
+       {"Packard Bell", "AOA150", "v0.3105", 0x55, 0x58, {0x20, 0x20, 0x00} },
        /* pewpew-terminator */
-       {"", "", "", 0, 0, {0, 0} }
+       {"", "", "", 0, 0, {0, 0, 0} }
  };
  
  static const struct bios_settings_t *bios_cfg __read_mostly;
@@@ -183,7 -194,7 +194,7 @@@ static int acerhdf_get_fanstate(int *st
        if (ec_read(bios_cfg->fanreg, &fan))
                return -EINVAL;
  
-       if (fan != bios_cfg->cmd.cmd_off)
+       if (fan != bios_cfg->cmd.chk_off)
                *state = ACERHDF_FAN_AUTO;
        else
                *state = ACERHDF_FAN_OFF;
@@@ -460,7 -471,7 +471,7 @@@ static int acerhdf_remove(struct platfo
        return 0;
  }
  
 -static struct dev_pm_ops acerhdf_pm_ops = {
 +static const struct dev_pm_ops acerhdf_pm_ops = {
        .suspend = acerhdf_suspend,
        .freeze  = acerhdf_suspend,
  };
index 3bc72ea57e094d5ad5a3bdae349191051331394a,800e0c56cc837f8d44fc150949a05134288b5d50..5066de5cfc0c5b3f2b9bc7709e09a1bb801b8bbc
@@@ -225,12 -225,6 +225,12 @@@ passive_store(struct device *dev, struc
        if (!sscanf(buf, "%d\n", &state))
                return -EINVAL;
  
 +      /* sanity check: values below 1000 millicelcius don't make sense
 +       * and can cause the system to go into a thermal heart attack
 +       */
 +      if (state && state < 1000)
 +              return -EINVAL;
 +
        if (state && !tz->forced_passive) {
                mutex_lock(&thermal_list_lock);
                list_for_each_entry(cdev, &thermal_cdev_list, node) {
                                                                 cdev);
                }
                mutex_unlock(&thermal_list_lock);
 +              if (!tz->passive_delay)
 +                      tz->passive_delay = 1000;
        } else if (!state && tz->forced_passive) {
                mutex_lock(&thermal_list_lock);
                list_for_each_entry(cdev, &thermal_cdev_list, node) {
                                                                   cdev);
                }
                mutex_unlock(&thermal_list_lock);
 +              tz->passive_delay = 0;
        }
  
        tz->tc1 = 1;
        tz->tc2 = 1;
  
 -      if (!tz->passive_delay)
 -              tz->passive_delay = 1000;
 -
 -      if (!tz->polling_delay)
 -              tz->polling_delay = 10000;
 -
        tz->forced_passive = state;
  
        thermal_zone_device_update(tz);
@@@ -377,7 -374,7 +377,7 @@@ thermal_cooling_device_cur_state_store(
        if (!sscanf(buf, "%ld\n", &state))
                return -EINVAL;
  
-       if (state < 0)
+       if ((long)state < 0)
                return -EINVAL;
  
        result = cdev->ops->set_cur_state(cdev, state);
@@@ -1019,8 -1016,6 +1019,8 @@@ void thermal_zone_device_update(struct 
                thermal_zone_device_set_polling(tz, tz->passive_delay);
        else if (tz->polling_delay)
                thermal_zone_device_set_polling(tz, tz->polling_delay);
 +      else
 +              thermal_zone_device_set_polling(tz, 0);
        mutex_unlock(&tz->lock);
  }
  EXPORT_SYMBOL(thermal_zone_device_update);
diff --combined include/linux/acpi.h
index e11090d462d2b4febd5aa7af44f25be2a2fa8bb1,c920d2def4d3902395ae60cc88a268654b386e88..ce945d4845fcc158c3e493a7d64c986cad7e1072
@@@ -240,7 -240,7 +240,7 @@@ extern int pnpacpi_disabled
  #define PXM_INVAL     (-1)
  #define NID_INVAL     (-1)
  
- int acpi_check_resource_conflict(struct resource *res);
+ int acpi_check_resource_conflict(const struct resource *res);
  
  int acpi_check_region(resource_size_t start, resource_size_t n,
                      const char *name);
@@@ -253,16 -253,10 +253,16 @@@ void __init acpi_old_suspend_ordering(v
  void __init acpi_s4_no_nvs(void);
  #endif /* CONFIG_PM_SLEEP */
  
 +struct acpi_osc_context {
 +      char *uuid_str; /* uuid string */
 +      int rev;
 +      struct acpi_buffer cap; /* arg2/arg3 */
 +      struct acpi_buffer ret; /* free by caller if success */
 +};
 +
  #define OSC_QUERY_TYPE                        0
  #define OSC_SUPPORT_TYPE              1
  #define OSC_CONTROL_TYPE              2
 -#define OSC_SUPPORT_MASKS             0x1f
  
  /* _OSC DW0 Definition */
  #define OSC_QUERY_ENABLE              1
  #define OSC_INVALID_REVISION_ERROR    8
  #define OSC_CAPABILITIES_MASK_ERROR   16
  
 +acpi_status acpi_run_osc(acpi_handle handle, struct acpi_osc_context *context);
 +
 +/* platform-wide _OSC bits */
 +#define OSC_SB_PAD_SUPPORT            1
 +#define OSC_SB_PPC_OST_SUPPORT                2
 +#define OSC_SB_PR3_SUPPORT            4
 +#define OSC_SB_CPUHP_OST_SUPPORT      8
 +#define OSC_SB_APEI_SUPPORT           16
 +
 +/* PCI defined _OSC bits */
  /* _OSC DW1 Definition (OS Support Fields) */
  #define OSC_EXT_PCI_CONFIG_SUPPORT            1
  #define OSC_ACTIVE_STATE_PWR_SUPPORT          2
  #define OSC_CLOCK_PWR_CAPABILITY_SUPPORT      4
  #define OSC_PCI_SEGMENT_GROUPS_SUPPORT                8
  #define OSC_MSI_SUPPORT                               16
 +#define OSC_PCI_SUPPORT_MASKS                 0x1f
  
  /* _OSC DW1 Definition (OS Control Fields) */
  #define OSC_PCI_EXPRESS_NATIVE_HP_CONTROL     1
  #define OSC_PCI_EXPRESS_AER_CONTROL           8
  #define OSC_PCI_EXPRESS_CAP_STRUCTURE_CONTROL 16
  
 -#define OSC_CONTROL_MASKS     (OSC_PCI_EXPRESS_NATIVE_HP_CONTROL |    \
 +#define OSC_PCI_CONTROL_MASKS         (OSC_PCI_EXPRESS_NATIVE_HP_CONTROL |    \
                                OSC_SHPC_NATIVE_HP_CONTROL |            \
                                OSC_PCI_EXPRESS_PME_CONTROL |           \
                                OSC_PCI_EXPRESS_AER_CONTROL |           \