aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Documentation/driver-api/acpi/index.rst1
-rw-r--r--Documentation/driver-api/acpi/linuxized-acpica.rst (renamed from Documentation/acpi/linuxized-acpica.txt)109
2 files changed, 64 insertions, 46 deletions
diff --git a/Documentation/driver-api/acpi/index.rst b/Documentation/driver-api/acpi/index.rst
index 898b0c60671a..12649947b19b 100644
--- a/Documentation/driver-api/acpi/index.rst
+++ b/Documentation/driver-api/acpi/index.rst
@@ -5,3 +5,4 @@ ACPI Support
5.. toctree:: 5.. toctree::
6 :maxdepth: 2 6 :maxdepth: 2
7 7
8 linuxized-acpica
diff --git a/Documentation/acpi/linuxized-acpica.txt b/Documentation/driver-api/acpi/linuxized-acpica.rst
index 3ad7b0dfb083..0ca8f1538519 100644
--- a/Documentation/acpi/linuxized-acpica.txt
+++ b/Documentation/driver-api/acpi/linuxized-acpica.rst
@@ -1,31 +1,37 @@
1.. SPDX-License-Identifier: GPL-2.0
2.. include:: <isonum.txt>
3
4============================================================
1Linuxized ACPICA - Introduction to ACPICA Release Automation 5Linuxized ACPICA - Introduction to ACPICA Release Automation
6============================================================
2 7
3Copyright (C) 2013-2016, Intel Corporation 8:Copyright: |copy| 2013-2016, Intel Corporation
4Author: Lv Zheng <lv.zheng@intel.com>
5 9
10:Author: Lv Zheng <lv.zheng@intel.com>
6 11
7Abstract:
8 12
13Abstract
14========
9This document describes the ACPICA project and the relationship between 15This document describes the ACPICA project and the relationship between
10ACPICA and Linux. It also describes how ACPICA code in drivers/acpi/acpica, 16ACPICA and Linux. It also describes how ACPICA code in drivers/acpi/acpica,
11include/acpi and tools/power/acpi is automatically updated to follow the 17include/acpi and tools/power/acpi is automatically updated to follow the
12upstream. 18upstream.
13 19
20ACPICA Project
21==============
14 22
151. ACPICA Project 23The ACPI Component Architecture (ACPICA) project provides an operating
16 24system (OS)-independent reference implementation of the Advanced
17 The ACPI Component Architecture (ACPICA) project provides an operating 25Configuration and Power Interface Specification (ACPI). It has been
18 system (OS)-independent reference implementation of the Advanced 26adapted by various host OSes. By directly integrating ACPICA, Linux can
19 Configuration and Power Interface Specification (ACPI). It has been 27also benefit from the application experiences of ACPICA from other host
20 adapted by various host OSes. By directly integrating ACPICA, Linux can 28OSes.
21 also benefit from the application experiences of ACPICA from other host
22 OSes.
23 29
24 The homepage of ACPICA project is: www.acpica.org, it is maintained and 30The homepage of ACPICA project is: www.acpica.org, it is maintained and
25 supported by Intel Corporation. 31supported by Intel Corporation.
26 32
27 The following figure depicts the Linux ACPI subsystem where the ACPICA 33The following figure depicts the Linux ACPI subsystem where the ACPICA
28 adaptation is included: 34adaptation is included::
29 35
30 +---------------------------------------------------------+ 36 +---------------------------------------------------------+
31 | | 37 | |
@@ -71,21 +77,27 @@ upstream.
71 77
72 Figure 1. Linux ACPI Software Components 78 Figure 1. Linux ACPI Software Components
73 79
74 NOTE: 80.. note::
75 A. OS Service Layer - Provided by Linux to offer OS dependent 81 A. OS Service Layer - Provided by Linux to offer OS dependent
76 implementation of the predefined ACPICA interfaces (acpi_os_*). 82 implementation of the predefined ACPICA interfaces (acpi_os_*).
83 ::
84
77 include/acpi/acpiosxf.h 85 include/acpi/acpiosxf.h
78 drivers/acpi/osl.c 86 drivers/acpi/osl.c
79 include/acpi/platform 87 include/acpi/platform
80 include/asm/acenv.h 88 include/asm/acenv.h
81 B. ACPICA Functionality - Released from ACPICA code base to offer 89 B. ACPICA Functionality - Released from ACPICA code base to offer
82 OS independent implementation of the ACPICA interfaces (acpi_*). 90 OS independent implementation of the ACPICA interfaces (acpi_*).
91 ::
92
83 drivers/acpi/acpica 93 drivers/acpi/acpica
84 include/acpi/ac*.h 94 include/acpi/ac*.h
85 tools/power/acpi 95 tools/power/acpi
86 C. Linux/ACPI Functionality - Providing Linux specific ACPI 96 C. Linux/ACPI Functionality - Providing Linux specific ACPI
87 functionality to the other Linux kernel subsystems and user space 97 functionality to the other Linux kernel subsystems and user space
88 programs. 98 programs.
99 ::
100
89 drivers/acpi 101 drivers/acpi
90 include/linux/acpi.h 102 include/linux/acpi.h
91 include/linux/acpi*.h 103 include/linux/acpi*.h
@@ -95,24 +107,27 @@ upstream.
95 ACPI subsystem to offer architecture specific implementation of the 107 ACPI subsystem to offer architecture specific implementation of the
96 ACPI interfaces. They are Linux specific components and are out of 108 ACPI interfaces. They are Linux specific components and are out of
97 the scope of this document. 109 the scope of this document.
110 ::
111
98 include/asm/acpi.h 112 include/asm/acpi.h
99 include/asm/acpi*.h 113 include/asm/acpi*.h
100 arch/*/acpi 114 arch/*/acpi
101 115
1022. ACPICA Release 116ACPICA Release
117==============
103 118
104 The ACPICA project maintains its code base at the following repository URL: 119The ACPICA project maintains its code base at the following repository URL:
105 https://github.com/acpica/acpica.git. As a rule, a release is made every 120https://github.com/acpica/acpica.git. As a rule, a release is made every
106 month. 121month.
107 122
108 As the coding style adopted by the ACPICA project is not acceptable by 123As the coding style adopted by the ACPICA project is not acceptable by
109 Linux, there is a release process to convert the ACPICA git commits into 124Linux, there is a release process to convert the ACPICA git commits into
110 Linux patches. The patches generated by this process are referred to as 125Linux patches. The patches generated by this process are referred to as
111 "linuxized ACPICA patches". The release process is carried out on a local 126"linuxized ACPICA patches". The release process is carried out on a local
112 copy the ACPICA git repository. Each commit in the monthly release is 127copy the ACPICA git repository. Each commit in the monthly release is
113 converted into a linuxized ACPICA patch. Together, they form the monthly 128converted into a linuxized ACPICA patch. Together, they form the monthly
114 ACPICA release patchset for the Linux ACPI community. This process is 129ACPICA release patchset for the Linux ACPI community. This process is
115 illustrated in the following figure: 130illustrated in the following figure::
116 131
117 +-----------------------------+ 132 +-----------------------------+
118 | acpica / master (-) commits | 133 | acpica / master (-) commits |
@@ -153,7 +168,7 @@ upstream.
153 168
154 Figure 2. ACPICA -> Linux Upstream Process 169 Figure 2. ACPICA -> Linux Upstream Process
155 170
156 NOTE: 171.. note::
157 A. Linuxize Utilities - Provided by the ACPICA repository, including a 172 A. Linuxize Utilities - Provided by the ACPICA repository, including a
158 utility located in source/tools/acpisrc folder and a number of 173 utility located in source/tools/acpisrc folder and a number of
159 scripts located in generate/linux folder. 174 scripts located in generate/linux folder.
@@ -170,19 +185,20 @@ upstream.
170 following kernel configuration options: 185 following kernel configuration options:
171 CONFIG_ACPI/CONFIG_ACPI_DEBUG/CONFIG_ACPI_DEBUGGER 186 CONFIG_ACPI/CONFIG_ACPI_DEBUG/CONFIG_ACPI_DEBUGGER
172 187
1733. ACPICA Divergences 188ACPICA Divergences
189==================
174 190
175 Ideally, all of the ACPICA commits should be converted into Linux patches 191Ideally, all of the ACPICA commits should be converted into Linux patches
176 automatically without manual modifications, the "linux / master" tree should 192automatically without manual modifications, the "linux / master" tree should
177 contain the ACPICA code that exactly corresponds to the ACPICA code 193contain the ACPICA code that exactly corresponds to the ACPICA code
178 contained in "new linuxized acpica" tree and it should be possible to run 194contained in "new linuxized acpica" tree and it should be possible to run
179 the release process fully automatically. 195the release process fully automatically.
180 196
181 As a matter of fact, however, there are source code differences between 197As a matter of fact, however, there are source code differences between
182 the ACPICA code in Linux and the upstream ACPICA code, referred to as 198the ACPICA code in Linux and the upstream ACPICA code, referred to as
183 "ACPICA Divergences". 199"ACPICA Divergences".
184 200
185 The various sources of ACPICA divergences include: 201The various sources of ACPICA divergences include:
186 1. Legacy divergences - Before the current ACPICA release process was 202 1. Legacy divergences - Before the current ACPICA release process was
187 established, there already had been divergences between Linux and 203 established, there already had been divergences between Linux and
188 ACPICA. Over the past several years those divergences have been greatly 204 ACPICA. Over the past several years those divergences have been greatly
@@ -213,11 +229,12 @@ upstream.
213 rebased on the ACPICA side in order to offer better solutions, new ACPICA 229 rebased on the ACPICA side in order to offer better solutions, new ACPICA
214 divergences are generated. 230 divergences are generated.
215 231
2164. ACPICA Development 232ACPICA Development
233==================
217 234
218 This paragraph guides Linux developers to use the ACPICA upstream release 235This paragraph guides Linux developers to use the ACPICA upstream release
219 utilities to obtain Linux patches corresponding to upstream ACPICA commits 236utilities to obtain Linux patches corresponding to upstream ACPICA commits
220 before they become available from the ACPICA release process. 237before they become available from the ACPICA release process.
221 238
222 1. Cherry-pick an ACPICA commit 239 1. Cherry-pick an ACPICA commit
223 240
@@ -225,7 +242,7 @@ upstream.
225 you want to cherry pick must be committed into the local repository. 242 you want to cherry pick must be committed into the local repository.
226 243
227 Then the gen-patch.sh command can help to cherry-pick an ACPICA commit 244 Then the gen-patch.sh command can help to cherry-pick an ACPICA commit
228 from the ACPICA local repository: 245 from the ACPICA local repository::
229 246
230 $ git clone https://github.com/acpica/acpica 247 $ git clone https://github.com/acpica/acpica
231 $ cd acpica 248 $ cd acpica
@@ -240,7 +257,7 @@ upstream.
240 changes that haven't been applied to Linux yet. 257 changes that haven't been applied to Linux yet.
241 258
242 You can generate the ACPICA release series yourself and rebase your code on 259 You can generate the ACPICA release series yourself and rebase your code on
243 top of the generated ACPICA release patches: 260 top of the generated ACPICA release patches::
244 261
245 $ git clone https://github.com/acpica/acpica 262 $ git clone https://github.com/acpica/acpica
246 $ cd acpica 263 $ cd acpica
@@ -254,7 +271,7 @@ upstream.
254 3. Inspect the current divergences 271 3. Inspect the current divergences
255 272
256 If you have local copies of both Linux and upstream ACPICA, you can generate 273 If you have local copies of both Linux and upstream ACPICA, you can generate
257 a diff file indicating the state of the current divergences: 274 a diff file indicating the state of the current divergences::
258 275
259 # git clone https://github.com/acpica/acpica 276 # git clone https://github.com/acpica/acpica
260 # git clone http://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 277 # git clone http://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git