Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
kernel_linux
提交
87171fb7
K
kernel_linux
项目概览
OpenHarmony
/
kernel_linux
上一次同步 4 年多
通知
15
Star
8
Fork
2
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
K
kernel_linux
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
87171fb7
编写于
9月 01, 2016
作者:
J
Jonathan Corbet
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'doc/4.9' into docs-next
上级
8d8f60c5
95149971
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
69 addition
and
21 deletion
+69
-21
Documentation/Makefile.sphinx
Documentation/Makefile.sphinx
+2
-2
Documentation/kernel-parameters.txt
Documentation/kernel-parameters.txt
+13
-7
Documentation/media/conf.py
Documentation/media/conf.py
+5
-0
Documentation/sphinx/kernel-doc.py
Documentation/sphinx/kernel-doc.py
+8
-0
Documentation/sphinx/kernel_include.py
Documentation/sphinx/kernel_include.py
+7
-0
Documentation/sphinx/rstFlatTable.py
Documentation/sphinx/rstFlatTable.py
+6
-0
scripts/kernel-doc
scripts/kernel-doc
+28
-12
未找到文件。
Documentation/Makefile.sphinx
浏览文件 @
87171fb7
...
@@ -71,12 +71,12 @@ ifeq ($(HAVE_PDFLATEX),0)
...
@@ -71,12 +71,12 @@ ifeq ($(HAVE_PDFLATEX),0)
$(
warning
The
'xelatex'
command
was not found. Make sure you have it installed and
in
PATH to produce PDF output.
)
$(
warning
The
'xelatex'
command
was not found. Make sure you have it installed and
in
PATH to produce PDF output.
)
@
echo
" SKIP Sphinx
$@
target."
@
echo
" SKIP Sphinx
$@
target."
else
# HAVE_PDFLATEX
else
# HAVE_PDFLATEX
@
$(
call
loop_cmd,sphinx,latex,.,latex,.
)
@
$(
foreach
var,
$(SPHINXDIRS)
,
$(
call
loop_cmd,sphinx,latex,
$(var)
,latex,
$(var)
)
)
endif
# HAVE_PDFLATEX
endif
# HAVE_PDFLATEX
pdfdocs
:
latexdocs
pdfdocs
:
latexdocs
ifneq
($(HAVE_PDFLATEX),0)
ifneq
($(HAVE_PDFLATEX),0)
$(
Q)$(MAKE)
PDFLATEX
=
xelatex
LATEXOPTS
=
"-interaction=nonstopmode"
-C
$(BUILDDIR)
/latex
$(
foreach
var,
$(SPHINXDIRS)
,
$(MAKE)
PDFLATEX
=
xelatex
LATEXOPTS
=
"-interaction=nonstopmode"
-C
$(BUILDDIR)
/
$(var)
/latex
)
endif
# HAVE_PDFLATEX
endif
# HAVE_PDFLATEX
epubdocs
:
epubdocs
:
...
...
Documentation/kernel-parameters.txt
浏览文件 @
87171fb7
...
@@ -2161,10 +2161,13 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
...
@@ -2161,10 +2161,13 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
than or equal to this physical address is ignored.
than or equal to this physical address is ignored.
maxcpus= [SMP] Maximum number of processors that an SMP kernel
maxcpus= [SMP] Maximum number of processors that an SMP kernel
should make use of. maxcpus=n : n >= 0 limits the
will bring up during bootup. maxcpus=n : n >= 0 limits
kernel to using 'n' processors. n=0 is a special case,
the kernel to bring up 'n' processors. Surely after
it is equivalent to "nosmp", which also disables
bootup you can bring up the other plugged cpu by executing
the IO APIC.
"echo 1 > /sys/devices/system/cpu/cpuX/online". So maxcpus
only takes effect during system bootup.
While n=0 is a special case, it is equivalent to "nosmp",
which also disables the IO APIC.
max_loop= [LOOP] The number of loop block devices that get
max_loop= [LOOP] The number of loop block devices that get
(loop.max_loop) unconditionally pre-created at init time. The default
(loop.max_loop) unconditionally pre-created at init time. The default
...
@@ -2773,9 +2776,12 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
...
@@ -2773,9 +2776,12 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
nr_cpus= [SMP] Maximum number of processors that an SMP kernel
nr_cpus= [SMP] Maximum number of processors that an SMP kernel
could support. nr_cpus=n : n >= 1 limits the kernel to
could support. nr_cpus=n : n >= 1 limits the kernel to
supporting 'n' processors. Later in runtime you can not
support 'n' processors. It could be larger than the
use hotplug cpu feature to put more cpu back to online.
number of already plugged CPU during bootup, later in
just like you compile the kernel NR_CPUS=n
runtime you can physically add extra cpu until it reaches
n. So during boot up some boot time memory for per-cpu
variables need be pre-allocated for later physical cpu
hot plugging.
nr_uarts= [SERIAL] maximum number of UARTs to be registered.
nr_uarts= [SERIAL] maximum number of UARTs to be registered.
...
...
Documentation/media/conf.py
浏览文件 @
87171fb7
...
@@ -3,3 +3,8 @@
...
@@ -3,3 +3,8 @@
project
=
'Linux Media Subsystem Documentation'
project
=
'Linux Media Subsystem Documentation'
tags
.
add
(
"subproject"
)
tags
.
add
(
"subproject"
)
latex_documents
=
[
(
'index'
,
'media.tex'
,
'Linux Media Subsystem Documentation'
,
'The kernel development community'
,
'manual'
),
]
Documentation/sphinx/kernel-doc.py
浏览文件 @
87171fb7
...
@@ -39,6 +39,8 @@ from docutils.parsers.rst import directives
...
@@ -39,6 +39,8 @@ from docutils.parsers.rst import directives
from
sphinx.util.compat
import
Directive
from
sphinx.util.compat
import
Directive
from
sphinx.ext.autodoc
import
AutodocReporter
from
sphinx.ext.autodoc
import
AutodocReporter
__version__
=
'1.0'
class
KernelDocDirective
(
Directive
):
class
KernelDocDirective
(
Directive
):
"""Extract kernel-doc comments from the specified file"""
"""Extract kernel-doc comments from the specified file"""
required_argument
=
1
required_argument
=
1
...
@@ -139,3 +141,9 @@ def setup(app):
...
@@ -139,3 +141,9 @@ def setup(app):
app
.
add_config_value
(
'kerneldoc_verbosity'
,
1
,
'env'
)
app
.
add_config_value
(
'kerneldoc_verbosity'
,
1
,
'env'
)
app
.
add_directive
(
'kernel-doc'
,
KernelDocDirective
)
app
.
add_directive
(
'kernel-doc'
,
KernelDocDirective
)
return
dict
(
version
=
__version__
,
parallel_read_safe
=
True
,
parallel_write_safe
=
True
)
Documentation/sphinx/kernel_include.py
浏览文件 @
87171fb7
...
@@ -39,11 +39,18 @@ from docutils.parsers.rst import directives
...
@@ -39,11 +39,18 @@ from docutils.parsers.rst import directives
from
docutils.parsers.rst.directives.body
import
CodeBlock
,
NumberLines
from
docutils.parsers.rst.directives.body
import
CodeBlock
,
NumberLines
from
docutils.parsers.rst.directives.misc
import
Include
from
docutils.parsers.rst.directives.misc
import
Include
__version__
=
'1.0'
# ==============================================================================
# ==============================================================================
def
setup
(
app
):
def
setup
(
app
):
# ==============================================================================
# ==============================================================================
app
.
add_directive
(
"kernel-include"
,
KernelInclude
)
app
.
add_directive
(
"kernel-include"
,
KernelInclude
)
return
dict
(
version
=
__version__
,
parallel_read_safe
=
True
,
parallel_write_safe
=
True
)
# ==============================================================================
# ==============================================================================
class
KernelInclude
(
Include
):
class
KernelInclude
(
Include
):
...
...
Documentation/sphinx/rstFlatTable.py
100644 → 100755
浏览文件 @
87171fb7
...
@@ -73,6 +73,12 @@ def setup(app):
...
@@ -73,6 +73,12 @@ def setup(app):
roles
.
register_local_role
(
'cspan'
,
c_span
)
roles
.
register_local_role
(
'cspan'
,
c_span
)
roles
.
register_local_role
(
'rspan'
,
r_span
)
roles
.
register_local_role
(
'rspan'
,
r_span
)
return
dict
(
version
=
__version__
,
parallel_read_safe
=
True
,
parallel_write_safe
=
True
)
# ==============================================================================
# ==============================================================================
def
c_span
(
name
,
rawtext
,
text
,
lineno
,
inliner
,
options
=
None
,
content
=
None
):
def
c_span
(
name
,
rawtext
,
text
,
lineno
,
inliner
,
options
=
None
,
content
=
None
):
# ==============================================================================
# ==============================================================================
...
...
scripts/kernel-doc
浏览文件 @
87171fb7
...
@@ -1831,13 +1831,22 @@ sub output_function_rst(%) {
...
@@ -1831,13 +1831,22 @@ sub output_function_rst(%) {
my
%args
=
%
{
$_
[
0
]};
my
%args
=
%
{
$_
[
0
]};
my
(
$parameter
,
$section
);
my
(
$parameter
,
$section
);
my
$oldprefix
=
$lineprefix
;
my
$oldprefix
=
$lineprefix
;
my
$start
;
my
$start
=
"";
print
"
.. c:function::
";
if
(
$args
{'
typedef
'})
{
print
"
.. c:type::
"
.
$args
{'
function
'}
.
"
\n\n
";
print_lineno
(
$declaration_start_line
);
print
"
**Typedef**:
";
$lineprefix
=
"";
output_highlight_rst
(
$args
{'
purpose
'});
$start
=
"
\n\n
**Syntax**
\n\n
``
";
}
else
{
print
"
.. c:function::
";
}
if
(
$args
{'
functiontype
'}
ne
"")
{
if
(
$args
{'
functiontype
'}
ne
"")
{
$start
=
$args
{'
functiontype
'}
.
"
"
.
$args
{'
function
'}
.
"
(
";
$start
.
=
$args
{'
functiontype
'}
.
"
"
.
$args
{'
function
'}
.
"
(
";
}
else
{
}
else
{
$start
=
$args
{'
function
'}
.
"
(
";
$start
.
=
$args
{'
function
'}
.
"
(
";
}
}
print
$start
;
print
$start
;
...
@@ -1856,11 +1865,15 @@ sub output_function_rst(%) {
...
@@ -1856,11 +1865,15 @@ sub output_function_rst(%) {
print
$type
.
"
"
.
$parameter
;
print
$type
.
"
"
.
$parameter
;
}
}
}
}
print
"
)
\n\n
";
if
(
$args
{'
typedef
'})
{
print_lineno
(
$declaration_start_line
);
print
"
);``
\n\n
";
$lineprefix
=
"
";
}
else
{
output_highlight_rst
(
$args
{'
purpose
'});
print
"
)
\n\n
";
print
"
\n
";
print_lineno
(
$declaration_start_line
);
$lineprefix
=
"
";
output_highlight_rst
(
$args
{'
purpose
'});
print
"
\n
";
}
print
"
**Parameters**
\n\n
";
print
"
**Parameters**
\n\n
";
$lineprefix
=
"
";
$lineprefix
=
"
";
...
@@ -2000,7 +2013,7 @@ sub output_struct_rst(%) {
...
@@ -2000,7 +2013,7 @@ sub output_struct_rst(%) {
(
$args
{'
parameterdescs
'}{
$parameter_name
}
ne
$undescribed
)
||
next
;
(
$args
{'
parameterdescs
'}{
$parameter_name
}
ne
$undescribed
)
||
next
;
$type
=
$args
{'
parametertypes
'}{
$parameter
};
$type
=
$args
{'
parametertypes
'}{
$parameter
};
print_lineno
(
$parameterdesc_start_lines
{
$parameter_name
});
print_lineno
(
$parameterdesc_start_lines
{
$parameter_name
});
print
"
``
$type
$parameter
``
\n
";
print
"
``
"
.
$parameter
.
"
``
\n
";
output_highlight_rst
(
$args
{'
parameterdescs
'}{
$parameter_name
});
output_highlight_rst
(
$args
{'
parameterdescs
'}{
$parameter_name
});
print
"
\n
";
print
"
\n
";
}
}
...
@@ -2190,7 +2203,9 @@ sub dump_typedef($$) {
...
@@ -2190,7 +2203,9 @@ sub dump_typedef($$) {
$x
=~
s@/\*.*?\*/@@gos
;
# strip comments.
$x
=~
s@/\*.*?\*/@@gos
;
# strip comments.
# Parse function prototypes
# Parse function prototypes
if
(
$x
=~
/typedef\s+(\w+)\s*\(\*\s*(\w\S+)\s*\)\s*\((.*)\);/
)
{
if
(
$x
=~
/typedef\s+(\w+)\s*\(\*\s*(\w\S+)\s*\)\s*\((.*)\);/
||
$x
=~
/typedef\s+(\w+)\s*(\w\S+)\s*\s*\((.*)\);/
)
{
# Function typedefs
# Function typedefs
$return_type
=
$
1
;
$return_type
=
$
1
;
$declaration_name
=
$
2
;
$declaration_name
=
$
2
;
...
@@ -2201,6 +2216,7 @@ sub dump_typedef($$) {
...
@@ -2201,6 +2216,7 @@ sub dump_typedef($$) {
output_declaration
(
$declaration_name
,
output_declaration
(
$declaration_name
,
'
function
',
'
function
',
{'
function
'
=>
$declaration_name
,
{'
function
'
=>
$declaration_name
,
'
typedef
'
=>
1
,
'
module
'
=>
$modulename
,
'
module
'
=>
$modulename
,
'
functiontype
'
=>
$return_type
,
'
functiontype
'
=>
$return_type
,
'
parameterlist
'
=>
\
@parameterlist
,
'
parameterlist
'
=>
\
@parameterlist
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录