freebsd-dev/sys/mips
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
..
atheros [ar71xx] generate a random mac address using eth_gen_addr() 2019-12-28 06:56:21 +00:00
beri Move phys_avail definition into MI code. It is consumed in the MI layer and 2019-08-16 00:45:14 +00:00
broadcom Move phys_avail definition into MI code. It is consumed in the MI layer and 2019-08-16 00:45:14 +00:00
cavium Regularize my copyright notice 2019-12-04 16:56:11 +00:00
conf [atheros] [mips] Add the GPIO driver (back) to the TL-WDR3600/TL-WDR4300 kernel. 2019-12-17 00:00:03 +00:00
include [PowerPC] [MIPS] Implement 32-bit kernel emulation of atomic64 operations 2020-01-02 23:20:37 +00:00
ingenic Remove "all rights reserved" from copyright for the file that Jared McNeill 2019-12-03 21:05:33 +00:00
malta Move phys_avail definition into MI code. It is consumed in the MI layer and 2019-08-16 00:45:14 +00:00
mediatek Move phys_avail definition into MI code. It is consumed in the MI layer and 2019-08-16 00:45:14 +00:00
mips Reimplement stack capture of running threads on i386 and amd64. 2020-01-31 15:43:33 +00:00
nlm Introduce flag IFF_NEEDSEPOCH that marks Ethernet interfaces that 2020-01-23 01:41:09 +00:00