# gregkh/linux architecture

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

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

## Overview

Linux is the operating-system kernel: it exposes services to userspace, coordinates hardware, and provides shared frameworks used by device drivers. The supplied files show representative architecture support, asynchronous DMA and crypto, SPI, USB mass storage, IIO buffering, and graphics/display pipelines. The principal visible flow is a kernel client requesting asynchronous device work through a framework and receiving completion; other files show syscall entry and hardware-specific control. The excerpts are partial, so links between broader kernel subsystems are omitted where their callers are not evidenced.

Main entry points: [`drivers/dma/dmaengine.c`](https://github.com/gregkh/linux/blob/master/drivers/dma/dmaengine.c) (DMAengine framework), [`arch/s390/kernel/guarded_storage.c`](https://github.com/gregkh/linux/blob/master/arch/s390/kernel/guarded_storage.c) (Guarded storage syscall), [`crypto/crypto_engine.c`](https://github.com/gregkh/linux/blob/master/crypto/crypto_engine.c) (Crypto engine queue), [`drivers/iio/buffer/industrialio-buffer-dmaengine.c`](https://github.com/gregkh/linux/blob/master/drivers/iio/buffer/industrialio-buffer-dmaengine.c) (IIO DMA buffer)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_arch["Architecture support"]
  node_s390gs["Guarded storage syscall<br/>[guarded_storage.c]"]
  node_alpha["Alpha platform support<br/>[setup.c]"]
  node_arc["ARC platform support<br/>[setup.c]"]
  node_arm["ARM platform support<br/>[setup.c]"]
end

subgraph group_frameworks["Kernel frameworks"]
  node_dma["DMAengine framework<br/>[dmaengine.c]"]
  node_cryptoengine["Crypto engine queue<br/>[crypto_engine.c]"]
  node_iio["IIO DMA buffer"]
end

subgraph group_devices["Device drivers"]
  node_ccp["AMD CCP DMA<br/>[ccp-dmaengine.c]"]
  node_ptdma["AMD passthrough DMA<br/>[ptdma-dmaengine.c]"]
  node_spi["AXI SPI controller"]
  node_massstorage["USB mass storage<br/>[f_mass_storage.c]"]
  node_apu["APU board GPIO<br/>[pcengines-apuv2.c]"]
end

subgraph group_graphics["Graphics and display"]
  node_i915["Intel i915 engines<br/>[intel_engine_cs.c]"]
  node_xe["Intel Xe engines<br/>[xe_hw_engine.c]"]
  node_komeda["Komeda display pipeline"]
end

node_userspace(("Userspace process"))
node_hardware{{"Hardware devices"}}

node_userspace -->|"invokes syscall"| node_s390gs
node_s390gs -->|"programs controls"| node_hardware
node_iio -->|"requests transfers"| node_dma
node_ccp -->|"registers channels"| node_dma
node_ptdma -->|"registers channels"| node_dma
node_spi -->|"programs controller"| node_hardware
node_massstorage -->|"serves USB requests"| node_hardware
node_i915 -->|"controls engines"| node_hardware
node_xe -->|"programs engines"| node_hardware
node_komeda -->|"updates components"| node_hardware
node_apu -->|"configures GPIO"| node_hardware
node_cryptoengine -->|"queues engine work"| node_hardware

click node_s390gs "https://github.com/gregkh/linux/blob/master/arch/s390/kernel/guarded_storage.c"
click node_alpha "https://github.com/gregkh/linux/blob/master/arch/alpha/kernel/setup.c"
click node_arc "https://github.com/gregkh/linux/blob/master/arch/arc/kernel/setup.c"
click node_arm "https://github.com/gregkh/linux/blob/master/arch/arm/kernel/setup.c"
click node_dma "https://github.com/gregkh/linux/blob/master/drivers/dma/dmaengine.c"
click node_cryptoengine "https://github.com/gregkh/linux/blob/master/crypto/crypto_engine.c"
click node_iio "https://github.com/gregkh/linux/blob/master/drivers/iio/buffer/industrialio-buffer-dmaengine.c"
click node_ccp "https://github.com/gregkh/linux/blob/master/drivers/crypto/ccp/ccp-dmaengine.c"
click node_ptdma "https://github.com/gregkh/linux/blob/master/drivers/dma/amd/ptdma/ptdma-dmaengine.c"
click node_spi "https://github.com/gregkh/linux/blob/master/drivers/spi/spi-axi-spi-engine.c"
click node_massstorage "https://github.com/gregkh/linux/blob/master/drivers/usb/gadget/function/f_mass_storage.c"
click node_i915 "https://github.com/gregkh/linux/blob/master/drivers/gpu/drm/i915/gt/intel_engine_cs.c"
click node_xe "https://github.com/gregkh/linux/blob/master/drivers/gpu/drm/xe/xe_hw_engine.c"
click node_komeda "https://github.com/gregkh/linux/blob/master/drivers/gpu/drm/arm/display/komeda/komeda_pipeline_state.c"
click node_apu "https://github.com/gregkh/linux/blob/master/drivers/platform/x86/pcengines-apuv2.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_s390gs,node_alpha,node_arc,node_arm,node_userspace toneBlue
class node_dma,node_cryptoengine,node_iio toneAmber
class node_ccp,node_ptdma,node_spi,node_massstorage,node_apu toneMint
class node_i915,node_xe,node_komeda toneRose
class node_hardware toneIndigo
```

## Components

### Architecture support

- [Guarded storage syscall](https://github.com/gregkh/linux/blob/master/arch/s390/kernel/guarded_storage.c): `arch/s390/kernel/guarded_storage.c`
- [Alpha platform support](https://github.com/gregkh/linux/blob/master/arch/alpha/kernel/setup.c): `arch/alpha/kernel/setup.c`
- [ARC platform support](https://github.com/gregkh/linux/blob/master/arch/arc/kernel/setup.c): `arch/arc/kernel/setup.c`
- [ARM platform support](https://github.com/gregkh/linux/blob/master/arch/arm/kernel/setup.c): `arch/arm/kernel/setup.c`

### Kernel frameworks

- [DMAengine framework](https://github.com/gregkh/linux/blob/master/drivers/dma/dmaengine.c): `drivers/dma/dmaengine.c`
- [Crypto engine queue](https://github.com/gregkh/linux/blob/master/crypto/crypto_engine.c): `crypto/crypto_engine.c`
- [IIO DMA buffer](https://github.com/gregkh/linux/blob/master/drivers/iio/buffer/industrialio-buffer-dmaengine.c): `drivers/iio/buffer/industrialio-buffer-dmaengine.c`

### Device drivers

- [AMD CCP DMA](https://github.com/gregkh/linux/blob/master/drivers/crypto/ccp/ccp-dmaengine.c): `drivers/crypto/ccp/ccp-dmaengine.c`
- [AMD passthrough DMA](https://github.com/gregkh/linux/blob/master/drivers/dma/amd/ptdma/ptdma-dmaengine.c): `drivers/dma/amd/ptdma/ptdma-dmaengine.c`
- [AXI SPI controller](https://github.com/gregkh/linux/blob/master/drivers/spi/spi-axi-spi-engine.c): `drivers/spi/spi-axi-spi-engine.c`
- [USB mass storage](https://github.com/gregkh/linux/blob/master/drivers/usb/gadget/function/f_mass_storage.c): `drivers/usb/gadget/function/f_mass_storage.c`
- [APU board GPIO](https://github.com/gregkh/linux/blob/master/drivers/platform/x86/pcengines-apuv2.c): `drivers/platform/x86/pcengines-apuv2.c`

### Graphics and display

- [Intel i915 engines](https://github.com/gregkh/linux/blob/master/drivers/gpu/drm/i915/gt/intel_engine_cs.c): `drivers/gpu/drm/i915/gt/intel_engine_cs.c`
- [Intel Xe engines](https://github.com/gregkh/linux/blob/master/drivers/gpu/drm/xe/xe_hw_engine.c): `drivers/gpu/drm/xe/xe_hw_engine.c`
- [Komeda display pipeline](https://github.com/gregkh/linux/blob/master/drivers/gpu/drm/arm/display/komeda/komeda_pipeline_state.c): `drivers/gpu/drm/arm/display/komeda/komeda_pipeline_state.c`

### Other components

- **Userspace process**
- **Hardware devices**

## Connections

- Userspace process → Guarded storage syscall: invokes syscall
- Guarded storage syscall → Hardware devices: programs controls
- IIO DMA buffer → DMAengine framework: requests transfers
- AMD CCP DMA → DMAengine framework: registers channels
- AMD passthrough DMA → DMAengine framework: registers channels
- AXI SPI controller → Hardware devices: programs controller
- USB mass storage → Hardware devices: serves USB requests
- Intel i915 engines → Hardware devices: controls engines
- Intel Xe engines → Hardware devices: programs engines
- Komeda display pipeline → Hardware devices: updates components
- APU board GPIO → Hardware devices: configures GPIO
- Crypto engine queue → Hardware devices: queues engine work
