# daffasysgoogle/kernel-linux architecture

> Architecture diagram of the GitHub repository daffasysgoogle/kernel-linux, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-28). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/daffasysgoogle/kernel-linux
- Repository: https://github.com/daffasysgoogle/kernel-linux

## Overview

Linux is a general-purpose operating-system kernel: it mediates hardware access and provides services to userspace and other kernel subsystems. The sampled code shows several independent runtime areas rather than one end-to-end application: DMA transfers, queued crypto requests, SPI controller operation, USB mass storage, ROMFS reads, and GPU engine management. The graph keeps those domains distinct and shows only relationships supported by the excerpts. The file tree and samples are incomplete, so important wiring and other kernel capabilities are not mapped here.

Main entry points: [`fs/romfs/storage.c`](https://github.com/daffasysgoogle/kernel-linux/blob/master/fs/romfs/storage.c) (ROMFS storage access), [`drivers/usb/gadget/function/f_mass_storage.c`](https://github.com/daffasysgoogle/kernel-linux/blob/master/drivers/usb/gadget/function/f_mass_storage.c) (USB mass storage), [`drivers/dma/dmaengine.c`](https://github.com/daffasysgoogle/kernel-linux/blob/master/drivers/dma/dmaengine.c) (DMAengine core), [`drivers/iio/buffer/industrialio-buffer-dmaengine.c`](https://github.com/daffasysgoogle/kernel-linux/blob/master/drivers/iio/buffer/industrialio-buffer-dmaengine.c) (IIO DMA buffer)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_dma["DMA transfers"]
  node_iio["IIO DMA buffer"]
  node_dma_api["DMAengine core<br/>[dmaengine.c]"]
  node_ccp["CCP DMA provider<br/>[ccp-dmaengine.c]"]
  node_ptdma["AMD PTDMA provider<br/>[ptdma-dmaengine.c]"]
end

subgraph group_crypto["Crypto requests"]
  node_crypto_api["Crypto engine API<br/>[engine.h]"]
  node_crypto_engine["Crypto engine framework<br/>[crypto_engine.c]"]
end

subgraph group_io["Device I/O"]
  node_spi_controller["SPI Engine controller"]
  node_apu_board["APU board GPIO<br/>[pcengines-apuv2.c]"]
end

subgraph group_storage["Storage"]
  node_usb_storage["USB mass storage<br/>[f_mass_storage.c]"]
  node_romfs["ROMFS storage access<br/>[storage.c]"]
end

subgraph group_gpu["GPU engines"]
  node_i915_engines["i915 GPU engines<br/>[intel_engine_cs.c]"]
  node_xe_engines["Xe GPU engines<br/>[xe_hw_engine.c]"]
end

node_block_device[("Block device")]
node_mtd_device[("MTD device")]
node_usb_host(("USB host"))
node_backing_medium[("Backing medium")]

node_iio -->|"submits transfers"| node_dma_api
node_ccp -->|"registers channels"| node_dma_api
node_crypto_engine -->|"implements API"| node_crypto_api
node_usb_host -->|"sends commands"| node_usb_storage
node_usb_storage -->|"reads and writes"| node_backing_medium
node_romfs -->|"reads image"| node_block_device
node_romfs -->|"reads image"| node_mtd_device

click node_iio "https://github.com/daffasysgoogle/kernel-linux/blob/master/drivers/iio/buffer/industrialio-buffer-dmaengine.c"
click node_dma_api "https://github.com/daffasysgoogle/kernel-linux/blob/master/drivers/dma/dmaengine.c"
click node_ccp "https://github.com/daffasysgoogle/kernel-linux/blob/master/drivers/crypto/ccp/ccp-dmaengine.c"
click node_ptdma "https://github.com/daffasysgoogle/kernel-linux/blob/master/drivers/dma/amd/ptdma/ptdma-dmaengine.c"
click node_crypto_api "https://github.com/daffasysgoogle/kernel-linux/blob/master/include/crypto/engine.h"
click node_crypto_engine "https://github.com/daffasysgoogle/kernel-linux/blob/master/crypto/crypto_engine.c"
click node_spi_controller "https://github.com/daffasysgoogle/kernel-linux/blob/master/drivers/spi/spi-axi-spi-engine.c"
click node_apu_board "https://github.com/daffasysgoogle/kernel-linux/blob/master/drivers/platform/x86/pcengines-apuv2.c"
click node_usb_storage "https://github.com/daffasysgoogle/kernel-linux/blob/master/drivers/usb/gadget/function/f_mass_storage.c"
click node_romfs "https://github.com/daffasysgoogle/kernel-linux/blob/master/fs/romfs/storage.c"
click node_i915_engines "https://github.com/daffasysgoogle/kernel-linux/blob/master/drivers/gpu/drm/i915/gt/intel_engine_cs.c"
click node_xe_engines "https://github.com/daffasysgoogle/kernel-linux/blob/master/drivers/gpu/drm/xe/xe_hw_engine.c"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_iio,node_dma_api,node_ccp,node_ptdma toneBlue
class node_crypto_api,node_crypto_engine,node_block_device,node_mtd_device,node_backing_medium toneAmber
class node_spi_controller,node_apu_board toneMint
class node_usb_storage,node_romfs toneRose
class node_i915_engines,node_xe_engines,node_usb_host toneIndigo
```

## Components

### DMA transfers

- [IIO DMA buffer](https://github.com/daffasysgoogle/kernel-linux/blob/master/drivers/iio/buffer/industrialio-buffer-dmaengine.c): `drivers/iio/buffer/industrialio-buffer-dmaengine.c`
- [DMAengine core](https://github.com/daffasysgoogle/kernel-linux/blob/master/drivers/dma/dmaengine.c): `drivers/dma/dmaengine.c`
- [CCP DMA provider](https://github.com/daffasysgoogle/kernel-linux/blob/master/drivers/crypto/ccp/ccp-dmaengine.c): `drivers/crypto/ccp/ccp-dmaengine.c`
- [AMD PTDMA provider](https://github.com/daffasysgoogle/kernel-linux/blob/master/drivers/dma/amd/ptdma/ptdma-dmaengine.c): `drivers/dma/amd/ptdma/ptdma-dmaengine.c`

### Crypto requests

- [Crypto engine API](https://github.com/daffasysgoogle/kernel-linux/blob/master/include/crypto/engine.h): `include/crypto/engine.h`
- [Crypto engine framework](https://github.com/daffasysgoogle/kernel-linux/blob/master/crypto/crypto_engine.c): `crypto/crypto_engine.c`

### Device I/O

- [SPI Engine controller](https://github.com/daffasysgoogle/kernel-linux/blob/master/drivers/spi/spi-axi-spi-engine.c): `drivers/spi/spi-axi-spi-engine.c`
- [APU board GPIO](https://github.com/daffasysgoogle/kernel-linux/blob/master/drivers/platform/x86/pcengines-apuv2.c): `drivers/platform/x86/pcengines-apuv2.c`

### Storage

- [USB mass storage](https://github.com/daffasysgoogle/kernel-linux/blob/master/drivers/usb/gadget/function/f_mass_storage.c): `drivers/usb/gadget/function/f_mass_storage.c`
- [ROMFS storage access](https://github.com/daffasysgoogle/kernel-linux/blob/master/fs/romfs/storage.c): `fs/romfs/storage.c`

### GPU engines

- [i915 GPU engines](https://github.com/daffasysgoogle/kernel-linux/blob/master/drivers/gpu/drm/i915/gt/intel_engine_cs.c): `drivers/gpu/drm/i915/gt/intel_engine_cs.c`
- [Xe GPU engines](https://github.com/daffasysgoogle/kernel-linux/blob/master/drivers/gpu/drm/xe/xe_hw_engine.c): `drivers/gpu/drm/xe/xe_hw_engine.c`

### Other components

- **Block device**
- **MTD device**
- **USB host**
- **Backing medium**

## Connections

- IIO DMA buffer → DMAengine core: submits transfers
- CCP DMA provider → DMAengine core: registers channels
- Crypto engine framework → Crypto engine API: implements API
- USB host → USB mass storage: sends commands
- USB mass storage → Backing medium: reads and writes
- ROMFS storage access → Block device: reads image
- ROMFS storage access → MTD device: reads image
