/* SPDX-License-Identifier: GPL-2.0-only */
/* Copyright(c) 2024-2025 Intel Corporation. */
#ifndef __CXL_FEATURES_H__
#define __CXL_FEATURES_H__
#include <linux/uuid.h>
#include <linux/fwctl.h>
#include <uapi/cxl/features.h>
/* Feature UUIDs used by the kernel */
#define CXL_FEAT_PATROL_SCRUB_UUID \
UUID_INIT(0 x96dad7d6, 0 xfde8, 0 x482b, 0 xa7, 0 x33, 0 x75, 0 x77, 0 x4e, \
0 x06, 0 xdb, 0 x8a)
#define CXL_FEAT_ECS_UUID \
UUID_INIT(0 xe5b13f22, 0 x2328, 0 x4a14, 0 xb8, 0 xba, 0 xb9, 0 x69, 0 x1e, \
0 x89, 0 x33, 0 x86)
#define CXL_FEAT_SPPR_UUID \
UUID_INIT(0 x892ba475, 0 xfad8, 0 x474e, 0 x9d, 0 x3e, 0 x69, 0 x2c, 0 x91, \
0 x75, 0 x68, 0 xbb)
#define CXL_FEAT_HPPR_UUID \
UUID_INIT(0 x80ea4521, 0 x786f, 0 x4127, 0 xaf, 0 xb1, 0 xec, 0 x74, 0 x59, \
0 xfb, 0 x0e, 0 x24)
#define CXL_FEAT_CACHELINE_SPARING_UUID \
UUID_INIT(0 x96C33386, 0 x91dd, 0 x44c7, 0 x9e, 0 xcb, 0 xfd, 0 xaf, 0 x65, \
0 x03, 0 xba, 0 xc4)
#define CXL_FEAT_ROW_SPARING_UUID \
UUID_INIT(0 x450ebf67, 0 xb135, 0 x4f97, 0 xa4, 0 x98, 0 xc2, 0 xd5, 0 x7f, \
0 x27, 0 x9b, 0 xed)
#define CXL_FEAT_BANK_SPARING_UUID \
UUID_INIT(0 x78b79636, 0 x90ac, 0 x4b64, 0 xa4, 0 xef, 0 xfa, 0 xac, 0 x5d, \
0 x18, 0 xa8, 0 x63)
#define CXL_FEAT_RANK_SPARING_UUID \
UUID_INIT(0 x34dbaff5, 0 x0552, 0 x4281, 0 x8f, 0 x76, 0 xda, 0 x0b, 0 x5e, \
0 x7a, 0 x76, 0 xa7)
/* Feature commands capability supported by a device */
enum cxl_features_capability {
CXL_FEATURES_NONE = 0 ,
CXL_FEATURES_RO,
CXL_FEATURES_RW,
};
/**
* struct cxl_features_state - The Features state for the device
* @ cxlds : Pointer to CXL device state
* @ entries : CXl feature entry context
*/
struct cxl_features_state {
struct cxl_dev_state *cxlds;
struct cxl_feat_entries {
int num_features;
int num_user_features;
struct cxl_feat_entry ent[] __counted_by(num_features);
} *entries;
};
struct cxl_mailbox;
struct cxl_memdev;
#ifdef CONFIG_CXL_FEATURES
struct cxl_features_state *to_cxlfs(struct cxl_dev_state *cxlds);
int devm_cxl_setup_features(struct cxl_dev_state *cxlds);
int devm_cxl_setup_fwctl(struct device *host, struct cxl_memdev *cxlmd);
#else
static inline struct cxl_features_state *to_cxlfs(struct cxl_dev_state *cxlds)
{
return NULL;
}
static inline int devm_cxl_setup_features(struct cxl_dev_state *cxlds)
{
return -EOPNOTSUPP;
}
static inline int devm_cxl_setup_fwctl(struct device *host,
struct cxl_memdev *cxlmd)
{
return -EOPNOTSUPP;
}
#endif
#endif
Messung V0.5 in Prozent C=95 H=100 G=97
¤ Dauer der Verarbeitung: 0.9 Sekunden
(vorverarbeitet am 2026-09-29)
¤
*© Formatika GbR, Deutschland