freebsd-dev/sys/arm
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
..
allwinner Create a convenince wrapper to fill in a CAM_PATH_INQ request for MMC sims. Pass 2020-01-27 22:19:55 +00:00
altera/socfpga o Add support for multi-port instances of Synopsys DesignWare APB GPIO 2019-09-04 15:37:24 +00:00
amlogic/aml8726 Implement missing MMCBR ivars 2019-07-04 14:15:04 +00:00
annapurna/alpine arm: Add kern_clocksource.c directly in files.arm 2019-04-16 20:04:22 +00:00
arm Reimplement stack capture of running threads on i386 and amd64. 2020-01-31 15:43:33 +00:00
broadcom/bcm2835 bcm2835_vcbus: unifdef all platform definitions 2020-01-17 21:39:28 +00:00
cloudabi32 Use uintptr_t instead of register_t * for the stack base. 2019-12-03 23:17:54 +00:00
conf zilinx/zy7_qspi: Add a qspi driver for Zynq platforms. 2020-01-19 20:04:44 +00:00
freescale Kill off dummy kbd drivers 2019-12-20 16:22:14 +00:00
include Rewrite arm kernel stack unwind code to work when unwinding through modules. 2019-12-15 21:16:35 +00:00
linux sysent targets: further cleanup and deduplication 2020-01-18 20:37:45 +00:00
mv Be consistent about checking return value from bus_delayed_attach_children. 2019-12-13 21:39:20 +00:00
nvidia Fix a few places that free a page from an object without busy held. This is 2019-12-02 22:42:05 +00:00
qemu arm: Add kern_clocksource.c directly in files.arm 2019-04-16 20:04:22 +00:00
ralink Convert to if_foreach_llmaddr() KPI. 2019-10-21 18:13:24 +00:00
rockchip Include eventhandler.h in more compilation units 2019-05-21 01:18:43 +00:00
samsung/exynos Add KERNEL_PANICKED macro for use in place of direct panicstr tests 2020-01-12 06:07:54 +00:00
ti Kill off dummy kbd drivers 2019-12-20 16:22:14 +00:00
versatile Add KERNEL_PANICKED macro for use in place of direct panicstr tests 2020-01-12 06:07:54 +00:00
xilinx zilinx/zy7_qspi: Add a qspi driver for Zynq platforms. 2020-01-19 20:04:44 +00:00