STRUCT DUP_BLOCK_CTX(9)
π NAME π
okay bestie, welcome to the struct dup_block_ctx(9) page from the Kernel API Manual. This struct is literally the context to initialize unit instances across multiple blocks, where block can be either a dcore of duplicated common module. the way that this code works is by relying on constant offsets of blocks and unit instances in a block β no cap, that's the whole vibe. β¨
β¨ SYNOPSIS β¨
struct dup_block_ctx {
void (*instance_cfg_fn)(struct hl_device *hdev, u64 base, void *data);
void *data;
u64 base;
u64 block_off;
u64 instance_off;
u64 enabled_mask;
unsigned int blocks;
unsigned int instances;
};
π«Ά Members π«Ά
bestie, here's the member-by-member vibe check β every field is carrying its own main character energy:
instance_cfg_fnβ the instance-specific configuration function. iconic little callback behavior.dataβ private configuration data. your own little stash, iykyk.baseβ base address of the first instance in the first block.block_offβ subsequent blocks address spacing.instance_offβ subsequent block's instances address spacing.enabled_maskβ mask of enabled instances (1- enabled,0- disabled). periodt.blocksβ number of blocks.instancesβ unit instances per block.
π SEE ALSO π
Kernel file ./drivers/accel/habanalabs/gaudi2/gaudi2P.h, struct gaudi2_queues_test_info(9), struct gaudi2_device(9). go check those out, fr fr π¦
xoxo bestie, source/version is ./drivers/accel/habanalabs/gaudi2 and the date is October 2026 π
π¦ 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