* [2.6 patch] the scheduled ACPI_PROCFS removal
@ 2007-07-09 14:57 Adrian Bunk
2007-07-09 15:51 ` Matthew Garrett
` (2 more replies)
0 siblings, 3 replies; 12+ messages in thread
From: Adrian Bunk @ 2007-07-09 14:57 UTC (permalink / raw)
To: Zhang Rui, lenb; +Cc: linux-acpi, linux-kernel
This patch contains the scheduled removal of the ACPI procfs interface.
Signed-off-by: Adrian Bunk <bunk@stusta.de>
---
Documentation/feature-removal-schedule.txt | 8 -
drivers/acpi/Kconfig | 13 -
drivers/acpi/debug.c | 143 ---------------------
drivers/acpi/system.c | 129 ------------------
4 files changed, 293 deletions(-)
--- linux-2.6.22-rc6-mm1/Documentation/feature-removal-schedule.txt.old 2007-07-09 02:04:01.000000000 +0200
+++ linux-2.6.22-rc6-mm1/Documentation/feature-removal-schedule.txt 2007-07-09 02:04:32.000000000 +0200
@@ -190,14 +190,6 @@
---------------------------
-What: ACPI procfs interface
-When: July 2007
-Why: After ACPI sysfs conversion, ACPI attributes will be duplicated
- in sysfs and the ACPI procfs interface should be removed.
-Who: Zhang Rui <rui.zhang@intel.com>
-
----------------------------
-
What: /proc/acpi/button
When: August 2007
Why: /proc/acpi/button has been replaced by events to the input layer
--- linux-2.6.22-rc6-mm1/drivers/acpi/Kconfig.old 2007-07-09 02:04:39.000000000 +0200
+++ linux-2.6.22-rc6-mm1/drivers/acpi/Kconfig 2007-07-09 02:04:57.000000000 +0200
@@ -75,19 +75,6 @@
Create /proc/acpi/sleep
Deprecated by /sys/power/state
-config ACPI_PROCFS
- bool "Procfs interface (deprecated)"
- default y
- ---help---
- The Procfs interface for ACPI is made optional for backward compatibility.
- As the same functions are duplicated in the sysfs interface
- and this proc interface will be removed some time later,
- it's marked as deprecated.
- ( /proc/acpi/debug_layer && debug_level are deprecated by
- /sys/module/acpi/parameters/debug_layer && debug_level.
- /proc/acpi/info is deprecated by
- /sys/module/acpi/parameters/acpica_version )
-
config ACPI_AC
tristate "AC Adapter"
depends on X86
--- linux-2.6.22-rc6-mm1/drivers/acpi/debug.c.old 2007-07-09 02:05:04.000000000 +0200
+++ linux-2.6.22-rc6-mm1/drivers/acpi/debug.c 2007-07-09 02:05:41.000000000 +0200
@@ -130,146 +130,3 @@
module_param_call(debug_layer, param_set_uint, param_get_debug_layer, &acpi_dbg_layer, 0644);
module_param_call(debug_level, param_set_uint, param_get_debug_level, &acpi_dbg_level, 0644);
-/* --------------------------------------------------------------------------
- FS Interface (/proc)
- -------------------------------------------------------------------------- */
-#ifdef CONFIG_ACPI_PROCFS
-#define ACPI_SYSTEM_FILE_DEBUG_LAYER "debug_layer"
-#define ACPI_SYSTEM_FILE_DEBUG_LEVEL "debug_level"
-
-static int
-acpi_system_read_debug(char *page,
- char **start, off_t off, int count, int *eof, void *data)
-{
- char *p = page;
- int size = 0;
- unsigned int i;
-
- if (off != 0)
- goto end;
-
- p += sprintf(p, "%-25s\tHex SET\n", "Description");
-
- switch ((unsigned long)data) {
- case 0:
- for (i = 0; i < ARRAY_SIZE(acpi_debug_layers); i++) {
- p += sprintf(p, "%-25s\t0x%08lX [%c]\n",
- acpi_debug_layers[i].name,
- acpi_debug_layers[i].value,
- (acpi_dbg_layer & acpi_debug_layers[i].
- value) ? '*' : ' ');
- }
- p += sprintf(p, "%-25s\t0x%08X [%c]\n", "ACPI_ALL_DRIVERS",
- ACPI_ALL_DRIVERS,
- (acpi_dbg_layer & ACPI_ALL_DRIVERS) ==
- ACPI_ALL_DRIVERS ? '*' : (acpi_dbg_layer &
- ACPI_ALL_DRIVERS) ==
- 0 ? ' ' : '-');
- p += sprintf(p,
- "--\ndebug_layer = 0x%08X (* = enabled, - = partial)\n",
- acpi_dbg_layer);
- break;
- case 1:
- for (i = 0; i < ARRAY_SIZE(acpi_debug_levels); i++) {
- p += sprintf(p, "%-25s\t0x%08lX [%c]\n",
- acpi_debug_levels[i].name,
- acpi_debug_levels[i].value,
- (acpi_dbg_level & acpi_debug_levels[i].
- value) ? '*' : ' ');
- }
- p += sprintf(p, "--\ndebug_level = 0x%08X (* = enabled)\n",
- acpi_dbg_level);
- break;
- default:
- p += sprintf(p, "Invalid debug option\n");
- break;
- }
-
- end:
- size = (p - page);
- if (size <= off + count)
- *eof = 1;
- *start = page + off;
- size -= off;
- if (size > count)
- size = count;
- if (size < 0)
- size = 0;
-
- return size;
-}
-
-static int
-acpi_system_write_debug(struct file *file,
- const char __user * buffer,
- unsigned long count, void *data)
-{
- char debug_string[12] = { '\0' };
-
-
- if (count > sizeof(debug_string) - 1)
- return -EINVAL;
-
- if (copy_from_user(debug_string, buffer, count))
- return -EFAULT;
-
- debug_string[count] = '\0';
-
- switch ((unsigned long)data) {
- case 0:
- acpi_dbg_layer = simple_strtoul(debug_string, NULL, 0);
- break;
- case 1:
- acpi_dbg_level = simple_strtoul(debug_string, NULL, 0);
- break;
- default:
- return -EINVAL;
- }
-
- return count;
-}
-
-static int __init acpi_debug_init(void)
-{
- struct proc_dir_entry *entry;
- int error = 0;
- char *name;
-
-
- if (acpi_disabled)
- return 0;
-
- /* 'debug_layer' [R/W] */
- name = ACPI_SYSTEM_FILE_DEBUG_LAYER;
- entry =
- create_proc_read_entry(name, S_IFREG | S_IRUGO | S_IWUSR,
- acpi_root_dir, acpi_system_read_debug,
- (void *)0);
- if (entry)
- entry->write_proc = acpi_system_write_debug;
- else
- goto Error;
-
- /* 'debug_level' [R/W] */
- name = ACPI_SYSTEM_FILE_DEBUG_LEVEL;
- entry =
- create_proc_read_entry(name, S_IFREG | S_IRUGO | S_IWUSR,
- acpi_root_dir, acpi_system_read_debug,
- (void *)1);
- if (entry)
- entry->write_proc = acpi_system_write_debug;
- else
- goto Error;
-
- Done:
- return error;
-
- Error:
- remove_proc_entry(ACPI_SYSTEM_FILE_DEBUG_LEVEL, acpi_root_dir);
- remove_proc_entry(ACPI_SYSTEM_FILE_DEBUG_LAYER, acpi_root_dir);
- error = -ENODEV;
- goto Done;
-}
-
-subsys_initcall(acpi_debug_init);
-#endif
--- linux-2.6.22-rc6-mm1/drivers/acpi/system.c.old 2007-07-09 02:05:48.000000000 +0200
+++ linux-2.6.22-rc6-mm1/drivers/acpi/system.c 2007-07-09 02:06:30.000000000 +0200
@@ -167,131 +167,6 @@
return 0;
}
-/* --------------------------------------------------------------------------
- FS Interface (/proc)
- -------------------------------------------------------------------------- */
-#ifdef CONFIG_ACPI_PROCFS
-#define ACPI_SYSTEM_FILE_INFO "info"
-#define ACPI_SYSTEM_FILE_EVENT "event"
-#define ACPI_SYSTEM_FILE_DSDT "dsdt"
-#define ACPI_SYSTEM_FILE_FADT "fadt"
-
-static int acpi_system_read_info(struct seq_file *seq, void *offset)
-{
-
- seq_printf(seq, "version: %x\n", ACPI_CA_VERSION);
- return 0;
-}
-
-static int acpi_system_info_open_fs(struct inode *inode, struct file *file)
-{
- return single_open(file, acpi_system_read_info, PDE(inode)->data);
-}
-
-static const struct file_operations acpi_system_info_ops = {
- .open = acpi_system_info_open_fs,
- .read = seq_read,
- .llseek = seq_lseek,
- .release = single_release,
-};
-
-static ssize_t acpi_system_read_dsdt(struct file *, char __user *, size_t,
- loff_t *);
-
-static const struct file_operations acpi_system_dsdt_ops = {
- .read = acpi_system_read_dsdt,
-};
-
-static ssize_t
-acpi_system_read_dsdt(struct file *file,
- char __user * buffer, size_t count, loff_t * ppos)
-{
- acpi_status status = AE_OK;
- struct acpi_table_header *dsdt = NULL;
- ssize_t res;
-
- status = acpi_get_table(ACPI_SIG_DSDT, 1, &dsdt);
- if (ACPI_FAILURE(status))
- return -ENODEV;
-
- res = simple_read_from_buffer(buffer, count, ppos, dsdt, dsdt->length);
-
- return res;
-}
-
-static ssize_t acpi_system_read_fadt(struct file *, char __user *, size_t,
- loff_t *);
-
-static const struct file_operations acpi_system_fadt_ops = {
- .read = acpi_system_read_fadt,
-};
-
-static ssize_t
-acpi_system_read_fadt(struct file *file,
- char __user * buffer, size_t count, loff_t * ppos)
-{
- acpi_status status = AE_OK;
- struct acpi_table_header *fadt = NULL;
- ssize_t res;
-
- status = acpi_get_table(ACPI_SIG_FADT, 1, &fadt);
- if (ACPI_FAILURE(status))
- return -ENODEV;
-
- res = simple_read_from_buffer(buffer, count, ppos, fadt, fadt->length);
-
- return res;
-}
-
-static int acpi_system_procfs_init(void)
-{
- struct proc_dir_entry *entry;
- int error = 0;
- char *name;
-
- /* 'info' [R] */
- name = ACPI_SYSTEM_FILE_INFO;
- entry = create_proc_entry(name, S_IRUGO, acpi_root_dir);
- if (!entry)
- goto Error;
- else {
- entry->proc_fops = &acpi_system_info_ops;
- }
-
- /* 'dsdt' [R] */
- name = ACPI_SYSTEM_FILE_DSDT;
- entry = create_proc_entry(name, S_IRUSR, acpi_root_dir);
- if (entry)
- entry->proc_fops = &acpi_system_dsdt_ops;
- else
- goto Error;
-
- /* 'fadt' [R] */
- name = ACPI_SYSTEM_FILE_FADT;
- entry = create_proc_entry(name, S_IRUSR, acpi_root_dir);
- if (entry)
- entry->proc_fops = &acpi_system_fadt_ops;
- else
- goto Error;
-
- Done:
- return error;
-
- Error:
- remove_proc_entry(ACPI_SYSTEM_FILE_FADT, acpi_root_dir);
- remove_proc_entry(ACPI_SYSTEM_FILE_DSDT, acpi_root_dir);
- remove_proc_entry(ACPI_SYSTEM_FILE_INFO, acpi_root_dir);
-
- error = -EFAULT;
- goto Done;
-}
-#else
-static int acpi_system_procfs_init(void)
-{
- return 0;
-}
-#endif
-
static int __init acpi_system_init(void)
{
int result = 0;
@@ -299,10 +174,6 @@
if (acpi_disabled)
return 0;
- result = acpi_system_procfs_init();
- if (result)
- return result;
-
result = acpi_system_sysfs_init();
return result;
^ permalink raw reply [flat|nested] 12+ messages in thread* Re: [2.6 patch] the scheduled ACPI_PROCFS removal
2007-07-09 14:57 [2.6 patch] the scheduled ACPI_PROCFS removal Adrian Bunk
@ 2007-07-09 15:51 ` Matthew Garrett
2007-07-09 16:45 ` Alan Cox
2007-07-10 9:07 ` Zhang Rui
2 siblings, 0 replies; 12+ messages in thread
From: Matthew Garrett @ 2007-07-09 15:51 UTC (permalink / raw)
To: Adrian Bunk; +Cc: Zhang Rui, lenb, linux-acpi, linux-kernel
On Mon, Jul 09, 2007 at 04:57:56PM +0200, Adrian Bunk wrote:
> This patch contains the scheduled removal of the ACPI procfs interface.
This was only flagged deprecated in January. Userspace hasn't really
caught up, so I think removing it now is premature. Given the quantity
of software that's been written to use the old /proc interface, I don't
think we're realistically going to be able to remove it in the
forseeable future.
--
Matthew Garrett | mjg59@srcf.ucam.org
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [2.6 patch] the scheduled ACPI_PROCFS removal
2007-07-09 14:57 [2.6 patch] the scheduled ACPI_PROCFS removal Adrian Bunk
2007-07-09 15:51 ` Matthew Garrett
@ 2007-07-09 16:45 ` Alan Cox
2007-07-09 18:46 ` Jan Engelhardt
2007-07-10 9:07 ` Zhang Rui
2 siblings, 1 reply; 12+ messages in thread
From: Alan Cox @ 2007-07-09 16:45 UTC (permalink / raw)
To: Adrian Bunk; +Cc: Zhang Rui, lenb, linux-acpi, linux-kernel
On Mon, 9 Jul 2007 16:57:56 +0200
Adrian Bunk <bunk@stusta.de> wrote:
> This patch contains the scheduled removal of the ACPI procfs interface.
NAK
What part of "we do not gratuitously break user space interfaces" is so
hard for people to understand.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [2.6 patch] the scheduled ACPI_PROCFS removal
2007-07-09 16:45 ` Alan Cox
@ 2007-07-09 18:46 ` Jan Engelhardt
2007-07-09 18:55 ` Matthew Garrett
` (2 more replies)
0 siblings, 3 replies; 12+ messages in thread
From: Jan Engelhardt @ 2007-07-09 18:46 UTC (permalink / raw)
To: Alan Cox; +Cc: Adrian Bunk, Zhang Rui, lenb, linux-acpi, linux-kernel
On Jul 9 2007 17:45, Alan Cox wrote:
>
>> This patch contains the scheduled removal of the ACPI procfs interface.
>
>What part of "we do not gratuitously break user space interfaces" is so
>hard for people to understand.
Generally I am with you on that, but if everyone keeps on using /proc --
and I do[*] -- we will never get rid of it.
[*] Does someone have an alternative for /proc/acpi/battery/BAT1/{state,info}?
Thanks,
Jan
--
^ permalink raw reply [flat|nested] 12+ messages in thread* Re: [2.6 patch] the scheduled ACPI_PROCFS removal
2007-07-09 18:46 ` Jan Engelhardt
@ 2007-07-09 18:55 ` Matthew Garrett
2007-07-09 22:06 ` Alan Cox
2007-07-11 17:54 ` Bill Davidsen
2 siblings, 0 replies; 12+ messages in thread
From: Matthew Garrett @ 2007-07-09 18:55 UTC (permalink / raw)
To: Jan Engelhardt
Cc: Alan Cox, Adrian Bunk, Zhang Rui, lenb, linux-acpi, linux-kernel
On Mon, Jul 09, 2007 at 08:46:20PM +0200, Jan Engelhardt wrote:
> Generally I am with you on that, but if everyone keeps on using /proc --
> and I do[*] -- we will never get rid of it.
>
>
> [*] Does someone have an alternative for /proc/acpi/battery/BAT1/{state,info}?
The battery class work will provide one in the long run, but it's not
mainline yet.
--
Matthew Garrett | mjg59@srcf.ucam.org
^ permalink raw reply [flat|nested] 12+ messages in thread* Re: [2.6 patch] the scheduled ACPI_PROCFS removal
2007-07-09 18:46 ` Jan Engelhardt
2007-07-09 18:55 ` Matthew Garrett
@ 2007-07-09 22:06 ` Alan Cox
2007-07-11 17:54 ` Bill Davidsen
2 siblings, 0 replies; 12+ messages in thread
From: Alan Cox @ 2007-07-09 22:06 UTC (permalink / raw)
To: Jan Engelhardt; +Cc: Adrian Bunk, Zhang Rui, lenb, linux-acpi, linux-kernel
On Mon, 9 Jul 2007 20:46:20 +0200 (CEST)
Jan Engelhardt <jengelh@computergmbh.de> wrote:
>
> On Jul 9 2007 17:45, Alan Cox wrote:
> >
> >> This patch contains the scheduled removal of the ACPI procfs interface.
> >
> >What part of "we do not gratuitously break user space interfaces" is so
> >hard for people to understand.
>
> Generally I am with you on that, but if everyone keeps on using /proc --
> and I do[*] -- we will never get rid of it.
And why do we need to get rid of it ?
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [2.6 patch] the scheduled ACPI_PROCFS removal
2007-07-09 18:46 ` Jan Engelhardt
2007-07-09 18:55 ` Matthew Garrett
2007-07-09 22:06 ` Alan Cox
@ 2007-07-11 17:54 ` Bill Davidsen
2007-07-12 5:32 ` Alexey Starikovskiy
2 siblings, 1 reply; 12+ messages in thread
From: Bill Davidsen @ 2007-07-11 17:54 UTC (permalink / raw)
To: Jan Engelhardt
Cc: Alan Cox, Adrian Bunk, Zhang Rui, lenb, linux-acpi, linux-kernel
Jan Engelhardt wrote:
> On Jul 9 2007 17:45, Alan Cox wrote:
>>> This patch contains the scheduled removal of the ACPI procfs interface.
>> What part of "we do not gratuitously break user space interfaces" is so
>> hard for people to understand.
>
> Generally I am with you on that, but if everyone keeps on using /proc --
> and I do[*] -- we will never get rid of it.
>
Is there some reason why you should get rid of it? Is it causing a lot
work to maintain?
>
> [*] Does someone have an alternative for /proc/acpi/battery/BAT1/{state,info}?
>
--
Bill Davidsen <davidsen@tmr.com>
"We have more to fear from the bungling of the incompetent than from
the machinations of the wicked." - from Slashdot
^ permalink raw reply [flat|nested] 12+ messages in thread* Re: [2.6 patch] the scheduled ACPI_PROCFS removal
2007-07-11 17:54 ` Bill Davidsen
@ 2007-07-12 5:32 ` Alexey Starikovskiy
2007-07-12 9:18 ` Richard Hughes
0 siblings, 1 reply; 12+ messages in thread
From: Alexey Starikovskiy @ 2007-07-12 5:32 UTC (permalink / raw)
To: Bill Davidsen
Cc: Jan Engelhardt, Alan Cox, Adrian Bunk, Zhang Rui, lenb,
linux-acpi, linux-kernel
>> [*] Does someone have an alternative for
>> /proc/acpi/battery/BAT1/{state,info}?
I'm working on it. Should have proto by the end of week.
Regards,
Alex
^ permalink raw reply [flat|nested] 12+ messages in thread* Re: [2.6 patch] the scheduled ACPI_PROCFS removal
2007-07-12 5:32 ` Alexey Starikovskiy
@ 2007-07-12 9:18 ` Richard Hughes
2007-07-12 10:15 ` Alexey Starikovskiy
2007-07-16 5:34 ` Stefan Seyfried
0 siblings, 2 replies; 12+ messages in thread
From: Richard Hughes @ 2007-07-12 9:18 UTC (permalink / raw)
To: Alexey Starikovskiy
Cc: Bill Davidsen, Jan Engelhardt, Alan Cox, Adrian Bunk, Zhang Rui,
lenb, linux-acpi, linux-kernel
On Thu, 2007-07-12 at 09:32 +0400, Alexey Starikovskiy wrote:
> >> [*] Does someone have an alternative for
> >> /proc/acpi/battery/BAT1/{state,info}?
> I'm working on it. Should have proto by the end of week.
If you are using the power_supply class (i hope you are ;-) then a HAL
from freedesktop git should make userspace continue to just work. Please
yell if you notice any differences.
Richard.
^ permalink raw reply [flat|nested] 12+ messages in thread* Re: [2.6 patch] the scheduled ACPI_PROCFS removal
2007-07-12 9:18 ` Richard Hughes
@ 2007-07-12 10:15 ` Alexey Starikovskiy
2007-07-16 5:34 ` Stefan Seyfried
1 sibling, 0 replies; 12+ messages in thread
From: Alexey Starikovskiy @ 2007-07-12 10:15 UTC (permalink / raw)
To: Richard Hughes
Cc: Bill Davidsen, Jan Engelhardt, Alan Cox, Adrian Bunk, Zhang Rui,
lenb, linux-acpi, linux-kernel
Richard Hughes wrote:
> On Thu, 2007-07-12 at 09:32 +0400, Alexey Starikovskiy wrote:
>>>> [*] Does someone have an alternative for
>>>> /proc/acpi/battery/BAT1/{state,info}?
>> I'm working on it. Should have proto by the end of week.
>
> If you are using the power_supply class (i hope you are ;-) then a HAL
> from freedesktop git should make userspace continue to just work. Please
> yell if you notice any differences.
Well, both SBS and CM batteries were able to set an alarm capacity.
I did not found write capability to property in power_supply class yet.
So consider this a yelling :)
Thanks,
Alex.
^ permalink raw reply [flat|nested] 12+ messages in thread* Re: [2.6 patch] the scheduled ACPI_PROCFS removal
2007-07-12 9:18 ` Richard Hughes
2007-07-12 10:15 ` Alexey Starikovskiy
@ 2007-07-16 5:34 ` Stefan Seyfried
1 sibling, 0 replies; 12+ messages in thread
From: Stefan Seyfried @ 2007-07-16 5:34 UTC (permalink / raw)
To: Richard Hughes
Cc: Alexey Starikovskiy, Bill Davidsen, Jan Engelhardt, Alan Cox,
Adrian Bunk, Zhang Rui, lenb, linux-acpi, linux-kernel
On Thu, Jul 12, 2007 at 10:18:17AM +0100, Richard Hughes wrote:
> On Thu, 2007-07-12 at 09:32 +0400, Alexey Starikovskiy wrote:
> > >> [*] Does someone have an alternative for
> > >> /proc/acpi/battery/BAT1/{state,info}?
> > I'm working on it. Should have proto by the end of week.
>
> If you are using the power_supply class (i hope you are ;-) then a HAL
> from freedesktop git should make userspace continue to just work.
Having to update HAL is not my definition of "does not break userspace".
And, BTW, there is more than just HAL out there using /proc/acpi, and
this should continue to work.
--
Stefan Seyfried
QA / R&D Team Mobile Devices | "Any ideas, John?"
SUSE LINUX Products GmbH, Nürnberg | "Well, surrounding them's out."
This footer brought to you by insane German lawmakers:
SUSE Linux Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg)
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [2.6 patch] the scheduled ACPI_PROCFS removal
2007-07-09 14:57 [2.6 patch] the scheduled ACPI_PROCFS removal Adrian Bunk
2007-07-09 15:51 ` Matthew Garrett
2007-07-09 16:45 ` Alan Cox
@ 2007-07-10 9:07 ` Zhang Rui
2 siblings, 0 replies; 12+ messages in thread
From: Zhang Rui @ 2007-07-10 9:07 UTC (permalink / raw)
To: Adrian Bunk; +Cc: lenb, linux-acpi, linux-kernel
Hi,
I really appreciate your help.
The ACPI sysfs conversion work is still in progress.
We'll update the ACPI_PROCFS removal plan soon.
Sorry to make you confused.
Thanks,
Rui
On Mon, 2007-07-09 at 22:57 +0800, Adrian Bunk wrote:
> This patch contains the scheduled removal of the ACPI procfs
> interface.
>
> Signed-off-by: Adrian Bunk <bunk@stusta.de>
>
> ---
>
> Documentation/feature-removal-schedule.txt | 8 -
> drivers/acpi/Kconfig | 13 -
> drivers/acpi/debug.c | 143
> ---------------------
> drivers/acpi/system.c | 129 ------------------
> 4 files changed, 293 deletions(-)
>
> --- linux-2.6.22-rc6-mm1/Documentation/feature-removal-
> schedule.txt.old 2007-07-09 02:04:01.000000000 +0200
> +++ linux-2.6.22-rc6-mm1/Documentation/feature-removal-schedule.txt
> 2007-07-09 02:04:32.000000000 +0200
> @@ -190,14 +190,6 @@
>
> ---------------------------
>
> -What: ACPI procfs interface
> -When: July 2007
> -Why: After ACPI sysfs conversion, ACPI attributes will be
> duplicated
> - in sysfs and the ACPI procfs interface should be removed.
> -Who: Zhang Rui <rui.zhang@intel.com>
> -
> ----------------------------
> -
> What: /proc/acpi/button
> When: August 2007
> Why: /proc/acpi/button has been replaced by events to the input
> layer
> --- linux-2.6.22-rc6-mm1/drivers/acpi/Kconfig.old 2007-07-09
> 02:04:39.000000000 +0200
> +++ linux-2.6.22-rc6-mm1/drivers/acpi/Kconfig 2007-07-09
> 02:04:57.000000000 +0200
> @@ -75,19 +75,6 @@
> Create /proc/acpi/sleep
> Deprecated by /sys/power/state
>
> -config ACPI_PROCFS
> - bool "Procfs interface (deprecated)"
> - default y
> - ---help---
> - The Procfs interface for ACPI is made optional for backward
> compatibility.
> - As the same functions are duplicated in the sysfs interface
> - and this proc interface will be removed some time later,
> - it's marked as deprecated.
> - ( /proc/acpi/debug_layer && debug_level are deprecated by
> - /sys/module/acpi/parameters/debug_layer && debug_level.
> - /proc/acpi/info is deprecated by
> - /sys/module/acpi/parameters/acpica_version )
> -
> config ACPI_AC
> tristate "AC Adapter"
> depends on X86
> --- linux-2.6.22-rc6-mm1/drivers/acpi/debug.c.old 2007-07-09
> 02:05:04.000000000 +0200
> +++ linux-2.6.22-rc6-mm1/drivers/acpi/debug.c 2007-07-09
> 02:05:41.000000000 +0200
> @@ -130,146 +130,3 @@
> module_param_call(debug_layer, param_set_uint, param_get_debug_layer,
> &acpi_dbg_layer, 0644);
> module_param_call(debug_level, param_set_uint, param_get_debug_level,
> &acpi_dbg_level, 0644);
>
> -/*
> --------------------------------------------------------------------------
> - FS Interface (/proc)
> -
> -------------------------------------------------------------------------- */
> -#ifdef CONFIG_ACPI_PROCFS
> -#define ACPI_SYSTEM_FILE_DEBUG_LAYER "debug_layer"
> -#define ACPI_SYSTEM_FILE_DEBUG_LEVEL "debug_level"
> -
> -static int
> -acpi_system_read_debug(char *page,
> - char **start, off_t off, int count, int *eof,
> void *data)
> -{
> - char *p = page;
> - int size = 0;
> - unsigned int i;
> -
> - if (off != 0)
> - goto end;
> -
> - p += sprintf(p, "%-25s\tHex SET\n", "Description");
> -
> - switch ((unsigned long)data) {
> - case 0:
> - for (i = 0; i < ARRAY_SIZE(acpi_debug_layers); i++) {
> - p += sprintf(p, "%-25s\t0x%08lX [%c]\n",
> - acpi_debug_layers[i].name,
> - acpi_debug_layers[i].value,
> - (acpi_dbg_layer &
> acpi_debug_layers[i].
> - value) ? '*' : ' ');
> - }
> - p += sprintf(p, "%-25s\t0x%08X [%c]\n",
> "ACPI_ALL_DRIVERS",
> - ACPI_ALL_DRIVERS,
> - (acpi_dbg_layer & ACPI_ALL_DRIVERS) ==
> - ACPI_ALL_DRIVERS ? '*' : (acpi_dbg_layer
> &
> -
> ACPI_ALL_DRIVERS) ==
> - 0 ? ' ' : '-');
> - p += sprintf(p,
> - "--\ndebug_layer = 0x%08X (* = enabled, -
> = partial)\n",
> - acpi_dbg_layer);
> - break;
> - case 1:
> - for (i = 0; i < ARRAY_SIZE(acpi_debug_levels); i++) {
> - p += sprintf(p, "%-25s\t0x%08lX [%c]\n",
> - acpi_debug_levels[i].name,
> - acpi_debug_levels[i].value,
> - (acpi_dbg_level &
> acpi_debug_levels[i].
> - value) ? '*' : ' ');
> - }
> - p += sprintf(p, "--\ndebug_level = 0x%08X (* =
> enabled)\n",
> - acpi_dbg_level);
> - break;
> - default:
> - p += sprintf(p, "Invalid debug option\n");
> - break;
> - }
> -
> - end:
> - size = (p - page);
> - if (size <= off + count)
> - *eof = 1;
> - *start = page + off;
> - size -= off;
> - if (size > count)
> - size = count;
> - if (size < 0)
> - size = 0;
> -
> - return size;
> -}
> -
> -static int
> -acpi_system_write_debug(struct file *file,
> - const char __user * buffer,
> - unsigned long count, void *data)
> -{
> - char debug_string[12] = { '\0' };
> -
> -
> - if (count > sizeof(debug_string) - 1)
> - return -EINVAL;
> -
> - if (copy_from_user(debug_string, buffer, count))
> - return -EFAULT;
> -
> - debug_string[count] = '\0';
> -
> - switch ((unsigned long)data) {
> - case 0:
> - acpi_dbg_layer = simple_strtoul(debug_string, NULL,
> 0);
> - break;
> - case 1:
> - acpi_dbg_level = simple_strtoul(debug_string, NULL,
> 0);
> - break;
> - default:
> - return -EINVAL;
> - }
> -
> - return count;
> -}
> -
> -static int __init acpi_debug_init(void)
> -{
> - struct proc_dir_entry *entry;
> - int error = 0;
> - char *name;
> -
> -
> - if (acpi_disabled)
> - return 0;
> -
> - /* 'debug_layer' [R/W] */
> - name = ACPI_SYSTEM_FILE_DEBUG_LAYER;
> - entry =
> - create_proc_read_entry(name, S_IFREG | S_IRUGO | S_IWUSR,
> - acpi_root_dir,
> acpi_system_read_debug,
> - (void *)0);
> - if (entry)
> - entry->write_proc = acpi_system_write_debug;
> - else
> - goto Error;
> -
> - /* 'debug_level' [R/W] */
> - name = ACPI_SYSTEM_FILE_DEBUG_LEVEL;
> - entry =
> - create_proc_read_entry(name, S_IFREG | S_IRUGO | S_IWUSR,
> - acpi_root_dir,
> acpi_system_read_debug,
> - (void *)1);
> - if (entry)
> - entry->write_proc = acpi_system_write_debug;
> - else
> - goto Error;
> -
> - Done:
> - return error;
> -
> - Error:
> - remove_proc_entry(ACPI_SYSTEM_FILE_DEBUG_LEVEL,
> acpi_root_dir);
> - remove_proc_entry(ACPI_SYSTEM_FILE_DEBUG_LAYER,
> acpi_root_dir);
> - error = -ENODEV;
> - goto Done;
> -}
> -
> -subsys_initcall(acpi_debug_init);
> -#endif
> --- linux-2.6.22-rc6-mm1/drivers/acpi/system.c.old 2007-07-09
> 02:05:48.000000000 +0200
> +++ linux-2.6.22-rc6-mm1/drivers/acpi/system.c 2007-07-09
> 02:06:30.000000000 +0200
> @@ -167,131 +167,6 @@
> return 0;
> }
>
> -/*
> --------------------------------------------------------------------------
> - FS Interface (/proc)
> -
> -------------------------------------------------------------------------- */
> -#ifdef CONFIG_ACPI_PROCFS
> -#define ACPI_SYSTEM_FILE_INFO "info"
> -#define ACPI_SYSTEM_FILE_EVENT "event"
> -#define ACPI_SYSTEM_FILE_DSDT "dsdt"
> -#define ACPI_SYSTEM_FILE_FADT "fadt"
> -
> -static int acpi_system_read_info(struct seq_file *seq, void *offset)
> -{
> -
> - seq_printf(seq, "version: %x\n",
> ACPI_CA_VERSION);
> - return 0;
> -}
> -
> -static int acpi_system_info_open_fs(struct inode *inode, struct file
> *file)
> -{
> - return single_open(file, acpi_system_read_info, PDE(inode)-
> >data);
> -}
> -
> -static const struct file_operations acpi_system_info_ops = {
> - .open = acpi_system_info_open_fs,
> - .read = seq_read,
> - .llseek = seq_lseek,
> - .release = single_release,
> -};
> -
> -static ssize_t acpi_system_read_dsdt(struct file *, char __user *,
> size_t,
> - loff_t *);
> -
> -static const struct file_operations acpi_system_dsdt_ops = {
> - .read = acpi_system_read_dsdt,
> -};
> -
> -static ssize_t
> -acpi_system_read_dsdt(struct file *file,
> - char __user * buffer, size_t count, loff_t *
> ppos)
> -{
> - acpi_status status = AE_OK;
> - struct acpi_table_header *dsdt = NULL;
> - ssize_t res;
> -
> - status = acpi_get_table(ACPI_SIG_DSDT, 1, &dsdt);
> - if (ACPI_FAILURE(status))
> - return -ENODEV;
> -
> - res = simple_read_from_buffer(buffer, count, ppos, dsdt, dsdt-
> >length);
> -
> - return res;
> -}
> -
> -static ssize_t acpi_system_read_fadt(struct file *, char __user *,
> size_t,
> - loff_t *);
> -
> -static const struct file_operations acpi_system_fadt_ops = {
> - .read = acpi_system_read_fadt,
> -};
> -
> -static ssize_t
> -acpi_system_read_fadt(struct file *file,
> - char __user * buffer, size_t count, loff_t *
> ppos)
> -{
> - acpi_status status = AE_OK;
> - struct acpi_table_header *fadt = NULL;
> - ssize_t res;
> -
> - status = acpi_get_table(ACPI_SIG_FADT, 1, &fadt);
> - if (ACPI_FAILURE(status))
> - return -ENODEV;
> -
> - res = simple_read_from_buffer(buffer, count, ppos, fadt, fadt-
> >length);
> -
> - return res;
> -}
> -
> -static int acpi_system_procfs_init(void)
> -{
> - struct proc_dir_entry *entry;
> - int error = 0;
> - char *name;
> -
> - /* 'info' [R] */
> - name = ACPI_SYSTEM_FILE_INFO;
> - entry = create_proc_entry(name, S_IRUGO, acpi_root_dir);
> - if (!entry)
> - goto Error;
> - else {
> - entry->proc_fops = &acpi_system_info_ops;
> - }
> -
> - /* 'dsdt' [R] */
> - name = ACPI_SYSTEM_FILE_DSDT;
> - entry = create_proc_entry(name, S_IRUSR, acpi_root_dir);
> - if (entry)
> - entry->proc_fops = &acpi_system_dsdt_ops;
> - else
> - goto Error;
> -
> - /* 'fadt' [R] */
> - name = ACPI_SYSTEM_FILE_FADT;
> - entry = create_proc_entry(name, S_IRUSR, acpi_root_dir);
> - if (entry)
> - entry->proc_fops = &acpi_system_fadt_ops;
> - else
> - goto Error;
> -
> - Done:
> - return error;
> -
> - Error:
> - remove_proc_entry(ACPI_SYSTEM_FILE_FADT, acpi_root_dir);
> - remove_proc_entry(ACPI_SYSTEM_FILE_DSDT, acpi_root_dir);
> - remove_proc_entry(ACPI_SYSTEM_FILE_INFO, acpi_root_dir);
> -
> - error = -EFAULT;
> - goto Done;
> -}
> -#else
> -static int acpi_system_procfs_init(void)
> -{
> - return 0;
> -}
> -#endif
> -
> static int __init acpi_system_init(void)
> {
> int result = 0;
> @@ -299,10 +174,6 @@
> if (acpi_disabled)
> return 0;
>
> - result = acpi_system_procfs_init();
> - if (result)
> - return result;
> -
> result = acpi_system_sysfs_init();
>
> return result;
>
>
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2007-07-16 6:39 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-09 14:57 [2.6 patch] the scheduled ACPI_PROCFS removal Adrian Bunk
2007-07-09 15:51 ` Matthew Garrett
2007-07-09 16:45 ` Alan Cox
2007-07-09 18:46 ` Jan Engelhardt
2007-07-09 18:55 ` Matthew Garrett
2007-07-09 22:06 ` Alan Cox
2007-07-11 17:54 ` Bill Davidsen
2007-07-12 5:32 ` Alexey Starikovskiy
2007-07-12 9:18 ` Richard Hughes
2007-07-12 10:15 ` Alexey Starikovskiy
2007-07-16 5:34 ` Stefan Seyfried
2007-07-10 9:07 ` Zhang Rui
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox