# archlinux/linux architecture

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

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

## Overview

Linux is the kernel at the center of an operating system: it exposes system services while coordinating hardware through architecture code and drivers. The sampled files show several independent product paths rather than one end-to-end workflow: a guarded-storage syscall, asynchronous DMA, camera pipeline setup, USB mass-storage handling, GPU engine management, and device-specific drivers. The graph keeps these branches separate. Evidence is limited to the README, source index, and excerpts; many listed kernel subsystems are not sampled, so their internal links are omitted.

Main entry points: [`drivers/crypto/intel/qat/qat_common/adf_accel_engine.c`](https://github.com/archlinux/linux/blob/master/drivers/crypto/intel/qat/qat_common/adf_accel_engine.c) (QAT accelerator), [`drivers/usb/gadget/function/f_mass_storage.c`](https://github.com/archlinux/linux/blob/master/drivers/usb/gadget/function/f_mass_storage.c) (USB mass storage), [`drivers/dma/dmaengine.c`](https://github.com/archlinux/linux/blob/master/drivers/dma/dmaengine.c) (DMA framework), [`drivers/staging/media/atomisp/pci/runtime/pipeline/src/pipeline.c`](https://github.com/archlinux/linux/blob/master/drivers/staging/media/atomisp/pci/runtime/pipeline/src/pipeline.c) (Camera pipeline)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_core["Kernel interfaces"]
  node_guarded["Guarded storage<br/>[guarded_storage.c]"]
  node_dma["DMA framework<br/>[dmaengine.c]"]
end

subgraph group_media["Media and graphics"]
  node_atomisp["Camera pipeline<br/>[pipeline.c]"]
  node_i915["i915 engines<br/>[intel_engine_cs.c]"]
  node_xe["Xe engines<br/>[xe_hw_engine.c]"]
end

subgraph group_devices["Device drivers"]
  node_ptdma["AMD passthrough DMA<br/>[ptdma-dmaengine.c]"]
  node_massstorage["USB mass storage<br/>[f_mass_storage.c]"]
  node_storagecommon["Storage common<br/>[storage_common.h]"]
  node_legacygadget["Legacy gadget setup<br/>[mass_storage.c]"]
  node_soundwire["AMD SoundWire<br/>[amd_manager.c]"]
end

subgraph group_crypto["Cryptography"]
  node_ccpdma["CCP DMA<br/>[ccp-dmaengine.c]"]
  node_qat["QAT accelerator<br/>[adf_accel_engine.c]"]
  node_qatdevice["QAT device model"]
  node_cryptoengine["Crypto request engine<br/>[crypto_engine.c]"]
end

node_user(("User process"))
node_ispfirmware["ISP processor"]
node_firmware["Firmware service"]

node_user -->|"invokes syscall"| node_guarded
node_ptdma -.->|"uses DMA API"| node_dma
node_ccpdma -.->|"uses DMA API"| node_dma
node_massstorage -->|"uses definitions"| node_storagecommon
node_legacygadget -->|"configures function"| node_massstorage
node_atomisp -->|"initializes pipeline"| node_ispfirmware
node_qat -->|"uses device model"| node_qatdevice
node_qat -->|"loads firmware"| node_firmware

click node_guarded "https://github.com/archlinux/linux/blob/master/arch/s390/kernel/guarded_storage.c"
click node_dma "https://github.com/archlinux/linux/blob/master/drivers/dma/dmaengine.c"
click node_ptdma "https://github.com/archlinux/linux/blob/master/drivers/dma/amd/ptdma/ptdma-dmaengine.c"
click node_ccpdma "https://github.com/archlinux/linux/blob/master/drivers/crypto/ccp/ccp-dmaengine.c"
click node_massstorage "https://github.com/archlinux/linux/blob/master/drivers/usb/gadget/function/f_mass_storage.c"
click node_storagecommon "https://github.com/archlinux/linux/blob/master/drivers/usb/gadget/function/storage_common.h"
click node_legacygadget "https://github.com/archlinux/linux/blob/master/drivers/usb/gadget/legacy/mass_storage.c"
click node_atomisp "https://github.com/archlinux/linux/blob/master/drivers/staging/media/atomisp/pci/runtime/pipeline/src/pipeline.c"
click node_i915 "https://github.com/archlinux/linux/blob/master/drivers/gpu/drm/i915/gt/intel_engine_cs.c"
click node_xe "https://github.com/archlinux/linux/blob/master/drivers/gpu/drm/xe/xe_hw_engine.c"
click node_soundwire "https://github.com/archlinux/linux/blob/master/drivers/soundwire/amd_manager.c"
click node_qat "https://github.com/archlinux/linux/blob/master/drivers/crypto/intel/qat/qat_common/adf_accel_engine.c"
click node_qatdevice "https://github.com/archlinux/linux/blob/master/drivers/crypto/intel/qat/qat_common/adf_accel_devices.h"
click node_cryptoengine "https://github.com/archlinux/linux/blob/master/crypto/crypto_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_guarded,node_dma,node_user toneBlue
class node_atomisp,node_i915,node_xe toneAmber
class node_ptdma,node_massstorage,node_storagecommon,node_legacygadget,node_soundwire toneMint
class node_ccpdma,node_qat,node_qatdevice,node_cryptoengine toneRose
class node_ispfirmware,node_firmware toneIndigo
```

## Components

### Kernel interfaces

- [Guarded storage](https://github.com/archlinux/linux/blob/master/arch/s390/kernel/guarded_storage.c): `arch/s390/kernel/guarded_storage.c`
- [DMA framework](https://github.com/archlinux/linux/blob/master/drivers/dma/dmaengine.c): `drivers/dma/dmaengine.c`

### Media and graphics

- [Camera pipeline](https://github.com/archlinux/linux/blob/master/drivers/staging/media/atomisp/pci/runtime/pipeline/src/pipeline.c): `drivers/staging/media/atomisp/pci/runtime/pipeline/src/pipeline.c`
- [i915 engines](https://github.com/archlinux/linux/blob/master/drivers/gpu/drm/i915/gt/intel_engine_cs.c): `drivers/gpu/drm/i915/gt/intel_engine_cs.c`
- [Xe engines](https://github.com/archlinux/linux/blob/master/drivers/gpu/drm/xe/xe_hw_engine.c): `drivers/gpu/drm/xe/xe_hw_engine.c`

### Device drivers

- [AMD passthrough DMA](https://github.com/archlinux/linux/blob/master/drivers/dma/amd/ptdma/ptdma-dmaengine.c): `drivers/dma/amd/ptdma/ptdma-dmaengine.c`
- [USB mass storage](https://github.com/archlinux/linux/blob/master/drivers/usb/gadget/function/f_mass_storage.c): `drivers/usb/gadget/function/f_mass_storage.c`
- [Storage common](https://github.com/archlinux/linux/blob/master/drivers/usb/gadget/function/storage_common.h): `drivers/usb/gadget/function/storage_common.h`
- [Legacy gadget setup](https://github.com/archlinux/linux/blob/master/drivers/usb/gadget/legacy/mass_storage.c): `drivers/usb/gadget/legacy/mass_storage.c`
- [AMD SoundWire](https://github.com/archlinux/linux/blob/master/drivers/soundwire/amd_manager.c): `drivers/soundwire/amd_manager.c`

### Cryptography

- [CCP DMA](https://github.com/archlinux/linux/blob/master/drivers/crypto/ccp/ccp-dmaengine.c): `drivers/crypto/ccp/ccp-dmaengine.c`
- [QAT accelerator](https://github.com/archlinux/linux/blob/master/drivers/crypto/intel/qat/qat_common/adf_accel_engine.c): `drivers/crypto/intel/qat/qat_common/adf_accel_engine.c`
- [QAT device model](https://github.com/archlinux/linux/blob/master/drivers/crypto/intel/qat/qat_common/adf_accel_devices.h): `drivers/crypto/intel/qat/qat_common/adf_accel_devices.h`
- [Crypto request engine](https://github.com/archlinux/linux/blob/master/crypto/crypto_engine.c): `crypto/crypto_engine.c`

### Other components

- **User process**
- **ISP processor**
- **Firmware service**

## Connections

- User process → Guarded storage: invokes syscall (evidence: `arch/s390/kernel/guarded_storage.c`)
- AMD passthrough DMA → DMA framework: uses DMA API
- CCP DMA → DMA framework: uses DMA API
- USB mass storage → Storage common: uses definitions (evidence: `drivers/usb/gadget/function/f_mass_storage.c`)
- Legacy gadget setup → USB mass storage: configures function (evidence: `drivers/usb/gadget/legacy/mass_storage.c`)
- Camera pipeline → ISP processor: initializes pipeline (evidence: `drivers/staging/media/atomisp/pci/runtime/pipeline/src/pipeline.c`)
- QAT accelerator → QAT device model: uses device model (evidence: `drivers/crypto/intel/qat/qat_common/adf_accel_engine.c`)
- QAT accelerator → Firmware service: loads firmware (evidence: `drivers/crypto/intel/qat/qat_common/adf_accel_engine.c`)
