STRUCT MV_XOR_CHAN(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… struct mv_xor_chan(9)

okay so bestie, welcome to the Kernel API Manual ✨ β€” section 9, we're in the deep kernel lore now. This page is all about struct mv_xor_chan, and it's literally the internal representation of a XOR channel πŸ”₯. iykyk.


✨ NAME ✨

struct mv_xor_chan β€” the internal representation of a XOR channel. that's it, that's the vibe 🫢


πŸŽ€ SYNOPSIS πŸŽ€

here's the whole struct, laid out exactly as it lives in the source, no cap:

struct mv_xor_chan {
    int pending;
    spinlock_t lock;
    void __iomem            *mmr_base;
    void __iomem            *mmr_high_base;
    unsigned int            idx;
    int irq;
    struct list_head        chain;
    struct list_head        free_slots;
    struct list_head        allocated_slots;
    struct list_head        completed_slots;
    dma_addr_t dma_desc_pool;
    void *dma_desc_pool_virt;
    size_t pool_size;
    struct dma_device       dmadev;
    struct dma_chan         dmachan;
    int slots_allocated;
    struct tasklet_struct   irq_tasklet;
    int op_in_desc;
    char dummy_src[MV_XOR_MIN_BYTE_COUNT];
    char dummy_dst[MV_XOR_MIN_BYTE_COUNT];
    dma_addr_t dummy_src_addr, dummy_dst_addr;
    u32 saved_config_reg, saved_int_mask_reg;
    struct mv_xor_device    *xordev;
 };

like, look at her. main character struct energy πŸ’œ


πŸ¦‹ Members πŸ¦‹

okay so these are the fields the page actually spills the tea on:

  • pending β€” allows batching of hardware operations. lowkey the queue-collector of the group chat πŸŽ€
  • lock β€” serializes enqueue/dequeue operations to the descriptors pool. one at a time, bestie, we're not doing chaos today πŸ’…
  • mmr_base β€” memory mapped register base. the literal address home base ✨
  • idx β€” the index of the xor channel. which one of the siblings she is 🌸
  • chain β€” device chain view of the descriptors. the big-picture friendship bracelet view πŸ”—
  • free_slots β€” free slots usable by the channel. available, unbothered, moisturised 🧚
  • allocated_slots β€” slots allocated by the driver. taken, claimed, spoken for πŸ‘‘
  • completed_slots β€” slots completed by HW but still need to be acked. girl did the work, now she needs her receipt signed 😭
  • slots_allocated β€” records the actual size of the descriptor slot pool. the real, factual headcount fr fr
  • irq_tasklet β€” bottom half where mv_xor_slot_cleanup runs. the cleanup crew, off the main thread 🌈
  • op_in_desc β€” new mode of driver, each op is written to descriptor. it's giving new-era behaviour, periodt πŸ”₯
ngl, a bunch of the other fields β€” mmr_high_base, irq, dma_desc_pool, dma_desc_pool_virt, pool_size, dmadev, dmachan, dummy_src, dummy_dst, dummy_src_addr, dummy_dst_addr, saved_config_reg, saved_int_mask_reg, xordev β€” show up in the struct above but this page doesn't spell out a description for them, so i'm not gonna invent one πŸ™ˆ you saw the exact source, that's what we've got.

🌟 SEE ALSO 🌟

  • Kernel file ./drivers/dma/mv_xor.h
  • struct mv_xor_desc_slot(9) β€” go read her sister page too, bestie πŸ’–

and that's the whole page! this one came from ./drivers/dma, dated October 2026, and it's struct mv_xor_chan(9) all the way down. slay, go forth and XOR responsibly πŸ’…βœ¨πŸ¦‹

πŸ“¦ where this page comes from