mirror of https://gitee.com/openkylin/linux.git
Linux 4.12-rc1
-----BEGIN PGP SIGNATURE----- iQEcBAABAgAGBQJZF2pwAAoJEHm+PkMAQRiG9aAIAJJyV6Ux9kaX+glqO3KIs0wm 0K/yqMOv1JTfJ1UUgY4iZbk5XOPPmXv1bdKJFECZfuAHdymJUF/RVNNvDlZbaLdd K8vDEi92eRwcf07a5b/Q2F8yNfADKKmRAA/oAbuQLBhJ0dPHig70PIvi9gq9kqiE Ft1MinbsZLavYatLm7oVDr/nsYebEDMGwTy0EX5bF2YjydfAlCvVWnI5ld5wisiV 0fQF4W7MMjjcpAzG8uq3atEB8iQcWS2Ykz2chZRbYzHcdV2WJW751Vge9xc05Hzi rxlqn6peZFiFyM0qdPLhY0ktGzSTZcCFeb3aZicvm5aOamy2KJjOSZrEwjU8kts= =VHpx -----END PGP SIGNATURE----- Merge tag 'v4.12-rc1' into fixes We've received a few fixes branches with -rc1 as base, but our contents was still at pre-rc1. Merge it in expliticly to make 'git merge --log' clear on hat was actually merged. Signed-off-by: Olof Johansson <olof@lixom.net>
This commit is contained in:
commit
5252d73756
|
@ -33,6 +33,7 @@
|
|||
*.lzo
|
||||
*.patch
|
||||
*.gcno
|
||||
*.ll
|
||||
modules.builtin
|
||||
Module.symvers
|
||||
*.dwo
|
||||
|
|
2
.mailmap
2
.mailmap
|
@ -146,6 +146,8 @@ Santosh Shilimkar <ssantosh@kernel.org>
|
|||
Santosh Shilimkar <santosh.shilimkar@oracle.org>
|
||||
Sascha Hauer <s.hauer@pengutronix.de>
|
||||
S.Çağlar Onur <caglar@pardus.org.tr>
|
||||
Sebastian Reichel <sre@kernel.org> <sre@debian.org>
|
||||
Sebastian Reichel <sre@kernel.org> <sebastian.reichel@collabora.co.uk>
|
||||
Shiraz Hashim <shiraz.linux.kernel@gmail.com> <shiraz.hashim@st.com>
|
||||
Shuah Khan <shuah@kernel.org> <shuahkhan@gmail.com>
|
||||
Shuah Khan <shuah@kernel.org> <shuah.khan@hp.com>
|
||||
|
|
|
@ -17,7 +17,7 @@ rcu_dereference.txt
|
|||
rcubarrier.txt
|
||||
- RCU and Unloadable Modules
|
||||
rculist_nulls.txt
|
||||
- RCU list primitives for use with SLAB_DESTROY_BY_RCU
|
||||
- RCU list primitives for use with SLAB_TYPESAFE_BY_RCU
|
||||
rcuref.txt
|
||||
- Reference-count design for elements of lists/arrays protected by RCU
|
||||
rcu.txt
|
||||
|
|
|
@ -19,6 +19,8 @@ to each other.
|
|||
The <tt>rcu_state</tt> Structure</a>
|
||||
<li> <a href="#The rcu_node Structure">
|
||||
The <tt>rcu_node</tt> Structure</a>
|
||||
<li> <a href="#The rcu_segcblist Structure">
|
||||
The <tt>rcu_segcblist</tt> Structure</a>
|
||||
<li> <a href="#The rcu_data Structure">
|
||||
The <tt>rcu_data</tt> Structure</a>
|
||||
<li> <a href="#The rcu_dynticks Structure">
|
||||
|
@ -841,6 +843,134 @@ for lockdep lock-class names.
|
|||
Finally, lines 64-66 produce an error if the maximum number of
|
||||
CPUs is too large for the specified fanout.
|
||||
|
||||
<h3><a name="The rcu_segcblist Structure">
|
||||
The <tt>rcu_segcblist</tt> Structure</a></h3>
|
||||
|
||||
The <tt>rcu_segcblist</tt> structure maintains a segmented list of
|
||||
callbacks as follows:
|
||||
|
||||
<pre>
|
||||
1 #define RCU_DONE_TAIL 0
|
||||
2 #define RCU_WAIT_TAIL 1
|
||||
3 #define RCU_NEXT_READY_TAIL 2
|
||||
4 #define RCU_NEXT_TAIL 3
|
||||
5 #define RCU_CBLIST_NSEGS 4
|
||||
6
|
||||
7 struct rcu_segcblist {
|
||||
8 struct rcu_head *head;
|
||||
9 struct rcu_head **tails[RCU_CBLIST_NSEGS];
|
||||
10 unsigned long gp_seq[RCU_CBLIST_NSEGS];
|
||||
11 long len;
|
||||
12 long len_lazy;
|
||||
13 };
|
||||
</pre>
|
||||
|
||||
<p>
|
||||
The segments are as follows:
|
||||
|
||||
<ol>
|
||||
<li> <tt>RCU_DONE_TAIL</tt>: Callbacks whose grace periods have elapsed.
|
||||
These callbacks are ready to be invoked.
|
||||
<li> <tt>RCU_WAIT_TAIL</tt>: Callbacks that are waiting for the
|
||||
current grace period.
|
||||
Note that different CPUs can have different ideas about which
|
||||
grace period is current, hence the <tt>->gp_seq</tt> field.
|
||||
<li> <tt>RCU_NEXT_READY_TAIL</tt>: Callbacks waiting for the next
|
||||
grace period to start.
|
||||
<li> <tt>RCU_NEXT_TAIL</tt>: Callbacks that have not yet been
|
||||
associated with a grace period.
|
||||
</ol>
|
||||
|
||||
<p>
|
||||
The <tt>->head</tt> pointer references the first callback or
|
||||
is <tt>NULL</tt> if the list contains no callbacks (which is
|
||||
<i>not</i> the same as being empty).
|
||||
Each element of the <tt>->tails[]</tt> array references the
|
||||
<tt>->next</tt> pointer of the last callback in the corresponding
|
||||
segment of the list, or the list's <tt>->head</tt> pointer if
|
||||
that segment and all previous segments are empty.
|
||||
If the corresponding segment is empty but some previous segment is
|
||||
not empty, then the array element is identical to its predecessor.
|
||||
Older callbacks are closer to the head of the list, and new callbacks
|
||||
are added at the tail.
|
||||
This relationship between the <tt>->head</tt> pointer, the
|
||||
<tt>->tails[]</tt> array, and the callbacks is shown in this
|
||||
diagram:
|
||||
|
||||
</p><p><img src="nxtlist.svg" alt="nxtlist.svg" width="40%">
|
||||
|
||||
</p><p>In this figure, the <tt>->head</tt> pointer references the
|
||||
first
|
||||
RCU callback in the list.
|
||||
The <tt>->tails[RCU_DONE_TAIL]</tt> array element references
|
||||
the <tt>->head</tt> pointer itself, indicating that none
|
||||
of the callbacks is ready to invoke.
|
||||
The <tt>->tails[RCU_WAIT_TAIL]</tt> array element references callback
|
||||
CB 2's <tt>->next</tt> pointer, which indicates that
|
||||
CB 1 and CB 2 are both waiting on the current grace period,
|
||||
give or take possible disagreements about exactly which grace period
|
||||
is the current one.
|
||||
The <tt>->tails[RCU_NEXT_READY_TAIL]</tt> array element
|
||||
references the same RCU callback that <tt>->tails[RCU_WAIT_TAIL]</tt>
|
||||
does, which indicates that there are no callbacks waiting on the next
|
||||
RCU grace period.
|
||||
The <tt>->tails[RCU_NEXT_TAIL]</tt> array element references
|
||||
CB 4's <tt>->next</tt> pointer, indicating that all the
|
||||
remaining RCU callbacks have not yet been assigned to an RCU grace
|
||||
period.
|
||||
Note that the <tt>->tails[RCU_NEXT_TAIL]</tt> array element
|
||||
always references the last RCU callback's <tt>->next</tt> pointer
|
||||
unless the callback list is empty, in which case it references
|
||||
the <tt>->head</tt> pointer.
|
||||
|
||||
<p>
|
||||
There is one additional important special case for the
|
||||
<tt>->tails[RCU_NEXT_TAIL]</tt> array element: It can be <tt>NULL</tt>
|
||||
when this list is <i>disabled</i>.
|
||||
Lists are disabled when the corresponding CPU is offline or when
|
||||
the corresponding CPU's callbacks are offloaded to a kthread,
|
||||
both of which are described elsewhere.
|
||||
|
||||
</p><p>CPUs advance their callbacks from the
|
||||
<tt>RCU_NEXT_TAIL</tt> to the <tt>RCU_NEXT_READY_TAIL</tt> to the
|
||||
<tt>RCU_WAIT_TAIL</tt> to the <tt>RCU_DONE_TAIL</tt> list segments
|
||||
as grace periods advance.
|
||||
|
||||
</p><p>The <tt>->gp_seq[]</tt> array records grace-period
|
||||
numbers corresponding to the list segments.
|
||||
This is what allows different CPUs to have different ideas as to
|
||||
which is the current grace period while still avoiding premature
|
||||
invocation of their callbacks.
|
||||
In particular, this allows CPUs that go idle for extended periods
|
||||
to determine which of their callbacks are ready to be invoked after
|
||||
reawakening.
|
||||
|
||||
</p><p>The <tt>->len</tt> counter contains the number of
|
||||
callbacks in <tt>->head</tt>, and the
|
||||
<tt>->len_lazy</tt> contains the number of those callbacks that
|
||||
are known to only free memory, and whose invocation can therefore
|
||||
be safely deferred.
|
||||
|
||||
<p><b>Important note</b>: It is the <tt>->len</tt> field that
|
||||
determines whether or not there are callbacks associated with
|
||||
this <tt>rcu_segcblist</tt> structure, <i>not</i> the <tt>->head</tt>
|
||||
pointer.
|
||||
The reason for this is that all the ready-to-invoke callbacks
|
||||
(that is, those in the <tt>RCU_DONE_TAIL</tt> segment) are extracted
|
||||
all at once at callback-invocation time.
|
||||
If callback invocation must be postponed, for example, because a
|
||||
high-priority process just woke up on this CPU, then the remaining
|
||||
callbacks are placed back on the <tt>RCU_DONE_TAIL</tt> segment.
|
||||
Either way, the <tt>->len</tt> and <tt>->len_lazy</tt> counts
|
||||
are adjusted after the corresponding callbacks have been invoked, and so
|
||||
again it is the <tt>->len</tt> count that accurately reflects whether
|
||||
or not there are callbacks associated with this <tt>rcu_segcblist</tt>
|
||||
structure.
|
||||
Of course, off-CPU sampling of the <tt>->len</tt> count requires
|
||||
the use of appropriate synchronization, for example, memory barriers.
|
||||
This synchronization can be a bit subtle, particularly in the case
|
||||
of <tt>rcu_barrier()</tt>.
|
||||
|
||||
<h3><a name="The rcu_data Structure">
|
||||
The <tt>rcu_data</tt> Structure</a></h3>
|
||||
|
||||
|
@ -983,62 +1113,18 @@ choice.
|
|||
as follows:
|
||||
|
||||
<pre>
|
||||
1 struct rcu_head *nxtlist;
|
||||
2 struct rcu_head **nxttail[RCU_NEXT_SIZE];
|
||||
3 unsigned long nxtcompleted[RCU_NEXT_SIZE];
|
||||
4 long qlen_lazy;
|
||||
5 long qlen;
|
||||
6 long qlen_last_fqs_check;
|
||||
1 struct rcu_segcblist cblist;
|
||||
2 long qlen_last_fqs_check;
|
||||
3 unsigned long n_cbs_invoked;
|
||||
4 unsigned long n_nocbs_invoked;
|
||||
5 unsigned long n_cbs_orphaned;
|
||||
6 unsigned long n_cbs_adopted;
|
||||
7 unsigned long n_force_qs_snap;
|
||||
8 unsigned long n_cbs_invoked;
|
||||
9 unsigned long n_cbs_orphaned;
|
||||
10 unsigned long n_cbs_adopted;
|
||||
11 long blimit;
|
||||
8 long blimit;
|
||||
</pre>
|
||||
|
||||
<p>The <tt>->nxtlist</tt> pointer and the
|
||||
<tt>->nxttail[]</tt> array form a four-segment list with
|
||||
older callbacks near the head and newer ones near the tail.
|
||||
Each segment contains callbacks with the corresponding relationship
|
||||
to the current grace period.
|
||||
The pointer out of the end of each of the four segments is referenced
|
||||
by the element of the <tt>->nxttail[]</tt> array indexed by
|
||||
<tt>RCU_DONE_TAIL</tt> (for callbacks handled by a prior grace period),
|
||||
<tt>RCU_WAIT_TAIL</tt> (for callbacks waiting on the current grace period),
|
||||
<tt>RCU_NEXT_READY_TAIL</tt> (for callbacks that will wait on the next
|
||||
grace period), and
|
||||
<tt>RCU_NEXT_TAIL</tt> (for callbacks that are not yet associated
|
||||
with a specific grace period)
|
||||
respectively, as shown in the following figure.
|
||||
|
||||
</p><p><img src="nxtlist.svg" alt="nxtlist.svg" width="40%">
|
||||
|
||||
</p><p>In this figure, the <tt>->nxtlist</tt> pointer references the
|
||||
first
|
||||
RCU callback in the list.
|
||||
The <tt>->nxttail[RCU_DONE_TAIL]</tt> array element references
|
||||
the <tt>->nxtlist</tt> pointer itself, indicating that none
|
||||
of the callbacks is ready to invoke.
|
||||
The <tt>->nxttail[RCU_WAIT_TAIL]</tt> array element references callback
|
||||
CB 2's <tt>->next</tt> pointer, which indicates that
|
||||
CB 1 and CB 2 are both waiting on the current grace period.
|
||||
The <tt>->nxttail[RCU_NEXT_READY_TAIL]</tt> array element
|
||||
references the same RCU callback that <tt>->nxttail[RCU_WAIT_TAIL]</tt>
|
||||
does, which indicates that there are no callbacks waiting on the next
|
||||
RCU grace period.
|
||||
The <tt>->nxttail[RCU_NEXT_TAIL]</tt> array element references
|
||||
CB 4's <tt>->next</tt> pointer, indicating that all the
|
||||
remaining RCU callbacks have not yet been assigned to an RCU grace
|
||||
period.
|
||||
Note that the <tt>->nxttail[RCU_NEXT_TAIL]</tt> array element
|
||||
always references the last RCU callback's <tt>->next</tt> pointer
|
||||
unless the callback list is empty, in which case it references
|
||||
the <tt>->nxtlist</tt> pointer.
|
||||
|
||||
</p><p>CPUs advance their callbacks from the
|
||||
<tt>RCU_NEXT_TAIL</tt> to the <tt>RCU_NEXT_READY_TAIL</tt> to the
|
||||
<tt>RCU_WAIT_TAIL</tt> to the <tt>RCU_DONE_TAIL</tt> list segments
|
||||
as grace periods advance.
|
||||
<p>The <tt>->cblist</tt> structure is the segmented callback list
|
||||
described earlier.
|
||||
The CPU advances the callbacks in its <tt>rcu_data</tt> structure
|
||||
whenever it notices that another RCU grace period has completed.
|
||||
The CPU detects the completion of an RCU grace period by noticing
|
||||
|
@ -1049,16 +1135,7 @@ Recall that each <tt>rcu_node</tt> structure's
|
|||
<tt>->completed</tt> field is updated at the end of each
|
||||
grace period.
|
||||
|
||||
</p><p>The <tt>->nxtcompleted[]</tt> array records grace-period
|
||||
numbers corresponding to the list segments.
|
||||
This allows CPUs that go idle for extended periods to determine
|
||||
which of their callbacks are ready to be invoked after reawakening.
|
||||
|
||||
</p><p>The <tt>->qlen</tt> counter contains the number of
|
||||
callbacks in <tt>->nxtlist</tt>, and the
|
||||
<tt>->qlen_lazy</tt> contains the number of those callbacks that
|
||||
are known to only free memory, and whose invocation can therefore
|
||||
be safely deferred.
|
||||
<p>
|
||||
The <tt>->qlen_last_fqs_check</tt> and
|
||||
<tt>->n_force_qs_snap</tt> coordinate the forcing of quiescent
|
||||
states from <tt>call_rcu()</tt> and friends when callback
|
||||
|
@ -1069,6 +1146,10 @@ lists grow excessively long.
|
|||
fields count the number of callbacks invoked,
|
||||
sent to other CPUs when this CPU goes offline,
|
||||
and received from other CPUs when those other CPUs go offline.
|
||||
The <tt>->n_nocbs_invoked</tt> is used when the CPU's callbacks
|
||||
are offloaded to a kthread.
|
||||
|
||||
<p>
|
||||
Finally, the <tt>->blimit</tt> counter is the maximum number of
|
||||
RCU callbacks that may be invoked at a given time.
|
||||
|
||||
|
@ -1104,6 +1185,9 @@ Its fields are as follows:
|
|||
1 int dynticks_nesting;
|
||||
2 int dynticks_nmi_nesting;
|
||||
3 atomic_t dynticks;
|
||||
4 bool rcu_need_heavy_qs;
|
||||
5 unsigned long rcu_qs_ctr;
|
||||
6 bool rcu_urgent_qs;
|
||||
</pre>
|
||||
|
||||
<p>The <tt>->dynticks_nesting</tt> field counts the
|
||||
|
@ -1117,11 +1201,32 @@ NMIs are counted by the <tt>->dynticks_nmi_nesting</tt>
|
|||
field, except that NMIs that interrupt non-dyntick-idle execution
|
||||
are not counted.
|
||||
|
||||
</p><p>Finally, the <tt>->dynticks</tt> field counts the corresponding
|
||||
</p><p>The <tt>->dynticks</tt> field counts the corresponding
|
||||
CPU's transitions to and from dyntick-idle mode, so that this counter
|
||||
has an even value when the CPU is in dyntick-idle mode and an odd
|
||||
value otherwise.
|
||||
|
||||
</p><p>The <tt>->rcu_need_heavy_qs</tt> field is used
|
||||
to record the fact that the RCU core code would really like to
|
||||
see a quiescent state from the corresponding CPU, so much so that
|
||||
it is willing to call for heavy-weight dyntick-counter operations.
|
||||
This flag is checked by RCU's context-switch and <tt>cond_resched()</tt>
|
||||
code, which provide a momentary idle sojourn in response.
|
||||
|
||||
</p><p>The <tt>->rcu_qs_ctr</tt> field is used to record
|
||||
quiescent states from <tt>cond_resched()</tt>.
|
||||
Because <tt>cond_resched()</tt> can execute quite frequently, this
|
||||
must be quite lightweight, as in a non-atomic increment of this
|
||||
per-CPU field.
|
||||
|
||||
</p><p>Finally, the <tt>->rcu_urgent_qs</tt> field is used to record
|
||||
the fact that the RCU core code would really like to see a quiescent
|
||||
state from the corresponding CPU, with the various other fields indicating
|
||||
just how badly RCU wants this quiescent state.
|
||||
This flag is checked by RCU's context-switch and <tt>cond_resched()</tt>
|
||||
code, which, if nothing else, non-atomically increment <tt>->rcu_qs_ctr</tt>
|
||||
in response.
|
||||
|
||||
<table>
|
||||
<tr><th> </th></tr>
|
||||
<tr><th align="left">Quick Quiz:</th></tr>
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
id="svg2"
|
||||
version="1.1"
|
||||
inkscape:version="0.48.4 r9939"
|
||||
sodipodi:docname="nxtlist.fig">
|
||||
sodipodi:docname="segcblist.svg">
|
||||
<metadata
|
||||
id="metadata94">
|
||||
<rdf:RDF>
|
||||
|
@ -28,7 +28,7 @@
|
|||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
<dc:title />
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
|
@ -241,61 +241,51 @@
|
|||
xml:space="preserve"
|
||||
x="225"
|
||||
y="675"
|
||||
fill="#000000"
|
||||
font-family="Courier"
|
||||
font-style="normal"
|
||||
font-weight="bold"
|
||||
font-size="324"
|
||||
text-anchor="start"
|
||||
id="text64">nxtlist</text>
|
||||
id="text64"
|
||||
style="font-size:324px;font-style:normal;font-weight:bold;text-anchor:start;fill:#000000;font-family:Courier">->head</text>
|
||||
<!-- Text -->
|
||||
<text
|
||||
xml:space="preserve"
|
||||
x="225"
|
||||
y="1800"
|
||||
fill="#000000"
|
||||
font-family="Courier"
|
||||
font-style="normal"
|
||||
font-weight="bold"
|
||||
font-size="324"
|
||||
text-anchor="start"
|
||||
id="text66">nxttail[RCU_DONE_TAIL]</text>
|
||||
id="text66"
|
||||
style="font-size:324px;font-style:normal;font-weight:bold;text-anchor:start;fill:#000000;font-family:Courier">->tails[RCU_DONE_TAIL]</text>
|
||||
<!-- Text -->
|
||||
<text
|
||||
xml:space="preserve"
|
||||
x="225"
|
||||
y="2925"
|
||||
fill="#000000"
|
||||
font-family="Courier"
|
||||
font-style="normal"
|
||||
font-weight="bold"
|
||||
font-size="324"
|
||||
text-anchor="start"
|
||||
id="text68">nxttail[RCU_WAIT_TAIL]</text>
|
||||
id="text68"
|
||||
style="font-size:324px;font-style:normal;font-weight:bold;text-anchor:start;fill:#000000;font-family:Courier">->tails[RCU_WAIT_TAIL]</text>
|
||||
<!-- Text -->
|
||||
<text
|
||||
xml:space="preserve"
|
||||
x="225"
|
||||
y="4050"
|
||||
fill="#000000"
|
||||
font-family="Courier"
|
||||
font-style="normal"
|
||||
font-weight="bold"
|
||||
font-size="324"
|
||||
text-anchor="start"
|
||||
id="text70">nxttail[RCU_NEXT_READY_TAIL]</text>
|
||||
id="text70"
|
||||
style="font-size:324px;font-style:normal;font-weight:bold;text-anchor:start;fill:#000000;font-family:Courier">->tails[RCU_NEXT_READY_TAIL]</text>
|
||||
<!-- Text -->
|
||||
<text
|
||||
xml:space="preserve"
|
||||
x="225"
|
||||
y="5175"
|
||||
fill="#000000"
|
||||
font-family="Courier"
|
||||
font-style="normal"
|
||||
font-weight="bold"
|
||||
font-size="324"
|
||||
text-anchor="start"
|
||||
id="text72">nxttail[RCU_NEXT_TAIL]</text>
|
||||
id="text72"
|
||||
style="font-size:324px;font-style:normal;font-weight:bold;text-anchor:start;fill:#000000;font-family:Courier">->tails[RCU_NEXT_TAIL]</text>
|
||||
<!-- Text -->
|
||||
<text
|
||||
xml:space="preserve"
|
||||
|
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
|
@ -284,6 +284,7 @@ Expedited Grace Period Refinements</a></h2>
|
|||
Funnel locking and wait/wakeup</a>.
|
||||
<li> <a href="#Use of Workqueues">Use of Workqueues</a>.
|
||||
<li> <a href="#Stall Warnings">Stall warnings</a>.
|
||||
<li> <a href="#Mid-Boot Operation">Mid-boot operation</a>.
|
||||
</ol>
|
||||
|
||||
<h3><a name="Idle-CPU Checks">Idle-CPU Checks</a></h3>
|
||||
|
@ -524,7 +525,7 @@ their grace periods and carrying out their wakeups.
|
|||
In earlier implementations, the task requesting the expedited
|
||||
grace period also drove it to completion.
|
||||
This straightforward approach had the disadvantage of needing to
|
||||
account for signals sent to user tasks,
|
||||
account for POSIX signals sent to user tasks,
|
||||
so more recent implemementations use the Linux kernel's
|
||||
<a href="https://www.kernel.org/doc/Documentation/workqueue.txt">workqueues</a>.
|
||||
|
||||
|
@ -533,8 +534,8 @@ The requesting task still does counter snapshotting and funnel-lock
|
|||
processing, but the task reaching the top of the funnel lock
|
||||
does a <tt>schedule_work()</tt> (from <tt>_synchronize_rcu_expedited()</tt>
|
||||
so that a workqueue kthread does the actual grace-period processing.
|
||||
Because workqueue kthreads do not accept signals, grace-period-wait
|
||||
processing need not allow for signals.
|
||||
Because workqueue kthreads do not accept POSIX signals, grace-period-wait
|
||||
processing need not allow for POSIX signals.
|
||||
|
||||
In addition, this approach allows wakeups for the previous expedited
|
||||
grace period to be overlapped with processing for the next expedited
|
||||
|
@ -586,6 +587,46 @@ blocking the current grace period are printed.
|
|||
Each stall warning results in another pass through the loop, but the
|
||||
second and subsequent passes use longer stall times.
|
||||
|
||||
<h3><a name="Mid-Boot Operation">Mid-boot operation</a></h3>
|
||||
|
||||
<p>
|
||||
The use of workqueues has the advantage that the expedited
|
||||
grace-period code need not worry about POSIX signals.
|
||||
Unfortunately, it has the
|
||||
corresponding disadvantage that workqueues cannot be used until
|
||||
they are initialized, which does not happen until some time after
|
||||
the scheduler spawns the first task.
|
||||
Given that there are parts of the kernel that really do want to
|
||||
execute grace periods during this mid-boot “dead zone”,
|
||||
expedited grace periods must do something else during thie time.
|
||||
|
||||
<p>
|
||||
What they do is to fall back to the old practice of requiring that the
|
||||
requesting task drive the expedited grace period, as was the case
|
||||
before the use of workqueues.
|
||||
However, the requesting task is only required to drive the grace period
|
||||
during the mid-boot dead zone.
|
||||
Before mid-boot, a synchronous grace period is a no-op.
|
||||
Some time after mid-boot, workqueues are used.
|
||||
|
||||
<p>
|
||||
Non-expedited non-SRCU synchronous grace periods must also operate
|
||||
normally during mid-boot.
|
||||
This is handled by causing non-expedited grace periods to take the
|
||||
expedited code path during mid-boot.
|
||||
|
||||
<p>
|
||||
The current code assumes that there are no POSIX signals during
|
||||
the mid-boot dead zone.
|
||||
However, if an overwhelming need for POSIX signals somehow arises,
|
||||
appropriate adjustments can be made to the expedited stall-warning code.
|
||||
One such adjustment would reinstate the pre-workqueue stall-warning
|
||||
checks, but only during the mid-boot dead zone.
|
||||
|
||||
<p>
|
||||
With this refinement, synchronous grace periods can now be used from
|
||||
task context pretty much any time during the life of the kernel.
|
||||
|
||||
<h3><a name="Summary">
|
||||
Summary</a></h3>
|
||||
|
||||
|
|
|
@ -659,8 +659,9 @@ systems with more than one CPU:
|
|||
In other words, a given instance of <tt>synchronize_rcu()</tt>
|
||||
can avoid waiting on a given RCU read-side critical section only
|
||||
if it can prove that <tt>synchronize_rcu()</tt> started first.
|
||||
</font>
|
||||
|
||||
<p>
|
||||
<p><font color="ffffff">
|
||||
A related question is “When <tt>rcu_read_lock()</tt>
|
||||
doesn't generate any code, why does it matter how it relates
|
||||
to a grace period?”
|
||||
|
@ -675,8 +676,9 @@ systems with more than one CPU:
|
|||
within the critical section, in which case none of the accesses
|
||||
within the critical section may observe the effects of any
|
||||
access following the grace period.
|
||||
</font>
|
||||
|
||||
<p>
|
||||
<p><font color="ffffff">
|
||||
As of late 2016, mathematical models of RCU take this
|
||||
viewpoint, for example, see slides 62 and 63
|
||||
of the
|
||||
|
@ -1616,8 +1618,8 @@ CPUs should at least make reasonable forward progress.
|
|||
In return for its shorter latencies, <tt>synchronize_rcu_expedited()</tt>
|
||||
is permitted to impose modest degradation of real-time latency
|
||||
on non-idle online CPUs.
|
||||
That said, it will likely be necessary to take further steps to reduce this
|
||||
degradation, hopefully to roughly that of a scheduling-clock interrupt.
|
||||
Here, “modest” means roughly the same latency
|
||||
degradation as a scheduling-clock interrupt.
|
||||
|
||||
<p>
|
||||
There are a number of situations where even
|
||||
|
@ -1913,12 +1915,9 @@ This requirement is another factor driving batching of grace periods,
|
|||
but it is also the driving force behind the checks for large numbers
|
||||
of queued RCU callbacks in the <tt>call_rcu()</tt> code path.
|
||||
Finally, high update rates should not delay RCU read-side critical
|
||||
sections, although some read-side delays can occur when using
|
||||
sections, although some small read-side delays can occur when using
|
||||
<tt>synchronize_rcu_expedited()</tt>, courtesy of this function's use
|
||||
of <tt>try_stop_cpus()</tt>.
|
||||
(In the future, <tt>synchronize_rcu_expedited()</tt> will be
|
||||
converted to use lighter-weight inter-processor interrupts (IPIs),
|
||||
but this will still disturb readers, though to a much smaller degree.)
|
||||
of <tt>smp_call_function_single()</tt>.
|
||||
|
||||
<p>
|
||||
Although all three of these corner cases were understood in the early
|
||||
|
@ -2154,7 +2153,8 @@ as will <tt>rcu_assign_pointer()</tt>.
|
|||
<p>
|
||||
Although <tt>call_rcu()</tt> may be invoked at any
|
||||
time during boot, callbacks are not guaranteed to be invoked until after
|
||||
the scheduler is fully up and running.
|
||||
all of RCU's kthreads have been spawned, which occurs at
|
||||
<tt>early_initcall()</tt> time.
|
||||
This delay in callback invocation is due to the fact that RCU does not
|
||||
invoke callbacks until it is fully initialized, and this full initialization
|
||||
cannot occur until after the scheduler has initialized itself to the
|
||||
|
@ -2167,8 +2167,10 @@ on what operations those callbacks could invoke.
|
|||
Perhaps surprisingly, <tt>synchronize_rcu()</tt>,
|
||||
<a href="#Bottom-Half Flavor"><tt>synchronize_rcu_bh()</tt></a>
|
||||
(<a href="#Bottom-Half Flavor">discussed below</a>),
|
||||
and
|
||||
<a href="#Sched Flavor"><tt>synchronize_sched()</tt></a>
|
||||
<a href="#Sched Flavor"><tt>synchronize_sched()</tt></a>,
|
||||
<tt>synchronize_rcu_expedited()</tt>,
|
||||
<tt>synchronize_rcu_bh_expedited()</tt>, and
|
||||
<tt>synchronize_sched_expedited()</tt>
|
||||
will all operate normally
|
||||
during very early boot, the reason being that there is only one CPU
|
||||
and preemption is disabled.
|
||||
|
@ -2178,45 +2180,59 @@ state and thus a grace period, so the early-boot implementation can
|
|||
be a no-op.
|
||||
|
||||
<p>
|
||||
Both <tt>synchronize_rcu_bh()</tt> and <tt>synchronize_sched()</tt>
|
||||
continue to operate normally through the remainder of boot, courtesy
|
||||
of the fact that preemption is disabled across their RCU read-side
|
||||
critical sections and also courtesy of the fact that there is still
|
||||
only one CPU.
|
||||
However, once the scheduler starts initializing, preemption is enabled.
|
||||
There is still only a single CPU, but the fact that preemption is enabled
|
||||
means that the no-op implementation of <tt>synchronize_rcu()</tt> no
|
||||
longer works in <tt>CONFIG_PREEMPT=y</tt> kernels.
|
||||
Therefore, as soon as the scheduler starts initializing, the early-boot
|
||||
fastpath is disabled.
|
||||
This means that <tt>synchronize_rcu()</tt> switches to its runtime
|
||||
mode of operation where it posts callbacks, which in turn means that
|
||||
any call to <tt>synchronize_rcu()</tt> will block until the corresponding
|
||||
callback is invoked.
|
||||
Unfortunately, the callback cannot be invoked until RCU's runtime
|
||||
grace-period machinery is up and running, which cannot happen until
|
||||
the scheduler has initialized itself sufficiently to allow RCU's
|
||||
kthreads to be spawned.
|
||||
Therefore, invoking <tt>synchronize_rcu()</tt> during scheduler
|
||||
initialization can result in deadlock.
|
||||
However, once the scheduler has spawned its first kthread, this early
|
||||
boot trick fails for <tt>synchronize_rcu()</tt> (as well as for
|
||||
<tt>synchronize_rcu_expedited()</tt>) in <tt>CONFIG_PREEMPT=y</tt>
|
||||
kernels.
|
||||
The reason is that an RCU read-side critical section might be preempted,
|
||||
which means that a subsequent <tt>synchronize_rcu()</tt> really does have
|
||||
to wait for something, as opposed to simply returning immediately.
|
||||
Unfortunately, <tt>synchronize_rcu()</tt> can't do this until all of
|
||||
its kthreads are spawned, which doesn't happen until some time during
|
||||
<tt>early_initcalls()</tt> time.
|
||||
But this is no excuse: RCU is nevertheless required to correctly handle
|
||||
synchronous grace periods during this time period.
|
||||
Once all of its kthreads are up and running, RCU starts running
|
||||
normally.
|
||||
|
||||
<table>
|
||||
<tr><th> </th></tr>
|
||||
<tr><th align="left">Quick Quiz:</th></tr>
|
||||
<tr><td>
|
||||
So what happens with <tt>synchronize_rcu()</tt> during
|
||||
scheduler initialization for <tt>CONFIG_PREEMPT=n</tt>
|
||||
kernels?
|
||||
How can RCU possibly handle grace periods before all of its
|
||||
kthreads have been spawned???
|
||||
</td></tr>
|
||||
<tr><th align="left">Answer:</th></tr>
|
||||
<tr><td bgcolor="#ffffff"><font color="ffffff">
|
||||
In <tt>CONFIG_PREEMPT=n</tt> kernel, <tt>synchronize_rcu()</tt>
|
||||
maps directly to <tt>synchronize_sched()</tt>.
|
||||
Therefore, <tt>synchronize_rcu()</tt> works normally throughout
|
||||
boot in <tt>CONFIG_PREEMPT=n</tt> kernels.
|
||||
However, your code must also work in <tt>CONFIG_PREEMPT=y</tt> kernels,
|
||||
so it is still necessary to avoid invoking <tt>synchronize_rcu()</tt>
|
||||
during scheduler initialization.
|
||||
Very carefully!
|
||||
</font>
|
||||
|
||||
<p><font color="ffffff">
|
||||
During the “dead zone” between the time that the
|
||||
scheduler spawns the first task and the time that all of RCU's
|
||||
kthreads have been spawned, all synchronous grace periods are
|
||||
handled by the expedited grace-period mechanism.
|
||||
At runtime, this expedited mechanism relies on workqueues, but
|
||||
during the dead zone the requesting task itself drives the
|
||||
desired expedited grace period.
|
||||
Because dead-zone execution takes place within task context,
|
||||
everything works.
|
||||
Once the dead zone ends, expedited grace periods go back to
|
||||
using workqueues, as is required to avoid problems that would
|
||||
otherwise occur when a user task received a POSIX signal while
|
||||
driving an expedited grace period.
|
||||
</font>
|
||||
|
||||
<p><font color="ffffff">
|
||||
And yes, this does mean that it is unhelpful to send POSIX
|
||||
signals to random tasks between the time that the scheduler
|
||||
spawns its first kthread and the time that RCU's kthreads
|
||||
have all been spawned.
|
||||
If there ever turns out to be a good reason for sending POSIX
|
||||
signals during that time, appropriate adjustments will be made.
|
||||
(If it turns out that POSIX signals are sent during this time for
|
||||
no good reason, other adjustments will be made, appropriate
|
||||
or otherwise.)
|
||||
</font></td></tr>
|
||||
<tr><td> </td></tr>
|
||||
</table>
|
||||
|
@ -2295,12 +2311,61 @@ situation, and Dipankar Sarma incorporated <tt>rcu_barrier()</tt> into RCU.
|
|||
The need for <tt>rcu_barrier()</tt> for module unloading became
|
||||
apparent later.
|
||||
|
||||
<p>
|
||||
<b>Important note</b>: The <tt>rcu_barrier()</tt> function is not,
|
||||
repeat, <i>not</i>, obligated to wait for a grace period.
|
||||
It is instead only required to wait for RCU callbacks that have
|
||||
already been posted.
|
||||
Therefore, if there are no RCU callbacks posted anywhere in the system,
|
||||
<tt>rcu_barrier()</tt> is within its rights to return immediately.
|
||||
Even if there are callbacks posted, <tt>rcu_barrier()</tt> does not
|
||||
necessarily need to wait for a grace period.
|
||||
|
||||
<table>
|
||||
<tr><th> </th></tr>
|
||||
<tr><th align="left">Quick Quiz:</th></tr>
|
||||
<tr><td>
|
||||
Wait a minute!
|
||||
Each RCU callbacks must wait for a grace period to complete,
|
||||
and <tt>rcu_barrier()</tt> must wait for each pre-existing
|
||||
callback to be invoked.
|
||||
Doesn't <tt>rcu_barrier()</tt> therefore need to wait for
|
||||
a full grace period if there is even one callback posted anywhere
|
||||
in the system?
|
||||
</td></tr>
|
||||
<tr><th align="left">Answer:</th></tr>
|
||||
<tr><td bgcolor="#ffffff"><font color="ffffff">
|
||||
Absolutely not!!!
|
||||
</font>
|
||||
|
||||
<p><font color="ffffff">
|
||||
Yes, each RCU callbacks must wait for a grace period to complete,
|
||||
but it might well be partly (or even completely) finished waiting
|
||||
by the time <tt>rcu_barrier()</tt> is invoked.
|
||||
In that case, <tt>rcu_barrier()</tt> need only wait for the
|
||||
remaining portion of the grace period to elapse.
|
||||
So even if there are quite a few callbacks posted,
|
||||
<tt>rcu_barrier()</tt> might well return quite quickly.
|
||||
</font>
|
||||
|
||||
<p><font color="ffffff">
|
||||
So if you need to wait for a grace period as well as for all
|
||||
pre-existing callbacks, you will need to invoke both
|
||||
<tt>synchronize_rcu()</tt> and <tt>rcu_barrier()</tt>.
|
||||
If latency is a concern, you can always use workqueues
|
||||
to invoke them concurrently.
|
||||
</font></td></tr>
|
||||
<tr><td> </td></tr>
|
||||
</table>
|
||||
|
||||
<h3><a name="Hotplug CPU">Hotplug CPU</a></h3>
|
||||
|
||||
<p>
|
||||
The Linux kernel supports CPU hotplug, which means that CPUs
|
||||
can come and go.
|
||||
It is of course illegal to use any RCU API member from an offline CPU.
|
||||
It is of course illegal to use any RCU API member from an offline CPU,
|
||||
with the exception of <a href="#Sleepable RCU">SRCU</a> read-side
|
||||
critical sections.
|
||||
This requirement was present from day one in DYNIX/ptx, but
|
||||
on the other hand, the Linux kernel's CPU-hotplug implementation
|
||||
is “interesting.”
|
||||
|
@ -2310,19 +2375,18 @@ The Linux-kernel CPU-hotplug implementation has notifiers that
|
|||
are used to allow the various kernel subsystems (including RCU)
|
||||
to respond appropriately to a given CPU-hotplug operation.
|
||||
Most RCU operations may be invoked from CPU-hotplug notifiers,
|
||||
including even normal synchronous grace-period operations
|
||||
such as <tt>synchronize_rcu()</tt>.
|
||||
However, expedited grace-period operations such as
|
||||
<tt>synchronize_rcu_expedited()</tt> are not supported,
|
||||
due to the fact that current implementations block CPU-hotplug
|
||||
operations, which could result in deadlock.
|
||||
including even synchronous grace-period operations such as
|
||||
<tt>synchronize_rcu()</tt> and <tt>synchronize_rcu_expedited()</tt>.
|
||||
|
||||
<p>
|
||||
In addition, all-callback-wait operations such as
|
||||
However, all-callback-wait operations such as
|
||||
<tt>rcu_barrier()</tt> are also not supported, due to the
|
||||
fact that there are phases of CPU-hotplug operations where
|
||||
the outgoing CPU's callbacks will not be invoked until after
|
||||
the CPU-hotplug operation ends, which could also result in deadlock.
|
||||
Furthermore, <tt>rcu_barrier()</tt> blocks CPU-hotplug operations
|
||||
during its execution, which results in another type of deadlock
|
||||
when invoked from a CPU-hotplug notifier.
|
||||
|
||||
<h3><a name="Scheduler and RCU">Scheduler and RCU</a></h3>
|
||||
|
||||
|
@ -2863,6 +2927,27 @@ It also motivates the <tt>smp_mb__after_srcu_read_unlock()</tt>
|
|||
API, which, in combination with <tt>srcu_read_unlock()</tt>,
|
||||
guarantees a full memory barrier.
|
||||
|
||||
<p>
|
||||
Also unlike other RCU flavors, SRCU's callbacks-wait function
|
||||
<tt>srcu_barrier()</tt> may be invoked from CPU-hotplug notifiers,
|
||||
though this is not necessarily a good idea.
|
||||
The reason that this is possible is that SRCU is insensitive
|
||||
to whether or not a CPU is online, which means that <tt>srcu_barrier()</tt>
|
||||
need not exclude CPU-hotplug operations.
|
||||
|
||||
<p>
|
||||
As of v4.12, SRCU's callbacks are maintained per-CPU, eliminating
|
||||
a locking bottleneck present in prior kernel versions.
|
||||
Although this will allow users to put much heavier stress on
|
||||
<tt>call_srcu()</tt>, it is important to note that SRCU does not
|
||||
yet take any special steps to deal with callback flooding.
|
||||
So if you are posting (say) 10,000 SRCU callbacks per second per CPU,
|
||||
you are probably totally OK, but if you intend to post (say) 1,000,000
|
||||
SRCU callbacks per second per CPU, please run some tests first.
|
||||
SRCU just might need a few adjustment to deal with that sort of load.
|
||||
Of course, your mileage may vary based on the speed of your CPUs and
|
||||
the size of your memory.
|
||||
|
||||
<p>
|
||||
The
|
||||
<a href="https://lwn.net/Articles/609973/#RCU Per-Flavor API Table">SRCU API</a>
|
||||
|
@ -3021,8 +3106,8 @@ to do some redesign to avoid this scalability problem.
|
|||
|
||||
<p>
|
||||
RCU disables CPU hotplug in a few places, perhaps most notably in the
|
||||
expedited grace-period and <tt>rcu_barrier()</tt> operations.
|
||||
If there is a strong reason to use expedited grace periods in CPU-hotplug
|
||||
<tt>rcu_barrier()</tt> operations.
|
||||
If there is a strong reason to use <tt>rcu_barrier()</tt> in CPU-hotplug
|
||||
notifiers, it will be necessary to avoid disabling CPU hotplug.
|
||||
This would introduce some complexity, so there had better be a <i>very</i>
|
||||
good reason.
|
||||
|
@ -3096,9 +3181,5 @@ Andy Lutomirski for their help in rendering
|
|||
this article human readable, and to Michelle Rankin for her support
|
||||
of this effort.
|
||||
Other contributions are acknowledged in the Linux kernel's git archive.
|
||||
The cartoon is copyright (c) 2013 by Melissa Broussard,
|
||||
and is provided
|
||||
under the terms of the Creative Commons Attribution-Share Alike 3.0
|
||||
United States license.
|
||||
|
||||
</body></html>
|
||||
|
|
|
@ -138,6 +138,15 @@ o Be very careful about comparing pointers obtained from
|
|||
This sort of comparison occurs frequently when scanning
|
||||
RCU-protected circular linked lists.
|
||||
|
||||
Note that if checks for being within an RCU read-side
|
||||
critical section are not required and the pointer is never
|
||||
dereferenced, rcu_access_pointer() should be used in place
|
||||
of rcu_dereference(). The rcu_access_pointer() primitive
|
||||
does not require an enclosing read-side critical section,
|
||||
and also omits the smp_read_barrier_depends() included in
|
||||
rcu_dereference(), which in turn should provide a small
|
||||
performance gain in some CPUs (e.g., the DEC Alpha).
|
||||
|
||||
o The comparison is against a pointer that references memory
|
||||
that was initialized "a long time ago." The reason
|
||||
this is safe is that even if misordering occurs, the
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
Using hlist_nulls to protect read-mostly linked lists and
|
||||
objects using SLAB_DESTROY_BY_RCU allocations.
|
||||
objects using SLAB_TYPESAFE_BY_RCU allocations.
|
||||
|
||||
Please read the basics in Documentation/RCU/listRCU.txt
|
||||
|
||||
|
@ -7,7 +7,7 @@ Using special makers (called 'nulls') is a convenient way
|
|||
to solve following problem :
|
||||
|
||||
A typical RCU linked list managing objects which are
|
||||
allocated with SLAB_DESTROY_BY_RCU kmem_cache can
|
||||
allocated with SLAB_TYPESAFE_BY_RCU kmem_cache can
|
||||
use following algos :
|
||||
|
||||
1) Lookup algo
|
||||
|
@ -96,7 +96,7 @@ unlock_chain(); // typically a spin_unlock()
|
|||
3) Remove algo
|
||||
--------------
|
||||
Nothing special here, we can use a standard RCU hlist deletion.
|
||||
But thanks to SLAB_DESTROY_BY_RCU, beware a deleted object can be reused
|
||||
But thanks to SLAB_TYPESAFE_BY_RCU, beware a deleted object can be reused
|
||||
very very fast (before the end of RCU grace period)
|
||||
|
||||
if (put_last_reference_on(obj) {
|
||||
|
|
|
@ -1,9 +1,102 @@
|
|||
Using RCU's CPU Stall Detector
|
||||
|
||||
The rcu_cpu_stall_suppress module parameter enables RCU's CPU stall
|
||||
detector, which detects conditions that unduly delay RCU grace periods.
|
||||
This module parameter enables CPU stall detection by default, but
|
||||
may be overridden via boot-time parameter or at runtime via sysfs.
|
||||
This document first discusses what sorts of issues RCU's CPU stall
|
||||
detector can locate, and then discusses kernel parameters and Kconfig
|
||||
options that can be used to fine-tune the detector's operation. Finally,
|
||||
this document explains the stall detector's "splat" format.
|
||||
|
||||
|
||||
What Causes RCU CPU Stall Warnings?
|
||||
|
||||
So your kernel printed an RCU CPU stall warning. The next question is
|
||||
"What caused it?" The following problems can result in RCU CPU stall
|
||||
warnings:
|
||||
|
||||
o A CPU looping in an RCU read-side critical section.
|
||||
|
||||
o A CPU looping with interrupts disabled.
|
||||
|
||||
o A CPU looping with preemption disabled. This condition can
|
||||
result in RCU-sched stalls and, if ksoftirqd is in use, RCU-bh
|
||||
stalls.
|
||||
|
||||
o A CPU looping with bottom halves disabled. This condition can
|
||||
result in RCU-sched and RCU-bh stalls.
|
||||
|
||||
o For !CONFIG_PREEMPT kernels, a CPU looping anywhere in the
|
||||
kernel without invoking schedule(). Note that cond_resched()
|
||||
does not necessarily prevent RCU CPU stall warnings. Therefore,
|
||||
if the looping in the kernel is really expected and desirable
|
||||
behavior, you might need to replace some of the cond_resched()
|
||||
calls with calls to cond_resched_rcu_qs().
|
||||
|
||||
o Booting Linux using a console connection that is too slow to
|
||||
keep up with the boot-time console-message rate. For example,
|
||||
a 115Kbaud serial console can be -way- too slow to keep up
|
||||
with boot-time message rates, and will frequently result in
|
||||
RCU CPU stall warning messages. Especially if you have added
|
||||
debug printk()s.
|
||||
|
||||
o Anything that prevents RCU's grace-period kthreads from running.
|
||||
This can result in the "All QSes seen" console-log message.
|
||||
This message will include information on when the kthread last
|
||||
ran and how often it should be expected to run.
|
||||
|
||||
o A CPU-bound real-time task in a CONFIG_PREEMPT kernel, which might
|
||||
happen to preempt a low-priority task in the middle of an RCU
|
||||
read-side critical section. This is especially damaging if
|
||||
that low-priority task is not permitted to run on any other CPU,
|
||||
in which case the next RCU grace period can never complete, which
|
||||
will eventually cause the system to run out of memory and hang.
|
||||
While the system is in the process of running itself out of
|
||||
memory, you might see stall-warning messages.
|
||||
|
||||
o A CPU-bound real-time task in a CONFIG_PREEMPT_RT kernel that
|
||||
is running at a higher priority than the RCU softirq threads.
|
||||
This will prevent RCU callbacks from ever being invoked,
|
||||
and in a CONFIG_PREEMPT_RCU kernel will further prevent
|
||||
RCU grace periods from ever completing. Either way, the
|
||||
system will eventually run out of memory and hang. In the
|
||||
CONFIG_PREEMPT_RCU case, you might see stall-warning
|
||||
messages.
|
||||
|
||||
o A hardware or software issue shuts off the scheduler-clock
|
||||
interrupt on a CPU that is not in dyntick-idle mode. This
|
||||
problem really has happened, and seems to be most likely to
|
||||
result in RCU CPU stall warnings for CONFIG_NO_HZ_COMMON=n kernels.
|
||||
|
||||
o A bug in the RCU implementation.
|
||||
|
||||
o A hardware failure. This is quite unlikely, but has occurred
|
||||
at least once in real life. A CPU failed in a running system,
|
||||
becoming unresponsive, but not causing an immediate crash.
|
||||
This resulted in a series of RCU CPU stall warnings, eventually
|
||||
leading the realization that the CPU had failed.
|
||||
|
||||
The RCU, RCU-sched, RCU-bh, and RCU-tasks implementations have CPU stall
|
||||
warning. Note that SRCU does -not- have CPU stall warnings. Please note
|
||||
that RCU only detects CPU stalls when there is a grace period in progress.
|
||||
No grace period, no CPU stall warnings.
|
||||
|
||||
To diagnose the cause of the stall, inspect the stack traces.
|
||||
The offending function will usually be near the top of the stack.
|
||||
If you have a series of stall warnings from a single extended stall,
|
||||
comparing the stack traces can often help determine where the stall
|
||||
is occurring, which will usually be in the function nearest the top of
|
||||
that portion of the stack which remains the same from trace to trace.
|
||||
If you can reliably trigger the stall, ftrace can be quite helpful.
|
||||
|
||||
RCU bugs can often be debugged with the help of CONFIG_RCU_TRACE
|
||||
and with RCU's event tracing. For information on RCU's event tracing,
|
||||
see include/trace/events/rcu.h.
|
||||
|
||||
|
||||
Fine-Tuning the RCU CPU Stall Detector
|
||||
|
||||
The rcuupdate.rcu_cpu_stall_suppress module parameter disables RCU's
|
||||
CPU stall detector, which detects conditions that unduly delay RCU grace
|
||||
periods. This module parameter enables CPU stall detection by default,
|
||||
but may be overridden via boot-time parameter or at runtime via sysfs.
|
||||
The stall detector's idea of what constitutes "unduly delayed" is
|
||||
controlled by a set of kernel configuration variables and cpp macros:
|
||||
|
||||
|
@ -56,6 +149,9 @@ rcupdate.rcu_task_stall_timeout
|
|||
And continues with the output of sched_show_task() for each
|
||||
task stalling the current RCU-tasks grace period.
|
||||
|
||||
|
||||
Interpreting RCU's CPU Stall-Detector "Splats"
|
||||
|
||||
For non-RCU-tasks flavors of RCU, when a CPU detects that it is stalling,
|
||||
it will print a message similar to the following:
|
||||
|
||||
|
@ -178,89 +274,3 @@ grace period is in flight.
|
|||
|
||||
It is entirely possible to see stall warnings from normal and from
|
||||
expedited grace periods at about the same time from the same run.
|
||||
|
||||
|
||||
What Causes RCU CPU Stall Warnings?
|
||||
|
||||
So your kernel printed an RCU CPU stall warning. The next question is
|
||||
"What caused it?" The following problems can result in RCU CPU stall
|
||||
warnings:
|
||||
|
||||
o A CPU looping in an RCU read-side critical section.
|
||||
|
||||
o A CPU looping with interrupts disabled. This condition can
|
||||
result in RCU-sched and RCU-bh stalls.
|
||||
|
||||
o A CPU looping with preemption disabled. This condition can
|
||||
result in RCU-sched stalls and, if ksoftirqd is in use, RCU-bh
|
||||
stalls.
|
||||
|
||||
o A CPU looping with bottom halves disabled. This condition can
|
||||
result in RCU-sched and RCU-bh stalls.
|
||||
|
||||
o For !CONFIG_PREEMPT kernels, a CPU looping anywhere in the
|
||||
kernel without invoking schedule(). Note that cond_resched()
|
||||
does not necessarily prevent RCU CPU stall warnings. Therefore,
|
||||
if the looping in the kernel is really expected and desirable
|
||||
behavior, you might need to replace some of the cond_resched()
|
||||
calls with calls to cond_resched_rcu_qs().
|
||||
|
||||
o Booting Linux using a console connection that is too slow to
|
||||
keep up with the boot-time console-message rate. For example,
|
||||
a 115Kbaud serial console can be -way- too slow to keep up
|
||||
with boot-time message rates, and will frequently result in
|
||||
RCU CPU stall warning messages. Especially if you have added
|
||||
debug printk()s.
|
||||
|
||||
o Anything that prevents RCU's grace-period kthreads from running.
|
||||
This can result in the "All QSes seen" console-log message.
|
||||
This message will include information on when the kthread last
|
||||
ran and how often it should be expected to run.
|
||||
|
||||
o A CPU-bound real-time task in a CONFIG_PREEMPT kernel, which might
|
||||
happen to preempt a low-priority task in the middle of an RCU
|
||||
read-side critical section. This is especially damaging if
|
||||
that low-priority task is not permitted to run on any other CPU,
|
||||
in which case the next RCU grace period can never complete, which
|
||||
will eventually cause the system to run out of memory and hang.
|
||||
While the system is in the process of running itself out of
|
||||
memory, you might see stall-warning messages.
|
||||
|
||||
o A CPU-bound real-time task in a CONFIG_PREEMPT_RT kernel that
|
||||
is running at a higher priority than the RCU softirq threads.
|
||||
This will prevent RCU callbacks from ever being invoked,
|
||||
and in a CONFIG_PREEMPT_RCU kernel will further prevent
|
||||
RCU grace periods from ever completing. Either way, the
|
||||
system will eventually run out of memory and hang. In the
|
||||
CONFIG_PREEMPT_RCU case, you might see stall-warning
|
||||
messages.
|
||||
|
||||
o A hardware or software issue shuts off the scheduler-clock
|
||||
interrupt on a CPU that is not in dyntick-idle mode. This
|
||||
problem really has happened, and seems to be most likely to
|
||||
result in RCU CPU stall warnings for CONFIG_NO_HZ_COMMON=n kernels.
|
||||
|
||||
o A bug in the RCU implementation.
|
||||
|
||||
o A hardware failure. This is quite unlikely, but has occurred
|
||||
at least once in real life. A CPU failed in a running system,
|
||||
becoming unresponsive, but not causing an immediate crash.
|
||||
This resulted in a series of RCU CPU stall warnings, eventually
|
||||
leading the realization that the CPU had failed.
|
||||
|
||||
The RCU, RCU-sched, RCU-bh, and RCU-tasks implementations have CPU stall
|
||||
warning. Note that SRCU does -not- have CPU stall warnings. Please note
|
||||
that RCU only detects CPU stalls when there is a grace period in progress.
|
||||
No grace period, no CPU stall warnings.
|
||||
|
||||
To diagnose the cause of the stall, inspect the stack traces.
|
||||
The offending function will usually be near the top of the stack.
|
||||
If you have a series of stall warnings from a single extended stall,
|
||||
comparing the stack traces can often help determine where the stall
|
||||
is occurring, which will usually be in the function nearest the top of
|
||||
that portion of the stack which remains the same from trace to trace.
|
||||
If you can reliably trigger the stall, ftrace can be quite helpful.
|
||||
|
||||
RCU bugs can often be debugged with the help of CONFIG_RCU_TRACE
|
||||
and with RCU's event tracing. For information on RCU's event tracing,
|
||||
see include/trace/events/rcu.h.
|
||||
|
|
|
@ -562,7 +562,9 @@ This section presents a "toy" RCU implementation that is based on
|
|||
familiar locking primitives. Its overhead makes it a non-starter for
|
||||
real-life use, as does its lack of scalability. It is also unsuitable
|
||||
for realtime use, since it allows scheduling latency to "bleed" from
|
||||
one read-side critical section to another.
|
||||
one read-side critical section to another. It also assumes recursive
|
||||
reader-writer locks: If you try this with non-recursive locks, and
|
||||
you allow nested rcu_read_lock() calls, you can deadlock.
|
||||
|
||||
However, it is probably the easiest implementation to relate to, so is
|
||||
a good starting point.
|
||||
|
@ -587,20 +589,21 @@ It is extremely simple:
|
|||
write_unlock(&rcu_gp_mutex);
|
||||
}
|
||||
|
||||
[You can ignore rcu_assign_pointer() and rcu_dereference() without
|
||||
missing much. But here they are anyway. And whatever you do, don't
|
||||
forget about them when submitting patches making use of RCU!]
|
||||
[You can ignore rcu_assign_pointer() and rcu_dereference() without missing
|
||||
much. But here are simplified versions anyway. And whatever you do,
|
||||
don't forget about them when submitting patches making use of RCU!]
|
||||
|
||||
#define rcu_assign_pointer(p, v) ({ \
|
||||
smp_wmb(); \
|
||||
(p) = (v); \
|
||||
})
|
||||
#define rcu_assign_pointer(p, v) \
|
||||
({ \
|
||||
smp_store_release(&(p), (v)); \
|
||||
})
|
||||
|
||||
#define rcu_dereference(p) ({ \
|
||||
typeof(p) _________p1 = p; \
|
||||
smp_read_barrier_depends(); \
|
||||
(_________p1); \
|
||||
})
|
||||
#define rcu_dereference(p) \
|
||||
({ \
|
||||
typeof(p) _________p1 = p; \
|
||||
smp_read_barrier_depends(); \
|
||||
(_________p1); \
|
||||
})
|
||||
|
||||
|
||||
The rcu_read_lock() and rcu_read_unlock() primitive read-acquire
|
||||
|
@ -925,7 +928,8 @@ d. Do you need RCU grace periods to complete even in the face
|
|||
|
||||
e. Is your workload too update-intensive for normal use of
|
||||
RCU, but inappropriate for other synchronization mechanisms?
|
||||
If so, consider SLAB_DESTROY_BY_RCU. But please be careful!
|
||||
If so, consider SLAB_TYPESAFE_BY_RCU (which was originally
|
||||
named SLAB_DESTROY_BY_RCU). But please be careful!
|
||||
|
||||
f. Do you need read-side critical sections that are respected
|
||||
even though they are in the middle of the idle loop, during
|
||||
|
|
|
@ -362,7 +362,7 @@ If something goes wrong
|
|||
as is, otherwise you will have to use the ``ksymoops`` program to make
|
||||
sense of the dump (but compiling with CONFIG_KALLSYMS is usually preferred).
|
||||
This utility can be downloaded from
|
||||
ftp://ftp.<country>.kernel.org/pub/linux/utils/kernel/ksymoops/ .
|
||||
https://www.kernel.org/pub/linux/utils/kernel/ksymoops/ .
|
||||
Alternatively, you can do the dump lookup by hand:
|
||||
|
||||
- In debugging dumps like the above, it helps enormously if you can
|
||||
|
|
|
@ -972,7 +972,7 @@
|
|||
A valid base address must be provided, and the serial
|
||||
port must already be setup and configured.
|
||||
|
||||
armada3700_uart,<addr>
|
||||
ar3700_uart,<addr>
|
||||
Start an early, polled-mode console on the
|
||||
Armada 3700 serial port at the specified
|
||||
address. The serial port must already be setup
|
||||
|
@ -1578,6 +1578,15 @@
|
|||
extended tables themselves, and also PASID support. With
|
||||
this option set, extended tables will not be used even
|
||||
on hardware which claims to support them.
|
||||
tboot_noforce [Default Off]
|
||||
Do not force the Intel IOMMU enabled under tboot.
|
||||
By default, tboot will force Intel IOMMU on, which
|
||||
could harm performance of some high-throughput
|
||||
devices like 40GBit network cards, even if identity
|
||||
mapping is enabled.
|
||||
Note that using this option lowers the security
|
||||
provided by tboot because it makes the system
|
||||
vulnerable to DMA attacks.
|
||||
|
||||
intel_idle.max_cstate= [KNL,HW,ACPI,X86]
|
||||
0 disables intel_idle and fall back on acpi_idle.
|
||||
|
@ -1644,6 +1653,12 @@
|
|||
nobypass [PPC/POWERNV]
|
||||
Disable IOMMU bypass, using IOMMU for PCI devices.
|
||||
|
||||
iommu.passthrough=
|
||||
[ARM64] Configure DMA to bypass the IOMMU by default.
|
||||
Format: { "0" | "1" }
|
||||
0 - Use IOMMU translation for DMA.
|
||||
1 - Bypass the IOMMU for DMA.
|
||||
unset - Use IOMMU translation for DMA.
|
||||
|
||||
io7= [HW] IO7 for Marvel based alpha systems
|
||||
See comment before marvel_specify_io7 in
|
||||
|
@ -2419,12 +2434,6 @@
|
|||
and gids from such clients. This is intended to ease
|
||||
migration from NFSv2/v3.
|
||||
|
||||
objlayoutdriver.osd_login_prog=
|
||||
[NFS] [OBJLAYOUT] sets the pathname to the program which
|
||||
is used to automatically discover and login into new
|
||||
osd-targets. Please see:
|
||||
Documentation/filesystems/pnfs.txt for more explanations
|
||||
|
||||
nmi_debug= [KNL,SH] Specify one or more actions to take
|
||||
when a NMI is triggered.
|
||||
Format: [state][,regs][,debounce][,die]
|
||||
|
@ -3785,6 +3794,14 @@
|
|||
spia_pedr=
|
||||
spia_peddr=
|
||||
|
||||
srcutree.exp_holdoff [KNL]
|
||||
Specifies how many nanoseconds must elapse
|
||||
since the end of the last SRCU grace period for
|
||||
a given srcu_struct until the next normal SRCU
|
||||
grace period will be considered for automatic
|
||||
expediting. Set to zero to disable automatic
|
||||
expediting.
|
||||
|
||||
stacktrace [FTRACE]
|
||||
Enabled the stack tracer on boot up.
|
||||
|
||||
|
|
|
@ -11,24 +11,56 @@ in AArch64 Linux.
|
|||
The kernel configures the translation tables so that translations made
|
||||
via TTBR0 (i.e. userspace mappings) have the top byte (bits 63:56) of
|
||||
the virtual address ignored by the translation hardware. This frees up
|
||||
this byte for application use, with the following caveats:
|
||||
this byte for application use.
|
||||
|
||||
(1) The kernel requires that all user addresses passed to EL1
|
||||
are tagged with tag 0x00. This means that any syscall
|
||||
parameters containing user virtual addresses *must* have
|
||||
their top byte cleared before trapping to the kernel.
|
||||
|
||||
(2) Non-zero tags are not preserved when delivering signals.
|
||||
This means that signal handlers in applications making use
|
||||
of tags cannot rely on the tag information for user virtual
|
||||
addresses being maintained for fields inside siginfo_t.
|
||||
One exception to this rule is for signals raised in response
|
||||
to watchpoint debug exceptions, where the tag information
|
||||
will be preserved.
|
||||
Passing tagged addresses to the kernel
|
||||
--------------------------------------
|
||||
|
||||
(3) Special care should be taken when using tagged pointers,
|
||||
since it is likely that C compilers will not hazard two
|
||||
virtual addresses differing only in the upper byte.
|
||||
All interpretation of userspace memory addresses by the kernel assumes
|
||||
an address tag of 0x00.
|
||||
|
||||
This includes, but is not limited to, addresses found in:
|
||||
|
||||
- pointer arguments to system calls, including pointers in structures
|
||||
passed to system calls,
|
||||
|
||||
- the stack pointer (sp), e.g. when interpreting it to deliver a
|
||||
signal,
|
||||
|
||||
- the frame pointer (x29) and frame records, e.g. when interpreting
|
||||
them to generate a backtrace or call graph.
|
||||
|
||||
Using non-zero address tags in any of these locations may result in an
|
||||
error code being returned, a (fatal) signal being raised, or other modes
|
||||
of failure.
|
||||
|
||||
For these reasons, passing non-zero address tags to the kernel via
|
||||
system calls is forbidden, and using a non-zero address tag for sp is
|
||||
strongly discouraged.
|
||||
|
||||
Programs maintaining a frame pointer and frame records that use non-zero
|
||||
address tags may suffer impaired or inaccurate debug and profiling
|
||||
visibility.
|
||||
|
||||
|
||||
Preserving tags
|
||||
---------------
|
||||
|
||||
Non-zero tags are not preserved when delivering signals. This means that
|
||||
signal handlers in applications making use of tags cannot rely on the
|
||||
tag information for user virtual addresses being maintained for fields
|
||||
inside siginfo_t. One exception to this rule is for signals raised in
|
||||
response to watchpoint debug exceptions, where the tag information will
|
||||
be preserved.
|
||||
|
||||
The architecture prevents the use of a tagged PC, so the upper byte will
|
||||
be set to a sign-extension of bit 55 on exception return.
|
||||
|
||||
|
||||
Other considerations
|
||||
--------------------
|
||||
|
||||
Special care should be taken when using tagged pointers, since it is
|
||||
likely that C compilers will not hazard two virtual addresses differing
|
||||
only in the upper byte.
|
||||
|
|
|
@ -11,6 +11,13 @@ controllers), BFQ's main features are:
|
|||
groups (switching back to time distribution when needed to keep
|
||||
throughput high).
|
||||
|
||||
In its default configuration, BFQ privileges latency over
|
||||
throughput. So, when needed for achieving a lower latency, BFQ builds
|
||||
schedules that may lead to a lower throughput. If your main or only
|
||||
goal, for a given device, is to achieve the maximum-possible
|
||||
throughput at all times, then do switch off all low-latency heuristics
|
||||
for that device, by setting low_latency to 0. Full details in Section 3.
|
||||
|
||||
On average CPUs, the current version of BFQ can handle devices
|
||||
performing at most ~30K IOPS; at most ~50 KIOPS on faster CPUs. As a
|
||||
reference, 30-50 KIOPS correspond to very high bandwidths with
|
||||
|
@ -375,11 +382,19 @@ default, low latency mode is enabled. If enabled, interactive and soft
|
|||
real-time applications are privileged and experience a lower latency,
|
||||
as explained in more detail in the description of how BFQ works.
|
||||
|
||||
DO NOT enable this mode if you need full control on bandwidth
|
||||
DISABLE this mode if you need full control on bandwidth
|
||||
distribution. In fact, if it is enabled, then BFQ automatically
|
||||
increases the bandwidth share of privileged applications, as the main
|
||||
means to guarantee a lower latency to them.
|
||||
|
||||
In addition, as already highlighted at the beginning of this document,
|
||||
DISABLE this mode if your only goal is to achieve a high throughput.
|
||||
In fact, privileging the I/O of some application over the rest may
|
||||
entail a lower throughput. To achieve the highest-possible throughput
|
||||
on a non-rotational device, setting slice_idle to 0 may be needed too
|
||||
(at the cost of giving up any strong guarantee on fairness and low
|
||||
latency).
|
||||
|
||||
timeout_sync
|
||||
------------
|
||||
|
||||
|
|
|
@ -918,6 +918,18 @@ PAGE_SIZE multiple when read back.
|
|||
|
||||
Number of major page faults incurred
|
||||
|
||||
workingset_refault
|
||||
|
||||
Number of refaults of previously evicted pages
|
||||
|
||||
workingset_activate
|
||||
|
||||
Number of refaulted pages that were immediately activated
|
||||
|
||||
workingset_nodereclaim
|
||||
|
||||
Number of times a shadow node has been reclaimed
|
||||
|
||||
memory.swap.current
|
||||
|
||||
A read-only single value file which exists on non-root
|
||||
|
|
|
@ -7,6 +7,7 @@ Required Properties:
|
|||
|
||||
- compatible: Should be one of:
|
||||
- "mediatek,mt2701-apmixedsys"
|
||||
- "mediatek,mt6797-apmixedsys"
|
||||
- "mediatek,mt8135-apmixedsys"
|
||||
- "mediatek,mt8173-apmixedsys"
|
||||
- #clock-cells: Must be 1
|
||||
|
|
|
@ -7,6 +7,7 @@ Required Properties:
|
|||
|
||||
- compatible: Should be one of:
|
||||
- "mediatek,mt2701-imgsys", "syscon"
|
||||
- "mediatek,mt6797-imgsys", "syscon"
|
||||
- "mediatek,mt8173-imgsys", "syscon"
|
||||
- #clock-cells: Must be 1
|
||||
|
||||
|
|
|
@ -8,6 +8,7 @@ Required Properties:
|
|||
|
||||
- compatible: Should be one of:
|
||||
- "mediatek,mt2701-infracfg", "syscon"
|
||||
- "mediatek,mt6797-infracfg", "syscon"
|
||||
- "mediatek,mt8135-infracfg", "syscon"
|
||||
- "mediatek,mt8173-infracfg", "syscon"
|
||||
- #clock-cells: Must be 1
|
||||
|
|
|
@ -7,6 +7,7 @@ Required Properties:
|
|||
|
||||
- compatible: Should be one of:
|
||||
- "mediatek,mt2701-mmsys", "syscon"
|
||||
- "mediatek,mt6797-mmsys", "syscon"
|
||||
- "mediatek,mt8173-mmsys", "syscon"
|
||||
- #clock-cells: Must be 1
|
||||
|
||||
|
|
|
@ -7,6 +7,7 @@ Required Properties:
|
|||
|
||||
- compatible: Should be one of:
|
||||
- "mediatek,mt2701-topckgen"
|
||||
- "mediatek,mt6797-topckgen"
|
||||
- "mediatek,mt8135-topckgen"
|
||||
- "mediatek,mt8173-topckgen"
|
||||
- #clock-cells: Must be 1
|
||||
|
|
|
@ -7,6 +7,7 @@ Required Properties:
|
|||
|
||||
- compatible: Should be one of:
|
||||
- "mediatek,mt2701-vdecsys", "syscon"
|
||||
- "mediatek,mt6797-vdecsys", "syscon"
|
||||
- "mediatek,mt8173-vdecsys", "syscon"
|
||||
- #clock-cells: Must be 1
|
||||
|
||||
|
|
|
@ -5,7 +5,8 @@ The Mediatek vencsys controller provides various clocks to the system.
|
|||
|
||||
Required Properties:
|
||||
|
||||
- compatible: Should be:
|
||||
- compatible: Should be one of:
|
||||
- "mediatek,mt6797-vencsys", "syscon"
|
||||
- "mediatek,mt8173-vencsys", "syscon"
|
||||
- #clock-cells: Must be 1
|
||||
|
||||
|
|
|
@ -6,18 +6,21 @@ from 3 to 12 output clocks.
|
|||
==I2C device node==
|
||||
|
||||
Required properties:
|
||||
- compatible: shall be one of "idt,5p49v5923" , "idt,5p49v5933".
|
||||
- compatible: shall be one of "idt,5p49v5923" , "idt,5p49v5933" ,
|
||||
"idt,5p49v5935".
|
||||
- reg: i2c device address, shall be 0x68 or 0x6a.
|
||||
- #clock-cells: from common clock binding; shall be set to 1.
|
||||
- clocks: from common clock binding; list of parent clock handles,
|
||||
- 5p49v5923: (required) either or both of XTAL or CLKIN
|
||||
reference clock.
|
||||
- 5p49v5933: (optional) property not present (internal
|
||||
- 5p49v5933 and
|
||||
- 5p49v5935: (optional) property not present (internal
|
||||
Xtal used) or CLKIN reference
|
||||
clock.
|
||||
- clock-names: from common clock binding; clock input names, can be
|
||||
- 5p49v5923: (required) either or both of "xin", "clkin".
|
||||
- 5p49v5933: (optional) property not present or "clkin".
|
||||
- 5p49v5933 and
|
||||
- 5p49v5935: (optional) property not present or "clkin".
|
||||
|
||||
==Mapping between clock specifier and physical pins==
|
||||
|
||||
|
@ -34,6 +37,13 @@ clock specifier, the following mapping applies:
|
|||
1 -- OUT1
|
||||
2 -- OUT4
|
||||
|
||||
5P49V5935:
|
||||
0 -- OUT0_SEL_I2CB
|
||||
1 -- OUT1
|
||||
2 -- OUT2
|
||||
3 -- OUT3
|
||||
4 -- OUT4
|
||||
|
||||
==Example==
|
||||
|
||||
/* 25MHz reference crystal */
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
* Rockchip RK1108 Clock and Reset Unit
|
||||
* Rockchip RV1108 Clock and Reset Unit
|
||||
|
||||
The RK1108 clock controller generates and supplies clock to various
|
||||
The RV1108 clock controller generates and supplies clock to various
|
||||
controllers within the SoC and also implements a reset controller for SoC
|
||||
peripherals.
|
||||
|
||||
Required Properties:
|
||||
|
||||
- compatible: should be "rockchip,rk1108-cru"
|
||||
- compatible: should be "rockchip,rv1108-cru"
|
||||
- reg: physical base address of the controller and length of memory mapped
|
||||
region.
|
||||
- #clock-cells: should be 1.
|
||||
|
@ -19,7 +19,7 @@ Optional Properties:
|
|||
|
||||
Each clock is assigned an identifier and client nodes can use this identifier
|
||||
to specify the clock which they consume. All available clocks are defined as
|
||||
preprocessor macros in the dt-bindings/clock/rk1108-cru.h headers and can be
|
||||
preprocessor macros in the dt-bindings/clock/rv1108-cru.h headers and can be
|
||||
used in device tree sources. Similar macros exist for the reset sources in
|
||||
these files.
|
||||
|
||||
|
@ -38,7 +38,7 @@ clock-output-names:
|
|||
Example: Clock controller node:
|
||||
|
||||
cru: cru@20200000 {
|
||||
compatible = "rockchip,rk1108-cru";
|
||||
compatible = "rockchip,rv1108-cru";
|
||||
reg = <0x20200000 0x1000>;
|
||||
rockchip,grf = <&grf>;
|
||||
|
||||
|
@ -50,7 +50,7 @@ Example: UART controller node that consumes the clock generated by the clock
|
|||
controller:
|
||||
|
||||
uart0: serial@10230000 {
|
||||
compatible = "rockchip,rk1108-uart", "snps,dw-apb-uart";
|
||||
compatible = "rockchip,rv1108-uart", "snps,dw-apb-uart";
|
||||
reg = <0x10230000 0x100>;
|
||||
interrupts = <GIC_SPI 44 IRQ_TYPE_LEVEL_HIGH>;
|
||||
reg-shift = <2>;
|
|
@ -7,9 +7,12 @@ Required properties :
|
|||
- "allwinner,sun8i-a23-ccu"
|
||||
- "allwinner,sun8i-a33-ccu"
|
||||
- "allwinner,sun8i-h3-ccu"
|
||||
- "allwinner,sun8i-h3-r-ccu"
|
||||
- "allwinner,sun8i-v3s-ccu"
|
||||
- "allwinner,sun9i-a80-ccu"
|
||||
- "allwinner,sun50i-a64-ccu"
|
||||
- "allwinner,sun50i-a64-r-ccu"
|
||||
- "allwinner,sun50i-h5-ccu"
|
||||
|
||||
- reg: Must contain the registers base address and length
|
||||
- clocks: phandle to the oscillators feeding the CCU. Two are needed:
|
||||
|
@ -19,7 +22,10 @@ Required properties :
|
|||
- #clock-cells : must contain 1
|
||||
- #reset-cells : must contain 1
|
||||
|
||||
Example:
|
||||
For the PRCM CCUs on H3/A64, one more clock is needed:
|
||||
- "iosc": the SoC's internal frequency oscillator
|
||||
|
||||
Example for generic CCU:
|
||||
ccu: clock@01c20000 {
|
||||
compatible = "allwinner,sun8i-h3-ccu";
|
||||
reg = <0x01c20000 0x400>;
|
||||
|
@ -28,3 +34,13 @@ ccu: clock@01c20000 {
|
|||
#clock-cells = <1>;
|
||||
#reset-cells = <1>;
|
||||
};
|
||||
|
||||
Example for PRCM CCU:
|
||||
r_ccu: clock@01f01400 {
|
||||
compatible = "allwinner,sun50i-a64-r-ccu";
|
||||
reg = <0x01f01400 0x100>;
|
||||
clocks = <&osc24M>, <&osc32k>, <&iosc>;
|
||||
clock-names = "hosc", "losc", "iosc";
|
||||
#clock-cells = <1>;
|
||||
#reset-cells = <1>;
|
||||
};
|
||||
|
|
|
@ -13,6 +13,8 @@ Required nodes:
|
|||
Additional, the display node has to define properties:
|
||||
- bits-per-pixel: Bits per pixel
|
||||
- fsl,pcr: LCDC PCR value
|
||||
A display node may optionally define
|
||||
- fsl,aus-mode: boolean to enable AUS mode (only for imx21)
|
||||
|
||||
Optional properties:
|
||||
- lcd-supply: Regulator for LCD supply voltage.
|
||||
|
|
|
@ -60,6 +60,17 @@ conditions.
|
|||
aliases of secure registers have to be used during
|
||||
SMMU configuration.
|
||||
|
||||
- stream-match-mask : For SMMUs supporting stream matching and using
|
||||
#iommu-cells = <1>, specifies a mask of bits to ignore
|
||||
when matching stream IDs (e.g. this may be programmed
|
||||
into the SMRn.MASK field of every stream match register
|
||||
used). For cases where it is desirable to ignore some
|
||||
portion of every Stream ID (e.g. for certain MMU-500
|
||||
configurations given globally unique input IDs). This
|
||||
property is not valid for SMMUs using stream indexing,
|
||||
or using stream matching with #iommu-cells = <2>, and
|
||||
may be ignored if present in such cases.
|
||||
|
||||
** Deprecated properties:
|
||||
|
||||
- mmu-masters (deprecated in favour of the generic "iommus" binding) :
|
||||
|
@ -109,3 +120,20 @@ conditions.
|
|||
master3 {
|
||||
iommus = <&smmu2 1 0x30>;
|
||||
};
|
||||
|
||||
|
||||
/* ARM MMU-500 with 10-bit stream ID input configuration */
|
||||
smmu3: iommu {
|
||||
compatible = "arm,mmu-500", "arm,smmu-v2";
|
||||
...
|
||||
#iommu-cells = <1>;
|
||||
/* always ignore appended 5-bit TBU number */
|
||||
stream-match-mask = 0x7c00;
|
||||
};
|
||||
|
||||
bus {
|
||||
/* bus whose child devices emit one unique 10-bit stream
|
||||
ID each, but may master through multiple SMMU TBUs */
|
||||
iommu-map = <0 &smmu3 0 0x400>;
|
||||
...
|
||||
};
|
||||
|
|
|
@ -1,4 +1,109 @@
|
|||
Atmel NAND flash
|
||||
Atmel NAND flash controller bindings
|
||||
|
||||
The NAND flash controller node should be defined under the EBI bus (see
|
||||
Documentation/devicetree/bindings/memory-controllers/atmel,ebi.txt).
|
||||
One or several NAND devices can be defined under this NAND controller.
|
||||
The NAND controller might be connected to an ECC engine.
|
||||
|
||||
* NAND controller bindings:
|
||||
|
||||
Required properties:
|
||||
- compatible: should be one of the following
|
||||
"atmel,at91rm9200-nand-controller"
|
||||
"atmel,at91sam9260-nand-controller"
|
||||
"atmel,at91sam9261-nand-controller"
|
||||
"atmel,at91sam9g45-nand-controller"
|
||||
"atmel,sama5d3-nand-controller"
|
||||
- ranges: empty ranges property to forward EBI ranges definitions.
|
||||
- #address-cells: should be set to 2.
|
||||
- #size-cells: should be set to 1.
|
||||
- atmel,nfc-io: phandle to the NFC IO block. Only required for sama5d3
|
||||
controllers.
|
||||
- atmel,nfc-sram: phandle to the NFC SRAM block. Only required for sama5d3
|
||||
controllers.
|
||||
|
||||
Optional properties:
|
||||
- ecc-engine: phandle to the PMECC block. Only meaningful if the SoC embeds
|
||||
a PMECC engine.
|
||||
|
||||
* NAND device/chip bindings:
|
||||
|
||||
Required properties:
|
||||
- reg: describes the CS lines assigned to the NAND device. If the NAND device
|
||||
exposes multiple CS lines (multi-dies chips), your reg property will
|
||||
contain X tuples of 3 entries.
|
||||
1st entry: the CS line this NAND chip is connected to
|
||||
2nd entry: the base offset of the memory region assigned to this
|
||||
device (always 0)
|
||||
3rd entry: the memory region size (always 0x800000)
|
||||
|
||||
Optional properties:
|
||||
- rb-gpios: the GPIO(s) used to check the Ready/Busy status of the NAND.
|
||||
- cs-gpios: the GPIO(s) used to control the CS line.
|
||||
- det-gpios: the GPIO used to detect if a Smartmedia Card is present.
|
||||
- atmel,rb: an integer identifying the native Ready/Busy pin. Only meaningful
|
||||
on sama5 SoCs.
|
||||
|
||||
All generic properties described in
|
||||
Documentation/devicetree/bindings/mtd/{common,nand}.txt also apply to the NAND
|
||||
device node, and NAND partitions should be defined under the NAND node as
|
||||
described in Documentation/devicetree/bindings/mtd/partition.txt.
|
||||
|
||||
* ECC engine (PMECC) bindings:
|
||||
|
||||
Required properties:
|
||||
- compatible: should be one of the following
|
||||
"atmel,at91sam9g45-pmecc"
|
||||
"atmel,sama5d4-pmecc"
|
||||
"atmel,sama5d2-pmecc"
|
||||
- reg: should contain 2 register ranges. The first one is pointing to the PMECC
|
||||
block, and the second one to the PMECC_ERRLOC block.
|
||||
|
||||
Example:
|
||||
|
||||
pmecc: ecc-engine@ffffc070 {
|
||||
compatible = "atmel,at91sam9g45-pmecc";
|
||||
reg = <0xffffc070 0x490>,
|
||||
<0xffffc500 0x100>;
|
||||
};
|
||||
|
||||
ebi: ebi@10000000 {
|
||||
compatible = "atmel,sama5d3-ebi";
|
||||
#address-cells = <2>;
|
||||
#size-cells = <1>;
|
||||
atmel,smc = <&hsmc>;
|
||||
reg = <0x10000000 0x10000000
|
||||
0x40000000 0x30000000>;
|
||||
ranges = <0x0 0x0 0x10000000 0x10000000
|
||||
0x1 0x0 0x40000000 0x10000000
|
||||
0x2 0x0 0x50000000 0x10000000
|
||||
0x3 0x0 0x60000000 0x10000000>;
|
||||
clocks = <&mck>;
|
||||
|
||||
nand_controller: nand-controller {
|
||||
compatible = "atmel,sama5d3-nand-controller";
|
||||
atmel,nfc-sram = <&nfc_sram>;
|
||||
atmel,nfc-io = <&nfc_io>;
|
||||
ecc-engine = <&pmecc>;
|
||||
#address-cells = <2>;
|
||||
#size-cells = <1>;
|
||||
ranges;
|
||||
|
||||
nand@3 {
|
||||
reg = <0x3 0x0 0x800000>;
|
||||
atmel,rb = <0>;
|
||||
|
||||
/*
|
||||
* Put generic NAND/MTD properties and
|
||||
* subnodes here.
|
||||
*/
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
-----------------------------------------------------------------------
|
||||
|
||||
Deprecated bindings (should not be used in new device trees):
|
||||
|
||||
Required properties:
|
||||
- compatible: The possible values are:
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
* Denali NAND controller
|
||||
|
||||
Required properties:
|
||||
- compatible : should be "denali,denali-nand-dt"
|
||||
- compatible : should be one of the following:
|
||||
"altr,socfpga-denali-nand" - for Altera SOCFPGA
|
||||
- reg : should contain registers location and length for data and reg.
|
||||
- reg-names: Should contain the reg names "nand_data" and "denali_reg"
|
||||
- interrupts : The interrupt number.
|
||||
- dm-mask : DMA bit mask
|
||||
|
||||
The device tree may optionally contain sub-nodes describing partitions of the
|
||||
address space. See partition.txt for more detail.
|
||||
|
@ -15,9 +15,8 @@ Examples:
|
|||
nand: nand@ff900000 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
compatible = "denali,denali-nand-dt";
|
||||
compatible = "altr,socfpga-denali-nand";
|
||||
reg = <0xff900000 0x100000>, <0xffb80000 0x10000>;
|
||||
reg-names = "nand_data", "denali_reg";
|
||||
interrupts = <0 144 4>;
|
||||
dma-mask = <0xffffffff>;
|
||||
};
|
||||
|
|
|
@ -12,7 +12,7 @@ Required properties:
|
|||
- #address-cells, #size-cells : Must be present if the device has sub-nodes
|
||||
representing partitions.
|
||||
- gpios : Specifies the GPIO pins to control the NAND device. The order of
|
||||
GPIO references is: RDY, nCE, ALE, CLE, and an optional nWP.
|
||||
GPIO references is: RDY, nCE, ALE, CLE, and nWP. nCE and nWP are optional.
|
||||
|
||||
Optional properties:
|
||||
- bank-width : Width (in bytes) of the device. If not present, the width
|
||||
|
@ -36,7 +36,7 @@ gpio-nand@1,0 {
|
|||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
gpios = <&banka 1 0>, /* RDY */
|
||||
<&banka 2 0>, /* nCE */
|
||||
<0>, /* nCE */
|
||||
<&banka 3 0>, /* ALE */
|
||||
<&banka 4 0>, /* CLE */
|
||||
<0>; /* nWP */
|
||||
|
|
|
@ -0,0 +1,43 @@
|
|||
* STMicroelectronics Quad Serial Peripheral Interface(QuadSPI)
|
||||
|
||||
Required properties:
|
||||
- compatible: should be "st,stm32f469-qspi"
|
||||
- reg: the first contains the register location and length.
|
||||
the second contains the memory mapping address and length
|
||||
- reg-names: should contain the reg names "qspi" "qspi_mm"
|
||||
- interrupts: should contain the interrupt for the device
|
||||
- clocks: the phandle of the clock needed by the QSPI controller
|
||||
- A pinctrl must be defined to set pins in mode of operation for QSPI transfer
|
||||
|
||||
Optional properties:
|
||||
- resets: must contain the phandle to the reset controller.
|
||||
|
||||
A spi flash must be a child of the nor_flash node and could have some
|
||||
properties. Also see jedec,spi-nor.txt.
|
||||
|
||||
Required properties:
|
||||
- reg: chip-Select number (QSPI controller may connect 2 nor flashes)
|
||||
- spi-max-frequency: max frequency of spi bus
|
||||
|
||||
Optional property:
|
||||
- spi-rx-bus-width: see ../spi/spi-bus.txt for the description
|
||||
|
||||
Example:
|
||||
|
||||
qspi: spi@a0001000 {
|
||||
compatible = "st,stm32f469-qspi";
|
||||
reg = <0xa0001000 0x1000>, <0x90000000 0x10000000>;
|
||||
reg-names = "qspi", "qspi_mm";
|
||||
interrupts = <91>;
|
||||
resets = <&rcc STM32F4_AHB3_RESET(QSPI)>;
|
||||
clocks = <&rcc 0 STM32F4_AHB3_CLOCK(QSPI)>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pinctrl_qspi0>;
|
||||
|
||||
flash@0 {
|
||||
reg = <0>;
|
||||
spi-rx-bus-width = <4>;
|
||||
spi-max-frequency = <108000000>;
|
||||
...
|
||||
};
|
||||
};
|
|
@ -81,7 +81,7 @@ Example 3:
|
|||
child: power-controller@12341000 {
|
||||
compatible = "foo,power-controller";
|
||||
reg = <0x12341000 0x1000>;
|
||||
power-domains = <&parent 0>;
|
||||
power-domains = <&parent>;
|
||||
#power-domain-cells = <0>;
|
||||
domain-idle-states = <&DOMAIN_PWR_DN>;
|
||||
};
|
||||
|
|
|
@ -0,0 +1,20 @@
|
|||
AXP20x and AXP22x battery power supply
|
||||
|
||||
Required Properties:
|
||||
- compatible, one of:
|
||||
"x-powers,axp209-battery-power-supply"
|
||||
"x-powers,axp221-battery-power-supply"
|
||||
|
||||
This node is a subnode of the axp20x/axp22x PMIC.
|
||||
|
||||
The AXP20X and AXP22X can read the battery voltage, charge and discharge
|
||||
currents of the battery by reading ADC channels from the AXP20X/AXP22X
|
||||
ADC.
|
||||
|
||||
Example:
|
||||
|
||||
&axp209 {
|
||||
battery_power_supply: battery-power-supply {
|
||||
compatible = "x-powers,axp209-battery-power-supply";
|
||||
}
|
||||
};
|
|
@ -0,0 +1,248 @@
|
|||
*** NOTE ***
|
||||
This document is copied from OPAL firmware
|
||||
(skiboot/doc/device-tree/ibm,powerpc-cpu-features/binding.txt)
|
||||
|
||||
There is more complete overview and documentation of features in that
|
||||
source tree. All patches and modifications should go there.
|
||||
************
|
||||
|
||||
ibm,powerpc-cpu-features binding
|
||||
================================
|
||||
|
||||
This device tree binding describes CPU features available to software, with
|
||||
enablement, privilege, and compatibility metadata.
|
||||
|
||||
More general description of design and implementation of this binding is
|
||||
found in design.txt, which also points to documentation of specific features.
|
||||
|
||||
|
||||
/cpus/ibm,powerpc-cpu-features node binding
|
||||
-------------------------------------------
|
||||
|
||||
Node: ibm,powerpc-cpu-features
|
||||
|
||||
Description: Container of CPU feature nodes.
|
||||
|
||||
The node name must be "ibm,powerpc-cpu-features".
|
||||
|
||||
It is implemented as a child of the node "/cpus", but this must not be
|
||||
assumed by parsers.
|
||||
|
||||
The node is optional but should be provided by new OPAL firmware.
|
||||
|
||||
Properties:
|
||||
|
||||
- compatible
|
||||
Usage: required
|
||||
Value type: string
|
||||
Definition: "ibm,powerpc-cpu-features"
|
||||
|
||||
This compatibility refers to backwards compatibility of the overall
|
||||
design with parsers that behave according to these guidelines. This can
|
||||
be extended in a backward compatible manner which would not warrant a
|
||||
revision of the compatible property.
|
||||
|
||||
- isa
|
||||
Usage: required
|
||||
Value type: <u32>
|
||||
Definition:
|
||||
|
||||
isa that the CPU is currently running in. This provides instruction set
|
||||
compatibility, less the individual feature nodes. For example, an ISA v3.0
|
||||
implementation that lacks the "transactional-memory" cpufeature node
|
||||
should not use transactional memory facilities.
|
||||
|
||||
Value corresponds to the "Power ISA Version" multiplied by 1000.
|
||||
For example, <3000> corresponds to Version 3.0, <2070> to Version 2.07.
|
||||
The minor digit is available for revisions.
|
||||
|
||||
- display-name
|
||||
Usage: optional
|
||||
Value type: string
|
||||
Definition:
|
||||
|
||||
A human readable name for the CPU.
|
||||
|
||||
/cpus/ibm,powerpc-cpu-features/example-feature node bindings
|
||||
----------------------------------------------------------------
|
||||
|
||||
Each child node of cpu-features represents a CPU feature / capability.
|
||||
|
||||
Node: A string describing an architected CPU feature, e.g., "floating-point".
|
||||
|
||||
Description: A feature or capability supported by the CPUs.
|
||||
|
||||
The name of the node is a human readable string that forms the interface
|
||||
used to describe features to software. Features are currently documented
|
||||
in the code where they are implemented in skiboot/core/cpufeatures.c
|
||||
|
||||
Presence of the node indicates the feature is available.
|
||||
|
||||
Properties:
|
||||
|
||||
- isa
|
||||
Usage: required
|
||||
Value type: <u32>
|
||||
Definition:
|
||||
|
||||
First level of the Power ISA that the feature appears in.
|
||||
Software should filter out features when constraining the
|
||||
environment to a particular ISA version.
|
||||
|
||||
Value is defined similarly to /cpus/features/isa
|
||||
|
||||
- usable-privilege
|
||||
Usage: required
|
||||
Value type: <u32> bit mask
|
||||
Definition:
|
||||
Bit numbers are LSB0
|
||||
bit 0 - PR (problem state / user mode)
|
||||
bit 1 - OS (privileged state)
|
||||
bit 2 - HV (hypervisor state)
|
||||
All other bits reserved and should be zero.
|
||||
|
||||
This property describes the privilege levels and/or software components
|
||||
that can use the feature.
|
||||
|
||||
If bit 0 is set, then the hwcap-bit-nr property will exist.
|
||||
|
||||
|
||||
- hv-support
|
||||
Usage: optional
|
||||
Value type: <u32> bit mask
|
||||
Definition:
|
||||
Bit numbers are LSB0
|
||||
bit 0 - HFSCR
|
||||
All other bits reserved and should be zero.
|
||||
|
||||
This property describes the HV privilege support required to enable the
|
||||
feature to lesser privilege levels. If the property does not exist then no
|
||||
support is required.
|
||||
|
||||
If no bits are set, the hypervisor must have explicit/custom support for
|
||||
this feature.
|
||||
|
||||
If the HFSCR bit is set, then the hfscr-bit-nr property will exist and
|
||||
the feature may be enabled by setting this bit in the HFSCR register.
|
||||
|
||||
|
||||
- os-support
|
||||
Usage: optional
|
||||
Value type: <u32> bit mask
|
||||
Definition:
|
||||
Bit numbers are LSB0
|
||||
bit 0 - FSCR
|
||||
All other bits reserved and should be zero.
|
||||
|
||||
This property describes the OS privilege support required to enable the
|
||||
feature to lesser privilege levels. If the property does not exist then no
|
||||
support is required.
|
||||
|
||||
If no bits are set, the operating system must have explicit/custom support
|
||||
for this feature.
|
||||
|
||||
If the FSCR bit is set, then the fscr-bit-nr property will exist and
|
||||
the feature may be enabled by setting this bit in the FSCR register.
|
||||
|
||||
|
||||
- hfscr-bit-nr
|
||||
Usage: optional
|
||||
Value type: <u32>
|
||||
Definition: HFSCR bit position (LSB0)
|
||||
|
||||
This property exists when the hv-support property HFSCR bit is set. This
|
||||
property describes the bit number in the HFSCR register that the
|
||||
hypervisor must set in order to enable this feature.
|
||||
|
||||
This property also exists if an HFSCR bit corresponds with this feature.
|
||||
This makes CPU feature parsing slightly simpler.
|
||||
|
||||
|
||||
- fscr-bit-nr
|
||||
Usage: optional
|
||||
Value type: <u32>
|
||||
Definition: FSCR bit position (LSB0)
|
||||
|
||||
This property exists when the os-support property FSCR bit is set. This
|
||||
property describes the bit number in the FSCR register that the
|
||||
operating system must set in order to enable this feature.
|
||||
|
||||
This property also exists if an FSCR bit corresponds with this feature.
|
||||
This makes CPU feature parsing slightly simpler.
|
||||
|
||||
|
||||
- hwcap-bit-nr
|
||||
Usage: optional
|
||||
Value type: <u32>
|
||||
Definition: Linux ELF AUX vector bit position (LSB0)
|
||||
|
||||
This property may exist when the usable-privilege property value has PR bit set.
|
||||
This property describes the bit number that should be set in the ELF AUX
|
||||
hardware capability vectors in order to advertise this feature to userspace.
|
||||
Bits 0-31 correspond to bits 0-31 in AT_HWCAP vector. Bits 32-63 correspond
|
||||
to 0-31 in AT_HWCAP2 vector, and so on. Missing AT_HWCAPx vectors implies
|
||||
that the feature is not enabled or can not be advertised. Operating systems
|
||||
may provide a number of unassigned hardware capability bits to allow for new
|
||||
features to be advertised.
|
||||
|
||||
Some properties representing features created before this binding are
|
||||
advertised to userspace without a one-to-one hwcap bit number may not specify
|
||||
this bit. Operating system will handle those bits specifically. All new
|
||||
features usable by userspace will have a hwcap-bit-nr property.
|
||||
|
||||
|
||||
- dependencies
|
||||
Usage: optional
|
||||
Value type: <prop-encoded-array>
|
||||
Definition:
|
||||
|
||||
If this property exists then it is a list of phandles to cpu feature
|
||||
nodes that must be enabled for this feature to be enabled.
|
||||
|
||||
|
||||
Example
|
||||
-------
|
||||
|
||||
/cpus/ibm,powerpc-cpu-features {
|
||||
compatible = "ibm,powerpc-cpu-features";
|
||||
|
||||
isa = <3020>;
|
||||
|
||||
darn {
|
||||
isa = <3000>;
|
||||
usable-privilege = <1 | 2 | 4>;
|
||||
hwcap-bit-nr = <xx>;
|
||||
};
|
||||
|
||||
scv {
|
||||
isa = <3000>;
|
||||
usable-privilege = <1 | 2>;
|
||||
os-support = <0>;
|
||||
hwcap-bit-nr = <xx>;
|
||||
};
|
||||
|
||||
stop {
|
||||
isa = <3000>;
|
||||
usable-privilege = <2 | 4>;
|
||||
hv-support = <0>;
|
||||
os-support = <0>;
|
||||
};
|
||||
|
||||
vsx2 (hypothetical) {
|
||||
isa = <3010>;
|
||||
usable-privilege = <1 | 2 | 4>;
|
||||
hv-support = <0>;
|
||||
os-support = <0>;
|
||||
hwcap-bit-nr = <xx>;
|
||||
};
|
||||
|
||||
vsx2-newinsns {
|
||||
isa = <3020>;
|
||||
usable-privilege = <1 | 2 | 4>;
|
||||
os-support = <1>;
|
||||
fscr-bit-nr = <xx>;
|
||||
hwcap-bit-nr = <xx>;
|
||||
dependencies = <&vsx2>;
|
||||
};
|
||||
|
||||
};
|
|
@ -4,6 +4,7 @@ Required properties:
|
|||
- compatible: should be one of:
|
||||
- "atmel,at91sam9rl-pwm"
|
||||
- "atmel,sama5d3-pwm"
|
||||
- "atmel,sama5d2-pwm"
|
||||
- reg: physical base address and length of the controller's registers
|
||||
- #pwm-cells: Should be 3. See pwm.txt in this directory for a
|
||||
description of the cells format.
|
||||
|
|
|
@ -19,6 +19,19 @@ Required properties:
|
|||
- reset-names: Must include the following entries:
|
||||
- pwm
|
||||
|
||||
Optional properties:
|
||||
============================
|
||||
In some of the interface like PWM based regulator device, it is required
|
||||
to configure the pins differently in different states, especially in suspend
|
||||
state of the system. The configuration of pin is provided via the pinctrl
|
||||
DT node as detailed in the pinctrl DT binding document
|
||||
Documentation/devicetree/bindings/pinctrl/pinctrl-bindings.txt
|
||||
|
||||
The PWM node will have following optional properties.
|
||||
pinctrl-names: Pin state names. Must be "default" and "sleep".
|
||||
pinctrl-0: phandle for the default/active state of pin configurations.
|
||||
pinctrl-1: phandle for the sleep state of pin configurations.
|
||||
|
||||
Example:
|
||||
|
||||
pwm: pwm@7000a000 {
|
||||
|
@ -29,3 +42,35 @@ Example:
|
|||
resets = <&tegra_car 17>;
|
||||
reset-names = "pwm";
|
||||
};
|
||||
|
||||
|
||||
Example with the pin configuration for suspend and resume:
|
||||
=========================================================
|
||||
Suppose pin PE7 (On Tegra210) interfaced with the regulator device and
|
||||
it requires PWM output to be tristated when system enters suspend.
|
||||
Following will be DT binding to achieve this:
|
||||
|
||||
#include <dt-bindings/pinctrl/pinctrl-tegra.h>
|
||||
|
||||
pinmux@700008d4 {
|
||||
pwm_active_state: pwm_active_state {
|
||||
pe7 {
|
||||
nvidia,pins = "pe7";
|
||||
nvidia,tristate = <TEGRA_PIN_DISABLE>;
|
||||
};
|
||||
};
|
||||
|
||||
pwm_sleep_state: pwm_sleep_state {
|
||||
pe7 {
|
||||
nvidia,pins = "pe7";
|
||||
nvidia,tristate = <TEGRA_PIN_ENABLE>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
pwm@7000a000 {
|
||||
/* Mandatory PWM properties */
|
||||
pinctrl-names = "default", "sleep";
|
||||
pinctrl-0 = <&pwm_active_state>;
|
||||
pinctrl-1 = <&pwm_sleep_state>;
|
||||
};
|
||||
|
|
|
@ -0,0 +1,34 @@
|
|||
MediaTek PWM controller
|
||||
|
||||
Required properties:
|
||||
- compatible: should be "mediatek,<name>-pwm":
|
||||
- "mediatek,mt7623-pwm": found on mt7623 SoC.
|
||||
- reg: physical base address and length of the controller's registers.
|
||||
- #pwm-cells: must be 2. See pwm.txt in this directory for a description of
|
||||
the cell format.
|
||||
- clocks: phandle and clock specifier of the PWM reference clock.
|
||||
- clock-names: must contain the following:
|
||||
- "top": the top clock generator
|
||||
- "main": clock used by the PWM core
|
||||
- "pwm1-5": the five per PWM clocks
|
||||
- pinctrl-names: Must contain a "default" entry.
|
||||
- pinctrl-0: One property must exist for each entry in pinctrl-names.
|
||||
See pinctrl/pinctrl-bindings.txt for details of the property values.
|
||||
|
||||
Example:
|
||||
pwm0: pwm@11006000 {
|
||||
compatible = "mediatek,mt7623-pwm";
|
||||
reg = <0 0x11006000 0 0x1000>;
|
||||
#pwm-cells = <2>;
|
||||
clocks = <&topckgen CLK_TOP_PWM_SEL>,
|
||||
<&pericfg CLK_PERI_PWM>,
|
||||
<&pericfg CLK_PERI_PWM1>,
|
||||
<&pericfg CLK_PERI_PWM2>,
|
||||
<&pericfg CLK_PERI_PWM3>,
|
||||
<&pericfg CLK_PERI_PWM4>,
|
||||
<&pericfg CLK_PERI_PWM5>;
|
||||
clock-names = "top", "main", "pwm1", "pwm2",
|
||||
"pwm3", "pwm4", "pwm5";
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pwm0_pins>;
|
||||
};
|
|
@ -0,0 +1,18 @@
|
|||
Motorola CPCAP PMIC RTC
|
||||
-----------------------
|
||||
|
||||
This module is part of the CPCAP. For more details about the whole
|
||||
chip see Documentation/devicetree/bindings/mfd/motorola-cpcap.txt.
|
||||
|
||||
Requires node properties:
|
||||
- compatible: should contain "motorola,cpcap-rtc"
|
||||
- interrupts: An interrupt specifier for alarm and 1 Hz irq
|
||||
|
||||
Example:
|
||||
|
||||
&cpcap {
|
||||
cpcap_rtc: rtc {
|
||||
compatible = "motorola,cpcap-rtc";
|
||||
interrupts = <39 IRQ_TYPE_NONE>, <26 IRQ_TYPE_NONE>;
|
||||
};
|
||||
};
|
|
@ -0,0 +1,28 @@
|
|||
* Real Time Clock for Renesas SH and ARM SoCs
|
||||
|
||||
Required properties:
|
||||
- compatible: Should be "renesas,r7s72100-rtc" and "renesas,sh-rtc" as a
|
||||
fallback.
|
||||
- reg: physical base address and length of memory mapped region.
|
||||
- interrupts: 3 interrupts for alarm, period, and carry.
|
||||
- interrupt-names: The interrupts should be labeled as "alarm", "period", and
|
||||
"carry".
|
||||
- clocks: The functional clock source for the RTC controller must be listed
|
||||
first (if exists). Additionally, potential clock counting sources are to be
|
||||
listed.
|
||||
- clock-names: The functional clock must be labeled as "fck". Other clocks
|
||||
may be named in accordance to the SoC hardware manuals.
|
||||
|
||||
|
||||
Example:
|
||||
rtc: rtc@fcff1000 {
|
||||
compatible = "renesas,r7s72100-rtc", "renesas,sh-rtc";
|
||||
reg = <0xfcff1000 0x2e>;
|
||||
interrupts = <GIC_SPI 276 IRQ_TYPE_EDGE_RISING
|
||||
GIC_SPI 277 IRQ_TYPE_EDGE_RISING
|
||||
GIC_SPI 278 IRQ_TYPE_EDGE_RISING>;
|
||||
interrupt-names = "alarm", "period", "carry";
|
||||
clocks = <&mstp6_clks R7S72100_CLK_RTC>, <&rtc_x1_clk>,
|
||||
<&rtc_x3_clk>, <&extal_clk>;
|
||||
clock-names = "fck", "rtc_x1", "rtc_x3", "extal";
|
||||
};
|
|
@ -13,8 +13,17 @@ Required properties:
|
|||
- #gpio-cells : Should be two. The first cell is the pin number and the
|
||||
second cell is used to specify optional parameters (currently unused).
|
||||
- gpio-controller : Marks the port as GPIO controller.
|
||||
Optional properties:
|
||||
- fsl,cpm1-gpio-irq-mask : For banks having interrupt capability (like port C
|
||||
on CPM1), this item tells which ports have an associated interrupt (ports are
|
||||
listed in the same order as in PCINT register)
|
||||
- interrupts : This property provides the list of interrupt for each GPIO having
|
||||
one as described by the fsl,cpm1-gpio-irq-mask property. There should be as
|
||||
many interrupts as number of ones in the mask property. The first interrupt in
|
||||
the list corresponds to the most significant bit of the mask.
|
||||
- interrupt-parent : Parent for the above interrupt property.
|
||||
|
||||
Example of three SOC GPIO banks defined as gpio-controller nodes:
|
||||
Example of four SOC GPIO banks defined as gpio-controller nodes:
|
||||
|
||||
CPM1_PIO_A: gpio-controller@950 {
|
||||
#gpio-cells = <2>;
|
||||
|
@ -30,6 +39,16 @@ Example of three SOC GPIO banks defined as gpio-controller nodes:
|
|||
gpio-controller;
|
||||
};
|
||||
|
||||
CPM1_PIO_C: gpio-controller@960 {
|
||||
#gpio-cells = <2>;
|
||||
compatible = "fsl,cpm1-pario-bank-c";
|
||||
reg = <0x960 0x10>;
|
||||
fsl,cpm1-gpio-irq-mask = <0x0fff>;
|
||||
interrupts = <1 2 6 9 10 11 14 15 23 24 26 31>;
|
||||
interrupt-parent = <&CPM_PIC>;
|
||||
gpio-controller;
|
||||
};
|
||||
|
||||
CPM1_PIO_E: gpio-controller@ac8 {
|
||||
#gpio-cells = <2>;
|
||||
compatible = "fsl,cpm1-pario-bank-e";
|
||||
|
|
|
@ -3,15 +3,39 @@ Binding for Thermal Sensor driver for BCM2835 SoCs.
|
|||
Required parameters:
|
||||
-------------------
|
||||
|
||||
compatible: should be one of: "brcm,bcm2835-thermal",
|
||||
"brcm,bcm2836-thermal" or "brcm,bcm2837-thermal"
|
||||
reg: Address range of the thermal registers.
|
||||
clocks: Phandle of the clock used by the thermal sensor.
|
||||
compatible: should be one of: "brcm,bcm2835-thermal",
|
||||
"brcm,bcm2836-thermal" or "brcm,bcm2837-thermal"
|
||||
reg: Address range of the thermal registers.
|
||||
clocks: Phandle of the clock used by the thermal sensor.
|
||||
#thermal-sensor-cells: should be 0 (see thermal.txt)
|
||||
|
||||
Example:
|
||||
|
||||
thermal-zones {
|
||||
cpu_thermal: cpu-thermal {
|
||||
polling-delay-passive = <0>;
|
||||
polling-delay = <1000>;
|
||||
|
||||
thermal-sensors = <&thermal>;
|
||||
|
||||
trips {
|
||||
cpu-crit {
|
||||
temperature = <80000>;
|
||||
hysteresis = <0>;
|
||||
type = "critical";
|
||||
};
|
||||
};
|
||||
|
||||
coefficients = <(-538) 407000>;
|
||||
|
||||
cooling-maps {
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
thermal: thermal@7e212000 {
|
||||
compatible = "brcm,bcm2835-thermal";
|
||||
reg = <0x7e212000 0x8>;
|
||||
clocks = <&clocks BCM2835_CLOCK_TSENS>;
|
||||
#thermal-sensor-cells = <0>;
|
||||
};
|
||||
|
|
|
@ -0,0 +1,37 @@
|
|||
* Broadcom Northstar Thermal
|
||||
|
||||
This binding describes thermal sensor that is part of Northstar's DMU (Device
|
||||
Management Unit).
|
||||
|
||||
Required properties:
|
||||
- compatible : Must be "brcm,ns-thermal"
|
||||
- reg : iomem address range of PVTMON registers
|
||||
- #thermal-sensor-cells : Should be <0>
|
||||
|
||||
Example:
|
||||
|
||||
thermal: thermal@1800c2c0 {
|
||||
compatible = "brcm,ns-thermal";
|
||||
reg = <0x1800c2c0 0x10>;
|
||||
#thermal-sensor-cells = <0>;
|
||||
};
|
||||
|
||||
thermal-zones {
|
||||
cpu_thermal: cpu-thermal {
|
||||
polling-delay-passive = <0>;
|
||||
polling-delay = <1000>;
|
||||
coefficients = <(-556) 418000>;
|
||||
thermal-sensors = <&thermal>;
|
||||
|
||||
trips {
|
||||
cpu-crit {
|
||||
temperature = <125000>;
|
||||
hysteresis = <0>;
|
||||
type = "critical";
|
||||
};
|
||||
};
|
||||
|
||||
cooling-maps {
|
||||
};
|
||||
};
|
||||
};
|
|
@ -0,0 +1,36 @@
|
|||
* Dialog DA9062/61 TJUNC Thermal Module
|
||||
|
||||
This module is part of the DA9061/DA9062. For more details about entire
|
||||
DA9062 and DA9061 chips see Documentation/devicetree/bindings/mfd/da9062.txt
|
||||
|
||||
Junction temperature thermal module uses an interrupt signal to identify
|
||||
high THERMAL_TRIP_HOT temperatures for the PMIC device.
|
||||
|
||||
Required properties:
|
||||
|
||||
- compatible: should be one of the following valid compatible string lines:
|
||||
"dlg,da9061-thermal", "dlg,da9062-thermal"
|
||||
"dlg,da9062-thermal"
|
||||
|
||||
Optional properties:
|
||||
|
||||
- polling-delay-passive : Specify the polling period, measured in
|
||||
milliseconds, between thermal zone device update checks.
|
||||
|
||||
Example: DA9062
|
||||
|
||||
pmic0: da9062@58 {
|
||||
thermal {
|
||||
compatible = "dlg,da9062-thermal";
|
||||
polling-delay-passive = <3000>;
|
||||
};
|
||||
};
|
||||
|
||||
Example: DA9061 using a fall-back compatible for the DA9062 onkey driver
|
||||
|
||||
pmic0: da9061@58 {
|
||||
thermal {
|
||||
compatible = "dlg,da9061-thermal", "dlg,da9062-thermal";
|
||||
polling-delay-passive = <3000>;
|
||||
};
|
||||
};
|
|
@ -160,6 +160,7 @@ sii,s35390a 2-wire CMOS real-time clock
|
|||
silabs,si7020 Relative Humidity and Temperature Sensors
|
||||
skyworks,sky81452 Skyworks SKY81452: Six-Channel White LED Driver with Touch Panel Bias Supply
|
||||
st,24c256 i2c serial eeprom (24cxx)
|
||||
st,m41t0 Serial real-time clock (RTC)
|
||||
st,m41t00 Serial real-time clock (RTC)
|
||||
st,m41t62 Serial real-time clock (RTC) with alarm
|
||||
st,m41t80 M41T80 - SERIAL ACCESS RTC WITH ALARMS
|
||||
|
|
|
@ -18,10 +18,26 @@ Required properties:
|
|||
|
||||
- phy-names: Should be "usb-phy"
|
||||
|
||||
- dmas: specifies the dma channels
|
||||
|
||||
- dma-names: specifies the names of the channels. Use "rxN" for receive
|
||||
and "txN" for transmit endpoints. N specifies the endpoint number.
|
||||
|
||||
Optional properties:
|
||||
~~~~~~~~~~~~~~~~~~~~
|
||||
- vbus-supply: Phandle to a regulator providing the USB bus power.
|
||||
|
||||
DMA
|
||||
~~~
|
||||
- compatible: ti,da830-cppi41
|
||||
- reg: offset and length of the following register spaces: CPPI DMA Controller,
|
||||
CPPI DMA Scheduler, Queue Manager
|
||||
- reg-names: "controller", "scheduler", "queuemgr"
|
||||
- #dma-cells: should be set to 2. The first number represents the
|
||||
channel number (0 … 3 for endpoints 1 … 4).
|
||||
The second number is 0 for RX and 1 for TX transfers.
|
||||
- #dma-channels: should be set to 4 representing the 4 endpoints.
|
||||
|
||||
Example:
|
||||
usb_phy: usb-phy {
|
||||
compatible = "ti,da830-usb-phy";
|
||||
|
@ -30,7 +46,10 @@ Example:
|
|||
};
|
||||
usb0: usb@200000 {
|
||||
compatible = "ti,da830-musb";
|
||||
reg = <0x00200000 0x10000>;
|
||||
reg = <0x00200000 0x1000>;
|
||||
ranges;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
interrupts = <58>;
|
||||
interrupt-names = "mc";
|
||||
|
||||
|
@ -39,5 +58,25 @@ Example:
|
|||
phys = <&usb_phy 0>;
|
||||
phy-names = "usb-phy";
|
||||
|
||||
dmas = <&cppi41dma 0 0 &cppi41dma 1 0
|
||||
&cppi41dma 2 0 &cppi41dma 3 0
|
||||
&cppi41dma 0 1 &cppi41dma 1 1
|
||||
&cppi41dma 2 1 &cppi41dma 3 1>;
|
||||
dma-names =
|
||||
"rx1", "rx2", "rx3", "rx4",
|
||||
"tx1", "tx2", "tx3", "tx4";
|
||||
|
||||
status = "okay";
|
||||
|
||||
cppi41dma: dma-controller@201000 {
|
||||
compatible = "ti,da830-cppi41";
|
||||
reg = <0x201000 0x1000
|
||||
0x202000 0x1000
|
||||
0x204000 0x4000>;
|
||||
reg-names = "controller", "scheduler", "queuemgr";
|
||||
interrupts = <58>;
|
||||
#dma-cells = <2>;
|
||||
#dma-channels = <4>;
|
||||
};
|
||||
|
||||
};
|
||||
|
|
|
@ -197,6 +197,7 @@ minix MINIX Technology Ltd.
|
|||
miramems MiraMEMS Sensing Technology Co., Ltd.
|
||||
mitsubishi Mitsubishi Electric Corporation
|
||||
mosaixtech Mosaix Technologies, Inc.
|
||||
motorola Motorola, Inc.
|
||||
moxa Moxa
|
||||
mpl MPL AG
|
||||
mqmaker mqmaker Inc.
|
||||
|
|
|
@ -54,4 +54,4 @@ The first 4 bytes should be 0x1badface.
|
|||
If you have any patches, questions or suggestions regarding this BFS
|
||||
implementation please contact the author:
|
||||
|
||||
Tigran Aivazian <tigran@aivazian.fsnet.co.uk>
|
||||
Tigran Aivazian <aivazian.tigran@gmail.com>
|
||||
|
|
|
@ -64,46 +64,9 @@ table which are called by the nfs-client pnfs-core to implement the
|
|||
different layout types.
|
||||
|
||||
Files-layout-driver code is in: fs/nfs/filelayout/.. directory
|
||||
Objects-layout-driver code is in: fs/nfs/objlayout/.. directory
|
||||
Blocks-layout-driver code is in: fs/nfs/blocklayout/.. directory
|
||||
Flexfiles-layout-driver code is in: fs/nfs/flexfilelayout/.. directory
|
||||
|
||||
objects-layout setup
|
||||
--------------------
|
||||
|
||||
As part of the full STD implementation the objlayoutdriver.ko needs, at times,
|
||||
to automatically login to yet undiscovered iscsi/osd devices. For this the
|
||||
driver makes up-calles to a user-mode script called *osd_login*
|
||||
|
||||
The path_name of the script to use is by default:
|
||||
/sbin/osd_login.
|
||||
This name can be overridden by the Kernel module parameter:
|
||||
objlayoutdriver.osd_login_prog
|
||||
|
||||
If Kernel does not find the osd_login_prog path it will zero it out
|
||||
and will not attempt farther logins. An admin can then write new value
|
||||
to the objlayoutdriver.osd_login_prog Kernel parameter to re-enable it.
|
||||
|
||||
The /sbin/osd_login is part of the nfs-utils package, and should usually
|
||||
be installed on distributions that support this Kernel version.
|
||||
|
||||
The API to the login script is as follows:
|
||||
Usage: $0 -u <URI> -o <OSDNAME> -s <SYSTEMID>
|
||||
Options:
|
||||
-u target uri e.g. iscsi://<ip>:<port>
|
||||
(always exists)
|
||||
(More protocols can be defined in the future.
|
||||
The client does not interpret this string it is
|
||||
passed unchanged as received from the Server)
|
||||
-o osdname of the requested target OSD
|
||||
(Might be empty)
|
||||
(A string which denotes the OSD name, there is a
|
||||
limit of 64 chars on this string)
|
||||
-s systemid of the requested target OSD
|
||||
(Might be empty)
|
||||
(This string, if not empty is always an hex
|
||||
representation of the 20 bytes osd_system_id)
|
||||
|
||||
blocks-layout setup
|
||||
-------------------
|
||||
|
||||
|
|
|
@ -21,12 +21,19 @@ from accessing the corresponding object from the original filesystem.
|
|||
This is most obvious from the 'st_dev' field returned by stat(2).
|
||||
|
||||
While directories will report an st_dev from the overlay-filesystem,
|
||||
all non-directory objects will report an st_dev from the lower or
|
||||
non-directory objects may report an st_dev from the lower filesystem or
|
||||
upper filesystem that is providing the object. Similarly st_ino will
|
||||
only be unique when combined with st_dev, and both of these can change
|
||||
over the lifetime of a non-directory object. Many applications and
|
||||
tools ignore these values and will not be affected.
|
||||
|
||||
In the special case of all overlay layers on the same underlying
|
||||
filesystem, all objects will report an st_dev from the overlay
|
||||
filesystem and st_ino from the underlying filesystem. This will
|
||||
make the overlay mount more compliant with filesystem scanners and
|
||||
overlay objects will be distinguishable from the corresponding
|
||||
objects in the original filesystem.
|
||||
|
||||
Upper and Lower
|
||||
---------------
|
||||
|
||||
|
|
|
@ -67,6 +67,7 @@ needed).
|
|||
driver-api/index
|
||||
core-api/index
|
||||
media/index
|
||||
input/index
|
||||
gpu/index
|
||||
security/index
|
||||
sound/index
|
||||
|
|
|
@ -130,11 +130,11 @@ See <uapi/linux/input.h> for a description of the ff_effect struct. You
|
|||
should also find help in a few sketches, contained in files shape.svg
|
||||
and interactive.svg:
|
||||
|
||||
.. figure:: shape.svg
|
||||
.. kernel-figure:: shape.svg
|
||||
|
||||
Shape
|
||||
|
||||
.. figure:: interactive.svg
|
||||
.. kernel-figure:: interactive.svg
|
||||
|
||||
Interactive
|
||||
|
||||
|
|
|
@ -44,11 +44,11 @@ This document describes the Linux kernel Makefiles.
|
|||
--- 6.11 Post-link pass
|
||||
|
||||
=== 7 Kbuild syntax for exported headers
|
||||
--- 7.1 header-y
|
||||
--- 7.1 no-export-headers
|
||||
--- 7.2 genhdr-y
|
||||
--- 7.3 destination-y
|
||||
--- 7.4 generic-y
|
||||
--- 7.5 generated-y
|
||||
--- 7.3 generic-y
|
||||
--- 7.4 generated-y
|
||||
--- 7.5 mandatory-y
|
||||
|
||||
=== 8 Kbuild Variables
|
||||
=== 9 Makefile language
|
||||
|
@ -1236,7 +1236,7 @@ When kbuild executes, the following steps are followed (roughly):
|
|||
that may be shared between individual architectures.
|
||||
The recommended approach how to use a generic header file is
|
||||
to list the file in the Kbuild file.
|
||||
See "7.4 generic-y" for further info on syntax etc.
|
||||
See "7.3 generic-y" for further info on syntax etc.
|
||||
|
||||
--- 6.11 Post-link pass
|
||||
|
||||
|
@ -1263,53 +1263,32 @@ The pre-processing does:
|
|||
- drop include of compiler.h
|
||||
- drop all sections that are kernel internal (guarded by ifdef __KERNEL__)
|
||||
|
||||
Each relevant directory contains a file name "Kbuild" which specifies the
|
||||
headers to be exported.
|
||||
All headers under include/uapi/, include/generated/uapi/,
|
||||
arch/<arch>/include/uapi/ and arch/<arch>/include/generated/uapi/
|
||||
are exported.
|
||||
|
||||
A Kbuild file may be defined under arch/<arch>/include/uapi/asm/ and
|
||||
arch/<arch>/include/asm/ to list asm files coming from asm-generic.
|
||||
See subsequent chapter for the syntax of the Kbuild file.
|
||||
|
||||
--- 7.1 header-y
|
||||
--- 7.1 no-export-headers
|
||||
|
||||
header-y specifies header files to be exported.
|
||||
|
||||
Example:
|
||||
#include/linux/Kbuild
|
||||
header-y += usb/
|
||||
header-y += aio_abi.h
|
||||
|
||||
The convention is to list one file per line and
|
||||
preferably in alphabetic order.
|
||||
|
||||
header-y also specifies which subdirectories to visit.
|
||||
A subdirectory is identified by a trailing '/' which
|
||||
can be seen in the example above for the usb subdirectory.
|
||||
|
||||
Subdirectories are visited before their parent directories.
|
||||
no-export-headers is essentially used by include/uapi/linux/Kbuild to
|
||||
avoid exporting specific headers (e.g. kvm.h) on architectures that do
|
||||
not support it. It should be avoided as much as possible.
|
||||
|
||||
--- 7.2 genhdr-y
|
||||
|
||||
genhdr-y specifies generated files to be exported.
|
||||
Generated files are special as they need to be looked
|
||||
up in another directory when doing 'make O=...' builds.
|
||||
genhdr-y specifies asm files to be generated.
|
||||
|
||||
Example:
|
||||
#include/linux/Kbuild
|
||||
genhdr-y += version.h
|
||||
#arch/x86/include/uapi/asm/Kbuild
|
||||
genhdr-y += unistd_32.h
|
||||
genhdr-y += unistd_64.h
|
||||
genhdr-y += unistd_x32.h
|
||||
|
||||
--- 7.3 destination-y
|
||||
|
||||
When an architecture has a set of exported headers that needs to be
|
||||
exported to a different directory destination-y is used.
|
||||
destination-y specifies the destination directory for all exported
|
||||
headers in the file where it is present.
|
||||
|
||||
Example:
|
||||
#arch/xtensa/platforms/s6105/include/platform/Kbuild
|
||||
destination-y := include/linux
|
||||
|
||||
In the example above all exported headers in the Kbuild file
|
||||
will be located in the directory "include/linux" when exported.
|
||||
|
||||
--- 7.4 generic-y
|
||||
--- 7.3 generic-y
|
||||
|
||||
If an architecture uses a verbatim copy of a header from
|
||||
include/asm-generic then this is listed in the file
|
||||
|
@ -1336,7 +1315,7 @@ See subsequent chapter for the syntax of the Kbuild file.
|
|||
Example: termios.h
|
||||
#include <asm-generic/termios.h>
|
||||
|
||||
--- 7.5 generated-y
|
||||
--- 7.4 generated-y
|
||||
|
||||
If an architecture generates other header files alongside generic-y
|
||||
wrappers, and not included in genhdr-y, then generated-y specifies
|
||||
|
@ -1349,6 +1328,15 @@ See subsequent chapter for the syntax of the Kbuild file.
|
|||
#arch/x86/include/asm/Kbuild
|
||||
generated-y += syscalls_32.h
|
||||
|
||||
--- 7.5 mandatory-y
|
||||
|
||||
mandatory-y is essentially used by include/uapi/asm-generic/Kbuild.asm
|
||||
to define the minimun set of headers that must be exported in
|
||||
include/asm.
|
||||
|
||||
The convention is to list one subdir per line and
|
||||
preferably in alphabetic order.
|
||||
|
||||
=== 8 Kbuild Variables
|
||||
|
||||
The top Makefile exports the following variables:
|
||||
|
|
|
@ -768,7 +768,7 @@ equal to zero, in which case the compiler is within its rights to
|
|||
transform the above code into the following:
|
||||
|
||||
q = READ_ONCE(a);
|
||||
WRITE_ONCE(b, 1);
|
||||
WRITE_ONCE(b, 2);
|
||||
do_something_else();
|
||||
|
||||
Given this transformation, the CPU is not required to respect the ordering
|
||||
|
@ -2373,7 +2373,7 @@ is performed:
|
|||
spin_unlock(Q);
|
||||
|
||||
|
||||
See Documentation/DocBook/deviceiobook.tmpl for more information.
|
||||
See Documentation/driver-api/device-io.rst for more information.
|
||||
|
||||
|
||||
=================================
|
||||
|
@ -2614,7 +2614,7 @@ might be needed:
|
|||
relaxed memory access properties, then _mandatory_ memory barriers are
|
||||
required to enforce ordering.
|
||||
|
||||
See Documentation/DocBook/deviceiobook.tmpl for more information.
|
||||
See Documentation/driver-api/device-io.rst for more information.
|
||||
|
||||
|
||||
INTERRUPTS
|
||||
|
|
|
@ -0,0 +1,80 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# This script illustrates the sequence of operations in configfs to
|
||||
# create a very simple LIO iSCSI target with a file or block device
|
||||
# backstore.
|
||||
#
|
||||
# (C) Copyright 2014 Christophe Vu-Brugier <cvubrugier@fastmail.fm>
|
||||
#
|
||||
|
||||
print_usage() {
|
||||
cat <<EOF
|
||||
Usage: $(basename $0) [-p PORTAL] DEVICE|FILE
|
||||
Export a block device or a file as an iSCSI target with a single LUN
|
||||
EOF
|
||||
}
|
||||
|
||||
die() {
|
||||
echo $1
|
||||
exit 1
|
||||
}
|
||||
|
||||
while getopts "hp:" arg; do
|
||||
case $arg in
|
||||
h) print_usage; exit 0;;
|
||||
p) PORTAL=${OPTARG};;
|
||||
esac
|
||||
done
|
||||
shift $(($OPTIND - 1))
|
||||
|
||||
DEVICE=$1
|
||||
[ -n "$DEVICE" ] || die "Missing device or file argument"
|
||||
[ -b $DEVICE -o -f $DEVICE ] || die "Invalid device or file: ${DEVICE}"
|
||||
IQN="iqn.2003-01.org.linux-iscsi.$(hostname):$(basename $DEVICE)"
|
||||
[ -n "$PORTAL" ] || PORTAL="0.0.0.0:3260"
|
||||
|
||||
CONFIGFS=/sys/kernel/config
|
||||
CORE_DIR=$CONFIGFS/target/core
|
||||
ISCSI_DIR=$CONFIGFS/target/iscsi
|
||||
|
||||
# Load the target modules and mount the config file system
|
||||
lsmod | grep -q configfs || modprobe configfs
|
||||
lsmod | grep -q target_core_mod || modprobe target_core_mod
|
||||
mount | grep -q ^configfs || mount -t configfs none $CONFIGFS
|
||||
mkdir -p $ISCSI_DIR
|
||||
|
||||
# Create a backstore
|
||||
if [ -b $DEVICE ]; then
|
||||
BACKSTORE_DIR=$CORE_DIR/iblock_0/data
|
||||
mkdir -p $BACKSTORE_DIR
|
||||
echo "udev_path=${DEVICE}" > $BACKSTORE_DIR/control
|
||||
else
|
||||
BACKSTORE_DIR=$CORE_DIR/fileio_0/data
|
||||
mkdir -p $BACKSTORE_DIR
|
||||
DEVICE_SIZE=$(du -b $DEVICE | cut -f1)
|
||||
echo "fd_dev_name=${DEVICE}" > $BACKSTORE_DIR/control
|
||||
echo "fd_dev_size=${DEVICE_SIZE}" > $BACKSTORE_DIR/control
|
||||
echo 1 > $BACKSTORE_DIR/attrib/emulate_write_cache
|
||||
fi
|
||||
echo 1 > $BACKSTORE_DIR/enable
|
||||
|
||||
# Create an iSCSI target and a target portal group (TPG)
|
||||
mkdir $ISCSI_DIR/$IQN
|
||||
mkdir $ISCSI_DIR/$IQN/tpgt_1/
|
||||
|
||||
# Create a LUN
|
||||
mkdir $ISCSI_DIR/$IQN/tpgt_1/lun/lun_0
|
||||
ln -s $BACKSTORE_DIR $ISCSI_DIR/$IQN/tpgt_1/lun/lun_0/data
|
||||
echo 1 > $ISCSI_DIR/$IQN/tpgt_1/enable
|
||||
|
||||
# Create a network portal
|
||||
mkdir $ISCSI_DIR/$IQN/tpgt_1/np/$PORTAL
|
||||
|
||||
# Disable authentication
|
||||
echo 0 > $ISCSI_DIR/$IQN/tpgt_1/attrib/authentication
|
||||
echo 1 > $ISCSI_DIR/$IQN/tpgt_1/attrib/generate_node_acls
|
||||
|
||||
# Allow write access for non authenticated initiators
|
||||
echo 0 > $ISCSI_DIR/$IQN/tpgt_1/attrib/demo_mode_write_protect
|
||||
|
||||
echo "Target ${IQN}, portal ${PORTAL} has been created"
|
|
@ -582,3 +582,24 @@ platform data is provided, this uses the step_wise throttling policy.
|
|||
This function serves as an arbitrator to set the state of a cooling
|
||||
device. It sets the cooling device to the deepest cooling state if
|
||||
possible.
|
||||
|
||||
6. thermal_emergency_poweroff:
|
||||
|
||||
On an event of critical trip temperature crossing. Thermal framework
|
||||
allows the system to shutdown gracefully by calling orderly_poweroff().
|
||||
In the event of a failure of orderly_poweroff() to shut down the system
|
||||
we are in danger of keeping the system alive at undesirably high
|
||||
temperatures. To mitigate this high risk scenario we program a work
|
||||
queue to fire after a pre-determined number of seconds to start
|
||||
an emergency shutdown of the device using the kernel_power_off()
|
||||
function. In case kernel_power_off() fails then finally
|
||||
emergency_restart() is called in the worst case.
|
||||
|
||||
The delay should be carefully profiled so as to give adequate time for
|
||||
orderly_poweroff(). In case of failure of an orderly_poweroff() the
|
||||
emergency poweroff kicks in after the delay has elapsed and shuts down
|
||||
the system.
|
||||
|
||||
If set to 0 emergency poweroff will not be supported. So a carefully
|
||||
profiled non-zero positive value is a must for emergerncy poweroff to be
|
||||
triggered.
|
||||
|
|
|
@ -2343,7 +2343,7 @@ ACQUIRE VS I/O 액세스
|
|||
spin_unlock(Q);
|
||||
|
||||
|
||||
더 많은 정보를 위해선 Documenataion/DocBook/deviceiobook.tmpl 을 참고하세요.
|
||||
더 많은 정보를 위해선 Documentation/driver-api/device-io.rst 를 참고하세요.
|
||||
|
||||
|
||||
=========================
|
||||
|
@ -2578,7 +2578,7 @@ CPU 에서는 사용되는 어토믹 인스트럭션 자체에 메모리 배리
|
|||
(2) 만약 액세스 함수들이 완화된 메모리 액세스 속성을 갖는 I/O 메모리 윈도우를
|
||||
사용한다면, 순서를 강제하기 위해선 _mandatory_ 메모리 배리어가 필요합니다.
|
||||
|
||||
더 많은 정보를 위해선 Documentation/DocBook/deviceiobook.tmpl 을 참고하십시오.
|
||||
더 많은 정보를 위해선 Documentation/driver-api/device-io.rst 를 참고하십시오.
|
||||
|
||||
|
||||
인터럽트
|
||||
|
|
|
@ -32,7 +32,128 @@ Groups:
|
|||
KVM_DEV_ARM_VGIC_CTRL_INIT
|
||||
request the initialization of the ITS, no additional parameter in
|
||||
kvm_device_attr.addr.
|
||||
|
||||
KVM_DEV_ARM_ITS_SAVE_TABLES
|
||||
save the ITS table data into guest RAM, at the location provisioned
|
||||
by the guest in corresponding registers/table entries.
|
||||
|
||||
The layout of the tables in guest memory defines an ABI. The entries
|
||||
are laid out in little endian format as described in the last paragraph.
|
||||
|
||||
KVM_DEV_ARM_ITS_RESTORE_TABLES
|
||||
restore the ITS tables from guest RAM to ITS internal structures.
|
||||
|
||||
The GICV3 must be restored before the ITS and all ITS registers but
|
||||
the GITS_CTLR must be restored before restoring the ITS tables.
|
||||
|
||||
The GITS_IIDR read-only register must also be restored before
|
||||
calling KVM_DEV_ARM_ITS_RESTORE_TABLES as the IIDR revision field
|
||||
encodes the ABI revision.
|
||||
|
||||
The expected ordering when restoring the GICv3/ITS is described in section
|
||||
"ITS Restore Sequence".
|
||||
|
||||
Errors:
|
||||
-ENXIO: ITS not properly configured as required prior to setting
|
||||
this attribute
|
||||
-ENOMEM: Memory shortage when allocating ITS internal data
|
||||
-EINVAL: Inconsistent restored data
|
||||
-EFAULT: Invalid guest ram access
|
||||
-EBUSY: One or more VCPUS are running
|
||||
|
||||
KVM_DEV_ARM_VGIC_GRP_ITS_REGS
|
||||
Attributes:
|
||||
The attr field of kvm_device_attr encodes the offset of the
|
||||
ITS register, relative to the ITS control frame base address
|
||||
(ITS_base).
|
||||
|
||||
kvm_device_attr.addr points to a __u64 value whatever the width
|
||||
of the addressed register (32/64 bits). 64 bit registers can only
|
||||
be accessed with full length.
|
||||
|
||||
Writes to read-only registers are ignored by the kernel except for:
|
||||
- GITS_CREADR. It must be restored otherwise commands in the queue
|
||||
will be re-executed after restoring CWRITER. GITS_CREADR must be
|
||||
restored before restoring the GITS_CTLR which is likely to enable the
|
||||
ITS. Also it must be restored after GITS_CBASER since a write to
|
||||
GITS_CBASER resets GITS_CREADR.
|
||||
- GITS_IIDR. The Revision field encodes the table layout ABI revision.
|
||||
In the future we might implement direct injection of virtual LPIs.
|
||||
This will require an upgrade of the table layout and an evolution of
|
||||
the ABI. GITS_IIDR must be restored before calling
|
||||
KVM_DEV_ARM_ITS_RESTORE_TABLES.
|
||||
|
||||
For other registers, getting or setting a register has the same
|
||||
effect as reading/writing the register on real hardware.
|
||||
Errors:
|
||||
-ENXIO: Offset does not correspond to any supported register
|
||||
-EFAULT: Invalid user pointer for attr->addr
|
||||
-EINVAL: Offset is not 64-bit aligned
|
||||
-EBUSY: one or more VCPUS are running
|
||||
|
||||
ITS Restore Sequence:
|
||||
-------------------------
|
||||
|
||||
The following ordering must be followed when restoring the GIC and the ITS:
|
||||
a) restore all guest memory and create vcpus
|
||||
b) restore all redistributors
|
||||
c) provide the its base address
|
||||
(KVM_DEV_ARM_VGIC_GRP_ADDR)
|
||||
d) restore the ITS in the following order:
|
||||
1. Restore GITS_CBASER
|
||||
2. Restore all other GITS_ registers, except GITS_CTLR!
|
||||
3. Load the ITS table data (KVM_DEV_ARM_ITS_RESTORE_TABLES)
|
||||
4. Restore GITS_CTLR
|
||||
|
||||
Then vcpus can be started.
|
||||
|
||||
ITS Table ABI REV0:
|
||||
-------------------
|
||||
|
||||
Revision 0 of the ABI only supports the features of a virtual GICv3, and does
|
||||
not support a virtual GICv4 with support for direct injection of virtual
|
||||
interrupts for nested hypervisors.
|
||||
|
||||
The device table and ITT are indexed by the DeviceID and EventID,
|
||||
respectively. The collection table is not indexed by CollectionID, and the
|
||||
entries in the collection are listed in no particular order.
|
||||
All entries are 8 bytes.
|
||||
|
||||
Device Table Entry (DTE):
|
||||
|
||||
bits: | 63| 62 ... 49 | 48 ... 5 | 4 ... 0 |
|
||||
values: | V | next | ITT_addr | Size |
|
||||
|
||||
where;
|
||||
- V indicates whether the entry is valid. If not, other fields
|
||||
are not meaningful.
|
||||
- next: equals to 0 if this entry is the last one; otherwise it
|
||||
corresponds to the DeviceID offset to the next DTE, capped by
|
||||
2^14 -1.
|
||||
- ITT_addr matches bits [51:8] of the ITT address (256 Byte aligned).
|
||||
- Size specifies the supported number of bits for the EventID,
|
||||
minus one
|
||||
|
||||
Collection Table Entry (CTE):
|
||||
|
||||
bits: | 63| 62 .. 52 | 51 ... 16 | 15 ... 0 |
|
||||
values: | V | RES0 | RDBase | ICID |
|
||||
|
||||
where:
|
||||
- V indicates whether the entry is valid. If not, other fields are
|
||||
not meaningful.
|
||||
- RES0: reserved field with Should-Be-Zero-or-Preserved behavior.
|
||||
- RDBase is the PE number (GICR_TYPER.Processor_Number semantic),
|
||||
- ICID is the collection ID
|
||||
|
||||
Interrupt Translation Entry (ITE):
|
||||
|
||||
bits: | 63 ... 48 | 47 ... 16 | 15 ... 0 |
|
||||
values: | next | pINTID | ICID |
|
||||
|
||||
where:
|
||||
- next: equals to 0 if this entry is the last one; otherwise it corresponds
|
||||
to the EventID offset to the next ITE capped by 2^16 -1.
|
||||
- pINTID is the physical LPI ID; if zero, it means the entry is not valid
|
||||
and other fields are not meaningful.
|
||||
- ICID is the collection ID
|
||||
|
|
|
@ -167,11 +167,17 @@ Groups:
|
|||
KVM_DEV_ARM_VGIC_CTRL_INIT
|
||||
request the initialization of the VGIC, no additional parameter in
|
||||
kvm_device_attr.addr.
|
||||
KVM_DEV_ARM_VGIC_SAVE_PENDING_TABLES
|
||||
save all LPI pending bits into guest RAM pending tables.
|
||||
|
||||
The first kB of the pending table is not altered by this operation.
|
||||
Errors:
|
||||
-ENXIO: VGIC not properly configured as required prior to calling
|
||||
this attribute
|
||||
-ENODEV: no online VCPU
|
||||
-ENOMEM: memory shortage when allocating vgic internal data
|
||||
-EFAULT: Invalid guest ram access
|
||||
-EBUSY: One or more VCPUS are running
|
||||
|
||||
|
||||
KVM_DEV_ARM_VGIC_GRP_LEVEL_INFO
|
||||
|
|
|
@ -295,7 +295,7 @@ kernel and the tasks running there get 50% of the cache. They should
|
|||
also get 50% of memory bandwidth assuming that the cores 4-7 are SMT
|
||||
siblings and only the real time threads are scheduled on the cores 4-7.
|
||||
|
||||
# echo C0 > p0/cpus
|
||||
# echo F0 > p0/cpus
|
||||
|
||||
4) Locking between applications
|
||||
|
||||
|
|
25
Kbuild
25
Kbuild
|
@ -7,31 +7,6 @@
|
|||
# 4) Check for missing system calls
|
||||
# 5) Generate constants.py (may need bounds.h)
|
||||
|
||||
# Default sed regexp - multiline due to syntax constraints
|
||||
define sed-y
|
||||
"/^->/{s:->#\(.*\):/* \1 */:; \
|
||||
s:^->\([^ ]*\) [\$$#]*\([-0-9]*\) \(.*\):#define \1 \2 /* \3 */:; \
|
||||
s:^->\([^ ]*\) [\$$#]*\([^ ]*\) \(.*\):#define \1 \2 /* \3 */:; \
|
||||
s:->::; p;}"
|
||||
endef
|
||||
|
||||
# Use filechk to avoid rebuilds when a header changes, but the resulting file
|
||||
# does not
|
||||
define filechk_offsets
|
||||
(set -e; \
|
||||
echo "#ifndef $2"; \
|
||||
echo "#define $2"; \
|
||||
echo "/*"; \
|
||||
echo " * DO NOT MODIFY."; \
|
||||
echo " *"; \
|
||||
echo " * This file was generated by Kbuild"; \
|
||||
echo " */"; \
|
||||
echo ""; \
|
||||
sed -ne $(sed-y); \
|
||||
echo ""; \
|
||||
echo "#endif" )
|
||||
endef
|
||||
|
||||
#####
|
||||
# 1) Generate bounds.h
|
||||
|
||||
|
|
32
MAINTAINERS
32
MAINTAINERS
|
@ -1085,6 +1085,16 @@ F: drivers/pinctrl/meson/
|
|||
F: drivers/mmc/host/meson*
|
||||
N: meson
|
||||
|
||||
ARM/Amlogic Meson SoC CLOCK FRAMEWORK
|
||||
M: Neil Armstrong <narmstrong@baylibre.com>
|
||||
M: Jerome Brunet <jbrunet@baylibre.com>
|
||||
L: linux-amlogic@lists.infradead.org
|
||||
S: Maintained
|
||||
F: drivers/clk/meson/
|
||||
F: include/dt-bindings/clock/meson*
|
||||
F: include/dt-bindings/clock/gxbb*
|
||||
F: Documentation/devicetree/bindings/clock/amlogic*
|
||||
|
||||
ARM/Annapurna Labs ALPINE ARCHITECTURE
|
||||
M: Tsahee Zidenberg <tsahee@annapurnalabs.com>
|
||||
M: Antoine Tenart <antoine.tenart@free-electrons.com>
|
||||
|
@ -2264,7 +2274,7 @@ M: Wenyou Yang <wenyou.yang@atmel.com>
|
|||
M: Josh Wu <rainyfeeling@outlook.com>
|
||||
L: linux-mtd@lists.infradead.org
|
||||
S: Supported
|
||||
F: drivers/mtd/nand/atmel_nand*
|
||||
F: drivers/mtd/nand/atmel/*
|
||||
|
||||
ATMEL SDMMC DRIVER
|
||||
M: Ludovic Desroches <ludovic.desroches@microchip.com>
|
||||
|
@ -2473,7 +2483,7 @@ S: Maintained
|
|||
F: drivers/net/ethernet/ec_bhf.c
|
||||
|
||||
BFS FILE SYSTEM
|
||||
M: "Tigran A. Aivazian" <tigran@aivazian.fsnet.co.uk>
|
||||
M: "Tigran A. Aivazian" <aivazian.tigran@gmail.com>
|
||||
S: Maintained
|
||||
F: Documentation/filesystems/bfs.txt
|
||||
F: fs/bfs/
|
||||
|
@ -2926,6 +2936,8 @@ T: git git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs.git
|
|||
S: Maintained
|
||||
F: Documentation/filesystems/btrfs.txt
|
||||
F: fs/btrfs/
|
||||
F: include/linux/btrfs*
|
||||
F: include/uapi/linux/btrfs*
|
||||
|
||||
BTTV VIDEO4LINUX DRIVER
|
||||
M: Mauro Carvalho Chehab <mchehab@s-opensource.com>
|
||||
|
@ -5588,6 +5600,7 @@ L: linux-pm@vger.kernel.org
|
|||
S: Supported
|
||||
F: drivers/base/power/domain*.c
|
||||
F: include/linux/pm_domain.h
|
||||
F: Documentation/devicetree/bindings/power/power_domain.txt
|
||||
|
||||
GENERIC UIO DRIVER FOR PCI DEVICES
|
||||
M: "Michael S. Tsirkin" <mst@redhat.com>
|
||||
|
@ -7910,7 +7923,7 @@ L: linux-man@vger.kernel.org
|
|||
S: Maintained
|
||||
|
||||
MARDUK (CREATOR CI40) DEVICE TREE SUPPORT
|
||||
M: Rahul Bedarkar <rahul.bedarkar@imgtec.com>
|
||||
M: Rahul Bedarkar <rahulbedarkar89@gmail.com>
|
||||
L: linux-mips@linux-mips.org
|
||||
S: Maintained
|
||||
F: arch/mips/boot/dts/img/pistachio_marduk.dts
|
||||
|
@ -8363,12 +8376,12 @@ M: Brian Norris <computersforpeace@gmail.com>
|
|||
M: Boris Brezillon <boris.brezillon@free-electrons.com>
|
||||
M: Marek Vasut <marek.vasut@gmail.com>
|
||||
M: Richard Weinberger <richard@nod.at>
|
||||
M: Cyrille Pitchen <cyrille.pitchen@atmel.com>
|
||||
M: Cyrille Pitchen <cyrille.pitchen@wedev4u.fr>
|
||||
L: linux-mtd@lists.infradead.org
|
||||
W: http://www.linux-mtd.infradead.org/
|
||||
Q: http://patchwork.ozlabs.org/project/linux-mtd/list/
|
||||
T: git git://git.infradead.org/linux-mtd.git
|
||||
T: git git://git.infradead.org/l2-mtd.git
|
||||
T: git git://git.infradead.org/linux-mtd.git master
|
||||
T: git git://git.infradead.org/l2-mtd.git master
|
||||
S: Maintained
|
||||
F: Documentation/devicetree/bindings/mtd/
|
||||
F: drivers/mtd/
|
||||
|
@ -8743,7 +8756,8 @@ R: Richard Weinberger <richard@nod.at>
|
|||
L: linux-mtd@lists.infradead.org
|
||||
W: http://www.linux-mtd.infradead.org/
|
||||
Q: http://patchwork.ozlabs.org/project/linux-mtd/list/
|
||||
T: git git://github.com/linux-nand/linux.git
|
||||
T: git git://git.infradead.org/linux-mtd.git nand/fixes
|
||||
T: git git://git.infradead.org/l2-mtd.git nand/next
|
||||
S: Maintained
|
||||
F: drivers/mtd/nand/
|
||||
F: include/linux/mtd/nand*.h
|
||||
|
@ -12100,7 +12114,7 @@ S: Maintained
|
|||
F: drivers/clk/spear/
|
||||
|
||||
SPI NOR SUBSYSTEM
|
||||
M: Cyrille Pitchen <cyrille.pitchen@atmel.com>
|
||||
M: Cyrille Pitchen <cyrille.pitchen@wedev4u.fr>
|
||||
M: Marek Vasut <marek.vasut@gmail.com>
|
||||
L: linux-mtd@lists.infradead.org
|
||||
W: http://www.linux-mtd.infradead.org/
|
||||
|
@ -13553,8 +13567,8 @@ F: include/uapi/linux/virtio_*.h
|
|||
F: drivers/crypto/virtio/
|
||||
|
||||
VIRTIO DRIVERS FOR S390
|
||||
M: Christian Borntraeger <borntraeger@de.ibm.com>
|
||||
M: Cornelia Huck <cornelia.huck@de.ibm.com>
|
||||
M: Halil Pasic <pasic@linux.vnet.ibm.com>
|
||||
L: linux-s390@vger.kernel.org
|
||||
L: virtualization@lists.linux-foundation.org
|
||||
L: kvm@vger.kernel.org
|
||||
|
|
51
Makefile
51
Makefile
|
@ -1,7 +1,7 @@
|
|||
VERSION = 4
|
||||
PATCHLEVEL = 11
|
||||
PATCHLEVEL = 12
|
||||
SUBLEVEL = 0
|
||||
EXTRAVERSION =
|
||||
EXTRAVERSION = -rc1
|
||||
NAME = Fearless Coyote
|
||||
|
||||
# *DOCUMENTATION*
|
||||
|
@ -632,13 +632,9 @@ include arch/$(SRCARCH)/Makefile
|
|||
KBUILD_CFLAGS += $(call cc-option,-fno-delete-null-pointer-checks,)
|
||||
KBUILD_CFLAGS += $(call cc-disable-warning,frame-address,)
|
||||
|
||||
ifdef CONFIG_LD_DEAD_CODE_DATA_ELIMINATION
|
||||
KBUILD_CFLAGS += $(call cc-option,-ffunction-sections,)
|
||||
KBUILD_CFLAGS += $(call cc-option,-fdata-sections,)
|
||||
endif
|
||||
|
||||
ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE
|
||||
KBUILD_CFLAGS += -Os $(call cc-disable-warning,maybe-uninitialized,)
|
||||
KBUILD_CFLAGS += $(call cc-option,-Oz,-Os)
|
||||
KBUILD_CFLAGS += $(call cc-disable-warning,maybe-uninitialized,)
|
||||
else
|
||||
ifdef CONFIG_PROFILE_ALL_BRANCHES
|
||||
KBUILD_CFLAGS += -O2 $(call cc-disable-warning,maybe-uninitialized,)
|
||||
|
@ -698,8 +694,16 @@ endif
|
|||
KBUILD_CFLAGS += $(stackp-flag)
|
||||
|
||||
ifeq ($(cc-name),clang)
|
||||
ifneq ($(CROSS_COMPILE),)
|
||||
CLANG_TARGET := -target $(notdir $(CROSS_COMPILE:%-=%))
|
||||
GCC_TOOLCHAIN := $(realpath $(dir $(shell which $(LD)))/..)
|
||||
endif
|
||||
ifneq ($(GCC_TOOLCHAIN),)
|
||||
CLANG_GCC_TC := -gcc-toolchain $(GCC_TOOLCHAIN)
|
||||
endif
|
||||
KBUILD_CFLAGS += $(CLANG_TARGET) $(CLANG_GCC_TC)
|
||||
KBUILD_AFLAGS += $(CLANG_TARGET) $(CLANG_GCC_TC)
|
||||
KBUILD_CPPFLAGS += $(call cc-option,-Qunused-arguments,)
|
||||
KBUILD_CPPFLAGS += $(call cc-option,-Wno-unknown-warning-option,)
|
||||
KBUILD_CFLAGS += $(call cc-disable-warning, unused-variable)
|
||||
KBUILD_CFLAGS += $(call cc-disable-warning, format-invalid-specifier)
|
||||
KBUILD_CFLAGS += $(call cc-disable-warning, gnu)
|
||||
|
@ -710,10 +714,12 @@ KBUILD_CFLAGS += $(call cc-disable-warning, tautological-compare)
|
|||
# See modpost pattern 2
|
||||
KBUILD_CFLAGS += $(call cc-option, -mno-global-merge,)
|
||||
KBUILD_CFLAGS += $(call cc-option, -fcatch-undefined-behavior)
|
||||
KBUILD_CFLAGS += $(call cc-option, -no-integrated-as)
|
||||
KBUILD_AFLAGS += $(call cc-option, -no-integrated-as)
|
||||
else
|
||||
|
||||
# These warnings generated too much noise in a regular build.
|
||||
# Use make W=1 to enable them (see scripts/Makefile.build)
|
||||
# Use make W=1 to enable them (see scripts/Makefile.extrawarn)
|
||||
KBUILD_CFLAGS += $(call cc-disable-warning, unused-but-set-variable)
|
||||
KBUILD_CFLAGS += $(call cc-disable-warning, unused-const-variable)
|
||||
endif
|
||||
|
@ -773,6 +779,11 @@ ifdef CONFIG_DEBUG_SECTION_MISMATCH
|
|||
KBUILD_CFLAGS += $(call cc-option, -fno-inline-functions-called-once)
|
||||
endif
|
||||
|
||||
ifdef CONFIG_LD_DEAD_CODE_DATA_ELIMINATION
|
||||
KBUILD_CFLAGS += $(call cc-option,-ffunction-sections,)
|
||||
KBUILD_CFLAGS += $(call cc-option,-fdata-sections,)
|
||||
endif
|
||||
|
||||
# arch Makefile may override CC so keep this after arch Makefile is included
|
||||
NOSTDINC_FLAGS += -nostdinc -isystem $(shell $(CC) -print-file-name=include)
|
||||
CHECKFLAGS += $(NOSTDINC_FLAGS)
|
||||
|
@ -801,6 +812,9 @@ KBUILD_CFLAGS += $(call cc-option,-Werror=date-time)
|
|||
# enforce correct pointer usage
|
||||
KBUILD_CFLAGS += $(call cc-option,-Werror=incompatible-pointer-types)
|
||||
|
||||
# Require designated initializers for all marked structures
|
||||
KBUILD_CFLAGS += $(call cc-option,-Werror=designated-init)
|
||||
|
||||
# use the deterministic mode of AR if available
|
||||
KBUILD_ARFLAGS := $(call ar-option,D)
|
||||
|
||||
|
@ -815,7 +829,7 @@ KBUILD_AFLAGS += $(ARCH_AFLAGS) $(KAFLAGS)
|
|||
KBUILD_CFLAGS += $(ARCH_CFLAGS) $(KCFLAGS)
|
||||
|
||||
# Use --build-id when available.
|
||||
LDFLAGS_BUILD_ID = $(patsubst -Wl$(comma)%,%,\
|
||||
LDFLAGS_BUILD_ID := $(patsubst -Wl$(comma)%,%,\
|
||||
$(call cc-ldoption, -Wl$(comma)--build-id,))
|
||||
KBUILD_LDFLAGS_MODULE += $(LDFLAGS_BUILD_ID)
|
||||
LDFLAGS_vmlinux += $(LDFLAGS_BUILD_ID)
|
||||
|
@ -1128,7 +1142,7 @@ firmware_install:
|
|||
export INSTALL_HDR_PATH = $(objtree)/usr
|
||||
|
||||
# If we do an all arch process set dst to asm-$(hdr-arch)
|
||||
hdr-dst = $(if $(KBUILD_HEADERS), dst=include/asm-$(hdr-arch), dst=include/asm)
|
||||
hdr-dst = $(if $(KBUILD_HEADERS), dst=include/arch-$(hdr-arch), dst=include)
|
||||
|
||||
PHONY += archheaders
|
||||
archheaders:
|
||||
|
@ -1149,7 +1163,7 @@ headers_install: __headers
|
|||
$(if $(wildcard $(srctree)/arch/$(hdr-arch)/include/uapi/asm/Kbuild),, \
|
||||
$(error Headers not exportable for the $(SRCARCH) architecture))
|
||||
$(Q)$(MAKE) $(hdr-inst)=include/uapi
|
||||
$(Q)$(MAKE) $(hdr-inst)=arch/$(hdr-arch)/include/uapi/asm $(hdr-dst)
|
||||
$(Q)$(MAKE) $(hdr-inst)=arch/$(hdr-arch)/include/uapi $(hdr-dst)
|
||||
|
||||
PHONY += headers_check_all
|
||||
headers_check_all: headers_install_all
|
||||
|
@ -1158,7 +1172,7 @@ headers_check_all: headers_install_all
|
|||
PHONY += headers_check
|
||||
headers_check: headers_install
|
||||
$(Q)$(MAKE) $(hdr-inst)=include/uapi HDRCHECK=1
|
||||
$(Q)$(MAKE) $(hdr-inst)=arch/$(hdr-arch)/include/uapi/asm $(hdr-dst) HDRCHECK=1
|
||||
$(Q)$(MAKE) $(hdr-inst)=arch/$(hdr-arch)/include/uapi/ $(hdr-dst) HDRCHECK=1
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Kernel selftest
|
||||
|
@ -1315,8 +1329,8 @@ PHONY += distclean
|
|||
distclean: mrproper
|
||||
@find $(srctree) $(RCS_FIND_IGNORE) \
|
||||
\( -name '*.orig' -o -name '*.rej' -o -name '*~' \
|
||||
-o -name '*.bak' -o -name '#*#' -o -name '.*.orig' \
|
||||
-o -name '.*.rej' -o -name '*%' -o -name 'core' \) \
|
||||
-o -name '*.bak' -o -name '#*#' -o -name '*%' \
|
||||
-o -name 'core' \) \
|
||||
-type f -print | xargs rm -f
|
||||
|
||||
|
||||
|
@ -1361,6 +1375,8 @@ help:
|
|||
@echo ' (default: $$(INSTALL_MOD_PATH)/lib/firmware)'
|
||||
@echo ' dir/ - Build all files in dir and below'
|
||||
@echo ' dir/file.[ois] - Build specified target only'
|
||||
@echo ' dir/file.ll - Build the LLVM assembly file'
|
||||
@echo ' (requires compiler support for LLVM assembly generation)'
|
||||
@echo ' dir/file.lst - Build specified mixed source/assembly target only'
|
||||
@echo ' (requires a recent binutils and recent build (System.map))'
|
||||
@echo ' dir/file.ko - Build module including final link'
|
||||
|
@ -1549,6 +1565,7 @@ clean: $(clean-dirs)
|
|||
-o -name '*.symtypes' -o -name 'modules.order' \
|
||||
-o -name modules.builtin -o -name '.tmp_*.o.*' \
|
||||
-o -name '*.c.[012]*.*' \
|
||||
-o -name '*.ll' \
|
||||
-o -name '*.gcno' \) -type f -print | xargs rm -f
|
||||
|
||||
# Generate tags for editors
|
||||
|
@ -1652,6 +1669,8 @@ endif
|
|||
$(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@)
|
||||
%.symtypes: %.c prepare scripts FORCE
|
||||
$(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@)
|
||||
%.ll: %.c prepare scripts FORCE
|
||||
$(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@)
|
||||
|
||||
# Modules
|
||||
/: prepare scripts FORCE
|
||||
|
|
|
@ -324,6 +324,9 @@ config HAVE_CMPXCHG_LOCAL
|
|||
config HAVE_CMPXCHG_DOUBLE
|
||||
bool
|
||||
|
||||
config ARCH_WEAK_RELEASE_ACQUIRE
|
||||
bool
|
||||
|
||||
config ARCH_WANT_IPC_PARSE_VERSION
|
||||
bool
|
||||
|
||||
|
|
|
@ -1,43 +1,2 @@
|
|||
# UAPI Header export list
|
||||
include include/uapi/asm-generic/Kbuild.asm
|
||||
|
||||
header-y += a.out.h
|
||||
header-y += auxvec.h
|
||||
header-y += bitsperlong.h
|
||||
header-y += byteorder.h
|
||||
header-y += compiler.h
|
||||
header-y += console.h
|
||||
header-y += errno.h
|
||||
header-y += fcntl.h
|
||||
header-y += fpu.h
|
||||
header-y += gentrap.h
|
||||
header-y += ioctl.h
|
||||
header-y += ioctls.h
|
||||
header-y += ipcbuf.h
|
||||
header-y += kvm_para.h
|
||||
header-y += mman.h
|
||||
header-y += msgbuf.h
|
||||
header-y += pal.h
|
||||
header-y += param.h
|
||||
header-y += poll.h
|
||||
header-y += posix_types.h
|
||||
header-y += ptrace.h
|
||||
header-y += reg.h
|
||||
header-y += regdef.h
|
||||
header-y += resource.h
|
||||
header-y += sembuf.h
|
||||
header-y += setup.h
|
||||
header-y += shmbuf.h
|
||||
header-y += sigcontext.h
|
||||
header-y += siginfo.h
|
||||
header-y += signal.h
|
||||
header-y += socket.h
|
||||
header-y += sockios.h
|
||||
header-y += stat.h
|
||||
header-y += statfs.h
|
||||
header-y += swab.h
|
||||
header-y += sysinfo.h
|
||||
header-y += termbits.h
|
||||
header-y += termios.h
|
||||
header-y += types.h
|
||||
header-y += unistd.h
|
||||
|
|
|
@ -46,11 +46,6 @@ AFLAGS___remqu.o = -DREM
|
|||
AFLAGS___divlu.o = -DDIV -DINTSIZE
|
||||
AFLAGS___remlu.o = -DREM -DINTSIZE
|
||||
|
||||
$(obj)/__divqu.o: $(obj)/$(ev6-y)divide.S
|
||||
$(cmd_as_o_S)
|
||||
$(obj)/__remqu.o: $(obj)/$(ev6-y)divide.S
|
||||
$(cmd_as_o_S)
|
||||
$(obj)/__divlu.o: $(obj)/$(ev6-y)divide.S
|
||||
$(cmd_as_o_S)
|
||||
$(obj)/__remlu.o: $(obj)/$(ev6-y)divide.S
|
||||
$(cmd_as_o_S)
|
||||
$(addprefix $(obj)/,__divqu.o __remqu.o __divlu.o __remlu.o): \
|
||||
$(src)/$(ev6-y)divide.S FORCE
|
||||
$(call if_changed_rule,as_o_S)
|
||||
|
|
|
@ -444,6 +444,7 @@ config ARC_HAS_PAE40
|
|||
bool "Support for the 40-bit Physical Address Extension"
|
||||
default n
|
||||
depends on ISA_ARCV2
|
||||
select HIGHMEM
|
||||
help
|
||||
Enable access to physical memory beyond 4G, only supported on
|
||||
ARC cores with 40 bit Physical Addressing support
|
||||
|
|
|
@ -123,9 +123,9 @@ libs-y += arch/arc/lib/ $(LIBGCC)
|
|||
boot := arch/arc/boot
|
||||
|
||||
#default target for make without any arguments.
|
||||
KBUILD_IMAGE := bootpImage
|
||||
KBUILD_IMAGE := $(boot)/bootpImage
|
||||
|
||||
all: $(KBUILD_IMAGE)
|
||||
all: bootpImage
|
||||
bootpImage: vmlinux
|
||||
|
||||
boot_targets += uImage uImage.bin uImage.gz
|
||||
|
|
|
@ -51,7 +51,7 @@ mmcclk: mmcclk {
|
|||
pguclk: pguclk {
|
||||
#clock-cells = <0>;
|
||||
compatible = "fixed-clock";
|
||||
clock-frequency = <74440000>;
|
||||
clock-frequency = <74250000>;
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -149,12 +149,13 @@ i2c@0x1d000 {
|
|||
interrupts = <14>;
|
||||
};
|
||||
|
||||
i2c@0x1e000 {
|
||||
compatible = "snps,designware-i2c";
|
||||
i2s: i2s@1e000 {
|
||||
compatible = "snps,designware-i2s";
|
||||
reg = <0x1e000 0x100>;
|
||||
clock-frequency = <400000>;
|
||||
clocks = <&i2cclk>;
|
||||
clocks = <&i2sclk 0>;
|
||||
clock-names = "i2sclk";
|
||||
interrupts = <15>;
|
||||
#sound-dai-cells = <0>;
|
||||
};
|
||||
|
||||
i2c@0x1f000 {
|
||||
|
@ -174,6 +175,7 @@ adv7511:adv7511@39{
|
|||
adi,input-colorspace = "rgb";
|
||||
adi,input-clock = "1x";
|
||||
adi,clock-delay = <0x03>;
|
||||
#sound-dai-cells = <0>;
|
||||
|
||||
ports {
|
||||
#address-cells = <1>;
|
||||
|
@ -295,5 +297,17 @@ pgu_output: endpoint {
|
|||
};
|
||||
};
|
||||
};
|
||||
|
||||
sound_playback {
|
||||
compatible = "simple-audio-card";
|
||||
simple-audio-card,name = "AXS10x HDMI Audio";
|
||||
simple-audio-card,format = "i2s";
|
||||
simple-audio-card,cpu {
|
||||
sound-dai = <&i2s>;
|
||||
};
|
||||
simple-audio-card,codec {
|
||||
sound-dai = <&adv7511>;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
@ -62,6 +62,8 @@ extern unsigned long perip_base, perip_end;
|
|||
#define ARC_REG_IC_BCR 0x77 /* Build Config reg */
|
||||
#define ARC_REG_IC_IVIC 0x10
|
||||
#define ARC_REG_IC_CTRL 0x11
|
||||
#define ARC_REG_IC_IVIR 0x16
|
||||
#define ARC_REG_IC_ENDR 0x17
|
||||
#define ARC_REG_IC_IVIL 0x19
|
||||
#define ARC_REG_IC_PTAG 0x1E
|
||||
#define ARC_REG_IC_PTAG_HI 0x1F
|
||||
|
@ -76,6 +78,8 @@ extern unsigned long perip_base, perip_end;
|
|||
#define ARC_REG_DC_IVDL 0x4A
|
||||
#define ARC_REG_DC_FLSH 0x4B
|
||||
#define ARC_REG_DC_FLDL 0x4C
|
||||
#define ARC_REG_DC_STARTR 0x4D
|
||||
#define ARC_REG_DC_ENDR 0x4E
|
||||
#define ARC_REG_DC_PTAG 0x5C
|
||||
#define ARC_REG_DC_PTAG_HI 0x5F
|
||||
|
||||
|
@ -83,6 +87,8 @@ extern unsigned long perip_base, perip_end;
|
|||
#define DC_CTRL_DIS 0x001
|
||||
#define DC_CTRL_INV_MODE_FLUSH 0x040
|
||||
#define DC_CTRL_FLUSH_STATUS 0x100
|
||||
#define DC_CTRL_RGN_OP_INV 0x200
|
||||
#define DC_CTRL_RGN_OP_MSK 0x200
|
||||
|
||||
/*System-level cache (L2 cache) related Auxiliary registers */
|
||||
#define ARC_REG_SLC_CFG 0x901
|
||||
|
|
|
@ -9,6 +9,10 @@
|
|||
#ifndef _ASM_ARC_MMU_H
|
||||
#define _ASM_ARC_MMU_H
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
#include <linux/threads.h> /* NR_CPUS */
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_ARC_MMU_V1)
|
||||
#define CONFIG_ARC_MMU_VER 1
|
||||
#elif defined(CONFIG_ARC_MMU_V2)
|
||||
|
|
|
@ -35,11 +35,11 @@
|
|||
#ifndef _ASM_ARC_PGTABLE_H
|
||||
#define _ASM_ARC_PGTABLE_H
|
||||
|
||||
#include <asm/page.h>
|
||||
#include <asm/mmu.h>
|
||||
#include <linux/const.h>
|
||||
#define __ARCH_USE_5LEVEL_HACK
|
||||
#include <asm-generic/pgtable-nopmd.h>
|
||||
#include <linux/const.h>
|
||||
#include <asm/page.h>
|
||||
#include <asm/mmu.h> /* to propagate CONFIG_ARC_MMU_VER <n> */
|
||||
|
||||
/**************************************************************************
|
||||
* Page Table Flags
|
||||
|
|
|
@ -1,5 +1,2 @@
|
|||
# UAPI Header export list
|
||||
include include/uapi/asm-generic/Kbuild.asm
|
||||
header-y += elf.h
|
||||
header-y += page.h
|
||||
header-y += cachectl.h
|
||||
|
|
|
@ -27,6 +27,7 @@ typedef unsigned long elf_greg_t;
|
|||
typedef unsigned long elf_fpregset_t;
|
||||
|
||||
#define ELF_NGREG (sizeof(struct user_regs_struct) / sizeof(elf_greg_t))
|
||||
#define ELF_ARCV2REG (sizeof(struct user_regs_arcv2) / sizeof(elf_greg_t))
|
||||
|
||||
typedef elf_greg_t elf_gregset_t[ELF_NGREG];
|
||||
|
||||
|
|
|
@ -47,6 +47,11 @@ struct user_regs_struct {
|
|||
unsigned long efa; /* break pt addr, for break points in delay slots */
|
||||
unsigned long stop_pc; /* give dbg stop_pc after ensuring brkpt trap */
|
||||
};
|
||||
|
||||
struct user_regs_arcv2 {
|
||||
unsigned long r30, r58, r59;
|
||||
};
|
||||
|
||||
#endif /* !__ASSEMBLY__ */
|
||||
|
||||
#endif /* _UAPI__ASM_ARC_PTRACE_H */
|
||||
|
|
|
@ -184,19 +184,75 @@ static int genregs_set(struct task_struct *target,
|
|||
return ret;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_ISA_ARCV2
|
||||
static int arcv2regs_get(struct task_struct *target,
|
||||
const struct user_regset *regset,
|
||||
unsigned int pos, unsigned int count,
|
||||
void *kbuf, void __user *ubuf)
|
||||
{
|
||||
const struct pt_regs *regs = task_pt_regs(target);
|
||||
int ret, copy_sz;
|
||||
|
||||
if (IS_ENABLED(CONFIG_ARC_HAS_ACCL_REGS))
|
||||
copy_sz = sizeof(struct user_regs_arcv2);
|
||||
else
|
||||
copy_sz = 4; /* r30 only */
|
||||
|
||||
/*
|
||||
* itemized copy not needed like above as layout of regs (r30,r58,r59)
|
||||
* is exactly same in kernel (pt_regs) and userspace (user_regs_arcv2)
|
||||
*/
|
||||
ret = user_regset_copyout(&pos, &count, &kbuf, &ubuf, ®s->r30,
|
||||
0, copy_sz);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int arcv2regs_set(struct task_struct *target,
|
||||
const struct user_regset *regset,
|
||||
unsigned int pos, unsigned int count,
|
||||
const void *kbuf, const void __user *ubuf)
|
||||
{
|
||||
const struct pt_regs *regs = task_pt_regs(target);
|
||||
int ret, copy_sz;
|
||||
|
||||
if (IS_ENABLED(CONFIG_ARC_HAS_ACCL_REGS))
|
||||
copy_sz = sizeof(struct user_regs_arcv2);
|
||||
else
|
||||
copy_sz = 4; /* r30 only */
|
||||
|
||||
ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, (void *)®s->r30,
|
||||
0, copy_sz);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
enum arc_getset {
|
||||
REGSET_GENERAL,
|
||||
REGSET_CMN,
|
||||
REGSET_ARCV2,
|
||||
};
|
||||
|
||||
static const struct user_regset arc_regsets[] = {
|
||||
[REGSET_GENERAL] = {
|
||||
[REGSET_CMN] = {
|
||||
.core_note_type = NT_PRSTATUS,
|
||||
.n = ELF_NGREG,
|
||||
.size = sizeof(unsigned long),
|
||||
.align = sizeof(unsigned long),
|
||||
.get = genregs_get,
|
||||
.set = genregs_set,
|
||||
}
|
||||
},
|
||||
#ifdef CONFIG_ISA_ARCV2
|
||||
[REGSET_ARCV2] = {
|
||||
.core_note_type = NT_ARC_V2,
|
||||
.n = ELF_ARCV2REG,
|
||||
.size = sizeof(unsigned long),
|
||||
.align = sizeof(unsigned long),
|
||||
.get = arcv2regs_get,
|
||||
.set = arcv2regs_set,
|
||||
},
|
||||
#endif
|
||||
};
|
||||
|
||||
static const struct user_regset_view user_arc_view = {
|
||||
|
|
|
@ -21,6 +21,10 @@
|
|||
#include <asm/cachectl.h>
|
||||
#include <asm/setup.h>
|
||||
|
||||
#ifdef CONFIG_ISA_ARCV2
|
||||
#define USE_RGN_FLSH 1
|
||||
#endif
|
||||
|
||||
static int l2_line_sz;
|
||||
static int ioc_exists;
|
||||
int slc_enable = 1, ioc_enable = 1;
|
||||
|
@ -28,7 +32,7 @@ unsigned long perip_base = ARC_UNCACHED_ADDR_SPACE; /* legacy value for boot */
|
|||
unsigned long perip_end = 0xFFFFFFFF; /* legacy value */
|
||||
|
||||
void (*_cache_line_loop_ic_fn)(phys_addr_t paddr, unsigned long vaddr,
|
||||
unsigned long sz, const int cacheop);
|
||||
unsigned long sz, const int op, const int full_page);
|
||||
|
||||
void (*__dma_cache_wback_inv)(phys_addr_t start, unsigned long sz);
|
||||
void (*__dma_cache_inv)(phys_addr_t start, unsigned long sz);
|
||||
|
@ -233,11 +237,10 @@ void read_decode_cache_bcr(void)
|
|||
|
||||
static inline
|
||||
void __cache_line_loop_v2(phys_addr_t paddr, unsigned long vaddr,
|
||||
unsigned long sz, const int op)
|
||||
unsigned long sz, const int op, const int full_page)
|
||||
{
|
||||
unsigned int aux_cmd;
|
||||
int num_lines;
|
||||
const int full_page = __builtin_constant_p(sz) && sz == PAGE_SIZE;
|
||||
|
||||
if (op == OP_INV_IC) {
|
||||
aux_cmd = ARC_REG_IC_IVIL;
|
||||
|
@ -279,11 +282,10 @@ void __cache_line_loop_v2(phys_addr_t paddr, unsigned long vaddr,
|
|||
*/
|
||||
static inline
|
||||
void __cache_line_loop_v3(phys_addr_t paddr, unsigned long vaddr,
|
||||
unsigned long sz, const int op)
|
||||
unsigned long sz, const int op, const int full_page)
|
||||
{
|
||||
unsigned int aux_cmd, aux_tag;
|
||||
int num_lines;
|
||||
const int full_page = __builtin_constant_p(sz) && sz == PAGE_SIZE;
|
||||
|
||||
if (op == OP_INV_IC) {
|
||||
aux_cmd = ARC_REG_IC_IVIL;
|
||||
|
@ -334,6 +336,8 @@ void __cache_line_loop_v3(phys_addr_t paddr, unsigned long vaddr,
|
|||
}
|
||||
}
|
||||
|
||||
#ifndef USE_RGN_FLSH
|
||||
|
||||
/*
|
||||
* In HS38x (MMU v4), I-cache is VIPT (can alias), D-cache is PIPT
|
||||
* Here's how cache ops are implemented
|
||||
|
@ -349,17 +353,16 @@ void __cache_line_loop_v3(phys_addr_t paddr, unsigned long vaddr,
|
|||
*/
|
||||
static inline
|
||||
void __cache_line_loop_v4(phys_addr_t paddr, unsigned long vaddr,
|
||||
unsigned long sz, const int cacheop)
|
||||
unsigned long sz, const int op, const int full_page)
|
||||
{
|
||||
unsigned int aux_cmd;
|
||||
int num_lines;
|
||||
const int full_page_op = __builtin_constant_p(sz) && sz == PAGE_SIZE;
|
||||
|
||||
if (cacheop == OP_INV_IC) {
|
||||
if (op == OP_INV_IC) {
|
||||
aux_cmd = ARC_REG_IC_IVIL;
|
||||
} else {
|
||||
/* d$ cmd: INV (discard or wback-n-discard) OR FLUSH (wback) */
|
||||
aux_cmd = cacheop & OP_INV ? ARC_REG_DC_IVDL : ARC_REG_DC_FLDL;
|
||||
aux_cmd = op & OP_INV ? ARC_REG_DC_IVDL : ARC_REG_DC_FLDL;
|
||||
}
|
||||
|
||||
/* Ensure we properly floor/ceil the non-line aligned/sized requests
|
||||
|
@ -368,7 +371,7 @@ void __cache_line_loop_v4(phys_addr_t paddr, unsigned long vaddr,
|
|||
* -@paddr will be cache-line aligned already (being page aligned)
|
||||
* -@sz will be integral multiple of line size (being page sized).
|
||||
*/
|
||||
if (!full_page_op) {
|
||||
if (!full_page) {
|
||||
sz += paddr & ~CACHE_LINE_MASK;
|
||||
paddr &= CACHE_LINE_MASK;
|
||||
}
|
||||
|
@ -381,7 +384,7 @@ void __cache_line_loop_v4(phys_addr_t paddr, unsigned long vaddr,
|
|||
* - (and needs to be written before the lower 32 bits)
|
||||
*/
|
||||
if (is_pae40_enabled()) {
|
||||
if (cacheop == OP_INV_IC)
|
||||
if (op == OP_INV_IC)
|
||||
/*
|
||||
* Non aliasing I-cache in HS38,
|
||||
* aliasing I-cache handled in __cache_line_loop_v3()
|
||||
|
@ -397,6 +400,55 @@ void __cache_line_loop_v4(phys_addr_t paddr, unsigned long vaddr,
|
|||
}
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
/*
|
||||
* optimized flush operation which takes a region as opposed to iterating per line
|
||||
*/
|
||||
static inline
|
||||
void __cache_line_loop_v4(phys_addr_t paddr, unsigned long vaddr,
|
||||
unsigned long sz, const int op, const int full_page)
|
||||
{
|
||||
unsigned int s, e;
|
||||
|
||||
/* Only for Non aliasing I-cache in HS38 */
|
||||
if (op == OP_INV_IC) {
|
||||
s = ARC_REG_IC_IVIR;
|
||||
e = ARC_REG_IC_ENDR;
|
||||
} else {
|
||||
s = ARC_REG_DC_STARTR;
|
||||
e = ARC_REG_DC_ENDR;
|
||||
}
|
||||
|
||||
if (!full_page) {
|
||||
/* for any leading gap between @paddr and start of cache line */
|
||||
sz += paddr & ~CACHE_LINE_MASK;
|
||||
paddr &= CACHE_LINE_MASK;
|
||||
|
||||
/*
|
||||
* account for any trailing gap to end of cache line
|
||||
* this is equivalent to DIV_ROUND_UP() in line ops above
|
||||
*/
|
||||
sz += L1_CACHE_BYTES - 1;
|
||||
}
|
||||
|
||||
if (is_pae40_enabled()) {
|
||||
/* TBD: check if crossing 4TB boundary */
|
||||
if (op == OP_INV_IC)
|
||||
write_aux_reg(ARC_REG_IC_PTAG_HI, (u64)paddr >> 32);
|
||||
else
|
||||
write_aux_reg(ARC_REG_DC_PTAG_HI, (u64)paddr >> 32);
|
||||
}
|
||||
|
||||
/* ENDR needs to be set ahead of START */
|
||||
write_aux_reg(e, paddr + sz); /* ENDR is exclusive */
|
||||
write_aux_reg(s, paddr);
|
||||
|
||||
/* caller waits on DC_CTRL.FS */
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#if (CONFIG_ARC_MMU_VER < 3)
|
||||
#define __cache_line_loop __cache_line_loop_v2
|
||||
#elif (CONFIG_ARC_MMU_VER == 3)
|
||||
|
@ -411,6 +463,11 @@ void __cache_line_loop_v4(phys_addr_t paddr, unsigned long vaddr,
|
|||
* Machine specific helpers for Entire D-Cache or Per Line ops
|
||||
*/
|
||||
|
||||
#ifndef USE_RGN_FLSH
|
||||
/*
|
||||
* this version avoids extra read/write of DC_CTRL for flush or invalid ops
|
||||
* in the non region flush regime (such as for ARCompact)
|
||||
*/
|
||||
static inline void __before_dc_op(const int op)
|
||||
{
|
||||
if (op == OP_FLUSH_N_INV) {
|
||||
|
@ -424,6 +481,32 @@ static inline void __before_dc_op(const int op)
|
|||
}
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
static inline void __before_dc_op(const int op)
|
||||
{
|
||||
const unsigned int ctl = ARC_REG_DC_CTRL;
|
||||
unsigned int val = read_aux_reg(ctl);
|
||||
|
||||
if (op == OP_FLUSH_N_INV) {
|
||||
val |= DC_CTRL_INV_MODE_FLUSH;
|
||||
}
|
||||
|
||||
if (op != OP_INV_IC) {
|
||||
/*
|
||||
* Flush / Invalidate is provided by DC_CTRL.RNG_OP 0 or 1
|
||||
* combined Flush-n-invalidate uses DC_CTRL.IM = 1 set above
|
||||
*/
|
||||
val &= ~DC_CTRL_RGN_OP_MSK;
|
||||
if (op & OP_INV)
|
||||
val |= DC_CTRL_RGN_OP_INV;
|
||||
}
|
||||
write_aux_reg(ctl, val);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
static inline void __after_dc_op(const int op)
|
||||
{
|
||||
if (op & OP_FLUSH) {
|
||||
|
@ -486,13 +569,14 @@ static void __dc_enable(void)
|
|||
static inline void __dc_line_op(phys_addr_t paddr, unsigned long vaddr,
|
||||
unsigned long sz, const int op)
|
||||
{
|
||||
const int full_page = __builtin_constant_p(sz) && sz == PAGE_SIZE;
|
||||
unsigned long flags;
|
||||
|
||||
local_irq_save(flags);
|
||||
|
||||
__before_dc_op(op);
|
||||
|
||||
__cache_line_loop(paddr, vaddr, sz, op);
|
||||
__cache_line_loop(paddr, vaddr, sz, op, full_page);
|
||||
|
||||
__after_dc_op(op);
|
||||
|
||||
|
@ -521,10 +605,11 @@ static inline void
|
|||
__ic_line_inv_vaddr_local(phys_addr_t paddr, unsigned long vaddr,
|
||||
unsigned long sz)
|
||||
{
|
||||
const int full_page = __builtin_constant_p(sz) && sz == PAGE_SIZE;
|
||||
unsigned long flags;
|
||||
|
||||
local_irq_save(flags);
|
||||
(*_cache_line_loop_ic_fn)(paddr, vaddr, sz, OP_INV_IC);
|
||||
(*_cache_line_loop_ic_fn)(paddr, vaddr, sz, OP_INV_IC, full_page);
|
||||
local_irq_restore(flags);
|
||||
}
|
||||
|
||||
|
|
|
@ -297,10 +297,11 @@ drivers-$(CONFIG_OPROFILE) += arch/arm/oprofile/
|
|||
libs-y := arch/arm/lib/ $(libs-y)
|
||||
|
||||
# Default target when executing plain make
|
||||
boot := arch/arm/boot
|
||||
ifeq ($(CONFIG_XIP_KERNEL),y)
|
||||
KBUILD_IMAGE := xipImage
|
||||
KBUILD_IMAGE := $(boot)/xipImage
|
||||
else
|
||||
KBUILD_IMAGE := zImage
|
||||
KBUILD_IMAGE := $(boot)/zImage
|
||||
endif
|
||||
|
||||
# Build the DT binary blobs if we have OF configured
|
||||
|
@ -308,9 +309,8 @@ ifeq ($(CONFIG_USE_OF),y)
|
|||
KBUILD_DTBS := dtbs
|
||||
endif
|
||||
|
||||
all: $(KBUILD_IMAGE) $(KBUILD_DTBS)
|
||||
all: $(notdir $(KBUILD_IMAGE)) $(KBUILD_DTBS)
|
||||
|
||||
boot := arch/arm/boot
|
||||
|
||||
archheaders:
|
||||
$(Q)$(MAKE) $(build)=arch/arm/tools uapi
|
||||
|
|
|
@ -41,7 +41,7 @@
|
|||
#include <dt-bindings/gpio/gpio.h>
|
||||
#include <dt-bindings/interrupt-controller/irq.h>
|
||||
#include <dt-bindings/interrupt-controller/arm-gic.h>
|
||||
#include <dt-bindings/clock/rk1108-cru.h>
|
||||
#include <dt-bindings/clock/rv1108-cru.h>
|
||||
#include <dt-bindings/pinctrl/rockchip.h>
|
||||
/ {
|
||||
#address-cells = <1>;
|
||||
|
|
|
@ -1,23 +1,6 @@
|
|||
# UAPI Header export list
|
||||
include include/uapi/asm-generic/Kbuild.asm
|
||||
|
||||
header-y += auxvec.h
|
||||
header-y += byteorder.h
|
||||
header-y += fcntl.h
|
||||
header-y += hwcap.h
|
||||
header-y += ioctls.h
|
||||
header-y += kvm_para.h
|
||||
header-y += mman.h
|
||||
header-y += perf_regs.h
|
||||
header-y += posix_types.h
|
||||
header-y += ptrace.h
|
||||
header-y += setup.h
|
||||
header-y += sigcontext.h
|
||||
header-y += signal.h
|
||||
header-y += stat.h
|
||||
header-y += statfs.h
|
||||
header-y += swab.h
|
||||
header-y += unistd.h
|
||||
genhdr-y += unistd-common.h
|
||||
genhdr-y += unistd-oabi.h
|
||||
genhdr-y += unistd-eabi.h
|
||||
|
|
|
@ -196,13 +196,17 @@ struct kvm_arch_memory_slot {
|
|||
#define KVM_DEV_ARM_VGIC_GRP_REDIST_REGS 5
|
||||
#define KVM_DEV_ARM_VGIC_GRP_CPU_SYSREGS 6
|
||||
#define KVM_DEV_ARM_VGIC_GRP_LEVEL_INFO 7
|
||||
#define KVM_DEV_ARM_VGIC_GRP_ITS_REGS 8
|
||||
#define KVM_DEV_ARM_VGIC_LINE_LEVEL_INFO_SHIFT 10
|
||||
#define KVM_DEV_ARM_VGIC_LINE_LEVEL_INFO_MASK \
|
||||
(0x3fffffULL << KVM_DEV_ARM_VGIC_LINE_LEVEL_INFO_SHIFT)
|
||||
#define KVM_DEV_ARM_VGIC_LINE_LEVEL_INTID_MASK 0x3ff
|
||||
#define VGIC_LEVEL_INFO_LINE_LEVEL 0
|
||||
|
||||
#define KVM_DEV_ARM_VGIC_CTRL_INIT 0
|
||||
#define KVM_DEV_ARM_VGIC_CTRL_INIT 0
|
||||
#define KVM_DEV_ARM_ITS_SAVE_TABLES 1
|
||||
#define KVM_DEV_ARM_ITS_RESTORE_TABLES 2
|
||||
#define KVM_DEV_ARM_VGIC_SAVE_PENDING_TABLES 3
|
||||
|
||||
/* KVM_IRQ_LINE irq field index values */
|
||||
#define KVM_ARM_IRQ_TYPE_SHIFT 24
|
||||
|
|
|
@ -40,8 +40,15 @@
|
|||
#ifdef CONFIG_MMU
|
||||
void *module_alloc(unsigned long size)
|
||||
{
|
||||
void *p = __vmalloc_node_range(size, 1, MODULES_VADDR, MODULES_END,
|
||||
GFP_KERNEL, PAGE_KERNEL_EXEC, 0, NUMA_NO_NODE,
|
||||
gfp_t gfp_mask = GFP_KERNEL;
|
||||
void *p;
|
||||
|
||||
/* Silence the initial allocation */
|
||||
if (IS_ENABLED(CONFIG_ARM_MODULE_PLTS))
|
||||
gfp_mask |= __GFP_NOWARN;
|
||||
|
||||
p = __vmalloc_node_range(size, 1, MODULES_VADDR, MODULES_END,
|
||||
gfp_mask, PAGE_KERNEL_EXEC, 0, NUMA_NO_NODE,
|
||||
__builtin_return_address(0));
|
||||
if (!IS_ENABLED(CONFIG_ARM_MODULE_PLTS) || p)
|
||||
return p;
|
||||
|
|
|
@ -18,9 +18,12 @@ KVM := ../../../virt/kvm
|
|||
kvm-arm-y = $(KVM)/kvm_main.o $(KVM)/coalesced_mmio.o $(KVM)/eventfd.o $(KVM)/vfio.o
|
||||
|
||||
obj-$(CONFIG_KVM_ARM_HOST) += hyp/
|
||||
|
||||
obj-y += kvm-arm.o init.o interrupts.o
|
||||
obj-y += arm.o handle_exit.o guest.o mmu.o emulate.o reset.o
|
||||
obj-y += coproc.o coproc_a15.o coproc_a7.o mmio.o psci.o perf.o vgic-v3-coproc.o
|
||||
obj-y += handle_exit.o guest.o emulate.o reset.o
|
||||
obj-y += coproc.o coproc_a15.o coproc_a7.o vgic-v3-coproc.o
|
||||
obj-y += $(KVM)/arm/arm.o $(KVM)/arm/mmu.o $(KVM)/arm/mmio.o
|
||||
obj-y += $(KVM)/arm/psci.o $(KVM)/arm/perf.o
|
||||
obj-y += $(KVM)/arm/aarch32.o
|
||||
|
||||
obj-y += $(KVM)/arm/vgic/vgic.o
|
||||
|
|
|
@ -6,133 +6,6 @@
|
|||
#undef TRACE_SYSTEM
|
||||
#define TRACE_SYSTEM kvm
|
||||
|
||||
/*
|
||||
* Tracepoints for entry/exit to guest
|
||||
*/
|
||||
TRACE_EVENT(kvm_entry,
|
||||
TP_PROTO(unsigned long vcpu_pc),
|
||||
TP_ARGS(vcpu_pc),
|
||||
|
||||
TP_STRUCT__entry(
|
||||
__field( unsigned long, vcpu_pc )
|
||||
),
|
||||
|
||||
TP_fast_assign(
|
||||
__entry->vcpu_pc = vcpu_pc;
|
||||
),
|
||||
|
||||
TP_printk("PC: 0x%08lx", __entry->vcpu_pc)
|
||||
);
|
||||
|
||||
TRACE_EVENT(kvm_exit,
|
||||
TP_PROTO(int idx, unsigned int exit_reason, unsigned long vcpu_pc),
|
||||
TP_ARGS(idx, exit_reason, vcpu_pc),
|
||||
|
||||
TP_STRUCT__entry(
|
||||
__field( int, idx )
|
||||
__field( unsigned int, exit_reason )
|
||||
__field( unsigned long, vcpu_pc )
|
||||
),
|
||||
|
||||
TP_fast_assign(
|
||||
__entry->idx = idx;
|
||||
__entry->exit_reason = exit_reason;
|
||||
__entry->vcpu_pc = vcpu_pc;
|
||||
),
|
||||
|
||||
TP_printk("%s: HSR_EC: 0x%04x (%s), PC: 0x%08lx",
|
||||
__print_symbolic(__entry->idx, kvm_arm_exception_type),
|
||||
__entry->exit_reason,
|
||||
__print_symbolic(__entry->exit_reason, kvm_arm_exception_class),
|
||||
__entry->vcpu_pc)
|
||||
);
|
||||
|
||||
TRACE_EVENT(kvm_guest_fault,
|
||||
TP_PROTO(unsigned long vcpu_pc, unsigned long hsr,
|
||||
unsigned long hxfar,
|
||||
unsigned long long ipa),
|
||||
TP_ARGS(vcpu_pc, hsr, hxfar, ipa),
|
||||
|
||||
TP_STRUCT__entry(
|
||||
__field( unsigned long, vcpu_pc )
|
||||
__field( unsigned long, hsr )
|
||||
__field( unsigned long, hxfar )
|
||||
__field( unsigned long long, ipa )
|
||||
),
|
||||
|
||||
TP_fast_assign(
|
||||
__entry->vcpu_pc = vcpu_pc;
|
||||
__entry->hsr = hsr;
|
||||
__entry->hxfar = hxfar;
|
||||
__entry->ipa = ipa;
|
||||
),
|
||||
|
||||
TP_printk("ipa %#llx, hsr %#08lx, hxfar %#08lx, pc %#08lx",
|
||||
__entry->ipa, __entry->hsr,
|
||||
__entry->hxfar, __entry->vcpu_pc)
|
||||
);
|
||||
|
||||
TRACE_EVENT(kvm_access_fault,
|
||||
TP_PROTO(unsigned long ipa),
|
||||
TP_ARGS(ipa),
|
||||
|
||||
TP_STRUCT__entry(
|
||||
__field( unsigned long, ipa )
|
||||
),
|
||||
|
||||
TP_fast_assign(
|
||||
__entry->ipa = ipa;
|
||||
),
|
||||
|
||||
TP_printk("IPA: %lx", __entry->ipa)
|
||||
);
|
||||
|
||||
TRACE_EVENT(kvm_irq_line,
|
||||
TP_PROTO(unsigned int type, int vcpu_idx, int irq_num, int level),
|
||||
TP_ARGS(type, vcpu_idx, irq_num, level),
|
||||
|
||||
TP_STRUCT__entry(
|
||||
__field( unsigned int, type )
|
||||
__field( int, vcpu_idx )
|
||||
__field( int, irq_num )
|
||||
__field( int, level )
|
||||
),
|
||||
|
||||
TP_fast_assign(
|
||||
__entry->type = type;
|
||||
__entry->vcpu_idx = vcpu_idx;
|
||||
__entry->irq_num = irq_num;
|
||||
__entry->level = level;
|
||||
),
|
||||
|
||||
TP_printk("Inject %s interrupt (%d), vcpu->idx: %d, num: %d, level: %d",
|
||||
(__entry->type == KVM_ARM_IRQ_TYPE_CPU) ? "CPU" :
|
||||
(__entry->type == KVM_ARM_IRQ_TYPE_PPI) ? "VGIC PPI" :
|
||||
(__entry->type == KVM_ARM_IRQ_TYPE_SPI) ? "VGIC SPI" : "UNKNOWN",
|
||||
__entry->type, __entry->vcpu_idx, __entry->irq_num, __entry->level)
|
||||
);
|
||||
|
||||
TRACE_EVENT(kvm_mmio_emulate,
|
||||
TP_PROTO(unsigned long vcpu_pc, unsigned long instr,
|
||||
unsigned long cpsr),
|
||||
TP_ARGS(vcpu_pc, instr, cpsr),
|
||||
|
||||
TP_STRUCT__entry(
|
||||
__field( unsigned long, vcpu_pc )
|
||||
__field( unsigned long, instr )
|
||||
__field( unsigned long, cpsr )
|
||||
),
|
||||
|
||||
TP_fast_assign(
|
||||
__entry->vcpu_pc = vcpu_pc;
|
||||
__entry->instr = instr;
|
||||
__entry->cpsr = cpsr;
|
||||
),
|
||||
|
||||
TP_printk("Emulate MMIO at: 0x%08lx (instr: %08lx, cpsr: %08lx)",
|
||||
__entry->vcpu_pc, __entry->instr, __entry->cpsr)
|
||||
);
|
||||
|
||||
/* Architecturally implementation defined CP15 register access */
|
||||
TRACE_EVENT(kvm_emulate_cp15_imp,
|
||||
TP_PROTO(unsigned long Op1, unsigned long Rt1, unsigned long CRn,
|
||||
|
@ -181,87 +54,6 @@ TRACE_EVENT(kvm_wfx,
|
|||
__entry->is_wfe ? 'e' : 'i', __entry->vcpu_pc)
|
||||
);
|
||||
|
||||
TRACE_EVENT(kvm_unmap_hva,
|
||||
TP_PROTO(unsigned long hva),
|
||||
TP_ARGS(hva),
|
||||
|
||||
TP_STRUCT__entry(
|
||||
__field( unsigned long, hva )
|
||||
),
|
||||
|
||||
TP_fast_assign(
|
||||
__entry->hva = hva;
|
||||
),
|
||||
|
||||
TP_printk("mmu notifier unmap hva: %#08lx", __entry->hva)
|
||||
);
|
||||
|
||||
TRACE_EVENT(kvm_unmap_hva_range,
|
||||
TP_PROTO(unsigned long start, unsigned long end),
|
||||
TP_ARGS(start, end),
|
||||
|
||||
TP_STRUCT__entry(
|
||||
__field( unsigned long, start )
|
||||
__field( unsigned long, end )
|
||||
),
|
||||
|
||||
TP_fast_assign(
|
||||
__entry->start = start;
|
||||
__entry->end = end;
|
||||
),
|
||||
|
||||
TP_printk("mmu notifier unmap range: %#08lx -- %#08lx",
|
||||
__entry->start, __entry->end)
|
||||
);
|
||||
|
||||
TRACE_EVENT(kvm_set_spte_hva,
|
||||
TP_PROTO(unsigned long hva),
|
||||
TP_ARGS(hva),
|
||||
|
||||
TP_STRUCT__entry(
|
||||
__field( unsigned long, hva )
|
||||
),
|
||||
|
||||
TP_fast_assign(
|
||||
__entry->hva = hva;
|
||||
),
|
||||
|
||||
TP_printk("mmu notifier set pte hva: %#08lx", __entry->hva)
|
||||
);
|
||||
|
||||
TRACE_EVENT(kvm_age_hva,
|
||||
TP_PROTO(unsigned long start, unsigned long end),
|
||||
TP_ARGS(start, end),
|
||||
|
||||
TP_STRUCT__entry(
|
||||
__field( unsigned long, start )
|
||||
__field( unsigned long, end )
|
||||
),
|
||||
|
||||
TP_fast_assign(
|
||||
__entry->start = start;
|
||||
__entry->end = end;
|
||||
),
|
||||
|
||||
TP_printk("mmu notifier age hva: %#08lx -- %#08lx",
|
||||
__entry->start, __entry->end)
|
||||
);
|
||||
|
||||
TRACE_EVENT(kvm_test_age_hva,
|
||||
TP_PROTO(unsigned long hva),
|
||||
TP_ARGS(hva),
|
||||
|
||||
TP_STRUCT__entry(
|
||||
__field( unsigned long, hva )
|
||||
),
|
||||
|
||||
TP_fast_assign(
|
||||
__entry->hva = hva;
|
||||
),
|
||||
|
||||
TP_printk("mmu notifier test age hva: %#08lx", __entry->hva)
|
||||
);
|
||||
|
||||
TRACE_EVENT(kvm_hvc,
|
||||
TP_PROTO(unsigned long vcpu_pc, unsigned long r0, unsigned long imm),
|
||||
TP_ARGS(vcpu_pc, r0, imm),
|
||||
|
@ -282,45 +74,6 @@ TRACE_EVENT(kvm_hvc,
|
|||
__entry->vcpu_pc, __entry->r0, __entry->imm)
|
||||
);
|
||||
|
||||
TRACE_EVENT(kvm_set_way_flush,
|
||||
TP_PROTO(unsigned long vcpu_pc, bool cache),
|
||||
TP_ARGS(vcpu_pc, cache),
|
||||
|
||||
TP_STRUCT__entry(
|
||||
__field( unsigned long, vcpu_pc )
|
||||
__field( bool, cache )
|
||||
),
|
||||
|
||||
TP_fast_assign(
|
||||
__entry->vcpu_pc = vcpu_pc;
|
||||
__entry->cache = cache;
|
||||
),
|
||||
|
||||
TP_printk("S/W flush at 0x%016lx (cache %s)",
|
||||
__entry->vcpu_pc, __entry->cache ? "on" : "off")
|
||||
);
|
||||
|
||||
TRACE_EVENT(kvm_toggle_cache,
|
||||
TP_PROTO(unsigned long vcpu_pc, bool was, bool now),
|
||||
TP_ARGS(vcpu_pc, was, now),
|
||||
|
||||
TP_STRUCT__entry(
|
||||
__field( unsigned long, vcpu_pc )
|
||||
__field( bool, was )
|
||||
__field( bool, now )
|
||||
),
|
||||
|
||||
TP_fast_assign(
|
||||
__entry->vcpu_pc = vcpu_pc;
|
||||
__entry->was = was;
|
||||
__entry->now = now;
|
||||
),
|
||||
|
||||
TP_printk("VM op at 0x%016lx (cache was %s, now %s)",
|
||||
__entry->vcpu_pc, __entry->was ? "on" : "off",
|
||||
__entry->now ? "on" : "off")
|
||||
);
|
||||
|
||||
#endif /* _TRACE_KVM_H */
|
||||
|
||||
#undef TRACE_INCLUDE_PATH
|
||||
|
|
|
@ -138,7 +138,8 @@ int omap2_reprogram_dpllcore(struct clk_hw *hw, unsigned long rate,
|
|||
if (!dd)
|
||||
return -EINVAL;
|
||||
|
||||
tmpset.cm_clksel1_pll = readl_relaxed(dd->mult_div1_reg);
|
||||
tmpset.cm_clksel1_pll =
|
||||
omap_clk_ll_ops.clk_readl(&dd->mult_div1_reg);
|
||||
tmpset.cm_clksel1_pll &= ~(dd->mult_mask |
|
||||
dd->div1_mask);
|
||||
div = ((curr_prcm_set->xtal_speed / 1000000) - 1);
|
||||
|
|
|
@ -54,9 +54,10 @@ u16 cpu_mask;
|
|||
#define OMAP3PLUS_DPLL_FINT_MIN 32000
|
||||
#define OMAP3PLUS_DPLL_FINT_MAX 52000000
|
||||
|
||||
static struct ti_clk_ll_ops omap_clk_ll_ops = {
|
||||
struct ti_clk_ll_ops omap_clk_ll_ops = {
|
||||
.clkdm_clk_enable = clkdm_clk_enable,
|
||||
.clkdm_clk_disable = clkdm_clk_disable,
|
||||
.clkdm_lookup = clkdm_lookup,
|
||||
.cm_wait_module_ready = omap_cm_wait_module_ready,
|
||||
.cm_split_idlest_reg = cm_split_idlest_reg,
|
||||
};
|
||||
|
@ -78,38 +79,6 @@ int __init omap2_clk_setup_ll_ops(void)
|
|||
* OMAP2+ specific clock functions
|
||||
*/
|
||||
|
||||
/* Public functions */
|
||||
|
||||
/**
|
||||
* omap2_init_clk_clkdm - look up a clockdomain name, store pointer in clk
|
||||
* @clk: OMAP clock struct ptr to use
|
||||
*
|
||||
* Convert a clockdomain name stored in a struct clk 'clk' into a
|
||||
* clockdomain pointer, and save it into the struct clk. Intended to be
|
||||
* called during clk_register(). No return value.
|
||||
*/
|
||||
void omap2_init_clk_clkdm(struct clk_hw *hw)
|
||||
{
|
||||
struct clk_hw_omap *clk = to_clk_hw_omap(hw);
|
||||
struct clockdomain *clkdm;
|
||||
const char *clk_name;
|
||||
|
||||
if (!clk->clkdm_name)
|
||||
return;
|
||||
|
||||
clk_name = __clk_get_name(hw->clk);
|
||||
|
||||
clkdm = clkdm_lookup(clk->clkdm_name);
|
||||
if (clkdm) {
|
||||
pr_debug("clock: associated clk %s to clkdm %s\n",
|
||||
clk_name, clk->clkdm_name);
|
||||
clk->clkdm = clkdm;
|
||||
} else {
|
||||
pr_debug("clock: could not associate clk %s to clkdm %s\n",
|
||||
clk_name, clk->clkdm_name);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* ti_clk_init_features - init clock features struct for the SoC
|
||||
*
|
||||
|
|
|
@ -64,6 +64,8 @@
|
|||
#define OMAP4XXX_EN_DPLL_FRBYPASS 0x6
|
||||
#define OMAP4XXX_EN_DPLL_LOCKED 0x7
|
||||
|
||||
extern struct ti_clk_ll_ops omap_clk_ll_ops;
|
||||
|
||||
extern u16 cpu_mask;
|
||||
|
||||
extern const struct clkops clkops_omap2_dflt_wait;
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
#define MAX_MODULE_READY_TIME 2000
|
||||
|
||||
# ifndef __ASSEMBLER__
|
||||
#include <linux/clk/ti.h>
|
||||
extern void __iomem *cm_base;
|
||||
extern void __iomem *cm2_base;
|
||||
extern void omap2_set_globals_cm(void __iomem *cm, void __iomem *cm2);
|
||||
|
@ -50,7 +51,7 @@ extern void omap2_set_globals_cm(void __iomem *cm, void __iomem *cm2);
|
|||
* @module_disable: ptr to the SoC CM-specific module_disable impl
|
||||
*/
|
||||
struct cm_ll_data {
|
||||
int (*split_idlest_reg)(void __iomem *idlest_reg, s16 *prcm_inst,
|
||||
int (*split_idlest_reg)(struct clk_omap_reg *idlest_reg, s16 *prcm_inst,
|
||||
u8 *idlest_reg_id);
|
||||
int (*wait_module_ready)(u8 part, s16 prcm_mod, u16 idlest_reg,
|
||||
u8 idlest_shift);
|
||||
|
@ -60,7 +61,7 @@ struct cm_ll_data {
|
|||
void (*module_disable)(u8 part, u16 inst, u16 clkctrl_offs);
|
||||
};
|
||||
|
||||
extern int cm_split_idlest_reg(void __iomem *idlest_reg, s16 *prcm_inst,
|
||||
extern int cm_split_idlest_reg(struct clk_omap_reg *idlest_reg, s16 *prcm_inst,
|
||||
u8 *idlest_reg_id);
|
||||
int omap_cm_wait_module_ready(u8 part, s16 prcm_mod, u16 idlest_reg,
|
||||
u8 idlest_shift);
|
||||
|
|
|
@ -204,7 +204,7 @@ void omap2xxx_cm_apll96_disable(void)
|
|||
* XXX This function is only needed until absolute register addresses are
|
||||
* removed from the OMAP struct clk records.
|
||||
*/
|
||||
static int omap2xxx_cm_split_idlest_reg(void __iomem *idlest_reg,
|
||||
static int omap2xxx_cm_split_idlest_reg(struct clk_omap_reg *idlest_reg,
|
||||
s16 *prcm_inst,
|
||||
u8 *idlest_reg_id)
|
||||
{
|
||||
|
@ -212,10 +212,7 @@ static int omap2xxx_cm_split_idlest_reg(void __iomem *idlest_reg,
|
|||
u8 idlest_offs;
|
||||
int i;
|
||||
|
||||
if (idlest_reg < cm_base || idlest_reg > (cm_base + 0x0fff))
|
||||
return -EINVAL;
|
||||
|
||||
idlest_offs = (unsigned long)idlest_reg & 0xff;
|
||||
idlest_offs = idlest_reg->offset & 0xff;
|
||||
for (i = 0; i < ARRAY_SIZE(omap2xxx_cm_idlest_offs); i++) {
|
||||
if (idlest_offs == omap2xxx_cm_idlest_offs[i]) {
|
||||
*idlest_reg_id = i + 1;
|
||||
|
@ -226,7 +223,7 @@ static int omap2xxx_cm_split_idlest_reg(void __iomem *idlest_reg,
|
|||
if (i == ARRAY_SIZE(omap2xxx_cm_idlest_offs))
|
||||
return -EINVAL;
|
||||
|
||||
offs = idlest_reg - cm_base;
|
||||
offs = idlest_reg->offset;
|
||||
offs &= 0xff00;
|
||||
*prcm_inst = offs;
|
||||
|
||||
|
|
|
@ -118,7 +118,7 @@ static int omap3xxx_cm_wait_module_ready(u8 part, s16 prcm_mod, u16 idlest_id,
|
|||
* XXX This function is only needed until absolute register addresses are
|
||||
* removed from the OMAP struct clk records.
|
||||
*/
|
||||
static int omap3xxx_cm_split_idlest_reg(void __iomem *idlest_reg,
|
||||
static int omap3xxx_cm_split_idlest_reg(struct clk_omap_reg *idlest_reg,
|
||||
s16 *prcm_inst,
|
||||
u8 *idlest_reg_id)
|
||||
{
|
||||
|
@ -126,11 +126,7 @@ static int omap3xxx_cm_split_idlest_reg(void __iomem *idlest_reg,
|
|||
u8 idlest_offs;
|
||||
int i;
|
||||
|
||||
if (idlest_reg < (cm_base + OMAP3430_IVA2_MOD) ||
|
||||
idlest_reg > (cm_base + 0x1ffff))
|
||||
return -EINVAL;
|
||||
|
||||
idlest_offs = (unsigned long)idlest_reg & 0xff;
|
||||
idlest_offs = idlest_reg->offset & 0xff;
|
||||
for (i = 0; i < ARRAY_SIZE(omap3xxx_cm_idlest_offs); i++) {
|
||||
if (idlest_offs == omap3xxx_cm_idlest_offs[i]) {
|
||||
*idlest_reg_id = i + 1;
|
||||
|
@ -141,7 +137,7 @@ static int omap3xxx_cm_split_idlest_reg(void __iomem *idlest_reg,
|
|||
if (i == ARRAY_SIZE(omap3xxx_cm_idlest_offs))
|
||||
return -EINVAL;
|
||||
|
||||
offs = idlest_reg - cm_base;
|
||||
offs = idlest_reg->offset;
|
||||
offs &= 0xff00;
|
||||
*prcm_inst = offs;
|
||||
|
||||
|
|
|
@ -65,7 +65,7 @@ void __init omap2_set_globals_cm(void __iomem *cm, void __iomem *cm2)
|
|||
* or 0 upon success. XXX This function is only needed until absolute
|
||||
* register addresses are removed from the OMAP struct clk records.
|
||||
*/
|
||||
int cm_split_idlest_reg(void __iomem *idlest_reg, s16 *prcm_inst,
|
||||
int cm_split_idlest_reg(struct clk_omap_reg *idlest_reg, s16 *prcm_inst,
|
||||
u8 *idlest_reg_id)
|
||||
{
|
||||
if (!cm_ll_data->split_idlest_reg) {
|
||||
|
|
|
@ -2408,6 +2408,15 @@ void arch_setup_dma_ops(struct device *dev, u64 dma_base, u64 size,
|
|||
const struct dma_map_ops *dma_ops;
|
||||
|
||||
dev->archdata.dma_coherent = coherent;
|
||||
|
||||
/*
|
||||
* Don't override the dma_ops if they have already been set. Ideally
|
||||
* this should be the only location where dma_ops are set, remove this
|
||||
* check when all other callers of set_dma_ops will have disappeared.
|
||||
*/
|
||||
if (dev->dma_ops)
|
||||
return;
|
||||
|
||||
if (arm_setup_iommu_dma_ops(dev, dma_base, size, iommu))
|
||||
dma_ops = arm_get_iommu_dma_map_ops(coherent);
|
||||
else
|
||||
|
|
|
@ -10,7 +10,6 @@
|
|||
* published by the Free Software Foundation.
|
||||
*/
|
||||
|
||||
#include <linux/amba/pl330.h>
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/types.h>
|
||||
#include <linux/interrupt.h>
|
||||
|
|
|
@ -102,12 +102,12 @@ libs-y := arch/arm64/lib/ $(libs-y)
|
|||
core-$(CONFIG_EFI_STUB) += $(objtree)/drivers/firmware/efi/libstub/lib.a
|
||||
|
||||
# Default target when executing plain make
|
||||
KBUILD_IMAGE := Image.gz
|
||||
boot := arch/arm64/boot
|
||||
KBUILD_IMAGE := $(boot)/Image.gz
|
||||
KBUILD_DTBS := dtbs
|
||||
|
||||
all: $(KBUILD_IMAGE) $(KBUILD_DTBS)
|
||||
all: Image.gz $(KBUILD_DTBS)
|
||||
|
||||
boot := arch/arm64/boot
|
||||
|
||||
Image: vmlinux
|
||||
$(Q)$(MAKE) $(build)=$(boot) $(boot)/$@
|
||||
|
|
|
@ -62,4 +62,13 @@ alternative_if ARM64_ALT_PAN_NOT_UAO
|
|||
alternative_else_nop_endif
|
||||
.endm
|
||||
|
||||
/*
|
||||
* Remove the address tag from a virtual address, if present.
|
||||
*/
|
||||
.macro clear_address_tag, dst, addr
|
||||
tst \addr, #(1 << 55)
|
||||
bic \dst, \addr, #(0xff << 56)
|
||||
csel \dst, \dst, \addr, eq
|
||||
.endm
|
||||
|
||||
#endif
|
||||
|
|
|
@ -322,7 +322,7 @@ static inline void atomic64_and(long i, atomic64_t *v)
|
|||
#define ATOMIC64_FETCH_OP_AND(name, mb, cl...) \
|
||||
static inline long atomic64_fetch_and##name(long i, atomic64_t *v) \
|
||||
{ \
|
||||
register long x0 asm ("w0") = i; \
|
||||
register long x0 asm ("x0") = i; \
|
||||
register atomic64_t *x1 asm ("x1") = v; \
|
||||
\
|
||||
asm volatile(ARM64_LSE_ATOMIC_INSN( \
|
||||
|
@ -394,7 +394,7 @@ ATOMIC64_OP_SUB_RETURN( , al, "memory")
|
|||
#define ATOMIC64_FETCH_OP_SUB(name, mb, cl...) \
|
||||
static inline long atomic64_fetch_sub##name(long i, atomic64_t *v) \
|
||||
{ \
|
||||
register long x0 asm ("w0") = i; \
|
||||
register long x0 asm ("x0") = i; \
|
||||
register atomic64_t *x1 asm ("x1") = v; \
|
||||
\
|
||||
asm volatile(ARM64_LSE_ATOMIC_INSN( \
|
||||
|
|
|
@ -42,25 +42,35 @@
|
|||
#define __smp_rmb() dmb(ishld)
|
||||
#define __smp_wmb() dmb(ishst)
|
||||
|
||||
#define __smp_store_release(p, v) \
|
||||
#define __smp_store_release(p, v) \
|
||||
do { \
|
||||
union { typeof(*p) __val; char __c[1]; } __u = \
|
||||
{ .__val = (__force typeof(*p)) (v) }; \
|
||||
compiletime_assert_atomic_type(*p); \
|
||||
switch (sizeof(*p)) { \
|
||||
case 1: \
|
||||
asm volatile ("stlrb %w1, %0" \
|
||||
: "=Q" (*p) : "r" (v) : "memory"); \
|
||||
: "=Q" (*p) \
|
||||
: "r" (*(__u8 *)__u.__c) \
|
||||
: "memory"); \
|
||||
break; \
|
||||
case 2: \
|
||||
asm volatile ("stlrh %w1, %0" \
|
||||
: "=Q" (*p) : "r" (v) : "memory"); \
|
||||
: "=Q" (*p) \
|
||||
: "r" (*(__u16 *)__u.__c) \
|
||||
: "memory"); \
|
||||
break; \
|
||||
case 4: \
|
||||
asm volatile ("stlr %w1, %0" \
|
||||
: "=Q" (*p) : "r" (v) : "memory"); \
|
||||
: "=Q" (*p) \
|
||||
: "r" (*(__u32 *)__u.__c) \
|
||||
: "memory"); \
|
||||
break; \
|
||||
case 8: \
|
||||
asm volatile ("stlr %1, %0" \
|
||||
: "=Q" (*p) : "r" (v) : "memory"); \
|
||||
: "=Q" (*p) \
|
||||
: "r" (*(__u64 *)__u.__c) \
|
||||
: "memory"); \
|
||||
break; \
|
||||
} \
|
||||
} while (0)
|
||||
|
|
|
@ -46,7 +46,7 @@ static inline unsigned long __xchg_case_##name(unsigned long x, \
|
|||
" swp" #acq_lse #rel #sz "\t%" #w "3, %" #w "0, %2\n" \
|
||||
__nops(3) \
|
||||
" " #nop_lse) \
|
||||
: "=&r" (ret), "=&r" (tmp), "+Q" (*(u8 *)ptr) \
|
||||
: "=&r" (ret), "=&r" (tmp), "+Q" (*(unsigned long *)ptr) \
|
||||
: "r" (x) \
|
||||
: cl); \
|
||||
\
|
||||
|
|
|
@ -240,6 +240,12 @@ static inline u8 kvm_vcpu_trap_get_fault_type(const struct kvm_vcpu *vcpu)
|
|||
return kvm_vcpu_get_hsr(vcpu) & ESR_ELx_FSC_TYPE;
|
||||
}
|
||||
|
||||
static inline int kvm_vcpu_sys_get_rt(struct kvm_vcpu *vcpu)
|
||||
{
|
||||
u32 esr = kvm_vcpu_get_hsr(vcpu);
|
||||
return (esr & ESR_ELx_SYS64_ISS_RT_MASK) >> ESR_ELx_SYS64_ISS_RT_SHIFT;
|
||||
}
|
||||
|
||||
static inline unsigned long kvm_vcpu_get_mpidr_aff(struct kvm_vcpu *vcpu)
|
||||
{
|
||||
return vcpu_sys_reg(vcpu, MPIDR_EL1) & MPIDR_HWID_BITMASK;
|
||||
|
|
|
@ -69,20 +69,21 @@ static inline void set_fs(mm_segment_t fs)
|
|||
*/
|
||||
#define __range_ok(addr, size) \
|
||||
({ \
|
||||
unsigned long __addr = (unsigned long __force)(addr); \
|
||||
unsigned long flag, roksum; \
|
||||
__chk_user_ptr(addr); \
|
||||
asm("adds %1, %1, %3; ccmp %1, %4, #2, cc; cset %0, ls" \
|
||||
: "=&r" (flag), "=&r" (roksum) \
|
||||
: "1" (addr), "Ir" (size), \
|
||||
: "1" (__addr), "Ir" (size), \
|
||||
"r" (current_thread_info()->addr_limit) \
|
||||
: "cc"); \
|
||||
flag; \
|
||||
})
|
||||
|
||||
/*
|
||||
* When dealing with data aborts or instruction traps we may end up with
|
||||
* a tagged userland pointer. Clear the tag to get a sane pointer to pass
|
||||
* on to access_ok(), for instance.
|
||||
* When dealing with data aborts, watchpoints, or instruction traps we may end
|
||||
* up with a tagged userland pointer. Clear the tag to get a sane pointer to
|
||||
* pass on to access_ok(), for instance.
|
||||
*/
|
||||
#define untagged_addr(addr) sign_extend64(addr, 55)
|
||||
|
||||
|
@ -230,7 +231,7 @@ do { \
|
|||
(err), ARM64_HAS_UAO); \
|
||||
break; \
|
||||
case 8: \
|
||||
__get_user_asm("ldr", "ldtr", "%", __gu_val, (ptr), \
|
||||
__get_user_asm("ldr", "ldtr", "%x", __gu_val, (ptr), \
|
||||
(err), ARM64_HAS_UAO); \
|
||||
break; \
|
||||
default: \
|
||||
|
@ -297,7 +298,7 @@ do { \
|
|||
(err), ARM64_HAS_UAO); \
|
||||
break; \
|
||||
case 8: \
|
||||
__put_user_asm("str", "sttr", "%", __pu_val, (ptr), \
|
||||
__put_user_asm("str", "sttr", "%x", __pu_val, (ptr), \
|
||||
(err), ARM64_HAS_UAO); \
|
||||
break; \
|
||||
default: \
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue