Register and unregister reconfiguration handlers.
#include <sys/dr.h>
int reconfig_register (handler, actions,
h_arg, h_token, name)
int (*handler)(void *event, void *h_arg, int req,
void *resource_info);
int actions;
void *h_arg;
ulong *h_token;
char *name;
int reconfig_register_ext (handler, actions, h_arg, h_token, name)
int (*handler)(void *event, void *h_arg, unsigned long long req,
void *resource_info);
unsigned long long actions;
void *h_arg;
ulong *h_token;
char *name;
int reconfig_unregister (h_token)
ulong h_token;
void reconfig_complete (event, rc)
void *event;
int rc;
int reconfig_register_list (handler, event_list, list_size, h_arg, h_token, name)
int (*handler)(void *event, void *h_arg, dr_kevent_t event_in_prog,
void *resource_info);
dr_kevent_t event_list[];
size_t list_size;
void *h_arg;
ulong *h_token;
char *name;
The reconfig_register, reconfig_register_ext, reconfig_register_list and reconfig_unregister kernel services register and unregister reconfiguration handlers, which are invoked by the kernel both before and after DLPAR operations depending on the set of events specified by the kernel extension when registering.
Starting with AIX® 6.1 with 6100-02, all future kernel extensions use the reconfig_register_list kernel service when registering for DLPAR operations. The reconfig_register_list kernel service supports previous and new DLPAR operations. The reconfig_register or reconfig_register_ext kernel services will no longer support all future DLPAR operations.
The reconfig_complete kernel service is used to indicate that the request has completed. If a kernel extension expects that the operation is likely to take a long time (several seconds), the handler must return DR_WAIT to the caller, but proceed with the request asynchronously. In this case, the handler must indicate that it has completed the request by invoking the reconfig_complete kernel service.
Item | Description |
---|---|
actions | Allows the kernel extension to specify which
of the following events require notification:
|
event | Passed to the handler and intended to be used only when calling the reconfig_complete kernel service. |
event_list | Specifies which events require notification. For the supported values, see the dr.h file. |
handler | Specifies the kernel extension function to be invoked. |
h_arg | Specified by the kernel extension, remembered by the kernel along with the function descriptor for the handler, and passed to the handler when it is invoked. It is not used directly by the kernel, but is intended to support kernel extensions that manage multiple adapter instances. This parameter points to an adapter control block. |
h_token | An output parameter that is used when unregistering the handler. |
list_size | Specifies the memory size of the event_list array. |
name | Provided for information purposes and may be included within an error log entry, if the driver returns an error. It is provided by the kernel extension and must be limited to 15 ASCII characters. |
rc | Can be set to DR_FAIL or DR_SUCCESS. |
resource_info | Identifies the resource specific information for the current
DLPAR request. If the request is cpu based, the resource_info data
is provided through a dri_cpu structure. Otherwise a dri_mem structure
is used. On a Micro-Partitioning® partition,
if the request is CPU-capacity based, the resource_info data
is provided through a dri_cpu_capacity structure, which has
the following format. The kernel extensions are not notified of changes
in variable capacity weight in an uncapped Micro-Partitioning environment.
Note: The capacity
update is constrained by the Hypervisor.
If the request is
memory capacity based, the resource_info data is provided through
a dri_mem_capacity structure, which has the following format:
|
req | Indicates the following DLPAR operation to be performed by
the handler:
|
The following events are used with the reconfig_register_list() call for the event_list array:
Upon successful completion, the reconfig_register, reconfig_register_ext and reconfig_unregister kernel services return zero. If unsuccessful, the appropriate errno value is returned.
The reconfig_register, reconfig_register_ext, reconfig_unregister, and handler interfaces are invoked in the process environment only.
The reconfig_complete kernel service may be invoked in the process or interrupt environment.