irqbalance/thermal.h
Chang S. Bae b66647ab75 Prepare to handle thermal event
Intel's new hardware supports Hardware Feedback Interface to provide CPU
performance and energy efficiency information. Every update on this is
delivered via thermal event interrupt. The thermal framework in the Linux
kernel relays these notifications to userspace via a Netlink interface.

When a CPU's performance and efficiency are zero, irqbalance needs to mask
the CPU from interrupts. Introduce a new CPU mask to indicate banned CPUs
for this.

Before supporting this event handling, define functions. Their
implementation will be on the following patches.

This event is available only on x86-64 systems. And it can be subscribed
with help of Netlink libraries. So check them before building it.

Also add a new build option so users may opt out this support. Setting this
option on other systems will result in a build failure.

Signed-off-by: Chang S. Bae <chang.seok.bae@intel.com>
2022-06-15 14:52:13 -07:00

16 lines
336 B
C

#ifndef __LINUX_THERMAL_H_
#define __LINUX_THERMAL_H_
#include <glib.h>
#ifdef HAVE_THERMAL
gboolean init_thermal(void);
void deinit_thermal(void);
extern cpumask_t thermal_banned_cpus;
#else
static inline gboolean init_thermal(void) { return FALSE; }
#define deinit_thermal() do { } while (0)
#endif
#endif /* __LINUX_THERMAL_H_ */