diff options
author | Paul Mackerras <paulus@samba.org> | 2007-05-07 23:37:51 -0400 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2007-05-07 23:37:51 -0400 |
commit | 02bbc0f09c90cefdb2837605c96a66c5ce4ba2e1 (patch) | |
tree | 04ef573cd4de095c500c9fc3477f4278c0b36300 /drivers/acpi | |
parent | 7487a2245b8841c77ba9db406cf99a483b9334e9 (diff) | |
parent | 5b94f675f57e4ff16c8fda09088d7480a84dcd91 (diff) |
Merge branch 'linux-2.6'
Diffstat (limited to 'drivers/acpi')
-rw-r--r-- | drivers/acpi/processor_idle.c | 4 | ||||
-rw-r--r-- | drivers/acpi/processor_perflib.c | 46 | ||||
-rw-r--r-- | drivers/acpi/sleep/proc.c | 2 |
3 files changed, 4 insertions, 48 deletions
diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c index ae0654cd11ea..ee5759bef945 100644 --- a/drivers/acpi/processor_idle.c +++ b/drivers/acpi/processor_idle.c | |||
@@ -475,7 +475,7 @@ static void acpi_processor_idle(void) | |||
475 | 475 | ||
476 | #ifdef CONFIG_GENERIC_TIME | 476 | #ifdef CONFIG_GENERIC_TIME |
477 | /* TSC halts in C2, so notify users */ | 477 | /* TSC halts in C2, so notify users */ |
478 | mark_tsc_unstable(); | 478 | mark_tsc_unstable("possible TSC halt in C2"); |
479 | #endif | 479 | #endif |
480 | /* Re-enable interrupts */ | 480 | /* Re-enable interrupts */ |
481 | local_irq_enable(); | 481 | local_irq_enable(); |
@@ -517,7 +517,7 @@ static void acpi_processor_idle(void) | |||
517 | 517 | ||
518 | #ifdef CONFIG_GENERIC_TIME | 518 | #ifdef CONFIG_GENERIC_TIME |
519 | /* TSC halts in C3, so notify users */ | 519 | /* TSC halts in C3, so notify users */ |
520 | mark_tsc_unstable(); | 520 | mark_tsc_unstable("TSC halts in C3"); |
521 | #endif | 521 | #endif |
522 | /* Re-enable interrupts */ | 522 | /* Re-enable interrupts */ |
523 | local_irq_enable(); | 523 | local_irq_enable(); |
diff --git a/drivers/acpi/processor_perflib.c b/drivers/acpi/processor_perflib.c index 2f2e7964226d..c4efc0c17f8f 100644 --- a/drivers/acpi/processor_perflib.c +++ b/drivers/acpi/processor_perflib.c | |||
@@ -433,49 +433,6 @@ static int acpi_processor_perf_open_fs(struct inode *inode, struct file *file) | |||
433 | PDE(inode)->data); | 433 | PDE(inode)->data); |
434 | } | 434 | } |
435 | 435 | ||
436 | static ssize_t | ||
437 | acpi_processor_write_performance(struct file *file, | ||
438 | const char __user * buffer, | ||
439 | size_t count, loff_t * data) | ||
440 | { | ||
441 | int result = 0; | ||
442 | struct seq_file *m = file->private_data; | ||
443 | struct acpi_processor *pr = m->private; | ||
444 | struct acpi_processor_performance *perf; | ||
445 | char state_string[12] = { '\0' }; | ||
446 | unsigned int new_state = 0; | ||
447 | struct cpufreq_policy policy; | ||
448 | |||
449 | |||
450 | if (!pr || (count > sizeof(state_string) - 1)) | ||
451 | return -EINVAL; | ||
452 | |||
453 | perf = pr->performance; | ||
454 | if (!perf) | ||
455 | return -EINVAL; | ||
456 | |||
457 | if (copy_from_user(state_string, buffer, count)) | ||
458 | return -EFAULT; | ||
459 | |||
460 | state_string[count] = '\0'; | ||
461 | new_state = simple_strtoul(state_string, NULL, 0); | ||
462 | |||
463 | if (new_state >= perf->state_count) | ||
464 | return -EINVAL; | ||
465 | |||
466 | cpufreq_get_policy(&policy, pr->id); | ||
467 | |||
468 | policy.cpu = pr->id; | ||
469 | policy.min = perf->states[new_state].core_frequency * 1000; | ||
470 | policy.max = perf->states[new_state].core_frequency * 1000; | ||
471 | |||
472 | result = cpufreq_set_policy(&policy); | ||
473 | if (result) | ||
474 | return result; | ||
475 | |||
476 | return count; | ||
477 | } | ||
478 | |||
479 | static void acpi_cpufreq_add_file(struct acpi_processor *pr) | 436 | static void acpi_cpufreq_add_file(struct acpi_processor *pr) |
480 | { | 437 | { |
481 | struct proc_dir_entry *entry = NULL; | 438 | struct proc_dir_entry *entry = NULL; |
@@ -487,10 +444,9 @@ static void acpi_cpufreq_add_file(struct acpi_processor *pr) | |||
487 | 444 | ||
488 | /* add file 'performance' [R/W] */ | 445 | /* add file 'performance' [R/W] */ |
489 | entry = create_proc_entry(ACPI_PROCESSOR_FILE_PERFORMANCE, | 446 | entry = create_proc_entry(ACPI_PROCESSOR_FILE_PERFORMANCE, |
490 | S_IFREG | S_IRUGO | S_IWUSR, | 447 | S_IFREG | S_IRUGO, |
491 | acpi_device_dir(device)); | 448 | acpi_device_dir(device)); |
492 | if (entry){ | 449 | if (entry){ |
493 | acpi_processor_perf_fops.write = acpi_processor_write_performance; | ||
494 | entry->proc_fops = &acpi_processor_perf_fops; | 450 | entry->proc_fops = &acpi_processor_perf_fops; |
495 | entry->data = acpi_driver_data(device); | 451 | entry->data = acpi_driver_data(device); |
496 | entry->owner = THIS_MODULE; | 452 | entry->owner = THIS_MODULE; |
diff --git a/drivers/acpi/sleep/proc.c b/drivers/acpi/sleep/proc.c index 2d912b71e543..dcde9ddd105a 100644 --- a/drivers/acpi/sleep/proc.c +++ b/drivers/acpi/sleep/proc.c | |||
@@ -60,7 +60,7 @@ acpi_system_write_sleep(struct file *file, | |||
60 | state = simple_strtoul(str, NULL, 0); | 60 | state = simple_strtoul(str, NULL, 0); |
61 | #ifdef CONFIG_SOFTWARE_SUSPEND | 61 | #ifdef CONFIG_SOFTWARE_SUSPEND |
62 | if (state == 4) { | 62 | if (state == 4) { |
63 | error = software_suspend(); | 63 | error = pm_suspend(PM_SUSPEND_DISK); |
64 | goto Done; | 64 | goto Done; |
65 | } | 65 | } |
66 | #endif | 66 | #endif |