Add a generic netlink spec in YAML format and autogenerate boilerplate code using ynl-regen.sh to introduce a generic netlink for the energy model. It allows a userspace program to read the performance domain and its energy model. It notifies the userspace program when a performance domain is created or deleted or its energy model is updated through a multicast interface. Specifically, it supports two commands: - EM_CMD_GET_PDS: Get the list of information for all performance domains. - EM_CMD_GET_PD_TABLE: Get the energy model table of a performance domain. Also, it supports three notification events: - EM_CMD_PD_CREATED: When a performance domain is created. - EM_CMD_PD_DELETED: When a performance domain is deleted. - EM_CMD_PD_UPDATED: When the energy model table of a performance domain is updated. Finally, update MAINTAINERS to include new files.
Showing the changes to include/uapi (1 of 5 files). Show all
Unified · Split
| @@ -0,0 +1,62 @@ | ||
| 1 | +/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) */ | |
| 2 | +/* Do not edit directly, auto-generated from: */ | |
| 3 | +/* Documentation/netlink/specs/em.yaml */ | |
| 4 | +/* YNL-GEN uapi header */ | |
| 5 | + | |
| 6 | +#ifndef _UAPI_LINUX_ENERGY_MODEL_H | |
| 7 | +#define _UAPI_LINUX_ENERGY_MODEL_H | |
| 8 | + | |
| 9 | +#define EM_FAMILY_NAME "em" | |
| 10 | +#define EM_FAMILY_VERSION 1 | |
| 11 | + | |
| 12 | +enum { | |
| 13 | + EM_A_PDS_PD = 1, | |
| 14 | + | |
| 15 | + __EM_A_PDS_MAX, | |
| 16 | + EM_A_PDS_MAX = (__EM_A_PDS_MAX - 1) | |
| 17 | +}; | |
| 18 | + | |
| 19 | +enum { | |
| 20 | + EM_A_PD_PAD = 1, | |
| 21 | + EM_A_PD_PD_ID, | |
| 22 | + EM_A_PD_FLAGS, | |
| 23 | + EM_A_PD_CPUS, | |
| 24 | + | |
| 25 | + __EM_A_PD_MAX, | |
| 26 | + EM_A_PD_MAX = (__EM_A_PD_MAX - 1) | |
| 27 | +}; | |
| 28 | + | |
| 29 | +enum { | |
| 30 | + EM_A_PD_TABLE_PD_ID = 1, | |
| 31 | + EM_A_PD_TABLE_PS, | |
| 32 | + | |
| 33 | + __EM_A_PD_TABLE_MAX, | |
| 34 | + EM_A_PD_TABLE_MAX = (__EM_A_PD_TABLE_MAX - 1) | |
| 35 | +}; | |
| 36 | + | |
| 37 | +enum { | |
| 38 | + EM_A_PS_PAD = 1, | |
| 39 | + EM_A_PS_PERFORMANCE, | |
| 40 | + EM_A_PS_FREQUENCY, | |
| 41 | + EM_A_PS_POWER, | |
| 42 | + EM_A_PS_COST, | |
| 43 | + EM_A_PS_FLAGS, | |
| 44 | + | |
| 45 | + __EM_A_PS_MAX, | |
| 46 | + EM_A_PS_MAX = (__EM_A_PS_MAX - 1) | |
| 47 | +}; | |
| 48 | + | |
| 49 | +enum { | |
| 50 | + EM_CMD_GET_PDS = 1, | |
| 51 | + EM_CMD_GET_PD_TABLE, | |
| 52 | + EM_CMD_PD_CREATED, | |
| 53 | + EM_CMD_PD_UPDATED, | |
| 54 | + EM_CMD_PD_DELETED, | |
| 55 | + | |
| 56 | + __EM_CMD_MAX, | |
| 57 | + EM_CMD_MAX = (__EM_CMD_MAX - 1) | |
| 58 | +}; | |
| 59 | + | |
| 60 | +#define EM_MCGRP_EVENT "event" | |
| 61 | + | |
| 62 | +#endif /* _UAPI_LINUX_ENERGY_MODEL_H */ | |