mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-06 05:02:31 +00:00
Merge ../linux-2.6
This commit is contained in:
commit
50cb993ea6
8
CREDITS
8
CREDITS
@ -317,6 +317,14 @@ S: 2322 37th Ave SW
|
|||||||
S: Seattle, Washington 98126-2010
|
S: Seattle, Washington 98126-2010
|
||||||
S: USA
|
S: USA
|
||||||
|
|
||||||
|
N: Muli Ben-Yehuda
|
||||||
|
E: mulix@mulix.org
|
||||||
|
E: muli@il.ibm.com
|
||||||
|
W: http://www.mulix.org
|
||||||
|
D: trident OSS sound driver, x86-64 dma-ops and Calgary IOMMU,
|
||||||
|
D: KVM and Xen bits and other misc. hackery.
|
||||||
|
S: Haifa, Israel
|
||||||
|
|
||||||
N: Johannes Berg
|
N: Johannes Berg
|
||||||
E: johannes@sipsolutions.net
|
E: johannes@sipsolutions.net
|
||||||
W: http://johannes.sipsolutions.net/
|
W: http://johannes.sipsolutions.net/
|
||||||
|
@ -361,8 +361,6 @@ telephony/
|
|||||||
- directory with info on telephony (e.g. voice over IP) support.
|
- directory with info on telephony (e.g. voice over IP) support.
|
||||||
time_interpolators.txt
|
time_interpolators.txt
|
||||||
- info on time interpolators.
|
- info on time interpolators.
|
||||||
tipar.txt
|
|
||||||
- information about Parallel link cable for Texas Instruments handhelds.
|
|
||||||
tty.txt
|
tty.txt
|
||||||
- guide to the locking policies of the tty layer.
|
- guide to the locking policies of the tty layer.
|
||||||
uml/
|
uml/
|
||||||
|
24
Documentation/ABI/testing/sysfs-devices-memory
Normal file
24
Documentation/ABI/testing/sysfs-devices-memory
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
What: /sys/devices/system/memory
|
||||||
|
Date: June 2008
|
||||||
|
Contact: Badari Pulavarty <pbadari@us.ibm.com>
|
||||||
|
Description:
|
||||||
|
The /sys/devices/system/memory contains a snapshot of the
|
||||||
|
internal state of the kernel memory blocks. Files could be
|
||||||
|
added or removed dynamically to represent hot-add/remove
|
||||||
|
operations.
|
||||||
|
|
||||||
|
Users: hotplug memory add/remove tools
|
||||||
|
https://w3.opensource.ibm.com/projects/powerpc-utils/
|
||||||
|
|
||||||
|
What: /sys/devices/system/memory/memoryX/removable
|
||||||
|
Date: June 2008
|
||||||
|
Contact: Badari Pulavarty <pbadari@us.ibm.com>
|
||||||
|
Description:
|
||||||
|
The file /sys/devices/system/memory/memoryX/removable
|
||||||
|
indicates whether this memory block is removable or not.
|
||||||
|
This is useful for a user-level agent to determine
|
||||||
|
identify removable sections of the memory before attempting
|
||||||
|
potentially expensive hot-remove memory operation
|
||||||
|
|
||||||
|
Users: hotplug memory remove tools
|
||||||
|
https://w3.opensource.ibm.com/projects/powerpc-utils/
|
6
Documentation/ABI/testing/sysfs-kernel-mm
Normal file
6
Documentation/ABI/testing/sysfs-kernel-mm
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
What: /sys/kernel/mm
|
||||||
|
Date: July 2008
|
||||||
|
Contact: Nishanth Aravamudan <nacc@us.ibm.com>, VM maintainers
|
||||||
|
Description:
|
||||||
|
/sys/kernel/mm/ should contain any and all VM
|
||||||
|
related information in /sys/kernel/.
|
15
Documentation/ABI/testing/sysfs-kernel-mm-hugepages
Normal file
15
Documentation/ABI/testing/sysfs-kernel-mm-hugepages
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
What: /sys/kernel/mm/hugepages/
|
||||||
|
Date: June 2008
|
||||||
|
Contact: Nishanth Aravamudan <nacc@us.ibm.com>, hugetlb maintainers
|
||||||
|
Description:
|
||||||
|
/sys/kernel/mm/hugepages/ contains a number of subdirectories
|
||||||
|
of the form hugepages-<size>kB, where <size> is the page size
|
||||||
|
of the hugepages supported by the kernel/CPU combination.
|
||||||
|
|
||||||
|
Under these directories are a number of files:
|
||||||
|
nr_hugepages
|
||||||
|
nr_overcommit_hugepages
|
||||||
|
free_hugepages
|
||||||
|
surplus_hugepages
|
||||||
|
resv_hugepages
|
||||||
|
See Documentation/vm/hugetlbpage.txt for details.
|
@ -474,25 +474,29 @@ make a good program).
|
|||||||
So, you can either get rid of GNU emacs, or change it to use saner
|
So, you can either get rid of GNU emacs, or change it to use saner
|
||||||
values. To do the latter, you can stick the following in your .emacs file:
|
values. To do the latter, you can stick the following in your .emacs file:
|
||||||
|
|
||||||
(defun linux-c-mode ()
|
(defun c-lineup-arglist-tabs-only (ignored)
|
||||||
"C mode with adjusted defaults for use with the Linux kernel."
|
"Line up argument lists by tabs, not spaces"
|
||||||
(interactive)
|
(let* ((anchor (c-langelem-pos c-syntactic-element))
|
||||||
(c-mode)
|
(column (c-langelem-2nd-pos c-syntactic-element))
|
||||||
(c-set-style "K&R")
|
(offset (- (1+ column) anchor))
|
||||||
(setq tab-width 8)
|
(steps (floor offset c-basic-offset)))
|
||||||
(setq indent-tabs-mode t)
|
(* (max steps 1)
|
||||||
(setq c-basic-offset 8))
|
c-basic-offset)))
|
||||||
|
|
||||||
This will define the M-x linux-c-mode command. When hacking on a
|
(add-hook 'c-mode-hook
|
||||||
module, if you put the string -*- linux-c -*- somewhere on the first
|
(lambda ()
|
||||||
two lines, this mode will be automatically invoked. Also, you may want
|
(let ((filename (buffer-file-name)))
|
||||||
to add
|
;; Enable kernel mode for the appropriate files
|
||||||
|
(when (and filename
|
||||||
|
(string-match "~/src/linux-trees" filename))
|
||||||
|
(setq indent-tabs-mode t)
|
||||||
|
(c-set-style "linux")
|
||||||
|
(c-set-offset 'arglist-cont-nonempty
|
||||||
|
'(c-lineup-gcc-asm-reg
|
||||||
|
c-lineup-arglist-tabs-only))))))
|
||||||
|
|
||||||
(setq auto-mode-alist (cons '("/usr/src/linux.*/.*\\.[ch]$" . linux-c-mode)
|
This will make emacs go better with the kernel coding style for C
|
||||||
auto-mode-alist))
|
files below ~/src/linux-trees.
|
||||||
|
|
||||||
to your .emacs file if you want to have linux-c-mode switched on
|
|
||||||
automagically when you edit source files under /usr/src/linux.
|
|
||||||
|
|
||||||
But even if you fail in getting emacs to do sane formatting, not
|
But even if you fail in getting emacs to do sane formatting, not
|
||||||
everything is lost: use "indent".
|
everything is lost: use "indent".
|
||||||
|
@ -298,10 +298,10 @@ recommended that you never use these unless you really know what the
|
|||||||
cache width is.
|
cache width is.
|
||||||
|
|
||||||
int
|
int
|
||||||
dma_mapping_error(dma_addr_t dma_addr)
|
dma_mapping_error(struct device *dev, dma_addr_t dma_addr)
|
||||||
|
|
||||||
int
|
int
|
||||||
pci_dma_mapping_error(dma_addr_t dma_addr)
|
pci_dma_mapping_error(struct pci_dev *hwdev, dma_addr_t dma_addr)
|
||||||
|
|
||||||
In some circumstances dma_map_single and dma_map_page will fail to create
|
In some circumstances dma_map_single and dma_map_page will fail to create
|
||||||
a mapping. A driver can check for these errors by testing the returned
|
a mapping. A driver can check for these errors by testing the returned
|
||||||
|
@ -219,10 +219,10 @@
|
|||||||
</para>
|
</para>
|
||||||
|
|
||||||
<sect1 id="lock-intro">
|
<sect1 id="lock-intro">
|
||||||
<title>Three Main Types of Kernel Locks: Spinlocks, Mutexes and Semaphores</title>
|
<title>Two Main Types of Kernel Locks: Spinlocks and Mutexes</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
There are three main types of kernel locks. The fundamental type
|
There are two main types of kernel locks. The fundamental type
|
||||||
is the spinlock
|
is the spinlock
|
||||||
(<filename class="headerfile">include/asm/spinlock.h</filename>),
|
(<filename class="headerfile">include/asm/spinlock.h</filename>),
|
||||||
which is a very simple single-holder lock: if you can't get the
|
which is a very simple single-holder lock: if you can't get the
|
||||||
@ -239,14 +239,6 @@
|
|||||||
can't sleep (see <xref linkend="sleeping-things"/>), and so have to
|
can't sleep (see <xref linkend="sleeping-things"/>), and so have to
|
||||||
use a spinlock instead.
|
use a spinlock instead.
|
||||||
</para>
|
</para>
|
||||||
<para>
|
|
||||||
The third type is a semaphore
|
|
||||||
(<filename class="headerfile">include/linux/semaphore.h</filename>): it
|
|
||||||
can have more than one holder at any time (the number decided at
|
|
||||||
initialization time), although it is most commonly used as a
|
|
||||||
single-holder lock (a mutex). If you can't get a semaphore, your
|
|
||||||
task will be suspended and later on woken up - just like for mutexes.
|
|
||||||
</para>
|
|
||||||
<para>
|
<para>
|
||||||
Neither type of lock is recursive: see
|
Neither type of lock is recursive: see
|
||||||
<xref linkend="deadlock"/>.
|
<xref linkend="deadlock"/>.
|
||||||
@ -278,7 +270,7 @@
|
|||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Semaphores still exist, because they are required for
|
Mutexes still exist, because they are required for
|
||||||
synchronization between <firstterm linkend="gloss-usercontext">user
|
synchronization between <firstterm linkend="gloss-usercontext">user
|
||||||
contexts</firstterm>, as we will see below.
|
contexts</firstterm>, as we will see below.
|
||||||
</para>
|
</para>
|
||||||
@ -289,18 +281,17 @@
|
|||||||
|
|
||||||
<para>
|
<para>
|
||||||
If you have a data structure which is only ever accessed from
|
If you have a data structure which is only ever accessed from
|
||||||
user context, then you can use a simple semaphore
|
user context, then you can use a simple mutex
|
||||||
(<filename>linux/linux/semaphore.h</filename>) to protect it. This
|
(<filename>include/linux/mutex.h</filename>) to protect it. This
|
||||||
is the most trivial case: you initialize the semaphore to the number
|
is the most trivial case: you initialize the mutex. Then you can
|
||||||
of resources available (usually 1), and call
|
call <function>mutex_lock_interruptible()</function> to grab the mutex,
|
||||||
<function>down_interruptible()</function> to grab the semaphore, and
|
and <function>mutex_unlock()</function> to release it. There is also a
|
||||||
<function>up()</function> to release it. There is also a
|
<function>mutex_lock()</function>, which should be avoided, because it
|
||||||
<function>down()</function>, which should be avoided, because it
|
|
||||||
will not return if a signal is received.
|
will not return if a signal is received.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Example: <filename>linux/net/core/netfilter.c</filename> allows
|
Example: <filename>net/netfilter/nf_sockopt.c</filename> allows
|
||||||
registration of new <function>setsockopt()</function> and
|
registration of new <function>setsockopt()</function> and
|
||||||
<function>getsockopt()</function> calls, with
|
<function>getsockopt()</function> calls, with
|
||||||
<function>nf_register_sockopt()</function>. Registration and
|
<function>nf_register_sockopt()</function>. Registration and
|
||||||
@ -515,7 +506,7 @@
|
|||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
If you are in a process context (any syscall) and want to
|
If you are in a process context (any syscall) and want to
|
||||||
lock other process out, use a semaphore. You can take a semaphore
|
lock other process out, use a mutex. You can take a mutex
|
||||||
and sleep (<function>copy_from_user*(</function> or
|
and sleep (<function>copy_from_user*(</function> or
|
||||||
<function>kmalloc(x,GFP_KERNEL)</function>).
|
<function>kmalloc(x,GFP_KERNEL)</function>).
|
||||||
</para>
|
</para>
|
||||||
@ -662,7 +653,7 @@
|
|||||||
<entry>SLBH</entry>
|
<entry>SLBH</entry>
|
||||||
<entry>SLBH</entry>
|
<entry>SLBH</entry>
|
||||||
<entry>SLBH</entry>
|
<entry>SLBH</entry>
|
||||||
<entry>DI</entry>
|
<entry>MLI</entry>
|
||||||
<entry>None</entry>
|
<entry>None</entry>
|
||||||
</row>
|
</row>
|
||||||
|
|
||||||
@ -692,8 +683,8 @@
|
|||||||
<entry>spin_lock_bh</entry>
|
<entry>spin_lock_bh</entry>
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<entry>DI</entry>
|
<entry>MLI</entry>
|
||||||
<entry>down_interruptible</entry>
|
<entry>mutex_lock_interruptible</entry>
|
||||||
</row>
|
</row>
|
||||||
|
|
||||||
</tbody>
|
</tbody>
|
||||||
@ -1310,7 +1301,7 @@ as Alan Cox says, <quote>Lock data, not code</quote>.
|
|||||||
<para>
|
<para>
|
||||||
There is a coding bug where a piece of code tries to grab a
|
There is a coding bug where a piece of code tries to grab a
|
||||||
spinlock twice: it will spin forever, waiting for the lock to
|
spinlock twice: it will spin forever, waiting for the lock to
|
||||||
be released (spinlocks, rwlocks and semaphores are not
|
be released (spinlocks, rwlocks and mutexes are not
|
||||||
recursive in Linux). This is trivial to diagnose: not a
|
recursive in Linux). This is trivial to diagnose: not a
|
||||||
stay-up-five-nights-talk-to-fluffy-code-bunnies kind of
|
stay-up-five-nights-talk-to-fluffy-code-bunnies kind of
|
||||||
problem.
|
problem.
|
||||||
@ -1335,7 +1326,7 @@ as Alan Cox says, <quote>Lock data, not code</quote>.
|
|||||||
|
|
||||||
<para>
|
<para>
|
||||||
This complete lockup is easy to diagnose: on SMP boxes the
|
This complete lockup is easy to diagnose: on SMP boxes the
|
||||||
watchdog timer or compiling with <symbol>DEBUG_SPINLOCKS</symbol> set
|
watchdog timer or compiling with <symbol>DEBUG_SPINLOCK</symbol> set
|
||||||
(<filename>include/linux/spinlock.h</filename>) will show this up
|
(<filename>include/linux/spinlock.h</filename>) will show this up
|
||||||
immediately when it happens.
|
immediately when it happens.
|
||||||
</para>
|
</para>
|
||||||
@ -1558,7 +1549,7 @@ the amount of locking which needs to be done.
|
|||||||
<title>Read/Write Lock Variants</title>
|
<title>Read/Write Lock Variants</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Both spinlocks and semaphores have read/write variants:
|
Both spinlocks and mutexes have read/write variants:
|
||||||
<type>rwlock_t</type> and <structname>struct rw_semaphore</structname>.
|
<type>rwlock_t</type> and <structname>struct rw_semaphore</structname>.
|
||||||
These divide users into two classes: the readers and the writers. If
|
These divide users into two classes: the readers and the writers. If
|
||||||
you are only reading the data, you can get a read lock, but to write to
|
you are only reading the data, you can get a read lock, but to write to
|
||||||
@ -1681,7 +1672,7 @@ the amount of locking which needs to be done.
|
|||||||
#include <linux/slab.h>
|
#include <linux/slab.h>
|
||||||
#include <linux/string.h>
|
#include <linux/string.h>
|
||||||
+#include <linux/rcupdate.h>
|
+#include <linux/rcupdate.h>
|
||||||
#include <linux/semaphore.h>
|
#include <linux/mutex.h>
|
||||||
#include <asm/errno.h>
|
#include <asm/errno.h>
|
||||||
|
|
||||||
struct object
|
struct object
|
||||||
@ -1913,7 +1904,7 @@ machines due to caching.
|
|||||||
</listitem>
|
</listitem>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
<function> put_user()</function>
|
<function>put_user()</function>
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</itemizedlist>
|
</itemizedlist>
|
||||||
@ -1927,13 +1918,13 @@ machines due to caching.
|
|||||||
|
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
<function>down_interruptible()</function> and
|
<function>mutex_lock_interruptible()</function> and
|
||||||
<function>down()</function>
|
<function>mutex_lock()</function>
|
||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
There is a <function>down_trylock()</function> which can be
|
There is a <function>mutex_trylock()</function> which can be
|
||||||
used inside interrupt context, as it will not sleep.
|
used inside interrupt context, as it will not sleep.
|
||||||
<function>up()</function> will also never sleep.
|
<function>mutex_unlock()</function> will also never sleep.
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</itemizedlist>
|
</itemizedlist>
|
||||||
@ -2023,7 +2014,7 @@ machines due to caching.
|
|||||||
<para>
|
<para>
|
||||||
Prior to 2.5, or when <symbol>CONFIG_PREEMPT</symbol> is
|
Prior to 2.5, or when <symbol>CONFIG_PREEMPT</symbol> is
|
||||||
unset, processes in user context inside the kernel would not
|
unset, processes in user context inside the kernel would not
|
||||||
preempt each other (ie. you had that CPU until you have it up,
|
preempt each other (ie. you had that CPU until you gave it up,
|
||||||
except for interrupts). With the addition of
|
except for interrupts). With the addition of
|
||||||
<symbol>CONFIG_PREEMPT</symbol> in 2.5.4, this changed: when
|
<symbol>CONFIG_PREEMPT</symbol> in 2.5.4, this changed: when
|
||||||
in user context, higher priority tasks can "cut in": spinlocks
|
in user context, higher priority tasks can "cut in": spinlocks
|
||||||
|
@ -29,12 +29,12 @@
|
|||||||
|
|
||||||
<revhistory>
|
<revhistory>
|
||||||
<revision>
|
<revision>
|
||||||
<revnumber>1.0 </revnumber>
|
<revnumber>1.0</revnumber>
|
||||||
<date>May 30, 2001</date>
|
<date>May 30, 2001</date>
|
||||||
<revremark>Initial revision posted to linux-kernel</revremark>
|
<revremark>Initial revision posted to linux-kernel</revremark>
|
||||||
</revision>
|
</revision>
|
||||||
<revision>
|
<revision>
|
||||||
<revnumber>1.1 </revnumber>
|
<revnumber>1.1</revnumber>
|
||||||
<date>June 3, 2001</date>
|
<date>June 3, 2001</date>
|
||||||
<revremark>Revised after comments from linux-kernel</revremark>
|
<revremark>Revised after comments from linux-kernel</revremark>
|
||||||
</revision>
|
</revision>
|
||||||
|
@ -48,7 +48,7 @@ IOVA generation is pretty generic. We used the same technique as vmalloc()
|
|||||||
but these are not global address spaces, but separate for each domain.
|
but these are not global address spaces, but separate for each domain.
|
||||||
Different DMA engines may support different number of domains.
|
Different DMA engines may support different number of domains.
|
||||||
|
|
||||||
We also allocate gaurd pages with each mapping, so we can attempt to catch
|
We also allocate guard pages with each mapping, so we can attempt to catch
|
||||||
any overflow that might happen.
|
any overflow that might happen.
|
||||||
|
|
||||||
|
|
||||||
@ -112,4 +112,4 @@ TBD
|
|||||||
|
|
||||||
- For compatibility testing, could use unity map domain for all devices, just
|
- For compatibility testing, could use unity map domain for all devices, just
|
||||||
provide a 1-1 for all useful memory under a single domain for all devices.
|
provide a 1-1 for all useful memory under a single domain for all devices.
|
||||||
- API for paravirt ops for abstracting functionlity for VMM folks.
|
- API for paravirt ops for abstracting functionality for VMM folks.
|
||||||
|
@ -11,6 +11,7 @@ the delays experienced by a task while
|
|||||||
a) waiting for a CPU (while being runnable)
|
a) waiting for a CPU (while being runnable)
|
||||||
b) completion of synchronous block I/O initiated by the task
|
b) completion of synchronous block I/O initiated by the task
|
||||||
c) swapping in pages
|
c) swapping in pages
|
||||||
|
d) memory reclaim
|
||||||
|
|
||||||
and makes these statistics available to userspace through
|
and makes these statistics available to userspace through
|
||||||
the taskstats interface.
|
the taskstats interface.
|
||||||
@ -41,7 +42,7 @@ this structure. See
|
|||||||
include/linux/taskstats.h
|
include/linux/taskstats.h
|
||||||
for a description of the fields pertaining to delay accounting.
|
for a description of the fields pertaining to delay accounting.
|
||||||
It will generally be in the form of counters returning the cumulative
|
It will generally be in the form of counters returning the cumulative
|
||||||
delay seen for cpu, sync block I/O, swapin etc.
|
delay seen for cpu, sync block I/O, swapin, memory reclaim etc.
|
||||||
|
|
||||||
Taking the difference of two successive readings of a given
|
Taking the difference of two successive readings of a given
|
||||||
counter (say cpu_delay_total) for a task will give the delay
|
counter (say cpu_delay_total) for a task will give the delay
|
||||||
@ -94,7 +95,9 @@ CPU count real total virtual total delay total
|
|||||||
7876 92005750 100000000 24001500
|
7876 92005750 100000000 24001500
|
||||||
IO count delay total
|
IO count delay total
|
||||||
0 0
|
0 0
|
||||||
MEM count delay total
|
SWAP count delay total
|
||||||
|
0 0
|
||||||
|
RECLAIM count delay total
|
||||||
0 0
|
0 0
|
||||||
|
|
||||||
Get delays seen in executing a given simple command
|
Get delays seen in executing a given simple command
|
||||||
@ -108,5 +111,7 @@ CPU count real total virtual total delay total
|
|||||||
6 4000250 4000000 0
|
6 4000250 4000000 0
|
||||||
IO count delay total
|
IO count delay total
|
||||||
0 0
|
0 0
|
||||||
MEM count delay total
|
SWAP count delay total
|
||||||
|
0 0
|
||||||
|
RECLAIM count delay total
|
||||||
0 0
|
0 0
|
||||||
|
@ -196,14 +196,18 @@ void print_delayacct(struct taskstats *t)
|
|||||||
" %15llu%15llu%15llu%15llu\n"
|
" %15llu%15llu%15llu%15llu\n"
|
||||||
"IO %15s%15s\n"
|
"IO %15s%15s\n"
|
||||||
" %15llu%15llu\n"
|
" %15llu%15llu\n"
|
||||||
"MEM %15s%15s\n"
|
"SWAP %15s%15s\n"
|
||||||
|
" %15llu%15llu\n"
|
||||||
|
"RECLAIM %12s%15s\n"
|
||||||
" %15llu%15llu\n",
|
" %15llu%15llu\n",
|
||||||
"count", "real total", "virtual total", "delay total",
|
"count", "real total", "virtual total", "delay total",
|
||||||
t->cpu_count, t->cpu_run_real_total, t->cpu_run_virtual_total,
|
t->cpu_count, t->cpu_run_real_total, t->cpu_run_virtual_total,
|
||||||
t->cpu_delay_total,
|
t->cpu_delay_total,
|
||||||
"count", "delay total",
|
"count", "delay total",
|
||||||
t->blkio_count, t->blkio_delay_total,
|
t->blkio_count, t->blkio_delay_total,
|
||||||
"count", "delay total", t->swapin_count, t->swapin_delay_total);
|
"count", "delay total", t->swapin_count, t->swapin_delay_total,
|
||||||
|
"count", "delay total",
|
||||||
|
t->freepages_count, t->freepages_delay_total);
|
||||||
}
|
}
|
||||||
|
|
||||||
void task_context_switch_counts(struct taskstats *t)
|
void task_context_switch_counts(struct taskstats *t)
|
||||||
|
@ -6,7 +6,7 @@ This document contains an explanation of the struct taskstats fields.
|
|||||||
There are three different groups of fields in the struct taskstats:
|
There are three different groups of fields in the struct taskstats:
|
||||||
|
|
||||||
1) Common and basic accounting fields
|
1) Common and basic accounting fields
|
||||||
If CONFIG_TASKSTATS is set, the taskstats inteface is enabled and
|
If CONFIG_TASKSTATS is set, the taskstats interface is enabled and
|
||||||
the common fields and basic accounting fields are collected for
|
the common fields and basic accounting fields are collected for
|
||||||
delivery at do_exit() of a task.
|
delivery at do_exit() of a task.
|
||||||
2) Delay accounting fields
|
2) Delay accounting fields
|
||||||
@ -26,6 +26,8 @@ There are three different groups of fields in the struct taskstats:
|
|||||||
|
|
||||||
5) Time accounting for SMT machines
|
5) Time accounting for SMT machines
|
||||||
|
|
||||||
|
6) Extended delay accounting fields for memory reclaim
|
||||||
|
|
||||||
Future extension should add fields to the end of the taskstats struct, and
|
Future extension should add fields to the end of the taskstats struct, and
|
||||||
should not change the relative position of each field within the struct.
|
should not change the relative position of each field within the struct.
|
||||||
|
|
||||||
@ -170,4 +172,9 @@ struct taskstats {
|
|||||||
__u64 ac_utimescaled; /* utime scaled on frequency etc */
|
__u64 ac_utimescaled; /* utime scaled on frequency etc */
|
||||||
__u64 ac_stimescaled; /* stime scaled on frequency etc */
|
__u64 ac_stimescaled; /* stime scaled on frequency etc */
|
||||||
__u64 cpu_scaled_run_real_total; /* scaled cpu_run_real_total */
|
__u64 cpu_scaled_run_real_total; /* scaled cpu_run_real_total */
|
||||||
|
|
||||||
|
6) Extended delay accounting fields for memory reclaim
|
||||||
|
/* Delay waiting for memory reclaim */
|
||||||
|
__u64 freepages_count;
|
||||||
|
__u64 freepages_delay_total;
|
||||||
}
|
}
|
||||||
|
67
Documentation/bt8xxgpio.txt
Normal file
67
Documentation/bt8xxgpio.txt
Normal file
@ -0,0 +1,67 @@
|
|||||||
|
===============================================================
|
||||||
|
== BT8XXGPIO driver ==
|
||||||
|
== ==
|
||||||
|
== A driver for a selfmade cheap BT8xx based PCI GPIO-card ==
|
||||||
|
== ==
|
||||||
|
== For advanced documentation, see ==
|
||||||
|
== http://www.bu3sch.de/btgpio.php ==
|
||||||
|
===============================================================
|
||||||
|
|
||||||
|
|
||||||
|
A generic digital 24-port PCI GPIO card can be built out of an ordinary
|
||||||
|
Brooktree bt848, bt849, bt878 or bt879 based analog TV tuner card. The
|
||||||
|
Brooktree chip is used in old analog Hauppauge WinTV PCI cards. You can easily
|
||||||
|
find them used for low prices on the net.
|
||||||
|
|
||||||
|
The bt8xx chip does have 24 digital GPIO ports.
|
||||||
|
These ports are accessible via 24 pins on the SMD chip package.
|
||||||
|
|
||||||
|
|
||||||
|
==============================================
|
||||||
|
== How to physically access the GPIO pins ==
|
||||||
|
==============================================
|
||||||
|
|
||||||
|
The are several ways to access these pins. One might unsolder the whole chip
|
||||||
|
and put it on a custom PCI board, or one might only unsolder each individual
|
||||||
|
GPIO pin and solder that to some tiny wire. As the chip package really is tiny
|
||||||
|
there are some advanced soldering skills needed in any case.
|
||||||
|
|
||||||
|
The physical pinouts are drawn in the following ASCII art.
|
||||||
|
The GPIO pins are marked with G00-G23
|
||||||
|
|
||||||
|
G G G G G G G G G G G G G G G G G G
|
||||||
|
0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1
|
||||||
|
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7
|
||||||
|
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
|
||||||
|
---------------------------------------------------------------------------
|
||||||
|
--| ^ ^ |--
|
||||||
|
--| pin 86 pin 67 |--
|
||||||
|
--| |--
|
||||||
|
--| pin 61 > |-- G18
|
||||||
|
--| |-- G19
|
||||||
|
--| |-- G20
|
||||||
|
--| |-- G21
|
||||||
|
--| |-- G22
|
||||||
|
--| pin 56 > |-- G23
|
||||||
|
--| |--
|
||||||
|
--| Brooktree 878/879 |--
|
||||||
|
--| |--
|
||||||
|
--| |--
|
||||||
|
--| |--
|
||||||
|
--| |--
|
||||||
|
--| |--
|
||||||
|
--| |--
|
||||||
|
--| |--
|
||||||
|
--| |--
|
||||||
|
--| |--
|
||||||
|
--| |--
|
||||||
|
--| |--
|
||||||
|
--| |--
|
||||||
|
--| |--
|
||||||
|
--| O |--
|
||||||
|
--| |--
|
||||||
|
---------------------------------------------------------------------------
|
||||||
|
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
|
||||||
|
^
|
||||||
|
This is pin 1
|
||||||
|
|
@ -242,8 +242,7 @@ rmdir() if there are no tasks.
|
|||||||
1. Add support for accounting huge pages (as a separate controller)
|
1. Add support for accounting huge pages (as a separate controller)
|
||||||
2. Make per-cgroup scanner reclaim not-shared pages first
|
2. Make per-cgroup scanner reclaim not-shared pages first
|
||||||
3. Teach controller to account for shared-pages
|
3. Teach controller to account for shared-pages
|
||||||
4. Start reclamation when the limit is lowered
|
4. Start reclamation in the background when the limit is
|
||||||
5. Start reclamation in the background when the limit is
|
|
||||||
not yet hit but the usage is getting closer
|
not yet hit but the usage is getting closer
|
||||||
|
|
||||||
Summary
|
Summary
|
||||||
|
@ -122,7 +122,7 @@ around '10000' or more.
|
|||||||
show_sampling_rate_(min|max): the minimum and maximum sampling rates
|
show_sampling_rate_(min|max): the minimum and maximum sampling rates
|
||||||
available that you may set 'sampling_rate' to.
|
available that you may set 'sampling_rate' to.
|
||||||
|
|
||||||
up_threshold: defines what the average CPU usaged between the samplings
|
up_threshold: defines what the average CPU usage between the samplings
|
||||||
of 'sampling_rate' needs to be for the kernel to make a decision on
|
of 'sampling_rate' needs to be for the kernel to make a decision on
|
||||||
whether it should increase the frequency. For example when it is set
|
whether it should increase the frequency. For example when it is set
|
||||||
to its default value of '80' it means that between the checking
|
to its default value of '80' it means that between the checking
|
||||||
|
@ -222,74 +222,9 @@ both csrow2 and csrow3 are populated, this indicates a dual ranked
|
|||||||
set of DIMMs for channels 0 and 1.
|
set of DIMMs for channels 0 and 1.
|
||||||
|
|
||||||
|
|
||||||
Within each of the 'mc','mcX' and 'csrowX' directories are several
|
Within each of the 'mcX' and 'csrowX' directories are several
|
||||||
EDAC control and attribute files.
|
EDAC control and attribute files.
|
||||||
|
|
||||||
|
|
||||||
============================================================================
|
|
||||||
DIRECTORY 'mc'
|
|
||||||
|
|
||||||
In directory 'mc' are EDAC system overall control and attribute files:
|
|
||||||
|
|
||||||
|
|
||||||
Panic on UE control file:
|
|
||||||
|
|
||||||
'edac_mc_panic_on_ue'
|
|
||||||
|
|
||||||
An uncorrectable error will cause a machine panic. This is usually
|
|
||||||
desirable. It is a bad idea to continue when an uncorrectable error
|
|
||||||
occurs - it is indeterminate what was uncorrected and the operating
|
|
||||||
system context might be so mangled that continuing will lead to further
|
|
||||||
corruption. If the kernel has MCE configured, then EDAC will never
|
|
||||||
notice the UE.
|
|
||||||
|
|
||||||
LOAD TIME: module/kernel parameter: panic_on_ue=[0|1]
|
|
||||||
|
|
||||||
RUN TIME: echo "1" >/sys/devices/system/edac/mc/edac_mc_panic_on_ue
|
|
||||||
|
|
||||||
|
|
||||||
Log UE control file:
|
|
||||||
|
|
||||||
'edac_mc_log_ue'
|
|
||||||
|
|
||||||
Generate kernel messages describing uncorrectable errors. These errors
|
|
||||||
are reported through the system message log system. UE statistics
|
|
||||||
will be accumulated even when UE logging is disabled.
|
|
||||||
|
|
||||||
LOAD TIME: module/kernel parameter: log_ue=[0|1]
|
|
||||||
|
|
||||||
RUN TIME: echo "1" >/sys/devices/system/edac/mc/edac_mc_log_ue
|
|
||||||
|
|
||||||
|
|
||||||
Log CE control file:
|
|
||||||
|
|
||||||
'edac_mc_log_ce'
|
|
||||||
|
|
||||||
Generate kernel messages describing correctable errors. These
|
|
||||||
errors are reported through the system message log system.
|
|
||||||
CE statistics will be accumulated even when CE logging is disabled.
|
|
||||||
|
|
||||||
LOAD TIME: module/kernel parameter: log_ce=[0|1]
|
|
||||||
|
|
||||||
RUN TIME: echo "1" >/sys/devices/system/edac/mc/edac_mc_log_ce
|
|
||||||
|
|
||||||
|
|
||||||
Polling period control file:
|
|
||||||
|
|
||||||
'edac_mc_poll_msec'
|
|
||||||
|
|
||||||
The time period, in milliseconds, for polling for error information.
|
|
||||||
Too small a value wastes resources. Too large a value might delay
|
|
||||||
necessary handling of errors and might loose valuable information for
|
|
||||||
locating the error. 1000 milliseconds (once each second) is the current
|
|
||||||
default. Systems which require all the bandwidth they can get, may
|
|
||||||
increase this.
|
|
||||||
|
|
||||||
LOAD TIME: module/kernel parameter: poll_msec=[0|1]
|
|
||||||
|
|
||||||
RUN TIME: echo "1000" >/sys/devices/system/edac/mc/edac_mc_poll_msec
|
|
||||||
|
|
||||||
|
|
||||||
============================================================================
|
============================================================================
|
||||||
'mcX' DIRECTORIES
|
'mcX' DIRECTORIES
|
||||||
|
|
||||||
@ -392,7 +327,7 @@ Sdram memory scrubbing rate:
|
|||||||
'sdram_scrub_rate'
|
'sdram_scrub_rate'
|
||||||
|
|
||||||
Read/Write attribute file that controls memory scrubbing. The scrubbing
|
Read/Write attribute file that controls memory scrubbing. The scrubbing
|
||||||
rate is set by writing a minimum bandwith in bytes/sec to the attribute
|
rate is set by writing a minimum bandwidth in bytes/sec to the attribute
|
||||||
file. The rate will be translated to an internal value that gives at
|
file. The rate will be translated to an internal value that gives at
|
||||||
least the specified rate.
|
least the specified rate.
|
||||||
|
|
||||||
@ -537,7 +472,6 @@ Channel 1 DIMM Label control file:
|
|||||||
motherboard specific and determination of this information
|
motherboard specific and determination of this information
|
||||||
must occur in userland at this time.
|
must occur in userland at this time.
|
||||||
|
|
||||||
|
|
||||||
============================================================================
|
============================================================================
|
||||||
SYSTEM LOGGING
|
SYSTEM LOGGING
|
||||||
|
|
||||||
@ -570,7 +504,6 @@ error type, a notice of "no info" and then an optional,
|
|||||||
driver-specific error message.
|
driver-specific error message.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
============================================================================
|
============================================================================
|
||||||
PCI Bus Parity Detection
|
PCI Bus Parity Detection
|
||||||
|
|
||||||
@ -604,6 +537,74 @@ Enable/Disable PCI Parity checking control file:
|
|||||||
echo "0" >/sys/devices/system/edac/pci/check_pci_parity
|
echo "0" >/sys/devices/system/edac/pci/check_pci_parity
|
||||||
|
|
||||||
|
|
||||||
|
Parity Count:
|
||||||
|
|
||||||
|
'pci_parity_count'
|
||||||
|
|
||||||
|
This attribute file will display the number of parity errors that
|
||||||
|
have been detected.
|
||||||
|
|
||||||
|
|
||||||
|
============================================================================
|
||||||
|
MODULE PARAMETERS
|
||||||
|
|
||||||
|
Panic on UE control file:
|
||||||
|
|
||||||
|
'edac_mc_panic_on_ue'
|
||||||
|
|
||||||
|
An uncorrectable error will cause a machine panic. This is usually
|
||||||
|
desirable. It is a bad idea to continue when an uncorrectable error
|
||||||
|
occurs - it is indeterminate what was uncorrected and the operating
|
||||||
|
system context might be so mangled that continuing will lead to further
|
||||||
|
corruption. If the kernel has MCE configured, then EDAC will never
|
||||||
|
notice the UE.
|
||||||
|
|
||||||
|
LOAD TIME: module/kernel parameter: edac_mc_panic_on_ue=[0|1]
|
||||||
|
|
||||||
|
RUN TIME: echo "1" > /sys/module/edac_core/parameters/edac_mc_panic_on_ue
|
||||||
|
|
||||||
|
|
||||||
|
Log UE control file:
|
||||||
|
|
||||||
|
'edac_mc_log_ue'
|
||||||
|
|
||||||
|
Generate kernel messages describing uncorrectable errors. These errors
|
||||||
|
are reported through the system message log system. UE statistics
|
||||||
|
will be accumulated even when UE logging is disabled.
|
||||||
|
|
||||||
|
LOAD TIME: module/kernel parameter: edac_mc_log_ue=[0|1]
|
||||||
|
|
||||||
|
RUN TIME: echo "1" > /sys/module/edac_core/parameters/edac_mc_log_ue
|
||||||
|
|
||||||
|
|
||||||
|
Log CE control file:
|
||||||
|
|
||||||
|
'edac_mc_log_ce'
|
||||||
|
|
||||||
|
Generate kernel messages describing correctable errors. These
|
||||||
|
errors are reported through the system message log system.
|
||||||
|
CE statistics will be accumulated even when CE logging is disabled.
|
||||||
|
|
||||||
|
LOAD TIME: module/kernel parameter: edac_mc_log_ce=[0|1]
|
||||||
|
|
||||||
|
RUN TIME: echo "1" > /sys/module/edac_core/parameters/edac_mc_log_ce
|
||||||
|
|
||||||
|
|
||||||
|
Polling period control file:
|
||||||
|
|
||||||
|
'edac_mc_poll_msec'
|
||||||
|
|
||||||
|
The time period, in milliseconds, for polling for error information.
|
||||||
|
Too small a value wastes resources. Too large a value might delay
|
||||||
|
necessary handling of errors and might loose valuable information for
|
||||||
|
locating the error. 1000 milliseconds (once each second) is the current
|
||||||
|
default. Systems which require all the bandwidth they can get, may
|
||||||
|
increase this.
|
||||||
|
|
||||||
|
LOAD TIME: module/kernel parameter: edac_mc_poll_msec=[0|1]
|
||||||
|
|
||||||
|
RUN TIME: echo "1000" > /sys/module/edac_core/parameters/edac_mc_poll_msec
|
||||||
|
|
||||||
|
|
||||||
Panic on PCI PARITY Error:
|
Panic on PCI PARITY Error:
|
||||||
|
|
||||||
@ -614,21 +615,13 @@ Panic on PCI PARITY Error:
|
|||||||
error has been detected.
|
error has been detected.
|
||||||
|
|
||||||
|
|
||||||
module/kernel parameter: panic_on_pci_parity=[0|1]
|
module/kernel parameter: edac_panic_on_pci_pe=[0|1]
|
||||||
|
|
||||||
Enable:
|
Enable:
|
||||||
echo "1" >/sys/devices/system/edac/pci/panic_on_pci_parity
|
echo "1" > /sys/module/edac_core/parameters/edac_panic_on_pci_pe
|
||||||
|
|
||||||
Disable:
|
Disable:
|
||||||
echo "0" >/sys/devices/system/edac/pci/panic_on_pci_parity
|
echo "0" > /sys/module/edac_core/parameters/edac_panic_on_pci_pe
|
||||||
|
|
||||||
|
|
||||||
Parity Count:
|
|
||||||
|
|
||||||
'pci_parity_count'
|
|
||||||
|
|
||||||
This attribute file will display the number of parity errors that
|
|
||||||
have been detected.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
131
Documentation/fb/sh7760fb.txt
Normal file
131
Documentation/fb/sh7760fb.txt
Normal file
@ -0,0 +1,131 @@
|
|||||||
|
SH7760/SH7763 integrated LCDC Framebuffer driver
|
||||||
|
================================================
|
||||||
|
|
||||||
|
0. Overwiew
|
||||||
|
-----------
|
||||||
|
The SH7760/SH7763 have an integrated LCD Display controller (LCDC) which
|
||||||
|
supports (in theory) resolutions ranging from 1x1 to 1024x1024,
|
||||||
|
with color depths ranging from 1 to 16 bits, on STN, DSTN and TFT Panels.
|
||||||
|
|
||||||
|
Caveats:
|
||||||
|
* Framebuffer memory must be a large chunk allocated at the top
|
||||||
|
of Area3 (HW requirement). Because of this requirement you should NOT
|
||||||
|
make the driver a module since at runtime it may become impossible to
|
||||||
|
get a large enough contiguous chunk of memory.
|
||||||
|
|
||||||
|
* The driver does not support changing resolution while loaded
|
||||||
|
(displays aren't hotpluggable anyway)
|
||||||
|
|
||||||
|
* Heavy flickering may be observed
|
||||||
|
a) if you're using 15/16bit color modes at >= 640x480 px resolutions,
|
||||||
|
b) during PCMCIA (or any other slow bus) activity.
|
||||||
|
|
||||||
|
* Rotation works only 90degress clockwise, and only if horizontal
|
||||||
|
resolution is <= 320 pixels.
|
||||||
|
|
||||||
|
files: drivers/video/sh7760fb.c
|
||||||
|
include/asm-sh/sh7760fb.h
|
||||||
|
Documentation/fb/sh7760fb.txt
|
||||||
|
|
||||||
|
1. Platform setup
|
||||||
|
-----------------
|
||||||
|
SH7760:
|
||||||
|
Video data is fetched via the DMABRG DMA engine, so you have to
|
||||||
|
configure the SH DMAC for DMABRG mode (write 0x94808080 to the
|
||||||
|
DMARSRA register somewhere at boot).
|
||||||
|
|
||||||
|
PFC registers PCCR and PCDR must be set to peripheral mode.
|
||||||
|
(write zeros to both).
|
||||||
|
|
||||||
|
The driver does NOT do the above for you since board setup is, well, job
|
||||||
|
of the board setup code.
|
||||||
|
|
||||||
|
2. Panel definitions
|
||||||
|
--------------------
|
||||||
|
The LCDC must explicitly be told about the type of LCD panel
|
||||||
|
attached. Data must be wrapped in a "struct sh7760fb_platdata" and
|
||||||
|
passed to the driver as platform_data.
|
||||||
|
|
||||||
|
Suggest you take a closer look at the SH7760 Manual, Section 30.
|
||||||
|
(http://documentation.renesas.com/eng/products/mpumcu/e602291_sh7760.pdf)
|
||||||
|
|
||||||
|
The following code illustrates what needs to be done to
|
||||||
|
get the framebuffer working on a 640x480 TFT:
|
||||||
|
|
||||||
|
====================== cut here ======================================
|
||||||
|
|
||||||
|
#include <linux/fb.h>
|
||||||
|
#include <asm/sh7760fb.h>
|
||||||
|
|
||||||
|
/*
|
||||||
|
* NEC NL6440bc26-01 640x480 TFT
|
||||||
|
* dotclock 25175 kHz
|
||||||
|
* Xres 640 Yres 480
|
||||||
|
* Htotal 800 Vtotal 525
|
||||||
|
* HsynStart 656 VsynStart 490
|
||||||
|
* HsynLenn 30 VsynLenn 2
|
||||||
|
*
|
||||||
|
* The linux framebuffer layer does not use the syncstart/synclen
|
||||||
|
* values but right/left/upper/lower margin values. The comments
|
||||||
|
* for the x_margin explain how to calculate those from given
|
||||||
|
* panel sync timings.
|
||||||
|
*/
|
||||||
|
static struct fb_videomode nl6448bc26 = {
|
||||||
|
.name = "NL6448BC26",
|
||||||
|
.refresh = 60,
|
||||||
|
.xres = 640,
|
||||||
|
.yres = 480,
|
||||||
|
.pixclock = 39683, /* in picoseconds! */
|
||||||
|
.hsync_len = 30,
|
||||||
|
.vsync_len = 2,
|
||||||
|
.left_margin = 114, /* HTOT - (HSYNSLEN + HSYNSTART) */
|
||||||
|
.right_margin = 16, /* HSYNSTART - XRES */
|
||||||
|
.upper_margin = 33, /* VTOT - (VSYNLEN + VSYNSTART) */
|
||||||
|
.lower_margin = 10, /* VSYNSTART - YRES */
|
||||||
|
.sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
|
||||||
|
.vmode = FB_VMODE_NONINTERLACED,
|
||||||
|
.flag = 0,
|
||||||
|
};
|
||||||
|
|
||||||
|
static struct sh7760fb_platdata sh7760fb_nl6448 = {
|
||||||
|
.def_mode = &nl6448bc26,
|
||||||
|
.ldmtr = LDMTR_TFT_COLOR_16, /* 16bit TFT panel */
|
||||||
|
.lddfr = LDDFR_8BPP, /* we want 8bit output */
|
||||||
|
.ldpmmr = 0x0070,
|
||||||
|
.ldpspr = 0x0500,
|
||||||
|
.ldaclnr = 0,
|
||||||
|
.ldickr = LDICKR_CLKSRC(LCDC_CLKSRC_EXTERNAL) |
|
||||||
|
LDICKR_CLKDIV(1),
|
||||||
|
.rotate = 0,
|
||||||
|
.novsync = 1,
|
||||||
|
.blank = NULL,
|
||||||
|
};
|
||||||
|
|
||||||
|
/* SH7760:
|
||||||
|
* 0xFE300800: 256 * 4byte xRGB palette ram
|
||||||
|
* 0xFE300C00: 42 bytes ctrl registers
|
||||||
|
*/
|
||||||
|
static struct resource sh7760_lcdc_res[] = {
|
||||||
|
[0] = {
|
||||||
|
.start = 0xFE300800,
|
||||||
|
.end = 0xFE300CFF,
|
||||||
|
.flags = IORESOURCE_MEM,
|
||||||
|
},
|
||||||
|
[1] = {
|
||||||
|
.start = 65,
|
||||||
|
.end = 65,
|
||||||
|
.flags = IORESOURCE_IRQ,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
static struct platform_device sh7760_lcdc_dev = {
|
||||||
|
.dev = {
|
||||||
|
.platform_data = &sh7760fb_nl6448,
|
||||||
|
},
|
||||||
|
.name = "sh7760-lcdc",
|
||||||
|
.id = -1,
|
||||||
|
.resource = sh7760_lcdc_res,
|
||||||
|
.num_resources = ARRAY_SIZE(sh7760_lcdc_res),
|
||||||
|
};
|
||||||
|
|
||||||
|
====================== cut here ======================================
|
@ -3,11 +3,25 @@ Tridentfb is a framebuffer driver for some Trident chip based cards.
|
|||||||
The following list of chips is thought to be supported although not all are
|
The following list of chips is thought to be supported although not all are
|
||||||
tested:
|
tested:
|
||||||
|
|
||||||
those from the Image series with Cyber in their names - accelerated
|
those from the TGUI series 9440/96XX and with Cyber in their names
|
||||||
those with Blade in their names (Blade3D,CyberBlade...) - accelerated
|
those from the Image series and with Cyber in their names
|
||||||
the newer CyberBladeXP family - nonaccelerated
|
those with Blade in their names (Blade3D,CyberBlade...)
|
||||||
|
the newer CyberBladeXP family
|
||||||
|
|
||||||
Only PCI/AGP based cards are supported, none of the older Tridents.
|
All families are accelerated. Only PCI/AGP based cards are supported,
|
||||||
|
none of the older Tridents.
|
||||||
|
The driver supports 8, 16 and 32 bits per pixel depths.
|
||||||
|
The TGUI family requires a line length to be power of 2 if acceleration
|
||||||
|
is enabled. This means that range of possible resolutions and bpp is
|
||||||
|
limited comparing to the range if acceleration is disabled (see list
|
||||||
|
of parameters below).
|
||||||
|
|
||||||
|
Known bugs:
|
||||||
|
1. The driver randomly locks up on 3DImage975 chip with acceleration
|
||||||
|
enabled. The same happens in X11 (Xorg).
|
||||||
|
2. The ramdac speeds require some more fine tuning. It is possible to
|
||||||
|
switch resolution which the chip does not support at some depths for
|
||||||
|
older chips.
|
||||||
|
|
||||||
How to use it?
|
How to use it?
|
||||||
==============
|
==============
|
||||||
@ -17,12 +31,11 @@ video=tridentfb
|
|||||||
|
|
||||||
The parameters for tridentfb are concatenated with a ':' as in this example.
|
The parameters for tridentfb are concatenated with a ':' as in this example.
|
||||||
|
|
||||||
video=tridentfb:800x600,bpp=16,noaccel
|
video=tridentfb:800x600-16@75,noaccel
|
||||||
|
|
||||||
The second level parameters that tridentfb understands are:
|
The second level parameters that tridentfb understands are:
|
||||||
|
|
||||||
noaccel - turns off acceleration (when it doesn't work for your card)
|
noaccel - turns off acceleration (when it doesn't work for your card)
|
||||||
accel - force text acceleration (for boards which by default are noacceled)
|
|
||||||
|
|
||||||
fp - use flat panel related stuff
|
fp - use flat panel related stuff
|
||||||
crt - assume monitor is present instead of fp
|
crt - assume monitor is present instead of fp
|
||||||
@ -31,21 +44,24 @@ center - for flat panels and resolutions smaller than native size center the
|
|||||||
image, otherwise use
|
image, otherwise use
|
||||||
stretch
|
stretch
|
||||||
|
|
||||||
memsize - integer value in Kb, use if your card's memory size is misdetected.
|
memsize - integer value in KB, use if your card's memory size is misdetected.
|
||||||
look at the driver output to see what it says when initializing.
|
look at the driver output to see what it says when initializing.
|
||||||
memdiff - integer value in Kb,should be nonzero if your card reports
|
|
||||||
more memory than it actually has.For instance mine is 192K less than
|
memdiff - integer value in KB, should be nonzero if your card reports
|
||||||
|
more memory than it actually has. For instance mine is 192K less than
|
||||||
detection says in all three BIOS selectable situations 2M, 4M, 8M.
|
detection says in all three BIOS selectable situations 2M, 4M, 8M.
|
||||||
Only use if your video memory is taken from main memory hence of
|
Only use if your video memory is taken from main memory hence of
|
||||||
configurable size.Otherwise use memsize.
|
configurable size. Otherwise use memsize.
|
||||||
If in some modes which barely fit the memory you see garbage at the bottom
|
If in some modes which barely fit the memory you see garbage
|
||||||
this might help by not letting change to that mode anymore.
|
at the bottom this might help by not letting change to that mode
|
||||||
|
anymore.
|
||||||
|
|
||||||
nativex - the width in pixels of the flat panel.If you know it (usually 1024
|
nativex - the width in pixels of the flat panel.If you know it (usually 1024
|
||||||
800 or 1280) and it is not what the driver seems to detect use it.
|
800 or 1280) and it is not what the driver seems to detect use it.
|
||||||
|
|
||||||
bpp - bits per pixel (8,16 or 32)
|
bpp - bits per pixel (8,16 or 32)
|
||||||
mode - a mode name like 800x600 (as described in Documentation/fb/modedb.txt)
|
mode - a mode name like 800x600-8@75 as described in
|
||||||
|
Documentation/fb/modedb.txt
|
||||||
|
|
||||||
Using insane values for the above parameters will probably result in driver
|
Using insane values for the above parameters will probably result in driver
|
||||||
misbehaviour so take care(for instance memsize=12345678 or memdiff=23784 or
|
misbehaviour so take care(for instance memsize=12345678 or memdiff=23784 or
|
||||||
|
@ -138,24 +138,6 @@ Who: Kay Sievers <kay.sievers@suse.de>
|
|||||||
|
|
||||||
---------------------------
|
---------------------------
|
||||||
|
|
||||||
What: find_task_by_pid
|
|
||||||
When: 2.6.26
|
|
||||||
Why: With pid namespaces, calling this funciton will return the
|
|
||||||
wrong task when called from inside a namespace.
|
|
||||||
|
|
||||||
The best way to save a task pid and find a task by this
|
|
||||||
pid later, is to find this task's struct pid pointer (or get
|
|
||||||
it directly from the task) and call pid_task() later.
|
|
||||||
|
|
||||||
If someone really needs to get a task by its pid_t, then
|
|
||||||
he most likely needs the find_task_by_vpid() to get the
|
|
||||||
task from the same namespace as the current task is in, but
|
|
||||||
this may be not so in general.
|
|
||||||
|
|
||||||
Who: Pavel Emelyanov <xemul@openvz.org>
|
|
||||||
|
|
||||||
---------------------------
|
|
||||||
|
|
||||||
What: ACPI procfs interface
|
What: ACPI procfs interface
|
||||||
When: July 2008
|
When: July 2008
|
||||||
Why: ACPI sysfs conversion should be finished by January 2008.
|
Why: ACPI sysfs conversion should be finished by January 2008.
|
||||||
@ -300,14 +282,6 @@ Who: ocfs2-devel@oss.oracle.com
|
|||||||
|
|
||||||
---------------------------
|
---------------------------
|
||||||
|
|
||||||
What: asm/semaphore.h
|
|
||||||
When: 2.6.26
|
|
||||||
Why: Implementation became generic; users should now include
|
|
||||||
linux/semaphore.h instead.
|
|
||||||
Who: Matthew Wilcox <willy@linux.intel.com>
|
|
||||||
|
|
||||||
---------------------------
|
|
||||||
|
|
||||||
What: SCTP_GET_PEER_ADDRS_NUM_OLD, SCTP_GET_PEER_ADDRS_OLD,
|
What: SCTP_GET_PEER_ADDRS_NUM_OLD, SCTP_GET_PEER_ADDRS_OLD,
|
||||||
SCTP_GET_LOCAL_ADDRS_NUM_OLD, SCTP_GET_LOCAL_ADDRS_OLD
|
SCTP_GET_LOCAL_ADDRS_NUM_OLD, SCTP_GET_LOCAL_ADDRS_OLD
|
||||||
When: June 2009
|
When: June 2009
|
||||||
|
@ -510,6 +510,7 @@ prototypes:
|
|||||||
void (*close)(struct vm_area_struct*);
|
void (*close)(struct vm_area_struct*);
|
||||||
int (*fault)(struct vm_area_struct*, struct vm_fault *);
|
int (*fault)(struct vm_area_struct*, struct vm_fault *);
|
||||||
int (*page_mkwrite)(struct vm_area_struct *, struct page *);
|
int (*page_mkwrite)(struct vm_area_struct *, struct page *);
|
||||||
|
int (*access)(struct vm_area_struct *, unsigned long, void*, int, int);
|
||||||
|
|
||||||
locking rules:
|
locking rules:
|
||||||
BKL mmap_sem PageLocked(page)
|
BKL mmap_sem PageLocked(page)
|
||||||
@ -517,6 +518,7 @@ open: no yes
|
|||||||
close: no yes
|
close: no yes
|
||||||
fault: no yes
|
fault: no yes
|
||||||
page_mkwrite: no yes no
|
page_mkwrite: no yes no
|
||||||
|
access: no yes
|
||||||
|
|
||||||
->page_mkwrite() is called when a previously read-only page is
|
->page_mkwrite() is called when a previously read-only page is
|
||||||
about to become writeable. The file system is responsible for
|
about to become writeable. The file system is responsible for
|
||||||
@ -525,6 +527,11 @@ taking to lock out truncate, the page range should be verified to be
|
|||||||
within i_size. The page mapping should also be checked that it is not
|
within i_size. The page mapping should also be checked that it is not
|
||||||
NULL.
|
NULL.
|
||||||
|
|
||||||
|
->access() is called when get_user_pages() fails in
|
||||||
|
acces_process_vm(), typically used to debug a process through
|
||||||
|
/proc/pid/mem or ptrace. This function is needed only for
|
||||||
|
VM_IO | VM_PFNMAP VMAs.
|
||||||
|
|
||||||
================================================================================
|
================================================================================
|
||||||
Dubious stuff
|
Dubious stuff
|
||||||
|
|
||||||
|
106
Documentation/filesystems/omfs.txt
Normal file
106
Documentation/filesystems/omfs.txt
Normal file
@ -0,0 +1,106 @@
|
|||||||
|
Optimized MPEG Filesystem (OMFS)
|
||||||
|
|
||||||
|
Overview
|
||||||
|
========
|
||||||
|
|
||||||
|
OMFS is a filesystem created by SonicBlue for use in the ReplayTV DVR
|
||||||
|
and Rio Karma MP3 player. The filesystem is extent-based, utilizing
|
||||||
|
block sizes from 2k to 8k, with hash-based directories. This
|
||||||
|
filesystem driver may be used to read and write disks from these
|
||||||
|
devices.
|
||||||
|
|
||||||
|
Note, it is not recommended that this FS be used in place of a general
|
||||||
|
filesystem for your own streaming media device. Native Linux filesystems
|
||||||
|
will likely perform better.
|
||||||
|
|
||||||
|
More information is available at:
|
||||||
|
|
||||||
|
http://linux-karma.sf.net/
|
||||||
|
|
||||||
|
Various utilities, including mkomfs and omfsck, are included with
|
||||||
|
omfsprogs, available at:
|
||||||
|
|
||||||
|
http://bobcopeland.com/karma/
|
||||||
|
|
||||||
|
Instructions are included in its README.
|
||||||
|
|
||||||
|
Options
|
||||||
|
=======
|
||||||
|
|
||||||
|
OMFS supports the following mount-time options:
|
||||||
|
|
||||||
|
uid=n - make all files owned by specified user
|
||||||
|
gid=n - make all files owned by specified group
|
||||||
|
umask=xxx - set permission umask to xxx
|
||||||
|
fmask=xxx - set umask to xxx for files
|
||||||
|
dmask=xxx - set umask to xxx for directories
|
||||||
|
|
||||||
|
Disk format
|
||||||
|
===========
|
||||||
|
|
||||||
|
OMFS discriminates between "sysblocks" and normal data blocks. The sysblock
|
||||||
|
group consists of super block information, file metadata, directory structures,
|
||||||
|
and extents. Each sysblock has a header containing CRCs of the entire
|
||||||
|
sysblock, and may be mirrored in successive blocks on the disk. A sysblock may
|
||||||
|
have a smaller size than a data block, but since they are both addressed by the
|
||||||
|
same 64-bit block number, any remaining space in the smaller sysblock is
|
||||||
|
unused.
|
||||||
|
|
||||||
|
Sysblock header information:
|
||||||
|
|
||||||
|
struct omfs_header {
|
||||||
|
__be64 h_self; /* FS block where this is located */
|
||||||
|
__be32 h_body_size; /* size of useful data after header */
|
||||||
|
__be16 h_crc; /* crc-ccitt of body_size bytes */
|
||||||
|
char h_fill1[2];
|
||||||
|
u8 h_version; /* version, always 1 */
|
||||||
|
char h_type; /* OMFS_INODE_X */
|
||||||
|
u8 h_magic; /* OMFS_IMAGIC */
|
||||||
|
u8 h_check_xor; /* XOR of header bytes before this */
|
||||||
|
__be32 h_fill2;
|
||||||
|
};
|
||||||
|
|
||||||
|
Files and directories are both represented by omfs_inode:
|
||||||
|
|
||||||
|
struct omfs_inode {
|
||||||
|
struct omfs_header i_head; /* header */
|
||||||
|
__be64 i_parent; /* parent containing this inode */
|
||||||
|
__be64 i_sibling; /* next inode in hash bucket */
|
||||||
|
__be64 i_ctime; /* ctime, in milliseconds */
|
||||||
|
char i_fill1[35];
|
||||||
|
char i_type; /* OMFS_[DIR,FILE] */
|
||||||
|
__be32 i_fill2;
|
||||||
|
char i_fill3[64];
|
||||||
|
char i_name[OMFS_NAMELEN]; /* filename */
|
||||||
|
__be64 i_size; /* size of file, in bytes */
|
||||||
|
};
|
||||||
|
|
||||||
|
Directories in OMFS are implemented as a large hash table. Filenames are
|
||||||
|
hashed then prepended into the bucket list beginning at OMFS_DIR_START.
|
||||||
|
Lookup requires hashing the filename, then seeking across i_sibling pointers
|
||||||
|
until a match is found on i_name. Empty buckets are represented by block
|
||||||
|
pointers with all-1s (~0).
|
||||||
|
|
||||||
|
A file is an omfs_inode structure followed by an extent table beginning at
|
||||||
|
OMFS_EXTENT_START:
|
||||||
|
|
||||||
|
struct omfs_extent_entry {
|
||||||
|
__be64 e_cluster; /* start location of a set of blocks */
|
||||||
|
__be64 e_blocks; /* number of blocks after e_cluster */
|
||||||
|
};
|
||||||
|
|
||||||
|
struct omfs_extent {
|
||||||
|
__be64 e_next; /* next extent table location */
|
||||||
|
__be32 e_extent_count; /* total # extents in this table */
|
||||||
|
__be32 e_fill;
|
||||||
|
struct omfs_extent_entry e_entry; /* start of extent entries */
|
||||||
|
};
|
||||||
|
|
||||||
|
Each extent holds the block offset followed by number of blocks allocated to
|
||||||
|
the extent. The final extent in each table is a terminator with e_cluster
|
||||||
|
being ~0 and e_blocks being ones'-complement of the total number of blocks
|
||||||
|
in the table.
|
||||||
|
|
||||||
|
If this table overflows, a continuation inode is written and pointed to by
|
||||||
|
e_next. These have a header but lack the rest of the inode structure.
|
||||||
|
|
@ -296,6 +296,7 @@ Table 1-4: Kernel info in /proc
|
|||||||
uptime System uptime
|
uptime System uptime
|
||||||
version Kernel version
|
version Kernel version
|
||||||
video bttv info of video resources (2.4)
|
video bttv info of video resources (2.4)
|
||||||
|
vmallocinfo Show vmalloced areas
|
||||||
..............................................................................
|
..............................................................................
|
||||||
|
|
||||||
You can, for example, check which interrupts are currently in use and what
|
You can, for example, check which interrupts are currently in use and what
|
||||||
@ -557,6 +558,49 @@ VmallocTotal: total size of vmalloc memory area
|
|||||||
VmallocUsed: amount of vmalloc area which is used
|
VmallocUsed: amount of vmalloc area which is used
|
||||||
VmallocChunk: largest contigious block of vmalloc area which is free
|
VmallocChunk: largest contigious block of vmalloc area which is free
|
||||||
|
|
||||||
|
..............................................................................
|
||||||
|
|
||||||
|
vmallocinfo:
|
||||||
|
|
||||||
|
Provides information about vmalloced/vmaped areas. One line per area,
|
||||||
|
containing the virtual address range of the area, size in bytes,
|
||||||
|
caller information of the creator, and optional information depending
|
||||||
|
on the kind of area :
|
||||||
|
|
||||||
|
pages=nr number of pages
|
||||||
|
phys=addr if a physical address was specified
|
||||||
|
ioremap I/O mapping (ioremap() and friends)
|
||||||
|
vmalloc vmalloc() area
|
||||||
|
vmap vmap()ed pages
|
||||||
|
user VM_USERMAP area
|
||||||
|
vpages buffer for pages pointers was vmalloced (huge area)
|
||||||
|
N<node>=nr (Only on NUMA kernels)
|
||||||
|
Number of pages allocated on memory node <node>
|
||||||
|
|
||||||
|
> cat /proc/vmallocinfo
|
||||||
|
0xffffc20000000000-0xffffc20000201000 2101248 alloc_large_system_hash+0x204 ...
|
||||||
|
/0x2c0 pages=512 vmalloc N0=128 N1=128 N2=128 N3=128
|
||||||
|
0xffffc20000201000-0xffffc20000302000 1052672 alloc_large_system_hash+0x204 ...
|
||||||
|
/0x2c0 pages=256 vmalloc N0=64 N1=64 N2=64 N3=64
|
||||||
|
0xffffc20000302000-0xffffc20000304000 8192 acpi_tb_verify_table+0x21/0x4f...
|
||||||
|
phys=7fee8000 ioremap
|
||||||
|
0xffffc20000304000-0xffffc20000307000 12288 acpi_tb_verify_table+0x21/0x4f...
|
||||||
|
phys=7fee7000 ioremap
|
||||||
|
0xffffc2000031d000-0xffffc2000031f000 8192 init_vdso_vars+0x112/0x210
|
||||||
|
0xffffc2000031f000-0xffffc2000032b000 49152 cramfs_uncompress_init+0x2e ...
|
||||||
|
/0x80 pages=11 vmalloc N0=3 N1=3 N2=2 N3=3
|
||||||
|
0xffffc2000033a000-0xffffc2000033d000 12288 sys_swapon+0x640/0xac0 ...
|
||||||
|
pages=2 vmalloc N1=2
|
||||||
|
0xffffc20000347000-0xffffc2000034c000 20480 xt_alloc_table_info+0xfe ...
|
||||||
|
/0x130 [x_tables] pages=4 vmalloc N0=4
|
||||||
|
0xffffffffa0000000-0xffffffffa000f000 61440 sys_init_module+0xc27/0x1d00 ...
|
||||||
|
pages=14 vmalloc N2=14
|
||||||
|
0xffffffffa000f000-0xffffffffa0014000 20480 sys_init_module+0xc27/0x1d00 ...
|
||||||
|
pages=4 vmalloc N1=4
|
||||||
|
0xffffffffa0014000-0xffffffffa0017000 12288 sys_init_module+0xc27/0x1d00 ...
|
||||||
|
pages=2 vmalloc N1=2
|
||||||
|
0xffffffffa0017000-0xffffffffa0022000 45056 sys_init_module+0xc27/0x1d00 ...
|
||||||
|
pages=10 vmalloc N0=10
|
||||||
|
|
||||||
1.3 IDE devices in /proc/ide
|
1.3 IDE devices in /proc/ide
|
||||||
----------------------------
|
----------------------------
|
||||||
@ -887,7 +931,7 @@ group_prealloc max_to_scan mb_groups mb_history min_to_scan order2_req
|
|||||||
stats stream_req
|
stats stream_req
|
||||||
|
|
||||||
mb_groups:
|
mb_groups:
|
||||||
This file gives the details of mutiblock allocator buddy cache of free blocks
|
This file gives the details of multiblock allocator buddy cache of free blocks
|
||||||
|
|
||||||
mb_history:
|
mb_history:
|
||||||
Multiblock allocation history.
|
Multiblock allocation history.
|
||||||
@ -1430,7 +1474,7 @@ used because pages_free(1355) is smaller than watermark + protection[2]
|
|||||||
normal page requirement. If requirement is DMA zone(index=0), protection[0]
|
normal page requirement. If requirement is DMA zone(index=0), protection[0]
|
||||||
(=0) is used.
|
(=0) is used.
|
||||||
|
|
||||||
zone[i]'s protection[j] is calculated by following exprssion.
|
zone[i]'s protection[j] is calculated by following expression.
|
||||||
|
|
||||||
(i < j):
|
(i < j):
|
||||||
zone[i]->protection[j]
|
zone[i]->protection[j]
|
||||||
|
@ -294,6 +294,16 @@ user-defined data with a channel, and is immediately available
|
|||||||
(including in create_buf_file()) via chan->private_data or
|
(including in create_buf_file()) via chan->private_data or
|
||||||
buf->chan->private_data.
|
buf->chan->private_data.
|
||||||
|
|
||||||
|
Buffer-only channels
|
||||||
|
--------------------
|
||||||
|
|
||||||
|
These channels have no files associated and can be created with
|
||||||
|
relay_open(NULL, NULL, ...). Such channels are useful in scenarios such
|
||||||
|
as when doing early tracing in the kernel, before the VFS is up. In these
|
||||||
|
cases, one may open a buffer-only channel and then call
|
||||||
|
relay_late_setup_files() when the kernel is ready to handle files,
|
||||||
|
to expose the buffered data to the userspace.
|
||||||
|
|
||||||
Channel 'modes'
|
Channel 'modes'
|
||||||
---------------
|
---------------
|
||||||
|
|
||||||
|
@ -96,6 +96,14 @@ shortname=lower|win95|winnt|mixed
|
|||||||
emulate the Windows 95 rule for create.
|
emulate the Windows 95 rule for create.
|
||||||
Default setting is `lower'.
|
Default setting is `lower'.
|
||||||
|
|
||||||
|
tz=UTC -- Interpret timestamps as UTC rather than local time.
|
||||||
|
This option disables the conversion of timestamps
|
||||||
|
between local time (as used by Windows on FAT) and UTC
|
||||||
|
(which Linux uses internally). This is particuluarly
|
||||||
|
useful when mounting devices (like digital cameras)
|
||||||
|
that are set to UTC in order to avoid the pitfalls of
|
||||||
|
local time.
|
||||||
|
|
||||||
<bool>: 0,1,yes,no,true,false
|
<bool>: 0,1,yes,no,true,false
|
||||||
|
|
||||||
TODO
|
TODO
|
||||||
|
@ -143,7 +143,7 @@ struct file_system_type {
|
|||||||
|
|
||||||
The get_sb() method has the following arguments:
|
The get_sb() method has the following arguments:
|
||||||
|
|
||||||
struct file_system_type *fs_type: decribes the filesystem, partly initialized
|
struct file_system_type *fs_type: describes the filesystem, partly initialized
|
||||||
by the specific filesystem code
|
by the specific filesystem code
|
||||||
|
|
||||||
int flags: mount flags
|
int flags: mount flags
|
||||||
@ -895,9 +895,9 @@ struct dentry_operations {
|
|||||||
iput() yourself
|
iput() yourself
|
||||||
|
|
||||||
d_dname: called when the pathname of a dentry should be generated.
|
d_dname: called when the pathname of a dentry should be generated.
|
||||||
Usefull for some pseudo filesystems (sockfs, pipefs, ...) to delay
|
Useful for some pseudo filesystems (sockfs, pipefs, ...) to delay
|
||||||
pathname generation. (Instead of doing it when dentry is created,
|
pathname generation. (Instead of doing it when dentry is created,
|
||||||
its done only when the path is needed.). Real filesystems probably
|
it's done only when the path is needed.). Real filesystems probably
|
||||||
dont want to use it, because their dentries are present in global
|
dont want to use it, because their dentries are present in global
|
||||||
dcache hash, so their hash should be an invariant. As no lock is
|
dcache hash, so their hash should be an invariant. As no lock is
|
||||||
held, d_dname() should not try to modify the dentry itself, unless
|
held, d_dname() should not try to modify the dentry itself, unless
|
||||||
|
@ -347,15 +347,12 @@ necessarily be nonportable.
|
|||||||
Dynamic definition of GPIOs is not currently standard; for example, as
|
Dynamic definition of GPIOs is not currently standard; for example, as
|
||||||
a side effect of configuring an add-on board with some GPIO expanders.
|
a side effect of configuring an add-on board with some GPIO expanders.
|
||||||
|
|
||||||
These calls are purely for kernel space, but a userspace API could be built
|
|
||||||
on top of them.
|
|
||||||
|
|
||||||
|
|
||||||
GPIO implementor's framework (OPTIONAL)
|
GPIO implementor's framework (OPTIONAL)
|
||||||
=======================================
|
=======================================
|
||||||
As noted earlier, there is an optional implementation framework making it
|
As noted earlier, there is an optional implementation framework making it
|
||||||
easier for platforms to support different kinds of GPIO controller using
|
easier for platforms to support different kinds of GPIO controller using
|
||||||
the same programming interface.
|
the same programming interface. This framework is called "gpiolib".
|
||||||
|
|
||||||
As a debugging aid, if debugfs is available a /sys/kernel/debug/gpio file
|
As a debugging aid, if debugfs is available a /sys/kernel/debug/gpio file
|
||||||
will be found there. That will list all the controllers registered through
|
will be found there. That will list all the controllers registered through
|
||||||
@ -392,11 +389,21 @@ either NULL or the label associated with that GPIO when it was requested.
|
|||||||
|
|
||||||
Platform Support
|
Platform Support
|
||||||
----------------
|
----------------
|
||||||
To support this framework, a platform's Kconfig will "select HAVE_GPIO_LIB"
|
To support this framework, a platform's Kconfig will "select" either
|
||||||
|
ARCH_REQUIRE_GPIOLIB or ARCH_WANT_OPTIONAL_GPIOLIB
|
||||||
and arrange that its <asm/gpio.h> includes <asm-generic/gpio.h> and defines
|
and arrange that its <asm/gpio.h> includes <asm-generic/gpio.h> and defines
|
||||||
three functions: gpio_get_value(), gpio_set_value(), and gpio_cansleep().
|
three functions: gpio_get_value(), gpio_set_value(), and gpio_cansleep().
|
||||||
They may also want to provide a custom value for ARCH_NR_GPIOS.
|
They may also want to provide a custom value for ARCH_NR_GPIOS.
|
||||||
|
|
||||||
|
ARCH_REQUIRE_GPIOLIB means that the gpio-lib code will always get compiled
|
||||||
|
into the kernel on that architecture.
|
||||||
|
|
||||||
|
ARCH_WANT_OPTIONAL_GPIOLIB means the gpio-lib code defaults to off and the user
|
||||||
|
can enable it and build it into the kernel optionally.
|
||||||
|
|
||||||
|
If neither of these options are selected, the platform does not support
|
||||||
|
GPIOs through GPIO-lib and the code cannot be enabled by the user.
|
||||||
|
|
||||||
Trivial implementations of those functions can directly use framework
|
Trivial implementations of those functions can directly use framework
|
||||||
code, which always dispatches through the gpio_chip:
|
code, which always dispatches through the gpio_chip:
|
||||||
|
|
||||||
@ -439,4 +446,120 @@ becomes available. That may mean the device should not be registered until
|
|||||||
calls for that GPIO can work. One way to address such dependencies is for
|
calls for that GPIO can work. One way to address such dependencies is for
|
||||||
such gpio_chip controllers to provide setup() and teardown() callbacks to
|
such gpio_chip controllers to provide setup() and teardown() callbacks to
|
||||||
board specific code; those board specific callbacks would register devices
|
board specific code; those board specific callbacks would register devices
|
||||||
once all the necessary resources are available.
|
once all the necessary resources are available, and remove them later when
|
||||||
|
the GPIO controller device becomes unavailable.
|
||||||
|
|
||||||
|
|
||||||
|
Sysfs Interface for Userspace (OPTIONAL)
|
||||||
|
========================================
|
||||||
|
Platforms which use the "gpiolib" implementors framework may choose to
|
||||||
|
configure a sysfs user interface to GPIOs. This is different from the
|
||||||
|
debugfs interface, since it provides control over GPIO direction and
|
||||||
|
value instead of just showing a gpio state summary. Plus, it could be
|
||||||
|
present on production systems without debugging support.
|
||||||
|
|
||||||
|
Given approprate hardware documentation for the system, userspace could
|
||||||
|
know for example that GPIO #23 controls the write protect line used to
|
||||||
|
protect boot loader segments in flash memory. System upgrade procedures
|
||||||
|
may need to temporarily remove that protection, first importing a GPIO,
|
||||||
|
then changing its output state, then updating the code before re-enabling
|
||||||
|
the write protection. In normal use, GPIO #23 would never be touched,
|
||||||
|
and the kernel would have no need to know about it.
|
||||||
|
|
||||||
|
Again depending on appropriate hardware documentation, on some systems
|
||||||
|
userspace GPIO can be used to determine system configuration data that
|
||||||
|
standard kernels won't know about. And for some tasks, simple userspace
|
||||||
|
GPIO drivers could be all that the system really needs.
|
||||||
|
|
||||||
|
Note that standard kernel drivers exist for common "LEDs and Buttons"
|
||||||
|
GPIO tasks: "leds-gpio" and "gpio_keys", respectively. Use those
|
||||||
|
instead of talking directly to the GPIOs; they integrate with kernel
|
||||||
|
frameworks better than your userspace code could.
|
||||||
|
|
||||||
|
|
||||||
|
Paths in Sysfs
|
||||||
|
--------------
|
||||||
|
There are three kinds of entry in /sys/class/gpio:
|
||||||
|
|
||||||
|
- Control interfaces used to get userspace control over GPIOs;
|
||||||
|
|
||||||
|
- GPIOs themselves; and
|
||||||
|
|
||||||
|
- GPIO controllers ("gpio_chip" instances).
|
||||||
|
|
||||||
|
That's in addition to standard files including the "device" symlink.
|
||||||
|
|
||||||
|
The control interfaces are write-only:
|
||||||
|
|
||||||
|
/sys/class/gpio/
|
||||||
|
|
||||||
|
"export" ... Userspace may ask the kernel to export control of
|
||||||
|
a GPIO to userspace by writing its number to this file.
|
||||||
|
|
||||||
|
Example: "echo 19 > export" will create a "gpio19" node
|
||||||
|
for GPIO #19, if that's not requested by kernel code.
|
||||||
|
|
||||||
|
"unexport" ... Reverses the effect of exporting to userspace.
|
||||||
|
|
||||||
|
Example: "echo 19 > unexport" will remove a "gpio19"
|
||||||
|
node exported using the "export" file.
|
||||||
|
|
||||||
|
GPIO signals have paths like /sys/class/gpio/gpio42/ (for GPIO #42)
|
||||||
|
and have the following read/write attributes:
|
||||||
|
|
||||||
|
/sys/class/gpio/gpioN/
|
||||||
|
|
||||||
|
"direction" ... reads as either "in" or "out". This value may
|
||||||
|
normally be written. Writing as "out" defaults to
|
||||||
|
initializing the value as low. To ensure glitch free
|
||||||
|
operation, values "low" and "high" may be written to
|
||||||
|
configure the GPIO as an output with that initial value.
|
||||||
|
|
||||||
|
Note that this attribute *will not exist* if the kernel
|
||||||
|
doesn't support changing the direction of a GPIO, or
|
||||||
|
it was exported by kernel code that didn't explicitly
|
||||||
|
allow userspace to reconfigure this GPIO's direction.
|
||||||
|
|
||||||
|
"value" ... reads as either 0 (low) or 1 (high). If the GPIO
|
||||||
|
is configured as an output, this value may be written;
|
||||||
|
any nonzero value is treated as high.
|
||||||
|
|
||||||
|
GPIO controllers have paths like /sys/class/gpio/chipchip42/ (for the
|
||||||
|
controller implementing GPIOs starting at #42) and have the following
|
||||||
|
read-only attributes:
|
||||||
|
|
||||||
|
/sys/class/gpio/gpiochipN/
|
||||||
|
|
||||||
|
"base" ... same as N, the first GPIO managed by this chip
|
||||||
|
|
||||||
|
"label" ... provided for diagnostics (not always unique)
|
||||||
|
|
||||||
|
"ngpio" ... how many GPIOs this manges (N to N + ngpio - 1)
|
||||||
|
|
||||||
|
Board documentation should in most cases cover what GPIOs are used for
|
||||||
|
what purposes. However, those numbers are not always stable; GPIOs on
|
||||||
|
a daughtercard might be different depending on the base board being used,
|
||||||
|
or other cards in the stack. In such cases, you may need to use the
|
||||||
|
gpiochip nodes (possibly in conjunction with schematics) to determine
|
||||||
|
the correct GPIO number to use for a given signal.
|
||||||
|
|
||||||
|
|
||||||
|
Exporting from Kernel code
|
||||||
|
--------------------------
|
||||||
|
Kernel code can explicitly manage exports of GPIOs which have already been
|
||||||
|
requested using gpio_request():
|
||||||
|
|
||||||
|
/* export the GPIO to userspace */
|
||||||
|
int gpio_export(unsigned gpio, bool direction_may_change);
|
||||||
|
|
||||||
|
/* reverse gpio_export() */
|
||||||
|
void gpio_unexport();
|
||||||
|
|
||||||
|
After a kernel driver requests a GPIO, it may only be made available in
|
||||||
|
the sysfs interface by gpio_export(). The driver can control whether the
|
||||||
|
signal direction may change. This helps drivers prevent userspace code
|
||||||
|
from accidentally clobbering important system state.
|
||||||
|
|
||||||
|
This explicit exporting can help with debugging (by making some kinds
|
||||||
|
of experiments easier), or can provide an always-there interface that's
|
||||||
|
suitable for documenting as part of a board support package.
|
||||||
|
@ -50,9 +50,9 @@ Note: For step 2, please make sure that host page size == TARGET_PAGE_SIZE of qe
|
|||||||
/usr/local/bin/qemu-system-ia64 -smp xx -m 512 -hda $your_image
|
/usr/local/bin/qemu-system-ia64 -smp xx -m 512 -hda $your_image
|
||||||
(xx is the number of virtual processors for the guest, now the maximum value is 4)
|
(xx is the number of virtual processors for the guest, now the maximum value is 4)
|
||||||
|
|
||||||
5. Known possibile issue on some platforms with old Firmware.
|
5. Known possible issue on some platforms with old Firmware.
|
||||||
|
|
||||||
If meet strange host crashe issues, try to solve it through either of the following ways:
|
In the event of strange host crash issues, try to solve it through either of the following ways:
|
||||||
|
|
||||||
(1): Upgrade your Firmware to the latest one.
|
(1): Upgrade your Firmware to the latest one.
|
||||||
|
|
||||||
@ -65,8 +65,8 @@ index 0b53344..f02b0f7 100644
|
|||||||
mov ar.pfs = loc1
|
mov ar.pfs = loc1
|
||||||
mov rp = loc0
|
mov rp = loc0
|
||||||
;;
|
;;
|
||||||
- srlz.d // seralize restoration of psr.l
|
- srlz.d // serialize restoration of psr.l
|
||||||
+ srlz.i // seralize restoration of psr.l
|
+ srlz.i // serialize restoration of psr.l
|
||||||
+ ;;
|
+ ;;
|
||||||
br.ret.sptk.many b0
|
br.ret.sptk.many b0
|
||||||
END(ia64_pal_call_static)
|
END(ia64_pal_call_static)
|
||||||
|
@ -31,7 +31,7 @@ The driver works with ALSA drivers simultaneously. For example, the xracer
|
|||||||
uses joystick as input device and PCM device as sound output in one time.
|
uses joystick as input device and PCM device as sound output in one time.
|
||||||
There are no sound or input collisions detected. The source code have
|
There are no sound or input collisions detected. The source code have
|
||||||
comments about them; but I've found the joystick can be initialized
|
comments about them; but I've found the joystick can be initialized
|
||||||
separately of ALSA modules. So, you canm use only one joystick driver
|
separately of ALSA modules. So, you can use only one joystick driver
|
||||||
without ALSA drivers. The ALSA drivers are not needed to compile or
|
without ALSA drivers. The ALSA drivers are not needed to compile or
|
||||||
run this driver.
|
run this driver.
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
To decode a hex IOCTL code:
|
To decode a hex IOCTL code:
|
||||||
|
|
||||||
Most architecures use this generic format, but check
|
Most architectures use this generic format, but check
|
||||||
include/ARCH/ioctl.h for specifics, e.g. powerpc
|
include/ARCH/ioctl.h for specifics, e.g. powerpc
|
||||||
uses 3 bits to encode read/write and 13 bits for size.
|
uses 3 bits to encode read/write and 13 bits for size.
|
||||||
|
|
||||||
@ -18,7 +18,7 @@ uses 3 bits to encode read/write and 13 bits for size.
|
|||||||
7-0 function #
|
7-0 function #
|
||||||
|
|
||||||
|
|
||||||
So for example 0x82187201 is a read with arg length of 0x218,
|
So for example 0x82187201 is a read with arg length of 0x218,
|
||||||
character 'r' function 1. Grepping the source reveals this is:
|
character 'r' function 1. Grepping the source reveals this is:
|
||||||
|
|
||||||
#define VFAT_IOCTL_READDIR_BOTH _IOR('r', 1, struct dirent [2])
|
#define VFAT_IOCTL_READDIR_BOTH _IOR('r', 1, struct dirent [2])
|
||||||
|
@ -143,7 +143,7 @@ disk and partition statistics are consistent again. Since we still don't
|
|||||||
keep record of the partition-relative address, an operation is attributed to
|
keep record of the partition-relative address, an operation is attributed to
|
||||||
the partition which contains the first sector of the request after the
|
the partition which contains the first sector of the request after the
|
||||||
eventual merges. As requests can be merged across partition, this could lead
|
eventual merges. As requests can be merged across partition, this could lead
|
||||||
to some (probably insignificant) innacuracy.
|
to some (probably insignificant) inaccuracy.
|
||||||
|
|
||||||
Additional notes
|
Additional notes
|
||||||
----------------
|
----------------
|
||||||
|
6
Documentation/isdn/README.mISDN
Normal file
6
Documentation/isdn/README.mISDN
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
mISDN is a new modular ISDN driver, in the long term it should replace
|
||||||
|
the old I4L driver architecture for passiv ISDN cards.
|
||||||
|
It was designed to allow a broad range of applications and interfaces
|
||||||
|
but only have the basic function in kernel, the interface to the user
|
||||||
|
space is based on sockets with a own address family AF_ISDN.
|
||||||
|
|
@ -87,7 +87,8 @@ parameter is applicable:
|
|||||||
SH SuperH architecture is enabled.
|
SH SuperH architecture is enabled.
|
||||||
SMP The kernel is an SMP kernel.
|
SMP The kernel is an SMP kernel.
|
||||||
SPARC Sparc architecture is enabled.
|
SPARC Sparc architecture is enabled.
|
||||||
SWSUSP Software suspend is enabled.
|
SWSUSP Software suspend (hibernation) is enabled.
|
||||||
|
SUSPEND System suspend states are enabled.
|
||||||
TS Appropriate touchscreen support is enabled.
|
TS Appropriate touchscreen support is enabled.
|
||||||
USB USB support is enabled.
|
USB USB support is enabled.
|
||||||
USBHID USB Human Interface Device support is enabled.
|
USBHID USB Human Interface Device support is enabled.
|
||||||
@ -147,10 +148,12 @@ and is between 256 and 4096 characters. It is defined in the file
|
|||||||
default: 0
|
default: 0
|
||||||
|
|
||||||
acpi_sleep= [HW,ACPI] Sleep options
|
acpi_sleep= [HW,ACPI] Sleep options
|
||||||
Format: { s3_bios, s3_mode, s3_beep, old_ordering }
|
Format: { s3_bios, s3_mode, s3_beep, s4_nohwsig, old_ordering }
|
||||||
See Documentation/power/video.txt for s3_bios and s3_mode.
|
See Documentation/power/video.txt for s3_bios and s3_mode.
|
||||||
s3_beep is for debugging; it makes the PC's speaker beep
|
s3_beep is for debugging; it makes the PC's speaker beep
|
||||||
as soon as the kernel's real-mode entry point is called.
|
as soon as the kernel's real-mode entry point is called.
|
||||||
|
s4_nohwsig prevents ACPI hardware signature from being
|
||||||
|
used during resume from hibernation.
|
||||||
old_ordering causes the ACPI 1.0 ordering of the _PTS
|
old_ordering causes the ACPI 1.0 ordering of the _PTS
|
||||||
control method, wrt putting devices into low power
|
control method, wrt putting devices into low power
|
||||||
states, to be enforced (the ACPI 2.0 ordering of _PTS is
|
states, to be enforced (the ACPI 2.0 ordering of _PTS is
|
||||||
@ -774,8 +777,22 @@ and is between 256 and 4096 characters. It is defined in the file
|
|||||||
hisax= [HW,ISDN]
|
hisax= [HW,ISDN]
|
||||||
See Documentation/isdn/README.HiSax.
|
See Documentation/isdn/README.HiSax.
|
||||||
|
|
||||||
hugepages= [HW,X86-32,IA-64] Maximal number of HugeTLB pages.
|
hugepages= [HW,X86-32,IA-64] HugeTLB pages to allocate at boot.
|
||||||
hugepagesz= [HW,IA-64,PPC] The size of the HugeTLB pages.
|
hugepagesz= [HW,IA-64,PPC,X86-64] The size of the HugeTLB pages.
|
||||||
|
On x86-64 and powerpc, this option can be specified
|
||||||
|
multiple times interleaved with hugepages= to reserve
|
||||||
|
huge pages of different sizes. Valid pages sizes on
|
||||||
|
x86-64 are 2M (when the CPU supports "pse") and 1G
|
||||||
|
(when the CPU supports the "pdpe1gb" cpuinfo flag)
|
||||||
|
Note that 1GB pages can only be allocated at boot time
|
||||||
|
using hugepages= and not freed afterwards.
|
||||||
|
default_hugepagesz=
|
||||||
|
[same as hugepagesz=] The size of the default
|
||||||
|
HugeTLB page size. This is the size represented by
|
||||||
|
the legacy /proc/ hugepages APIs, used for SHM, and
|
||||||
|
default size when mounting hugetlbfs filesystems.
|
||||||
|
Defaults to the default architecture's huge page size
|
||||||
|
if not specified.
|
||||||
|
|
||||||
i8042.direct [HW] Put keyboard port into non-translated mode
|
i8042.direct [HW] Put keyboard port into non-translated mode
|
||||||
i8042.dumbkbd [HW] Pretend that controller can only read data from
|
i8042.dumbkbd [HW] Pretend that controller can only read data from
|
||||||
@ -1225,6 +1242,14 @@ and is between 256 and 4096 characters. It is defined in the file
|
|||||||
|
|
||||||
mga= [HW,DRM]
|
mga= [HW,DRM]
|
||||||
|
|
||||||
|
mminit_loglevel=
|
||||||
|
[KNL] When CONFIG_DEBUG_MEMORY_INIT is set, this
|
||||||
|
parameter allows control of the logging verbosity for
|
||||||
|
the additional memory initialisation checks. A value
|
||||||
|
of 0 disables mminit logging and a level of 4 will
|
||||||
|
log everything. Information is printed at KERN_DEBUG
|
||||||
|
so loglevel=8 may also need to be specified.
|
||||||
|
|
||||||
mousedev.tap_time=
|
mousedev.tap_time=
|
||||||
[MOUSE] Maximum time between finger touching and
|
[MOUSE] Maximum time between finger touching and
|
||||||
leaving touchpad surface for touch to be considered
|
leaving touchpad surface for touch to be considered
|
||||||
@ -2101,6 +2126,12 @@ and is between 256 and 4096 characters. It is defined in the file
|
|||||||
|
|
||||||
tdfx= [HW,DRM]
|
tdfx= [HW,DRM]
|
||||||
|
|
||||||
|
test_suspend= [SUSPEND]
|
||||||
|
Specify "mem" (for Suspend-to-RAM) or "standby" (for
|
||||||
|
standby suspend) as the system sleep state to briefly
|
||||||
|
enter during system startup. The system is woken from
|
||||||
|
this state using a wakeup-capable RTC alarm.
|
||||||
|
|
||||||
thash_entries= [KNL,NET]
|
thash_entries= [KNL,NET]
|
||||||
Set number of hash buckets for TCP connection
|
Set number of hash buckets for TCP connection
|
||||||
|
|
||||||
@ -2128,13 +2159,6 @@ and is between 256 and 4096 characters. It is defined in the file
|
|||||||
<deci-seconds>: poll all this frequency
|
<deci-seconds>: poll all this frequency
|
||||||
0: no polling (default)
|
0: no polling (default)
|
||||||
|
|
||||||
tipar.timeout= [HW,PPT]
|
|
||||||
Set communications timeout in tenths of a second
|
|
||||||
(default 15).
|
|
||||||
|
|
||||||
tipar.delay= [HW,PPT]
|
|
||||||
Set inter-bit delay in microseconds (default 10).
|
|
||||||
|
|
||||||
tmscsim= [HW,SCSI]
|
tmscsim= [HW,SCSI]
|
||||||
See comment before function dc390_setup() in
|
See comment before function dc390_setup() in
|
||||||
drivers/scsi/tmscsim.c.
|
drivers/scsi/tmscsim.c.
|
||||||
|
@ -864,7 +864,7 @@ payload contents" for more information.
|
|||||||
request_key_with_auxdata() respectively.
|
request_key_with_auxdata() respectively.
|
||||||
|
|
||||||
These two functions return with the key potentially still under
|
These two functions return with the key potentially still under
|
||||||
construction. To wait for contruction completion, the following should be
|
construction. To wait for construction completion, the following should be
|
||||||
called:
|
called:
|
||||||
|
|
||||||
int wait_for_key_construction(struct key *key, bool intr);
|
int wait_for_key_construction(struct key *key, bool intr);
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
ThinkPad ACPI Extras Driver
|
ThinkPad ACPI Extras Driver
|
||||||
|
|
||||||
Version 0.20
|
Version 0.21
|
||||||
April 09th, 2008
|
May 29th, 2008
|
||||||
|
|
||||||
Borislav Deianov <borislav@users.sf.net>
|
Borislav Deianov <borislav@users.sf.net>
|
||||||
Henrique de Moraes Holschuh <hmh@hmh.eng.br>
|
Henrique de Moraes Holschuh <hmh@hmh.eng.br>
|
||||||
@ -621,7 +621,8 @@ Bluetooth
|
|||||||
---------
|
---------
|
||||||
|
|
||||||
procfs: /proc/acpi/ibm/bluetooth
|
procfs: /proc/acpi/ibm/bluetooth
|
||||||
sysfs device attribute: bluetooth_enable
|
sysfs device attribute: bluetooth_enable (deprecated)
|
||||||
|
sysfs rfkill class: switch "tpacpi_bluetooth_sw"
|
||||||
|
|
||||||
This feature shows the presence and current state of a ThinkPad
|
This feature shows the presence and current state of a ThinkPad
|
||||||
Bluetooth device in the internal ThinkPad CDC slot.
|
Bluetooth device in the internal ThinkPad CDC slot.
|
||||||
@ -643,8 +644,12 @@ Sysfs notes:
|
|||||||
0: disables Bluetooth / Bluetooth is disabled
|
0: disables Bluetooth / Bluetooth is disabled
|
||||||
1: enables Bluetooth / Bluetooth is enabled.
|
1: enables Bluetooth / Bluetooth is enabled.
|
||||||
|
|
||||||
Note: this interface will be probably be superseded by the
|
Note: this interface has been superseded by the generic rfkill
|
||||||
generic rfkill class, so it is NOT to be considered stable yet.
|
class. It has been deprecated, and it will be removed in year
|
||||||
|
2010.
|
||||||
|
|
||||||
|
rfkill controller switch "tpacpi_bluetooth_sw": refer to
|
||||||
|
Documentation/rfkill.txt for details.
|
||||||
|
|
||||||
Video output control -- /proc/acpi/ibm/video
|
Video output control -- /proc/acpi/ibm/video
|
||||||
--------------------------------------------
|
--------------------------------------------
|
||||||
@ -1374,7 +1379,8 @@ EXPERIMENTAL: WAN
|
|||||||
-----------------
|
-----------------
|
||||||
|
|
||||||
procfs: /proc/acpi/ibm/wan
|
procfs: /proc/acpi/ibm/wan
|
||||||
sysfs device attribute: wwan_enable
|
sysfs device attribute: wwan_enable (deprecated)
|
||||||
|
sysfs rfkill class: switch "tpacpi_wwan_sw"
|
||||||
|
|
||||||
This feature is marked EXPERIMENTAL because the implementation
|
This feature is marked EXPERIMENTAL because the implementation
|
||||||
directly accesses hardware registers and may not work as expected. USE
|
directly accesses hardware registers and may not work as expected. USE
|
||||||
@ -1404,8 +1410,12 @@ Sysfs notes:
|
|||||||
0: disables WWAN card / WWAN card is disabled
|
0: disables WWAN card / WWAN card is disabled
|
||||||
1: enables WWAN card / WWAN card is enabled.
|
1: enables WWAN card / WWAN card is enabled.
|
||||||
|
|
||||||
Note: this interface will be probably be superseded by the
|
Note: this interface has been superseded by the generic rfkill
|
||||||
generic rfkill class, so it is NOT to be considered stable yet.
|
class. It has been deprecated, and it will be removed in year
|
||||||
|
2010.
|
||||||
|
|
||||||
|
rfkill controller switch "tpacpi_wwan_sw": refer to
|
||||||
|
Documentation/rfkill.txt for details.
|
||||||
|
|
||||||
Multiple Commands, Module Parameters
|
Multiple Commands, Module Parameters
|
||||||
------------------------------------
|
------------------------------------
|
||||||
|
@ -59,7 +59,7 @@ Hardware accelerated blink of LEDs
|
|||||||
|
|
||||||
Some LEDs can be programmed to blink without any CPU interaction. To
|
Some LEDs can be programmed to blink without any CPU interaction. To
|
||||||
support this feature, a LED driver can optionally implement the
|
support this feature, a LED driver can optionally implement the
|
||||||
blink_set() function (see <linux/leds.h>). If implemeted, triggers can
|
blink_set() function (see <linux/leds.h>). If implemented, triggers can
|
||||||
attempt to use it before falling back to software timers. The blink_set()
|
attempt to use it before falling back to software timers. The blink_set()
|
||||||
function should return 0 if the blink setting is supported, or -EINVAL
|
function should return 0 if the blink setting is supported, or -EINVAL
|
||||||
otherwise, which means that LED blinking will be handled by software.
|
otherwise, which means that LED blinking will be handled by software.
|
||||||
|
@ -36,7 +36,7 @@ It can be done by slightly modifying the standard atomic operations : only
|
|||||||
their UP variant must be kept. It typically means removing LOCK prefix (on
|
their UP variant must be kept. It typically means removing LOCK prefix (on
|
||||||
i386 and x86_64) and any SMP sychronization barrier. If the architecture does
|
i386 and x86_64) and any SMP sychronization barrier. If the architecture does
|
||||||
not have a different behavior between SMP and UP, including asm-generic/local.h
|
not have a different behavior between SMP and UP, including asm-generic/local.h
|
||||||
in your archtecture's local.h is sufficient.
|
in your architecture's local.h is sufficient.
|
||||||
|
|
||||||
The local_t type is defined as an opaque signed long by embedding an
|
The local_t type is defined as an opaque signed long by embedding an
|
||||||
atomic_long_t inside a structure. This is made so a cast from this type to a
|
atomic_long_t inside a structure. This is made so a cast from this type to a
|
||||||
|
@ -1,14 +1,22 @@
|
|||||||
=============================================================================
|
=============================================================================
|
||||||
|
MOXA Smartio/Industio Family Device Driver Installation Guide
|
||||||
|
for Linux Kernel 2.4.x, 2.6.x
|
||||||
|
Copyright (C) 2008, Moxa Inc.
|
||||||
|
=============================================================================
|
||||||
|
Date: 01/21/2008
|
||||||
|
|
||||||
MOXA Smartio Family Device Driver Ver 1.1 Installation Guide
|
|
||||||
for Linux Kernel 2.2.x and 2.0.3x
|
|
||||||
Copyright (C) 1999, Moxa Technologies Co, Ltd.
|
|
||||||
=============================================================================
|
|
||||||
Content
|
Content
|
||||||
|
|
||||||
1. Introduction
|
1. Introduction
|
||||||
2. System Requirement
|
2. System Requirement
|
||||||
3. Installation
|
3. Installation
|
||||||
|
3.1 Hardware installation
|
||||||
|
3.2 Driver files
|
||||||
|
3.3 Device naming convention
|
||||||
|
3.4 Module driver configuration
|
||||||
|
3.5 Static driver configuration for Linux kernel 2.4.x and 2.6.x.
|
||||||
|
3.6 Custom configuration
|
||||||
|
3.7 Verify driver installation
|
||||||
4. Utilities
|
4. Utilities
|
||||||
5. Setserial
|
5. Setserial
|
||||||
6. Troubleshooting
|
6. Troubleshooting
|
||||||
@ -16,27 +24,48 @@ Content
|
|||||||
-----------------------------------------------------------------------------
|
-----------------------------------------------------------------------------
|
||||||
1. Introduction
|
1. Introduction
|
||||||
|
|
||||||
The Smartio family Linux driver, Ver. 1.1, supports following multiport
|
The Smartio/Industio/UPCI family Linux driver supports following multiport
|
||||||
boards.
|
boards.
|
||||||
|
|
||||||
-C104P/H/HS, C104H/PCI, C104HS/PCI, CI-104J 4 port multiport board.
|
- 2 ports multiport board
|
||||||
-C168P/H/HS, C168H/PCI 8 port multiport board.
|
CP-102U, CP-102UL, CP-102UF
|
||||||
|
CP-132U-I, CP-132UL,
|
||||||
|
CP-132, CP-132I, CP132S, CP-132IS,
|
||||||
|
CI-132, CI-132I, CI-132IS,
|
||||||
|
(C102H, C102HI, C102HIS, C102P, CP-102, CP-102S)
|
||||||
|
|
||||||
This driver has been modified a little and cleaned up from the Moxa
|
- 4 ports multiport board
|
||||||
contributed driver code and merged into Linux 2.2.14pre. In particular
|
CP-104EL,
|
||||||
official major/minor numbers have been assigned which are different to
|
CP-104UL, CP-104JU,
|
||||||
those the original Moxa supplied driver used.
|
CP-134U, CP-134U-I,
|
||||||
|
C104H/PCI, C104HS/PCI,
|
||||||
|
CP-114, CP-114I, CP-114S, CP-114IS, CP-114UL,
|
||||||
|
C104H, C104HS,
|
||||||
|
CI-104J, CI-104JS,
|
||||||
|
CI-134, CI-134I, CI-134IS,
|
||||||
|
(C114HI, CT-114I, C104P)
|
||||||
|
POS-104UL,
|
||||||
|
CB-114,
|
||||||
|
CB-134I
|
||||||
|
|
||||||
|
- 8 ports multiport board
|
||||||
|
CP-118EL, CP-168EL,
|
||||||
|
CP-118U, CP-168U,
|
||||||
|
C168H/PCI,
|
||||||
|
C168H, C168HS,
|
||||||
|
(C168P),
|
||||||
|
CB-108
|
||||||
|
|
||||||
This driver and installation procedure have been developed upon Linux Kernel
|
This driver and installation procedure have been developed upon Linux Kernel
|
||||||
2.2.5 and backward compatible to 2.0.3x. This driver supports Intel x86 and
|
2.4.x and 2.6.x. This driver supports Intel x86 hardware platform. In order
|
||||||
Alpha hardware platform. In order to maintain compatibility, this version
|
to maintain compatibility, this version has also been properly tested with
|
||||||
has also been properly tested with RedHat, OpenLinux, TurboLinux and
|
RedHat, Mandrake, Fedora and S.u.S.E Linux. However, if compatibility problem
|
||||||
S.u.S.E Linux. However, if compatibility problem occurs, please contact
|
occurs, please contact Moxa at support@moxa.com.tw.
|
||||||
Moxa at support@moxa.com.tw.
|
|
||||||
|
|
||||||
In addition to device driver, useful utilities are also provided in this
|
In addition to device driver, useful utilities are also provided in this
|
||||||
version. They are
|
version. They are
|
||||||
- msdiag Diagnostic program for detecting installed Moxa Smartio boards.
|
- msdiag Diagnostic program for displaying installed Moxa
|
||||||
|
Smartio/Industio boards.
|
||||||
- msmon Monitor program to observe data count and line status signals.
|
- msmon Monitor program to observe data count and line status signals.
|
||||||
- msterm A simple terminal program which is useful in testing serial
|
- msterm A simple terminal program which is useful in testing serial
|
||||||
ports.
|
ports.
|
||||||
@ -47,8 +76,7 @@ Content
|
|||||||
GNU General Public License in this version. Please refer to GNU General
|
GNU General Public License in this version. Please refer to GNU General
|
||||||
Public License announcement in each source code file for more detail.
|
Public License announcement in each source code file for more detail.
|
||||||
|
|
||||||
In Moxa's ftp sites, you may always find latest driver at
|
In Moxa's Web sites, you may always find latest driver at http://web.moxa.com.
|
||||||
ftp://ftp.moxa.com or ftp://ftp.moxa.com.tw.
|
|
||||||
|
|
||||||
This version of driver can be installed as Loadable Module (Module driver)
|
This version of driver can be installed as Loadable Module (Module driver)
|
||||||
or built-in into kernel (Static driver). You may refer to following
|
or built-in into kernel (Static driver). You may refer to following
|
||||||
@ -61,8 +89,8 @@ Content
|
|||||||
|
|
||||||
-----------------------------------------------------------------------------
|
-----------------------------------------------------------------------------
|
||||||
2. System Requirement
|
2. System Requirement
|
||||||
- Hardware platform: Intel x86 or Alpha machine
|
- Hardware platform: Intel x86 machine
|
||||||
- Kernel version: 2.0.3x or 2.2.x
|
- Kernel version: 2.4.x or 2.6.x
|
||||||
- gcc version 2.72 or later
|
- gcc version 2.72 or later
|
||||||
- Maximum 4 boards can be installed in combination
|
- Maximum 4 boards can be installed in combination
|
||||||
|
|
||||||
@ -70,9 +98,18 @@ Content
|
|||||||
3. Installation
|
3. Installation
|
||||||
|
|
||||||
3.1 Hardware installation
|
3.1 Hardware installation
|
||||||
|
3.2 Driver files
|
||||||
|
3.3 Device naming convention
|
||||||
|
3.4 Module driver configuration
|
||||||
|
3.5 Static driver configuration for Linux kernel 2.4.x, 2.6.x.
|
||||||
|
3.6 Custom configuration
|
||||||
|
3.7 Verify driver installation
|
||||||
|
|
||||||
There are two types of buses, ISA and PCI, for Smartio family multiport
|
|
||||||
board.
|
3.1 Hardware installation
|
||||||
|
|
||||||
|
There are two types of buses, ISA and PCI, for Smartio/Industio
|
||||||
|
family multiport board.
|
||||||
|
|
||||||
ISA board
|
ISA board
|
||||||
---------
|
---------
|
||||||
@ -81,47 +118,57 @@ Content
|
|||||||
installation procedure in User's Manual before proceed any further.
|
installation procedure in User's Manual before proceed any further.
|
||||||
Please make sure the JP1 is open after the ISA board is set properly.
|
Please make sure the JP1 is open after the ISA board is set properly.
|
||||||
|
|
||||||
PCI board
|
PCI/UPCI board
|
||||||
---------
|
--------------
|
||||||
You may need to adjust IRQ usage in BIOS to avoid from IRQ conflict
|
You may need to adjust IRQ usage in BIOS to avoid from IRQ conflict
|
||||||
with other ISA devices. Please refer to hardware installation
|
with other ISA devices. Please refer to hardware installation
|
||||||
procedure in User's Manual in advance.
|
procedure in User's Manual in advance.
|
||||||
|
|
||||||
IRQ Sharing
|
PCI IRQ Sharing
|
||||||
-----------
|
-----------
|
||||||
Each port within the same multiport board shares the same IRQ. Up to
|
Each port within the same multiport board shares the same IRQ. Up to
|
||||||
4 Moxa Smartio Family multiport boards can be installed together on
|
4 Moxa Smartio/Industio PCI Family multiport boards can be installed
|
||||||
one system and they can share the same IRQ.
|
together on one system and they can share the same IRQ.
|
||||||
|
|
||||||
3.2 Driver files and device naming convention
|
|
||||||
|
3.2 Driver files
|
||||||
|
|
||||||
The driver file may be obtained from ftp, CD-ROM or floppy disk. The
|
The driver file may be obtained from ftp, CD-ROM or floppy disk. The
|
||||||
first step, anyway, is to copy driver file "mxser.tgz" into specified
|
first step, anyway, is to copy driver file "mxser.tgz" into specified
|
||||||
directory. e.g. /moxa. The execute commands as below.
|
directory. e.g. /moxa. The execute commands as below.
|
||||||
|
|
||||||
|
# cd /
|
||||||
|
# mkdir moxa
|
||||||
# cd /moxa
|
# cd /moxa
|
||||||
# tar xvf /dev/fd0
|
# tar xvf /dev/fd0
|
||||||
|
|
||||||
or
|
or
|
||||||
|
|
||||||
|
# cd /
|
||||||
|
# mkdir moxa
|
||||||
# cd /moxa
|
# cd /moxa
|
||||||
# cp /mnt/cdrom/<driver directory>/mxser.tgz .
|
# cp /mnt/cdrom/<driver directory>/mxser.tgz .
|
||||||
# tar xvfz mxser.tgz
|
# tar xvfz mxser.tgz
|
||||||
|
|
||||||
|
|
||||||
|
3.3 Device naming convention
|
||||||
|
|
||||||
You may find all the driver and utilities files in /moxa/mxser.
|
You may find all the driver and utilities files in /moxa/mxser.
|
||||||
Following installation procedure depends on the model you'd like to
|
Following installation procedure depends on the model you'd like to
|
||||||
run the driver. If you prefer module driver, please refer to 3.3.
|
run the driver. If you prefer module driver, please refer to 3.4.
|
||||||
If static driver is required, please refer to 3.4.
|
If static driver is required, please refer to 3.5.
|
||||||
|
|
||||||
Dialin and callout port
|
Dialin and callout port
|
||||||
-----------------------
|
-----------------------
|
||||||
This driver remains traditional serial device properties. There're
|
This driver remains traditional serial device properties. There are
|
||||||
two special file name for each serial port. One is dial-in port
|
two special file name for each serial port. One is dial-in port
|
||||||
which is named "ttyMxx". For callout port, the naming convention
|
which is named "ttyMxx". For callout port, the naming convention
|
||||||
is "cumxx".
|
is "cumxx".
|
||||||
|
|
||||||
Device naming when more than 2 boards installed
|
Device naming when more than 2 boards installed
|
||||||
-----------------------------------------------
|
-----------------------------------------------
|
||||||
Naming convention for each Smartio multiport board is pre-defined
|
Naming convention for each Smartio/Industio multiport board is
|
||||||
as below.
|
pre-defined as below.
|
||||||
|
|
||||||
Board Num. Dial-in Port Callout port
|
Board Num. Dial-in Port Callout port
|
||||||
1st board ttyM0 - ttyM7 cum0 - cum7
|
1st board ttyM0 - ttyM7 cum0 - cum7
|
||||||
@ -129,6 +176,12 @@ Content
|
|||||||
3rd board ttyM16 - ttyM23 cum16 - cum23
|
3rd board ttyM16 - ttyM23 cum16 - cum23
|
||||||
4th board ttyM24 - ttym31 cum24 - cum31
|
4th board ttyM24 - ttym31 cum24 - cum31
|
||||||
|
|
||||||
|
|
||||||
|
!!!!!!!!!!!!!!!!!!!! NOTE !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||||
|
Under Kernel 2.6 the cum Device is Obsolete. So use ttyM*
|
||||||
|
device instead.
|
||||||
|
!!!!!!!!!!!!!!!!!!!! NOTE !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||||
|
|
||||||
Board sequence
|
Board sequence
|
||||||
--------------
|
--------------
|
||||||
This driver will activate ISA boards according to the parameter set
|
This driver will activate ISA boards according to the parameter set
|
||||||
@ -138,69 +191,131 @@ Content
|
|||||||
For PCI boards, their sequence will be after ISA boards and C168H/PCI
|
For PCI boards, their sequence will be after ISA boards and C168H/PCI
|
||||||
has higher priority than C104H/PCI boards.
|
has higher priority than C104H/PCI boards.
|
||||||
|
|
||||||
3.3 Module driver configuration
|
3.4 Module driver configuration
|
||||||
Module driver is easiest way to install. If you prefer static driver
|
Module driver is easiest way to install. If you prefer static driver
|
||||||
installation, please skip this paragraph.
|
installation, please skip this paragraph.
|
||||||
1. Find "Makefile" in /moxa/mxser, then run
|
|
||||||
|
|
||||||
# make install
|
|
||||||
|
|
||||||
The driver files "mxser.o" and utilities will be properly compiled
|
------------- Prepare to use the MOXA driver--------------------
|
||||||
and copied to system directories respectively.Then run
|
3.4.1 Create tty device with correct major number
|
||||||
|
Before using MOXA driver, your system must have the tty devices
|
||||||
|
which are created with driver's major number. We offer one shell
|
||||||
|
script "msmknod" to simplify the procedure.
|
||||||
|
This step is only needed to be executed once. But you still
|
||||||
|
need to do this procedure when:
|
||||||
|
a. You change the driver's major number. Please refer the "3.7"
|
||||||
|
section.
|
||||||
|
b. Your total installed MOXA boards number is changed. Maybe you
|
||||||
|
add/delete one MOXA board.
|
||||||
|
c. You want to change the tty name. This needs to modify the
|
||||||
|
shell script "msmknod"
|
||||||
|
|
||||||
# insmod mxser
|
The procedure is:
|
||||||
|
|
||||||
to activate the modular driver. You may run "lsmod" to check
|
|
||||||
if "mxser.o" is activated.
|
|
||||||
|
|
||||||
2. Create special files by executing "msmknod".
|
|
||||||
# cd /moxa/mxser/driver
|
# cd /moxa/mxser/driver
|
||||||
# ./msmknod
|
# ./msmknod
|
||||||
|
|
||||||
Default major numbers for dial-in device and callout device are
|
This shell script will require the major number for dial-in
|
||||||
174, 175. Msmknod will delete any special files occupying the same
|
device and callout device to create tty device. You also need
|
||||||
device naming.
|
to specify the total installed MOXA board number. Default major
|
||||||
|
numbers for dial-in device and callout device are 30, 35. If
|
||||||
|
you need to change to other number, please refer section "3.7"
|
||||||
|
for more detailed procedure.
|
||||||
|
Msmknod will delete any special files occupying the same device
|
||||||
|
naming.
|
||||||
|
|
||||||
3. Up to now, you may manually execute "insmod mxser" to activate
|
3.4.2 Build the MOXA driver and utilities
|
||||||
this driver and run "rmmod mxser" to remove it. However, it's
|
Before using the MOXA driver and utilities, you need compile the
|
||||||
better to have a boot time configuration to eliminate manual
|
all the source code. This step is only need to be executed once.
|
||||||
operation.
|
But you still re-compile the source code if you modify the source
|
||||||
Boot time configuration can be achieved by rc file. Run following
|
code. For example, if you change the driver's major number (see
|
||||||
command for setting rc files.
|
"3.7" section), then you need to do this step again.
|
||||||
|
|
||||||
|
Find "Makefile" in /moxa/mxser, then run
|
||||||
|
|
||||||
|
# make clean; make install
|
||||||
|
|
||||||
|
!!!!!!!!!! NOTE !!!!!!!!!!!!!!!!!
|
||||||
|
For Red Hat 9, Red Hat Enterprise Linux AS3/ES3/WS3 & Fedora Core1:
|
||||||
|
# make clean; make installsp1
|
||||||
|
|
||||||
|
For Red Hat Enterprise Linux AS4/ES4/WS4:
|
||||||
|
# make clean; make installsp2
|
||||||
|
!!!!!!!!!! NOTE !!!!!!!!!!!!!!!!!
|
||||||
|
|
||||||
|
The driver files "mxser.o" and utilities will be properly compiled
|
||||||
|
and copied to system directories respectively.
|
||||||
|
|
||||||
|
------------- Load MOXA driver--------------------
|
||||||
|
3.4.3 Load the MOXA driver
|
||||||
|
|
||||||
|
# modprobe mxser <argument>
|
||||||
|
|
||||||
|
will activate the module driver. You may run "lsmod" to check
|
||||||
|
if "mxser" is activated. If the MOXA board is ISA board, the
|
||||||
|
<argument> is needed. Please refer to section "3.4.5" for more
|
||||||
|
information.
|
||||||
|
|
||||||
|
|
||||||
|
------------- Load MOXA driver on boot --------------------
|
||||||
|
3.4.4 For the above description, you may manually execute
|
||||||
|
"modprobe mxser" to activate this driver and run
|
||||||
|
"rmmod mxser" to remove it.
|
||||||
|
However, it's better to have a boot time configuration to
|
||||||
|
eliminate manual operation. Boot time configuration can be
|
||||||
|
achieved by rc file. We offer one "rc.mxser" file to simplify
|
||||||
|
the procedure under "moxa/mxser/driver".
|
||||||
|
|
||||||
|
But if you use ISA board, please modify the "modprobe ..." command
|
||||||
|
to add the argument (see "3.4.5" section). After modifying the
|
||||||
|
rc.mxser, please try to execute "/moxa/mxser/driver/rc.mxser"
|
||||||
|
manually to make sure the modification is ok. If any error
|
||||||
|
encountered, please try to modify again. If the modification is
|
||||||
|
completed, follow the below step.
|
||||||
|
|
||||||
|
Run following command for setting rc files.
|
||||||
|
|
||||||
# cd /moxa/mxser/driver
|
# cd /moxa/mxser/driver
|
||||||
# cp ./rc.mxser /etc/rc.d
|
# cp ./rc.mxser /etc/rc.d
|
||||||
# cd /etc/rc.d
|
# cd /etc/rc.d
|
||||||
|
|
||||||
You may have to modify part of the content in rc.mxser to specify
|
Check "rc.serial" is existed or not. If "rc.serial" doesn't exist,
|
||||||
parameters for ISA board. Please refer to rc.mxser for more detail.
|
create it by vi, run "chmod 755 rc.serial" to change the permission.
|
||||||
Find "rc.serial". If "rc.serial" doesn't exist, create it by vi.
|
Add "/etc/rc.d/rc.mxser" in last line,
|
||||||
Add "rc.mxser" in last line. Next, open rc.local by vi
|
|
||||||
and append following content.
|
|
||||||
|
|
||||||
if [ -f /etc/rc.d/rc.serial ]; then
|
Reboot and check if moxa.o activated by "lsmod" command.
|
||||||
sh /etc/rc.d/rc.serial
|
|
||||||
fi
|
|
||||||
|
|
||||||
4. Reboot and check if mxser.o activated by "lsmod" command.
|
3.4.5. If you'd like to drive Smartio/Industio ISA boards in the system,
|
||||||
5. If you'd like to drive Smartio ISA boards in the system, you'll
|
you'll have to add parameter to specify CAP address of given
|
||||||
have to add parameter to specify CAP address of given board while
|
board while activating "mxser.o". The format for parameters are
|
||||||
activating "mxser.o". The format for parameters are as follows.
|
as follows.
|
||||||
|
|
||||||
insmod mxser ioaddr=0x???,0x???,0x???,0x???
|
modprobe mxser ioaddr=0x???,0x???,0x???,0x???
|
||||||
| | | |
|
| | | |
|
||||||
| | | +- 4th ISA board
|
| | | +- 4th ISA board
|
||||||
| | +------ 3rd ISA board
|
| | +------ 3rd ISA board
|
||||||
| +------------ 2nd ISA board
|
| +------------ 2nd ISA board
|
||||||
+------------------- 1st ISA board
|
+------------------- 1st ISA board
|
||||||
|
|
||||||
3.4 Static driver configuration
|
3.5 Static driver configuration for Linux kernel 2.4.x and 2.6.x
|
||||||
|
|
||||||
1. Create link
|
Note: To use static driver, you must install the linux kernel
|
||||||
|
source package.
|
||||||
|
|
||||||
|
3.5.1 Backup the built-in driver in the kernel.
|
||||||
|
# cd /usr/src/linux/drivers/char
|
||||||
|
# mv mxser.c mxser.c.old
|
||||||
|
|
||||||
|
For Red Hat 7.x user, you need to create link:
|
||||||
|
# cd /usr/src
|
||||||
|
# ln -s linux-2.4 linux
|
||||||
|
|
||||||
|
3.5.2 Create link
|
||||||
# cd /usr/src/linux/drivers/char
|
# cd /usr/src/linux/drivers/char
|
||||||
# ln -s /moxa/mxser/driver/mxser.c mxser.c
|
# ln -s /moxa/mxser/driver/mxser.c mxser.c
|
||||||
|
|
||||||
2. Add CAP address list for ISA boards
|
3.5.3 Add CAP address list for ISA boards. For PCI boards user,
|
||||||
|
please skip this step.
|
||||||
|
|
||||||
In module mode, the CAP address for ISA board is given by
|
In module mode, the CAP address for ISA board is given by
|
||||||
parameter. In static driver configuration, you'll have to
|
parameter. In static driver configuration, you'll have to
|
||||||
assign it within driver's source code. If you will not
|
assign it within driver's source code. If you will not
|
||||||
@ -222,73 +337,55 @@ Content
|
|||||||
static int mxserBoardCAP[]
|
static int mxserBoardCAP[]
|
||||||
= {0x280, 0x180, 0x00, 0x00};
|
= {0x280, 0x180, 0x00, 0x00};
|
||||||
|
|
||||||
3. Modify tty_io.c
|
3.5.4 Setup kernel configuration
|
||||||
# cd /usr/src/linux/drivers/char/
|
|
||||||
# vi tty_io.c
|
|
||||||
Find pty_init(), insert "mxser_init()" as
|
|
||||||
|
|
||||||
pty_init();
|
Configure the kernel:
|
||||||
mxser_init();
|
|
||||||
|
|
||||||
4. Modify tty.h
|
# cd /usr/src/linux
|
||||||
# cd /usr/src/linux/include/linux
|
# make menuconfig
|
||||||
# vi tty.h
|
|
||||||
Find extern int tty_init(void), insert "mxser_init()" as
|
|
||||||
|
|
||||||
extern int tty_init(void);
|
You will go into a menu-driven system. Please select [Character
|
||||||
extern int mxser_init(void);
|
devices][Non-standard serial port support], enable the [Moxa
|
||||||
|
SmartIO support] driver with "[*]" for built-in (not "[M]"), then
|
||||||
5. Modify Makefile
|
select [Exit] to exit this program.
|
||||||
# cd /usr/src/linux/drivers/char
|
|
||||||
# vi Makefile
|
|
||||||
Find L_OBJS := tty_io.o ...... random.o, add
|
|
||||||
"mxser.o" at last of this line as
|
|
||||||
L_OBJS := tty_io.o ....... mxser.o
|
|
||||||
|
|
||||||
6. Rebuild kernel
|
3.5.5 Rebuild kernel
|
||||||
The following are for Linux kernel rebuilding,for your reference only.
|
The following are for Linux kernel rebuilding, for your
|
||||||
|
reference only.
|
||||||
For appropriate details, please refer to the Linux document.
|
For appropriate details, please refer to the Linux document.
|
||||||
|
|
||||||
If 'lilo' utility is installed, please use 'make zlilo' to rebuild
|
|
||||||
kernel. If 'lilo' is not installed, please follow the following steps.
|
|
||||||
|
|
||||||
a. cd /usr/src/linux
|
a. cd /usr/src/linux
|
||||||
b. make clean /* take a few minutes */
|
b. make clean /* take a few minutes */
|
||||||
c. make bzImage /* take probably 10-20 minutes */
|
c. make dep /* take a few minutes */
|
||||||
d. Backup original boot kernel. /* optional step */
|
d. make bzImage /* take probably 10-20 minutes */
|
||||||
e. cp /usr/src/linux/arch/i386/boot/bzImage /boot/vmlinuz
|
e. make install /* copy boot image to correct position */
|
||||||
f. Please make sure the boot kernel (vmlinuz) is in the
|
f. Please make sure the boot kernel (vmlinuz) is in the
|
||||||
correct position. If you use 'lilo' utility, you should
|
correct position.
|
||||||
check /etc/lilo.conf 'image' item specified the path
|
g. If you use 'lilo' utility, you should check /etc/lilo.conf
|
||||||
which is the 'vmlinuz' path, or you will load wrong
|
'image' item specified the path which is the 'vmlinuz' path,
|
||||||
(or old) boot kernel image (vmlinuz).
|
or you will load wrong (or old) boot kernel image (vmlinuz).
|
||||||
g. chmod 400 /vmlinuz
|
After checking /etc/lilo.conf, please run "lilo".
|
||||||
h. lilo
|
|
||||||
i. rdev -R /vmlinuz 1
|
|
||||||
j. sync
|
|
||||||
|
|
||||||
Note that if the result of "make zImage" is ERROR, then you have to
|
Note that if the result of "make bzImage" is ERROR, then you have to
|
||||||
go back to Linux configuration Setup. Type "make config" in directory
|
go back to Linux configuration Setup. Type "make menuconfig" in
|
||||||
/usr/src/linux or "setup".
|
directory /usr/src/linux.
|
||||||
|
|
||||||
Since system include file, /usr/src/linux/include/linux/interrupt.h,
|
|
||||||
is modified each time the MOXA driver is installed, kernel rebuilding
|
|
||||||
is inevitable. And it takes about 10 to 20 minutes depends on the
|
|
||||||
machine.
|
|
||||||
|
|
||||||
7. Make utility
|
3.5.6 Make tty device and special file
|
||||||
# cd /moxa/mxser/utility
|
|
||||||
# make install
|
|
||||||
|
|
||||||
8. Make special file
|
|
||||||
# cd /moxa/mxser/driver
|
# cd /moxa/mxser/driver
|
||||||
# ./msmknod
|
# ./msmknod
|
||||||
|
|
||||||
9. Reboot
|
3.5.7 Make utility
|
||||||
|
# cd /moxa/mxser/utility
|
||||||
|
# make clean; make install
|
||||||
|
|
||||||
3.5 Custom configuration
|
3.5.8 Reboot
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
3.6 Custom configuration
|
||||||
Although this driver already provides you default configuration, you
|
Although this driver already provides you default configuration, you
|
||||||
still can change the device name and major number.The instruction to
|
still can change the device name and major number. The instruction to
|
||||||
change these parameters are shown as below.
|
change these parameters are shown as below.
|
||||||
|
|
||||||
Change Device name
|
Change Device name
|
||||||
@ -306,33 +403,37 @@ Content
|
|||||||
2 free major numbers for this driver. There are 3 steps to change
|
2 free major numbers for this driver. There are 3 steps to change
|
||||||
major numbers.
|
major numbers.
|
||||||
|
|
||||||
1. Find free major numbers
|
3.6.1 Find free major numbers
|
||||||
In /proc/devices, you may find all the major numbers occupied
|
In /proc/devices, you may find all the major numbers occupied
|
||||||
in the system. Please select 2 major numbers that are available.
|
in the system. Please select 2 major numbers that are available.
|
||||||
e.g. 40, 45.
|
e.g. 40, 45.
|
||||||
2. Create special files
|
3.6.2 Create special files
|
||||||
Run /moxa/mxser/driver/msmknod to create special files with
|
Run /moxa/mxser/driver/msmknod to create special files with
|
||||||
specified major numbers.
|
specified major numbers.
|
||||||
3. Modify driver with new major number
|
3.6.3 Modify driver with new major number
|
||||||
Run vi to open /moxa/mxser/driver/mxser.c. Locate the line
|
Run vi to open /moxa/mxser/driver/mxser.c. Locate the line
|
||||||
contains "MXSERMAJOR". Change the content as below.
|
contains "MXSERMAJOR". Change the content as below.
|
||||||
#define MXSERMAJOR 40
|
#define MXSERMAJOR 40
|
||||||
#define MXSERCUMAJOR 45
|
#define MXSERCUMAJOR 45
|
||||||
4. Run # make install in /moxa/mxser/driver.
|
3.6.4 Run "make clean; make install" in /moxa/mxser/driver.
|
||||||
|
|
||||||
3.6 Verify driver installation
|
3.7 Verify driver installation
|
||||||
You may refer to /var/log/messages to check the latest status
|
You may refer to /var/log/messages to check the latest status
|
||||||
log reported by this driver whenever it's activated.
|
log reported by this driver whenever it's activated.
|
||||||
|
|
||||||
-----------------------------------------------------------------------------
|
-----------------------------------------------------------------------------
|
||||||
4. Utilities
|
4. Utilities
|
||||||
There are 3 utilities contained in this driver. They are msdiag, msmon and
|
There are 3 utilities contained in this driver. They are msdiag, msmon and
|
||||||
msterm. These 3 utilities are released in form of source code. They should
|
msterm. These 3 utilities are released in form of source code. They should
|
||||||
be compiled into executable file and copied into /usr/bin.
|
be compiled into executable file and copied into /usr/bin.
|
||||||
|
|
||||||
|
Before using these utilities, please load driver (refer 3.4 & 3.5) and
|
||||||
|
make sure you had run the "msmknod" utility.
|
||||||
|
|
||||||
msdiag - Diagnostic
|
msdiag - Diagnostic
|
||||||
--------------------
|
--------------------
|
||||||
This utility provides the function to detect what Moxa Smartio multiport
|
This utility provides the function to display what Moxa Smartio/Industio
|
||||||
board exists in the system.
|
board found by driver in the system.
|
||||||
|
|
||||||
msmon - Port Monitoring
|
msmon - Port Monitoring
|
||||||
-----------------------
|
-----------------------
|
||||||
@ -353,12 +454,13 @@ Content
|
|||||||
application, for example, sending AT command to a modem connected to the
|
application, for example, sending AT command to a modem connected to the
|
||||||
port or used as a terminal for login purpose. Note that this is only a
|
port or used as a terminal for login purpose. Note that this is only a
|
||||||
dumb terminal emulation without handling full screen operation.
|
dumb terminal emulation without handling full screen operation.
|
||||||
|
|
||||||
-----------------------------------------------------------------------------
|
-----------------------------------------------------------------------------
|
||||||
5. Setserial
|
5. Setserial
|
||||||
|
|
||||||
Supported Setserial parameters are listed as below.
|
Supported Setserial parameters are listed as below.
|
||||||
|
|
||||||
uart set UART type(16450-->disable FIFO, 16550A-->enable FIFO)
|
uart set UART type(16450-->disable FIFO, 16550A-->enable FIFO)
|
||||||
close_delay set the amount of time(in 1/100 of a second) that DTR
|
close_delay set the amount of time(in 1/100 of a second) that DTR
|
||||||
should be kept low while being closed.
|
should be kept low while being closed.
|
||||||
closing_wait set the amount of time(in 1/100 of a second) that the
|
closing_wait set the amount of time(in 1/100 of a second) that the
|
||||||
@ -366,7 +468,13 @@ Content
|
|||||||
being closed, before the receiver is disable.
|
being closed, before the receiver is disable.
|
||||||
spd_hi Use 57.6kb when the application requests 38.4kb.
|
spd_hi Use 57.6kb when the application requests 38.4kb.
|
||||||
spd_vhi Use 115.2kb when the application requests 38.4kb.
|
spd_vhi Use 115.2kb when the application requests 38.4kb.
|
||||||
|
spd_shi Use 230.4kb when the application requests 38.4kb.
|
||||||
|
spd_warp Use 460.8kb when the application requests 38.4kb.
|
||||||
spd_normal Use 38.4kb when the application requests 38.4kb.
|
spd_normal Use 38.4kb when the application requests 38.4kb.
|
||||||
|
spd_cust Use the custom divisor to set the speed when the
|
||||||
|
application requests 38.4kb.
|
||||||
|
divisor This option set the custom divison.
|
||||||
|
baud_base This option set the base baud rate.
|
||||||
|
|
||||||
-----------------------------------------------------------------------------
|
-----------------------------------------------------------------------------
|
||||||
6. Troubleshooting
|
6. Troubleshooting
|
||||||
@ -375,8 +483,9 @@ Content
|
|||||||
possible. If all the possible solutions fail, please contact our technical
|
possible. If all the possible solutions fail, please contact our technical
|
||||||
support team to get more help.
|
support team to get more help.
|
||||||
|
|
||||||
Error msg: More than 4 Moxa Smartio family boards found. Fifth board and
|
|
||||||
after are ignored.
|
Error msg: More than 4 Moxa Smartio/Industio family boards found. Fifth board
|
||||||
|
and after are ignored.
|
||||||
Solution:
|
Solution:
|
||||||
To avoid this problem, please unplug fifth and after board, because Moxa
|
To avoid this problem, please unplug fifth and after board, because Moxa
|
||||||
driver supports up to 4 boards.
|
driver supports up to 4 boards.
|
||||||
@ -384,7 +493,7 @@ Content
|
|||||||
Error msg: Request_irq fail, IRQ(?) may be conflict with another device.
|
Error msg: Request_irq fail, IRQ(?) may be conflict with another device.
|
||||||
Solution:
|
Solution:
|
||||||
Other PCI or ISA devices occupy the assigned IRQ. If you are not sure
|
Other PCI or ISA devices occupy the assigned IRQ. If you are not sure
|
||||||
which device causes the situation,please check /proc/interrupts to find
|
which device causes the situation, please check /proc/interrupts to find
|
||||||
free IRQ and simply change another free IRQ for Moxa board.
|
free IRQ and simply change another free IRQ for Moxa board.
|
||||||
|
|
||||||
Error msg: Board #: C1xx Series(CAP=xxx) interrupt number invalid.
|
Error msg: Board #: C1xx Series(CAP=xxx) interrupt number invalid.
|
||||||
@ -397,15 +506,18 @@ Content
|
|||||||
Moxa ISA board needs an interrupt vector.Please refer to user's manual
|
Moxa ISA board needs an interrupt vector.Please refer to user's manual
|
||||||
"Hardware Installation" chapter to set interrupt vector.
|
"Hardware Installation" chapter to set interrupt vector.
|
||||||
|
|
||||||
Error msg: Couldn't install MOXA Smartio family driver!
|
Error msg: Couldn't install MOXA Smartio/Industio family driver!
|
||||||
Solution:
|
Solution:
|
||||||
Load Moxa driver fail, the major number may conflict with other devices.
|
Load Moxa driver fail, the major number may conflict with other devices.
|
||||||
Please refer to previous section 3.5 to change a free major number for
|
Please refer to previous section 3.7 to change a free major number for
|
||||||
Moxa driver.
|
Moxa driver.
|
||||||
|
|
||||||
Error msg: Couldn't install MOXA Smartio family callout driver!
|
Error msg: Couldn't install MOXA Smartio/Industio family callout driver!
|
||||||
Solution:
|
Solution:
|
||||||
Load Moxa callout driver fail, the callout device major number may
|
Load Moxa callout driver fail, the callout device major number may
|
||||||
conflict with other devices. Please refer to previous section 3.5 to
|
conflict with other devices. Please refer to previous section 3.7 to
|
||||||
change a free callout device major number for Moxa driver.
|
change a free callout device major number for Moxa driver.
|
||||||
|
|
||||||
|
|
||||||
-----------------------------------------------------------------------------
|
-----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
@ -631,7 +631,7 @@ xmit_hash_policy
|
|||||||
in environments where a layer3 gateway device is
|
in environments where a layer3 gateway device is
|
||||||
required to reach most destinations.
|
required to reach most destinations.
|
||||||
|
|
||||||
This algorithm is 802.3ad complient.
|
This algorithm is 802.3ad compliant.
|
||||||
|
|
||||||
layer3+4
|
layer3+4
|
||||||
|
|
||||||
|
@ -186,7 +186,7 @@ solution for a couple of reasons:
|
|||||||
|
|
||||||
The Linux network devices (by default) just can handle the
|
The Linux network devices (by default) just can handle the
|
||||||
transmission and reception of media dependent frames. Due to the
|
transmission and reception of media dependent frames. Due to the
|
||||||
arbritration on the CAN bus the transmission of a low prio CAN-ID
|
arbitration on the CAN bus the transmission of a low prio CAN-ID
|
||||||
may be delayed by the reception of a high prio CAN frame. To
|
may be delayed by the reception of a high prio CAN frame. To
|
||||||
reflect the correct* traffic on the node the loopback of the sent
|
reflect the correct* traffic on the node the loopback of the sent
|
||||||
data has to be performed right after a successful transmission. If
|
data has to be performed right after a successful transmission. If
|
||||||
@ -481,7 +481,7 @@ solution for a couple of reasons:
|
|||||||
- stats_timer: To calculate the Socket CAN core statistics
|
- stats_timer: To calculate the Socket CAN core statistics
|
||||||
(e.g. current/maximum frames per second) this 1 second timer is
|
(e.g. current/maximum frames per second) this 1 second timer is
|
||||||
invoked at can.ko module start time by default. This timer can be
|
invoked at can.ko module start time by default. This timer can be
|
||||||
disabled by using stattimer=0 on the module comandline.
|
disabled by using stattimer=0 on the module commandline.
|
||||||
|
|
||||||
- debug: (removed since SocketCAN SVN r546)
|
- debug: (removed since SocketCAN SVN r546)
|
||||||
|
|
||||||
|
@ -326,7 +326,7 @@ just one call to mmap is needed:
|
|||||||
mmap(0, size, PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0);
|
mmap(0, size, PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0);
|
||||||
|
|
||||||
If tp_frame_size is a divisor of tp_block_size frames will be
|
If tp_frame_size is a divisor of tp_block_size frames will be
|
||||||
contiguosly spaced by tp_frame_size bytes. If not, each
|
contiguously spaced by tp_frame_size bytes. If not, each
|
||||||
tp_block_size/tp_frame_size frames there will be a gap between
|
tp_block_size/tp_frame_size frames there will be a gap between
|
||||||
the frames. This is because a frame cannot be spawn across two
|
the frames. This is because a frame cannot be spawn across two
|
||||||
blocks.
|
blocks.
|
||||||
|
@ -4,26 +4,27 @@ The "enviromental" rules for authors of any new tc actions are:
|
|||||||
1) If you stealeth or borroweth any packet thou shalt be branching
|
1) If you stealeth or borroweth any packet thou shalt be branching
|
||||||
from the righteous path and thou shalt cloneth.
|
from the righteous path and thou shalt cloneth.
|
||||||
|
|
||||||
For example if your action queues a packet to be processed later
|
For example if your action queues a packet to be processed later,
|
||||||
or intentionaly branches by redirecting a packet then you need to
|
or intentionally branches by redirecting a packet, then you need to
|
||||||
clone the packet.
|
clone the packet.
|
||||||
|
|
||||||
There are certain fields in the skb tc_verd that need to be reset so we
|
There are certain fields in the skb tc_verd that need to be reset so we
|
||||||
avoid loops etc. A few are generic enough so much so that skb_act_clone()
|
avoid loops, etc. A few are generic enough that skb_act_clone()
|
||||||
resets them for you. So invoke skb_act_clone() rather than skb_clone()
|
resets them for you, so invoke skb_act_clone() rather than skb_clone().
|
||||||
|
|
||||||
2) If you munge any packet thou shalt call pskb_expand_head in the case
|
2) If you munge any packet thou shalt call pskb_expand_head in the case
|
||||||
someone else is referencing the skb. After that you "own" the skb.
|
someone else is referencing the skb. After that you "own" the skb.
|
||||||
You must also tell us if it is ok to munge the packet (TC_OK2MUNGE),
|
You must also tell us if it is ok to munge the packet (TC_OK2MUNGE),
|
||||||
this way any action downstream can stomp on the packet.
|
this way any action downstream can stomp on the packet.
|
||||||
|
|
||||||
3) dropping packets you dont own is a nono. You simply return
|
3) Dropping packets you don't own is a no-no. You simply return
|
||||||
TC_ACT_SHOT to the caller and they will drop it.
|
TC_ACT_SHOT to the caller and they will drop it.
|
||||||
|
|
||||||
The "enviromental" rules for callers of actions (qdiscs etc) are:
|
The "enviromental" rules for callers of actions (qdiscs etc) are:
|
||||||
|
|
||||||
*) thou art responsible for freeing anything returned as being
|
*) Thou art responsible for freeing anything returned as being
|
||||||
TC_ACT_SHOT/STOLEN/QUEUED. If none of TC_ACT_SHOT/STOLEN/QUEUED is
|
TC_ACT_SHOT/STOLEN/QUEUED. If none of TC_ACT_SHOT/STOLEN/QUEUED is
|
||||||
returned then all is great and you dont need to do anything.
|
returned, then all is great and you don't need to do anything.
|
||||||
|
|
||||||
Post on netdev if something is unclear.
|
Post on netdev if something is unclear.
|
||||||
|
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
00-INDEX
|
00-INDEX
|
||||||
- This file
|
- This file
|
||||||
|
apm-acpi.txt
|
||||||
|
- basic info about the APM and ACPI support.
|
||||||
basic-pm-debugging.txt
|
basic-pm-debugging.txt
|
||||||
- Debugging suspend and resume
|
- Debugging suspend and resume
|
||||||
devices.txt
|
devices.txt
|
||||||
@ -14,8 +16,6 @@ notifiers.txt
|
|||||||
- Registering suspend notifiers in device drivers
|
- Registering suspend notifiers in device drivers
|
||||||
pci.txt
|
pci.txt
|
||||||
- How the PCI Subsystem Does Power Management
|
- How the PCI Subsystem Does Power Management
|
||||||
pm.txt
|
|
||||||
- info on Linux power management support.
|
|
||||||
pm_qos_interface.txt
|
pm_qos_interface.txt
|
||||||
- info on Linux PM Quality of Service interface
|
- info on Linux PM Quality of Service interface
|
||||||
power_supply_class.txt
|
power_supply_class.txt
|
||||||
|
32
Documentation/power/apm-acpi.txt
Normal file
32
Documentation/power/apm-acpi.txt
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
APM or ACPI?
|
||||||
|
------------
|
||||||
|
If you have a relatively recent x86 mobile, desktop, or server system,
|
||||||
|
odds are it supports either Advanced Power Management (APM) or
|
||||||
|
Advanced Configuration and Power Interface (ACPI). ACPI is the newer
|
||||||
|
of the two technologies and puts power management in the hands of the
|
||||||
|
operating system, allowing for more intelligent power management than
|
||||||
|
is possible with BIOS controlled APM.
|
||||||
|
|
||||||
|
The best way to determine which, if either, your system supports is to
|
||||||
|
build a kernel with both ACPI and APM enabled (as of 2.3.x ACPI is
|
||||||
|
enabled by default). If a working ACPI implementation is found, the
|
||||||
|
ACPI driver will override and disable APM, otherwise the APM driver
|
||||||
|
will be used.
|
||||||
|
|
||||||
|
No, sorry, you cannot have both ACPI and APM enabled and running at
|
||||||
|
once. Some people with broken ACPI or broken APM implementations
|
||||||
|
would like to use both to get a full set of working features, but you
|
||||||
|
simply cannot mix and match the two. Only one power management
|
||||||
|
interface can be in control of the machine at once. Think about it..
|
||||||
|
|
||||||
|
User-space Daemons
|
||||||
|
------------------
|
||||||
|
Both APM and ACPI rely on user-space daemons, apmd and acpid
|
||||||
|
respectively, to be completely functional. Obtain both of these
|
||||||
|
daemons from your Linux distribution or from the Internet (see below)
|
||||||
|
and be sure that they are started sometime in the system boot process.
|
||||||
|
Go ahead and start both. If ACPI or APM is not available on your
|
||||||
|
system the associated daemon will exit gracefully.
|
||||||
|
|
||||||
|
apmd: http://worldvisions.ca/~apenwarr/apmd/
|
||||||
|
acpid: http://acpid.sf.net/
|
@ -1,257 +0,0 @@
|
|||||||
Linux Power Management Support
|
|
||||||
|
|
||||||
This document briefly describes how to use power management with your
|
|
||||||
Linux system and how to add power management support to Linux drivers.
|
|
||||||
|
|
||||||
APM or ACPI?
|
|
||||||
------------
|
|
||||||
If you have a relatively recent x86 mobile, desktop, or server system,
|
|
||||||
odds are it supports either Advanced Power Management (APM) or
|
|
||||||
Advanced Configuration and Power Interface (ACPI). ACPI is the newer
|
|
||||||
of the two technologies and puts power management in the hands of the
|
|
||||||
operating system, allowing for more intelligent power management than
|
|
||||||
is possible with BIOS controlled APM.
|
|
||||||
|
|
||||||
The best way to determine which, if either, your system supports is to
|
|
||||||
build a kernel with both ACPI and APM enabled (as of 2.3.x ACPI is
|
|
||||||
enabled by default). If a working ACPI implementation is found, the
|
|
||||||
ACPI driver will override and disable APM, otherwise the APM driver
|
|
||||||
will be used.
|
|
||||||
|
|
||||||
No, sorry, you cannot have both ACPI and APM enabled and running at
|
|
||||||
once. Some people with broken ACPI or broken APM implementations
|
|
||||||
would like to use both to get a full set of working features, but you
|
|
||||||
simply cannot mix and match the two. Only one power management
|
|
||||||
interface can be in control of the machine at once. Think about it..
|
|
||||||
|
|
||||||
User-space Daemons
|
|
||||||
------------------
|
|
||||||
Both APM and ACPI rely on user-space daemons, apmd and acpid
|
|
||||||
respectively, to be completely functional. Obtain both of these
|
|
||||||
daemons from your Linux distribution or from the Internet (see below)
|
|
||||||
and be sure that they are started sometime in the system boot process.
|
|
||||||
Go ahead and start both. If ACPI or APM is not available on your
|
|
||||||
system the associated daemon will exit gracefully.
|
|
||||||
|
|
||||||
apmd: http://worldvisions.ca/~apenwarr/apmd/
|
|
||||||
acpid: http://acpid.sf.net/
|
|
||||||
|
|
||||||
Driver Interface -- OBSOLETE, DO NOT USE!
|
|
||||||
----------------*************************
|
|
||||||
|
|
||||||
Note: pm_register(), pm_access(), pm_dev_idle() and friends are
|
|
||||||
obsolete. Please do not use them. Instead you should properly hook
|
|
||||||
your driver into the driver model, and use its suspend()/resume()
|
|
||||||
callbacks to do this kind of stuff.
|
|
||||||
|
|
||||||
If you are writing a new driver or maintaining an old driver, it
|
|
||||||
should include power management support. Without power management
|
|
||||||
support, a single driver may prevent a system with power management
|
|
||||||
capabilities from ever being able to suspend (safely).
|
|
||||||
|
|
||||||
Overview:
|
|
||||||
1) Register each instance of a device with "pm_register"
|
|
||||||
2) Call "pm_access" before accessing the hardware.
|
|
||||||
(this will ensure that the hardware is awake and ready)
|
|
||||||
3) Your "pm_callback" is called before going into a
|
|
||||||
suspend state (ACPI D1-D3) or after resuming (ACPI D0)
|
|
||||||
from a suspend.
|
|
||||||
4) Call "pm_dev_idle" when the device is not being used
|
|
||||||
(optional but will improve device idle detection)
|
|
||||||
5) When unloaded, unregister the device with "pm_unregister"
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Description: Register a device with the power-management subsystem
|
|
||||||
*
|
|
||||||
* Parameters:
|
|
||||||
* type - device type (PCI device, system device, ...)
|
|
||||||
* id - instance number or unique identifier
|
|
||||||
* cback - request handler callback (suspend, resume, ...)
|
|
||||||
*
|
|
||||||
* Returns: Registered PM device or NULL on error
|
|
||||||
*
|
|
||||||
* Examples:
|
|
||||||
* dev = pm_register(PM_SYS_DEV, PM_SYS_VGA, vga_callback);
|
|
||||||
*
|
|
||||||
* struct pci_dev *pci_dev = pci_find_dev(...);
|
|
||||||
* dev = pm_register(PM_PCI_DEV, PM_PCI_ID(pci_dev), callback);
|
|
||||||
*/
|
|
||||||
struct pm_dev *pm_register(pm_dev_t type, unsigned long id, pm_callback cback);
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Description: Unregister a device with the power management subsystem
|
|
||||||
*
|
|
||||||
* Parameters:
|
|
||||||
* dev - PM device previously returned from pm_register
|
|
||||||
*/
|
|
||||||
void pm_unregister(struct pm_dev *dev);
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Description: Unregister all devices with a matching callback function
|
|
||||||
*
|
|
||||||
* Parameters:
|
|
||||||
* cback - previously registered request callback
|
|
||||||
*
|
|
||||||
* Notes: Provided for easier porting from old APM interface
|
|
||||||
*/
|
|
||||||
void pm_unregister_all(pm_callback cback);
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Power management request callback
|
|
||||||
*
|
|
||||||
* Parameters:
|
|
||||||
* dev - PM device previously returned from pm_register
|
|
||||||
* rqst - request type
|
|
||||||
* data - data, if any, associated with the request
|
|
||||||
*
|
|
||||||
* Returns: 0 if the request is successful
|
|
||||||
* EINVAL if the request is not supported
|
|
||||||
* EBUSY if the device is now busy and cannot handle the request
|
|
||||||
* ENOMEM if the device was unable to handle the request due to memory
|
|
||||||
*
|
|
||||||
* Details: The device request callback will be called before the
|
|
||||||
* device/system enters a suspend state (ACPI D1-D3) or
|
|
||||||
* or after the device/system resumes from suspend (ACPI D0).
|
|
||||||
* For PM_SUSPEND, the ACPI D-state being entered is passed
|
|
||||||
* as the "data" argument to the callback. The device
|
|
||||||
* driver should save (PM_SUSPEND) or restore (PM_RESUME)
|
|
||||||
* device context when the request callback is called.
|
|
||||||
*
|
|
||||||
* Once a driver returns 0 (success) from a suspend
|
|
||||||
* request, it should not process any further requests or
|
|
||||||
* access the device hardware until a call to "pm_access" is made.
|
|
||||||
*/
|
|
||||||
typedef int (*pm_callback)(struct pm_dev *dev, pm_request_t rqst, void *data);
|
|
||||||
|
|
||||||
Driver Details
|
|
||||||
--------------
|
|
||||||
This is just a quick Q&A as a stopgap until a real driver writers'
|
|
||||||
power management guide is available.
|
|
||||||
|
|
||||||
Q: When is a device suspended?
|
|
||||||
|
|
||||||
Devices can be suspended based on direct user request (eg. laptop lid
|
|
||||||
closes), system power policy (eg. sleep after 30 minutes of console
|
|
||||||
inactivity), or device power policy (eg. power down device after 5
|
|
||||||
minutes of inactivity)
|
|
||||||
|
|
||||||
Q: Must a driver honor a suspend request?
|
|
||||||
|
|
||||||
No, a driver can return -EBUSY from a suspend request and this
|
|
||||||
will stop the system from suspending. When a suspend request
|
|
||||||
fails, all suspended devices are resumed and the system continues
|
|
||||||
to run. Suspend can be retried at a later time.
|
|
||||||
|
|
||||||
Q: Can the driver block suspend/resume requests?
|
|
||||||
|
|
||||||
Yes, a driver can delay its return from a suspend or resume
|
|
||||||
request until the device is ready to handle requests. It
|
|
||||||
is advantageous to return as quickly as possible from a
|
|
||||||
request as suspend/resume are done serially.
|
|
||||||
|
|
||||||
Q: What context is a suspend/resume initiated from?
|
|
||||||
|
|
||||||
A suspend or resume is initiated from a kernel thread context.
|
|
||||||
It is safe to block, allocate memory, initiate requests
|
|
||||||
or anything else you can do within the kernel.
|
|
||||||
|
|
||||||
Q: Will requests continue to arrive after a suspend?
|
|
||||||
|
|
||||||
Possibly. It is the driver's responsibility to queue(*),
|
|
||||||
fail, or drop any requests that arrive after returning
|
|
||||||
success to a suspend request. It is important that the
|
|
||||||
driver not access its device until after it receives
|
|
||||||
a resume request as the device's bus may no longer
|
|
||||||
be active.
|
|
||||||
|
|
||||||
(*) If a driver queues requests for processing after
|
|
||||||
resume be aware that the device, network, etc.
|
|
||||||
might be in a different state than at suspend time.
|
|
||||||
It's probably better to drop requests unless
|
|
||||||
the driver is a storage device.
|
|
||||||
|
|
||||||
Q: Do I have to manage bus-specific power management registers
|
|
||||||
|
|
||||||
No. It is the responsibility of the bus driver to manage
|
|
||||||
PCI, USB, etc. power management registers. The bus driver
|
|
||||||
or the power management subsystem will also enable any
|
|
||||||
wake-on functionality that the device has.
|
|
||||||
|
|
||||||
Q: So, really, what do I need to do to support suspend/resume?
|
|
||||||
|
|
||||||
You need to save any device context that would
|
|
||||||
be lost if the device was powered off and then restore
|
|
||||||
it at resume time. When ACPI is active, there are
|
|
||||||
three levels of device suspend states; D1, D2, and D3.
|
|
||||||
(The suspend state is passed as the "data" argument
|
|
||||||
to the device callback.) With D3, the device is powered
|
|
||||||
off and loses all context, D1 and D2 are shallower power
|
|
||||||
states and require less device context to be saved. To
|
|
||||||
play it safe, just save everything at suspend and restore
|
|
||||||
everything at resume.
|
|
||||||
|
|
||||||
Q: Where do I store device context for suspend?
|
|
||||||
|
|
||||||
Anywhere in memory, kmalloc a buffer or store it
|
|
||||||
in the device descriptor. You are guaranteed that the
|
|
||||||
contents of memory will be restored and accessible
|
|
||||||
before resume, even when the system suspends to disk.
|
|
||||||
|
|
||||||
Q: What do I need to do for ACPI vs. APM vs. etc?
|
|
||||||
|
|
||||||
Drivers need not be aware of the specific power management
|
|
||||||
technology that is active. They just need to be aware
|
|
||||||
of when the overlying power management system requests
|
|
||||||
that they suspend or resume.
|
|
||||||
|
|
||||||
Q: What about device dependencies?
|
|
||||||
|
|
||||||
When a driver registers a device, the power management
|
|
||||||
subsystem uses the information provided to build a
|
|
||||||
tree of device dependencies (eg. USB device X is on
|
|
||||||
USB controller Y which is on PCI bus Z) When power
|
|
||||||
management wants to suspend a device, it first sends
|
|
||||||
a suspend request to its driver, then the bus driver,
|
|
||||||
and so on up to the system bus. Device resumes
|
|
||||||
proceed in the opposite direction.
|
|
||||||
|
|
||||||
Q: Who do I contact for additional information about
|
|
||||||
enabling power management for my specific driver/device?
|
|
||||||
|
|
||||||
ACPI Development mailing list: linux-acpi@vger.kernel.org
|
|
||||||
|
|
||||||
System Interface -- OBSOLETE, DO NOT USE!
|
|
||||||
----------------*************************
|
|
||||||
If you are providing new power management support to Linux (ie.
|
|
||||||
adding support for something like APM or ACPI), you should
|
|
||||||
communicate with drivers through the existing generic power
|
|
||||||
management interface.
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Send a request to all devices
|
|
||||||
*
|
|
||||||
* Parameters:
|
|
||||||
* rqst - request type
|
|
||||||
* data - data, if any, associated with the request
|
|
||||||
*
|
|
||||||
* Returns: 0 if the request is successful
|
|
||||||
* See "pm_callback" return for errors
|
|
||||||
*
|
|
||||||
* Details: Walk list of registered devices and call pm_send
|
|
||||||
* for each until complete or an error is encountered.
|
|
||||||
* If an error is encountered for a suspend request,
|
|
||||||
* return all devices to the state they were in before
|
|
||||||
* the suspend request.
|
|
||||||
*/
|
|
||||||
int pm_send_all(pm_request_t rqst, void *data);
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Find a matching device
|
|
||||||
*
|
|
||||||
* Parameters:
|
|
||||||
* type - device type (PCI device, system device, or 0 to match all devices)
|
|
||||||
* from - previous match or NULL to start from the beginning
|
|
||||||
*
|
|
||||||
* Returns: Matching device or NULL if none found
|
|
||||||
*/
|
|
||||||
struct pm_dev *pm_find(pm_dev_t type, struct pm_dev *from);
|
|
@ -59,6 +59,7 @@ Table of Contents
|
|||||||
p) Freescale Synchronous Serial Interface
|
p) Freescale Synchronous Serial Interface
|
||||||
q) USB EHCI controllers
|
q) USB EHCI controllers
|
||||||
r) MDIO on GPIOs
|
r) MDIO on GPIOs
|
||||||
|
s) SPI busses
|
||||||
|
|
||||||
VII - Marvell Discovery mv64[345]6x System Controller chips
|
VII - Marvell Discovery mv64[345]6x System Controller chips
|
||||||
1) The /system-controller node
|
1) The /system-controller node
|
||||||
@ -707,7 +708,7 @@ device or bus to be described by the device tree.
|
|||||||
In general, the format of an address for a device is defined by the
|
In general, the format of an address for a device is defined by the
|
||||||
parent bus type, based on the #address-cells and #size-cells
|
parent bus type, based on the #address-cells and #size-cells
|
||||||
properties. Note that the parent's parent definitions of #address-cells
|
properties. Note that the parent's parent definitions of #address-cells
|
||||||
and #size-cells are not inhereted so every node with children must specify
|
and #size-cells are not inherited so every node with children must specify
|
||||||
them. The kernel requires the root node to have those properties defining
|
them. The kernel requires the root node to have those properties defining
|
||||||
addresses format for devices directly mapped on the processor bus.
|
addresses format for devices directly mapped on the processor bus.
|
||||||
|
|
||||||
@ -1776,7 +1777,7 @@ platforms are moved over to use the flattened-device-tree model.
|
|||||||
|
|
||||||
Xilinx uartlite devices are simple fixed speed serial ports.
|
Xilinx uartlite devices are simple fixed speed serial ports.
|
||||||
|
|
||||||
Requred properties:
|
Required properties:
|
||||||
- current-speed : Baud rate of uartlite
|
- current-speed : Baud rate of uartlite
|
||||||
|
|
||||||
v) Xilinx hwicap
|
v) Xilinx hwicap
|
||||||
@ -1798,7 +1799,7 @@ platforms are moved over to use the flattened-device-tree model.
|
|||||||
Xilinx UART 16550 devices are very similar to the NS16550 but with
|
Xilinx UART 16550 devices are very similar to the NS16550 but with
|
||||||
different register spacing and an offset from the base address.
|
different register spacing and an offset from the base address.
|
||||||
|
|
||||||
Requred properties:
|
Required properties:
|
||||||
- clock-frequency : Frequency of the clock input
|
- clock-frequency : Frequency of the clock input
|
||||||
- reg-offset : A value of 3 is required
|
- reg-offset : A value of 3 is required
|
||||||
- reg-shift : A value of 2 is required
|
- reg-shift : A value of 2 is required
|
||||||
@ -1883,6 +1884,62 @@ platforms are moved over to use the flattened-device-tree model.
|
|||||||
&qe_pio_c 6>;
|
&qe_pio_c 6>;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
s) SPI (Serial Peripheral Interface) busses
|
||||||
|
|
||||||
|
SPI busses can be described with a node for the SPI master device
|
||||||
|
and a set of child nodes for each SPI slave on the bus. For this
|
||||||
|
discussion, it is assumed that the system's SPI controller is in
|
||||||
|
SPI master mode. This binding does not describe SPI controllers
|
||||||
|
in slave mode.
|
||||||
|
|
||||||
|
The SPI master node requires the following properties:
|
||||||
|
- #address-cells - number of cells required to define a chip select
|
||||||
|
address on the SPI bus.
|
||||||
|
- #size-cells - should be zero.
|
||||||
|
- compatible - name of SPI bus controller following generic names
|
||||||
|
recommended practice.
|
||||||
|
No other properties are required in the SPI bus node. It is assumed
|
||||||
|
that a driver for an SPI bus device will understand that it is an SPI bus.
|
||||||
|
However, the binding does not attempt to define the specific method for
|
||||||
|
assigning chip select numbers. Since SPI chip select configuration is
|
||||||
|
flexible and non-standardized, it is left out of this binding with the
|
||||||
|
assumption that board specific platform code will be used to manage
|
||||||
|
chip selects. Individual drivers can define additional properties to
|
||||||
|
support describing the chip select layout.
|
||||||
|
|
||||||
|
SPI slave nodes must be children of the SPI master node and can
|
||||||
|
contain the following properties.
|
||||||
|
- reg - (required) chip select address of device.
|
||||||
|
- compatible - (required) name of SPI device following generic names
|
||||||
|
recommended practice
|
||||||
|
- spi-max-frequency - (required) Maximum SPI clocking speed of device in Hz
|
||||||
|
- spi-cpol - (optional) Empty property indicating device requires
|
||||||
|
inverse clock polarity (CPOL) mode
|
||||||
|
- spi-cpha - (optional) Empty property indicating device requires
|
||||||
|
shifted clock phase (CPHA) mode
|
||||||
|
|
||||||
|
SPI example for an MPC5200 SPI bus:
|
||||||
|
spi@f00 {
|
||||||
|
#address-cells = <1>;
|
||||||
|
#size-cells = <0>;
|
||||||
|
compatible = "fsl,mpc5200b-spi","fsl,mpc5200-spi";
|
||||||
|
reg = <0xf00 0x20>;
|
||||||
|
interrupts = <2 13 0 2 14 0>;
|
||||||
|
interrupt-parent = <&mpc5200_pic>;
|
||||||
|
|
||||||
|
ethernet-switch@0 {
|
||||||
|
compatible = "micrel,ks8995m";
|
||||||
|
spi-max-frequency = <1000000>;
|
||||||
|
reg = <0>;
|
||||||
|
};
|
||||||
|
|
||||||
|
codec@1 {
|
||||||
|
compatible = "ti,tlv320aic26";
|
||||||
|
spi-max-frequency = <100000>;
|
||||||
|
reg = <1>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
VII - Marvell Discovery mv64[345]6x System Controller chips
|
VII - Marvell Discovery mv64[345]6x System Controller chips
|
||||||
===========================================================
|
===========================================================
|
||||||
|
|
||||||
@ -1896,7 +1953,7 @@ prefixed with the string "marvell,", for Marvell Technology Group Ltd.
|
|||||||
1) The /system-controller node
|
1) The /system-controller node
|
||||||
|
|
||||||
This node is used to represent the system-controller and must be
|
This node is used to represent the system-controller and must be
|
||||||
present when the system uses a system contller chip. The top-level
|
present when the system uses a system controller chip. The top-level
|
||||||
system-controller node contains information that is global to all
|
system-controller node contains information that is global to all
|
||||||
devices within the system controller chip. The node name begins
|
devices within the system controller chip. The node name begins
|
||||||
with "system-controller" followed by the unit address, which is
|
with "system-controller" followed by the unit address, which is
|
||||||
|
@ -217,7 +217,7 @@ Although it is not recommended, you can specify '0' in the soc.model
|
|||||||
field to skip matching SOCs altogether.
|
field to skip matching SOCs altogether.
|
||||||
|
|
||||||
The 'model' field is a 16-bit number that matches the actual SOC. The
|
The 'model' field is a 16-bit number that matches the actual SOC. The
|
||||||
'major' and 'minor' fields are the major and minor revision numbrs,
|
'major' and 'minor' fields are the major and minor revision numbers,
|
||||||
respectively, of the SOC.
|
respectively, of the SOC.
|
||||||
|
|
||||||
For example, to match the 8323, revision 1.0:
|
For example, to match the 8323, revision 1.0:
|
||||||
|
@ -25,7 +25,7 @@ device 4711 via subchannel 1 in subchannel set 0, and subchannel 2 is a non-I/O
|
|||||||
subchannel. Device 1234 is accessed via subchannel 0 in subchannel set 1.
|
subchannel. Device 1234 is accessed via subchannel 0 in subchannel set 1.
|
||||||
|
|
||||||
The subchannel named 'defunct' does not represent any real subchannel on the
|
The subchannel named 'defunct' does not represent any real subchannel on the
|
||||||
system; it is a pseudo subchannel where disconnnected ccw devices are moved to
|
system; it is a pseudo subchannel where disconnected ccw devices are moved to
|
||||||
if they are displaced by another ccw device becoming operational on their
|
if they are displaced by another ccw device becoming operational on their
|
||||||
former subchannel. The ccw devices will be moved again to a proper subchannel
|
former subchannel. The ccw devices will be moved again to a proper subchannel
|
||||||
if they become operational again on that subchannel.
|
if they become operational again on that subchannel.
|
||||||
|
@ -524,7 +524,7 @@
|
|||||||
- Michael Lang
|
- Michael Lang
|
||||||
|
|
||||||
June 25 1997: (v1.8b)
|
June 25 1997: (v1.8b)
|
||||||
1) Some cosmetical changes for the handling of SCSI-device-types.
|
1) Some cosmetic changes for the handling of SCSI-device-types.
|
||||||
Now, also CD-Burners / WORMs and SCSI-scanners should work. For
|
Now, also CD-Burners / WORMs and SCSI-scanners should work. For
|
||||||
MO-drives I have no experience, therefore not yet supported.
|
MO-drives I have no experience, therefore not yet supported.
|
||||||
In logical_devices I changed from different type-variables to one
|
In logical_devices I changed from different type-variables to one
|
||||||
@ -914,7 +914,7 @@
|
|||||||
in version 4.0. This was never really necessary, as all troubles were
|
in version 4.0. This was never really necessary, as all troubles were
|
||||||
based on non-command related reasons up to now, so bypassing commands
|
based on non-command related reasons up to now, so bypassing commands
|
||||||
did not help to avoid any bugs. It is kept in 3.2X for debugging reasons.
|
did not help to avoid any bugs. It is kept in 3.2X for debugging reasons.
|
||||||
5) Dynamical reassignment of ldns was again verified and analyzed to be
|
5) Dynamic reassignment of ldns was again verified and analyzed to be
|
||||||
completely inoperational. This is corrected and should work now.
|
completely inoperational. This is corrected and should work now.
|
||||||
6) All commands that get sent to the SCSI adapter were verified and
|
6) All commands that get sent to the SCSI adapter were verified and
|
||||||
completed in such a way, that they are now completely conform to the
|
completed in such a way, that they are now completely conform to the
|
||||||
@ -1386,7 +1386,7 @@
|
|||||||
concerning the Linux-kernel in special, this SCSI-driver comes without any
|
concerning the Linux-kernel in special, this SCSI-driver comes without any
|
||||||
warranty. Its functionality is tested as good as possible on certain
|
warranty. Its functionality is tested as good as possible on certain
|
||||||
machines and combinations of computer hardware, which does not exclude,
|
machines and combinations of computer hardware, which does not exclude,
|
||||||
that dataloss or severe damage of hardware is possible while using this
|
that data loss or severe damage of hardware is possible while using this
|
||||||
part of software on some arbitrary computer hardware or in combination
|
part of software on some arbitrary computer hardware or in combination
|
||||||
with other software packages. It is highly recommended to make backup
|
with other software packages. It is highly recommended to make backup
|
||||||
copies of your data before using this software. Furthermore, personal
|
copies of your data before using this software. Furthermore, personal
|
||||||
|
@ -36,7 +36,7 @@ Cable pull and temporary device Loss:
|
|||||||
being removed, a switch rebooting, or a device reboot), the driver could
|
being removed, a switch rebooting, or a device reboot), the driver could
|
||||||
hide the disappearance of the device from the midlayer. I/O's issued to
|
hide the disappearance of the device from the midlayer. I/O's issued to
|
||||||
the LLDD would simply be queued for a short duration, allowing the device
|
the LLDD would simply be queued for a short duration, allowing the device
|
||||||
to reappear or link come back alive, with no inadvertant side effects
|
to reappear or link come back alive, with no inadvertent side effects
|
||||||
to the system. If the driver did not hide these conditions, i/o would be
|
to the system. If the driver did not hide these conditions, i/o would be
|
||||||
errored by the driver, the mid-layer would exhaust its retries, and the
|
errored by the driver, the mid-layer would exhaust its retries, and the
|
||||||
device would be taken offline. Manual intervention would be required to
|
device would be taken offline. Manual intervention would be required to
|
||||||
|
@ -65,7 +65,7 @@ Overview:
|
|||||||
discussion will concentrate on NPIV.
|
discussion will concentrate on NPIV.
|
||||||
|
|
||||||
Note: World Wide Name assignment (and uniqueness guarantees) are left
|
Note: World Wide Name assignment (and uniqueness guarantees) are left
|
||||||
up to an administrative entity controling the vport. For example,
|
up to an administrative entity controlling the vport. For example,
|
||||||
if vports are to be associated with virtual machines, a XEN mgmt
|
if vports are to be associated with virtual machines, a XEN mgmt
|
||||||
utility would be responsible for creating wwpn/wwnn's for the vport,
|
utility would be responsible for creating wwpn/wwnn's for the vport,
|
||||||
using it's own naming authority and OUI. (Note: it already does this
|
using it's own naming authority and OUI. (Note: it already does this
|
||||||
@ -91,7 +91,7 @@ Device Trees and Vport Objects:
|
|||||||
Here's what to expect in the device tree :
|
Here's what to expect in the device tree :
|
||||||
The typical Physical Port's Scsi_Host:
|
The typical Physical Port's Scsi_Host:
|
||||||
/sys/devices/.../host17/
|
/sys/devices/.../host17/
|
||||||
and it has the typical decendent tree:
|
and it has the typical descendant tree:
|
||||||
/sys/devices/.../host17/rport-17:0-0/target17:0:0/17:0:0:0:
|
/sys/devices/.../host17/rport-17:0-0/target17:0:0/17:0:0:0:
|
||||||
and then the vport is created on the Physical Port:
|
and then the vport is created on the Physical Port:
|
||||||
/sys/devices/.../host17/vport-17:0-0
|
/sys/devices/.../host17/vport-17:0-0
|
||||||
@ -192,7 +192,7 @@ Vport States:
|
|||||||
independent of the adapter's link state.
|
independent of the adapter's link state.
|
||||||
- Instantiation of the vport on the FC link via ELS traffic, etc.
|
- Instantiation of the vport on the FC link via ELS traffic, etc.
|
||||||
This is equivalent to a "link up" and successfull link initialization.
|
This is equivalent to a "link up" and successfull link initialization.
|
||||||
Futher information can be found in the interfaces section below for
|
Further information can be found in the interfaces section below for
|
||||||
Vport Creation.
|
Vport Creation.
|
||||||
|
|
||||||
Once a vport has been instantiated with the kernel/LLDD, a vport state
|
Once a vport has been instantiated with the kernel/LLDD, a vport state
|
||||||
|
@ -12,7 +12,7 @@ means no changes to adjanced clock
|
|||||||
Internally, the clk_set_rate_ex forwards request to clk->ops->set_rate method,
|
Internally, the clk_set_rate_ex forwards request to clk->ops->set_rate method,
|
||||||
if it is present in ops structure. The method should set the clock rate and adjust
|
if it is present in ops structure. The method should set the clock rate and adjust
|
||||||
all needed clocks according to the passed algo_id.
|
all needed clocks according to the passed algo_id.
|
||||||
Exact values for algo_id are machine-dependend. For the sh7722, the following
|
Exact values for algo_id are machine-dependent. For the sh7722, the following
|
||||||
values are defined:
|
values are defined:
|
||||||
|
|
||||||
NO_CHANGE = 0,
|
NO_CHANGE = 0,
|
||||||
|
@ -236,15 +236,15 @@ The parameter can be given:
|
|||||||
alias snd-card-1 snd-usb-audio
|
alias snd-card-1 snd-usb-audio
|
||||||
options snd-usb-audio index=1 device_setup=0x09
|
options snd-usb-audio index=1 device_setup=0x09
|
||||||
|
|
||||||
CAUTION when initializaing the device
|
CAUTION when initializing the device
|
||||||
-------------------------------------
|
-------------------------------------
|
||||||
|
|
||||||
* Correct initialization on the device requires that device_setup is given to
|
* Correct initialization on the device requires that device_setup is given to
|
||||||
the module BEFORE the device is turned on. So, if you use the "manual probing"
|
the module BEFORE the device is turned on. So, if you use the "manual probing"
|
||||||
method described above, take care to power-on the device AFTER this initialization.
|
method described above, take care to power-on the device AFTER this initialization.
|
||||||
|
|
||||||
* Failing to respect this will lead in a misconfiguration of the device. In this case
|
* Failing to respect this will lead to a misconfiguration of the device. In this case
|
||||||
turn off the device, unproble the snd-usb-audio module, then probe it again with
|
turn off the device, unprobe the snd-usb-audio module, then probe it again with
|
||||||
correct device_setup parameter and then (and only then) turn on the device again.
|
correct device_setup parameter and then (and only then) turn on the device again.
|
||||||
|
|
||||||
* If you've correctly initialized the device in a valid mode and then want to switch
|
* If you've correctly initialized the device in a valid mode and then want to switch
|
||||||
@ -388,9 +388,9 @@ There are 2 main potential issues when using Jackd with the device:
|
|||||||
|
|
||||||
Jack supports big endian devices only in recent versions (thanks to
|
Jack supports big endian devices only in recent versions (thanks to
|
||||||
Andreas Steinmetz for his first big-endian patch). I can't remember
|
Andreas Steinmetz for his first big-endian patch). I can't remember
|
||||||
extacly when this support was released into jackd, let's just say that
|
exactly when this support was released into jackd, let's just say that
|
||||||
with jackd version 0.103.0 it's almost ok (just a small bug is affecting
|
with jackd version 0.103.0 it's almost ok (just a small bug is affecting
|
||||||
16bits Big-Endian devices, but since you've read carefully the above
|
16bits Big-Endian devices, but since you've read carefully the above
|
||||||
paragraphs, you're now using kernel >= 2.6.23 and your 16bits devices
|
paragraphs, you're now using kernel >= 2.6.23 and your 16bits devices
|
||||||
are now Little Endians ;-) ).
|
are now Little Endians ;-) ).
|
||||||
|
|
||||||
|
@ -67,7 +67,7 @@ CONFIG_SND_HDA_POWER_SAVE kconfig. It's called when the codec needs
|
|||||||
to power up or may power down. The controller should check the all
|
to power up or may power down. The controller should check the all
|
||||||
belonging codecs on the bus whether they are actually powered off
|
belonging codecs on the bus whether they are actually powered off
|
||||||
(check codec->power_on), and optionally the driver may power down the
|
(check codec->power_on), and optionally the driver may power down the
|
||||||
contoller side, too.
|
controller side, too.
|
||||||
|
|
||||||
The bus instance is created via snd_hda_bus_new(). You need to pass
|
The bus instance is created via snd_hda_bus_new(). You need to pass
|
||||||
the card instance, the template, and the pointer to store the
|
the card instance, the template, and the pointer to store the
|
||||||
|
@ -68,7 +68,7 @@ Audio DAPM widgets fall into a number of types:-
|
|||||||
(Widgets are defined in include/sound/soc-dapm.h)
|
(Widgets are defined in include/sound/soc-dapm.h)
|
||||||
|
|
||||||
Widgets are usually added in the codec driver and the machine driver. There are
|
Widgets are usually added in the codec driver and the machine driver. There are
|
||||||
convience macros defined in soc-dapm.h that can be used to quickly build a
|
convenience macros defined in soc-dapm.h that can be used to quickly build a
|
||||||
list of widgets of the codecs and machines DAPM widgets.
|
list of widgets of the codecs and machines DAPM widgets.
|
||||||
|
|
||||||
Most widgets have a name, register, shift and invert. Some widgets have extra
|
Most widgets have a name, register, shift and invert. Some widgets have extra
|
||||||
|
@ -116,7 +116,7 @@ of kilobytes free. The VM uses this number to compute a pages_min
|
|||||||
value for each lowmem zone in the system. Each lowmem zone gets
|
value for each lowmem zone in the system. Each lowmem zone gets
|
||||||
a number of reserved free pages based proportionally on its size.
|
a number of reserved free pages based proportionally on its size.
|
||||||
|
|
||||||
Some minimal ammount of memory is needed to satisfy PF_MEMALLOC
|
Some minimal amount of memory is needed to satisfy PF_MEMALLOC
|
||||||
allocations; if you set this to lower than 1024KB, your system will
|
allocations; if you set this to lower than 1024KB, your system will
|
||||||
become subtly broken, and prone to deadlock under high loads.
|
become subtly broken, and prone to deadlock under high loads.
|
||||||
|
|
||||||
|
@ -125,7 +125,7 @@ increase of flexibility and the avoidance of duplicated code across
|
|||||||
architectures justifies the slight increase of the binary size.
|
architectures justifies the slight increase of the binary size.
|
||||||
|
|
||||||
The conversion of an architecture has no functional impact, but allows to
|
The conversion of an architecture has no functional impact, but allows to
|
||||||
utilize the high resolution and dynamic tick functionalites without any change
|
utilize the high resolution and dynamic tick functionalities without any change
|
||||||
to the clock event device and timer interrupt code. After the conversion the
|
to the clock event device and timer interrupt code. After the conversion the
|
||||||
enabling of high resolution timers and dynamic ticks is simply provided by
|
enabling of high resolution timers and dynamic ticks is simply provided by
|
||||||
adding the kernel/time/Kconfig file to the architecture specific Kconfig and
|
adding the kernel/time/Kconfig file to the architecture specific Kconfig and
|
||||||
|
@ -218,9 +218,35 @@ If use of such macros is not convenient, another option is to use memcpy(),
|
|||||||
where the source or destination (or both) are of type u8* or unsigned char*.
|
where the source or destination (or both) are of type u8* or unsigned char*.
|
||||||
Due to the byte-wise nature of this operation, unaligned accesses are avoided.
|
Due to the byte-wise nature of this operation, unaligned accesses are avoided.
|
||||||
|
|
||||||
--
|
|
||||||
Author: Daniel Drake <dsd@gentoo.org>
|
Alignment vs. Networking
|
||||||
With help from: Alan Cox, Avuton Olrich, Heikki Orsila, Jan Engelhardt,
|
========================
|
||||||
Johannes Berg, Kyle McMartin, Kyle Moffett, Randy Dunlap, Robert Hancock,
|
|
||||||
Uli Kunitz, Vadim Lobanov
|
On architectures that require aligned loads, networking requires that the IP
|
||||||
|
header is aligned on a four-byte boundary to optimise the IP stack. For
|
||||||
|
regular ethernet hardware, the constant NET_IP_ALIGN is used. On most
|
||||||
|
architectures this constant has the value 2 because the normal ethernet
|
||||||
|
header is 14 bytes long, so in order to get proper alignment one needs to
|
||||||
|
DMA to an address which can be expressed as 4*n + 2. One notable exception
|
||||||
|
here is powerpc which defines NET_IP_ALIGN to 0 because DMA to unaligned
|
||||||
|
addresses can be very expensive and dwarf the cost of unaligned loads.
|
||||||
|
|
||||||
|
For some ethernet hardware that cannot DMA to unaligned addresses like
|
||||||
|
4*n+2 or non-ethernet hardware, this can be a problem, and it is then
|
||||||
|
required to copy the incoming frame into an aligned buffer. Because this is
|
||||||
|
unnecessary on architectures that can do unaligned accesses, the code can be
|
||||||
|
made dependent on CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS like so:
|
||||||
|
|
||||||
|
#ifdef CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS
|
||||||
|
skb = original skb
|
||||||
|
#else
|
||||||
|
skb = copy skb
|
||||||
|
#endif
|
||||||
|
|
||||||
|
--
|
||||||
|
Authors: Daniel Drake <dsd@gentoo.org>,
|
||||||
|
Johannes Berg <johannes@sipsolutions.net>
|
||||||
|
With help from: Alan Cox, Avuton Olrich, Heikki Orsila, Jan Engelhardt,
|
||||||
|
Kyle McMartin, Kyle Moffett, Randy Dunlap, Robert Hancock, Uli Kunitz,
|
||||||
|
Vadim Lobanov
|
||||||
|
|
||||||
|
@ -8,7 +8,7 @@ not) in a system. This feature will allow you to implement a lock-down
|
|||||||
of USB devices, fully controlled by user space.
|
of USB devices, fully controlled by user space.
|
||||||
|
|
||||||
As of now, when a USB device is connected it is configured and
|
As of now, when a USB device is connected it is configured and
|
||||||
it's interfaces inmediately made available to the users. With this
|
its interfaces are immediately made available to the users. With this
|
||||||
modification, only if root authorizes the device to be configured will
|
modification, only if root authorizes the device to be configured will
|
||||||
then it be possible to use it.
|
then it be possible to use it.
|
||||||
|
|
||||||
|
@ -157,7 +157,7 @@ Loading can be done as shown below:
|
|||||||
|
|
||||||
[root@localhost home]# modprobe sn9c102
|
[root@localhost home]# modprobe sn9c102
|
||||||
|
|
||||||
Note that the module is called "sn9c102" for historic reasons, althought it
|
Note that the module is called "sn9c102" for historic reasons, although it
|
||||||
does not just support the SN9C102.
|
does not just support the SN9C102.
|
||||||
|
|
||||||
At this point all the devices supported by the driver and connected to the USB
|
At this point all the devices supported by the driver and connected to the USB
|
||||||
|
@ -77,7 +77,7 @@ memory that is preset in system at this time. System administrators may want
|
|||||||
to put this command in one of the local rc init files. This will enable the
|
to put this command in one of the local rc init files. This will enable the
|
||||||
kernel to request huge pages early in the boot process (when the possibility
|
kernel to request huge pages early in the boot process (when the possibility
|
||||||
of getting physical contiguous pages is still very high). In either
|
of getting physical contiguous pages is still very high). In either
|
||||||
case, adminstrators will want to verify the number of hugepages actually
|
case, administrators will want to verify the number of hugepages actually
|
||||||
allocated by checking the sysctl or meminfo.
|
allocated by checking the sysctl or meminfo.
|
||||||
|
|
||||||
/proc/sys/vm/nr_overcommit_hugepages indicates how large the pool of
|
/proc/sys/vm/nr_overcommit_hugepages indicates how large the pool of
|
||||||
@ -95,6 +95,29 @@ this condition holds, however, no more surplus huge pages will be
|
|||||||
allowed on the system until one of the two sysctls are increased
|
allowed on the system until one of the two sysctls are increased
|
||||||
sufficiently, or the surplus huge pages go out of use and are freed.
|
sufficiently, or the surplus huge pages go out of use and are freed.
|
||||||
|
|
||||||
|
With support for multiple hugepage pools at run-time available, much of
|
||||||
|
the hugepage userspace interface has been duplicated in sysfs. The above
|
||||||
|
information applies to the default hugepage size (which will be
|
||||||
|
controlled by the proc interfaces for backwards compatibility). The root
|
||||||
|
hugepage control directory is
|
||||||
|
|
||||||
|
/sys/kernel/mm/hugepages
|
||||||
|
|
||||||
|
For each hugepage size supported by the running kernel, a subdirectory
|
||||||
|
will exist, of the form
|
||||||
|
|
||||||
|
hugepages-${size}kB
|
||||||
|
|
||||||
|
Inside each of these directories, the same set of files will exist:
|
||||||
|
|
||||||
|
nr_hugepages
|
||||||
|
nr_overcommit_hugepages
|
||||||
|
free_hugepages
|
||||||
|
resv_hugepages
|
||||||
|
surplus_hugepages
|
||||||
|
|
||||||
|
which function as described above for the default hugepage-sized case.
|
||||||
|
|
||||||
If the user applications are going to request hugepages using mmap system
|
If the user applications are going to request hugepages using mmap system
|
||||||
call, then it is required that system administrator mount a file system of
|
call, then it is required that system administrator mount a file system of
|
||||||
type hugetlbfs:
|
type hugetlbfs:
|
||||||
|
@ -58,7 +58,7 @@ most general to most specific:
|
|||||||
the policy at the time they were allocated.
|
the policy at the time they were allocated.
|
||||||
|
|
||||||
VMA Policy: A "VMA" or "Virtual Memory Area" refers to a range of a task's
|
VMA Policy: A "VMA" or "Virtual Memory Area" refers to a range of a task's
|
||||||
virtual adddress space. A task may define a specific policy for a range
|
virtual address space. A task may define a specific policy for a range
|
||||||
of its virtual address space. See the MEMORY POLICIES APIS section,
|
of its virtual address space. See the MEMORY POLICIES APIS section,
|
||||||
below, for an overview of the mbind() system call used to set a VMA
|
below, for an overview of the mbind() system call used to set a VMA
|
||||||
policy.
|
policy.
|
||||||
@ -353,7 +353,7 @@ follows:
|
|||||||
|
|
||||||
Because of this extra reference counting, and because we must lookup
|
Because of this extra reference counting, and because we must lookup
|
||||||
shared policies in a tree structure under spinlock, shared policies are
|
shared policies in a tree structure under spinlock, shared policies are
|
||||||
more expensive to use in the page allocation path. This is expecially
|
more expensive to use in the page allocation path. This is especially
|
||||||
true for shared policies on shared memory regions shared by tasks running
|
true for shared policies on shared memory regions shared by tasks running
|
||||||
on different NUMA nodes. This extra overhead can be avoided by always
|
on different NUMA nodes. This extra overhead can be avoided by always
|
||||||
falling back to task or system default policy for shared memory regions,
|
falling back to task or system default policy for shared memory regions,
|
||||||
|
@ -114,6 +114,6 @@ CREDITS
|
|||||||
|
|
||||||
Original impetus and research by Randy Dunlap
|
Original impetus and research by Randy Dunlap
|
||||||
Written by Jonathan Corbet
|
Written by Jonathan Corbet
|
||||||
Improvements via coments from Satyam Sharma, Johannes Stezenbach, Jesper
|
Improvements via comments from Satyam Sharma, Johannes Stezenbach, Jesper
|
||||||
Juhl, Heikki Orsila, H. Peter Anvin, Philipp Hahn, and Stefan
|
Juhl, Heikki Orsila, H. Peter Anvin, Philipp Hahn, and Stefan
|
||||||
Richter.
|
Richter.
|
||||||
|
25
MAINTAINERS
25
MAINTAINERS
@ -1043,6 +1043,12 @@ M: fujita.tomonori@lab.ntt.co.jp
|
|||||||
L: linux-scsi@vger.kernel.org
|
L: linux-scsi@vger.kernel.org
|
||||||
S: Supported
|
S: Supported
|
||||||
|
|
||||||
|
BT8XXGPIO DRIVER
|
||||||
|
P: Michael Buesch
|
||||||
|
M: mb@bu3sch.de
|
||||||
|
W: http://bu3sch.de/btgpio.php
|
||||||
|
S: Maintained
|
||||||
|
|
||||||
BTTV VIDEO4LINUX DRIVER
|
BTTV VIDEO4LINUX DRIVER
|
||||||
P: Mauro Carvalho Chehab
|
P: Mauro Carvalho Chehab
|
||||||
M: mchehab@infradead.org
|
M: mchehab@infradead.org
|
||||||
@ -1984,7 +1990,7 @@ P: Carlos Corbacho
|
|||||||
M: carlos@strangeworlds.co.uk
|
M: carlos@strangeworlds.co.uk
|
||||||
S: Odd Fixes
|
S: Odd Fixes
|
||||||
|
|
||||||
HPET: High Precision Event Timers driver (hpet.c)
|
HPET: High Precision Event Timers driver (drivers/char/hpet.c)
|
||||||
P: Clemens Ladisch
|
P: Clemens Ladisch
|
||||||
M: clemens@ladisch.de
|
M: clemens@ladisch.de
|
||||||
S: Maintained
|
S: Maintained
|
||||||
@ -2937,8 +2943,6 @@ P: Faisal Latif
|
|||||||
M: flatif@neteffect.com
|
M: flatif@neteffect.com
|
||||||
P: Chien Tung
|
P: Chien Tung
|
||||||
M: ctung@neteffect.com
|
M: ctung@neteffect.com
|
||||||
P: Glenn Streiff
|
|
||||||
M: gstreiff@neteffect.com
|
|
||||||
L: general@lists.openfabrics.org
|
L: general@lists.openfabrics.org
|
||||||
W: http://www.neteffect.com
|
W: http://www.neteffect.com
|
||||||
S: Supported
|
S: Supported
|
||||||
@ -3119,6 +3123,12 @@ W: http://oss.oracle.com/projects/ocfs2/
|
|||||||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/mfasheh/ocfs2.git
|
T: git git://git.kernel.org/pub/scm/linux/kernel/git/mfasheh/ocfs2.git
|
||||||
S: Supported
|
S: Supported
|
||||||
|
|
||||||
|
OMFS FILESYSTEM
|
||||||
|
P: Bob Copeland
|
||||||
|
M: me@bobcopeland.com
|
||||||
|
L: linux-karma-devel@lists.sourceforge.net
|
||||||
|
S: Maintained
|
||||||
|
|
||||||
OMNIKEY CARDMAN 4000 DRIVER
|
OMNIKEY CARDMAN 4000 DRIVER
|
||||||
P: Harald Welte
|
P: Harald Welte
|
||||||
M: laforge@gnumonks.org
|
M: laforge@gnumonks.org
|
||||||
@ -4086,12 +4096,6 @@ W: http://www.prosec.rub.de/tpm/
|
|||||||
L: tpmdd-devel@lists.sourceforge.net
|
L: tpmdd-devel@lists.sourceforge.net
|
||||||
S: Maintained
|
S: Maintained
|
||||||
|
|
||||||
TRIDENT 4DWAVE/SIS 7018 PCI AUDIO CORE
|
|
||||||
P: Muli Ben-Yehuda
|
|
||||||
M: mulix@mulix.org
|
|
||||||
L: linux-kernel@vger.kernel.org
|
|
||||||
S: Maintained
|
|
||||||
|
|
||||||
TRIVIAL PATCHES
|
TRIVIAL PATCHES
|
||||||
P: Jesper Juhl
|
P: Jesper Juhl
|
||||||
M: trivial@kernel.org
|
M: trivial@kernel.org
|
||||||
@ -4137,9 +4141,6 @@ W: http://www.uclinux.org/
|
|||||||
L: uclinux-dev@uclinux.org (subscribers-only)
|
L: uclinux-dev@uclinux.org (subscribers-only)
|
||||||
S: Maintained
|
S: Maintained
|
||||||
|
|
||||||
UCLINUX FOR NEC V850
|
|
||||||
P: Miles Bader
|
|
||||||
|
|
||||||
UCLINUX FOR RENESAS H8/300
|
UCLINUX FOR RENESAS H8/300
|
||||||
P: Yoshinori Sato
|
P: Yoshinori Sato
|
||||||
M: ysato@users.sourceforge.jp
|
M: ysato@users.sourceforge.jp
|
||||||
|
1
Makefile
1
Makefile
@ -1061,6 +1061,7 @@ modules: $(vmlinux-dirs) $(if $(KBUILD_BUILTIN),vmlinux)
|
|||||||
$(Q)$(AWK) '!x[$$0]++' $(vmlinux-dirs:%=$(objtree)/%/modules.order) > $(objtree)/modules.order
|
$(Q)$(AWK) '!x[$$0]++' $(vmlinux-dirs:%=$(objtree)/%/modules.order) > $(objtree)/modules.order
|
||||||
@echo ' Building modules, stage 2.';
|
@echo ' Building modules, stage 2.';
|
||||||
$(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost
|
$(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost
|
||||||
|
$(Q)$(MAKE) -f $(srctree)/scripts/Makefile.fwinst obj=firmware __fw_modbuild
|
||||||
|
|
||||||
|
|
||||||
# Target to prepare building external modules
|
# Target to prepare building external modules
|
||||||
|
47
arch/Kconfig
47
arch/Kconfig
@ -27,18 +27,65 @@ config KPROBES
|
|||||||
for kernel debugging, non-intrusive instrumentation and testing.
|
for kernel debugging, non-intrusive instrumentation and testing.
|
||||||
If in doubt, say "N".
|
If in doubt, say "N".
|
||||||
|
|
||||||
|
config HAVE_EFFICIENT_UNALIGNED_ACCESS
|
||||||
|
def_bool n
|
||||||
|
help
|
||||||
|
Some architectures are unable to perform unaligned accesses
|
||||||
|
without the use of get_unaligned/put_unaligned. Others are
|
||||||
|
unable to perform such accesses efficiently (e.g. trap on
|
||||||
|
unaligned access and require fixing it up in the exception
|
||||||
|
handler.)
|
||||||
|
|
||||||
|
This symbol should be selected by an architecture if it can
|
||||||
|
perform unaligned accesses efficiently to allow different
|
||||||
|
code paths to be selected for these cases. Some network
|
||||||
|
drivers, for example, could opt to not fix up alignment
|
||||||
|
problems with received packets if doing so would not help
|
||||||
|
much.
|
||||||
|
|
||||||
|
See Documentation/unaligned-memory-access.txt for more
|
||||||
|
information on the topic of unaligned memory accesses.
|
||||||
|
|
||||||
config KRETPROBES
|
config KRETPROBES
|
||||||
def_bool y
|
def_bool y
|
||||||
depends on KPROBES && HAVE_KRETPROBES
|
depends on KPROBES && HAVE_KRETPROBES
|
||||||
|
|
||||||
|
config HAVE_IOREMAP_PROT
|
||||||
|
def_bool n
|
||||||
|
|
||||||
config HAVE_KPROBES
|
config HAVE_KPROBES
|
||||||
def_bool n
|
def_bool n
|
||||||
|
|
||||||
config HAVE_KRETPROBES
|
config HAVE_KRETPROBES
|
||||||
def_bool n
|
def_bool n
|
||||||
|
|
||||||
|
#
|
||||||
|
# An arch should select this if it provides all these things:
|
||||||
|
#
|
||||||
|
# task_pt_regs() in asm/processor.h or asm/ptrace.h
|
||||||
|
# arch_has_single_step() if there is hardware single-step support
|
||||||
|
# arch_has_block_step() if there is hardware block-step support
|
||||||
|
# arch_ptrace() and not #define __ARCH_SYS_PTRACE
|
||||||
|
# compat_arch_ptrace() and #define __ARCH_WANT_COMPAT_SYS_PTRACE
|
||||||
|
# asm/syscall.h supplying asm-generic/syscall.h interface
|
||||||
|
# linux/regset.h user_regset interfaces
|
||||||
|
# CORE_DUMP_USE_REGSET #define'd in linux/elf.h
|
||||||
|
# TIF_SYSCALL_TRACE calls tracehook_report_syscall_{entry,exit}
|
||||||
|
# TIF_NOTIFY_RESUME calls tracehook_notify_resume()
|
||||||
|
# signal delivery calls tracehook_signal_handler()
|
||||||
|
#
|
||||||
|
config HAVE_ARCH_TRACEHOOK
|
||||||
|
def_bool n
|
||||||
|
|
||||||
config HAVE_DMA_ATTRS
|
config HAVE_DMA_ATTRS
|
||||||
def_bool n
|
def_bool n
|
||||||
|
|
||||||
config USE_GENERIC_SMP_HELPERS
|
config USE_GENERIC_SMP_HELPERS
|
||||||
def_bool n
|
def_bool n
|
||||||
|
|
||||||
|
config HAVE_CLK
|
||||||
|
def_bool n
|
||||||
|
help
|
||||||
|
The <linux/clk.h> calls support software clock gating and
|
||||||
|
thus are a key power management tool on many systems.
|
||||||
|
|
||||||
|
@ -333,11 +333,6 @@ config PCI_SYSCALL
|
|||||||
config IOMMU_HELPER
|
config IOMMU_HELPER
|
||||||
def_bool PCI
|
def_bool PCI
|
||||||
|
|
||||||
config ALPHA_CORE_AGP
|
|
||||||
bool
|
|
||||||
depends on ALPHA_GENERIC || ALPHA_TITAN || ALPHA_MARVEL
|
|
||||||
default y
|
|
||||||
|
|
||||||
config ALPHA_NONAME
|
config ALPHA_NONAME
|
||||||
bool
|
bool
|
||||||
depends on ALPHA_BOOK1 || ALPHA_NONAME_CH
|
depends on ALPHA_BOOK1 || ALPHA_NONAME_CH
|
||||||
|
@ -78,8 +78,6 @@ static unsigned outcnt; /* bytes in output buffer */
|
|||||||
static int fill_inbuf(void);
|
static int fill_inbuf(void);
|
||||||
static void flush_window(void);
|
static void flush_window(void);
|
||||||
static void error(char *m);
|
static void error(char *m);
|
||||||
static void gzip_mark(void **);
|
|
||||||
static void gzip_release(void **);
|
|
||||||
|
|
||||||
static char *input_data;
|
static char *input_data;
|
||||||
static int input_data_size;
|
static int input_data_size;
|
||||||
@ -88,51 +86,18 @@ static uch *output_data;
|
|||||||
static ulg output_ptr;
|
static ulg output_ptr;
|
||||||
static ulg bytes_out;
|
static ulg bytes_out;
|
||||||
|
|
||||||
static void *malloc(int size);
|
|
||||||
static void free(void *where);
|
|
||||||
static void error(char *m);
|
static void error(char *m);
|
||||||
static void gzip_mark(void **);
|
static void gzip_mark(void **);
|
||||||
static void gzip_release(void **);
|
static void gzip_release(void **);
|
||||||
|
|
||||||
extern int end;
|
extern int end;
|
||||||
static ulg free_mem_ptr;
|
static ulg free_mem_ptr;
|
||||||
static ulg free_mem_ptr_end;
|
static ulg free_mem_end_ptr;
|
||||||
|
|
||||||
#define HEAP_SIZE 0x3000
|
#define HEAP_SIZE 0x3000
|
||||||
|
|
||||||
#include "../../../lib/inflate.c"
|
#include "../../../lib/inflate.c"
|
||||||
|
|
||||||
static void *malloc(int size)
|
|
||||||
{
|
|
||||||
void *p;
|
|
||||||
|
|
||||||
if (size <0) error("Malloc error");
|
|
||||||
if (free_mem_ptr <= 0) error("Memory error");
|
|
||||||
|
|
||||||
free_mem_ptr = (free_mem_ptr + 3) & ~3; /* Align */
|
|
||||||
|
|
||||||
p = (void *)free_mem_ptr;
|
|
||||||
free_mem_ptr += size;
|
|
||||||
|
|
||||||
if (free_mem_ptr >= free_mem_ptr_end)
|
|
||||||
error("Out of memory");
|
|
||||||
return p;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void free(void *where)
|
|
||||||
{ /* gzip_mark & gzip_release do the free */
|
|
||||||
}
|
|
||||||
|
|
||||||
static void gzip_mark(void **ptr)
|
|
||||||
{
|
|
||||||
*ptr = (void *) free_mem_ptr;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void gzip_release(void **ptr)
|
|
||||||
{
|
|
||||||
free_mem_ptr = (long) *ptr;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ===========================================================================
|
/* ===========================================================================
|
||||||
* Fill the input buffer. This is called only when the buffer is empty
|
* Fill the input buffer. This is called only when the buffer is empty
|
||||||
* and at least one byte is really needed.
|
* and at least one byte is really needed.
|
||||||
@ -193,7 +158,7 @@ decompress_kernel(void *output_start,
|
|||||||
|
|
||||||
/* FIXME FIXME FIXME */
|
/* FIXME FIXME FIXME */
|
||||||
free_mem_ptr = (ulg)output_start + ksize;
|
free_mem_ptr = (ulg)output_start + ksize;
|
||||||
free_mem_ptr_end = (ulg)output_start + ksize + 0x200000;
|
free_mem_end_ptr = (ulg)output_start + ksize + 0x200000;
|
||||||
/* FIXME FIXME FIXME */
|
/* FIXME FIXME FIXME */
|
||||||
|
|
||||||
/* put in temp area to reduce initial footprint */
|
/* put in temp area to reduce initial footprint */
|
||||||
|
@ -253,15 +253,15 @@ do_osf_statfs(struct dentry * dentry, struct osf_statfs __user *buffer,
|
|||||||
}
|
}
|
||||||
|
|
||||||
asmlinkage int
|
asmlinkage int
|
||||||
osf_statfs(char __user *path, struct osf_statfs __user *buffer, unsigned long bufsiz)
|
osf_statfs(char __user *pathname, struct osf_statfs __user *buffer, unsigned long bufsiz)
|
||||||
{
|
{
|
||||||
struct nameidata nd;
|
struct path path;
|
||||||
int retval;
|
int retval;
|
||||||
|
|
||||||
retval = user_path_walk(path, &nd);
|
retval = user_path(pathname, &path);
|
||||||
if (!retval) {
|
if (!retval) {
|
||||||
retval = do_osf_statfs(nd.path.dentry, buffer, bufsiz);
|
retval = do_osf_statfs(path.dentry, buffer, bufsiz);
|
||||||
path_put(&nd.path);
|
path_put(&path);
|
||||||
}
|
}
|
||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
|
@ -94,36 +94,6 @@ __bad_page(void)
|
|||||||
return pte_mkdirty(mk_pte(virt_to_page(EMPTY_PGE), PAGE_SHARED));
|
return pte_mkdirty(mk_pte(virt_to_page(EMPTY_PGE), PAGE_SHARED));
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef CONFIG_DISCONTIGMEM
|
|
||||||
void
|
|
||||||
show_mem(void)
|
|
||||||
{
|
|
||||||
long i,free = 0,total = 0,reserved = 0;
|
|
||||||
long shared = 0, cached = 0;
|
|
||||||
|
|
||||||
printk("\nMem-info:\n");
|
|
||||||
show_free_areas();
|
|
||||||
printk("Free swap: %6ldkB\n", nr_swap_pages<<(PAGE_SHIFT-10));
|
|
||||||
i = max_mapnr;
|
|
||||||
while (i-- > 0) {
|
|
||||||
total++;
|
|
||||||
if (PageReserved(mem_map+i))
|
|
||||||
reserved++;
|
|
||||||
else if (PageSwapCache(mem_map+i))
|
|
||||||
cached++;
|
|
||||||
else if (!page_count(mem_map+i))
|
|
||||||
free++;
|
|
||||||
else
|
|
||||||
shared += page_count(mem_map + i) - 1;
|
|
||||||
}
|
|
||||||
printk("%ld pages of RAM\n",total);
|
|
||||||
printk("%ld free pages\n",free);
|
|
||||||
printk("%ld reserved pages\n",reserved);
|
|
||||||
printk("%ld pages shared\n",shared);
|
|
||||||
printk("%ld pages swap cached\n",cached);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
static inline unsigned long
|
static inline unsigned long
|
||||||
load_PCB(struct pcb_struct *pcb)
|
load_PCB(struct pcb_struct *pcb)
|
||||||
{
|
{
|
||||||
|
@ -19,7 +19,6 @@
|
|||||||
#include <asm/pgalloc.h>
|
#include <asm/pgalloc.h>
|
||||||
|
|
||||||
pg_data_t node_data[MAX_NUMNODES];
|
pg_data_t node_data[MAX_NUMNODES];
|
||||||
bootmem_data_t node_bdata[MAX_NUMNODES];
|
|
||||||
EXPORT_SYMBOL(node_data);
|
EXPORT_SYMBOL(node_data);
|
||||||
|
|
||||||
#undef DEBUG_DISCONTIG
|
#undef DEBUG_DISCONTIG
|
||||||
@ -141,7 +140,7 @@ setup_memory_node(int nid, void *kernel_end)
|
|||||||
printk(" not enough mem to reserve NODE_DATA");
|
printk(" not enough mem to reserve NODE_DATA");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
NODE_DATA(nid)->bdata = &node_bdata[nid];
|
NODE_DATA(nid)->bdata = &bootmem_node_data[nid];
|
||||||
|
|
||||||
printk(" Detected node memory: start %8lu, end %8lu\n",
|
printk(" Detected node memory: start %8lu, end %8lu\n",
|
||||||
node_min_pfn, node_max_pfn);
|
node_min_pfn, node_max_pfn);
|
||||||
@ -304,8 +303,9 @@ void __init paging_init(void)
|
|||||||
dma_local_pfn = virt_to_phys((char *)MAX_DMA_ADDRESS) >> PAGE_SHIFT;
|
dma_local_pfn = virt_to_phys((char *)MAX_DMA_ADDRESS) >> PAGE_SHIFT;
|
||||||
|
|
||||||
for_each_online_node(nid) {
|
for_each_online_node(nid) {
|
||||||
unsigned long start_pfn = node_bdata[nid].node_boot_start >> PAGE_SHIFT;
|
bootmem_data_t *bdata = &bootmem_node_data[nid];
|
||||||
unsigned long end_pfn = node_bdata[nid].node_low_pfn;
|
unsigned long start_pfn = bdata->node_min_pfn;
|
||||||
|
unsigned long end_pfn = bdata->node_low_pfn;
|
||||||
|
|
||||||
if (dma_local_pfn >= end_pfn - start_pfn)
|
if (dma_local_pfn >= end_pfn - start_pfn)
|
||||||
zones_size[ZONE_DMA] = end_pfn - start_pfn;
|
zones_size[ZONE_DMA] = end_pfn - start_pfn;
|
||||||
@ -313,7 +313,7 @@ void __init paging_init(void)
|
|||||||
zones_size[ZONE_DMA] = dma_local_pfn;
|
zones_size[ZONE_DMA] = dma_local_pfn;
|
||||||
zones_size[ZONE_NORMAL] = (end_pfn - start_pfn) - dma_local_pfn;
|
zones_size[ZONE_NORMAL] = (end_pfn - start_pfn) - dma_local_pfn;
|
||||||
}
|
}
|
||||||
free_area_init_node(nid, NODE_DATA(nid), zones_size, start_pfn, NULL);
|
free_area_init_node(nid, zones_size, start_pfn, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Initialize the kernel's ZERO_PGE. */
|
/* Initialize the kernel's ZERO_PGE. */
|
||||||
@ -359,38 +359,3 @@ void __init mem_init(void)
|
|||||||
mem_stress();
|
mem_stress();
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
show_mem(void)
|
|
||||||
{
|
|
||||||
long i,free = 0,total = 0,reserved = 0;
|
|
||||||
long shared = 0, cached = 0;
|
|
||||||
int nid;
|
|
||||||
|
|
||||||
printk("\nMem-info:\n");
|
|
||||||
show_free_areas();
|
|
||||||
printk("Free swap: %6ldkB\n", nr_swap_pages<<(PAGE_SHIFT-10));
|
|
||||||
for_each_online_node(nid) {
|
|
||||||
unsigned long flags;
|
|
||||||
pgdat_resize_lock(NODE_DATA(nid), &flags);
|
|
||||||
i = node_spanned_pages(nid);
|
|
||||||
while (i-- > 0) {
|
|
||||||
struct page *page = nid_page_nr(nid, i);
|
|
||||||
total++;
|
|
||||||
if (PageReserved(page))
|
|
||||||
reserved++;
|
|
||||||
else if (PageSwapCache(page))
|
|
||||||
cached++;
|
|
||||||
else if (!page_count(page))
|
|
||||||
free++;
|
|
||||||
else
|
|
||||||
shared += page_count(page) - 1;
|
|
||||||
}
|
|
||||||
pgdat_resize_unlock(NODE_DATA(nid), &flags);
|
|
||||||
}
|
|
||||||
printk("%ld pages of RAM\n",total);
|
|
||||||
printk("%ld free pages\n",free);
|
|
||||||
printk("%ld reserved pages\n",reserved);
|
|
||||||
printk("%ld pages shared\n",shared);
|
|
||||||
printk("%ld pages swap cached\n",cached);
|
|
||||||
}
|
|
||||||
|
@ -198,12 +198,14 @@ choice
|
|||||||
config ARCH_AAEC2000
|
config ARCH_AAEC2000
|
||||||
bool "Agilent AAEC-2000 based"
|
bool "Agilent AAEC-2000 based"
|
||||||
select ARM_AMBA
|
select ARM_AMBA
|
||||||
|
select HAVE_CLK
|
||||||
help
|
help
|
||||||
This enables support for systems based on the Agilent AAEC-2000
|
This enables support for systems based on the Agilent AAEC-2000
|
||||||
|
|
||||||
config ARCH_INTEGRATOR
|
config ARCH_INTEGRATOR
|
||||||
bool "ARM Ltd. Integrator family"
|
bool "ARM Ltd. Integrator family"
|
||||||
select ARM_AMBA
|
select ARM_AMBA
|
||||||
|
select HAVE_CLK
|
||||||
select ICST525
|
select ICST525
|
||||||
help
|
help
|
||||||
Support for ARM's Integrator platform.
|
Support for ARM's Integrator platform.
|
||||||
@ -211,6 +213,7 @@ config ARCH_INTEGRATOR
|
|||||||
config ARCH_REALVIEW
|
config ARCH_REALVIEW
|
||||||
bool "ARM Ltd. RealView family"
|
bool "ARM Ltd. RealView family"
|
||||||
select ARM_AMBA
|
select ARM_AMBA
|
||||||
|
select HAVE_CLK
|
||||||
select ICST307
|
select ICST307
|
||||||
select GENERIC_TIME
|
select GENERIC_TIME
|
||||||
select GENERIC_CLOCKEVENTS
|
select GENERIC_CLOCKEVENTS
|
||||||
@ -221,6 +224,7 @@ config ARCH_VERSATILE
|
|||||||
bool "ARM Ltd. Versatile family"
|
bool "ARM Ltd. Versatile family"
|
||||||
select ARM_AMBA
|
select ARM_AMBA
|
||||||
select ARM_VIC
|
select ARM_VIC
|
||||||
|
select HAVE_CLK
|
||||||
select ICST307
|
select ICST307
|
||||||
select GENERIC_TIME
|
select GENERIC_TIME
|
||||||
select GENERIC_CLOCKEVENTS
|
select GENERIC_CLOCKEVENTS
|
||||||
@ -262,7 +266,9 @@ config ARCH_EP93XX
|
|||||||
select ARM_AMBA
|
select ARM_AMBA
|
||||||
select ARM_VIC
|
select ARM_VIC
|
||||||
select GENERIC_GPIO
|
select GENERIC_GPIO
|
||||||
select HAVE_GPIO_LIB
|
select HAVE_CLK
|
||||||
|
select HAVE_CLK
|
||||||
|
select ARCH_REQUIRE_GPIOLIB
|
||||||
help
|
help
|
||||||
This enables support for the Cirrus EP93xx series of CPUs.
|
This enables support for the Cirrus EP93xx series of CPUs.
|
||||||
|
|
||||||
@ -381,6 +387,7 @@ config ARCH_NS9XXX
|
|||||||
select GENERIC_GPIO
|
select GENERIC_GPIO
|
||||||
select GENERIC_TIME
|
select GENERIC_TIME
|
||||||
select GENERIC_CLOCKEVENTS
|
select GENERIC_CLOCKEVENTS
|
||||||
|
select HAVE_CLK
|
||||||
help
|
help
|
||||||
Say Y here if you intend to run this kernel on a NetSilicon NS9xxx
|
Say Y here if you intend to run this kernel on a NetSilicon NS9xxx
|
||||||
System.
|
System.
|
||||||
@ -430,6 +437,7 @@ config ARCH_ORION5X
|
|||||||
|
|
||||||
config ARCH_PNX4008
|
config ARCH_PNX4008
|
||||||
bool "Philips Nexperia PNX4008 Mobile"
|
bool "Philips Nexperia PNX4008 Mobile"
|
||||||
|
select HAVE_CLK
|
||||||
help
|
help
|
||||||
This enables support for Philips PNX4008 mobile platform.
|
This enables support for Philips PNX4008 mobile platform.
|
||||||
|
|
||||||
@ -438,7 +446,8 @@ config ARCH_PXA
|
|||||||
depends on MMU
|
depends on MMU
|
||||||
select ARCH_MTD_XIP
|
select ARCH_MTD_XIP
|
||||||
select GENERIC_GPIO
|
select GENERIC_GPIO
|
||||||
select HAVE_GPIO_LIB
|
select HAVE_CLK
|
||||||
|
select ARCH_REQUIRE_GPIOLIB
|
||||||
select GENERIC_TIME
|
select GENERIC_TIME
|
||||||
select GENERIC_CLOCKEVENTS
|
select GENERIC_CLOCKEVENTS
|
||||||
select TICK_ONESHOT
|
select TICK_ONESHOT
|
||||||
@ -468,14 +477,16 @@ config ARCH_SA1100
|
|||||||
select GENERIC_GPIO
|
select GENERIC_GPIO
|
||||||
select GENERIC_TIME
|
select GENERIC_TIME
|
||||||
select GENERIC_CLOCKEVENTS
|
select GENERIC_CLOCKEVENTS
|
||||||
|
select HAVE_CLK
|
||||||
select TICK_ONESHOT
|
select TICK_ONESHOT
|
||||||
select HAVE_GPIO_LIB
|
select ARCH_REQUIRE_GPIOLIB
|
||||||
help
|
help
|
||||||
Support for StrongARM 11x0 based boards.
|
Support for StrongARM 11x0 based boards.
|
||||||
|
|
||||||
config ARCH_S3C2410
|
config ARCH_S3C2410
|
||||||
bool "Samsung S3C2410, S3C2412, S3C2413, S3C2440, S3C2442, S3C2443"
|
bool "Samsung S3C2410, S3C2412, S3C2413, S3C2440, S3C2442, S3C2443"
|
||||||
select GENERIC_GPIO
|
select GENERIC_GPIO
|
||||||
|
select HAVE_CLK
|
||||||
help
|
help
|
||||||
Samsung S3C2410X CPU based systems, such as the Simtec Electronics
|
Samsung S3C2410X CPU based systems, such as the Simtec Electronics
|
||||||
BAST (<http://www.simtec.co.uk/products/EB110ITX/>), the IPAQ 1940 or
|
BAST (<http://www.simtec.co.uk/products/EB110ITX/>), the IPAQ 1940 or
|
||||||
@ -503,13 +514,15 @@ config ARCH_DAVINCI
|
|||||||
select GENERIC_TIME
|
select GENERIC_TIME
|
||||||
select GENERIC_CLOCKEVENTS
|
select GENERIC_CLOCKEVENTS
|
||||||
select GENERIC_GPIO
|
select GENERIC_GPIO
|
||||||
|
select HAVE_CLK
|
||||||
help
|
help
|
||||||
Support for TI's DaVinci platform.
|
Support for TI's DaVinci platform.
|
||||||
|
|
||||||
config ARCH_OMAP
|
config ARCH_OMAP
|
||||||
bool "TI OMAP"
|
bool "TI OMAP"
|
||||||
select GENERIC_GPIO
|
select GENERIC_GPIO
|
||||||
select HAVE_GPIO_LIB
|
select HAVE_CLK
|
||||||
|
select ARCH_REQUIRE_GPIOLIB
|
||||||
select GENERIC_TIME
|
select GENERIC_TIME
|
||||||
select GENERIC_CLOCKEVENTS
|
select GENERIC_CLOCKEVENTS
|
||||||
help
|
help
|
||||||
|
@ -217,8 +217,6 @@ static unsigned outcnt; /* bytes in output buffer */
|
|||||||
static int fill_inbuf(void);
|
static int fill_inbuf(void);
|
||||||
static void flush_window(void);
|
static void flush_window(void);
|
||||||
static void error(char *m);
|
static void error(char *m);
|
||||||
static void gzip_mark(void **);
|
|
||||||
static void gzip_release(void **);
|
|
||||||
|
|
||||||
extern char input_data[];
|
extern char input_data[];
|
||||||
extern char input_data_end[];
|
extern char input_data_end[];
|
||||||
@ -227,65 +225,22 @@ static uch *output_data;
|
|||||||
static ulg output_ptr;
|
static ulg output_ptr;
|
||||||
static ulg bytes_out;
|
static ulg bytes_out;
|
||||||
|
|
||||||
static void *malloc(int size);
|
|
||||||
static void free(void *where);
|
|
||||||
static void error(char *m);
|
static void error(char *m);
|
||||||
static void gzip_mark(void **);
|
|
||||||
static void gzip_release(void **);
|
|
||||||
|
|
||||||
static void putstr(const char *);
|
static void putstr(const char *);
|
||||||
|
|
||||||
extern int end;
|
extern int end;
|
||||||
static ulg free_mem_ptr;
|
static ulg free_mem_ptr;
|
||||||
static ulg free_mem_ptr_end;
|
static ulg free_mem_end_ptr;
|
||||||
|
|
||||||
#define HEAP_SIZE 0x3000
|
#ifdef STANDALONE_DEBUG
|
||||||
|
#define NO_INFLATE_MALLOC
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define ARCH_HAS_DECOMP_WDOG
|
||||||
|
|
||||||
#include "../../../../lib/inflate.c"
|
#include "../../../../lib/inflate.c"
|
||||||
|
|
||||||
#ifndef STANDALONE_DEBUG
|
|
||||||
static void *malloc(int size)
|
|
||||||
{
|
|
||||||
void *p;
|
|
||||||
|
|
||||||
if (size <0) error("Malloc error");
|
|
||||||
if (free_mem_ptr <= 0) error("Memory error");
|
|
||||||
|
|
||||||
free_mem_ptr = (free_mem_ptr + 3) & ~3; /* Align */
|
|
||||||
|
|
||||||
p = (void *)free_mem_ptr;
|
|
||||||
free_mem_ptr += size;
|
|
||||||
|
|
||||||
if (free_mem_ptr >= free_mem_ptr_end)
|
|
||||||
error("Out of memory");
|
|
||||||
return p;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void free(void *where)
|
|
||||||
{ /* gzip_mark & gzip_release do the free */
|
|
||||||
}
|
|
||||||
|
|
||||||
static void gzip_mark(void **ptr)
|
|
||||||
{
|
|
||||||
arch_decomp_wdog();
|
|
||||||
*ptr = (void *) free_mem_ptr;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void gzip_release(void **ptr)
|
|
||||||
{
|
|
||||||
arch_decomp_wdog();
|
|
||||||
free_mem_ptr = (long) *ptr;
|
|
||||||
}
|
|
||||||
#else
|
|
||||||
static void gzip_mark(void **ptr)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
static void gzip_release(void **ptr)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* ===========================================================================
|
/* ===========================================================================
|
||||||
* Fill the input buffer. This is called only when the buffer is empty
|
* Fill the input buffer. This is called only when the buffer is empty
|
||||||
* and at least one byte is really needed.
|
* and at least one byte is really needed.
|
||||||
@ -348,7 +303,7 @@ decompress_kernel(ulg output_start, ulg free_mem_ptr_p, ulg free_mem_ptr_end_p,
|
|||||||
{
|
{
|
||||||
output_data = (uch *)output_start; /* Points to kernel start */
|
output_data = (uch *)output_start; /* Points to kernel start */
|
||||||
free_mem_ptr = free_mem_ptr_p;
|
free_mem_ptr = free_mem_ptr_p;
|
||||||
free_mem_ptr_end = free_mem_ptr_end_p;
|
free_mem_end_ptr = free_mem_ptr_end_p;
|
||||||
__machine_arch_type = arch_id;
|
__machine_arch_type = arch_id;
|
||||||
|
|
||||||
arch_decomp_setup();
|
arch_decomp_setup();
|
||||||
|
@ -280,7 +280,7 @@ unmap_single(struct device *dev, dma_addr_t dma_addr, size_t size,
|
|||||||
/*
|
/*
|
||||||
* Trying to unmap an invalid mapping
|
* Trying to unmap an invalid mapping
|
||||||
*/
|
*/
|
||||||
if (dma_mapping_error(dma_addr)) {
|
if (dma_mapping_error(dev, dma_addr)) {
|
||||||
dev_err(dev, "Trying to unmap invalid mapping\n");
|
dev_err(dev, "Trying to unmap invalid mapping\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -296,8 +296,7 @@ static __used __kprobes void *trampoline_handler(struct pt_regs *regs)
|
|||||||
unsigned long trampoline_address = (unsigned long)&kretprobe_trampoline;
|
unsigned long trampoline_address = (unsigned long)&kretprobe_trampoline;
|
||||||
|
|
||||||
INIT_HLIST_HEAD(&empty_rp);
|
INIT_HLIST_HEAD(&empty_rp);
|
||||||
spin_lock_irqsave(&kretprobe_lock, flags);
|
kretprobe_hash_lock(current, &head, &flags);
|
||||||
head = kretprobe_inst_table_head(current);
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* It is possible to have multiple instances associated with a given
|
* It is possible to have multiple instances associated with a given
|
||||||
@ -337,7 +336,7 @@ static __used __kprobes void *trampoline_handler(struct pt_regs *regs)
|
|||||||
}
|
}
|
||||||
|
|
||||||
kretprobe_assert(ri, orig_ret_address, trampoline_address);
|
kretprobe_assert(ri, orig_ret_address, trampoline_address);
|
||||||
spin_unlock_irqrestore(&kretprobe_lock, flags);
|
kretprobe_hash_unlock(current, &flags);
|
||||||
|
|
||||||
hlist_for_each_entry_safe(ri, node, tmp, &empty_rp, hlist) {
|
hlist_for_each_entry_safe(ri, node, tmp, &empty_rp, hlist) {
|
||||||
hlist_del(&ri->hlist);
|
hlist_del(&ri->hlist);
|
||||||
@ -347,7 +346,6 @@ static __used __kprobes void *trampoline_handler(struct pt_regs *regs)
|
|||||||
return (void *)orig_ret_address;
|
return (void *)orig_ret_address;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Called with kretprobe_lock held. */
|
|
||||||
void __kprobes arch_prepare_kretprobe(struct kretprobe_instance *ri,
|
void __kprobes arch_prepare_kretprobe(struct kretprobe_instance *ri,
|
||||||
struct pt_regs *regs)
|
struct pt_regs *regs)
|
||||||
{
|
{
|
||||||
|
@ -13,6 +13,7 @@
|
|||||||
#include <linux/module.h>
|
#include <linux/module.h>
|
||||||
#include <linux/moduleloader.h>
|
#include <linux/moduleloader.h>
|
||||||
#include <linux/kernel.h>
|
#include <linux/kernel.h>
|
||||||
|
#include <linux/mm.h>
|
||||||
#include <linux/elf.h>
|
#include <linux/elf.h>
|
||||||
#include <linux/vmalloc.h>
|
#include <linux/vmalloc.h>
|
||||||
#include <linux/slab.h>
|
#include <linux/slab.h>
|
||||||
|
@ -162,7 +162,7 @@ void cpu_idle(void)
|
|||||||
if (!idle)
|
if (!idle)
|
||||||
idle = default_idle;
|
idle = default_idle;
|
||||||
leds_event(led_idle_start);
|
leds_event(led_idle_start);
|
||||||
tick_nohz_stop_sched_tick();
|
tick_nohz_stop_sched_tick(1);
|
||||||
while (!need_resched())
|
while (!need_resched())
|
||||||
idle();
|
idle();
|
||||||
leds_event(led_idle_end);
|
leds_event(led_idle_end);
|
||||||
|
@ -377,7 +377,7 @@ void __init at91_add_device_mmc(short mmc_id, struct at91_mmc_data *data) {}
|
|||||||
* -------------------------------------------------------------------- */
|
* -------------------------------------------------------------------- */
|
||||||
|
|
||||||
#if defined(CONFIG_MTD_NAND_AT91) || defined(CONFIG_MTD_NAND_AT91_MODULE)
|
#if defined(CONFIG_MTD_NAND_AT91) || defined(CONFIG_MTD_NAND_AT91_MODULE)
|
||||||
static struct at91_nand_data nand_data;
|
static struct atmel_nand_data nand_data;
|
||||||
|
|
||||||
#define NAND_BASE AT91_CHIPSELECT_3
|
#define NAND_BASE AT91_CHIPSELECT_3
|
||||||
|
|
||||||
@ -395,7 +395,7 @@ static struct resource nand_resources[] = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
static struct platform_device at91cap9_nand_device = {
|
static struct platform_device at91cap9_nand_device = {
|
||||||
.name = "at91_nand",
|
.name = "atmel_nand",
|
||||||
.id = -1,
|
.id = -1,
|
||||||
.dev = {
|
.dev = {
|
||||||
.platform_data = &nand_data,
|
.platform_data = &nand_data,
|
||||||
@ -404,7 +404,7 @@ static struct platform_device at91cap9_nand_device = {
|
|||||||
.num_resources = ARRAY_SIZE(nand_resources),
|
.num_resources = ARRAY_SIZE(nand_resources),
|
||||||
};
|
};
|
||||||
|
|
||||||
void __init at91_add_device_nand(struct at91_nand_data *data)
|
void __init at91_add_device_nand(struct atmel_nand_data *data)
|
||||||
{
|
{
|
||||||
unsigned long csa, mode;
|
unsigned long csa, mode;
|
||||||
|
|
||||||
@ -445,7 +445,7 @@ void __init at91_add_device_nand(struct at91_nand_data *data)
|
|||||||
platform_device_register(&at91cap9_nand_device);
|
platform_device_register(&at91cap9_nand_device);
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
void __init at91_add_device_nand(struct at91_nand_data *data) {}
|
void __init at91_add_device_nand(struct atmel_nand_data *data) {}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
@ -369,7 +369,7 @@ void __init at91_add_device_mmc(short mmc_id, struct at91_mmc_data *data) {}
|
|||||||
* -------------------------------------------------------------------- */
|
* -------------------------------------------------------------------- */
|
||||||
|
|
||||||
#if defined(CONFIG_MTD_NAND_AT91) || defined(CONFIG_MTD_NAND_AT91_MODULE)
|
#if defined(CONFIG_MTD_NAND_AT91) || defined(CONFIG_MTD_NAND_AT91_MODULE)
|
||||||
static struct at91_nand_data nand_data;
|
static struct atmel_nand_data nand_data;
|
||||||
|
|
||||||
#define NAND_BASE AT91_CHIPSELECT_3
|
#define NAND_BASE AT91_CHIPSELECT_3
|
||||||
|
|
||||||
@ -382,7 +382,7 @@ static struct resource nand_resources[] = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
static struct platform_device at91rm9200_nand_device = {
|
static struct platform_device at91rm9200_nand_device = {
|
||||||
.name = "at91_nand",
|
.name = "atmel_nand",
|
||||||
.id = -1,
|
.id = -1,
|
||||||
.dev = {
|
.dev = {
|
||||||
.platform_data = &nand_data,
|
.platform_data = &nand_data,
|
||||||
@ -391,7 +391,7 @@ static struct platform_device at91rm9200_nand_device = {
|
|||||||
.num_resources = ARRAY_SIZE(nand_resources),
|
.num_resources = ARRAY_SIZE(nand_resources),
|
||||||
};
|
};
|
||||||
|
|
||||||
void __init at91_add_device_nand(struct at91_nand_data *data)
|
void __init at91_add_device_nand(struct atmel_nand_data *data)
|
||||||
{
|
{
|
||||||
unsigned int csa;
|
unsigned int csa;
|
||||||
|
|
||||||
@ -429,7 +429,7 @@ void __init at91_add_device_nand(struct at91_nand_data *data)
|
|||||||
platform_device_register(&at91rm9200_nand_device);
|
platform_device_register(&at91rm9200_nand_device);
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
void __init at91_add_device_nand(struct at91_nand_data *data) {}
|
void __init at91_add_device_nand(struct atmel_nand_data *data) {}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
@ -284,7 +284,7 @@ void __init at91_add_device_mmc(short mmc_id, struct at91_mmc_data *data) {}
|
|||||||
* -------------------------------------------------------------------- */
|
* -------------------------------------------------------------------- */
|
||||||
|
|
||||||
#if defined(CONFIG_MTD_NAND_AT91) || defined(CONFIG_MTD_NAND_AT91_MODULE)
|
#if defined(CONFIG_MTD_NAND_AT91) || defined(CONFIG_MTD_NAND_AT91_MODULE)
|
||||||
static struct at91_nand_data nand_data;
|
static struct atmel_nand_data nand_data;
|
||||||
|
|
||||||
#define NAND_BASE AT91_CHIPSELECT_3
|
#define NAND_BASE AT91_CHIPSELECT_3
|
||||||
|
|
||||||
@ -302,7 +302,7 @@ static struct resource nand_resources[] = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
static struct platform_device at91sam9260_nand_device = {
|
static struct platform_device at91sam9260_nand_device = {
|
||||||
.name = "at91_nand",
|
.name = "atmel_nand",
|
||||||
.id = -1,
|
.id = -1,
|
||||||
.dev = {
|
.dev = {
|
||||||
.platform_data = &nand_data,
|
.platform_data = &nand_data,
|
||||||
@ -311,7 +311,7 @@ static struct platform_device at91sam9260_nand_device = {
|
|||||||
.num_resources = ARRAY_SIZE(nand_resources),
|
.num_resources = ARRAY_SIZE(nand_resources),
|
||||||
};
|
};
|
||||||
|
|
||||||
void __init at91_add_device_nand(struct at91_nand_data *data)
|
void __init at91_add_device_nand(struct atmel_nand_data *data)
|
||||||
{
|
{
|
||||||
unsigned long csa, mode;
|
unsigned long csa, mode;
|
||||||
|
|
||||||
@ -373,7 +373,7 @@ void __init at91_add_device_nand(struct at91_nand_data *data)
|
|||||||
platform_device_register(&at91sam9260_nand_device);
|
platform_device_register(&at91sam9260_nand_device);
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
void __init at91_add_device_nand(struct at91_nand_data *data) {}
|
void __init at91_add_device_nand(struct atmel_nand_data *data) {}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
@ -199,7 +199,7 @@ void __init at91_add_device_mmc(short mmc_id, struct at91_mmc_data *data) {}
|
|||||||
* -------------------------------------------------------------------- */
|
* -------------------------------------------------------------------- */
|
||||||
|
|
||||||
#if defined(CONFIG_MTD_NAND_AT91) || defined(CONFIG_MTD_NAND_AT91_MODULE)
|
#if defined(CONFIG_MTD_NAND_AT91) || defined(CONFIG_MTD_NAND_AT91_MODULE)
|
||||||
static struct at91_nand_data nand_data;
|
static struct atmel_nand_data nand_data;
|
||||||
|
|
||||||
#define NAND_BASE AT91_CHIPSELECT_3
|
#define NAND_BASE AT91_CHIPSELECT_3
|
||||||
|
|
||||||
@ -211,8 +211,8 @@ static struct resource nand_resources[] = {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct platform_device at91_nand_device = {
|
static struct platform_device atmel_nand_device = {
|
||||||
.name = "at91_nand",
|
.name = "atmel_nand",
|
||||||
.id = -1,
|
.id = -1,
|
||||||
.dev = {
|
.dev = {
|
||||||
.platform_data = &nand_data,
|
.platform_data = &nand_data,
|
||||||
@ -221,7 +221,7 @@ static struct platform_device at91_nand_device = {
|
|||||||
.num_resources = ARRAY_SIZE(nand_resources),
|
.num_resources = ARRAY_SIZE(nand_resources),
|
||||||
};
|
};
|
||||||
|
|
||||||
void __init at91_add_device_nand(struct at91_nand_data *data)
|
void __init at91_add_device_nand(struct atmel_nand_data *data)
|
||||||
{
|
{
|
||||||
unsigned long csa, mode;
|
unsigned long csa, mode;
|
||||||
|
|
||||||
@ -262,11 +262,11 @@ void __init at91_add_device_nand(struct at91_nand_data *data)
|
|||||||
at91_set_A_periph(AT91_PIN_PC1, 0); /* NANDWE */
|
at91_set_A_periph(AT91_PIN_PC1, 0); /* NANDWE */
|
||||||
|
|
||||||
nand_data = *data;
|
nand_data = *data;
|
||||||
platform_device_register(&at91_nand_device);
|
platform_device_register(&atmel_nand_device);
|
||||||
}
|
}
|
||||||
|
|
||||||
#else
|
#else
|
||||||
void __init at91_add_device_nand(struct at91_nand_data *data) {}
|
void __init at91_add_device_nand(struct atmel_nand_data *data) {}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
@ -353,7 +353,7 @@ void __init at91_add_device_mmc(short mmc_id, struct at91_mmc_data *data) {}
|
|||||||
* -------------------------------------------------------------------- */
|
* -------------------------------------------------------------------- */
|
||||||
|
|
||||||
#if defined(CONFIG_MTD_NAND_AT91) || defined(CONFIG_MTD_NAND_AT91_MODULE)
|
#if defined(CONFIG_MTD_NAND_AT91) || defined(CONFIG_MTD_NAND_AT91_MODULE)
|
||||||
static struct at91_nand_data nand_data;
|
static struct atmel_nand_data nand_data;
|
||||||
|
|
||||||
#define NAND_BASE AT91_CHIPSELECT_3
|
#define NAND_BASE AT91_CHIPSELECT_3
|
||||||
|
|
||||||
@ -371,7 +371,7 @@ static struct resource nand_resources[] = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
static struct platform_device at91sam9263_nand_device = {
|
static struct platform_device at91sam9263_nand_device = {
|
||||||
.name = "at91_nand",
|
.name = "atmel_nand",
|
||||||
.id = -1,
|
.id = -1,
|
||||||
.dev = {
|
.dev = {
|
||||||
.platform_data = &nand_data,
|
.platform_data = &nand_data,
|
||||||
@ -380,7 +380,7 @@ static struct platform_device at91sam9263_nand_device = {
|
|||||||
.num_resources = ARRAY_SIZE(nand_resources),
|
.num_resources = ARRAY_SIZE(nand_resources),
|
||||||
};
|
};
|
||||||
|
|
||||||
void __init at91_add_device_nand(struct at91_nand_data *data)
|
void __init at91_add_device_nand(struct atmel_nand_data *data)
|
||||||
{
|
{
|
||||||
unsigned long csa, mode;
|
unsigned long csa, mode;
|
||||||
|
|
||||||
@ -421,7 +421,7 @@ void __init at91_add_device_nand(struct at91_nand_data *data)
|
|||||||
platform_device_register(&at91sam9263_nand_device);
|
platform_device_register(&at91sam9263_nand_device);
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
void __init at91_add_device_nand(struct at91_nand_data *data) {}
|
void __init at91_add_device_nand(struct atmel_nand_data *data) {}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
@ -195,7 +195,7 @@ void __init at91_add_device_mmc(short mmc_id, struct at91_mmc_data *data) {}
|
|||||||
* -------------------------------------------------------------------- */
|
* -------------------------------------------------------------------- */
|
||||||
|
|
||||||
#if defined(CONFIG_MTD_NAND_AT91) || defined(CONFIG_MTD_NAND_AT91_MODULE)
|
#if defined(CONFIG_MTD_NAND_AT91) || defined(CONFIG_MTD_NAND_AT91_MODULE)
|
||||||
static struct at91_nand_data nand_data;
|
static struct atmel_nand_data nand_data;
|
||||||
|
|
||||||
#define NAND_BASE AT91_CHIPSELECT_3
|
#define NAND_BASE AT91_CHIPSELECT_3
|
||||||
|
|
||||||
@ -212,8 +212,8 @@ static struct resource nand_resources[] = {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct platform_device at91_nand_device = {
|
static struct platform_device atmel_nand_device = {
|
||||||
.name = "at91_nand",
|
.name = "atmel_nand",
|
||||||
.id = -1,
|
.id = -1,
|
||||||
.dev = {
|
.dev = {
|
||||||
.platform_data = &nand_data,
|
.platform_data = &nand_data,
|
||||||
@ -222,7 +222,7 @@ static struct platform_device at91_nand_device = {
|
|||||||
.num_resources = ARRAY_SIZE(nand_resources),
|
.num_resources = ARRAY_SIZE(nand_resources),
|
||||||
};
|
};
|
||||||
|
|
||||||
void __init at91_add_device_nand(struct at91_nand_data *data)
|
void __init at91_add_device_nand(struct atmel_nand_data *data)
|
||||||
{
|
{
|
||||||
unsigned long csa;
|
unsigned long csa;
|
||||||
|
|
||||||
@ -259,11 +259,11 @@ void __init at91_add_device_nand(struct at91_nand_data *data)
|
|||||||
at91_set_A_periph(AT91_PIN_PB5, 0); /* NANDWE */
|
at91_set_A_periph(AT91_PIN_PB5, 0); /* NANDWE */
|
||||||
|
|
||||||
nand_data = *data;
|
nand_data = *data;
|
||||||
platform_device_register(&at91_nand_device);
|
platform_device_register(&atmel_nand_device);
|
||||||
}
|
}
|
||||||
|
|
||||||
#else
|
#else
|
||||||
void __init at91_add_device_nand(struct at91_nand_data *data) {}
|
void __init at91_add_device_nand(struct atmel_nand_data *data) {}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
@ -142,7 +142,7 @@ static struct mtd_partition * __init nand_partitions(int size, int *num_partitio
|
|||||||
return cam60_nand_partition;
|
return cam60_nand_partition;
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct at91_nand_data __initdata cam60_nand_data = {
|
static struct atmel_nand_data __initdata cam60_nand_data = {
|
||||||
.ale = 21,
|
.ale = 21,
|
||||||
.cle = 22,
|
.cle = 22,
|
||||||
// .det_pin = ... not there
|
// .det_pin = ... not there
|
||||||
|
@ -181,7 +181,7 @@ static struct mtd_partition * __init nand_partitions(int size, int *num_partitio
|
|||||||
return cap9adk_nand_partitions;
|
return cap9adk_nand_partitions;
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct at91_nand_data __initdata cap9adk_nand_data = {
|
static struct atmel_nand_data __initdata cap9adk_nand_data = {
|
||||||
.ale = 21,
|
.ale = 21,
|
||||||
.cle = 22,
|
.cle = 22,
|
||||||
// .det_pin = ... not connected
|
// .det_pin = ... not connected
|
||||||
|
@ -147,7 +147,7 @@ static struct mtd_partition * __init nand_partitions(int size, int *num_partitio
|
|||||||
return dk_nand_partition;
|
return dk_nand_partition;
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct at91_nand_data __initdata dk_nand_data = {
|
static struct atmel_nand_data __initdata dk_nand_data = {
|
||||||
.ale = 22,
|
.ale = 22,
|
||||||
.cle = 21,
|
.cle = 21,
|
||||||
.det_pin = AT91_PIN_PB1,
|
.det_pin = AT91_PIN_PB1,
|
||||||
|
@ -105,7 +105,7 @@ static struct mtd_partition * __init nand_partitions(int size, int *num_partitio
|
|||||||
return kb9202_nand_partition;
|
return kb9202_nand_partition;
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct at91_nand_data __initdata kb9202_nand_data = {
|
static struct atmel_nand_data __initdata kb9202_nand_data = {
|
||||||
.ale = 22,
|
.ale = 22,
|
||||||
.cle = 21,
|
.cle = 21,
|
||||||
// .det_pin = ... not there
|
// .det_pin = ... not there
|
||||||
|
@ -141,7 +141,7 @@ static struct mtd_partition * __init nand_partitions(int size, int *num_partitio
|
|||||||
return ek_nand_partition;
|
return ek_nand_partition;
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct at91_nand_data __initdata ek_nand_data = {
|
static struct atmel_nand_data __initdata ek_nand_data = {
|
||||||
.ale = 21,
|
.ale = 21,
|
||||||
.cle = 22,
|
.cle = 22,
|
||||||
// .det_pin = ... not connected
|
// .det_pin = ... not connected
|
||||||
|
@ -178,7 +178,7 @@ static struct mtd_partition * __init nand_partitions(int size, int *num_partitio
|
|||||||
return ek_nand_partition;
|
return ek_nand_partition;
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct at91_nand_data __initdata ek_nand_data = {
|
static struct atmel_nand_data __initdata ek_nand_data = {
|
||||||
.ale = 21,
|
.ale = 21,
|
||||||
.cle = 22,
|
.cle = 22,
|
||||||
// .det_pin = ... not connected
|
// .det_pin = ... not connected
|
||||||
|
@ -183,7 +183,7 @@ static struct mtd_partition * __init nand_partitions(int size, int *num_partitio
|
|||||||
return ek_nand_partition;
|
return ek_nand_partition;
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct at91_nand_data __initdata ek_nand_data = {
|
static struct atmel_nand_data __initdata ek_nand_data = {
|
||||||
.ale = 22,
|
.ale = 22,
|
||||||
.cle = 21,
|
.cle = 21,
|
||||||
// .det_pin = ... not connected
|
// .det_pin = ... not connected
|
||||||
|
@ -187,7 +187,7 @@ static struct mtd_partition * __init nand_partitions(int size, int *num_partitio
|
|||||||
return ek_nand_partition;
|
return ek_nand_partition;
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct at91_nand_data __initdata ek_nand_data = {
|
static struct atmel_nand_data __initdata ek_nand_data = {
|
||||||
.ale = 21,
|
.ale = 21,
|
||||||
.cle = 22,
|
.cle = 22,
|
||||||
// .det_pin = ... not connected
|
// .det_pin = ... not connected
|
||||||
|
@ -96,7 +96,7 @@ static struct mtd_partition * __init nand_partitions(int size, int *num_partitio
|
|||||||
return ek_nand_partition;
|
return ek_nand_partition;
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct at91_nand_data __initdata ek_nand_data = {
|
static struct atmel_nand_data __initdata ek_nand_data = {
|
||||||
.ale = 21,
|
.ale = 21,
|
||||||
.cle = 22,
|
.cle = 22,
|
||||||
// .det_pin = ... not connected
|
// .det_pin = ... not connected
|
||||||
|
@ -180,7 +180,7 @@ static struct mtd_partition * __init nand_partitions(int size, int *num_partitio
|
|||||||
return yl9200_nand_partition;
|
return yl9200_nand_partition;
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct at91_nand_data __initdata yl9200_nand_data = {
|
static struct atmel_nand_data __initdata yl9200_nand_data = {
|
||||||
.ale = 6,
|
.ale = 6,
|
||||||
.cle = 7,
|
.cle = 7,
|
||||||
// .det_pin = ... not connected
|
// .det_pin = ... not connected
|
||||||
|
@ -17,6 +17,7 @@
|
|||||||
#include <linux/mm.h>
|
#include <linux/mm.h>
|
||||||
#include <linux/init.h>
|
#include <linux/init.h>
|
||||||
#include <linux/f75375s.h>
|
#include <linux/f75375s.h>
|
||||||
|
#include <linux/leds-pca9532.h>
|
||||||
#include <linux/delay.h>
|
#include <linux/delay.h>
|
||||||
#include <linux/kernel.h>
|
#include <linux/kernel.h>
|
||||||
#include <linux/pci.h>
|
#include <linux/pci.h>
|
||||||
@ -206,6 +207,53 @@ static struct f75375s_platform_data n2100_f75375s = {
|
|||||||
.pwm_enable = { 0, 0 },
|
.pwm_enable = { 0, 0 },
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static struct pca9532_platform_data n2100_leds = {
|
||||||
|
.leds = {
|
||||||
|
{ .name = "n2100:red:satafail0",
|
||||||
|
.state = PCA9532_OFF,
|
||||||
|
.type = PCA9532_TYPE_LED,
|
||||||
|
},
|
||||||
|
{ .name = "n2100:red:satafail1",
|
||||||
|
.state = PCA9532_OFF,
|
||||||
|
.type = PCA9532_TYPE_LED,
|
||||||
|
},
|
||||||
|
{ .name = "n2100:blue:usb",
|
||||||
|
.state = PCA9532_OFF,
|
||||||
|
.type = PCA9532_TYPE_LED,
|
||||||
|
},
|
||||||
|
{ .type = PCA9532_TYPE_NONE },
|
||||||
|
|
||||||
|
{ .type = PCA9532_TYPE_NONE },
|
||||||
|
{ .type = PCA9532_TYPE_NONE },
|
||||||
|
{ .type = PCA9532_TYPE_NONE },
|
||||||
|
{ .name = "n2100:red:usb",
|
||||||
|
.state = PCA9532_OFF,
|
||||||
|
.type = PCA9532_TYPE_LED,
|
||||||
|
},
|
||||||
|
|
||||||
|
{ .type = PCA9532_TYPE_NONE }, /* power OFF gpio */
|
||||||
|
{ .type = PCA9532_TYPE_NONE }, /* reset gpio */
|
||||||
|
{ .type = PCA9532_TYPE_NONE },
|
||||||
|
{ .type = PCA9532_TYPE_NONE },
|
||||||
|
|
||||||
|
{ .type = PCA9532_TYPE_NONE },
|
||||||
|
{ .name = "n2100:orange:system",
|
||||||
|
.state = PCA9532_OFF,
|
||||||
|
.type = PCA9532_TYPE_LED,
|
||||||
|
},
|
||||||
|
{ .name = "n2100:red:system",
|
||||||
|
.state = PCA9532_OFF,
|
||||||
|
.type = PCA9532_TYPE_LED,
|
||||||
|
},
|
||||||
|
{ .name = "N2100 beeper" ,
|
||||||
|
.state = PCA9532_OFF,
|
||||||
|
.type = PCA9532_TYPE_N2100_BEEP,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
.psc = { 0, 0 },
|
||||||
|
.pwm = { 0, 0 },
|
||||||
|
};
|
||||||
|
|
||||||
static struct i2c_board_info __initdata n2100_i2c_devices[] = {
|
static struct i2c_board_info __initdata n2100_i2c_devices[] = {
|
||||||
{
|
{
|
||||||
I2C_BOARD_INFO("rs5c372b", 0x32),
|
I2C_BOARD_INFO("rs5c372b", 0x32),
|
||||||
@ -214,6 +262,10 @@ static struct i2c_board_info __initdata n2100_i2c_devices[] = {
|
|||||||
I2C_BOARD_INFO("f75375", 0x2e),
|
I2C_BOARD_INFO("f75375", 0x2e),
|
||||||
.platform_data = &n2100_f75375s,
|
.platform_data = &n2100_f75375s,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
I2C_BOARD_INFO("pca9532", 0x60),
|
||||||
|
.platform_data = &n2100_leds,
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -14,8 +14,8 @@
|
|||||||
#include <linux/clk.h>
|
#include <linux/clk.h>
|
||||||
#include <linux/string.h>
|
#include <linux/string.h>
|
||||||
#include <linux/platform_device.h>
|
#include <linux/platform_device.h>
|
||||||
|
#include <linux/semaphore.h>
|
||||||
|
|
||||||
#include <asm/semaphore.h>
|
|
||||||
#include "clock.h"
|
#include "clock.h"
|
||||||
|
|
||||||
static LIST_HEAD(clocks);
|
static LIST_HEAD(clocks);
|
||||||
|
@ -21,26 +21,24 @@
|
|||||||
* Our node_data structure for discontiguous memory.
|
* Our node_data structure for discontiguous memory.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static bootmem_data_t node_bootmem_data[MAX_NUMNODES];
|
|
||||||
|
|
||||||
pg_data_t discontig_node_data[MAX_NUMNODES] = {
|
pg_data_t discontig_node_data[MAX_NUMNODES] = {
|
||||||
{ .bdata = &node_bootmem_data[0] },
|
{ .bdata = &bootmem_node_data[0] },
|
||||||
{ .bdata = &node_bootmem_data[1] },
|
{ .bdata = &bootmem_node_data[1] },
|
||||||
{ .bdata = &node_bootmem_data[2] },
|
{ .bdata = &bootmem_node_data[2] },
|
||||||
{ .bdata = &node_bootmem_data[3] },
|
{ .bdata = &bootmem_node_data[3] },
|
||||||
#if MAX_NUMNODES == 16
|
#if MAX_NUMNODES == 16
|
||||||
{ .bdata = &node_bootmem_data[4] },
|
{ .bdata = &bootmem_node_data[4] },
|
||||||
{ .bdata = &node_bootmem_data[5] },
|
{ .bdata = &bootmem_node_data[5] },
|
||||||
{ .bdata = &node_bootmem_data[6] },
|
{ .bdata = &bootmem_node_data[6] },
|
||||||
{ .bdata = &node_bootmem_data[7] },
|
{ .bdata = &bootmem_node_data[7] },
|
||||||
{ .bdata = &node_bootmem_data[8] },
|
{ .bdata = &bootmem_node_data[8] },
|
||||||
{ .bdata = &node_bootmem_data[9] },
|
{ .bdata = &bootmem_node_data[9] },
|
||||||
{ .bdata = &node_bootmem_data[10] },
|
{ .bdata = &bootmem_node_data[10] },
|
||||||
{ .bdata = &node_bootmem_data[11] },
|
{ .bdata = &bootmem_node_data[11] },
|
||||||
{ .bdata = &node_bootmem_data[12] },
|
{ .bdata = &bootmem_node_data[12] },
|
||||||
{ .bdata = &node_bootmem_data[13] },
|
{ .bdata = &bootmem_node_data[13] },
|
||||||
{ .bdata = &node_bootmem_data[14] },
|
{ .bdata = &bootmem_node_data[14] },
|
||||||
{ .bdata = &node_bootmem_data[15] },
|
{ .bdata = &bootmem_node_data[15] },
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -284,7 +284,7 @@ bootmem_init_node(int node, int initrd_node, struct meminfo *mi)
|
|||||||
*/
|
*/
|
||||||
arch_adjust_zones(node, zone_size, zhole_size);
|
arch_adjust_zones(node, zone_size, zhole_size);
|
||||||
|
|
||||||
free_area_init_node(node, pgdat, zone_size, start_pfn, zhole_size);
|
free_area_init_node(node, zone_size, start_pfn, zhole_size);
|
||||||
|
|
||||||
return end_pfn;
|
return end_pfn;
|
||||||
}
|
}
|
||||||
|
@ -23,6 +23,7 @@
|
|||||||
|
|
||||||
#include <linux/module.h>
|
#include <linux/module.h>
|
||||||
#include <linux/kernel.h>
|
#include <linux/kernel.h>
|
||||||
|
#include <linux/mm.h>
|
||||||
#include <linux/init.h>
|
#include <linux/init.h>
|
||||||
#include <linux/platform_device.h>
|
#include <linux/platform_device.h>
|
||||||
#include <linux/bootmem.h>
|
#include <linux/bootmem.h>
|
||||||
@ -182,7 +183,7 @@ void __init omapfb_reserve_sdram(void)
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
bdata = NODE_DATA(0)->bdata;
|
bdata = NODE_DATA(0)->bdata;
|
||||||
sdram_start = bdata->node_boot_start;
|
sdram_start = bdata->node_min_pfn << PAGE_SHIFT;
|
||||||
sdram_size = (bdata->node_low_pfn << PAGE_SHIFT) - sdram_start;
|
sdram_size = (bdata->node_low_pfn << PAGE_SHIFT) - sdram_start;
|
||||||
reserved = 0;
|
reserved = 0;
|
||||||
for (i = 0; ; i++) {
|
for (i = 0; ; i++) {
|
||||||
@ -340,5 +341,3 @@ unsigned long omapfb_reserve_sram(unsigned long sram_pstart,
|
|||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
@ -1488,6 +1488,9 @@ static int __init _omap_gpio_init(void)
|
|||||||
bank->chip.set = gpio_set;
|
bank->chip.set = gpio_set;
|
||||||
if (bank_is_mpuio(bank)) {
|
if (bank_is_mpuio(bank)) {
|
||||||
bank->chip.label = "mpuio";
|
bank->chip.label = "mpuio";
|
||||||
|
#ifdef CONFIG_ARCH_OMAP1
|
||||||
|
bank->chip.dev = &omap_mpuio_device.dev;
|
||||||
|
#endif
|
||||||
bank->chip.base = OMAP_MPUIO(0);
|
bank->chip.base = OMAP_MPUIO(0);
|
||||||
} else {
|
} else {
|
||||||
bank->chip.label = "gpio";
|
bank->chip.label = "gpio";
|
||||||
|
@ -1304,7 +1304,7 @@ struct sysdev_class dma_sysclass = {
|
|||||||
|
|
||||||
/* kmem cache implementation */
|
/* kmem cache implementation */
|
||||||
|
|
||||||
static void s3c2410_dma_cache_ctor(struct kmem_cache *c, void *p)
|
static void s3c2410_dma_cache_ctor(void *p)
|
||||||
{
|
{
|
||||||
memset(p, 0, sizeof(struct s3c2410_dma_buf));
|
memset(p, 0, sizeof(struct s3c2410_dma_buf));
|
||||||
}
|
}
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user