diff options
Diffstat (limited to 'usr/src/uts/sun4')
-rw-r--r-- | usr/src/uts/sun4/io/efcode/fcode.c | 2 | ||||
-rw-r--r-- | usr/src/uts/sun4/io/fpc/fpc-kstats.c | 19 | ||||
-rw-r--r-- | usr/src/uts/sun4/io/trapstat.c | 56 | ||||
-rw-r--r-- | usr/src/uts/sun4/os/machdep.c | 7 |
4 files changed, 38 insertions, 46 deletions
diff --git a/usr/src/uts/sun4/io/efcode/fcode.c b/usr/src/uts/sun4/io/efcode/fcode.c index 8610697835..eebe57bf7f 100644 --- a/usr/src/uts/sun4/io/efcode/fcode.c +++ b/usr/src/uts/sun4/io/efcode/fcode.c @@ -206,7 +206,7 @@ fc_attach(dev_info_t *dip, ddi_attach_cmd_t cmd) fc_max_opens * sizeof (struct fc_state), KM_SLEEP); if (ddi_create_minor_node(dip, "fcode", S_IFCHR, - 0, DDI_PSEUDO, NULL) == DDI_FAILURE) { + 0, DDI_PSEUDO, 0) == DDI_FAILURE) { kmem_free(fc_states, fc_max_opens * sizeof (struct fc_state)); error = DDI_FAILURE; diff --git a/usr/src/uts/sun4/io/fpc/fpc-kstats.c b/usr/src/uts/sun4/io/fpc/fpc-kstats.c index 38a390031b..89949e9927 100644 --- a/usr/src/uts/sun4/io/fpc/fpc-kstats.c +++ b/usr/src/uts/sun4/io/fpc/fpc-kstats.c @@ -24,8 +24,6 @@ * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - #include <sys/types.h> #include <sys/sunddi.h> #include <sys/sunndi.h> @@ -281,7 +279,7 @@ fpc_dev_kstat(fire_perfcnt_t reg_group, uint8_t num_inst) (void) strncpy(dev_name, "tlu", sizeof (dev_name)); num_events = sizeof (fire_tlu_events) / sizeof (fi_kev_mask_t); num_events2 = sizeof (fire_tlu2_events) / - sizeof (fi_kev_mask_t); + sizeof (fi_kev_mask_t); fire_events = fire_tlu_events; fire_events2 = fire_tlu2_events; num_cntrs = NUM_TLU_COUNTERS; @@ -297,8 +295,7 @@ fpc_dev_kstat(fire_perfcnt_t reg_group, uint8_t num_inst) } for (i = 0; i < num_inst; i++) { - ksinfop = (fi_ksinfo_t *)kmem_zalloc(sizeof (fi_ksinfo_t), - KM_SLEEP); + ksinfop = kmem_zalloc(sizeof (fi_ksinfo_t), KM_SLEEP); ksinfop->pic_num_events = num_events; ksinfop->pic_reg_group = reg_group; @@ -361,7 +358,7 @@ fpc_dev_kstat(fire_perfcnt_t reg_group, uint8_t num_inst) /* create counter kstats */ ksinfop->cntr_ksp = fpc_create_cntr_kstat(dev_name, i, - fpc_cntr_kstat_update, ksinfop, num_cntrs); + fpc_cntr_kstat_update, ksinfop, num_cntrs); if (ksinfop->cntr_ksp == NULL) goto err; @@ -384,7 +381,7 @@ fpc_create_name_kstat(char *name, fi_ksinfo_t *pp, fi_kev_mask_t *ev, for (i = base; i < (base + num_cntrs); i++) { pp->pic_name_ksp[i] = fpc_create_picN_kstat(name, i, - pp->pic_sel_shift[i], pp->pic_num_events, ev); + pp->pic_sel_shift[i], pp->pic_num_events, ev); if (pp->pic_name_ksp[i] == NULL) return (FAILURE); @@ -408,7 +405,7 @@ fpc_create_picN_kstat(char *mod_name, int pic, int pic_sel_shift, int num_ev, (void) snprintf(pic_name, sizeof (pic_name), "pic%d", pic); if ((picN_ksp = kstat_create(mod_name, 0, pic_name, - "bus", KSTAT_TYPE_NAMED, num_ev, NULL)) == NULL) { + "bus", KSTAT_TYPE_NAMED, num_ev, 0)) == NULL) { cmn_err(CE_WARN, "%s %s : kstat create failed", mod_name, pic_name); return (NULL); @@ -423,7 +420,7 @@ fpc_create_picN_kstat(char *mod_name, int pic, int pic_sel_shift, int num_ev, */ for (event = 0; event < num_ev - 1; event++) { pic_named_data[event].value.ui64 = - (ev_array[event].pcr_mask << pic_sel_shift); + (ev_array[event].pcr_mask << pic_sel_shift); kstat_named_init(&pic_named_data[event], ev_array[event].event_name, KSTAT_DATA_UINT64); @@ -433,7 +430,7 @@ fpc_create_picN_kstat(char *mod_name, int pic, int pic_sel_shift, int num_ev, * add the clear_pic entry */ pic_named_data[event].value.ui64 = - (uint64_t)~(ev_array[event].pcr_mask << pic_sel_shift); + (uint64_t)~(ev_array[event].pcr_mask << pic_sel_shift); kstat_named_init(&pic_named_data[event], ev_array[event].event_name, KSTAT_DATA_UINT64); @@ -471,7 +468,7 @@ fpc_create_cntr_kstat(char *name, int instance, int (*update)(kstat_t *, int), if ((counters_ksp = kstat_create(name, instance, "counters", "bus", KSTAT_TYPE_NAMED, num_pics + 1, KSTAT_FLAG_WRITABLE)) == NULL) { cmn_err(CE_WARN, "kstat_create for %s%d failed", - name, instance); + name, instance); return (NULL); } diff --git a/usr/src/uts/sun4/io/trapstat.c b/usr/src/uts/sun4/io/trapstat.c index 4f99221bc0..75e5dab413 100644 --- a/usr/src/uts/sun4/io/trapstat.c +++ b/usr/src/uts/sun4/io/trapstat.c @@ -151,14 +151,14 @@ * Globals. (The complete mapping can be found in the UltraSPARC I&II User's * Manual.) * - * Note that the sets of globals are per trap _type_, not per trap _level_. + * Note that the sets of globals are per trap _type_, not per trap _level_. * Thus, when executing a TL>0 trap handler, one may not have registers * available (for example, both trap-instruction traps and spill traps execute * on the alternate globals; if a trap-instruction trap induces a window spill, * the window spill handler has no available globals). For trapstat, this is * problematic: a register is required to transfer control from one arbitrary * location (in the interposing trap table) to another (in the actual trap - * table). + * table). * * We solve this problem by exploiting the trap table's location at the bottom * of valid kernel memory (i.e. at KERNELBASE). We locate the interposing trap @@ -173,7 +173,7 @@ * Actual trap table: * * +--------------------------------+- 2ff - * | | . + * | | . * | Non-trap instruction, TL>0 | . <-----------------------+ * | | . <-----------------------|-+ * |- - - - - - - - - - - - - - - - +- 200 <-----------------------|-|-+ @@ -323,11 +323,11 @@ * * To accurately determine the amount of time spent executing the TLB miss * handler, one must get a timestamp on trap entry and trap exit, subtract the - * latter from the former, and add the result to an accumulating count. + * latter from the former, and add the result to an accumulating count. * Consider flow of control during normal TLB miss processing (where "ldx * [%g2], %g2" is an arbitrary TLB-missing instruction): - * - * + - - - - - - - -+ + * + * + - - - - - - - -+ * : : * : ldx [%g2], %g2 :<-------------------------------------------------------+ * : : Return from trap: | @@ -357,10 +357,10 @@ * As the above diagram indicates, interposing on the trap table allows one * only to determine a timestamp on trap _entry_: when the TLB miss handler * has completed filling the TLB, a "retry" will be issued, and control will - * transfer immediately back to the missing %pc. + * transfer immediately back to the missing %pc. * * To obtain a timestamp on trap exit, we must then somehow interpose between - * the "retry" and the subsequent control transfer to the TLB-missing + * the "retry" and the subsequent control transfer to the TLB-missing * instruction. To do this, we _push_ a trap level. The basic idea is to * spoof a TLB miss by raising TL, setting the %tpc to be within text * controlled by trapstat (the "TLB return entry") and branching to the @@ -371,7 +371,7 @@ * Here is the above TLB miss flow control diagram modified to reflect * trapstat's operation: * - * + - - - - - - - -+ + * + - - - - - - - -+ * : : * : ldx [%g2], %g2 :<-------------------------------------------------------+ * : : Return from trap: | @@ -928,8 +928,8 @@ trapstat_enable() cpu_t *cp = CPU; cp->cpu_m.cpu_tstat_flags |= TSTAT_TLB_STATS; - (void) hv_set_ctx0(NULL, NULL); - (void) hv_set_ctxnon0(NULL, NULL); + (void) hv_set_ctx0(0, 0); + (void) hv_set_ctxnon0(0, 0); } } #endif @@ -1114,7 +1114,7 @@ trapstat_tlbretent(tstat_percpu_t *tcpu, tstat_tlbretent_t *ret, static const uint32_t retent[TSTAT_TLBRET_NINSTR] = { #ifndef sun4v 0x87410000, /* rd %tick, %g3 */ - 0x03000000, /* sethi %hi(stat), %g1 */ + 0x03000000, /* sethi %hi(stat), %g1 */ 0x82106000, /* or %g1, %lo(stat), %g1 */ 0x89297001, /* sllx %g5, 1, %g4 */ 0x8931303e, /* srlx %g4, 62, %g4 */ @@ -1129,19 +1129,19 @@ trapstat_tlbretent(tstat_percpu_t *tcpu, tstat_tlbretent_t *ret, 0xc4586000, /* ldx [%g1 + tmiss_count], %g2 */ 0x8400a001, /* add %g2, 1, %g2 */ 0xc4706000, /* stx %g2, [%g1 + tmiss_count] */ - 0x0d000000, /* sethi %hi(tdata_tmptick), %g6 */ - 0xc459a000, /* ldx [%g6 + %lo(tdata_tmptick)], %g2 */ + 0x0d000000, /* sethi %hi(tdata_tmptick), %g6 */ + 0xc459a000, /* ldx [%g6 + %lo(tdata_tmptick)], %g2 */ 0x8620c002, /* sub %g3, %g2, %g3 */ 0xc4586000, /* ldx [%g1 + tmiss_time], %g2 */ 0x84008003, /* add %g2, %g3, %g2 */ 0xc4706000, /* stx %g2, [%g1 + tmiss_time] */ 0x83f00000 /* retry */ #else /* sun4v */ - 0x82102008, /* mov SCRATCHPAD_CPUID, %g1 */ + 0x82102008, /* mov SCRATCHPAD_CPUID, %g1 */ 0xced84400, /* ldxa [%g1]ASI_SCRATCHPAD, %g7 */ 0x8f29f000, /* sllx %g7, TSTAT_DATA_SHIFT, %g7 */ 0x87410000, /* rd %tick, %g3 */ - 0x03000000, /* sethi %hi(stat), %g1 */ + 0x03000000, /* sethi %hi(stat), %g1 */ 0x82004007, /* add %g1, %g7, %g1 */ 0x82106000, /* or %g1, %lo(stat), %g1 */ 0x8929703d, /* sllx %g5, 61, %g4 */ @@ -1151,9 +1151,9 @@ trapstat_tlbretent(tstat_percpu_t *tcpu, tstat_tlbretent_t *ret, 0xc4586000, /* ldx [%g1 + tmiss_count], %g2 */ 0x8400a001, /* add %g2, 1, %g2 */ 0xc4706000, /* stx %g2, [%g1 + tmiss_count] */ - 0x0d000000, /* sethi %hi(tdata_tmptick), %g6 */ + 0x0d000000, /* sethi %hi(tdata_tmptick), %g6 */ 0x8c018007, /* add %g6, %g7, %g6 */ - 0xc459a000, /* ldx [%g6 + %lo(tdata_tmptick)], %g2 */ + 0xc459a000, /* ldx [%g6 + %lo(tdata_tmptick)], %g2 */ 0x8620c002, /* sub %g3, %g2, %g3 */ 0xc4586000, /* ldx [%g1 + tmiss_time], %g2 */ 0x84008003, /* add %g2, %g3, %g2 */ @@ -1291,7 +1291,7 @@ trapstat_tlbent(tstat_percpu_t *tcpu, int entno) */ static const uint32_t tlbent[] = { #ifndef sun4v - 0x03000000, /* sethi %hi(stat), %g1 */ + 0x03000000, /* sethi %hi(stat), %g1 */ 0xc4586000, /* ldx [%g1 + %lo(stat)], %g2 */ 0x8400a001, /* add %g2, 1, %g2 */ 0xc4706000, /* stx %g2, [%g1 + %lo(stat)] */ @@ -1309,14 +1309,14 @@ trapstat_tlbent(tstat_percpu_t *tcpu, int entno) 0xc2d80000, /* ldxa [%g0]ASI_MMU, %g1 */ 0x83307030, /* srlx %g1, CTXSHIFT, %g1 */ 0x02c04004, /* brz,pn %g1, .+0x10 */ - 0x03000000, /* sethi %hi(new_tpc), %g1 */ + 0x03000000, /* sethi %hi(new_tpc), %g1 */ 0x82106000, /* or %g1, %lo(new_tpc), %g1 */ 0x30800002, /* ba,a .+0x8 */ 0x82106000, /* or %g1, %lo(new_tpc), %g1 */ 0x81904000, /* wrpr %g1, %g0, %tpc */ 0x82006004, /* add %g1, 4, %g1 */ 0x83904000, /* wrpr %g1, %g0, %tnpc */ - 0x03000000, /* sethi %hi(tmptick), %g1 */ + 0x03000000, /* sethi %hi(tmptick), %g1 */ 0x85410000, /* rd %tick, %g2 */ 0xc4706000, /* stx %g2, [%g1 + %lo(tmptick)] */ 0x30800000, /* ba,a addr */ @@ -1325,7 +1325,7 @@ trapstat_tlbent(tstat_percpu_t *tcpu, int entno) 0x82102008, /* mov SCRATCHPAD_CPUID, %g1 */ 0xc8d84400, /* ldxa [%g1]ASI_SCRATCHPAD, %g4 */ 0x89293000, /* sllx %g4, TSTAT_DATA_SHIFT, %g4 */ - 0x03000000, /* sethi %hi(stat), %g1 */ + 0x03000000, /* sethi %hi(stat), %g1 */ 0x82004004, /* add %g1, %g4, %g1 */ 0xc4586000, /* ldx [%g1 + %lo(stat)], %g2 */ 0x8400a001, /* add %g2, 1, %g2 */ @@ -1347,14 +1347,14 @@ trapstat_tlbent(tstat_percpu_t *tcpu, int entno) 0xc2d80400, /* ldxa [%g0]ASI_SCRATCHPAD, %g1 */ 0xc2586000, /* ldx [%g1 + MMFSA_?_CTX], %g1 */ 0x02c04004, /* brz,pn %g1, .+0x10 */ - 0x03000000, /* sethi %hi(new_tpc), %g1 */ + 0x03000000, /* sethi %hi(new_tpc), %g1 */ 0x82106000, /* or %g1, %lo(new_tpc), %g1 */ 0x30800002, /* ba,a .+0x8 */ 0x82106000, /* or %g1, %lo(new_tpc), %g1 */ 0x81904000, /* wrpr %g1, %g0, %tpc */ 0x82006004, /* add %g1, 4, %g1 */ 0x83904000, /* wrpr %g1, %g0, %tnpc */ - 0x03000000, /* sethi %hi(tmptick), %g1 */ + 0x03000000, /* sethi %hi(tmptick), %g1 */ 0x82004004, /* add %g1, %g4, %g1 */ 0x85410000, /* rd %tick, %g2 */ 0xc4706000, /* stx %g2, [%g1 + %lo(tmptick)] */ @@ -1505,7 +1505,7 @@ trapstat_make_traptab(tstat_percpu_t *tcpu) * back before branching to the actual trap table entry. */ static const uint32_t enabled[TSTAT_ENT_NINSTR] = { - 0x03000000, /* sethi %hi(stat), %g1 */ + 0x03000000, /* sethi %hi(stat), %g1 */ 0xc4586000, /* ldx [%g1 + %lo(stat)], %g2 */ 0x8400a001, /* add %g2, 1, %g2 */ 0xc4706000, /* stx %g2, [%g1 + %lo(stat)] */ @@ -1617,9 +1617,9 @@ trapstat_make_traptab(tstat_percpu_t *tcpu) * the interposing trap table. */ static const uint32_t enabled[TSTAT_ENT_NINSTR] = { - 0x03000000, /* sethi %hi(stat), %g1 */ + 0x03000000, /* sethi %hi(stat), %g1 */ 0x82106000, /* or %g1, %lo[stat), %g1 */ - 0x05000000, /* sethi %hi(addr), %g2 */ + 0x05000000, /* sethi %hi(addr), %g2 */ 0x8410a000, /* or %g2, %lo(addr), %g2 */ 0x86102008, /* mov ASI_SCRATCHPAD_CPUID, %g3 */ 0xc6d8c400, /* ldxa [%g3]ASI_SCRATCHPAD, %g3 */ @@ -1628,7 +1628,7 @@ trapstat_make_traptab(tstat_percpu_t *tcpu) }; static const uint32_t enabled_cont[TSTAT_ENT_NINSTR] = { - 0xc8584003, /* ldx [%g1 + %g3], %g4 */ + 0xc8584003, /* ldx [%g1 + %g3], %g4 */ 0x88012001, /* add %g4, 1, %g4 */ 0x81c08000, /* jmp %g2 */ 0xc8704003, /* stx %g4, [%g1 + %g3] */ diff --git a/usr/src/uts/sun4/os/machdep.c b/usr/src/uts/sun4/os/machdep.c index 4409f2ad8f..ca06f151c9 100644 --- a/usr/src/uts/sun4/os/machdep.c +++ b/usr/src/uts/sun4/os/machdep.c @@ -901,11 +901,6 @@ lbolt_softint_post(void) } void -thread_splitstack_run(caddr_t addr, void (*func)(void *), void *) +do_hotinlines(struct module *mp __unused) { - panic("thread_splitstack() not supported on SPARC"); } - -void -thread_splitstack_cleanup(void) -{} |