]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
Merge branches 'release' and 'throttling-domains' into release
authorLen Brown <len.brown@intel.com>
Thu, 7 Feb 2008 08:30:48 +0000 (03:30 -0500)
committerLen Brown <len.brown@intel.com>
Thu, 7 Feb 2008 08:30:48 +0000 (03:30 -0500)
1  2 
drivers/acpi/processor_core.c
include/acpi/processor.h

index 315fd8f7e8a125e88053b8d3a2b61197a1464255,b3b5373427154570d7b5de720ecd2ef0c682444d..75ccf5d18bf4e3630e892dd0021a8c890a0fc0c2
@@@ -668,24 -668,6 +668,24 @@@ static int __cpuinit acpi_processor_sta
  
        acpi_processor_power_init(pr, device);
  
 +      pr->cdev = thermal_cooling_device_register("Processor", device,
 +                                              &processor_cooling_ops);
 +      if (pr->cdev)
 +              printk(KERN_INFO PREFIX
 +                      "%s is registered as cooling_device%d\n",
 +                      device->dev.bus_id, pr->cdev->id);
 +      else
 +              goto end;
 +
 +      result = sysfs_create_link(&device->dev.kobj, &pr->cdev->device.kobj,
 +                                      "thermal_cooling");
 +      if (result)
 +              return result;
 +      result = sysfs_create_link(&pr->cdev->device.kobj, &device->dev.kobj,
 +                                      "device");
 +      if (result)
 +              return result;
 +
        if (pr->flags.throttling) {
                printk(KERN_INFO PREFIX "%s [%s] (supports",
                       acpi_device_name(device), acpi_device_bid(device));
@@@ -809,11 -791,6 +809,11 @@@ static int acpi_processor_remove(struc
  
        acpi_processor_remove_fs(device);
  
 +      sysfs_remove_link(&device->dev.kobj, "thermal_cooling");
 +      sysfs_remove_link(&pr->cdev->device.kobj, "device");
 +      thermal_cooling_device_unregister(pr->cdev);
 +      pr->cdev = NULL;
 +
        processors[pr->id] = NULL;
  
        kfree(pr);
@@@ -835,18 -812,11 +835,18 @@@ static int is_processor_present(acpi_ha
  
  
        status = acpi_evaluate_integer(handle, "_STA", NULL, &sta);
 -      if (ACPI_FAILURE(status) || !(sta & ACPI_STA_DEVICE_PRESENT)) {
 -              ACPI_EXCEPTION((AE_INFO, status, "Processor Device is not present"));
 -              return 0;
 -      }
 -      return 1;
 +      /*
 +       * if a processor object does not have an _STA object,
 +       * OSPM assumes that the processor is present.
 +       */
 +      if (status == AE_NOT_FOUND)
 +              return 1;
 +
 +      if (ACPI_SUCCESS(status) && (sta & ACPI_STA_DEVICE_PRESENT))
 +              return 1;
 +
 +      ACPI_EXCEPTION((AE_INFO, status, "Processor Device is not present"));
 +      return 0;
  }
  
  static
@@@ -1091,6 -1061,8 +1091,8 @@@ static int __init acpi_processor_init(v
  
        acpi_processor_ppc_init();
  
+       acpi_processor_throttling_init();
        return 0;
  
  out_cpuidle:
diff --combined include/acpi/processor.h
index 0c75a0b9c565f3e82d0125734d92a36710b79f97,d90ad0d63c242954e230b3ee13cd3633649857be..cdc8004cfd12c73e7f0ffdc9ef2394779eefa536
@@@ -4,7 -4,7 +4,7 @@@
  #include <linux/kernel.h>
  #include <linux/cpu.h>
  #include <linux/cpuidle.h>
 -
 +#include <linux/thermal.h>
  #include <asm/acpi.h>
  
  #define ACPI_PROCESSOR_BUSY_METRIC    10
@@@ -34,7 -34,6 +34,7 @@@
  
  #define ACPI_CSTATE_SYSTEMIO  (0)
  #define ACPI_CSTATE_FFH               (1)
 +#define ACPI_CSTATE_HALT      (2)
  
  /* Power Management */
  
@@@ -65,7 -64,7 +65,7 @@@ struct acpi_processor_cx 
        u8 valid;
        u8 type;
        u32 address;
 -      u8 space_id;
 +      u8 entry_method;
        u8 index;
        u32 latency;
        u32 latency_ticks;
@@@ -177,13 -176,15 +177,15 @@@ struct acpi_processor_throttling 
        u32 address;
        u8 duty_offset;
        u8 duty_width;
+       u8 tsd_valid_flag;
+       unsigned int shared_type;
        struct acpi_processor_tx states[ACPI_PROCESSOR_MAX_THROTTLING];
  };
  
  /* Limit Interface */
  
  struct acpi_processor_lx {
 -      int px;                 /* performace state */
 +      int px;                 /* performance state */
        int tx;                 /* throttle level */
  };
  
@@@ -219,7 -220,7 +221,7 @@@ struct acpi_processor 
        struct acpi_processor_performance *performance;
        struct acpi_processor_throttling throttling;
        struct acpi_processor_limit limit;
 -
 +      struct thermal_cooling_device *cdev;
        /* the _PDC objects for this processor, if any */
        struct acpi_object_list *pdc;
  };
@@@ -317,7 -318,7 +319,7 @@@ static inline int acpi_processor_ppc_ha
  int acpi_processor_get_throttling_info(struct acpi_processor *pr);
  extern int acpi_processor_set_throttling(struct acpi_processor *pr, int state);
  extern struct file_operations acpi_processor_throttling_fops;
+ extern void acpi_processor_throttling_init(void);
  /* in processor_idle.c */
  int acpi_processor_power_init(struct acpi_processor *pr,
                              struct acpi_device *device);
@@@ -331,7 -332,7 +333,7 @@@ extern struct cpuidle_driver acpi_idle_
  /* in processor_thermal.c */
  int acpi_processor_get_limit_info(struct acpi_processor *pr);
  extern struct file_operations acpi_processor_limit_fops;
 -
 +extern struct thermal_cooling_device_ops processor_cooling_ops;
  #ifdef CONFIG_CPU_FREQ
  void acpi_thermal_cpufreq_init(void);
  void acpi_thermal_cpufreq_exit(void);