aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorThomas Renninger <trenn@suse.de>2009-02-03 11:46:46 -0500
committerLen Brown <len.brown@intel.com>2009-02-04 00:12:24 -0500
commit62663ea8220366472fe20462831f2d69d7987439 (patch)
treea51aca0373d4b68ba883fee1c6198a1fa7072890 /drivers
parentdcf6a79dda5cc2a2bec183e50d829030c0972aaa (diff)
ACPI: cpufreq: Remove deprecated /proc/acpi/processor/../performance proc entries
They were long enough set deprecated... Update Documentation/cpu-freq/users-guide.txt: The deprecated files listed there seen not to exist for some time anymore already. Signed-off-by: Thomas Renninger <trenn@suse.de> Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/acpi/processor_perflib.c105
1 files changed, 0 insertions, 105 deletions
diff --git a/drivers/acpi/processor_perflib.c b/drivers/acpi/processor_perflib.c
index 846e227592d4..9cc769b587ff 100644
--- a/drivers/acpi/processor_perflib.c
+++ b/drivers/acpi/processor_perflib.c
@@ -31,14 +31,6 @@
31#include <linux/init.h> 31#include <linux/init.h>
32#include <linux/cpufreq.h> 32#include <linux/cpufreq.h>
33 33
34#ifdef CONFIG_X86_ACPI_CPUFREQ_PROC_INTF
35#include <linux/proc_fs.h>
36#include <linux/seq_file.h>
37#include <linux/mutex.h>
38
39#include <asm/uaccess.h>
40#endif
41
42#ifdef CONFIG_X86 34#ifdef CONFIG_X86
43#include <asm/cpufeature.h> 35#include <asm/cpufeature.h>
44#endif 36#endif
@@ -434,96 +426,6 @@ int acpi_processor_notify_smm(struct module *calling_module)
434 426
435EXPORT_SYMBOL(acpi_processor_notify_smm); 427EXPORT_SYMBOL(acpi_processor_notify_smm);
436 428
437#ifdef CONFIG_X86_ACPI_CPUFREQ_PROC_INTF
438/* /proc/acpi/processor/../performance interface (DEPRECATED) */
439
440static int acpi_processor_perf_open_fs(struct inode *inode, struct file *file);
441static struct file_operations acpi_processor_perf_fops = {
442 .owner = THIS_MODULE,
443 .open = acpi_processor_perf_open_fs,
444 .read = seq_read,
445 .llseek = seq_lseek,
446 .release = single_release,
447};
448
449static int acpi_processor_perf_seq_show(struct seq_file *seq, void *offset)
450{
451 struct acpi_processor *pr = seq->private;
452 int i;
453
454
455 if (!pr)
456 goto end;
457
458 if (!pr->performance) {
459 seq_puts(seq, "<not supported>\n");
460 goto end;
461 }
462
463 seq_printf(seq, "state count: %d\n"
464 "active state: P%d\n",
465 pr->performance->state_count, pr->performance->state);
466
467 seq_puts(seq, "states:\n");
468 for (i = 0; i < pr->performance->state_count; i++)
469 seq_printf(seq,
470 " %cP%d: %d MHz, %d mW, %d uS\n",
471 (i == pr->performance->state ? '*' : ' '), i,
472 (u32) pr->performance->states[i].core_frequency,
473 (u32) pr->performance->states[i].power,
474 (u32) pr->performance->states[i].transition_latency);
475
476 end:
477 return 0;
478}
479
480static int acpi_processor_perf_open_fs(struct inode *inode, struct file *file)
481{
482 return single_open(file, acpi_processor_perf_seq_show,
483 PDE(inode)->data);
484}
485
486static void acpi_cpufreq_add_file(struct acpi_processor *pr)
487{
488 struct acpi_device *device = NULL;
489
490
491 if (acpi_bus_get_device(pr->handle, &device))
492 return;
493
494 /* add file 'performance' [R/W] */
495 proc_create_data(ACPI_PROCESSOR_FILE_PERFORMANCE, S_IFREG | S_IRUGO,
496 acpi_device_dir(device),
497 &acpi_processor_perf_fops, acpi_driver_data(device));
498 return;
499}
500
501static void acpi_cpufreq_remove_file(struct acpi_processor *pr)
502{
503 struct acpi_device *device = NULL;
504
505
506 if (acpi_bus_get_device(pr->handle, &device))
507 return;
508
509 /* remove file 'performance' */
510 remove_proc_entry(ACPI_PROCESSOR_FILE_PERFORMANCE,
511 acpi_device_dir(device));
512
513 return;
514}
515
516#else
517static void acpi_cpufreq_add_file(struct acpi_processor *pr)
518{
519 return;
520}
521static void acpi_cpufreq_remove_file(struct acpi_processor *pr)
522{
523 return;
524}
525#endif /* CONFIG_X86_ACPI_CPUFREQ_PROC_INTF */
526
527static int acpi_processor_get_psd(struct acpi_processor *pr) 429static int acpi_processor_get_psd(struct acpi_processor *pr)
528{ 430{
529 int result = 0; 431 int result = 0;
@@ -747,14 +649,12 @@ err_ret:
747} 649}
748EXPORT_SYMBOL(acpi_processor_preregister_performance); 650EXPORT_SYMBOL(acpi_processor_preregister_performance);
749 651
750
751int 652int
752acpi_processor_register_performance(struct acpi_processor_performance 653acpi_processor_register_performance(struct acpi_processor_performance
753 *performance, unsigned int cpu) 654 *performance, unsigned int cpu)
754{ 655{
755 struct acpi_processor *pr; 656 struct acpi_processor *pr;
756 657
757
758 if (!(acpi_processor_ppc_status & PPC_REGISTERED)) 658 if (!(acpi_processor_ppc_status & PPC_REGISTERED))
759 return -EINVAL; 659 return -EINVAL;
760 660
@@ -781,8 +681,6 @@ acpi_processor_register_performance(struct acpi_processor_performance
781 return -EIO; 681 return -EIO;
782 } 682 }
783 683
784 acpi_cpufreq_add_file(pr);
785
786 mutex_unlock(&performance_mutex); 684 mutex_unlock(&performance_mutex);
787 return 0; 685 return 0;
788} 686}
@@ -795,7 +693,6 @@ acpi_processor_unregister_performance(struct acpi_processor_performance
795{ 693{
796 struct acpi_processor *pr; 694 struct acpi_processor *pr;
797 695
798
799 mutex_lock(&performance_mutex); 696 mutex_lock(&performance_mutex);
800 697
801 pr = per_cpu(processors, cpu); 698 pr = per_cpu(processors, cpu);
@@ -808,8 +705,6 @@ acpi_processor_unregister_performance(struct acpi_processor_performance
808 kfree(pr->performance->states); 705 kfree(pr->performance->states);
809 pr->performance = NULL; 706 pr->performance = NULL;
810 707
811 acpi_cpufreq_remove_file(pr);
812
813 mutex_unlock(&performance_mutex); 708 mutex_unlock(&performance_mutex);
814 709
815 return; 710 return;