forked from Minki/linux
Merge branch 'linus' into x86/kprobes
This commit is contained in:
commit
77e442461c
@ -1,17 +1,26 @@
|
||||
ChangeLog:
|
||||
Started by Ingo Molnar <mingo@redhat.com>
|
||||
Update by Max Krasnyansky <maxk@qualcomm.com>
|
||||
|
||||
SMP IRQ affinity, started by Ingo Molnar <mingo@redhat.com>
|
||||
|
||||
SMP IRQ affinity
|
||||
|
||||
/proc/irq/IRQ#/smp_affinity specifies which target CPUs are permitted
|
||||
for a given IRQ source. It's a bitmask of allowed CPUs. It's not allowed
|
||||
to turn off all CPUs, and if an IRQ controller does not support IRQ
|
||||
affinity then the value will not change from the default 0xffffffff.
|
||||
|
||||
Here is an example of restricting IRQ44 (eth1) to CPU0-3 then restricting
|
||||
the IRQ to CPU4-7 (this is an 8-CPU SMP box):
|
||||
/proc/irq/default_smp_affinity specifies default affinity mask that applies
|
||||
to all non-active IRQs. Once IRQ is allocated/activated its affinity bitmask
|
||||
will be set to the default mask. It can then be changed as described above.
|
||||
Default mask is 0xffffffff.
|
||||
|
||||
Here is an example of restricting IRQ44 (eth1) to CPU0-3 then restricting
|
||||
it to CPU4-7 (this is an 8-CPU SMP box):
|
||||
|
||||
[root@moon 44]# cd /proc/irq/44
|
||||
[root@moon 44]# cat smp_affinity
|
||||
ffffffff
|
||||
|
||||
[root@moon 44]# echo 0f > smp_affinity
|
||||
[root@moon 44]# cat smp_affinity
|
||||
0000000f
|
||||
@ -21,17 +30,27 @@ PING hell (195.4.7.3): 56 data bytes
|
||||
--- hell ping statistics ---
|
||||
6029 packets transmitted, 6027 packets received, 0% packet loss
|
||||
round-trip min/avg/max = 0.1/0.1/0.4 ms
|
||||
[root@moon 44]# cat /proc/interrupts | grep 44:
|
||||
44: 0 1785 1785 1783 1783 1
|
||||
1 0 IO-APIC-level eth1
|
||||
[root@moon 44]# cat /proc/interrupts | grep 'CPU\|44:'
|
||||
CPU0 CPU1 CPU2 CPU3 CPU4 CPU5 CPU6 CPU7
|
||||
44: 1068 1785 1785 1783 0 0 0 0 IO-APIC-level eth1
|
||||
|
||||
As can be seen from the line above IRQ44 was delivered only to the first four
|
||||
processors (0-3).
|
||||
Now lets restrict that IRQ to CPU(4-7).
|
||||
|
||||
[root@moon 44]# echo f0 > smp_affinity
|
||||
[root@moon 44]# cat smp_affinity
|
||||
000000f0
|
||||
[root@moon 44]# ping -f h
|
||||
PING hell (195.4.7.3): 56 data bytes
|
||||
..
|
||||
--- hell ping statistics ---
|
||||
2779 packets transmitted, 2777 packets received, 0% packet loss
|
||||
round-trip min/avg/max = 0.1/0.5/585.4 ms
|
||||
[root@moon 44]# cat /proc/interrupts | grep 44:
|
||||
44: 1068 1785 1785 1784 1784 1069 1070 1069 IO-APIC-level eth1
|
||||
[root@moon 44]#
|
||||
[root@moon 44]# cat /proc/interrupts | 'CPU\|44:'
|
||||
CPU0 CPU1 CPU2 CPU3 CPU4 CPU5 CPU6 CPU7
|
||||
44: 1068 1785 1785 1783 1784 1069 1070 1069 IO-APIC-level eth1
|
||||
|
||||
This time around IRQ44 was delivered only to the last four processors.
|
||||
i.e counters for the CPU0-3 did not change.
|
||||
|
||||
|
@ -93,6 +93,9 @@ Since NMI handlers disable preemption, synchronize_sched() is guaranteed
|
||||
not to return until all ongoing NMI handlers exit. It is therefore safe
|
||||
to free up the handler's data as soon as synchronize_sched() returns.
|
||||
|
||||
Important note: for this to work, the architecture in question must
|
||||
invoke irq_enter() and irq_exit() on NMI entry and exit, respectively.
|
||||
|
||||
|
||||
Answer to Quick Quiz
|
||||
|
||||
|
@ -52,6 +52,10 @@ of each iteration. Unfortunately, chaotic relaxation requires highly
|
||||
structured data, such as the matrices used in scientific programs, and
|
||||
is thus inapplicable to most data structures in operating-system kernels.
|
||||
|
||||
In 1992, Henry (now Alexia) Massalin completed a dissertation advising
|
||||
parallel programmers to defer processing when feasible to simplify
|
||||
synchronization. RCU makes extremely heavy use of this advice.
|
||||
|
||||
In 1993, Jacobson [Jacobson93] verbally described what is perhaps the
|
||||
simplest deferred-free technique: simply waiting a fixed amount of time
|
||||
before freeing blocks awaiting deferred free. Jacobson did not describe
|
||||
@ -138,6 +142,13 @@ blocking in read-side critical sections appeared [PaulEMcKenney2006c],
|
||||
Robert Olsson described an RCU-protected trie-hash combination
|
||||
[RobertOlsson2006a].
|
||||
|
||||
2007 saw the journal version of the award-winning RCU paper from 2006
|
||||
[ThomasEHart2007a], as well as a paper demonstrating use of Promela
|
||||
and Spin to mechanically verify an optimization to Oleg Nesterov's
|
||||
QRCU [PaulEMcKenney2007QRCUspin], a design document describing
|
||||
preemptible RCU [PaulEMcKenney2007PreemptibleRCU], and the three-part
|
||||
LWN "What is RCU?" series [PaulEMcKenney2007WhatIsRCUFundamentally,
|
||||
PaulEMcKenney2008WhatIsRCUUsage, and PaulEMcKenney2008WhatIsRCUAPI].
|
||||
|
||||
Bibtex Entries
|
||||
|
||||
@ -202,6 +213,20 @@ Bibtex Entries
|
||||
,Year="1991"
|
||||
}
|
||||
|
||||
@phdthesis{HMassalinPhD
|
||||
,author="H. Massalin"
|
||||
,title="Synthesis: An Efficient Implementation of Fundamental Operating
|
||||
System Services"
|
||||
,school="Columbia University"
|
||||
,address="New York, NY"
|
||||
,year="1992"
|
||||
,annotation="
|
||||
Mondo optimizing compiler.
|
||||
Wait-free stuff.
|
||||
Good advice: defer work to avoid synchronization.
|
||||
"
|
||||
}
|
||||
|
||||
@unpublished{Jacobson93
|
||||
,author="Van Jacobson"
|
||||
,title="Avoid Read-Side Locking Via Delayed Free"
|
||||
@ -635,3 +660,86 @@ Revised:
|
||||
"
|
||||
}
|
||||
|
||||
@unpublished{PaulEMcKenney2007PreemptibleRCU
|
||||
,Author="Paul E. McKenney"
|
||||
,Title="The design of preemptible read-copy-update"
|
||||
,month="October"
|
||||
,day="8"
|
||||
,year="2007"
|
||||
,note="Available:
|
||||
\url{http://lwn.net/Articles/253651/}
|
||||
[Viewed October 25, 2007]"
|
||||
,annotation="
|
||||
LWN article describing the design of preemptible RCU.
|
||||
"
|
||||
}
|
||||
|
||||
########################################################################
|
||||
#
|
||||
# "What is RCU?" LWN series.
|
||||
#
|
||||
|
||||
@unpublished{PaulEMcKenney2007WhatIsRCUFundamentally
|
||||
,Author="Paul E. McKenney and Jonathan Walpole"
|
||||
,Title="What is {RCU}, Fundamentally?"
|
||||
,month="December"
|
||||
,day="17"
|
||||
,year="2007"
|
||||
,note="Available:
|
||||
\url{http://lwn.net/Articles/262464/}
|
||||
[Viewed December 27, 2007]"
|
||||
,annotation="
|
||||
Lays out the three basic components of RCU: (1) publish-subscribe,
|
||||
(2) wait for pre-existing readers to complete, and (2) maintain
|
||||
multiple versions.
|
||||
"
|
||||
}
|
||||
|
||||
@unpublished{PaulEMcKenney2008WhatIsRCUUsage
|
||||
,Author="Paul E. McKenney"
|
||||
,Title="What is {RCU}? Part 2: Usage"
|
||||
,month="January"
|
||||
,day="4"
|
||||
,year="2008"
|
||||
,note="Available:
|
||||
\url{http://lwn.net/Articles/263130/}
|
||||
[Viewed January 4, 2008]"
|
||||
,annotation="
|
||||
Lays out six uses of RCU:
|
||||
1. RCU is a Reader-Writer Lock Replacement
|
||||
2. RCU is a Restricted Reference-Counting Mechanism
|
||||
3. RCU is a Bulk Reference-Counting Mechanism
|
||||
4. RCU is a Poor Man's Garbage Collector
|
||||
5. RCU is a Way of Providing Existence Guarantees
|
||||
6. RCU is a Way of Waiting for Things to Finish
|
||||
"
|
||||
}
|
||||
|
||||
@unpublished{PaulEMcKenney2008WhatIsRCUAPI
|
||||
,Author="Paul E. McKenney"
|
||||
,Title="{RCU} part 3: the {RCU} {API}"
|
||||
,month="January"
|
||||
,day="17"
|
||||
,year="2008"
|
||||
,note="Available:
|
||||
\url{http://lwn.net/Articles/264090/}
|
||||
[Viewed January 10, 2008]"
|
||||
,annotation="
|
||||
Gives an overview of the Linux-kernel RCU API and a brief annotated RCU
|
||||
bibliography.
|
||||
"
|
||||
}
|
||||
|
||||
@article{DinakarGuniguntala2008IBMSysJ
|
||||
,author="D. Guniguntala and P. E. McKenney and J. Triplett and J. Walpole"
|
||||
,title="The read-copy-update mechanism for supporting real-time applications on shared-memory multiprocessor systems with {Linux}"
|
||||
,Year="2008"
|
||||
,Month="April"
|
||||
,journal="IBM Systems Journal"
|
||||
,volume="47"
|
||||
,number="2"
|
||||
,pages="@@-@@"
|
||||
,annotation="
|
||||
RCU, realtime RCU, sleepable RCU, performance.
|
||||
"
|
||||
}
|
||||
|
@ -13,10 +13,13 @@ over a rather long period of time, but improvements are always welcome!
|
||||
detailed performance measurements show that RCU is nonetheless
|
||||
the right tool for the job.
|
||||
|
||||
The other exception would be where performance is not an issue,
|
||||
and RCU provides a simpler implementation. An example of this
|
||||
situation is the dynamic NMI code in the Linux 2.6 kernel,
|
||||
at least on architectures where NMIs are rare.
|
||||
Another exception is where performance is not an issue, and RCU
|
||||
provides a simpler implementation. An example of this situation
|
||||
is the dynamic NMI code in the Linux 2.6 kernel, at least on
|
||||
architectures where NMIs are rare.
|
||||
|
||||
Yet another exception is where the low real-time latency of RCU's
|
||||
read-side primitives is critically important.
|
||||
|
||||
1. Does the update code have proper mutual exclusion?
|
||||
|
||||
@ -39,9 +42,10 @@ over a rather long period of time, but improvements are always welcome!
|
||||
|
||||
2. Do the RCU read-side critical sections make proper use of
|
||||
rcu_read_lock() and friends? These primitives are needed
|
||||
to suppress preemption (or bottom halves, in the case of
|
||||
rcu_read_lock_bh()) in the read-side critical sections,
|
||||
and are also an excellent aid to readability.
|
||||
to prevent grace periods from ending prematurely, which
|
||||
could result in data being unceremoniously freed out from
|
||||
under your read-side code, which can greatly increase the
|
||||
actuarial risk of your kernel.
|
||||
|
||||
As a rough rule of thumb, any dereference of an RCU-protected
|
||||
pointer must be covered by rcu_read_lock() or rcu_read_lock_bh()
|
||||
@ -54,15 +58,30 @@ over a rather long period of time, but improvements are always welcome!
|
||||
be running while updates are in progress. There are a number
|
||||
of ways to handle this concurrency, depending on the situation:
|
||||
|
||||
a. Make updates appear atomic to readers. For example,
|
||||
a. Use the RCU variants of the list and hlist update
|
||||
primitives to add, remove, and replace elements on an
|
||||
RCU-protected list. Alternatively, use the RCU-protected
|
||||
trees that have been added to the Linux kernel.
|
||||
|
||||
This is almost always the best approach.
|
||||
|
||||
b. Proceed as in (a) above, but also maintain per-element
|
||||
locks (that are acquired by both readers and writers)
|
||||
that guard per-element state. Of course, fields that
|
||||
the readers refrain from accessing can be guarded by the
|
||||
update-side lock.
|
||||
|
||||
This works quite well, also.
|
||||
|
||||
c. Make updates appear atomic to readers. For example,
|
||||
pointer updates to properly aligned fields will appear
|
||||
atomic, as will individual atomic primitives. Operations
|
||||
performed under a lock and sequences of multiple atomic
|
||||
primitives will -not- appear to be atomic.
|
||||
|
||||
This is almost always the best approach.
|
||||
This can work, but is starting to get a bit tricky.
|
||||
|
||||
b. Carefully order the updates and the reads so that
|
||||
d. Carefully order the updates and the reads so that
|
||||
readers see valid data at all phases of the update.
|
||||
This is often more difficult than it sounds, especially
|
||||
given modern CPUs' tendency to reorder memory references.
|
||||
@ -123,18 +142,22 @@ over a rather long period of time, but improvements are always welcome!
|
||||
when publicizing a pointer to a structure that can
|
||||
be traversed by an RCU read-side critical section.
|
||||
|
||||
5. If call_rcu(), or a related primitive such as call_rcu_bh(),
|
||||
is used, the callback function must be written to be called
|
||||
from softirq context. In particular, it cannot block.
|
||||
5. If call_rcu(), or a related primitive such as call_rcu_bh() or
|
||||
call_rcu_sched(), is used, the callback function must be
|
||||
written to be called from softirq context. In particular,
|
||||
it cannot block.
|
||||
|
||||
6. Since synchronize_rcu() can block, it cannot be called from
|
||||
any sort of irq context.
|
||||
any sort of irq context. Ditto for synchronize_sched() and
|
||||
synchronize_srcu().
|
||||
|
||||
7. If the updater uses call_rcu(), then the corresponding readers
|
||||
must use rcu_read_lock() and rcu_read_unlock(). If the updater
|
||||
uses call_rcu_bh(), then the corresponding readers must use
|
||||
rcu_read_lock_bh() and rcu_read_unlock_bh(). Mixing things up
|
||||
will result in confusion and broken kernels.
|
||||
rcu_read_lock_bh() and rcu_read_unlock_bh(). If the updater
|
||||
uses call_rcu_sched(), then the corresponding readers must
|
||||
disable preemption. Mixing things up will result in confusion
|
||||
and broken kernels.
|
||||
|
||||
One exception to this rule: rcu_read_lock() and rcu_read_unlock()
|
||||
may be substituted for rcu_read_lock_bh() and rcu_read_unlock_bh()
|
||||
@ -143,9 +166,9 @@ over a rather long period of time, but improvements are always welcome!
|
||||
such cases is a must, of course! And the jury is still out on
|
||||
whether the increased speed is worth it.
|
||||
|
||||
8. Although synchronize_rcu() is a bit slower than is call_rcu(),
|
||||
it usually results in simpler code. So, unless update
|
||||
performance is critically important or the updaters cannot block,
|
||||
8. Although synchronize_rcu() is slower than is call_rcu(), it
|
||||
usually results in simpler code. So, unless update performance
|
||||
is critically important or the updaters cannot block,
|
||||
synchronize_rcu() should be used in preference to call_rcu().
|
||||
|
||||
An especially important property of the synchronize_rcu()
|
||||
@ -187,23 +210,23 @@ over a rather long period of time, but improvements are always welcome!
|
||||
number of updates per grace period.
|
||||
|
||||
9. All RCU list-traversal primitives, which include
|
||||
list_for_each_rcu(), list_for_each_entry_rcu(),
|
||||
rcu_dereference(), list_for_each_rcu(), list_for_each_entry_rcu(),
|
||||
list_for_each_continue_rcu(), and list_for_each_safe_rcu(),
|
||||
must be within an RCU read-side critical section. RCU
|
||||
must be either within an RCU read-side critical section or
|
||||
must be protected by appropriate update-side locks. RCU
|
||||
read-side critical sections are delimited by rcu_read_lock()
|
||||
and rcu_read_unlock(), or by similar primitives such as
|
||||
rcu_read_lock_bh() and rcu_read_unlock_bh().
|
||||
|
||||
Use of the _rcu() list-traversal primitives outside of an
|
||||
RCU read-side critical section causes no harm other than
|
||||
a slight performance degradation on Alpha CPUs. It can
|
||||
also be quite helpful in reducing code bloat when common
|
||||
code is shared between readers and updaters.
|
||||
The reason that it is permissible to use RCU list-traversal
|
||||
primitives when the update-side lock is held is that doing so
|
||||
can be quite helpful in reducing code bloat when common code is
|
||||
shared between readers and updaters.
|
||||
|
||||
10. Conversely, if you are in an RCU read-side critical section,
|
||||
you -must- use the "_rcu()" variants of the list macros.
|
||||
Failing to do so will break Alpha and confuse people reading
|
||||
your code.
|
||||
and you don't hold the appropriate update-side lock, you -must-
|
||||
use the "_rcu()" variants of the list macros. Failing to do so
|
||||
will break Alpha and confuse people reading your code.
|
||||
|
||||
11. Note that synchronize_rcu() -only- guarantees to wait until
|
||||
all currently executing rcu_read_lock()-protected RCU read-side
|
||||
@ -230,6 +253,14 @@ over a rather long period of time, but improvements are always welcome!
|
||||
must use whatever locking or other synchronization is required
|
||||
to safely access and/or modify that data structure.
|
||||
|
||||
RCU callbacks are -usually- executed on the same CPU that executed
|
||||
the corresponding call_rcu(), call_rcu_bh(), or call_rcu_sched(),
|
||||
but are by -no- means guaranteed to be. For example, if a given
|
||||
CPU goes offline while having an RCU callback pending, then that
|
||||
RCU callback will execute on some surviving CPU. (If this was
|
||||
not the case, a self-spawning RCU callback would prevent the
|
||||
victim CPU from ever going offline.)
|
||||
|
||||
14. SRCU (srcu_read_lock(), srcu_read_unlock(), and synchronize_srcu())
|
||||
may only be invoked from process context. Unlike other forms of
|
||||
RCU, it -is- permissible to block in an SRCU read-side critical
|
||||
|
@ -10,23 +10,30 @@ status messages via printk(), which can be examined via the dmesg
|
||||
command (perhaps grepping for "torture"). The test is started
|
||||
when the module is loaded, and stops when the module is unloaded.
|
||||
|
||||
However, actually setting this config option to "y" results in the system
|
||||
running the test immediately upon boot, and ending only when the system
|
||||
is taken down. Normally, one will instead want to build the system
|
||||
with CONFIG_RCU_TORTURE_TEST=m and to use modprobe and rmmod to control
|
||||
the test, perhaps using a script similar to the one shown at the end of
|
||||
this document. Note that you will need CONFIG_MODULE_UNLOAD in order
|
||||
to be able to end the test.
|
||||
CONFIG_RCU_TORTURE_TEST_RUNNABLE
|
||||
|
||||
It is also possible to specify CONFIG_RCU_TORTURE_TEST=y, which will
|
||||
result in the tests being loaded into the base kernel. In this case,
|
||||
the CONFIG_RCU_TORTURE_TEST_RUNNABLE config option is used to specify
|
||||
whether the RCU torture tests are to be started immediately during
|
||||
boot or whether the /proc/sys/kernel/rcutorture_runnable file is used
|
||||
to enable them. This /proc file can be used to repeatedly pause and
|
||||
restart the tests, regardless of the initial state specified by the
|
||||
CONFIG_RCU_TORTURE_TEST_RUNNABLE config option.
|
||||
|
||||
You will normally -not- want to start the RCU torture tests during boot
|
||||
(and thus the default is CONFIG_RCU_TORTURE_TEST_RUNNABLE=n), but doing
|
||||
this can sometimes be useful in finding boot-time bugs.
|
||||
|
||||
|
||||
MODULE PARAMETERS
|
||||
|
||||
This module has the following parameters:
|
||||
|
||||
nreaders This is the number of RCU reading threads supported.
|
||||
The default is twice the number of CPUs. Why twice?
|
||||
To properly exercise RCU implementations with preemptible
|
||||
read-side critical sections.
|
||||
irqreaders Says to invoke RCU readers from irq level. This is currently
|
||||
done via timers. Defaults to "1" for variants of RCU that
|
||||
permit this. (Or, more accurately, variants of RCU that do
|
||||
-not- permit this know to ignore this variable.)
|
||||
|
||||
nfakewriters This is the number of RCU fake writer threads to run. Fake
|
||||
writer threads repeatedly use the synchronous "wait for
|
||||
@ -37,6 +44,16 @@ nfakewriters This is the number of RCU fake writer threads to run. Fake
|
||||
to trigger special cases caused by multiple writers, such as
|
||||
the synchronize_srcu() early return optimization.
|
||||
|
||||
nreaders This is the number of RCU reading threads supported.
|
||||
The default is twice the number of CPUs. Why twice?
|
||||
To properly exercise RCU implementations with preemptible
|
||||
read-side critical sections.
|
||||
|
||||
shuffle_interval
|
||||
The number of seconds to keep the test threads affinitied
|
||||
to a particular subset of the CPUs, defaults to 3 seconds.
|
||||
Used in conjunction with test_no_idle_hz.
|
||||
|
||||
stat_interval The number of seconds between output of torture
|
||||
statistics (via printk()). Regardless of the interval,
|
||||
statistics are printed when the module is unloaded.
|
||||
@ -44,10 +61,11 @@ stat_interval The number of seconds between output of torture
|
||||
be printed -only- when the module is unloaded, and this
|
||||
is the default.
|
||||
|
||||
shuffle_interval
|
||||
The number of seconds to keep the test threads affinitied
|
||||
to a particular subset of the CPUs, defaults to 5 seconds.
|
||||
Used in conjunction with test_no_idle_hz.
|
||||
stutter The length of time to run the test before pausing for this
|
||||
same period of time. Defaults to "stutter=5", so as
|
||||
to run and pause for (roughly) five-second intervals.
|
||||
Specifying "stutter=0" causes the test to run continuously
|
||||
without pausing, which is the old default behavior.
|
||||
|
||||
test_no_idle_hz Whether or not to test the ability of RCU to operate in
|
||||
a kernel that disables the scheduling-clock interrupt to
|
||||
|
@ -1,3 +1,11 @@
|
||||
Please note that the "What is RCU?" LWN series is an excellent place
|
||||
to start learning about RCU:
|
||||
|
||||
1. What is RCU, Fundamentally? http://lwn.net/Articles/262464/
|
||||
2. What is RCU? Part 2: Usage http://lwn.net/Articles/263130/
|
||||
3. RCU part 3: the RCU API http://lwn.net/Articles/264090/
|
||||
|
||||
|
||||
What is RCU?
|
||||
|
||||
RCU is a synchronization mechanism that was added to the Linux kernel
|
||||
@ -772,26 +780,18 @@ Linux-kernel source code, but it helps to have a full list of the
|
||||
APIs, since there does not appear to be a way to categorize them
|
||||
in docbook. Here is the list, by category.
|
||||
|
||||
Markers for RCU read-side critical sections:
|
||||
|
||||
rcu_read_lock
|
||||
rcu_read_unlock
|
||||
rcu_read_lock_bh
|
||||
rcu_read_unlock_bh
|
||||
srcu_read_lock
|
||||
srcu_read_unlock
|
||||
|
||||
RCU pointer/list traversal:
|
||||
|
||||
rcu_dereference
|
||||
list_for_each_rcu (to be deprecated in favor of
|
||||
list_for_each_entry_rcu)
|
||||
list_for_each_entry_rcu
|
||||
list_for_each_continue_rcu (to be deprecated in favor of new
|
||||
list_for_each_entry_continue_rcu)
|
||||
hlist_for_each_entry_rcu
|
||||
|
||||
RCU pointer update:
|
||||
list_for_each_rcu (to be deprecated in favor of
|
||||
list_for_each_entry_rcu)
|
||||
list_for_each_continue_rcu (to be deprecated in favor of new
|
||||
list_for_each_entry_continue_rcu)
|
||||
|
||||
RCU pointer/list update:
|
||||
|
||||
rcu_assign_pointer
|
||||
list_add_rcu
|
||||
@ -799,16 +799,36 @@ RCU pointer update:
|
||||
list_del_rcu
|
||||
list_replace_rcu
|
||||
hlist_del_rcu
|
||||
hlist_add_after_rcu
|
||||
hlist_add_before_rcu
|
||||
hlist_add_head_rcu
|
||||
hlist_replace_rcu
|
||||
list_splice_init_rcu()
|
||||
|
||||
RCU grace period:
|
||||
RCU: Critical sections Grace period Barrier
|
||||
|
||||
rcu_read_lock synchronize_net rcu_barrier
|
||||
rcu_read_unlock synchronize_rcu
|
||||
call_rcu
|
||||
|
||||
|
||||
bh: Critical sections Grace period Barrier
|
||||
|
||||
rcu_read_lock_bh call_rcu_bh rcu_barrier_bh
|
||||
rcu_read_unlock_bh
|
||||
|
||||
|
||||
sched: Critical sections Grace period Barrier
|
||||
|
||||
[preempt_disable] synchronize_sched rcu_barrier_sched
|
||||
[and friends] call_rcu_sched
|
||||
|
||||
|
||||
SRCU: Critical sections Grace period Barrier
|
||||
|
||||
srcu_read_lock synchronize_srcu N/A
|
||||
srcu_read_unlock
|
||||
|
||||
synchronize_net
|
||||
synchronize_sched
|
||||
synchronize_rcu
|
||||
synchronize_srcu
|
||||
call_rcu
|
||||
call_rcu_bh
|
||||
|
||||
See the comment headers in the source code (or the docbook generated
|
||||
from them) for more information.
|
||||
|
@ -14,9 +14,8 @@ represent the thread siblings to cpu X in the same physical package;
|
||||
To implement it in an architecture-neutral way, a new source file,
|
||||
drivers/base/topology.c, is to export the 4 attributes.
|
||||
|
||||
If one architecture wants to support this feature, it just needs to
|
||||
implement 4 defines, typically in file include/asm-XXX/topology.h.
|
||||
The 4 defines are:
|
||||
For an architecture to support this feature, it must define some of
|
||||
these macros in include/asm-XXX/topology.h:
|
||||
#define topology_physical_package_id(cpu)
|
||||
#define topology_core_id(cpu)
|
||||
#define topology_thread_siblings(cpu)
|
||||
@ -25,17 +24,10 @@ The 4 defines are:
|
||||
The type of **_id is int.
|
||||
The type of siblings is cpumask_t.
|
||||
|
||||
To be consistent on all architectures, the 4 attributes should have
|
||||
default values if their values are unavailable. Below is the rule.
|
||||
1) physical_package_id: If cpu has no physical package id, -1 is the
|
||||
default value.
|
||||
2) core_id: If cpu doesn't support multi-core, its core id is 0.
|
||||
3) thread_siblings: Just include itself, if the cpu doesn't support
|
||||
HT/multi-thread.
|
||||
4) core_siblings: Just include itself, if the cpu doesn't support
|
||||
multi-core and HT/Multi-thread.
|
||||
|
||||
So be careful when declaring the 4 defines in include/asm-XXX/topology.h.
|
||||
|
||||
If an attribute isn't defined on an architecture, it won't be exported.
|
||||
|
||||
To be consistent on all architectures, include/linux/topology.h
|
||||
provides default definitions for any of the above macros that are
|
||||
not defined by include/asm-XXX/topology.h:
|
||||
1) physical_package_id: -1
|
||||
2) core_id: 0
|
||||
3) thread_siblings: just the given CPU
|
||||
4) core_siblings: just the given CPU
|
||||
|
@ -222,13 +222,6 @@ Who: Thomas Gleixner <tglx@linutronix.de>
|
||||
|
||||
---------------------------
|
||||
|
||||
What: i2c-i810, i2c-prosavage and i2c-savage4
|
||||
When: May 2008
|
||||
Why: These drivers are superseded by i810fb, intelfb and savagefb.
|
||||
Who: Jean Delvare <khali@linux-fr.org>
|
||||
|
||||
---------------------------
|
||||
|
||||
What (Why):
|
||||
- include/linux/netfilter_ipv4/ipt_TOS.h ipt_tos.h header files
|
||||
(superseded by xt_TOS/xt_tos target & match)
|
||||
|
@ -13,72 +13,93 @@ Mailing list: linux-ext4@vger.kernel.org
|
||||
1. Quick usage instructions:
|
||||
===========================
|
||||
|
||||
- Grab updated e2fsprogs from
|
||||
ftp://ftp.kernel.org/pub/linux/kernel/people/tytso/e2fsprogs-interim/
|
||||
This is a patchset on top of e2fsprogs-1.39, which can be found at
|
||||
- Compile and install the latest version of e2fsprogs (as of this
|
||||
writing version 1.41) from:
|
||||
|
||||
http://sourceforge.net/project/showfiles.php?group_id=2406
|
||||
|
||||
or
|
||||
|
||||
ftp://ftp.kernel.org/pub/linux/kernel/people/tytso/e2fsprogs/
|
||||
|
||||
- It's still mke2fs -j /dev/hda1
|
||||
or grab the latest git repository from:
|
||||
|
||||
- mount /dev/hda1 /wherever -t ext4dev
|
||||
git://git.kernel.org/pub/scm/fs/ext2/e2fsprogs.git
|
||||
|
||||
- To enable extents,
|
||||
- Create a new filesystem using the ext4dev filesystem type:
|
||||
|
||||
mount /dev/hda1 /wherever -t ext4dev -o extents
|
||||
# mke2fs -t ext4dev /dev/hda1
|
||||
|
||||
- The filesystem is compatible with the ext3 driver until you add a file
|
||||
which has extents (ie: `mount -o extents', then create a file).
|
||||
Or configure an existing ext3 filesystem to support extents and set
|
||||
the test_fs flag to indicate that it's ok for an in-development
|
||||
filesystem to touch this filesystem:
|
||||
|
||||
NOTE: The "extents" mount flag is temporary. It will soon go away and
|
||||
extents will be enabled by the "-o extents" flag to mke2fs or tune2fs
|
||||
# tune2fs -O extents -E test_fs /dev/hda1
|
||||
|
||||
If the filesystem was created with 128 byte inodes, it can be
|
||||
converted to use 256 byte for greater efficiency via:
|
||||
|
||||
# tune2fs -I 256 /dev/hda1
|
||||
|
||||
(Note: we currently do not have tools to convert an ext4dev
|
||||
filesystem back to ext3; so please do not do try this on production
|
||||
filesystems.)
|
||||
|
||||
- Mounting:
|
||||
|
||||
# mount -t ext4dev /dev/hda1 /wherever
|
||||
|
||||
- When comparing performance with other filesystems, remember that
|
||||
ext3/4 by default offers higher data integrity guarantees than most. So
|
||||
when comparing with a metadata-only journalling filesystem, use `mount -o
|
||||
data=writeback'. And you might as well use `mount -o nobh' too along
|
||||
with it. Making the journal larger than the mke2fs default often helps
|
||||
performance with metadata-intensive workloads.
|
||||
ext3/4 by default offers higher data integrity guarantees than most.
|
||||
So when comparing with a metadata-only journalling filesystem, such
|
||||
as ext3, use `mount -o data=writeback'. And you might as well use
|
||||
`mount -o nobh' too along with it. Making the journal larger than
|
||||
the mke2fs default often helps performance with metadata-intensive
|
||||
workloads.
|
||||
|
||||
2. Features
|
||||
===========
|
||||
|
||||
2.1 Currently available
|
||||
|
||||
* ability to use filesystems > 16TB
|
||||
* ability to use filesystems > 16TB (e2fsprogs support not available yet)
|
||||
* extent format reduces metadata overhead (RAM, IO for access, transactions)
|
||||
* extent format more robust in face of on-disk corruption due to magics,
|
||||
* internal redunancy in tree
|
||||
|
||||
2.1 Previously available, soon to be enabled by default by "mkefs.ext4":
|
||||
|
||||
* dir_index and resize inode will be on by default
|
||||
* large inodes will be used by default for fast EAs, nsec timestamps, etc
|
||||
* improved file allocation (multi-block alloc)
|
||||
* fix 32000 subdirectory limit
|
||||
* nsec timestamps for mtime, atime, ctime, create time
|
||||
* inode version field on disk (NFSv4, Lustre)
|
||||
* reduced e2fsck time via uninit_bg feature
|
||||
* journal checksumming for robustness, performance
|
||||
* persistent file preallocation (e.g for streaming media, databases)
|
||||
* ability to pack bitmaps and inode tables into larger virtual groups via the
|
||||
flex_bg feature
|
||||
* large file support
|
||||
* Inode allocation using large virtual block groups via flex_bg
|
||||
* delayed allocation
|
||||
* large block (up to pagesize) support
|
||||
* efficent new ordered mode in JBD2 and ext4(avoid using buffer head to force
|
||||
the ordering)
|
||||
|
||||
2.2 Candidate features for future inclusion
|
||||
|
||||
There are several under discussion, whether they all make it in is
|
||||
partly a function of how much time everyone has to work on them:
|
||||
* Online defrag (patches available but not well tested)
|
||||
* reduced mke2fs time via lazy itable initialization in conjuction with
|
||||
the uninit_bg feature (capability to do this is available in e2fsprogs
|
||||
but a kernel thread to do lazy zeroing of unused inode table blocks
|
||||
after filesystem is first mounted is required for safety)
|
||||
|
||||
* improved file allocation (multi-block alloc, delayed alloc; basically done)
|
||||
* fix 32000 subdirectory limit (patch exists, needs some e2fsck work)
|
||||
* nsec timestamps for mtime, atime, ctime, create time (patch exists,
|
||||
needs some e2fsck work)
|
||||
* inode version field on disk (NFSv4, Lustre; prototype exists)
|
||||
* reduced mke2fs/e2fsck time via uninitialized groups (prototype exists)
|
||||
* journal checksumming for robustness, performance (prototype exists)
|
||||
* persistent file preallocation (e.g for streaming media, databases)
|
||||
There are several others under discussion, whether they all make it in is
|
||||
partly a function of how much time everyone has to work on them. Features like
|
||||
metadata checksumming have been discussed and planned for a bit but no patches
|
||||
exist yet so I'm not sure they're in the near-term roadmap.
|
||||
|
||||
Features like metadata checksumming have been discussed and planned for
|
||||
a bit but no patches exist yet so I'm not sure they're in the near-term
|
||||
roadmap.
|
||||
The big performance win will come with mballoc, delalloc and flex_bg
|
||||
grouping of bitmaps and inode tables. Some test results available here:
|
||||
|
||||
The big performance win will come with mballoc and delalloc. CFS has
|
||||
been using mballoc for a few years already with Lustre, and IBM + Bull
|
||||
did a lot of benchmarking on it. The reason it isn't in the first set of
|
||||
patches is partly a manageability issue, and partly because it doesn't
|
||||
directly affect the on-disk format (outside of much better allocation)
|
||||
so it isn't critical to get into the first round of changes. I believe
|
||||
Alex is working on a new set of patches right now.
|
||||
- http://www.bullopensource.org/ext4/20080530/ffsb-write-2.6.26-rc2.html
|
||||
- http://www.bullopensource.org/ext4/20080530/ffsb-readwrite-2.6.26-rc2.html
|
||||
|
||||
3. Options
|
||||
==========
|
||||
@ -222,9 +243,11 @@ stripe=n Number of filesystem blocks that mballoc will try
|
||||
to use for allocation size and alignment. For RAID5/6
|
||||
systems this should be the number of data
|
||||
disks * RAID chunk size in file system blocks.
|
||||
|
||||
delalloc (*) Deferring block allocation until write-out time.
|
||||
nodelalloc Disable delayed allocation. Blocks are allocation
|
||||
when data is copied from user to page cache.
|
||||
Data Mode
|
||||
---------
|
||||
=========
|
||||
There are 3 different data modes:
|
||||
|
||||
* writeback mode
|
||||
@ -236,10 +259,10 @@ typically provide the best ext4 performance.
|
||||
|
||||
* ordered mode
|
||||
In data=ordered mode, ext4 only officially journals metadata, but it logically
|
||||
groups metadata and data blocks into a single unit called a transaction. When
|
||||
it's time to write the new metadata out to disk, the associated data blocks
|
||||
are written first. In general, this mode performs slightly slower than
|
||||
writeback but significantly faster than journal mode.
|
||||
groups metadata information related to data changes with the data blocks into a
|
||||
single unit called a transaction. When it's time to write the new metadata
|
||||
out to disk, the associated data blocks are written first. In general,
|
||||
this mode performs slightly slower than writeback but significantly faster than journal mode.
|
||||
|
||||
* journal mode
|
||||
data=journal mode provides full data and metadata journaling. All new data is
|
||||
@ -247,7 +270,8 @@ written to the journal first, and then to its final location.
|
||||
In the event of a crash, the journal can be replayed, bringing both data and
|
||||
metadata into a consistent state. This mode is the slowest except when data
|
||||
needs to be read from and written to disk at the same time where it
|
||||
outperforms all others modes.
|
||||
outperforms all others modes. Curently ext4 does not have delayed
|
||||
allocation support if this data journalling mode is selected.
|
||||
|
||||
References
|
||||
==========
|
||||
@ -256,7 +280,8 @@ kernel source: <file:fs/ext4/>
|
||||
<file:fs/jbd2/>
|
||||
|
||||
programs: http://e2fsprogs.sourceforge.net/
|
||||
http://ext2resize.sourceforge.net
|
||||
|
||||
useful links: http://fedoraproject.org/wiki/ext3-devel
|
||||
http://www.bullopensource.org/ext4/
|
||||
http://ext4.wiki.kernel.org/index.php/Main_Page
|
||||
http://fedoraproject.org/wiki/Features/Ext4
|
||||
|
114
Documentation/filesystems/gfs2-glocks.txt
Normal file
114
Documentation/filesystems/gfs2-glocks.txt
Normal file
@ -0,0 +1,114 @@
|
||||
Glock internal locking rules
|
||||
------------------------------
|
||||
|
||||
This documents the basic principles of the glock state machine
|
||||
internals. Each glock (struct gfs2_glock in fs/gfs2/incore.h)
|
||||
has two main (internal) locks:
|
||||
|
||||
1. A spinlock (gl_spin) which protects the internal state such
|
||||
as gl_state, gl_target and the list of holders (gl_holders)
|
||||
2. A non-blocking bit lock, GLF_LOCK, which is used to prevent other
|
||||
threads from making calls to the DLM, etc. at the same time. If a
|
||||
thread takes this lock, it must then call run_queue (usually via the
|
||||
workqueue) when it releases it in order to ensure any pending tasks
|
||||
are completed.
|
||||
|
||||
The gl_holders list contains all the queued lock requests (not
|
||||
just the holders) associated with the glock. If there are any
|
||||
held locks, then they will be contiguous entries at the head
|
||||
of the list. Locks are granted in strictly the order that they
|
||||
are queued, except for those marked LM_FLAG_PRIORITY which are
|
||||
used only during recovery, and even then only for journal locks.
|
||||
|
||||
There are three lock states that users of the glock layer can request,
|
||||
namely shared (SH), deferred (DF) and exclusive (EX). Those translate
|
||||
to the following DLM lock modes:
|
||||
|
||||
Glock mode | DLM lock mode
|
||||
------------------------------
|
||||
UN | IV/NL Unlocked (no DLM lock associated with glock) or NL
|
||||
SH | PR (Protected read)
|
||||
DF | CW (Concurrent write)
|
||||
EX | EX (Exclusive)
|
||||
|
||||
Thus DF is basically a shared mode which is incompatible with the "normal"
|
||||
shared lock mode, SH. In GFS2 the DF mode is used exclusively for direct I/O
|
||||
operations. The glocks are basically a lock plus some routines which deal
|
||||
with cache management. The following rules apply for the cache:
|
||||
|
||||
Glock mode | Cache data | Cache Metadata | Dirty Data | Dirty Metadata
|
||||
--------------------------------------------------------------------------
|
||||
UN | No | No | No | No
|
||||
SH | Yes | Yes | No | No
|
||||
DF | No | Yes | No | No
|
||||
EX | Yes | Yes | Yes | Yes
|
||||
|
||||
These rules are implemented using the various glock operations which
|
||||
are defined for each type of glock. Not all types of glocks use
|
||||
all the modes. Only inode glocks use the DF mode for example.
|
||||
|
||||
Table of glock operations and per type constants:
|
||||
|
||||
Field | Purpose
|
||||
----------------------------------------------------------------------------
|
||||
go_xmote_th | Called before remote state change (e.g. to sync dirty data)
|
||||
go_xmote_bh | Called after remote state change (e.g. to refill cache)
|
||||
go_inval | Called if remote state change requires invalidating the cache
|
||||
go_demote_ok | Returns boolean value of whether its ok to demote a glock
|
||||
| (e.g. checks timeout, and that there is no cached data)
|
||||
go_lock | Called for the first local holder of a lock
|
||||
go_unlock | Called on the final local unlock of a lock
|
||||
go_dump | Called to print content of object for debugfs file, or on
|
||||
| error to dump glock to the log.
|
||||
go_type; | The type of the glock, LM_TYPE_.....
|
||||
go_min_hold_time | The minimum hold time
|
||||
|
||||
The minimum hold time for each lock is the time after a remote lock
|
||||
grant for which we ignore remote demote requests. This is in order to
|
||||
prevent a situation where locks are being bounced around the cluster
|
||||
from node to node with none of the nodes making any progress. This
|
||||
tends to show up most with shared mmaped files which are being written
|
||||
to by multiple nodes. By delaying the demotion in response to a
|
||||
remote callback, that gives the userspace program time to make
|
||||
some progress before the pages are unmapped.
|
||||
|
||||
There is a plan to try and remove the go_lock and go_unlock callbacks
|
||||
if possible, in order to try and speed up the fast path though the locking.
|
||||
Also, eventually we hope to make the glock "EX" mode locally shared
|
||||
such that any local locking will be done with the i_mutex as required
|
||||
rather than via the glock.
|
||||
|
||||
Locking rules for glock operations:
|
||||
|
||||
Operation | GLF_LOCK bit lock held | gl_spin spinlock held
|
||||
-----------------------------------------------------------------
|
||||
go_xmote_th | Yes | No
|
||||
go_xmote_bh | Yes | No
|
||||
go_inval | Yes | No
|
||||
go_demote_ok | Sometimes | Yes
|
||||
go_lock | Yes | No
|
||||
go_unlock | Yes | No
|
||||
go_dump | Sometimes | Yes
|
||||
|
||||
N.B. Operations must not drop either the bit lock or the spinlock
|
||||
if its held on entry. go_dump and do_demote_ok must never block.
|
||||
Note that go_dump will only be called if the glock's state
|
||||
indicates that it is caching uptodate data.
|
||||
|
||||
Glock locking order within GFS2:
|
||||
|
||||
1. i_mutex (if required)
|
||||
2. Rename glock (for rename only)
|
||||
3. Inode glock(s)
|
||||
(Parents before children, inodes at "same level" with same parent in
|
||||
lock number order)
|
||||
4. Rgrp glock(s) (for (de)allocation operations)
|
||||
5. Transaction glock (via gfs2_trans_begin) for non-read operations
|
||||
6. Page lock (always last, very important!)
|
||||
|
||||
There are two glocks per inode. One deals with access to the inode
|
||||
itself (locking order as above), and the other, known as the iopen
|
||||
glock is used in conjunction with the i_nlink field in the inode to
|
||||
determine the lifetime of the inode in question. Locking of inodes
|
||||
is on a per-inode basis. Locking of rgrps is on a per rgrp basis.
|
||||
|
@ -380,28 +380,35 @@ i386 and x86_64 platforms support the new IRQ vector displays.
|
||||
Of some interest is the introduction of the /proc/irq directory to 2.4.
|
||||
It could be used to set IRQ to CPU affinity, this means that you can "hook" an
|
||||
IRQ to only one CPU, or to exclude a CPU of handling IRQs. The contents of the
|
||||
irq subdir is one subdir for each IRQ, and one file; prof_cpu_mask
|
||||
irq subdir is one subdir for each IRQ, and two files; default_smp_affinity and
|
||||
prof_cpu_mask.
|
||||
|
||||
For example
|
||||
> ls /proc/irq/
|
||||
0 10 12 14 16 18 2 4 6 8 prof_cpu_mask
|
||||
1 11 13 15 17 19 3 5 7 9
|
||||
1 11 13 15 17 19 3 5 7 9 default_smp_affinity
|
||||
> ls /proc/irq/0/
|
||||
smp_affinity
|
||||
|
||||
The contents of the prof_cpu_mask file and each smp_affinity file for each IRQ
|
||||
is the same by default:
|
||||
smp_affinity is a bitmask, in which you can specify which CPUs can handle the
|
||||
IRQ, you can set it by doing:
|
||||
|
||||
> cat /proc/irq/0/smp_affinity
|
||||
> echo 1 > /proc/irq/10/smp_affinity
|
||||
|
||||
This means that only the first CPU will handle the IRQ, but you can also echo
|
||||
5 which means that only the first and fourth CPU can handle the IRQ.
|
||||
|
||||
The contents of each smp_affinity file is the same by default:
|
||||
|
||||
> cat /proc/irq/0/smp_affinity
|
||||
ffffffff
|
||||
|
||||
It's a bitmask, in which you can specify which CPUs can handle the IRQ, you can
|
||||
set it by doing:
|
||||
The default_smp_affinity mask applies to all non-active IRQs, which are the
|
||||
IRQs which have not yet been allocated/activated, and hence which lack a
|
||||
/proc/irq/[0-9]* directory.
|
||||
|
||||
> echo 1 > /proc/irq/prof_cpu_mask
|
||||
|
||||
This means that only the first CPU will handle the IRQ, but you can also echo 5
|
||||
which means that only the first and fourth CPU can handle the IRQ.
|
||||
prof_cpu_mask specifies which CPUs are to be profiled by the system wide
|
||||
profiler. Default value is ffffffff (all cpus).
|
||||
|
||||
The way IRQs are routed is handled by the IO-APIC, and it's Round Robin
|
||||
between all the CPUs which are allowed to handle it. As usual the kernel has
|
||||
|
@ -4,9 +4,10 @@
|
||||
Copyright 2008 Red Hat Inc.
|
||||
Author: Steven Rostedt <srostedt@redhat.com>
|
||||
License: The GNU Free Documentation License, Version 1.2
|
||||
Reviewers: Elias Oltmanns and Randy Dunlap
|
||||
Reviewers: Elias Oltmanns, Randy Dunlap, Andrew Morton,
|
||||
John Kacur, and David Teigland.
|
||||
|
||||
Writen for: 2.6.26-rc8 linux-2.6-tip.git tip/tracing/ftrace branch
|
||||
Written for: 2.6.27-rc1
|
||||
|
||||
Introduction
|
||||
------------
|
||||
@ -18,10 +19,11 @@ issues that take place outside of user-space.
|
||||
|
||||
Although ftrace is the function tracer, it also includes an
|
||||
infrastructure that allows for other types of tracing. Some of the
|
||||
tracers that are currently in ftrace is a tracer to trace
|
||||
tracers that are currently in ftrace include a tracer to trace
|
||||
context switches, the time it takes for a high priority task to
|
||||
run after it was woken up, the time interrupts are disabled, and
|
||||
more.
|
||||
more (ftrace allows for tracer plugins, which means that the list of
|
||||
tracers can always grow).
|
||||
|
||||
|
||||
The File System
|
||||
@ -35,6 +37,8 @@ To mount the debugfs system:
|
||||
# mkdir /debug
|
||||
# mount -t debugfs nodev /debug
|
||||
|
||||
(Note: it is more common to mount at /sys/kernel/debug, but for simplicity
|
||||
this document will use /debug)
|
||||
|
||||
That's it! (assuming that you have ftrace configured into your kernel)
|
||||
|
||||
@ -50,20 +54,19 @@ of ftrace. Here is a list of some of the key files:
|
||||
|
||||
available_tracers : This holds the different types of tracers that
|
||||
have been compiled into the kernel. The tracers
|
||||
listed here can be configured by echoing in their
|
||||
name into current_tracer.
|
||||
listed here can be configured by echoing their name
|
||||
into current_tracer.
|
||||
|
||||
tracing_enabled : This sets or displays whether the current_tracer
|
||||
is activated and tracing or not. Echo 0 into this
|
||||
file to disable the tracer or 1 (or non-zero) to
|
||||
enable it.
|
||||
file to disable the tracer or 1 to enable it.
|
||||
|
||||
trace : This file holds the output of the trace in a human readable
|
||||
format.
|
||||
format (described below).
|
||||
|
||||
latency_trace : This file shows the same trace but the information
|
||||
is organized more to display possible latencies
|
||||
in the system.
|
||||
in the system (described below).
|
||||
|
||||
trace_pipe : The output is the same as the "trace" file but this
|
||||
file is meant to be streamed with live tracing.
|
||||
@ -75,7 +78,7 @@ of ftrace. Here is a list of some of the key files:
|
||||
file, it is consumed, and will not be read
|
||||
again with a sequential read. The "trace" and
|
||||
"latency_trace" files are static, and if the
|
||||
tracer isn't adding more data, they will display
|
||||
tracer is not adding more data, they will display
|
||||
the same information every time they are read.
|
||||
|
||||
iter_ctrl : This file lets the user control the amount of data
|
||||
@ -92,10 +95,10 @@ of ftrace. Here is a list of some of the key files:
|
||||
|
||||
trace_entries : This sets or displays the number of trace
|
||||
entries each CPU buffer can hold. The tracer buffers
|
||||
are the same size for each CPU, so care must be
|
||||
taken when modifying the trace_entries. The trace
|
||||
buffers are allocated in pages (blocks of memory that
|
||||
the kernel uses for allocation, usually 4 KB in size).
|
||||
are the same size for each CPU. The displayed number
|
||||
is the size of the CPU buffer and not total size. The
|
||||
trace buffers are allocated in pages (blocks of memory
|
||||
that the kernel uses for allocation, usually 4 KB in size).
|
||||
Since each entry is smaller than a page, if the last
|
||||
allocated page has room for more entries than were
|
||||
requested, the rest of the page is used to allocate
|
||||
@ -112,20 +115,19 @@ of ftrace. Here is a list of some of the key files:
|
||||
on specified CPUS. The format is a hex string
|
||||
representing the CPUS.
|
||||
|
||||
set_ftrace_filter : When dynamic ftrace is configured in, the
|
||||
code is dynamically modified to disable calling
|
||||
of the function profiler (mcount). This lets
|
||||
tracing be configured in with practically no overhead
|
||||
in performance. This also has a side effect of
|
||||
enabling or disabling specific functions to be
|
||||
traced. Echoing in names of functions into this
|
||||
file will limit the trace to only these functions.
|
||||
set_ftrace_filter : When dynamic ftrace is configured in (see the
|
||||
section below "dynamic ftrace"), the code is dynamically
|
||||
modified (code text rewrite) to disable calling of the
|
||||
function profiler (mcount). This lets tracing be configured
|
||||
in with practically no overhead in performance. This also
|
||||
has a side effect of enabling or disabling specific functions
|
||||
to be traced. Echoing names of functions into this file
|
||||
will limit the trace to only those functions.
|
||||
|
||||
set_ftrace_notrace: This has the opposite effect that
|
||||
set_ftrace_filter has. Any function that is added
|
||||
here will not be traced. If a function exists
|
||||
in both set_ftrace_filter and set_ftrace_notrace,
|
||||
the function will _not_ be traced.
|
||||
set_ftrace_notrace: This has an effect opposite to that of
|
||||
set_ftrace_filter. Any function that is added here will not
|
||||
be traced. If a function exists in both set_ftrace_filter
|
||||
and set_ftrace_notrace, the function will _not_ be traced.
|
||||
|
||||
available_filter_functions : When a function is encountered the first
|
||||
time by the dynamic tracer, it is recorded and
|
||||
@ -133,32 +135,31 @@ of ftrace. Here is a list of some of the key files:
|
||||
lists the functions that have been recorded
|
||||
by the dynamic tracer and these functions can
|
||||
be used to set the ftrace filter by the above
|
||||
"set_ftrace_filter" file.
|
||||
"set_ftrace_filter" file. (See the section "dynamic ftrace"
|
||||
below for more details).
|
||||
|
||||
|
||||
The Tracers
|
||||
-----------
|
||||
|
||||
Here are the list of current tracers that can be configured.
|
||||
Here is the list of current tracers that may be configured.
|
||||
|
||||
ftrace - function tracer that uses mcount to trace all functions.
|
||||
It is possible to filter out which functions that are
|
||||
to be traced when dynamic ftrace is configured in.
|
||||
|
||||
sched_switch - traces the context switches between tasks.
|
||||
|
||||
irqsoff - traces the areas that disable interrupts and saves off
|
||||
irqsoff - traces the areas that disable interrupts and saves
|
||||
the trace with the longest max latency.
|
||||
See tracing_max_latency. When a new max is recorded,
|
||||
it replaces the old trace. It is best to view this
|
||||
trace with the latency_trace file.
|
||||
trace via the latency_trace file.
|
||||
|
||||
preemptoff - Similar to irqsoff but traces and records the time
|
||||
preemption is disabled.
|
||||
preemptoff - Similar to irqsoff but traces and records the amount of
|
||||
time for which preemption is disabled.
|
||||
|
||||
preemptirqsoff - Similar to irqsoff and preemptoff, but traces and
|
||||
records the largest time irqs and/or preemption is
|
||||
disabled.
|
||||
records the largest time for which irqs and/or preemption
|
||||
is disabled.
|
||||
|
||||
wakeup - Traces and records the max latency that it takes for
|
||||
the highest priority task to get scheduled after
|
||||
@ -171,13 +172,13 @@ Here are the list of current tracers that can be configured.
|
||||
Examples of using the tracer
|
||||
----------------------------
|
||||
|
||||
Here are typical examples of using the tracers with only controlling
|
||||
them with the debugfs interface (without using any user-land utilities).
|
||||
Here are typical examples of using the tracers when controlling them only
|
||||
with the debugfs interface (without using any user-land utilities).
|
||||
|
||||
Output format:
|
||||
--------------
|
||||
|
||||
Here's an example of the output format of the file "trace"
|
||||
Here is an example of the output format of the file "trace"
|
||||
|
||||
--------
|
||||
# tracer: ftrace
|
||||
@ -189,14 +190,15 @@ Here's an example of the output format of the file "trace"
|
||||
bash-4251 [01] 10152.583855: _atomic_dec_and_lock <-dput
|
||||
--------
|
||||
|
||||
A header is printed with the trace that is represented. In this case
|
||||
the tracer is "ftrace". Then a header showing the format. Task name
|
||||
"bash", the task PID "4251", the CPU that it was running on
|
||||
A header is printed with the tracer name that is represented by the trace.
|
||||
In this case the tracer is "ftrace". Then a header showing the format. Task
|
||||
name "bash", the task PID "4251", the CPU that it was running on
|
||||
"01", the timestamp in <secs>.<usecs> format, the function name that was
|
||||
traced "path_put" and the parent function that called this function
|
||||
"path_walk".
|
||||
"path_walk". The timestamp is the time at which the function was
|
||||
entered.
|
||||
|
||||
The sched_switch tracer also includes tracing of task wake ups and
|
||||
The sched_switch tracer also includes tracing of task wakeups and
|
||||
context switches.
|
||||
|
||||
ksoftirqd/1-7 [01] 1453.070013: 7:115:R + 2916:115:S
|
||||
@ -206,7 +208,7 @@ context switches.
|
||||
kondemand/1-2916 [01] 1453.070013: 2916:115:S ==> 7:115:R
|
||||
ksoftirqd/1-7 [01] 1453.070013: 7:115:S ==> 0:140:R
|
||||
|
||||
Wake ups are represented by a "+" and the context switches show
|
||||
Wake ups are represented by a "+" and the context switches are shown as
|
||||
"==>". The format is:
|
||||
|
||||
Context switches:
|
||||
@ -221,7 +223,7 @@ Wake ups are represented by a "+" and the context switches show
|
||||
|
||||
<pid>:<prio>:<state> + <pid>:<prio>:<state>
|
||||
|
||||
The prio is the internal kernel priority, which is inverse to the
|
||||
The prio is the internal kernel priority, which is the inverse of the
|
||||
priority that is usually displayed by user-space tools. Zero represents
|
||||
the highest priority (99). Prio 100 starts the "nice" priorities with
|
||||
100 being equal to nice -20 and 139 being nice 19. The prio "140" is
|
||||
@ -232,7 +234,7 @@ Latency trace format
|
||||
--------------------
|
||||
|
||||
For traces that display latency times, the latency_trace file gives
|
||||
a bit more information to see why a latency happened. Here's a typical
|
||||
somewhat more information to see why a latency happened. Here is a typical
|
||||
trace.
|
||||
|
||||
# tracer: irqsoff
|
||||
@ -260,21 +262,20 @@ irqsoff latency trace v1.1.5 on 2.6.26-rc8
|
||||
<idle>-0 0d.s1 98us : trace_hardirqs_on (do_softirq)
|
||||
|
||||
|
||||
vim:ft=help
|
||||
|
||||
|
||||
This shows that the current tracer is "irqsoff" tracing the time
|
||||
interrupts are disabled. It gives the trace version and the kernel
|
||||
this was executed on (2.6.26-rc8). Then it displays the max latency
|
||||
in microsecs (97 us). The number of trace entries displayed
|
||||
by the total number recorded (both are three: #3/3). The type of
|
||||
This shows that the current tracer is "irqsoff" tracing the time for which
|
||||
interrupts were disabled. It gives the trace version and the version
|
||||
of the kernel upon which this was executed on (2.6.26-rc8). Then it displays
|
||||
the max latency in microsecs (97 us). The number of trace entries displayed
|
||||
and the total number recorded (both are three: #3/3). The type of
|
||||
preemption that was used (PREEMPT). VP, KP, SP, and HP are always zero
|
||||
and reserved for later use. #P is the number of online CPUS (#P:2).
|
||||
and are reserved for later use. #P is the number of online CPUS (#P:2).
|
||||
|
||||
The task is the process that was running when the latency happened.
|
||||
The task is the process that was running when the latency occurred.
|
||||
(swapper pid: 0).
|
||||
|
||||
The start and stop that caused the latencies:
|
||||
The start and stop (the functions in which the interrupts were disabled and
|
||||
enabled respectively) that caused the latencies:
|
||||
|
||||
apic_timer_interrupt is where the interrupts were disabled.
|
||||
do_softirq is where they were enabled again.
|
||||
@ -286,14 +287,14 @@ explains which is which.
|
||||
|
||||
pid: The PID of that process.
|
||||
|
||||
CPU#: The CPU that the process was running on.
|
||||
CPU#: The CPU which the process was running on.
|
||||
|
||||
irqs-off: 'd' interrupts are disabled. '.' otherwise.
|
||||
|
||||
need-resched: 'N' task need_resched is set, '.' otherwise.
|
||||
|
||||
hardirq/softirq:
|
||||
'H' - hard irq happened inside a softirq.
|
||||
'H' - hard irq occurred inside a softirq.
|
||||
'h' - hard irq is running
|
||||
's' - soft irq is running
|
||||
'.' - normal context.
|
||||
@ -303,7 +304,7 @@ explains which is which.
|
||||
The above is mostly meaningful for kernel developers.
|
||||
|
||||
time: This differs from the trace file output. The trace file output
|
||||
included an absolute timestamp. The timestamp used by the
|
||||
includes an absolute timestamp. The timestamp used by the
|
||||
latency_trace file is relative to the start of the trace.
|
||||
|
||||
delay: This is just to help catch your eye a bit better. And
|
||||
@ -385,7 +386,7 @@ Here are the available options:
|
||||
sched_switch
|
||||
------------
|
||||
|
||||
This tracer simply records schedule switches. Here's an example
|
||||
This tracer simply records schedule switches. Here is an example
|
||||
of how to use it.
|
||||
|
||||
# echo sched_switch > /debug/tracing/current_tracer
|
||||
@ -421,8 +422,8 @@ the name of the trace and points to the options. The "FUNCTION"
|
||||
is a misnomer since here it represents the wake ups and context
|
||||
switches.
|
||||
|
||||
The sched_switch only lists the wake ups (represented with '+')
|
||||
and context switches ('==>') with the previous task or current
|
||||
The sched_switch file only lists the wake ups (represented with '+')
|
||||
and context switches ('==>') with the previous task or current task
|
||||
first followed by the next task or task waking up. The format for both
|
||||
of these is PID:KERNEL-PRIO:TASK-STATE. Remember that the KERNEL-PRIO
|
||||
is the inverse of the actual priority with zero (0) being the highest
|
||||
@ -437,7 +438,8 @@ The task states are:
|
||||
|
||||
R - running : wants to run, may not actually be running
|
||||
S - sleep : process is waiting to be woken up (handles signals)
|
||||
D - deep sleep : process must be woken up (ignores signals)
|
||||
D - disk sleep (uninterruptible sleep) : process must be woken up
|
||||
(ignores signals)
|
||||
T - stopped : process suspended
|
||||
t - traced : process is being traced (with something like gdb)
|
||||
Z - zombie : process waiting to be cleaned up
|
||||
@ -447,8 +449,8 @@ The task states are:
|
||||
ftrace_enabled
|
||||
--------------
|
||||
|
||||
The following tracers give different output depending on whether
|
||||
or not the sysctl ftrace_enabled is set. To set ftrace_enabled,
|
||||
The following tracers (listed below) give different output depending
|
||||
on whether or not the sysctl ftrace_enabled is set. To set ftrace_enabled,
|
||||
one can either use the sysctl function or set it via the proc
|
||||
file system interface.
|
||||
|
||||
@ -475,13 +477,12 @@ interrupt from triggering or the mouse interrupt from letting the
|
||||
kernel know of a new mouse event. The result is a latency with the
|
||||
reaction time.
|
||||
|
||||
The irqsoff tracer tracks the time interrupts are disabled to the time
|
||||
they are re-enabled. When a new maximum latency is hit, it saves off
|
||||
the trace so that it may be retrieved at a later time. Every time a
|
||||
new maximum in reached, the old saved trace is discarded and the new
|
||||
trace is saved.
|
||||
The irqsoff tracer tracks the time for which interrupts are disabled.
|
||||
When a new maximum latency is hit, the tracer saves the trace leading up
|
||||
to that latency point so that every time a new maximum is reached, the old
|
||||
saved trace is discarded and the new trace is saved.
|
||||
|
||||
To reset the maximum, echo 0 into tracing_max_latency. Here's an
|
||||
To reset the maximum, echo 0 into tracing_max_latency. Here is an
|
||||
example:
|
||||
|
||||
# echo irqsoff > /debug/tracing/current_tracer
|
||||
@ -493,14 +494,14 @@ example:
|
||||
# cat /debug/tracing/latency_trace
|
||||
# tracer: irqsoff
|
||||
#
|
||||
irqsoff latency trace v1.1.5 on 2.6.26-rc8
|
||||
irqsoff latency trace v1.1.5 on 2.6.26
|
||||
--------------------------------------------------------------------
|
||||
latency: 6 us, #3/3, CPU#1 | (M:preempt VP:0, KP:0, SP:0 HP:0 #P:2)
|
||||
latency: 12 us, #3/3, CPU#1 | (M:preempt VP:0, KP:0, SP:0 HP:0 #P:2)
|
||||
-----------------
|
||||
| task: bash-4269 (uid:0 nice:0 policy:0 rt_prio:0)
|
||||
| task: bash-3730 (uid:0 nice:0 policy:0 rt_prio:0)
|
||||
-----------------
|
||||
=> started at: copy_page_range
|
||||
=> ended at: copy_page_range
|
||||
=> started at: sys_setpgid
|
||||
=> ended at: sys_setpgid
|
||||
|
||||
# _------=> CPU#
|
||||
# / _-----=> irqs-off
|
||||
@ -511,21 +512,19 @@ irqsoff latency trace v1.1.5 on 2.6.26-rc8
|
||||
# ||||| delay
|
||||
# cmd pid ||||| time | caller
|
||||
# \ / ||||| \ | /
|
||||
bash-4269 1...1 0us+: _spin_lock (copy_page_range)
|
||||
bash-4269 1...1 7us : _spin_unlock (copy_page_range)
|
||||
bash-4269 1...2 7us : trace_preempt_on (copy_page_range)
|
||||
bash-3730 1d... 0us : _write_lock_irq (sys_setpgid)
|
||||
bash-3730 1d..1 1us+: _write_unlock_irq (sys_setpgid)
|
||||
bash-3730 1d..2 14us : trace_hardirqs_on (sys_setpgid)
|
||||
|
||||
|
||||
vim:ft=help
|
||||
Here we see that that we had a latency of 12 microsecs (which is
|
||||
very good). The _write_lock_irq in sys_setpgid disabled interrupts.
|
||||
The difference between the 12 and the displayed timestamp 14us occurred
|
||||
because the clock was incremented between the time of recording the max
|
||||
latency and the time of recording the function that had that latency.
|
||||
|
||||
Here we see that that we had a latency of 6 microsecs (which is
|
||||
very good). The spin_lock in copy_page_range disabled interrupts.
|
||||
The difference between the 6 and the displayed timestamp 7us is
|
||||
because the clock must have incremented between the time of recording
|
||||
the max latency and recording the function that had that latency.
|
||||
|
||||
Note the above had ftrace_enabled not set. If we set the ftrace_enabled,
|
||||
we get a much larger output:
|
||||
Note the above example had ftrace_enabled not set. If we set the
|
||||
ftrace_enabled, we get a much larger output:
|
||||
|
||||
# tracer: irqsoff
|
||||
#
|
||||
@ -571,12 +570,10 @@ irqsoff latency trace v1.1.5 on 2.6.26-rc8
|
||||
ls-4339 0d..2 51us : trace_hardirqs_on (__alloc_pages_internal)
|
||||
|
||||
|
||||
vim:ft=help
|
||||
|
||||
|
||||
Here we traced a 50 microsecond latency. But we also see all the
|
||||
functions that were called during that time. Note that by enabling
|
||||
function tracing, we endure an added overhead. This overhead may
|
||||
function tracing, we incur an added overhead. This overhead may
|
||||
extend the latency times. But nevertheless, this trace has provided
|
||||
some very helpful debugging information.
|
||||
|
||||
@ -590,8 +587,9 @@ for preemption to be enabled again before it can preempt a lower
|
||||
priority task.
|
||||
|
||||
The preemptoff tracer traces the places that disable preemption.
|
||||
Like the irqsoff, it records the maximum latency that preemption
|
||||
was disabled. The control of preemptoff is much like the irqsoff.
|
||||
Like the irqsoff tracer, it records the maximum latency for which preemption
|
||||
was disabled. The control of preemptoff tracer is much like the irqsoff
|
||||
tracer.
|
||||
|
||||
# echo preemptoff > /debug/tracing/current_tracer
|
||||
# echo 0 > /debug/tracing/tracing_max_latency
|
||||
@ -625,8 +623,6 @@ preemptoff latency trace v1.1.5 on 2.6.26-rc8
|
||||
sshd-4261 0d.s1 30us : trace_preempt_on (__do_softirq)
|
||||
|
||||
|
||||
vim:ft=help
|
||||
|
||||
This has some more changes. Preemption was disabled when an interrupt
|
||||
came in (notice the 'h'), and was enabled while doing a softirq.
|
||||
(notice the 's'). But we also see that interrupts have been disabled
|
||||
@ -694,16 +690,16 @@ The above is an example of the preemptoff trace with ftrace_enabled
|
||||
set. Here we see that interrupts were disabled the entire time.
|
||||
The irq_enter code lets us know that we entered an interrupt 'h'.
|
||||
Before that, the functions being traced still show that it is not
|
||||
in an interrupt, but we can see by the functions themselves that
|
||||
in an interrupt, but we can see from the functions themselves that
|
||||
this is not the case.
|
||||
|
||||
Notice that the __do_softirq when called doesn't have a preempt_count.
|
||||
It may seem that we missed a preempt enabled. What really happened
|
||||
is that the preempt count is held on the threads stack and we
|
||||
Notice that __do_softirq when called does not have a preempt_count.
|
||||
It may seem that we missed a preempt enabling. What really happened
|
||||
is that the preempt count is held on the thread's stack and we
|
||||
switched to the softirq stack (4K stacks in effect). The code
|
||||
does not copy the preempt count, but because interrupts are disabled,
|
||||
we don't need to worry about it. Having a tracer like this is good
|
||||
to let people know what really happens inside the kernel.
|
||||
we do not need to worry about it. Having a tracer like this is good
|
||||
for letting people know what really happens inside the kernel.
|
||||
|
||||
|
||||
preemptirqsoff
|
||||
@ -713,7 +709,7 @@ Knowing the locations that have interrupts disabled or preemption
|
||||
disabled for the longest times is helpful. But sometimes we would
|
||||
like to know when either preemption and/or interrupts are disabled.
|
||||
|
||||
The following code:
|
||||
Consider the following code:
|
||||
|
||||
local_irq_disable();
|
||||
call_function_with_irqs_off();
|
||||
@ -769,12 +765,10 @@ preemptirqsoff latency trace v1.1.5 on 2.6.26-rc8
|
||||
ls-4860 0d.s1 294us : trace_preempt_on (__do_softirq)
|
||||
|
||||
|
||||
vim:ft=help
|
||||
|
||||
|
||||
The trace_hardirqs_off_thunk is called from assembly on x86 when
|
||||
interrupts are disabled in the assembly code. Without the function
|
||||
tracing, we don't know if interrupts were enabled within the preemption
|
||||
tracing, we do not know if interrupts were enabled within the preemption
|
||||
points. We do see that it started with preemption enabled.
|
||||
|
||||
Here is a trace with ftrace_enabled set:
|
||||
@ -865,19 +859,19 @@ preemptirqsoff latency trace v1.1.5 on 2.6.26-rc8
|
||||
|
||||
This is a very interesting trace. It started with the preemption of
|
||||
the ls task. We see that the task had the "need_resched" bit set
|
||||
with the 'N' in the trace. Interrupts are disabled in the spin_lock
|
||||
and the trace started. We see that a schedule took place to run
|
||||
via the 'N' in the trace. Interrupts were disabled before the spin_lock
|
||||
at the beginning of the trace. We see that a schedule took place to run
|
||||
sshd. When the interrupts were enabled, we took an interrupt.
|
||||
On return from the interrupt handler, the softirq ran. We took another
|
||||
interrupt while running the softirq as we see with the capital 'H'.
|
||||
interrupt while running the softirq as we see from the capital 'H'.
|
||||
|
||||
|
||||
wakeup
|
||||
------
|
||||
|
||||
In Real-Time environment it is very important to know the wakeup
|
||||
time it takes for the highest priority task that wakes up to the
|
||||
time it executes. This is also known as "schedule latency".
|
||||
In a Real-Time environment it is very important to know the wakeup
|
||||
time it takes for the highest priority task that is woken up to the
|
||||
time that it executes. This is also known as "schedule latency".
|
||||
I stress the point that this is about RT tasks. It is also important
|
||||
to know the scheduling latency of non-RT tasks, but the average
|
||||
schedule latency is better for non-RT tasks. Tools like
|
||||
@ -926,8 +920,6 @@ wakeup latency trace v1.1.5 on 2.6.26-rc8
|
||||
<idle>-0 1d..4 4us : schedule (cpu_idle)
|
||||
|
||||
|
||||
vim:ft=help
|
||||
|
||||
|
||||
Running this on an idle system, we see that it only took 4 microseconds
|
||||
to perform the task switch. Note, since the trace marker in the
|
||||
@ -996,15 +988,15 @@ ksoftirq-7 1d..6 49us : sub_preempt_count (_spin_unlock)
|
||||
ksoftirq-7 1d..4 50us : schedule (__cond_resched)
|
||||
|
||||
The interrupt went off while running ksoftirqd. This task runs at
|
||||
SCHED_OTHER. Why didn't we see the 'N' set early? This may be
|
||||
SCHED_OTHER. Why did not we see the 'N' set early? This may be
|
||||
a harmless bug with x86_32 and 4K stacks. On x86_32 with 4K stacks
|
||||
configured, the interrupt and softirq runs with their own stack.
|
||||
configured, the interrupt and softirq run with their own stack.
|
||||
Some information is held on the top of the task's stack (need_resched
|
||||
and preempt_count are both stored there). The setting of the NEED_RESCHED
|
||||
bit is done directly to the task's stack, but the reading of the
|
||||
NEED_RESCHED is done by looking at the current stack, which in this case
|
||||
is the stack for the hard interrupt. This hides the fact that NEED_RESCHED
|
||||
has been set. We don't see the 'N' until we switch back to the task's
|
||||
has been set. We do not see the 'N' until we switch back to the task's
|
||||
assigned stack.
|
||||
|
||||
ftrace
|
||||
@ -1044,14 +1036,14 @@ this tracer is a nop.
|
||||
[...]
|
||||
|
||||
|
||||
Note: It is sometimes better to enable or disable tracing directly from
|
||||
a program, because the buffer may be overflowed by the echo commands
|
||||
before you get to the point you want to trace. It is also easier to
|
||||
stop the tracing at the point that you hit the part that you are
|
||||
interested in. Since the ftrace buffer is a ring buffer with the
|
||||
oldest data being overwritten, usually it is sufficient to start the
|
||||
tracer with an echo command but have you code stop it. Something
|
||||
like the following is usually appropriate for this.
|
||||
Note: ftrace uses ring buffers to store the above entries. The newest data
|
||||
may overwrite the oldest data. Sometimes using echo to stop the trace
|
||||
is not sufficient because the tracing could have overwritten the data
|
||||
that you wanted to record. For this reason, it is sometimes better to
|
||||
disable tracing directly from a program. This allows you to stop the
|
||||
tracing at the point that you hit the part that you are interested in.
|
||||
To disable the tracing directly from a C program, something like following
|
||||
code snippet can be used:
|
||||
|
||||
int trace_fd;
|
||||
[...]
|
||||
@ -1060,20 +1052,26 @@ int main(int argc, char *argv[]) {
|
||||
trace_fd = open("/debug/tracing/tracing_enabled", O_WRONLY);
|
||||
[...]
|
||||
if (condition_hit()) {
|
||||
write(trace_fd, "0", 1);
|
||||
write(trace_fd, "0", 1);
|
||||
}
|
||||
[...]
|
||||
}
|
||||
|
||||
Note: Here we hard coded the path name. The debugfs mount is not
|
||||
guaranteed to be at /debug (and is more commonly at /sys/kernel/debug).
|
||||
For simple one time traces, the above is sufficent. For anything else,
|
||||
a search through /proc/mounts may be needed to find where the debugfs
|
||||
file-system is mounted.
|
||||
|
||||
dynamic ftrace
|
||||
--------------
|
||||
|
||||
If CONFIG_DYNAMIC_FTRACE is set, then the system will run with
|
||||
If CONFIG_DYNAMIC_FTRACE is set, the system will run with
|
||||
virtually no overhead when function tracing is disabled. The way
|
||||
this works is the mcount function call (placed at the start of
|
||||
every kernel function, produced by the -pg switch in gcc), starts
|
||||
of pointing to a simple return.
|
||||
of pointing to a simple return. (Enabling FTRACE will include the
|
||||
-pg switch in the compiling of the kernel.)
|
||||
|
||||
When dynamic ftrace is initialized, it calls kstop_machine to make
|
||||
the machine act like a uniprocessor so that it can freely modify code
|
||||
@ -1086,15 +1084,15 @@ Later on the ftraced kernel thread is awoken and will again call
|
||||
kstop_machine if new functions have been recorded. The ftraced thread
|
||||
will change all calls to mcount to "nop". Just calling mcount
|
||||
and having mcount return has shown a 10% overhead. By converting
|
||||
it to a nop, there is no recordable overhead to the system.
|
||||
it to a nop, there is no measurable overhead to the system.
|
||||
|
||||
One special side-effect to the recording of the functions being
|
||||
traced, is that we can now selectively choose which functions we
|
||||
want to trace and which ones we want the mcount calls to remain as
|
||||
traced is that we can now selectively choose which functions we
|
||||
wish to trace and which ones we want the mcount calls to remain as
|
||||
nops.
|
||||
|
||||
Two files are used, one for enabling and one for disabling the tracing
|
||||
of recorded functions. They are:
|
||||
of specified functions. They are:
|
||||
|
||||
set_ftrace_filter
|
||||
|
||||
@ -1116,7 +1114,7 @@ pick_next_task_fair
|
||||
mutex_lock
|
||||
[...]
|
||||
|
||||
If I'm only interested in sys_nanosleep and hrtimer_interrupt:
|
||||
If I am only interested in sys_nanosleep and hrtimer_interrupt:
|
||||
|
||||
# echo sys_nanosleep hrtimer_interrupt \
|
||||
> /debug/tracing/set_ftrace_filter
|
||||
@ -1133,21 +1131,21 @@ If I'm only interested in sys_nanosleep and hrtimer_interrupt:
|
||||
usleep-4134 [00] 1317.070111: sys_nanosleep <-syscall_call
|
||||
<idle>-0 [00] 1317.070115: hrtimer_interrupt <-smp_apic_timer_interrupt
|
||||
|
||||
To see what functions are being traced, you can cat the file:
|
||||
To see which functions are being traced, you can cat the file:
|
||||
|
||||
# cat /debug/tracing/set_ftrace_filter
|
||||
hrtimer_interrupt
|
||||
sys_nanosleep
|
||||
|
||||
|
||||
Perhaps this isn't enough. The filters also allow simple wild cards.
|
||||
Perhaps this is not enough. The filters also allow simple wild cards.
|
||||
Only the following are currently available
|
||||
|
||||
<match>* - will match functions that begin with <match>
|
||||
*<match> - will match functions that end with <match>
|
||||
*<match>* - will match functions that have <match> in it
|
||||
|
||||
Thats all the wild cards that are allowed.
|
||||
These are the only wild cards which are supported.
|
||||
|
||||
<match>*<match> will not work.
|
||||
|
||||
@ -1258,15 +1256,15 @@ calls that need to be converted into nops. If there are not any, then
|
||||
it simply goes back to sleep. But if there are some, it will call
|
||||
kstop_machine to convert the calls to nops.
|
||||
|
||||
There may be a case that you do not want this added latency.
|
||||
There may be a case in which you do not want this added latency.
|
||||
Perhaps you are doing some audio recording and this activity might
|
||||
cause skips in the playback. There is an interface to disable
|
||||
and enable the ftraced kernel thread.
|
||||
and enable the "ftraced" kernel thread.
|
||||
|
||||
# echo 0 > /debug/tracing/ftraced_enabled
|
||||
|
||||
This will disable the calling of the kstop_machine to update the
|
||||
mcount calls to nops. Remember that there's a large overhead
|
||||
This will disable the calling of kstop_machine to update the
|
||||
mcount calls to nops. Remember that there is a large overhead
|
||||
to calling mcount. Without this kernel thread, that overhead will
|
||||
exist.
|
||||
|
||||
@ -1282,8 +1280,8 @@ that uses ftrace function recording.
|
||||
trace_pipe
|
||||
----------
|
||||
|
||||
The trace_pipe outputs the same as trace, but the effect on the
|
||||
tracing is different. Every read from trace_pipe is consumed.
|
||||
The trace_pipe outputs the same content as the trace file, but the effect
|
||||
on the tracing is different. Every read from trace_pipe is consumed.
|
||||
This means that subsequent reads will be different. The trace
|
||||
is live.
|
||||
|
||||
@ -1313,7 +1311,7 @@ is live.
|
||||
bash-4043 [00] 41.267111: select_task_rq_rt <-try_to_wake_up
|
||||
|
||||
|
||||
Note, reading the trace_pipe will block until more input is added.
|
||||
Note, reading the trace_pipe file will block until more input is added.
|
||||
By changing the tracer, trace_pipe will issue an EOF. We needed
|
||||
to set the ftrace tracer _before_ cating the trace_pipe file.
|
||||
|
||||
@ -1322,7 +1320,7 @@ trace entries
|
||||
-------------
|
||||
|
||||
Having too much or not enough data can be troublesome in diagnosing
|
||||
some issue in the kernel. The file trace_entries is used to modify
|
||||
an issue in the kernel. The file trace_entries is used to modify
|
||||
the size of the internal trace buffers. The number listed
|
||||
is the number of entries that can be recorded per CPU. To know
|
||||
the full size, multiply the number of possible CPUS with the
|
||||
@ -1332,7 +1330,8 @@ number of entries.
|
||||
65620
|
||||
|
||||
Note, to modify this, you must have tracing completely disabled. To do that,
|
||||
echo "none" into the current_tracer.
|
||||
echo "none" into the current_tracer. If the current_tracer is not set
|
||||
to "none", an EINVAL error will be returned.
|
||||
|
||||
# echo none > /debug/tracing/current_tracer
|
||||
# echo 100000 > /debug/tracing/trace_entries
|
||||
@ -1341,18 +1340,18 @@ echo "none" into the current_tracer.
|
||||
|
||||
|
||||
Notice that we echoed in 100,000 but the size is 100,045. The entries
|
||||
are held by individual pages. It allocates the number of pages it takes
|
||||
are held in individual pages. It allocates the number of pages it takes
|
||||
to fulfill the request. If more entries may fit on the last page
|
||||
it will add them.
|
||||
then they will be added.
|
||||
|
||||
# echo 1 > /debug/tracing/trace_entries
|
||||
# cat /debug/tracing/trace_entries
|
||||
85
|
||||
|
||||
This shows us that 85 entries can fit on a single page.
|
||||
This shows us that 85 entries can fit in a single page.
|
||||
|
||||
The number of pages that will be allocated is a percentage of available
|
||||
memory. Allocating too much will produce an error.
|
||||
The number of pages which will be allocated is limited to a percentage
|
||||
of available memory. Allocating too much will produce an error.
|
||||
|
||||
# echo 1000000000000 > /debug/tracing/trace_entries
|
||||
-bash: echo: write error: Cannot allocate memory
|
||||
|
@ -1,47 +0,0 @@
|
||||
Kernel driver i2c-i810
|
||||
|
||||
Supported adapters:
|
||||
* Intel 82810, 82810-DC100, 82810E, and 82815 (GMCH)
|
||||
* Intel 82845G (GMCH)
|
||||
|
||||
Authors:
|
||||
Frodo Looijaard <frodol@dds.nl>,
|
||||
Philip Edelbrock <phil@netroedge.com>,
|
||||
Kyösti Mälkki <kmalkki@cc.hut.fi>,
|
||||
Ralph Metzler <rjkm@thp.uni-koeln.de>,
|
||||
Mark D. Studebaker <mdsxyz123@yahoo.com>
|
||||
|
||||
Main contact: Mark Studebaker <mdsxyz123@yahoo.com>
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
||||
WARNING: If you have an '810' or '815' motherboard, your standard I2C
|
||||
temperature sensors are most likely on the 801's I2C bus. You want the
|
||||
i2c-i801 driver for those, not this driver.
|
||||
|
||||
Now for the i2c-i810...
|
||||
|
||||
The GMCH chip contains two I2C interfaces.
|
||||
|
||||
The first interface is used for DDC (Data Display Channel) which is a
|
||||
serial channel through the VGA monitor connector to a DDC-compliant
|
||||
monitor. This interface is defined by the Video Electronics Standards
|
||||
Association (VESA). The standards are available for purchase at
|
||||
http://www.vesa.org .
|
||||
|
||||
The second interface is a general-purpose I2C bus. It may be connected to a
|
||||
TV-out chip such as the BT869 or possibly to a digital flat-panel display.
|
||||
|
||||
Features
|
||||
--------
|
||||
|
||||
Both busses use the i2c-algo-bit driver for 'bit banging'
|
||||
and support for specific transactions is provided by i2c-algo-bit.
|
||||
|
||||
Issues
|
||||
------
|
||||
|
||||
If you enable bus testing in i2c-algo-bit (insmod i2c-algo-bit bit_test=1),
|
||||
the test may fail; if so, the i2c-i810 driver won't be inserted. However,
|
||||
we think this has been fixed.
|
@ -1,23 +0,0 @@
|
||||
Kernel driver i2c-prosavage
|
||||
|
||||
Supported adapters:
|
||||
|
||||
S3/VIA KM266/VT8375 aka ProSavage8
|
||||
S3/VIA KM133/VT8365 aka Savage4
|
||||
|
||||
Author: Henk Vergonet <henk@god.dyndns.org>
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
||||
The Savage4 chips contain two I2C interfaces (aka a I2C 'master' or
|
||||
'host').
|
||||
|
||||
The first interface is used for DDC (Data Display Channel) which is a
|
||||
serial channel through the VGA monitor connector to a DDC-compliant
|
||||
monitor. This interface is defined by the Video Electronics Standards
|
||||
Association (VESA). The standards are available for purchase at
|
||||
http://www.vesa.org . The second interface is a general-purpose I2C bus.
|
||||
|
||||
Usefull for gaining access to the TV Encoder chips.
|
||||
|
@ -1,26 +0,0 @@
|
||||
Kernel driver i2c-savage4
|
||||
|
||||
Supported adapters:
|
||||
* Savage4
|
||||
* Savage2000
|
||||
|
||||
Authors:
|
||||
Alexander Wold <awold@bigfoot.com>,
|
||||
Mark D. Studebaker <mdsxyz123@yahoo.com>
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
||||
The Savage4 chips contain two I2C interfaces (aka a I2C 'master'
|
||||
or 'host').
|
||||
|
||||
The first interface is used for DDC (Data Display Channel) which is a
|
||||
serial channel through the VGA monitor connector to a DDC-compliant
|
||||
monitor. This interface is defined by the Video Electronics Standards
|
||||
Association (VESA). The standards are available for purchase at
|
||||
http://www.vesa.org . The DDC bus is not yet supported because its register
|
||||
is not directly memory-mapped.
|
||||
|
||||
The second interface is a general-purpose I2C bus. This is the only
|
||||
interface supported by the driver at the moment.
|
||||
|
127
Documentation/i2c/fault-codes
Normal file
127
Documentation/i2c/fault-codes
Normal file
@ -0,0 +1,127 @@
|
||||
This is a summary of the most important conventions for use of fault
|
||||
codes in the I2C/SMBus stack.
|
||||
|
||||
|
||||
A "Fault" is not always an "Error"
|
||||
----------------------------------
|
||||
Not all fault reports imply errors; "page faults" should be a familiar
|
||||
example. Software often retries idempotent operations after transient
|
||||
faults. There may be fancier recovery schemes that are appropriate in
|
||||
some cases, such as re-initializing (and maybe resetting). After such
|
||||
recovery, triggered by a fault report, there is no error.
|
||||
|
||||
In a similar way, sometimes a "fault" code just reports one defined
|
||||
result for an operation ... it doesn't indicate that anything is wrong
|
||||
at all, just that the outcome wasn't on the "golden path".
|
||||
|
||||
In short, your I2C driver code may need to know these codes in order
|
||||
to respond correctly. Other code may need to rely on YOUR code reporting
|
||||
the right fault code, so that it can (in turn) behave correctly.
|
||||
|
||||
|
||||
I2C and SMBus fault codes
|
||||
-------------------------
|
||||
These are returned as negative numbers from most calls, with zero or
|
||||
some positive number indicating a non-fault return. The specific
|
||||
numbers associated with these symbols differ between architectures,
|
||||
though most Linux systems use <asm-generic/errno*.h> numbering.
|
||||
|
||||
Note that the descriptions here are not exhaustive. There are other
|
||||
codes that may be returned, and other cases where these codes should
|
||||
be returned. However, drivers should not return other codes for these
|
||||
cases (unless the hardware doesn't provide unique fault reports).
|
||||
|
||||
Also, codes returned by adapter probe methods follow rules which are
|
||||
specific to their host bus (such as PCI, or the platform bus).
|
||||
|
||||
|
||||
EAGAIN
|
||||
Returned by I2C adapters when they lose arbitration in master
|
||||
transmit mode: some other master was transmitting different
|
||||
data at the same time.
|
||||
|
||||
Also returned when trying to invoke an I2C operation in an
|
||||
atomic context, when some task is already using that I2C bus
|
||||
to execute some other operation.
|
||||
|
||||
EBADMSG
|
||||
Returned by SMBus logic when an invalid Packet Error Code byte
|
||||
is received. This code is a CRC covering all bytes in the
|
||||
transaction, and is sent before the terminating STOP. This
|
||||
fault is only reported on read transactions; the SMBus slave
|
||||
may have a way to report PEC mismatches on writes from the
|
||||
host. Note that even if PECs are in use, you should not rely
|
||||
on these as the only way to detect incorrect data transfers.
|
||||
|
||||
EBUSY
|
||||
Returned by SMBus adapters when the bus was busy for longer
|
||||
than allowed. This usually indicates some device (maybe the
|
||||
SMBus adapter) needs some fault recovery (such as resetting),
|
||||
or that the reset was attempted but failed.
|
||||
|
||||
EINVAL
|
||||
This rather vague error means an invalid parameter has been
|
||||
detected before any I/O operation was started. Use a more
|
||||
specific fault code when you can.
|
||||
|
||||
One example would be a driver trying an SMBus Block Write
|
||||
with block size outside the range of 1-32 bytes.
|
||||
|
||||
EIO
|
||||
This rather vague error means something went wrong when
|
||||
performing an I/O operation. Use a more specific fault
|
||||
code when you can.
|
||||
|
||||
ENODEV
|
||||
Returned by driver probe() methods. This is a bit more
|
||||
specific than ENXIO, implying the problem isn't with the
|
||||
address, but with the device found there. Driver probes
|
||||
may verify the device returns *correct* responses, and
|
||||
return this as appropriate. (The driver core will warn
|
||||
about probe faults other than ENXIO and ENODEV.)
|
||||
|
||||
ENOMEM
|
||||
Returned by any component that can't allocate memory when
|
||||
it needs to do so.
|
||||
|
||||
ENXIO
|
||||
Returned by I2C adapters to indicate that the address phase
|
||||
of a transfer didn't get an ACK. While it might just mean
|
||||
an I2C device was temporarily not responding, usually it
|
||||
means there's nothing listening at that address.
|
||||
|
||||
Returned by driver probe() methods to indicate that they
|
||||
found no device to bind to. (ENODEV may also be used.)
|
||||
|
||||
EOPNOTSUPP
|
||||
Returned by an adapter when asked to perform an operation
|
||||
that it doesn't, or can't, support.
|
||||
|
||||
For example, this would be returned when an adapter that
|
||||
doesn't support SMBus block transfers is asked to execute
|
||||
one. In that case, the driver making that request should
|
||||
have verified that functionality was supported before it
|
||||
made that block transfer request.
|
||||
|
||||
Similarly, if an I2C adapter can't execute all legal I2C
|
||||
messages, it should return this when asked to perform a
|
||||
transaction it can't. (These limitations can't be seen in
|
||||
the adapter's functionality mask, since the assumption is
|
||||
that if an adapter supports I2C it supports all of I2C.)
|
||||
|
||||
EPROTO
|
||||
Returned when slave does not conform to the relevant I2C
|
||||
or SMBus (or chip-specific) protocol specifications. One
|
||||
case is when the length of an SMBus block data response
|
||||
(from the SMBus slave) is outside the range 1-32 bytes.
|
||||
|
||||
ETIMEDOUT
|
||||
This is returned by drivers when an operation took too much
|
||||
time, and was aborted before it completed.
|
||||
|
||||
SMBus adapters may return it when an operation took more
|
||||
time than allowed by the SMBus specification; for example,
|
||||
when a slave stretches clocks too far. I2C has no such
|
||||
timeouts, but it's normal for I2C adapters to impose some
|
||||
arbitrary limits (much longer than SMBus!) too.
|
||||
|
@ -42,8 +42,8 @@ Count (8 bits): A data byte containing the length of a block operation.
|
||||
[..]: Data sent by I2C device, as opposed to data sent by the host adapter.
|
||||
|
||||
|
||||
SMBus Quick Command: i2c_smbus_write_quick()
|
||||
=============================================
|
||||
SMBus Quick Command
|
||||
===================
|
||||
|
||||
This sends a single bit to the device, at the place of the Rd/Wr bit.
|
||||
|
||||
|
@ -44,6 +44,10 @@ static struct i2c_driver foo_driver = {
|
||||
.id_table = foo_ids,
|
||||
.probe = foo_probe,
|
||||
.remove = foo_remove,
|
||||
/* if device autodetection is needed: */
|
||||
.class = I2C_CLASS_SOMETHING,
|
||||
.detect = foo_detect,
|
||||
.address_data = &addr_data,
|
||||
|
||||
/* else, driver uses "legacy" binding model: */
|
||||
.attach_adapter = foo_attach_adapter,
|
||||
@ -217,6 +221,31 @@ in the I2C bus driver. You may want to save the returned i2c_client
|
||||
reference for later use.
|
||||
|
||||
|
||||
Device Detection (Standard driver model)
|
||||
----------------------------------------
|
||||
|
||||
Sometimes you do not know in advance which I2C devices are connected to
|
||||
a given I2C bus. This is for example the case of hardware monitoring
|
||||
devices on a PC's SMBus. In that case, you may want to let your driver
|
||||
detect supported devices automatically. This is how the legacy model
|
||||
was working, and is now available as an extension to the standard
|
||||
driver model (so that we can finally get rid of the legacy model.)
|
||||
|
||||
You simply have to define a detect callback which will attempt to
|
||||
identify supported devices (returning 0 for supported ones and -ENODEV
|
||||
for unsupported ones), a list of addresses to probe, and a device type
|
||||
(or class) so that only I2C buses which may have that type of device
|
||||
connected (and not otherwise enumerated) will be probed. The i2c
|
||||
core will then call you back as needed and will instantiate a device
|
||||
for you for every successful detection.
|
||||
|
||||
Note that this mechanism is purely optional and not suitable for all
|
||||
devices. You need some reliable way to identify the supported devices
|
||||
(typically using device-specific, dedicated identification registers),
|
||||
otherwise misdetections are likely to occur and things can get wrong
|
||||
quickly.
|
||||
|
||||
|
||||
Device Deletion (Standard driver model)
|
||||
---------------------------------------
|
||||
|
||||
@ -569,7 +598,6 @@ SMBus communication
|
||||
in terms of it. Never use this function directly!
|
||||
|
||||
|
||||
extern s32 i2c_smbus_write_quick(struct i2c_client * client, u8 value);
|
||||
extern s32 i2c_smbus_read_byte(struct i2c_client * client);
|
||||
extern s32 i2c_smbus_write_byte(struct i2c_client * client, u8 value);
|
||||
extern s32 i2c_smbus_read_byte_data(struct i2c_client * client, u8 command);
|
||||
@ -578,30 +606,31 @@ SMBus communication
|
||||
extern s32 i2c_smbus_read_word_data(struct i2c_client * client, u8 command);
|
||||
extern s32 i2c_smbus_write_word_data(struct i2c_client * client,
|
||||
u8 command, u16 value);
|
||||
extern s32 i2c_smbus_read_block_data(struct i2c_client * client,
|
||||
u8 command, u8 *values);
|
||||
extern s32 i2c_smbus_write_block_data(struct i2c_client * client,
|
||||
u8 command, u8 length,
|
||||
u8 *values);
|
||||
extern s32 i2c_smbus_read_i2c_block_data(struct i2c_client * client,
|
||||
u8 command, u8 length, u8 *values);
|
||||
|
||||
These ones were removed in Linux 2.6.10 because they had no users, but could
|
||||
be added back later if needed:
|
||||
|
||||
extern s32 i2c_smbus_read_block_data(struct i2c_client * client,
|
||||
u8 command, u8 *values);
|
||||
extern s32 i2c_smbus_write_i2c_block_data(struct i2c_client * client,
|
||||
u8 command, u8 length,
|
||||
u8 *values);
|
||||
|
||||
These ones were removed from i2c-core because they had no users, but could
|
||||
be added back later if needed:
|
||||
|
||||
extern s32 i2c_smbus_write_quick(struct i2c_client * client, u8 value);
|
||||
extern s32 i2c_smbus_process_call(struct i2c_client * client,
|
||||
u8 command, u16 value);
|
||||
extern s32 i2c_smbus_block_process_call(struct i2c_client *client,
|
||||
u8 command, u8 length,
|
||||
u8 *values)
|
||||
|
||||
All these transactions return -1 on failure. The 'write' transactions
|
||||
return 0 on success; the 'read' transactions return the read value, except
|
||||
for read_block, which returns the number of values read. The block buffers
|
||||
need not be longer than 32 bytes.
|
||||
All these transactions return a negative errno value on failure. The 'write'
|
||||
transactions return 0 on success; the 'read' transactions return the read
|
||||
value, except for block transactions, which return the number of values
|
||||
read. The block buffers need not be longer than 32 bytes.
|
||||
|
||||
You can read the file `smbus-protocol' for more information about the
|
||||
actual SMBus protocol.
|
||||
|
@ -571,6 +571,8 @@ and is between 256 and 4096 characters. It is defined in the file
|
||||
|
||||
debug_objects [KNL] Enable object debugging
|
||||
|
||||
debugpat [X86] Enable PAT debugging
|
||||
|
||||
decnet.addr= [HW,NET]
|
||||
Format: <area>[,<node>]
|
||||
See also Documentation/networking/decnet.txt.
|
||||
@ -756,9 +758,6 @@ and is between 256 and 4096 characters. It is defined in the file
|
||||
hd= [EIDE] (E)IDE hard drive subsystem geometry
|
||||
Format: <cyl>,<head>,<sect>
|
||||
|
||||
hd?= [HW] (E)IDE subsystem
|
||||
hd?lun= See Documentation/ide/ide.txt.
|
||||
|
||||
highmem=nn[KMG] [KNL,BOOT] forces the highmem zone to have an exact
|
||||
size of <nn>. This works even on boxes that have no
|
||||
highmem otherwise. This also works to reduce highmem
|
||||
@ -1610,6 +1609,10 @@ and is between 256 and 4096 characters. It is defined in the file
|
||||
Format: { parport<nr> | timid | 0 }
|
||||
See also Documentation/parport.txt.
|
||||
|
||||
pmtmr= [X86] Manual setup of pmtmr I/O Port.
|
||||
Override pmtimer IOPort with a hex value.
|
||||
e.g. pmtmr=0x508
|
||||
|
||||
pnpacpi= [ACPI]
|
||||
{ off }
|
||||
|
||||
|
@ -172,6 +172,7 @@ architectures:
|
||||
- ia64 (Does not support probes on instruction slot1.)
|
||||
- sparc64 (Return probes not yet implemented.)
|
||||
- arm
|
||||
- ppc
|
||||
|
||||
3. Configuring Kprobes
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
141
Documentation/powerpc/bootwrapper.txt
Normal file
141
Documentation/powerpc/bootwrapper.txt
Normal file
@ -0,0 +1,141 @@
|
||||
The PowerPC boot wrapper
|
||||
------------------------
|
||||
Copyright (C) Secret Lab Technologies Ltd.
|
||||
|
||||
PowerPC image targets compresses and wraps the kernel image (vmlinux) with
|
||||
a boot wrapper to make it usable by the system firmware. There is no
|
||||
standard PowerPC firmware interface, so the boot wrapper is designed to
|
||||
be adaptable for each kind of image that needs to be built.
|
||||
|
||||
The boot wrapper can be found in the arch/powerpc/boot/ directory. The
|
||||
Makefile in that directory has targets for all the available image types.
|
||||
The different image types are used to support all of the various firmware
|
||||
interfaces found on PowerPC platforms. OpenFirmware is the most commonly
|
||||
used firmware type on general purpose PowerPC systems from Apple, IBM and
|
||||
others. U-Boot is typically found on embedded PowerPC hardware, but there
|
||||
are a handful of other firmware implementations which are also popular. Each
|
||||
firmware interface requires a different image format.
|
||||
|
||||
The boot wrapper is built from the makefile in arch/powerpc/boot/Makefile and
|
||||
it uses the wrapper script (arch/powerpc/boot/wrapper) to generate target
|
||||
image. The details of the build system is discussed in the next section.
|
||||
Currently, the following image format targets exist:
|
||||
|
||||
cuImage.%: Backwards compatible uImage for older version of
|
||||
U-Boot (for versions that don't understand the device
|
||||
tree). This image embeds a device tree blob inside
|
||||
the image. The boot wrapper, kernel and device tree
|
||||
are all embedded inside the U-Boot uImage file format
|
||||
with boot wrapper code that extracts data from the old
|
||||
bd_info structure and loads the data into the device
|
||||
tree before jumping into the kernel.
|
||||
Because of the series of #ifdefs found in the
|
||||
bd_info structure used in the old U-Boot interfaces,
|
||||
cuImages are platform specific. Each specific
|
||||
U-Boot platform has a different platform init file
|
||||
which populates the embedded device tree with data
|
||||
from the platform specific bd_info file. The platform
|
||||
specific cuImage platform init code can be found in
|
||||
arch/powerpc/boot/cuboot.*.c. Selection of the correct
|
||||
cuImage init code for a specific board can be found in
|
||||
the wrapper structure.
|
||||
dtbImage.%: Similar to zImage, except device tree blob is embedded
|
||||
inside the image instead of provided by firmware. The
|
||||
output image file can be either an elf file or a flat
|
||||
binary depending on the platform.
|
||||
dtbImages are used on systems which do not have an
|
||||
interface for passing a device tree directly.
|
||||
dtbImages are similar to simpleImages except that
|
||||
dtbImages have platform specific code for extracting
|
||||
data from the board firmware, but simpleImages do not
|
||||
talk to the firmware at all.
|
||||
PlayStation 3 support uses dtbImage. So do Embedded
|
||||
Planet boards using the PlanetCore firmware. Board
|
||||
specific initialization code is typically found in a
|
||||
file named arch/powerpc/boot/<platform>.c; but this
|
||||
can be overridden by the wrapper script.
|
||||
simpleImage.%: Firmware independent compressed image that does not
|
||||
depend on any particular firmware interface and embeds
|
||||
a device tree blob. This image is a flat binary that
|
||||
can be loaded to any location in RAM and jumped to.
|
||||
Firmware cannot pass any configuration data to the
|
||||
kernel with this image type and it depends entirely on
|
||||
the embedded device tree for all information.
|
||||
The simpleImage is useful for booting systems with
|
||||
an unknown firmware interface or for booting from
|
||||
a debugger when no firmware is present (such as on
|
||||
the Xilinx Virtex platform). The only assumption that
|
||||
simpleImage makes is that RAM is correctly initialized
|
||||
and that the MMU is either off or has RAM mapped to
|
||||
base address 0.
|
||||
simpleImage also supports inserting special platform
|
||||
specific initialization code to the start of the bootup
|
||||
sequence. The virtex405 platform uses this feature to
|
||||
ensure that the cache is invalidated before caching
|
||||
is enabled. Platform specific initialization code is
|
||||
added as part of the wrapper script and is keyed on
|
||||
the image target name. For example, all
|
||||
simpleImage.virtex405-* targets will add the
|
||||
virtex405-head.S initialization code (This also means
|
||||
that the dts file for virtex405 targets should be
|
||||
named (virtex405-<board>.dts). Search the wrapper
|
||||
script for 'virtex405' and see the file
|
||||
arch/powerpc/boot/virtex405-head.S for details.
|
||||
treeImage.%; Image format for used with OpenBIOS firmware found
|
||||
on some ppc4xx hardware. This image embeds a device
|
||||
tree blob inside the image.
|
||||
uImage: Native image format used by U-Boot. The uImage target
|
||||
does not add any boot code. It just wraps a compressed
|
||||
vmlinux in the uImage data structure. This image
|
||||
requires a version of U-Boot that is able to pass
|
||||
a device tree to the kernel at boot. If using an older
|
||||
version of U-Boot, then you need to use a cuImage
|
||||
instead.
|
||||
zImage.%: Image format which does not embed a device tree.
|
||||
Used by OpenFirmware and other firmware interfaces
|
||||
which are able to supply a device tree. This image
|
||||
expects firmware to provide the device tree at boot.
|
||||
Typically, if you have general purpose PowerPC
|
||||
hardware then you want this image format.
|
||||
|
||||
Image types which embed a device tree blob (simpleImage, dtbImage, treeImage,
|
||||
and cuImage) all generate the device tree blob from a file in the
|
||||
arch/powerpc/boot/dts/ directory. The Makefile selects the correct device
|
||||
tree source based on the name of the target. Therefore, if the kernel is
|
||||
built with 'make treeImage.walnut simpleImage.virtex405-ml403', then the
|
||||
build system will use arch/powerpc/boot/dts/walnut.dts to build
|
||||
treeImage.walnut and arch/powerpc/boot/dts/virtex405-ml403.dts to build
|
||||
the simpleImage.virtex405-ml403.
|
||||
|
||||
Two special targets called 'zImage' and 'zImage.initrd' also exist. These
|
||||
targets build all the default images as selected by the kernel configuration.
|
||||
Default images are selected by the boot wrapper Makefile
|
||||
(arch/powerpc/boot/Makefile) by adding targets to the $image-y variable. Look
|
||||
at the Makefile to see which default image targets are available.
|
||||
|
||||
How it is built
|
||||
---------------
|
||||
arch/powerpc is designed to support multiplatform kernels, which means
|
||||
that a single vmlinux image can be booted on many different target boards.
|
||||
It also means that the boot wrapper must be able to wrap for many kinds of
|
||||
images on a single build. The design decision was made to not use any
|
||||
conditional compilation code (#ifdef, etc) in the boot wrapper source code.
|
||||
All of the boot wrapper pieces are buildable at any time regardless of the
|
||||
kernel configuration. Building all the wrapper bits on every kernel build
|
||||
also ensures that obscure parts of the wrapper are at the very least compile
|
||||
tested in a large variety of environments.
|
||||
|
||||
The wrapper is adapted for different image types at link time by linking in
|
||||
just the wrapper bits that are appropriate for the image type. The 'wrapper
|
||||
script' (found in arch/powerpc/boot/wrapper) is called by the Makefile and
|
||||
is responsible for selecting the correct wrapper bits for the image type.
|
||||
The arguments are well documented in the script's comment block, so they
|
||||
are not repeated here. However, it is worth mentioning that the script
|
||||
uses the -p (platform) argument as the main method of deciding which wrapper
|
||||
bits to compile in. Look for the large 'case "$platform" in' block in the
|
||||
middle of the script. This is also the place where platform specific fixups
|
||||
can be selected by changing the link order.
|
||||
|
||||
In particular, care should be taken when working with cuImages. cuImage
|
||||
wrapper bits are very board specific and care should be taken to make sure
|
||||
the target you are trying to build is supported by the wrapper bits.
|
29
Documentation/powerpc/dts-bindings/fsl/board.txt
Normal file
29
Documentation/powerpc/dts-bindings/fsl/board.txt
Normal file
@ -0,0 +1,29 @@
|
||||
* Board Control and Status (BCSR)
|
||||
|
||||
Required properties:
|
||||
|
||||
- device_type : Should be "board-control"
|
||||
- reg : Offset and length of the register set for the device
|
||||
|
||||
Example:
|
||||
|
||||
bcsr@f8000000 {
|
||||
device_type = "board-control";
|
||||
reg = <f8000000 8000>;
|
||||
};
|
||||
|
||||
* Freescale on board FPGA
|
||||
|
||||
This is the memory-mapped registers for on board FPGA.
|
||||
|
||||
Required properities:
|
||||
- compatible : should be "fsl,fpga-pixis".
|
||||
- reg : should contain the address and the lenght of the FPPGA register
|
||||
set.
|
||||
|
||||
Example (MPC8610HPCD):
|
||||
|
||||
board-control@e8000000 {
|
||||
compatible = "fsl,fpga-pixis";
|
||||
reg = <0xe8000000 32>;
|
||||
};
|
67
Documentation/powerpc/dts-bindings/fsl/cpm_qe/cpm.txt
Normal file
67
Documentation/powerpc/dts-bindings/fsl/cpm_qe/cpm.txt
Normal file
@ -0,0 +1,67 @@
|
||||
* Freescale Communications Processor Module
|
||||
|
||||
NOTE: This is an interim binding, and will likely change slightly,
|
||||
as more devices are supported. The QE bindings especially are
|
||||
incomplete.
|
||||
|
||||
* Root CPM node
|
||||
|
||||
Properties:
|
||||
- compatible : "fsl,cpm1", "fsl,cpm2", or "fsl,qe".
|
||||
- reg : A 48-byte region beginning with CPCR.
|
||||
|
||||
Example:
|
||||
cpm@119c0 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
#interrupt-cells = <2>;
|
||||
compatible = "fsl,mpc8272-cpm", "fsl,cpm2";
|
||||
reg = <119c0 30>;
|
||||
}
|
||||
|
||||
* Properties common to mulitple CPM/QE devices
|
||||
|
||||
- fsl,cpm-command : This value is ORed with the opcode and command flag
|
||||
to specify the device on which a CPM command operates.
|
||||
|
||||
- fsl,cpm-brg : Indicates which baud rate generator the device
|
||||
is associated with. If absent, an unused BRG
|
||||
should be dynamically allocated. If zero, the
|
||||
device uses an external clock rather than a BRG.
|
||||
|
||||
- reg : Unless otherwise specified, the first resource represents the
|
||||
scc/fcc/ucc registers, and the second represents the device's
|
||||
parameter RAM region (if it has one).
|
||||
|
||||
* Multi-User RAM (MURAM)
|
||||
|
||||
The multi-user/dual-ported RAM is expressed as a bus under the CPM node.
|
||||
|
||||
Ranges must be set up subject to the following restrictions:
|
||||
|
||||
- Children's reg nodes must be offsets from the start of all muram, even
|
||||
if the user-data area does not begin at zero.
|
||||
- If multiple range entries are used, the difference between the parent
|
||||
address and the child address must be the same in all, so that a single
|
||||
mapping can cover them all while maintaining the ability to determine
|
||||
CPM-side offsets with pointer subtraction. It is recommended that
|
||||
multiple range entries not be used.
|
||||
- A child address of zero must be translatable, even if no reg resources
|
||||
contain it.
|
||||
|
||||
A child "data" node must exist, compatible with "fsl,cpm-muram-data", to
|
||||
indicate the portion of muram that is usable by the OS for arbitrary
|
||||
purposes. The data node may have an arbitrary number of reg resources,
|
||||
all of which contribute to the allocatable muram pool.
|
||||
|
||||
Example, based on mpc8272:
|
||||
muram@0 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
ranges = <0 0 10000>;
|
||||
|
||||
data@0 {
|
||||
compatible = "fsl,cpm-muram-data";
|
||||
reg = <0 2000 9800 800>;
|
||||
};
|
||||
};
|
21
Documentation/powerpc/dts-bindings/fsl/cpm_qe/cpm/brg.txt
Normal file
21
Documentation/powerpc/dts-bindings/fsl/cpm_qe/cpm/brg.txt
Normal file
@ -0,0 +1,21 @@
|
||||
* Baud Rate Generators
|
||||
|
||||
Currently defined compatibles:
|
||||
fsl,cpm-brg
|
||||
fsl,cpm1-brg
|
||||
fsl,cpm2-brg
|
||||
|
||||
Properties:
|
||||
- reg : There may be an arbitrary number of reg resources; BRG
|
||||
numbers are assigned to these in order.
|
||||
- clock-frequency : Specifies the base frequency driving
|
||||
the BRG.
|
||||
|
||||
Example:
|
||||
brg@119f0 {
|
||||
compatible = "fsl,mpc8272-brg",
|
||||
"fsl,cpm2-brg",
|
||||
"fsl,cpm-brg";
|
||||
reg = <119f0 10 115f0 10>;
|
||||
clock-frequency = <d#25000000>;
|
||||
};
|
41
Documentation/powerpc/dts-bindings/fsl/cpm_qe/cpm/i2c.txt
Normal file
41
Documentation/powerpc/dts-bindings/fsl/cpm_qe/cpm/i2c.txt
Normal file
@ -0,0 +1,41 @@
|
||||
* I2C
|
||||
|
||||
The I2C controller is expressed as a bus under the CPM node.
|
||||
|
||||
Properties:
|
||||
- compatible : "fsl,cpm1-i2c", "fsl,cpm2-i2c"
|
||||
- reg : On CPM2 devices, the second resource doesn't specify the I2C
|
||||
Parameter RAM itself, but the I2C_BASE field of the CPM2 Parameter RAM
|
||||
(typically 0x8afc 0x2).
|
||||
- #address-cells : Should be one. The cell is the i2c device address with
|
||||
the r/w bit set to zero.
|
||||
- #size-cells : Should be zero.
|
||||
- clock-frequency : Can be used to set the i2c clock frequency. If
|
||||
unspecified, a default frequency of 60kHz is being used.
|
||||
The following two properties are deprecated. They are only used by legacy
|
||||
i2c drivers to find the bus to probe:
|
||||
- linux,i2c-index : Can be used to hard code an i2c bus number. By default,
|
||||
the bus number is dynamically assigned by the i2c core.
|
||||
- linux,i2c-class : Can be used to override the i2c class. The class is used
|
||||
by legacy i2c device drivers to find a bus in a specific context like
|
||||
system management, video or sound. By default, I2C_CLASS_HWMON (1) is
|
||||
being used. The definition of the classes can be found in
|
||||
include/i2c/i2c.h
|
||||
|
||||
Example, based on mpc823:
|
||||
|
||||
i2c@860 {
|
||||
compatible = "fsl,mpc823-i2c",
|
||||
"fsl,cpm1-i2c";
|
||||
reg = <0x860 0x20 0x3c80 0x30>;
|
||||
interrupts = <16>;
|
||||
interrupt-parent = <&CPM_PIC>;
|
||||
fsl,cpm-command = <0x10>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
rtc@68 {
|
||||
compatible = "dallas,ds1307";
|
||||
reg = <0x68>;
|
||||
};
|
||||
};
|
18
Documentation/powerpc/dts-bindings/fsl/cpm_qe/cpm/pic.txt
Normal file
18
Documentation/powerpc/dts-bindings/fsl/cpm_qe/cpm/pic.txt
Normal file
@ -0,0 +1,18 @@
|
||||
* Interrupt Controllers
|
||||
|
||||
Currently defined compatibles:
|
||||
- fsl,cpm1-pic
|
||||
- only one interrupt cell
|
||||
- fsl,pq1-pic
|
||||
- fsl,cpm2-pic
|
||||
- second interrupt cell is level/sense:
|
||||
- 2 is falling edge
|
||||
- 8 is active low
|
||||
|
||||
Example:
|
||||
interrupt-controller@10c00 {
|
||||
#interrupt-cells = <2>;
|
||||
interrupt-controller;
|
||||
reg = <10c00 80>;
|
||||
compatible = "mpc8272-pic", "fsl,cpm2-pic";
|
||||
};
|
15
Documentation/powerpc/dts-bindings/fsl/cpm_qe/cpm/usb.txt
Normal file
15
Documentation/powerpc/dts-bindings/fsl/cpm_qe/cpm/usb.txt
Normal file
@ -0,0 +1,15 @@
|
||||
* USB (Universal Serial Bus Controller)
|
||||
|
||||
Properties:
|
||||
- compatible : "fsl,cpm1-usb", "fsl,cpm2-usb", "fsl,qe-usb"
|
||||
|
||||
Example:
|
||||
usb@11bc0 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
compatible = "fsl,cpm2-usb";
|
||||
reg = <11b60 18 8b00 100>;
|
||||
interrupts = <b 8>;
|
||||
interrupt-parent = <&PIC>;
|
||||
fsl,cpm-command = <2e600000>;
|
||||
};
|
45
Documentation/powerpc/dts-bindings/fsl/cpm_qe/network.txt
Normal file
45
Documentation/powerpc/dts-bindings/fsl/cpm_qe/network.txt
Normal file
@ -0,0 +1,45 @@
|
||||
* Network
|
||||
|
||||
Currently defined compatibles:
|
||||
- fsl,cpm1-scc-enet
|
||||
- fsl,cpm2-scc-enet
|
||||
- fsl,cpm1-fec-enet
|
||||
- fsl,cpm2-fcc-enet (third resource is GFEMR)
|
||||
- fsl,qe-enet
|
||||
|
||||
Example:
|
||||
|
||||
ethernet@11300 {
|
||||
device_type = "network";
|
||||
compatible = "fsl,mpc8272-fcc-enet",
|
||||
"fsl,cpm2-fcc-enet";
|
||||
reg = <11300 20 8400 100 11390 1>;
|
||||
local-mac-address = [ 00 00 00 00 00 00 ];
|
||||
interrupts = <20 8>;
|
||||
interrupt-parent = <&PIC>;
|
||||
phy-handle = <&PHY0>;
|
||||
fsl,cpm-command = <12000300>;
|
||||
};
|
||||
|
||||
* MDIO
|
||||
|
||||
Currently defined compatibles:
|
||||
fsl,pq1-fec-mdio (reg is same as first resource of FEC device)
|
||||
fsl,cpm2-mdio-bitbang (reg is port C registers)
|
||||
|
||||
Properties for fsl,cpm2-mdio-bitbang:
|
||||
fsl,mdio-pin : pin of port C controlling mdio data
|
||||
fsl,mdc-pin : pin of port C controlling mdio clock
|
||||
|
||||
Example:
|
||||
mdio@10d40 {
|
||||
device_type = "mdio";
|
||||
compatible = "fsl,mpc8272ads-mdio-bitbang",
|
||||
"fsl,mpc8272-mdio-bitbang",
|
||||
"fsl,cpm2-mdio-bitbang";
|
||||
reg = <10d40 14>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
fsl,mdio-pin = <12>;
|
||||
fsl,mdc-pin = <13>;
|
||||
};
|
58
Documentation/powerpc/dts-bindings/fsl/cpm_qe/qe.txt
Normal file
58
Documentation/powerpc/dts-bindings/fsl/cpm_qe/qe.txt
Normal file
@ -0,0 +1,58 @@
|
||||
* Freescale QUICC Engine module (QE)
|
||||
This represents qe module that is installed on PowerQUICC II Pro.
|
||||
|
||||
NOTE: This is an interim binding; it should be updated to fit
|
||||
in with the CPM binding later in this document.
|
||||
|
||||
Basically, it is a bus of devices, that could act more or less
|
||||
as a complete entity (UCC, USB etc ). All of them should be siblings on
|
||||
the "root" qe node, using the common properties from there.
|
||||
The description below applies to the qe of MPC8360 and
|
||||
more nodes and properties would be extended in the future.
|
||||
|
||||
i) Root QE device
|
||||
|
||||
Required properties:
|
||||
- compatible : should be "fsl,qe";
|
||||
- model : precise model of the QE, Can be "QE", "CPM", or "CPM2"
|
||||
- reg : offset and length of the device registers.
|
||||
- bus-frequency : the clock frequency for QUICC Engine.
|
||||
|
||||
Recommended properties
|
||||
- brg-frequency : the internal clock source frequency for baud-rate
|
||||
generators in Hz.
|
||||
|
||||
Example:
|
||||
qe@e0100000 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
#interrupt-cells = <2>;
|
||||
compatible = "fsl,qe";
|
||||
ranges = <0 e0100000 00100000>;
|
||||
reg = <e0100000 480>;
|
||||
brg-frequency = <0>;
|
||||
bus-frequency = <179A7B00>;
|
||||
}
|
||||
|
||||
* Multi-User RAM (MURAM)
|
||||
|
||||
Required properties:
|
||||
- compatible : should be "fsl,qe-muram", "fsl,cpm-muram".
|
||||
- mode : the could be "host" or "slave".
|
||||
- ranges : Should be defined as specified in 1) to describe the
|
||||
translation of MURAM addresses.
|
||||
- data-only : sub-node which defines the address area under MURAM
|
||||
bus that can be allocated as data/parameter
|
||||
|
||||
Example:
|
||||
|
||||
muram@10000 {
|
||||
compatible = "fsl,qe-muram", "fsl,cpm-muram";
|
||||
ranges = <0 00010000 0000c000>;
|
||||
|
||||
data-only@0{
|
||||
compatible = "fsl,qe-muram-data",
|
||||
"fsl,cpm-muram-data";
|
||||
reg = <0 c000>;
|
||||
};
|
||||
};
|
@ -0,0 +1,24 @@
|
||||
* Uploaded QE firmware
|
||||
|
||||
If a new firwmare has been uploaded to the QE (usually by the
|
||||
boot loader), then a 'firmware' child node should be added to the QE
|
||||
node. This node provides information on the uploaded firmware that
|
||||
device drivers may need.
|
||||
|
||||
Required properties:
|
||||
- id: The string name of the firmware. This is taken from the 'id'
|
||||
member of the qe_firmware structure of the uploaded firmware.
|
||||
Device drivers can search this string to determine if the
|
||||
firmware they want is already present.
|
||||
- extended-modes: The Extended Modes bitfield, taken from the
|
||||
firmware binary. It is a 64-bit number represented
|
||||
as an array of two 32-bit numbers.
|
||||
- virtual-traps: The virtual traps, taken from the firmware binary.
|
||||
It is an array of 8 32-bit numbers.
|
||||
|
||||
Example:
|
||||
firmware {
|
||||
id = "Soft-UART";
|
||||
extended-modes = <0 0>;
|
||||
virtual-traps = <0 0 0 0 0 0 0 0>;
|
||||
};
|
51
Documentation/powerpc/dts-bindings/fsl/cpm_qe/qe/par_io.txt
Normal file
51
Documentation/powerpc/dts-bindings/fsl/cpm_qe/qe/par_io.txt
Normal file
@ -0,0 +1,51 @@
|
||||
* Parallel I/O Ports
|
||||
|
||||
This node configures Parallel I/O ports for CPUs with QE support.
|
||||
The node should reside in the "soc" node of the tree. For each
|
||||
device that using parallel I/O ports, a child node should be created.
|
||||
See the definition of the Pin configuration nodes below for more
|
||||
information.
|
||||
|
||||
Required properties:
|
||||
- device_type : should be "par_io".
|
||||
- reg : offset to the register set and its length.
|
||||
- num-ports : number of Parallel I/O ports
|
||||
|
||||
Example:
|
||||
par_io@1400 {
|
||||
reg = <1400 100>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
device_type = "par_io";
|
||||
num-ports = <7>;
|
||||
ucc_pin@01 {
|
||||
......
|
||||
};
|
||||
|
||||
Note that "par_io" nodes are obsolete, and should not be used for
|
||||
the new device trees. Instead, each Par I/O bank should be represented
|
||||
via its own gpio-controller node:
|
||||
|
||||
Required properties:
|
||||
- #gpio-cells : should be "2".
|
||||
- compatible : should be "fsl,<chip>-qe-pario-bank",
|
||||
"fsl,mpc8323-qe-pario-bank".
|
||||
- reg : offset to the register set and its length.
|
||||
- gpio-controller : node to identify gpio controllers.
|
||||
|
||||
Example:
|
||||
qe_pio_a: gpio-controller@1400 {
|
||||
#gpio-cells = <2>;
|
||||
compatible = "fsl,mpc8360-qe-pario-bank",
|
||||
"fsl,mpc8323-qe-pario-bank";
|
||||
reg = <0x1400 0x18>;
|
||||
gpio-controller;
|
||||
};
|
||||
|
||||
qe_pio_e: gpio-controller@1460 {
|
||||
#gpio-cells = <2>;
|
||||
compatible = "fsl,mpc8360-qe-pario-bank",
|
||||
"fsl,mpc8323-qe-pario-bank";
|
||||
reg = <0x1460 0x18>;
|
||||
gpio-controller;
|
||||
};
|
60
Documentation/powerpc/dts-bindings/fsl/cpm_qe/qe/pincfg.txt
Normal file
60
Documentation/powerpc/dts-bindings/fsl/cpm_qe/qe/pincfg.txt
Normal file
@ -0,0 +1,60 @@
|
||||
* Pin configuration nodes
|
||||
|
||||
Required properties:
|
||||
- linux,phandle : phandle of this node; likely referenced by a QE
|
||||
device.
|
||||
- pio-map : array of pin configurations. Each pin is defined by 6
|
||||
integers. The six numbers are respectively: port, pin, dir,
|
||||
open_drain, assignment, has_irq.
|
||||
- port : port number of the pin; 0-6 represent port A-G in UM.
|
||||
- pin : pin number in the port.
|
||||
- dir : direction of the pin, should encode as follows:
|
||||
|
||||
0 = The pin is disabled
|
||||
1 = The pin is an output
|
||||
2 = The pin is an input
|
||||
3 = The pin is I/O
|
||||
|
||||
- open_drain : indicates the pin is normal or wired-OR:
|
||||
|
||||
0 = The pin is actively driven as an output
|
||||
1 = The pin is an open-drain driver. As an output, the pin is
|
||||
driven active-low, otherwise it is three-stated.
|
||||
|
||||
- assignment : function number of the pin according to the Pin Assignment
|
||||
tables in User Manual. Each pin can have up to 4 possible functions in
|
||||
QE and two options for CPM.
|
||||
- has_irq : indicates if the pin is used as source of external
|
||||
interrupts.
|
||||
|
||||
Example:
|
||||
ucc_pin@01 {
|
||||
linux,phandle = <140001>;
|
||||
pio-map = <
|
||||
/* port pin dir open_drain assignment has_irq */
|
||||
0 3 1 0 1 0 /* TxD0 */
|
||||
0 4 1 0 1 0 /* TxD1 */
|
||||
0 5 1 0 1 0 /* TxD2 */
|
||||
0 6 1 0 1 0 /* TxD3 */
|
||||
1 6 1 0 3 0 /* TxD4 */
|
||||
1 7 1 0 1 0 /* TxD5 */
|
||||
1 9 1 0 2 0 /* TxD6 */
|
||||
1 a 1 0 2 0 /* TxD7 */
|
||||
0 9 2 0 1 0 /* RxD0 */
|
||||
0 a 2 0 1 0 /* RxD1 */
|
||||
0 b 2 0 1 0 /* RxD2 */
|
||||
0 c 2 0 1 0 /* RxD3 */
|
||||
0 d 2 0 1 0 /* RxD4 */
|
||||
1 1 2 0 2 0 /* RxD5 */
|
||||
1 0 2 0 2 0 /* RxD6 */
|
||||
1 4 2 0 2 0 /* RxD7 */
|
||||
0 7 1 0 1 0 /* TX_EN */
|
||||
0 8 1 0 1 0 /* TX_ER */
|
||||
0 f 2 0 1 0 /* RX_DV */
|
||||
0 10 2 0 1 0 /* RX_ER */
|
||||
0 0 2 0 1 0 /* RX_CLK */
|
||||
2 9 1 0 3 0 /* GTX_CLK - CLK10 */
|
||||
2 8 2 0 1 0>; /* GTX125 - CLK9 */
|
||||
};
|
||||
|
||||
|
70
Documentation/powerpc/dts-bindings/fsl/cpm_qe/qe/ucc.txt
Normal file
70
Documentation/powerpc/dts-bindings/fsl/cpm_qe/qe/ucc.txt
Normal file
@ -0,0 +1,70 @@
|
||||
* UCC (Unified Communications Controllers)
|
||||
|
||||
Required properties:
|
||||
- device_type : should be "network", "hldc", "uart", "transparent"
|
||||
"bisync", "atm", or "serial".
|
||||
- compatible : could be "ucc_geth" or "fsl_atm" and so on.
|
||||
- cell-index : the ucc number(1-8), corresponding to UCCx in UM.
|
||||
- reg : Offset and length of the register set for the device
|
||||
- interrupts : <a b> where a is the interrupt number and b is a
|
||||
field that represents an encoding of the sense and level
|
||||
information for the interrupt. This should be encoded based on
|
||||
the information in section 2) depending on the type of interrupt
|
||||
controller you have.
|
||||
- interrupt-parent : the phandle for the interrupt controller that
|
||||
services interrupts for this device.
|
||||
- pio-handle : The phandle for the Parallel I/O port configuration.
|
||||
- port-number : for UART drivers, the port number to use, between 0 and 3.
|
||||
This usually corresponds to the /dev/ttyQE device, e.g. <0> = /dev/ttyQE0.
|
||||
The port number is added to the minor number of the device. Unlike the
|
||||
CPM UART driver, the port-number is required for the QE UART driver.
|
||||
- soft-uart : for UART drivers, if specified this means the QE UART device
|
||||
driver should use "Soft-UART" mode, which is needed on some SOCs that have
|
||||
broken UART hardware. Soft-UART is provided via a microcode upload.
|
||||
- rx-clock-name: the UCC receive clock source
|
||||
"none": clock source is disabled
|
||||
"brg1" through "brg16": clock source is BRG1-BRG16, respectively
|
||||
"clk1" through "clk24": clock source is CLK1-CLK24, respectively
|
||||
- tx-clock-name: the UCC transmit clock source
|
||||
"none": clock source is disabled
|
||||
"brg1" through "brg16": clock source is BRG1-BRG16, respectively
|
||||
"clk1" through "clk24": clock source is CLK1-CLK24, respectively
|
||||
The following two properties are deprecated. rx-clock has been replaced
|
||||
with rx-clock-name, and tx-clock has been replaced with tx-clock-name.
|
||||
Drivers that currently use the deprecated properties should continue to
|
||||
do so, in order to support older device trees, but they should be updated
|
||||
to check for the new properties first.
|
||||
- rx-clock : represents the UCC receive clock source.
|
||||
0x00 : clock source is disabled;
|
||||
0x1~0x10 : clock source is BRG1~BRG16 respectively;
|
||||
0x11~0x28: clock source is QE_CLK1~QE_CLK24 respectively.
|
||||
- tx-clock: represents the UCC transmit clock source;
|
||||
0x00 : clock source is disabled;
|
||||
0x1~0x10 : clock source is BRG1~BRG16 respectively;
|
||||
0x11~0x28: clock source is QE_CLK1~QE_CLK24 respectively.
|
||||
|
||||
Required properties for network device_type:
|
||||
- mac-address : list of bytes representing the ethernet address.
|
||||
- phy-handle : The phandle for the PHY connected to this controller.
|
||||
|
||||
Recommended properties:
|
||||
- phy-connection-type : a string naming the controller/PHY interface type,
|
||||
i.e., "mii" (default), "rmii", "gmii", "rgmii", "rgmii-id" (Internal
|
||||
Delay), "rgmii-txid" (delay on TX only), "rgmii-rxid" (delay on RX only),
|
||||
"tbi", or "rtbi".
|
||||
|
||||
Example:
|
||||
ucc@2000 {
|
||||
device_type = "network";
|
||||
compatible = "ucc_geth";
|
||||
cell-index = <1>;
|
||||
reg = <2000 200>;
|
||||
interrupts = <a0 0>;
|
||||
interrupt-parent = <700>;
|
||||
mac-address = [ 00 04 9f 00 23 23 ];
|
||||
rx-clock = "none";
|
||||
tx-clock = "clk9";
|
||||
phy-handle = <212000>;
|
||||
phy-connection-type = "gmii";
|
||||
pio-handle = <140001>;
|
||||
};
|
22
Documentation/powerpc/dts-bindings/fsl/cpm_qe/qe/usb.txt
Normal file
22
Documentation/powerpc/dts-bindings/fsl/cpm_qe/qe/usb.txt
Normal file
@ -0,0 +1,22 @@
|
||||
* USB (Universal Serial Bus Controller)
|
||||
|
||||
Required properties:
|
||||
- compatible : could be "qe_udc" or "fhci-hcd".
|
||||
- mode : the could be "host" or "slave".
|
||||
- reg : Offset and length of the register set for the device
|
||||
- interrupts : <a b> where a is the interrupt number and b is a
|
||||
field that represents an encoding of the sense and level
|
||||
information for the interrupt. This should be encoded based on
|
||||
the information in section 2) depending on the type of interrupt
|
||||
controller you have.
|
||||
- interrupt-parent : the phandle for the interrupt controller that
|
||||
services interrupts for this device.
|
||||
|
||||
Example(slave):
|
||||
usb@6c0 {
|
||||
compatible = "qe_udc";
|
||||
reg = <6c0 40>;
|
||||
interrupts = <8b 0>;
|
||||
interrupt-parent = <700>;
|
||||
mode = "slave";
|
||||
};
|
21
Documentation/powerpc/dts-bindings/fsl/cpm_qe/serial.txt
Normal file
21
Documentation/powerpc/dts-bindings/fsl/cpm_qe/serial.txt
Normal file
@ -0,0 +1,21 @@
|
||||
* Serial
|
||||
|
||||
Currently defined compatibles:
|
||||
- fsl,cpm1-smc-uart
|
||||
- fsl,cpm2-smc-uart
|
||||
- fsl,cpm1-scc-uart
|
||||
- fsl,cpm2-scc-uart
|
||||
- fsl,qe-uart
|
||||
|
||||
Example:
|
||||
|
||||
serial@11a00 {
|
||||
device_type = "serial";
|
||||
compatible = "fsl,mpc8272-scc-uart",
|
||||
"fsl,cpm2-scc-uart";
|
||||
reg = <11a00 20 8000 100>;
|
||||
interrupts = <28 8>;
|
||||
interrupt-parent = <&PIC>;
|
||||
fsl,cpm-brg = <1>;
|
||||
fsl,cpm-command = <00800000>;
|
||||
};
|
18
Documentation/powerpc/dts-bindings/fsl/diu.txt
Normal file
18
Documentation/powerpc/dts-bindings/fsl/diu.txt
Normal file
@ -0,0 +1,18 @@
|
||||
* Freescale Display Interface Unit
|
||||
|
||||
The Freescale DIU is a LCD controller, with proper hardware, it can also
|
||||
drive DVI monitors.
|
||||
|
||||
Required properties:
|
||||
- compatible : should be "fsl-diu".
|
||||
- reg : should contain at least address and length of the DIU register
|
||||
set.
|
||||
- Interrupts : one DIU interrupt should be describe here.
|
||||
|
||||
Example (MPC8610HPCD):
|
||||
display@2c000 {
|
||||
compatible = "fsl,diu";
|
||||
reg = <0x2c000 100>;
|
||||
interrupts = <72 2>;
|
||||
interrupt-parent = <&mpic>;
|
||||
};
|
127
Documentation/powerpc/dts-bindings/fsl/dma.txt
Normal file
127
Documentation/powerpc/dts-bindings/fsl/dma.txt
Normal file
@ -0,0 +1,127 @@
|
||||
* Freescale 83xx DMA Controller
|
||||
|
||||
Freescale PowerPC 83xx have on chip general purpose DMA controllers.
|
||||
|
||||
Required properties:
|
||||
|
||||
- compatible : compatible list, contains 2 entries, first is
|
||||
"fsl,CHIP-dma", where CHIP is the processor
|
||||
(mpc8349, mpc8360, etc.) and the second is
|
||||
"fsl,elo-dma"
|
||||
- reg : <registers mapping for DMA general status reg>
|
||||
- ranges : Should be defined as specified in 1) to describe the
|
||||
DMA controller channels.
|
||||
- cell-index : controller index. 0 for controller @ 0x8100
|
||||
- interrupts : <interrupt mapping for DMA IRQ>
|
||||
- interrupt-parent : optional, if needed for interrupt mapping
|
||||
|
||||
|
||||
- DMA channel nodes:
|
||||
- compatible : compatible list, contains 2 entries, first is
|
||||
"fsl,CHIP-dma-channel", where CHIP is the processor
|
||||
(mpc8349, mpc8350, etc.) and the second is
|
||||
"fsl,elo-dma-channel"
|
||||
- reg : <registers mapping for channel>
|
||||
- cell-index : dma channel index starts at 0.
|
||||
|
||||
Optional properties:
|
||||
- interrupts : <interrupt mapping for DMA channel IRQ>
|
||||
(on 83xx this is expected to be identical to
|
||||
the interrupts property of the parent node)
|
||||
- interrupt-parent : optional, if needed for interrupt mapping
|
||||
|
||||
Example:
|
||||
dma@82a8 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
compatible = "fsl,mpc8349-dma", "fsl,elo-dma";
|
||||
reg = <82a8 4>;
|
||||
ranges = <0 8100 1a4>;
|
||||
interrupt-parent = <&ipic>;
|
||||
interrupts = <47 8>;
|
||||
cell-index = <0>;
|
||||
dma-channel@0 {
|
||||
compatible = "fsl,mpc8349-dma-channel", "fsl,elo-dma-channel";
|
||||
cell-index = <0>;
|
||||
reg = <0 80>;
|
||||
};
|
||||
dma-channel@80 {
|
||||
compatible = "fsl,mpc8349-dma-channel", "fsl,elo-dma-channel";
|
||||
cell-index = <1>;
|
||||
reg = <80 80>;
|
||||
};
|
||||
dma-channel@100 {
|
||||
compatible = "fsl,mpc8349-dma-channel", "fsl,elo-dma-channel";
|
||||
cell-index = <2>;
|
||||
reg = <100 80>;
|
||||
};
|
||||
dma-channel@180 {
|
||||
compatible = "fsl,mpc8349-dma-channel", "fsl,elo-dma-channel";
|
||||
cell-index = <3>;
|
||||
reg = <180 80>;
|
||||
};
|
||||
};
|
||||
|
||||
* Freescale 85xx/86xx DMA Controller
|
||||
|
||||
Freescale PowerPC 85xx/86xx have on chip general purpose DMA controllers.
|
||||
|
||||
Required properties:
|
||||
|
||||
- compatible : compatible list, contains 2 entries, first is
|
||||
"fsl,CHIP-dma", where CHIP is the processor
|
||||
(mpc8540, mpc8540, etc.) and the second is
|
||||
"fsl,eloplus-dma"
|
||||
- reg : <registers mapping for DMA general status reg>
|
||||
- cell-index : controller index. 0 for controller @ 0x21000,
|
||||
1 for controller @ 0xc000
|
||||
- ranges : Should be defined as specified in 1) to describe the
|
||||
DMA controller channels.
|
||||
|
||||
- DMA channel nodes:
|
||||
- compatible : compatible list, contains 2 entries, first is
|
||||
"fsl,CHIP-dma-channel", where CHIP is the processor
|
||||
(mpc8540, mpc8560, etc.) and the second is
|
||||
"fsl,eloplus-dma-channel"
|
||||
- cell-index : dma channel index starts at 0.
|
||||
- reg : <registers mapping for channel>
|
||||
- interrupts : <interrupt mapping for DMA channel IRQ>
|
||||
- interrupt-parent : optional, if needed for interrupt mapping
|
||||
|
||||
Example:
|
||||
dma@21300 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
compatible = "fsl,mpc8540-dma", "fsl,eloplus-dma";
|
||||
reg = <21300 4>;
|
||||
ranges = <0 21100 200>;
|
||||
cell-index = <0>;
|
||||
dma-channel@0 {
|
||||
compatible = "fsl,mpc8540-dma-channel", "fsl,eloplus-dma-channel";
|
||||
reg = <0 80>;
|
||||
cell-index = <0>;
|
||||
interrupt-parent = <&mpic>;
|
||||
interrupts = <14 2>;
|
||||
};
|
||||
dma-channel@80 {
|
||||
compatible = "fsl,mpc8540-dma-channel", "fsl,eloplus-dma-channel";
|
||||
reg = <80 80>;
|
||||
cell-index = <1>;
|
||||
interrupt-parent = <&mpic>;
|
||||
interrupts = <15 2>;
|
||||
};
|
||||
dma-channel@100 {
|
||||
compatible = "fsl,mpc8540-dma-channel", "fsl,eloplus-dma-channel";
|
||||
reg = <100 80>;
|
||||
cell-index = <2>;
|
||||
interrupt-parent = <&mpic>;
|
||||
interrupts = <16 2>;
|
||||
};
|
||||
dma-channel@180 {
|
||||
compatible = "fsl,mpc8540-dma-channel", "fsl,eloplus-dma-channel";
|
||||
reg = <180 80>;
|
||||
cell-index = <3>;
|
||||
interrupt-parent = <&mpic>;
|
||||
interrupts = <17 2>;
|
||||
};
|
||||
};
|
31
Documentation/powerpc/dts-bindings/fsl/gtm.txt
Normal file
31
Documentation/powerpc/dts-bindings/fsl/gtm.txt
Normal file
@ -0,0 +1,31 @@
|
||||
* Freescale General-purpose Timers Module
|
||||
|
||||
Required properties:
|
||||
- compatible : should be
|
||||
"fsl,<chip>-gtm", "fsl,gtm" for SOC GTMs
|
||||
"fsl,<chip>-qe-gtm", "fsl,qe-gtm", "fsl,gtm" for QE GTMs
|
||||
"fsl,<chip>-cpm2-gtm", "fsl,cpm2-gtm", "fsl,gtm" for CPM2 GTMs
|
||||
- reg : should contain gtm registers location and length (0x40).
|
||||
- interrupts : should contain four interrupts.
|
||||
- interrupt-parent : interrupt source phandle.
|
||||
- clock-frequency : specifies the frequency driving the timer.
|
||||
|
||||
Example:
|
||||
|
||||
timer@500 {
|
||||
compatible = "fsl,mpc8360-gtm", "fsl,gtm";
|
||||
reg = <0x500 0x40>;
|
||||
interrupts = <90 8 78 8 84 8 72 8>;
|
||||
interrupt-parent = <&ipic>;
|
||||
/* filled by u-boot */
|
||||
clock-frequency = <0>;
|
||||
};
|
||||
|
||||
timer@440 {
|
||||
compatible = "fsl,mpc8360-qe-gtm", "fsl,qe-gtm", "fsl,gtm";
|
||||
reg = <0x440 0x40>;
|
||||
interrupts = <12 13 14 15>;
|
||||
interrupt-parent = <&qeic>;
|
||||
/* filled by u-boot */
|
||||
clock-frequency = <0>;
|
||||
};
|
25
Documentation/powerpc/dts-bindings/fsl/guts.txt
Normal file
25
Documentation/powerpc/dts-bindings/fsl/guts.txt
Normal file
@ -0,0 +1,25 @@
|
||||
* Global Utilities Block
|
||||
|
||||
The global utilities block controls power management, I/O device
|
||||
enabling, power-on-reset configuration monitoring, general-purpose
|
||||
I/O signal configuration, alternate function selection for multiplexed
|
||||
signals, and clock control.
|
||||
|
||||
Required properties:
|
||||
|
||||
- compatible : Should define the compatible device type for
|
||||
global-utilities.
|
||||
- reg : Offset and length of the register set for the device.
|
||||
|
||||
Recommended properties:
|
||||
|
||||
- fsl,has-rstcr : Indicates that the global utilities register set
|
||||
contains a functioning "reset control register" (i.e. the board
|
||||
is wired to reset upon setting the HRESET_REQ bit in this register).
|
||||
|
||||
Example:
|
||||
global-utilities@e0000 { /* global utilities block */
|
||||
compatible = "fsl,mpc8548-guts";
|
||||
reg = <e0000 1000>;
|
||||
fsl,has-rstcr;
|
||||
};
|
32
Documentation/powerpc/dts-bindings/fsl/i2c.txt
Normal file
32
Documentation/powerpc/dts-bindings/fsl/i2c.txt
Normal file
@ -0,0 +1,32 @@
|
||||
* I2C
|
||||
|
||||
Required properties :
|
||||
|
||||
- device_type : Should be "i2c"
|
||||
- reg : Offset and length of the register set for the device
|
||||
|
||||
Recommended properties :
|
||||
|
||||
- compatible : Should be "fsl-i2c" for parts compatible with
|
||||
Freescale I2C specifications.
|
||||
- interrupts : <a b> where a is the interrupt number and b is a
|
||||
field that represents an encoding of the sense and level
|
||||
information for the interrupt. This should be encoded based on
|
||||
the information in section 2) depending on the type of interrupt
|
||||
controller you have.
|
||||
- interrupt-parent : the phandle for the interrupt controller that
|
||||
services interrupts for this device.
|
||||
- dfsrr : boolean; if defined, indicates that this I2C device has
|
||||
a digital filter sampling rate register
|
||||
- fsl5200-clocking : boolean; if defined, indicated that this device
|
||||
uses the FSL 5200 clocking mechanism.
|
||||
|
||||
Example :
|
||||
i2c@3000 {
|
||||
interrupt-parent = <40000>;
|
||||
interrupts = <1b 3>;
|
||||
reg = <3000 18>;
|
||||
device_type = "i2c";
|
||||
compatible = "fsl-i2c";
|
||||
dfsrr;
|
||||
};
|
35
Documentation/powerpc/dts-bindings/fsl/lbc.txt
Normal file
35
Documentation/powerpc/dts-bindings/fsl/lbc.txt
Normal file
@ -0,0 +1,35 @@
|
||||
* Chipselect/Local Bus
|
||||
|
||||
Properties:
|
||||
- name : Should be localbus
|
||||
- #address-cells : Should be either two or three. The first cell is the
|
||||
chipselect number, and the remaining cells are the
|
||||
offset into the chipselect.
|
||||
- #size-cells : Either one or two, depending on how large each chipselect
|
||||
can be.
|
||||
- ranges : Each range corresponds to a single chipselect, and cover
|
||||
the entire access window as configured.
|
||||
|
||||
Example:
|
||||
localbus@f0010100 {
|
||||
compatible = "fsl,mpc8272-localbus",
|
||||
"fsl,pq2-localbus";
|
||||
#address-cells = <2>;
|
||||
#size-cells = <1>;
|
||||
reg = <f0010100 40>;
|
||||
|
||||
ranges = <0 0 fe000000 02000000
|
||||
1 0 f4500000 00008000>;
|
||||
|
||||
flash@0,0 {
|
||||
compatible = "jedec-flash";
|
||||
reg = <0 0 2000000>;
|
||||
bank-width = <4>;
|
||||
device-width = <1>;
|
||||
};
|
||||
|
||||
board-control@1,0 {
|
||||
reg = <1 0 20>;
|
||||
compatible = "fsl,mpc8272ads-bcsr";
|
||||
};
|
||||
};
|
36
Documentation/powerpc/dts-bindings/fsl/msi-pic.txt
Normal file
36
Documentation/powerpc/dts-bindings/fsl/msi-pic.txt
Normal file
@ -0,0 +1,36 @@
|
||||
* Freescale MSI interrupt controller
|
||||
|
||||
Reguired properities:
|
||||
- compatible : compatible list, contains 2 entries,
|
||||
first is "fsl,CHIP-msi", where CHIP is the processor(mpc8610, mpc8572,
|
||||
etc.) and the second is "fsl,mpic-msi" or "fsl,ipic-msi" depending on
|
||||
the parent type.
|
||||
- reg : should contain the address and the length of the shared message
|
||||
interrupt register set.
|
||||
- msi-available-ranges: use <start count> style section to define which
|
||||
msi interrupt can be used in the 256 msi interrupts. This property is
|
||||
optional, without this, all the 256 MSI interrupts can be used.
|
||||
- interrupts : each one of the interrupts here is one entry per 32 MSIs,
|
||||
and routed to the host interrupt controller. the interrupts should
|
||||
be set as edge sensitive.
|
||||
- interrupt-parent: the phandle for the interrupt controller
|
||||
that services interrupts for this device. for 83xx cpu, the interrupts
|
||||
are routed to IPIC, and for 85xx/86xx cpu the interrupts are routed
|
||||
to MPIC.
|
||||
|
||||
Example:
|
||||
msi@41600 {
|
||||
compatible = "fsl,mpc8610-msi", "fsl,mpic-msi";
|
||||
reg = <0x41600 0x80>;
|
||||
msi-available-ranges = <0 0x100>;
|
||||
interrupts = <
|
||||
0xe0 0
|
||||
0xe1 0
|
||||
0xe2 0
|
||||
0xe3 0
|
||||
0xe4 0
|
||||
0xe5 0
|
||||
0xe6 0
|
||||
0xe7 0>;
|
||||
interrupt-parent = <&mpic>;
|
||||
};
|
29
Documentation/powerpc/dts-bindings/fsl/sata.txt
Normal file
29
Documentation/powerpc/dts-bindings/fsl/sata.txt
Normal file
@ -0,0 +1,29 @@
|
||||
* Freescale 8xxx/3.0 Gb/s SATA nodes
|
||||
|
||||
SATA nodes are defined to describe on-chip Serial ATA controllers.
|
||||
Each SATA port should have its own node.
|
||||
|
||||
Required properties:
|
||||
- compatible : compatible list, contains 2 entries, first is
|
||||
"fsl,CHIP-sata", where CHIP is the processor
|
||||
(mpc8315, mpc8379, etc.) and the second is
|
||||
"fsl,pq-sata"
|
||||
- interrupts : <interrupt mapping for SATA IRQ>
|
||||
- cell-index : controller index.
|
||||
1 for controller @ 0x18000
|
||||
2 for controller @ 0x19000
|
||||
3 for controller @ 0x1a000
|
||||
4 for controller @ 0x1b000
|
||||
|
||||
Optional properties:
|
||||
- interrupt-parent : optional, if needed for interrupt mapping
|
||||
- reg : <registers mapping>
|
||||
|
||||
Example:
|
||||
sata@18000 {
|
||||
compatible = "fsl,mpc8379-sata", "fsl,pq-sata";
|
||||
reg = <0x18000 0x1000>;
|
||||
cell-index = <1>;
|
||||
interrupts = <2c 8>;
|
||||
interrupt-parent = < &ipic >;
|
||||
};
|
68
Documentation/powerpc/dts-bindings/fsl/sec.txt
Normal file
68
Documentation/powerpc/dts-bindings/fsl/sec.txt
Normal file
@ -0,0 +1,68 @@
|
||||
Freescale SoC SEC Security Engines
|
||||
|
||||
Required properties:
|
||||
|
||||
- compatible : Should contain entries for this and backward compatible
|
||||
SEC versions, high to low, e.g., "fsl,sec2.1", "fsl,sec2.0"
|
||||
- reg : Offset and length of the register set for the device
|
||||
- interrupts : the SEC's interrupt number
|
||||
- fsl,num-channels : An integer representing the number of channels
|
||||
available.
|
||||
- fsl,channel-fifo-len : An integer representing the number of
|
||||
descriptor pointers each channel fetch fifo can hold.
|
||||
- fsl,exec-units-mask : The bitmask representing what execution units
|
||||
(EUs) are available. It's a single 32-bit cell. EU information
|
||||
should be encoded following the SEC's Descriptor Header Dword
|
||||
EU_SEL0 field documentation, i.e. as follows:
|
||||
|
||||
bit 0 = reserved - should be 0
|
||||
bit 1 = set if SEC has the ARC4 EU (AFEU)
|
||||
bit 2 = set if SEC has the DES/3DES EU (DEU)
|
||||
bit 3 = set if SEC has the message digest EU (MDEU/MDEU-A)
|
||||
bit 4 = set if SEC has the random number generator EU (RNG)
|
||||
bit 5 = set if SEC has the public key EU (PKEU)
|
||||
bit 6 = set if SEC has the AES EU (AESU)
|
||||
bit 7 = set if SEC has the Kasumi EU (KEU)
|
||||
bit 8 = set if SEC has the CRC EU (CRCU)
|
||||
bit 11 = set if SEC has the message digest EU extended alg set (MDEU-B)
|
||||
|
||||
remaining bits are reserved for future SEC EUs.
|
||||
|
||||
- fsl,descriptor-types-mask : The bitmask representing what descriptors
|
||||
are available. It's a single 32-bit cell. Descriptor type information
|
||||
should be encoded following the SEC's Descriptor Header Dword DESC_TYPE
|
||||
field documentation, i.e. as follows:
|
||||
|
||||
bit 0 = set if SEC supports the aesu_ctr_nonsnoop desc. type
|
||||
bit 1 = set if SEC supports the ipsec_esp descriptor type
|
||||
bit 2 = set if SEC supports the common_nonsnoop desc. type
|
||||
bit 3 = set if SEC supports the 802.11i AES ccmp desc. type
|
||||
bit 4 = set if SEC supports the hmac_snoop_no_afeu desc. type
|
||||
bit 5 = set if SEC supports the srtp descriptor type
|
||||
bit 6 = set if SEC supports the non_hmac_snoop_no_afeu desc.type
|
||||
bit 7 = set if SEC supports the pkeu_assemble descriptor type
|
||||
bit 8 = set if SEC supports the aesu_key_expand_output desc.type
|
||||
bit 9 = set if SEC supports the pkeu_ptmul descriptor type
|
||||
bit 10 = set if SEC supports the common_nonsnoop_afeu desc. type
|
||||
bit 11 = set if SEC supports the pkeu_ptadd_dbl descriptor type
|
||||
|
||||
..and so on and so forth.
|
||||
|
||||
Optional properties:
|
||||
|
||||
- interrupt-parent : the phandle for the interrupt controller that
|
||||
services interrupts for this device.
|
||||
|
||||
Example:
|
||||
|
||||
/* MPC8548E */
|
||||
crypto@30000 {
|
||||
compatible = "fsl,sec2.1", "fsl,sec2.0";
|
||||
reg = <0x30000 0x10000>;
|
||||
interrupts = <29 2>;
|
||||
interrupt-parent = <&mpic>;
|
||||
fsl,num-channels = <4>;
|
||||
fsl,channel-fifo-len = <24>;
|
||||
fsl,exec-units-mask = <0xfe>;
|
||||
fsl,descriptor-types-mask = <0x12b0ebf>;
|
||||
};
|
24
Documentation/powerpc/dts-bindings/fsl/spi.txt
Normal file
24
Documentation/powerpc/dts-bindings/fsl/spi.txt
Normal file
@ -0,0 +1,24 @@
|
||||
* SPI (Serial Peripheral Interface)
|
||||
|
||||
Required properties:
|
||||
- cell-index : SPI controller index.
|
||||
- compatible : should be "fsl,spi".
|
||||
- mode : the SPI operation mode, it can be "cpu" or "cpu-qe".
|
||||
- reg : Offset and length of the register set for the device
|
||||
- interrupts : <a b> where a is the interrupt number and b is a
|
||||
field that represents an encoding of the sense and level
|
||||
information for the interrupt. This should be encoded based on
|
||||
the information in section 2) depending on the type of interrupt
|
||||
controller you have.
|
||||
- interrupt-parent : the phandle for the interrupt controller that
|
||||
services interrupts for this device.
|
||||
|
||||
Example:
|
||||
spi@4c0 {
|
||||
cell-index = <0>;
|
||||
compatible = "fsl,spi";
|
||||
reg = <4c0 40>;
|
||||
interrupts = <82 0>;
|
||||
interrupt-parent = <700>;
|
||||
mode = "cpu";
|
||||
};
|
38
Documentation/powerpc/dts-bindings/fsl/ssi.txt
Normal file
38
Documentation/powerpc/dts-bindings/fsl/ssi.txt
Normal file
@ -0,0 +1,38 @@
|
||||
Freescale Synchronous Serial Interface
|
||||
|
||||
The SSI is a serial device that communicates with audio codecs. It can
|
||||
be programmed in AC97, I2S, left-justified, or right-justified modes.
|
||||
|
||||
Required properties:
|
||||
- compatible : compatible list, containing "fsl,ssi"
|
||||
- cell-index : the SSI, <0> = SSI1, <1> = SSI2, and so on
|
||||
- reg : offset and length of the register set for the device
|
||||
- interrupts : <a b> where a is the interrupt number and b is a
|
||||
field that represents an encoding of the sense and
|
||||
level information for the interrupt. This should be
|
||||
encoded based on the information in section 2)
|
||||
depending on the type of interrupt controller you
|
||||
have.
|
||||
- interrupt-parent : the phandle for the interrupt controller that
|
||||
services interrupts for this device.
|
||||
- fsl,mode : the operating mode for the SSI interface
|
||||
"i2s-slave" - I2S mode, SSI is clock slave
|
||||
"i2s-master" - I2S mode, SSI is clock master
|
||||
"lj-slave" - left-justified mode, SSI is clock slave
|
||||
"lj-master" - l.j. mode, SSI is clock master
|
||||
"rj-slave" - right-justified mode, SSI is clock slave
|
||||
"rj-master" - r.j., SSI is clock master
|
||||
"ac97-slave" - AC97 mode, SSI is clock slave
|
||||
"ac97-master" - AC97 mode, SSI is clock master
|
||||
|
||||
Optional properties:
|
||||
- codec-handle : phandle to a 'codec' node that defines an audio
|
||||
codec connected to this SSI. This node is typically
|
||||
a child of an I2C or other control node.
|
||||
|
||||
Child 'codec' node required properties:
|
||||
- compatible : compatible list, contains the name of the codec
|
||||
|
||||
Child 'codec' node optional properties:
|
||||
- clock-frequency : The frequency of the input clock, which typically
|
||||
comes from an on-board dedicated oscillator.
|
69
Documentation/powerpc/dts-bindings/fsl/tsec.txt
Normal file
69
Documentation/powerpc/dts-bindings/fsl/tsec.txt
Normal file
@ -0,0 +1,69 @@
|
||||
* MDIO IO device
|
||||
|
||||
The MDIO is a bus to which the PHY devices are connected. For each
|
||||
device that exists on this bus, a child node should be created. See
|
||||
the definition of the PHY node below for an example of how to define
|
||||
a PHY.
|
||||
|
||||
Required properties:
|
||||
- reg : Offset and length of the register set for the device
|
||||
- compatible : Should define the compatible device type for the
|
||||
mdio. Currently, this is most likely to be "fsl,gianfar-mdio"
|
||||
|
||||
Example:
|
||||
|
||||
mdio@24520 {
|
||||
reg = <24520 20>;
|
||||
compatible = "fsl,gianfar-mdio";
|
||||
|
||||
ethernet-phy@0 {
|
||||
......
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
* Gianfar-compatible ethernet nodes
|
||||
|
||||
Required properties:
|
||||
|
||||
- device_type : Should be "network"
|
||||
- model : Model of the device. Can be "TSEC", "eTSEC", or "FEC"
|
||||
- compatible : Should be "gianfar"
|
||||
- reg : Offset and length of the register set for the device
|
||||
- mac-address : List of bytes representing the ethernet address of
|
||||
this controller
|
||||
- interrupts : <a b> where a is the interrupt number and b is a
|
||||
field that represents an encoding of the sense and level
|
||||
information for the interrupt. This should be encoded based on
|
||||
the information in section 2) depending on the type of interrupt
|
||||
controller you have.
|
||||
- interrupt-parent : the phandle for the interrupt controller that
|
||||
services interrupts for this device.
|
||||
- phy-handle : The phandle for the PHY connected to this ethernet
|
||||
controller.
|
||||
- fixed-link : <a b c d e> where a is emulated phy id - choose any,
|
||||
but unique to the all specified fixed-links, b is duplex - 0 half,
|
||||
1 full, c is link speed - d#10/d#100/d#1000, d is pause - 0 no
|
||||
pause, 1 pause, e is asym_pause - 0 no asym_pause, 1 asym_pause.
|
||||
|
||||
Recommended properties:
|
||||
|
||||
- phy-connection-type : a string naming the controller/PHY interface type,
|
||||
i.e., "mii" (default), "rmii", "gmii", "rgmii", "rgmii-id", "sgmii",
|
||||
"tbi", or "rtbi". This property is only really needed if the connection
|
||||
is of type "rgmii-id", as all other connection types are detected by
|
||||
hardware.
|
||||
|
||||
|
||||
Example:
|
||||
ethernet@24000 {
|
||||
#size-cells = <0>;
|
||||
device_type = "network";
|
||||
model = "TSEC";
|
||||
compatible = "gianfar";
|
||||
reg = <24000 1000>;
|
||||
mac-address = [ 00 E0 0C 00 73 00 ];
|
||||
interrupts = <d 3 e 3 12 3>;
|
||||
interrupt-parent = <40000>;
|
||||
phy-handle = <2452000>
|
||||
};
|
59
Documentation/powerpc/dts-bindings/fsl/usb.txt
Normal file
59
Documentation/powerpc/dts-bindings/fsl/usb.txt
Normal file
@ -0,0 +1,59 @@
|
||||
Freescale SOC USB controllers
|
||||
|
||||
The device node for a USB controller that is part of a Freescale
|
||||
SOC is as described in the document "Open Firmware Recommended
|
||||
Practice : Universal Serial Bus" with the following modifications
|
||||
and additions :
|
||||
|
||||
Required properties :
|
||||
- compatible : Should be "fsl-usb2-mph" for multi port host USB
|
||||
controllers, or "fsl-usb2-dr" for dual role USB controllers
|
||||
- phy_type : For multi port host USB controllers, should be one of
|
||||
"ulpi", or "serial". For dual role USB controllers, should be
|
||||
one of "ulpi", "utmi", "utmi_wide", or "serial".
|
||||
- reg : Offset and length of the register set for the device
|
||||
- port0 : boolean; if defined, indicates port0 is connected for
|
||||
fsl-usb2-mph compatible controllers. Either this property or
|
||||
"port1" (or both) must be defined for "fsl-usb2-mph" compatible
|
||||
controllers.
|
||||
- port1 : boolean; if defined, indicates port1 is connected for
|
||||
fsl-usb2-mph compatible controllers. Either this property or
|
||||
"port0" (or both) must be defined for "fsl-usb2-mph" compatible
|
||||
controllers.
|
||||
- dr_mode : indicates the working mode for "fsl-usb2-dr" compatible
|
||||
controllers. Can be "host", "peripheral", or "otg". Default to
|
||||
"host" if not defined for backward compatibility.
|
||||
|
||||
Recommended properties :
|
||||
- interrupts : <a b> where a is the interrupt number and b is a
|
||||
field that represents an encoding of the sense and level
|
||||
information for the interrupt. This should be encoded based on
|
||||
the information in section 2) depending on the type of interrupt
|
||||
controller you have.
|
||||
- interrupt-parent : the phandle for the interrupt controller that
|
||||
services interrupts for this device.
|
||||
|
||||
Example multi port host USB controller device node :
|
||||
usb@22000 {
|
||||
compatible = "fsl-usb2-mph";
|
||||
reg = <22000 1000>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
interrupt-parent = <700>;
|
||||
interrupts = <27 1>;
|
||||
phy_type = "ulpi";
|
||||
port0;
|
||||
port1;
|
||||
};
|
||||
|
||||
Example dual role USB controller device node :
|
||||
usb@23000 {
|
||||
compatible = "fsl-usb2-dr";
|
||||
reg = <23000 1000>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
interrupt-parent = <700>;
|
||||
interrupts = <26 1>;
|
||||
dr_mode = "otg";
|
||||
phy = "ulpi";
|
||||
};
|
@ -56,19 +56,33 @@ Supported Cards/Chipsets
|
||||
9005:0285:9005:02d1 Adaptec 5405 (Voodoo40)
|
||||
9005:0285:15d9:02d2 SMC AOC-USAS-S8i-LP
|
||||
9005:0285:15d9:02d3 SMC AOC-USAS-S8iR-LP
|
||||
9005:0285:9005:02d4 Adaptec 2045 (Voodoo04 Lite)
|
||||
9005:0285:9005:02d5 Adaptec 2405 (Voodoo40 Lite)
|
||||
9005:0285:9005:02d6 Adaptec 2445 (Voodoo44 Lite)
|
||||
9005:0285:9005:02d7 Adaptec 2805 (Voodoo80 Lite)
|
||||
9005:0285:9005:02d4 Adaptec ASR-2045 (Voodoo04 Lite)
|
||||
9005:0285:9005:02d5 Adaptec ASR-2405 (Voodoo40 Lite)
|
||||
9005:0285:9005:02d6 Adaptec ASR-2445 (Voodoo44 Lite)
|
||||
9005:0285:9005:02d7 Adaptec ASR-2805 (Voodoo80 Lite)
|
||||
9005:0285:9005:02d8 Adaptec 5405G (Voodoo40 PM)
|
||||
9005:0285:9005:02d9 Adaptec 5445G (Voodoo44 PM)
|
||||
9005:0285:9005:02da Adaptec 5805G (Voodoo80 PM)
|
||||
9005:0285:9005:02db Adaptec 5085G (Voodoo08 PM)
|
||||
9005:0285:9005:02dc Adaptec 51245G (Voodoo124 PM)
|
||||
9005:0285:9005:02dd Adaptec 51645G (Voodoo164 PM)
|
||||
9005:0285:9005:02de Adaptec 52445G (Voodoo244 PM)
|
||||
9005:0285:9005:02df Adaptec ASR-2045G (Voodoo04 Lite PM)
|
||||
9005:0285:9005:02e0 Adaptec ASR-2405G (Voodoo40 Lite PM)
|
||||
9005:0285:9005:02e1 Adaptec ASR-2445G (Voodoo44 Lite PM)
|
||||
9005:0285:9005:02e2 Adaptec ASR-2805G (Voodoo80 Lite PM)
|
||||
1011:0046:9005:0364 Adaptec 5400S (Mustang)
|
||||
1011:0046:9005:0365 Adaptec 5400S (Mustang)
|
||||
9005:0287:9005:0800 Adaptec Themisto (Jupiter)
|
||||
9005:0200:9005:0200 Adaptec Themisto (Jupiter)
|
||||
9005:0286:9005:0800 Adaptec Callisto (Jupiter)
|
||||
1011:0046:9005:1364 Dell PERC 2/QC (Quad Channel, Mustang)
|
||||
1011:0046:9005:1365 Dell PERC 2/QC (Quad Channel, Mustang)
|
||||
1028:0001:1028:0001 Dell PERC 2/Si (Iguana)
|
||||
1028:0003:1028:0003 Dell PERC 3/Si (SlimFast)
|
||||
1028:0002:1028:0002 Dell PERC 3/Di (Opal)
|
||||
1028:0004:1028:0004 Dell PERC 3/DiF (Iguana)
|
||||
1028:0004:1028:0004 Dell PERC 3/SiF (Iguana)
|
||||
1028:0004:1028:00d0 Dell PERC 3/DiF (Iguana)
|
||||
1028:0002:1028:00d1 Dell PERC 3/DiV (Viper)
|
||||
1028:0002:1028:00d9 Dell PERC 3/DiL (Lexus)
|
||||
1028:000a:1028:0106 Dell PERC 3/DiJ (Jaguar)
|
||||
|
16
MAINTAINERS
16
MAINTAINERS
@ -1686,6 +1686,13 @@ L: linuxppc-embedded@ozlabs.org
|
||||
L: linux-kernel@vger.kernel.org
|
||||
S: Maintained
|
||||
|
||||
FREESCALE I2C CPM DRIVER
|
||||
P: Jochen Friedrich
|
||||
M: jochen@scram.de
|
||||
L: linuxppc-dev@ozlabs.org
|
||||
L: i2c@lm-sensors.org
|
||||
S: Maintained
|
||||
|
||||
FREESCALE SOC FS_ENET DRIVER
|
||||
P: Pantelis Antoniou
|
||||
M: pantelis.antoniou@gmail.com
|
||||
@ -1770,6 +1777,11 @@ M: hch@infradead.org
|
||||
W: ftp://ftp.openlinux.org/pub/people/hch/vxfs
|
||||
S: Maintained
|
||||
|
||||
FTRACE
|
||||
P: Steven Rostedt
|
||||
M: srostedt@redhat.com
|
||||
S: Maintained
|
||||
|
||||
FUJITSU FR-V (FRV) PORT
|
||||
P: David Howells
|
||||
M: dhowells@redhat.com
|
||||
@ -2509,13 +2521,11 @@ W: http://www.penguinppc.org/
|
||||
L: linuxppc-dev@ozlabs.org
|
||||
S: Maintained
|
||||
|
||||
LINUX FOR POWERPC EMBEDDED MPC52XX
|
||||
LINUX FOR POWERPC EMBEDDED MPC5XXX
|
||||
P: Sylvain Munaut
|
||||
M: tnt@246tNt.com
|
||||
P: Grant Likely
|
||||
M: grant.likely@secretlab.ca
|
||||
W: http://www.246tNt.com/mpc52xx/
|
||||
W: http://www.penguinppc.org/
|
||||
L: linuxppc-dev@ozlabs.org
|
||||
S: Maintained
|
||||
|
||||
|
@ -39,3 +39,6 @@ config HAVE_KRETPROBES
|
||||
|
||||
config HAVE_DMA_ATTRS
|
||||
def_bool n
|
||||
|
||||
config USE_GENERIC_SMP_HELPERS
|
||||
def_bool n
|
||||
|
@ -528,6 +528,7 @@ config ARCH_MAY_HAVE_PC_FDC
|
||||
config SMP
|
||||
bool "Symmetric multi-processing support"
|
||||
depends on ALPHA_SABLE || ALPHA_LYNX || ALPHA_RAWHIDE || ALPHA_DP264 || ALPHA_WILDFIRE || ALPHA_TITAN || ALPHA_GENERIC || ALPHA_SHARK || ALPHA_MARVEL
|
||||
select USE_GENERIC_SMP_HELPERS
|
||||
---help---
|
||||
This enables support for systems with more than one CPU. If you have
|
||||
a system with only one CPU, like most personal computers, say N. If
|
||||
|
@ -660,9 +660,9 @@ __marvel_rtc_io(u8 b, unsigned long addr, int write)
|
||||
|
||||
#ifdef CONFIG_SMP
|
||||
if (smp_processor_id() != boot_cpuid)
|
||||
smp_call_function_on_cpu(__marvel_access_rtc,
|
||||
&rtc_access, 1, 1,
|
||||
cpumask_of_cpu(boot_cpuid));
|
||||
smp_call_function_single(boot_cpuid,
|
||||
__marvel_access_rtc,
|
||||
&rtc_access, 1);
|
||||
else
|
||||
__marvel_access_rtc(&rtc_access);
|
||||
#else
|
||||
|
@ -42,8 +42,7 @@ void ack_bad_irq(unsigned int irq)
|
||||
#ifdef CONFIG_SMP
|
||||
static char irq_user_affinity[NR_IRQS];
|
||||
|
||||
int
|
||||
select_smp_affinity(unsigned int irq)
|
||||
int irq_select_affinity(unsigned int irq)
|
||||
{
|
||||
static int last_cpu;
|
||||
int cpu = last_cpu + 1;
|
||||
@ -51,7 +50,7 @@ select_smp_affinity(unsigned int irq)
|
||||
if (!irq_desc[irq].chip->set_affinity || irq_user_affinity[irq])
|
||||
return 1;
|
||||
|
||||
while (!cpu_possible(cpu))
|
||||
while (!cpu_possible(cpu) || !cpu_isset(cpu, irq_default_affinity))
|
||||
cpu = (cpu < (NR_CPUS-1) ? cpu + 1 : 0);
|
||||
last_cpu = cpu;
|
||||
|
||||
|
@ -160,7 +160,7 @@ common_shutdown(int mode, char *restart_cmd)
|
||||
struct halt_info args;
|
||||
args.mode = mode;
|
||||
args.restart_cmd = restart_cmd;
|
||||
on_each_cpu(common_shutdown_1, &args, 1, 0);
|
||||
on_each_cpu(common_shutdown_1, &args, 0);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -62,6 +62,7 @@ static struct {
|
||||
enum ipi_message_type {
|
||||
IPI_RESCHEDULE,
|
||||
IPI_CALL_FUNC,
|
||||
IPI_CALL_FUNC_SINGLE,
|
||||
IPI_CPU_STOP,
|
||||
};
|
||||
|
||||
@ -558,51 +559,6 @@ send_ipi_message(cpumask_t to_whom, enum ipi_message_type operation)
|
||||
wripir(i);
|
||||
}
|
||||
|
||||
/* Structure and data for smp_call_function. This is designed to
|
||||
minimize static memory requirements. Plus it looks cleaner. */
|
||||
|
||||
struct smp_call_struct {
|
||||
void (*func) (void *info);
|
||||
void *info;
|
||||
long wait;
|
||||
atomic_t unstarted_count;
|
||||
atomic_t unfinished_count;
|
||||
};
|
||||
|
||||
static struct smp_call_struct *smp_call_function_data;
|
||||
|
||||
/* Atomicly drop data into a shared pointer. The pointer is free if
|
||||
it is initially locked. If retry, spin until free. */
|
||||
|
||||
static int
|
||||
pointer_lock (void *lock, void *data, int retry)
|
||||
{
|
||||
void *old, *tmp;
|
||||
|
||||
mb();
|
||||
again:
|
||||
/* Compare and swap with zero. */
|
||||
asm volatile (
|
||||
"1: ldq_l %0,%1\n"
|
||||
" mov %3,%2\n"
|
||||
" bne %0,2f\n"
|
||||
" stq_c %2,%1\n"
|
||||
" beq %2,1b\n"
|
||||
"2:"
|
||||
: "=&r"(old), "=m"(*(void **)lock), "=&r"(tmp)
|
||||
: "r"(data)
|
||||
: "memory");
|
||||
|
||||
if (old == 0)
|
||||
return 0;
|
||||
if (! retry)
|
||||
return -EBUSY;
|
||||
|
||||
while (*(void **)lock)
|
||||
barrier();
|
||||
goto again;
|
||||
}
|
||||
|
||||
void
|
||||
handle_ipi(struct pt_regs *regs)
|
||||
{
|
||||
@ -632,31 +588,12 @@ handle_ipi(struct pt_regs *regs)
|
||||
break;
|
||||
|
||||
case IPI_CALL_FUNC:
|
||||
{
|
||||
struct smp_call_struct *data;
|
||||
void (*func)(void *info);
|
||||
void *info;
|
||||
int wait;
|
||||
|
||||
data = smp_call_function_data;
|
||||
func = data->func;
|
||||
info = data->info;
|
||||
wait = data->wait;
|
||||
|
||||
/* Notify the sending CPU that the data has been
|
||||
received, and execution is about to begin. */
|
||||
mb();
|
||||
atomic_dec (&data->unstarted_count);
|
||||
|
||||
/* At this point the structure may be gone unless
|
||||
wait is true. */
|
||||
(*func)(info);
|
||||
|
||||
/* Notify the sending CPU that the task is done. */
|
||||
mb();
|
||||
if (wait) atomic_dec (&data->unfinished_count);
|
||||
generic_smp_call_function_interrupt();
|
||||
break;
|
||||
|
||||
case IPI_CALL_FUNC_SINGLE:
|
||||
generic_smp_call_function_single_interrupt();
|
||||
break;
|
||||
}
|
||||
|
||||
case IPI_CPU_STOP:
|
||||
halt();
|
||||
@ -700,102 +637,15 @@ smp_send_stop(void)
|
||||
send_ipi_message(to_whom, IPI_CPU_STOP);
|
||||
}
|
||||
|
||||
/*
|
||||
* Run a function on all other CPUs.
|
||||
* <func> The function to run. This must be fast and non-blocking.
|
||||
* <info> An arbitrary pointer to pass to the function.
|
||||
* <retry> If true, keep retrying until ready.
|
||||
* <wait> If true, wait until function has completed on other CPUs.
|
||||
* [RETURNS] 0 on success, else a negative status code.
|
||||
*
|
||||
* Does not return until remote CPUs are nearly ready to execute <func>
|
||||
* or are or have executed.
|
||||
* You must not call this function with disabled interrupts or from a
|
||||
* hardware interrupt handler or from a bottom half handler.
|
||||
*/
|
||||
|
||||
int
|
||||
smp_call_function_on_cpu (void (*func) (void *info), void *info, int retry,
|
||||
int wait, cpumask_t to_whom)
|
||||
void arch_send_call_function_ipi(cpumask_t mask)
|
||||
{
|
||||
struct smp_call_struct data;
|
||||
unsigned long timeout;
|
||||
int num_cpus_to_call;
|
||||
|
||||
/* Can deadlock when called with interrupts disabled */
|
||||
WARN_ON(irqs_disabled());
|
||||
|
||||
data.func = func;
|
||||
data.info = info;
|
||||
data.wait = wait;
|
||||
|
||||
cpu_clear(smp_processor_id(), to_whom);
|
||||
num_cpus_to_call = cpus_weight(to_whom);
|
||||
|
||||
atomic_set(&data.unstarted_count, num_cpus_to_call);
|
||||
atomic_set(&data.unfinished_count, num_cpus_to_call);
|
||||
|
||||
/* Acquire the smp_call_function_data mutex. */
|
||||
if (pointer_lock(&smp_call_function_data, &data, retry))
|
||||
return -EBUSY;
|
||||
|
||||
/* Send a message to the requested CPUs. */
|
||||
send_ipi_message(to_whom, IPI_CALL_FUNC);
|
||||
|
||||
/* Wait for a minimal response. */
|
||||
timeout = jiffies + HZ;
|
||||
while (atomic_read (&data.unstarted_count) > 0
|
||||
&& time_before (jiffies, timeout))
|
||||
barrier();
|
||||
|
||||
/* If there's no response yet, log a message but allow a longer
|
||||
* timeout period -- if we get a response this time, log
|
||||
* a message saying when we got it..
|
||||
*/
|
||||
if (atomic_read(&data.unstarted_count) > 0) {
|
||||
long start_time = jiffies;
|
||||
printk(KERN_ERR "%s: initial timeout -- trying long wait\n",
|
||||
__func__);
|
||||
timeout = jiffies + 30 * HZ;
|
||||
while (atomic_read(&data.unstarted_count) > 0
|
||||
&& time_before(jiffies, timeout))
|
||||
barrier();
|
||||
if (atomic_read(&data.unstarted_count) <= 0) {
|
||||
long delta = jiffies - start_time;
|
||||
printk(KERN_ERR
|
||||
"%s: response %ld.%ld seconds into long wait\n",
|
||||
__func__, delta / HZ,
|
||||
(100 * (delta - ((delta / HZ) * HZ))) / HZ);
|
||||
}
|
||||
}
|
||||
|
||||
/* We either got one or timed out -- clear the lock. */
|
||||
mb();
|
||||
smp_call_function_data = NULL;
|
||||
|
||||
/*
|
||||
* If after both the initial and long timeout periods we still don't
|
||||
* have a response, something is very wrong...
|
||||
*/
|
||||
BUG_ON(atomic_read (&data.unstarted_count) > 0);
|
||||
|
||||
/* Wait for a complete response, if needed. */
|
||||
if (wait) {
|
||||
while (atomic_read (&data.unfinished_count) > 0)
|
||||
barrier();
|
||||
}
|
||||
|
||||
return 0;
|
||||
send_ipi_message(mask, IPI_CALL_FUNC);
|
||||
}
|
||||
EXPORT_SYMBOL(smp_call_function_on_cpu);
|
||||
|
||||
int
|
||||
smp_call_function (void (*func) (void *info), void *info, int retry, int wait)
|
||||
void arch_send_call_function_single_ipi(int cpu)
|
||||
{
|
||||
return smp_call_function_on_cpu (func, info, retry, wait,
|
||||
cpu_online_map);
|
||||
send_ipi_message(cpumask_of_cpu(cpu), IPI_CALL_FUNC_SINGLE);
|
||||
}
|
||||
EXPORT_SYMBOL(smp_call_function);
|
||||
|
||||
static void
|
||||
ipi_imb(void *ignored)
|
||||
@ -807,7 +657,7 @@ void
|
||||
smp_imb(void)
|
||||
{
|
||||
/* Must wait other processors to flush their icache before continue. */
|
||||
if (on_each_cpu(ipi_imb, NULL, 1, 1))
|
||||
if (on_each_cpu(ipi_imb, NULL, 1))
|
||||
printk(KERN_CRIT "smp_imb: timed out\n");
|
||||
}
|
||||
EXPORT_SYMBOL(smp_imb);
|
||||
@ -823,7 +673,7 @@ flush_tlb_all(void)
|
||||
{
|
||||
/* Although we don't have any data to pass, we do want to
|
||||
synchronize with the other processors. */
|
||||
if (on_each_cpu(ipi_flush_tlb_all, NULL, 1, 1)) {
|
||||
if (on_each_cpu(ipi_flush_tlb_all, NULL, 1)) {
|
||||
printk(KERN_CRIT "flush_tlb_all: timed out\n");
|
||||
}
|
||||
}
|
||||
@ -860,7 +710,7 @@ flush_tlb_mm(struct mm_struct *mm)
|
||||
}
|
||||
}
|
||||
|
||||
if (smp_call_function(ipi_flush_tlb_mm, mm, 1, 1)) {
|
||||
if (smp_call_function(ipi_flush_tlb_mm, mm, 1)) {
|
||||
printk(KERN_CRIT "flush_tlb_mm: timed out\n");
|
||||
}
|
||||
|
||||
@ -913,7 +763,7 @@ flush_tlb_page(struct vm_area_struct *vma, unsigned long addr)
|
||||
data.mm = mm;
|
||||
data.addr = addr;
|
||||
|
||||
if (smp_call_function(ipi_flush_tlb_page, &data, 1, 1)) {
|
||||
if (smp_call_function(ipi_flush_tlb_page, &data, 1)) {
|
||||
printk(KERN_CRIT "flush_tlb_page: timed out\n");
|
||||
}
|
||||
|
||||
@ -965,7 +815,7 @@ flush_icache_user_range(struct vm_area_struct *vma, struct page *page,
|
||||
}
|
||||
}
|
||||
|
||||
if (smp_call_function(ipi_flush_icache_page, mm, 1, 1)) {
|
||||
if (smp_call_function(ipi_flush_icache_page, mm, 1)) {
|
||||
printk(KERN_CRIT "flush_icache_page: timed out\n");
|
||||
}
|
||||
|
||||
|
@ -65,7 +65,7 @@ op_axp_setup(void)
|
||||
model->reg_setup(®, ctr, &sys);
|
||||
|
||||
/* Configure the registers on all cpus. */
|
||||
(void)smp_call_function(model->cpu_setup, ®, 0, 1);
|
||||
(void)smp_call_function(model->cpu_setup, ®, 1);
|
||||
model->cpu_setup(®);
|
||||
return 0;
|
||||
}
|
||||
@ -86,7 +86,7 @@ op_axp_cpu_start(void *dummy)
|
||||
static int
|
||||
op_axp_start(void)
|
||||
{
|
||||
(void)smp_call_function(op_axp_cpu_start, NULL, 0, 1);
|
||||
(void)smp_call_function(op_axp_cpu_start, NULL, 1);
|
||||
op_axp_cpu_start(NULL);
|
||||
return 0;
|
||||
}
|
||||
@ -101,7 +101,7 @@ op_axp_cpu_stop(void *dummy)
|
||||
static void
|
||||
op_axp_stop(void)
|
||||
{
|
||||
(void)smp_call_function(op_axp_cpu_stop, NULL, 0, 1);
|
||||
(void)smp_call_function(op_axp_cpu_stop, NULL, 1);
|
||||
op_axp_cpu_stop(NULL);
|
||||
}
|
||||
|
||||
|
@ -701,6 +701,7 @@ source "kernel/time/Kconfig"
|
||||
config SMP
|
||||
bool "Symmetric Multi-Processing (EXPERIMENTAL)"
|
||||
depends on EXPERIMENTAL && (REALVIEW_EB_ARM11MP || MACH_REALVIEW_PB11MP)
|
||||
select USE_GENERIC_SMP_HELPERS
|
||||
help
|
||||
This enables support for systems with more than one CPU. If you have
|
||||
a system with only one CPU, like most personal computers, say N. If
|
||||
|
@ -68,20 +68,10 @@ enum ipi_msg_type {
|
||||
IPI_TIMER,
|
||||
IPI_RESCHEDULE,
|
||||
IPI_CALL_FUNC,
|
||||
IPI_CALL_FUNC_SINGLE,
|
||||
IPI_CPU_STOP,
|
||||
};
|
||||
|
||||
struct smp_call_struct {
|
||||
void (*func)(void *info);
|
||||
void *info;
|
||||
int wait;
|
||||
cpumask_t pending;
|
||||
cpumask_t unfinished;
|
||||
};
|
||||
|
||||
static struct smp_call_struct * volatile smp_call_function_data;
|
||||
static DEFINE_SPINLOCK(smp_call_function_lock);
|
||||
|
||||
int __cpuinit __cpu_up(unsigned int cpu)
|
||||
{
|
||||
struct cpuinfo_arm *ci = &per_cpu(cpu_data, cpu);
|
||||
@ -366,114 +356,15 @@ static void send_ipi_message(cpumask_t callmap, enum ipi_msg_type msg)
|
||||
local_irq_restore(flags);
|
||||
}
|
||||
|
||||
/*
|
||||
* You must not call this function with disabled interrupts, from a
|
||||
* hardware interrupt handler, nor from a bottom half handler.
|
||||
*/
|
||||
static int smp_call_function_on_cpu(void (*func)(void *info), void *info,
|
||||
int retry, int wait, cpumask_t callmap)
|
||||
void arch_send_call_function_ipi(cpumask_t mask)
|
||||
{
|
||||
struct smp_call_struct data;
|
||||
unsigned long timeout;
|
||||
int ret = 0;
|
||||
|
||||
data.func = func;
|
||||
data.info = info;
|
||||
data.wait = wait;
|
||||
|
||||
cpu_clear(smp_processor_id(), callmap);
|
||||
if (cpus_empty(callmap))
|
||||
goto out;
|
||||
|
||||
data.pending = callmap;
|
||||
if (wait)
|
||||
data.unfinished = callmap;
|
||||
|
||||
/*
|
||||
* try to get the mutex on smp_call_function_data
|
||||
*/
|
||||
spin_lock(&smp_call_function_lock);
|
||||
smp_call_function_data = &data;
|
||||
|
||||
send_ipi_message(callmap, IPI_CALL_FUNC);
|
||||
|
||||
timeout = jiffies + HZ;
|
||||
while (!cpus_empty(data.pending) && time_before(jiffies, timeout))
|
||||
barrier();
|
||||
|
||||
/*
|
||||
* did we time out?
|
||||
*/
|
||||
if (!cpus_empty(data.pending)) {
|
||||
/*
|
||||
* this may be causing our panic - report it
|
||||
*/
|
||||
printk(KERN_CRIT
|
||||
"CPU%u: smp_call_function timeout for %p(%p)\n"
|
||||
" callmap %lx pending %lx, %swait\n",
|
||||
smp_processor_id(), func, info, *cpus_addr(callmap),
|
||||
*cpus_addr(data.pending), wait ? "" : "no ");
|
||||
|
||||
/*
|
||||
* TRACE
|
||||
*/
|
||||
timeout = jiffies + (5 * HZ);
|
||||
while (!cpus_empty(data.pending) && time_before(jiffies, timeout))
|
||||
barrier();
|
||||
|
||||
if (cpus_empty(data.pending))
|
||||
printk(KERN_CRIT " RESOLVED\n");
|
||||
else
|
||||
printk(KERN_CRIT " STILL STUCK\n");
|
||||
}
|
||||
|
||||
/*
|
||||
* whatever happened, we're done with the data, so release it
|
||||
*/
|
||||
smp_call_function_data = NULL;
|
||||
spin_unlock(&smp_call_function_lock);
|
||||
|
||||
if (!cpus_empty(data.pending)) {
|
||||
ret = -ETIMEDOUT;
|
||||
goto out;
|
||||
}
|
||||
|
||||
if (wait)
|
||||
while (!cpus_empty(data.unfinished))
|
||||
barrier();
|
||||
out:
|
||||
|
||||
return 0;
|
||||
send_ipi_message(mask, IPI_CALL_FUNC);
|
||||
}
|
||||
|
||||
int smp_call_function(void (*func)(void *info), void *info, int retry,
|
||||
int wait)
|
||||
void arch_send_call_function_single_ipi(int cpu)
|
||||
{
|
||||
return smp_call_function_on_cpu(func, info, retry, wait,
|
||||
cpu_online_map);
|
||||
send_ipi_message(cpumask_of_cpu(cpu), IPI_CALL_FUNC_SINGLE);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(smp_call_function);
|
||||
|
||||
int smp_call_function_single(int cpu, void (*func)(void *info), void *info,
|
||||
int retry, int wait)
|
||||
{
|
||||
/* prevent preemption and reschedule on another processor */
|
||||
int current_cpu = get_cpu();
|
||||
int ret = 0;
|
||||
|
||||
if (cpu == current_cpu) {
|
||||
local_irq_disable();
|
||||
func(info);
|
||||
local_irq_enable();
|
||||
} else
|
||||
ret = smp_call_function_on_cpu(func, info, retry, wait,
|
||||
cpumask_of_cpu(cpu));
|
||||
|
||||
put_cpu();
|
||||
|
||||
return ret;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(smp_call_function_single);
|
||||
|
||||
void show_ipi_list(struct seq_file *p)
|
||||
{
|
||||
@ -521,27 +412,6 @@ asmlinkage void __exception do_local_timer(struct pt_regs *regs)
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* ipi_call_function - handle IPI from smp_call_function()
|
||||
*
|
||||
* Note that we copy data out of the cross-call structure and then
|
||||
* let the caller know that we're here and have done with their data
|
||||
*/
|
||||
static void ipi_call_function(unsigned int cpu)
|
||||
{
|
||||
struct smp_call_struct *data = smp_call_function_data;
|
||||
void (*func)(void *info) = data->func;
|
||||
void *info = data->info;
|
||||
int wait = data->wait;
|
||||
|
||||
cpu_clear(cpu, data->pending);
|
||||
|
||||
func(info);
|
||||
|
||||
if (wait)
|
||||
cpu_clear(cpu, data->unfinished);
|
||||
}
|
||||
|
||||
static DEFINE_SPINLOCK(stop_lock);
|
||||
|
||||
/*
|
||||
@ -611,7 +481,11 @@ asmlinkage void __exception do_IPI(struct pt_regs *regs)
|
||||
break;
|
||||
|
||||
case IPI_CALL_FUNC:
|
||||
ipi_call_function(cpu);
|
||||
generic_smp_call_function_interrupt();
|
||||
break;
|
||||
|
||||
case IPI_CALL_FUNC_SINGLE:
|
||||
generic_smp_call_function_single_interrupt();
|
||||
break;
|
||||
|
||||
case IPI_CPU_STOP:
|
||||
@ -662,14 +536,13 @@ int setup_profiling_timer(unsigned int multiplier)
|
||||
}
|
||||
|
||||
static int
|
||||
on_each_cpu_mask(void (*func)(void *), void *info, int retry, int wait,
|
||||
cpumask_t mask)
|
||||
on_each_cpu_mask(void (*func)(void *), void *info, int wait, cpumask_t mask)
|
||||
{
|
||||
int ret = 0;
|
||||
|
||||
preempt_disable();
|
||||
|
||||
ret = smp_call_function_on_cpu(func, info, retry, wait, mask);
|
||||
ret = smp_call_function_mask(mask, func, info, wait);
|
||||
if (cpu_isset(smp_processor_id(), mask))
|
||||
func(info);
|
||||
|
||||
@ -731,14 +604,14 @@ static inline void ipi_flush_tlb_kernel_range(void *arg)
|
||||
|
||||
void flush_tlb_all(void)
|
||||
{
|
||||
on_each_cpu(ipi_flush_tlb_all, NULL, 1, 1);
|
||||
on_each_cpu(ipi_flush_tlb_all, NULL, 1);
|
||||
}
|
||||
|
||||
void flush_tlb_mm(struct mm_struct *mm)
|
||||
{
|
||||
cpumask_t mask = mm->cpu_vm_mask;
|
||||
|
||||
on_each_cpu_mask(ipi_flush_tlb_mm, mm, 1, 1, mask);
|
||||
on_each_cpu_mask(ipi_flush_tlb_mm, mm, 1, mask);
|
||||
}
|
||||
|
||||
void flush_tlb_page(struct vm_area_struct *vma, unsigned long uaddr)
|
||||
@ -749,7 +622,7 @@ void flush_tlb_page(struct vm_area_struct *vma, unsigned long uaddr)
|
||||
ta.ta_vma = vma;
|
||||
ta.ta_start = uaddr;
|
||||
|
||||
on_each_cpu_mask(ipi_flush_tlb_page, &ta, 1, 1, mask);
|
||||
on_each_cpu_mask(ipi_flush_tlb_page, &ta, 1, mask);
|
||||
}
|
||||
|
||||
void flush_tlb_kernel_page(unsigned long kaddr)
|
||||
@ -758,7 +631,7 @@ void flush_tlb_kernel_page(unsigned long kaddr)
|
||||
|
||||
ta.ta_start = kaddr;
|
||||
|
||||
on_each_cpu(ipi_flush_tlb_kernel_page, &ta, 1, 1);
|
||||
on_each_cpu(ipi_flush_tlb_kernel_page, &ta, 1);
|
||||
}
|
||||
|
||||
void flush_tlb_range(struct vm_area_struct *vma,
|
||||
@ -771,7 +644,7 @@ void flush_tlb_range(struct vm_area_struct *vma,
|
||||
ta.ta_start = start;
|
||||
ta.ta_end = end;
|
||||
|
||||
on_each_cpu_mask(ipi_flush_tlb_range, &ta, 1, 1, mask);
|
||||
on_each_cpu_mask(ipi_flush_tlb_range, &ta, 1, mask);
|
||||
}
|
||||
|
||||
void flush_tlb_kernel_range(unsigned long start, unsigned long end)
|
||||
@ -781,5 +654,5 @@ void flush_tlb_kernel_range(unsigned long start, unsigned long end)
|
||||
ta.ta_start = start;
|
||||
ta.ta_end = end;
|
||||
|
||||
on_each_cpu(ipi_flush_tlb_kernel_range, &ta, 1, 1);
|
||||
on_each_cpu(ipi_flush_tlb_kernel_range, &ta, 1);
|
||||
}
|
||||
|
@ -92,4 +92,5 @@ void save_stack_trace(struct stack_trace *trace)
|
||||
{
|
||||
save_stack_trace_tsk(current, trace);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(save_stack_trace);
|
||||
#endif
|
||||
|
@ -201,7 +201,7 @@ static int em_call_function(int (*fn)(void))
|
||||
data.ret = 0;
|
||||
|
||||
preempt_disable();
|
||||
smp_call_function(em_func, &data, 1, 1);
|
||||
smp_call_function(em_func, &data, 1);
|
||||
em_func(&data);
|
||||
preempt_enable();
|
||||
|
||||
|
@ -352,7 +352,7 @@ static int __init vfp_init(void)
|
||||
else if (vfpsid & FPSID_NODOUBLE) {
|
||||
printk("no double precision support\n");
|
||||
} else {
|
||||
smp_call_function(vfp_enable, NULL, 1, 1);
|
||||
smp_call_function(vfp_enable, NULL, 1);
|
||||
|
||||
VFP_arch = (vfpsid & FPSID_ARCH_MASK) >> FPSID_ARCH_BIT; /* Extract the architecture version */
|
||||
printk("implementor %02x architecture %d part %02x variant %x rev %x\n",
|
||||
|
@ -51,3 +51,4 @@ void save_stack_trace(struct stack_trace *trace)
|
||||
fp = frame->fp;
|
||||
}
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(save_stack_trace);
|
||||
|
@ -194,7 +194,7 @@ void stop_this_cpu(void* dummy)
|
||||
/* Other calls */
|
||||
void smp_send_stop(void)
|
||||
{
|
||||
smp_call_function(stop_this_cpu, NULL, 1, 0);
|
||||
smp_call_function(stop_this_cpu, NULL, 0);
|
||||
}
|
||||
|
||||
int setup_profiling_timer(unsigned int multiplier)
|
||||
@ -316,8 +316,7 @@ int send_ipi(int vector, int wait, cpumask_t cpu_mask)
|
||||
* You must not call this function with disabled interrupts or from a
|
||||
* hardware interrupt handler or from a bottom half handler.
|
||||
*/
|
||||
int smp_call_function(void (*func)(void *info), void *info,
|
||||
int nonatomic, int wait)
|
||||
int smp_call_function(void (*func)(void *info), void *info, int wait)
|
||||
{
|
||||
cpumask_t cpu_mask = CPU_MASK_ALL;
|
||||
struct call_data_struct data;
|
||||
|
@ -303,6 +303,7 @@ config VIRT_CPU_ACCOUNTING
|
||||
|
||||
config SMP
|
||||
bool "Symmetric multi-processing support"
|
||||
select USE_GENERIC_SMP_HELPERS
|
||||
help
|
||||
This enables support for systems with more than one CPU. If you have
|
||||
a system with only one CPU, say N. If you have a system with more
|
||||
|
@ -707,7 +707,7 @@ ia64_mca_cmc_vector_enable (void *dummy)
|
||||
static void
|
||||
ia64_mca_cmc_vector_disable_keventd(struct work_struct *unused)
|
||||
{
|
||||
on_each_cpu(ia64_mca_cmc_vector_disable, NULL, 1, 0);
|
||||
on_each_cpu(ia64_mca_cmc_vector_disable, NULL, 0);
|
||||
}
|
||||
|
||||
/*
|
||||
@ -719,7 +719,7 @@ ia64_mca_cmc_vector_disable_keventd(struct work_struct *unused)
|
||||
static void
|
||||
ia64_mca_cmc_vector_enable_keventd(struct work_struct *unused)
|
||||
{
|
||||
on_each_cpu(ia64_mca_cmc_vector_enable, NULL, 1, 0);
|
||||
on_each_cpu(ia64_mca_cmc_vector_enable, NULL, 0);
|
||||
}
|
||||
|
||||
/*
|
||||
@ -1881,7 +1881,7 @@ static int __cpuinit mca_cpu_callback(struct notifier_block *nfb,
|
||||
case CPU_ONLINE:
|
||||
case CPU_ONLINE_FROZEN:
|
||||
smp_call_function_single(hotcpu, ia64_mca_cmc_vector_adjust,
|
||||
NULL, 1, 0);
|
||||
NULL, 0);
|
||||
break;
|
||||
}
|
||||
return NOTIFY_OK;
|
||||
|
@ -921,7 +921,7 @@ int palinfo_handle_smp(pal_func_cpu_u_t *f, char *page)
|
||||
|
||||
|
||||
/* will send IPI to other CPU and wait for completion of remote call */
|
||||
if ((ret=smp_call_function_single(f->req_cpu, palinfo_smp_call, &ptr, 0, 1))) {
|
||||
if ((ret=smp_call_function_single(f->req_cpu, palinfo_smp_call, &ptr, 1))) {
|
||||
printk(KERN_ERR "palinfo: remote CPU call from %d to %d on function %d: "
|
||||
"error %d\n", smp_processor_id(), f->req_cpu, f->func_id, ret);
|
||||
return 0;
|
||||
|
@ -1820,7 +1820,7 @@ pfm_syswide_cleanup_other_cpu(pfm_context_t *ctx)
|
||||
int ret;
|
||||
|
||||
DPRINT(("calling CPU%d for cleanup\n", ctx->ctx_cpu));
|
||||
ret = smp_call_function_single(ctx->ctx_cpu, pfm_syswide_force_stop, ctx, 0, 1);
|
||||
ret = smp_call_function_single(ctx->ctx_cpu, pfm_syswide_force_stop, ctx, 1);
|
||||
DPRINT(("called CPU%d for cleanup ret=%d\n", ctx->ctx_cpu, ret));
|
||||
}
|
||||
#endif /* CONFIG_SMP */
|
||||
@ -6508,7 +6508,7 @@ pfm_install_alt_pmu_interrupt(pfm_intr_handler_desc_t *hdl)
|
||||
}
|
||||
|
||||
/* save the current system wide pmu states */
|
||||
ret = on_each_cpu(pfm_alt_save_pmu_state, NULL, 0, 1);
|
||||
ret = on_each_cpu(pfm_alt_save_pmu_state, NULL, 1);
|
||||
if (ret) {
|
||||
DPRINT(("on_each_cpu() failed: %d\n", ret));
|
||||
goto cleanup_reserve;
|
||||
@ -6553,7 +6553,7 @@ pfm_remove_alt_pmu_interrupt(pfm_intr_handler_desc_t *hdl)
|
||||
|
||||
pfm_alt_intr_handler = NULL;
|
||||
|
||||
ret = on_each_cpu(pfm_alt_restore_pmu_state, NULL, 0, 1);
|
||||
ret = on_each_cpu(pfm_alt_restore_pmu_state, NULL, 1);
|
||||
if (ret) {
|
||||
DPRINT(("on_each_cpu() failed: %d\n", ret));
|
||||
}
|
||||
|
@ -286,7 +286,7 @@ void cpu_idle_wait(void)
|
||||
{
|
||||
smp_mb();
|
||||
/* kick all the CPUs so that they exit out of pm_idle */
|
||||
smp_call_function(do_nothing, NULL, 0, 1);
|
||||
smp_call_function(do_nothing, NULL, 1);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(cpu_idle_wait);
|
||||
|
||||
|
@ -60,25 +60,9 @@ static struct local_tlb_flush_counts {
|
||||
|
||||
static DEFINE_PER_CPU(unsigned int, shadow_flush_counts[NR_CPUS]) ____cacheline_aligned;
|
||||
|
||||
|
||||
/*
|
||||
* Structure and data for smp_call_function(). This is designed to minimise static memory
|
||||
* requirements. It also looks cleaner.
|
||||
*/
|
||||
static __cacheline_aligned DEFINE_SPINLOCK(call_lock);
|
||||
|
||||
struct call_data_struct {
|
||||
void (*func) (void *info);
|
||||
void *info;
|
||||
long wait;
|
||||
atomic_t started;
|
||||
atomic_t finished;
|
||||
};
|
||||
|
||||
static volatile struct call_data_struct *call_data;
|
||||
|
||||
#define IPI_CALL_FUNC 0
|
||||
#define IPI_CPU_STOP 1
|
||||
#define IPI_CALL_FUNC_SINGLE 2
|
||||
#define IPI_KDUMP_CPU_STOP 3
|
||||
|
||||
/* This needs to be cacheline aligned because it is written to by *other* CPUs. */
|
||||
@ -86,43 +70,6 @@ static DEFINE_PER_CPU_SHARED_ALIGNED(u64, ipi_operation);
|
||||
|
||||
extern void cpu_halt (void);
|
||||
|
||||
void
|
||||
lock_ipi_calllock(void)
|
||||
{
|
||||
spin_lock_irq(&call_lock);
|
||||
}
|
||||
|
||||
void
|
||||
unlock_ipi_calllock(void)
|
||||
{
|
||||
spin_unlock_irq(&call_lock);
|
||||
}
|
||||
|
||||
static inline void
|
||||
handle_call_data(void)
|
||||
{
|
||||
struct call_data_struct *data;
|
||||
void (*func)(void *info);
|
||||
void *info;
|
||||
int wait;
|
||||
|
||||
/* release the 'pointer lock' */
|
||||
data = (struct call_data_struct *)call_data;
|
||||
func = data->func;
|
||||
info = data->info;
|
||||
wait = data->wait;
|
||||
|
||||
mb();
|
||||
atomic_inc(&data->started);
|
||||
/* At this point the structure may be gone unless wait is true. */
|
||||
(*func)(info);
|
||||
|
||||
/* Notify the sending CPU that the task is done. */
|
||||
mb();
|
||||
if (wait)
|
||||
atomic_inc(&data->finished);
|
||||
}
|
||||
|
||||
static void
|
||||
stop_this_cpu(void)
|
||||
{
|
||||
@ -163,13 +110,15 @@ handle_IPI (int irq, void *dev_id)
|
||||
ops &= ~(1 << which);
|
||||
|
||||
switch (which) {
|
||||
case IPI_CALL_FUNC:
|
||||
handle_call_data();
|
||||
break;
|
||||
|
||||
case IPI_CPU_STOP:
|
||||
stop_this_cpu();
|
||||
break;
|
||||
case IPI_CALL_FUNC:
|
||||
generic_smp_call_function_interrupt();
|
||||
break;
|
||||
case IPI_CALL_FUNC_SINGLE:
|
||||
generic_smp_call_function_single_interrupt();
|
||||
break;
|
||||
#ifdef CONFIG_KEXEC
|
||||
case IPI_KDUMP_CPU_STOP:
|
||||
unw_init_running(kdump_cpu_freeze, NULL);
|
||||
@ -187,6 +136,8 @@ handle_IPI (int irq, void *dev_id)
|
||||
return IRQ_HANDLED;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Called with preemption disabled.
|
||||
*/
|
||||
@ -334,7 +285,7 @@ smp_flush_tlb_cpumask(cpumask_t xcpumask)
|
||||
void
|
||||
smp_flush_tlb_all (void)
|
||||
{
|
||||
on_each_cpu((void (*)(void *))local_flush_tlb_all, NULL, 1, 1);
|
||||
on_each_cpu((void (*)(void *))local_flush_tlb_all, NULL, 1);
|
||||
}
|
||||
|
||||
void
|
||||
@ -357,193 +308,18 @@ smp_flush_tlb_mm (struct mm_struct *mm)
|
||||
* anyhow, and once a CPU is interrupted, the cost of local_flush_tlb_all() is
|
||||
* rather trivial.
|
||||
*/
|
||||
on_each_cpu((void (*)(void *))local_finish_flush_tlb_mm, mm, 1, 1);
|
||||
on_each_cpu((void (*)(void *))local_finish_flush_tlb_mm, mm, 1);
|
||||
}
|
||||
|
||||
/*
|
||||
* Run a function on a specific CPU
|
||||
* <func> The function to run. This must be fast and non-blocking.
|
||||
* <info> An arbitrary pointer to pass to the function.
|
||||
* <nonatomic> Currently unused.
|
||||
* <wait> If true, wait until function has completed on other CPUs.
|
||||
* [RETURNS] 0 on success, else a negative status code.
|
||||
*
|
||||
* Does not return until the remote CPU is nearly ready to execute <func>
|
||||
* or is or has executed.
|
||||
*/
|
||||
|
||||
int
|
||||
smp_call_function_single (int cpuid, void (*func) (void *info), void *info, int nonatomic,
|
||||
int wait)
|
||||
void arch_send_call_function_single_ipi(int cpu)
|
||||
{
|
||||
struct call_data_struct data;
|
||||
int cpus = 1;
|
||||
int me = get_cpu(); /* prevent preemption and reschedule on another processor */
|
||||
|
||||
if (cpuid == me) {
|
||||
local_irq_disable();
|
||||
func(info);
|
||||
local_irq_enable();
|
||||
put_cpu();
|
||||
return 0;
|
||||
}
|
||||
|
||||
data.func = func;
|
||||
data.info = info;
|
||||
atomic_set(&data.started, 0);
|
||||
data.wait = wait;
|
||||
if (wait)
|
||||
atomic_set(&data.finished, 0);
|
||||
|
||||
spin_lock_bh(&call_lock);
|
||||
|
||||
call_data = &data;
|
||||
mb(); /* ensure store to call_data precedes setting of IPI_CALL_FUNC */
|
||||
send_IPI_single(cpuid, IPI_CALL_FUNC);
|
||||
|
||||
/* Wait for response */
|
||||
while (atomic_read(&data.started) != cpus)
|
||||
cpu_relax();
|
||||
|
||||
if (wait)
|
||||
while (atomic_read(&data.finished) != cpus)
|
||||
cpu_relax();
|
||||
call_data = NULL;
|
||||
|
||||
spin_unlock_bh(&call_lock);
|
||||
put_cpu();
|
||||
return 0;
|
||||
send_IPI_single(cpu, IPI_CALL_FUNC_SINGLE);
|
||||
}
|
||||
EXPORT_SYMBOL(smp_call_function_single);
|
||||
|
||||
/**
|
||||
* smp_call_function_mask(): Run a function on a set of other CPUs.
|
||||
* <mask> The set of cpus to run on. Must not include the current cpu.
|
||||
* <func> The function to run. This must be fast and non-blocking.
|
||||
* <info> An arbitrary pointer to pass to the function.
|
||||
* <wait> If true, wait (atomically) until function
|
||||
* has completed on other CPUs.
|
||||
*
|
||||
* Returns 0 on success, else a negative status code.
|
||||
*
|
||||
* If @wait is true, then returns once @func has returned; otherwise
|
||||
* it returns just before the target cpu calls @func.
|
||||
*
|
||||
* You must not call this function with disabled interrupts or from a
|
||||
* hardware interrupt handler or from a bottom half handler.
|
||||
*/
|
||||
int smp_call_function_mask(cpumask_t mask,
|
||||
void (*func)(void *), void *info,
|
||||
int wait)
|
||||
void arch_send_call_function_ipi(cpumask_t mask)
|
||||
{
|
||||
struct call_data_struct data;
|
||||
cpumask_t allbutself;
|
||||
int cpus;
|
||||
|
||||
spin_lock(&call_lock);
|
||||
allbutself = cpu_online_map;
|
||||
cpu_clear(smp_processor_id(), allbutself);
|
||||
|
||||
cpus_and(mask, mask, allbutself);
|
||||
cpus = cpus_weight(mask);
|
||||
if (!cpus) {
|
||||
spin_unlock(&call_lock);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Can deadlock when called with interrupts disabled */
|
||||
WARN_ON(irqs_disabled());
|
||||
|
||||
data.func = func;
|
||||
data.info = info;
|
||||
atomic_set(&data.started, 0);
|
||||
data.wait = wait;
|
||||
if (wait)
|
||||
atomic_set(&data.finished, 0);
|
||||
|
||||
call_data = &data;
|
||||
mb(); /* ensure store to call_data precedes setting of IPI_CALL_FUNC*/
|
||||
|
||||
/* Send a message to other CPUs */
|
||||
if (cpus_equal(mask, allbutself))
|
||||
send_IPI_allbutself(IPI_CALL_FUNC);
|
||||
else
|
||||
send_IPI_mask(mask, IPI_CALL_FUNC);
|
||||
|
||||
/* Wait for response */
|
||||
while (atomic_read(&data.started) != cpus)
|
||||
cpu_relax();
|
||||
|
||||
if (wait)
|
||||
while (atomic_read(&data.finished) != cpus)
|
||||
cpu_relax();
|
||||
call_data = NULL;
|
||||
|
||||
spin_unlock(&call_lock);
|
||||
return 0;
|
||||
|
||||
send_IPI_mask(mask, IPI_CALL_FUNC);
|
||||
}
|
||||
EXPORT_SYMBOL(smp_call_function_mask);
|
||||
|
||||
/*
|
||||
* this function sends a 'generic call function' IPI to all other CPUs
|
||||
* in the system.
|
||||
*/
|
||||
|
||||
/*
|
||||
* [SUMMARY] Run a function on all other CPUs.
|
||||
* <func> The function to run. This must be fast and non-blocking.
|
||||
* <info> An arbitrary pointer to pass to the function.
|
||||
* <nonatomic> currently unused.
|
||||
* <wait> If true, wait (atomically) until function has completed on other CPUs.
|
||||
* [RETURNS] 0 on success, else a negative status code.
|
||||
*
|
||||
* Does not return until remote CPUs are nearly ready to execute <func> or are or have
|
||||
* executed.
|
||||
*
|
||||
* You must not call this function with disabled interrupts or from a
|
||||
* hardware interrupt handler or from a bottom half handler.
|
||||
*/
|
||||
int
|
||||
smp_call_function (void (*func) (void *info), void *info, int nonatomic, int wait)
|
||||
{
|
||||
struct call_data_struct data;
|
||||
int cpus;
|
||||
|
||||
spin_lock(&call_lock);
|
||||
cpus = num_online_cpus() - 1;
|
||||
if (!cpus) {
|
||||
spin_unlock(&call_lock);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Can deadlock when called with interrupts disabled */
|
||||
WARN_ON(irqs_disabled());
|
||||
|
||||
data.func = func;
|
||||
data.info = info;
|
||||
atomic_set(&data.started, 0);
|
||||
data.wait = wait;
|
||||
if (wait)
|
||||
atomic_set(&data.finished, 0);
|
||||
|
||||
call_data = &data;
|
||||
mb(); /* ensure store to call_data precedes setting of IPI_CALL_FUNC */
|
||||
send_IPI_allbutself(IPI_CALL_FUNC);
|
||||
|
||||
/* Wait for response */
|
||||
while (atomic_read(&data.started) != cpus)
|
||||
cpu_relax();
|
||||
|
||||
if (wait)
|
||||
while (atomic_read(&data.finished) != cpus)
|
||||
cpu_relax();
|
||||
call_data = NULL;
|
||||
|
||||
spin_unlock(&call_lock);
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL(smp_call_function);
|
||||
|
||||
/*
|
||||
* this function calls the 'stop' function on all other CPUs in the system.
|
||||
|
@ -317,7 +317,7 @@ ia64_sync_itc (unsigned int master)
|
||||
|
||||
go[MASTER] = 1;
|
||||
|
||||
if (smp_call_function_single(master, sync_master, NULL, 1, 0) < 0) {
|
||||
if (smp_call_function_single(master, sync_master, NULL, 0) < 0) {
|
||||
printk(KERN_ERR "sync_itc: failed to get attention of CPU %u!\n", master);
|
||||
return;
|
||||
}
|
||||
@ -395,14 +395,14 @@ smp_callin (void)
|
||||
|
||||
fix_b0_for_bsp();
|
||||
|
||||
lock_ipi_calllock();
|
||||
ipi_call_lock_irq();
|
||||
spin_lock(&vector_lock);
|
||||
/* Setup the per cpu irq handling data structures */
|
||||
__setup_vector_irq(cpuid);
|
||||
cpu_set(cpuid, cpu_online_map);
|
||||
per_cpu(cpu_state, cpuid) = CPU_ONLINE;
|
||||
spin_unlock(&vector_lock);
|
||||
unlock_ipi_calllock();
|
||||
ipi_call_unlock_irq();
|
||||
|
||||
smp_setup_percpu_timer();
|
||||
|
||||
|
@ -123,8 +123,7 @@ static int uncached_add_chunk(struct uncached_pool *uc_pool, int nid)
|
||||
status = ia64_pal_prefetch_visibility(PAL_VISIBILITY_PHYSICAL);
|
||||
if (status == PAL_VISIBILITY_OK_REMOTE_NEEDED) {
|
||||
atomic_set(&uc_pool->status, 0);
|
||||
status = smp_call_function(uncached_ipi_visibility, uc_pool,
|
||||
0, 1);
|
||||
status = smp_call_function(uncached_ipi_visibility, uc_pool, 1);
|
||||
if (status || atomic_read(&uc_pool->status))
|
||||
goto failed;
|
||||
} else if (status != PAL_VISIBILITY_OK)
|
||||
@ -146,7 +145,7 @@ static int uncached_add_chunk(struct uncached_pool *uc_pool, int nid)
|
||||
if (status != PAL_STATUS_SUCCESS)
|
||||
goto failed;
|
||||
atomic_set(&uc_pool->status, 0);
|
||||
status = smp_call_function(uncached_ipi_mc_drain, uc_pool, 0, 1);
|
||||
status = smp_call_function(uncached_ipi_mc_drain, uc_pool, 1);
|
||||
if (status || atomic_read(&uc_pool->status))
|
||||
goto failed;
|
||||
|
||||
|
@ -11,6 +11,7 @@
|
||||
#include <linux/irq.h>
|
||||
#include <linux/spinlock.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/rculist.h>
|
||||
#include <asm/sn/addrs.h>
|
||||
#include <asm/sn/arch.h>
|
||||
#include <asm/sn/intr.h>
|
||||
|
@ -629,7 +629,7 @@ static int sn_hwperf_op_cpu(struct sn_hwperf_op_info *op_info)
|
||||
if (use_ipi) {
|
||||
/* use an interprocessor interrupt to call SAL */
|
||||
smp_call_function_single(cpu, sn_hwperf_call_sal,
|
||||
op_info, 1, 1);
|
||||
op_info, 1);
|
||||
}
|
||||
else {
|
||||
/* migrate the task before calling SAL */
|
||||
|
@ -296,6 +296,7 @@ config PREEMPT
|
||||
|
||||
config SMP
|
||||
bool "Symmetric multi-processing support"
|
||||
select USE_GENERIC_SMP_HELPERS
|
||||
---help---
|
||||
This enables support for systems with more than one CPU. If you have
|
||||
a system with only one CPU, like most personal computers, say N. If
|
||||
|
@ -43,9 +43,6 @@ EXPORT_SYMBOL(dcache_dummy);
|
||||
#endif
|
||||
EXPORT_SYMBOL(cpu_data);
|
||||
|
||||
/* Global SMP stuff */
|
||||
EXPORT_SYMBOL(smp_call_function);
|
||||
|
||||
/* TLB flushing */
|
||||
EXPORT_SYMBOL(smp_flush_tlb_page);
|
||||
#endif
|
||||
|
@ -34,22 +34,6 @@
|
||||
/* Data structures and variables */
|
||||
/*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*/
|
||||
|
||||
/*
|
||||
* Structure and data for smp_call_function(). This is designed to minimise
|
||||
* static memory requirements. It also looks cleaner.
|
||||
*/
|
||||
static DEFINE_SPINLOCK(call_lock);
|
||||
|
||||
struct call_data_struct {
|
||||
void (*func) (void *info);
|
||||
void *info;
|
||||
atomic_t started;
|
||||
atomic_t finished;
|
||||
int wait;
|
||||
} __attribute__ ((__aligned__(SMP_CACHE_BYTES)));
|
||||
|
||||
static struct call_data_struct *call_data;
|
||||
|
||||
/*
|
||||
* For flush_cache_all()
|
||||
*/
|
||||
@ -96,9 +80,6 @@ void smp_invalidate_interrupt(void);
|
||||
void smp_send_stop(void);
|
||||
static void stop_this_cpu(void *);
|
||||
|
||||
int smp_call_function(void (*) (void *), void *, int, int);
|
||||
void smp_call_function_interrupt(void);
|
||||
|
||||
void smp_send_timer(void);
|
||||
void smp_ipi_timer_interrupt(struct pt_regs *);
|
||||
void smp_local_timer_interrupt(void);
|
||||
@ -231,7 +212,7 @@ void smp_flush_tlb_all(void)
|
||||
local_irq_save(flags);
|
||||
__flush_tlb_all();
|
||||
local_irq_restore(flags);
|
||||
smp_call_function(flush_tlb_all_ipi, NULL, 1, 1);
|
||||
smp_call_function(flush_tlb_all_ipi, NULL, 1);
|
||||
preempt_enable();
|
||||
}
|
||||
|
||||
@ -524,7 +505,7 @@ void smp_invalidate_interrupt(void)
|
||||
*==========================================================================*/
|
||||
void smp_send_stop(void)
|
||||
{
|
||||
smp_call_function(stop_this_cpu, NULL, 1, 0);
|
||||
smp_call_function(stop_this_cpu, NULL, 0);
|
||||
}
|
||||
|
||||
/*==========================================================================*
|
||||
@ -565,86 +546,14 @@ static void stop_this_cpu(void *dummy)
|
||||
for ( ; ; );
|
||||
}
|
||||
|
||||
/*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*/
|
||||
/* Call function Routines */
|
||||
/*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*/
|
||||
|
||||
/*==========================================================================*
|
||||
* Name: smp_call_function
|
||||
*
|
||||
* Description: This routine sends a 'CALL_FUNCTION_IPI' to all other CPUs
|
||||
* in the system.
|
||||
*
|
||||
* Born on Date: 2002.02.05
|
||||
*
|
||||
* Arguments: *func - The function to run. This must be fast and
|
||||
* non-blocking.
|
||||
* *info - An arbitrary pointer to pass to the function.
|
||||
* nonatomic - currently unused.
|
||||
* wait - If true, wait (atomically) until function has
|
||||
* completed on other CPUs.
|
||||
*
|
||||
* Returns: 0 on success, else a negative status code. Does not return
|
||||
* until remote CPUs are nearly ready to execute <<func>> or
|
||||
* are or have executed.
|
||||
*
|
||||
* Cautions: You must not call this function with disabled interrupts or
|
||||
* from a hardware interrupt handler, you may call it from a
|
||||
* bottom half handler.
|
||||
*
|
||||
* Modification log:
|
||||
* Date Who Description
|
||||
* ---------- --- --------------------------------------------------------
|
||||
*
|
||||
*==========================================================================*/
|
||||
int smp_call_function(void (*func) (void *info), void *info, int nonatomic,
|
||||
int wait)
|
||||
void arch_send_call_function_ipi(cpumask_t mask)
|
||||
{
|
||||
struct call_data_struct data;
|
||||
int cpus;
|
||||
send_IPI_mask(mask, CALL_FUNCTION_IPI, 0);
|
||||
}
|
||||
|
||||
#ifdef DEBUG_SMP
|
||||
unsigned long flags;
|
||||
__save_flags(flags);
|
||||
if (!(flags & 0x0040)) /* Interrupt Disable NONONO */
|
||||
BUG();
|
||||
#endif /* DEBUG_SMP */
|
||||
|
||||
/* Holding any lock stops cpus from going down. */
|
||||
spin_lock(&call_lock);
|
||||
cpus = num_online_cpus() - 1;
|
||||
|
||||
if (!cpus) {
|
||||
spin_unlock(&call_lock);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Can deadlock when called with interrupts disabled */
|
||||
WARN_ON(irqs_disabled());
|
||||
|
||||
data.func = func;
|
||||
data.info = info;
|
||||
atomic_set(&data.started, 0);
|
||||
data.wait = wait;
|
||||
if (wait)
|
||||
atomic_set(&data.finished, 0);
|
||||
|
||||
call_data = &data;
|
||||
mb();
|
||||
|
||||
/* Send a message to all other CPUs and wait for them to respond */
|
||||
send_IPI_allbutself(CALL_FUNCTION_IPI, 0);
|
||||
|
||||
/* Wait for response */
|
||||
while (atomic_read(&data.started) != cpus)
|
||||
barrier();
|
||||
|
||||
if (wait)
|
||||
while (atomic_read(&data.finished) != cpus)
|
||||
barrier();
|
||||
spin_unlock(&call_lock);
|
||||
|
||||
return 0;
|
||||
void arch_send_call_function_single_ipi(int cpu)
|
||||
{
|
||||
send_IPI_mask(cpumask_of_cpu(cpu), CALL_FUNC_SINGLE_IPI, 0);
|
||||
}
|
||||
|
||||
/*==========================================================================*
|
||||
@ -666,27 +575,16 @@ int smp_call_function(void (*func) (void *info), void *info, int nonatomic,
|
||||
*==========================================================================*/
|
||||
void smp_call_function_interrupt(void)
|
||||
{
|
||||
void (*func) (void *info) = call_data->func;
|
||||
void *info = call_data->info;
|
||||
int wait = call_data->wait;
|
||||
|
||||
/*
|
||||
* Notify initiating CPU that I've grabbed the data and am
|
||||
* about to execute the function
|
||||
*/
|
||||
mb();
|
||||
atomic_inc(&call_data->started);
|
||||
/*
|
||||
* At this point the info structure may be out of scope unless wait==1
|
||||
*/
|
||||
irq_enter();
|
||||
(*func)(info);
|
||||
generic_smp_call_function_interrupt();
|
||||
irq_exit();
|
||||
}
|
||||
|
||||
if (wait) {
|
||||
mb();
|
||||
atomic_inc(&call_data->finished);
|
||||
}
|
||||
void smp_call_function_single_interrupt(void)
|
||||
{
|
||||
irq_enter();
|
||||
generic_smp_call_function_single_interrupt();
|
||||
irq_exit();
|
||||
}
|
||||
|
||||
/*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*/
|
||||
|
@ -40,6 +40,7 @@ extern void smp_invalidate_interrupt(void);
|
||||
extern void smp_call_function_interrupt(void);
|
||||
extern void smp_ipi_timer_interrupt(void);
|
||||
extern void smp_flush_cache_all_interrupt(void);
|
||||
extern void smp_call_function_single_interrupt(void);
|
||||
|
||||
/*
|
||||
* for Boot AP function
|
||||
@ -103,7 +104,7 @@ void set_eit_vector_entries(void)
|
||||
eit_vector[186] = (unsigned long)smp_call_function_interrupt;
|
||||
eit_vector[187] = (unsigned long)smp_ipi_timer_interrupt;
|
||||
eit_vector[188] = (unsigned long)smp_flush_cache_all_interrupt;
|
||||
eit_vector[189] = 0;
|
||||
eit_vector[189] = (unsigned long)smp_call_function_single_interrupt;
|
||||
eit_vector[190] = 0;
|
||||
eit_vector[191] = 0;
|
||||
#endif
|
||||
|
@ -181,38 +181,6 @@ config LEMOTE_FULONG
|
||||
Lemote Fulong mini-PC board based on the Chinese Loongson-2E CPU and
|
||||
an FPGA northbridge
|
||||
|
||||
config MIPS_ATLAS
|
||||
bool "MIPS Atlas board"
|
||||
select BOOT_ELF32
|
||||
select BOOT_RAW
|
||||
select CEVT_R4K
|
||||
select CSRC_R4K
|
||||
select DMA_NONCOHERENT
|
||||
select SYS_HAS_EARLY_PRINTK
|
||||
select IRQ_CPU
|
||||
select HW_HAS_PCI
|
||||
select MIPS_BOARDS_GEN
|
||||
select MIPS_BONITO64
|
||||
select PCI_GT64XXX_PCI0
|
||||
select MIPS_MSC
|
||||
select RM7000_CPU_SCACHE
|
||||
select SWAP_IO_SPACE
|
||||
select SYS_HAS_CPU_MIPS32_R1
|
||||
select SYS_HAS_CPU_MIPS32_R2
|
||||
select SYS_HAS_CPU_MIPS64_R1
|
||||
select SYS_HAS_CPU_NEVADA
|
||||
select SYS_HAS_CPU_RM7000
|
||||
select SYS_SUPPORTS_32BIT_KERNEL
|
||||
select SYS_SUPPORTS_64BIT_KERNEL
|
||||
select SYS_SUPPORTS_BIG_ENDIAN
|
||||
select SYS_SUPPORTS_LITTLE_ENDIAN
|
||||
select SYS_SUPPORTS_MULTITHREADING if EXPERIMENTAL
|
||||
select SYS_SUPPORTS_SMARTMIPS
|
||||
select GENERIC_HARDIRQS_NO__DO_IRQ
|
||||
help
|
||||
This enables support for the MIPS Technologies Atlas evaluation
|
||||
board.
|
||||
|
||||
config MIPS_MALTA
|
||||
bool "MIPS Malta board"
|
||||
select ARCH_MAY_HAVE_PC_FDC
|
||||
@ -249,26 +217,6 @@ config MIPS_MALTA
|
||||
This enables support for the MIPS Technologies Malta evaluation
|
||||
board.
|
||||
|
||||
config MIPS_SEAD
|
||||
bool "MIPS SEAD board"
|
||||
select CEVT_R4K
|
||||
select CSRC_R4K
|
||||
select IRQ_CPU
|
||||
select DMA_NONCOHERENT
|
||||
select SYS_HAS_EARLY_PRINTK
|
||||
select MIPS_BOARDS_GEN
|
||||
select SYS_HAS_CPU_MIPS32_R1
|
||||
select SYS_HAS_CPU_MIPS32_R2
|
||||
select SYS_HAS_CPU_MIPS64_R1
|
||||
select SYS_SUPPORTS_32BIT_KERNEL
|
||||
select SYS_SUPPORTS_64BIT_KERNEL if EXPERIMENTAL
|
||||
select SYS_SUPPORTS_BIG_ENDIAN
|
||||
select SYS_SUPPORTS_LITTLE_ENDIAN
|
||||
select SYS_SUPPORTS_SMARTMIPS
|
||||
help
|
||||
This enables support for the MIPS Technologies SEAD evaluation
|
||||
board.
|
||||
|
||||
config MIPS_SIM
|
||||
bool 'MIPS simulator (MIPSsim)'
|
||||
select CEVT_R4K
|
||||
@ -437,6 +385,8 @@ config SGI_IP28
|
||||
select SGI_HAS_DS1286
|
||||
select SGI_HAS_I8042
|
||||
select SGI_HAS_INDYDOG
|
||||
select SGI_HAS_HAL2
|
||||
select SGI_HAS_HAL2
|
||||
select SGI_HAS_SEEQ
|
||||
select SGI_HAS_WD93
|
||||
select SGI_HAS_ZILOG
|
||||
@ -602,65 +552,11 @@ config SNI_RM
|
||||
Technology and now in turn merged with Fujitsu. Say Y here to
|
||||
support this machine type.
|
||||
|
||||
config TOSHIBA_JMR3927
|
||||
bool "Toshiba JMR-TX3927 board"
|
||||
select CEVT_TXX9
|
||||
select DMA_NONCOHERENT
|
||||
select HW_HAS_PCI
|
||||
select MIPS_TX3927
|
||||
select IRQ_TXX9
|
||||
select SWAP_IO_SPACE
|
||||
select SYS_HAS_CPU_TX39XX
|
||||
select SYS_SUPPORTS_32BIT_KERNEL
|
||||
select SYS_SUPPORTS_LITTLE_ENDIAN
|
||||
select SYS_SUPPORTS_BIG_ENDIAN
|
||||
select GENERIC_HARDIRQS_NO__DO_IRQ
|
||||
select GPIO_TXX9
|
||||
config MACH_TX39XX
|
||||
bool "Toshiba TX39 series based machines"
|
||||
|
||||
config TOSHIBA_RBTX4927
|
||||
bool "Toshiba RBTX49[23]7 board"
|
||||
select CEVT_R4K
|
||||
select CSRC_R4K
|
||||
select CEVT_TXX9
|
||||
select DMA_NONCOHERENT
|
||||
select HAS_TXX9_SERIAL
|
||||
select HW_HAS_PCI
|
||||
select IRQ_CPU
|
||||
select IRQ_TXX9
|
||||
select I8259 if TOSHIBA_FPCIB0
|
||||
select SWAP_IO_SPACE
|
||||
select SYS_HAS_CPU_TX49XX
|
||||
select SYS_SUPPORTS_32BIT_KERNEL
|
||||
select SYS_SUPPORTS_64BIT_KERNEL
|
||||
select SYS_SUPPORTS_LITTLE_ENDIAN
|
||||
select SYS_SUPPORTS_BIG_ENDIAN
|
||||
select SYS_SUPPORTS_KGDB
|
||||
select GENERIC_HARDIRQS_NO__DO_IRQ
|
||||
help
|
||||
This Toshiba board is based on the TX4927 processor. Say Y here to
|
||||
support this machine type
|
||||
|
||||
config TOSHIBA_RBTX4938
|
||||
bool "Toshiba RBTX4938 board"
|
||||
select CEVT_R4K
|
||||
select CSRC_R4K
|
||||
select CEVT_TXX9
|
||||
select DMA_NONCOHERENT
|
||||
select HAS_TXX9_SERIAL
|
||||
select HW_HAS_PCI
|
||||
select IRQ_CPU
|
||||
select IRQ_TXX9
|
||||
select SWAP_IO_SPACE
|
||||
select SYS_HAS_CPU_TX49XX
|
||||
select SYS_SUPPORTS_32BIT_KERNEL
|
||||
select SYS_SUPPORTS_LITTLE_ENDIAN
|
||||
select SYS_SUPPORTS_BIG_ENDIAN
|
||||
select SYS_SUPPORTS_KGDB
|
||||
select GENERIC_HARDIRQS_NO__DO_IRQ
|
||||
select GPIO_TXX9
|
||||
help
|
||||
This Toshiba board is based on the TX4938 processor. Say Y here to
|
||||
support this machine type
|
||||
config MACH_TX49XX
|
||||
bool "Toshiba TX49 series based machines"
|
||||
|
||||
config WR_PPMC
|
||||
bool "Wind River PPMC board"
|
||||
@ -694,8 +590,7 @@ source "arch/mips/lasat/Kconfig"
|
||||
source "arch/mips/pmc-sierra/Kconfig"
|
||||
source "arch/mips/sgi-ip27/Kconfig"
|
||||
source "arch/mips/sibyte/Kconfig"
|
||||
source "arch/mips/tx4927/Kconfig"
|
||||
source "arch/mips/tx4938/Kconfig"
|
||||
source "arch/mips/txx9/Kconfig"
|
||||
source "arch/mips/vr41xx/Kconfig"
|
||||
|
||||
endmenu
|
||||
@ -939,10 +834,6 @@ config PCI_GT64XXX_PCI0
|
||||
config NO_EXCEPT_FILL
|
||||
bool
|
||||
|
||||
config MIPS_TX3927
|
||||
bool
|
||||
select HAS_TXX9_SERIAL
|
||||
|
||||
config MIPS_RM9122
|
||||
bool
|
||||
select SERIAL_RM9000
|
||||
@ -979,6 +870,9 @@ config SGI_HAS_DS1286
|
||||
config SGI_HAS_INDYDOG
|
||||
bool
|
||||
|
||||
config SGI_HAS_HAL2
|
||||
bool
|
||||
|
||||
config SGI_HAS_SEEQ
|
||||
bool
|
||||
|
||||
@ -1763,6 +1657,7 @@ config SMP
|
||||
bool "Multi-Processing support"
|
||||
depends on SYS_SUPPORTS_SMP
|
||||
select IRQ_PER_CPU
|
||||
select USE_GENERIC_SMP_HELPERS
|
||||
help
|
||||
This enables support for systems with more than one CPU. If you have
|
||||
a system with only one CPU, like most personal computers, say N. If
|
||||
@ -2064,10 +1959,6 @@ source "fs/Kconfig.binfmt"
|
||||
config TRAD_SIGNALS
|
||||
bool
|
||||
|
||||
config BINFMT_IRIX
|
||||
bool "Include IRIX binary compatibility"
|
||||
depends on CPU_BIG_ENDIAN && 32BIT && BROKEN
|
||||
|
||||
config MIPS32_COMPAT
|
||||
bool "Kernel support for Linux/MIPS 32-bit binary compatibility"
|
||||
depends on 64BIT
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
KBUILD_DEFCONFIG := ip22_defconfig
|
||||
|
||||
cflags-y :=
|
||||
cflags-y := -ffunction-sections
|
||||
|
||||
#
|
||||
# Select the object file format to substitute into the linker script.
|
||||
@ -304,36 +304,14 @@ core-$(CONFIG_LEMOTE_FULONG) +=arch/mips/lemote/lm2e/
|
||||
load-$(CONFIG_LEMOTE_FULONG) +=0xffffffff80100000
|
||||
cflags-$(CONFIG_LEMOTE_FULONG) += -Iinclude/asm-mips/mach-lemote
|
||||
|
||||
#
|
||||
# For all MIPS, Inc. eval boards
|
||||
#
|
||||
core-$(CONFIG_MIPS_BOARDS_GEN) += arch/mips/mips-boards/generic/
|
||||
|
||||
#
|
||||
# MIPS Atlas board
|
||||
#
|
||||
core-$(CONFIG_MIPS_ATLAS) += arch/mips/mips-boards/atlas/
|
||||
cflags-$(CONFIG_MIPS_ATLAS) += -Iinclude/asm-mips/mach-atlas
|
||||
cflags-$(CONFIG_MIPS_ATLAS) += -Iinclude/asm-mips/mach-mips
|
||||
load-$(CONFIG_MIPS_ATLAS) += 0xffffffff80100000
|
||||
all-$(CONFIG_MIPS_ATLAS) := vmlinux.bin
|
||||
|
||||
#
|
||||
# MIPS Malta board
|
||||
#
|
||||
core-$(CONFIG_MIPS_MALTA) += arch/mips/mips-boards/malta/
|
||||
cflags-$(CONFIG_MIPS_MALTA) += -Iinclude/asm-mips/mach-mips
|
||||
core-$(CONFIG_MIPS_MALTA) += arch/mips/mti-malta/
|
||||
cflags-$(CONFIG_MIPS_MALTA) += -Iinclude/asm-mips/mach-malta
|
||||
load-$(CONFIG_MIPS_MALTA) += 0xffffffff80100000
|
||||
all-$(CONFIG_MIPS_MALTA) := vmlinux.bin
|
||||
|
||||
#
|
||||
# MIPS SEAD board
|
||||
#
|
||||
core-$(CONFIG_MIPS_SEAD) += arch/mips/mips-boards/sead/
|
||||
cflags-$(CONFIG_MIPS_SEAD) += -Iinclude/asm-mips/mach-mips
|
||||
load-$(CONFIG_MIPS_SEAD) += 0xffffffff80100000
|
||||
all-$(CONFIG_MIPS_SEAD) := vmlinux.srec
|
||||
|
||||
#
|
||||
# MIPS SIM
|
||||
#
|
||||
@ -376,12 +354,6 @@ load-$(CONFIG_LASAT) += 0xffffffff80000000
|
||||
core-$(CONFIG_MACH_VR41XX) += arch/mips/vr41xx/common/
|
||||
cflags-$(CONFIG_MACH_VR41XX) += -Iinclude/asm-mips/mach-vr41xx
|
||||
|
||||
#
|
||||
# NEC VR4133
|
||||
#
|
||||
core-$(CONFIG_NEC_CMBVR4133) += arch/mips/vr41xx/nec-cmbvr4133/
|
||||
load-$(CONFIG_NEC_CMBVR4133) += 0xffffffff80100000
|
||||
|
||||
#
|
||||
# ZAO Networks Capcella (VR4131)
|
||||
#
|
||||
@ -572,30 +544,31 @@ load-$(CONFIG_SNI_RM) += 0xffffffff80030000
|
||||
endif
|
||||
all-$(CONFIG_SNI_RM) := vmlinux.ecoff
|
||||
|
||||
#
|
||||
# Common TXx9
|
||||
#
|
||||
core-$(CONFIG_MACH_TX39XX) += arch/mips/txx9/generic/
|
||||
cflags-$(CONFIG_MACH_TX39XX) += -Iinclude/asm-mips/mach-tx39xx
|
||||
load-$(CONFIG_MACH_TX39XX) += 0xffffffff80050000
|
||||
core-$(CONFIG_MACH_TX49XX) += arch/mips/txx9/generic/
|
||||
cflags-$(CONFIG_MACH_TX49XX) += -Iinclude/asm-mips/mach-tx49xx
|
||||
load-$(CONFIG_MACH_TX49XX) += 0xffffffff80100000
|
||||
|
||||
#
|
||||
# Toshiba JMR-TX3927 board
|
||||
#
|
||||
core-$(CONFIG_TOSHIBA_JMR3927) += arch/mips/jmr3927/rbhma3100/ \
|
||||
arch/mips/jmr3927/common/
|
||||
cflags-$(CONFIG_TOSHIBA_JMR3927) += -Iinclude/asm-mips/mach-jmr3927
|
||||
load-$(CONFIG_TOSHIBA_JMR3927) += 0xffffffff80050000
|
||||
core-$(CONFIG_TOSHIBA_JMR3927) += arch/mips/txx9/jmr3927/
|
||||
|
||||
#
|
||||
# Toshiba RBTX4927 board or
|
||||
# Toshiba RBTX4937 board
|
||||
#
|
||||
core-$(CONFIG_TOSHIBA_RBTX4927) += arch/mips/tx4927/toshiba_rbtx4927/
|
||||
core-$(CONFIG_TOSHIBA_RBTX4927) += arch/mips/tx4927/common/
|
||||
cflags-$(CONFIG_TOSHIBA_RBTX4927) += -Iinclude/asm-mips/mach-tx49xx
|
||||
load-$(CONFIG_TOSHIBA_RBTX4927) += 0xffffffff80020000
|
||||
core-$(CONFIG_TOSHIBA_RBTX4927) += arch/mips/txx9/rbtx4927/
|
||||
|
||||
#
|
||||
# Toshiba RBTX4938 board
|
||||
#
|
||||
core-$(CONFIG_TOSHIBA_RBTX4938) += arch/mips/tx4938/toshiba_rbtx4938/
|
||||
core-$(CONFIG_TOSHIBA_RBTX4938) += arch/mips/tx4938/common/
|
||||
cflags-$(CONFIG_TOSHIBA_RBTX4938) += -Iinclude/asm-mips/mach-tx49xx
|
||||
load-$(CONFIG_TOSHIBA_RBTX4938) += 0xffffffff80100000
|
||||
core-$(CONFIG_TOSHIBA_RBTX4938) += arch/mips/txx9/rbtx4938/
|
||||
|
||||
cflags-y += -Iinclude/asm-mips/mach-generic
|
||||
drivers-$(CONFIG_PCI) += arch/mips/pci/
|
||||
|
@ -11,6 +11,7 @@
|
||||
* warranty of any kind, whether express or implied.
|
||||
*/
|
||||
|
||||
#include <linux/dma-mapping.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/serial_8250.h>
|
||||
#include <linux/init.h>
|
||||
@ -77,14 +78,14 @@ static struct resource au1xxx_usb_ohci_resources[] = {
|
||||
};
|
||||
|
||||
/* The dmamask must be set for OHCI to work */
|
||||
static u64 ohci_dmamask = ~(u32)0;
|
||||
static u64 ohci_dmamask = DMA_32BIT_MASK;
|
||||
|
||||
static struct platform_device au1xxx_usb_ohci_device = {
|
||||
.name = "au1xxx-ohci",
|
||||
.id = 0,
|
||||
.dev = {
|
||||
.dma_mask = &ohci_dmamask,
|
||||
.coherent_dma_mask = 0xffffffff,
|
||||
.coherent_dma_mask = DMA_32BIT_MASK,
|
||||
},
|
||||
.num_resources = ARRAY_SIZE(au1xxx_usb_ohci_resources),
|
||||
.resource = au1xxx_usb_ohci_resources,
|
||||
@ -106,14 +107,14 @@ static struct resource au1100_lcd_resources[] = {
|
||||
}
|
||||
};
|
||||
|
||||
static u64 au1100_lcd_dmamask = ~(u32)0;
|
||||
static u64 au1100_lcd_dmamask = DMA_32BIT_MASK;
|
||||
|
||||
static struct platform_device au1100_lcd_device = {
|
||||
.name = "au1100-lcd",
|
||||
.id = 0,
|
||||
.dev = {
|
||||
.dma_mask = &au1100_lcd_dmamask,
|
||||
.coherent_dma_mask = 0xffffffff,
|
||||
.coherent_dma_mask = DMA_32BIT_MASK,
|
||||
},
|
||||
.num_resources = ARRAY_SIZE(au1100_lcd_resources),
|
||||
.resource = au1100_lcd_resources,
|
||||
@ -135,14 +136,14 @@ static struct resource au1xxx_usb_ehci_resources[] = {
|
||||
},
|
||||
};
|
||||
|
||||
static u64 ehci_dmamask = ~(u32)0;
|
||||
static u64 ehci_dmamask = DMA_32BIT_MASK;
|
||||
|
||||
static struct platform_device au1xxx_usb_ehci_device = {
|
||||
.name = "au1xxx-ehci",
|
||||
.id = 0,
|
||||
.dev = {
|
||||
.dma_mask = &ehci_dmamask,
|
||||
.coherent_dma_mask = 0xffffffff,
|
||||
.coherent_dma_mask = DMA_32BIT_MASK,
|
||||
},
|
||||
.num_resources = ARRAY_SIZE(au1xxx_usb_ehci_resources),
|
||||
.resource = au1xxx_usb_ehci_resources,
|
||||
@ -180,14 +181,14 @@ static struct resource au1xxx_mmc_resources[] = {
|
||||
}
|
||||
};
|
||||
|
||||
static u64 udc_dmamask = ~(u32)0;
|
||||
static u64 udc_dmamask = DMA_32BIT_MASK;
|
||||
|
||||
static struct platform_device au1xxx_usb_gdt_device = {
|
||||
.name = "au1xxx-udc",
|
||||
.id = 0,
|
||||
.dev = {
|
||||
.dma_mask = &udc_dmamask,
|
||||
.coherent_dma_mask = 0xffffffff,
|
||||
.coherent_dma_mask = DMA_32BIT_MASK,
|
||||
},
|
||||
.num_resources = ARRAY_SIZE(au1xxx_usb_gdt_resources),
|
||||
.resource = au1xxx_usb_gdt_resources,
|
||||
@ -207,14 +208,14 @@ static struct resource au1xxx_usb_otg_resources[] = {
|
||||
},
|
||||
};
|
||||
|
||||
static u64 uoc_dmamask = ~(u32)0;
|
||||
static u64 uoc_dmamask = DMA_32BIT_MASK;
|
||||
|
||||
static struct platform_device au1xxx_usb_otg_device = {
|
||||
.name = "au1xxx-uoc",
|
||||
.id = 0,
|
||||
.dev = {
|
||||
.dma_mask = &uoc_dmamask,
|
||||
.coherent_dma_mask = 0xffffffff,
|
||||
.coherent_dma_mask = DMA_32BIT_MASK,
|
||||
},
|
||||
.num_resources = ARRAY_SIZE(au1xxx_usb_otg_resources),
|
||||
.resource = au1xxx_usb_otg_resources,
|
||||
@ -233,27 +234,27 @@ static struct resource au1200_lcd_resources[] = {
|
||||
}
|
||||
};
|
||||
|
||||
static u64 au1200_lcd_dmamask = ~(u32)0;
|
||||
static u64 au1200_lcd_dmamask = DMA_32BIT_MASK;
|
||||
|
||||
static struct platform_device au1200_lcd_device = {
|
||||
.name = "au1200-lcd",
|
||||
.id = 0,
|
||||
.dev = {
|
||||
.dma_mask = &au1200_lcd_dmamask,
|
||||
.coherent_dma_mask = 0xffffffff,
|
||||
.coherent_dma_mask = DMA_32BIT_MASK,
|
||||
},
|
||||
.num_resources = ARRAY_SIZE(au1200_lcd_resources),
|
||||
.resource = au1200_lcd_resources,
|
||||
};
|
||||
|
||||
static u64 au1xxx_mmc_dmamask = ~(u32)0;
|
||||
static u64 au1xxx_mmc_dmamask = DMA_32BIT_MASK;
|
||||
|
||||
static struct platform_device au1xxx_mmc_device = {
|
||||
.name = "au1xxx-mmc",
|
||||
.id = 0,
|
||||
.dev = {
|
||||
.dma_mask = &au1xxx_mmc_dmamask,
|
||||
.coherent_dma_mask = 0xffffffff,
|
||||
.coherent_dma_mask = DMA_32BIT_MASK,
|
||||
},
|
||||
.num_resources = ARRAY_SIZE(au1xxx_mmc_resources),
|
||||
.resource = au1xxx_mmc_resources,
|
||||
|
@ -24,6 +24,9 @@
|
||||
#include <linux/gpio.h>
|
||||
#include <linux/gpio_keys.h>
|
||||
#include <linux/input.h>
|
||||
#include <linux/mtd/partitions.h>
|
||||
#include <linux/mtd/physmap.h>
|
||||
#include <mtd/mtd-abi.h>
|
||||
|
||||
static struct gpio_keys_button mtx1_gpio_button[] = {
|
||||
{
|
||||
@ -85,10 +88,56 @@ static struct platform_device mtx1_gpio_leds = {
|
||||
}
|
||||
};
|
||||
|
||||
static struct mtd_partition mtx1_mtd_partitions[] = {
|
||||
{
|
||||
.name = "filesystem",
|
||||
.size = 0x01C00000,
|
||||
.offset = 0,
|
||||
},
|
||||
{
|
||||
.name = "yamon",
|
||||
.size = 0x00100000,
|
||||
.offset = MTDPART_OFS_APPEND,
|
||||
.mask_flags = MTD_WRITEABLE,
|
||||
},
|
||||
{
|
||||
.name = "kernel",
|
||||
.size = 0x002c0000,
|
||||
.offset = MTDPART_OFS_APPEND,
|
||||
},
|
||||
{
|
||||
.name = "yamon env",
|
||||
.size = 0x00040000,
|
||||
.offset = MTDPART_OFS_APPEND,
|
||||
},
|
||||
};
|
||||
|
||||
static struct physmap_flash_data mtx1_flash_data = {
|
||||
.width = 4,
|
||||
.nr_parts = 4,
|
||||
.parts = mtx1_mtd_partitions,
|
||||
};
|
||||
|
||||
static struct resource mtx1_mtd_resource = {
|
||||
.start = 0x1e000000,
|
||||
.end = 0x1fffffff,
|
||||
.flags = IORESOURCE_MEM,
|
||||
};
|
||||
|
||||
static struct platform_device mtx1_mtd = {
|
||||
.name = "physmap-flash",
|
||||
.dev = {
|
||||
.platform_data = &mtx1_flash_data,
|
||||
},
|
||||
.num_resources = 1,
|
||||
.resource = &mtx1_mtd_resource,
|
||||
};
|
||||
|
||||
static struct __initdata platform_device * mtx1_devs[] = {
|
||||
&mtx1_gpio_leds,
|
||||
&mtx1_wdt,
|
||||
&mtx1_button
|
||||
&mtx1_button,
|
||||
&mtx1_mtd,
|
||||
};
|
||||
|
||||
static int __init mtx1_register_devices(void)
|
||||
|
@ -18,6 +18,7 @@
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#include <linux/dma-mapping.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/platform_device.h>
|
||||
|
||||
@ -36,14 +37,14 @@ static struct resource ide_resources[] = {
|
||||
}
|
||||
};
|
||||
|
||||
static u64 ide_dmamask = ~(u32)0;
|
||||
static u64 ide_dmamask = DMA_32BIT_MASK;
|
||||
|
||||
static struct platform_device ide_device = {
|
||||
.name = "au1200-ide",
|
||||
.id = 0,
|
||||
.dev = {
|
||||
.dma_mask = &ide_dmamask,
|
||||
.coherent_dma_mask = 0xffffffff,
|
||||
.coherent_dma_mask = DMA_32BIT_MASK,
|
||||
},
|
||||
.num_resources = ARRAY_SIZE(ide_resources),
|
||||
.resource = ide_resources
|
||||
|
@ -2,7 +2,7 @@
|
||||
# Makefile for the Cobalt micro systems family specific parts of the kernel
|
||||
#
|
||||
|
||||
obj-y := buttons.o irq.o led.o reset.o rtc.o serial.o setup.o time.o
|
||||
obj-y := buttons.o irq.o lcd.o led.o reset.o rtc.o serial.o setup.o time.o
|
||||
|
||||
obj-$(CONFIG_PCI) += pci.o
|
||||
obj-$(CONFIG_EARLY_PRINTK) += console.o
|
||||
|
55
arch/mips/cobalt/lcd.c
Normal file
55
arch/mips/cobalt/lcd.c
Normal file
@ -0,0 +1,55 @@
|
||||
/*
|
||||
* Registration of Cobalt LCD platform device.
|
||||
*
|
||||
* Copyright (C) 2008 Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
#include <linux/errno.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/ioport.h>
|
||||
#include <linux/platform_device.h>
|
||||
|
||||
static struct resource cobalt_lcd_resource __initdata = {
|
||||
.start = 0x1f000000,
|
||||
.end = 0x1f00001f,
|
||||
.flags = IORESOURCE_MEM,
|
||||
};
|
||||
|
||||
static __init int cobalt_lcd_add(void)
|
||||
{
|
||||
struct platform_device *pdev;
|
||||
int retval;
|
||||
|
||||
pdev = platform_device_alloc("cobalt-lcd", -1);
|
||||
if (!pdev)
|
||||
return -ENOMEM;
|
||||
|
||||
retval = platform_device_add_resources(pdev, &cobalt_lcd_resource, 1);
|
||||
if (retval)
|
||||
goto err_free_device;
|
||||
|
||||
retval = platform_device_add(pdev);
|
||||
if (retval)
|
||||
goto err_free_device;
|
||||
|
||||
return 0;
|
||||
|
||||
err_free_device:
|
||||
platform_device_put(pdev);
|
||||
|
||||
return retval;
|
||||
}
|
||||
device_initcall(cobalt_lcd_add);
|
File diff suppressed because it is too large
Load Diff
@ -16,9 +16,7 @@ CONFIG_BCM47XX=y
|
||||
# CONFIG_MACH_JAZZ is not set
|
||||
# CONFIG_LASAT is not set
|
||||
# CONFIG_LEMOTE_FULONG is not set
|
||||
# CONFIG_MIPS_ATLAS is not set
|
||||
# CONFIG_MIPS_MALTA is not set
|
||||
# CONFIG_MIPS_SEAD is not set
|
||||
# CONFIG_MIPS_SIM is not set
|
||||
# CONFIG_MARKEINS is not set
|
||||
# CONFIG_MACH_VR41XX is not set
|
||||
|
@ -1,7 +1,7 @@
|
||||
#
|
||||
# Automatically generated make config: don't edit
|
||||
# Linux kernel version: 2.6.25-rc7
|
||||
# Mon Mar 31 08:11:19 2008
|
||||
# Linux kernel version: 2.6.26-rc8
|
||||
# Wed Jul 2 17:02:55 2008
|
||||
#
|
||||
CONFIG_MIPS=y
|
||||
|
||||
@ -16,9 +16,7 @@ CONFIG_MIPS=y
|
||||
# CONFIG_MACH_JAZZ is not set
|
||||
# CONFIG_LASAT is not set
|
||||
# CONFIG_LEMOTE_FULONG is not set
|
||||
# CONFIG_MIPS_ATLAS is not set
|
||||
# CONFIG_MIPS_MALTA is not set
|
||||
# CONFIG_MIPS_SEAD is not set
|
||||
# CONFIG_MIPS_SIM is not set
|
||||
# CONFIG_MARKEINS is not set
|
||||
# CONFIG_MACH_VR41XX is not set
|
||||
@ -148,6 +146,7 @@ CONFIG_FLATMEM=y
|
||||
CONFIG_FLAT_NODE_MEM_MAP=y
|
||||
# CONFIG_SPARSEMEM_STATIC is not set
|
||||
# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
|
||||
CONFIG_PAGEFLAGS_EXTENDED=y
|
||||
CONFIG_SPLIT_PTLOCK_CPUS=4
|
||||
CONFIG_RESOURCES_64BIT=y
|
||||
CONFIG_ZONE_DMA_FLAG=0
|
||||
@ -156,6 +155,7 @@ CONFIG_SMP=y
|
||||
CONFIG_SYS_SUPPORTS_SMP=y
|
||||
CONFIG_NR_CPUS_DEFAULT_4=y
|
||||
CONFIG_NR_CPUS=4
|
||||
# CONFIG_MIPS_CMP is not set
|
||||
CONFIG_TICK_ONESHOT=y
|
||||
CONFIG_NO_HZ=y
|
||||
CONFIG_HIGH_RES_TIMERS=y
|
||||
@ -223,6 +223,7 @@ CONFIG_HOTPLUG=y
|
||||
CONFIG_PRINTK=y
|
||||
CONFIG_BUG=y
|
||||
CONFIG_ELF_CORE=y
|
||||
# CONFIG_PCSPKR_PLATFORM is not set
|
||||
CONFIG_COMPAT_BRK=y
|
||||
CONFIG_BASE_FULL=y
|
||||
CONFIG_FUTEX=y
|
||||
@ -241,12 +242,14 @@ CONFIG_SLAB=y
|
||||
CONFIG_HAVE_OPROFILE=y
|
||||
# CONFIG_HAVE_KPROBES is not set
|
||||
# CONFIG_HAVE_KRETPROBES is not set
|
||||
# CONFIG_HAVE_DMA_ATTRS is not set
|
||||
CONFIG_PROC_PAGE_MONITOR=y
|
||||
CONFIG_SLABINFO=y
|
||||
CONFIG_RT_MUTEXES=y
|
||||
# CONFIG_TINY_SHMEM is not set
|
||||
CONFIG_BASE_SMALL=0
|
||||
CONFIG_MODULES=y
|
||||
# CONFIG_MODULE_FORCE_LOAD is not set
|
||||
CONFIG_MODULE_UNLOAD=y
|
||||
# CONFIG_MODULE_FORCE_UNLOAD is not set
|
||||
CONFIG_MODVERSIONS=y
|
||||
@ -302,7 +305,6 @@ CONFIG_BINFMT_ELF32=y
|
||||
# Power management options
|
||||
#
|
||||
CONFIG_PM=y
|
||||
# CONFIG_PM_LEGACY is not set
|
||||
# CONFIG_PM_DEBUG is not set
|
||||
|
||||
#
|
||||
@ -399,9 +401,11 @@ CONFIG_INET6_XFRM_MODE_TUNNEL=m
|
||||
CONFIG_INET6_XFRM_MODE_BEET=m
|
||||
CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION=m
|
||||
CONFIG_IPV6_SIT=m
|
||||
CONFIG_IPV6_NDISC_NODETYPE=y
|
||||
CONFIG_IPV6_TUNNEL=m
|
||||
CONFIG_IPV6_MULTIPLE_TABLES=y
|
||||
CONFIG_IPV6_SUBTREES=y
|
||||
# CONFIG_IPV6_MROUTE is not set
|
||||
CONFIG_NETWORK_SECMARK=y
|
||||
CONFIG_NETFILTER=y
|
||||
# CONFIG_NETFILTER_DEBUG is not set
|
||||
@ -600,7 +604,7 @@ CONFIG_BLK_DEV_IT8213=m
|
||||
CONFIG_BLK_DEV_TC86C001=m
|
||||
# CONFIG_BLK_DEV_IDE_SWARM is not set
|
||||
CONFIG_BLK_DEV_IDEDMA=y
|
||||
CONFIG_IDE_ARCH_OBSOLETE_INIT=y
|
||||
# CONFIG_BLK_DEV_HD_ONLY is not set
|
||||
# CONFIG_BLK_DEV_HD is not set
|
||||
|
||||
#
|
||||
@ -617,11 +621,12 @@ CONFIG_SCSI_PROC_FS=y
|
||||
# SCSI support type (disk, tape, CD-ROM)
|
||||
#
|
||||
CONFIG_BLK_DEV_SD=y
|
||||
# CONFIG_CHR_DEV_ST is not set
|
||||
CONFIG_CHR_DEV_ST=m
|
||||
# CONFIG_CHR_DEV_OSST is not set
|
||||
# CONFIG_BLK_DEV_SR is not set
|
||||
# CONFIG_CHR_DEV_SG is not set
|
||||
# CONFIG_CHR_DEV_SCH is not set
|
||||
CONFIG_BLK_DEV_SR=m
|
||||
CONFIG_BLK_DEV_SR_VENDOR=y
|
||||
CONFIG_CHR_DEV_SG=m
|
||||
CONFIG_CHR_DEV_SCH=m
|
||||
|
||||
#
|
||||
# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
|
||||
@ -650,6 +655,7 @@ CONFIG_SCSI_LOWLEVEL=y
|
||||
# CONFIG_SCSI_AIC7XXX_OLD is not set
|
||||
# CONFIG_SCSI_AIC79XX is not set
|
||||
# CONFIG_SCSI_AIC94XX is not set
|
||||
# CONFIG_SCSI_DPT_I2O is not set
|
||||
# CONFIG_SCSI_ADVANSYS is not set
|
||||
# CONFIG_SCSI_ARCMSR is not set
|
||||
# CONFIG_MEGARAID_NEWGEN is not set
|
||||
@ -675,7 +681,10 @@ CONFIG_SCSI_LOWLEVEL=y
|
||||
# CONFIG_SCSI_SRP is not set
|
||||
CONFIG_ATA=y
|
||||
# CONFIG_ATA_NONSTANDARD is not set
|
||||
CONFIG_SATA_PMP=y
|
||||
# CONFIG_SATA_AHCI is not set
|
||||
CONFIG_SATA_SIL24=y
|
||||
CONFIG_ATA_SFF=y
|
||||
# CONFIG_SATA_SVW is not set
|
||||
# CONFIG_ATA_PIIX is not set
|
||||
# CONFIG_SATA_MV is not set
|
||||
@ -685,7 +694,6 @@ CONFIG_ATA=y
|
||||
# CONFIG_SATA_PROMISE is not set
|
||||
# CONFIG_SATA_SX4 is not set
|
||||
# CONFIG_SATA_SIL is not set
|
||||
CONFIG_SATA_SIL24=y
|
||||
# CONFIG_SATA_SIS is not set
|
||||
# CONFIG_SATA_ULI is not set
|
||||
# CONFIG_SATA_VIA is not set
|
||||
@ -730,12 +738,17 @@ CONFIG_PATA_SIL680=y
|
||||
# CONFIG_PATA_VIA is not set
|
||||
# CONFIG_PATA_WINBOND is not set
|
||||
# CONFIG_PATA_PLATFORM is not set
|
||||
# CONFIG_PATA_SCH is not set
|
||||
# CONFIG_MD is not set
|
||||
# CONFIG_FUSION is not set
|
||||
|
||||
#
|
||||
# IEEE 1394 (FireWire) support
|
||||
#
|
||||
|
||||
#
|
||||
# Enable only one of the two stacks, unless you know what you are doing
|
||||
#
|
||||
# CONFIG_FIREWIRE is not set
|
||||
# CONFIG_IEEE1394 is not set
|
||||
# CONFIG_I2O is not set
|
||||
@ -797,7 +810,6 @@ CONFIG_SB1250_MAC=y
|
||||
# CONFIG_SIS190 is not set
|
||||
# CONFIG_SKGE is not set
|
||||
# CONFIG_SKY2 is not set
|
||||
# CONFIG_SK98LIN is not set
|
||||
# CONFIG_VIA_VELOCITY is not set
|
||||
# CONFIG_TIGON3 is not set
|
||||
# CONFIG_BNX2 is not set
|
||||
@ -815,6 +827,7 @@ CONFIG_NETXEN_NIC=m
|
||||
# CONFIG_MLX4_CORE is not set
|
||||
# CONFIG_TEHUTI is not set
|
||||
# CONFIG_BNX2X is not set
|
||||
# CONFIG_SFC is not set
|
||||
# CONFIG_TR is not set
|
||||
|
||||
#
|
||||
@ -822,6 +835,7 @@ CONFIG_NETXEN_NIC=m
|
||||
#
|
||||
# CONFIG_WLAN_PRE80211 is not set
|
||||
# CONFIG_WLAN_80211 is not set
|
||||
# CONFIG_IWLWIFI_LEDS is not set
|
||||
# CONFIG_WAN is not set
|
||||
# CONFIG_FDDI is not set
|
||||
# CONFIG_HIPPI is not set
|
||||
@ -867,6 +881,7 @@ CONFIG_SERIO_RAW=m
|
||||
# Character devices
|
||||
#
|
||||
# CONFIG_VT is not set
|
||||
CONFIG_DEVKMEM=y
|
||||
CONFIG_SERIAL_NONSTANDARD=y
|
||||
# CONFIG_COMPUTONE is not set
|
||||
# CONFIG_ROCKETPORT is not set
|
||||
@ -903,7 +918,6 @@ CONFIG_LEGACY_PTYS=y
|
||||
CONFIG_LEGACY_PTY_COUNT=256
|
||||
# CONFIG_IPMI_HANDLER is not set
|
||||
# CONFIG_HW_RANDOM is not set
|
||||
# CONFIG_RTC is not set
|
||||
# CONFIG_R3964 is not set
|
||||
# CONFIG_APPLICOM is not set
|
||||
# CONFIG_RAW_DRIVER is not set
|
||||
@ -913,13 +927,6 @@ CONFIG_I2C=y
|
||||
CONFIG_I2C_BOARDINFO=y
|
||||
CONFIG_I2C_CHARDEV=y
|
||||
|
||||
#
|
||||
# I2C Algorithms
|
||||
#
|
||||
# CONFIG_I2C_ALGOBIT is not set
|
||||
# CONFIG_I2C_ALGOPCF is not set
|
||||
# CONFIG_I2C_ALGOPCA is not set
|
||||
|
||||
#
|
||||
# I2C Hardware Bus support
|
||||
#
|
||||
@ -946,6 +953,7 @@ CONFIG_I2C_SIBYTE=y
|
||||
# CONFIG_I2C_VIA is not set
|
||||
# CONFIG_I2C_VIAPRO is not set
|
||||
# CONFIG_I2C_VOODOO3 is not set
|
||||
# CONFIG_I2C_PCA_PLATFORM is not set
|
||||
|
||||
#
|
||||
# Miscellaneous I2C Chip support
|
||||
@ -955,23 +963,18 @@ CONFIG_SENSORS_EEPROM=y
|
||||
CONFIG_SENSORS_PCF8574=y
|
||||
# CONFIG_PCF8575 is not set
|
||||
CONFIG_SENSORS_PCF8591=y
|
||||
# CONFIG_TPS65010 is not set
|
||||
CONFIG_SENSORS_MAX6875=y
|
||||
# CONFIG_SENSORS_TSL2550 is not set
|
||||
CONFIG_I2C_DEBUG_CORE=y
|
||||
CONFIG_I2C_DEBUG_ALGO=y
|
||||
CONFIG_I2C_DEBUG_BUS=y
|
||||
CONFIG_I2C_DEBUG_CHIP=y
|
||||
|
||||
#
|
||||
# SPI support
|
||||
#
|
||||
# CONFIG_SPI is not set
|
||||
# CONFIG_SPI_MASTER is not set
|
||||
# CONFIG_W1 is not set
|
||||
# CONFIG_POWER_SUPPLY is not set
|
||||
# CONFIG_HWMON is not set
|
||||
# CONFIG_THERMAL is not set
|
||||
# CONFIG_THERMAL_HWMON is not set
|
||||
# CONFIG_WATCHDOG is not set
|
||||
|
||||
#
|
||||
@ -984,12 +987,22 @@ CONFIG_SSB_POSSIBLE=y
|
||||
# Multifunction device drivers
|
||||
#
|
||||
# CONFIG_MFD_SM501 is not set
|
||||
# CONFIG_HTC_PASIC3 is not set
|
||||
|
||||
#
|
||||
# Multimedia devices
|
||||
#
|
||||
|
||||
#
|
||||
# Multimedia core support
|
||||
#
|
||||
# CONFIG_VIDEO_DEV is not set
|
||||
# CONFIG_DVB_CORE is not set
|
||||
# CONFIG_VIDEO_MEDIA is not set
|
||||
|
||||
#
|
||||
# Multimedia drivers
|
||||
#
|
||||
# CONFIG_DAB is not set
|
||||
|
||||
#
|
||||
@ -1015,6 +1028,8 @@ CONFIG_USB_ARCH_HAS_HCD=y
|
||||
CONFIG_USB_ARCH_HAS_OHCI=y
|
||||
CONFIG_USB_ARCH_HAS_EHCI=y
|
||||
# CONFIG_USB is not set
|
||||
# CONFIG_USB_OTG_WHITELIST is not set
|
||||
# CONFIG_USB_OTG_BLACKLIST_HUB is not set
|
||||
|
||||
#
|
||||
# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
|
||||
@ -1023,13 +1038,10 @@ CONFIG_USB_ARCH_HAS_EHCI=y
|
||||
# CONFIG_MMC is not set
|
||||
# CONFIG_MEMSTICK is not set
|
||||
# CONFIG_NEW_LEDS is not set
|
||||
# CONFIG_ACCESSIBILITY is not set
|
||||
# CONFIG_INFINIBAND is not set
|
||||
CONFIG_RTC_LIB=y
|
||||
# CONFIG_RTC_CLASS is not set
|
||||
|
||||
#
|
||||
# Userspace I/O
|
||||
#
|
||||
# CONFIG_UIO is not set
|
||||
|
||||
#
|
||||
@ -1123,7 +1135,6 @@ CONFIG_NFS_FS=y
|
||||
CONFIG_NFS_V3=y
|
||||
# CONFIG_NFS_V3_ACL is not set
|
||||
# CONFIG_NFS_V4 is not set
|
||||
# CONFIG_NFS_DIRECTIO is not set
|
||||
# CONFIG_NFSD is not set
|
||||
CONFIG_ROOT_NFS=y
|
||||
CONFIG_LOCKD=y
|
||||
@ -1194,6 +1205,7 @@ CONFIG_TRACE_IRQFLAGS_SUPPORT=y
|
||||
# CONFIG_PRINTK_TIME is not set
|
||||
CONFIG_ENABLE_WARN_DEPRECATED=y
|
||||
CONFIG_ENABLE_MUST_CHECK=y
|
||||
CONFIG_FRAME_WARN=2048
|
||||
CONFIG_MAGIC_SYSRQ=y
|
||||
# CONFIG_UNUSED_SYMBOLS is not set
|
||||
# CONFIG_DEBUG_FS is not set
|
||||
@ -1204,6 +1216,7 @@ CONFIG_DETECT_SOFTLOCKUP=y
|
||||
CONFIG_SCHED_DEBUG=y
|
||||
# CONFIG_SCHEDSTATS is not set
|
||||
# CONFIG_TIMER_STATS is not set
|
||||
# CONFIG_DEBUG_OBJECTS is not set
|
||||
# CONFIG_DEBUG_SLAB is not set
|
||||
# CONFIG_DEBUG_RT_MUTEXES is not set
|
||||
# CONFIG_RT_MUTEX_TESTER is not set
|
||||
@ -1217,6 +1230,7 @@ CONFIG_DEBUG_MUTEXES=y
|
||||
# CONFIG_DEBUG_KOBJECT is not set
|
||||
# CONFIG_DEBUG_INFO is not set
|
||||
# CONFIG_DEBUG_VM is not set
|
||||
# CONFIG_DEBUG_WRITECOUNT is not set
|
||||
# CONFIG_DEBUG_LIST is not set
|
||||
# CONFIG_DEBUG_SG is not set
|
||||
# CONFIG_BOOT_PRINTK_DELAY is not set
|
||||
@ -1237,53 +1251,82 @@ CONFIG_KEYS_DEBUG_PROC_KEYS=y
|
||||
# CONFIG_SECURITY is not set
|
||||
# CONFIG_SECURITY_FILE_CAPABILITIES is not set
|
||||
CONFIG_CRYPTO=y
|
||||
|
||||
#
|
||||
# Crypto core or helper
|
||||
#
|
||||
CONFIG_CRYPTO_ALGAPI=y
|
||||
CONFIG_CRYPTO_AEAD=m
|
||||
CONFIG_CRYPTO_BLKCIPHER=y
|
||||
CONFIG_CRYPTO_SEQIV=m
|
||||
CONFIG_CRYPTO_HASH=y
|
||||
CONFIG_CRYPTO_MANAGER=y
|
||||
CONFIG_CRYPTO_GF128MUL=m
|
||||
CONFIG_CRYPTO_NULL=y
|
||||
# CONFIG_CRYPTO_CRYPTD is not set
|
||||
CONFIG_CRYPTO_AUTHENC=m
|
||||
# CONFIG_CRYPTO_TEST is not set
|
||||
|
||||
#
|
||||
# Authenticated Encryption with Associated Data
|
||||
#
|
||||
CONFIG_CRYPTO_CCM=m
|
||||
CONFIG_CRYPTO_GCM=m
|
||||
CONFIG_CRYPTO_SEQIV=m
|
||||
|
||||
#
|
||||
# Block modes
|
||||
#
|
||||
CONFIG_CRYPTO_CBC=m
|
||||
CONFIG_CRYPTO_CTR=m
|
||||
# CONFIG_CRYPTO_CTS is not set
|
||||
CONFIG_CRYPTO_ECB=m
|
||||
CONFIG_CRYPTO_LRW=m
|
||||
CONFIG_CRYPTO_PCBC=m
|
||||
CONFIG_CRYPTO_XTS=m
|
||||
|
||||
#
|
||||
# Hash modes
|
||||
#
|
||||
CONFIG_CRYPTO_HMAC=y
|
||||
CONFIG_CRYPTO_XCBC=m
|
||||
CONFIG_CRYPTO_NULL=y
|
||||
|
||||
#
|
||||
# Digest
|
||||
#
|
||||
# CONFIG_CRYPTO_CRC32C is not set
|
||||
CONFIG_CRYPTO_MD4=m
|
||||
CONFIG_CRYPTO_MD5=y
|
||||
CONFIG_CRYPTO_MICHAEL_MIC=m
|
||||
CONFIG_CRYPTO_SHA1=m
|
||||
CONFIG_CRYPTO_SHA256=m
|
||||
CONFIG_CRYPTO_SHA512=m
|
||||
CONFIG_CRYPTO_WP512=m
|
||||
CONFIG_CRYPTO_TGR192=m
|
||||
CONFIG_CRYPTO_GF128MUL=m
|
||||
CONFIG_CRYPTO_ECB=m
|
||||
CONFIG_CRYPTO_CBC=m
|
||||
CONFIG_CRYPTO_PCBC=m
|
||||
CONFIG_CRYPTO_LRW=m
|
||||
CONFIG_CRYPTO_XTS=m
|
||||
CONFIG_CRYPTO_CTR=m
|
||||
CONFIG_CRYPTO_GCM=m
|
||||
CONFIG_CRYPTO_CCM=m
|
||||
# CONFIG_CRYPTO_CRYPTD is not set
|
||||
CONFIG_CRYPTO_DES=m
|
||||
CONFIG_CRYPTO_FCRYPT=m
|
||||
CONFIG_CRYPTO_BLOWFISH=m
|
||||
CONFIG_CRYPTO_TWOFISH=m
|
||||
CONFIG_CRYPTO_TWOFISH_COMMON=m
|
||||
CONFIG_CRYPTO_SERPENT=m
|
||||
CONFIG_CRYPTO_WP512=m
|
||||
|
||||
#
|
||||
# Ciphers
|
||||
#
|
||||
CONFIG_CRYPTO_AES=m
|
||||
CONFIG_CRYPTO_ANUBIS=m
|
||||
CONFIG_CRYPTO_ARC4=m
|
||||
CONFIG_CRYPTO_BLOWFISH=m
|
||||
CONFIG_CRYPTO_CAMELLIA=m
|
||||
CONFIG_CRYPTO_CAST5=m
|
||||
CONFIG_CRYPTO_CAST6=m
|
||||
CONFIG_CRYPTO_TEA=m
|
||||
CONFIG_CRYPTO_ARC4=m
|
||||
CONFIG_CRYPTO_DES=m
|
||||
CONFIG_CRYPTO_FCRYPT=m
|
||||
CONFIG_CRYPTO_KHAZAD=m
|
||||
CONFIG_CRYPTO_ANUBIS=m
|
||||
CONFIG_CRYPTO_SEED=m
|
||||
CONFIG_CRYPTO_SALSA20=m
|
||||
CONFIG_CRYPTO_SEED=m
|
||||
CONFIG_CRYPTO_SERPENT=m
|
||||
CONFIG_CRYPTO_TEA=m
|
||||
CONFIG_CRYPTO_TWOFISH=m
|
||||
CONFIG_CRYPTO_TWOFISH_COMMON=m
|
||||
|
||||
#
|
||||
# Compression
|
||||
#
|
||||
CONFIG_CRYPTO_DEFLATE=m
|
||||
CONFIG_CRYPTO_MICHAEL_MIC=m
|
||||
# CONFIG_CRYPTO_CRC32C is not set
|
||||
CONFIG_CRYPTO_CAMELLIA=m
|
||||
# CONFIG_CRYPTO_TEST is not set
|
||||
CONFIG_CRYPTO_AUTHENC=m
|
||||
# CONFIG_CRYPTO_LZO is not set
|
||||
CONFIG_CRYPTO_HW=y
|
||||
# CONFIG_CRYPTO_DEV_HIFN_795X is not set
|
||||
@ -1292,9 +1335,10 @@ CONFIG_CRYPTO_HW=y
|
||||
# Library routines
|
||||
#
|
||||
CONFIG_BITREVERSE=y
|
||||
# CONFIG_GENERIC_FIND_FIRST_BIT is not set
|
||||
CONFIG_CRC_CCITT=m
|
||||
# CONFIG_CRC16 is not set
|
||||
# CONFIG_CRC_ITU_T is not set
|
||||
CONFIG_CRC_ITU_T=m
|
||||
CONFIG_CRC32=y
|
||||
# CONFIG_CRC7 is not set
|
||||
CONFIG_LIBCRC32C=m
|
||||
|
@ -14,9 +14,7 @@ CONFIG_MIPS=y
|
||||
# CONFIG_MACH_DECSTATION is not set
|
||||
# CONFIG_MACH_JAZZ is not set
|
||||
# CONFIG_LEMOTE_FULONG is not set
|
||||
# CONFIG_MIPS_ATLAS is not set
|
||||
# CONFIG_MIPS_MALTA is not set
|
||||
# CONFIG_MIPS_SEAD is not set
|
||||
# CONFIG_MIPS_SIM is not set
|
||||
# CONFIG_MARKEINS is not set
|
||||
CONFIG_MACH_VR41XX=y
|
||||
|
@ -14,9 +14,7 @@ CONFIG_MIPS_COBALT=y
|
||||
# CONFIG_MACH_DECSTATION is not set
|
||||
# CONFIG_MACH_JAZZ is not set
|
||||
# CONFIG_LEMOTE_FULONG is not set
|
||||
# CONFIG_MIPS_ATLAS is not set
|
||||
# CONFIG_MIPS_MALTA is not set
|
||||
# CONFIG_MIPS_SEAD is not set
|
||||
# CONFIG_MIPS_SIM is not set
|
||||
# CONFIG_MARKEINS is not set
|
||||
# CONFIG_MACH_VR41XX is not set
|
||||
|
@ -27,9 +27,7 @@ CONFIG_MIPS_DB1000=y
|
||||
# CONFIG_MIPS_COBALT is not set
|
||||
# CONFIG_MACH_DECSTATION is not set
|
||||
# CONFIG_MACH_JAZZ is not set
|
||||
# CONFIG_MIPS_ATLAS is not set
|
||||
# CONFIG_MIPS_MALTA is not set
|
||||
# CONFIG_MIPS_SEAD is not set
|
||||
# CONFIG_WR_PPMC is not set
|
||||
# CONFIG_MIPS_SIM is not set
|
||||
# CONFIG_MOMENCO_JAGUAR_ATX is not set
|
||||
|
@ -27,9 +27,7 @@ CONFIG_MIPS_DB1100=y
|
||||
# CONFIG_MIPS_COBALT is not set
|
||||
# CONFIG_MACH_DECSTATION is not set
|
||||
# CONFIG_MACH_JAZZ is not set
|
||||
# CONFIG_MIPS_ATLAS is not set
|
||||
# CONFIG_MIPS_MALTA is not set
|
||||
# CONFIG_MIPS_SEAD is not set
|
||||
# CONFIG_WR_PPMC is not set
|
||||
# CONFIG_MIPS_SIM is not set
|
||||
# CONFIG_MOMENCO_JAGUAR_ATX is not set
|
||||
|
@ -27,9 +27,7 @@ CONFIG_MIPS_DB1200=y
|
||||
# CONFIG_MIPS_COBALT is not set
|
||||
# CONFIG_MACH_DECSTATION is not set
|
||||
# CONFIG_MACH_JAZZ is not set
|
||||
# CONFIG_MIPS_ATLAS is not set
|
||||
# CONFIG_MIPS_MALTA is not set
|
||||
# CONFIG_MIPS_SEAD is not set
|
||||
# CONFIG_WR_PPMC is not set
|
||||
# CONFIG_MIPS_SIM is not set
|
||||
# CONFIG_MOMENCO_JAGUAR_ATX is not set
|
||||
|
@ -27,9 +27,7 @@ CONFIG_MIPS_DB1500=y
|
||||
# CONFIG_MIPS_COBALT is not set
|
||||
# CONFIG_MACH_DECSTATION is not set
|
||||
# CONFIG_MACH_JAZZ is not set
|
||||
# CONFIG_MIPS_ATLAS is not set
|
||||
# CONFIG_MIPS_MALTA is not set
|
||||
# CONFIG_MIPS_SEAD is not set
|
||||
# CONFIG_WR_PPMC is not set
|
||||
# CONFIG_MIPS_SIM is not set
|
||||
# CONFIG_MOMENCO_JAGUAR_ATX is not set
|
||||
|
@ -27,9 +27,7 @@ CONFIG_MIPS_DB1550=y
|
||||
# CONFIG_MIPS_COBALT is not set
|
||||
# CONFIG_MACH_DECSTATION is not set
|
||||
# CONFIG_MACH_JAZZ is not set
|
||||
# CONFIG_MIPS_ATLAS is not set
|
||||
# CONFIG_MIPS_MALTA is not set
|
||||
# CONFIG_MIPS_SEAD is not set
|
||||
# CONFIG_WR_PPMC is not set
|
||||
# CONFIG_MIPS_SIM is not set
|
||||
# CONFIG_MOMENCO_JAGUAR_ATX is not set
|
||||
|
@ -26,9 +26,7 @@ CONFIG_ZONE_DMA=y
|
||||
# CONFIG_MIPS_COBALT is not set
|
||||
CONFIG_MACH_DECSTATION=y
|
||||
# CONFIG_MACH_JAZZ is not set
|
||||
# CONFIG_MIPS_ATLAS is not set
|
||||
# CONFIG_MIPS_MALTA is not set
|
||||
# CONFIG_MIPS_SEAD is not set
|
||||
# CONFIG_WR_PPMC is not set
|
||||
# CONFIG_MIPS_SIM is not set
|
||||
# CONFIG_MOMENCO_JAGUAR_ATX is not set
|
||||
|
@ -14,9 +14,7 @@ CONFIG_MIPS=y
|
||||
# CONFIG_MACH_DECSTATION is not set
|
||||
# CONFIG_MACH_JAZZ is not set
|
||||
# CONFIG_LEMOTE_FULONG is not set
|
||||
# CONFIG_MIPS_ATLAS is not set
|
||||
# CONFIG_MIPS_MALTA is not set
|
||||
# CONFIG_MIPS_SEAD is not set
|
||||
# CONFIG_MIPS_SIM is not set
|
||||
# CONFIG_MARKEINS is not set
|
||||
CONFIG_MACH_VR41XX=y
|
||||
|
@ -26,9 +26,7 @@ CONFIG_ZONE_DMA=y
|
||||
# CONFIG_MIPS_COBALT is not set
|
||||
# CONFIG_MACH_DECSTATION is not set
|
||||
# CONFIG_MACH_JAZZ is not set
|
||||
# CONFIG_MIPS_ATLAS is not set
|
||||
# CONFIG_MIPS_MALTA is not set
|
||||
# CONFIG_MIPS_SEAD is not set
|
||||
# CONFIG_WR_PPMC is not set
|
||||
# CONFIG_MIPS_SIM is not set
|
||||
# CONFIG_MOMENCO_JAGUAR_ATX is not set
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user