• Ricardo Neri's avatar
    thermal: intel: hfi: Enable notification interrupt · ab09b074
    Ricardo Neri authored
    When hardware wants to inform the operating system about updates in the HFI
    table, it issues a package-level thermal event interrupt. For this,
    hardware has new interrupt and status bits in the IA32_PACKAGE_THERM_
    INTERRUPT and IA32_PACKAGE_THERM_STATUS registers. The existing thermal
    throttle driver already handles thermal event interrupts: it initializes
    the thermal vector of the local APIC as well as per-CPU and package-level
    interrupt reporting. It also provides routines to service such interrupts.
    Extend its functionality to also handle HFI interrupts.
    
    The frequency of the thermal HFI interrupt is specific to each processor
    model. On some processors, a single interrupt happens as soon as the HFI is
    enabled and hardware will never update HFI capabilities afterwards. On
    other processors, thermal and power constraints may cause thermal HFI
    interrupts every tens of milliseconds.
    
    To not overwhelm consumers of the HFI data, use delayed work to throttle
    the rate at which HFI updates are processed. Use a dedicated workqueue to
    not overload system_wq if hardware issues many HFI updates.
    Reviewed-by: default avatarLen Brown <len.brown@intel.com>
    Signed-off-by: default avatarRicardo Neri <ricardo.neri-calderon@linux.intel.com>
    Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
    ab09b074
therm_throt.c 21.4 KB