drivers/acpi: remove unused exported functions
Subsystems (3)
PATCH 1/1 drivers/acpi: remove unused exported functions
The patch below completely removes 7 functions that were EXPORT_SYMBOL'ed but had exactly zero users in the kernel and makes another one that was previously EXPORT_SYMBOL'ed static.
It also removes another unused global function to completely remove drivers/acpi/hardware/hwtimer.c which contained no function used anywhere in the kernel.
Please comment on whether this patch is correct or whether in-kernel users of these functions are pending.
diffstat output:
drivers/acpi/acpi_ksyms.c | 8 - drivers/acpi/events/evxfevnt.c | 191 ----------------------------- drivers/acpi/hardware/Makefile | 2 drivers/acpi/hardware/hwtimer.c | 200 ------------------------------- drivers/acpi/resources/rsxface.c | 52 -------- drivers/acpi/scan.c | 6 drivers/acpi/utilities/utxface.c | 89 ------------- include/acpi/achware.h | 17 -- include/acpi/acpi_bus.h | 1 include/acpi/acpixf.h | 24 --- 10 files changed, 6 insertions(+), 584 deletions(-)
include/acpi/acpixf.h renamed from include/acpi/acpixf.h.old +0 -24
@@ -82,10 +82,6 @@acpi_disable ( void); -acpi_status -acpi_get_system_info ( -struct acpi_buffer *ret_buffer); -const char *acpi_format_exception (acpi_status exception);
@@ -334,10 +330,6 @@ u32 flags);acpi_status -acpi_clear_event ( -u32 event); - -acpi_status acpi_get_event_status (u32 event,acpi_event_status *event_status);
@@ -373,17 +365,6 @@u32 flags, acpi_event_status *event_status); -acpi_status -acpi_install_gpe_block ( -acpi_handle gpe_device, -struct acpi_generic_address *gpe_block_address, -u32 register_count, -u32 interrupt_level); - -acpi_status -acpi_remove_gpe_block ( -acpi_handle gpe_device); -/* * Resource interfaces
@@ -401,11 +382,6 @@ struct acpi_buffer *ret_buffer); acpi_status -acpi_get_possible_resources ( -acpi_handle device_handle, -struct acpi_buffer *ret_buffer); - -acpi_status acpi_walk_resources ( acpi_handle device_handle, char *path,
drivers/acpi/acpi_ksyms.c renamed from drivers/acpi/acpi_ksyms.c.old +0 -8
@@ -74,26 +74,19 @@EXPORT_SYMBOL (acpi_remove_fixed_event_handler);EXPORT_SYMBOL (acpi_acquire_global_lock);EXPORT_SYMBOL (acpi_release_global_lock); -EXPORT_SYMBOL (acpi_install_gpe_block); -EXPORT_SYMBOL (acpi_remove_gpe_block);EXPORT_SYMBOL (acpi_get_current_resources); -EXPORT_SYMBOL (acpi_get_possible_resources);EXPORT_SYMBOL (acpi_walk_resources);EXPORT_SYMBOL (acpi_set_current_resources);EXPORT_SYMBOL (acpi_resource_to_address64);EXPORT_SYMBOL (acpi_enable_event);EXPORT_SYMBOL (acpi_disable_event); -EXPORT_SYMBOL (acpi_clear_event);EXPORT_SYMBOL (acpi_set_gpe_type);EXPORT_SYMBOL (acpi_enable_gpe); -EXPORT_SYMBOL (acpi_get_timer_duration); -EXPORT_SYMBOL (acpi_get_timer);EXPORT_SYMBOL (acpi_get_sleep_type_data);EXPORT_SYMBOL (acpi_get_register);EXPORT_SYMBOL (acpi_set_register);EXPORT_SYMBOL (acpi_enter_sleep_state);EXPORT_SYMBOL (acpi_enter_sleep_state_s4bios); -EXPORT_SYMBOL (acpi_get_system_info);EXPORT_SYMBOL (acpi_get_devices);/* ACPI OS Services Layer (acpi_osl.c) */
@@ -139,7 +132,6 @@EXPORT_SYMBOL (acpi_bus_register_driver);EXPORT_SYMBOL (acpi_bus_unregister_driver);EXPORT_SYMBOL (acpi_bus_scan); -EXPORT_SYMBOL (acpi_bus_trim);EXPORT_SYMBOL (acpi_bus_add);#endif /*CONFIG_ACPI_BUS*/
drivers/acpi/events/evxfevnt.c renamed from drivers/acpi/events/evxfevnt.c.old +0 -191
200 lines not on this page · raw message
include/acpi/achware.h renamed from include/acpi/achware.h.old +0 -17
@@ -159,21 +159,4 @@ struct acpi_gpe_block_info *gpe_block); -/* ACPI Timer prototypes */ - -acpi_status -acpi_get_timer_resolution ( -u32 *resolution); - -acpi_status -acpi_get_timer ( -u32 *ticks); - -acpi_status -acpi_get_timer_duration ( -u32 start_ticks, -u32 end_ticks, -u32 *time_elapsed); - -#endif /* __ACHWARE_H__ */
drivers/acpi/hardware/Makefile renamed from drivers/acpi/hardware/Makefile.old +1 -1
@@ -2,6 +2,6 @@ # Makefile for all Linux ACPI interpreter subdirectories # -obj-y := hwacpi.o hwgpe.o hwregs.o hwsleep.o hwtimer.o +obj-y := hwacpi.o hwgpe.o hwregs.o hwsleep.o EXTRA_CFLAGS += $(ACPI_CFLAGS)
drivers/acpi/resources/rsxface.c renamed from drivers/acpi/resources/rsxface.c.old +0 -52
58 lines not on this page · raw message
include/acpi/acpi_bus.h renamed from include/acpi/acpi_bus.h.old +0 -1
@@ -328,7 +328,6 @@int acpi_bus_register_driver (struct acpi_driver *driver);int acpi_bus_unregister_driver (struct acpi_driver *driver);int acpi_bus_scan (struct acpi_device *start); -int acpi_bus_trim (struct acpi_device *start,int rmdevice);int acpi_bus_add (struct acpi_device **child,struct acpi_device *parent,acpi_handle handle,int type);
drivers/acpi/scan.c renamed from drivers/acpi/scan.c.old +5 -1
@@ -44,6 +44,10 @@typedef void acpi_device_sysfs_files (struct kobject *,const struct attribute *); +static int +acpi_bus_trim (struct acpi_device *start, +int rmdevice); +static void setup_sys_fs_device_files (struct acpi_device *dev,acpi_device_sysfs_files *func);
@@ -1213,7 +1217,7 @@ } -int +static int acpi_bus_trim (struct acpi_device *start,int rmdevice) {
drivers/acpi/utilities/utxface.c renamed from drivers/acpi/utilities/utxface.c.old +0 -89
95 lines not on this page · raw message
drivers/acpi/hardware/hwtimer.c deleted +0 -200
200 lines not on this page · raw message
Quoted 13 lines · Adrian Bunk
The patch below completely removes 7 functions that were EXPORT_SYMBOL'ed but had exactly zero users in the kernel and makes another one that was previously EXPORT_SYMBOL'ed static.
It also removes another unused global function to completely remove
drivers/acpi/hardware/hwtimer.cwhich contained no function used anywhere in the kernel.Please comment on whether this patch is correct or whether in-kernel users of these functions are pending.
diffstat output:
Quoted 12 lines
drivers/acpi/acpi_ksyms.c | 8 - drivers/acpi/events/evxfevnt.c | 191 ----------------------------- drivers/acpi/hardware/Makefile | 2 drivers/acpi/hardware/hwtimer.c | 200 ------------------------------- drivers/acpi/resources/rsxface.c | 52 -------- drivers/acpi/scan.c | 6 drivers/acpi/utilities/utxface.c | 89 ------------- include/acpi/achware.h | 17 -- include/acpi/acpi_bus.h | 1 include/acpi/acpixf.h | 24 --- 10 files changed, 6 insertions(+), 584 deletions(-)
No, I can't apply this one as-is.
Some of these routines are not called now simply because Linux/ACPI is evolving and we don't yet take advantage of some of the things supported by ACPICA core we use.
thanks,
-Len
Quoted 27 lines · Len Brown
Quoted 13 lines · Adrian Bunk
The patch below completely removes 7 functions that were EXPORT_SYMBOL'ed but had exactly zero users in the kernel and makes another one that was previously EXPORT_SYMBOL'ed static.
It also removes another unused global function to completely remove
drivers/acpi/hardware/hwtimer.cwhich contained no function used anywhere in the kernel.Please comment on whether this patch is correct or whether in-kernel users of these functions are pending.
diffstat output:
Quoted 12 lines
drivers/acpi/acpi_ksyms.c | 8 - drivers/acpi/events/evxfevnt.c | 191 ----------------------------- drivers/acpi/hardware/Makefile | 2 drivers/acpi/hardware/hwtimer.c | 200 ------------------------------- drivers/acpi/resources/rsxface.c | 52 -------- drivers/acpi/scan.c | 6 drivers/acpi/utilities/utxface.c | 89 ------------- include/acpi/achware.h | 17 -- include/acpi/acpi_bus.h | 1 include/acpi/acpixf.h | 24 --- 10 files changed, 6 insertions(+), 584 deletions(-)
Quoted 5 lines
No, I can't apply this one as-is.
Some of these routines are not called now simply because Linux/ACPI is evolving and we don't yet take advantage of some of the things supported by ACPICA core we use.
I understand this, that's why I asked for comments on this patch.
But it seems a bit strange for me that e.g. the file hwtimer.c was added nearly three years ago and exports functions - but currently has exactly zero users. One effect is a needless code bloat for every single user with CONFIG_ACPI_INTERPRETER=y.
Removing unused global functions is a pretty cheap way to get the kernel smaller without any loss of functionality. Please check which of the functions touched in my patch will actually be used in the foreseeable future (if it would e.g. take another three years until hwtimer.c will be used, it might be better to re-add it when it will actually be used).
Quoted 2 lines
thanks,
-Len
cu
Adrian
BTW: ACPI has tons of other unused global functions.
Signature · 4 lines
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon SeedQuoted 37 lines · Adrian Bunk
Quoted 28 lines · Len Brown
Quoted 13 lines · Adrian Bunk
The patch below completely removes 7 functions that were EXPORT_SYMBOL'ed but had exactly zero users in the kernel and makes another one that was previously EXPORT_SYMBOL'ed static.
It also removes another unused global function to completely remove
drivers/acpi/hardware/hwtimer.cwhich contained no function used anywhere in the kernel.Please comment on whether this patch is correct or whether in-kernel users of these functions are pending.
diffstat output:
Quoted 12 lines
drivers/acpi/acpi_ksyms.c | 8 - drivers/acpi/events/evxfevnt.c | 191 ----------------------------- drivers/acpi/hardware/Makefile | 2 drivers/acpi/hardware/hwtimer.c | 200 ------------------------------- drivers/acpi/resources/rsxface.c | 52 -------- drivers/acpi/scan.c | 6 drivers/acpi/utilities/utxface.c | 89 ------------- include/acpi/achware.h | 17 -- include/acpi/acpi_bus.h | 1 include/acpi/acpixf.h | 24 --- 10 files changed, 6 insertions(+), 584 deletions(-)Quoted 5 lines
No, I can't apply this one as-is.
Some of these routines are not called now simply because Linux/ACPI is evolving and we don't yet take advantage of some of the things supported by ACPICA core we use.
Quoted 5 lines
I understand this, that's why I asked for comments on this patch.
But it seems a bit strange for me that e.g. the file
hwtimer.cwas added nearly three years ago and exports functions - but currently has exactly zero users. One effect is a needless code bloat for every single user withCONFIG_ACPI_INTERPRETER=y.Removing unused global functions is a pretty cheap way to get the kernel smaller without any loss of functionality. Please check which of the functions touched in my patch will actually be used in the foreseeable future (if it would e.g. take another three years until
hwtimer.cwill be used, it might be better to re-add it when it will actually be used).
Suggestion that satisfies both of you, I think:
#undef ACPI_FUTURE_USAGE
#ifdef ACPI_FUTURE_USAGE
tons of unused exported functions
#endif /* ACPU_FUTURE_USAGE */
This is what is being done in at least one case in the kernel network subsystem, incremental patches adds new functions, to be used by future patches, but sometimes Real Life (tm) gets in the way and the programmer stalls development for some time, no problem, just ifdef it.
When, in the future, some functions start being used, hey, very easy to remove the #ifdef.
Even for people trying to debug such subsystems eventually to get something working its _nice_ to know at first glance what is really being used, speeding up the process for the benefit or everybody.
Best Regards,
- Arnaldo
Quoted 3 lines
BTW: ACPI has tons of other unused global functions.
And other areas as well, keep up the good work Adrian.
Quoted 13 lines · Arnaldo Carvalho de Melo
Suggestion that satisfies both of you, I think:
#undef
ACPI_FUTURE_USAGE
#ifdefACPI_FUTURE_USAGE
tons of unused exported functions
#endif /*ACPU_FUTURE_USAGE*/This is what is being done in at least one case in the kernel network subsystem, incremental patches adds new functions, to be used by future patches, but sometimes Real Life (tm) gets in the way and the programmer stalls development for some time, no problem, just ifdef it.
Quoted 6 lines
When, in the future, some functions start being used, hey, very easy to remove the #ifdef.
Even for people trying to debug such subsystems eventually to get something working its _nice_ to know at first glance what is really being used, speeding up the process for the benefit or everybody.
That's a good idea.
To make it easier, I could send a patc to move all the ACPI EXPORT_SYMBOL's away from acpi_ksyms.c or you have to touch two files for every function.
@Len:
What's your opinion on this proposal?
Quoted 4 lines
Best Regards,
- Arnaldo
...
cu
Adrian
Signature · 4 lines
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon SeedQuoted 17 lines · Adrian Bunk
Quoted 15 lines · Arnaldo Carvalho de Melo
Suggestion that satisfies both of you, I think:
#undef
ACPI_FUTURE_USAGE
#ifdefACPI_FUTURE_USAGE
tons of unused exported functions
#endif /*ACPU_FUTURE_USAGE*/This is what is being done in at least one case in the kernel network subsystem, incremental patches adds new functions, to be used by future patches, but sometimes Real Life (tm) gets in the way and the programmer stalls development for some time, no problem, just ifdef it.
When, in the future, some functions start being used, hey, very easy to remove the #ifdef.
Quoted 8 lines
Quoted 3 lines
Even for people trying to debug such subsystems eventually to get something working its _nice_ to know at first glance what is really being used, speeding up the process for the benefit or everybody.
That's a good idea.
To make it easier, I could send a patc to move all the ACPI EXPORT_SYMBOL's away from
acpi_ksyms.cor you have to touch two files for every function.
EXPORT_SYMBOL() should be right after the symbol definition, IMHO.
files that exists only to aggregate EXPORT_SYMBOL are a relic of the past and must RIP, away from the kernel. I played the gravedigger for net/netsyms.c and kernel/ksyms.c, I guess Len will not object to you putting acpi_ksyms.c in so friendly company 8-)
- Arnaldo
Quoted 2 lines
@Len:
What's your opinion on this proposal?
Thanks for the suggestion.
I'd certainly accept patches using ACPI_FUTURE_USAGE and moving EXPORT_KSYMS to where they're more easily tracked.
If the motivation is kernel static size reduction, then I'll be interested in seeing a before/after kernel size measurements.
-Len
-------------------------------------------------------
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click
PATCH 1/1 kill acpi_ksyms.c
Quoted 7 lines · Len Brown
Thanks for the suggestion.
I'd certainly accept patches using
ACPI_FUTURE_USAGEand movingEXPORT_KSYMSto where they're more easily tracked.If the motivation is kernel static size reduction, then I'll be interested in seeing a before/after kernel size measurements.
Static size reduction is an important reason.
I'll send you the measurements when I'll have a patch ready.
Below is as a preparation a patch that removes acpi_ksyms.c .
It shouldn't make any practical difference.
The function acpi_db_user_commands that wasn't available in the whole kernel sources was EXPORT_SYMBOL'ed. The patch removes this bogus export.
diffstat output:
drivers/acpi/Makefile | 2 drivers/acpi/acpi_ksyms.c | 165 ------------------------------ drivers/acpi/bus.c | 10 + drivers/acpi/ec.c | 2 drivers/acpi/events/evxface.c | 10 + drivers/acpi/events/evxfevnt.c | 8 + drivers/acpi/events/evxfregn.c | 4 drivers/acpi/hardware/hwregs.c | 4 drivers/acpi/hardware/hwsleep.c | 4 drivers/acpi/hardware/hwtimer.c | 5 drivers/acpi/namespace/nsxfeval.c | 4 drivers/acpi/namespace/nsxfname.c | 4 drivers/acpi/namespace/nsxfobj.c | 5 drivers/acpi/osl.c | 18 +++ drivers/acpi/pci_irq.c | 2 drivers/acpi/pci_root.c | 2 drivers/acpi/resources/rsxface.c | 7 + drivers/acpi/scan.c | 6 - drivers/acpi/tables/tbconvrt.c | 2 drivers/acpi/tables/tbxface.c | 3 drivers/acpi/tables/tbxfroot.c | 2 drivers/acpi/utilities/utdebug.c | 7 + drivers/acpi/utilities/utglobal.c | 4 drivers/acpi/utilities/utxface.c | 2 drivers/acpi/utils.c | 4 include/acpi/acdebug.h | 5 26 files changed, 112 insertions(+), 179 deletions(-)
include/acpi/acdebug.h renamed from include/acpi/acdebug.h.old +0 -5
@@ -386,11 +386,6 @@acpi_db_execute_thread ( void *context); -acpi_status -acpi_db_user_commands ( -char prompt, -union acpi_parse_object *op); -void acpi_db_display_help (char *help_type);
drivers/acpi/osl.c renamed from drivers/acpi/osl.c.old +18 -0
@@ -26,6 +26,7 @@*/ #include <linux/config.h> +#include <linux/module.h> #include <linux/kernel.h> #include <linux/slab.h> #include <linux/mm.h>
@@ -61,8 +62,11 @@#ifdef ENABLE_DEBUGGER #include <linux/kdb.h> +/* stuff for debugger support */ int acpi_in_debugger; +EXPORT_SYMBOL (acpi_in_debugger); +extern char line_buf[80 ];#endif /*ENABLE_DEBUGGER*/
@@ -117,6 +121,7 @@acpi_os_vprintf (fmt, args);va_end (args); } +EXPORT_SYMBOL (acpi_os_printf);void acpi_os_vprintf (const char *fmt,va_list args)
@@ -147,6 +152,7 @@ {kfree (ptr); } +EXPORT_SYMBOL (acpi_os_free);acpi_status acpi_os_get_root_pointer (u32 flags,struct acpi_pointer *addr)
@@ -311,6 +317,7 @@ current->state =TASK_INTERRUPTIBLE ;schedule_timeout (((signed long ) ms *HZ ) /1000 ); } +EXPORT_SYMBOL (acpi_os_sleep);void acpi_os_stall (u32 us)
@@ -325,6 +332,7 @@ us -= delay; } } +EXPORT_SYMBOL (acpi_os_stall);/* * Support ACPI 3.0 AML Timer operand
@@ -377,6 +385,7 @@return AE_OK ; } +EXPORT_SYMBOL (acpi_os_read_port);acpi_status acpi_os_write_port(
@@ -401,6 +410,7 @@return AE_OK ; } +EXPORT_SYMBOL (acpi_os_write_port);acpi_status acpi_os_read_memory(
@@ -519,6 +529,7 @@return (result ?AE_ERROR :AE_OK ); } +EXPORT_SYMBOL (acpi_os_read_pci_configuration);acpi_status acpi_os_write_pci_configuration (struct acpi_pci_id *pci_id,u32 reg,acpi_integer value,u32 width)
@@ -712,6 +723,7 @@return_ACPI_STATUS (status); } +EXPORT_SYMBOL (acpi_os_queue_for_execution);void acpi_os_wait_events_complete(
@@ -719,6 +731,7 @@ {flush_workqueue (kacpid_wq); } +EXPORT_SYMBOL (acpi_os_wait_events_complete);/* * Allocate the memory for a spinlock and initialize it.
@@ -830,6 +843,7 @@return_ACPI_STATUS (AE_OK ); } +EXPORT_SYMBOL (acpi_os_create_semaphore);/*
@@ -856,6 +870,7 @@return_ACPI_STATUS (AE_OK ); } +EXPORT_SYMBOL (acpi_os_delete_semaphore);/*
@@ -945,6 +960,7 @@return_ACPI_STATUS (status); } +EXPORT_SYMBOL (acpi_os_wait_semaphore);/*
@@ -971,6 +987,7 @@return_ACPI_STATUS (AE_OK ); } +EXPORT_SYMBOL (acpi_os_signal_semaphore);u32 acpi_os_get_line (char *buffer)
@@ -1045,6 +1062,7 @@return AE_OK ; } +EXPORT_SYMBOL (acpi_os_signal);int __init acpi_os_name_setup (char *str)
drivers/acpi/utilities/utglobal.c renamed from drivers/acpi/utilities/utglobal.c.old +4 -0
@@ -43,6 +43,8 @@#define DEFINE_ACPI_GLOBALS +#include <linux/module.h> +#include <acpi/acpi.h> #include <acpi/acnamesp.h>
@@ -143,10 +145,12 @@/* Debug switch - level and trace mask */ u32 acpi_dbg_level =ACPI_DEBUG_DEFAULT ; +EXPORT_SYMBOL (acpi_dbg_level);/* Debug switch - layer (component) mask */ u32 acpi_dbg_layer =ACPI_COMPONENT_DEFAULT |ACPI_ALL_DRIVERS ; +EXPORT_SYMBOL (acpi_dbg_layer);u32 acpi_gbl_nesting_level =0 ;
drivers/acpi/utilities/utdebug.c renamed from drivers/acpi/utilities/utdebug.c.old +7 -0
@@ -41,6 +41,7 @@* POSSIBILITY OF SUCH DAMAGES. */ +#include <linux/module.h> #include <acpi/acpi.h>
@@ -178,6 +179,7 @@va_start (args, format);acpi_os_vprintf (format, args); } +EXPORT_SYMBOL (acpi_ut_debug_print);/*****************************************************************************
@@ -219,6 +221,7 @@va_start (args, format);acpi_os_vprintf (format, args); } +EXPORT_SYMBOL (acpi_ut_debug_print_raw);/*****************************************************************************
@@ -250,6 +253,7 @@acpi_ut_debug_print (ACPI_LV_FUNCTIONS , line_number, dbg_info,"%s\n" , acpi_gbl_fn_entry_str); } +EXPORT_SYMBOL (acpi_ut_trace);/*****************************************************************************
@@ -378,6 +382,7 @@ acpi_gbl_nesting_level--; } +EXPORT_SYMBOL (acpi_ut_exit);/*****************************************************************************
@@ -418,6 +423,7 @@ acpi_gbl_nesting_level--; } +EXPORT_SYMBOL (acpi_ut_status_exit);/*****************************************************************************
@@ -451,6 +457,7 @@ acpi_gbl_nesting_level--; } +EXPORT_SYMBOL (acpi_ut_value_exit);/*****************************************************************************
drivers/acpi/namespace/nsxfname.c renamed from drivers/acpi/namespace/nsxfname.c.old +4 -0
@@ -42,6 +42,7 @@* POSSIBILITY OF SUCH DAMAGES. */ +#include <linux/module.h> #include <acpi/acpi.h> #include <acpi/acnamesp.h>
@@ -129,6 +130,7 @@return (status); } +EXPORT_SYMBOL (acpi_get_handle);/******************************************************************************
@@ -210,6 +212,7 @@ (void )acpi_ut_release_mutex (ACPI_MTX_NAMESPACE );return (status); } +EXPORT_SYMBOL (acpi_get_name);/******************************************************************************
@@ -359,4 +362,5 @@ }return (status); } +EXPORT_SYMBOL (acpi_get_object_info);
drivers/acpi/namespace/nsxfobj.c renamed from drivers/acpi/namespace/nsxfobj.c.old +4 -1
@@ -42,6 +42,7 @@* POSSIBILITY OF SUCH DAMAGES. */ +#include <linux/module.h> #include <acpi/acpi.h> #include <acpi/acnamesp.h>
@@ -106,6 +107,7 @@ status =acpi_ut_release_mutex (ACPI_MTX_NAMESPACE );return (status); } +EXPORT_SYMBOL (acpi_get_type);/*******************************************************************************
@@ -171,6 +173,7 @@ (void )acpi_ut_release_mutex (ACPI_MTX_NAMESPACE );return (status); } +EXPORT_SYMBOL (acpi_get_parent);/*******************************************************************************
@@ -255,5 +258,5 @@ (void )acpi_ut_release_mutex (ACPI_MTX_NAMESPACE );return (status); } - +EXPORT_SYMBOL (acpi_get_next_object);
drivers/acpi/namespace/nsxfeval.c renamed from drivers/acpi/namespace/nsxfeval.c.old +4 -0
@@ -42,6 +42,7 @@* POSSIBILITY OF SUCH DAMAGES. */ +#include <linux/module.h> #include <acpi/acpi.h> #include <acpi/acnamesp.h>
@@ -354,6 +355,7 @@return_ACPI_STATUS (status); } +EXPORT_SYMBOL (acpi_evaluate_object);/*******************************************************************************
@@ -426,6 +428,7 @@ (void )acpi_ut_release_mutex (ACPI_MTX_NAMESPACE );return_ACPI_STATUS (status); } +EXPORT_SYMBOL (acpi_walk_namespace);/*******************************************************************************
@@ -599,6 +602,7 @@ (void )acpi_ut_release_mutex (ACPI_MTX_NAMESPACE );return_ACPI_STATUS (status); } +EXPORT_SYMBOL (acpi_get_devices);/*******************************************************************************
drivers/acpi/tables/tbxface.c renamed from drivers/acpi/tables/tbxface.c.old +2 -1
@@ -42,6 +42,7 @@* POSSIBILITY OF SUCH DAMAGES. */ +#include <linux/module.h> #include <acpi/acpi.h> #include <acpi/acnamesp.h>
@@ -439,5 +440,5 @@ACPI_MEMCPY ((void *) ret_buffer->pointer, (void *) tbl_ptr, table_length);return_ACPI_STATUS (AE_OK ); } - +EXPORT_SYMBOL (acpi_get_table);
drivers/acpi/tables/tbxfroot.c renamed from drivers/acpi/tables/tbxfroot.c.old +2 -0
@@ -41,6 +41,7 @@* POSSIBILITY OF SUCH DAMAGES. */ +#include <linux/module.h> #include <acpi/acpi.h> #include <acpi/actables.h>
@@ -321,6 +322,7 @@ }return_ACPI_STATUS (status); } +EXPORT_SYMBOL (acpi_get_firmware_table);/* TBD: Move to a new file */
drivers/acpi/events/evxface.c renamed from drivers/acpi/events/evxface.c.old +9 -1
@@ -41,6 +41,7 @@* POSSIBILITY OF SUCH DAMAGES. */ +#include <linux/module.h> #include <acpi/acpi.h> #include <acpi/acnamesp.h>
@@ -166,6 +167,7 @@ (void )acpi_ut_release_mutex (ACPI_MTX_EVENTS );return_ACPI_STATUS (status); } +EXPORT_SYMBOL (acpi_install_fixed_event_handler);/*******************************************************************************
@@ -223,6 +225,7 @@ (void )acpi_ut_release_mutex (ACPI_MTX_EVENTS );return_ACPI_STATUS (status); } +EXPORT_SYMBOL (acpi_remove_fixed_event_handler);/*******************************************************************************
@@ -392,6 +395,7 @@ (void )acpi_ut_release_mutex (ACPI_MTX_NAMESPACE );return_ACPI_STATUS (status); } +EXPORT_SYMBOL (acpi_install_notify_handler);/*******************************************************************************
@@ -550,6 +554,7 @@ (void )acpi_ut_release_mutex (ACPI_MTX_NAMESPACE );return_ACPI_STATUS (status); } +EXPORT_SYMBOL (acpi_remove_notify_handler);/*******************************************************************************
@@ -647,6 +652,7 @@ (void )acpi_ut_release_mutex (ACPI_MTX_EVENTS );return_ACPI_STATUS (status); } +EXPORT_SYMBOL (acpi_install_gpe_handler);/*******************************************************************************
@@ -749,6 +755,7 @@ (void )acpi_ut_release_mutex (ACPI_MTX_EVENTS );return_ACPI_STATUS (status); } +EXPORT_SYMBOL (acpi_remove_gpe_handler);/*******************************************************************************
@@ -791,6 +798,7 @@return (status); } +EXPORT_SYMBOL (acpi_acquire_global_lock);/*******************************************************************************
@@ -819,5 +827,5 @@ status =acpi_ev_release_global_lock ();return (status); } - +EXPORT_SYMBOL (acpi_release_global_lock);
drivers/acpi/events/evxfregn.c renamed from drivers/acpi/events/evxfregn.c.old +3 -1
@@ -42,6 +42,7 @@* POSSIBILITY OF SUCH DAMAGES. */ +#include <linux/module.h> #include <acpi/acpi.h> #include <acpi/acnamesp.h>
@@ -116,6 +117,7 @@ (void )acpi_ut_release_mutex (ACPI_MTX_NAMESPACE );return_ACPI_STATUS (status); } +EXPORT_SYMBOL (acpi_install_address_space_handler);/*******************************************************************************
@@ -241,5 +243,5 @@ (void )acpi_ut_release_mutex (ACPI_MTX_NAMESPACE );return_ACPI_STATUS (status); } - +EXPORT_SYMBOL (acpi_remove_address_space_handler);
drivers/acpi/events/evxfevnt.c renamed from drivers/acpi/events/evxfevnt.c.old +8 -0
@@ -41,6 +41,7 @@* POSSIBILITY OF SUCH DAMAGES. */ +#include <linux/module.h> #include <acpi/acpi.h> #include <acpi/acevents.h>
@@ -200,6 +201,7 @@return_ACPI_STATUS (status); } +EXPORT_SYMBOL (acpi_enable_event);/*******************************************************************************
@@ -248,6 +250,7 @@ unlock_and_exit:return_ACPI_STATUS (status); } +EXPORT_SYMBOL (acpi_set_gpe_type);/*******************************************************************************
@@ -305,6 +308,7 @@ }return_ACPI_STATUS (status); } +EXPORT_SYMBOL (acpi_enable_gpe);/*******************************************************************************
@@ -417,6 +421,7 @@return_ACPI_STATUS (status); } +EXPORT_SYMBOL (acpi_disable_event);/*******************************************************************************
@@ -456,6 +461,7 @@return_ACPI_STATUS (status); } +EXPORT_SYMBOL (acpi_clear_event);/*******************************************************************************
@@ -705,6 +711,7 @@ (void )acpi_ut_release_mutex (ACPI_MTX_NAMESPACE );return_ACPI_STATUS (status); } +EXPORT_SYMBOL (acpi_install_gpe_block);/*******************************************************************************
@@ -765,4 +772,5 @@ (void )acpi_ut_release_mutex (ACPI_MTX_NAMESPACE );return_ACPI_STATUS (status); } +EXPORT_SYMBOL (acpi_remove_gpe_block);
drivers/acpi/resources/rsxface.c renamed from drivers/acpi/resources/rsxface.c.old +7 -0
@@ -41,6 +41,7 @@* POSSIBILITY OF SUCH DAMAGES. */ +#include <linux/module.h> #include <acpi/acpi.h> #include <acpi/acresrc.h>
@@ -156,6 +157,7 @@ status =acpi_rs_get_crs_method_data (device_handle, ret_buffer);return_ACPI_STATUS (status); } +EXPORT_SYMBOL (acpi_get_current_resources);/*******************************************************************************
@@ -208,6 +210,7 @@ status =acpi_rs_get_prs_method_data (device_handle, ret_buffer);return_ACPI_STATUS (status); } +EXPORT_SYMBOL (acpi_get_possible_resources);/*******************************************************************************
@@ -310,6 +313,7 @@acpi_os_free (buffer.pointer);return_ACPI_STATUS (status); } +EXPORT_SYMBOL (acpi_walk_resources);/*******************************************************************************
@@ -354,6 +358,7 @@ status =acpi_rs_set_srs_method_data (device_handle, in_buffer);return_ACPI_STATUS (status); } +EXPORT_SYMBOL (acpi_set_current_resources);#define ACPI_COPY_FIELD (out, in, field) ((out)->field = (in)->field)
@@ -427,3 +432,5 @@return (AE_OK ); } +EXPORT_SYMBOL (acpi_resource_to_address64); +
drivers/acpi/hardware/hwregs.c renamed from drivers/acpi/hardware/hwregs.c.old +4 -0
@@ -43,6 +43,7 @@* POSSIBILITY OF SUCH DAMAGES. */ +#include <linux/module.h> #include <acpi/acpi.h> #include <acpi/acnamesp.h>
@@ -211,6 +212,7 @@acpi_ut_remove_reference (info.return_object);return_ACPI_STATUS (status); } +EXPORT_SYMBOL (acpi_get_sleep_type_data);/*******************************************************************************
@@ -307,6 +309,7 @@return_ACPI_STATUS (status); } +EXPORT_SYMBOL (acpi_get_register);/*******************************************************************************
@@ -457,6 +460,7 @@ value, register_value, bit_reg_info->parent_register));return_ACPI_STATUS (status); } +EXPORT_SYMBOL (acpi_set_register);/******************************************************************************
drivers/acpi/hardware/hwsleep.c renamed from drivers/acpi/hardware/hwsleep.c.old +4 -0
@@ -42,6 +42,8 @@* POSSIBILITY OF SUCH DAMAGES. */ +#include <linux/module.h> +#include <acpi/acpi.h> #define _COMPONENT ACPI_HARDWARE
@@ -391,6 +393,7 @@return_ACPI_STATUS (AE_OK ); } +EXPORT_SYMBOL (acpi_enter_sleep_state);/******************************************************************************
@@ -456,6 +459,7 @@return_ACPI_STATUS (AE_OK ); } +EXPORT_SYMBOL (acpi_enter_sleep_state_s4bios);/******************************************************************************
drivers/acpi/utilities/utxface.c renamed from drivers/acpi/utilities/utxface.c.old +2 -0
@@ -41,6 +41,7 @@* POSSIBILITY OF SUCH DAMAGES. */ +#include <linux/module.h> #include <acpi/acpi.h> #include <acpi/acevents.h>
@@ -455,6 +456,7 @@return_ACPI_STATUS (AE_OK ); } +EXPORT_SYMBOL (acpi_get_system_info);/*****************************************************************************
drivers/acpi/utils.c renamed from drivers/acpi/utils.c.old +3 -1
@@ -233,6 +233,7 @@return_ACPI_STATUS (AE_OK ); } +EXPORT_SYMBOL (acpi_extract_package); acpi_status
@@ -268,6 +269,7 @@return_ACPI_STATUS (AE_OK ); } +EXPORT_SYMBOL (acpi_evaluate_integer);#if 0
@@ -409,5 +411,5 @@return_ACPI_STATUS (status); } - +EXPORT_SYMBOL (acpi_evaluate_reference);
drivers/acpi/bus.c renamed from drivers/acpi/bus.c.old +10 -0
@@ -22,6 +22,7 @@* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ +#include <linux/module.h> #include <linux/init.h> #include <linux/ioport.h> #include <linux/list.h>
@@ -44,8 +45,11 @@#endif FADT_DESCRIPTOR acpi_fadt; +EXPORT_SYMBOL (acpi_fadt); +struct acpi_device *acpi_root;struct proc_dir_entry *acpi_root_dir; +EXPORT_SYMBOL (acpi_root_dir);#define STRUCT_TO_INT (s) (*((int*)&s))
@@ -76,6 +80,7 @@return_VALUE (0 ); } +EXPORT_SYMBOL (acpi_bus_get_device);int acpi_bus_get_status (
@@ -121,6 +126,7 @@return_VALUE (0 ); } +EXPORT_SYMBOL (acpi_bus_get_status);/* --------------------------------------------------------------------------
@@ -178,6 +184,7 @@return_VALUE (0 ); } +EXPORT_SYMBOL (acpi_bus_get_power);int
@@ -266,6 +273,7 @@return_VALUE (result); } +EXPORT_SYMBOL (acpi_bus_set_power);
@@ -315,6 +323,7 @@return_VALUE (0 ); } +EXPORT_SYMBOL (acpi_bus_generate_event);int acpi_bus_receive_event (
@@ -360,6 +369,7 @@return_VALUE (0 ); } +EXPORT_SYMBOL (acpi_bus_receive_event);/* --------------------------------------------------------------------------
drivers/acpi/tables/tbconvrt.c renamed from drivers/acpi/tables/tbconvrt.c.old +2 -0
@@ -41,6 +41,7 @@* POSSIBILITY OF SUCH DAMAGES. */ +#include <linux/module.h> #include <acpi/acpi.h> #include <acpi/actables.h>
@@ -51,6 +52,7 @@u8 acpi_fadt_is_v1; +EXPORT_SYMBOL (acpi_fadt_is_v1);/******************************************************************************* *
drivers/acpi/scan.c renamed from drivers/acpi/scan.c.old +5 -1
@@ -609,6 +609,7 @@return_VALUE (0 ); } +EXPORT_SYMBOL (acpi_bus_register_driver);/**
@@ -635,6 +636,7 @@ }return_VALUE (0 ); } +EXPORT_SYMBOL (acpi_bus_unregister_driver);/** * acpi_bus_find_driver
@@ -1107,7 +1109,7 @@return_VALUE (result); } - +EXPORT_SYMBOL (acpi_bus_add);int acpi_bus_scan (struct acpi_device *start)
@@ -1211,6 +1213,7 @@return_VALUE (0 ); } +EXPORT_SYMBOL (acpi_bus_scan);int
@@ -1268,6 +1271,7 @@ }return err; } +EXPORT_SYMBOL (acpi_bus_trim);static int acpi_bus_scan_fixed (
drivers/acpi/pci_irq.c renamed from drivers/acpi/pci_irq.c.old +2 -0
@@ -426,3 +426,5 @@return_VALUE (dev->irq); } +EXPORT_SYMBOL (acpi_pci_irq_enable); +
drivers/acpi/pci_root.c renamed from drivers/acpi/pci_root.c.old +2 -0
@@ -90,6 +90,7 @@return n; } +EXPORT_SYMBOL (acpi_pci_register_driver);void acpi_pci_unregister_driver (struct acpi_pci_driver *driver) {
@@ -112,6 +113,7 @@ driver->remove (root->handle); } } +EXPORT_SYMBOL (acpi_pci_unregister_driver);static acpi_status get_root_bridge_busnr_callback (struct acpi_resource *resource,void *data)
drivers/acpi/ec.c renamed from drivers/acpi/ec.c.old +2 -0
@@ -262,6 +262,7 @@else return err; } +EXPORT_SYMBOL (ec_read);int ec_write (u8 addr,u8 val)
@@ -278,6 +279,7 @@return err; } +EXPORT_SYMBOL (ec_write); static int
drivers/acpi/hardware/hwtimer.c renamed from drivers/acpi/hardware/hwtimer.c.old +4 -1
@@ -42,6 +42,8 @@* POSSIBILITY OF SUCH DAMAGES. */ +#include <linux/module.h> +#include <acpi/acpi.h> #define _COMPONENT ACPI_HARDWARE
@@ -112,6 +114,7 @@return_ACPI_STATUS (status); } +EXPORT_SYMBOL (acpi_get_timer);/******************************************************************************
@@ -196,5 +199,5 @@ *time_elapsed = (u32 ) quotient;return_ACPI_STATUS (status); } - +EXPORT_SYMBOL (acpi_get_timer_duration);
drivers/acpi/Makefile renamed from drivers/acpi/Makefile.old +0 -2
@@ -12,8 +12,6 @@ EXTRA_CFLAGS += $(ACPI_CFLAGS) -obj-$(CONFIG_ACPI) := acpi_ksyms.o - # # ACPI Boot-Time Table Parsing #
drivers/acpi/acpi_ksyms.c deleted +0 -165
165 lines not on this page · raw message
Len Brown
AppliedRe: [2.6 patch] kill acpi_ksyms.c
Applied.
thanks,
-Len
On Mon, 2004-11-08 at 20:40, Adrian Bunk wrote:
...
Quoted 30 lines
Below is as a preparation a patch that removes
acpi_ksyms.c.It shouldn't make any practical difference.
The function
acpi_db_user_commandsthat wasn't available in the whole kernel sources was EXPORT_SYMBOL'ed. The patch removes this bogus export.diffstat output:
drivers/acpi/Makefile | 2 drivers/acpi/acpi_ksyms.c | 165 ------------------------------ drivers/acpi/bus.c | 10 + drivers/acpi/ec.c | 2 drivers/acpi/events/evxface.c | 10 + drivers/acpi/events/evxfevnt.c | 8 + drivers/acpi/events/evxfregn.c | 4 drivers/acpi/hardware/hwregs.c | 4 drivers/acpi/hardware/hwsleep.c | 4 drivers/acpi/hardware/hwtimer.c | 5 drivers/acpi/namespace/nsxfeval.c | 4 drivers/acpi/namespace/nsxfname.c | 4 drivers/acpi/namespace/nsxfobj.c | 5 drivers/acpi/osl.c | 18 +++ drivers/acpi/pci_irq.c | 2 drivers/acpi/pci_root.c | 2 drivers/acpi/resources/rsxface.c | 7 + drivers/acpi/scan.c | 6 - drivers/acpi/tables/tbconvrt.c | 2
Quoted 8 lines
drivers/acpi/tables/tbxface.c | 3 drivers/acpi/tables/tbxfroot.c | 2 drivers/acpi/utilities/utdebug.c | 7 + drivers/acpi/utilities/utglobal.c | 4 drivers/acpi/utilities/utxface.c | 2 drivers/acpi/utils.c | 4 include/acpi/acdebug.h | 5 26 files changed, 112 insertions(+), 179 deletions(-)
-------------------------------------------------------
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click
PATCH 1/1 drivers/acpi: #ifdef unused functions away
In reply to Len BrownQuoted 4 lines · Len Brown
Thanks for the suggestion.
I'd certainly accept patches using
ACPI_FUTURE_USAGEand movingEXPORT_KSYMSto where they're more easily tracked.
My ACPI_FUTURE_USAGE patch (applies on top of my previous patch that kills acpi_ksyms.c) is below.
This patch only #ifdef's completely unused code away - it does not make the many global functions only used inside the file they are defined in static.
Quoted 2 lines
If the motivation is kernel static size reduction, then I'll be interested in seeing a before/after kernel size measurements.
(both examples with gcc 3.4.2 on i386 compiled for an Athlon)
Full .config (no module support, _everything_ possible compiled statically into the kernel):
530552 2004-11-10 02:04 drivers/acpi/built-in.o
556195 2004-11-09 22:50 drivers/acpi/built-in.o-before-acpi-cleanup
-> 4.8% space saving
My own kernel (minimum ACPI support statically in the kernel for a proper shutdown of my computer):
250235 2004-11-10 02:08 drivers/acpi/built-in.o
256262 2004-11-10 00:09 drivers/acpi/built-in.o-before-acpi-cleanup
-> 2.4% space saving
The nice thing is that we get these space savings for free.
diffstat output:
drivers/acpi/dispatcher/dsmthdat.c | 3 ++- drivers/acpi/dispatcher/dswstate.c | 10 ++++++++-- drivers/acpi/events/evxface.c | 3 ++- drivers/acpi/events/evxfevnt.c | 7 ++++++- drivers/acpi/executer/exdump.c | 4 ++++ drivers/acpi/hardware/Makefile | 4 +++- drivers/acpi/hardware/hwgpe.c | 3 ++- drivers/acpi/hardware/hwsleep.c | 3 ++- drivers/acpi/namespace/Makefile | 4 +++- drivers/acpi/namespace/nsdump.c | 4 ++++ drivers/acpi/namespace/nsload.c | 4 ++++ drivers/acpi/namespace/nsutils.c | 3 ++- drivers/acpi/namespace/nsxfeval.c | 3 ++- drivers/acpi/osl.c | 6 ++++++ drivers/acpi/parser/pstree.c | 4 +++- drivers/acpi/parser/psutils.c | 2 ++ drivers/acpi/pci_bind.c | 2 ++ drivers/acpi/resources/Makefile | 4 +++- drivers/acpi/resources/rsutils.c | 3 ++- drivers/acpi/resources/rsxface.c | 3 ++- drivers/acpi/tables/tbutils.c | 3 ++- drivers/acpi/tables/tbxface.c | 4 ++++ drivers/acpi/utilities/utalloc.c | 3 ++- drivers/acpi/utilities/utmisc.c | 3 ++- drivers/acpi/utilities/utxface.c | 4 ++++ include/acpi/acdispat.h | 8 ++++++++ include/acpi/achware.h | 5 ++++- include/acpi/acinterp.h | 3 ++- include/acpi/acmacros.h | 8 ++++++++ include/acpi/acnamesp.h | 10 ++++++++++ include/acpi/acparser.h | 4 ++++ include/acpi/acpiosxf.h | 6 ++++++ include/acpi/acpixf.h | 20 ++++++++++++++++++++ include/acpi/acresrc.h | 4 ++++ include/acpi/actables.h | 2 ++ include/acpi/acutils.h | 6 ++++++ include/acpi/platform/acenv.h | 8 ++++++++ 37 files changed, 160 insertions(+), 20 deletions(-)
include/acpi/acdispat.h renamed from include/acpi/acdispat.h.old +8 -0
@@ -62,10 +62,12 @@u32 pop_count, struct acpi_walk_state *walk_state); +#ifdef ACPI_FUTURE_USAGE void *acpi_ds_obj_stack_get_value (u32 index,struct acpi_walk_state *walk_state); +#endif acpi_status acpi_ds_obj_stack_pop_object (
@@ -248,11 +250,13 @@acpi_ds_is_method_value ( union acpi_operand_object *obj_desc); +#ifdef ACPI_FUTURE_USAGE acpi_object_type acpi_ds_method_data_get_type (u16 opcode,u32 index,struct acpi_walk_state *walk_state); +#endif acpi_status acpi_ds_method_data_get_value (
@@ -440,9 +444,11 @@struct acpi_parameter_info *info, u32 pass_number); +#ifdef ACPI_FUTURE_USAGE acpi_status acpi_ds_obj_stack_delete_all (struct acpi_walk_state *walk_state); +#endif acpi_status acpi_ds_obj_stack_pop_and_delete (
@@ -482,6 +488,7 @@acpi_ds_delete_walk_state_cache ( void); +#ifdef ACPI_FUTURE_USAGE acpi_status acpi_ds_result_insert ( void *object,
@@ -493,6 +500,7 @@union acpi_operand_object **object, u32 index, struct acpi_walk_state *walk_state); +#endif acpi_status acpi_ds_result_pop (
drivers/acpi/dispatcher/dsmthdat.c renamed from drivers/acpi/dispatcher/dsmthdat.c.old +2 -1
@@ -350,7 +350,7 @@* RETURN: Data type of current value of the selected Arg or Local * ******************************************************************************/ - +#ifdef ACPI_FUTURE_USAGE acpi_object_type acpi_ds_method_data_get_type ( u16 opcode,
@@ -385,6 +385,7 @@ return_VALUE (ACPI_GET_OBJECT_TYPE (object)); } +#endif /* ACPI_FUTURE_USAGE */ /*******************************************************************************
drivers/acpi/dispatcher/dswstate.c renamed from drivers/acpi/dispatcher/dswstate.c.old +8 -2
@@ -51,6 +51,8 @@ ACPI_MODULE_NAME ("dswstate") +#ifdef ACPI_FUTURE_USAGE +/******************************************************************************* * * FUNCTION: acpi_ds_result_insert
@@ -174,6 +176,8 @@ return (AE_OK); } +#endif /* ACPI_FUTURE_USAGE */ +/******************************************************************************* *
@@ -445,7 +449,7 @@* Should be used with great care, if at all! * ******************************************************************************/ - +#ifdef ACPI_FUTURE_USAGE acpi_status acpi_ds_obj_stack_delete_all (struct acpi_walk_state *walk_state)
@@ -467,6 +471,7 @@ return_ACPI_STATUS (AE_OK); } +#endif /* ACPI_FUTURE_USAGE */ /*******************************************************************************
@@ -687,7 +692,7 @@* be within the range of the current stack pointer. * ******************************************************************************/ - +#ifdef ACPI_FUTURE_USAGE void * acpi_ds_obj_stack_get_value ( u32 index,
@@ -712,6 +717,7 @@return_PTR (walk_state->operands[(acpi_native_uint)(walk_state->num_operands -1 ) - index]); } +#endif /* ACPI_FUTURE_USAGE */ /*******************************************************************************
include/acpi/acpixf.h renamed from include/acpi/acpixf.h.old +20 -0
@@ -70,9 +70,11 @@acpi_terminate ( void); +#ifdef ACPI_FUTURE_USAGE acpi_status acpi_subsystem_status (void ); +#endif acpi_status acpi_enable (
@@ -82,9 +84,11 @@acpi_disable ( void); +#ifdef ACPI_FUTURE_USAGE acpi_status acpi_get_system_info (struct acpi_buffer *ret_buffer); +#endif const char * acpi_format_exception (
@@ -94,10 +98,12 @@acpi_purge_cached_objects ( void); +#ifdef ACPI_FUTURE_USAGE acpi_status acpi_install_initialization_handler (acpi_init_handler handler,u32 function); +#endif /* * ACPI Memory manager
@@ -129,6 +135,7 @@acpi_load_tables ( void); +#ifdef ACPI_FUTURE_USAGE acpi_status acpi_load_table (struct acpi_table_header *table_ptr);
@@ -142,6 +149,7 @@acpi_table_type table_type, u32 instance, struct acpi_table_header *out_table_header); +#endif /* ACPI_FUTURE_USAGE */ acpi_status acpi_get_table (
@@ -218,6 +226,7 @@struct acpi_object_list *parameter_objects, struct acpi_buffer *return_object_buffer); +#ifdef ACPI_FUTURE_USAGE acpi_status acpi_evaluate_object_typed ( acpi_handle object,
@@ -225,6 +234,7 @@struct acpi_object_list *external_params, struct acpi_buffer *return_buffer, acpi_object_type return_type); +#endif acpi_status acpi_get_object_info (
@@ -299,9 +309,11 @@acpi_event_handler address, void *context); +#ifdef ACPI_FUTURE_USAGE acpi_status acpi_install_exception_handler (acpi_exception_handler handler); +#endif /*
@@ -333,6 +345,7 @@u32 event, u32 flags); +#ifdef ACPI_FUTURE_USAGE acpi_status acpi_clear_event (u32 event);
@@ -341,6 +354,7 @@acpi_get_event_status ( u32 event, acpi_event_status *event_status); +#endif /* ACPI_FUTURE_USAGE */ acpi_status acpi_set_gpe_type (
@@ -366,6 +380,7 @@u32 gpe_number, u32 flags); +#ifdef ACPI_FUTURE_USAGE acpi_status acpi_get_gpe_status ( acpi_handle gpe_device,
@@ -383,6 +398,7 @@acpi_status acpi_remove_gpe_block (acpi_handle gpe_device); +#endif /* ACPI_FUTURE_USAGE */ /*
@@ -400,10 +416,12 @@acpi_handle device_handle, struct acpi_buffer *ret_buffer); +#ifdef ACPI_FUTURE_USAGE acpi_status acpi_get_possible_resources (acpi_handle device_handle,struct acpi_buffer *ret_buffer); +#endif acpi_status acpi_walk_resources (
@@ -447,9 +465,11 @@acpi_set_firmware_waking_vector ( acpi_physical_address physical_address); +#ifdef ACPI_FUTURE_USAGE acpi_status acpi_get_firmware_waking_vector (acpi_physical_address *physical_address); +#endif acpi_status acpi_get_sleep_type_data (
drivers/acpi/events/evxface.c renamed from drivers/acpi/events/evxface.c.old +2 -1
@@ -64,7 +64,7 @@* DESCRIPTION: Saves the pointer to the handler function * ******************************************************************************/ - +#ifdef ACPI_FUTURE_USAGE acpi_status acpi_install_exception_handler (acpi_exception_handler handler)
@@ -95,6 +95,7 @@ (void )acpi_ut_release_mutex (ACPI_MTX_EVENTS ); return_ACPI_STATUS (status); } +#endif /* ACPI_FUTURE_USAGE */ /*******************************************************************************
drivers/acpi/events/evxfevnt.c renamed from drivers/acpi/events/evxfevnt.c.old +6 -1
@@ -435,7 +435,7 @@* DESCRIPTION: Clear an ACPI event (fixed) * ******************************************************************************/ - +#ifdef ACPI_FUTURE_USAGE acpi_status acpi_clear_event (u32 event)
@@ -462,6 +462,7 @@ return_ACPI_STATUS (status); }EXPORT_SYMBOL (acpi_clear_event); +#endif /* ACPI_FUTURE_USAGE */ /*******************************************************************************
@@ -518,6 +519,8 @@ } +#ifdef ACPI_FUTURE_USAGE +/******************************************************************************* * * FUNCTION: acpi_get_event_status
@@ -774,3 +777,5 @@ }EXPORT_SYMBOL (acpi_remove_gpe_block); +#endif /* ACPI_FUTURE_USAGE */ +
include/acpi/acinterp.h renamed from include/acpi/acinterp.h.old +2 -1
@@ -504,6 +504,7 @@char *module_name, u32 line_number); +#ifdef ACPI_FUTURE_USAGE void acpi_ex_dump_object_descriptor ( union acpi_operand_object *object,
@@ -533,7 +534,7 @@acpi_ex_out_address ( char *title, acpi_physical_address value); - +#endif /* ACPI_FUTURE_USAGE */ /* * exnames - interpreter/scanner name load/execute
drivers/acpi/executer/exdump.c renamed from drivers/acpi/executer/exdump.c.old +4 -0
@@ -438,6 +438,8 @@ } +#ifdef ACPI_FUTURE_USAGE +/***************************************************************************** * * FUNCTION: acpi_ex_out*
@@ -786,5 +788,7 @@ return_VOID; } +#endif /* ACPI_FUTURE_USAGE */ +#endif
drivers/acpi/hardware/hwsleep.c renamed from drivers/acpi/hardware/hwsleep.c.old +2 -1
@@ -112,7 +112,7 @@* DESCRIPTION: Access function for firmware_waking_vector field in FACS * ******************************************************************************/ - +#ifdef ACPI_FUTURE_USAGE acpi_status acpi_get_firmware_waking_vector (acpi_physical_address *physical_address)
@@ -138,6 +138,7 @@ return_ACPI_STATUS (AE_OK); } +#endif /******************************************************************************
include/acpi/achware.h renamed from include/acpi/achware.h.old +4 -1
@@ -131,10 +131,12 @@struct acpi_gpe_xrupt_info *gpe_xrupt_info, struct acpi_gpe_block_info *gpe_block); +#ifdef ACPI_FUTURE_USAGE acpi_status acpi_hw_get_gpe_status (struct acpi_gpe_event_info *gpe_event_info,acpi_event_status *event_status); +#endif acpi_status acpi_hw_disable_all_gpes (
@@ -161,6 +163,7 @@/* ACPI Timer prototypes */ +#ifdef ACPI_FUTURE_USAGE acpi_status acpi_get_timer_resolution (u32 *resolution);
@@ -174,6 +177,6 @@u32 start_ticks, u32 end_ticks, u32 *time_elapsed); - +#endif /* ACPI_FUTURE_USAGE */ #endif /* __ACHWARE_H__ */
drivers/acpi/hardware/Makefile renamed from drivers/acpi/hardware/Makefile.old +3 -1
@@ -2,6 +2,8 @@ # Makefile for all Linux ACPI interpreter subdirectories # -obj-y := hwacpi.o hwgpe.o hwregs.o hwsleep.o hwtimer.o +obj-y := hwacpi.o hwgpe.o hwregs.o hwsleep.o + +obj-$(ACPI_FUTURE_USAGE) += hwtimer.o EXTRA_CFLAGS += $(ACPI_CFLAGS)
include/acpi/acmacros.h renamed from include/acpi/acmacros.h.old +8 -0
@@ -538,7 +538,11 @@#define ACPI_DUMP_ENTRY (a,b) acpi_ns_dump_entry (a,b) + +#ifdef ACPI_FUTURE_USAGE #define ACPI_DUMP_TABLES (a,b) acpi_ns_dump_tables(a,b) +#endif +#define ACPI_DUMP_PATHNAME (a,b,c,d) acpi_ns_dump_pathname(a,b,c,d)#define ACPI_DUMP_RESOURCE_LIST (a) acpi_rs_dump_resource_list(a)#define ACPI_DUMP_BUFFER (a,b) acpi_ut_dump_buffer((u8 *)a,b,DB_BYTE_DISPLAY,_COMPONENT)
@@ -591,7 +595,11 @@#define ACPI_DUMP_STACK_ENTRY (a)#define ACPI_DUMP_OPERANDS (a,b,c,d,e)#define ACPI_DUMP_ENTRY (a,b) + +#ifdef ACPI_FUTURE_USAGE #define ACPI_DUMP_TABLES (a,b) +#endif +#define ACPI_DUMP_PATHNAME (a,b,c,d)#define ACPI_DUMP_RESOURCE_LIST (a)#define ACPI_DUMP_BUFFER (a,b)
include/acpi/acnamesp.h renamed from include/acpi/acnamesp.h.old +10 -0
@@ -210,6 +210,7 @@* Namespace modification - nsmodify */ +#ifdef ACPI_FUTURE_USAGE acpi_status acpi_ns_unload_namespace (acpi_handle handle);
@@ -217,16 +218,19 @@acpi_status acpi_ns_delete_subtree (acpi_handle start_handle); +#endif /* * Namespace dump/print utilities - nsdump */ +#ifdef ACPI_FUTURE_USAGE void acpi_ns_dump_tables (acpi_handle search_base,u32 max_depth); +#endif void acpi_ns_dump_entry (
@@ -245,6 +249,7 @@u32 num_segments, char *pathname); +#ifdef ACPI_FUTURE_USAGE acpi_status acpi_ns_dump_one_device ( acpi_handle obj_handle,
@@ -255,6 +260,7 @@void acpi_ns_dump_root_devices (void ); +#endif /* ACPI_FUTURE_USAGE */ acpi_status acpi_ns_dump_one_object (
@@ -263,6 +269,7 @@void *context, void **return_value); +#ifdef ACPI_FUTURE_USAGE void acpi_ns_dump_objects ( acpi_object_type type,
@@ -270,6 +277,7 @@u32 max_depth, u32 ownder_id, acpi_handle start_handle); +#endif /*
@@ -303,9 +311,11 @@* Parent/Child/Peer utility functions */ +#ifdef ACPI_FUTURE_USAGE acpi_name acpi_ns_find_parent_name (struct acpi_namespace_node *node_to_search); +#endif /*
drivers/acpi/namespace/nsdump.c renamed from drivers/acpi/namespace/nsdump.c.old +4 -0
@@ -550,6 +550,8 @@ } +#ifdef ACPI_FUTURE_USAGE +/******************************************************************************* * * FUNCTION: acpi_ns_dump_objects
@@ -635,6 +637,8 @@ return_VOID; } +#endif /* ACPI_FUTURE_USAGE */ +/******************************************************************************* *
drivers/acpi/namespace/Makefile renamed from drivers/acpi/namespace/Makefile.old +3 -1
@@ -2,9 +2,11 @@ # Makefile for all Linux ACPI interpreter subdirectories # -obj-y := nsaccess.o nsdumpdv.o nsload.o nssearch.o nsxfeval.o \ +obj-y := nsaccess.o nsload.o nssearch.o nsxfeval.o \ nsalloc.o nseval.o nsnames.o nsutils.o nsxfname.o \ nsdump.o nsinit.o nsobject.o nswalk.o nsxfobj.o \ nsparse.o +obj-$(ACPI_FUTURE_USAGE) += nsdumpdv.o + EXTRA_CFLAGS += $(ACPI_CFLAGS)
drivers/acpi/namespace/nsload.c renamed from drivers/acpi/namespace/nsload.c.old +4 -0
@@ -321,6 +321,8 @@ } +#ifdef ACPI_FUTURE_USAGE +/******************************************************************************* * * FUNCTION: acpi_ns_delete_subtree
@@ -452,5 +454,7 @@return_ACPI_STATUS (status); } +#endif /* ACPI_FUTURE_USAGE */ +#endif
drivers/acpi/namespace/nsutils.c renamed from drivers/acpi/namespace/nsutils.c.old +2 -1
@@ -961,7 +961,7 @@* (which "should not happen"). * ******************************************************************************/ - +#ifdef ACPI_FUTURE_USAGE acpi_name acpi_ns_find_parent_name (struct acpi_namespace_node *child_node)
@@ -994,6 +994,7 @@ return_VALUE (ACPI_UNKNOWN_NAME); } +#endif /*******************************************************************************
drivers/acpi/namespace/nsxfeval.c renamed from drivers/acpi/namespace/nsxfeval.c.old +2 -1
@@ -73,7 +73,7 @@* be valid (non-null) * ******************************************************************************/ - +#ifdef ACPI_FUTURE_USAGE acpi_status acpi_evaluate_object_typed ( acpi_handle handle,
@@ -144,6 +144,7 @@ return_buffer->length =0 ; return_ACPI_STATUS (AE_TYPE); } +#endif /* ACPI_FUTURE_USAGE */ /*******************************************************************************
include/acpi/acpiosxf.h renamed from include/acpi/acpiosxf.h.old +6 -0
@@ -176,10 +176,12 @@void __iomem *logical_address, acpi_size size); +#ifdef ACPI_FUTURE_USAGE acpi_status acpi_os_get_physical_address (void *logical_address,acpi_physical_address *physical_address); +#endif /*
@@ -302,10 +304,12 @@void *pointer, acpi_size length); +#ifdef ACPI_FUTURE_USAGE u8 acpi_os_writable (void *pointer,acpi_size length); +#endif u64 acpi_os_get_timer (
@@ -339,9 +343,11 @@* Debug input */ +#ifdef ACPI_FUTURE_USAGE u32 acpi_os_get_line (char *buffer); +#endif /*
drivers/acpi/osl.c renamed from drivers/acpi/osl.c.old +6 -0
@@ -211,6 +211,7 @@iounmap (virt); } +#ifdef ACPI_FUTURE_USAGE acpi_status acpi_os_get_physical_address (void *virt,acpi_physical_address *phys) {
@@ -221,6 +222,7 @@ return AE_OK; } +#endif #define ACPI_MAX_OVERRIDE_LEN 100
@@ -989,6 +991,7 @@ }EXPORT_SYMBOL (acpi_os_signal_semaphore); +#ifdef ACPI_FUTURE_USAGE u32 acpi_os_get_line (char *buffer) {
@@ -1007,6 +1010,7 @@ return 0; } +#endif /* ACPI_FUTURE_USAGE */ /* Assumes no unreadable holes inbetween */ u8
@@ -1019,6 +1023,7 @@return 1 ; } +#ifdef ACPI_FUTURE_USAGE u8 acpi_os_writable (void *ptr,acpi_size len) {
@@ -1026,6 +1031,7 @@The later may be difficult at early boot when kmap doesn't work yet. */ return 1; } +#endif u32 acpi_os_get_thread_id (void )
include/acpi/acparser.h renamed from include/acpi/acparser.h.old +4 -0
@@ -247,6 +247,7 @@union acpi_parse_object *op, u32 argn); +#ifdef ACPI_FUTURE_USAGE union acpi_parse_object *acpi_ps_get_child (union acpi_parse_object *op);
@@ -255,6 +256,7 @@acpi_ps_get_depth_next ( union acpi_parse_object *origin, union acpi_parse_object *op); +#endif /* ACPI_FUTURE_USAGE */ /* pswalk - parse tree walk routines */
@@ -313,9 +315,11 @@acpi_ps_is_prefix_char ( u32 c); +#ifdef ACPI_FUTURE_USAGE u32 acpi_ps_get_name (union acpi_parse_object *op); +#endif void acpi_ps_set_name(
drivers/acpi/parser/pstree.c renamed from drivers/acpi/parser/pstree.c.old +3 -1
@@ -181,6 +181,8 @@ } +#ifdef ACPI_FUTURE_USAGE +/******************************************************************************* * * FUNCTION: acpi_ps_get_child
@@ -192,7 +194,6 @@* DESCRIPTION: Get op's children or NULL if none * ******************************************************************************/ -union acpi_parse_object *acpi_ps_get_child (union acpi_parse_object *op)
@@ -322,4 +323,5 @@ return (next); } +#endif /* ACPI_FUTURE_USAGE */
drivers/acpi/parser/psutils.c renamed from drivers/acpi/parser/psutils.c.old +2 -0
@@ -267,6 +267,7 @@/* * Get op's name (4-byte name segment) or 0 if unnamed */ +#ifdef ACPI_FUTURE_USAGE u32 acpi_ps_get_name (union acpi_parse_object *op)
@@ -283,6 +284,7 @@ return (op->named.name); } +#endif /* ACPI_FUTURE_USAGE */ /*
drivers/acpi/pci_bind.c renamed from drivers/acpi/pci_bind.c.old +2 -0
@@ -67,6 +67,7 @@* to resolve PCI information for ACPI-PCI devices defined in the namespace. * This typically occurs when resolving PCI operation region information. */ +#ifdef ACPI_FUTURE_USAGE acpi_status acpi_os_get_pci_id ( acpi_handle handle,
@@ -114,6 +115,7 @@ return_ACPI_STATUS(AE_OK); } +#endif /* ACPI_FUTURE_USAGE */ int
include/acpi/acresrc.h renamed from include/acpi/acresrc.h.old +4 -0
@@ -60,10 +60,12 @@acpi_handle handle, struct acpi_buffer *ret_buffer); +#ifdef ACPI_FUTURE_USAGE acpi_status acpi_rs_get_prs_method_data (acpi_handle handle,struct acpi_buffer *ret_buffer); +#endif acpi_status acpi_rs_get_method_data (
@@ -95,6 +97,7 @@/* * Function prototypes called from acpi_rs_create* */ +#ifdef ACPI_FUTURE_USAGE void acpi_rs_dump_irq (union acpi_resource_data *data);
@@ -154,6 +157,7 @@void acpi_rs_dump_irq_list (u8 *route_table); +#endif /* ACPI_FUTURE_USAGE */ acpi_status acpi_rs_get_byte_stream_start (
drivers/acpi/resources/rsxface.c renamed from drivers/acpi/resources/rsxface.c.old +2 -1
@@ -180,7 +180,7 @@* and the value of ret_buffer is undefined. * ******************************************************************************/ - +#ifdef ACPI_FUTURE_USAGE acpi_status acpi_get_possible_resources ( acpi_handle device_handle,
@@ -211,6 +211,7 @@ return_ACPI_STATUS (status); }EXPORT_SYMBOL (acpi_get_possible_resources); +#endif /* ACPI_FUTURE_USAGE */ /*******************************************************************************
include/acpi/actables.h renamed from include/acpi/actables.h.old +2 -0
@@ -50,10 +50,12 @@#define SIZE_IN_HEADER 0 +#ifdef ACPI_FUTURE_USAGE acpi_status acpi_tb_handle_to_object (u16 table_id,struct acpi_table_desc **table_desc); +#endif /* * tbconvrt - Table conversion routines
drivers/acpi/tables/tbutils.c renamed from drivers/acpi/tables/tbutils.c.old +2 -1
@@ -62,7 +62,7 @@* return a pointer to that table descriptor. * ******************************************************************************/ - +#ifdef ACPI_FUTURE_USAGE acpi_status acpi_tb_handle_to_object ( u16 table_id,
@@ -90,6 +90,7 @@ACPI_DEBUG_PRINT ((ACPI_DB_ERROR ,"table_id=%X does not exist\n" , table_id)); return (AE_BAD_PARAMETER); } +#endif /* ACPI_FUTURE_USAGE */ /*******************************************************************************
drivers/acpi/tables/tbxface.c renamed from drivers/acpi/tables/tbxface.c.old +4 -0
@@ -138,6 +138,8 @@ } +#ifdef ACPI_FUTURE_USAGE +/******************************************************************************* * * FUNCTION: acpi_load_table
@@ -344,6 +346,8 @@ } +#endif /* ACPI_FUTURE_USAGE */ +/******************************************************************************* * * FUNCTION: acpi_get_table
include/acpi/acutils.h renamed from include/acpi/acutils.h.old +6 -0
@@ -666,12 +666,14 @@u16 action, union acpi_generic_state **state_list); +#ifdef ACPI_FUTURE_USAGE acpi_status acpi_ut_create_pkg_state_and_push (void *internal_object,void *external_object,u16 index,union acpi_generic_state **state_list); +#endif union acpi_generic_state * acpi_ut_create_control_state (
@@ -730,9 +732,11 @@#define ACPI_ANY_BASE 0 +#ifdef ACPI_FUTURE_USAGE char *acpi_ut_strupr (char *src_string); +#endif u8 * acpi_ut_get_resource_end_tag (
@@ -851,9 +855,11 @@char *module, u32 line); +#ifdef ACPI_FUTURE_USAGE void acpi_ut_dump_allocation_info (void ); +#endif void acpi_ut_dump_allocations (
drivers/acpi/utilities/utalloc.c renamed from drivers/acpi/utilities/utalloc.c.old +2 -1
@@ -818,7 +818,7 @@* DESCRIPTION: Print some info about the outstanding allocations. * ******************************************************************************/ - +#ifdef ACPI_FUTURE_USAGE void acpi_ut_dump_allocation_info (void )
@@ -864,6 +864,7 @@*/ return_VOID; } +#endif /* ACPI_FUTURE_USAGE */ /*******************************************************************************
drivers/acpi/utilities/utmisc.c renamed from drivers/acpi/utilities/utmisc.c.old +2 -1
@@ -488,7 +488,7 @@* DESCRIPTION: Convert string to uppercase * ******************************************************************************/ - +#ifdef ACPI_FUTURE_USAGE char *acpi_ut_strupr (char *src_string)
@@ -508,6 +508,7 @@ return (src_string); } +#endif /* ACPI_FUTURE_USAGE */ /*******************************************************************************
include/acpi/platform/acenv.h renamed from include/acpi/platform/acenv.h.old +8 -0
@@ -223,7 +223,11 @@*/ #define ACPI_STRSTR (s1,s2) strstr((s1), (s2)) + +#ifdef ACPI_FUTURE_USAGE #define ACPI_STRUPR (s) (void) acpi_ut_strupr ((s)) +#endif +#define ACPI_STRLEN (s) (acpi_size) strlen((s))#define ACPI_STRCPY (d,s) (void) strcpy((d), (s))#define ACPI_STRNCPY (d,s,n) (void) strncpy((d), (s), (acpi_size)(n))
@@ -287,7 +291,11 @@#define ACPI_STRSTR (s1,s2) acpi_ut_strstr ((s1), (s2)) + +#ifdef ACPI_FUTURE_USAGE #define ACPI_STRUPR (s) (void) acpi_ut_strupr ((s)) +#endif +#define ACPI_STRLEN (s) (acpi_size) acpi_ut_strlen ((s))#define ACPI_STRCPY (d,s) (void) acpi_ut_strcpy ((d), (s))#define ACPI_STRNCPY (d,s,n) (void) acpi_ut_strncpy ((d), (s), (acpi_size)(n))
drivers/acpi/utilities/utxface.c renamed from drivers/acpi/utilities/utxface.c.old +4 -0
@@ -343,6 +343,8 @@ } +#ifdef ACPI_FUTURE_USAGE +/***************************************************************************** * * FUNCTION: acpi_subsystem_status
@@ -491,6 +493,8 @@ return AE_OK; } +#endif /* ACPI_FUTURE_USAGE */ +/***************************************************************************** *
drivers/acpi/resources/Makefile renamed from drivers/acpi/resources/Makefile.old +3 -1
@@ -3,6 +3,8 @@ # obj-y := rsaddr.o rscreate.o rsio.o rslist.o rsmisc.o rsxface.o \ - rscalc.o rsdump.o rsirq.o rsmemory.o rsutils.o + rscalc.o rsirq.o rsmemory.o rsutils.o + +obj-$(ACPI_FUTURE_USAGE) += rsdump.o EXTRA_CFLAGS += $(ACPI_CFLAGS)
drivers/acpi/hardware/hwgpe.c renamed from drivers/acpi/hardware/hwgpe.c.old +2 -1
@@ -135,7 +135,7 @@* DESCRIPTION: Return the status of a single GPE. * ******************************************************************************/ - +#ifdef ACPI_FUTURE_USAGE acpi_status acpi_hw_get_gpe_status ( struct acpi_gpe_event_info *gpe_event_info,
@@ -194,6 +194,7 @@ unlock_and_exit: return (status); } +#endif /* ACPI_FUTURE_USAGE */ /******************************************************************************
drivers/acpi/resources/rsutils.c renamed from drivers/acpi/resources/rsutils.c.old +2 -1
@@ -175,7 +175,7 @@* and the contents of the callers buffer is undefined. * ******************************************************************************/ - +#ifdef ACPI_FUTURE_USAGE acpi_status acpi_rs_get_prs_method_data ( acpi_handle handle,
@@ -210,6 +210,7 @@acpi_ut_remove_reference (obj_desc); return_ACPI_STATUS (status); } +#endif /* ACPI_FUTURE_USAGE */ /*******************************************************************************
-------------------------------------------------------
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click
Re: [ACPI] [2.6 patch] drivers/acpi: #ifdef unused functions away
Quoted 3 lines · Adrian Bunk
This patch only #ifdef's completely unused code away - it does not make the many global functions only used inside the file they are defined in static.
It also ifdefs out the acpi_install_gpe_handler and acpi_remove_gpe_handler calls I use in the driver I posted on Sunday. Please fix this.
Signature · 13 lines
"Next the statesmen will invent cheap lies, putting the blame upon the nation that is attacked, and every man will be glad of those conscience-soothing falsities, and will diligently study them, and refuse to examine any refutations of them; and thus he will by and by convince himself that the war is just, and will thank God for the better sleep he enjoys after this process of grotesque self-deception." -- Mark Twain ------------------------------------------------------- This SF.Net email is sponsored by: Sybase ASE Linux Express Edition - download now for FREE LinuxWorld Reader's Choice Award Winner for best database on Linux. http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click
Re: [ACPI] [2.6 patch] drivers/acpi: #ifdef unused functions away
Quoted 7 lines · Matthew Wilcox
Quoted 3 lines · Adrian Bunk
This patch only #ifdef's completely unused code away - it does not make the many global functions only used inside the file they are defined in static.
It also ifdefs out the
acpi_install_gpe_handlerandacpi_remove_gpe_handlercalls I use in the driver I posted on Sunday. Please fix this.
????
My patch doesn't #ifdef these functions away.
cu
Adrian
Signature · 12 lines
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed
-------------------------------------------------------
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE
LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=clickRe: [ACPI] [2.6 patch] drivers/acpi: #ifdef unused functions away
Quoted 6 lines · Adrian Bunk
Quoted 5 lines · Matthew Wilcox
Quoted 3 lines · Adrian Bunk
This patch only #ifdef's completely unused code away - it does not make the many global functions only used inside the file they are defined in static.
Quoted 6 lines
Quoted 2 lines
It also ifdefs out the
acpi_install_gpe_handlerandacpi_remove_gpe_handlercalls I use in the driver I posted on Sunday. Please fix this.????
My patch doesn't #ifdef these functions away.
Sorry, acpi_remove_gpe_block, not acpi_remove_gpe_handler:
@@ -383,6 +398,7 @@
acpi_status
acpi_remove_gpe_block (
acpi_handle gpe_device);
+#endif /* ACPI_FUTURE_USAGE */
Signature · 13 lines
"Next the statesmen will invent cheap lies, putting the blame upon the nation that is attacked, and every man will be glad of those conscience-soothing falsities, and will diligently study them, and refuse to examine any refutations of them; and thus he will by and by convince himself that the war is just, and will thank God for the better sleep he enjoys after this process of grotesque self-deception." -- Mark Twain ------------------------------------------------------- This SF.Net email is sponsored by: Sybase ASE Linux Express Edition - download now for FREE LinuxWorld Reader's Choice Award Winner for best database on Linux. http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click
Re: [ACPI] [2.6 patch] drivers/acpi: #ifdef unused functions away
Quoted 17 lines · Matthew Wilcox
Quoted 6 lines · Adrian Bunk
Quoted 5 lines · Matthew Wilcox
Quoted 3 lines · Adrian Bunk
This patch only #ifdef's completely unused code away - it does not make the many global functions only used inside the file they are defined in static.
Quoted 6 lines
Quoted 2 lines
It also ifdefs out the
acpi_install_gpe_handlerandacpi_remove_gpe_handlercalls I use in the driver I posted on Sunday. Please fix this.????
My patch doesn't #ifdef these functions away.
Sorry,
acpi_remove_gpe_block, notacpi_remove_gpe_handler:
include/acpi/acpixf.h line 401
Quoted 4 lines
include/acpi/acpixf.h renamed from include/acpi/acpixf.h.old +1
-0@@ -383,6 +398,7 @@acpi_status acpi_remove_gpe_block (acpi_handle gpe_device); +#endif /* ACPI_FUTURE_USAGE */
I didn't saw your patch on linux-kernel, and although Len has said that he'd apply my patches I have yet to hear an answer indicating either problems in my patches or that he'd applied them.
Did Len already integrate your driver into his tree?
If yes, I will correct the acpi_remove_gpe_block case (it's only this one function?) as soon as his tree appears in the next -mm.
cu
Adrian
Signature · 12 lines
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed
-------------------------------------------------------
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE
LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=clickRe: [ACPI] [2.6 patch] drivers/acpi: #ifdef unused functions away
Quoted 1 line · Adrian Bunk
I didn't saw your patch on linux-kernel
I didn't send it to linux-kernel; only acpi-devel and linux-ia64.
Quoted 1 line
Did Len already integrate your driver into his tree?
No, I just sent him a reminder today.
Quoted 2 lines
If yes, I will correct the
acpi_remove_gpe_blockcase (it's only this one function?) as soon as his tree appears in the next -mm.
acpi_remove_gpe_block and acpi_install_gpe_block.
Signature · 13 lines
"Next the statesmen will invent cheap lies, putting the blame upon the nation that is attacked, and every man will be glad of those conscience-soothing falsities, and will diligently study them, and refuse to examine any refutations of them; and thus he will by and by convince himself that the war is just, and will thank God for the better sleep he enjoys after this process of grotesque self-deception." -- Mark Twain ------------------------------------------------------- This SF.Net email is sponsored by: Sybase ASE Linux Express Edition - download now for FREE LinuxWorld Reader's Choice Award Winner for best database on Linux. http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click
Re: [ACPI] [2.6 patch] drivers/acpi: #ifdef unused functions away
Quoted 7 lines · Matthew Wilcox
Quoted 1 line · Adrian Bunk
If yes, I will correct the
acpi_remove_gpe_blockcase (it's onlythis
Quoted 1 line
one function?) as soon as his tree appears in the next -mm.
acpi_remove_gpe_blockandacpi_install_gpe_block.
No problem, both of these patches are on my list for today and I'll fix this minor conflict.
thanks,
-Len
-------------------------------------------------------
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click
Hi!
Quoted 26 lines
Quoted 13 lines
The patch below completely removes 7 functions that were EXPORT_SYMBOL'ed but had exactly zero users in the kernel and makes another one that was previously EXPORT_SYMBOL'ed static.
It also removes another unused global function to completely remove
drivers/acpi/hardware/hwtimer.cwhich contained no function used anywhere in the kernel.Please comment on whether this patch is correct or whether in-kernel users of these functions are pending.
diffstat output:
Quoted 12 lines
drivers/acpi/acpi_ksyms.c | 8 - drivers/acpi/events/evxfevnt.c | 191 ----------------------------- drivers/acpi/hardware/Makefile | 2 drivers/acpi/hardware/hwtimer.c | 200 ------------------------------- drivers/acpi/resources/rsxface.c | 52 -------- drivers/acpi/scan.c | 6 drivers/acpi/utilities/utxface.c | 89 ------------- include/acpi/achware.h | 17 -- include/acpi/acpi_bus.h | 1 include/acpi/acpixf.h | 24 --- 10 files changed, 6 insertions(+), 584 deletions(-)
Quoted 5 lines
No, I can't apply this one as-is.
Some of these routines are not called now simply because Linux/ACPI is evolving and we don't yet take advantage of some of the things supported by ACPICA core we use.
I believe right thing to do is remove them now, and re-add them later (if they are ever needed).
Single line patch somewhere which happens to pull whole evxfevnt.c would be pretty "expensive", but would not certainly look so...
Pavel
Signature · 9 lines
People were complaining that M$ turns users into beta-testers... ...jr ghea gurz vagb qrirybcref, naq gurl frrz gb yvxr vg gung jnl! ------------------------------------------------------- This SF.Net email is sponsored by: Sybase ASE Linux Express Edition - download now for FREE LinuxWorld Reader's Choice Award Winner for best database on Linux. http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click
include/acpi/acpixf.h line 386
Quoted 11 lines · Adrian Bunk
include/acpi/acpixf.h renamed from include/acpi/acpixf.h.old +0
-11-acpi_status -acpi_install_gpe_block ( -acpi_handle gpe_device, -struct acpi_generic_address *gpe_block_address, -u32 register_count, -u32 interrupt_level); - -acpi_status -acpi_remove_gpe_block ( -acpi_handle gpe_device); -
I just wrote a driver that uses these two. Probably best if you refer to
http://developer.intel.com/technology/iapc/acpi/downloads/ACPICA-ProgRef.pdf
before deleting "unused" functions as these are part of the published interfaces that the ACPICA provides.
Signature · 6 lines
"Next the statesmen will invent cheap lies, putting the blame upon the nation that is attacked, and every man will be glad of those conscience-soothing falsities, and will diligently study them, and refuse to examine any refutations of them; and thus he will by and by convince himself that the war is just, and will thank God for the better sleep he enjoys after this process of grotesque self-deception." -- Mark Twain
Quoted 17 lines · Matthew Wilcox
include/acpi/acpixf.h line 386
Quoted 11 lines · Adrian Bunk
include/acpi/acpixf.h renamed from include/acpi/acpixf.h.old +0
-11-acpi_status -acpi_install_gpe_block ( -acpi_handle gpe_device, -struct acpi_generic_address *gpe_block_address, -u32 register_count, -u32 interrupt_level); - -acpi_status -acpi_remove_gpe_block ( -acpi_handle gpe_device); -I just wrote a driver that uses these two. Probably best if you refer to
http://developer.intel.com/technology/iapc/acpi/downloads/ACPICA-ProgRef.pdf
before deleting "unused" functions as these are part of the published interfaces that the ACPICA provides.
If an in-kernel usage for some of the functions is coming soon simply ignore these parts of my patch.
But if there's EXPORT_SYMBOL'ed code since nearly since nearly three years in the kernel that has like drivers/acpi/hardware/hwtimer.c exactly zero users, the only effect of this code is a code bloat for all users of ACPI.
Prehaps #ifdef 0's are the best solution for published but unused interfaces?
cu
Adrian
Signature · 4 lines
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed