From ff3f8c85c3f2098af3ffc8330b3a6cf636035edf Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Mon, 28 May 2007 15:51:01 +0000 Subject: 2007-05-28 Joel Sherrill * libmisc/Makefile.am, libmisc/monitor/mon-object.c, libmisc/monitor/monitor.h, sapi/include/confdefs.h, sapi/include/rtems/config.h, sapi/include/rtems/io.h, sapi/src/exinit.c, sapi/src/io.c: Eliminate maximum_drivers configuration parameter since it was used to configure a no longer used feature. Device names are now part of the filesystem not in a table. This also eliminated the variables _IO_Number_of_devices and _IO_Driver_name_table from RTEMS as well as the memory allocation used to populate _IO_Driver_name_table. * libmisc/monitor/mon-dname.c: Removed. --- cpukit/sapi/include/confdefs.h | 12 +++---- cpukit/sapi/include/rtems/config.h | 29 ++++++++-------- cpukit/sapi/include/rtems/io.h | 5 +-- cpukit/sapi/src/exinit.c | 3 +- cpukit/sapi/src/io.c | 71 +------------------------------------- 5 files changed, 22 insertions(+), 98 deletions(-) (limited to 'cpukit/sapi') diff --git a/cpukit/sapi/include/confdefs.h b/cpukit/sapi/include/confdefs.h index 900e3af759..13f1946128 100644 --- a/cpukit/sapi/include/confdefs.h +++ b/cpukit/sapi/include/confdefs.h @@ -340,10 +340,13 @@ rtems_driver_address_table Device_drivers[] = { /* * Default the number of devices per device driver. This value may be * overridden by the user. + * + * NOTE: This configuration parameter is obsolete. Thus we will warn the + * user that it is obsolete. */ -#ifndef CONFIGURE_MAXIMUM_DEVICES -#define CONFIGURE_MAXIMUM_DEVICES 20 +#ifdef CONFIGURE_MAXIMUM_DEVICES +#warning "CONFIGURE_MAXIMUM_DEVICES is obsolete. Do not use any longer." #endif #ifdef CONFIGURE_APPLICATION_NEEDS_ATA_DRIVER @@ -974,9 +977,6 @@ itron_initialization_tasks_table ITRON_Initialization_tasks[] = { ( (_extensions) * \ ( sizeof(Extension_Control) + CONFIGURE_OBJECT_TABLE_STUFF ) ) -#define CONFIGURE_MEMORY_FOR_DEVICES(_devices) \ - (((_devices) + 1) * ( sizeof(rtems_driver_name_t) ) ) - #ifdef CONFIGURE_MP_APPLICATION #ifndef CONFIGURE_HAS_OWN_MULTIPROCESING_TABLE @@ -1079,7 +1079,6 @@ itron_initialization_tasks_table ITRON_Initialization_tasks[] = { CONFIGURE_MEMORY_FOR_USER_EXTENSIONS( \ CONFIGURE_MAXIMUM_USER_EXTENSIONS + CONFIGURE_NEWLIB_EXTENSION + \ CONFIGURE_STACK_CHECKER_EXTENSION ) + \ - CONFIGURE_MEMORY_FOR_DEVICES(CONFIGURE_MAXIMUM_DEVICES) + \ CONFIGURE_MEMORY_FOR_MP + \ CONFIGURE_MEMORY_FOR_SYSTEM_OVERHEAD + \ CONFIGURE_MESSAGE_BUFFER_MEMORY + \ @@ -1175,7 +1174,6 @@ rtems_configuration_table Configuration = { CONFIGURE_STACK_CHECKER_EXTENSION, CONFIGURE_MICROSECONDS_PER_TICK, CONFIGURE_TICKS_PER_TIMESLICE, - CONFIGURE_MAXIMUM_DEVICES, CONFIGURE_MAXIMUM_DRIVERS, CONFIGURE_NUMBER_OF_DRIVERS, /* number of device drivers */ Device_drivers, /* pointer to driver table */ diff --git a/cpukit/sapi/include/rtems/config.h b/cpukit/sapi/include/rtems/config.h index 598f293ff9..2a0f5b4bae 100644 --- a/cpukit/sapi/include/rtems/config.h +++ b/cpukit/sapi/include/rtems/config.h @@ -101,21 +101,20 @@ typedef struct { */ typedef struct { - void *work_space_start; - uint32_t work_space_size; - uint32_t maximum_extensions; - uint32_t microseconds_per_tick; - uint32_t ticks_per_timeslice; - uint32_t maximum_devices; - uint32_t maximum_drivers; - uint32_t number_of_device_drivers; - rtems_driver_address_table *Device_driver_table; - uint32_t number_of_initial_extensions; - rtems_extensions_table *User_extension_table; - rtems_multiprocessing_table *User_multiprocessing_table; - rtems_api_configuration_table *RTEMS_api_configuration; - posix_api_configuration_table *POSIX_api_configuration; - itron_api_configuration_table *ITRON_api_configuration; + void *work_space_start; + uint32_t work_space_size; + uint32_t maximum_extensions; + uint32_t microseconds_per_tick; + uint32_t ticks_per_timeslice; + uint32_t maximum_drivers; + uint32_t number_of_device_drivers; + rtems_driver_address_table *Device_driver_table; + uint32_t number_of_initial_extensions; + rtems_extensions_table *User_extension_table; + rtems_multiprocessing_table *User_multiprocessing_table; + rtems_api_configuration_table *RTEMS_api_configuration; + posix_api_configuration_table *POSIX_api_configuration; + itron_api_configuration_table *ITRON_api_configuration; } rtems_configuration_table; /* diff --git a/cpukit/sapi/include/rtems/io.h b/cpukit/sapi/include/rtems/io.h index 66d6360dd0..ace50f0459 100644 --- a/cpukit/sapi/include/rtems/io.h +++ b/cpukit/sapi/include/rtems/io.h @@ -90,8 +90,6 @@ typedef struct { SAPI_EXTERN uint32_t _IO_Number_of_drivers; SAPI_EXTERN rtems_driver_address_table *_IO_Driver_address_table; -SAPI_EXTERN uint32_t _IO_Number_of_devices; -SAPI_EXTERN rtems_driver_name_t *_IO_Driver_name_table; /* * _IO_Manager_initialization @@ -104,8 +102,7 @@ SAPI_EXTERN rtems_driver_name_t *_IO_Driver_name_table; void _IO_Manager_initialization( rtems_driver_address_table *driver_table, uint32_t drivers_in_table, - uint32_t number_of_drivers, - uint32_t number_of_devices + uint32_t number_of_drivers ); /* diff --git a/cpukit/sapi/src/exinit.c b/cpukit/sapi/src/exinit.c index e9be0b9534..c7c6e18552 100644 --- a/cpukit/sapi/src/exinit.c +++ b/cpukit/sapi/src/exinit.c @@ -198,8 +198,7 @@ rtems_interrupt_level rtems_initialize_executive_early( _IO_Manager_initialization( configuration_table->Device_driver_table, configuration_table->number_of_device_drivers, - configuration_table->maximum_drivers, - configuration_table->maximum_devices + configuration_table->maximum_drivers ); #ifdef RTEMS_POSIX_API diff --git a/cpukit/sapi/src/io.c b/cpukit/sapi/src/io.c index 62f058563b..3c943285bf 100644 --- a/cpukit/sapi/src/io.c +++ b/cpukit/sapi/src/io.c @@ -37,35 +37,14 @@ void _IO_Manager_initialization( rtems_driver_address_table *driver_table, uint32_t drivers_in_table, - uint32_t number_of_drivers, - uint32_t number_of_devices + uint32_t number_of_drivers ) { - void *tmp; - uint32_t index; - rtems_driver_name_t *np; - if ( number_of_drivers < drivers_in_table ) number_of_drivers = drivers_in_table; _IO_Driver_address_table = driver_table; _IO_Number_of_drivers = number_of_drivers; - _IO_Number_of_devices = number_of_devices; - - tmp = _Workspace_Allocate_or_fatal_error( - sizeof( rtems_driver_name_t ) * ( number_of_devices + 1 ) - ); - - _IO_Driver_name_table = (rtems_driver_name_t *) tmp; - - for( index=0, np = _IO_Driver_name_table ; - index < _IO_Number_of_devices ; - index++, np++ ) { - np->device_name = 0; - np->device_name_length = 0; - np->major = 0; - np->minor = 0; - } } /*PAGE @@ -174,54 +153,6 @@ rtems_status_code rtems_io_unregister_driver( return RTEMS_UNSATISFIED; } -/*PAGE - * - * rtems_io_register_name - * - * Associate a name with a driver - * - * Input Paramters: - * device_name - pointer to name string to associate with device - * major - device major number to receive name - * minor - device minor number to receive name - * - * Output Parameters: - * RTEMS_SUCCESSFUL - if successful - * error code - if unsuccessful - */ - -#if 0 -rtems_status_code rtems_io_register_name( - const char *device_name, - rtems_device_major_number major, - rtems_device_minor_number minor - ) -{ - rtems_driver_name_t *np; - uint32_t level; - uint32_t index; - - /* find an empty slot */ - for( index=0, np = _IO_Driver_name_table ; - index < _IO_Number_of_devices ; - index++, np++ ) { - - _ISR_Disable(level); - if (np->device_name == 0) { - np->device_name = device_name; - np->device_name_length = strlen(device_name); - np->major = major; - np->minor = minor; - _ISR_Enable(level); - - return RTEMS_SUCCESSFUL; - } - _ISR_Enable(level); - } - return RTEMS_TOO_MANY; -} -#endif - /*PAGE * * rtems_io_initialize -- cgit v1.2.3