diff options
Diffstat (limited to 'usr/src/uts/sun4u')
-rw-r--r-- | usr/src/uts/sun4u/chicago/io/fpc/fpc-impl-4u.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/usr/src/uts/sun4u/chicago/io/fpc/fpc-impl-4u.c b/usr/src/uts/sun4u/chicago/io/fpc/fpc-impl-4u.c index aa96f19079..a8ceea0344 100644 --- a/usr/src/uts/sun4u/chicago/io/fpc/fpc-impl-4u.c +++ b/usr/src/uts/sun4u/chicago/io/fpc/fpc-impl-4u.c @@ -24,6 +24,10 @@ * Use is subject to license terms. */ +/* + * Copyright 2020 Nexenta by DDN, Inc. All rights reserved. + */ + #include <sys/file.h> #include <sys/sunndi.h> #include <sys/sunddi.h> @@ -101,7 +105,6 @@ static uint64_t counter_reg_offsets[] = { static ldi_ident_t ldi_identifier; static boolean_t ldi_identifier_valid = B_FALSE; -static cred_t *credentials = NULL; /* Called by _init to determine if it is OK to install driver. */ int @@ -116,7 +119,6 @@ fpc_platform_module_init(dev_info_t *dip) { int status; - credentials = crget(); status = ldi_ident_from_dip(dip, &ldi_identifier); if (status == 0) ldi_identifier_valid = B_TRUE; @@ -211,8 +213,6 @@ fpc_platform_module_fini(dev_info_t *dip) { if (ldi_identifier_valid) ldi_ident_release(ldi_identifier); - if (credentials) - crfree(credentials); } fire_perfreg_handle_t @@ -226,7 +226,7 @@ fpc_get_perfreg_handle(int devnum) if ((handle_impl->devspec = fpc_get_platform_data_by_number(devnum)) != NULL) { rval = ldi_open_by_name(handle_impl->devspec->nodename, - OPEN_FLAGS, credentials, &handle_impl->devhandle, + OPEN_FLAGS, kcred, &handle_impl->devhandle, ldi_identifier); } @@ -243,7 +243,7 @@ fpc_free_counter_handle(fire_perfreg_handle_t handle) { fire_counter_handle_impl_t *handle_impl = (fire_counter_handle_impl_t *)handle; - (void) ldi_close(handle_impl->devhandle, OPEN_FLAGS, credentials); + (void) ldi_close(handle_impl->devhandle, OPEN_FLAGS, kcred); kmem_free(handle_impl, sizeof (fire_counter_handle_impl_t)); return (SUCCESS); } @@ -281,7 +281,7 @@ fpc_event_io(fire_perfreg_handle_t handle, fire_perfcnt_t group, /* Read original value. */ if (((rval = ldi_ioctl(handle_impl->devhandle, cmd, (intptr_t)&prg, - FKIOCTL, credentials, &ioctl_rval)) == SUCCESS) && (!is_write)) { + FKIOCTL, kcred, &ioctl_rval)) == SUCCESS) && (!is_write)) { *reg_data = prg.data; } @@ -322,7 +322,7 @@ fpc_counter_io(fire_perfreg_handle_t handle, fire_perfcnt_t group, prg.data = *value; if (((rval = ldi_ioctl(handle_impl->devhandle, command, (intptr_t)&prg, - FKIOCTL, credentials, &ioctl_rval)) == SUCCESS) && (!is_write)) { + FKIOCTL, kcred, &ioctl_rval)) == SUCCESS) && (!is_write)) { *value = prg.data; } |