diff options
author | Zhang Rui <rui.zhang@intel.com> | 2010-07-14 22:46:41 -0400 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2010-08-15 00:31:45 -0400 |
commit | d09fe55510257f1acd21ea80a9bdd7c72b5895b3 (patch) | |
tree | 8de6e26f254167fabbc66b4de6f03a44bb57acde /drivers/acpi/processor_idle.c | |
parent | 06af7eb043c02822072cea862fce1b7c74115e8f (diff) |
ACPI processor: remove deprecated ACPI procfs I/F
Remove deprecated ACPI processor procfs I/F, including:
/proc/acpi/processor/CPUX/power
/proc/acpi/processor/CPUX/limit
/proc/acpi/processor/CPUX/info
/proc/acpi/processor/CPUX/throttling still exists,
as we don't have sysfs I/F available for now.
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi/processor_idle.c')
-rw-r--r-- | drivers/acpi/processor_idle.c | 99 |
1 files changed, 0 insertions, 99 deletions
diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c index e9a8026d39f0..5cbc0cb73e2c 100644 --- a/drivers/acpi/processor_idle.c +++ b/drivers/acpi/processor_idle.c | |||
@@ -33,8 +33,6 @@ | |||
33 | #include <linux/init.h> | 33 | #include <linux/init.h> |
34 | #include <linux/cpufreq.h> | 34 | #include <linux/cpufreq.h> |
35 | #include <linux/slab.h> | 35 | #include <linux/slab.h> |
36 | #include <linux/proc_fs.h> | ||
37 | #include <linux/seq_file.h> | ||
38 | #include <linux/acpi.h> | 36 | #include <linux/acpi.h> |
39 | #include <linux/dmi.h> | 37 | #include <linux/dmi.h> |
40 | #include <linux/moduleparam.h> | 38 | #include <linux/moduleparam.h> |
@@ -82,13 +80,6 @@ module_param(bm_check_disable, uint, 0000); | |||
82 | static unsigned int latency_factor __read_mostly = 2; | 80 | static unsigned int latency_factor __read_mostly = 2; |
83 | module_param(latency_factor, uint, 0644); | 81 | module_param(latency_factor, uint, 0644); |
84 | 82 | ||
85 | #ifdef CONFIG_ACPI_PROCFS | ||
86 | static u64 us_to_pm_timer_ticks(s64 t) | ||
87 | { | ||
88 | return div64_u64(t * PM_TIMER_FREQUENCY, 1000000); | ||
89 | } | ||
90 | #endif | ||
91 | |||
92 | /* | 83 | /* |
93 | * IBM ThinkPad R40e crashes mysteriously when going into C2 or C3. | 84 | * IBM ThinkPad R40e crashes mysteriously when going into C2 or C3. |
94 | * For now disable this. Probably a bug somewhere else. | 85 | * For now disable this. Probably a bug somewhere else. |
@@ -689,78 +680,6 @@ static int acpi_processor_get_power_info(struct acpi_processor *pr) | |||
689 | return 0; | 680 | return 0; |
690 | } | 681 | } |
691 | 682 | ||
692 | #ifdef CONFIG_ACPI_PROCFS | ||
693 | static int acpi_processor_power_seq_show(struct seq_file *seq, void *offset) | ||
694 | { | ||
695 | struct acpi_processor *pr = seq->private; | ||
696 | unsigned int i; | ||
697 | |||
698 | |||
699 | if (!pr) | ||
700 | goto end; | ||
701 | |||
702 | seq_printf(seq, "active state: C%zd\n" | ||
703 | "max_cstate: C%d\n" | ||
704 | "maximum allowed latency: %d usec\n", | ||
705 | pr->power.state ? pr->power.state - pr->power.states : 0, | ||
706 | max_cstate, pm_qos_request(PM_QOS_CPU_DMA_LATENCY)); | ||
707 | |||
708 | seq_puts(seq, "states:\n"); | ||
709 | |||
710 | for (i = 1; i <= pr->power.count; i++) { | ||
711 | seq_printf(seq, " %cC%d: ", | ||
712 | (&pr->power.states[i] == | ||
713 | pr->power.state ? '*' : ' '), i); | ||
714 | |||
715 | if (!pr->power.states[i].valid) { | ||
716 | seq_puts(seq, "<not supported>\n"); | ||
717 | continue; | ||
718 | } | ||
719 | |||
720 | switch (pr->power.states[i].type) { | ||
721 | case ACPI_STATE_C1: | ||
722 | seq_printf(seq, "type[C1] "); | ||
723 | break; | ||
724 | case ACPI_STATE_C2: | ||
725 | seq_printf(seq, "type[C2] "); | ||
726 | break; | ||
727 | case ACPI_STATE_C3: | ||
728 | seq_printf(seq, "type[C3] "); | ||
729 | break; | ||
730 | default: | ||
731 | seq_printf(seq, "type[--] "); | ||
732 | break; | ||
733 | } | ||
734 | |||
735 | seq_puts(seq, "promotion[--] "); | ||
736 | |||
737 | seq_puts(seq, "demotion[--] "); | ||
738 | |||
739 | seq_printf(seq, "latency[%03d] usage[%08d] duration[%020Lu]\n", | ||
740 | pr->power.states[i].latency, | ||
741 | pr->power.states[i].usage, | ||
742 | us_to_pm_timer_ticks(pr->power.states[i].time)); | ||
743 | } | ||
744 | |||
745 | end: | ||
746 | return 0; | ||
747 | } | ||
748 | |||
749 | static int acpi_processor_power_open_fs(struct inode *inode, struct file *file) | ||
750 | { | ||
751 | return single_open(file, acpi_processor_power_seq_show, | ||
752 | PDE(inode)->data); | ||
753 | } | ||
754 | |||
755 | static const struct file_operations acpi_processor_power_fops = { | ||
756 | .owner = THIS_MODULE, | ||
757 | .open = acpi_processor_power_open_fs, | ||
758 | .read = seq_read, | ||
759 | .llseek = seq_lseek, | ||
760 | .release = single_release, | ||
761 | }; | ||
762 | #endif | ||
763 | |||
764 | /** | 683 | /** |
765 | * acpi_idle_bm_check - checks if bus master activity was detected | 684 | * acpi_idle_bm_check - checks if bus master activity was detected |
766 | */ | 685 | */ |
@@ -1172,9 +1091,6 @@ int __cpuinit acpi_processor_power_init(struct acpi_processor *pr, | |||
1172 | { | 1091 | { |
1173 | acpi_status status = 0; | 1092 | acpi_status status = 0; |
1174 | static int first_run; | 1093 | static int first_run; |
1175 | #ifdef CONFIG_ACPI_PROCFS | ||
1176 | struct proc_dir_entry *entry = NULL; | ||
1177 | #endif | ||
1178 | 1094 | ||
1179 | if (boot_option_idle_override) | 1095 | if (boot_option_idle_override) |
1180 | return 0; | 1096 | return 0; |
@@ -1223,15 +1139,6 @@ int __cpuinit acpi_processor_power_init(struct acpi_processor *pr, | |||
1223 | if (cpuidle_register_device(&pr->power.dev)) | 1139 | if (cpuidle_register_device(&pr->power.dev)) |
1224 | return -EIO; | 1140 | return -EIO; |
1225 | } | 1141 | } |
1226 | #ifdef CONFIG_ACPI_PROCFS | ||
1227 | /* 'power' [R] */ | ||
1228 | entry = proc_create_data(ACPI_PROCESSOR_FILE_POWER, | ||
1229 | S_IRUGO, acpi_device_dir(device), | ||
1230 | &acpi_processor_power_fops, | ||
1231 | acpi_driver_data(device)); | ||
1232 | if (!entry) | ||
1233 | return -EIO; | ||
1234 | #endif | ||
1235 | return 0; | 1142 | return 0; |
1236 | } | 1143 | } |
1237 | 1144 | ||
@@ -1244,11 +1151,5 @@ int acpi_processor_power_exit(struct acpi_processor *pr, | |||
1244 | cpuidle_unregister_device(&pr->power.dev); | 1151 | cpuidle_unregister_device(&pr->power.dev); |
1245 | pr->flags.power_setup_done = 0; | 1152 | pr->flags.power_setup_done = 0; |
1246 | 1153 | ||
1247 | #ifdef CONFIG_ACPI_PROCFS | ||
1248 | if (acpi_device_dir(device)) | ||
1249 | remove_proc_entry(ACPI_PROCESSOR_FILE_POWER, | ||
1250 | acpi_device_dir(device)); | ||
1251 | #endif | ||
1252 | |||
1253 | return 0; | 1154 | return 0; |
1254 | } | 1155 | } |