Commit e9a83bd2 authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'docs-5.3' of git://git.lwn.net/linux

Pull Documentation updates from Jonathan Corbet:
 "It's been a relatively busy cycle for docs:

   - A fair pile of RST conversions, many from Mauro. These create more
     than the usual number of simple but annoying merge conflicts with
     other trees, unfortunately. He has a lot more of these waiting on
     the wings that, I think, will go to you directly later on.

   - A new document on how to use merges and rebases in kernel repos,
     and one on Spectre vulnerabilities.

   - Various improvements to the build system, including automatic
     markup of function() references because some people, for reasons I
     will never understand, were of the opinion that
     :c:func:``function()`` is unattractive and not fun to type.

   - We now recommend using sphinx 1.7, but still support back to 1.4.

   - Lots of smaller improvements, warning fixes, typo fixes, etc"

* tag 'docs-5.3' of git://git.lwn.net/linux: (129 commits)
  docs: automarkup.py: ignore exceptions when seeking for xrefs
  docs: Move binderfs to admin-guide
  Disable Sphinx SmartyPants in HTML output
  doc: RCU callback locks need only _bh, not necessarily _irq
  docs: format kernel-parameters -- as code
  Doc : doc-guide : Fix a typo
  platform: x86: get rid of a non-existent document
  Add the RCU docs to the core-api manual
  Documentation: RCU: Add TOC tree hooks
  Documentation: RCU: Rename txt files to rst
  Documentation: RCU: Convert RCU UP systems to reST
  Documentation: RCU: Convert RCU linked list to reST
  Documentation: RCU: Convert RCU basic concepts to reST
  docs: filesystems: Remove uneeded .rst extension on toctables
  scripts/sphinx-pre-install: fix out-of-tree build
  docs: zh_CN: submitting-drivers.rst: Remove a duplicated Documentation/
  Documentation: PGP: update for newer HW devices
  Documentation: Add section about CPU vulnerabilities for Spectre
  Documentation: platform: Delete x86-laptop-drivers.txt
  docs: Note that :c:func: should no longer be used
  ...
parents 7011b7e1 454f96f2
...@@ -137,7 +137,8 @@ Description: Discover cpuidle policy and mechanism ...@@ -137,7 +137,8 @@ Description: Discover cpuidle policy and mechanism
current_governor: (RW) displays current idle policy. Users can current_governor: (RW) displays current idle policy. Users can
switch the governor at runtime by writing to this file. switch the governor at runtime by writing to this file.
See files in Documentation/cpuidle/ for more information. See Documentation/admin-guide/pm/cpuidle.rst and
Documentation/driver-api/pm/cpuidle.rst for more information.
What: /sys/devices/system/cpu/cpuX/cpuidle/stateN/name What: /sys/devices/system/cpu/cpuX/cpuidle/stateN/name
......
...@@ -11,4 +11,4 @@ Description: ...@@ -11,4 +11,4 @@ Description:
example would be, if User A has shares = 1024 and user example would be, if User A has shares = 1024 and user
B has shares = 2048, User B will get twice the CPU B has shares = 2048, User B will get twice the CPU
bandwidth user A will. For more details refer bandwidth user A will. For more details refer
Documentation/scheduler/sched-design-CFS.txt Documentation/scheduler/sched-design-CFS.rst
...@@ -198,7 +198,7 @@ call to set the mask to the value returned. ...@@ -198,7 +198,7 @@ call to set the mask to the value returned.
:: ::
size_t size_t
dma_direct_max_mapping_size(struct device *dev); dma_max_mapping_size(struct device *dev);
Returns the maximum size of a mapping for the device. The size parameter Returns the maximum size of a mapping for the device. The size parameter
of the mapping functions like dma_map_single(), dma_map_page() and of the mapping functions like dma_map_single(), dma_map_page() and
......
:orphan:
====
EDID
====
In the good old days when graphics parameters were configured explicitly In the good old days when graphics parameters were configured explicitly
in a file called xorg.conf, even broken hardware could be managed. in a file called xorg.conf, even broken hardware could be managed.
...@@ -34,16 +40,19 @@ Makefile. Please note that the EDID data structure expects the timing ...@@ -34,16 +40,19 @@ Makefile. Please note that the EDID data structure expects the timing
values in a different way as compared to the standard X11 format. values in a different way as compared to the standard X11 format.
X11: X11:
HTimings: hdisp hsyncstart hsyncend htotal HTimings:
VTimings: vdisp vsyncstart vsyncend vtotal hdisp hsyncstart hsyncend htotal
VTimings:
EDID: vdisp vsyncstart vsyncend vtotal
#define XPIX hdisp
#define XBLANK htotal-hdisp EDID::
#define XOFFSET hsyncstart-hdisp
#define XPULSE hsyncend-hsyncstart #define XPIX hdisp
#define XBLANK htotal-hdisp
#define YPIX vdisp #define XOFFSET hsyncstart-hdisp
#define YBLANK vtotal-vdisp #define XPULSE hsyncend-hsyncstart
#define YOFFSET vsyncstart-vdisp
#define YPULSE vsyncend-vsyncstart #define YPIX vdisp
#define YBLANK vtotal-vdisp
#define YOFFSET vsyncstart-vdisp
#define YPULSE vsyncend-vsyncstart
config WARN_MISSING_DOCUMENTS
bool "Warn if there's a missing documentation file"
depends on COMPILE_TEST
help
It is not uncommon that a document gets renamed.
This option makes the Kernel to check for missing dependencies,
warning when something is missing. Works only if the Kernel
is built from a git tree.
If unsure, select 'N'.
...@@ -4,6 +4,11 @@ ...@@ -4,6 +4,11 @@
subdir-y := devicetree/bindings/ subdir-y := devicetree/bindings/
# Check for broken documentation file references
ifeq ($(CONFIG_WARN_MISSING_DOCUMENTS),y)
$(shell $(srctree)/scripts/documentation-file-ref-check --warn)
endif
# You can set these variables from the command line. # You can set these variables from the command line.
SPHINXBUILD = sphinx-build SPHINXBUILD = sphinx-build
SPHINXOPTS = SPHINXOPTS =
...@@ -23,11 +28,13 @@ ifeq ($(HAVE_SPHINX),0) ...@@ -23,11 +28,13 @@ ifeq ($(HAVE_SPHINX),0)
.DEFAULT: .DEFAULT:
$(warning The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed and in PATH, or set the SPHINXBUILD make variable to point to the full path of the '$(SPHINXBUILD)' executable.) $(warning The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed and in PATH, or set the SPHINXBUILD make variable to point to the full path of the '$(SPHINXBUILD)' executable.)
@echo @echo
@./scripts/sphinx-pre-install @$(srctree)/scripts/sphinx-pre-install
@echo " SKIP Sphinx $@ target." @echo " SKIP Sphinx $@ target."
else # HAVE_SPHINX else # HAVE_SPHINX
export SPHINXOPTS = $(shell perl -e 'open IN,"sphinx-build --version 2>&1 |"; while (<IN>) { if (m/([\d\.]+)/) { print "-jauto" if ($$1 >= "1.7") } ;} close IN')
# User-friendly check for pdflatex and latexmk # User-friendly check for pdflatex and latexmk
HAVE_PDFLATEX := $(shell if which $(PDFLATEX) >/dev/null 2>&1; then echo 1; else echo 0; fi) HAVE_PDFLATEX := $(shell if which $(PDFLATEX) >/dev/null 2>&1; then echo 1; else echo 0; fi)
HAVE_LATEXMK := $(shell if which latexmk >/dev/null 2>&1; then echo 1; else echo 0; fi) HAVE_LATEXMK := $(shell if which latexmk >/dev/null 2>&1; then echo 1; else echo 0; fi)
...@@ -70,12 +77,14 @@ quiet_cmd_sphinx = SPHINX $@ --> file://$(abspath $(BUILDDIR)/$3/$4) ...@@ -70,12 +77,14 @@ quiet_cmd_sphinx = SPHINX $@ --> file://$(abspath $(BUILDDIR)/$3/$4)
$(abspath $(BUILDDIR)/$3/$4) $(abspath $(BUILDDIR)/$3/$4)
htmldocs: htmldocs:
@$(srctree)/scripts/sphinx-pre-install --version-check
@+$(foreach var,$(SPHINXDIRS),$(call loop_cmd,sphinx,html,$(var),,$(var))) @+$(foreach var,$(SPHINXDIRS),$(call loop_cmd,sphinx,html,$(var),,$(var)))
linkcheckdocs: linkcheckdocs:
@$(foreach var,$(SPHINXDIRS),$(call loop_cmd,sphinx,linkcheck,$(var),,$(var))) @$(foreach var,$(SPHINXDIRS),$(call loop_cmd,sphinx,linkcheck,$(var),,$(var)))
latexdocs: latexdocs:
@$(srctree)/scripts/sphinx-pre-install --version-check
@+$(foreach var,$(SPHINXDIRS),$(call loop_cmd,sphinx,latex,$(var),latex,$(var))) @+$(foreach var,$(SPHINXDIRS),$(call loop_cmd,sphinx,latex,$(var),latex,$(var)))
ifeq ($(HAVE_PDFLATEX),0) ifeq ($(HAVE_PDFLATEX),0)
...@@ -87,14 +96,17 @@ pdfdocs: ...@@ -87,14 +96,17 @@ pdfdocs:
else # HAVE_PDFLATEX else # HAVE_PDFLATEX
pdfdocs: latexdocs pdfdocs: latexdocs
@$(srctree)/scripts/sphinx-pre-install --version-check
$(foreach var,$(SPHINXDIRS), $(MAKE) PDFLATEX="$(PDFLATEX)" LATEXOPTS="$(LATEXOPTS)" -C $(BUILDDIR)/$(var)/latex || exit;) $(foreach var,$(SPHINXDIRS), $(MAKE) PDFLATEX="$(PDFLATEX)" LATEXOPTS="$(LATEXOPTS)" -C $(BUILDDIR)/$(var)/latex || exit;)
endif # HAVE_PDFLATEX endif # HAVE_PDFLATEX
epubdocs: epubdocs:
@$(srctree)/scripts/sphinx-pre-install --version-check
@+$(foreach var,$(SPHINXDIRS),$(call loop_cmd,sphinx,epub,$(var),epub,$(var))) @+$(foreach var,$(SPHINXDIRS),$(call loop_cmd,sphinx,epub,$(var),epub,$(var)))
xmldocs: xmldocs:
@$(srctree)/scripts/sphinx-pre-install --version-check
@+$(foreach var,$(SPHINXDIRS),$(call loop_cmd,sphinx,xml,$(var),xml,$(var))) @+$(foreach var,$(SPHINXDIRS),$(call loop_cmd,sphinx,xml,$(var),xml,$(var)))
endif # HAVE_SPHINX endif # HAVE_SPHINX
......
RCU on Uniprocessor Systems .. _up_doc:
RCU on Uniprocessor Systems
===========================
A common misconception is that, on UP systems, the call_rcu() primitive A common misconception is that, on UP systems, the call_rcu() primitive
may immediately invoke its function. The basis of this misconception may immediately invoke its function. The basis of this misconception
is that since there is only one CPU, it should not be necessary to is that since there is only one CPU, it should not be necessary to
wait for anything else to get done, since there are no other CPUs for wait for anything else to get done, since there are no other CPUs for
anything else to be happening on. Although this approach will -sort- -of- anything else to be happening on. Although this approach will *sort of*
work a surprising amount of the time, it is a very bad idea in general. work a surprising amount of the time, it is a very bad idea in general.
This document presents three examples that demonstrate exactly how bad This document presents three examples that demonstrate exactly how bad
an idea this is. an idea this is.
Example 1: softirq Suicide Example 1: softirq Suicide
--------------------------
Suppose that an RCU-based algorithm scans a linked list containing Suppose that an RCU-based algorithm scans a linked list containing
elements A, B, and C in process context, and can delete elements from elements A, B, and C in process context, and can delete elements from
...@@ -28,8 +30,8 @@ your kernel. ...@@ -28,8 +30,8 @@ your kernel.
This same problem can occur if call_rcu() is invoked from a hardware This same problem can occur if call_rcu() is invoked from a hardware
interrupt handler. interrupt handler.
Example 2: Function-Call Fatality Example 2: Function-Call Fatality
---------------------------------
Of course, one could avert the suicide described in the preceding example Of course, one could avert the suicide described in the preceding example
by having call_rcu() directly invoke its arguments only if it was called by having call_rcu() directly invoke its arguments only if it was called
...@@ -46,11 +48,13 @@ its arguments would cause it to fail to make the fundamental guarantee ...@@ -46,11 +48,13 @@ its arguments would cause it to fail to make the fundamental guarantee
underlying RCU, namely that call_rcu() defers invoking its arguments until underlying RCU, namely that call_rcu() defers invoking its arguments until
all RCU read-side critical sections currently executing have completed. all RCU read-side critical sections currently executing have completed.
Quick Quiz #1: why is it -not- legal to invoke synchronize_rcu() in Quick Quiz #1:
this case? Why is it *not* legal to invoke synchronize_rcu() in this case?
:ref:`Answers to Quick Quiz <answer_quick_quiz_up>`
Example 3: Death by Deadlock Example 3: Death by Deadlock
----------------------------
Suppose that call_rcu() is invoked while holding a lock, and that the Suppose that call_rcu() is invoked while holding a lock, and that the
callback function must acquire this same lock. In this case, if callback function must acquire this same lock. In this case, if
...@@ -76,25 +80,30 @@ there are cases where this can be quite ugly: ...@@ -76,25 +80,30 @@ there are cases where this can be quite ugly:
If call_rcu() directly invokes the callback, painful locking restrictions If call_rcu() directly invokes the callback, painful locking restrictions
or API changes would be required. or API changes would be required.
Quick Quiz #2: What locking restriction must RCU callbacks respect? Quick Quiz #2:
What locking restriction must RCU callbacks respect?
:ref:`Answers to Quick Quiz <answer_quick_quiz_up>`
Summary Summary
-------
Permitting call_rcu() to immediately invoke its arguments breaks RCU, Permitting call_rcu() to immediately invoke its arguments breaks RCU,
even on a UP system. So do not do it! Even on a UP system, the RCU even on a UP system. So do not do it! Even on a UP system, the RCU
infrastructure -must- respect grace periods, and -must- invoke callbacks infrastructure *must* respect grace periods, and *must* invoke callbacks
from a known environment in which no locks are held. from a known environment in which no locks are held.
Note that it -is- safe for synchronize_rcu() to return immediately on Note that it *is* safe for synchronize_rcu() to return immediately on
UP systems, including !PREEMPT SMP builds running on UP systems. UP systems, including PREEMPT SMP builds running on UP systems.
Quick Quiz #3: Why can't synchronize_rcu() return immediately on Quick Quiz #3:
UP systems running preemptable RCU? Why can't synchronize_rcu() return immediately on UP systems running
preemptable RCU?
.. _answer_quick_quiz_up:
Answer to Quick Quiz #1: Answer to Quick Quiz #1:
Why is it -not- legal to invoke synchronize_rcu() in this case? Why is it *not* legal to invoke synchronize_rcu() in this case?
Because the calling function is scanning an RCU-protected linked Because the calling function is scanning an RCU-protected linked
list, and is therefore within an RCU read-side critical section. list, and is therefore within an RCU read-side critical section.
...@@ -104,12 +113,13 @@ Answer to Quick Quiz #1: ...@@ -104,12 +113,13 @@ Answer to Quick Quiz #1:
Answer to Quick Quiz #2: Answer to Quick Quiz #2:
What locking restriction must RCU callbacks respect? What locking restriction must RCU callbacks respect?
Any lock that is acquired within an RCU callback must be Any lock that is acquired within an RCU callback must be acquired
acquired elsewhere using an _irq variant of the spinlock elsewhere using an _bh variant of the spinlock primitive.
primitive. For example, if "mylock" is acquired by an For example, if "mylock" is acquired by an RCU callback, then
RCU callback, then a process-context acquisition of this a process-context acquisition of this lock must use something
lock must use something like spin_lock_irqsave() to like spin_lock_bh() to acquire the lock. Please note that
acquire the lock. it is also OK to use _irq variants of spinlocks, for example,
spin_lock_irqsave().
If the process-context code were to simply use spin_lock(), If the process-context code were to simply use spin_lock(),
then, since RCU callbacks can be invoked from softirq context, then, since RCU callbacks can be invoked from softirq context,
...@@ -119,7 +129,7 @@ Answer to Quick Quiz #2: ...@@ -119,7 +129,7 @@ Answer to Quick Quiz #2:
This restriction might seem gratuitous, since very few RCU This restriction might seem gratuitous, since very few RCU
callbacks acquire locks directly. However, a great many RCU callbacks acquire locks directly. However, a great many RCU
callbacks do acquire locks -indirectly-, for example, via callbacks do acquire locks *indirectly*, for example, via
the kfree() primitive. the kfree() primitive.
Answer to Quick Quiz #3: Answer to Quick Quiz #3:
......
.. _rcu_concepts:
============
RCU concepts
============
.. toctree::
:maxdepth: 1
rcu
listRCU
UP
.. only:: subproject and html
Indices
=======
* :ref:`genindex`
Using RCU to Protect Read-Mostly Linked Lists .. _list_rcu_doc:
Using RCU to Protect Read-Mostly Linked Lists
=============================================
One of the best applications of RCU is to protect read-mostly linked lists One of the best applications of RCU is to protect read-mostly linked lists
("struct list_head" in list.h). One big advantage of this approach ("struct list_head" in list.h). One big advantage of this approach
...@@ -7,8 +9,8 @@ is that all of the required memory barriers are included for you in ...@@ -7,8 +9,8 @@ is that all of the required memory barriers are included for you in
the list macros. This document describes several applications of RCU, the list macros. This document describes several applications of RCU,
with the best fits first. with the best fits first.
Example 1: Read-Side Action Taken Outside of Lock, No In-Place Updates Example 1: Read-Side Action Taken Outside of Lock, No In-Place Updates
----------------------------------------------------------------------
The best applications are cases where, if reader-writer locking were The best applications are cases where, if reader-writer locking were
used, the read-side lock would be dropped before taking any action used, the read-side lock would be dropped before taking any action
...@@ -24,7 +26,7 @@ added or deleted, rather than being modified in place. ...@@ -24,7 +26,7 @@ added or deleted, rather than being modified in place.
A straightforward example of this use of RCU may be found in the A straightforward example of this use of RCU may be found in the
system-call auditing support. For example, a reader-writer locked system-call auditing support. For example, a reader-writer locked
implementation of audit_filter_task() might be as follows: implementation of audit_filter_task() might be as follows::
static enum audit_state audit_filter_task(struct task_struct *tsk) static enum audit_state audit_filter_task(struct task_struct *tsk)
{ {
...@@ -48,7 +50,7 @@ the corresponding value is returned. By the time that this value is acted ...@@ -48,7 +50,7 @@ the corresponding value is returned. By the time that this value is acted
on, the list may well have been modified. This makes sense, since if on, the list may well have been modified. This makes sense, since if
you are turning auditing off, it is OK to audit a few extra system calls. you are turning auditing off, it is OK to audit a few extra system calls.
This means that RCU can be easily applied to the read side, as follows: This means that RCU can be easily applied to the read side, as follows::
static enum audit_state audit_filter_task(struct task_struct *tsk) static enum audit_state audit_filter_task(struct task_struct *tsk)
{ {
...@@ -73,7 +75,7 @@ become list_for_each_entry_rcu(). The _rcu() list-traversal primitives ...@@ -73,7 +75,7 @@ become list_for_each_entry_rcu(). The _rcu() list-traversal primitives
insert the read-side memory barriers that are required on DEC Alpha CPUs. insert the read-side memory barriers that are required on DEC Alpha CPUs.
The changes to the update side are also straightforward. A reader-writer The changes to the update side are also straightforward. A reader-writer
lock might be used as follows for deletion and insertion: lock might be used as follows for deletion and insertion::
static inline int audit_del_rule(struct audit_rule *rule, static inline int audit_del_rule(struct audit_rule *rule,
struct list_head *list) struct list_head *list)
...@@ -106,7 +108,7 @@ lock might be used as follows for deletion and insertion: ...@@ -106,7 +108,7 @@ lock might be used as follows for deletion and insertion:
return 0; return 0;
} }
Following are the RCU equivalents for these two functions: Following are the RCU equivalents for these two functions::
static inline int audit_del_rule(struct audit_rule *rule, static inline int audit_del_rule(struct audit_rule *rule,
struct list_head *list) struct list_head *list)
...@@ -154,13 +156,13 @@ otherwise cause concurrent readers to fail spectacularly. ...@@ -154,13 +156,13 @@ otherwise cause concurrent readers to fail spectacularly.
So, when readers can tolerate stale data and when entries are either added So, when readers can tolerate stale data and when entries are either added
or deleted, without in-place modification, it is very easy to use RCU! or deleted, without in-place modification, it is very easy to use RCU!
Example 2: Handling In-Place Updates Example 2: Handling In-Place Updates
------------------------------------
The system-call auditing code does not update auditing rules in place. The system-call auditing code does not update auditing rules in place.
However, if it did, reader-writer-locked code to do so might look as However, if it did, reader-writer-locked code to do so might look as
follows (presumably, the field_count is only permitted to decrease, follows (presumably, the field_count is only permitted to decrease,
otherwise, the added fields would need to be filled in): otherwise, the added fields would need to be filled in)::
static inline int audit_upd_rule(struct audit_rule *rule, static inline int audit_upd_rule(struct audit_rule *rule,
struct list_head *list, struct list_head *list,
...@@ -187,7 +189,7 @@ otherwise, the added fields would need to be filled in): ...@@ -187,7 +189,7 @@ otherwise, the added fields would need to be filled in):
The RCU version creates a copy, updates the copy, then replaces the old The RCU version creates a copy, updates the copy, then replaces the old
entry with the newly updated entry. This sequence of actions, allowing entry with the newly updated entry. This sequence of actions, allowing
concurrent reads while doing a copy to perform an update, is what gives concurrent reads while doing a copy to perform an update, is what gives
RCU ("read-copy update") its name. The RCU code is as follows: RCU ("read-copy update") its name. The RCU code is as follows::
static inline int audit_upd_rule(struct audit_rule *rule, static inline int audit_upd_rule(struct audit_rule *rule,
struct list_head *list, struct list_head *list,
...@@ -216,8 +218,8 @@ RCU ("read-copy update") its name. The RCU code is as follows: ...@@ -216,8 +218,8 @@ RCU ("read-copy update") its name. The RCU code is as follows:
Again, this assumes that the caller holds audit_netlink_sem. Normally, Again, this assumes that the caller holds audit_netlink_sem. Normally,
the reader-writer lock would become a spinlock in this sort of code. the reader-writer lock would become a spinlock in this sort of code.
Example 3: Eliminating Stale Data Example 3: Eliminating Stale Data
---------------------------------
The auditing examples above tolerate stale data, as do most algorithms The auditing examples above tolerate stale data, as do most algorithms
that are tracking external state. Because there is a delay from the that are tracking external state. Because there is a delay from the
...@@ -231,13 +233,16 @@ per-entry spinlock, and, if the "deleted" flag is set, pretends that the ...@@ -231,13 +233,16 @@ per-entry spinlock, and, if the "deleted" flag is set, pretends that the
entry does not exist. For this to be helpful, the search function must entry does not exist. For this to be helpful, the search function must
return holding the per-entry spinlock, as ipc_lock() does in fact do. return holding the per-entry spinlock, as ipc_lock() does in fact do.
Quick Quiz: Why does the search function need to return holding the Quick Quiz:
per-entry lock for this deleted-flag technique to be helpful? Why does the search function need to return holding the per-entry lock for
this deleted-flag technique to be helpful?
:ref:`Answer to Quick Quiz <answer_quick_quiz_list>`
If the system-call audit module were to ever need to reject stale data, If the system-call audit module were to ever need to reject stale data,
one way to accomplish this would be to add a "deleted" flag and a "lock" one way to accomplish this would be to add a "deleted" flag and a "lock"
spinlock to the audit_entry structure, and modify audit_filter_task() spinlock to the audit_entry structure, and modify audit_filter_task()
as follows: as follows::
static enum audit_state audit_filter_task(struct task_struct *tsk) static enum audit_state audit_filter_task(struct task_struct *tsk)
{ {
...@@ -268,7 +273,7 @@ audit_upd_rule() would need additional memory barriers to ensure ...@@ -268,7 +273,7 @@ audit_upd_rule() would need additional memory barriers to ensure
that the list_add_rcu() was really executed before the list_del_rcu(). that the list_add_rcu() was really executed before the list_del_rcu().
The audit_del_rule() function would need to set the "deleted" The audit_del_rule() function would need to set the "deleted"
flag under the spinlock as follows: flag under the spinlock as follows::
static inline int audit_del_rule(struct audit_rule *rule, static inline int audit_del_rule(struct audit_rule *rule,
struct list_head *list) struct list_head *list)
...@@ -290,8 +295,8 @@ flag under the spinlock as follows: ...@@ -290,8 +295,8 @@ flag under the spinlock as follows:
return -EFAULT; /* No matching rule */ return -EFAULT; /* No matching rule */
} }
Summary Summary
-------
Read-mostly list-based data structures that can tolerate stale data are Read-mostly list-based data structures that can tolerate stale data are
the most amenable to use of RCU. The simplest case is where entries are the most amenable to use of RCU. The simplest case is where entries are
...@@ -302,8 +307,9 @@ If stale data cannot be tolerated, then a "deleted" flag may be used ...@@ -302,8 +307,9 @@ If stale data cannot be tolerated, then a "deleted" flag may be used
in conjunction with a per-entry spinlock in order to allow the search in conjunction with a per-entry spinlock in order to allow the search
function to reject newly deleted data. function to reject newly deleted data.
.. _answer_quick_quiz_list:
Answer to Quick Quiz Answer to Quick Quiz:
Why does the search function need to return holding the per-entry Why does the search function need to return holding the per-entry
lock for this deleted-flag technique to be helpful? lock for this deleted-flag technique to be helpful?
......
.. _rcu_doc:
RCU Concepts
============
The basic idea behind RCU (read-copy update) is to split destructive
operations into two parts, one that prevents anyone from seeing the data
item being destroyed, and one that actually carries out the destruction.
A "grace period" must elapse between the two parts, and this grace period
must be long enough that any readers accessing the item being deleted have
since dropped their references. For example, an RCU-protected deletion
from a linked list would first remove the item from the list, wait for
a grace period to elapse, then free the element. See the
Documentation/RCU/listRCU.rst file for more information on using RCU with
linked lists.
Frequently Asked Questions
--------------------------
- Why would anyone want to use RCU?
The advantage of RCU's two-part approach is that RCU readers need
not acquire any locks, perform any atomic instructions, write to
shared memory, or (on CPUs other than Alpha) execute any memory
barriers. The fact that these operations are quite expensive
on modern CPUs is what gives RCU its performance advantages
in read-mostly situations. The fact that RCU readers need not
acquire locks can also greatly simplify deadlock-avoidance code.
- How can the updater tell when a grace period has completed
if the RCU readers give no indication when they are done?
Just as with spinlocks, RCU readers are not permitted to
block, switch to user-mode execution, or enter the idle loop.
Therefore, as soon as a CPU is seen passing through any of these
three states, we know that that CPU has exited any previous RCU
read-side critical sections. So, if we remove an item from a
linked list, and then wait until all CPUs have switched context,
executed in user mode, or executed in the idle loop, we can
safely free up that item.
Preemptible variants of RCU (CONFIG_PREEMPT_RCU) get the
same effect, but require that the readers manipulate CPU-local
counters. These counters allow limited types of blocking within
RCU read-side critical sections. SRCU also uses CPU-local
counters, and permits general blocking within RCU read-side
critical sections. These variants of RCU detect grace periods
by sampling these counters.
- If I am running on a uniprocessor kernel, which can only do one
thing at a time, why should I wait for a grace period?
See the Documentation/RCU/UP.rst file for more information.
- How can I see where RCU is currently used in the Linux kernel?
Search for "rcu_read_lock", "rcu_read_unlock", "call_rcu",
"rcu_read_lock_bh", "rcu_read_unlock_bh", "srcu_read_lock",
"srcu_read_unlock", "synchronize_rcu", "synchronize_net",
"synchronize_srcu", and the other RCU primitives. Or grab one
of the cscope databases from:
(http://www.rdrop.com/users/paulmck/RCU/linuxusage/rculocktab.html).
- What guidelines should I follow when writing code that uses RCU?
See the checklist.txt file in this directory.
- Why the name "RCU"?
"RCU" stands for "read-copy update". The file Documentation/RCU/listRCU.rst
has more information on where this name came from, search for
"read-copy update" to find it.
- I hear that RCU is patented? What is with that?
Yes, it is. There are several known patents related to RCU,
search for the string "Patent" in RTFP.txt to find them.
Of these, one was allowed to lapse by the assignee, and the
others have been contributed to the Linux kernel under GPL.
There are now also LGPL implementations of user-level RCU
available (http://liburcu.org/).
- I hear that RCU needs work in order to support realtime kernels?
Realtime-friendly RCU can be enabled via the CONFIG_PREEMPT_RCU
kernel configuration parameter.
- Where can I find more information on RCU?
See the RTFP.txt file in this directory.
Or point your browser at (http://www.rdrop.com/users/paulmck/RCU/).
RCU Concepts
The basic idea behind RCU (read-copy update) is to split destructive
operations into two parts, one that prevents anyone from seeing the data
item being destroyed, and one that actually carries out the destruction.
A "grace period" must elapse between the two parts, and this grace period
must be long enough that any readers accessing the item being deleted have
since dropped their references. For example, an RCU-protected deletion
from a linked list would first remove the item from the list, wait for
a grace period to elapse, then free the element. See the listRCU.txt
file for more information on using RCU with linked lists.
Frequently Asked Questions
o Why would anyone want to use RCU?
The advantage of RCU's two-part approach is that RCU readers need
not acquire any locks, perform any atomic instructions, write to
shared memory, or (on CPUs other than Alpha) execute any memory
barriers. The fact that these operations are quite expensive
on modern CPUs is what gives RCU its performance advantages
in read-mostly situations. The fact that RCU readers need not
acquire locks can also greatly simplify deadlock-avoidance code.
o How can the updater tell when a grace period has completed
if the RCU readers give no indication when they are done?
Just as with spinlocks, RCU readers are not permitted to
block, switch to user-mode execution, or enter the idle loop.
Therefore, as soon as a CPU is seen passing through any of these
three states, we know that that CPU has exited any previous RCU
read-side critical sections. So, if we remove an item from a
linked list, and then wait until all CPUs have switched context,
executed in user mode, or executed in the idle loop, we can
safely free up that item.
Preemptible variants of RCU (CONFIG_PREEMPT_RCU) get the
same effect, but require that the readers manipulate CPU-local
counters. These counters allow limited types of blocking within
RCU read-side critical sections. SRCU also uses CPU-local
counters, and permits general blocking within RCU read-side
critical sections. These variants of RCU detect grace periods
by sampling these counters.
o If I am running on a uniprocessor kernel, which can only do one
thing at a time, why should I wait for a grace period?
See the UP.txt file in this directory.
o How can I see where RCU is currently used in the Linux kernel?
Search for "rcu_read_lock", "rcu_read_unlock", "call_rcu",
"rcu_read_lock_bh", "rcu_read_unlock_bh", "srcu_read_lock",
"srcu_read_unlock", "synchronize_rcu", "synchronize_net",
"synchronize_srcu", and the other RCU primitives. Or grab one
of the cscope databases from:
http://www.rdrop.com/users/paulmck/RCU/linuxusage/rculocktab.html
o What guidelines should I follow when writing code that uses RCU?
See the checklist.txt file in this directory.
o Why the name "RCU"?
"RCU" stands for "read-copy update". The file listRCU.txt has
more information on where this name came from, search for
"read-copy update" to find it.
o I hear that RCU is patented? What is with that?
Yes, it is. There are several known patents related to RCU,
search for the string "Patent" in RTFP.txt to find them.
Of these, one was allowed to lapse by the assignee, and the
others have been contributed to the Linux kernel under GPL.
There are now also LGPL implementations of user-level RCU
available (http://liburcu.org/).
o I hear that RCU needs work in order to support realtime kernels?
Realtime-friendly RCU can be enabled via the CONFIG_PREEMPT_RCU
kernel configuration parameter.
o Where can I find more information on RCU?
See the RTFP.txt file in this directory.
Or point your browser at http://www.rdrop.com/users/paulmck/RCU/.
:orphan:
======================================================== ========================================================
OpenCAPI (Open Coherent Accelerator Processor Interface) OpenCAPI (Open Coherent Accelerator Processor Interface)
======================================================== ========================================================
......
...@@ -96,4 +96,4 @@ where ...@@ -96,4 +96,4 @@ where
<URL:http://www.uefi.org/sites/default/files/resources/_DSD-hierarchical-data-extension-UUID-v1.1.pdf>, <URL:http://www.uefi.org/sites/default/files/resources/_DSD-hierarchical-data-extension-UUID-v1.1.pdf>,
referenced 2019-02-21. referenced 2019-02-21.
[7] Documentation/acpi/dsd/data-node-reference.txt [7] Documentation/firmware-guide/acpi/dsd/data-node-references.rst
...@@ -227,7 +227,7 @@ Configuring the kernel ...@@ -227,7 +227,7 @@ Configuring the kernel
"make tinyconfig" Configure the tiniest possible kernel. "make tinyconfig" Configure the tiniest possible kernel.
You can find more information on using the Linux kernel config tools You can find more information on using the Linux kernel config tools
in Documentation/kbuild/kconfig.txt. in Documentation/kbuild/kconfig.rst.
- NOTES on ``make config``: - NOTES on ``make config``:
......
...@@ -90,7 +90,7 @@ the disk is not available then you have three options: ...@@ -90,7 +90,7 @@ the disk is not available then you have three options:
run a null modem to a second machine and capture the output there run a null modem to a second machine and capture the output there
using your favourite communication program. Minicom works well. using your favourite communication program. Minicom works well.
(3) Use Kdump (see Documentation/kdump/kdump.txt), (3) Use Kdump (see Documentation/kdump/kdump.rst),
extract the kernel ring buffer from old memory with using dmesg extract the kernel ring buffer from old memory with using dmesg
gdbmacro in Documentation/kdump/gdbmacros.txt. gdbmacro in Documentation/kdump/gdbmacros.txt.
......
...@@ -9,5 +9,6 @@ are configurable at compile, boot or run time. ...@@ -9,5 +9,6 @@ are configurable at compile, boot or run time.
.. toctree:: .. toctree::
:maxdepth: 1 :maxdepth: 1
spectre
l1tf l1tf
mds mds
This diff is collapsed.
...@@ -70,6 +70,7 @@ configure specific aspects of kernel behavior to your liking. ...@@ -70,6 +70,7 @@ configure specific aspects of kernel behavior to your liking.
ras ras
bcache bcache
ext4 ext4
binderfs
pm/index pm/index
thunderbolt thunderbolt
LSM/index LSM/index
......
...@@ -9,11 +9,11 @@ and sorted into English Dictionary order (defined as ignoring all ...@@ -9,11 +9,11 @@ and sorted into English Dictionary order (defined as ignoring all
punctuation and sorting digits before letters in a case insensitive punctuation and sorting digits before letters in a case insensitive
manner), and with descriptions where known. manner), and with descriptions where known.
The kernel parses parameters from the kernel command line up to "--"; The kernel parses parameters from the kernel command line up to "``--``";
if it doesn't recognize a parameter and it doesn't contain a '.', the if it doesn't recognize a parameter and it doesn't contain a '.', the
parameter gets passed to init: parameters with '=' go into init's parameter gets passed to init: parameters with '=' go into init's
environment, others are passed as command line arguments to init. environment, others are passed as command line arguments to init.
Everything after "--" is passed as an argument to init. Everything after "``--``" is passed as an argument to init.
Module parameters can be specified in two ways: via the kernel command Module parameters can be specified in two ways: via the kernel command
line with a module name prefix, or via modprobe, e.g.:: line with a module name prefix, or via modprobe, e.g.::
...@@ -167,7 +167,7 @@ parameter is applicable:: ...@@ -167,7 +167,7 @@ parameter is applicable::
X86-32 X86-32, aka i386 architecture is enabled. X86-32 X86-32, aka i386 architecture is enabled.
X86-64 X86-64 architecture is enabled. X86-64 X86-64 architecture is enabled.
More X86-64 boot options can be found in More X86-64 boot options can be found in
Documentation/x86/x86_64/boot-options.txt . Documentation/x86/x86_64/boot-options.rst.
X86 Either 32-bit or 64-bit x86 (same as X86-32+X86-64) X86 Either 32-bit or 64-bit x86 (same as X86-32+X86-64)
X86_UV SGI UV support is enabled. X86_UV SGI UV support is enabled.
XEN Xen support is enabled XEN Xen support is enabled
...@@ -181,10 +181,10 @@ In addition, the following text indicates that the option:: ...@@ -181,10 +181,10 @@ In addition, the following text indicates that the option::
Parameters denoted with BOOT are actually interpreted by the boot Parameters denoted with BOOT are actually interpreted by the boot
loader, and have no meaning to the kernel directly. loader, and have no meaning to the kernel directly.
Do not modify the syntax of boot loader parameters without extreme Do not modify the syntax of boot loader parameters without extreme
need or coordination with <Documentation/x86/boot.txt>. need or coordination with <Documentation/x86/boot.rst>.
There are also arch-specific kernel-parameters not documented here. There are also arch-specific kernel-parameters not documented here.
See for example <Documentation/x86/x86_64/boot-options.txt>. See for example <Documentation/x86/x86_64/boot-options.rst>.
Note that ALL kernel parameters listed below are CASE SENSITIVE, and that Note that ALL kernel parameters listed below are CASE SENSITIVE, and that
a trailing = on the name of any parameter states that that parameter will a trailing = on the name of any parameter states that that parameter will
......
...@@ -53,7 +53,7 @@ ...@@ -53,7 +53,7 @@
ACPI_DEBUG_PRINT statements, e.g., ACPI_DEBUG_PRINT statements, e.g.,
ACPI_DEBUG_PRINT((ACPI_DB_INFO, ... ACPI_DEBUG_PRINT((ACPI_DB_INFO, ...
The debug_level mask defaults to "info". See The debug_level mask defaults to "info". See
Documentation/acpi/debug.txt for more information about Documentation/firmware-guide/acpi/debug.rst for more information about
debug layers and levels. debug layers and levels.
Enable processor driver info messages: Enable processor driver info messages:
...@@ -708,14 +708,14 @@ ...@@ -708,14 +708,14 @@
[KNL, x86_64] select a region under 4G first, and [KNL, x86_64] select a region under 4G first, and
fall back to reserve region above 4G when '@offset' fall back to reserve region above 4G when '@offset'
hasn't been specified. hasn't been specified.
See Documentation/kdump/kdump.txt for further details. See Documentation/kdump/kdump.rst for further details.
crashkernel=range1:size1[,range2:size2,...][@offset] crashkernel=range1:size1[,range2:size2,...][@offset]
[KNL] Same as above, but depends on the memory [KNL] Same as above, but depends on the memory
in the running system. The syntax of range is in the running system. The syntax of range is
start-[end] where start and end are both start-[end] where start and end are both
a memory unit (amount[KMG]). See also a memory unit (amount[KMG]). See also
Documentation/kdump/kdump.txt for an example. Documentation/kdump/kdump.rst for an example.
crashkernel=size[KMG],high crashkernel=size[KMG],high
[KNL, x86_64] range could be above 4G. Allow kernel [KNL, x86_64] range could be above 4G. Allow kernel
...@@ -932,7 +932,7 @@ ...@@ -932,7 +932,7 @@
edid/1680x1050.bin, or edid/1920x1080.bin is given edid/1680x1050.bin, or edid/1920x1080.bin is given
and no file with the same name exists. Details and and no file with the same name exists. Details and
instructions how to build your own EDID data are instructions how to build your own EDID data are
available in Documentation/EDID/HOWTO.txt. An EDID available in Documentation/EDID/howto.rst. An EDID
data set will only be used for a particular connector, data set will only be used for a particular connector,
if its name and a colon are prepended to the EDID if its name and a colon are prepended to the EDID
name. Each connector may use a unique EDID data name. Each connector may use a unique EDID data
...@@ -963,7 +963,7 @@ ...@@ -963,7 +963,7 @@
for details. for details.
nompx [X86] Disables Intel Memory Protection Extensions. nompx [X86] Disables Intel Memory Protection Extensions.
See Documentation/x86/intel_mpx.txt for more See Documentation/x86/intel_mpx.rst for more
information about the feature. information about the feature.
nopku [X86] Disable Memory Protection Keys CPU feature found nopku [X86] Disable Memory Protection Keys CPU feature found
...@@ -1189,7 +1189,7 @@ ...@@ -1189,7 +1189,7 @@
that is to be dynamically loaded by Linux. If there are that is to be dynamically loaded by Linux. If there are
multiple variables with the same name but with different multiple variables with the same name but with different
vendor GUIDs, all of them will be loaded. See vendor GUIDs, all of them will be loaded. See
Documentation/acpi/ssdt-overlays.txt for details. Documentation/admin-guide/acpi/ssdt-overlays.rst for details.
eisa_irq_edge= [PARISC,HW] eisa_irq_edge= [PARISC,HW]
...@@ -1209,7 +1209,7 @@ ...@@ -1209,7 +1209,7 @@
Specifies physical address of start of kernel core Specifies physical address of start of kernel core
image elf header and optionally the size. Generally image elf header and optionally the size. Generally
kexec loader will pass this option to capture kernel. kexec loader will pass this option to capture kernel.
See Documentation/kdump/kdump.txt for details. See Documentation/kdump/kdump.rst for details.
enable_mtrr_cleanup [X86] enable_mtrr_cleanup [X86]
The kernel tries to adjust MTRR layout from continuous The kernel tries to adjust MTRR layout from continuous
...@@ -1388,9 +1388,6 @@ ...@@ -1388,9 +1388,6 @@
Valid parameters: "on", "off" Valid parameters: "on", "off"
Default: "on" Default: "on"
hisax= [HW,ISDN]
See Documentation/isdn/README.HiSax.
hlt [BUGS=ARM,SH] hlt [BUGS=ARM,SH]
hpet= [X86-32,HPET] option to control HPET usage hpet= [X86-32,HPET] option to control HPET usage
...@@ -1507,7 +1504,7 @@ ...@@ -1507,7 +1504,7 @@
Format: =0.0 to prevent dma on hda, =0.1 hdb =1.0 hdc Format: =0.0 to prevent dma on hda, =0.1 hdb =1.0 hdc
.vlb_clock .pci_clock .noflush .nohpa .noprobe .nowerr .vlb_clock .pci_clock .noflush .nohpa .noprobe .nowerr
.cdrom .chs .ignore_cable are additional options .cdrom .chs .ignore_cable are additional options
See Documentation/ide/ide.txt. See Documentation/ide/ide.rst.
ide-generic.probe-mask= [HW] (E)IDE subsystem ide-generic.probe-mask= [HW] (E)IDE subsystem
Format: <int> Format: <int>
...@@ -2383,7 +2380,7 @@ ...@@ -2383,7 +2380,7 @@
mce [X86-32] Machine Check Exception mce [X86-32] Machine Check Exception
mce=option [X86-64] See Documentation/x86/x86_64/boot-options.txt mce=option [X86-64] See Documentation/x86/x86_64/boot-options.rst
md= [HW] RAID subsystems devices and level md= [HW] RAID subsystems devices and level
See Documentation/admin-guide/md.rst. See Documentation/admin-guide/md.rst.
...@@ -2439,7 +2436,7 @@ ...@@ -2439,7 +2436,7 @@
set according to the set according to the
CONFIG_MEMORY_HOTPLUG_DEFAULT_ONLINE kernel config CONFIG_MEMORY_HOTPLUG_DEFAULT_ONLINE kernel config
option. option.
See Documentation/memory-hotplug.txt. See Documentation/admin-guide/mm/memory-hotplug.rst.
memmap=exactmap [KNL,X86] Enable setting of an exact memmap=exactmap [KNL,X86] Enable setting of an exact
E820 memory map, as specified by the user. E820 memory map, as specified by the user.
...@@ -2528,7 +2525,7 @@ ...@@ -2528,7 +2525,7 @@
mem_encrypt=on: Activate SME mem_encrypt=on: Activate SME
mem_encrypt=off: Do not activate SME mem_encrypt=off: Do not activate SME
Refer to Documentation/x86/amd-memory-encryption.txt Refer to Documentation/virtual/kvm/amd-memory-encryption.rst
for details on when memory encryption can be activated. for details on when memory encryption can be activated.
mem_sleep_default= [SUSPEND] Default system suspend mode: mem_sleep_default= [SUSPEND] Default system suspend mode:
...@@ -2836,8 +2833,9 @@ ...@@ -2836,8 +2833,9 @@
0 - turn hardlockup detector in nmi_watchdog off 0 - turn hardlockup detector in nmi_watchdog off
1 - turn hardlockup detector in nmi_watchdog on 1 - turn hardlockup detector in nmi_watchdog on
When panic is specified, panic when an NMI watchdog When panic is specified, panic when an NMI watchdog
timeout occurs (or 'nopanic' to override the opposite timeout occurs (or 'nopanic' to not panic on an NMI
default). To disable both hard and soft lockup detectors, watchdog, if CONFIG_BOOTPARAM_HARDLOCKUP_PANIC is set)
To disable both hard and soft lockup detectors,
please see 'nowatchdog'. please see 'nowatchdog'.
This is useful when you use a panic=... timeout and This is useful when you use a panic=... timeout and
need the box quickly up again. need the box quickly up again.
...@@ -3528,7 +3526,7 @@ ...@@ -3528,7 +3526,7 @@
See Documentation/blockdev/paride.txt. See Documentation/blockdev/paride.txt.
pirq= [SMP,APIC] Manual mp-table setup pirq= [SMP,APIC] Manual mp-table setup
See Documentation/x86/i386/IO-APIC.txt. See Documentation/x86/i386/IO-APIC.rst.
plip= [PPT,NET] Parallel port network link plip= [PPT,NET] Parallel port network link
Format: { parport<nr> | timid | 0 } Format: { parport<nr> | timid | 0 }
...@@ -5032,7 +5030,7 @@ ...@@ -5032,7 +5030,7 @@
vector=percpu: enable percpu vector domain vector=percpu: enable percpu vector domain
video= [FB] Frame buffer configuration video= [FB] Frame buffer configuration
See Documentation/fb/modedb.txt. See Documentation/fb/modedb.rst.
video.brightness_switch_enabled= [0,1] video.brightness_switch_enabled= [0,1]
If set to 1, on receiving an ACPI notify event If set to 1, on receiving an ACPI notify event
...@@ -5060,7 +5058,7 @@ ...@@ -5060,7 +5058,7 @@
Can be used multiple times for multiple devices. Can be used multiple times for multiple devices.
vga= [BOOT,X86-32] Select a particular video mode vga= [BOOT,X86-32] Select a particular video mode
See Documentation/x86/boot.txt and See Documentation/x86/boot.rst and
Documentation/svga.txt. Documentation/svga.txt.
Use vga=ask for menu. Use vga=ask for menu.
This is actually a boot loader parameter; the value is This is actually a boot loader parameter; the value is
...@@ -5167,7 +5165,7 @@ ...@@ -5167,7 +5165,7 @@
Default: 3 = cyan. Default: 3 = cyan.
watchdog timers [HW,WDT] For information on watchdog timers, watchdog timers [HW,WDT] For information on watchdog timers,
see Documentation/watchdog/watchdog-parameters.txt see Documentation/watchdog/watchdog-parameters.rst
or other driver-specific files in the or other driver-specific files in the
Documentation/watchdog/ directory. Documentation/watchdog/ directory.
......
...@@ -165,5 +165,6 @@ write-through caching. ...@@ -165,5 +165,6 @@ write-through caching.
======== ========
See Also See Also
======== ========
.. [1] https://www.uefi.org/sites/default/files/resources/ACPI_6_2.pdf
Section 5.2.27 [1] https://www.uefi.org/sites/default/files/resources/ACPI_6_2.pdf
- Section 5.2.27
...@@ -199,7 +199,7 @@ Architecture (MCA)\ [#f3]_. ...@@ -199,7 +199,7 @@ Architecture (MCA)\ [#f3]_.
mode). mode).
.. [#f3] For more details about the Machine Check Architecture (MCA), .. [#f3] For more details about the Machine Check Architecture (MCA),
please read Documentation/x86/x86_64/machinecheck at the Kernel tree. please read Documentation/x86/x86_64/machinecheck.rst at the Kernel tree.
EDAC - Error Detection And Correction EDAC - Error Detection And Correction
************************************* *************************************
......
Introduction
============
ATA over Ethernet is a network protocol that provides simple access to ATA over Ethernet is a network protocol that provides simple access to
block storage on the LAN. block storage on the LAN.
...@@ -22,7 +25,8 @@ document the use of the driver and are not necessary if you install ...@@ -22,7 +25,8 @@ document the use of the driver and are not necessary if you install
the aoetools. the aoetools.
CREATING DEVICE NODES Creating Device Nodes
=====================
Users of udev should find the block device nodes created Users of udev should find the block device nodes created
automatically, but to create all the necessary device nodes, use the automatically, but to create all the necessary device nodes, use the
...@@ -38,7 +42,8 @@ CREATING DEVICE NODES ...@@ -38,7 +42,8 @@ CREATING DEVICE NODES
confusing when an AoE device is not present the first time the a confusing when an AoE device is not present the first time the a
command is run but appears a second later. command is run but appears a second later.
USING DEVICE NODES Using Device Nodes
==================
"cat /dev/etherd/err" blocks, waiting for error diagnostic output, "cat /dev/etherd/err" blocks, waiting for error diagnostic output,
like any retransmitted packets. like any retransmitted packets.
...@@ -55,7 +60,7 @@ USING DEVICE NODES ...@@ -55,7 +60,7 @@ USING DEVICE NODES
by sysfs counterparts. Using the commands in aoetools insulates by sysfs counterparts. Using the commands in aoetools insulates
users from these implementation details. users from these implementation details.
The block devices are named like this: The block devices are named like this::
e{shelf}.{slot} e{shelf}.{slot}
e{shelf}.{slot}p{part} e{shelf}.{slot}p{part}
...@@ -64,7 +69,8 @@ USING DEVICE NODES ...@@ -64,7 +69,8 @@ USING DEVICE NODES
first shelf (shelf address zero). That's the whole disk. The first first shelf (shelf address zero). That's the whole disk. The first
partition on that disk would be "e0.2p1". partition on that disk would be "e0.2p1".
USING SYSFS Using sysfs
===========
Each aoe block device in /sys/block has the extra attributes of Each aoe block device in /sys/block has the extra attributes of
state, mac, and netif. The state attribute is "up" when the device state, mac, and netif. The state attribute is "up" when the device
...@@ -78,7 +84,7 @@ USING SYSFS ...@@ -78,7 +84,7 @@ USING SYSFS
There is a script in this directory that formats this information in There is a script in this directory that formats this information in
a convenient way. Users with aoetools should use the aoe-stat a convenient way. Users with aoetools should use the aoe-stat
command. command::
root@makki root# sh Documentation/aoe/status.sh root@makki root# sh Documentation/aoe/status.sh
e10.0 eth3 up e10.0 eth3 up
...@@ -113,12 +119,13 @@ USING SYSFS ...@@ -113,12 +119,13 @@ USING SYSFS
for this purpose. You can also directly use the for this purpose. You can also directly use the
/dev/etherd/discover special file described above. /dev/etherd/discover special file described above.
DRIVER OPTIONS Driver Options
==============
There is a boot option for the built-in aoe driver and a There is a boot option for the built-in aoe driver and a
corresponding module parameter, aoe_iflist. Without this option, corresponding module parameter, aoe_iflist. Without this option,
all network interfaces may be used for ATA over Ethernet. Here is a all network interfaces may be used for ATA over Ethernet. Here is a
usage example for the module parameter. usage example for the module parameter::
modprobe aoe_iflist="eth1 eth3" modprobe aoe_iflist="eth1 eth3"
......
Example of udev rules
---------------------
.. include:: udev.txt
:literal:
Example of udev install rules script
------------------------------------
.. literalinclude:: udev-install.sh
:language: shell
Example script to get status
----------------------------
.. literalinclude:: status.sh
:language: shell
Example of AoE autoload script
------------------------------
.. literalinclude:: autoload.sh
:language: shell
:orphan:
=======================
ATA over Ethernet (AoE)
=======================
.. toctree::
:maxdepth: 1
aoe
todo
examples
.. only:: subproject and html
Indices
=======
* :ref:`genindex`
TODO
====
There is a potential for deadlock when allocating a struct sk_buff for There is a potential for deadlock when allocating a struct sk_buff for
data that needs to be written out to aoe storage. If the data is data that needs to be written out to aoe storage. If the data is
being written from a dirty page in order to free that page, and if being written from a dirty page in order to free that page, and if
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
# udev_rules="/etc/udev/rules.d/" # udev_rules="/etc/udev/rules.d/"
# bash# ls /etc/udev/rules.d/ # bash# ls /etc/udev/rules.d/
# 10-wacom.rules 50-udev.rules # 10-wacom.rules 50-udev.rules
# bash# cp /path/to/linux-2.6.xx/Documentation/aoe/udev.txt \ # bash# cp /path/to/linux/Documentation/aoe/udev.txt \
# /etc/udev/rules.d/60-aoe.rules # /etc/udev/rules.d/60-aoe.rules
# #
......
Too many problems poped up because of unnoticed misaligned memory access in Too many problems popped up because of unnoticed misaligned memory access in
kernel code lately. Therefore the alignment fixup is now unconditionally kernel code lately. Therefore the alignment fixup is now unconditionally
configured in for SA11x0 based targets. According to Alan Cox, this is a configured in for SA11x0 based targets. According to Alan Cox, this is a
bad idea to configure it out, but Russell King has some good reasons for bad idea to configure it out, but Russell King has some good reasons for
......
:orphan:
======================== ========================
STM32 ARM Linux Overview STM32 ARM Linux Overview
======================== ========================
......
:orphan:
STM32F429 Overview STM32F429 Overview
================== ==================
......
:orphan:
STM32F746 Overview STM32F746 Overview
================== ==================
......
:orphan:
STM32F769 Overview STM32F769 Overview
================== ==================
......
:orphan:
STM32H743 Overview STM32H743 Overview
================== ==================
......
:orphan:
STM32MP157 Overview STM32MP157 Overview
=================== ===================
......
Booting AArch64 Linux =====================
===================== Booting AArch64 Linux
=====================
Author: Will Deacon <will.deacon@arm.com> Author: Will Deacon <will.deacon@arm.com>
Date : 07 September 2012 Date : 07 September 2012
This document is based on the ARM booting document by Russell King and This document is based on the ARM booting document by Russell King and
...@@ -12,7 +14,7 @@ The AArch64 exception model is made up of a number of exception levels ...@@ -12,7 +14,7 @@ The AArch64 exception model is made up of a number of exception levels
counterpart. EL2 is the hypervisor level and exists only in non-secure counterpart. EL2 is the hypervisor level and exists only in non-secure
mode. EL3 is the highest priority level and exists only in secure mode. mode. EL3 is the highest priority level and exists only in secure mode.
For the purposes of this document, we will use the term `boot loader' For the purposes of this document, we will use the term `boot loader`
simply to define all software that executes on the CPU(s) before control simply to define all software that executes on the CPU(s) before control
is passed to the Linux kernel. This may include secure monitor and is passed to the Linux kernel. This may include secure monitor and
hypervisor code, or it may just be a handful of instructions for hypervisor code, or it may just be a handful of instructions for
...@@ -70,7 +72,7 @@ Image target is available instead. ...@@ -70,7 +72,7 @@ Image target is available instead.
Requirement: MANDATORY Requirement: MANDATORY
The decompressed kernel image contains a 64-byte header as follows: The decompressed kernel image contains a 64-byte header as follows::
u32 code0; /* Executable code */ u32 code0; /* Executable code */
u32 code1; /* Executable code */ u32 code1; /* Executable code */
...@@ -103,19 +105,26 @@ Header notes: ...@@ -103,19 +105,26 @@ Header notes:
- The flags field (introduced in v3.17) is a little-endian 64-bit field - The flags field (introduced in v3.17) is a little-endian 64-bit field
composed as follows: composed as follows:
Bit 0: Kernel endianness. 1 if BE, 0 if LE.
Bit 1-2: Kernel Page size. ============= ===============================================================
0 - Unspecified. Bit 0 Kernel endianness. 1 if BE, 0 if LE.
1 - 4K Bit 1-2 Kernel Page size.
2 - 16K
3 - 64K * 0 - Unspecified.
Bit 3: Kernel physical placement * 1 - 4K
0 - 2MB aligned base should be as close as possible * 2 - 16K
* 3 - 64K
Bit 3 Kernel physical placement
0
2MB aligned base should be as close as possible
to the base of DRAM, since memory below it is not to the base of DRAM, since memory below it is not
accessible via the linear mapping accessible via the linear mapping
1 - 2MB aligned base may be anywhere in physical 1
2MB aligned base may be anywhere in physical
memory memory
Bits 4-63: Reserved. Bits 4-63 Reserved.
============= ===============================================================
- When image_size is zero, a bootloader should attempt to keep as much - When image_size is zero, a bootloader should attempt to keep as much
memory as possible free for use by the kernel immediately after the memory as possible free for use by the kernel immediately after the
...@@ -147,19 +156,22 @@ Before jumping into the kernel, the following conditions must be met: ...@@ -147,19 +156,22 @@ Before jumping into the kernel, the following conditions must be met:
corrupted by bogus network packets or disk data. This will save corrupted by bogus network packets or disk data. This will save
you many hours of debug. you many hours of debug.
- Primary CPU general-purpose register settings - Primary CPU general-purpose register settings:
x0 = physical address of device tree blob (dtb) in system RAM.
x1 = 0 (reserved for future use) - x0 = physical address of device tree blob (dtb) in system RAM.
x2 = 0 (reserved for future use) - x1 = 0 (reserved for future use)
x3 = 0 (reserved for future use) - x2 = 0 (reserved for future use)
- x3 = 0 (reserved for future use)
- CPU mode - CPU mode
All forms of interrupts must be masked in PSTATE.DAIF (Debug, SError, All forms of interrupts must be masked in PSTATE.DAIF (Debug, SError,
IRQ and FIQ). IRQ and FIQ).
The CPU must be in either EL2 (RECOMMENDED in order to have access to The CPU must be in either EL2 (RECOMMENDED in order to have access to
the virtualisation extensions) or non-secure EL1. the virtualisation extensions) or non-secure EL1.
- Caches, MMUs - Caches, MMUs
The MMU must be off. The MMU must be off.
Instruction cache may be on or off. Instruction cache may be on or off.
The address range corresponding to the loaded kernel image must be The address range corresponding to the loaded kernel image must be
...@@ -172,18 +184,21 @@ Before jumping into the kernel, the following conditions must be met: ...@@ -172,18 +184,21 @@ Before jumping into the kernel, the following conditions must be met:
operations (not recommended) must be configured and disabled. operations (not recommended) must be configured and disabled.
- Architected timers - Architected timers
CNTFRQ must be programmed with the timer frequency and CNTVOFF must CNTFRQ must be programmed with the timer frequency and CNTVOFF must
be programmed with a consistent value on all CPUs. If entering the be programmed with a consistent value on all CPUs. If entering the
kernel at EL1, CNTHCTL_EL2 must have EL1PCTEN (bit 0) set where kernel at EL1, CNTHCTL_EL2 must have EL1PCTEN (bit 0) set where
available. available.
- Coherency - Coherency
All CPUs to be booted by the kernel must be part of the same coherency All CPUs to be booted by the kernel must be part of the same coherency
domain on entry to the kernel. This may require IMPLEMENTATION DEFINED domain on entry to the kernel. This may require IMPLEMENTATION DEFINED
initialisation to enable the receiving of maintenance operations on initialisation to enable the receiving of maintenance operations on
each CPU. each CPU.
- System registers - System registers
All writable architected system registers at the exception level where All writable architected system registers at the exception level where
the kernel image will be entered must be initialised by software at a the kernel image will be entered must be initialised by software at a
higher exception level to prevent execution in an UNKNOWN state. higher exception level to prevent execution in an UNKNOWN state.
...@@ -195,28 +210,40 @@ Before jumping into the kernel, the following conditions must be met: ...@@ -195,28 +210,40 @@ Before jumping into the kernel, the following conditions must be met:
For systems with a GICv3 interrupt controller to be used in v3 mode: For systems with a GICv3 interrupt controller to be used in v3 mode:
- If EL3 is present: - If EL3 is present:
ICC_SRE_EL3.Enable (bit 3) must be initialiased to 0b1.
ICC_SRE_EL3.SRE (bit 0) must be initialised to 0b1. - ICC_SRE_EL3.Enable (bit 3) must be initialiased to 0b1.
- ICC_SRE_EL3.SRE (bit 0) must be initialised to 0b1.
- If the kernel is entered at EL1: - If the kernel is entered at EL1:
ICC.SRE_EL2.Enable (bit 3) must be initialised to 0b1
ICC_SRE_EL2.SRE (bit 0) must be initialised to 0b1. - ICC.SRE_EL2.Enable (bit 3) must be initialised to 0b1
- ICC_SRE_EL2.SRE (bit 0) must be initialised to 0b1.
- The DT or ACPI tables must describe a GICv3 interrupt controller. - The DT or ACPI tables must describe a GICv3 interrupt controller.
For systems with a GICv3 interrupt controller to be used in For systems with a GICv3 interrupt controller to be used in
compatibility (v2) mode: compatibility (v2) mode:
- If EL3 is present: - If EL3 is present:
ICC_SRE_EL3.SRE (bit 0) must be initialised to 0b0. ICC_SRE_EL3.SRE (bit 0) must be initialised to 0b0.
- If the kernel is entered at EL1: - If the kernel is entered at EL1:
ICC_SRE_EL2.SRE (bit 0) must be initialised to 0b0. ICC_SRE_EL2.SRE (bit 0) must be initialised to 0b0.
- The DT or ACPI tables must describe a GICv2 interrupt controller. - The DT or ACPI tables must describe a GICv2 interrupt controller.
For CPUs with pointer authentication functionality: For CPUs with pointer authentication functionality:
- If EL3 is present: - If EL3 is present:
SCR_EL3.APK (bit 16) must be initialised to 0b1
SCR_EL3.API (bit 17) must be initialised to 0b1 - SCR_EL3.APK (bit 16) must be initialised to 0b1
- SCR_EL3.API (bit 17) must be initialised to 0b1
- If the kernel is entered at EL1: - If the kernel is entered at EL1:
HCR_EL2.APK (bit 40) must be initialised to 0b1
HCR_EL2.API (bit 41) must be initialised to 0b1 - HCR_EL2.APK (bit 40) must be initialised to 0b1
- HCR_EL2.API (bit 41) must be initialised to 0b1
The requirements described above for CPU mode, caches, MMUs, architected The requirements described above for CPU mode, caches, MMUs, architected
timers, coherency and system registers apply to all CPUs. All CPUs must timers, coherency and system registers apply to all CPUs. All CPUs must
......
================
ARM64 ELF hwcaps ARM64 ELF hwcaps
================ ================
...@@ -15,16 +16,16 @@ of flags called hwcaps, exposed in the auxilliary vector. ...@@ -15,16 +16,16 @@ of flags called hwcaps, exposed in the auxilliary vector.
Userspace software can test for features by acquiring the AT_HWCAP or Userspace software can test for features by acquiring the AT_HWCAP or
AT_HWCAP2 entry of the auxiliary vector, and testing whether the relevant AT_HWCAP2 entry of the auxiliary vector, and testing whether the relevant
flags are set, e.g. flags are set, e.g.::
bool floating_point_is_present(void) bool floating_point_is_present(void)
{ {
unsigned long hwcaps = getauxval(AT_HWCAP); unsigned long hwcaps = getauxval(AT_HWCAP);
if (hwcaps & HWCAP_FP) if (hwcaps & HWCAP_FP)
return true; return true;
return false; return false;
} }
Where software relies on a feature described by a hwcap, it should check Where software relies on a feature described by a hwcap, it should check
the relevant hwcap flag to verify that the feature is present before the relevant hwcap flag to verify that the feature is present before
...@@ -45,7 +46,7 @@ userspace code at EL0. These hwcaps are defined in terms of ID register ...@@ -45,7 +46,7 @@ userspace code at EL0. These hwcaps are defined in terms of ID register
fields, and should be interpreted with reference to the definition of fields, and should be interpreted with reference to the definition of
these fields in the ARM Architecture Reference Manual (ARM ARM). these fields in the ARM Architecture Reference Manual (ARM ARM).
Such hwcaps are described below in the form: Such hwcaps are described below in the form::
Functionality implied by idreg.field == val. Functionality implied by idreg.field == val.
...@@ -64,75 +65,58 @@ reference to ID registers, and may refer to other documentation. ...@@ -64,75 +65,58 @@ reference to ID registers, and may refer to other documentation.
--------------------------------- ---------------------------------
HWCAP_FP HWCAP_FP
Functionality implied by ID_AA64PFR0_EL1.FP == 0b0000. Functionality implied by ID_AA64PFR0_EL1.FP == 0b0000.
HWCAP_ASIMD HWCAP_ASIMD
Functionality implied by ID_AA64PFR0_EL1.AdvSIMD == 0b0000. Functionality implied by ID_AA64PFR0_EL1.AdvSIMD == 0b0000.
HWCAP_EVTSTRM HWCAP_EVTSTRM
The generic timer is configured to generate events at a frequency of The generic timer is configured to generate events at a frequency of
approximately 100KHz. approximately 100KHz.
HWCAP_AES HWCAP_AES
Functionality implied by ID_AA64ISAR0_EL1.AES == 0b0001. Functionality implied by ID_AA64ISAR0_EL1.AES == 0b0001.
HWCAP_PMULL HWCAP_PMULL
Functionality implied by ID_AA64ISAR0_EL1.AES == 0b0010. Functionality implied by ID_AA64ISAR0_EL1.AES == 0b0010.
HWCAP_SHA1 HWCAP_SHA1
Functionality implied by ID_AA64ISAR0_EL1.SHA1 == 0b0001. Functionality implied by ID_AA64ISAR0_EL1.SHA1 == 0b0001.
HWCAP_SHA2 HWCAP_SHA2
Functionality implied by ID_AA64ISAR0_EL1.SHA2 == 0b0001. Functionality implied by ID_AA64ISAR0_EL1.SHA2 == 0b0001.
HWCAP_CRC32 HWCAP_CRC32
Functionality implied by ID_AA64ISAR0_EL1.CRC32 == 0b0001. Functionality implied by ID_AA64ISAR0_EL1.CRC32 == 0b0001.
HWCAP_ATOMICS HWCAP_ATOMICS
Functionality implied by ID_AA64ISAR0_EL1.Atomic == 0b0010. Functionality implied by ID_AA64ISAR0_EL1.Atomic == 0b0010.
HWCAP_FPHP HWCAP_FPHP
Functionality implied by ID_AA64PFR0_EL1.FP == 0b0001. Functionality implied by ID_AA64PFR0_EL1.FP == 0b0001.
HWCAP_ASIMDHP HWCAP_ASIMDHP
Functionality implied by ID_AA64PFR0_EL1.AdvSIMD == 0b0001. Functionality implied by ID_AA64PFR0_EL1.AdvSIMD == 0b0001.
HWCAP_CPUID HWCAP_CPUID
EL0 access to certain ID registers is available, to the extent EL0 access to certain ID registers is available, to the extent
described by Documentation/arm64/cpu-feature-registers.txt. described by Documentation/arm64/cpu-feature-registers.rst.
These ID registers may imply the availability of features. These ID registers may imply the availability of features.
HWCAP_ASIMDRDM HWCAP_ASIMDRDM
Functionality implied by ID_AA64ISAR0_EL1.RDM == 0b0001. Functionality implied by ID_AA64ISAR0_EL1.RDM == 0b0001.
HWCAP_JSCVT HWCAP_JSCVT
Functionality implied by ID_AA64ISAR1_EL1.JSCVT == 0b0001. Functionality implied by ID_AA64ISAR1_EL1.JSCVT == 0b0001.
HWCAP_FCMA HWCAP_FCMA
Functionality implied by ID_AA64ISAR1_EL1.FCMA == 0b0001. Functionality implied by ID_AA64ISAR1_EL1.FCMA == 0b0001.
HWCAP_LRCPC HWCAP_LRCPC
Functionality implied by ID_AA64ISAR1_EL1.LRCPC == 0b0001. Functionality implied by ID_AA64ISAR1_EL1.LRCPC == 0b0001.
HWCAP_DCPOP HWCAP_DCPOP
Functionality implied by ID_AA64ISAR1_EL1.DPB == 0b0001. Functionality implied by ID_AA64ISAR1_EL1.DPB == 0b0001.
HWCAP2_DCPODP HWCAP2_DCPODP
...@@ -140,27 +124,21 @@ HWCAP2_DCPODP ...@@ -140,27 +124,21 @@ HWCAP2_DCPODP
Functionality implied by ID_AA64ISAR1_EL1.DPB == 0b0010. Functionality implied by ID_AA64ISAR1_EL1.DPB == 0b0010.
HWCAP_SHA3 HWCAP_SHA3
Functionality implied by ID_AA64ISAR0_EL1.SHA3 == 0b0001. Functionality implied by ID_AA64ISAR0_EL1.SHA3 == 0b0001.
HWCAP_SM3 HWCAP_SM3
Functionality implied by ID_AA64ISAR0_EL1.SM3 == 0b0001. Functionality implied by ID_AA64ISAR0_EL1.SM3 == 0b0001.
HWCAP_SM4 HWCAP_SM4
Functionality implied by ID_AA64ISAR0_EL1.SM4 == 0b0001. Functionality implied by ID_AA64ISAR0_EL1.SM4 == 0b0001.
HWCAP_ASIMDDP HWCAP_ASIMDDP
Functionality implied by ID_AA64ISAR0_EL1.DP == 0b0001. Functionality implied by ID_AA64ISAR0_EL1.DP == 0b0001.
HWCAP_SHA512 HWCAP_SHA512
Functionality implied by ID_AA64ISAR0_EL1.SHA2 == 0b0010. Functionality implied by ID_AA64ISAR0_EL1.SHA2 == 0b0010.
HWCAP_SVE HWCAP_SVE
Functionality implied by ID_AA64PFR0_EL1.SVE == 0b0001. Functionality implied by ID_AA64PFR0_EL1.SVE == 0b0001.
HWCAP2_SVE2 HWCAP2_SVE2
...@@ -188,23 +166,18 @@ HWCAP2_SVESM4 ...@@ -188,23 +166,18 @@ HWCAP2_SVESM4
Functionality implied by ID_AA64ZFR0_EL1.SM4 == 0b0001. Functionality implied by ID_AA64ZFR0_EL1.SM4 == 0b0001.
HWCAP_ASIMDFHM HWCAP_ASIMDFHM
Functionality implied by ID_AA64ISAR0_EL1.FHM == 0b0001. Functionality implied by ID_AA64ISAR0_EL1.FHM == 0b0001.
HWCAP_DIT HWCAP_DIT
Functionality implied by ID_AA64PFR0_EL1.DIT == 0b0001. Functionality implied by ID_AA64PFR0_EL1.DIT == 0b0001.
HWCAP_USCAT HWCAP_USCAT
Functionality implied by ID_AA64MMFR2_EL1.AT == 0b0001. Functionality implied by ID_AA64MMFR2_EL1.AT == 0b0001.
HWCAP_ILRCPC HWCAP_ILRCPC
Functionality implied by ID_AA64ISAR1_EL1.LRCPC == 0b0010. Functionality implied by ID_AA64ISAR1_EL1.LRCPC == 0b0010.
HWCAP_FLAGM HWCAP_FLAGM
Functionality implied by ID_AA64ISAR0_EL1.TS == 0b0001. Functionality implied by ID_AA64ISAR0_EL1.TS == 0b0001.
HWCAP2_FLAGM2 HWCAP2_FLAGM2
...@@ -212,20 +185,17 @@ HWCAP2_FLAGM2 ...@@ -212,20 +185,17 @@ HWCAP2_FLAGM2
Functionality implied by ID_AA64ISAR0_EL1.TS == 0b0010. Functionality implied by ID_AA64ISAR0_EL1.TS == 0b0010.
HWCAP_SSBS HWCAP_SSBS
Functionality implied by ID_AA64PFR1_EL1.SSBS == 0b0010. Functionality implied by ID_AA64PFR1_EL1.SSBS == 0b0010.
HWCAP_PACA HWCAP_PACA
Functionality implied by ID_AA64ISAR1_EL1.APA == 0b0001 or Functionality implied by ID_AA64ISAR1_EL1.APA == 0b0001 or
ID_AA64ISAR1_EL1.API == 0b0001, as described by ID_AA64ISAR1_EL1.API == 0b0001, as described by
Documentation/arm64/pointer-authentication.txt. Documentation/arm64/pointer-authentication.rst.
HWCAP_PACG HWCAP_PACG
Functionality implied by ID_AA64ISAR1_EL1.GPA == 0b0001 or Functionality implied by ID_AA64ISAR1_EL1.GPA == 0b0001 or
ID_AA64ISAR1_EL1.GPI == 0b0001, as described by ID_AA64ISAR1_EL1.GPI == 0b0001, as described by
Documentation/arm64/pointer-authentication.txt. Documentation/arm64/pointer-authentication.rst.
HWCAP2_FRINT HWCAP2_FRINT
......
====================
HugeTLBpage on ARM64 HugeTLBpage on ARM64
==================== ====================
...@@ -31,8 +32,10 @@ and level of the page table. ...@@ -31,8 +32,10 @@ and level of the page table.
The following hugepage sizes are supported - The following hugepage sizes are supported -
CONT PTE PMD CONT PMD PUD ====== ======== ==== ======== ===
-------- --- -------- --- - CONT PTE PMD CONT PMD PUD
====== ======== ==== ======== ===
4K: 64K 2M 32M 1G 4K: 64K 2M 32M 1G
16K: 2M 32M 1G 16K: 2M 32M 1G
64K: 2M 512M 16G 64K: 2M 512M 16G
====== ======== ==== ======== ===
:orphan:
==================
ARM64 Architecture
==================
.. toctree::
:maxdepth: 1
acpi_object_usage
arm-acpi
booting
cpu-feature-registers
elf_hwcaps
hugetlbpage
legacy_instructions
memory
pointer-authentication
silicon-errata
sve
tagged-pointers
.. only:: subproject and html
Indices
=======
* :ref:`genindex`
===================
Legacy instructions
===================
The arm64 port of the Linux kernel provides infrastructure to support The arm64 port of the Linux kernel provides infrastructure to support
emulation of instructions which have been deprecated, or obsoleted in emulation of instructions which have been deprecated, or obsoleted in
the architecture. The infrastructure code uses undefined instruction the architecture. The infrastructure code uses undefined instruction
...@@ -10,11 +14,13 @@ behaviours and the corresponding values of the sysctl nodes - ...@@ -10,11 +14,13 @@ behaviours and the corresponding values of the sysctl nodes -
* Undef * Undef
Value: 0 Value: 0
Generates undefined instruction abort. Default for instructions that Generates undefined instruction abort. Default for instructions that
have been obsoleted in the architecture, e.g., SWP have been obsoleted in the architecture, e.g., SWP
* Emulate * Emulate
Value: 1 Value: 1
Uses software emulation. To aid migration of software, in this mode Uses software emulation. To aid migration of software, in this mode
usage of emulated instruction is traced as well as rate limited usage of emulated instruction is traced as well as rate limited
warnings are issued. This is the default for deprecated warnings are issued. This is the default for deprecated
...@@ -22,6 +28,7 @@ behaviours and the corresponding values of the sysctl nodes - ...@@ -22,6 +28,7 @@ behaviours and the corresponding values of the sysctl nodes -
* Hardware Execution * Hardware Execution
Value: 2 Value: 2
Although marked as deprecated, some implementations may support the Although marked as deprecated, some implementations may support the
enabling/disabling of hardware support for the execution of these enabling/disabling of hardware support for the execution of these
instructions. Using hardware execution generally provides better instructions. Using hardware execution generally provides better
...@@ -38,20 +45,24 @@ individual instruction notes for further information. ...@@ -38,20 +45,24 @@ individual instruction notes for further information.
Supported legacy instructions Supported legacy instructions
----------------------------- -----------------------------
* SWP{B} * SWP{B}
Node: /proc/sys/abi/swp
Status: Obsolete :Node: /proc/sys/abi/swp
Default: Undef (0) :Status: Obsolete
:Default: Undef (0)
* CP15 Barriers * CP15 Barriers
Node: /proc/sys/abi/cp15_barrier
Status: Deprecated :Node: /proc/sys/abi/cp15_barrier
Default: Emulate (1) :Status: Deprecated
:Default: Emulate (1)
* SETEND * SETEND
Node: /proc/sys/abi/setend
Status: Deprecated :Node: /proc/sys/abi/setend
Default: Emulate (1)* :Status: Deprecated
Note: All the cpus on the system must have mixed endian support at EL0 :Default: Emulate (1)*
for this feature to be enabled. If a new CPU - which doesn't support mixed
endian - is hotplugged in after this feature has been enabled, there could Note: All the cpus on the system must have mixed endian support at EL0
be unexpected results in the application. for this feature to be enabled. If a new CPU - which doesn't support mixed
endian - is hotplugged in after this feature has been enabled, there could
be unexpected results in the application.
Memory Layout on AArch64 Linux ==============================
============================== Memory Layout on AArch64 Linux
==============================
Author: Catalin Marinas <catalin.marinas@arm.com> Author: Catalin Marinas <catalin.marinas@arm.com>
...@@ -21,47 +22,47 @@ The swapper_pg_dir address is written to TTBR1 and never written to ...@@ -21,47 +22,47 @@ The swapper_pg_dir address is written to TTBR1 and never written to
TTBR0. TTBR0.
AArch64 Linux memory layout with 4KB pages + 3 levels: AArch64 Linux memory layout with 4KB pages + 3 levels::
Start End Size Use Start End Size Use
----------------------------------------------------------------------- -----------------------------------------------------------------------
0000000000000000 0000007fffffffff 512GB user 0000000000000000 0000007fffffffff 512GB user
ffffff8000000000 ffffffffffffffff 512GB kernel ffffff8000000000 ffffffffffffffff 512GB kernel
AArch64 Linux memory layout with 4KB pages + 4 levels: AArch64 Linux memory layout with 4KB pages + 4 levels::
Start End Size Use Start End Size Use
----------------------------------------------------------------------- -----------------------------------------------------------------------
0000000000000000 0000ffffffffffff 256TB user 0000000000000000 0000ffffffffffff 256TB user
ffff000000000000 ffffffffffffffff 256TB kernel ffff000000000000 ffffffffffffffff 256TB kernel
AArch64 Linux memory layout with 64KB pages + 2 levels: AArch64 Linux memory layout with 64KB pages + 2 levels::
Start End Size Use Start End Size Use
----------------------------------------------------------------------- -----------------------------------------------------------------------
0000000000000000 000003ffffffffff 4TB user 0000000000000000 000003ffffffffff 4TB user
fffffc0000000000 ffffffffffffffff 4TB kernel fffffc0000000000 ffffffffffffffff 4TB kernel
AArch64 Linux memory layout with 64KB pages + 3 levels: AArch64 Linux memory layout with 64KB pages + 3 levels::
Start End Size Use Start End Size Use
----------------------------------------------------------------------- -----------------------------------------------------------------------
0000000000000000 0000ffffffffffff 256TB user 0000000000000000 0000ffffffffffff 256TB user
ffff000000000000 ffffffffffffffff 256TB kernel ffff000000000000 ffffffffffffffff 256TB kernel
For details of the virtual kernel memory layout please see the kernel For details of the virtual kernel memory layout please see the kernel
booting log. booting log.
Translation table lookup with 4KB pages: Translation table lookup with 4KB pages::
+--------+--------+--------+--------+--------+--------+--------+--------+ +--------+--------+--------+--------+--------+--------+--------+--------+
|63 56|55 48|47 40|39 32|31 24|23 16|15 8|7 0| |63 56|55 48|47 40|39 32|31 24|23 16|15 8|7 0|
+--------+--------+--------+--------+--------+--------+--------+--------+ +--------+--------+--------+--------+--------+--------+--------+--------+
| | | | | | | | | | | |
| | | | | v | | | | | v
| | | | | [11:0] in-page offset | | | | | [11:0] in-page offset
...@@ -72,11 +73,11 @@ Translation table lookup with 4KB pages: ...@@ -72,11 +73,11 @@ Translation table lookup with 4KB pages:
+-------------------------------------------------> [63] TTBR0/1 +-------------------------------------------------> [63] TTBR0/1
Translation table lookup with 64KB pages: Translation table lookup with 64KB pages::
+--------+--------+--------+--------+--------+--------+--------+--------+ +--------+--------+--------+--------+--------+--------+--------+--------+
|63 56|55 48|47 40|39 32|31 24|23 16|15 8|7 0| |63 56|55 48|47 40|39 32|31 24|23 16|15 8|7 0|
+--------+--------+--------+--------+--------+--------+--------+--------+ +--------+--------+--------+--------+--------+--------+--------+--------+
| | | | | | | | | |
| | | | v | | | | v
| | | | [15:0] in-page offset | | | | [15:0] in-page offset
......
=======================================
Pointer authentication in AArch64 Linux Pointer authentication in AArch64 Linux
======================================= =======================================
Author: Mark Rutland <mark.rutland@arm.com> Author: Mark Rutland <mark.rutland@arm.com>
Date: 2017-07-19 Date: 2017-07-19
This document briefly describes the provision of pointer authentication This document briefly describes the provision of pointer authentication
......
Silicon Errata and Software Workarounds =======================================
======================================= Silicon Errata and Software Workarounds
=======================================
Author: Will Deacon <will.deacon@arm.com> Author: Will Deacon <will.deacon@arm.com>
Date : 27 November 2015 Date : 27 November 2015
It is an unfortunate fact of life that hardware is often produced with It is an unfortunate fact of life that hardware is often produced with
...@@ -9,11 +11,13 @@ so-called "errata", which can cause it to deviate from the architecture ...@@ -9,11 +11,13 @@ so-called "errata", which can cause it to deviate from the architecture
under specific circumstances. For hardware produced by ARM, these under specific circumstances. For hardware produced by ARM, these
errata are broadly classified into the following categories: errata are broadly classified into the following categories:
Category A: A critical error without a viable workaround. ========== ========================================================
Category B: A significant or critical error with an acceptable Category A A critical error without a viable workaround.
Category B A significant or critical error with an acceptable
workaround. workaround.
Category C: A minor error that is not expected to occur under normal Category C A minor error that is not expected to occur under normal
operation. operation.
========== ========================================================
For more information, consult one of the "Software Developers Errata For more information, consult one of the "Software Developers Errata
Notice" documents available on infocenter.arm.com (registration Notice" documents available on infocenter.arm.com (registration
...@@ -42,47 +46,86 @@ file acts as a registry of software workarounds in the Linux Kernel and ...@@ -42,47 +46,86 @@ file acts as a registry of software workarounds in the Linux Kernel and
will be updated when new workarounds are committed and backported to will be updated when new workarounds are committed and backported to
stable kernels. stable kernels.
| Implementor | Component | Erratum ID | Kconfig |
+----------------+-----------------+-----------------+-----------------------------+ +----------------+-----------------+-----------------+-----------------------------+
| Implementor | Component | Erratum ID | Kconfig |
+================+=================+=================+=============================+
| Allwinner | A64/R18 | UNKNOWN1 | SUN50I_ERRATUM_UNKNOWN1 | | Allwinner | A64/R18 | UNKNOWN1 | SUN50I_ERRATUM_UNKNOWN1 |
| | | | | +----------------+-----------------+-----------------+-----------------------------+
+----------------+-----------------+-----------------+-----------------------------+
| ARM | Cortex-A53 | #826319 | ARM64_ERRATUM_826319 | | ARM | Cortex-A53 | #826319 | ARM64_ERRATUM_826319 |
+----------------+-----------------+-----------------+-----------------------------+
| ARM | Cortex-A53 | #827319 | ARM64_ERRATUM_827319 | | ARM | Cortex-A53 | #827319 | ARM64_ERRATUM_827319 |
+----------------+-----------------+-----------------+-----------------------------+
| ARM | Cortex-A53 | #824069 | ARM64_ERRATUM_824069 | | ARM | Cortex-A53 | #824069 | ARM64_ERRATUM_824069 |
+----------------+-----------------+-----------------+-----------------------------+
| ARM | Cortex-A53 | #819472 | ARM64_ERRATUM_819472 | | ARM | Cortex-A53 | #819472 | ARM64_ERRATUM_819472 |
+----------------+-----------------+-----------------+-----------------------------+
| ARM | Cortex-A53 | #845719 | ARM64_ERRATUM_845719 | | ARM | Cortex-A53 | #845719 | ARM64_ERRATUM_845719 |
+----------------+-----------------+-----------------+-----------------------------+
| ARM | Cortex-A53 | #843419 | ARM64_ERRATUM_843419 | | ARM | Cortex-A53 | #843419 | ARM64_ERRATUM_843419 |
+----------------+-----------------+-----------------+-----------------------------+
| ARM | Cortex-A57 | #832075 | ARM64_ERRATUM_832075 | | ARM | Cortex-A57 | #832075 | ARM64_ERRATUM_832075 |
+----------------+-----------------+-----------------+-----------------------------+
| ARM | Cortex-A57 | #852523 | N/A | | ARM | Cortex-A57 | #852523 | N/A |
+----------------+-----------------+-----------------+-----------------------------+
| ARM | Cortex-A57 | #834220 | ARM64_ERRATUM_834220 | | ARM | Cortex-A57 | #834220 | ARM64_ERRATUM_834220 |
+----------------+-----------------+-----------------+-----------------------------+
| ARM | Cortex-A72 | #853709 | N/A | | ARM | Cortex-A72 | #853709 | N/A |
+----------------+-----------------+-----------------+-----------------------------+
| ARM | Cortex-A73 | #858921 | ARM64_ERRATUM_858921 | | ARM | Cortex-A73 | #858921 | ARM64_ERRATUM_858921 |
+----------------+-----------------+-----------------+-----------------------------+
| ARM | Cortex-A55 | #1024718 | ARM64_ERRATUM_1024718 | | ARM | Cortex-A55 | #1024718 | ARM64_ERRATUM_1024718 |
+----------------+-----------------+-----------------+-----------------------------+
| ARM | Cortex-A76 | #1188873,1418040| ARM64_ERRATUM_1418040 | | ARM | Cortex-A76 | #1188873,1418040| ARM64_ERRATUM_1418040 |
+----------------+-----------------+-----------------+-----------------------------+
| ARM | Cortex-A76 | #1165522 | ARM64_ERRATUM_1165522 | | ARM | Cortex-A76 | #1165522 | ARM64_ERRATUM_1165522 |
+----------------+-----------------+-----------------+-----------------------------+
| ARM | Cortex-A76 | #1286807 | ARM64_ERRATUM_1286807 | | ARM | Cortex-A76 | #1286807 | ARM64_ERRATUM_1286807 |
+----------------+-----------------+-----------------+-----------------------------+
| ARM | Cortex-A76 | #1463225 | ARM64_ERRATUM_1463225 | | ARM | Cortex-A76 | #1463225 | ARM64_ERRATUM_1463225 |
+----------------+-----------------+-----------------+-----------------------------+
| ARM | Neoverse-N1 | #1188873,1418040| ARM64_ERRATUM_1418040 | | ARM | Neoverse-N1 | #1188873,1418040| ARM64_ERRATUM_1418040 |
+----------------+-----------------+-----------------+-----------------------------+
| ARM | MMU-500 | #841119,826419 | N/A | | ARM | MMU-500 | #841119,826419 | N/A |
| | | | | +----------------+-----------------+-----------------+-----------------------------+
+----------------+-----------------+-----------------+-----------------------------+
| Cavium | ThunderX ITS | #22375,24313 | CAVIUM_ERRATUM_22375 | | Cavium | ThunderX ITS | #22375,24313 | CAVIUM_ERRATUM_22375 |
+----------------+-----------------+-----------------+-----------------------------+
| Cavium | ThunderX ITS | #23144 | CAVIUM_ERRATUM_23144 | | Cavium | ThunderX ITS | #23144 | CAVIUM_ERRATUM_23144 |
+----------------+-----------------+-----------------+-----------------------------+
| Cavium | ThunderX GICv3 | #23154 | CAVIUM_ERRATUM_23154 | | Cavium | ThunderX GICv3 | #23154 | CAVIUM_ERRATUM_23154 |
+----------------+-----------------+-----------------+-----------------------------+
| Cavium | ThunderX Core | #27456 | CAVIUM_ERRATUM_27456 | | Cavium | ThunderX Core | #27456 | CAVIUM_ERRATUM_27456 |
+----------------+-----------------+-----------------+-----------------------------+
| Cavium | ThunderX Core | #30115 | CAVIUM_ERRATUM_30115 | | Cavium | ThunderX Core | #30115 | CAVIUM_ERRATUM_30115 |
+----------------+-----------------+-----------------+-----------------------------+
| Cavium | ThunderX SMMUv2 | #27704 | N/A | | Cavium | ThunderX SMMUv2 | #27704 | N/A |
+----------------+-----------------+-----------------+-----------------------------+
| Cavium | ThunderX2 SMMUv3| #74 | N/A | | Cavium | ThunderX2 SMMUv3| #74 | N/A |
+----------------+-----------------+-----------------+-----------------------------+
| Cavium | ThunderX2 SMMUv3| #126 | N/A | | Cavium | ThunderX2 SMMUv3| #126 | N/A |
| | | | | +----------------+-----------------+-----------------+-----------------------------+
+----------------+-----------------+-----------------+-----------------------------+
| Freescale/NXP | LS2080A/LS1043A | A-008585 | FSL_ERRATUM_A008585 | | Freescale/NXP | LS2080A/LS1043A | A-008585 | FSL_ERRATUM_A008585 |
| | | | | +----------------+-----------------+-----------------+-----------------------------+
+----------------+-----------------+-----------------+-----------------------------+
| Hisilicon | Hip0{5,6,7} | #161010101 | HISILICON_ERRATUM_161010101 | | Hisilicon | Hip0{5,6,7} | #161010101 | HISILICON_ERRATUM_161010101 |
+----------------+-----------------+-----------------+-----------------------------+
| Hisilicon | Hip0{6,7} | #161010701 | N/A | | Hisilicon | Hip0{6,7} | #161010701 | N/A |
+----------------+-----------------+-----------------+-----------------------------+
| Hisilicon | Hip07 | #161600802 | HISILICON_ERRATUM_161600802 | | Hisilicon | Hip07 | #161600802 | HISILICON_ERRATUM_161600802 |
+----------------+-----------------+-----------------+-----------------------------+
| Hisilicon | Hip08 SMMU PMCG | #162001800 | N/A | | Hisilicon | Hip08 SMMU PMCG | #162001800 | N/A |
| | | | | +----------------+-----------------+-----------------+-----------------------------+
+----------------+-----------------+-----------------+-----------------------------+
| Qualcomm Tech. | Kryo/Falkor v1 | E1003 | QCOM_FALKOR_ERRATUM_1003 | | Qualcomm Tech. | Kryo/Falkor v1 | E1003 | QCOM_FALKOR_ERRATUM_1003 |
+----------------+-----------------+-----------------+-----------------------------+
| Qualcomm Tech. | Falkor v1 | E1009 | QCOM_FALKOR_ERRATUM_1009 | | Qualcomm Tech. | Falkor v1 | E1009 | QCOM_FALKOR_ERRATUM_1009 |
+----------------+-----------------+-----------------+-----------------------------+
| Qualcomm Tech. | QDF2400 ITS | E0065 | QCOM_QDF2400_ERRATUM_0065 | | Qualcomm Tech. | QDF2400 ITS | E0065 | QCOM_QDF2400_ERRATUM_0065 |
+----------------+-----------------+-----------------+-----------------------------+
| Qualcomm Tech. | Falkor v{1,2} | E1041 | QCOM_FALKOR_ERRATUM_1041 | | Qualcomm Tech. | Falkor v{1,2} | E1041 | QCOM_FALKOR_ERRATUM_1041 |
+----------------+-----------------+-----------------+-----------------------------+
+----------------+-----------------+-----------------+-----------------------------+
| Fujitsu | A64FX | E#010001 | FUJITSU_ERRATUM_010001 | | Fujitsu | A64FX | E#010001 | FUJITSU_ERRATUM_010001 |
+----------------+-----------------+-----------------+-----------------------------+
Scalable Vector Extension support for AArch64 Linux ===================================================
=================================================== Scalable Vector Extension support for AArch64 Linux
===================================================
Author: Dave Martin <Dave.Martin@arm.com> Author: Dave Martin <Dave.Martin@arm.com>
Date: 4 August 2017 Date: 4 August 2017
This document outlines briefly the interface provided to userspace by Linux in This document outlines briefly the interface provided to userspace by Linux in
...@@ -442,7 +444,7 @@ In A64 state, SVE adds the following: ...@@ -442,7 +444,7 @@ In A64 state, SVE adds the following:
* FPSR and FPCR are retained from ARMv8-A, and interact with SVE floating-point * FPSR and FPCR are retained from ARMv8-A, and interact with SVE floating-point
operations in a similar way to the way in which they interact with ARMv8 operations in a similar way to the way in which they interact with ARMv8
floating-point operations. floating-point operations::
8VL-1 128 0 bit index 8VL-1 128 0 bit index
+---- //// -----------------+ +---- //// -----------------+
...@@ -499,6 +501,8 @@ ARMv8-A defines the following floating-point / SIMD register state: ...@@ -499,6 +501,8 @@ ARMv8-A defines the following floating-point / SIMD register state:
* 32 128-bit vector registers V0..V31 * 32 128-bit vector registers V0..V31
* 2 32-bit status/control registers FPSR, FPCR * 2 32-bit status/control registers FPSR, FPCR
::
127 0 bit index 127 0 bit index
+---------------+ +---------------+
V0 | | V0 | |
...@@ -533,7 +537,7 @@ References ...@@ -533,7 +537,7 @@ References
[2] arch/arm64/include/uapi/asm/ptrace.h [2] arch/arm64/include/uapi/asm/ptrace.h
AArch64 Linux ptrace ABI definitions AArch64 Linux ptrace ABI definitions
[3] Documentation/arm64/cpu-feature-registers.txt [3] Documentation/arm64/cpu-feature-registers.rst
[4] ARM IHI0055C [4] ARM IHI0055C
http://infocenter.arm.com/help/topic/com.arm.doc.ihi0055c/IHI0055C_beta_aapcs64.pdf http://infocenter.arm.com/help/topic/com.arm.doc.ihi0055c/IHI0055C_beta_aapcs64.pdf
......
Tagged virtual addresses in AArch64 Linux =========================================
========================================= Tagged virtual addresses in AArch64 Linux
=========================================
Author: Will Deacon <will.deacon@arm.com> Author: Will Deacon <will.deacon@arm.com>
Date : 12 June 2013 Date : 12 June 2013
This document briefly describes the provision of tagged virtual This document briefly describes the provision of tagged virtual
......
...@@ -151,6 +151,7 @@ for the type. The maximum value of ``BTF_INT_BITS()`` is 128. ...@@ -151,6 +151,7 @@ for the type. The maximum value of ``BTF_INT_BITS()`` is 128.
The ``BTF_INT_OFFSET()`` specifies the starting bit offset to calculate values The ``BTF_INT_OFFSET()`` specifies the starting bit offset to calculate values
for this int. For example, a bitfield struct member has: for this int. For example, a bitfield struct member has:
* btf member bit offset 100 from the start of the structure, * btf member bit offset 100 from the start of the structure,
* btf member pointing to an int type, * btf member pointing to an int type,
* the int type has ``BTF_INT_OFFSET() = 2`` and ``BTF_INT_BITS() = 4`` * the int type has ``BTF_INT_OFFSET() = 2`` and ``BTF_INT_BITS() = 4``
...@@ -160,6 +161,7 @@ from bits ``100 + 2 = 102``. ...@@ -160,6 +161,7 @@ from bits ``100 + 2 = 102``.
Alternatively, the bitfield struct member can be the following to access the Alternatively, the bitfield struct member can be the following to access the
same bits as the above: same bits as the above:
* btf member bit offset 102, * btf member bit offset 102,
* btf member pointing to an int type, * btf member pointing to an int type,
* the int type has ``BTF_INT_OFFSET() = 0`` and ``BTF_INT_BITS() = 4`` * the int type has ``BTF_INT_OFFSET() = 0`` and ``BTF_INT_BITS() = 4``
......
LATEXFILE = cdrom-standard
all:
make clean
latex $(LATEXFILE)
latex $(LATEXFILE)
@if [ -x `which gv` ]; then \
`dvips -q -t letter -o $(LATEXFILE).ps $(LATEXFILE).dvi` ;\
`gv -antialias -media letter -nocenter $(LATEXFILE).ps` ;\
else \
`xdvi $(LATEXFILE).dvi &` ;\
fi
make sortofclean
clean:
rm -f $(LATEXFILE).ps $(LATEXFILE).dvi $(LATEXFILE).aux $(LATEXFILE).log
sortofclean:
rm -f $(LATEXFILE).aux $(LATEXFILE).log
This diff is collapsed.
This diff is collapsed.
:orphan:
=====
cdrom
=====
.. toctree::
:maxdepth: 1
cdrom-standard
ide-cd
packet-writing
.. only:: subproject and html
Indices
=======
* :ref:`genindex`
==============
Packet writing
==============
Getting started quick Getting started quick
--------------------- ---------------------
...@@ -10,13 +14,16 @@ Getting started quick ...@@ -10,13 +14,16 @@ Getting started quick
Download from http://sourceforge.net/projects/linux-udf/ Download from http://sourceforge.net/projects/linux-udf/
- Grab a new CD-RW disc and format it (assuming CD-RW is hdc, substitute - Grab a new CD-RW disc and format it (assuming CD-RW is hdc, substitute
as appropriate): as appropriate)::
# cdrwtool -d /dev/hdc -q # cdrwtool -d /dev/hdc -q
- Setup your writer - Setup your writer::
# pktsetup dev_name /dev/hdc # pktsetup dev_name /dev/hdc
- Now you can mount /dev/pktcdvd/dev_name and copy files to it. Enjoy! - Now you can mount /dev/pktcdvd/dev_name and copy files to it. Enjoy::
# mount /dev/pktcdvd/dev_name /cdrom -t udf -o rw,noatime # mount /dev/pktcdvd/dev_name /cdrom -t udf -o rw,noatime
...@@ -25,11 +32,11 @@ Packet writing for DVD-RW media ...@@ -25,11 +32,11 @@ Packet writing for DVD-RW media
DVD-RW discs can be written to much like CD-RW discs if they are in DVD-RW discs can be written to much like CD-RW discs if they are in
the so called "restricted overwrite" mode. To put a disc in restricted the so called "restricted overwrite" mode. To put a disc in restricted
overwrite mode, run: overwrite mode, run::
# dvd+rw-format /dev/hdc # dvd+rw-format /dev/hdc
You can then use the disc the same way you would use a CD-RW disc: You can then use the disc the same way you would use a CD-RW disc::
# pktsetup dev_name /dev/hdc # pktsetup dev_name /dev/hdc
# mount /dev/pktcdvd/dev_name /cdrom -t udf -o rw,noatime # mount /dev/pktcdvd/dev_name /cdrom -t udf -o rw,noatime
...@@ -41,7 +48,7 @@ Packet writing for DVD+RW media ...@@ -41,7 +48,7 @@ Packet writing for DVD+RW media
According to the DVD+RW specification, a drive supporting DVD+RW discs According to the DVD+RW specification, a drive supporting DVD+RW discs
shall implement "true random writes with 2KB granularity", which means shall implement "true random writes with 2KB granularity", which means
that it should be possible to put any filesystem with a block size >= that it should be possible to put any filesystem with a block size >=
2KB on such a disc. For example, it should be possible to do: 2KB on such a disc. For example, it should be possible to do::
# dvd+rw-format /dev/hdc (only needed if the disc has never # dvd+rw-format /dev/hdc (only needed if the disc has never
been formatted) been formatted)
...@@ -54,7 +61,7 @@ follow the specification, but suffer bad performance problems if the ...@@ -54,7 +61,7 @@ follow the specification, but suffer bad performance problems if the
writes are not 32KB aligned. writes are not 32KB aligned.
Both problems can be solved by using the pktcdvd driver, which always Both problems can be solved by using the pktcdvd driver, which always
generates aligned writes. generates aligned writes::
# dvd+rw-format /dev/hdc # dvd+rw-format /dev/hdc
# pktsetup dev_name /dev/hdc # pktsetup dev_name /dev/hdc
...@@ -83,7 +90,7 @@ Notes ...@@ -83,7 +90,7 @@ Notes
- Since the pktcdvd driver makes the disc appear as a regular block - Since the pktcdvd driver makes the disc appear as a regular block
device with a 2KB block size, you can put any filesystem you like on device with a 2KB block size, you can put any filesystem you like on
the disc. For example, run: the disc. For example, run::
# /sbin/mke2fs /dev/pktcdvd/dev_name # /sbin/mke2fs /dev/pktcdvd/dev_name
...@@ -97,7 +104,7 @@ Since Linux 2.6.20, the pktcdvd module has a sysfs interface ...@@ -97,7 +104,7 @@ Since Linux 2.6.20, the pktcdvd module has a sysfs interface
and can be controlled by it. For example the "pktcdvd" tool uses and can be controlled by it. For example the "pktcdvd" tool uses
this interface. (see http://tom.ist-im-web.de/download/pktcdvd ) this interface. (see http://tom.ist-im-web.de/download/pktcdvd )
"pktcdvd" works similar to "pktsetup", e.g.: "pktcdvd" works similar to "pktsetup", e.g.::
# pktcdvd -a dev_name /dev/hdc # pktcdvd -a dev_name /dev/hdc
# mkudffs /dev/pktcdvd/dev_name # mkudffs /dev/pktcdvd/dev_name
...@@ -115,7 +122,7 @@ For a description of the sysfs interface look into the file: ...@@ -115,7 +122,7 @@ For a description of the sysfs interface look into the file:
Using the pktcdvd debugfs interface Using the pktcdvd debugfs interface
----------------------------------- -----------------------------------
To read pktcdvd device infos in human readable form, do: To read pktcdvd device infos in human readable form, do::
# cat /sys/kernel/debug/pktcdvd/pktcdvd[0-7]/info # cat /sys/kernel/debug/pktcdvd/pktcdvd[0-7]/info
......
...@@ -34,7 +34,8 @@ needs_sphinx = '1.3' ...@@ -34,7 +34,8 @@ needs_sphinx = '1.3'
# Add any Sphinx extension module names here, as strings. They can be # Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones. # ones.
extensions = ['kerneldoc', 'rstFlatTable', 'kernel_include', 'cdomain', 'kfigure', 'sphinx.ext.ifconfig'] extensions = ['kerneldoc', 'rstFlatTable', 'kernel_include', 'cdomain',
'kfigure', 'sphinx.ext.ifconfig', 'automarkup']
# The name of the math extension changed on Sphinx 1.4 # The name of the math extension changed on Sphinx 1.4
if (major == 1 and minor > 3) or (major > 1): if (major == 1 and minor > 3) or (major > 1):
...@@ -200,7 +201,7 @@ html_context = { ...@@ -200,7 +201,7 @@ html_context = {
# If true, SmartyPants will be used to convert quotes and dashes to # If true, SmartyPants will be used to convert quotes and dashes to
# typographically correct entities. # typographically correct entities.
#html_use_smartypants = True html_use_smartypants = False
# Custom sidebar templates, maps document names to template names. # Custom sidebar templates, maps document names to template names.
#html_sidebars = {} #html_sidebars = {}
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment