Skip to contentSkip to conversation

Question about acpi_remove_address_space_handler() behavior if handler is running

DISCUSSION Heiner Kallweit 2 participants 2 messages Sep 4, 2021 – Sep 7, 2021 ACPI

lore
Share & tools
lore
#0 lore raw

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?

#1 lore raw

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?