freebsd-dev/sys/sparc64/include
Marius Strobl 7815d3948c o Revert the other functional half of r239864, i. e. the merge of r134227
from x86 to use smp_ipi_mtx spin lock not only for smp_rendezvous_cpus()
  but also for the MD cache invalidation, TLB demapping and remote register
  reading IPIs due to the following reasons:
  - The cross-IPI SMP deadlock x86 otherwise is subject to can't happen on
    sparc64. That's because on sparc64, spin locks don't disable interrupts
    completely but only raise the processor interrupt level to PIL_TICK. This
    means that IPIs still get delivered and direct dispatch IPIs such as the
    cache invalidation etc. IPIs in question are still executed.
  - In smp_rendezvous_cpus(), smp_ipi_mtx is held not only while sending an
    IPI_RENDEZVOUS, but until all CPUs have processed smp_rendezvous_action().
    Consequently, smp_ipi_mtx may be locked for an extended amount of time as
    queued IPIs (as opposed to the direct ones) such as IPI_RENDEZVOUS are
    scheduled via a soft interrupt. Moreover, given that this soft interrupt
    is only delivered at PIL_RENDEZVOUS, processing of smp_rendezvous_action()
    on a target may be interrupted by f. e. a tick interrupt at PIL_TICK, in
    turn leading to the target in question trying to send an IPI by itself
    while IPI_RENDEZVOUS isn't fully handled, yet, and, thus, resulting in a
    deadlock.
o As mentioned in the commit message of r245850, on least some sun4u platforms
  concurrent sending of IPIs by different CPUs is fatal. Therefore, hold the
  reintroduced MD ipi_mtx also while delivering cross-traps via MI helpers,
  i. e. ipi_{all_but_self,cpu,selected}().
o Akin to x86, let the last CPU to process cpu_mp_bootstrap() set smp_started
  instead of the BSP in cpu_mp_unleash(). This ensures that all APs actually
  are started, when smp_started is no longer 0.
o In all MD and MI IPI helpers, check for smp_started == 1 rather than for
  smp_cpus > 1 or nothing at all. This avoids races during boot causing IPIs
  trying to be delivered to APs that in fact aren't up and running, yet.
  While at it, move setting of the cpu_ipi_{selected,single}() pointers to
  the appropriate delivery functions from mp_init() to cpu_mp_start() where
  it's better suited and allows to get rid of the global isjbus variable.
o Given that now concurrent IPI delivery no longer is possible, also nuke
  the delays before completely disabling interrupts again in the CPU-specific
  cross-trap delivery functions, previously giving other CPUs a window for
  sending IPIs on their part. Actually, we now should be able to entirely get
  rid of completely disabling interrupts in these functions. Such a change
  needs more testing, though.
o In {s,}tick_get_timecount_mp(), make the {s,}tick variable static. While not
  necessary for correctness, this avoids page faults when accessing the stack
  of a foreign CPU as {s,}tick now is locked into the TLBs as part of static
  kernel data. Hence, {s,}tick_get_timecount_mp() always execute as fast as
  possible, avoiding jitter.

PR:		201245
MFC after:	3 days
2015-07-24 15:13:21 +00:00
..
_align.h
_bus.h
_inttypes.h
_limits.h
_stdint.h Make the wchar_t type machine dependent. 2012-06-24 04:15:58 +00:00
_types.h Rename __wchar_t so it no longer conflicts with __wchar_t from clang 3.4 2014-04-01 14:46:11 +00:00
asi.h
asm.h Unbreak sparc64 after r276630 by calling __sparc_sigtramp_setup signal 2015-02-16 22:13:03 +00:00
asmacros.h
atomic.h Add the atomic_thread_fence() family of functions with intent to 2015-07-08 18:12:24 +00:00
bus_common.h
bus_dma.h Add bus_dmamap_load_ma() function to load map with the array of 2013-10-27 21:39:16 +00:00
bus_private.h Move the implementation of bus_space_barrier(9) to the inline function in 2013-10-24 17:06:41 +00:00
bus.h Move the implementation of bus_space_barrier(9) to the inline function in 2013-10-24 17:06:41 +00:00
cache.h
ccr.h
clock.h Now that we have a working OF_printf() since r230631 and a OF_panic() 2012-01-27 23:21:54 +00:00
cmt.h
counter.h Fix issues with zeroing and fetching the counters, on x86 and ppc64. 2013-07-01 02:48:27 +00:00
cpu.h Revert r253748,253749 2013-07-28 18:44:17 +00:00
cpufunc.h
db_machdep.h
dcr.h
dump.h Factor out duplicated code from dumpsys() on each architecture into generic 2015-01-07 01:01:39 +00:00
elf.h Reserve AT_TIMEKEEP auxv entry for providing usermode the pointer to 2012-06-22 06:38:31 +00:00
endian.h Add casts to __uint16_t to the __bswap16() macros on all arches which 2012-03-09 20:34:31 +00:00
exec.h
fireplane.h
float.h Add C11 macros describing subnormal numbers to float.h. 2012-01-23 06:36:41 +00:00
floatingpoint.h
fp.h
frame.h
fsr.h Add a global MD macro for the VIS block size instead of duplicating 2012-08-31 11:15:01 +00:00
gdb_machdep.h
idprom.h
ieee.h
ieeefp.h
in_cksum.h MFp4 bz_ipv6_fast: 2012-05-24 22:00:48 +00:00
instr.h
intr_machdep.h - Give PIL_PREEMPT the lowest priority just above low/stray interrupts. 2012-10-20 12:07:48 +00:00
iommureg.h
iommuvar.h
jbus.h
kdb.h
kerneldump.h
ktr.h - Implement run-time expansion of the KTR buffer via sysctl. 2012-11-15 00:51:57 +00:00
limits.h
lsu.h
mcntl.h
md_var.h For sparc64 also adjust the geometry of da(4) driven disks to not overflow 2011-11-27 15:43:40 +00:00
memdev.h
metadata.h
nexusvar.h
ofw_machdep.h - Now that we have a working OF_printf() since r230631, use it for 2012-01-27 22:35:53 +00:00
ofw_mem.h
ofw_nexus.h
param.h Add fueword(9) and casueword(9) functions. They are like fuword(9) 2014-10-28 15:22:13 +00:00
pcb.h Add a convenience macro for the returns_twice attribute, and apply it to 2012-04-29 11:04:31 +00:00
pcpu.h Merge from projects/counters: 2013-04-08 19:19:10 +00:00
pmap.h Remove unused member. 2013-08-04 21:17:05 +00:00
pmc_mdep.h
proc.h Implement GET_STACK_USAGE. 2013-09-29 13:09:25 +00:00
profile.h
pstate.h
ptrace.h
reg.h Move the 32-bit compatible procfs types from freebsd32.h to <sys/procfs.h> 2015-04-08 16:30:45 +00:00
reloc.h
resource.h
runq.h
sc_machdep.h
setjmp.h
sf_buf.h On sparc64, do not keep mappings for the destroyed sf_bufs. Sparc64 2014-08-10 16:59:39 +00:00
sigframe.h
signal.h
smp.h o Revert the other functional half of r239864, i. e. the merge of r134227 2015-07-24 15:13:21 +00:00
stack.h
stdarg.h
sysarch.h
tick.h
tlb.h
trap.h
tsb.h
tstate.h
tte.h
ucontext.h Prefix the alias macros for members of struct __mcontext with an underscore 2013-07-12 14:24:52 +00:00
upa.h
utrap.h
varargs.h
vdso.h Implement mechanism to export some kernel timekeeping data to 2012-06-22 07:06:40 +00:00
ver.h
vm.h
vmparam.h Retire VM_FREEPOOL_CACHE as the next step in eliminating PG_CACHE pages. 2015-06-08 04:59:32 +00:00
watch.h
wstate.h