Page MenuHomeFreeBSD

[PowerPC] Move pmc_hook out of critical section
ClosedPublic

Authored by luporl on Aug 18 2020, 6:37 PM.
Tags
None
Referenced Files
F175149495: D26111.id.diff
Thu, Oct 8, 4:19 PM
F175149485: D26111.diff
Thu, Oct 8, 4:19 PM
F175149479: D26111.id75960.diff
Thu, Oct 8, 4:19 PM
Unknown Object (File)
Tue, Oct 6, 11:01 PM
Unknown Object (File)
Tue, Oct 6, 9:25 PM
Unknown Object (File)
Thu, Oct 1, 10:17 AM
Unknown Object (File)
Thu, Oct 1, 9:18 AM
Unknown Object (File)
Thu, Oct 1, 1:12 AM
Subscribers

Details

Summary

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.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable