]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
[PowerPC] Move pmc_hook out of critical section
authorluporl <luporl@FreeBSD.org>
Tue, 1 Sep 2020 11:30:39 +0000 (11:30 +0000)
committerluporl <luporl@FreeBSD.org>
Tue, 1 Sep 2020 11:30:39 +0000 (11:30 +0000)
commit5ccc17dd4480e586cb3fff543a8bf93e04d2e409
treead97012c133226793da29c1e3df9d667f0e287a7
parentb42c826a95c14d0893d6e5126209e03bb944f429
[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