]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
[PowerPC] Move pmc_hook out of critical section
authorLeandro Lupori <luporl@FreeBSD.org>
Tue, 1 Sep 2020 11:30:39 +0000 (11:30 +0000)
committerLeandro Lupori <luporl@FreeBSD.org>
Tue, 1 Sep 2020 11:30:39 +0000 (11:30 +0000)
commit9b23e3845bc49deb676aa34a93dbb75c1d7f2c7c
treead97012c133226793da29c1e3df9d667f0e287a7
parent21f81763b3c1576c96c8cff735b0b87f4218720f
[PowerPC] Move pmc_hook out of critical section

Calling pmc_hook inside a critical section may result in a panic.

This happens when the user callchain is fetched, because it uses
pmap_map_user_ptr, that tries to get the (sleepable) pmap lock when the
needed vsid is not found.

Judging by the implementation in other platforms, intr_irq_handler in
kern/subr_intr.c and what pmc_hook do, it seems safe to move pmc_hook
outside the critical section.

Sponsored by: Eldorado Research Institute (eldorado.org.br)
Differential Revision: https://reviews.freebsd.org/D26111
sys/powerpc/powerpc/interrupt.c