Can it87 Linux driver conflict with BIOS or hardware devices (motherboard ASUS M5A99FX PRO 2)? For example, there is a function in Linux driver (drivers/hwmon/it87.c):
/*
* Must be called with data->update_lock held, except during initialization.
* We ignore the IT87 BUSY flag at this moment - it could lead to deadlocks,
* would slow down the IT87 access and should not be necessary.
*/
static int it87_read_value(struct it87_data *data, u8 reg)
{
outb_p(reg, data->addr + IT87_ADDR_REG_OFFSET);
return inb_p(data->addr + IT87_DATA_REG_OFFSET);
}
Is the next situation possible? A firmware, running on core 0 on multicore system, writes into the "data->addr + IT87_ADDR_REG_OFFSET" register. Then Linux driver, running on core 1, executes it87_read_value and thus modifies the "data->addr + IT87_ADDR_REG_OFFSET" register. Then the firmware tries to read "data->addr + IT87_DATA_REG_OFFSET" and gets wrong data.
Also the it87 driver supports alarms: "If an alarm triggers, it will remain triggered until the hardware register is read at least once. This means that the cause for the alarm may already have disappeared! Note that in the current implementation, all hardware registers are read whenever any data is read (unless it is less than 1.5 seconds since the last update). This means that you can easily miss once-only alarms." (Linux kernel, Documentation/hwmon/it87). Is it possible that the firmware will miss an alarm if Linux driver reads the alarm register?
It seems that hardware monitoring chip is IT8721F.
Also the ASUS M5A99FX PRO 2 motherboard contains TPU (turbo processor unit) and EPU (energy processor unit). Do these chips interacts with IT8721F and can a situation similar to the described occur?
Is it known how ASUS Ai Suite interacts with the hardware? Are there a specific ACPI interface to read temperature, a fan speed and so on, which is not implemented in Linux?
Output of the "sensors" command (it87 module manually loaded):
it8721-isa-0290
Adapter: ISA adapter
in0: +2.82 V (min = +1.96 V, max = +3.04 V)
in1: +2.84 V (min = +1.27 V, max = +2.78 V) ALARM
in2: +0.95 V (min = +3.02 V, max = +2.10 V) ALARM
+3.3V: +3.29 V (min = +2.71 V, max = +4.61 V)
in4: +1.02 V (min = +2.92 V, max = +2.41 V) ALARM
in5: +2.52 V (min = +3.04 V, max = +2.23 V) ALARM
in6: +1.92 V (min = +1.48 V, max = +1.75 V) ALARM
3VSB: +2.04 V (min = +1.94 V, max = +5.93 V)
Vbat: +3.29 V
fan1: 903 RPM (min = 22 RPM)
fan2: 0 RPM (min = 11 RPM) ALARM
fan3: 0 RPM (min = 10 RPM) ALARM
temp1: +33.0°C (low = -62.0°C, high = +109.0°C) sensor = thermistor
temp2: +32.0°C (low = -72.0°C, high = +60.0°C) sensor = thermistor
temp3: -128.0°C (low = -33.0°C, high = -125.0°C) sensor = disabled
intrusion0: OK
fan2 and fan3 are absent so 0 RPM is right.
I haven't seen any real problem while "it87" module is loaded and temperature data is being read. But I am not sure that such problem won't occur.