include/linux/arm_mpam.h
Source file repositories/reference/linux-study-clean/include/linux/arm_mpam.h
File Facts
- System
- Linux kernel
- Corpus path
include/linux/arm_mpam.h- Extension
.h- Size
- 3222 bytes
- Lines
- 99
- Domain
- Core OS
- Bucket
- Core Kernel Interface
- Inferred role
- Core OS: implementation source
- Status
- source implementation candidate
Why This File Exists
Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/acpi.hlinux/resctrl_types.hlinux/types.h
Detected Declarations
struct mpam_mscstruct rdt_resourceenum mpam_msc_ifaceenum mpam_class_typesfunction acpi_mpam_parse_resourcesfunction acpi_mpam_count_mscfunction mpam_ris_createfunction resctrl_arch_enable_mon
Annotated Snippet
static inline int acpi_mpam_count_msc(void) { return -EINVAL; }
#endif
#ifdef CONFIG_ARM64_MPAM_DRIVER
int mpam_ris_create(struct mpam_msc *msc, u8 ris_idx,
enum mpam_class_types type, u8 class_id, int component_id);
#else
static inline int mpam_ris_create(struct mpam_msc *msc, u8 ris_idx,
enum mpam_class_types type, u8 class_id,
int component_id)
{
return -EINVAL;
}
#endif
bool resctrl_arch_alloc_capable(void);
bool resctrl_arch_mon_capable(void);
void resctrl_arch_set_cpu_default_closid(int cpu, u32 closid);
void resctrl_arch_set_closid_rmid(struct task_struct *tsk, u32 closid, u32 rmid);
void resctrl_arch_set_cpu_default_closid_rmid(int cpu, u32 closid, u32 rmid);
void resctrl_arch_sched_in(struct task_struct *tsk);
bool resctrl_arch_match_closid(struct task_struct *tsk, u32 closid);
bool resctrl_arch_match_rmid(struct task_struct *tsk, u32 closid, u32 rmid);
u32 resctrl_arch_rmid_idx_encode(u32 closid, u32 rmid);
void resctrl_arch_rmid_idx_decode(u32 idx, u32 *closid, u32 *rmid);
u32 resctrl_arch_system_num_rmid_idx(void);
struct rdt_resource;
void *resctrl_arch_mon_ctx_alloc(struct rdt_resource *r, enum resctrl_event_id evtid);
void resctrl_arch_mon_ctx_free(struct rdt_resource *r, enum resctrl_event_id evtid, void *ctx);
/*
* The CPU configuration for MPAM is cheap to write, and is only written if it
* has changed. No need for fine grained enables.
*/
static inline void resctrl_arch_enable_mon(void) { }
static inline void resctrl_arch_disable_mon(void) { }
static inline void resctrl_arch_enable_alloc(void) { }
static inline void resctrl_arch_disable_alloc(void) { }
static inline unsigned int resctrl_arch_round_mon_val(unsigned int val)
{
return val;
}
/**
* mpam_register_requestor() - Register a requestor with the MPAM driver
* @partid_max: The maximum PARTID value the requestor can generate.
* @pmg_max: The maximum PMG value the requestor can generate.
*
* Registers a requestor with the MPAM driver to ensure the chosen system-wide
* minimum PARTID and PMG values will allow the requestors features to be used.
*
* Returns an error if the registration is too late, and a larger PARTID/PMG
* value has been advertised to user-space. In this case the requestor should
* not use its MPAM features. Returns 0 on success.
*/
int mpam_register_requestor(u16 partid_max, u8 pmg_max);
#endif /* __LINUX_ARM_MPAM_H */
Annotation
- Immediate include surface: `linux/acpi.h`, `linux/resctrl_types.h`, `linux/types.h`.
- Detected declarations: `struct mpam_msc`, `struct rdt_resource`, `enum mpam_msc_iface`, `enum mpam_class_types`, `function acpi_mpam_parse_resources`, `function acpi_mpam_count_msc`, `function mpam_ris_create`, `function resctrl_arch_enable_mon`.
- Atlas domain: Core OS / Core Kernel Interface.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.