internal.h (208ab16847c562c0d53a0266b6628ef6cb5ab5c2) internal.h (eb6f3187694158ca36e50083e861531488d5c1b1)
1/* SPDX-License-Identifier: GPL-2.0 */
2#ifndef _ASM_X86_RESCTRL_INTERNAL_H
3#define _ASM_X86_RESCTRL_INTERNAL_H
4
5#include <linux/resctrl.h>
6#include <linux/sched.h>
7#include <linux/kernfs.h>
8#include <linux/fs_context.h>

--- 357 unchanged lines hidden (view full) ---

366 struct rdtgroup *rdtgrp;
367 char *buf;
368};
369
370/**
371 * struct rdt_hw_resource - arch private attributes of a resctrl resource
372 * @conf_type: The type that should be used when configuring. temporary
373 * @r_resctrl: Attributes of the resource used directly by resctrl.
1/* SPDX-License-Identifier: GPL-2.0 */
2#ifndef _ASM_X86_RESCTRL_INTERNAL_H
3#define _ASM_X86_RESCTRL_INTERNAL_H
4
5#include <linux/resctrl.h>
6#include <linux/sched.h>
7#include <linux/kernfs.h>
8#include <linux/fs_context.h>

--- 357 unchanged lines hidden (view full) ---

366 struct rdtgroup *rdtgrp;
367 char *buf;
368};
369
370/**
371 * struct rdt_hw_resource - arch private attributes of a resctrl resource
372 * @conf_type: The type that should be used when configuring. temporary
373 * @r_resctrl: Attributes of the resource used directly by resctrl.
374 * @num_closid: Maximum number of closid this hardware can support.
374 * @num_closid: Maximum number of closid this hardware can support,
375 * regardless of CDP. This is exposed via
376 * resctrl_arch_get_num_closid() to avoid confusion
377 * with struct resctrl_schema's property of the same name,
378 * which has been corrected for features like CDP.
375 * @msr_base: Base MSR address for CBMs
376 * @msr_update: Function pointer to update QOS MSRs
377 * @mon_scale: cqm counter * mon_scale = occupancy in bytes
378 * @mbm_width: Monitor width, to detect and correct for overflow.
379 *
380 * Members of this structure are either private to the architecture
381 * e.g. mbm_width, or accessed via helpers that provide abstraction. e.g.
382 * msr_update and msr_base.
383 */
384struct rdt_hw_resource {
385 enum resctrl_conf_type conf_type;
386 struct rdt_resource r_resctrl;
379 * @msr_base: Base MSR address for CBMs
380 * @msr_update: Function pointer to update QOS MSRs
381 * @mon_scale: cqm counter * mon_scale = occupancy in bytes
382 * @mbm_width: Monitor width, to detect and correct for overflow.
383 *
384 * Members of this structure are either private to the architecture
385 * e.g. mbm_width, or accessed via helpers that provide abstraction. e.g.
386 * msr_update and msr_base.
387 */
388struct rdt_hw_resource {
389 enum resctrl_conf_type conf_type;
390 struct rdt_resource r_resctrl;
387 int num_closid;
391 u32 num_closid;
388 unsigned int msr_base;
389 void (*msr_update) (struct rdt_domain *d, struct msr_param *m,
390 struct rdt_resource *r);
391 unsigned int mon_scale;
392 unsigned int mbm_width;
393};
394
395static inline struct rdt_hw_resource *resctrl_to_arch_res(struct rdt_resource *r)

--- 153 unchanged lines hidden ---
392 unsigned int msr_base;
393 void (*msr_update) (struct rdt_domain *d, struct msr_param *m,
394 struct rdt_resource *r);
395 unsigned int mon_scale;
396 unsigned int mbm_width;
397};
398
399static inline struct rdt_hw_resource *resctrl_to_arch_res(struct rdt_resource *r)

--- 153 unchanged lines hidden ---