Port-sparc64 archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
re: Using %stick where available
mostly LGTM.
all the dancing in cpu_initclocks() and *tickintr_establish()
for curcpu() and primary CPU seems bogus. all those code only
ever runs on the boot cpu. this isn't your change, but your
change copies stuf that looked strange to me. (the other thing
that sticks out about this code is the way it uses cpucpur()
without disabling kpreempt, but it doesn't matter yet..)
> @@ -3270,13 +3270,18 @@
> wrpr %g0, PSTATE_KERN|PSTATE_IG, %pstate ! DEBUG
> #endif
> /*
> - * If this is a %tick softint, clear it then call interrupt_vector.
> + * If this is a %tick or %stick softint, clear it then call
> + * interrupt_vector. Only one of them should be enabled at any given
> + * time.
> */
> rd SOFTINT, %g1
> - btst 1, %g1
> + mov 1, %g5
> + sllx %g5, 16, %g3
> + or %g5, %g3, %g5
> + andcc %g5, %g1, %g5
hmm, i think maybe this saves an insn here:
sethi %hi(1 << 16), %g5
or %g5, 1, %g5
andcc %g5, %g1, %g5
> bz,pt %icc, 0f
> sethi %hi(CPUINFO_VA+CI_TICK_IH), %g3
> - wr %g0, 1, CLEAR_SOFTINT
> + wr %g0, %g5, CLEAR_SOFTINT
> ba,pt %icc, setup_sparcintr
> LDPTR [%g3 + %lo(CPUINFO_VA+CI_TICK_IH)], %g5
> 0:
be nice if someone implemented the 10 year failure :)
.mrg.
Home |
Main Index |
Thread Index |
Old Index