diff options
author | Glenn Elliott <gelliott@cs.unc.edu> | 2012-03-04 19:47:13 -0500 |
---|---|---|
committer | Glenn Elliott <gelliott@cs.unc.edu> | 2012-03-04 19:47:13 -0500 |
commit | c71c03bda1e86c9d5198c5d83f712e695c4f2a1e (patch) | |
tree | ecb166cb3e2b7e2adb3b5e292245fefd23381ac8 /drivers/acpi/acpi_pad.c | |
parent | ea53c912f8a86a8567697115b6a0d8152beee5c8 (diff) | |
parent | 6a00f206debf8a5c8899055726ad127dbeeed098 (diff) |
Merge branch 'mpi-master' into wip-k-fmlpwip-k-fmlp
Conflicts:
litmus/sched_cedf.c
Diffstat (limited to 'drivers/acpi/acpi_pad.c')
-rw-r--r-- | drivers/acpi/acpi_pad.c | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/drivers/acpi/acpi_pad.c b/drivers/acpi/acpi_pad.c index 6b115f6c4313..a43fa1a57d57 100644 --- a/drivers/acpi/acpi_pad.c +++ b/drivers/acpi/acpi_pad.c | |||
@@ -30,18 +30,13 @@ | |||
30 | #include <linux/slab.h> | 30 | #include <linux/slab.h> |
31 | #include <acpi/acpi_bus.h> | 31 | #include <acpi/acpi_bus.h> |
32 | #include <acpi/acpi_drivers.h> | 32 | #include <acpi/acpi_drivers.h> |
33 | #include <asm/mwait.h> | ||
33 | 34 | ||
34 | #define ACPI_PROCESSOR_AGGREGATOR_CLASS "acpi_pad" | 35 | #define ACPI_PROCESSOR_AGGREGATOR_CLASS "acpi_pad" |
35 | #define ACPI_PROCESSOR_AGGREGATOR_DEVICE_NAME "Processor Aggregator" | 36 | #define ACPI_PROCESSOR_AGGREGATOR_DEVICE_NAME "Processor Aggregator" |
36 | #define ACPI_PROCESSOR_AGGREGATOR_NOTIFY 0x80 | 37 | #define ACPI_PROCESSOR_AGGREGATOR_NOTIFY 0x80 |
37 | static DEFINE_MUTEX(isolated_cpus_lock); | 38 | static DEFINE_MUTEX(isolated_cpus_lock); |
38 | 39 | ||
39 | #define MWAIT_SUBSTATE_MASK (0xf) | ||
40 | #define MWAIT_CSTATE_MASK (0xf) | ||
41 | #define MWAIT_SUBSTATE_SIZE (4) | ||
42 | #define CPUID_MWAIT_LEAF (5) | ||
43 | #define CPUID5_ECX_EXTENSIONS_SUPPORTED (0x1) | ||
44 | #define CPUID5_ECX_INTERRUPT_BREAK (0x2) | ||
45 | static unsigned long power_saving_mwait_eax; | 40 | static unsigned long power_saving_mwait_eax; |
46 | 41 | ||
47 | static unsigned char tsc_detected_unstable; | 42 | static unsigned char tsc_detected_unstable; |
@@ -303,7 +298,7 @@ static ssize_t acpi_pad_rrtime_store(struct device *dev, | |||
303 | static ssize_t acpi_pad_rrtime_show(struct device *dev, | 298 | static ssize_t acpi_pad_rrtime_show(struct device *dev, |
304 | struct device_attribute *attr, char *buf) | 299 | struct device_attribute *attr, char *buf) |
305 | { | 300 | { |
306 | return scnprintf(buf, PAGE_SIZE, "%d", round_robin_time); | 301 | return scnprintf(buf, PAGE_SIZE, "%d\n", round_robin_time); |
307 | } | 302 | } |
308 | static DEVICE_ATTR(rrtime, S_IRUGO|S_IWUSR, | 303 | static DEVICE_ATTR(rrtime, S_IRUGO|S_IWUSR, |
309 | acpi_pad_rrtime_show, | 304 | acpi_pad_rrtime_show, |
@@ -326,7 +321,7 @@ static ssize_t acpi_pad_idlepct_store(struct device *dev, | |||
326 | static ssize_t acpi_pad_idlepct_show(struct device *dev, | 321 | static ssize_t acpi_pad_idlepct_show(struct device *dev, |
327 | struct device_attribute *attr, char *buf) | 322 | struct device_attribute *attr, char *buf) |
328 | { | 323 | { |
329 | return scnprintf(buf, PAGE_SIZE, "%d", idle_pct); | 324 | return scnprintf(buf, PAGE_SIZE, "%d\n", idle_pct); |
330 | } | 325 | } |
331 | static DEVICE_ATTR(idlepct, S_IRUGO|S_IWUSR, | 326 | static DEVICE_ATTR(idlepct, S_IRUGO|S_IWUSR, |
332 | acpi_pad_idlepct_show, | 327 | acpi_pad_idlepct_show, |
@@ -347,8 +342,11 @@ static ssize_t acpi_pad_idlecpus_store(struct device *dev, | |||
347 | static ssize_t acpi_pad_idlecpus_show(struct device *dev, | 342 | static ssize_t acpi_pad_idlecpus_show(struct device *dev, |
348 | struct device_attribute *attr, char *buf) | 343 | struct device_attribute *attr, char *buf) |
349 | { | 344 | { |
350 | return cpumask_scnprintf(buf, PAGE_SIZE, | 345 | int n = 0; |
351 | to_cpumask(pad_busy_cpus_bits)); | 346 | n = cpumask_scnprintf(buf, PAGE_SIZE-2, to_cpumask(pad_busy_cpus_bits)); |
347 | buf[n++] = '\n'; | ||
348 | buf[n] = '\0'; | ||
349 | return n; | ||
352 | } | 350 | } |
353 | static DEVICE_ATTR(idlecpus, S_IRUGO|S_IWUSR, | 351 | static DEVICE_ATTR(idlecpus, S_IRUGO|S_IWUSR, |
354 | acpi_pad_idlecpus_show, | 352 | acpi_pad_idlecpus_show, |
@@ -458,7 +456,7 @@ static void acpi_pad_notify(acpi_handle handle, u32 event, | |||
458 | dev_name(&device->dev), event, 0); | 456 | dev_name(&device->dev), event, 0); |
459 | break; | 457 | break; |
460 | default: | 458 | default: |
461 | printk(KERN_WARNING"Unsupported event [0x%x]\n", event); | 459 | printk(KERN_WARNING "Unsupported event [0x%x]\n", event); |
462 | break; | 460 | break; |
463 | } | 461 | } |
464 | } | 462 | } |