Question about acpi_remove_address_space_handler() behavior if handler is running
i801 i2c driver installs an own ACPI io handler. When discussing some driver improvements one open question is about behavior of acpi_remove_address_space_handler() if the handler is currently running. Will the function wait until handler is finished? In other words, the actual question is: Are we guaranteed that after the call to acpi_remove_address_space_handler() the handler can't be running?
Yes, I think it is guaranteed that the handler is not running:
1) the namespace is locked during the removal.
2) EvDetachRegion is called which runs the _REG method indicating that the region is no longer available.
-----Original Message-----
From: Heiner Kallweit <[email protected]>
Sent: Saturday, September 04, 2021 9:42 AM
To: Moore, Robert <[email protected]>; Erik Kaneda <[email protected]>; Wysocki, Rafael J <[email protected]>
Cc: [email protected]; Jean Delvare <[email protected]>
Subject: Question about acpi_remove_address_space_handler() behavior if handler is running
i801 i2c driver installs an own ACPI io handler. When discussing some driver improvements one open question is about behavior of acpi_remove_address_space_handler() if the handler is currently running.
Will the function wait until handler is finished? In other words, the actual question is: Are we guaranteed that after the call to acpi_remove_address_space_handler() the handler can't be running?