39 #include <sys/proc.h>
40 #include <sys/disp.h>
41 #include <sys/drctl.h>
42
43 /*
44 * Debugging routines
45 */
46 #ifdef DEBUG
47 uint_t ps_debug = 0x0;
48 #define DBG if (ps_debug) printf
49 #else /* DEBUG */
50 #define DBG _NOTE(CONSTCOND) if (0) printf
51 #endif /* DEBUG */
52
53 /*
54 * Time resolution conversions.
55 */
56 #define MS2NANO(x) ((x) * MICROSEC)
57 #define MS2SEC(x) ((x) / MILLISEC)
58 #define MS2MIN(x) (MS2SEC(x) / 60)
59 #define SEC2HZ(x) (drv_usectohz((x) * MICROSEC))
60
61 /*
62 * Domains Services interaction
63 */
64 static ds_svc_hdl_t ds_md_handle;
65 static ds_svc_hdl_t ds_shutdown_handle;
66 static ds_svc_hdl_t ds_panic_handle;
67 static ds_svc_hdl_t ds_suspend_handle;
68
69 static ds_ver_t ps_vers[] = {{ 1, 0 }};
70 #define PS_NVERS (sizeof (ps_vers) / sizeof (ps_vers[0]))
71
72 static ds_capability_t ps_md_cap = {
73 "md-update", /* svc_id */
74 ps_vers, /* vers */
75 PS_NVERS /* nvers */
76 };
77
78 static ds_capability_t ps_shutdown_cap = {
79 "domain-shutdown", /* svc_id */
|
39 #include <sys/proc.h>
40 #include <sys/disp.h>
41 #include <sys/drctl.h>
42
43 /*
44 * Debugging routines
45 */
46 #ifdef DEBUG
47 uint_t ps_debug = 0x0;
48 #define DBG if (ps_debug) printf
49 #else /* DEBUG */
50 #define DBG _NOTE(CONSTCOND) if (0) printf
51 #endif /* DEBUG */
52
53 /*
54 * Time resolution conversions.
55 */
56 #define MS2NANO(x) ((x) * MICROSEC)
57 #define MS2SEC(x) ((x) / MILLISEC)
58 #define MS2MIN(x) (MS2SEC(x) / 60)
59 #define SEC2HZ(x) drv_sectohz(x)
60
61 /*
62 * Domains Services interaction
63 */
64 static ds_svc_hdl_t ds_md_handle;
65 static ds_svc_hdl_t ds_shutdown_handle;
66 static ds_svc_hdl_t ds_panic_handle;
67 static ds_svc_hdl_t ds_suspend_handle;
68
69 static ds_ver_t ps_vers[] = {{ 1, 0 }};
70 #define PS_NVERS (sizeof (ps_vers) / sizeof (ps_vers[0]))
71
72 static ds_capability_t ps_md_cap = {
73 "md-update", /* svc_id */
74 ps_vers, /* vers */
75 PS_NVERS /* nvers */
76 };
77
78 static ds_capability_t ps_shutdown_cap = {
79 "domain-shutdown", /* svc_id */
|