freebsd-dev/sys/powerpc
Mark Johnston 1c29da0279 Reimplement stack capture of running threads on i386 and amd64.
After r355784 the td_oncpu field is no longer synchronized by the thread
lock, so the stack capture interrupt cannot be delievered precisely.
Fix this using a loop which drops the thread lock and restarts if the
wrong thread was sampled from the stack capture interrupt handler.

Change the implementation to use a regular interrupt instead of an NMI.
Now that we drop the thread lock, there is no advantage to the latter.

Simplify the KPIs.  Remove stack_save_td_running() and add a return
value to stack_save_td().  On platforms that do not support stack
capture of running threads, stack_save_td() returns EOPNOTSUPP.  If the
target thread is running in user mode, stack_save_td() returns EBUSY.

Reviewed by:	kib
Reported by:	mjg, pho
Tested by:	pho
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D23355
2020-01-31 15:43:33 +00:00
..
aim [PowerPC64] fix crash when using machdep.moea64_bpvo_pool_size tunable 2020-01-19 21:17:57 +00:00
amigaone powerpc/amiga: Hide CPLD date and time printing behind bootverbose 2020-01-20 04:01:35 +00:00
booke [PowerPC] Fix Book-E direct map for >=16G ram on e5500 2020-01-18 01:22:54 +00:00
conf [PowerPC64] Enable virtio drivers 2020-01-16 11:33:15 +00:00
cpufreq powerpc: Fix cpufreq statement scoping 2019-03-08 03:59:53 +00:00
fpu powerpc: Apply r178139 from sparc64 to powerpc's fpu_sqrt 2019-04-03 03:54:30 +00:00
include D23057: [PowerPC] Fix offset calculations in bridge mode 2020-01-18 04:12:41 +00:00
mambo sys/powerpc: further adoption of SPDX licensing ID tags. 2017-11-27 15:09:59 +00:00
mikrotik - Allow different slicers for different flash types to be registered 2017-02-22 10:21:39 +00:00
mpc85xx powerpc/mpc85xx: Partially revert r356640 2020-01-13 23:09:00 +00:00
ofw powerpc: Fix the NUMA domain list on powernv 2020-01-18 01:26:54 +00:00
powermac Extract eventfilter declarations to sys/_eventfilter.h 2019-05-20 00:38:23 +00:00
powernv [PPC64] Fix NUMA on POWER8 2020-01-29 18:13:44 +00:00
powerpc Reimplement stack capture of running threads on i386 and amd64. 2020-01-31 15:43:33 +00:00
ps3 Convert to if_foreach_llmaddr() KPI. 2019-10-21 18:13:33 +00:00
pseries This is Ethernet driver so mark the interrupt appropriately. 2020-01-23 01:46:05 +00:00
psim Remove more needless <sys/tty.h> includes 2019-12-01 20:43:37 +00:00