STRUCT EDAC_MEM_REPAIR_OPS(9)
π struct edac_mem_repair_ops(9) π
okay bestie, welcome to the glow-up guide for struct edac_mem_repair_ops β this is a Kernel API Manual page, and it's giving "backstage pass to the memory repair ops table" energy. Every element in here is optional except do_repair and set_hpa/set_dpa, so likeβ¦ mostly chill, but those three? main character energy, no cap. π
β¨ NAME β¨
struct edac_mem_repair_ops β memory repair operations (all elements are optional except do_repair, set_hpa/set_dpa)
πΈ SYNOPSIS πΈ
struct edac_mem_repair_ops {
int (*get_repair_type)(struct device *dev, void *drv_data, const char **type);
int (*get_persist_mode)(struct device *dev, void *drv_data, bool *persist);
int (*set_persist_mode)(struct device *dev, void *drv_data, bool persist);
int (*get_repair_safe_when_in_use)(struct device *dev, void *drv_data, bool *safe);
int (*get_hpa)(struct device *dev, void *drv_data, u64 *hpa);
int (*set_hpa)(struct device *dev, void *drv_data, u64 hpa);
int (*get_min_hpa)(struct device *dev, void *drv_data, u64 *hpa);
int (*get_max_hpa)(struct device *dev, void *drv_data, u64 *hpa);
int (*get_dpa)(struct device *dev, void *drv_data, u64 *dpa);
int (*set_dpa)(struct device *dev, void *drv_data, u64 dpa);
int (*get_min_dpa)(struct device *dev, void *drv_data, u64 *dpa);
int (*get_max_dpa)(struct device *dev, void *drv_data, u64 *dpa);
int (*get_nibble_mask)(struct device *dev, void *drv_data, u32 *val);
int (*set_nibble_mask)(struct device *dev, void *drv_data, u32 val);
int (*get_bank_group)(struct device *dev, void *drv_data, u32 *val);
int (*set_bank_group)(struct device *dev, void *drv_data, u32 val);
int (*get_bank)(struct device *dev, void *drv_data, u32 *val);
int (*set_bank)(struct device *dev, void *drv_data, u32 val);
int (*get_rank)(struct device *dev, void *drv_data, u32 *val);
int (*set_rank)(struct device *dev, void *drv_data, u32 val);
int (*get_row)(struct device *dev, void *drv_data, u32 *val);
int (*set_row)(struct device *dev, void *drv_data, u32 val);
int (*get_column)(struct device *dev, void *drv_data, u32 *val);
int (*set_column)(struct device *dev, void *drv_data, u32 val);
int (*get_channel)(struct device *dev, void *drv_data, u32 *val);
int (*set_channel)(struct device *dev, void *drv_data, u32 val);
int (*get_sub_channel)(struct device *dev, void *drv_data, u32 *val);
int (*set_sub_channel)(struct device *dev, void *drv_data, u32 val);
int (*do_repair)(struct device *dev, void *drv_data, u32 val);
};
π¦ Members π¦
one bullet per lil function pointer, all facts intact, let's go π₯
π the type + persistence girlies
get_repair_typeβ grabs the memory repair type, and it's listed inenum edac_mem_repair_function. lowkey the label-maker of the group πget_persist_modeβ gets the current persist mode.falsemeans Soft repair type (temporary repair),truemeans Hard memory repair type (permanent repair). she's a simple booleAN icon πset_persist_modeβ sets the persist mode of the memory repair instance. matching set with her sister above, we love a duo β¨get_repair_safe_when_in_useβ gets whether memory media is accessible and data is retained during the repair operation. iykyk, this one's the vibe check π«Ά
π address besties (HPA squad)
get_hpaβ gets the current host physical address (HPA) of the memory to repair.set_hpaβ sets the host physical address (HPA) of the memory to repair. βget_min_hpaβ gets the minimum supported host physical address (HPA).get_max_hpaβ gets the maximum supported host physical address (HPA).
π address besties (DPA squad)
get_dpaβ gets the current device physical address (DPA) of the memory to repair.set_dpaβ sets the device physical address (DPA) of the memory to repair. In some states of system configuration (e.g. before address decoders have been configured), memory devices (e.g. CXL) may not have an active mapping in the host physical address map. As such, the memory to repair must be identified by a device specific physical addressing scheme using a device physical address(DPA). The DPA and other control attributes to use for the repair operations will be presented in related error records. π (yeah that's a lot, but it's literally the whole point, don't skip it)get_min_dpaβ gets the minimum supported device physical address (DPA).get_max_dpaβ gets the maximum supported device physical address (DPA).
π§ the attribute committee (get + set pairs, slay)
get_nibble_maskβ gets the current nibble mask of the memory to repair.set_nibble_maskβ sets the nibble mask of the memory to repair.get_bank_groupβ gets the current bank group of the memory to repair.set_bank_groupβ sets the bank group of the memory to repair.get_bankβ gets the current bank of the memory to repair.set_bankβ sets the bank of the memory to repair.get_rankβ gets the current rank of the memory to repair.set_rankβ sets the rank of the memory to repair.get_rowβ gets the current row of the memory to repair.set_rowβ sets the row of the memory to repair.get_columnβ gets the current column of the memory to repair.set_columnβ sets the column of the memory to repair.get_channelβ gets the current channel of the memory to repair.set_channelβ sets the channel of the memory to repair.get_sub_channelβ gets the current subchannel of the memory to repair.set_sub_channelβ sets the subchannel of the memory to repair.
π the one that actually does the thing
do_repairβ issues the memory repair operation for the HPA/DPA and other control attributes set for the memory to repair. this is HER moment, the final boss, the reason we're all here π π₯
π Description π
real talk: all elements are optional except do_repair and at least one of set_hpa/set_dpa. everything else can vibe in the void, but those you genuinely need. periodt. π«Ά
π SEE ALSO π
- Kernel file
./include/linux/edac.h enum dev_type(9)enum hw_event_mc_err_type(9)enum mem_type(9)enum edac_type(9)enum scrub_type(9)enum edac_mc_layer_type(9)struct edac_mc_layer(9)struct rank_info(9)struct edac_raw_error_desc(9)edac_get_dimm(9)struct edac_scrub_ops(9)struct edac_ecs_ops(9)
bestie heads up π this page comes from./include/linuxand it's dated October 2026, so likeβ¦ future-slay. go read theedac.hfile if you want the deep lore, i believe in you π
and that's the whole page!! mwah, you did amazing, go repair some memory π§ββοΈβ¨π
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms