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
Unknown Object (File)
Thu, Apr 24, 7:06 PM
Unknown Object (File)
Wed, Apr 23, 2:45 AM
Unknown Object (File)
Tue, Apr 22, 4:52 PM
Unknown Object (File)
Sun, Apr 20, 8:09 AM
Unknown Object (File)
Fri, Apr 18, 11:47 PM
Unknown Object (File)
Fri, Apr 18, 9:58 PM
Unknown Object (File)
Fri, Apr 18, 6:57 PM
Unknown Object (File)
Fri, Apr 18, 6:32 PM
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