diff options
author | Alexander Kolbasov <Alexander.Kolbasov@Sun.COM> | 2009-12-22 21:52:00 -0800 |
---|---|---|
committer | Alexander Kolbasov <Alexander.Kolbasov@Sun.COM> | 2009-12-22 21:52:00 -0800 |
commit | b885580b43755ee4ea1e280b85428893d2ba9291 (patch) | |
tree | f7f7848d3eef390282bab6fc859d7a5275053ecf /usr/src/uts/common/sys | |
parent | e7437094ebbbd4d60375f3927c017ff00cbab1de (diff) | |
download | illumos-joyent-b885580b43755ee4ea1e280b85428893d2ba9291.tar.gz |
6764832 Provide user-level processor groups observability
6831680 cputrack(1) leaves its victim with unneeded cpc context
6901343 cpc context flag updates are not always atomic
6908152 Dormant thread CPC context affects cpu CPC consumers
Diffstat (limited to 'usr/src/uts/common/sys')
-rw-r--r-- | usr/src/uts/common/sys/Makefile | 1 | ||||
-rw-r--r-- | usr/src/uts/common/sys/cap_util.h | 173 | ||||
-rw-r--r-- | usr/src/uts/common/sys/cmt.h | 1 | ||||
-rw-r--r-- | usr/src/uts/common/sys/cpc_impl.h | 10 | ||||
-rw-r--r-- | usr/src/uts/common/sys/cpc_pcbe.h | 11 | ||||
-rw-r--r-- | usr/src/uts/common/sys/cpuvar.h | 70 | ||||
-rw-r--r-- | usr/src/uts/common/sys/group.h | 11 | ||||
-rw-r--r-- | usr/src/uts/common/sys/kcpc.h | 79 | ||||
-rw-r--r-- | usr/src/uts/common/sys/pghw.h | 75 | ||||
-rw-r--r-- | usr/src/uts/common/sys/systm.h | 1 |
10 files changed, 402 insertions, 30 deletions
diff --git a/usr/src/uts/common/sys/Makefile b/usr/src/uts/common/sys/Makefile index 9006be10f4..5133e80e69 100644 --- a/usr/src/uts/common/sys/Makefile +++ b/usr/src/uts/common/sys/Makefile @@ -98,6 +98,7 @@ CHKHDRS= \ byteorder.h \ callb.h \ callo.h \ + cap_util.h \ cpucaps.h \ cpucaps_impl.h \ ccompile.h \ diff --git a/usr/src/uts/common/sys/cap_util.h b/usr/src/uts/common/sys/cap_util.h new file mode 100644 index 0000000000..7e25ba6697 --- /dev/null +++ b/usr/src/uts/common/sys/cap_util.h @@ -0,0 +1,173 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2009 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#ifndef _SYS_CAP_UTIL_H +#define _SYS_CAP_UTIL_H + + +#ifdef __cplusplus +extern "C" { +#endif + +#include <sys/types.h> +#include <sys/kcpc.h> +#include <sys/cpc_impl.h> +#include <sys/pghw.h> +#include <sys/cmt.h> + +#ifdef _KERNEL + +/* + * Capacity and utilization flags for each CPU + */ +#define CU_CPU_CNTRS_ON 1 /* CPU performance counters are on */ +#define CU_CPU_CNTRS_OFF_ON 2 /* Off -> on transition */ + +/* + * Macro that returns whether CPU performance counters turned on for given CPU + */ +#define CU_CPC_ON(cp) \ + ((cp) != NULL && (cp)->cpu_cu_info != NULL && \ + ((cp)->cpu_cu_info->cu_flag & CU_CPU_CNTRS_ON)) + + +/* + * Per counter statistics + */ +typedef struct cu_cntr_stats { + hrtime_t cs_time_running; /* running total of time counting */ + hrtime_t cs_time_stopped; /* ... time not counting */ + hrtime_t cs_time_start; /* start time of current sample */ + uint64_t cs_value_start; /* starting value for next sample */ + uint64_t cs_value_last; /* last value */ + uint64_t cs_value_total; /* running total */ + uint64_t cs_rate; /* observed rate since last */ + uint64_t cs_rate_max; /* maximum rate */ + kcpc_request_t *cs_cpc_req; /* corresponding CPC request */ + struct cpu *cs_cpu_start; /* CPU where starting value gotten */ +} cu_cntr_stats_t; + + +/* + * Counter info for a PG hardware sharing relationship + */ +typedef struct cu_cntr_info { + cpu_t *ci_cpu; /* CPU being measured */ + pghw_t *ci_pg; /* hardware PG being measured */ + kstat_t *ci_kstat; /* kstats being exported */ + cu_cntr_stats_t *ci_stats; /* counter statistics */ + uint_t ci_nstats; /* number of statistics */ +} cu_cntr_info_t; + + +/* + * Each CPU can have one or more CPC contexts for measuring capacity and + * utilization + * + * One CPC context is needed per CPU if the counter events needed to measure + * capacity and utilization on each CPU can be programmed onto all the counters + * on a CPU at the same time and there are fewer or same number of desired + * counter events as counters on each CPU. Otherwise, the desired counter + * events are assigned across multiple CPC contexts, so the contexts and their + * counter events can be multiplexed onto the counters over time to get the + * data for all of the counter events. + */ +typedef struct cu_cpc_ctx { + int cur_index; /* index for current context */ + int nctx; /* number of CPC contexts */ + kcpc_ctx_t **ctx_ptr_array; /* array of context pointers */ + size_t ctx_ptr_array_sz; /* size of array */ +} cu_cpc_ctx_t; + +/* + * Per CPU capacity and utilization info + */ +typedef struct cu_cpu_info { + struct cpu *cu_cpu; /* CPU for the statistics */ + uint_t cu_flag; /* capacity & utilization flag */ + hrtime_t cu_sample_time; /* when last sample taken */ + cu_cpc_ctx_t cu_cpc_ctx; /* performance counter contexts */ + cu_cntr_stats_t *cu_cntr_stats; /* counter statistics array */ + uint_t cu_ncntr_stats; /* number of counter statistics */ + uint_t cu_disabled; /* count of disable requests */ + /* + * Per PG hardware sharing relationship counter info + */ + cu_cntr_info_t *cu_cntr_info[PGHW_NUM_COMPONENTS]; +} cu_cpu_info_t; + +/* + * COMMON INTERFACE ROUTINES + */ + +/* + * Setup capacity and utilization support + */ +extern void cu_init(void); + +/* + * Tear down capacity and utilization support + */ +extern int cu_fini(void); + +/* + * Program CPC for capacity and utilization on given CPU + */ +extern void cu_cpc_program(struct cpu *, int *); + +/* + * Unprogram CPC for capacity and utilization on given CPU + */ +extern void cu_cpc_unprogram(struct cpu *, int *); + +/* + * Update counter statistics on a given CPU + */ +extern int cu_cpu_update(struct cpu *, boolean_t); + +/* + * Update utilization and capacity data for CMT PG + */ +extern void cu_pg_update(pghw_t *); + +/* + * Disable or enable capacity and utilization on all CPUs + */ +extern void cu_disable(void); +extern void cu_enable(void); + +/* + * PLATFORM SPECIFIC INTERFACE ROUTINES + */ +extern int cu_plat_cpc_init(cpu_t *, kcpc_request_list_t *, int); + +#endif /* _KERNEL */ + +#ifdef __cplusplus +} +#endif + +#endif /* _SYS_CAP_UTIL_H */ diff --git a/usr/src/uts/common/sys/cmt.h b/usr/src/uts/common/sys/cmt.h index 4e7ed28656..afdb6730a6 100644 --- a/usr/src/uts/common/sys/cmt.h +++ b/usr/src/uts/common/sys/cmt.h @@ -63,6 +63,7 @@ typedef struct pg_cmt { int cmt_nchildren; /* # of children CMT PGs */ struct group cmt_cpus_actv; struct bitset cmt_cpus_actv_set; /* bitset of active CPUs */ + kstat_t *cmt_kstat; /* cmt kstats exported */ } pg_cmt_t; /* diff --git a/usr/src/uts/common/sys/cpc_impl.h b/usr/src/uts/common/sys/cpc_impl.h index 1b57c76c10..ae89c90508 100644 --- a/usr/src/uts/common/sys/cpc_impl.h +++ b/usr/src/uts/common/sys/cpc_impl.h @@ -131,7 +131,7 @@ typedef struct _kcpc_ctx kcpc_ctx_t; struct _kcpc_ctx { struct _kcpc_set *kc_set; /* linked list of all bound sets */ - uint32_t kc_flags; + volatile uint_t kc_flags; kcpc_pic_t *kc_pics; /* pointer to array of per-pic data */ hrtime_t kc_hrtime; /* gethrtime() at last sample */ uint64_t kc_vtick; /* virtualized %tick */ @@ -214,20 +214,18 @@ extern hrtime_t tsc_read(void); struct cpu; extern uint_t cpc_ncounters; -extern kmutex_t kcpc_ctx_llock[]; /* protects ctx_list */ -extern kcpc_ctx_t *kcpc_ctx_list[]; /* head of list */ extern krwlock_t kcpc_cpuctx_lock; /* lock for 'kcpc_cpuctx' below */ extern int kcpc_cpuctx; /* number of cpu-specific contexts */ extern void kcpc_invalidate_all(void); extern void kcpc_passivate(void); -extern void kcpc_remote_stop(struct cpu *cp); +extern void kcpc_cpu_stop(struct cpu *, boolean_t); extern int kcpc_pcbe_tryload(const char *, uint_t, uint_t, uint_t); -extern void kcpc_remote_program(struct cpu *cp); +extern void kcpc_cpu_program(struct cpu *, kcpc_ctx_t *); extern void kcpc_register_dcpc(void (*func)(uint64_t)); extern void kcpc_unregister_dcpc(void); -extern kcpc_ctx_t *kcpc_ctx_alloc(void); +extern kcpc_ctx_t *kcpc_ctx_alloc(int); extern int kcpc_assign_reqs(struct _kcpc_set *, kcpc_ctx_t *); extern void kcpc_ctx_free(kcpc_ctx_t *); extern int kcpc_configure_reqs(kcpc_ctx_t *, struct _kcpc_set *, int *); diff --git a/usr/src/uts/common/sys/cpc_pcbe.h b/usr/src/uts/common/sys/cpc_pcbe.h index 7522a9bf82..eb168fcf2c 100644 --- a/usr/src/uts/common/sys/cpc_pcbe.h +++ b/usr/src/uts/common/sys/cpc_pcbe.h @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -20,7 +19,7 @@ * CDDL HEADER END */ /* - * Copyright 2004 Sun Microsystems, Inc. All rights reserved. + * Copyright 2009 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -37,8 +36,6 @@ #ifndef _SYS_CPC_PCBE_H #define _SYS_CPC_PCBE_H -#pragma ident "%Z%%M% %I% %E% SMI" - #include <sys/inttypes.h> #include <sys/cpc_impl.h> @@ -51,6 +48,8 @@ extern "C" { */ #define PCBE_VER_1 1 +#define PCBE_IMPL_NAME_P4HT "Pentium 4 with HyperThreading" + typedef struct __pcbe_ops { uint_t pcbe_ver; uint_t pcbe_caps; diff --git a/usr/src/uts/common/sys/cpuvar.h b/usr/src/uts/common/sys/cpuvar.h index aece259a35..b52192b419 100644 --- a/usr/src/uts/common/sys/cpuvar.h +++ b/usr/src/uts/common/sys/cpuvar.h @@ -222,6 +222,16 @@ typedef struct cpu { uint_t cpu_rotor; /* for cheap pseudo-random numbers */ + struct cu_cpu_info *cpu_cu_info; /* capacity & util. info */ + + /* + * cpu_generation is updated whenever CPU goes on-line or off-line. + * Updates to cpu_generation are protected by cpu_lock. + * + * See CPU_NEW_GENERATION() macro below. + */ + volatile uint_t cpu_generation; /* tracking on/off-line */ + /* * New members must be added /before/ this member, as the CTF tools * rely on this being the last field before cpu_m, so they can @@ -597,6 +607,13 @@ extern struct cpu *curcpup(void); #define CPU_STATS(cp, stat) \ ((cp)->cpu_stats.stat) +/* + * Increment CPU generation value. + * This macro should be called whenever CPU goes on-line or off-line. + * Updates to cpu_generation should be protected by cpu_lock. + */ +#define CPU_NEW_GENERATION(cp) ((cp)->cpu_generation++) + #endif /* _KERNEL || _KMEMUSER */ /* @@ -726,6 +743,49 @@ void cpu_enable_intr(struct cpu *cp); /* start issuing interrupts to cpu */ */ extern kmutex_t cpu_lock; /* lock protecting CPU data */ +/* + * CPU state change events + * + * Various subsystems need to know when CPUs change their state. They get this + * information by registering CPU state change callbacks using + * register_cpu_setup_func(). Whenever any CPU changes its state, the callback + * function is called. The callback function is passed three arguments: + * + * Event, described by cpu_setup_t + * CPU ID + * Transparent pointer passed when registering the callback + * + * The callback function is called with cpu_lock held. The return value from the + * callback function is usually ignored, except for CPU_CONFIG and CPU_UNCONFIG + * events. For these two events, non-zero return value indicates a failure and + * prevents successful completion of the operation. + * + * New events may be added in the future. Callback functions should ignore any + * events that they do not understand. + * + * The following events provide notification callbacks: + * + * CPU_INIT A new CPU is started and added to the list of active CPUs + * This event is only used during boot + * + * CPU_CONFIG A newly inserted CPU is prepared for starting running code + * This event is called by DR code + * + * CPU_UNCONFIG CPU has been powered off and needs cleanup + * This event is called by DR code + * + * CPU_ON CPU is enabled but does not run anything yet + * + * CPU_INTR_ON CPU is enabled and has interrupts enabled + * + * CPU_OFF CPU is going offline but can still run threads + * + * CPU_CPUPART_OUT CPU is going to move out of its partition + * + * CPU_CPUPART_IN CPU is going to move to a new partition + * + * CPU_SETUP CPU is set up during boot and can run threads + */ typedef enum { CPU_INIT, CPU_CONFIG, @@ -734,7 +794,8 @@ typedef enum { CPU_OFF, CPU_CPUPART_IN, CPU_CPUPART_OUT, - CPU_SETUP + CPU_SETUP, + CPU_INTR_ON } cpu_setup_t; typedef int cpu_setup_func_t(cpu_setup_t, int, void *); @@ -748,6 +809,13 @@ extern void unregister_cpu_setup_func(cpu_setup_func_t *, void *); extern void cpu_state_change_notify(int, cpu_setup_t); /* + * Call specified function on the given CPU + */ +typedef void (*cpu_call_func_t)(uintptr_t, uintptr_t); +extern void cpu_call(cpu_t *, cpu_call_func_t, uintptr_t, uintptr_t); + + +/* * Create various strings that describe the given CPU for the * processor_info system call and configuration-related kstats. */ diff --git a/usr/src/uts/common/sys/group.h b/usr/src/uts/common/sys/group.h index bb5613bc35..2db1ac01bb 100644 --- a/usr/src/uts/common/sys/group.h +++ b/usr/src/uts/common/sys/group.h @@ -101,6 +101,17 @@ void group_remove_at(group_t *, uint_t); */ uint_t group_find(group_t *, void *); +/* + * Convert a group to a string with list of integers. + * + * The consecutive integer values are represented using x-y notation. + * The resulting string looks like "1,2-5,8" + * + * The convert argument is used to map group elements to integer IDs. + * The output buffer and its length are specfied in the arguments. + */ +extern char *group2intlist(group_t *, char *, size_t, int (convert)(void*)); + #endif /* !_KERNEL && !_KMEMUSER */ #ifdef __cplusplus diff --git a/usr/src/uts/common/sys/kcpc.h b/usr/src/uts/common/sys/kcpc.h index f30e093f78..d90b1c1d29 100644 --- a/usr/src/uts/common/sys/kcpc.h +++ b/usr/src/uts/common/sys/kcpc.h @@ -28,11 +28,13 @@ #include <sys/cpc_impl.h> #include <sys/ksynch.h> +#include <sys/types.h> #ifdef __cplusplus extern "C" { #endif + /* * Kernel clients need this file in order to know what a request is and how to * program one. @@ -74,8 +76,33 @@ struct _kcpc_request { uint_t kr_flags; uint_t kr_nattrs; kcpc_attr_t *kr_attr; + void *kr_ptr; /* Ptr assigned by requester */ }; +typedef struct _kcpc_request_list { + kcpc_request_t *krl_list; /* counter event requests */ + int krl_cnt; /* how many requests */ + int krl_max; /* max request entries */ +} kcpc_request_list_t; + +/* + * Type of update function to be called when reading counters on current CPU in + * kcpc_read() + */ +typedef int (*kcpc_update_func_t)(void *, uint64_t); + +/* + * Type of read function to be called when reading counters on current CPU + * (ie. should be same type signature as kcpc_read()) + */ +typedef int (*kcpc_read_func_t)(kcpc_update_func_t); + + +/* + * Initialize the kcpc framework + */ +extern int kcpc_init(void); + /* * Bind the set to the indicated thread. * Returns 0 on success, or an errno in case of error. If EINVAL is returned, @@ -96,6 +123,56 @@ extern int kcpc_sample(kcpc_set_t *set, uint64_t *buf, hrtime_t *hrtime, uint64_t *tick); /* + * Create CPC context containing specified list of requested counter events + */ +extern int kcpc_cpu_ctx_create(struct cpu *cp, kcpc_request_list_t *req_list, + int kmem_flags, kcpc_ctx_t ***ctx_ptr_array, size_t *ctx_ptr_array_sz); + +/* + * Returns whether specified counter event is supported + */ +extern boolean_t kcpc_event_supported(char *event); + +/* + * Initialize list of CPC event requests + */ +extern kcpc_request_list_t *kcpc_reqs_init(int nreqs, int kmem_flags); + +/* + * Add counter event request to given list of counter event requests + */ +extern int kcpc_reqs_add(kcpc_request_list_t *req_list, char *event, + uint64_t preset, uint_t flags, uint_t nattrs, kcpc_attr_t *attr, void *ptr, + int kmem_flags); + +/* + * Reset list of CPC event requests so its space can be used for another set + * of requests + */ +extern int kcpc_reqs_reset(kcpc_request_list_t *req_list); + +/* + * Free given list of counter event requests + */ +extern int kcpc_reqs_fini(kcpc_request_list_t *req_list); + +/* + * Read CPC data for given event on current CPU + */ +extern int kcpc_read(kcpc_update_func_t); + +/* + * Program current CPU with given CPC context + */ +extern void kcpc_program(kcpc_ctx_t *ctx, boolean_t for_thread, + boolean_t cu_interpose); + +/* + * Unprogram CPC counters on current CPU + */ +extern void kcpc_unprogram(kcpc_ctx_t *ctx, boolean_t cu_interpose); + +/* * Unbind a request and release the associated resources. */ extern int kcpc_unbind(kcpc_set_t *set); @@ -128,6 +205,8 @@ extern void kcpc_idle_restore(struct cpu *cp); extern krwlock_t kcpc_cpuctx_lock; /* lock for 'kcpc_cpuctx' below */ extern int kcpc_cpuctx; /* number of cpu-specific contexts */ +extern void kcpc_free(kcpc_ctx_t *ctx, int isexec); + /* * 'dtrace_cpc_in_use' contains the number of currently active cpc provider * based enablings. See the block comment in uts/common/os/dtrace_subr.c for diff --git a/usr/src/uts/common/sys/pghw.h b/usr/src/uts/common/sys/pghw.h index ab8b0a9bbe..f0550dba7e 100644 --- a/usr/src/uts/common/sys/pghw.h +++ b/usr/src/uts/common/sys/pghw.h @@ -89,6 +89,27 @@ typedef enum pghw_type { typedef uintptr_t pghw_handle_t; /* + * Representation of PG hardware utilization NOTE: All the sums listed below are + * the sums of running total of each item for each CPU in the PG (eg. + * sum(utilization) is sum of running total utilization of each CPU in PG) + */ +typedef struct pghw_util { + uint64_t pghw_util; /* sum(utilization) */ + uint64_t pghw_rate; /* Last observed utilization rate */ + uint64_t pghw_rate_max; /* Max observed rate (in units/sec) */ + hrtime_t pghw_time_stamp; /* Timestamp of last snapshot */ + /* + * sum(time utilization counters on) + */ + hrtime_t pghw_time_running; + /* + * sum(time utilization counters off) + */ + hrtime_t pghw_time_stopped; +} pghw_util_t; + + +/* * Processor Group (physical sharing relationship) */ typedef struct pghw { @@ -97,6 +118,23 @@ typedef struct pghw { id_t pghw_instance; /* sharing instance identifier */ pghw_handle_t pghw_handle; /* hw specific opaque handle */ kstat_t *pghw_kstat; /* physical kstats exported */ + kstat_t *pghw_cu_kstat; /* for capacity and utilization */ + /* + * pghw_generation should be updated by superclasses whenever PG changes + * significanly (e.g. new CPUs join or leave PG). + */ + uint_t pghw_generation; /* generation number */ + + /* + * The following fields are used by PGHW cu kstats + */ + char *pghw_cpulist; /* list of CPUs */ + size_t pghw_cpulist_len; /* length of the list */ + /* + * Generation number at kstat update time + */ + uint_t pghw_kstat_gen; + pghw_util_t pghw_stats; /* Utilization data */ } pghw_t; /* @@ -111,32 +149,35 @@ typedef struct cpu_physid { /* * Physical PG initialization / CPU service hooks */ -void pghw_init(pghw_t *, cpu_t *, pghw_type_t); -void pghw_fini(pghw_t *); -void pghw_cpu_add(pghw_t *, cpu_t *); -pghw_t *pghw_place_cpu(cpu_t *, pghw_type_t); +extern void pghw_init(pghw_t *, cpu_t *, pghw_type_t); +extern void pghw_fini(pghw_t *); +extern void pghw_cpu_add(pghw_t *, cpu_t *); +extern pghw_t *pghw_place_cpu(cpu_t *, pghw_type_t); /* * Physical ID cache creation / destruction */ -void pghw_physid_create(cpu_t *); -void pghw_physid_destroy(cpu_t *); +extern void pghw_physid_create(cpu_t *); +extern void pghw_physid_destroy(cpu_t *); /* * CPU / PG hardware related seach operations */ -pghw_t *pghw_find_pg(cpu_t *, pghw_type_t); -pghw_t *pghw_find_by_instance(id_t, pghw_type_t); -group_t *pghw_set_lookup(pghw_type_t); - -void pghw_kstat_create(pghw_t *); -int pghw_kstat_update(kstat_t *, int); +extern pghw_t *pghw_find_pg(cpu_t *, pghw_type_t); +extern pghw_t *pghw_find_by_instance(id_t, pghw_type_t); +extern group_t *pghw_set_lookup(pghw_type_t); /* Hardware sharing relationship platform interfaces */ -int pg_plat_hw_shared(cpu_t *, pghw_type_t); -int pg_plat_cpus_share(cpu_t *, cpu_t *, pghw_type_t); -id_t pg_plat_hw_instance_id(cpu_t *, pghw_type_t); -pghw_type_t pg_plat_hw_rank(pghw_type_t, pghw_type_t); +extern int pg_plat_hw_shared(cpu_t *, pghw_type_t); +extern int pg_plat_cpus_share(cpu_t *, cpu_t *, pghw_type_t); +extern id_t pg_plat_hw_instance_id(cpu_t *, pghw_type_t); +extern pghw_type_t pg_plat_hw_rank(pghw_type_t, pghw_type_t); + +/* + * String representation of the hardware type + */ +extern char *pghw_type_string(pghw_type_t); +extern char *pghw_type_shortstring(pghw_type_t); /* * What comprises a "core" may vary across processor implementations, @@ -144,7 +185,7 @@ pghw_type_t pg_plat_hw_rank(pghw_type_t, pghw_type_t); * is no PGHW_CORE type, but we provide an interface here to allow platforms * to express cpu <=> core mappings. */ -id_t pg_plat_get_core_id(cpu_t *); +extern id_t pg_plat_get_core_id(cpu_t *); #endif /* !_KERNEL && !_KMEMUSER */ diff --git a/usr/src/uts/common/sys/systm.h b/usr/src/uts/common/sys/systm.h index 84ccfb9991..4c3dc7f886 100644 --- a/usr/src/uts/common/sys/systm.h +++ b/usr/src/uts/common/sys/systm.h @@ -270,6 +270,7 @@ int spl8(void); void splx(int); void set_base_spl(void); int __ipltospl(int); +int spl_xcall(void); void softcall_init(void); void softcall(void (*)(void *), void *); |