diff options
author | Mauro Carvalho Chehab <mchehab@s-opensource.com> | 2016-10-26 12:14:45 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@s-opensource.com> | 2016-12-15 05:54:52 -0500 |
commit | 6634fbb6b6356e6f5b428a349952b368b25d514d (patch) | |
tree | 4802ea45935c1581b6c471750f2b4c242e78baa2 /Documentation/driver-api/edac.rst | |
parent | e01aa14cf2e7ff6d39614f8087800d08ba1629b2 (diff) |
driver-api: create an edac.rst file with EDAC documentation
Currently, there's no device driver documentation for the EDAC
subsystem at the driver-api book. Fill in the blanks for the
structures and functions that misses documentation, uniform
the word on the existing ones, and add a new edac.rst file at
driver-api, in order to document the EDAC subsystem.
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'Documentation/driver-api/edac.rst')
-rw-r--r-- | Documentation/driver-api/edac.rst | 72 |
1 files changed, 72 insertions, 0 deletions
diff --git a/Documentation/driver-api/edac.rst b/Documentation/driver-api/edac.rst new file mode 100644 index 000000000000..3771e768fda1 --- /dev/null +++ b/Documentation/driver-api/edac.rst | |||
@@ -0,0 +1,72 @@ | |||
1 | Error Detection And Correction (EDAC) Devices | ||
2 | ============================================= | ||
3 | |||
4 | Memory Controllers | ||
5 | ------------------ | ||
6 | |||
7 | Most of the EDAC core is focused on doing Memory Controller error detection. | ||
8 | The :c:func:`edac_mc_alloc`. It uses internally the struct ``mem_ctl_info`` | ||
9 | to describe the memory controllers, with is an opaque struct for the EDAC | ||
10 | drivers. Only the EDAC core is allowed to touch it. | ||
11 | |||
12 | .. kernel-doc:: include/linux/edac.h | ||
13 | |||
14 | .. kernel-doc:: drivers/edac/edac_mc.h | ||
15 | |||
16 | PCI Controllers | ||
17 | --------------- | ||
18 | |||
19 | The EDAC subsystem provides a mechanism to handle PCI controllers by calling | ||
20 | the :c:func:`edac_pci_alloc_ctl_info`. It will use the struct | ||
21 | :c:type:`edac_pci_ctl_info` to describe the PCI controllers. | ||
22 | |||
23 | .. kernel-doc:: drivers/edac/edac_pci.h | ||
24 | |||
25 | EDAC Blocks | ||
26 | ----------- | ||
27 | |||
28 | The EDAC subsystem also provides a generic mechanism to report errors on | ||
29 | other parts of the hardware via :c:func:`edac_device_alloc_ctl_info` function. | ||
30 | |||
31 | The structures :c:type:`edac_dev_sysfs_block_attribute`, | ||
32 | :c:type:`edac_device_block`, :c:type:`edac_device_instance` and | ||
33 | :c:type:`edac_device_ctl_info` provide a generic or abstract 'edac_device' | ||
34 | representation at sysfs. | ||
35 | |||
36 | This set of structures and the code that implements the APIs for the same, provide for registering EDAC type devices which are NOT standard memory or | ||
37 | PCI, like: | ||
38 | |||
39 | - CPU caches (L1 and L2) | ||
40 | - DMA engines | ||
41 | - Core CPU switches | ||
42 | - Fabric switch units | ||
43 | - PCIe interface controllers | ||
44 | - other EDAC/ECC type devices that can be monitored for | ||
45 | errors, etc. | ||
46 | |||
47 | It allows for a 2 level set of hierarchy. | ||
48 | |||
49 | For example, a cache could be composed of L1, L2 and L3 levels of cache. | ||
50 | Each CPU core would have its own L1 cache, while sharing L2 and maybe L3 | ||
51 | caches. On such case, those can be represented via the following sysfs | ||
52 | nodes:: | ||
53 | |||
54 | /sys/devices/system/edac/.. | ||
55 | |||
56 | pci/ <existing pci directory (if available)> | ||
57 | mc/ <existing memory device directory> | ||
58 | cpu/cpu0/.. <L1 and L2 block directory> | ||
59 | /L1-cache/ce_count | ||
60 | /ue_count | ||
61 | /L2-cache/ce_count | ||
62 | /ue_count | ||
63 | cpu/cpu1/.. <L1 and L2 block directory> | ||
64 | /L1-cache/ce_count | ||
65 | /ue_count | ||
66 | /L2-cache/ce_count | ||
67 | /ue_count | ||
68 | ... | ||
69 | |||
70 | the L1 and L2 directories would be "edac_device_block's" | ||
71 | |||
72 | .. kernel-doc:: drivers/edac/edac_device.h | ||