Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
This commit is contained in:
Коммит
f838bad1b3
|
@ -53,3 +53,5 @@ cscope.*
|
||||||
|
|
||||||
*.orig
|
*.orig
|
||||||
*.rej
|
*.rej
|
||||||
|
*~
|
||||||
|
\#*#
|
||||||
|
|
|
@ -25,8 +25,6 @@ DMA-API.txt
|
||||||
- DMA API, pci_ API & extensions for non-consistent memory machines.
|
- DMA API, pci_ API & extensions for non-consistent memory machines.
|
||||||
DMA-ISA-LPC.txt
|
DMA-ISA-LPC.txt
|
||||||
- How to do DMA with ISA (and LPC) devices.
|
- How to do DMA with ISA (and LPC) devices.
|
||||||
DMA-mapping.txt
|
|
||||||
- info for PCI drivers using DMA portably across all platforms.
|
|
||||||
DocBook/
|
DocBook/
|
||||||
- directory with DocBook templates etc. for kernel documentation.
|
- directory with DocBook templates etc. for kernel documentation.
|
||||||
HOWTO
|
HOWTO
|
||||||
|
@ -43,8 +41,6 @@ ManagementStyle
|
||||||
- how to (attempt to) manage kernel hackers.
|
- how to (attempt to) manage kernel hackers.
|
||||||
MSI-HOWTO.txt
|
MSI-HOWTO.txt
|
||||||
- the Message Signaled Interrupts (MSI) Driver Guide HOWTO and FAQ.
|
- the Message Signaled Interrupts (MSI) Driver Guide HOWTO and FAQ.
|
||||||
PCIEBUS-HOWTO.txt
|
|
||||||
- a guide describing the PCI Express Port Bus driver.
|
|
||||||
RCU/
|
RCU/
|
||||||
- directory with info on RCU (read-copy update).
|
- directory with info on RCU (read-copy update).
|
||||||
README.DAC960
|
README.DAC960
|
||||||
|
@ -167,10 +163,8 @@ highuid.txt
|
||||||
- notes on the change from 16 bit to 32 bit user/group IDs.
|
- notes on the change from 16 bit to 32 bit user/group IDs.
|
||||||
hpet.txt
|
hpet.txt
|
||||||
- High Precision Event Timer Driver for Linux.
|
- High Precision Event Timer Driver for Linux.
|
||||||
hrtimer/
|
timers/
|
||||||
- info on the timer_stats debugging facility for timer (ab)use.
|
- info on the timer related topics
|
||||||
hrtimers/
|
|
||||||
- info on the hrtimers subsystem for high-resolution kernel timers.
|
|
||||||
hw_random.txt
|
hw_random.txt
|
||||||
- info on Linux support for random number generator in i8xx chipsets.
|
- info on Linux support for random number generator in i8xx chipsets.
|
||||||
hwmon/
|
hwmon/
|
||||||
|
@ -183,8 +177,6 @@ i386/
|
||||||
- directory with info about Linux on Intel 32 bit architecture.
|
- directory with info about Linux on Intel 32 bit architecture.
|
||||||
ia64/
|
ia64/
|
||||||
- directory with info about Linux on Intel 64 bit architecture.
|
- directory with info about Linux on Intel 64 bit architecture.
|
||||||
ide.txt
|
|
||||||
- important info for users of ATA devices (IDE/EIDE disks and CD-ROMS).
|
|
||||||
infiniband/
|
infiniband/
|
||||||
- directory with documents concerning Linux InfiniBand support.
|
- directory with documents concerning Linux InfiniBand support.
|
||||||
initrd.txt
|
initrd.txt
|
||||||
|
@ -227,8 +219,6 @@ kprobes.txt
|
||||||
- documents the kernel probes debugging feature.
|
- documents the kernel probes debugging feature.
|
||||||
kref.txt
|
kref.txt
|
||||||
- docs on adding reference counters (krefs) to kernel objects.
|
- docs on adding reference counters (krefs) to kernel objects.
|
||||||
laptop-mode.txt
|
|
||||||
- how to conserve battery power using laptop-mode.
|
|
||||||
laptops/
|
laptops/
|
||||||
- directory with laptop related info and laptop driver documentation.
|
- directory with laptop related info and laptop driver documentation.
|
||||||
ldm.txt
|
ldm.txt
|
||||||
|
@ -275,8 +265,6 @@ netlabel/
|
||||||
- directory with information on the NetLabel subsystem.
|
- directory with information on the NetLabel subsystem.
|
||||||
networking/
|
networking/
|
||||||
- directory with info on various aspects of networking with Linux.
|
- directory with info on various aspects of networking with Linux.
|
||||||
nfsroot.txt
|
|
||||||
- short guide on setting up a diskless box with NFS root filesystem.
|
|
||||||
nmi_watchdog.txt
|
nmi_watchdog.txt
|
||||||
- info on NMI watchdog for SMP systems.
|
- info on NMI watchdog for SMP systems.
|
||||||
nommu-mmap.txt
|
nommu-mmap.txt
|
||||||
|
@ -293,22 +281,12 @@ parport.txt
|
||||||
- how to use the parallel-port driver.
|
- how to use the parallel-port driver.
|
||||||
parport-lowlevel.txt
|
parport-lowlevel.txt
|
||||||
- description and usage of the low level parallel port functions.
|
- description and usage of the low level parallel port functions.
|
||||||
pci-error-recovery.txt
|
|
||||||
- info on PCI error recovery.
|
|
||||||
pci.txt
|
|
||||||
- info on the PCI subsystem for device driver authors.
|
|
||||||
pcieaer-howto.txt
|
|
||||||
- the PCI Express Advanced Error Reporting Driver Guide HOWTO.
|
|
||||||
pcmcia/
|
pcmcia/
|
||||||
- info on the Linux PCMCIA driver.
|
- info on the Linux PCMCIA driver.
|
||||||
pi-futex.txt
|
pi-futex.txt
|
||||||
- documentation on lightweight PI-futexes.
|
- documentation on lightweight PI-futexes.
|
||||||
pm.txt
|
|
||||||
- info on Linux power management support.
|
|
||||||
pnp.txt
|
pnp.txt
|
||||||
- Linux Plug and Play documentation.
|
- Linux Plug and Play documentation.
|
||||||
power_supply_class.txt
|
|
||||||
- Tells userspace about battery, UPS, AC or DC power supply properties
|
|
||||||
power/
|
power/
|
||||||
- directory with info on Linux PCI power management.
|
- directory with info on Linux PCI power management.
|
||||||
powerpc/
|
powerpc/
|
||||||
|
@ -329,8 +307,6 @@ robust-futexes.txt
|
||||||
- a description of what robust futexes are.
|
- a description of what robust futexes are.
|
||||||
rocket.txt
|
rocket.txt
|
||||||
- info on the Comtrol RocketPort multiport serial driver.
|
- info on the Comtrol RocketPort multiport serial driver.
|
||||||
rpc-cache.txt
|
|
||||||
- introduction to the caching mechanisms in the sunrpc layer.
|
|
||||||
rt-mutex-design.txt
|
rt-mutex-design.txt
|
||||||
- description of the RealTime mutex implementation design.
|
- description of the RealTime mutex implementation design.
|
||||||
rt-mutex.txt
|
rt-mutex.txt
|
||||||
|
|
|
@ -0,0 +1,11 @@
|
||||||
|
What: /sys/o2cb symlink
|
||||||
|
Date: Dec 2005
|
||||||
|
KernelVersion: 2.6.16
|
||||||
|
Contact: ocfs2-devel@oss.oracle.com
|
||||||
|
Description: This is a symlink: /sys/o2cb to /sys/fs/o2cb. The symlink will
|
||||||
|
be removed when new versions of ocfs2-tools which know to look
|
||||||
|
in /sys/fs/o2cb are sufficiently prevalent. Don't code new
|
||||||
|
software to look here, it should try /sys/fs/o2cb instead.
|
||||||
|
See Documentation/ABI/stable/o2cb for more information on usage.
|
||||||
|
Users: ocfs2-tools. It's sufficient to mail proposed changes to
|
||||||
|
ocfs2-devel@oss.oracle.com.
|
|
@ -0,0 +1,10 @@
|
||||||
|
What: /sys/fs/o2cb/ (was /sys/o2cb)
|
||||||
|
Date: Dec 2005
|
||||||
|
KernelVersion: 2.6.16
|
||||||
|
Contact: ocfs2-devel@oss.oracle.com
|
||||||
|
Description: Ocfs2-tools looks at 'interface-revision' for versioning
|
||||||
|
information. Each logmask/ file controls a set of debug prints
|
||||||
|
and can be written into with the strings "allow", "deny", or
|
||||||
|
"off". Reading the file returns the current state.
|
||||||
|
Users: ocfs2-tools. It's sufficient to mail proposed changes to
|
||||||
|
ocfs2-devel@oss.oracle.com.
|
|
@ -0,0 +1,11 @@
|
||||||
|
What: /sys/bus/pci/devices/.../vpd
|
||||||
|
Date: February 2008
|
||||||
|
Contact: Ben Hutchings <bhutchings@solarflare.com>
|
||||||
|
Description:
|
||||||
|
A file named vpd in a device directory will be a
|
||||||
|
binary file containing the Vital Product Data for the
|
||||||
|
device. It should follow the VPD format defined in
|
||||||
|
PCI Specification 2.1 or 2.2, but users should consider
|
||||||
|
that some devices may have malformatted data. If the
|
||||||
|
underlying VPD has a writable section then the
|
||||||
|
corresponding section of this file will be writable.
|
|
@ -0,0 +1,23 @@
|
||||||
|
What: /sys/firmware/ibft/initiator
|
||||||
|
Date: November 2007
|
||||||
|
Contact: Konrad Rzeszutek <ketuzsezr@darnok.org>
|
||||||
|
Description: The /sys/firmware/ibft/initiator directory will contain
|
||||||
|
files that expose the iSCSI Boot Firmware Table initiator data.
|
||||||
|
Usually this contains the Initiator name.
|
||||||
|
|
||||||
|
What: /sys/firmware/ibft/targetX
|
||||||
|
Date: November 2007
|
||||||
|
Contact: Konrad Rzeszutek <ketuzsezr@darnok.org>
|
||||||
|
Description: The /sys/firmware/ibft/targetX directory will contain
|
||||||
|
files that expose the iSCSI Boot Firmware Table target data.
|
||||||
|
Usually this contains the target's IP address, boot LUN,
|
||||||
|
target name, and what NIC it is associated with. It can also
|
||||||
|
contain the CHAP name (and password), the reverse CHAP
|
||||||
|
name (and password)
|
||||||
|
|
||||||
|
What: /sys/firmware/ibft/ethernetX
|
||||||
|
Date: November 2007
|
||||||
|
Contact: Konrad Rzeszutek <ketuzsezr@darnok.org>
|
||||||
|
Description: The /sys/firmware/ibft/ethernetX directory will contain
|
||||||
|
files that expose the iSCSI Boot Firmware Table NIC data.
|
||||||
|
This can this can the IP address, MAC, and gateway of the NIC.
|
|
@ -0,0 +1,89 @@
|
||||||
|
What: /sys/fs/ocfs2/
|
||||||
|
Date: April 2008
|
||||||
|
Contact: ocfs2-devel@oss.oracle.com
|
||||||
|
Description:
|
||||||
|
The /sys/fs/ocfs2 directory contains knobs used by the
|
||||||
|
ocfs2-tools to interact with the filesystem.
|
||||||
|
|
||||||
|
What: /sys/fs/ocfs2/max_locking_protocol
|
||||||
|
Date: April 2008
|
||||||
|
Contact: ocfs2-devel@oss.oracle.com
|
||||||
|
Description:
|
||||||
|
The /sys/fs/ocfs2/max_locking_protocol file displays version
|
||||||
|
of ocfs2 locking supported by the filesystem. This version
|
||||||
|
covers how ocfs2 uses distributed locking between cluster
|
||||||
|
nodes.
|
||||||
|
|
||||||
|
The protocol version has a major and minor number. Two
|
||||||
|
cluster nodes can interoperate if they have an identical
|
||||||
|
major number and an overlapping minor number - thus,
|
||||||
|
a node with version 1.10 can interoperate with a node
|
||||||
|
sporting version 1.8, as long as both use the 1.8 protocol.
|
||||||
|
|
||||||
|
Reading from this file returns a single line, the major
|
||||||
|
number and minor number joined by a period, eg "1.10".
|
||||||
|
|
||||||
|
This file is read-only. The value is compiled into the
|
||||||
|
driver.
|
||||||
|
|
||||||
|
What: /sys/fs/ocfs2/loaded_cluster_plugins
|
||||||
|
Date: April 2008
|
||||||
|
Contact: ocfs2-devel@oss.oracle.com
|
||||||
|
Description:
|
||||||
|
The /sys/fs/ocfs2/loaded_cluster_plugins file describes
|
||||||
|
the available plugins to support ocfs2 cluster operation.
|
||||||
|
A cluster plugin is required to use ocfs2 in a cluster.
|
||||||
|
There are currently two available plugins:
|
||||||
|
|
||||||
|
* 'o2cb' - The classic o2cb cluster stack that ocfs2 has
|
||||||
|
used since its inception.
|
||||||
|
* 'user' - A plugin supporting userspace cluster software
|
||||||
|
in conjunction with fs/dlm.
|
||||||
|
|
||||||
|
Reading from this file returns the names of all loaded
|
||||||
|
plugins, one per line.
|
||||||
|
|
||||||
|
This file is read-only. Its contents may change as
|
||||||
|
plugins are loaded or removed.
|
||||||
|
|
||||||
|
What: /sys/fs/ocfs2/active_cluster_plugin
|
||||||
|
Date: April 2008
|
||||||
|
Contact: ocfs2-devel@oss.oracle.com
|
||||||
|
Description:
|
||||||
|
The /sys/fs/ocfs2/active_cluster_plugin displays which
|
||||||
|
cluster plugin is currently in use by the filesystem.
|
||||||
|
The active plugin will appear in the loaded_cluster_plugins
|
||||||
|
file as well. Only one plugin can be used at a time.
|
||||||
|
|
||||||
|
Reading from this file returns the name of the active plugin
|
||||||
|
on a single line.
|
||||||
|
|
||||||
|
This file is read-only. Which plugin is active depends on
|
||||||
|
the cluster stack in use. The contents may change
|
||||||
|
when all filesystems are unmounted and the cluster stack
|
||||||
|
is changed.
|
||||||
|
|
||||||
|
What: /sys/fs/ocfs2/cluster_stack
|
||||||
|
Date: April 2008
|
||||||
|
Contact: ocfs2-devel@oss.oracle.com
|
||||||
|
Description:
|
||||||
|
The /sys/fs/ocfs2/cluster_stack file contains the name
|
||||||
|
of current ocfs2 cluster stack. This value is set by
|
||||||
|
userspace tools when bringing the cluster stack online.
|
||||||
|
|
||||||
|
Cluster stack names are 4 characters in length.
|
||||||
|
|
||||||
|
When the 'o2cb' cluster stack is used, the 'o2cb' cluster
|
||||||
|
plugin is active. All other cluster stacks use the 'user'
|
||||||
|
cluster plugin.
|
||||||
|
|
||||||
|
Reading from this file returns the name of the current
|
||||||
|
cluster stack on a single line.
|
||||||
|
|
||||||
|
Writing a new stack name to this file changes the current
|
||||||
|
cluster stack unless there are mounted ocfs2 filesystems.
|
||||||
|
If there are mounted filesystems, attempts to change the
|
||||||
|
stack return an error.
|
||||||
|
|
||||||
|
Users:
|
||||||
|
ocfs2-tools <ocfs2-tools-devel@oss.oracle.com>
|
|
@ -9,9 +9,10 @@
|
||||||
DOCBOOKS := wanbook.xml z8530book.xml mcabook.xml videobook.xml \
|
DOCBOOKS := wanbook.xml z8530book.xml mcabook.xml videobook.xml \
|
||||||
kernel-hacking.xml kernel-locking.xml deviceiobook.xml \
|
kernel-hacking.xml kernel-locking.xml deviceiobook.xml \
|
||||||
procfs-guide.xml writing_usb_driver.xml networking.xml \
|
procfs-guide.xml writing_usb_driver.xml networking.xml \
|
||||||
kernel-api.xml filesystems.xml lsm.xml usb.xml \
|
kernel-api.xml filesystems.xml lsm.xml usb.xml kgdb.xml \
|
||||||
gadget.xml libata.xml mtdnand.xml librs.xml rapidio.xml \
|
gadget.xml libata.xml mtdnand.xml librs.xml rapidio.xml \
|
||||||
genericirq.xml s390-drivers.xml uio-howto.xml scsi.xml
|
genericirq.xml s390-drivers.xml uio-howto.xml scsi.xml \
|
||||||
|
mac80211.xml
|
||||||
|
|
||||||
###
|
###
|
||||||
# The build process is as follows (targets):
|
# The build process is as follows (targets):
|
||||||
|
|
|
@ -297,11 +297,6 @@ X!Earch/x86/kernel/mca_32.c
|
||||||
!Ikernel/acct.c
|
!Ikernel/acct.c
|
||||||
</chapter>
|
</chapter>
|
||||||
|
|
||||||
<chapter id="pmfuncs">
|
|
||||||
<title>Power Management</title>
|
|
||||||
!Ekernel/power/pm.c
|
|
||||||
</chapter>
|
|
||||||
|
|
||||||
<chapter id="devdrivers">
|
<chapter id="devdrivers">
|
||||||
<title>Device drivers infrastructure</title>
|
<title>Device drivers infrastructure</title>
|
||||||
<sect1><title>Device Drivers Base</title>
|
<sect1><title>Device Drivers Base</title>
|
||||||
|
@ -361,12 +356,14 @@ X!Edrivers/pnp/system.c
|
||||||
<chapter id="blkdev">
|
<chapter id="blkdev">
|
||||||
<title>Block Devices</title>
|
<title>Block Devices</title>
|
||||||
!Eblock/blk-core.c
|
!Eblock/blk-core.c
|
||||||
|
!Iblock/blk-core.c
|
||||||
!Eblock/blk-map.c
|
!Eblock/blk-map.c
|
||||||
!Iblock/blk-sysfs.c
|
!Iblock/blk-sysfs.c
|
||||||
!Eblock/blk-settings.c
|
!Eblock/blk-settings.c
|
||||||
!Eblock/blk-exec.c
|
!Eblock/blk-exec.c
|
||||||
!Eblock/blk-barrier.c
|
!Eblock/blk-barrier.c
|
||||||
!Eblock/blk-tag.c
|
!Eblock/blk-tag.c
|
||||||
|
!Iblock/blk-tag.c
|
||||||
</chapter>
|
</chapter>
|
||||||
|
|
||||||
<chapter id="chrdev">
|
<chapter id="chrdev">
|
||||||
|
|
|
@ -241,7 +241,7 @@
|
||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
The third type is a semaphore
|
The third type is a semaphore
|
||||||
(<filename class="headerfile">include/asm/semaphore.h</filename>): it
|
(<filename class="headerfile">include/linux/semaphore.h</filename>): it
|
||||||
can have more than one holder at any time (the number decided at
|
can have more than one holder at any time (the number decided at
|
||||||
initialization time), although it is most commonly used as a
|
initialization time), although it is most commonly used as a
|
||||||
single-holder lock (a mutex). If you can't get a semaphore, your
|
single-holder lock (a mutex). If you can't get a semaphore, your
|
||||||
|
@ -290,7 +290,7 @@
|
||||||
<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 semaphore
|
||||||
(<filename>linux/asm/semaphore.h</filename>) to protect it. This
|
(<filename>linux/linux/semaphore.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 semaphore to the number
|
||||||
of resources available (usually 1), and call
|
of resources available (usually 1), and call
|
||||||
<function>down_interruptible()</function> to grab the semaphore, and
|
<function>down_interruptible()</function> to grab the semaphore, and
|
||||||
|
@ -854,7 +854,7 @@ The change is shown below, in standard patch format: the
|
||||||
};
|
};
|
||||||
|
|
||||||
-static DEFINE_MUTEX(cache_lock);
|
-static DEFINE_MUTEX(cache_lock);
|
||||||
+static spinlock_t cache_lock = SPIN_LOCK_UNLOCKED;
|
+static DEFINE_SPINLOCK(cache_lock);
|
||||||
static LIST_HEAD(cache);
|
static LIST_HEAD(cache);
|
||||||
static unsigned int cache_num = 0;
|
static unsigned int cache_num = 0;
|
||||||
#define MAX_CACHE_SIZE 10
|
#define MAX_CACHE_SIZE 10
|
||||||
|
@ -1238,7 +1238,7 @@ Here is the "lock-per-object" implementation:
|
||||||
- int popularity;
|
- int popularity;
|
||||||
};
|
};
|
||||||
|
|
||||||
static spinlock_t cache_lock = SPIN_LOCK_UNLOCKED;
|
static DEFINE_SPINLOCK(cache_lock);
|
||||||
@@ -77,6 +84,7 @@
|
@@ -77,6 +84,7 @@
|
||||||
obj->id = id;
|
obj->id = id;
|
||||||
obj->popularity = 0;
|
obj->popularity = 0;
|
||||||
|
@ -1656,7 +1656,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 <asm/semaphore.h>
|
#include <linux/semaphore.h>
|
||||||
#include <asm/errno.h>
|
#include <asm/errno.h>
|
||||||
|
|
||||||
struct object
|
struct object
|
||||||
|
|
|
@ -0,0 +1,447 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
|
||||||
|
"http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" []>
|
||||||
|
|
||||||
|
<book id="kgdbOnLinux">
|
||||||
|
<bookinfo>
|
||||||
|
<title>Using kgdb and the kgdb Internals</title>
|
||||||
|
|
||||||
|
<authorgroup>
|
||||||
|
<author>
|
||||||
|
<firstname>Jason</firstname>
|
||||||
|
<surname>Wessel</surname>
|
||||||
|
<affiliation>
|
||||||
|
<address>
|
||||||
|
<email>jason.wessel@windriver.com</email>
|
||||||
|
</address>
|
||||||
|
</affiliation>
|
||||||
|
</author>
|
||||||
|
</authorgroup>
|
||||||
|
|
||||||
|
<authorgroup>
|
||||||
|
<author>
|
||||||
|
<firstname>Tom</firstname>
|
||||||
|
<surname>Rini</surname>
|
||||||
|
<affiliation>
|
||||||
|
<address>
|
||||||
|
<email>trini@kernel.crashing.org</email>
|
||||||
|
</address>
|
||||||
|
</affiliation>
|
||||||
|
</author>
|
||||||
|
</authorgroup>
|
||||||
|
|
||||||
|
<authorgroup>
|
||||||
|
<author>
|
||||||
|
<firstname>Amit S.</firstname>
|
||||||
|
<surname>Kale</surname>
|
||||||
|
<affiliation>
|
||||||
|
<address>
|
||||||
|
<email>amitkale@linsyssoft.com</email>
|
||||||
|
</address>
|
||||||
|
</affiliation>
|
||||||
|
</author>
|
||||||
|
</authorgroup>
|
||||||
|
|
||||||
|
<copyright>
|
||||||
|
<year>2008</year>
|
||||||
|
<holder>Wind River Systems, Inc.</holder>
|
||||||
|
</copyright>
|
||||||
|
<copyright>
|
||||||
|
<year>2004-2005</year>
|
||||||
|
<holder>MontaVista Software, Inc.</holder>
|
||||||
|
</copyright>
|
||||||
|
<copyright>
|
||||||
|
<year>2004</year>
|
||||||
|
<holder>Amit S. Kale</holder>
|
||||||
|
</copyright>
|
||||||
|
|
||||||
|
<legalnotice>
|
||||||
|
<para>
|
||||||
|
This file is licensed under the terms of the GNU General Public License
|
||||||
|
version 2. This program is licensed "as is" without any warranty of any
|
||||||
|
kind, whether express or implied.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
</legalnotice>
|
||||||
|
</bookinfo>
|
||||||
|
|
||||||
|
<toc></toc>
|
||||||
|
<chapter id="Introduction">
|
||||||
|
<title>Introduction</title>
|
||||||
|
<para>
|
||||||
|
kgdb is a source level debugger for linux kernel. It is used along
|
||||||
|
with gdb to debug a linux kernel. The expectation is that gdb can
|
||||||
|
be used to "break in" to the kernel to inspect memory, variables
|
||||||
|
and look through a cal stack information similar to what an
|
||||||
|
application developer would use gdb for. It is possible to place
|
||||||
|
breakpoints in kernel code and perform some limited execution
|
||||||
|
stepping.
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
Two machines are required for using kgdb. One of these machines is a
|
||||||
|
development machine and the other is a test machine. The kernel
|
||||||
|
to be debugged runs on the test machine. The development machine
|
||||||
|
runs an instance of gdb against the vmlinux file which contains
|
||||||
|
the symbols (not boot image such as bzImage, zImage, uImage...).
|
||||||
|
In gdb the developer specifies the connection parameters and
|
||||||
|
connects to kgdb. Depending on which kgdb I/O modules exist in
|
||||||
|
the kernel for a given architecture, it may be possible to debug
|
||||||
|
the test machine's kernel with the development machine using a
|
||||||
|
rs232 or ethernet connection.
|
||||||
|
</para>
|
||||||
|
</chapter>
|
||||||
|
<chapter id="CompilingAKernel">
|
||||||
|
<title>Compiling a kernel</title>
|
||||||
|
<para>
|
||||||
|
To enable <symbol>CONFIG_KGDB</symbol>, look under the "Kernel debugging"
|
||||||
|
and then select "KGDB: kernel debugging with remote gdb".
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
Next you should choose one of more I/O drivers to interconnect debugging
|
||||||
|
host and debugged target. Early boot debugging requires a KGDB
|
||||||
|
I/O driver that supports early debugging and the driver must be
|
||||||
|
built into the kernel directly. Kgdb I/O driver configuration
|
||||||
|
takes place via kernel or module parameters, see following
|
||||||
|
chapter.
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
The kgdb test compile options are described in the kgdb test suite chapter.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
</chapter>
|
||||||
|
<chapter id="EnableKGDB">
|
||||||
|
<title>Enable kgdb for debugging</title>
|
||||||
|
<para>
|
||||||
|
In order to use kgdb you must activate it by passing configuration
|
||||||
|
information to one of the kgdb I/O drivers. If you do not pass any
|
||||||
|
configuration information kgdb will not do anything at all. Kgdb
|
||||||
|
will only actively hook up to the kernel trap hooks if a kgdb I/O
|
||||||
|
driver is loaded and configured. If you unconfigure a kgdb I/O
|
||||||
|
driver, kgdb will unregister all the kernel hook points.
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
All drivers can be reconfigured at run time, if
|
||||||
|
<symbol>CONFIG_SYSFS</symbol> and <symbol>CONFIG_MODULES</symbol>
|
||||||
|
are enabled, by echo'ing a new config string to
|
||||||
|
<constant>/sys/module/<driver>/parameter/<option></constant>.
|
||||||
|
The driver can be unconfigured by passing an empty string. You cannot
|
||||||
|
change the configuration while the debugger is attached. Make sure
|
||||||
|
to detach the debugger with the <constant>detach</constant> command
|
||||||
|
prior to trying unconfigure a kgdb I/O driver.
|
||||||
|
</para>
|
||||||
|
<sect1 id="kgdbwait">
|
||||||
|
<title>Kernel parameter: kgdbwait</title>
|
||||||
|
<para>
|
||||||
|
The Kernel command line option <constant>kgdbwait</constant> makes
|
||||||
|
kgdb wait for a debugger connection during booting of a kernel. You
|
||||||
|
can only use this option you compiled a kgdb I/O driver into the
|
||||||
|
kernel and you specified the I/O driver configuration as a kernel
|
||||||
|
command line option. The kgdbwait parameter should always follow the
|
||||||
|
configuration parameter for the kgdb I/O driver in the kernel
|
||||||
|
command line else the I/O driver will not be configured prior to
|
||||||
|
asking the kernel to use it to wait.
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
The kernel will stop and wait as early as the I/O driver and
|
||||||
|
architecture will allow when you use this option. If you build the
|
||||||
|
kgdb I/O driver as a kernel module kgdbwait will not do anything.
|
||||||
|
</para>
|
||||||
|
</sect1>
|
||||||
|
<sect1 id="kgdboc">
|
||||||
|
<title>Kernel parameter: kgdboc</title>
|
||||||
|
<para>
|
||||||
|
The kgdboc driver was originally an abbreviation meant to stand for
|
||||||
|
"kgdb over console". Kgdboc is designed to work with a single
|
||||||
|
serial port. It was meant to cover the circumstance
|
||||||
|
where you wanted to use a serial console as your primary console as
|
||||||
|
well as using it to perform kernel debugging. Of course you can
|
||||||
|
also use kgdboc without assigning a console to the same port.
|
||||||
|
</para>
|
||||||
|
<sect2 id="UsingKgdboc">
|
||||||
|
<title>Using kgdboc</title>
|
||||||
|
<para>
|
||||||
|
You can configure kgdboc via sysfs or a module or kernel boot line
|
||||||
|
parameter depending on if you build with CONFIG_KGDBOC as a module
|
||||||
|
or built-in.
|
||||||
|
<orderedlist>
|
||||||
|
<listitem><para>From the module load or build-in</para>
|
||||||
|
<para><constant>kgdboc=<tty-device>,[baud]</constant></para>
|
||||||
|
<para>
|
||||||
|
The example here would be if your console port was typically ttyS0, you would use something like <constant>kgdboc=ttyS0,115200</constant> or on the ARM Versatile AB you would likely use <constant>kgdboc=ttyAMA0,115200</constant>
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
<listitem><para>From sysfs</para>
|
||||||
|
<para><constant>echo ttyS0 > /sys/module/kgdboc/parameters/kgdboc</constant></para>
|
||||||
|
</listitem>
|
||||||
|
</orderedlist>
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
NOTE: Kgdboc does not support interrupting the target via the
|
||||||
|
gdb remote protocol. You must manually send a sysrq-g unless you
|
||||||
|
have a proxy that splits console output to a terminal problem and
|
||||||
|
has a separate port for the debugger to connect to that sends the
|
||||||
|
sysrq-g for you.
|
||||||
|
</para>
|
||||||
|
<para>When using kgdboc with no debugger proxy, you can end up
|
||||||
|
connecting the debugger for one of two entry points. If an
|
||||||
|
exception occurs after you have loaded kgdboc a message should print
|
||||||
|
on the console stating it is waiting for the debugger. In case you
|
||||||
|
disconnect your terminal program and then connect the debugger in
|
||||||
|
its place. If you want to interrupt the target system and forcibly
|
||||||
|
enter a debug session you have to issue a Sysrq sequence and then
|
||||||
|
type the letter <constant>g</constant>. Then you disconnect the
|
||||||
|
terminal session and connect gdb. Your options if you don't like
|
||||||
|
this are to hack gdb to send the sysrq-g for you as well as on the
|
||||||
|
initial connect, or to use a debugger proxy that allows an
|
||||||
|
unmodified gdb to do the debugging.
|
||||||
|
</para>
|
||||||
|
</sect2>
|
||||||
|
</sect1>
|
||||||
|
<sect1 id="kgdbcon">
|
||||||
|
<title>Kernel parameter: kgdbcon</title>
|
||||||
|
<para>
|
||||||
|
Kgdb supports using the gdb serial protocol to send console messages
|
||||||
|
to the debugger when the debugger is connected and running. There
|
||||||
|
are two ways to activate this feature.
|
||||||
|
<orderedlist>
|
||||||
|
<listitem><para>Activate with the kernel command line option:</para>
|
||||||
|
<para><constant>kgdbcon</constant></para>
|
||||||
|
</listitem>
|
||||||
|
<listitem><para>Use sysfs before configuring an io driver</para>
|
||||||
|
<para>
|
||||||
|
<constant>echo 1 > /sys/module/kgdb/parameters/kgdb_use_con</constant>
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
NOTE: If you do this after you configure the kgdb I/O driver, the
|
||||||
|
setting will not take effect until the next point the I/O is
|
||||||
|
reconfigured.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</orderedlist>
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
IMPORTANT NOTE: Using this option with kgdb over the console
|
||||||
|
(kgdboc) or kgdb over ethernet (kgdboe) is not supported.
|
||||||
|
</para>
|
||||||
|
</sect1>
|
||||||
|
</chapter>
|
||||||
|
<chapter id="ConnectingGDB">
|
||||||
|
<title>Connecting gdb</title>
|
||||||
|
<para>
|
||||||
|
If you are using kgdboc, you need to have used kgdbwait as a boot
|
||||||
|
argument, issued a sysrq-g, or the system you are going to debug
|
||||||
|
has already taken an exception and is waiting for the debugger to
|
||||||
|
attach before you can connect gdb.
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
If you are not using different kgdb I/O driver other than kgdboc,
|
||||||
|
you should be able to connect and the target will automatically
|
||||||
|
respond.
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
Example (using a serial port):
|
||||||
|
</para>
|
||||||
|
<programlisting>
|
||||||
|
% gdb ./vmlinux
|
||||||
|
(gdb) set remotebaud 115200
|
||||||
|
(gdb) target remote /dev/ttyS0
|
||||||
|
</programlisting>
|
||||||
|
<para>
|
||||||
|
Example (kgdb to a terminal server):
|
||||||
|
</para>
|
||||||
|
<programlisting>
|
||||||
|
% gdb ./vmlinux
|
||||||
|
(gdb) target remote udp:192.168.2.2:6443
|
||||||
|
</programlisting>
|
||||||
|
<para>
|
||||||
|
Example (kgdb over ethernet):
|
||||||
|
</para>
|
||||||
|
<programlisting>
|
||||||
|
% gdb ./vmlinux
|
||||||
|
(gdb) target remote udp:192.168.2.2:6443
|
||||||
|
</programlisting>
|
||||||
|
<para>
|
||||||
|
Once connected, you can debug a kernel the way you would debug an
|
||||||
|
application program.
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
If you are having problems connecting or something is going
|
||||||
|
seriously wrong while debugging, it will most often be the case
|
||||||
|
that you want to enable gdb to be verbose about its target
|
||||||
|
communications. You do this prior to issuing the <constant>target
|
||||||
|
remote</constant> command by typing in: <constant>set remote debug 1</constant>
|
||||||
|
</para>
|
||||||
|
</chapter>
|
||||||
|
<chapter id="KGDBTestSuite">
|
||||||
|
<title>kgdb Test Suite</title>
|
||||||
|
<para>
|
||||||
|
When kgdb is enabled in the kernel config you can also elect to
|
||||||
|
enable the config parameter KGDB_TESTS. Turning this on will
|
||||||
|
enable a special kgdb I/O module which is designed to test the
|
||||||
|
kgdb internal functions.
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
The kgdb tests are mainly intended for developers to test the kgdb
|
||||||
|
internals as well as a tool for developing a new kgdb architecture
|
||||||
|
specific implementation. These tests are not really for end users
|
||||||
|
of the Linux kernel. The primary source of documentation would be
|
||||||
|
to look in the drivers/misc/kgdbts.c file.
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
The kgdb test suite can also be configured at compile time to run
|
||||||
|
the core set of tests by setting the kernel config parameter
|
||||||
|
KGDB_TESTS_ON_BOOT. This particular option is aimed at automated
|
||||||
|
regression testing and does not require modifying the kernel boot
|
||||||
|
config arguments. If this is turned on, the kgdb test suite can
|
||||||
|
be disabled by specifying "kgdbts=" as a kernel boot argument.
|
||||||
|
</para>
|
||||||
|
</chapter>
|
||||||
|
<chapter id="CommonBackEndReq">
|
||||||
|
<title>KGDB Internals</title>
|
||||||
|
<sect1 id="kgdbArchitecture">
|
||||||
|
<title>Architecture Specifics</title>
|
||||||
|
<para>
|
||||||
|
Kgdb is organized into three basic components:
|
||||||
|
<orderedlist>
|
||||||
|
<listitem><para>kgdb core</para>
|
||||||
|
<para>
|
||||||
|
The kgdb core is found in kernel/kgdb.c. It contains:
|
||||||
|
<itemizedlist>
|
||||||
|
<listitem><para>All the logic to implement the gdb serial protocol</para></listitem>
|
||||||
|
<listitem><para>A generic OS exception handler which includes sync'ing the processors into a stopped state on an multi cpu system.</para></listitem>
|
||||||
|
<listitem><para>The API to talk to the kgdb I/O drivers</para></listitem>
|
||||||
|
<listitem><para>The API to make calls to the arch specific kgdb implementation</para></listitem>
|
||||||
|
<listitem><para>The logic to perform safe memory reads and writes to memory while using the debugger</para></listitem>
|
||||||
|
<listitem><para>A full implementation for software breakpoints unless overridden by the arch</para></listitem>
|
||||||
|
</itemizedlist>
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
<listitem><para>kgdb arch specific implementation</para>
|
||||||
|
<para>
|
||||||
|
This implementation is generally found in arch/*/kernel/kgdb.c.
|
||||||
|
As an example, arch/x86/kernel/kgdb.c contains the specifics to
|
||||||
|
implement HW breakpoint as well as the initialization to
|
||||||
|
dynamically register and unregister for the trap handlers on
|
||||||
|
this architecture. The arch specific portion implements:
|
||||||
|
<itemizedlist>
|
||||||
|
<listitem><para>contains an arch specific trap catcher which
|
||||||
|
invokes kgdb_handle_exception() to start kgdb about doing its
|
||||||
|
work</para></listitem>
|
||||||
|
<listitem><para>translation to and from gdb specific packet format to pt_regs</para></listitem>
|
||||||
|
<listitem><para>Registration and unregistration of architecture specific trap hooks</para></listitem>
|
||||||
|
<listitem><para>Any special exception handling and cleanup</para></listitem>
|
||||||
|
<listitem><para>NMI exception handling and cleanup</para></listitem>
|
||||||
|
<listitem><para>(optional)HW breakpoints</para></listitem>
|
||||||
|
</itemizedlist>
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
<listitem><para>kgdb I/O driver</para>
|
||||||
|
<para>
|
||||||
|
Each kgdb I/O driver has to provide an implemenation for the following:
|
||||||
|
<itemizedlist>
|
||||||
|
<listitem><para>configuration via builtin or module</para></listitem>
|
||||||
|
<listitem><para>dynamic configuration and kgdb hook registration calls</para></listitem>
|
||||||
|
<listitem><para>read and write character interface</para></listitem>
|
||||||
|
<listitem><para>A cleanup handler for unconfiguring from the kgdb core</para></listitem>
|
||||||
|
<listitem><para>(optional) Early debug methodology</para></listitem>
|
||||||
|
</itemizedlist>
|
||||||
|
Any given kgdb I/O driver has to operate very closely with the
|
||||||
|
hardware and must do it in such a way that does not enable
|
||||||
|
interrupts or change other parts of the system context without
|
||||||
|
completely restoring them. The kgdb core will repeatedly "poll"
|
||||||
|
a kgdb I/O driver for characters when it needs input. The I/O
|
||||||
|
driver is expected to return immediately if there is no data
|
||||||
|
available. Doing so allows for the future possibility to touch
|
||||||
|
watch dog hardware in such a way as to have a target system not
|
||||||
|
reset when these are enabled.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</orderedlist>
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
If you are intent on adding kgdb architecture specific support
|
||||||
|
for a new architecture, the architecture should define
|
||||||
|
<constant>HAVE_ARCH_KGDB</constant> in the architecture specific
|
||||||
|
Kconfig file. This will enable kgdb for the architecture, and
|
||||||
|
at that point you must create an architecture specific kgdb
|
||||||
|
implementation.
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
There are a few flags which must be set on every architecture in
|
||||||
|
their <asm/kgdb.h> file. These are:
|
||||||
|
<itemizedlist>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
NUMREGBYTES: The size in bytes of all of the registers, so
|
||||||
|
that we can ensure they will all fit into a packet.
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
BUFMAX: The size in bytes of the buffer GDB will read into.
|
||||||
|
This must be larger than NUMREGBYTES.
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
CACHE_FLUSH_IS_SAFE: Set to 1 if it is always safe to call
|
||||||
|
flush_cache_range or flush_icache_range. On some architectures,
|
||||||
|
these functions may not be safe to call on SMP since we keep other
|
||||||
|
CPUs in a holding pattern.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</itemizedlist>
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
There are also the following functions for the common backend,
|
||||||
|
found in kernel/kgdb.c, that must be supplied by the
|
||||||
|
architecture-specific backend unless marked as (optional), in
|
||||||
|
which case a default function maybe used if the architecture
|
||||||
|
does not need to provide a specific implementation.
|
||||||
|
</para>
|
||||||
|
!Iinclude/linux/kgdb.h
|
||||||
|
</sect1>
|
||||||
|
<sect1 id="kgdbocDesign">
|
||||||
|
<title>kgdboc internals</title>
|
||||||
|
<para>
|
||||||
|
The kgdboc driver is actually a very thin driver that relies on the
|
||||||
|
underlying low level to the hardware driver having "polling hooks"
|
||||||
|
which the to which the tty driver is attached. In the initial
|
||||||
|
implementation of kgdboc it the serial_core was changed to expose a
|
||||||
|
low level uart hook for doing polled mode reading and writing of a
|
||||||
|
single character while in an atomic context. When kgdb makes an I/O
|
||||||
|
request to the debugger, kgdboc invokes a call back in the serial
|
||||||
|
core which in turn uses the call back in the uart driver. It is
|
||||||
|
certainly possible to extend kgdboc to work with non-uart based
|
||||||
|
consoles in the future.
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
When using kgdboc with a uart, the uart driver must implement two callbacks in the <constant>struct uart_ops</constant>. Example from drivers/8250.c:<programlisting>
|
||||||
|
#ifdef CONFIG_CONSOLE_POLL
|
||||||
|
.poll_get_char = serial8250_get_poll_char,
|
||||||
|
.poll_put_char = serial8250_put_poll_char,
|
||||||
|
#endif
|
||||||
|
</programlisting>
|
||||||
|
Any implementation specifics around creating a polling driver use the
|
||||||
|
<constant>#ifdef CONFIG_CONSOLE_POLL</constant>, as shown above.
|
||||||
|
Keep in mind that polling hooks have to be implemented in such a way
|
||||||
|
that they can be called from an atomic context and have to restore
|
||||||
|
the state of the uart chip on return such that the system can return
|
||||||
|
to normal when the debugger detaches. You need to be very careful
|
||||||
|
with any kind of lock you consider, because failing here is most
|
||||||
|
going to mean pressing the reset button.
|
||||||
|
</para>
|
||||||
|
</sect1>
|
||||||
|
</chapter>
|
||||||
|
<chapter id="credits">
|
||||||
|
<title>Credits</title>
|
||||||
|
<para>
|
||||||
|
The following people have contributed to this document:
|
||||||
|
<orderedlist>
|
||||||
|
<listitem><para>Amit Kale<email>amitkale@linsyssoft.com</email></para></listitem>
|
||||||
|
<listitem><para>Tom Rini<email>trini@kernel.crashing.org</email></para></listitem>
|
||||||
|
</orderedlist>
|
||||||
|
In March 2008 this document was completely rewritten by:
|
||||||
|
<itemizedlist>
|
||||||
|
<listitem><para>Jason Wessel<email>jason.wessel@windriver.com</email></para></listitem>
|
||||||
|
</itemizedlist>
|
||||||
|
</para>
|
||||||
|
</chapter>
|
||||||
|
</book>
|
||||||
|
|
|
@ -0,0 +1,335 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
|
||||||
|
"http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" []>
|
||||||
|
|
||||||
|
<book id="mac80211-developers-guide">
|
||||||
|
<bookinfo>
|
||||||
|
<title>The mac80211 subsystem for kernel developers</title>
|
||||||
|
|
||||||
|
<authorgroup>
|
||||||
|
<author>
|
||||||
|
<firstname>Johannes</firstname>
|
||||||
|
<surname>Berg</surname>
|
||||||
|
<affiliation>
|
||||||
|
<address><email>johannes@sipsolutions.net</email></address>
|
||||||
|
</affiliation>
|
||||||
|
</author>
|
||||||
|
</authorgroup>
|
||||||
|
|
||||||
|
<copyright>
|
||||||
|
<year>2007</year>
|
||||||
|
<year>2008</year>
|
||||||
|
<holder>Johannes Berg</holder>
|
||||||
|
</copyright>
|
||||||
|
|
||||||
|
<legalnotice>
|
||||||
|
<para>
|
||||||
|
This documentation is free software; you can redistribute
|
||||||
|
it and/or modify it under the terms of the GNU General Public
|
||||||
|
License version 2 as published by the Free Software Foundation.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
This documentation is distributed in the hope that it will be
|
||||||
|
useful, but WITHOUT ANY WARRANTY; without even the implied
|
||||||
|
warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
See the GNU General Public License for more details.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
You should have received a copy of the GNU General Public
|
||||||
|
License along with this documentation; if not, write to the Free
|
||||||
|
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,
|
||||||
|
MA 02111-1307 USA
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
For more details see the file COPYING in the source
|
||||||
|
distribution of Linux.
|
||||||
|
</para>
|
||||||
|
</legalnotice>
|
||||||
|
|
||||||
|
<abstract>
|
||||||
|
!Pinclude/net/mac80211.h Introduction
|
||||||
|
!Pinclude/net/mac80211.h Warning
|
||||||
|
</abstract>
|
||||||
|
</bookinfo>
|
||||||
|
|
||||||
|
<toc></toc>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Generally, this document shall be ordered by increasing complexity.
|
||||||
|
It is important to note that readers should be able to read only
|
||||||
|
the first few sections to get a working driver and only advanced
|
||||||
|
usage should require reading the full document.
|
||||||
|
-->
|
||||||
|
|
||||||
|
<part>
|
||||||
|
<title>The basic mac80211 driver interface</title>
|
||||||
|
<partintro>
|
||||||
|
<para>
|
||||||
|
You should read and understand the information contained
|
||||||
|
within this part of the book while implementing a driver.
|
||||||
|
In some chapters, advanced usage is noted, that may be
|
||||||
|
skipped at first.
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
This part of the book only covers station and monitor mode
|
||||||
|
functionality, additional information required to implement
|
||||||
|
the other modes is covered in the second part of the book.
|
||||||
|
</para>
|
||||||
|
</partintro>
|
||||||
|
|
||||||
|
<chapter id="basics">
|
||||||
|
<title>Basic hardware handling</title>
|
||||||
|
<para>TBD</para>
|
||||||
|
<para>
|
||||||
|
This chapter shall contain information on getting a hw
|
||||||
|
struct allocated and registered with mac80211.
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
Since it is required to allocate rates/modes before registering
|
||||||
|
a hw struct, this chapter shall also contain information on setting
|
||||||
|
up the rate/mode structs.
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
Additionally, some discussion about the callbacks and
|
||||||
|
the general programming model should be in here, including
|
||||||
|
the definition of ieee80211_ops which will be referred to
|
||||||
|
a lot.
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
Finally, a discussion of hardware capabilities should be done
|
||||||
|
with references to other parts of the book.
|
||||||
|
</para>
|
||||||
|
<!-- intentionally multiple !F lines to get proper order -->
|
||||||
|
!Finclude/net/mac80211.h ieee80211_hw
|
||||||
|
!Finclude/net/mac80211.h ieee80211_hw_flags
|
||||||
|
!Finclude/net/mac80211.h SET_IEEE80211_DEV
|
||||||
|
!Finclude/net/mac80211.h SET_IEEE80211_PERM_ADDR
|
||||||
|
!Finclude/net/mac80211.h ieee80211_ops
|
||||||
|
!Finclude/net/mac80211.h ieee80211_alloc_hw
|
||||||
|
!Finclude/net/mac80211.h ieee80211_register_hw
|
||||||
|
!Finclude/net/mac80211.h ieee80211_get_tx_led_name
|
||||||
|
!Finclude/net/mac80211.h ieee80211_get_rx_led_name
|
||||||
|
!Finclude/net/mac80211.h ieee80211_get_assoc_led_name
|
||||||
|
!Finclude/net/mac80211.h ieee80211_get_radio_led_name
|
||||||
|
!Finclude/net/mac80211.h ieee80211_unregister_hw
|
||||||
|
!Finclude/net/mac80211.h ieee80211_free_hw
|
||||||
|
</chapter>
|
||||||
|
|
||||||
|
<chapter id="phy-handling">
|
||||||
|
<title>PHY configuration</title>
|
||||||
|
<para>TBD</para>
|
||||||
|
<para>
|
||||||
|
This chapter should describe PHY handling including
|
||||||
|
start/stop callbacks and the various structures used.
|
||||||
|
</para>
|
||||||
|
!Finclude/net/mac80211.h ieee80211_conf
|
||||||
|
!Finclude/net/mac80211.h ieee80211_conf_flags
|
||||||
|
</chapter>
|
||||||
|
|
||||||
|
<chapter id="iface-handling">
|
||||||
|
<title>Virtual interfaces</title>
|
||||||
|
<para>TBD</para>
|
||||||
|
<para>
|
||||||
|
This chapter should describe virtual interface basics
|
||||||
|
that are relevant to the driver (VLANs, MGMT etc are not.)
|
||||||
|
It should explain the use of the add_iface/remove_iface
|
||||||
|
callbacks as well as the interface configuration callbacks.
|
||||||
|
</para>
|
||||||
|
<para>Things related to AP mode should be discussed there.</para>
|
||||||
|
<para>
|
||||||
|
Things related to supporting multiple interfaces should be
|
||||||
|
in the appropriate chapter, a BIG FAT note should be here about
|
||||||
|
this though and the recommendation to allow only a single
|
||||||
|
interface in STA mode at first!
|
||||||
|
</para>
|
||||||
|
!Finclude/net/mac80211.h ieee80211_if_types
|
||||||
|
!Finclude/net/mac80211.h ieee80211_if_init_conf
|
||||||
|
!Finclude/net/mac80211.h ieee80211_if_conf
|
||||||
|
</chapter>
|
||||||
|
|
||||||
|
<chapter id="rx-tx">
|
||||||
|
<title>Receive and transmit processing</title>
|
||||||
|
<sect1>
|
||||||
|
<title>what should be here</title>
|
||||||
|
<para>TBD</para>
|
||||||
|
<para>
|
||||||
|
This should describe the receive and transmit
|
||||||
|
paths in mac80211/the drivers as well as
|
||||||
|
transmit status handling.
|
||||||
|
</para>
|
||||||
|
</sect1>
|
||||||
|
<sect1>
|
||||||
|
<title>Frame format</title>
|
||||||
|
!Pinclude/net/mac80211.h Frame format
|
||||||
|
</sect1>
|
||||||
|
<sect1>
|
||||||
|
<title>Alignment issues</title>
|
||||||
|
<para>TBD</para>
|
||||||
|
</sect1>
|
||||||
|
<sect1>
|
||||||
|
<title>Calling into mac80211 from interrupts</title>
|
||||||
|
!Pinclude/net/mac80211.h Calling mac80211 from interrupts
|
||||||
|
</sect1>
|
||||||
|
<sect1>
|
||||||
|
<title>functions/definitions</title>
|
||||||
|
!Finclude/net/mac80211.h ieee80211_rx_status
|
||||||
|
!Finclude/net/mac80211.h mac80211_rx_flags
|
||||||
|
!Finclude/net/mac80211.h ieee80211_tx_control
|
||||||
|
!Finclude/net/mac80211.h ieee80211_tx_status_flags
|
||||||
|
!Finclude/net/mac80211.h ieee80211_rx
|
||||||
|
!Finclude/net/mac80211.h ieee80211_rx_irqsafe
|
||||||
|
!Finclude/net/mac80211.h ieee80211_tx_status
|
||||||
|
!Finclude/net/mac80211.h ieee80211_tx_status_irqsafe
|
||||||
|
!Finclude/net/mac80211.h ieee80211_rts_get
|
||||||
|
!Finclude/net/mac80211.h ieee80211_rts_duration
|
||||||
|
!Finclude/net/mac80211.h ieee80211_ctstoself_get
|
||||||
|
!Finclude/net/mac80211.h ieee80211_ctstoself_duration
|
||||||
|
!Finclude/net/mac80211.h ieee80211_generic_frame_duration
|
||||||
|
!Finclude/net/mac80211.h ieee80211_get_hdrlen_from_skb
|
||||||
|
!Finclude/net/mac80211.h ieee80211_get_hdrlen
|
||||||
|
!Finclude/net/mac80211.h ieee80211_wake_queue
|
||||||
|
!Finclude/net/mac80211.h ieee80211_stop_queue
|
||||||
|
!Finclude/net/mac80211.h ieee80211_start_queues
|
||||||
|
!Finclude/net/mac80211.h ieee80211_stop_queues
|
||||||
|
!Finclude/net/mac80211.h ieee80211_wake_queues
|
||||||
|
</sect1>
|
||||||
|
</chapter>
|
||||||
|
|
||||||
|
<chapter id="filters">
|
||||||
|
<title>Frame filtering</title>
|
||||||
|
!Pinclude/net/mac80211.h Frame filtering
|
||||||
|
!Finclude/net/mac80211.h ieee80211_filter_flags
|
||||||
|
</chapter>
|
||||||
|
</part>
|
||||||
|
|
||||||
|
<part id="advanced">
|
||||||
|
<title>Advanced driver interface</title>
|
||||||
|
<partintro>
|
||||||
|
<para>
|
||||||
|
Information contained within this part of the book is
|
||||||
|
of interest only for advanced interaction of mac80211
|
||||||
|
with drivers to exploit more hardware capabilities and
|
||||||
|
improve performance.
|
||||||
|
</para>
|
||||||
|
</partintro>
|
||||||
|
|
||||||
|
<chapter id="hardware-crypto-offload">
|
||||||
|
<title>Hardware crypto acceleration</title>
|
||||||
|
!Pinclude/net/mac80211.h Hardware crypto acceleration
|
||||||
|
<!-- intentionally multiple !F lines to get proper order -->
|
||||||
|
!Finclude/net/mac80211.h set_key_cmd
|
||||||
|
!Finclude/net/mac80211.h ieee80211_key_conf
|
||||||
|
!Finclude/net/mac80211.h ieee80211_key_alg
|
||||||
|
!Finclude/net/mac80211.h ieee80211_key_flags
|
||||||
|
</chapter>
|
||||||
|
|
||||||
|
<chapter id="qos">
|
||||||
|
<title>Multiple queues and QoS support</title>
|
||||||
|
<para>TBD</para>
|
||||||
|
!Finclude/net/mac80211.h ieee80211_tx_queue_params
|
||||||
|
!Finclude/net/mac80211.h ieee80211_tx_queue_stats_data
|
||||||
|
!Finclude/net/mac80211.h ieee80211_tx_queue
|
||||||
|
</chapter>
|
||||||
|
|
||||||
|
<chapter id="AP">
|
||||||
|
<title>Access point mode support</title>
|
||||||
|
<para>TBD</para>
|
||||||
|
<para>Some parts of the if_conf should be discussed here instead</para>
|
||||||
|
<para>
|
||||||
|
Insert notes about VLAN interfaces with hw crypto here or
|
||||||
|
in the hw crypto chapter.
|
||||||
|
</para>
|
||||||
|
!Finclude/net/mac80211.h ieee80211_get_buffered_bc
|
||||||
|
!Finclude/net/mac80211.h ieee80211_beacon_get
|
||||||
|
</chapter>
|
||||||
|
|
||||||
|
<chapter id="multi-iface">
|
||||||
|
<title>Supporting multiple virtual interfaces</title>
|
||||||
|
<para>TBD</para>
|
||||||
|
<para>
|
||||||
|
Note: WDS with identical MAC address should almost always be OK
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
Insert notes about having multiple virtual interfaces with
|
||||||
|
different MAC addresses here, note which configurations are
|
||||||
|
supported by mac80211, add notes about supporting hw crypto
|
||||||
|
with it.
|
||||||
|
</para>
|
||||||
|
</chapter>
|
||||||
|
|
||||||
|
<chapter id="hardware-scan-offload">
|
||||||
|
<title>Hardware scan offload</title>
|
||||||
|
<para>TBD</para>
|
||||||
|
!Finclude/net/mac80211.h ieee80211_scan_completed
|
||||||
|
</chapter>
|
||||||
|
</part>
|
||||||
|
|
||||||
|
<part id="rate-control">
|
||||||
|
<title>Rate control interface</title>
|
||||||
|
<partintro>
|
||||||
|
<para>TBD</para>
|
||||||
|
<para>
|
||||||
|
This part of the book describes the rate control algorithm
|
||||||
|
interface and how it relates to mac80211 and drivers.
|
||||||
|
</para>
|
||||||
|
</partintro>
|
||||||
|
<chapter id="dummy">
|
||||||
|
<title>dummy chapter</title>
|
||||||
|
<para>TBD</para>
|
||||||
|
</chapter>
|
||||||
|
</part>
|
||||||
|
|
||||||
|
<part id="internal">
|
||||||
|
<title>Internals</title>
|
||||||
|
<partintro>
|
||||||
|
<para>TBD</para>
|
||||||
|
<para>
|
||||||
|
This part of the book describes mac80211 internals.
|
||||||
|
</para>
|
||||||
|
</partintro>
|
||||||
|
|
||||||
|
<chapter id="key-handling">
|
||||||
|
<title>Key handling</title>
|
||||||
|
<sect1>
|
||||||
|
<title>Key handling basics</title>
|
||||||
|
!Pnet/mac80211/key.c Key handling basics
|
||||||
|
</sect1>
|
||||||
|
<sect1>
|
||||||
|
<title>MORE TBD</title>
|
||||||
|
<para>TBD</para>
|
||||||
|
</sect1>
|
||||||
|
</chapter>
|
||||||
|
|
||||||
|
<chapter id="rx-processing">
|
||||||
|
<title>Receive processing</title>
|
||||||
|
<para>TBD</para>
|
||||||
|
</chapter>
|
||||||
|
|
||||||
|
<chapter id="tx-processing">
|
||||||
|
<title>Transmit processing</title>
|
||||||
|
<para>TBD</para>
|
||||||
|
</chapter>
|
||||||
|
|
||||||
|
<chapter id="sta-info">
|
||||||
|
<title>Station info handling</title>
|
||||||
|
<sect1>
|
||||||
|
<title>Programming information</title>
|
||||||
|
!Fnet/mac80211/sta_info.h sta_info
|
||||||
|
!Fnet/mac80211/sta_info.h ieee80211_sta_info_flags
|
||||||
|
</sect1>
|
||||||
|
<sect1>
|
||||||
|
<title>STA information lifetime rules</title>
|
||||||
|
!Pnet/mac80211/sta_info.c STA information lifetime rules
|
||||||
|
</sect1>
|
||||||
|
</chapter>
|
||||||
|
|
||||||
|
<chapter id="synchronisation">
|
||||||
|
<title>Synchronisation</title>
|
||||||
|
<para>TBD</para>
|
||||||
|
<para>Locking, lots of RCU</para>
|
||||||
|
</chapter>
|
||||||
|
</part>
|
||||||
|
</book>
|
|
@ -100,8 +100,8 @@
|
||||||
useful documents, at the USB home page (see Resources). An excellent
|
useful documents, at the USB home page (see Resources). An excellent
|
||||||
introduction to the Linux USB subsystem can be found at the USB Working
|
introduction to the Linux USB subsystem can be found at the USB Working
|
||||||
Devices List (see Resources). It explains how the Linux USB subsystem is
|
Devices List (see Resources). It explains how the Linux USB subsystem is
|
||||||
structured and introduces the reader to the concept of USB urbs, which
|
structured and introduces the reader to the concept of USB urbs
|
||||||
are essential to USB drivers.
|
(USB Request Blocks), which are essential to USB drivers.
|
||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
The first thing a Linux USB driver needs to do is register itself with
|
The first thing a Linux USB driver needs to do is register itself with
|
||||||
|
@ -162,8 +162,8 @@ static int __init usb_skel_init(void)
|
||||||
module_init(usb_skel_init);
|
module_init(usb_skel_init);
|
||||||
</programlisting>
|
</programlisting>
|
||||||
<para>
|
<para>
|
||||||
When the driver is unloaded from the system, it needs to unregister
|
When the driver is unloaded from the system, it needs to deregister
|
||||||
itself with the USB subsystem. This is done with the usb_unregister
|
itself with the USB subsystem. This is done with the usb_deregister
|
||||||
function:
|
function:
|
||||||
</para>
|
</para>
|
||||||
<programlisting>
|
<programlisting>
|
||||||
|
@ -232,7 +232,7 @@ static int skel_probe(struct usb_interface *interface,
|
||||||
were passed to the USB subsystem will be called from a user program trying
|
were passed to the USB subsystem will be called from a user program trying
|
||||||
to talk to the device. The first function called will be open, as the
|
to talk to the device. The first function called will be open, as the
|
||||||
program tries to open the device for I/O. We increment our private usage
|
program tries to open the device for I/O. We increment our private usage
|
||||||
count and save off a pointer to our internal structure in the file
|
count and save a pointer to our internal structure in the file
|
||||||
structure. This is done so that future calls to file operations will
|
structure. This is done so that future calls to file operations will
|
||||||
enable the driver to determine which device the user is addressing. All
|
enable the driver to determine which device the user is addressing. All
|
||||||
of this is done with the following code:
|
of this is done with the following code:
|
||||||
|
@ -252,8 +252,8 @@ file->private_data = dev;
|
||||||
send to the device based on the size of the write urb it has created (this
|
send to the device based on the size of the write urb it has created (this
|
||||||
size depends on the size of the bulk out end point that the device has).
|
size depends on the size of the bulk out end point that the device has).
|
||||||
Then it copies the data from user space to kernel space, points the urb to
|
Then it copies the data from user space to kernel space, points the urb to
|
||||||
the data and submits the urb to the USB subsystem. This can be shown in
|
the data and submits the urb to the USB subsystem. This can be seen in
|
||||||
he following code:
|
the following code:
|
||||||
</para>
|
</para>
|
||||||
<programlisting>
|
<programlisting>
|
||||||
/* we can only write as much as 1 urb will hold */
|
/* we can only write as much as 1 urb will hold */
|
||||||
|
|
|
@ -0,0 +1,12 @@
|
||||||
|
00-INDEX
|
||||||
|
- this file
|
||||||
|
PCI-DMA-mapping.txt
|
||||||
|
- info for PCI drivers using DMA portably across all platforms
|
||||||
|
PCIEBUS-HOWTO.txt
|
||||||
|
- a guide describing the PCI Express Port Bus driver
|
||||||
|
pci-error-recovery.txt
|
||||||
|
- info on PCI error recovery
|
||||||
|
pci.txt
|
||||||
|
- info on the PCI subsystem for device driver authors
|
||||||
|
pcieaer-howto.txt
|
||||||
|
- the PCI Express Advanced Error Reporting Driver Guide HOWTO
|
|
@ -119,11 +119,12 @@ initialization with a pointer to a structure describing the driver
|
||||||
the power state of a device before reboot.
|
the power state of a device before reboot.
|
||||||
e.g. drivers/net/e100.c.
|
e.g. drivers/net/e100.c.
|
||||||
|
|
||||||
err_handler See Documentation/pci-error-recovery.txt
|
err_handler See Documentation/PCI/pci-error-recovery.txt
|
||||||
|
|
||||||
|
|
||||||
The ID table is an array of struct pci_device_id entries ending with an
|
The ID table is an array of struct pci_device_id entries ending with an
|
||||||
all-zero entry. Each entry consists of:
|
all-zero entry; use of the macro DEFINE_PCI_DEVICE_TABLE is the preferred
|
||||||
|
method of declaring the table. Each entry consists of:
|
||||||
|
|
||||||
vendor,device Vendor and device ID to match (or PCI_ANY_ID)
|
vendor,device Vendor and device ID to match (or PCI_ANY_ID)
|
||||||
|
|
||||||
|
@ -191,7 +192,8 @@ Tips on when/where to use the above attributes:
|
||||||
|
|
||||||
o Do not mark the struct pci_driver.
|
o Do not mark the struct pci_driver.
|
||||||
|
|
||||||
o The ID table array should be marked __devinitdata.
|
o The ID table array should be marked __devinitconst; this is done
|
||||||
|
automatically if the table is declared with DEFINE_PCI_DEVICE_TABLE().
|
||||||
|
|
||||||
o The probe() and remove() functions should be marked __devinit
|
o The probe() and remove() functions should be marked __devinit
|
||||||
and __devexit respectively. All initialization functions
|
and __devexit respectively. All initialization functions
|
|
@ -13,7 +13,7 @@ Reporting (AER) driver and provides information on how to use it, as
|
||||||
well as how to enable the drivers of endpoint devices to conform with
|
well as how to enable the drivers of endpoint devices to conform with
|
||||||
PCI Express AER driver.
|
PCI Express AER driver.
|
||||||
|
|
||||||
1.2 Copyright © Intel Corporation 2006.
|
1.2 Copyright © Intel Corporation 2006.
|
||||||
|
|
||||||
1.3 What is the PCI Express AER Driver?
|
1.3 What is the PCI Express AER Driver?
|
||||||
|
|
|
@ -183,7 +183,7 @@ Even if the maintainer did not respond in step #4, make sure to ALWAYS
|
||||||
copy the maintainer when you change their code.
|
copy the maintainer when you change their code.
|
||||||
|
|
||||||
For small patches you may want to CC the Trivial Patch Monkey
|
For small patches you may want to CC the Trivial Patch Monkey
|
||||||
trivial@kernel.org managed by Adrian Bunk; which collects "trivial"
|
trivial@kernel.org managed by Jesper Juhl; which collects "trivial"
|
||||||
patches. Trivial patches must qualify for one of the following rules:
|
patches. Trivial patches must qualify for one of the following rules:
|
||||||
Spelling fixes in documentation
|
Spelling fixes in documentation
|
||||||
Spelling fixes which could break grep(1)
|
Spelling fixes which could break grep(1)
|
||||||
|
@ -196,7 +196,7 @@ patches. Trivial patches must qualify for one of the following rules:
|
||||||
since people copy, as long as it's trivial)
|
since people copy, as long as it's trivial)
|
||||||
Any fix by the author/maintainer of the file (ie. patch monkey
|
Any fix by the author/maintainer of the file (ie. patch monkey
|
||||||
in re-transmission mode)
|
in re-transmission mode)
|
||||||
URL: <http://www.kernel.org/pub/linux/kernel/people/bunk/trivial/>
|
URL: <http://www.kernel.org/pub/linux/kernel/people/juhl/trivial/>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -328,7 +328,7 @@ now, but you can do this to mark internal company procedures or just
|
||||||
point out some special detail about the sign-off.
|
point out some special detail about the sign-off.
|
||||||
|
|
||||||
|
|
||||||
13) When to use Acked-by:
|
13) When to use Acked-by: and Cc:
|
||||||
|
|
||||||
The Signed-off-by: tag indicates that the signer was involved in the
|
The Signed-off-by: tag indicates that the signer was involved in the
|
||||||
development of the patch, or that he/she was in the patch's delivery path.
|
development of the patch, or that he/she was in the patch's delivery path.
|
||||||
|
@ -352,8 +352,56 @@ the part which affects that maintainer's code. Judgement should be used here.
|
||||||
When in doubt people should refer to the original discussion in the mailing
|
When in doubt people should refer to the original discussion in the mailing
|
||||||
list archives.
|
list archives.
|
||||||
|
|
||||||
|
If a person has had the opportunity to comment on a patch, but has not
|
||||||
|
provided such comments, you may optionally add a "Cc:" tag to the patch.
|
||||||
|
This is the only tag which might be added without an explicit action by the
|
||||||
|
person it names. This tag documents that potentially interested parties
|
||||||
|
have been included in the discussion
|
||||||
|
|
||||||
14) The canonical patch format
|
|
||||||
|
14) Using Test-by: and Reviewed-by:
|
||||||
|
|
||||||
|
A Tested-by: tag indicates that the patch has been successfully tested (in
|
||||||
|
some environment) by the person named. This tag informs maintainers that
|
||||||
|
some testing has been performed, provides a means to locate testers for
|
||||||
|
future patches, and ensures credit for the testers.
|
||||||
|
|
||||||
|
Reviewed-by:, instead, indicates that the patch has been reviewed and found
|
||||||
|
acceptable according to the Reviewer's Statement:
|
||||||
|
|
||||||
|
Reviewer's statement of oversight
|
||||||
|
|
||||||
|
By offering my Reviewed-by: tag, I state that:
|
||||||
|
|
||||||
|
(a) I have carried out a technical review of this patch to
|
||||||
|
evaluate its appropriateness and readiness for inclusion into
|
||||||
|
the mainline kernel.
|
||||||
|
|
||||||
|
(b) Any problems, concerns, or questions relating to the patch
|
||||||
|
have been communicated back to the submitter. I am satisfied
|
||||||
|
with the submitter's response to my comments.
|
||||||
|
|
||||||
|
(c) While there may be things that could be improved with this
|
||||||
|
submission, I believe that it is, at this time, (1) a
|
||||||
|
worthwhile modification to the kernel, and (2) free of known
|
||||||
|
issues which would argue against its inclusion.
|
||||||
|
|
||||||
|
(d) While I have reviewed the patch and believe it to be sound, I
|
||||||
|
do not (unless explicitly stated elsewhere) make any
|
||||||
|
warranties or guarantees that it will achieve its stated
|
||||||
|
purpose or function properly in any given situation.
|
||||||
|
|
||||||
|
A Reviewed-by tag is a statement of opinion that the patch is an
|
||||||
|
appropriate modification of the kernel without any remaining serious
|
||||||
|
technical issues. Any interested reviewer (who has done the work) can
|
||||||
|
offer a Reviewed-by tag for a patch. This tag serves to give credit to
|
||||||
|
reviewers and to inform maintainers of the degree of review which has been
|
||||||
|
done on the patch. Reviewed-by: tags, when supplied by reviewers known to
|
||||||
|
understand the subject area and to perform thorough reviews, will normally
|
||||||
|
increase the liklihood of your patch getting into the kernel.
|
||||||
|
|
||||||
|
|
||||||
|
15) The canonical patch format
|
||||||
|
|
||||||
The canonical patch subject line is:
|
The canonical patch subject line is:
|
||||||
|
|
||||||
|
@ -512,7 +560,7 @@ They provide type safety, have no length limitations, no formatting
|
||||||
limitations, and under gcc they are as cheap as macros.
|
limitations, and under gcc they are as cheap as macros.
|
||||||
|
|
||||||
Macros should only be used for cases where a static inline is clearly
|
Macros should only be used for cases where a static inline is clearly
|
||||||
suboptimal [there a few, isolated cases of this in fast paths],
|
suboptimal [there are a few, isolated cases of this in fast paths],
|
||||||
or where it is impossible to use a static inline function [such as
|
or where it is impossible to use a static inline function [such as
|
||||||
string-izing].
|
string-izing].
|
||||||
|
|
||||||
|
|
|
@ -1,15 +1,7 @@
|
||||||
Linux supports two methods of overriding the BIOS DSDT:
|
Linux supports a method of overriding the BIOS DSDT:
|
||||||
|
|
||||||
CONFIG_ACPI_CUSTOM_DSDT builds the image into the kernel.
|
CONFIG_ACPI_CUSTOM_DSDT builds the image into the kernel.
|
||||||
|
|
||||||
CONFIG_ACPI_CUSTOM_DSDT_INITRD adds the image to the initrd.
|
When to use this method is described in detail on the
|
||||||
|
|
||||||
When to use these methods is described in detail on the
|
|
||||||
Linux/ACPI home page:
|
Linux/ACPI home page:
|
||||||
http://www.lesswatts.org/projects/acpi/overridingDSDT.php
|
http://www.lesswatts.org/projects/acpi/overridingDSDT.php
|
||||||
|
|
||||||
Note that if both options are used, the DSDT supplied
|
|
||||||
by the INITRD method takes precedence.
|
|
||||||
|
|
||||||
Documentation/initramfs-add-dsdt.sh is provided for convenience
|
|
||||||
for use with the CONFIG_ACPI_CUSTOM_DSDT_INITRD method.
|
|
||||||
|
|
|
@ -1,43 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
# Adds a DSDT file to the initrd (if it's an initramfs)
|
|
||||||
# first argument is the name of archive
|
|
||||||
# second argument is the name of the file to add
|
|
||||||
# The file will be copied as /DSDT.aml
|
|
||||||
|
|
||||||
# 20060126: fix "Premature end of file" with some old cpio (Roland Robic)
|
|
||||||
# 20060205: this time it should really work
|
|
||||||
|
|
||||||
# check the arguments
|
|
||||||
if [ $# -ne 2 ]; then
|
|
||||||
program_name=$(basename $0)
|
|
||||||
echo "\
|
|
||||||
$program_name: too few arguments
|
|
||||||
Usage: $program_name initrd-name.img DSDT-to-add.aml
|
|
||||||
Adds a DSDT file to an initrd (in initramfs format)
|
|
||||||
|
|
||||||
initrd-name.img: filename of the initrd in initramfs format
|
|
||||||
DSDT-to-add.aml: filename of the DSDT file to add
|
|
||||||
" 1>&2
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
# we should check it's an initramfs
|
|
||||||
|
|
||||||
tempcpio=$(mktemp -d)
|
|
||||||
# cleanup on exit, hangup, interrupt, quit, termination
|
|
||||||
trap 'rm -rf $tempcpio' 0 1 2 3 15
|
|
||||||
|
|
||||||
# extract the archive
|
|
||||||
gunzip -c "$1" > "$tempcpio"/initramfs.cpio || exit 1
|
|
||||||
|
|
||||||
# copy the DSDT file at the root of the directory so that we can call it "/DSDT.aml"
|
|
||||||
cp -f "$2" "$tempcpio"/DSDT.aml
|
|
||||||
|
|
||||||
# add the file
|
|
||||||
cd "$tempcpio"
|
|
||||||
(echo DSDT.aml | cpio --quiet -H newc -o -A -O "$tempcpio"/initramfs.cpio) || exit 1
|
|
||||||
cd "$OLDPWD"
|
|
||||||
|
|
||||||
# re-compress the archive
|
|
||||||
gzip -c "$tempcpio"/initramfs.cpio > "$1"
|
|
||||||
|
|
|
@ -186,7 +186,8 @@ If the atomic value v is not equal to u, this function adds a to v, and
|
||||||
returns non zero. If v is equal to u then it returns zero. This is done as
|
returns non zero. If v is equal to u then it returns zero. This is done as
|
||||||
an atomic operation.
|
an atomic operation.
|
||||||
|
|
||||||
atomic_add_unless requires explicit memory barriers around the operation.
|
atomic_add_unless requires explicit memory barriers around the operation
|
||||||
|
unless it fails (returns 0).
|
||||||
|
|
||||||
atomic_inc_not_zero, equivalent to atomic_add_unless(v, 1, 0)
|
atomic_inc_not_zero, equivalent to atomic_add_unless(v, 1, 0)
|
||||||
|
|
||||||
|
|
|
@ -1097,7 +1097,7 @@ lock themselves, if required. Drivers that explicitly used the
|
||||||
io_request_lock for serialization need to be modified accordingly.
|
io_request_lock for serialization need to be modified accordingly.
|
||||||
Usually it's as easy as adding a global lock:
|
Usually it's as easy as adding a global lock:
|
||||||
|
|
||||||
static spinlock_t my_driver_lock = SPIN_LOCK_UNLOCKED;
|
static DEFINE_SPINLOCK(my_driver_lock);
|
||||||
|
|
||||||
and passing the address to that lock to blk_init_queue().
|
and passing the address to that lock to blk_init_queue().
|
||||||
|
|
||||||
|
|
|
@ -777,7 +777,7 @@ Note that a driver must have one static structure, $<device>_dops$, while
|
||||||
it may have as many structures $<device>_info$ as there are minor devices
|
it may have as many structures $<device>_info$ as there are minor devices
|
||||||
active. $Register_cdrom()$ builds a linked list from these.
|
active. $Register_cdrom()$ builds a linked list from these.
|
||||||
|
|
||||||
\subsection{$Int\ unregister_cdrom(struct\ cdrom_device_info * cdi)$}
|
\subsection{$Void\ unregister_cdrom(struct\ cdrom_device_info * cdi)$}
|
||||||
|
|
||||||
Unregistering device $cdi$ with minor number $MINOR(cdi\to dev)$ removes
|
Unregistering device $cdi$ with minor number $MINOR(cdi\to dev)$ removes
|
||||||
the minor device from the list. If it was the last registered minor for
|
the minor device from the list. If it was the last registered minor for
|
||||||
|
|
|
@ -45,7 +45,7 @@ This driver provides the following features:
|
||||||
---------------
|
---------------
|
||||||
|
|
||||||
0. The ide-cd relies on the ide disk driver. See
|
0. The ide-cd relies on the ide disk driver. See
|
||||||
Documentation/ide.txt for up-to-date information on the ide
|
Documentation/ide/ide.txt for up-to-date information on the ide
|
||||||
driver.
|
driver.
|
||||||
|
|
||||||
1. Make sure that the ide and ide-cd drivers are compiled into the
|
1. Make sure that the ide and ide-cd drivers are compiled into the
|
||||||
|
@ -64,7 +64,7 @@ This driver provides the following features:
|
||||||
|
|
||||||
Depending on what type of IDE interface you have, you may need to
|
Depending on what type of IDE interface you have, you may need to
|
||||||
specify additional configuration options. See
|
specify additional configuration options. See
|
||||||
Documentation/ide.txt.
|
Documentation/ide/ide.txt.
|
||||||
|
|
||||||
2. You should also ensure that the iso9660 filesystem is either
|
2. You should also ensure that the iso9660 filesystem is either
|
||||||
compiled into the kernel or available as a loadable module. You
|
compiled into the kernel or available as a loadable module. You
|
||||||
|
@ -84,7 +84,7 @@ This driver provides the following features:
|
||||||
on the primary IDE interface are called `hda' and `hdb',
|
on the primary IDE interface are called `hda' and `hdb',
|
||||||
respectively. The drives on the secondary interface are called
|
respectively. The drives on the secondary interface are called
|
||||||
`hdc' and `hdd'. (Interfaces at other locations get other letters
|
`hdc' and `hdd'. (Interfaces at other locations get other letters
|
||||||
in the third position; see Documentation/ide.txt.)
|
in the third position; see Documentation/ide/ide.txt.)
|
||||||
|
|
||||||
If you want your CDROM drive to be found automatically by the
|
If you want your CDROM drive to be found automatically by the
|
||||||
driver, you should make sure your IDE interface uses either the
|
driver, you should make sure your IDE interface uses either the
|
||||||
|
@ -93,7 +93,7 @@ This driver provides the following features:
|
||||||
be jumpered as `master'. (If for some reason you cannot configure
|
be jumpered as `master'. (If for some reason you cannot configure
|
||||||
your system in this manner, you can probably still use the driver.
|
your system in this manner, you can probably still use the driver.
|
||||||
You may have to pass extra configuration information to the kernel
|
You may have to pass extra configuration information to the kernel
|
||||||
when you boot, however. See Documentation/ide.txt for more
|
when you boot, however. See Documentation/ide/ide.txt for more
|
||||||
information.)
|
information.)
|
||||||
|
|
||||||
4. Boot the system. If the drive is recognized, you should see a
|
4. Boot the system. If the drive is recognized, you should see a
|
||||||
|
@ -201,7 +201,7 @@ TEST
|
||||||
This section discusses some common problems encountered when trying to
|
This section discusses some common problems encountered when trying to
|
||||||
use the driver, and some possible solutions. Note that if you are
|
use the driver, and some possible solutions. Note that if you are
|
||||||
experiencing problems, you should probably also review
|
experiencing problems, you should probably also review
|
||||||
Documentation/ide.txt for current information about the underlying
|
Documentation/ide/ide.txt for current information about the underlying
|
||||||
IDE support code. Some of these items apply only to earlier versions
|
IDE support code. Some of these items apply only to earlier versions
|
||||||
of the driver, but are mentioned here for completeness.
|
of the driver, but are mentioned here for completeness.
|
||||||
|
|
||||||
|
@ -211,7 +211,7 @@ from the driver.
|
||||||
a. Drive is not detected during booting.
|
a. Drive is not detected during booting.
|
||||||
|
|
||||||
- Review the configuration instructions above and in
|
- Review the configuration instructions above and in
|
||||||
Documentation/ide.txt, and check how your hardware is
|
Documentation/ide/ide.txt, and check how your hardware is
|
||||||
configured.
|
configured.
|
||||||
|
|
||||||
- If your drive is the only device on an IDE interface, it should
|
- If your drive is the only device on an IDE interface, it should
|
||||||
|
@ -219,7 +219,7 @@ a. Drive is not detected during booting.
|
||||||
|
|
||||||
- If your IDE interface is not at the standard addresses of 0x170
|
- If your IDE interface is not at the standard addresses of 0x170
|
||||||
or 0x1f0, you'll need to explicitly inform the driver using a
|
or 0x1f0, you'll need to explicitly inform the driver using a
|
||||||
lilo option. See Documentation/ide.txt. (This feature was
|
lilo option. See Documentation/ide/ide.txt. (This feature was
|
||||||
added around kernel version 1.3.30.)
|
added around kernel version 1.3.30.)
|
||||||
|
|
||||||
- If the autoprobing is not finding your drive, you can tell the
|
- If the autoprobing is not finding your drive, you can tell the
|
||||||
|
@ -245,7 +245,7 @@ a. Drive is not detected during booting.
|
||||||
Support for some interfaces needing extra initialization is
|
Support for some interfaces needing extra initialization is
|
||||||
provided in later 1.3.x kernels. You may need to turn on
|
provided in later 1.3.x kernels. You may need to turn on
|
||||||
additional kernel configuration options to get them to work;
|
additional kernel configuration options to get them to work;
|
||||||
see Documentation/ide.txt.
|
see Documentation/ide/ide.txt.
|
||||||
|
|
||||||
Even if support is not available for your interface, you may be
|
Even if support is not available for your interface, you may be
|
||||||
able to get it to work with the following procedure. First boot
|
able to get it to work with the following procedure. First boot
|
||||||
|
@ -299,7 +299,7 @@ c. System hangups.
|
||||||
be worked around by specifying the `serialize' option when
|
be worked around by specifying the `serialize' option when
|
||||||
booting. Recent kernels should be able to detect the need for
|
booting. Recent kernels should be able to detect the need for
|
||||||
this automatically in most cases, but the detection is not
|
this automatically in most cases, but the detection is not
|
||||||
foolproof. See Documentation/ide.txt for more information
|
foolproof. See Documentation/ide/ide.txt for more information
|
||||||
about the `serialize' option and the CMD640B.
|
about the `serialize' option and the CMD640B.
|
||||||
|
|
||||||
- Note that many MS-DOS CDROM drivers will work with such buggy
|
- Note that many MS-DOS CDROM drivers will work with such buggy
|
||||||
|
|
|
@ -28,7 +28,7 @@ CONTENTS:
|
||||||
4. Questions
|
4. Questions
|
||||||
|
|
||||||
1. Control Groups
|
1. Control Groups
|
||||||
==========
|
=================
|
||||||
|
|
||||||
1.1 What are cgroups ?
|
1.1 What are cgroups ?
|
||||||
----------------------
|
----------------------
|
||||||
|
@ -143,10 +143,10 @@ proliferation of such cgroups.
|
||||||
|
|
||||||
Also lets say that the administrator would like to give enhanced network
|
Also lets say that the administrator would like to give enhanced network
|
||||||
access temporarily to a student's browser (since it is night and the user
|
access temporarily to a student's browser (since it is night and the user
|
||||||
wants to do online gaming :) OR give one of the students simulation
|
wants to do online gaming :)) OR give one of the students simulation
|
||||||
apps enhanced CPU power,
|
apps enhanced CPU power,
|
||||||
|
|
||||||
With ability to write pids directly to resource classes, its just a
|
With ability to write pids directly to resource classes, it's just a
|
||||||
matter of :
|
matter of :
|
||||||
|
|
||||||
# echo pid > /mnt/network/<new_class>/tasks
|
# echo pid > /mnt/network/<new_class>/tasks
|
||||||
|
@ -227,10 +227,13 @@ Each cgroup is represented by a directory in the cgroup file system
|
||||||
containing the following files describing that cgroup:
|
containing the following files describing that cgroup:
|
||||||
|
|
||||||
- tasks: list of tasks (by pid) attached to that cgroup
|
- tasks: list of tasks (by pid) attached to that cgroup
|
||||||
- notify_on_release flag: run /sbin/cgroup_release_agent on exit?
|
- releasable flag: cgroup currently removeable?
|
||||||
|
- notify_on_release flag: run the release agent on exit?
|
||||||
|
- release_agent: the path to use for release notifications (this file
|
||||||
|
exists in the top cgroup only)
|
||||||
|
|
||||||
Other subsystems such as cpusets may add additional files in each
|
Other subsystems such as cpusets may add additional files in each
|
||||||
cgroup dir
|
cgroup dir.
|
||||||
|
|
||||||
New cgroups are created using the mkdir system call or shell
|
New cgroups are created using the mkdir system call or shell
|
||||||
command. The properties of a cgroup, such as its flags, are
|
command. The properties of a cgroup, such as its flags, are
|
||||||
|
@ -257,7 +260,7 @@ performance.
|
||||||
To allow access from a cgroup to the css_sets (and hence tasks)
|
To allow access from a cgroup to the css_sets (and hence tasks)
|
||||||
that comprise it, a set of cg_cgroup_link objects form a lattice;
|
that comprise it, a set of cg_cgroup_link objects form a lattice;
|
||||||
each cg_cgroup_link is linked into a list of cg_cgroup_links for
|
each cg_cgroup_link is linked into a list of cg_cgroup_links for
|
||||||
a single cgroup on its cont_link_list field, and a list of
|
a single cgroup on its cgrp_link_list field, and a list of
|
||||||
cg_cgroup_links for a single css_set on its cg_link_list.
|
cg_cgroup_links for a single css_set on its cg_link_list.
|
||||||
|
|
||||||
Thus the set of tasks in a cgroup can be listed by iterating over
|
Thus the set of tasks in a cgroup can be listed by iterating over
|
||||||
|
@ -271,9 +274,6 @@ for cgroups, with a minimum of additional kernel code.
|
||||||
1.4 What does notify_on_release do ?
|
1.4 What does notify_on_release do ?
|
||||||
------------------------------------
|
------------------------------------
|
||||||
|
|
||||||
*** notify_on_release is disabled in the current patch set. It will be
|
|
||||||
*** reactivated in a future patch in a less-intrusive manner
|
|
||||||
|
|
||||||
If the notify_on_release flag is enabled (1) in a cgroup, then
|
If the notify_on_release flag is enabled (1) in a cgroup, then
|
||||||
whenever the last task in the cgroup leaves (exits or attaches to
|
whenever the last task in the cgroup leaves (exits or attaches to
|
||||||
some other cgroup) and the last child cgroup of that cgroup
|
some other cgroup) and the last child cgroup of that cgroup
|
||||||
|
@ -360,8 +360,8 @@ Now you want to do something with this cgroup.
|
||||||
|
|
||||||
In this directory you can find several files:
|
In this directory you can find several files:
|
||||||
# ls
|
# ls
|
||||||
notify_on_release release_agent tasks
|
notify_on_release releasable tasks
|
||||||
(plus whatever files are added by the attached subsystems)
|
(plus whatever files added by the attached subsystems)
|
||||||
|
|
||||||
Now attach your shell to this cgroup:
|
Now attach your shell to this cgroup:
|
||||||
# /bin/echo $$ > tasks
|
# /bin/echo $$ > tasks
|
||||||
|
@ -404,19 +404,13 @@ with a subsystem id which will be assigned by the cgroup system.
|
||||||
Other fields in the cgroup_subsys object include:
|
Other fields in the cgroup_subsys object include:
|
||||||
|
|
||||||
- subsys_id: a unique array index for the subsystem, indicating which
|
- subsys_id: a unique array index for the subsystem, indicating which
|
||||||
entry in cgroup->subsys[] this subsystem should be
|
entry in cgroup->subsys[] this subsystem should be managing.
|
||||||
managing. Initialized by cgroup_register_subsys(); prior to this
|
|
||||||
it should be initialized to -1
|
|
||||||
|
|
||||||
- hierarchy: an index indicating which hierarchy, if any, this
|
- name: should be initialized to a unique subsystem name. Should be
|
||||||
subsystem is currently attached to. If this is -1, then the
|
no longer than MAX_CGROUP_TYPE_NAMELEN.
|
||||||
subsystem is not attached to any hierarchy, and all tasks should be
|
|
||||||
considered to be members of the subsystem's top_cgroup. It should
|
|
||||||
be initialized to -1.
|
|
||||||
|
|
||||||
- name: should be initialized to a unique subsystem name prior to
|
- early_init: indicate if the subsystem needs early initialization
|
||||||
calling cgroup_register_subsystem. Should be no longer than
|
at system boot.
|
||||||
MAX_CGROUP_TYPE_NAMELEN
|
|
||||||
|
|
||||||
Each cgroup object created by the system has an array of pointers,
|
Each cgroup object created by the system has an array of pointers,
|
||||||
indexed by subsystem id; this pointer is entirely managed by the
|
indexed by subsystem id; this pointer is entirely managed by the
|
||||||
|
@ -434,8 +428,6 @@ situation.
|
||||||
See kernel/cgroup.c for more details.
|
See kernel/cgroup.c for more details.
|
||||||
|
|
||||||
Subsystems can take/release the cgroup_mutex via the functions
|
Subsystems can take/release the cgroup_mutex via the functions
|
||||||
cgroup_lock()/cgroup_unlock(), and can
|
|
||||||
take/release the callback_mutex via the functions
|
|
||||||
cgroup_lock()/cgroup_unlock().
|
cgroup_lock()/cgroup_unlock().
|
||||||
|
|
||||||
Accessing a task's cgroup pointer may be done in the following ways:
|
Accessing a task's cgroup pointer may be done in the following ways:
|
||||||
|
@ -444,7 +436,7 @@ Accessing a task's cgroup pointer may be done in the following ways:
|
||||||
- inside an rcu_read_lock() section via rcu_dereference()
|
- inside an rcu_read_lock() section via rcu_dereference()
|
||||||
|
|
||||||
3.3 Subsystem API
|
3.3 Subsystem API
|
||||||
--------------------------
|
-----------------
|
||||||
|
|
||||||
Each subsystem should:
|
Each subsystem should:
|
||||||
|
|
||||||
|
@ -455,7 +447,8 @@ Each subsystem may export the following methods. The only mandatory
|
||||||
methods are create/destroy. Any others that are null are presumed to
|
methods are create/destroy. Any others that are null are presumed to
|
||||||
be successful no-ops.
|
be successful no-ops.
|
||||||
|
|
||||||
struct cgroup_subsys_state *create(struct cgroup *cont)
|
struct cgroup_subsys_state *create(struct cgroup_subsys *ss,
|
||||||
|
struct cgroup *cgrp)
|
||||||
(cgroup_mutex held by caller)
|
(cgroup_mutex held by caller)
|
||||||
|
|
||||||
Called to create a subsystem state object for a cgroup. The
|
Called to create a subsystem state object for a cgroup. The
|
||||||
|
@ -470,7 +463,7 @@ identified by the passed cgroup object having a NULL parent (since
|
||||||
it's the root of the hierarchy) and may be an appropriate place for
|
it's the root of the hierarchy) and may be an appropriate place for
|
||||||
initialization code.
|
initialization code.
|
||||||
|
|
||||||
void destroy(struct cgroup *cont)
|
void destroy(struct cgroup_subsys *ss, struct cgroup *cgrp)
|
||||||
(cgroup_mutex held by caller)
|
(cgroup_mutex held by caller)
|
||||||
|
|
||||||
The cgroup system is about to destroy the passed cgroup; the subsystem
|
The cgroup system is about to destroy the passed cgroup; the subsystem
|
||||||
|
@ -481,7 +474,14 @@ cgroup->parent is still valid. (Note - can also be called for a
|
||||||
newly-created cgroup if an error occurs after this subsystem's
|
newly-created cgroup if an error occurs after this subsystem's
|
||||||
create() method has been called for the new cgroup).
|
create() method has been called for the new cgroup).
|
||||||
|
|
||||||
int can_attach(struct cgroup_subsys *ss, struct cgroup *cont,
|
void pre_destroy(struct cgroup_subsys *ss, struct cgroup *cgrp);
|
||||||
|
(cgroup_mutex held by caller)
|
||||||
|
|
||||||
|
Called before checking the reference count on each subsystem. This may
|
||||||
|
be useful for subsystems which have some extra references even if
|
||||||
|
there are not tasks in the cgroup.
|
||||||
|
|
||||||
|
int can_attach(struct cgroup_subsys *ss, struct cgroup *cgrp,
|
||||||
struct task_struct *task)
|
struct task_struct *task)
|
||||||
(cgroup_mutex held by caller)
|
(cgroup_mutex held by caller)
|
||||||
|
|
||||||
|
@ -492,8 +492,8 @@ unspecified task can be moved into the cgroup. Note that this isn't
|
||||||
called on a fork. If this method returns 0 (success) then this should
|
called on a fork. If this method returns 0 (success) then this should
|
||||||
remain valid while the caller holds cgroup_mutex.
|
remain valid while the caller holds cgroup_mutex.
|
||||||
|
|
||||||
void attach(struct cgroup_subsys *ss, struct cgroup *cont,
|
void attach(struct cgroup_subsys *ss, struct cgroup *cgrp,
|
||||||
struct cgroup *old_cont, struct task_struct *task)
|
struct cgroup *old_cgrp, struct task_struct *task)
|
||||||
|
|
||||||
Called after the task has been attached to the cgroup, to allow any
|
Called after the task has been attached to the cgroup, to allow any
|
||||||
post-attachment activity that requires memory allocations or blocking.
|
post-attachment activity that requires memory allocations or blocking.
|
||||||
|
@ -505,9 +505,9 @@ registration for all existing tasks.
|
||||||
|
|
||||||
void exit(struct cgroup_subsys *ss, struct task_struct *task)
|
void exit(struct cgroup_subsys *ss, struct task_struct *task)
|
||||||
|
|
||||||
Called during task exit
|
Called during task exit.
|
||||||
|
|
||||||
int populate(struct cgroup_subsys *ss, struct cgroup *cont)
|
int populate(struct cgroup_subsys *ss, struct cgroup *cgrp)
|
||||||
|
|
||||||
Called after creation of a cgroup to allow a subsystem to populate
|
Called after creation of a cgroup to allow a subsystem to populate
|
||||||
the cgroup directory with file entries. The subsystem should make
|
the cgroup directory with file entries. The subsystem should make
|
||||||
|
@ -516,7 +516,7 @@ include/linux/cgroup.h for details). Note that although this
|
||||||
method can return an error code, the error code is currently not
|
method can return an error code, the error code is currently not
|
||||||
always handled well.
|
always handled well.
|
||||||
|
|
||||||
void post_clone(struct cgroup_subsys *ss, struct cgroup *cont)
|
void post_clone(struct cgroup_subsys *ss, struct cgroup *cgrp)
|
||||||
|
|
||||||
Called at the end of cgroup_clone() to do any paramater
|
Called at the end of cgroup_clone() to do any paramater
|
||||||
initialization which might be required before a task could attach. For
|
initialization which might be required before a task could attach. For
|
||||||
|
|
|
@ -43,7 +43,7 @@ would execute while the cli()-ed section is executing.
|
||||||
|
|
||||||
but from now on a more direct method of locking has to be used:
|
but from now on a more direct method of locking has to be used:
|
||||||
|
|
||||||
spinlock_t driver_lock = SPIN_LOCK_UNLOCKED;
|
DEFINE_SPINLOCK(driver_lock);
|
||||||
struct driver_data;
|
struct driver_data;
|
||||||
|
|
||||||
irq_handler (...)
|
irq_handler (...)
|
||||||
|
|
|
@ -1,4 +1,8 @@
|
||||||
Memory Controller
|
Memory Resource Controller
|
||||||
|
|
||||||
|
NOTE: The Memory Resource Controller has been generically been referred
|
||||||
|
to as the memory controller in this document. Do not confuse memory controller
|
||||||
|
used here with the memory controller that is used in hardware.
|
||||||
|
|
||||||
Salient features
|
Salient features
|
||||||
|
|
||||||
|
@ -152,7 +156,7 @@ The memory controller uses the following hierarchy
|
||||||
|
|
||||||
a. Enable CONFIG_CGROUPS
|
a. Enable CONFIG_CGROUPS
|
||||||
b. Enable CONFIG_RESOURCE_COUNTERS
|
b. Enable CONFIG_RESOURCE_COUNTERS
|
||||||
c. Enable CONFIG_CGROUP_MEM_CONT
|
c. Enable CONFIG_CGROUP_MEM_RES_CTLR
|
||||||
|
|
||||||
1. Prepare the cgroups
|
1. Prepare the cgroups
|
||||||
# mkdir -p /cgroups
|
# mkdir -p /cgroups
|
||||||
|
@ -164,20 +168,20 @@ c. Enable CONFIG_CGROUP_MEM_CONT
|
||||||
|
|
||||||
Since now we're in the 0 cgroup,
|
Since now we're in the 0 cgroup,
|
||||||
We can alter the memory limit:
|
We can alter the memory limit:
|
||||||
# echo -n 4M > /cgroups/0/memory.limit_in_bytes
|
# echo 4M > /cgroups/0/memory.limit_in_bytes
|
||||||
|
|
||||||
NOTE: We can use a suffix (k, K, m, M, g or G) to indicate values in kilo,
|
NOTE: We can use a suffix (k, K, m, M, g or G) to indicate values in kilo,
|
||||||
mega or gigabytes.
|
mega or gigabytes.
|
||||||
|
|
||||||
# cat /cgroups/0/memory.limit_in_bytes
|
# cat /cgroups/0/memory.limit_in_bytes
|
||||||
4194304 Bytes
|
4194304
|
||||||
|
|
||||||
NOTE: The interface has now changed to display the usage in bytes
|
NOTE: The interface has now changed to display the usage in bytes
|
||||||
instead of pages
|
instead of pages
|
||||||
|
|
||||||
We can check the usage:
|
We can check the usage:
|
||||||
# cat /cgroups/0/memory.usage_in_bytes
|
# cat /cgroups/0/memory.usage_in_bytes
|
||||||
1216512 Bytes
|
1216512
|
||||||
|
|
||||||
A successful write to this file does not guarantee a successful set of
|
A successful write to this file does not guarantee a successful set of
|
||||||
this limit to the value written into the file. This can be due to a
|
this limit to the value written into the file. This can be due to a
|
||||||
|
@ -185,9 +189,9 @@ number of factors, such as rounding up to page boundaries or the total
|
||||||
availability of memory on the system. The user is required to re-read
|
availability of memory on the system. The user is required to re-read
|
||||||
this file after a write to guarantee the value committed by the kernel.
|
this file after a write to guarantee the value committed by the kernel.
|
||||||
|
|
||||||
# echo -n 1 > memory.limit_in_bytes
|
# echo 1 > memory.limit_in_bytes
|
||||||
# cat memory.limit_in_bytes
|
# cat memory.limit_in_bytes
|
||||||
4096 Bytes
|
4096
|
||||||
|
|
||||||
The memory.failcnt field gives the number of times that the cgroup limit was
|
The memory.failcnt field gives the number of times that the cgroup limit was
|
||||||
exceeded.
|
exceeded.
|
||||||
|
@ -197,7 +201,7 @@ caches, RSS and Active pages/Inactive pages are shown.
|
||||||
|
|
||||||
The memory.force_empty gives an interface to drop *all* charges by force.
|
The memory.force_empty gives an interface to drop *all* charges by force.
|
||||||
|
|
||||||
# echo -n 1 > memory.force_empty
|
# echo 1 > memory.force_empty
|
||||||
|
|
||||||
will drop all charges in cgroup. Currently, this is maintained for test.
|
will drop all charges in cgroup. Currently, this is maintained for test.
|
||||||
|
|
||||||
|
@ -233,13 +237,6 @@ cgroup might have some charge associated with it, even though all
|
||||||
tasks have migrated away from it. Such charges are automatically dropped at
|
tasks have migrated away from it. Such charges are automatically dropped at
|
||||||
rmdir() if there are no tasks.
|
rmdir() if there are no tasks.
|
||||||
|
|
||||||
4.4 Choosing what to account -- Page Cache (unmapped) vs RSS (mapped)?
|
|
||||||
|
|
||||||
The type of memory accounted by the cgroup can be limited to just
|
|
||||||
mapped pages by writing "1" to memory.control_type field
|
|
||||||
|
|
||||||
echo -n 1 > memory.control_type
|
|
||||||
|
|
||||||
5. TODO
|
5. TODO
|
||||||
|
|
||||||
1. Add support for accounting huge pages (as a separate controller)
|
1. Add support for accounting huge pages (as a separate controller)
|
||||||
|
@ -262,18 +259,19 @@ References
|
||||||
3. Emelianov, Pavel. Resource controllers based on process cgroups
|
3. Emelianov, Pavel. Resource controllers based on process cgroups
|
||||||
http://lkml.org/lkml/2007/3/6/198
|
http://lkml.org/lkml/2007/3/6/198
|
||||||
4. Emelianov, Pavel. RSS controller based on process cgroups (v2)
|
4. Emelianov, Pavel. RSS controller based on process cgroups (v2)
|
||||||
http://lkml.org/lkml/2007/4/9/74
|
http://lkml.org/lkml/2007/4/9/78
|
||||||
5. Emelianov, Pavel. RSS controller based on process cgroups (v3)
|
5. Emelianov, Pavel. RSS controller based on process cgroups (v3)
|
||||||
http://lkml.org/lkml/2007/5/30/244
|
http://lkml.org/lkml/2007/5/30/244
|
||||||
6. Menage, Paul. Control Groups v10, http://lwn.net/Articles/236032/
|
6. Menage, Paul. Control Groups v10, http://lwn.net/Articles/236032/
|
||||||
7. Vaidyanathan, Srinivasan, Control Groups: Pagecache accounting and control
|
7. Vaidyanathan, Srinivasan, Control Groups: Pagecache accounting and control
|
||||||
subsystem (v3), http://lwn.net/Articles/235534/
|
subsystem (v3), http://lwn.net/Articles/235534/
|
||||||
8. Singh, Balbir. RSS controller V2 test results (lmbench),
|
8. Singh, Balbir. RSS controller v2 test results (lmbench),
|
||||||
http://lkml.org/lkml/2007/5/17/232
|
http://lkml.org/lkml/2007/5/17/232
|
||||||
9. Singh, Balbir. RSS controller V2 AIM9 results
|
9. Singh, Balbir. RSS controller v2 AIM9 results
|
||||||
http://lkml.org/lkml/2007/5/18/1
|
http://lkml.org/lkml/2007/5/18/1
|
||||||
10. Singh, Balbir. Memory controller v6 results,
|
10. Singh, Balbir. Memory controller v6 test results,
|
||||||
http://lkml.org/lkml/2007/8/19/36
|
http://lkml.org/lkml/2007/8/19/36
|
||||||
11. Singh, Balbir. Memory controller v6, http://lkml.org/lkml/2007/8/17/69
|
11. Singh, Balbir. Memory controller introduction (v6),
|
||||||
|
http://lkml.org/lkml/2007/8/17/69
|
||||||
12. Corbet, Jonathan, Controlling memory use in cgroups,
|
12. Corbet, Jonathan, Controlling memory use in cgroups,
|
||||||
http://lwn.net/Articles/243795/
|
http://lwn.net/Articles/243795/
|
||||||
|
|
|
@ -8,6 +8,7 @@ Portions Copyright (c) 2004-2006 Silicon Graphics, Inc.
|
||||||
Modified by Paul Jackson <pj@sgi.com>
|
Modified by Paul Jackson <pj@sgi.com>
|
||||||
Modified by Christoph Lameter <clameter@sgi.com>
|
Modified by Christoph Lameter <clameter@sgi.com>
|
||||||
Modified by Paul Menage <menage@google.com>
|
Modified by Paul Menage <menage@google.com>
|
||||||
|
Modified by Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
|
||||||
|
|
||||||
CONTENTS:
|
CONTENTS:
|
||||||
=========
|
=========
|
||||||
|
@ -20,7 +21,8 @@ CONTENTS:
|
||||||
1.5 What is memory_pressure ?
|
1.5 What is memory_pressure ?
|
||||||
1.6 What is memory spread ?
|
1.6 What is memory spread ?
|
||||||
1.7 What is sched_load_balance ?
|
1.7 What is sched_load_balance ?
|
||||||
1.8 How do I use cpusets ?
|
1.8 What is sched_relax_domain_level ?
|
||||||
|
1.9 How do I use cpusets ?
|
||||||
2. Usage Examples and Syntax
|
2. Usage Examples and Syntax
|
||||||
2.1 Basic Usage
|
2.1 Basic Usage
|
||||||
2.2 Adding/removing cpus
|
2.2 Adding/removing cpus
|
||||||
|
@ -209,7 +211,7 @@ and name space for cpusets, with a minimum of additional kernel code.
|
||||||
The cpus and mems files in the root (top_cpuset) cpuset are
|
The cpus and mems files in the root (top_cpuset) cpuset are
|
||||||
read-only. The cpus file automatically tracks the value of
|
read-only. The cpus file automatically tracks the value of
|
||||||
cpu_online_map using a CPU hotplug notifier, and the mems file
|
cpu_online_map using a CPU hotplug notifier, and the mems file
|
||||||
automatically tracks the value of node_states[N_MEMORY]--i.e.,
|
automatically tracks the value of node_states[N_HIGH_MEMORY]--i.e.,
|
||||||
nodes with memory--using the cpuset_track_online_nodes() hook.
|
nodes with memory--using the cpuset_track_online_nodes() hook.
|
||||||
|
|
||||||
|
|
||||||
|
@ -497,7 +499,73 @@ the cpuset code to update these sched domains, it compares the new
|
||||||
partition requested with the current, and updates its sched domains,
|
partition requested with the current, and updates its sched domains,
|
||||||
removing the old and adding the new, for each change.
|
removing the old and adding the new, for each change.
|
||||||
|
|
||||||
1.8 How do I use cpusets ?
|
|
||||||
|
1.8 What is sched_relax_domain_level ?
|
||||||
|
--------------------------------------
|
||||||
|
|
||||||
|
In sched domain, the scheduler migrates tasks in 2 ways; periodic load
|
||||||
|
balance on tick, and at time of some schedule events.
|
||||||
|
|
||||||
|
When a task is woken up, scheduler try to move the task on idle CPU.
|
||||||
|
For example, if a task A running on CPU X activates another task B
|
||||||
|
on the same CPU X, and if CPU Y is X's sibling and performing idle,
|
||||||
|
then scheduler migrate task B to CPU Y so that task B can start on
|
||||||
|
CPU Y without waiting task A on CPU X.
|
||||||
|
|
||||||
|
And if a CPU run out of tasks in its runqueue, the CPU try to pull
|
||||||
|
extra tasks from other busy CPUs to help them before it is going to
|
||||||
|
be idle.
|
||||||
|
|
||||||
|
Of course it takes some searching cost to find movable tasks and/or
|
||||||
|
idle CPUs, the scheduler might not search all CPUs in the domain
|
||||||
|
everytime. In fact, in some architectures, the searching ranges on
|
||||||
|
events are limited in the same socket or node where the CPU locates,
|
||||||
|
while the load balance on tick searchs all.
|
||||||
|
|
||||||
|
For example, assume CPU Z is relatively far from CPU X. Even if CPU Z
|
||||||
|
is idle while CPU X and the siblings are busy, scheduler can't migrate
|
||||||
|
woken task B from X to Z since it is out of its searching range.
|
||||||
|
As the result, task B on CPU X need to wait task A or wait load balance
|
||||||
|
on the next tick. For some applications in special situation, waiting
|
||||||
|
1 tick may be too long.
|
||||||
|
|
||||||
|
The 'sched_relax_domain_level' file allows you to request changing
|
||||||
|
this searching range as you like. This file takes int value which
|
||||||
|
indicates size of searching range in levels ideally as follows,
|
||||||
|
otherwise initial value -1 that indicates the cpuset has no request.
|
||||||
|
|
||||||
|
-1 : no request. use system default or follow request of others.
|
||||||
|
0 : no search.
|
||||||
|
1 : search siblings (hyperthreads in a core).
|
||||||
|
2 : search cores in a package.
|
||||||
|
3 : search cpus in a node [= system wide on non-NUMA system]
|
||||||
|
( 4 : search nodes in a chunk of node [on NUMA system] )
|
||||||
|
( 5~ : search system wide [on NUMA system])
|
||||||
|
|
||||||
|
This file is per-cpuset and affect the sched domain where the cpuset
|
||||||
|
belongs to. Therefore if the flag 'sched_load_balance' of a cpuset
|
||||||
|
is disabled, then 'sched_relax_domain_level' have no effect since
|
||||||
|
there is no sched domain belonging the cpuset.
|
||||||
|
|
||||||
|
If multiple cpusets are overlapping and hence they form a single sched
|
||||||
|
domain, the largest value among those is used. Be careful, if one
|
||||||
|
requests 0 and others are -1 then 0 is used.
|
||||||
|
|
||||||
|
Note that modifying this file will have both good and bad effects,
|
||||||
|
and whether it is acceptable or not will be depend on your situation.
|
||||||
|
Don't modify this file if you are not sure.
|
||||||
|
|
||||||
|
If your situation is:
|
||||||
|
- The migration costs between each cpu can be assumed considerably
|
||||||
|
small(for you) due to your special application's behavior or
|
||||||
|
special hardware support for CPU cache etc.
|
||||||
|
- The searching cost doesn't have impact(for you) or you can make
|
||||||
|
the searching cost enough small by managing cpuset to compact etc.
|
||||||
|
- The latency is required even it sacrifices cache hit rate etc.
|
||||||
|
then increasing 'sched_relax_domain_level' would benefit you.
|
||||||
|
|
||||||
|
|
||||||
|
1.9 How do I use cpusets ?
|
||||||
--------------------------
|
--------------------------
|
||||||
|
|
||||||
In order to minimize the impact of cpusets on critical kernel
|
In order to minimize the impact of cpusets on critical kernel
|
||||||
|
|
|
@ -36,19 +36,24 @@ available (notebooks) or too slow for extensive debug information (like ACPI).
|
||||||
Drivers
|
Drivers
|
||||||
-------
|
-------
|
||||||
|
|
||||||
The OHCI-1394 drivers in drivers/firewire and drivers/ieee1394 initialize
|
The ohci1394 driver in drivers/ieee1394 initializes the OHCI-1394 controllers
|
||||||
the OHCI-1394 controllers to a working state and can be used to enable
|
to a working state and enables physical DMA by default for all remote nodes.
|
||||||
physical DMA. By default you only have to load the driver, and physical
|
This can be turned off by ohci1394's module parameter phys_dma=0.
|
||||||
DMA access will be granted to all remote nodes, but it can be turned off
|
|
||||||
when using the ohci1394 driver.
|
|
||||||
|
|
||||||
Because these drivers depend on the PCI enumeration to be completed, an
|
The alternative firewire-ohci driver in drivers/firewire uses filtered physical
|
||||||
initialization routine which can runs pretty early (long before console_init(),
|
DMA by default, which is more secure but not suitable for remote debugging.
|
||||||
which makes the printk buffer appear on the console can be called) was written.
|
Compile the driver with CONFIG_FIREWIRE_OHCI_REMOTE_DMA (Kernel hacking menu:
|
||||||
|
Remote debugging over FireWire with firewire-ohci) to get unfiltered physical
|
||||||
|
DMA.
|
||||||
|
|
||||||
|
Because ohci1394 and firewire-ohci depend on the PCI enumeration to be
|
||||||
|
completed, an initialization routine which runs pretty early has been
|
||||||
|
implemented for x86. This routine runs long before console_init() can be
|
||||||
|
called, i.e. before the printk buffer appears on the console.
|
||||||
|
|
||||||
To activate it, enable CONFIG_PROVIDE_OHCI1394_DMA_INIT (Kernel hacking menu:
|
To activate it, enable CONFIG_PROVIDE_OHCI1394_DMA_INIT (Kernel hacking menu:
|
||||||
Provide code for enabling DMA over FireWire early on boot) and pass the
|
Remote debugging over FireWire early on boot) and pass the parameter
|
||||||
parameter "ohci1394_dma=early" to the recompiled kernel on boot.
|
"ohci1394_dma=early" to the recompiled kernel on boot.
|
||||||
|
|
||||||
Tools
|
Tools
|
||||||
-----
|
-----
|
||||||
|
|
|
@ -47,7 +47,6 @@
|
||||||
.mm
|
.mm
|
||||||
53c700_d.h
|
53c700_d.h
|
||||||
53c8xx_d.h*
|
53c8xx_d.h*
|
||||||
BitKeeper
|
|
||||||
COPYING
|
COPYING
|
||||||
CREDITS
|
CREDITS
|
||||||
CVS
|
CVS
|
||||||
|
|
|
@ -89,8 +89,8 @@ the 2.7 era (it missed the boat for 2.5).
|
||||||
You can obtain somewhat infrequent snapshots of klibc from
|
You can obtain somewhat infrequent snapshots of klibc from
|
||||||
ftp://ftp.kernel.org/pub/linux/libs/klibc/
|
ftp://ftp.kernel.org/pub/linux/libs/klibc/
|
||||||
|
|
||||||
For active users, you are better off using the klibc BitKeeper
|
For active users, you are better off using the klibc git
|
||||||
repositories, at http://klibc.bkbits.net/
|
repository, at http://git.kernel.org/?p=libs/klibc/klibc.git
|
||||||
|
|
||||||
The standalone klibc distribution currently provides three components,
|
The standalone klibc distribution currently provides three components,
|
||||||
in addition to the klibc library:
|
in addition to the klibc library:
|
||||||
|
|
|
@ -0,0 +1,53 @@
|
||||||
|
Understanding fbdev's cmap
|
||||||
|
--------------------------
|
||||||
|
|
||||||
|
These notes explain how X's dix layer uses fbdev's cmap structures.
|
||||||
|
|
||||||
|
*. example of relevant structures in fbdev as used for a 3-bit grayscale cmap
|
||||||
|
struct fb_var_screeninfo {
|
||||||
|
.bits_per_pixel = 8,
|
||||||
|
.grayscale = 1,
|
||||||
|
.red = { 4, 3, 0 },
|
||||||
|
.green = { 0, 0, 0 },
|
||||||
|
.blue = { 0, 0, 0 },
|
||||||
|
}
|
||||||
|
struct fb_fix_screeninfo {
|
||||||
|
.visual = FB_VISUAL_STATIC_PSEUDOCOLOR,
|
||||||
|
}
|
||||||
|
for (i = 0; i < 8; i++)
|
||||||
|
info->cmap.red[i] = (((2*i)+1)*(0xFFFF))/16;
|
||||||
|
memcpy(info->cmap.green, info->cmap.red, sizeof(u16)*8);
|
||||||
|
memcpy(info->cmap.blue, info->cmap.red, sizeof(u16)*8);
|
||||||
|
|
||||||
|
*. X11 apps do something like the following when trying to use grayscale.
|
||||||
|
for (i=0; i < 8; i++) {
|
||||||
|
char colorspec[64];
|
||||||
|
memset(colorspec,0,64);
|
||||||
|
sprintf(colorspec, "rgb:%x/%x/%x", i*36,i*36,i*36);
|
||||||
|
if (!XParseColor(outputDisplay, testColormap, colorspec, &wantedColor))
|
||||||
|
printf("Can't get color %s\n",colorspec);
|
||||||
|
XAllocColor(outputDisplay, testColormap, &wantedColor);
|
||||||
|
grays[i] = wantedColor;
|
||||||
|
}
|
||||||
|
There's also named equivalents like gray1..x provided you have an rgb.txt.
|
||||||
|
|
||||||
|
Somewhere in X's callchain, this results in a call to X code that handles the
|
||||||
|
colormap. For example, Xfbdev hits the following:
|
||||||
|
|
||||||
|
xc-011010/programs/Xserver/dix/colormap.c:
|
||||||
|
|
||||||
|
FindBestPixel(pentFirst, size, prgb, channel)
|
||||||
|
|
||||||
|
dr = (long) pent->co.local.red - prgb->red;
|
||||||
|
dg = (long) pent->co.local.green - prgb->green;
|
||||||
|
db = (long) pent->co.local.blue - prgb->blue;
|
||||||
|
sq = dr * dr;
|
||||||
|
UnsignedToBigNum (sq, &sum);
|
||||||
|
BigNumAdd (&sum, &temp, &sum);
|
||||||
|
|
||||||
|
co.local.red are entries that were brought in through FBIOGETCMAP which come
|
||||||
|
directly from the info->cmap.red that was listed above. The prgb is the rgb
|
||||||
|
that the app wants to match to. The above code is doing what looks like a least
|
||||||
|
squares matching function. That's why the cmap entries can't be set to the left
|
||||||
|
hand side boundaries of a color range.
|
||||||
|
|
|
@ -0,0 +1,38 @@
|
||||||
|
Metronomefb
|
||||||
|
-----------
|
||||||
|
Maintained by Jaya Kumar <jayakumar.lkml.gmail.com>
|
||||||
|
Last revised: Nov 20, 2007
|
||||||
|
|
||||||
|
Metronomefb is a driver for the Metronome display controller. The controller
|
||||||
|
is from E-Ink Corporation. It is intended to be used to drive the E-Ink
|
||||||
|
Vizplex display media. E-Ink hosts some details of this controller and the
|
||||||
|
display media here http://www.e-ink.com/products/matrix/metronome.html .
|
||||||
|
|
||||||
|
Metronome is interfaced to the host CPU through the AMLCD interface. The
|
||||||
|
host CPU generates the control information and the image in a framebuffer
|
||||||
|
which is then delivered to the AMLCD interface by a host specific method.
|
||||||
|
Currently, that's implemented for the PXA's LCDC controller. The display and
|
||||||
|
error status are each pulled through individual GPIOs.
|
||||||
|
|
||||||
|
Metronomefb was written for the PXA255/gumstix/lyre combination and
|
||||||
|
therefore currently has board set specific code in it. If other boards based on
|
||||||
|
other architectures are available, then the host specific code can be separated
|
||||||
|
and abstracted out.
|
||||||
|
|
||||||
|
Metronomefb requires waveform information which is delivered via the AMLCD
|
||||||
|
interface to the metronome controller. The waveform information is expected to
|
||||||
|
be delivered from userspace via the firmware class interface. The waveform file
|
||||||
|
can be compressed as long as your udev or hotplug script is aware of the need
|
||||||
|
to uncompress it before delivering it. metronomefb will ask for waveform.wbf
|
||||||
|
which would typically go into /lib/firmware/waveform.wbf depending on your
|
||||||
|
udev/hotplug setup. I have only tested with a single waveform file which was
|
||||||
|
originally labeled 23P01201_60_WT0107_MTC. I do not know what it stands for.
|
||||||
|
Caution should be exercised when manipulating the waveform as there may be
|
||||||
|
a possibility that it could have some permanent effects on the display media.
|
||||||
|
I neither have access to nor know exactly what the waveform does in terms of
|
||||||
|
the physical media.
|
||||||
|
|
||||||
|
Metronomefb uses the deferred IO interface so that it can provide a memory
|
||||||
|
mappable frame buffer. It has been tested with tinyx (Xfbdev). It is known
|
||||||
|
to work at this time with xeyes, xclock, xloadimage, xpdf.
|
||||||
|
|
|
@ -203,16 +203,8 @@ Who: linuxppc-dev@ozlabs.org
|
||||||
|
|
||||||
---------------------------
|
---------------------------
|
||||||
|
|
||||||
What: sk98lin network driver
|
|
||||||
When: Feburary 2008
|
|
||||||
Why: In kernel tree version of driver is unmaintained. Sk98lin driver
|
|
||||||
replaced by the skge driver.
|
|
||||||
Who: Stephen Hemminger <shemminger@linux-foundation.org>
|
|
||||||
|
|
||||||
---------------------------
|
|
||||||
|
|
||||||
What: i386/x86_64 bzImage symlinks
|
What: i386/x86_64 bzImage symlinks
|
||||||
When: April 2008
|
When: April 2010
|
||||||
|
|
||||||
Why: The i386/x86_64 merge provides a symlink to the old bzImage
|
Why: The i386/x86_64 merge provides a symlink to the old bzImage
|
||||||
location so not yet updated user space tools, e.g. package
|
location so not yet updated user space tools, e.g. package
|
||||||
|
@ -221,8 +213,6 @@ Who: Thomas Gleixner <tglx@linutronix.de>
|
||||||
|
|
||||||
---------------------------
|
---------------------------
|
||||||
|
|
||||||
---------------------------
|
|
||||||
|
|
||||||
What: i2c-i810, i2c-prosavage and i2c-savage4
|
What: i2c-i810, i2c-prosavage and i2c-savage4
|
||||||
When: May 2008
|
When: May 2008
|
||||||
Why: These drivers are superseded by i810fb, intelfb and savagefb.
|
Why: These drivers are superseded by i810fb, intelfb and savagefb.
|
||||||
|
@ -230,33 +220,6 @@ Who: Jean Delvare <khali@linux-fr.org>
|
||||||
|
|
||||||
---------------------------
|
---------------------------
|
||||||
|
|
||||||
What: bcm43xx wireless network driver
|
|
||||||
When: 2.6.26
|
|
||||||
Files: drivers/net/wireless/bcm43xx
|
|
||||||
Why: This driver's functionality has been replaced by the
|
|
||||||
mac80211-based b43 and b43legacy drivers.
|
|
||||||
Who: John W. Linville <linville@tuxdriver.com>
|
|
||||||
|
|
||||||
---------------------------
|
|
||||||
|
|
||||||
What: ieee80211 softmac wireless networking component
|
|
||||||
When: 2.6.26 (or after removal of bcm43xx and port of zd1211rw to mac80211)
|
|
||||||
Files: net/ieee80211/softmac
|
|
||||||
Why: No in-kernel drivers will depend on it any longer.
|
|
||||||
Who: John W. Linville <linville@tuxdriver.com>
|
|
||||||
|
|
||||||
---------------------------
|
|
||||||
|
|
||||||
What: rc80211-simple rate control algorithm for mac80211
|
|
||||||
When: 2.6.26
|
|
||||||
Files: net/mac80211/rc80211-simple.c
|
|
||||||
Why: This algorithm was provided for reference but always exhibited bad
|
|
||||||
responsiveness and performance and has some serious flaws. It has been
|
|
||||||
replaced by rc80211-pid.
|
|
||||||
Who: Stefano Brivio <stefano.brivio@polimi.it>
|
|
||||||
|
|
||||||
---------------------------
|
|
||||||
|
|
||||||
What (Why):
|
What (Why):
|
||||||
- include/linux/netfilter_ipv4/ipt_TOS.h ipt_tos.h header files
|
- include/linux/netfilter_ipv4/ipt_TOS.h ipt_tos.h header files
|
||||||
(superseded by xt_TOS/xt_tos target & match)
|
(superseded by xt_TOS/xt_tos target & match)
|
||||||
|
@ -298,11 +261,37 @@ Who: Michael Buesch <mb@bu3sch.de>
|
||||||
|
|
||||||
---------------------------
|
---------------------------
|
||||||
|
|
||||||
What: Solaris/SunOS syscall and binary support on Sparc
|
What: init_mm export
|
||||||
When: 2.6.26
|
When: 2.6.26
|
||||||
Why: Largely unmaintained and almost entirely unused. File system
|
Why: Not used in-tree. The current out-of-tree users used it to
|
||||||
layering used to divert library and dynamic linker searches to
|
work around problems in the CPA code which should be resolved
|
||||||
/usr/gnemul is extremely buggy and unfixable. Making it work
|
by now. One usecase was described to provide verification code
|
||||||
is largely pointless as without a lot of work only the most
|
of the CPA operation. That's a good idea in general, but such
|
||||||
trivial of Solaris binaries can work with the emulation code.
|
code / infrastructure should be in the kernel and not in some
|
||||||
Who: David S. Miller <davem@davemloft.net>
|
out-of-tree driver.
|
||||||
|
Who: Thomas Gleixner <tglx@linutronix.de>
|
||||||
|
|
||||||
|
----------------------------
|
||||||
|
|
||||||
|
What: usedac i386 kernel parameter
|
||||||
|
When: 2.6.27
|
||||||
|
Why: replaced by allowdac and no dac combination
|
||||||
|
Who: Glauber Costa <gcosta@redhat.com>
|
||||||
|
|
||||||
|
---------------------------
|
||||||
|
|
||||||
|
What: /sys/o2cb symlink
|
||||||
|
When: January 2010
|
||||||
|
Why: /sys/fs/o2cb is the proper location for this information - /sys/o2cb
|
||||||
|
exists as a symlink for backwards compatibility for old versions of
|
||||||
|
ocfs2-tools. 2 years should be sufficient time to phase in new versions
|
||||||
|
which know to look in /sys/fs/o2cb.
|
||||||
|
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>
|
||||||
|
|
|
@ -66,6 +66,8 @@ mandatory-locking.txt
|
||||||
- info on the Linux implementation of Sys V mandatory file locking.
|
- info on the Linux implementation of Sys V mandatory file locking.
|
||||||
ncpfs.txt
|
ncpfs.txt
|
||||||
- info on Novell Netware(tm) filesystem using NCP protocol.
|
- info on Novell Netware(tm) filesystem using NCP protocol.
|
||||||
|
nfsroot.txt
|
||||||
|
- short guide on setting up a diskless box with NFS root filesystem.
|
||||||
ntfs.txt
|
ntfs.txt
|
||||||
- info and mount options for the NTFS filesystem (Windows NT).
|
- info and mount options for the NTFS filesystem (Windows NT).
|
||||||
ocfs2.txt
|
ocfs2.txt
|
||||||
|
@ -82,6 +84,10 @@ relay.txt
|
||||||
- info on relay, for efficient streaming from kernel to user space.
|
- info on relay, for efficient streaming from kernel to user space.
|
||||||
romfs.txt
|
romfs.txt
|
||||||
- description of the ROMFS filesystem.
|
- description of the ROMFS filesystem.
|
||||||
|
rpc-cache.txt
|
||||||
|
- introduction to the caching mechanisms in the sunrpc layer.
|
||||||
|
seq_file.txt
|
||||||
|
- how to use the seq_file API
|
||||||
sharedsubtree.txt
|
sharedsubtree.txt
|
||||||
- a description of shared subtrees for namespaces.
|
- a description of shared subtrees for namespaces.
|
||||||
smbfs.txt
|
smbfs.txt
|
||||||
|
|
|
@ -1506,13 +1506,13 @@ laptop_mode
|
||||||
-----------
|
-----------
|
||||||
|
|
||||||
laptop_mode is a knob that controls "laptop mode". All the things that are
|
laptop_mode is a knob that controls "laptop mode". All the things that are
|
||||||
controlled by this knob are discussed in Documentation/laptop-mode.txt.
|
controlled by this knob are discussed in Documentation/laptops/laptop-mode.txt.
|
||||||
|
|
||||||
block_dump
|
block_dump
|
||||||
----------
|
----------
|
||||||
|
|
||||||
block_dump enables block I/O debugging when set to a nonzero value. More
|
block_dump enables block I/O debugging when set to a nonzero value. More
|
||||||
information on block I/O debugging is in Documentation/laptop-mode.txt.
|
information on block I/O debugging is in Documentation/laptops/laptop-mode.txt.
|
||||||
|
|
||||||
swap_token_timeout
|
swap_token_timeout
|
||||||
------------------
|
------------------
|
||||||
|
|
|
@ -0,0 +1,283 @@
|
||||||
|
The seq_file interface
|
||||||
|
|
||||||
|
Copyright 2003 Jonathan Corbet <corbet@lwn.net>
|
||||||
|
This file is originally from the LWN.net Driver Porting series at
|
||||||
|
http://lwn.net/Articles/driver-porting/
|
||||||
|
|
||||||
|
|
||||||
|
There are numerous ways for a device driver (or other kernel component) to
|
||||||
|
provide information to the user or system administrator. One useful
|
||||||
|
technique is the creation of virtual files, in debugfs, /proc or elsewhere.
|
||||||
|
Virtual files can provide human-readable output that is easy to get at
|
||||||
|
without any special utility programs; they can also make life easier for
|
||||||
|
script writers. It is not surprising that the use of virtual files has
|
||||||
|
grown over the years.
|
||||||
|
|
||||||
|
Creating those files correctly has always been a bit of a challenge,
|
||||||
|
however. It is not that hard to make a virtual file which returns a
|
||||||
|
string. But life gets trickier if the output is long - anything greater
|
||||||
|
than an application is likely to read in a single operation. Handling
|
||||||
|
multiple reads (and seeks) requires careful attention to the reader's
|
||||||
|
position within the virtual file - that position is, likely as not, in the
|
||||||
|
middle of a line of output. The kernel has traditionally had a number of
|
||||||
|
implementations that got this wrong.
|
||||||
|
|
||||||
|
The 2.6 kernel contains a set of functions (implemented by Alexander Viro)
|
||||||
|
which are designed to make it easy for virtual file creators to get it
|
||||||
|
right.
|
||||||
|
|
||||||
|
The seq_file interface is available via <linux/seq_file.h>. There are
|
||||||
|
three aspects to seq_file:
|
||||||
|
|
||||||
|
* An iterator interface which lets a virtual file implementation
|
||||||
|
step through the objects it is presenting.
|
||||||
|
|
||||||
|
* Some utility functions for formatting objects for output without
|
||||||
|
needing to worry about things like output buffers.
|
||||||
|
|
||||||
|
* A set of canned file_operations which implement most operations on
|
||||||
|
the virtual file.
|
||||||
|
|
||||||
|
We'll look at the seq_file interface via an extremely simple example: a
|
||||||
|
loadable module which creates a file called /proc/sequence. The file, when
|
||||||
|
read, simply produces a set of increasing integer values, one per line. The
|
||||||
|
sequence will continue until the user loses patience and finds something
|
||||||
|
better to do. The file is seekable, in that one can do something like the
|
||||||
|
following:
|
||||||
|
|
||||||
|
dd if=/proc/sequence of=out1 count=1
|
||||||
|
dd if=/proc/sequence skip=1 out=out2 count=1
|
||||||
|
|
||||||
|
Then concatenate the output files out1 and out2 and get the right
|
||||||
|
result. Yes, it is a thoroughly useless module, but the point is to show
|
||||||
|
how the mechanism works without getting lost in other details. (Those
|
||||||
|
wanting to see the full source for this module can find it at
|
||||||
|
http://lwn.net/Articles/22359/).
|
||||||
|
|
||||||
|
|
||||||
|
The iterator interface
|
||||||
|
|
||||||
|
Modules implementing a virtual file with seq_file must implement a simple
|
||||||
|
iterator object that allows stepping through the data of interest.
|
||||||
|
Iterators must be able to move to a specific position - like the file they
|
||||||
|
implement - but the interpretation of that position is up to the iterator
|
||||||
|
itself. A seq_file implementation that is formatting firewall rules, for
|
||||||
|
example, could interpret position N as the Nth rule in the chain.
|
||||||
|
Positioning can thus be done in whatever way makes the most sense for the
|
||||||
|
generator of the data, which need not be aware of how a position translates
|
||||||
|
to an offset in the virtual file. The one obvious exception is that a
|
||||||
|
position of zero should indicate the beginning of the file.
|
||||||
|
|
||||||
|
The /proc/sequence iterator just uses the count of the next number it
|
||||||
|
will output as its position.
|
||||||
|
|
||||||
|
Four functions must be implemented to make the iterator work. The first,
|
||||||
|
called start() takes a position as an argument and returns an iterator
|
||||||
|
which will start reading at that position. For our simple sequence example,
|
||||||
|
the start() function looks like:
|
||||||
|
|
||||||
|
static void *ct_seq_start(struct seq_file *s, loff_t *pos)
|
||||||
|
{
|
||||||
|
loff_t *spos = kmalloc(sizeof(loff_t), GFP_KERNEL);
|
||||||
|
if (! spos)
|
||||||
|
return NULL;
|
||||||
|
*spos = *pos;
|
||||||
|
return spos;
|
||||||
|
}
|
||||||
|
|
||||||
|
The entire data structure for this iterator is a single loff_t value
|
||||||
|
holding the current position. There is no upper bound for the sequence
|
||||||
|
iterator, but that will not be the case for most other seq_file
|
||||||
|
implementations; in most cases the start() function should check for a
|
||||||
|
"past end of file" condition and return NULL if need be.
|
||||||
|
|
||||||
|
For more complicated applications, the private field of the seq_file
|
||||||
|
structure can be used. There is also a special value which can be returned
|
||||||
|
by the start() function called SEQ_START_TOKEN; it can be used if you wish
|
||||||
|
to instruct your show() function (described below) to print a header at the
|
||||||
|
top of the output. SEQ_START_TOKEN should only be used if the offset is
|
||||||
|
zero, however.
|
||||||
|
|
||||||
|
The next function to implement is called, amazingly, next(); its job is to
|
||||||
|
move the iterator forward to the next position in the sequence. The
|
||||||
|
example module can simply increment the position by one; more useful
|
||||||
|
modules will do what is needed to step through some data structure. The
|
||||||
|
next() function returns a new iterator, or NULL if the sequence is
|
||||||
|
complete. Here's the example version:
|
||||||
|
|
||||||
|
static void *ct_seq_next(struct seq_file *s, void *v, loff_t *pos)
|
||||||
|
{
|
||||||
|
loff_t *spos = v;
|
||||||
|
*pos = ++*spos;
|
||||||
|
return spos;
|
||||||
|
}
|
||||||
|
|
||||||
|
The stop() function is called when iteration is complete; its job, of
|
||||||
|
course, is to clean up. If dynamic memory is allocated for the iterator,
|
||||||
|
stop() is the place to free it.
|
||||||
|
|
||||||
|
static void ct_seq_stop(struct seq_file *s, void *v)
|
||||||
|
{
|
||||||
|
kfree(v);
|
||||||
|
}
|
||||||
|
|
||||||
|
Finally, the show() function should format the object currently pointed to
|
||||||
|
by the iterator for output. It should return zero, or an error code if
|
||||||
|
something goes wrong. The example module's show() function is:
|
||||||
|
|
||||||
|
static int ct_seq_show(struct seq_file *s, void *v)
|
||||||
|
{
|
||||||
|
loff_t *spos = v;
|
||||||
|
seq_printf(s, "%lld\n", (long long)*spos);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
We will look at seq_printf() in a moment. But first, the definition of the
|
||||||
|
seq_file iterator is finished by creating a seq_operations structure with
|
||||||
|
the four functions we have just defined:
|
||||||
|
|
||||||
|
static const struct seq_operations ct_seq_ops = {
|
||||||
|
.start = ct_seq_start,
|
||||||
|
.next = ct_seq_next,
|
||||||
|
.stop = ct_seq_stop,
|
||||||
|
.show = ct_seq_show
|
||||||
|
};
|
||||||
|
|
||||||
|
This structure will be needed to tie our iterator to the /proc file in
|
||||||
|
a little bit.
|
||||||
|
|
||||||
|
It's worth noting that the iterator value returned by start() and
|
||||||
|
manipulated by the other functions is considered to be completely opaque by
|
||||||
|
the seq_file code. It can thus be anything that is useful in stepping
|
||||||
|
through the data to be output. Counters can be useful, but it could also be
|
||||||
|
a direct pointer into an array or linked list. Anything goes, as long as
|
||||||
|
the programmer is aware that things can happen between calls to the
|
||||||
|
iterator function. However, the seq_file code (by design) will not sleep
|
||||||
|
between the calls to start() and stop(), so holding a lock during that time
|
||||||
|
is a reasonable thing to do. The seq_file code will also avoid taking any
|
||||||
|
other locks while the iterator is active.
|
||||||
|
|
||||||
|
|
||||||
|
Formatted output
|
||||||
|
|
||||||
|
The seq_file code manages positioning within the output created by the
|
||||||
|
iterator and getting it into the user's buffer. But, for that to work, that
|
||||||
|
output must be passed to the seq_file code. Some utility functions have
|
||||||
|
been defined which make this task easy.
|
||||||
|
|
||||||
|
Most code will simply use seq_printf(), which works pretty much like
|
||||||
|
printk(), but which requires the seq_file pointer as an argument. It is
|
||||||
|
common to ignore the return value from seq_printf(), but a function
|
||||||
|
producing complicated output may want to check that value and quit if
|
||||||
|
something non-zero is returned; an error return means that the seq_file
|
||||||
|
buffer has been filled and further output will be discarded.
|
||||||
|
|
||||||
|
For straight character output, the following functions may be used:
|
||||||
|
|
||||||
|
int seq_putc(struct seq_file *m, char c);
|
||||||
|
int seq_puts(struct seq_file *m, const char *s);
|
||||||
|
int seq_escape(struct seq_file *m, const char *s, const char *esc);
|
||||||
|
|
||||||
|
The first two output a single character and a string, just like one would
|
||||||
|
expect. seq_escape() is like seq_puts(), except that any character in s
|
||||||
|
which is in the string esc will be represented in octal form in the output.
|
||||||
|
|
||||||
|
There is also a function for printing filenames:
|
||||||
|
|
||||||
|
int seq_path(struct seq_file *m, struct path *path, char *esc);
|
||||||
|
|
||||||
|
Here, path indicates the file of interest, and esc is a set of characters
|
||||||
|
which should be escaped in the output.
|
||||||
|
|
||||||
|
|
||||||
|
Making it all work
|
||||||
|
|
||||||
|
So far, we have a nice set of functions which can produce output within the
|
||||||
|
seq_file system, but we have not yet turned them into a file that a user
|
||||||
|
can see. Creating a file within the kernel requires, of course, the
|
||||||
|
creation of a set of file_operations which implement the operations on that
|
||||||
|
file. The seq_file interface provides a set of canned operations which do
|
||||||
|
most of the work. The virtual file author still must implement the open()
|
||||||
|
method, however, to hook everything up. The open function is often a single
|
||||||
|
line, as in the example module:
|
||||||
|
|
||||||
|
static int ct_open(struct inode *inode, struct file *file)
|
||||||
|
{
|
||||||
|
return seq_open(file, &ct_seq_ops);
|
||||||
|
}
|
||||||
|
|
||||||
|
Here, the call to seq_open() takes the seq_operations structure we created
|
||||||
|
before, and gets set up to iterate through the virtual file.
|
||||||
|
|
||||||
|
On a successful open, seq_open() stores the struct seq_file pointer in
|
||||||
|
file->private_data. If you have an application where the same iterator can
|
||||||
|
be used for more than one file, you can store an arbitrary pointer in the
|
||||||
|
private field of the seq_file structure; that value can then be retrieved
|
||||||
|
by the iterator functions.
|
||||||
|
|
||||||
|
The other operations of interest - read(), llseek(), and release() - are
|
||||||
|
all implemented by the seq_file code itself. So a virtual file's
|
||||||
|
file_operations structure will look like:
|
||||||
|
|
||||||
|
static const struct file_operations ct_file_ops = {
|
||||||
|
.owner = THIS_MODULE,
|
||||||
|
.open = ct_open,
|
||||||
|
.read = seq_read,
|
||||||
|
.llseek = seq_lseek,
|
||||||
|
.release = seq_release
|
||||||
|
};
|
||||||
|
|
||||||
|
There is also a seq_release_private() which passes the contents of the
|
||||||
|
seq_file private field to kfree() before releasing the structure.
|
||||||
|
|
||||||
|
The final step is the creation of the /proc file itself. In the example
|
||||||
|
code, that is done in the initialization code in the usual way:
|
||||||
|
|
||||||
|
static int ct_init(void)
|
||||||
|
{
|
||||||
|
struct proc_dir_entry *entry;
|
||||||
|
|
||||||
|
entry = create_proc_entry("sequence", 0, NULL);
|
||||||
|
if (entry)
|
||||||
|
entry->proc_fops = &ct_file_ops;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
module_init(ct_init);
|
||||||
|
|
||||||
|
And that is pretty much it.
|
||||||
|
|
||||||
|
|
||||||
|
seq_list
|
||||||
|
|
||||||
|
If your file will be iterating through a linked list, you may find these
|
||||||
|
routines useful:
|
||||||
|
|
||||||
|
struct list_head *seq_list_start(struct list_head *head,
|
||||||
|
loff_t pos);
|
||||||
|
struct list_head *seq_list_start_head(struct list_head *head,
|
||||||
|
loff_t pos);
|
||||||
|
struct list_head *seq_list_next(void *v, struct list_head *head,
|
||||||
|
loff_t *ppos);
|
||||||
|
|
||||||
|
These helpers will interpret pos as a position within the list and iterate
|
||||||
|
accordingly. Your start() and next() functions need only invoke the
|
||||||
|
seq_list_* helpers with a pointer to the appropriate list_head structure.
|
||||||
|
|
||||||
|
|
||||||
|
The extra-simple version
|
||||||
|
|
||||||
|
For extremely simple virtual files, there is an even easier interface. A
|
||||||
|
module can define only the show() function, which should create all the
|
||||||
|
output that the virtual file will contain. The file's open() method then
|
||||||
|
calls:
|
||||||
|
|
||||||
|
int single_open(struct file *file,
|
||||||
|
int (*show)(struct seq_file *m, void *p),
|
||||||
|
void *data);
|
||||||
|
|
||||||
|
When output time comes, the show() function will be called once. The data
|
||||||
|
value given to single_open() can be found in the private field of the
|
||||||
|
seq_file structure. When using single_open(), the programmer should use
|
||||||
|
single_release() instead of seq_release() in the file_operations structure
|
||||||
|
to avoid a memory leak.
|
|
@ -176,8 +176,10 @@ implementations:
|
||||||
Recall that an attribute should only be exporting one value, or an
|
Recall that an attribute should only be exporting one value, or an
|
||||||
array of similar values, so this shouldn't be that expensive.
|
array of similar values, so this shouldn't be that expensive.
|
||||||
|
|
||||||
This allows userspace to do partial reads and seeks arbitrarily over
|
This allows userspace to do partial reads and forward seeks
|
||||||
the entire file at will.
|
arbitrarily over the entire file at will. If userspace seeks back to
|
||||||
|
zero or does a pread(2) with an offset of '0' the show() method will
|
||||||
|
be called again, rearmed, to fill the buffer.
|
||||||
|
|
||||||
- On write(2), sysfs expects the entire buffer to be passed during the
|
- On write(2), sysfs expects the entire buffer to be passed during the
|
||||||
first write. Sysfs then passes the entire buffer to the store()
|
first write. Sysfs then passes the entire buffer to the store()
|
||||||
|
@ -192,6 +194,9 @@ implementations:
|
||||||
|
|
||||||
Other notes:
|
Other notes:
|
||||||
|
|
||||||
|
- Writing causes the show() method to be rearmed regardless of current
|
||||||
|
file position.
|
||||||
|
|
||||||
- The buffer will always be PAGE_SIZE bytes in length. On i386, this
|
- The buffer will always be PAGE_SIZE bytes in length. On i386, this
|
||||||
is 4096.
|
is 4096.
|
||||||
|
|
||||||
|
|
|
@ -52,16 +52,15 @@ When mounting an XFS filesystem, the following options are accepted.
|
||||||
and also gets the setgid bit set if it is a directory itself.
|
and also gets the setgid bit set if it is a directory itself.
|
||||||
|
|
||||||
ihashsize=value
|
ihashsize=value
|
||||||
Sets the number of hash buckets available for hashing the
|
In memory inode hashes have been removed, so this option has
|
||||||
in-memory inodes of the specified mount point. If a value
|
no function as of August 2007. Option is deprecated.
|
||||||
of zero is used, the value selected by the default algorithm
|
|
||||||
will be displayed in /proc/mounts.
|
|
||||||
|
|
||||||
ikeep/noikeep
|
ikeep/noikeep
|
||||||
When inode clusters are emptied of inodes, keep them around
|
When ikeep is specified, XFS does not delete empty inode clusters
|
||||||
on the disk (ikeep) - this is the traditional XFS behaviour
|
and keeps them around on disk. ikeep is the traditional XFS
|
||||||
and is still the default for now. Using the noikeep option,
|
behaviour. When noikeep is specified, empty inode clusters
|
||||||
inode clusters are returned to the free space pool.
|
are returned to the free space pool. The default is noikeep for
|
||||||
|
non-DMAPI mounts, while ikeep is the default when DMAPI is in use.
|
||||||
|
|
||||||
inode64
|
inode64
|
||||||
Indicates that XFS is allowed to create inodes at any location
|
Indicates that XFS is allowed to create inodes at any location
|
||||||
|
|
|
@ -2,6 +2,9 @@ GPIO Interfaces
|
||||||
|
|
||||||
This provides an overview of GPIO access conventions on Linux.
|
This provides an overview of GPIO access conventions on Linux.
|
||||||
|
|
||||||
|
These calls use the gpio_* naming prefix. No other calls should use that
|
||||||
|
prefix, or the related __gpio_* prefix.
|
||||||
|
|
||||||
|
|
||||||
What is a GPIO?
|
What is a GPIO?
|
||||||
===============
|
===============
|
||||||
|
@ -69,11 +72,13 @@ in this document, but drivers acting as clients to the GPIO interface must
|
||||||
not care how it's implemented.)
|
not care how it's implemented.)
|
||||||
|
|
||||||
That said, if the convention is supported on their platform, drivers should
|
That said, if the convention is supported on their platform, drivers should
|
||||||
use it when possible. Platforms should declare GENERIC_GPIO support in
|
use it when possible. Platforms must declare GENERIC_GPIO support in their
|
||||||
Kconfig (boolean true), which multi-platform drivers can depend on when
|
Kconfig (boolean true), and provide an <asm/gpio.h> file. Drivers that can't
|
||||||
using the include file:
|
work without standard GPIO calls should have Kconfig entries which depend
|
||||||
|
on GENERIC_GPIO. The GPIO calls are available, either as "real code" or as
|
||||||
|
optimized-away stubs, when drivers use the include file:
|
||||||
|
|
||||||
#include <asm/gpio.h>
|
#include <linux/gpio.h>
|
||||||
|
|
||||||
If you stick to this convention then it'll be easier for other developers to
|
If you stick to this convention then it'll be easier for other developers to
|
||||||
see what your code is doing, and help maintain it.
|
see what your code is doing, and help maintain it.
|
||||||
|
@ -316,6 +321,9 @@ pulldowns integrated on some platforms. Not all platforms support them,
|
||||||
or support them in the same way; and any given board might use external
|
or support them in the same way; and any given board might use external
|
||||||
pullups (or pulldowns) so that the on-chip ones should not be used.
|
pullups (or pulldowns) so that the on-chip ones should not be used.
|
||||||
(When a circuit needs 5 kOhm, on-chip 100 kOhm resistors won't do.)
|
(When a circuit needs 5 kOhm, on-chip 100 kOhm resistors won't do.)
|
||||||
|
Likewise drive strength (2 mA vs 20 mA) and voltage (1.8V vs 3.3V) is a
|
||||||
|
platform-specific issue, as are models like (not) having a one-to-one
|
||||||
|
correspondence between configurable pins and GPIOs.
|
||||||
|
|
||||||
There are other system-specific mechanisms that are not specified here,
|
There are other system-specific mechanisms that are not specified here,
|
||||||
like the aforementioned options for input de-glitching and wire-OR output.
|
like the aforementioned options for input de-glitching and wire-OR output.
|
||||||
|
|
|
@ -28,8 +28,6 @@ What's left to be done for 32-bit UIDs on all Linux architectures:
|
||||||
uses the 32-bit UID system calls properly otherwise.
|
uses the 32-bit UID system calls properly otherwise.
|
||||||
|
|
||||||
This affects at least:
|
This affects at least:
|
||||||
SunOS emulation
|
|
||||||
Solaris emulation
|
|
||||||
iBCS on Intel
|
iBCS on Intel
|
||||||
|
|
||||||
sparc32 emulation on sparc64
|
sparc32 emulation on sparc64
|
||||||
|
|
|
@ -1,20 +1,54 @@
|
||||||
Hardware driver for Intel/AMD/VIA Random Number Generators (RNG)
|
|
||||||
Copyright 2000,2001 Jeff Garzik <jgarzik@pobox.com>
|
|
||||||
Copyright 2000,2001 Philipp Rumpf <prumpf@mandrakesoft.com>
|
|
||||||
|
|
||||||
Introduction:
|
Introduction:
|
||||||
|
|
||||||
The hw_random device driver is software that makes use of a
|
The hw_random framework is software that makes use of a
|
||||||
special hardware feature on your CPU or motherboard,
|
special hardware feature on your CPU or motherboard,
|
||||||
a Random Number Generator (RNG).
|
a Random Number Generator (RNG). The software has two parts:
|
||||||
|
a core providing the /dev/hw_random character device and its
|
||||||
|
sysfs support, plus a hardware-specific driver that plugs
|
||||||
|
into that core.
|
||||||
|
|
||||||
In order to make effective use of this device driver, you
|
To make the most effective use of these mechanisms, you
|
||||||
should download the support software as well. Download the
|
should download the support software as well. Download the
|
||||||
latest version of the "rng-tools" package from the
|
latest version of the "rng-tools" package from the
|
||||||
hw_random driver's official Web site:
|
hw_random driver's official Web site:
|
||||||
|
|
||||||
http://sourceforge.net/projects/gkernel/
|
http://sourceforge.net/projects/gkernel/
|
||||||
|
|
||||||
|
Those tools use /dev/hw_random to fill the kernel entropy pool,
|
||||||
|
which is used internally and exported by the /dev/urandom and
|
||||||
|
/dev/random special files.
|
||||||
|
|
||||||
|
Theory of operation:
|
||||||
|
|
||||||
|
CHARACTER DEVICE. Using the standard open()
|
||||||
|
and read() system calls, you can read random data from
|
||||||
|
the hardware RNG device. This data is NOT CHECKED by any
|
||||||
|
fitness tests, and could potentially be bogus (if the
|
||||||
|
hardware is faulty or has been tampered with). Data is only
|
||||||
|
output if the hardware "has-data" flag is set, but nevertheless
|
||||||
|
a security-conscious person would run fitness tests on the
|
||||||
|
data before assuming it is truly random.
|
||||||
|
|
||||||
|
The rng-tools package uses such tests in "rngd", and lets you
|
||||||
|
run them by hand with a "rngtest" utility.
|
||||||
|
|
||||||
|
/dev/hw_random is char device major 10, minor 183.
|
||||||
|
|
||||||
|
CLASS DEVICE. There is a /sys/class/misc/hw_random node with
|
||||||
|
two unique attributes, "rng_available" and "rng_current". The
|
||||||
|
"rng_available" attribute lists the hardware-specific drivers
|
||||||
|
available, while "rng_current" lists the one which is currently
|
||||||
|
connected to /dev/hw_random. If your system has more than one
|
||||||
|
RNG available, you may change the one used by writing a name from
|
||||||
|
the list in "rng_available" into "rng_current".
|
||||||
|
|
||||||
|
==========================================================================
|
||||||
|
|
||||||
|
Hardware driver for Intel/AMD/VIA Random Number Generators (RNG)
|
||||||
|
Copyright 2000,2001 Jeff Garzik <jgarzik@pobox.com>
|
||||||
|
Copyright 2000,2001 Philipp Rumpf <prumpf@mandrakesoft.com>
|
||||||
|
|
||||||
|
|
||||||
About the Intel RNG hardware, from the firmware hub datasheet:
|
About the Intel RNG hardware, from the firmware hub datasheet:
|
||||||
|
|
||||||
The Firmware Hub integrates a Random Number Generator (RNG)
|
The Firmware Hub integrates a Random Number Generator (RNG)
|
||||||
|
@ -25,20 +59,7 @@ About the Intel RNG hardware, from the firmware hub datasheet:
|
||||||
access to our RNG for use as a security feature. At this time,
|
access to our RNG for use as a security feature. At this time,
|
||||||
the RNG is only to be used with a system in an OS-present state.
|
the RNG is only to be used with a system in an OS-present state.
|
||||||
|
|
||||||
Theory of operation:
|
Intel RNG Driver notes:
|
||||||
|
|
||||||
Character driver. Using the standard open()
|
|
||||||
and read() system calls, you can read random data from
|
|
||||||
the hardware RNG device. This data is NOT CHECKED by any
|
|
||||||
fitness tests, and could potentially be bogus (if the
|
|
||||||
hardware is faulty or has been tampered with). Data is only
|
|
||||||
output if the hardware "has-data" flag is set, but nevertheless
|
|
||||||
a security-conscious person would run fitness tests on the
|
|
||||||
data before assuming it is truly random.
|
|
||||||
|
|
||||||
/dev/hwrandom is char device major 10, minor 183.
|
|
||||||
|
|
||||||
Driver notes:
|
|
||||||
|
|
||||||
* FIXME: support poll(2)
|
* FIXME: support poll(2)
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,79 @@
|
||||||
|
Kernel driver adt7473
|
||||||
|
======================
|
||||||
|
|
||||||
|
Supported chips:
|
||||||
|
* Analog Devices ADT7473
|
||||||
|
Prefix: 'adt7473'
|
||||||
|
Addresses scanned: I2C 0x2C, 0x2D, 0x2E
|
||||||
|
Datasheet: Publicly available at the Analog Devices website
|
||||||
|
|
||||||
|
Author: Darrick J. Wong
|
||||||
|
|
||||||
|
Description
|
||||||
|
-----------
|
||||||
|
|
||||||
|
This driver implements support for the Analog Devices ADT7473 chip family.
|
||||||
|
|
||||||
|
The LM85 uses the 2-wire interface compatible with the SMBUS 2.0
|
||||||
|
specification. Using an analog to digital converter it measures three (3)
|
||||||
|
temperatures and two (2) voltages. It has three (3) 16-bit counters for
|
||||||
|
measuring fan speed. There are three (3) PWM outputs that can be used
|
||||||
|
to control fan speed.
|
||||||
|
|
||||||
|
A sophisticated control system for the PWM outputs is designed into the
|
||||||
|
LM85 that allows fan speed to be adjusted automatically based on any of the
|
||||||
|
three temperature sensors. Each PWM output is individually adjustable and
|
||||||
|
programmable. Once configured, the ADT7473 will adjust the PWM outputs in
|
||||||
|
response to the measured temperatures without further host intervention.
|
||||||
|
This feature can also be disabled for manual control of the PWM's.
|
||||||
|
|
||||||
|
Each of the measured inputs (voltage, temperature, fan speed) has
|
||||||
|
corresponding high/low limit values. The ADT7473 will signal an ALARM if
|
||||||
|
any measured value exceeds either limit.
|
||||||
|
|
||||||
|
The ADT7473 samples all inputs continuously. The driver will not read
|
||||||
|
the registers more often than once every other second. Further,
|
||||||
|
configuration data is only read once per minute.
|
||||||
|
|
||||||
|
Special Features
|
||||||
|
----------------
|
||||||
|
|
||||||
|
The ADT7473 have a 10-bit ADC and can therefore measure temperatures
|
||||||
|
with 0.25 degC resolution. Temperature readings can be configured either
|
||||||
|
for twos complement format or "Offset 64" format, wherein 63 is subtracted
|
||||||
|
from the raw value to get the temperature value.
|
||||||
|
|
||||||
|
The Analog Devices datasheet is very detailed and describes a procedure for
|
||||||
|
determining an optimal configuration for the automatic PWM control.
|
||||||
|
|
||||||
|
Hardware Configurations
|
||||||
|
-----------------------
|
||||||
|
|
||||||
|
The ADT7473 chips have an optional SMBALERT output that can be used to
|
||||||
|
signal the chipset in case a limit is exceeded or the temperature sensors
|
||||||
|
fail. Individual sensor interrupts can be masked so they won't trigger
|
||||||
|
SMBALERT. The SMBALERT output if configured replaces the PWM2 function.
|
||||||
|
|
||||||
|
Configuration Notes
|
||||||
|
-------------------
|
||||||
|
|
||||||
|
Besides standard interfaces driver adds the following:
|
||||||
|
|
||||||
|
* PWM Control
|
||||||
|
|
||||||
|
* pwm#_auto_point1_pwm and pwm#_auto_point1_temp and
|
||||||
|
* pwm#_auto_point2_pwm and pwm#_auto_point2_temp -
|
||||||
|
|
||||||
|
point1: Set the pwm speed at a lower temperature bound.
|
||||||
|
point2: Set the pwm speed at a higher temperature bound.
|
||||||
|
|
||||||
|
The ADT7473 will scale the pwm between the lower and higher pwm speed when
|
||||||
|
the temperature is between the two temperature boundaries. PWM values range
|
||||||
|
from 0 (off) to 255 (full speed).
|
||||||
|
|
||||||
|
Notes
|
||||||
|
-----
|
||||||
|
|
||||||
|
The NVIDIA binary driver presents an ADT7473 chip via an on-card i2c bus.
|
||||||
|
Unfortunately, they fail to set the i2c adapter class, so this driver may
|
||||||
|
fail to find the chip until the nvidia driver is patched.
|
|
@ -4,9 +4,10 @@ Kernel driver coretemp
|
||||||
Supported chips:
|
Supported chips:
|
||||||
* All Intel Core family
|
* All Intel Core family
|
||||||
Prefix: 'coretemp'
|
Prefix: 'coretemp'
|
||||||
CPUID: family 0x6, models 0xe, 0xf, 0x16
|
CPUID: family 0x6, models 0xe, 0xf, 0x16, 0x17
|
||||||
Datasheet: Intel 64 and IA-32 Architectures Software Developer's Manual
|
Datasheet: Intel 64 and IA-32 Architectures Software Developer's Manual
|
||||||
Volume 3A: System Programming Guide
|
Volume 3A: System Programming Guide
|
||||||
|
http://softwarecommunity.intel.com/Wiki/Mobility/720.htm
|
||||||
|
|
||||||
Author: Rudolf Marek
|
Author: Rudolf Marek
|
||||||
|
|
||||||
|
@ -25,6 +26,7 @@ may be raised, if the temperature grows enough (more than TjMax) to trigger
|
||||||
the Out-Of-Spec bit. Following table summarizes the exported sysfs files:
|
the Out-Of-Spec bit. Following table summarizes the exported sysfs files:
|
||||||
|
|
||||||
temp1_input - Core temperature (in millidegrees Celsius).
|
temp1_input - Core temperature (in millidegrees Celsius).
|
||||||
|
temp1_max - All cooling devices should be turned on (on Core2).
|
||||||
temp1_crit - Maximum junction temperature (in millidegrees Celsius).
|
temp1_crit - Maximum junction temperature (in millidegrees Celsius).
|
||||||
temp1_crit_alarm - Set when Out-of-spec bit is set, never clears.
|
temp1_crit_alarm - Set when Out-of-spec bit is set, never clears.
|
||||||
Correct CPU operation is no longer guaranteed.
|
Correct CPU operation is no longer guaranteed.
|
||||||
|
|
|
@ -12,8 +12,9 @@ Supported adapters:
|
||||||
* Intel 82801G (ICH7)
|
* Intel 82801G (ICH7)
|
||||||
* Intel 631xESB/632xESB (ESB2)
|
* Intel 631xESB/632xESB (ESB2)
|
||||||
* Intel 82801H (ICH8)
|
* Intel 82801H (ICH8)
|
||||||
* Intel ICH9
|
* Intel 82801I (ICH9)
|
||||||
* Intel Tolapai
|
* Intel Tolapai
|
||||||
|
* Intel ICH10
|
||||||
Datasheets: Publicly available at the Intel website
|
Datasheets: Publicly available at the Intel website
|
||||||
|
|
||||||
Authors:
|
Authors:
|
||||||
|
|
|
@ -1,12 +1,14 @@
|
||||||
Most (all) Intel-MP compliant SMP boards have the so-called 'IO-APIC',
|
Most (all) Intel-MP compliant SMP boards have the so-called 'IO-APIC',
|
||||||
which is an enhanced interrupt controller, it enables us to route
|
which is an enhanced interrupt controller. It enables us to route
|
||||||
hardware interrupts to multiple CPUs, or to CPU groups.
|
hardware interrupts to multiple CPUs, or to CPU groups. Without an
|
||||||
|
IO-APIC, interrupts from hardware will be delivered only to the
|
||||||
|
CPU which boots the operating system (usually CPU#0).
|
||||||
|
|
||||||
Linux supports all variants of compliant SMP boards, including ones with
|
Linux supports all variants of compliant SMP boards, including ones with
|
||||||
multiple IO-APICs. (multiple IO-APICs are used in high-end servers to
|
multiple IO-APICs. Multiple IO-APICs are used in high-end servers to
|
||||||
distribute IRQ load further).
|
distribute IRQ load further.
|
||||||
|
|
||||||
There are (a few) known breakages in certain older boards, which bugs are
|
There are (a few) known breakages in certain older boards, such bugs are
|
||||||
usually worked around by the kernel. If your MP-compliant SMP board does
|
usually worked around by the kernel. If your MP-compliant SMP board does
|
||||||
not boot Linux, then consult the linux-smp mailing list archives first.
|
not boot Linux, then consult the linux-smp mailing list archives first.
|
||||||
|
|
||||||
|
@ -28,18 +30,18 @@ If your box boots fine with enabled IO-APIC IRQs, then your
|
||||||
hell:~>
|
hell:~>
|
||||||
<----------------------------
|
<----------------------------
|
||||||
|
|
||||||
some interrupts are still listed as 'XT PIC', but this is not a problem,
|
Some interrupts are still listed as 'XT PIC', but this is not a problem;
|
||||||
none of those IRQ sources is performance-critical.
|
none of those IRQ sources is performance-critical.
|
||||||
|
|
||||||
|
|
||||||
in the unlikely case that your board does not create a working mp-table,
|
In the unlikely case that your board does not create a working mp-table,
|
||||||
you can use the pirq= boot parameter to 'hand-construct' IRQ entries. This
|
you can use the pirq= boot parameter to 'hand-construct' IRQ entries. This
|
||||||
is nontrivial though and cannot be automated. One sample /etc/lilo.conf
|
is non-trivial though and cannot be automated. One sample /etc/lilo.conf
|
||||||
entry:
|
entry:
|
||||||
|
|
||||||
append="pirq=15,11,10"
|
append="pirq=15,11,10"
|
||||||
|
|
||||||
the actual numbers depend on your system, on your PCI cards and on their
|
The actual numbers depend on your system, on your PCI cards and on their
|
||||||
PCI slot position. Usually PCI slots are 'daisy chained' before they are
|
PCI slot position. Usually PCI slots are 'daisy chained' before they are
|
||||||
connected to the PCI chipset IRQ routing facility (the incoming PIRQ1-4
|
connected to the PCI chipset IRQ routing facility (the incoming PIRQ1-4
|
||||||
lines):
|
lines):
|
||||||
|
@ -54,7 +56,7 @@ lines):
|
||||||
PIRQ1 ----| |- `----| |- `----| |- `----| |--------| |
|
PIRQ1 ----| |- `----| |- `----| |- `----| |--------| |
|
||||||
`-' `-' `-' `-' `-'
|
`-' `-' `-' `-' `-'
|
||||||
|
|
||||||
every PCI card emits a PCI IRQ, which can be INTA,INTB,INTC,INTD:
|
Every PCI card emits a PCI IRQ, which can be INTA, INTB, INTC or INTD:
|
||||||
|
|
||||||
,-.
|
,-.
|
||||||
INTD--| |
|
INTD--| |
|
||||||
|
@ -68,7 +70,7 @@ every PCI card emits a PCI IRQ, which can be INTA,INTB,INTC,INTD:
|
||||||
|
|
||||||
These INTA-D PCI IRQs are always 'local to the card', their real meaning
|
These INTA-D PCI IRQs are always 'local to the card', their real meaning
|
||||||
depends on which slot they are in. If you look at the daisy chaining diagram,
|
depends on which slot they are in. If you look at the daisy chaining diagram,
|
||||||
a card in slot4, issuing INTA IRQ, it will end up as a signal on PIRQ2 of
|
a card in slot4, issuing INTA IRQ, it will end up as a signal on PIRQ4 of
|
||||||
the PCI chipset. Most cards issue INTA, this creates optimal distribution
|
the PCI chipset. Most cards issue INTA, this creates optimal distribution
|
||||||
between the PIRQ lines. (distributing IRQ sources properly is not a
|
between the PIRQ lines. (distributing IRQ sources properly is not a
|
||||||
necessity, PCI IRQs can be shared at will, but it's a good for performance
|
necessity, PCI IRQs can be shared at will, but it's a good for performance
|
||||||
|
@ -95,21 +97,21 @@ card (IRQ11) in Slot3, and have Slot1 empty:
|
||||||
[value '0' is a generic 'placeholder', reserved for empty (or non-IRQ emitting)
|
[value '0' is a generic 'placeholder', reserved for empty (or non-IRQ emitting)
|
||||||
slots.]
|
slots.]
|
||||||
|
|
||||||
generally, it's always possible to find out the correct pirq= settings, just
|
Generally, it's always possible to find out the correct pirq= settings, just
|
||||||
permute all IRQ numbers properly ... it will take some time though. An
|
permute all IRQ numbers properly ... it will take some time though. An
|
||||||
'incorrect' pirq line will cause the booting process to hang, or a device
|
'incorrect' pirq line will cause the booting process to hang, or a device
|
||||||
won't function properly (if it's inserted as eg. a module).
|
won't function properly (e.g. if it's inserted as a module).
|
||||||
|
|
||||||
If you have 2 PCI buses, then you can use up to 8 pirq values. Although such
|
If you have 2 PCI buses, then you can use up to 8 pirq values, although such
|
||||||
boards tend to have a good configuration.
|
boards tend to have a good configuration.
|
||||||
|
|
||||||
Be prepared that it might happen that you need some strange pirq line:
|
Be prepared that it might happen that you need some strange pirq line:
|
||||||
|
|
||||||
append="pirq=0,0,0,0,0,0,9,11"
|
append="pirq=0,0,0,0,0,0,9,11"
|
||||||
|
|
||||||
use smart try-and-err techniques to find out the correct pirq line ...
|
Use smart trial-and-error techniques to find out the correct pirq line ...
|
||||||
|
|
||||||
good luck and mail to linux-smp@vger.kernel.org or
|
Good luck and mail to linux-smp@vger.kernel.org or
|
||||||
linux-kernel@vger.kernel.org if you have any problems that are not covered
|
linux-kernel@vger.kernel.org if you have any problems that are not covered
|
||||||
by this document.
|
by this document.
|
||||||
|
|
||||||
|
|
|
@ -170,6 +170,8 @@ Offset Proto Name Meaning
|
||||||
0238/4 2.06+ cmdline_size Maximum size of the kernel command line
|
0238/4 2.06+ cmdline_size Maximum size of the kernel command line
|
||||||
023C/4 2.07+ hardware_subarch Hardware subarchitecture
|
023C/4 2.07+ hardware_subarch Hardware subarchitecture
|
||||||
0240/8 2.07+ hardware_subarch_data Subarchitecture-specific data
|
0240/8 2.07+ hardware_subarch_data Subarchitecture-specific data
|
||||||
|
0248/4 2.08+ payload_offset Offset of kernel payload
|
||||||
|
024C/4 2.08+ payload_length Length of kernel payload
|
||||||
|
|
||||||
(1) For backwards compatibility, if the setup_sects field contains 0, the
|
(1) For backwards compatibility, if the setup_sects field contains 0, the
|
||||||
real value is 4.
|
real value is 4.
|
||||||
|
@ -512,6 +514,32 @@ Protocol: 2.07+
|
||||||
|
|
||||||
A pointer to data that is specific to hardware subarch
|
A pointer to data that is specific to hardware subarch
|
||||||
|
|
||||||
|
Field name: payload_offset
|
||||||
|
Type: read
|
||||||
|
Offset/size: 0x248/4
|
||||||
|
Protocol: 2.08+
|
||||||
|
|
||||||
|
If non-zero then this field contains the offset from the end of the
|
||||||
|
real-mode code to the payload.
|
||||||
|
|
||||||
|
The payload may be compressed. The format of both the compressed and
|
||||||
|
uncompressed data should be determined using the standard magic
|
||||||
|
numbers. Currently only gzip compressed ELF is used.
|
||||||
|
|
||||||
|
Field name: payload_length
|
||||||
|
Type: read
|
||||||
|
Offset/size: 0x24c/4
|
||||||
|
Protocol: 2.08+
|
||||||
|
|
||||||
|
The length of the payload.
|
||||||
|
|
||||||
|
**** THE IMAGE CHECKSUM
|
||||||
|
|
||||||
|
From boot protocol version 2.08 onwards the CRC-32 is calculated over
|
||||||
|
the entire file using the characteristic polynomial 0x04C11DB7 and an
|
||||||
|
initial remainder of 0xffffffff. The checksum is appended to the
|
||||||
|
file; therefore the CRC of the file up to the limit specified in the
|
||||||
|
syssize field of the header is always 0.
|
||||||
|
|
||||||
**** THE KERNEL COMMAND LINE
|
**** THE KERNEL COMMAND LINE
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,12 @@
|
||||||
|
00-INDEX
|
||||||
|
- this file
|
||||||
|
ChangeLog.ide-cd.1994-2004
|
||||||
|
- ide-cd changelog
|
||||||
|
ChangeLog.ide-floppy.1996-2002
|
||||||
|
- ide-floppy changelog
|
||||||
|
ChangeLog.ide-tape.1995-2002
|
||||||
|
- ide-tape changelog
|
||||||
|
ide-tape.txt
|
||||||
|
- info on the IDE ATAPI streaming tape driver
|
||||||
|
ide.txt
|
||||||
|
- important info for users of ATA devices (IDE/EIDE disks and CD-ROMS).
|
|
@ -71,29 +71,6 @@ This driver automatically probes for most IDE interfaces (including all PCI
|
||||||
ones), for the drives/geometries attached to those interfaces, and for the IRQ
|
ones), for the drives/geometries attached to those interfaces, and for the IRQ
|
||||||
lines being used by the interfaces (normally 14, 15 for ide0/ide1).
|
lines being used by the interfaces (normally 14, 15 for ide0/ide1).
|
||||||
|
|
||||||
For special cases, interfaces may be specified using kernel "command line"
|
|
||||||
options. For example,
|
|
||||||
|
|
||||||
ide3=0x168,0x36e,10 /* ioports 0x168-0x16f,0x36e, irq 10 */
|
|
||||||
|
|
||||||
Normally the irq number need not be specified, as ide.c will probe for it:
|
|
||||||
|
|
||||||
ide3=0x168,0x36e /* ioports 0x168-0x16f,0x36e */
|
|
||||||
|
|
||||||
The standard port, and irq values are these:
|
|
||||||
|
|
||||||
ide0=0x1f0,0x3f6,14
|
|
||||||
ide1=0x170,0x376,15
|
|
||||||
ide2=0x1e8,0x3ee,11
|
|
||||||
ide3=0x168,0x36e,10
|
|
||||||
|
|
||||||
Note that the first parameter reserves 8 contiguous ioports, whereas the
|
|
||||||
second value denotes a single ioport. If in doubt, do a 'cat /proc/ioports'.
|
|
||||||
|
|
||||||
In all probability the device uses these ports and IRQs if it is attached
|
|
||||||
to the appropriate ide channel. Pass the parameter for the correct ide
|
|
||||||
channel to the kernel, as explained above.
|
|
||||||
|
|
||||||
Any number of interfaces may share a single IRQ if necessary, at a slight
|
Any number of interfaces may share a single IRQ if necessary, at a slight
|
||||||
performance penalty, whether on separate cards or a single VLB card.
|
performance penalty, whether on separate cards or a single VLB card.
|
||||||
The IDE driver automatically detects and handles this. However, this may
|
The IDE driver automatically detects and handles this. However, this may
|
||||||
|
@ -105,7 +82,7 @@ Drives are normally found by auto-probing and/or examining the CMOS/BIOS data.
|
||||||
For really weird situations, the apparent (fdisk) geometry can also be specified
|
For really weird situations, the apparent (fdisk) geometry can also be specified
|
||||||
on the kernel "command line" using LILO. The format of such lines is:
|
on the kernel "command line" using LILO. The format of such lines is:
|
||||||
|
|
||||||
hdx=cyls,heads,sects,wpcom,irq
|
hdx=cyls,heads,sects
|
||||||
or hdx=cdrom
|
or hdx=cdrom
|
||||||
|
|
||||||
where hdx can be any of hda through hdh, Three values are required
|
where hdx can be any of hda through hdh, Three values are required
|
||||||
|
@ -184,13 +161,6 @@ provided it is mounted with the default block size of 1024 (as above).
|
||||||
Please pass on any feedback on any of this stuff to the maintainer,
|
Please pass on any feedback on any of this stuff to the maintainer,
|
||||||
whose address can be found in linux/MAINTAINERS.
|
whose address can be found in linux/MAINTAINERS.
|
||||||
|
|
||||||
Note that if BOTH hd.c and ide.c are configured into the kernel,
|
|
||||||
hd.c will normally be allowed to control the primary IDE interface.
|
|
||||||
This is useful for older hardware that may be incompatible with ide.c,
|
|
||||||
and still allows newer hardware to run on the 2nd/3rd/4th IDE ports
|
|
||||||
under control of ide.c. To have ide.c also "take over" the primary
|
|
||||||
IDE port in this situation, use the "command line" parameter: ide0=0x1f0
|
|
||||||
|
|
||||||
The IDE driver is modularized. The high level disk/CD-ROM/tape/floppy
|
The IDE driver is modularized. The high level disk/CD-ROM/tape/floppy
|
||||||
drivers can always be compiled as loadable modules, the chipset drivers
|
drivers can always be compiled as loadable modules, the chipset drivers
|
||||||
can only be compiled into the kernel, and the core code (ide.c) can be
|
can only be compiled into the kernel, and the core code (ide.c) can be
|
||||||
|
@ -206,7 +176,7 @@ When ide.c is used as a module, you can pass command line parameters to the
|
||||||
driver using the "options=" keyword to insmod, while replacing any ',' with
|
driver using the "options=" keyword to insmod, while replacing any ',' with
|
||||||
';'. For example:
|
';'. For example:
|
||||||
|
|
||||||
insmod ide.o options="ide0=serialize ide1=serialize ide2=0x1e8;0x3ee;11"
|
insmod ide.o options="hda=nodma hdb=nodma"
|
||||||
|
|
||||||
|
|
||||||
================================================================================
|
================================================================================
|
||||||
|
@ -214,9 +184,9 @@ driver using the "options=" keyword to insmod, while replacing any ',' with
|
||||||
Summary of ide driver parameters for kernel command line
|
Summary of ide driver parameters for kernel command line
|
||||||
--------------------------------------------------------
|
--------------------------------------------------------
|
||||||
|
|
||||||
"hdx=" is recognized for all "x" from "a" to "h", such as "hdc".
|
"hdx=" is recognized for all "x" from "a" to "u", such as "hdc".
|
||||||
|
|
||||||
"idex=" is recognized for all "x" from "0" to "3", such as "ide1".
|
"idex=" is recognized for all "x" from "0" to "9", such as "ide1".
|
||||||
|
|
||||||
"hdx=noprobe" : drive may be present, but do not probe for it
|
"hdx=noprobe" : drive may be present, but do not probe for it
|
||||||
|
|
||||||
|
@ -228,13 +198,6 @@ Summary of ide driver parameters for kernel command line
|
||||||
|
|
||||||
"hdx=cyl,head,sect" : disk drive is present, with specified geometry
|
"hdx=cyl,head,sect" : disk drive is present, with specified geometry
|
||||||
|
|
||||||
"hdx=remap" : remap access of sector 0 to sector 1 (for EZDrive)
|
|
||||||
|
|
||||||
"hdx=remap63" : remap the drive: add 63 to all sector numbers
|
|
||||||
(for DM OnTrack)
|
|
||||||
|
|
||||||
"idex=noautotune" : driver will NOT attempt to tune interface speed
|
|
||||||
|
|
||||||
"hdx=autotune" : driver will attempt to tune interface speed
|
"hdx=autotune" : driver will attempt to tune interface speed
|
||||||
to the fastest PIO mode supported,
|
to the fastest PIO mode supported,
|
||||||
if possible for this drive only.
|
if possible for this drive only.
|
||||||
|
@ -244,10 +207,6 @@ Summary of ide driver parameters for kernel command line
|
||||||
|
|
||||||
"hdx=nodma" : disallow DMA
|
"hdx=nodma" : disallow DMA
|
||||||
|
|
||||||
"hdx=scsi" : the return of the ide-scsi flag, this is useful for
|
|
||||||
allowing ide-floppy, ide-tape, and ide-cdrom|writers
|
|
||||||
to use ide-scsi emulation on a device specific option.
|
|
||||||
|
|
||||||
"idebus=xx" : inform IDE driver of VESA/PCI bus speed in MHz,
|
"idebus=xx" : inform IDE driver of VESA/PCI bus speed in MHz,
|
||||||
where "xx" is between 20 and 66 inclusive,
|
where "xx" is between 20 and 66 inclusive,
|
||||||
used when tuning chipset PIO modes.
|
used when tuning chipset PIO modes.
|
||||||
|
@ -258,23 +217,11 @@ Summary of ide driver parameters for kernel command line
|
||||||
As for VLB, it is safest to not specify it.
|
As for VLB, it is safest to not specify it.
|
||||||
Bigger values are safer than smaller ones.
|
Bigger values are safer than smaller ones.
|
||||||
|
|
||||||
"idex=noprobe" : do not attempt to access/use this interface
|
|
||||||
|
|
||||||
"idex=base" : probe for an interface at the addr specified,
|
|
||||||
where "base" is usually 0x1f0 or 0x170
|
|
||||||
and "ctl" is assumed to be "base"+0x206
|
|
||||||
|
|
||||||
"idex=base,ctl" : specify both base and ctl
|
|
||||||
|
|
||||||
"idex=base,ctl,irq" : specify base, ctl, and irq number
|
|
||||||
|
|
||||||
"idex=serialize" : do not overlap operations on idex. Please note
|
"idex=serialize" : do not overlap operations on idex. Please note
|
||||||
that you will have to specify this option for
|
that you will have to specify this option for
|
||||||
both the respective primary and secondary channel
|
both the respective primary and secondary channel
|
||||||
to take effect.
|
to take effect.
|
||||||
|
|
||||||
"idex=four" : four drives on idex and ide(x^1) share same ports
|
|
||||||
|
|
||||||
"idex=reset" : reset interface after probe
|
"idex=reset" : reset interface after probe
|
||||||
|
|
||||||
"idex=ata66" : informs the interface that it has an 80c cable
|
"idex=ata66" : informs the interface that it has an 80c cable
|
||||||
|
@ -282,12 +229,6 @@ Summary of ide driver parameters for kernel command line
|
||||||
ability to bit test for detection is currently
|
ability to bit test for detection is currently
|
||||||
unknown.
|
unknown.
|
||||||
|
|
||||||
"ide=reverse" : formerly called to pci sub-system, but now local.
|
|
||||||
|
|
||||||
The following are valid ONLY on ide0, which usually corresponds
|
|
||||||
to the first ATA interface found on the particular host, and the defaults for
|
|
||||||
the base,ctl ports must not be altered.
|
|
||||||
|
|
||||||
"ide=doubler" : probe/support IDE doublers on Amiga
|
"ide=doubler" : probe/support IDE doublers on Amiga
|
||||||
|
|
||||||
There may be more options than shown -- use the source, Luke!
|
There may be more options than shown -- use the source, Luke!
|
||||||
|
@ -307,52 +248,8 @@ Also for legacy CMD640 host driver (cmd640) you need to use "probe_vlb"
|
||||||
kernel paremeter to enable probing for VLB version of the chipset (PCI ones
|
kernel paremeter to enable probing for VLB version of the chipset (PCI ones
|
||||||
are detected automatically).
|
are detected automatically).
|
||||||
|
|
||||||
================================================================================
|
You also need to use "probe" kernel parameter for ide-4drives driver
|
||||||
|
(support for IDE generic chipset with four drives on one port).
|
||||||
IDE ATAPI streaming tape driver
|
|
||||||
-------------------------------
|
|
||||||
|
|
||||||
This driver is a part of the Linux ide driver and works in co-operation
|
|
||||||
with linux/drivers/block/ide.c.
|
|
||||||
|
|
||||||
The driver, in co-operation with ide.c, basically traverses the
|
|
||||||
request-list for the block device interface. The character device
|
|
||||||
interface, on the other hand, creates new requests, adds them
|
|
||||||
to the request-list of the block device, and waits for their completion.
|
|
||||||
|
|
||||||
Pipelined operation mode is now supported on both reads and writes.
|
|
||||||
|
|
||||||
The block device major and minor numbers are determined from the
|
|
||||||
tape's relative position in the ide interfaces, as explained in ide.c.
|
|
||||||
|
|
||||||
The character device interface consists of the following devices:
|
|
||||||
|
|
||||||
ht0 major 37, minor 0 first IDE tape, rewind on close.
|
|
||||||
ht1 major 37, minor 1 second IDE tape, rewind on close.
|
|
||||||
...
|
|
||||||
nht0 major 37, minor 128 first IDE tape, no rewind on close.
|
|
||||||
nht1 major 37, minor 129 second IDE tape, no rewind on close.
|
|
||||||
...
|
|
||||||
|
|
||||||
Run /dev/MAKEDEV to create the above entries.
|
|
||||||
|
|
||||||
The general magnetic tape commands compatible interface, as defined by
|
|
||||||
include/linux/mtio.h, is accessible through the character device.
|
|
||||||
|
|
||||||
General ide driver configuration options, such as the interrupt-unmask
|
|
||||||
flag, can be configured by issuing an ioctl to the block device interface,
|
|
||||||
as any other ide device.
|
|
||||||
|
|
||||||
Our own ide-tape ioctl's can be issued to either the block device or
|
|
||||||
the character device interface.
|
|
||||||
|
|
||||||
Maximal throughput with minimal bus load will usually be achieved in the
|
|
||||||
following scenario:
|
|
||||||
|
|
||||||
1. ide-tape is operating in the pipelined operation mode.
|
|
||||||
2. No buffering is performed by the user backup program.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
================================================================================
|
================================================================================
|
||||||
|
|
|
@ -0,0 +1,13 @@
|
||||||
|
|
||||||
|
IDE warm-plug HOWTO
|
||||||
|
===================
|
||||||
|
|
||||||
|
To warm-plug devices on a port 'idex':
|
||||||
|
|
||||||
|
# echo -n "1" > /sys/class/ide_port/idex/delete_devices
|
||||||
|
|
||||||
|
unplug old device(s) and plug new device(s)
|
||||||
|
|
||||||
|
# echo -n "1" > /sys/class/ide_port/idex/scan
|
||||||
|
|
||||||
|
done
|
|
@ -0,0 +1,52 @@
|
||||||
|
Keyboard notifier
|
||||||
|
|
||||||
|
One can use register_keyboard_notifier to get called back on keyboard
|
||||||
|
events (see kbd_keycode() function for details). The passed structure is
|
||||||
|
keyboard_notifier_param:
|
||||||
|
|
||||||
|
- 'vc' always provide the VC for which the keyboard event applies;
|
||||||
|
- 'down' is 1 for a key press event, 0 for a key release;
|
||||||
|
- 'shift' is the current modifier state, mask bit indexes are KG_*;
|
||||||
|
- 'value' depends on the type of event.
|
||||||
|
|
||||||
|
- KBD_KEYCODE events are always sent before other events, value is the keycode.
|
||||||
|
- KBD_UNBOUND_KEYCODE events are sent if the keycode is not bound to a keysym.
|
||||||
|
value is the keycode.
|
||||||
|
- KBD_UNICODE events are sent if the keycode -> keysym translation produced a
|
||||||
|
unicode character. value is the unicode value.
|
||||||
|
- KBD_KEYSYM events are sent if the keycode -> keysym translation produced a
|
||||||
|
non-unicode character. value is the keysym.
|
||||||
|
- KBD_POST_KEYSYM events are sent after the treatment of non-unicode keysyms.
|
||||||
|
That permits one to inspect the resulting LEDs for instance.
|
||||||
|
|
||||||
|
For each kind of event but the last, the callback may return NOTIFY_STOP in
|
||||||
|
order to "eat" the event: the notify loop is stopped and the keyboard event is
|
||||||
|
dropped.
|
||||||
|
|
||||||
|
In a rough C snippet, we have:
|
||||||
|
|
||||||
|
kbd_keycode(keycode) {
|
||||||
|
...
|
||||||
|
params.value = keycode;
|
||||||
|
if (notifier_call_chain(KBD_KEYCODE,¶ms) == NOTIFY_STOP)
|
||||||
|
|| !bound) {
|
||||||
|
notifier_call_chain(KBD_UNBOUND_KEYCODE,¶ms);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (unicode) {
|
||||||
|
param.value = unicode;
|
||||||
|
if (notifier_call_chain(KBD_UNICODE,¶ms) == NOTIFY_STOP)
|
||||||
|
return;
|
||||||
|
emit unicode;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
params.value = keysym;
|
||||||
|
if (notifier_call_chain(KBD_KEYSYM,¶ms) == NOTIFY_STOP)
|
||||||
|
return;
|
||||||
|
apply keysym;
|
||||||
|
notifier_call_chain(KBD_POST_KEYSYM,¶ms);
|
||||||
|
}
|
||||||
|
|
||||||
|
NOTE: This notifier is usually called from interrupt context.
|
|
@ -11,69 +11,69 @@ comment or update of this file, please try to update Original(English)
|
||||||
file at first.
|
file at first.
|
||||||
|
|
||||||
==================================
|
==================================
|
||||||
ããã¯ã
|
これは、
|
||||||
linux-2.6.24/Documentation/stable_kernel_rules.txt
|
linux-2.6.24/Documentation/stable_kernel_rules.txt
|
||||||
ã®å訳ã§ãã
|
の和訳です。
|
||||||
|
|
||||||
翻訳å£ä½ï¼ JF ããã¸ã§ã¯ã < http://www.linux.or.jp/JF/ >
|
翻訳団体: JF プロジェクト < http://www.linux.or.jp/JF/ >
|
||||||
翻訳æ¥ï¼ 2007/12/30
|
翻訳日: 2007/12/30
|
||||||
翻訳è
ï¼ Tsugikazu Shibata <tshibata at ab dot jp dot nec dot com>
|
翻訳者: Tsugikazu Shibata <tshibata at ab dot jp dot nec dot com>
|
||||||
æ ¡æ£è
ï¼ æ¦äºä¼¸å
ããã<takei at webmasters dot gr dot jp>
|
校正者: 武井伸光さん、<takei at webmasters dot gr dot jp>
|
||||||
ããããã (Seiji Kaneko) <skaneko at a2 dot mbn dot or dot jp>
|
かねこさん (Seiji Kaneko) <skaneko at a2 dot mbn dot or dot jp>
|
||||||
å°æ é
å
¸ãã (Masanori Kobayasi) <zap03216 at nifty dot ne dot jp>
|
小林 雅典さん (Masanori Kobayasi) <zap03216 at nifty dot ne dot jp>
|
||||||
éå£ãã (Kenji Noguchi) <tokyo246 at gmail dot com>
|
野口さん (Kenji Noguchi) <tokyo246 at gmail dot com>
|
||||||
ç¥å®®ä¿¡å¤ªéãã <jin at libjingu dot jp>
|
神宮信太郎さん <jin at libjingu dot jp>
|
||||||
==================================
|
==================================
|
||||||
|
|
||||||
ãã£ã¨ç¥ãããã£ã Linux 2.6 -stable ãªãªã¼ã¹ã®å
¨ã¦
|
ずっと知りたかった Linux 2.6 -stable リリースの全て
|
||||||
|
|
||||||
"-stable" ããªã¼ã«ã©ã®ãããªç¨®é¡ã®ããããåãå
¥ããããããã©ã®ãããª
|
"-stable" ツリーにどのような種類のパッチが受け入れられるか、どのような
|
||||||
ãã®ãåãå
¥ããããªãããã«ã¤ãã¦ã®è¦å-
|
ものが受け入れられないか、についての規則-
|
||||||
|
|
||||||
- æããã«æ£ããããã¹ãããã¦ãããã®ã§ãªããã°ãªããªãã
|
- 明らかに正しく、テストされているものでなければならない。
|
||||||
- æè(å¤æ´è¡ã®åå¾)ãå«ã㦠100 è¡ãã大ããã¦ã¯ãããªãã
|
- 文脈(変更行の前後)を含めて 100 行より大きくてはいけない。
|
||||||
- ãã ä¸åã®ãã¨ã ããä¿®æ£ãã¦ããã¹ãã
|
- ただ一個のことだけを修正しているべき。
|
||||||
- çãæ©ã¾ãã¦ããæ¬ç©ã®ãã°ãä¿®æ£ããªããã°ãªããªãã("ããã¯ãã°ã§
|
- 皆を悩ませている本物のバグを修正しなければならない。("これはバグで
|
||||||
ãããããããªãã..." ã®ãããªãã®ã§ã¯ãªã)
|
あるかもしれないが..." のようなものではない)
|
||||||
- ãã«ãã¨ã©ã¼(CONFIG_BROKENã«ãªã£ã¦ãããã®ãé¤ã), oops, ãã³ã°ããã¼
|
- ビルドエラー(CONFIG_BROKENになっているものを除く), oops, ハング、デー
|
||||||
ã¿ç ´å£ãç¾å®ã®ã»ãã¥ãªãã£åé¡ããã®ä» "ãããããã¯ãã¡ã ã"ã¨ãã
|
タ破壊、現実のセキュリティ問題、その他 "ああ、これはダメだね"という
|
||||||
ãããªãã®ãä¿®æ£ããªããã°ãªããªããçãè¨ãã°ãé大ãªåé¡ã
|
ようなものを修正しなければならない。短く言えば、重大な問題。
|
||||||
- ã©ã®ããã«ç«¶åç¶æ
ãçºçãããã®èª¬æãä¸ç·ã«æ¸ããã¦ããªãéãã
|
- どのように競合状態が発生するかの説明も一緒に書かれていない限り、
|
||||||
"çè«çã«ã¯ç«¶åç¶æ
ã«ãªã"ãããªãã®ã¯ä¸å¯ã
|
"理論的には競合状態になる"ようなものは不可。
|
||||||
- ãããªãäºç´°ãªä¿®æ£ãå«ãããã¨ã¯ã§ããªãã(ã¹ãã«ã®ä¿®æ£ã空ç½ã®ã¯ãªã¼
|
- いかなる些細な修正も含めることはできない。(スペルの修正、空白のクリー
|
||||||
ã³ã¢ãããªã©)
|
ンアップなど)
|
||||||
- 対å¿ãããµãã·ã¹ãã ã¡ã³ãããåãå
¥ãããã®ã§ãªããã°ãªããªãã
|
- 対応するサブシステムメンテナが受け入れたものでなければならない。
|
||||||
- Documentation/SubmittingPatches ã®è¦åã«å¾ã£ããã®ã§ãªããã°ãªããªãã
|
- Documentation/SubmittingPatches の規則に従ったものでなければならない。
|
||||||
|
|
||||||
-stable ããªã¼ã«ããããéä»ããæç¶ã-
|
-stable ツリーにパッチを送付する手続き-
|
||||||
|
|
||||||
- ä¸è¨ã®è¦åã«å¾ã£ã¦ãããã確èªããå¾ã«ãstable@kernel.org ã«ããã
|
- 上記の規則に従っているかを確認した後に、stable@kernel.org にパッチ
|
||||||
ãéãã
|
を送る。
|
||||||
- éä¿¡è
ã¯ãããããã¥ã¼ã«åãä»ããããéã«ã¯ ACK ããå´ä¸ãããå ´å
|
- 送信者はパッチがキューに受け付けられた際には ACK を、却下された場合
|
||||||
ã«ã¯ NAK ãåãåãããã®åå¿ã¯éçºè
ãã¡ã®ã¹ã±ã¸ã¥ã¼ã«ã«ãã£ã¦ãæ°
|
には NAK を受け取る。この反応は開発者たちのスケジュールによって、数
|
||||||
æ¥ãããå ´åãããã
|
日かかる場合がある。
|
||||||
- ããåãåããããããããã¯ä»ã®éçºè
ãã¡ã®ã¬ãã¥ã¼ã®ããã«
|
- もし受け取られたら、パッチは他の開発者たちのレビューのために
|
||||||
-stable ãã¥ã¼ã«è¿½å ãããã
|
-stable キューに追加される。
|
||||||
- ã»ãã¥ãªãã£ãããã¯ãã®ã¨ã¤ãªã¢ã¹ (stable@kernel.org) ã«éãããã¹
|
- セキュリティパッチはこのエイリアス (stable@kernel.org) に送られるべ
|
||||||
ãã§ã¯ãªãã代ããã« security@kernel.org ã®ã¢ãã¬ã¹ã«éãããã
|
きではなく、代わりに security@kernel.org のアドレスに送られる。
|
||||||
|
|
||||||
ã¬ãã¥ã¼ãµã¤ã¯ã«-
|
レビューサイクル-
|
||||||
|
|
||||||
- -stable ã¡ã³ãããã¬ãã¥ã¼ãµã¤ã¯ã«ã決ããã¨ãããããã¯ã¬ãã¥ã¼å§
|
- -stable メンテナがレビューサイクルを決めるとき、パッチはレビュー委
|
||||||
å¡ä¼ã¨ããããå½±é¿ããé åã®ã¡ã³ãã(æä¾è
ããã®é åã®ã¡ã³ããã§ç¡
|
員会とパッチが影響する領域のメンテナ(提供者がその領域のメンテナで無
|
||||||
ãéã)ã«éãããlinux-kernel ã¡ã¼ãªã³ã°ãªã¹ãã«CCãããã
|
い限り)に送られ、linux-kernel メーリングリストにCCされる。
|
||||||
- ã¬ãã¥ã¼å§å¡ä¼ã¯ 48æéã®éã« ACK ã NAK ãåºãã
|
- レビュー委員会は 48時間の間に ACK か NAK を出す。
|
||||||
- ããããããå§å¡ä¼ã®ã¡ã³ãããå´ä¸ããããã¡ã³ããéãã¡ã³ããæ°ä»
|
- もしパッチが委員会のメンバから却下されるか、メンテナ達やメンバが気付
|
||||||
ããªãã£ãåé¡ãæã¡ããããlinux-kernel ã¡ã³ãããããã«ç°è°ãå±ã
|
かなかった問題が持ちあがり、linux-kernel メンバがパッチに異議を唱え
|
||||||
ãå ´åã«ã¯ããããã¯ãã¥ã¼ããåé¤ãããã
|
た場合には、パッチはキューから削除される。
|
||||||
- ã¬ãã¥ã¼ãµã¤ã¯ã«ã®æå¾ã«ãACK ãåãããããã¯ææ°ã® -stable ãªãªã¼
|
- レビューサイクルの最後に、ACK を受けたパッチは最新の -stable リリー
|
||||||
ã¹ã«è¿½å ããããã®å¾ã«æ°ãã -stable ãªãªã¼ã¹ãè¡ãããã
|
スに追加され、その後に新しい -stable リリースが行われる。
|
||||||
- ã»ãã¥ãªãã£ãããã¯ãé常ã®ã¬ãã¥ã¼ãµã¤ã¯ã«ãéãããã»ãã¥ãªãã£
|
- セキュリティパッチは、通常のレビューサイクルを通らず、セキュリティ
|
||||||
ã«ã¼ãã«ãã¼ã ããç´æ¥ -stable ããªã¼ã«åãä»ããããã
|
カーネルチームから直接 -stable ツリーに受け付けられる。
|
||||||
ãã®æç¶ãã®è©³ç´°ã«ã¤ãã¦ã¯ kernel security ãã¼ã ã«åãåããããã¨ã
|
この手続きの詳細については kernel security チームに問い合わせること。
|
||||||
|
|
||||||
ã¬ãã¥ã¼å§å¡ä¼-
|
レビュー委員会-
|
||||||
|
|
||||||
- ãã®å§å¡ä¼ã¯ããã®ã¿ã¹ã¯ã«ã¤ãã¦æ´»åããå¤ãã®ãã©ã³ãã£ã¢ã¨ãå°æ°ã®
|
- この委員会は、このタスクについて活動する多くのボランティアと、少数の
|
||||||
éãã©ã³ãã£ã¢ã®ã«ã¼ãã«éçºè
éã§æ§æããã¦ããã
|
非ボランティアのカーネル開発者達で構成されている。
|
||||||
|
|
||||||
|
|
|
@ -138,7 +138,7 @@ and is between 256 and 4096 characters. It is defined in the file
|
||||||
strict -- Be less tolerant of platforms that are not
|
strict -- Be less tolerant of platforms that are not
|
||||||
strictly ACPI specification compliant.
|
strictly ACPI specification compliant.
|
||||||
|
|
||||||
See also Documentation/pm.txt, pci=noacpi
|
See also Documentation/power/pm.txt, pci=noacpi
|
||||||
|
|
||||||
acpi_apic_instance= [ACPI, IOAPIC]
|
acpi_apic_instance= [ACPI, IOAPIC]
|
||||||
Format: <int>
|
Format: <int>
|
||||||
|
@ -170,16 +170,8 @@ and is between 256 and 4096 characters. It is defined in the file
|
||||||
acpi_irq_isa= [HW,ACPI] If irq_balance, mark listed IRQs used by ISA
|
acpi_irq_isa= [HW,ACPI] If irq_balance, mark listed IRQs used by ISA
|
||||||
Format: <irq>,<irq>...
|
Format: <irq>,<irq>...
|
||||||
|
|
||||||
acpi_new_pts_ordering [HW,ACPI]
|
|
||||||
Enforce the ACPI 2.0 ordering of the _PTS control
|
|
||||||
method wrt putting devices into low power states
|
|
||||||
default: pre ACPI 2.0 ordering of _PTS
|
|
||||||
|
|
||||||
acpi_no_auto_ssdt [HW,ACPI] Disable automatic loading of SSDT
|
acpi_no_auto_ssdt [HW,ACPI] Disable automatic loading of SSDT
|
||||||
|
|
||||||
acpi_no_initrd_override [KNL,ACPI]
|
|
||||||
Disable loading custom ACPI tables from the initramfs
|
|
||||||
|
|
||||||
acpi_os_name= [HW,ACPI] Tell ACPI BIOS the name of the OS
|
acpi_os_name= [HW,ACPI] Tell ACPI BIOS the name of the OS
|
||||||
Format: To spoof as Windows 98: ="Microsoft Windows"
|
Format: To spoof as Windows 98: ="Microsoft Windows"
|
||||||
|
|
||||||
|
@ -374,6 +366,12 @@ and is between 256 and 4096 characters. It is defined in the file
|
||||||
possible to determine what the correct size should be.
|
possible to determine what the correct size should be.
|
||||||
This option provides an override for these situations.
|
This option provides an override for these situations.
|
||||||
|
|
||||||
|
security= [SECURITY] Choose a security module to enable at boot.
|
||||||
|
If this boot parameter is not specified, only the first
|
||||||
|
security module asking for security registration will be
|
||||||
|
loaded. An invalid security module name will be treated
|
||||||
|
as if no module has been chosen.
|
||||||
|
|
||||||
capability.disable=
|
capability.disable=
|
||||||
[SECURITY] Disable capabilities. This would normally
|
[SECURITY] Disable capabilities. This would normally
|
||||||
be used only if an alternative security model is to be
|
be used only if an alternative security model is to be
|
||||||
|
@ -383,6 +381,10 @@ and is between 256 and 4096 characters. It is defined in the file
|
||||||
ccw_timeout_log [S390]
|
ccw_timeout_log [S390]
|
||||||
See Documentation/s390/CommonIO for details.
|
See Documentation/s390/CommonIO for details.
|
||||||
|
|
||||||
|
cgroup_disable= [KNL] Disable a particular controller
|
||||||
|
Format: {name of the controller(s) to disable}
|
||||||
|
{Currently supported controllers - "memory"}
|
||||||
|
|
||||||
checkreqprot [SELINUX] Set initial checkreqprot flag value.
|
checkreqprot [SELINUX] Set initial checkreqprot flag value.
|
||||||
Format: { "0" | "1" }
|
Format: { "0" | "1" }
|
||||||
See security/selinux/Kconfig help text.
|
See security/selinux/Kconfig help text.
|
||||||
|
@ -712,7 +714,7 @@ and is between 256 and 4096 characters. It is defined in the file
|
||||||
Format: <cyl>,<head>,<sect>
|
Format: <cyl>,<head>,<sect>
|
||||||
|
|
||||||
hd?= [HW] (E)IDE subsystem
|
hd?= [HW] (E)IDE subsystem
|
||||||
hd?lun= See Documentation/ide.txt.
|
hd?lun= See Documentation/ide/ide.txt.
|
||||||
|
|
||||||
highmem=nn[KMG] [KNL,BOOT] forces the highmem zone to have an exact
|
highmem=nn[KMG] [KNL,BOOT] forces the highmem zone to have an exact
|
||||||
size of <nn>. This works even on boxes that have no
|
size of <nn>. This works even on boxes that have no
|
||||||
|
@ -735,6 +737,8 @@ and is between 256 and 4096 characters. It is defined in the file
|
||||||
(Don't attempt to blink the leds)
|
(Don't attempt to blink the leds)
|
||||||
i8042.noaux [HW] Don't check for auxiliary (== mouse) port
|
i8042.noaux [HW] Don't check for auxiliary (== mouse) port
|
||||||
i8042.nokbd [HW] Don't check/create keyboard port
|
i8042.nokbd [HW] Don't check/create keyboard port
|
||||||
|
i8042.noloop [HW] Disable the AUX Loopback command while probing
|
||||||
|
for the AUX port
|
||||||
i8042.nomux [HW] Don't check presence of an active multiplexing
|
i8042.nomux [HW] Don't check presence of an active multiplexing
|
||||||
controller
|
controller
|
||||||
i8042.nopnp [HW] Don't use ACPIPnP / PnPBIOS to discover KBD/AUX
|
i8042.nopnp [HW] Don't use ACPIPnP / PnPBIOS to discover KBD/AUX
|
||||||
|
@ -765,15 +769,15 @@ and is between 256 and 4096 characters. It is defined in the file
|
||||||
Format: <io>[,<membase>[,<icn_id>[,<icn_id2>]]]
|
Format: <io>[,<membase>[,<icn_id>[,<icn_id2>]]]
|
||||||
|
|
||||||
ide= [HW] (E)IDE subsystem
|
ide= [HW] (E)IDE subsystem
|
||||||
Format: ide=nodma or ide=doubler or ide=reverse
|
Format: ide=nodma or ide=doubler
|
||||||
See Documentation/ide.txt.
|
See Documentation/ide/ide.txt.
|
||||||
|
|
||||||
ide?= [HW] (E)IDE subsystem
|
ide?= [HW] (E)IDE subsystem
|
||||||
Format: ide?=noprobe or chipset specific parameters.
|
Format: ide?=ata66 or chipset specific parameters.
|
||||||
See Documentation/ide.txt.
|
See Documentation/ide/ide.txt.
|
||||||
|
|
||||||
idebus= [HW] (E)IDE subsystem - VLB/PCI bus speed
|
idebus= [HW] (E)IDE subsystem - VLB/PCI bus speed
|
||||||
See Documentation/ide.txt.
|
See Documentation/ide/ide.txt.
|
||||||
|
|
||||||
idle= [X86]
|
idle= [X86]
|
||||||
Format: idle=poll or idle=mwait
|
Format: idle=poll or idle=mwait
|
||||||
|
@ -814,6 +818,19 @@ and is between 256 and 4096 characters. It is defined in the file
|
||||||
|
|
||||||
inttest= [IA64]
|
inttest= [IA64]
|
||||||
|
|
||||||
|
iommu= [x86]
|
||||||
|
off
|
||||||
|
force
|
||||||
|
noforce
|
||||||
|
biomerge
|
||||||
|
panic
|
||||||
|
nopanic
|
||||||
|
merge
|
||||||
|
nomerge
|
||||||
|
forcesac
|
||||||
|
soft
|
||||||
|
|
||||||
|
|
||||||
intel_iommu= [DMAR] Intel IOMMU driver (DMAR) option
|
intel_iommu= [DMAR] Intel IOMMU driver (DMAR) option
|
||||||
off
|
off
|
||||||
Disable intel iommu driver.
|
Disable intel iommu driver.
|
||||||
|
@ -830,6 +847,10 @@ and is between 256 and 4096 characters. It is defined in the file
|
||||||
than 32 bit addressing. The default is to look
|
than 32 bit addressing. The default is to look
|
||||||
for translation below 32 bit and if not available
|
for translation below 32 bit and if not available
|
||||||
then look in the higher range.
|
then look in the higher range.
|
||||||
|
strict [Default Off]
|
||||||
|
With this option on every unmap_single operation will
|
||||||
|
result in a hardware IOTLB flush operation as opposed
|
||||||
|
to batching them for performance.
|
||||||
|
|
||||||
io_delay= [X86-32,X86-64] I/O delay method
|
io_delay= [X86-32,X86-64] I/O delay method
|
||||||
0x80
|
0x80
|
||||||
|
@ -846,7 +867,7 @@ and is between 256 and 4096 characters. It is defined in the file
|
||||||
arch/alpha/kernel/core_marvel.c.
|
arch/alpha/kernel/core_marvel.c.
|
||||||
|
|
||||||
ip= [IP_PNP]
|
ip= [IP_PNP]
|
||||||
See Documentation/nfsroot.txt.
|
See Documentation/filesystems/nfsroot.txt.
|
||||||
|
|
||||||
ip2= [HW] Set IO/IRQ pairs for up to 4 IntelliPort boards
|
ip2= [HW] Set IO/IRQ pairs for up to 4 IntelliPort boards
|
||||||
See comment before ip2_setup() in
|
See comment before ip2_setup() in
|
||||||
|
@ -930,8 +951,15 @@ and is between 256 and 4096 characters. It is defined in the file
|
||||||
kstack=N [X86-32,X86-64] Print N words from the kernel stack
|
kstack=N [X86-32,X86-64] Print N words from the kernel stack
|
||||||
in oops dumps.
|
in oops dumps.
|
||||||
|
|
||||||
|
kgdboc= [HW] kgdb over consoles.
|
||||||
|
Requires a tty driver that supports console polling.
|
||||||
|
(only serial suported for now)
|
||||||
|
Format: <serial_device>[,baud]
|
||||||
|
|
||||||
l2cr= [PPC]
|
l2cr= [PPC]
|
||||||
|
|
||||||
|
l3cr= [PPC]
|
||||||
|
|
||||||
lapic [X86-32,APIC] Enable the local APIC even if BIOS
|
lapic [X86-32,APIC] Enable the local APIC even if BIOS
|
||||||
disabled it.
|
disabled it.
|
||||||
|
|
||||||
|
@ -950,6 +978,41 @@ and is between 256 and 4096 characters. It is defined in the file
|
||||||
when set.
|
when set.
|
||||||
Format: <int>
|
Format: <int>
|
||||||
|
|
||||||
|
libata.force= [LIBATA] Force configurations. The format is comma
|
||||||
|
separated list of "[ID:]VAL" where ID is
|
||||||
|
PORT[:DEVICE]. PORT and DEVICE are decimal numbers
|
||||||
|
matching port, link or device. Basically, it matches
|
||||||
|
the ATA ID string printed on console by libata. If
|
||||||
|
the whole ID part is omitted, the last PORT and DEVICE
|
||||||
|
values are used. If ID hasn't been specified yet, the
|
||||||
|
configuration applies to all ports, links and devices.
|
||||||
|
|
||||||
|
If only DEVICE is omitted, the parameter applies to
|
||||||
|
the port and all links and devices behind it. DEVICE
|
||||||
|
number of 0 either selects the first device or the
|
||||||
|
first fan-out link behind PMP device. It does not
|
||||||
|
select the host link. DEVICE number of 15 selects the
|
||||||
|
host link and device attached to it.
|
||||||
|
|
||||||
|
The VAL specifies the configuration to force. As long
|
||||||
|
as there's no ambiguity shortcut notation is allowed.
|
||||||
|
For example, both 1.5 and 1.5G would work for 1.5Gbps.
|
||||||
|
The following configurations can be forced.
|
||||||
|
|
||||||
|
* Cable type: 40c, 80c, short40c, unk, ign or sata.
|
||||||
|
Any ID with matching PORT is used.
|
||||||
|
|
||||||
|
* SATA link speed limit: 1.5Gbps or 3.0Gbps.
|
||||||
|
|
||||||
|
* Transfer mode: pio[0-7], mwdma[0-4] and udma[0-7].
|
||||||
|
udma[/][16,25,33,44,66,100,133] notation is also
|
||||||
|
allowed.
|
||||||
|
|
||||||
|
* [no]ncq: Turn on or off NCQ.
|
||||||
|
|
||||||
|
If there are multiple matching configurations changing
|
||||||
|
the same attribute, the last one is used.
|
||||||
|
|
||||||
load_ramdisk= [RAM] List of ramdisks to load from floppy
|
load_ramdisk= [RAM] List of ramdisks to load from floppy
|
||||||
See Documentation/ramdisk.txt.
|
See Documentation/ramdisk.txt.
|
||||||
|
|
||||||
|
@ -1056,8 +1119,6 @@ and is between 256 and 4096 characters. It is defined in the file
|
||||||
[SCSI] Maximum number of LUNs received.
|
[SCSI] Maximum number of LUNs received.
|
||||||
Should be between 1 and 16384.
|
Should be between 1 and 16384.
|
||||||
|
|
||||||
mca-pentium [BUGS=X86-32]
|
|
||||||
|
|
||||||
mcatest= [IA-64]
|
mcatest= [IA-64]
|
||||||
|
|
||||||
mce [X86-32] Machine Check Exception
|
mce [X86-32] Machine Check Exception
|
||||||
|
@ -1098,6 +1159,15 @@ and is between 256 and 4096 characters. It is defined in the file
|
||||||
memmap=nn[KMG]$ss[KMG]
|
memmap=nn[KMG]$ss[KMG]
|
||||||
[KNL,ACPI] Mark specific memory as reserved.
|
[KNL,ACPI] Mark specific memory as reserved.
|
||||||
Region of memory to be used, from ss to ss+nn.
|
Region of memory to be used, from ss to ss+nn.
|
||||||
|
Example: Exclude memory from 0x18690000-0x1869ffff
|
||||||
|
memmap=64K$0x18690000
|
||||||
|
or
|
||||||
|
memmap=0x10000$0x18690000
|
||||||
|
|
||||||
|
memtest= [KNL,X86_64] Enable memtest
|
||||||
|
Format: <integer>
|
||||||
|
range: 0,4 : pattern number
|
||||||
|
default : 0 <disable>
|
||||||
|
|
||||||
meye.*= [HW] Set MotionEye Camera parameters
|
meye.*= [HW] Set MotionEye Camera parameters
|
||||||
See Documentation/video4linux/meye.txt.
|
See Documentation/video4linux/meye.txt.
|
||||||
|
@ -1163,10 +1233,10 @@ and is between 256 and 4096 characters. It is defined in the file
|
||||||
file if at all.
|
file if at all.
|
||||||
|
|
||||||
nfsaddrs= [NFS]
|
nfsaddrs= [NFS]
|
||||||
See Documentation/nfsroot.txt.
|
See Documentation/filesystems/nfsroot.txt.
|
||||||
|
|
||||||
nfsroot= [NFS] nfs root filesystem for disk-less boxes.
|
nfsroot= [NFS] nfs root filesystem for disk-less boxes.
|
||||||
See Documentation/nfsroot.txt.
|
See Documentation/filesystems/nfsroot.txt.
|
||||||
|
|
||||||
nfs.callback_tcpport=
|
nfs.callback_tcpport=
|
||||||
[NFS] set the TCP port on which the NFSv4 callback
|
[NFS] set the TCP port on which the NFSv4 callback
|
||||||
|
@ -1216,8 +1286,16 @@ and is between 256 and 4096 characters. It is defined in the file
|
||||||
noexec [IA-64]
|
noexec [IA-64]
|
||||||
|
|
||||||
noexec [X86-32,X86-64]
|
noexec [X86-32,X86-64]
|
||||||
|
On X86-32 available only on PAE configured kernels.
|
||||||
noexec=on: enable non-executable mappings (default)
|
noexec=on: enable non-executable mappings (default)
|
||||||
noexec=off: disable nn-executable mappings
|
noexec=off: disable non-executable mappings
|
||||||
|
|
||||||
|
noexec32 [X86-64]
|
||||||
|
This affects only 32-bit executables.
|
||||||
|
noexec32=on: enable non-executable mappings (default)
|
||||||
|
read doesn't imply executable mappings
|
||||||
|
noexec32=off: disable non-executable mappings
|
||||||
|
read implies executable mappings
|
||||||
|
|
||||||
nofxsr [BUGS=X86-32] Disables x86 floating point extended
|
nofxsr [BUGS=X86-32] Disables x86 floating point extended
|
||||||
register save and restore. The kernel will only save
|
register save and restore. The kernel will only save
|
||||||
|
@ -1304,6 +1382,10 @@ and is between 256 and 4096 characters. It is defined in the file
|
||||||
|
|
||||||
nowb [ARM]
|
nowb [ARM]
|
||||||
|
|
||||||
|
nptcg= [IA64] Override max number of concurrent global TLB
|
||||||
|
purges which is reported from either PAL_VM_SUMMARY or
|
||||||
|
SAL PALO.
|
||||||
|
|
||||||
numa_zonelist_order= [KNL, BOOT] Select zonelist order for NUMA.
|
numa_zonelist_order= [KNL, BOOT] Select zonelist order for NUMA.
|
||||||
one of ['zone', 'node', 'default'] can be specified
|
one of ['zone', 'node', 'default'] can be specified
|
||||||
This can be set from sysctl after boot.
|
This can be set from sysctl after boot.
|
||||||
|
@ -1393,10 +1475,6 @@ and is between 256 and 4096 characters. It is defined in the file
|
||||||
nomsi [MSI] If the PCI_MSI kernel config parameter is
|
nomsi [MSI] If the PCI_MSI kernel config parameter is
|
||||||
enabled, this kernel boot option can be used to
|
enabled, this kernel boot option can be used to
|
||||||
disable the use of MSI interrupts system-wide.
|
disable the use of MSI interrupts system-wide.
|
||||||
nosort [X86-32] Don't sort PCI devices according to
|
|
||||||
order given by the PCI BIOS. This sorting is
|
|
||||||
done to get a device order compatible with
|
|
||||||
older kernels.
|
|
||||||
biosirq [X86-32] Use PCI BIOS calls to get the interrupt
|
biosirq [X86-32] Use PCI BIOS calls to get the interrupt
|
||||||
routing table. These calls are known to be buggy
|
routing table. These calls are known to be buggy
|
||||||
on several machines and they hang the machine
|
on several machines and they hang the machine
|
||||||
|
|
|
@ -192,7 +192,8 @@ code mapping.
|
||||||
The Kprobes API includes a "register" function and an "unregister"
|
The Kprobes API includes a "register" function and an "unregister"
|
||||||
function for each type of probe. Here are terse, mini-man-page
|
function for each type of probe. Here are terse, mini-man-page
|
||||||
specifications for these functions and the associated probe handlers
|
specifications for these functions and the associated probe handlers
|
||||||
that you'll write. See the latter half of this document for examples.
|
that you'll write. See the files in the samples/kprobes/ sub-directory
|
||||||
|
for examples.
|
||||||
|
|
||||||
4.1 register_kprobe
|
4.1 register_kprobe
|
||||||
|
|
||||||
|
@ -420,249 +421,15 @@ e. Watchpoint probes (which fire on data references).
|
||||||
|
|
||||||
8. Kprobes Example
|
8. Kprobes Example
|
||||||
|
|
||||||
Here's a sample kernel module showing the use of kprobes to dump a
|
See samples/kprobes/kprobe_example.c
|
||||||
stack trace and selected i386 registers when do_fork() is called.
|
|
||||||
----- cut here -----
|
|
||||||
/*kprobe_example.c*/
|
|
||||||
#include <linux/kernel.h>
|
|
||||||
#include <linux/module.h>
|
|
||||||
#include <linux/kprobes.h>
|
|
||||||
#include <linux/sched.h>
|
|
||||||
|
|
||||||
/*For each probe you need to allocate a kprobe structure*/
|
|
||||||
static struct kprobe kp;
|
|
||||||
|
|
||||||
/*kprobe pre_handler: called just before the probed instruction is executed*/
|
|
||||||
int handler_pre(struct kprobe *p, struct pt_regs *regs)
|
|
||||||
{
|
|
||||||
printk("pre_handler: p->addr=0x%p, eip=%lx, eflags=0x%lx\n",
|
|
||||||
p->addr, regs->eip, regs->eflags);
|
|
||||||
dump_stack();
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*kprobe post_handler: called after the probed instruction is executed*/
|
|
||||||
void handler_post(struct kprobe *p, struct pt_regs *regs, unsigned long flags)
|
|
||||||
{
|
|
||||||
printk("post_handler: p->addr=0x%p, eflags=0x%lx\n",
|
|
||||||
p->addr, regs->eflags);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* fault_handler: this is called if an exception is generated for any
|
|
||||||
* instruction within the pre- or post-handler, or when Kprobes
|
|
||||||
* single-steps the probed instruction.
|
|
||||||
*/
|
|
||||||
int handler_fault(struct kprobe *p, struct pt_regs *regs, int trapnr)
|
|
||||||
{
|
|
||||||
printk("fault_handler: p->addr=0x%p, trap #%dn",
|
|
||||||
p->addr, trapnr);
|
|
||||||
/* Return 0 because we don't handle the fault. */
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
static int __init kprobe_init(void)
|
|
||||||
{
|
|
||||||
int ret;
|
|
||||||
kp.pre_handler = handler_pre;
|
|
||||||
kp.post_handler = handler_post;
|
|
||||||
kp.fault_handler = handler_fault;
|
|
||||||
kp.symbol_name = "do_fork";
|
|
||||||
|
|
||||||
ret = register_kprobe(&kp);
|
|
||||||
if (ret < 0) {
|
|
||||||
printk("register_kprobe failed, returned %d\n", ret);
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
printk("kprobe registered\n");
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void __exit kprobe_exit(void)
|
|
||||||
{
|
|
||||||
unregister_kprobe(&kp);
|
|
||||||
printk("kprobe unregistered\n");
|
|
||||||
}
|
|
||||||
|
|
||||||
module_init(kprobe_init)
|
|
||||||
module_exit(kprobe_exit)
|
|
||||||
MODULE_LICENSE("GPL");
|
|
||||||
----- cut here -----
|
|
||||||
|
|
||||||
You can build the kernel module, kprobe-example.ko, using the following
|
|
||||||
Makefile:
|
|
||||||
----- cut here -----
|
|
||||||
obj-m := kprobe-example.o
|
|
||||||
KDIR := /lib/modules/$(shell uname -r)/build
|
|
||||||
PWD := $(shell pwd)
|
|
||||||
default:
|
|
||||||
$(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules
|
|
||||||
clean:
|
|
||||||
rm -f *.mod.c *.ko *.o
|
|
||||||
----- cut here -----
|
|
||||||
|
|
||||||
$ make
|
|
||||||
$ su -
|
|
||||||
...
|
|
||||||
# insmod kprobe-example.ko
|
|
||||||
|
|
||||||
You will see the trace data in /var/log/messages and on the console
|
|
||||||
whenever do_fork() is invoked to create a new process.
|
|
||||||
|
|
||||||
9. Jprobes Example
|
9. Jprobes Example
|
||||||
|
|
||||||
Here's a sample kernel module showing the use of jprobes to dump
|
See samples/kprobes/jprobe_example.c
|
||||||
the arguments of do_fork().
|
|
||||||
----- cut here -----
|
|
||||||
/*jprobe-example.c */
|
|
||||||
#include <linux/kernel.h>
|
|
||||||
#include <linux/module.h>
|
|
||||||
#include <linux/fs.h>
|
|
||||||
#include <linux/uio.h>
|
|
||||||
#include <linux/kprobes.h>
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Jumper probe for do_fork.
|
|
||||||
* Mirror principle enables access to arguments of the probed routine
|
|
||||||
* from the probe handler.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* Proxy routine having the same arguments as actual do_fork() routine */
|
|
||||||
long jdo_fork(unsigned long clone_flags, unsigned long stack_start,
|
|
||||||
struct pt_regs *regs, unsigned long stack_size,
|
|
||||||
int __user * parent_tidptr, int __user * child_tidptr)
|
|
||||||
{
|
|
||||||
printk("jprobe: clone_flags=0x%lx, stack_size=0x%lx, regs=0x%p\n",
|
|
||||||
clone_flags, stack_size, regs);
|
|
||||||
/* Always end with a call to jprobe_return(). */
|
|
||||||
jprobe_return();
|
|
||||||
/*NOTREACHED*/
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
static struct jprobe my_jprobe = {
|
|
||||||
.entry = jdo_fork
|
|
||||||
};
|
|
||||||
|
|
||||||
static int __init jprobe_init(void)
|
|
||||||
{
|
|
||||||
int ret;
|
|
||||||
my_jprobe.kp.symbol_name = "do_fork";
|
|
||||||
|
|
||||||
if ((ret = register_jprobe(&my_jprobe)) <0) {
|
|
||||||
printk("register_jprobe failed, returned %d\n", ret);
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
printk("Planted jprobe at %p, handler addr %p\n",
|
|
||||||
my_jprobe.kp.addr, my_jprobe.entry);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void __exit jprobe_exit(void)
|
|
||||||
{
|
|
||||||
unregister_jprobe(&my_jprobe);
|
|
||||||
printk("jprobe unregistered\n");
|
|
||||||
}
|
|
||||||
|
|
||||||
module_init(jprobe_init)
|
|
||||||
module_exit(jprobe_exit)
|
|
||||||
MODULE_LICENSE("GPL");
|
|
||||||
----- cut here -----
|
|
||||||
|
|
||||||
Build and insert the kernel module as shown in the above kprobe
|
|
||||||
example. You will see the trace data in /var/log/messages and on
|
|
||||||
the console whenever do_fork() is invoked to create a new process.
|
|
||||||
(Some messages may be suppressed if syslogd is configured to
|
|
||||||
eliminate duplicate messages.)
|
|
||||||
|
|
||||||
10. Kretprobes Example
|
10. Kretprobes Example
|
||||||
|
|
||||||
Here's a sample kernel module showing the use of return probes to
|
See samples/kprobes/kretprobe_example.c
|
||||||
report failed calls to sys_open().
|
|
||||||
----- cut here -----
|
|
||||||
/*kretprobe-example.c*/
|
|
||||||
#include <linux/kernel.h>
|
|
||||||
#include <linux/module.h>
|
|
||||||
#include <linux/kprobes.h>
|
|
||||||
#include <linux/ktime.h>
|
|
||||||
|
|
||||||
/* per-instance private data */
|
|
||||||
struct my_data {
|
|
||||||
ktime_t entry_stamp;
|
|
||||||
};
|
|
||||||
|
|
||||||
static const char *probed_func = "sys_open";
|
|
||||||
|
|
||||||
/* Timestamp function entry. */
|
|
||||||
static int entry_handler(struct kretprobe_instance *ri, struct pt_regs *regs)
|
|
||||||
{
|
|
||||||
struct my_data *data;
|
|
||||||
|
|
||||||
if(!current->mm)
|
|
||||||
return 1; /* skip kernel threads */
|
|
||||||
|
|
||||||
data = (struct my_data *)ri->data;
|
|
||||||
data->entry_stamp = ktime_get();
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* If the probed function failed, log the return value and duration.
|
|
||||||
* Duration may turn out to be zero consistently, depending upon the
|
|
||||||
* granularity of time accounting on the platform. */
|
|
||||||
static int return_handler(struct kretprobe_instance *ri, struct pt_regs *regs)
|
|
||||||
{
|
|
||||||
int retval = regs_return_value(regs);
|
|
||||||
struct my_data *data = (struct my_data *)ri->data;
|
|
||||||
s64 delta;
|
|
||||||
ktime_t now;
|
|
||||||
|
|
||||||
if (retval < 0) {
|
|
||||||
now = ktime_get();
|
|
||||||
delta = ktime_to_ns(ktime_sub(now, data->entry_stamp));
|
|
||||||
printk("%s: return val = %d (duration = %lld ns)\n",
|
|
||||||
probed_func, retval, delta);
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
static struct kretprobe my_kretprobe = {
|
|
||||||
.handler = return_handler,
|
|
||||||
.entry_handler = entry_handler,
|
|
||||||
.data_size = sizeof(struct my_data),
|
|
||||||
.maxactive = 20, /* probe up to 20 instances concurrently */
|
|
||||||
};
|
|
||||||
|
|
||||||
static int __init kretprobe_init(void)
|
|
||||||
{
|
|
||||||
int ret;
|
|
||||||
my_kretprobe.kp.symbol_name = (char *)probed_func;
|
|
||||||
|
|
||||||
if ((ret = register_kretprobe(&my_kretprobe)) < 0) {
|
|
||||||
printk("register_kretprobe failed, returned %d\n", ret);
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
printk("Kretprobe active on %s\n", my_kretprobe.kp.symbol_name);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void __exit kretprobe_exit(void)
|
|
||||||
{
|
|
||||||
unregister_kretprobe(&my_kretprobe);
|
|
||||||
printk("kretprobe unregistered\n");
|
|
||||||
/* nmissed > 0 suggests that maxactive was set too low. */
|
|
||||||
printk("Missed probing %d instances of %s\n",
|
|
||||||
my_kretprobe.nmissed, probed_func);
|
|
||||||
}
|
|
||||||
|
|
||||||
module_init(kretprobe_init)
|
|
||||||
module_exit(kretprobe_exit)
|
|
||||||
MODULE_LICENSE("GPL");
|
|
||||||
----- cut here -----
|
|
||||||
|
|
||||||
Build and insert the kernel module as shown in the above kprobe
|
|
||||||
example. You will see the trace data in /var/log/messages and on the
|
|
||||||
console whenever sys_open() returns a negative value. (Some messages
|
|
||||||
may be suppressed if syslogd is configured to eliminate duplicate
|
|
||||||
messages.)
|
|
||||||
|
|
||||||
For additional information on Kprobes, refer to the following URLs:
|
For additional information on Kprobes, refer to the following URLs:
|
||||||
http://www-106.ibm.com/developerworks/library/l-kprobes.html?ca=dgr-lnxw42Kprobe
|
http://www-106.ibm.com/developerworks/library/l-kprobes.html?ca=dgr-lnxw42Kprobe
|
||||||
|
|
|
@ -2,6 +2,8 @@
|
||||||
- This file
|
- This file
|
||||||
acer-wmi.txt
|
acer-wmi.txt
|
||||||
- information on the Acer Laptop WMI Extras driver.
|
- information on the Acer Laptop WMI Extras driver.
|
||||||
|
laptop-mode.txt
|
||||||
|
- how to conserve battery power using laptop-mode.
|
||||||
sony-laptop.txt
|
sony-laptop.txt
|
||||||
- Sony Notebook Control Driver (SNC) Readme.
|
- Sony Notebook Control Driver (SNC) Readme.
|
||||||
sonypi.txt
|
sonypi.txt
|
||||||
|
|
|
@ -48,7 +48,7 @@ DSDT.
|
||||||
|
|
||||||
To send me the DSDT, as root/sudo:
|
To send me the DSDT, as root/sudo:
|
||||||
|
|
||||||
cat /sys/firmware/acpi/DSDT > dsdt
|
cat /sys/firmware/acpi/tables/DSDT > dsdt
|
||||||
|
|
||||||
And send me the resulting 'dsdt' file.
|
And send me the resulting 'dsdt' file.
|
||||||
|
|
||||||
|
@ -80,7 +80,7 @@ once you enable the radio, will depend on your hardware and driver combination.
|
||||||
e.g. With the BCM4318 on the Acer Aspire 5020 series:
|
e.g. With the BCM4318 on the Acer Aspire 5020 series:
|
||||||
|
|
||||||
ndiswrapper: Light blinks on when transmitting
|
ndiswrapper: Light blinks on when transmitting
|
||||||
bcm43xx/b43: Solid light, blinks off when transmitting
|
b43: Solid light, blinks off when transmitting
|
||||||
|
|
||||||
Wireless radio control is unconditionally enabled - all Acer laptops that support
|
Wireless radio control is unconditionally enabled - all Acer laptops that support
|
||||||
acer-wmi come with built-in wireless. However, should you feel so inclined to
|
acer-wmi come with built-in wireless. However, should you feel so inclined to
|
||||||
|
@ -169,7 +169,7 @@ can be added to acer-wmi.
|
||||||
|
|
||||||
The LED is exposed through the LED subsystem, and can be found in:
|
The LED is exposed through the LED subsystem, and can be found in:
|
||||||
|
|
||||||
/sys/devices/platform/acer-wmi/leds/acer-mail:green/
|
/sys/devices/platform/acer-wmi/leds/acer-wmi::mail/
|
||||||
|
|
||||||
The mail LED is autodetected, so if you don't have one, the LED device won't
|
The mail LED is autodetected, so if you don't have one, the LED device won't
|
||||||
be registered.
|
be registered.
|
||||||
|
|
|
@ -160,7 +160,7 @@ Hot keys
|
||||||
procfs: /proc/acpi/ibm/hotkey
|
procfs: /proc/acpi/ibm/hotkey
|
||||||
sysfs device attribute: hotkey_*
|
sysfs device attribute: hotkey_*
|
||||||
|
|
||||||
In a ThinkPad, the ACPI HKEY handler is responsible for comunicating
|
In a ThinkPad, the ACPI HKEY handler is responsible for communicating
|
||||||
some important events and also keyboard hot key presses to the operating
|
some important events and also keyboard hot key presses to the operating
|
||||||
system. Enabling the hotkey functionality of thinkpad-acpi signals the
|
system. Enabling the hotkey functionality of thinkpad-acpi signals the
|
||||||
firmware that such a driver is present, and modifies how the ThinkPad
|
firmware that such a driver is present, and modifies how the ThinkPad
|
||||||
|
@ -193,7 +193,7 @@ Not all bits in the mask can be modified. Not all bits that can be
|
||||||
modified do anything. Not all hot keys can be individually controlled
|
modified do anything. Not all hot keys can be individually controlled
|
||||||
by the mask. Some models do not support the mask at all, and in those
|
by the mask. Some models do not support the mask at all, and in those
|
||||||
models, hot keys cannot be controlled individually. The behaviour of
|
models, hot keys cannot be controlled individually. The behaviour of
|
||||||
the mask is, therefore, higly dependent on the ThinkPad model.
|
the mask is, therefore, highly dependent on the ThinkPad model.
|
||||||
|
|
||||||
Note that unmasking some keys prevents their default behavior. For
|
Note that unmasking some keys prevents their default behavior. For
|
||||||
example, if Fn+F5 is unmasked, that key will no longer enable/disable
|
example, if Fn+F5 is unmasked, that key will no longer enable/disable
|
||||||
|
@ -288,7 +288,7 @@ sysfs notes:
|
||||||
in ACPI event mode, volume up/down/mute are reported as
|
in ACPI event mode, volume up/down/mute are reported as
|
||||||
separate events, but this behaviour may be corrected in
|
separate events, but this behaviour may be corrected in
|
||||||
future releases of this driver, in which case the
|
future releases of this driver, in which case the
|
||||||
ThinkPad volume mixer user interface semanthics will be
|
ThinkPad volume mixer user interface semantics will be
|
||||||
enforced.
|
enforced.
|
||||||
|
|
||||||
hotkey_poll_freq:
|
hotkey_poll_freq:
|
||||||
|
@ -306,13 +306,20 @@ sysfs notes:
|
||||||
The recommended polling frequency is 10Hz.
|
The recommended polling frequency is 10Hz.
|
||||||
|
|
||||||
hotkey_radio_sw:
|
hotkey_radio_sw:
|
||||||
if the ThinkPad has a hardware radio switch, this
|
If the ThinkPad has a hardware radio switch, this
|
||||||
attribute will read 0 if the switch is in the "radios
|
attribute will read 0 if the switch is in the "radios
|
||||||
disabled" postition, and 1 if the switch is in the
|
disabled" position, and 1 if the switch is in the
|
||||||
"radios enabled" position.
|
"radios enabled" position.
|
||||||
|
|
||||||
This attribute has poll()/select() support.
|
This attribute has poll()/select() support.
|
||||||
|
|
||||||
|
hotkey_tablet_mode:
|
||||||
|
If the ThinkPad has tablet capabilities, this attribute
|
||||||
|
will read 0 if the ThinkPad is in normal mode, and
|
||||||
|
1 if the ThinkPad is in tablet mode.
|
||||||
|
|
||||||
|
This attribute has poll()/select() support.
|
||||||
|
|
||||||
hotkey_report_mode:
|
hotkey_report_mode:
|
||||||
Returns the state of the procfs ACPI event report mode
|
Returns the state of the procfs ACPI event report mode
|
||||||
filter for hot keys. If it is set to 1 (the default),
|
filter for hot keys. If it is set to 1 (the default),
|
||||||
|
@ -339,7 +346,7 @@ sysfs notes:
|
||||||
wakeup_hotunplug_complete:
|
wakeup_hotunplug_complete:
|
||||||
Set to 1 if the system was waken up because of an
|
Set to 1 if the system was waken up because of an
|
||||||
undock or bay ejection request, and that request
|
undock or bay ejection request, and that request
|
||||||
was sucessfully completed. At this point, it might
|
was successfully completed. At this point, it might
|
||||||
be useful to send the system back to sleep, at the
|
be useful to send the system back to sleep, at the
|
||||||
user's choice. Refer to HKEY events 0x4003 and
|
user's choice. Refer to HKEY events 0x4003 and
|
||||||
0x3003, below.
|
0x3003, below.
|
||||||
|
@ -392,7 +399,7 @@ event code Key Notes
|
||||||
Lenovo: battery
|
Lenovo: battery
|
||||||
|
|
||||||
0x1004 0x03 FN+F4 Sleep button (ACPI sleep button
|
0x1004 0x03 FN+F4 Sleep button (ACPI sleep button
|
||||||
semanthics, i.e. sleep-to-RAM).
|
semantics, i.e. sleep-to-RAM).
|
||||||
It is always generate some kind
|
It is always generate some kind
|
||||||
of event, either the hot key
|
of event, either the hot key
|
||||||
event or a ACPI sleep button
|
event or a ACPI sleep button
|
||||||
|
@ -403,12 +410,12 @@ event code Key Notes
|
||||||
time passes.
|
time passes.
|
||||||
|
|
||||||
0x1005 0x04 FN+F5 Radio. Enables/disables
|
0x1005 0x04 FN+F5 Radio. Enables/disables
|
||||||
the internal BlueTooth hardware
|
the internal Bluetooth hardware
|
||||||
and W-WAN card if left in control
|
and W-WAN card if left in control
|
||||||
of the firmware. Does not affect
|
of the firmware. Does not affect
|
||||||
the WLAN card.
|
the WLAN card.
|
||||||
Should be used to turn on/off all
|
Should be used to turn on/off all
|
||||||
radios (bluetooth+W-WAN+WLAN),
|
radios (Bluetooth+W-WAN+WLAN),
|
||||||
really.
|
really.
|
||||||
|
|
||||||
0x1006 0x05 FN+F6 -
|
0x1006 0x05 FN+F6 -
|
||||||
|
@ -417,7 +424,7 @@ event code Key Notes
|
||||||
Do you feel lucky today?
|
Do you feel lucky today?
|
||||||
|
|
||||||
0x1008 0x07 FN+F8 IBM: toggle screen expand
|
0x1008 0x07 FN+F8 IBM: toggle screen expand
|
||||||
Lenovo: configure ultranav
|
Lenovo: configure UltraNav
|
||||||
|
|
||||||
0x1009 0x08 FN+F9 -
|
0x1009 0x08 FN+F9 -
|
||||||
.. .. ..
|
.. .. ..
|
||||||
|
@ -447,7 +454,7 @@ event code Key Notes
|
||||||
0x1011 0x10 FN+END Brightness down. See brightness
|
0x1011 0x10 FN+END Brightness down. See brightness
|
||||||
up for details.
|
up for details.
|
||||||
|
|
||||||
0x1012 0x11 FN+PGUP Thinklight toggle. This key is
|
0x1012 0x11 FN+PGUP ThinkLight toggle. This key is
|
||||||
always handled by the firmware,
|
always handled by the firmware,
|
||||||
even when unmasked.
|
even when unmasked.
|
||||||
|
|
||||||
|
@ -469,7 +476,7 @@ event code Key Notes
|
||||||
key is always handled by the
|
key is always handled by the
|
||||||
firmware, even when unmasked.
|
firmware, even when unmasked.
|
||||||
|
|
||||||
0x1018 0x17 THINKPAD Thinkpad/Access IBM/Lenovo key
|
0x1018 0x17 THINKPAD ThinkPad/Access IBM/Lenovo key
|
||||||
|
|
||||||
0x1019 0x18 unknown
|
0x1019 0x18 unknown
|
||||||
.. .. ..
|
.. .. ..
|
||||||
|
@ -488,9 +495,17 @@ If a key is mapped to KEY_UNKNOWN, it generates an input event that
|
||||||
includes an scan code. If a key is mapped to anything else, it will
|
includes an scan code. If a key is mapped to anything else, it will
|
||||||
generate input device EV_KEY events.
|
generate input device EV_KEY events.
|
||||||
|
|
||||||
|
In addition to the EV_KEY events, thinkpad-acpi may also issue EV_SW
|
||||||
|
events for switches:
|
||||||
|
|
||||||
|
SW_RADIO T60 and later hardare rfkill rocker switch
|
||||||
|
SW_TABLET_MODE Tablet ThinkPads HKEY events 0x5009 and 0x500A
|
||||||
|
|
||||||
Non hot-key ACPI HKEY event map:
|
Non hot-key ACPI HKEY event map:
|
||||||
0x5001 Lid closed
|
0x5001 Lid closed
|
||||||
0x5002 Lid opened
|
0x5002 Lid opened
|
||||||
|
0x5009 Tablet swivel: switched to tablet mode
|
||||||
|
0x500A Tablet swivel: switched to normal mode
|
||||||
0x7000 Radio Switch may have changed state
|
0x7000 Radio Switch may have changed state
|
||||||
|
|
||||||
The above events are not propagated by the driver, except for legacy
|
The above events are not propagated by the driver, except for legacy
|
||||||
|
@ -505,9 +520,7 @@ The above events are never propagated by the driver.
|
||||||
|
|
||||||
0x3003 Bay ejection (see 0x2x05) complete, can sleep again
|
0x3003 Bay ejection (see 0x2x05) complete, can sleep again
|
||||||
0x4003 Undocked (see 0x2x04), can sleep again
|
0x4003 Undocked (see 0x2x04), can sleep again
|
||||||
0x5009 Tablet swivel: switched to tablet mode
|
0x500B Tablet pen inserted into its storage bay
|
||||||
0x500A Tablet swivel: switched to normal mode
|
|
||||||
0x500B Tablet pen insterted into its storage bay
|
|
||||||
0x500C Tablet pen removed from its storage bay
|
0x500C Tablet pen removed from its storage bay
|
||||||
0x5010 Brightness level changed (newer Lenovo BIOSes)
|
0x5010 Brightness level changed (newer Lenovo BIOSes)
|
||||||
|
|
||||||
|
@ -539,7 +552,7 @@ sysfs (it is read-only).
|
||||||
If the hotkey_report_mode module parameter is set to 1 or 2, it cannot
|
If the hotkey_report_mode module parameter is set to 1 or 2, it cannot
|
||||||
be changed later through sysfs (any writes will return -EPERM to signal
|
be changed later through sysfs (any writes will return -EPERM to signal
|
||||||
that hotkey_report_mode was locked. On 2.6.23 and later, where
|
that hotkey_report_mode was locked. On 2.6.23 and later, where
|
||||||
hotkey_report_mode cannot be changed at all, writes will return -EACES).
|
hotkey_report_mode cannot be changed at all, writes will return -EACCES).
|
||||||
|
|
||||||
hotkey_report_mode set to 1 makes the driver export through the procfs
|
hotkey_report_mode set to 1 makes the driver export through the procfs
|
||||||
ACPI event interface all hot key presses (which are *also* sent to the
|
ACPI event interface all hot key presses (which are *also* sent to the
|
||||||
|
@ -584,7 +597,7 @@ 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 superseeded by the
|
Note: this interface will be probably be superseded by the
|
||||||
generic rfkill class, so it is NOT to be considered stable yet.
|
generic rfkill class, so it is NOT to be considered stable yet.
|
||||||
|
|
||||||
Video output control -- /proc/acpi/ibm/video
|
Video output control -- /proc/acpi/ibm/video
|
||||||
|
@ -791,12 +804,12 @@ on the X40 (tpb is the ThinkPad Buttons utility):
|
||||||
1 - Related to "Volume up" key press
|
1 - Related to "Volume up" key press
|
||||||
2 - Related to "Mute on" key press
|
2 - Related to "Mute on" key press
|
||||||
3 - Related to "Access IBM" key press
|
3 - Related to "Access IBM" key press
|
||||||
4 - Related to "LCD brightness up" key pess
|
4 - Related to "LCD brightness up" key press
|
||||||
5 - Related to "LCD brightness down" key press
|
5 - Related to "LCD brightness down" key press
|
||||||
11 - Related to "toggle screen expansion" key press/function
|
11 - Related to "toggle screen expansion" key press/function
|
||||||
12 - Related to "ThinkLight on"
|
12 - Related to "ThinkLight on"
|
||||||
13 - Related to "ThinkLight off"
|
13 - Related to "ThinkLight off"
|
||||||
14 - Related to "ThinkLight" key press (toggle thinklight)
|
14 - Related to "ThinkLight" key press (toggle ThinkLight)
|
||||||
|
|
||||||
The cmos command interface is prone to firmware split-brain problems, as
|
The cmos command interface is prone to firmware split-brain problems, as
|
||||||
in newer ThinkPads it is just a compatibility layer. Do not use it, it is
|
in newer ThinkPads it is just a compatibility layer. Do not use it, it is
|
||||||
|
@ -1024,7 +1037,7 @@ There are two interfaces to the firmware for direct brightness control,
|
||||||
EC and CMOS. To select which one should be used, use the
|
EC and CMOS. To select which one should be used, use the
|
||||||
brightness_mode module parameter: brightness_mode=1 selects EC mode,
|
brightness_mode module parameter: brightness_mode=1 selects EC mode,
|
||||||
brightness_mode=2 selects CMOS mode, brightness_mode=3 selects both EC
|
brightness_mode=2 selects CMOS mode, brightness_mode=3 selects both EC
|
||||||
and CMOS. The driver tries to autodetect which interface to use.
|
and CMOS. The driver tries to auto-detect which interface to use.
|
||||||
|
|
||||||
When display backlight brightness controls are available through the
|
When display backlight brightness controls are available through the
|
||||||
standard ACPI interface, it is best to use it instead of this direct
|
standard ACPI interface, it is best to use it instead of this direct
|
||||||
|
@ -1266,8 +1279,8 @@ experimental=1 parameter when loading the module.
|
||||||
This feature shows the presence and current state of a W-WAN (Sierra
|
This feature shows the presence and current state of a W-WAN (Sierra
|
||||||
Wireless EV-DO) device.
|
Wireless EV-DO) device.
|
||||||
|
|
||||||
It was tested on a Lenovo Thinkpad X60. It should probably work on other
|
It was tested on a Lenovo ThinkPad X60. It should probably work on other
|
||||||
Thinkpad models which come with this module installed.
|
ThinkPad models which come with this module installed.
|
||||||
|
|
||||||
Procfs notes:
|
Procfs notes:
|
||||||
|
|
||||||
|
@ -1286,7 +1299,7 @@ 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 superseeded by the
|
Note: this interface will be probably be superseded by the
|
||||||
generic rfkill class, so it is NOT to be considered stable yet.
|
generic rfkill class, so it is NOT to be considered stable yet.
|
||||||
|
|
||||||
Multiple Commands, Module Parameters
|
Multiple Commands, Module Parameters
|
||||||
|
@ -1309,7 +1322,7 @@ Enabling debugging output
|
||||||
The module takes a debug parameter which can be used to selectively
|
The module takes a debug parameter which can be used to selectively
|
||||||
enable various classes of debugging output, for example:
|
enable various classes of debugging output, for example:
|
||||||
|
|
||||||
modprobe ibm_acpi debug=0xffff
|
modprobe thinkpad_acpi debug=0xffff
|
||||||
|
|
||||||
will enable all debugging output classes. It takes a bitmask, so
|
will enable all debugging output classes. It takes a bitmask, so
|
||||||
to enable more than one output class, just add their values.
|
to enable more than one output class, just add their values.
|
||||||
|
@ -1356,7 +1369,7 @@ Sysfs interface changelog:
|
||||||
NVRAM is compiled out by the user because it is
|
NVRAM is compiled out by the user because it is
|
||||||
unneeded/undesired in the first place).
|
unneeded/undesired in the first place).
|
||||||
0x020101: Marker for thinkpad-acpi with hot key NVRAM polling
|
0x020101: Marker for thinkpad-acpi with hot key NVRAM polling
|
||||||
and proper hotkey_mask semanthics (version 8 of the
|
and proper hotkey_mask semantics (version 8 of the
|
||||||
NVRAM polling patch). Some development snapshots of
|
NVRAM polling patch). Some development snapshots of
|
||||||
0.18 had an earlier version that did strange things
|
0.18 had an earlier version that did strange things
|
||||||
to hotkey_mask.
|
to hotkey_mask.
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
/*P:100 This is the Launcher code, a simple program which lays out the
|
/*P:100 This is the Launcher code, a simple program which lays out the
|
||||||
* "physical" memory for the new Guest by mapping the kernel image and the
|
* "physical" memory for the new Guest by mapping the kernel image and
|
||||||
* virtual devices, then reads repeatedly from /dev/lguest to run the Guest.
|
* the virtual devices, then opens /dev/lguest to tell the kernel
|
||||||
:*/
|
* about the Guest and control it. :*/
|
||||||
#define _LARGEFILE64_SOURCE
|
#define _LARGEFILE64_SOURCE
|
||||||
#define _GNU_SOURCE
|
#define _GNU_SOURCE
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
@ -43,7 +43,7 @@
|
||||||
#include "linux/virtio_console.h"
|
#include "linux/virtio_console.h"
|
||||||
#include "linux/virtio_ring.h"
|
#include "linux/virtio_ring.h"
|
||||||
#include "asm-x86/bootparam.h"
|
#include "asm-x86/bootparam.h"
|
||||||
/*L:110 We can ignore the 38 include files we need for this program, but I do
|
/*L:110 We can ignore the 39 include files we need for this program, but I do
|
||||||
* want to draw attention to the use of kernel-style types.
|
* want to draw attention to the use of kernel-style types.
|
||||||
*
|
*
|
||||||
* As Linus said, "C is a Spartan language, and so should your naming be." I
|
* As Linus said, "C is a Spartan language, and so should your naming be." I
|
||||||
|
@ -320,7 +320,7 @@ static unsigned long map_elf(int elf_fd, const Elf32_Ehdr *ehdr)
|
||||||
err(1, "Reading program headers");
|
err(1, "Reading program headers");
|
||||||
|
|
||||||
/* Try all the headers: there are usually only three. A read-only one,
|
/* Try all the headers: there are usually only three. A read-only one,
|
||||||
* a read-write one, and a "note" section which isn't loadable. */
|
* a read-write one, and a "note" section which we don't load. */
|
||||||
for (i = 0; i < ehdr->e_phnum; i++) {
|
for (i = 0; i < ehdr->e_phnum; i++) {
|
||||||
/* If this isn't a loadable segment, we ignore it */
|
/* If this isn't a loadable segment, we ignore it */
|
||||||
if (phdr[i].p_type != PT_LOAD)
|
if (phdr[i].p_type != PT_LOAD)
|
||||||
|
@ -387,7 +387,7 @@ static unsigned long load_kernel(int fd)
|
||||||
if (memcmp(hdr.e_ident, ELFMAG, SELFMAG) == 0)
|
if (memcmp(hdr.e_ident, ELFMAG, SELFMAG) == 0)
|
||||||
return map_elf(fd, &hdr);
|
return map_elf(fd, &hdr);
|
||||||
|
|
||||||
/* Otherwise we assume it's a bzImage, and try to unpack it */
|
/* Otherwise we assume it's a bzImage, and try to load it. */
|
||||||
return load_bzimage(fd);
|
return load_bzimage(fd);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -433,12 +433,12 @@ static unsigned long load_initrd(const char *name, unsigned long mem)
|
||||||
return len;
|
return len;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Once we know how much memory we have, we can construct simple linear page
|
/* Once we know how much memory we have we can construct simple linear page
|
||||||
* tables which set virtual == physical which will get the Guest far enough
|
* tables which set virtual == physical which will get the Guest far enough
|
||||||
* into the boot to create its own.
|
* into the boot to create its own.
|
||||||
*
|
*
|
||||||
* We lay them out of the way, just below the initrd (which is why we need to
|
* We lay them out of the way, just below the initrd (which is why we need to
|
||||||
* know its size). */
|
* know its size here). */
|
||||||
static unsigned long setup_pagetables(unsigned long mem,
|
static unsigned long setup_pagetables(unsigned long mem,
|
||||||
unsigned long initrd_size)
|
unsigned long initrd_size)
|
||||||
{
|
{
|
||||||
|
@ -486,9 +486,12 @@ static void concat(char *dst, char *args[])
|
||||||
unsigned int i, len = 0;
|
unsigned int i, len = 0;
|
||||||
|
|
||||||
for (i = 0; args[i]; i++) {
|
for (i = 0; args[i]; i++) {
|
||||||
strcpy(dst+len, args[i]);
|
if (i) {
|
||||||
strcat(dst+len, " ");
|
strcat(dst+len, " ");
|
||||||
len += strlen(args[i]) + 1;
|
len++;
|
||||||
|
}
|
||||||
|
strcpy(dst+len, args[i]);
|
||||||
|
len += strlen(args[i]);
|
||||||
}
|
}
|
||||||
/* In case it's empty. */
|
/* In case it's empty. */
|
||||||
dst[len] = '\0';
|
dst[len] = '\0';
|
||||||
|
@ -847,7 +850,8 @@ static void handle_console_output(int fd, struct virtqueue *vq)
|
||||||
*
|
*
|
||||||
* Handling output for network is also simple: we get all the output buffers
|
* Handling output for network is also simple: we get all the output buffers
|
||||||
* and write them (ignoring the first element) to this device's file descriptor
|
* and write them (ignoring the first element) to this device's file descriptor
|
||||||
* (stdout). */
|
* (/dev/net/tun).
|
||||||
|
*/
|
||||||
static void handle_net_output(int fd, struct virtqueue *vq)
|
static void handle_net_output(int fd, struct virtqueue *vq)
|
||||||
{
|
{
|
||||||
unsigned int head, out, in;
|
unsigned int head, out, in;
|
||||||
|
@ -921,7 +925,7 @@ static void enable_fd(int fd, struct virtqueue *vq)
|
||||||
write(waker_fd, &vq->dev->fd, sizeof(vq->dev->fd));
|
write(waker_fd, &vq->dev->fd, sizeof(vq->dev->fd));
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Resetting a device is fairly easy. */
|
/* When the Guest asks us to reset a device, it's is fairly easy. */
|
||||||
static void reset_device(struct device *dev)
|
static void reset_device(struct device *dev)
|
||||||
{
|
{
|
||||||
struct virtqueue *vq;
|
struct virtqueue *vq;
|
||||||
|
@ -1000,8 +1004,8 @@ static void handle_input(int fd)
|
||||||
if (select(devices.max_infd+1, &fds, NULL, NULL, &poll) == 0)
|
if (select(devices.max_infd+1, &fds, NULL, NULL, &poll) == 0)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
/* Otherwise, call the device(s) which have readable
|
/* Otherwise, call the device(s) which have readable file
|
||||||
* file descriptors and a method of handling them. */
|
* descriptors and a method of handling them. */
|
||||||
for (i = devices.dev; i; i = i->next) {
|
for (i = devices.dev; i; i = i->next) {
|
||||||
if (i->handle_input && FD_ISSET(i->fd, &fds)) {
|
if (i->handle_input && FD_ISSET(i->fd, &fds)) {
|
||||||
int dev_fd;
|
int dev_fd;
|
||||||
|
@ -1012,8 +1016,7 @@ static void handle_input(int fd)
|
||||||
* should no longer service it. Networking and
|
* should no longer service it. Networking and
|
||||||
* console do this when there's no input
|
* console do this when there's no input
|
||||||
* buffers to deliver into. Console also uses
|
* buffers to deliver into. Console also uses
|
||||||
* it when it discovers that stdin is
|
* it when it discovers that stdin is closed. */
|
||||||
* closed. */
|
|
||||||
FD_CLR(i->fd, &devices.infds);
|
FD_CLR(i->fd, &devices.infds);
|
||||||
/* Tell waker to ignore it too, by sending a
|
/* Tell waker to ignore it too, by sending a
|
||||||
* negative fd number (-1, since 0 is a valid
|
* negative fd number (-1, since 0 is a valid
|
||||||
|
@ -1030,7 +1033,8 @@ static void handle_input(int fd)
|
||||||
*
|
*
|
||||||
* All devices need a descriptor so the Guest knows it exists, and a "struct
|
* All devices need a descriptor so the Guest knows it exists, and a "struct
|
||||||
* device" so the Launcher can keep track of it. We have common helper
|
* device" so the Launcher can keep track of it. We have common helper
|
||||||
* routines to allocate and manage them. */
|
* routines to allocate and manage them.
|
||||||
|
*/
|
||||||
|
|
||||||
/* The layout of the device page is a "struct lguest_device_desc" followed by a
|
/* The layout of the device page is a "struct lguest_device_desc" followed by a
|
||||||
* number of virtqueue descriptors, then two sets of feature bits, then an
|
* number of virtqueue descriptors, then two sets of feature bits, then an
|
||||||
|
@ -1075,7 +1079,7 @@ static void add_virtqueue(struct device *dev, unsigned int num_descs,
|
||||||
struct virtqueue **i, *vq = malloc(sizeof(*vq));
|
struct virtqueue **i, *vq = malloc(sizeof(*vq));
|
||||||
void *p;
|
void *p;
|
||||||
|
|
||||||
/* First we need some pages for this virtqueue. */
|
/* First we need some memory for this virtqueue. */
|
||||||
pages = (vring_size(num_descs, getpagesize()) + getpagesize() - 1)
|
pages = (vring_size(num_descs, getpagesize()) + getpagesize() - 1)
|
||||||
/ getpagesize();
|
/ getpagesize();
|
||||||
p = get_pages(pages);
|
p = get_pages(pages);
|
||||||
|
@ -1119,7 +1123,7 @@ static void add_virtqueue(struct device *dev, unsigned int num_descs,
|
||||||
}
|
}
|
||||||
|
|
||||||
/* The first half of the feature bitmask is for us to advertise features. The
|
/* The first half of the feature bitmask is for us to advertise features. The
|
||||||
* second half if for the Guest to accept features. */
|
* second half is for the Guest to accept features. */
|
||||||
static void add_feature(struct device *dev, unsigned bit)
|
static void add_feature(struct device *dev, unsigned bit)
|
||||||
{
|
{
|
||||||
u8 *features = get_feature_bits(dev);
|
u8 *features = get_feature_bits(dev);
|
||||||
|
@ -1148,7 +1152,9 @@ static void set_config(struct device *dev, unsigned len, const void *conf)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* This routine does all the creation and setup of a new device, including
|
/* This routine does all the creation and setup of a new device, including
|
||||||
* calling new_dev_desc() to allocate the descriptor and device memory. */
|
* calling new_dev_desc() to allocate the descriptor and device memory.
|
||||||
|
*
|
||||||
|
* See what I mean about userspace being boring? */
|
||||||
static struct device *new_device(const char *name, u16 type, int fd,
|
static struct device *new_device(const char *name, u16 type, int fd,
|
||||||
bool (*handle_input)(int, struct device *))
|
bool (*handle_input)(int, struct device *))
|
||||||
{
|
{
|
||||||
|
@ -1380,7 +1386,6 @@ struct vblk_info
|
||||||
* Launcher triggers interrupt to Guest. */
|
* Launcher triggers interrupt to Guest. */
|
||||||
int done_fd;
|
int done_fd;
|
||||||
};
|
};
|
||||||
/*:*/
|
|
||||||
|
|
||||||
/*L:210
|
/*L:210
|
||||||
* The Disk
|
* The Disk
|
||||||
|
@ -1490,7 +1495,10 @@ static int io_thread(void *_dev)
|
||||||
while (read(vblk->workpipe[0], &c, 1) == 1) {
|
while (read(vblk->workpipe[0], &c, 1) == 1) {
|
||||||
/* We acknowledge each request immediately to reduce latency,
|
/* We acknowledge each request immediately to reduce latency,
|
||||||
* rather than waiting until we've done them all. I haven't
|
* rather than waiting until we've done them all. I haven't
|
||||||
* measured to see if it makes any difference. */
|
* measured to see if it makes any difference.
|
||||||
|
*
|
||||||
|
* That would be an interesting test, wouldn't it? You could
|
||||||
|
* also try having more than one I/O thread. */
|
||||||
while (service_io(dev))
|
while (service_io(dev))
|
||||||
write(vblk->done_fd, &c, 1);
|
write(vblk->done_fd, &c, 1);
|
||||||
}
|
}
|
||||||
|
@ -1498,7 +1506,7 @@ static int io_thread(void *_dev)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Now we've seen the I/O thread, we return to the Launcher to see what happens
|
/* Now we've seen the I/O thread, we return to the Launcher to see what happens
|
||||||
* when the thread tells us it's completed some I/O. */
|
* when that thread tells us it's completed some I/O. */
|
||||||
static bool handle_io_finish(int fd, struct device *dev)
|
static bool handle_io_finish(int fd, struct device *dev)
|
||||||
{
|
{
|
||||||
char c;
|
char c;
|
||||||
|
@ -1570,7 +1578,8 @@ static void setup_block_file(const char *filename)
|
||||||
* more work. */
|
* more work. */
|
||||||
pipe(vblk->workpipe);
|
pipe(vblk->workpipe);
|
||||||
|
|
||||||
/* Create stack for thread and run it */
|
/* Create stack for thread and run it. Since stack grows upwards, we
|
||||||
|
* point the stack pointer to the end of this region. */
|
||||||
stack = malloc(32768);
|
stack = malloc(32768);
|
||||||
/* SIGCHLD - We dont "wait" for our cloned thread, so prevent it from
|
/* SIGCHLD - We dont "wait" for our cloned thread, so prevent it from
|
||||||
* becoming a zombie. */
|
* becoming a zombie. */
|
||||||
|
@ -1584,14 +1593,14 @@ static void setup_block_file(const char *filename)
|
||||||
verbose("device %u: virtblock %llu sectors\n",
|
verbose("device %u: virtblock %llu sectors\n",
|
||||||
devices.device_num, le64_to_cpu(conf.capacity));
|
devices.device_num, le64_to_cpu(conf.capacity));
|
||||||
}
|
}
|
||||||
/* That's the end of device setup. :*/
|
/* That's the end of device setup. */
|
||||||
|
|
||||||
/* Reboot */
|
/*L:230 Reboot is pretty easy: clean up and exec() the Launcher afresh. */
|
||||||
static void __attribute__((noreturn)) restart_guest(void)
|
static void __attribute__((noreturn)) restart_guest(void)
|
||||||
{
|
{
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
|
|
||||||
/* Closing pipes causes the waker thread and io_threads to die, and
|
/* Closing pipes causes the Waker thread and io_threads to die, and
|
||||||
* closing /dev/lguest cleans up the Guest. Since we don't track all
|
* closing /dev/lguest cleans up the Guest. Since we don't track all
|
||||||
* open fds, we simply close everything beyond stderr. */
|
* open fds, we simply close everything beyond stderr. */
|
||||||
for (i = 3; i < FD_SETSIZE; i++)
|
for (i = 3; i < FD_SETSIZE; i++)
|
||||||
|
@ -1600,7 +1609,7 @@ static void __attribute__((noreturn)) restart_guest(void)
|
||||||
err(1, "Could not exec %s", main_args[0]);
|
err(1, "Could not exec %s", main_args[0]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*L:220 Finally we reach the core of the Launcher, which runs the Guest, serves
|
/*L:220 Finally we reach the core of the Launcher which runs the Guest, serves
|
||||||
* its input and output, and finally, lays it to rest. */
|
* its input and output, and finally, lays it to rest. */
|
||||||
static void __attribute__((noreturn)) run_guest(int lguest_fd)
|
static void __attribute__((noreturn)) run_guest(int lguest_fd)
|
||||||
{
|
{
|
||||||
|
@ -1641,7 +1650,7 @@ static void __attribute__((noreturn)) run_guest(int lguest_fd)
|
||||||
err(1, "Resetting break");
|
err(1, "Resetting break");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/*
|
/*L:240
|
||||||
* This is the end of the Launcher. The good news: we are over halfway
|
* This is the end of the Launcher. The good news: we are over halfway
|
||||||
* through! The bad news: the most fiendish part of the code still lies ahead
|
* through! The bad news: the most fiendish part of the code still lies ahead
|
||||||
* of us.
|
* of us.
|
||||||
|
@ -1688,8 +1697,8 @@ int main(int argc, char *argv[])
|
||||||
* device receive input from a file descriptor, we keep an fdset
|
* device receive input from a file descriptor, we keep an fdset
|
||||||
* (infds) and the maximum fd number (max_infd) with the head of the
|
* (infds) and the maximum fd number (max_infd) with the head of the
|
||||||
* list. We also keep a pointer to the last device. Finally, we keep
|
* list. We also keep a pointer to the last device. Finally, we keep
|
||||||
* the next interrupt number to hand out (1: remember that 0 is used by
|
* the next interrupt number to use for devices (1: remember that 0 is
|
||||||
* the timer). */
|
* used by the timer). */
|
||||||
FD_ZERO(&devices.infds);
|
FD_ZERO(&devices.infds);
|
||||||
devices.max_infd = -1;
|
devices.max_infd = -1;
|
||||||
devices.lastdev = NULL;
|
devices.lastdev = NULL;
|
||||||
|
@ -1790,8 +1799,8 @@ int main(int argc, char *argv[])
|
||||||
lguest_fd = tell_kernel(pgdir, start);
|
lguest_fd = tell_kernel(pgdir, start);
|
||||||
|
|
||||||
/* We fork off a child process, which wakes the Launcher whenever one
|
/* We fork off a child process, which wakes the Launcher whenever one
|
||||||
* of the input file descriptors needs attention. Otherwise we would
|
* of the input file descriptors needs attention. We call this the
|
||||||
* run the Guest until it tries to output something. */
|
* Waker, and we'll cover it in a moment. */
|
||||||
waker_fd = setup_waker(lguest_fd);
|
waker_fd = setup_waker(lguest_fd);
|
||||||
|
|
||||||
/* Finally, run the Guest. This doesn't return. */
|
/* Finally, run the Guest. This doesn't return. */
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
Rusty's Remarkably Unreliable Guide to Lguest
|
__
|
||||||
- or, A Young Coder's Illustrated Hypervisor
|
(___()'`; Rusty's Remarkably Unreliable Guide to Lguest
|
||||||
http://lguest.ozlabs.org
|
/, /` - or, A Young Coder's Illustrated Hypervisor
|
||||||
|
\\"--\\ http://lguest.ozlabs.org
|
||||||
|
|
||||||
Lguest is designed to be a minimal hypervisor for the Linux kernel, for
|
Lguest is designed to be a minimal hypervisor for the Linux kernel, for
|
||||||
Linux developers and users to experiment with virtualization with the
|
Linux developers and users to experiment with virtualization with the
|
||||||
|
@ -41,9 +42,13 @@ Running Lguest:
|
||||||
CONFIG_PHYSICAL_ALIGN=0x100000)
|
CONFIG_PHYSICAL_ALIGN=0x100000)
|
||||||
|
|
||||||
"Device Drivers":
|
"Device Drivers":
|
||||||
|
"Block devices"
|
||||||
|
"Virtio block driver (EXPERIMENTAL)" = M/Y
|
||||||
"Network device support"
|
"Network device support"
|
||||||
"Universal TUN/TAP device driver support" = M/Y
|
"Universal TUN/TAP device driver support" = M/Y
|
||||||
(CONFIG_TUN=m)
|
"Virtio network driver (EXPERIMENTAL)" = M/Y
|
||||||
|
(CONFIG_VIRTIO_BLK=m, CONFIG_VIRTIO_NET=m and CONFIG_TUN=m)
|
||||||
|
|
||||||
"Virtualization"
|
"Virtualization"
|
||||||
"Linux hypervisor example code" = M/Y
|
"Linux hypervisor example code" = M/Y
|
||||||
(CONFIG_LGUEST=m)
|
(CONFIG_LGUEST=m)
|
||||||
|
|
|
@ -95,7 +95,6 @@ RFCOMM_TTY_MAGIC 0x6d02 net/bluetooth/rfcomm/tty.c
|
||||||
USB_SERIAL_PORT_MAGIC 0x7301 usb_serial_port drivers/usb/serial/usb-serial.h
|
USB_SERIAL_PORT_MAGIC 0x7301 usb_serial_port drivers/usb/serial/usb-serial.h
|
||||||
CG_MAGIC 0x00090255 ufs_cylinder_group include/linux/ufs_fs.h
|
CG_MAGIC 0x00090255 ufs_cylinder_group include/linux/ufs_fs.h
|
||||||
A2232_MAGIC 0x000a2232 gs_port drivers/char/ser_a2232.h
|
A2232_MAGIC 0x000a2232 gs_port drivers/char/ser_a2232.h
|
||||||
SOLARIS_SOCKET_MAGIC 0x000ADDED sol_socket_struct arch/sparc64/solaris/socksys.h
|
|
||||||
RPORT_MAGIC 0x00525001 r_port drivers/char/rocket_int.h
|
RPORT_MAGIC 0x00525001 r_port drivers/char/rocket_int.h
|
||||||
LSEMAGIC 0x05091998 lse drivers/fc4/fc.c
|
LSEMAGIC 0x05091998 lse drivers/fc4/fc.c
|
||||||
GDTIOCTL_MAGIC 0x06030f07 gdth_iowr_str drivers/scsi/gdth_ioctl.h
|
GDTIOCTL_MAGIC 0x06030f07 gdth_iowr_str drivers/scsi/gdth_ioctl.h
|
||||||
|
|
|
@ -143,14 +143,7 @@ MCA Device Drivers
|
||||||
|
|
||||||
Currently, there are a number of MCA-specific device drivers.
|
Currently, there are a number of MCA-specific device drivers.
|
||||||
|
|
||||||
1) PS/2 ESDI
|
1) PS/2 SCSI
|
||||||
drivers/block/ps2esdi.c
|
|
||||||
include/linux/ps2esdi.h
|
|
||||||
Uses major number 36, and should use /dev files /dev/eda, /dev/edb.
|
|
||||||
Supports two drives, but only one controller. May use the
|
|
||||||
command-line args "ed=cyl,head,sec" and "tp720".
|
|
||||||
|
|
||||||
2) PS/2 SCSI
|
|
||||||
drivers/scsi/ibmmca.c
|
drivers/scsi/ibmmca.c
|
||||||
drivers/scsi/ibmmca.h
|
drivers/scsi/ibmmca.h
|
||||||
The driver for the IBM SCSI subsystem. Includes both integrated
|
The driver for the IBM SCSI subsystem. Includes both integrated
|
||||||
|
@ -159,25 +152,25 @@ Currently, there are a number of MCA-specific device drivers.
|
||||||
machine with a front-panel display (i.e. model 95), you can use
|
machine with a front-panel display (i.e. model 95), you can use
|
||||||
"ibmmcascsi=display" to enable a drive activity indicator.
|
"ibmmcascsi=display" to enable a drive activity indicator.
|
||||||
|
|
||||||
3) 3c523
|
2) 3c523
|
||||||
drivers/net/3c523.c
|
drivers/net/3c523.c
|
||||||
drivers/net/3c523.h
|
drivers/net/3c523.h
|
||||||
3Com 3c523 Etherlink/MC ethernet driver.
|
3Com 3c523 Etherlink/MC ethernet driver.
|
||||||
|
|
||||||
4) SMC Ultra/MCA and IBM Adapter/A
|
3) SMC Ultra/MCA and IBM Adapter/A
|
||||||
drivers/net/smc-mca.c
|
drivers/net/smc-mca.c
|
||||||
drivers/net/smc-mca.h
|
drivers/net/smc-mca.h
|
||||||
Driver for the MCA version of the SMC Ultra and various other
|
Driver for the MCA version of the SMC Ultra and various other
|
||||||
OEM'ed and work-alike cards (Elite, Adapter/A, etc).
|
OEM'ed and work-alike cards (Elite, Adapter/A, etc).
|
||||||
|
|
||||||
5) NE/2
|
4) NE/2
|
||||||
driver/net/ne2.c
|
driver/net/ne2.c
|
||||||
driver/net/ne2.h
|
driver/net/ne2.h
|
||||||
The NE/2 is the MCA version of the NE2000. This may not work
|
The NE/2 is the MCA version of the NE2000. This may not work
|
||||||
with clones that have a different adapter id than the original
|
with clones that have a different adapter id than the original
|
||||||
NE/2.
|
NE/2.
|
||||||
|
|
||||||
6) Future Domain MCS-600/700, OEM'd IBM Fast SCSI Adapter/A and
|
5) Future Domain MCS-600/700, OEM'd IBM Fast SCSI Adapter/A and
|
||||||
Reply Sound Blaster/SCSI (SCSI part)
|
Reply Sound Blaster/SCSI (SCSI part)
|
||||||
Better support for these cards than the driver for ISA.
|
Better support for these cards than the driver for ISA.
|
||||||
Supports multiple cards with IRQ sharing.
|
Supports multiple cards with IRQ sharing.
|
||||||
|
|
|
@ -430,8 +430,8 @@ There are certain things that the Linux kernel memory barriers do not guarantee:
|
||||||
|
|
||||||
[*] For information on bus mastering DMA and coherency please read:
|
[*] For information on bus mastering DMA and coherency please read:
|
||||||
|
|
||||||
Documentation/pci.txt
|
Documentation/PCI/pci.txt
|
||||||
Documentation/DMA-mapping.txt
|
Documentation/PCI/PCI-DMA-mapping.txt
|
||||||
Documentation/DMA-API.txt
|
Documentation/DMA-API.txt
|
||||||
|
|
||||||
|
|
||||||
|
@ -1493,7 +1493,7 @@ explicit lock operations, described later). These include:
|
||||||
atomic_dec_and_test();
|
atomic_dec_and_test();
|
||||||
atomic_sub_and_test();
|
atomic_sub_and_test();
|
||||||
atomic_add_negative();
|
atomic_add_negative();
|
||||||
atomic_add_unless();
|
atomic_add_unless(); /* when succeeds (returns 1) */
|
||||||
test_and_set_bit();
|
test_and_set_bit();
|
||||||
test_and_clear_bit();
|
test_and_clear_bit();
|
||||||
test_and_change_bit();
|
test_and_change_bit();
|
||||||
|
|
|
@ -84,9 +84,6 @@ policy-routing.txt
|
||||||
- IP policy-based routing
|
- IP policy-based routing
|
||||||
ray_cs.txt
|
ray_cs.txt
|
||||||
- Raylink Wireless LAN card driver info.
|
- Raylink Wireless LAN card driver info.
|
||||||
sk98lin.txt
|
|
||||||
- Marvell Yukon Chipset / SysKonnect SK-98xx compliant Gigabit
|
|
||||||
Ethernet Adapter family driver info
|
|
||||||
skfp.txt
|
skfp.txt
|
||||||
- SysKonnect FDDI (SK-5xxx, Compaq Netelligent) driver info.
|
- SysKonnect FDDI (SK-5xxx, Compaq Netelligent) driver info.
|
||||||
smc9.txt
|
smc9.txt
|
||||||
|
@ -103,8 +100,6 @@ tuntap.txt
|
||||||
- TUN/TAP device driver, allowing user space Rx/Tx of packets.
|
- TUN/TAP device driver, allowing user space Rx/Tx of packets.
|
||||||
vortex.txt
|
vortex.txt
|
||||||
- info on using 3Com Vortex (3c590, 3c592, 3c595, 3c597) Ethernet cards.
|
- info on using 3Com Vortex (3c590, 3c592, 3c595, 3c597) Ethernet cards.
|
||||||
wan-router.txt
|
|
||||||
- WAN router documentation
|
|
||||||
wavelan.txt
|
wavelan.txt
|
||||||
- AT&T GIS (nee NCR) WaveLAN card: An Ethernet-like radio transceiver
|
- AT&T GIS (nee NCR) WaveLAN card: An Ethernet-like radio transceiver
|
||||||
x25.txt
|
x25.txt
|
||||||
|
|
|
@ -1,89 +0,0 @@
|
||||||
|
|
||||||
BCM43xx Linux Driver Project
|
|
||||||
============================
|
|
||||||
|
|
||||||
Introduction
|
|
||||||
------------
|
|
||||||
|
|
||||||
Many of the wireless devices found in modern notebook computers are
|
|
||||||
based on the wireless chips produced by Broadcom. These devices have
|
|
||||||
been a problem for Linux users as there is no open-source driver
|
|
||||||
available. In addition, Broadcom has not released specifications
|
|
||||||
for the device, and driver availability has been limited to the
|
|
||||||
binary-only form used in the GPL versions of AP hardware such as the
|
|
||||||
Linksys WRT54G, and the Windows and OS X drivers. Before this project
|
|
||||||
began, the only way to use these devices were to use the Windows or
|
|
||||||
OS X drivers with either the Linuxant or ndiswrapper modules. There
|
|
||||||
is a strong penalty if this method is used as loading the binary-only
|
|
||||||
module "taints" the kernel, and no kernel developer will help diagnose
|
|
||||||
any kernel problems.
|
|
||||||
|
|
||||||
Development
|
|
||||||
-----------
|
|
||||||
|
|
||||||
This driver has been developed using
|
|
||||||
a clean-room technique that is described at
|
|
||||||
http://bcm-specs.sipsolutions.net/ReverseEngineeringProcess. For legal
|
|
||||||
reasons, none of the clean-room crew works on the on the Linux driver,
|
|
||||||
and none of the Linux developers sees anything but the specifications,
|
|
||||||
which are the ultimate product of the reverse-engineering group.
|
|
||||||
|
|
||||||
Software
|
|
||||||
--------
|
|
||||||
|
|
||||||
Since the release of the 2.6.17 kernel, the bcm43xx driver has been
|
|
||||||
distributed with the kernel source, and is prebuilt in most, if not
|
|
||||||
all, distributions. There is, however, additional software that is
|
|
||||||
required. The firmware used by the chip is the intellectual property
|
|
||||||
of Broadcom and they have not given the bcm43xx team redistribution
|
|
||||||
rights to this firmware. Since we cannot legally redistribute
|
|
||||||
the firmware we cannot include it with the driver. Furthermore, it
|
|
||||||
cannot be placed in the downloadable archives of any distributing
|
|
||||||
organization; therefore, the user is responsible for obtaining the
|
|
||||||
firmware and placing it in the appropriate location so that the driver
|
|
||||||
can find it when initializing.
|
|
||||||
|
|
||||||
To help with this process, the bcm43xx developers provide a separate
|
|
||||||
program named bcm43xx-fwcutter to "cut" the firmware out of a
|
|
||||||
Windows or OS X driver and write the extracted files to the proper
|
|
||||||
location. This program is usually provided with the distribution;
|
|
||||||
however, it may be downloaded from
|
|
||||||
|
|
||||||
http://developer.berlios.de/project/showfiles.php?group_id=4547
|
|
||||||
|
|
||||||
The firmware is available in two versions. V3 firmware is used with
|
|
||||||
the in-kernel bcm43xx driver that uses a software MAC layer called
|
|
||||||
SoftMAC, and will have a microcode revision of 0x127 or smaller. The
|
|
||||||
V4 firmware is used by an out-of-kernel driver employing a variation of
|
|
||||||
the Devicescape MAC layer known as d80211. Once bcm43xx-d80211 reaches
|
|
||||||
a satisfactory level of development, it will replace bcm43xx-softmac
|
|
||||||
in the kernel as it is much more flexible and powerful.
|
|
||||||
|
|
||||||
A source for the latest V3 firmware is
|
|
||||||
|
|
||||||
http://downloads.openwrt.org/sources/wl_apsta-3.130.20.0.o
|
|
||||||
|
|
||||||
Once this file is downloaded, the command
|
|
||||||
'bcm43xx-fwcutter -w <dir> <filename>'
|
|
||||||
will extract the microcode and write it to directory
|
|
||||||
<dir>. The correct directory will depend on your distribution;
|
|
||||||
however, most use '/lib/firmware'. Once this step is completed,
|
|
||||||
the bcm3xx driver should load when the system is booted. To see
|
|
||||||
any messages relating to the driver, issue the command 'dmesg |
|
|
||||||
grep bcm43xx' from a terminal window. If there are any problems,
|
|
||||||
please send that output to Bcm43xx-dev@lists.berlios.de.
|
|
||||||
|
|
||||||
Although the driver has been in-kernel since 2.6.17, the earliest
|
|
||||||
version is quite limited in its capability. Patches that include
|
|
||||||
all features of later versions are available for the stable kernel
|
|
||||||
versions from 2.6.18. These will be needed if you use a BCM4318,
|
|
||||||
or a PCI Express version (BCM4311 and BCM4312). In addition, if you
|
|
||||||
have an early BCM4306 and more than 1 GB RAM, your kernel will need
|
|
||||||
to be patched. These patches, which are being updated regularly,
|
|
||||||
are available at ftp://lwfinger.dynalias.org/patches. Look for
|
|
||||||
combined_2.6.YY.patch. Of course you will need kernel source downloaded
|
|
||||||
from kernel.org, or the source from your distribution.
|
|
||||||
|
|
||||||
If you build your own kernel, please enable CONFIG_BCM43XX_DEBUG
|
|
||||||
and CONFIG_IEEE80211_SOFTMAC_DEBUG. The log information provided is
|
|
||||||
essential for solving any problems.
|
|
|
@ -281,10 +281,10 @@ solution for a couple of reasons:
|
||||||
sa_family_t can_family;
|
sa_family_t can_family;
|
||||||
int can_ifindex;
|
int can_ifindex;
|
||||||
union {
|
union {
|
||||||
struct { canid_t rx_id, tx_id; } tp16;
|
/* transport protocol class address info (e.g. ISOTP) */
|
||||||
struct { canid_t rx_id, tx_id; } tp20;
|
struct { canid_t rx_id, tx_id; } tp;
|
||||||
struct { canid_t rx_id, tx_id; } mcnet;
|
|
||||||
struct { canid_t rx_id, tx_id; } isotp;
|
/* reserved for future CAN protocols address information */
|
||||||
} can_addr;
|
} can_addr;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -1,568 +0,0 @@
|
||||||
(C)Copyright 1999-2004 Marvell(R).
|
|
||||||
All rights reserved
|
|
||||||
===========================================================================
|
|
||||||
|
|
||||||
sk98lin.txt created 13-Feb-2004
|
|
||||||
|
|
||||||
Readme File for sk98lin v6.23
|
|
||||||
Marvell Yukon/SysKonnect SK-98xx Gigabit Ethernet Adapter family driver for LINUX
|
|
||||||
|
|
||||||
This file contains
|
|
||||||
1 Overview
|
|
||||||
2 Required Files
|
|
||||||
3 Installation
|
|
||||||
3.1 Driver Installation
|
|
||||||
3.2 Inclusion of adapter at system start
|
|
||||||
4 Driver Parameters
|
|
||||||
4.1 Per-Port Parameters
|
|
||||||
4.2 Adapter Parameters
|
|
||||||
5 Large Frame Support
|
|
||||||
6 VLAN and Link Aggregation Support (IEEE 802.1, 802.1q, 802.3ad)
|
|
||||||
7 Troubleshooting
|
|
||||||
|
|
||||||
===========================================================================
|
|
||||||
|
|
||||||
|
|
||||||
1 Overview
|
|
||||||
===========
|
|
||||||
|
|
||||||
The sk98lin driver supports the Marvell Yukon and SysKonnect
|
|
||||||
SK-98xx/SK-95xx compliant Gigabit Ethernet Adapter on Linux. It has
|
|
||||||
been tested with Linux on Intel/x86 machines.
|
|
||||||
***
|
|
||||||
|
|
||||||
|
|
||||||
2 Required Files
|
|
||||||
=================
|
|
||||||
|
|
||||||
The linux kernel source.
|
|
||||||
No additional files required.
|
|
||||||
***
|
|
||||||
|
|
||||||
|
|
||||||
3 Installation
|
|
||||||
===============
|
|
||||||
|
|
||||||
It is recommended to download the latest version of the driver from the
|
|
||||||
SysKonnect web site www.syskonnect.com. If you have downloaded the latest
|
|
||||||
driver, the Linux kernel has to be patched before the driver can be
|
|
||||||
installed. For details on how to patch a Linux kernel, refer to the
|
|
||||||
patch.txt file.
|
|
||||||
|
|
||||||
3.1 Driver Installation
|
|
||||||
------------------------
|
|
||||||
|
|
||||||
The following steps describe the actions that are required to install
|
|
||||||
the driver and to start it manually. These steps should be carried
|
|
||||||
out for the initial driver setup. Once confirmed to be ok, they can
|
|
||||||
be included in the system start.
|
|
||||||
|
|
||||||
NOTE 1: To perform the following tasks you need 'root' access.
|
|
||||||
|
|
||||||
NOTE 2: In case of problems, please read the section "Troubleshooting"
|
|
||||||
below.
|
|
||||||
|
|
||||||
The driver can either be integrated into the kernel or it can be compiled
|
|
||||||
as a module. Select the appropriate option during the kernel
|
|
||||||
configuration.
|
|
||||||
|
|
||||||
Compile/use the driver as a module
|
|
||||||
----------------------------------
|
|
||||||
To compile the driver, go to the directory /usr/src/linux and
|
|
||||||
execute the command "make menuconfig" or "make xconfig" and proceed as
|
|
||||||
follows:
|
|
||||||
|
|
||||||
To integrate the driver permanently into the kernel, proceed as follows:
|
|
||||||
|
|
||||||
1. Select the menu "Network device support" and then "Ethernet(1000Mbit)"
|
|
||||||
2. Mark "Marvell Yukon Chipset / SysKonnect SK-98xx family support"
|
|
||||||
with (*)
|
|
||||||
3. Build a new kernel when the configuration of the above options is
|
|
||||||
finished.
|
|
||||||
4. Install the new kernel.
|
|
||||||
5. Reboot your system.
|
|
||||||
|
|
||||||
To use the driver as a module, proceed as follows:
|
|
||||||
|
|
||||||
1. Enable 'loadable module support' in the kernel.
|
|
||||||
2. For automatic driver start, enable the 'Kernel module loader'.
|
|
||||||
3. Select the menu "Network device support" and then "Ethernet(1000Mbit)"
|
|
||||||
4. Mark "Marvell Yukon Chipset / SysKonnect SK-98xx family support"
|
|
||||||
with (M)
|
|
||||||
5. Execute the command "make modules".
|
|
||||||
6. Execute the command "make modules_install".
|
|
||||||
The appropriate modules will be installed.
|
|
||||||
7. Reboot your system.
|
|
||||||
|
|
||||||
|
|
||||||
Load the module manually
|
|
||||||
------------------------
|
|
||||||
To load the module manually, proceed as follows:
|
|
||||||
|
|
||||||
1. Enter "modprobe sk98lin".
|
|
||||||
2. If a Marvell Yukon or SysKonnect SK-98xx adapter is installed in
|
|
||||||
your computer and you have a /proc file system, execute the command:
|
|
||||||
"ls /proc/net/sk98lin/"
|
|
||||||
This should produce an output containing a line with the following
|
|
||||||
format:
|
|
||||||
eth0 eth1 ...
|
|
||||||
which indicates that your adapter has been found and initialized.
|
|
||||||
|
|
||||||
NOTE 1: If you have more than one Marvell Yukon or SysKonnect SK-98xx
|
|
||||||
adapter installed, the adapters will be listed as 'eth0',
|
|
||||||
'eth1', 'eth2', etc.
|
|
||||||
For each adapter, repeat steps 3 and 4 below.
|
|
||||||
|
|
||||||
NOTE 2: If you have other Ethernet adapters installed, your Marvell
|
|
||||||
Yukon or SysKonnect SK-98xx adapter will be mapped to the
|
|
||||||
next available number, e.g. 'eth1'. The mapping is executed
|
|
||||||
automatically.
|
|
||||||
The module installation message (displayed either in a system
|
|
||||||
log file or on the console) prints a line for each adapter
|
|
||||||
found containing the corresponding 'ethX'.
|
|
||||||
|
|
||||||
3. Select an IP address and assign it to the respective adapter by
|
|
||||||
entering:
|
|
||||||
ifconfig eth0 <ip-address>
|
|
||||||
With this command, the adapter is connected to the Ethernet.
|
|
||||||
|
|
||||||
SK-98xx Gigabit Ethernet Server Adapters: The yellow LED on the adapter
|
|
||||||
is now active, the link status LED of the primary port is active and
|
|
||||||
the link status LED of the secondary port (on dual port adapters) is
|
|
||||||
blinking (if the ports are connected to a switch or hub).
|
|
||||||
SK-98xx V2.0 Gigabit Ethernet Adapters: The link status LED is active.
|
|
||||||
In addition, you will receive a status message on the console stating
|
|
||||||
"ethX: network connection up using port Y" and showing the selected
|
|
||||||
connection parameters (x stands for the ethernet device number
|
|
||||||
(0,1,2, etc), y stands for the port name (A or B)).
|
|
||||||
|
|
||||||
NOTE: If you are in doubt about IP addresses, ask your network
|
|
||||||
administrator for assistance.
|
|
||||||
|
|
||||||
4. Your adapter should now be fully operational.
|
|
||||||
Use 'ping <otherstation>' to verify the connection to other computers
|
|
||||||
on your network.
|
|
||||||
5. To check the adapter configuration view /proc/net/sk98lin/[devicename].
|
|
||||||
For example by executing:
|
|
||||||
"cat /proc/net/sk98lin/eth0"
|
|
||||||
|
|
||||||
Unload the module
|
|
||||||
-----------------
|
|
||||||
To stop and unload the driver modules, proceed as follows:
|
|
||||||
|
|
||||||
1. Execute the command "ifconfig eth0 down".
|
|
||||||
2. Execute the command "rmmod sk98lin".
|
|
||||||
|
|
||||||
3.2 Inclusion of adapter at system start
|
|
||||||
-----------------------------------------
|
|
||||||
|
|
||||||
Since a large number of different Linux distributions are
|
|
||||||
available, we are unable to describe a general installation procedure
|
|
||||||
for the driver module.
|
|
||||||
Because the driver is now integrated in the kernel, installation should
|
|
||||||
be easy, using the standard mechanism of your distribution.
|
|
||||||
Refer to the distribution's manual for installation of ethernet adapters.
|
|
||||||
|
|
||||||
***
|
|
||||||
|
|
||||||
4 Driver Parameters
|
|
||||||
====================
|
|
||||||
|
|
||||||
Parameters can be set at the command line after the module has been
|
|
||||||
loaded with the command 'modprobe'.
|
|
||||||
In some distributions, the configuration tools are able to pass parameters
|
|
||||||
to the driver module.
|
|
||||||
|
|
||||||
If you use the kernel module loader, you can set driver parameters
|
|
||||||
in the file /etc/modprobe.conf (or /etc/modules.conf in 2.4 or earlier).
|
|
||||||
To set the driver parameters in this file, proceed as follows:
|
|
||||||
|
|
||||||
1. Insert a line of the form :
|
|
||||||
options sk98lin ...
|
|
||||||
For "...", the same syntax is required as described for the command
|
|
||||||
line parameters of modprobe below.
|
|
||||||
2. To activate the new parameters, either reboot your computer
|
|
||||||
or
|
|
||||||
unload and reload the driver.
|
|
||||||
The syntax of the driver parameters is:
|
|
||||||
|
|
||||||
modprobe sk98lin parameter=value1[,value2[,value3...]]
|
|
||||||
|
|
||||||
where value1 refers to the first adapter, value2 to the second etc.
|
|
||||||
|
|
||||||
NOTE: All parameters are case sensitive. Write them exactly as shown
|
|
||||||
below.
|
|
||||||
|
|
||||||
Example:
|
|
||||||
Suppose you have two adapters. You want to set auto-negotiation
|
|
||||||
on the first adapter to ON and on the second adapter to OFF.
|
|
||||||
You also want to set DuplexCapabilities on the first adapter
|
|
||||||
to FULL, and on the second adapter to HALF.
|
|
||||||
Then, you must enter:
|
|
||||||
|
|
||||||
modprobe sk98lin AutoNeg_A=On,Off DupCap_A=Full,Half
|
|
||||||
|
|
||||||
NOTE: The number of adapters that can be configured this way is
|
|
||||||
limited in the driver (file skge.c, constant SK_MAX_CARD_PARAM).
|
|
||||||
The current limit is 16. If you happen to install
|
|
||||||
more adapters, adjust this and recompile.
|
|
||||||
|
|
||||||
|
|
||||||
4.1 Per-Port Parameters
|
|
||||||
------------------------
|
|
||||||
|
|
||||||
These settings are available for each port on the adapter.
|
|
||||||
In the following description, '?' stands for the port for
|
|
||||||
which you set the parameter (A or B).
|
|
||||||
|
|
||||||
Speed
|
|
||||||
-----
|
|
||||||
Parameter: Speed_?
|
|
||||||
Values: 10, 100, 1000, Auto
|
|
||||||
Default: Auto
|
|
||||||
|
|
||||||
This parameter is used to set the speed capabilities. It is only valid
|
|
||||||
for the SK-98xx V2.0 copper adapters.
|
|
||||||
Usually, the speed is negotiated between the two ports during link
|
|
||||||
establishment. If this fails, a port can be forced to a specific setting
|
|
||||||
with this parameter.
|
|
||||||
|
|
||||||
Auto-Negotiation
|
|
||||||
----------------
|
|
||||||
Parameter: AutoNeg_?
|
|
||||||
Values: On, Off, Sense
|
|
||||||
Default: On
|
|
||||||
|
|
||||||
The "Sense"-mode automatically detects whether the link partner supports
|
|
||||||
auto-negotiation or not.
|
|
||||||
|
|
||||||
Duplex Capabilities
|
|
||||||
-------------------
|
|
||||||
Parameter: DupCap_?
|
|
||||||
Values: Half, Full, Both
|
|
||||||
Default: Both
|
|
||||||
|
|
||||||
This parameters is only relevant if auto-negotiation for this port is
|
|
||||||
not set to "Sense". If auto-negotiation is set to "On", all three values
|
|
||||||
are possible. If it is set to "Off", only "Full" and "Half" are allowed.
|
|
||||||
This parameter is useful if your link partner does not support all
|
|
||||||
possible combinations.
|
|
||||||
|
|
||||||
Flow Control
|
|
||||||
------------
|
|
||||||
Parameter: FlowCtrl_?
|
|
||||||
Values: Sym, SymOrRem, LocSend, None
|
|
||||||
Default: SymOrRem
|
|
||||||
|
|
||||||
This parameter can be used to set the flow control capabilities the
|
|
||||||
port reports during auto-negotiation. It can be set for each port
|
|
||||||
individually.
|
|
||||||
Possible modes:
|
|
||||||
-- Sym = Symmetric: both link partners are allowed to send
|
|
||||||
PAUSE frames
|
|
||||||
-- SymOrRem = SymmetricOrRemote: both or only remote partner
|
|
||||||
are allowed to send PAUSE frames
|
|
||||||
-- LocSend = LocalSend: only local link partner is allowed
|
|
||||||
to send PAUSE frames
|
|
||||||
-- None = no link partner is allowed to send PAUSE frames
|
|
||||||
|
|
||||||
NOTE: This parameter is ignored if auto-negotiation is set to "Off".
|
|
||||||
|
|
||||||
Role in Master-Slave-Negotiation (1000Base-T only)
|
|
||||||
--------------------------------------------------
|
|
||||||
Parameter: Role_?
|
|
||||||
Values: Auto, Master, Slave
|
|
||||||
Default: Auto
|
|
||||||
|
|
||||||
This parameter is only valid for the SK-9821 and SK-9822 adapters.
|
|
||||||
For two 1000Base-T ports to communicate, one must take the role of the
|
|
||||||
master (providing timing information), while the other must be the
|
|
||||||
slave. Usually, this is negotiated between the two ports during link
|
|
||||||
establishment. If this fails, a port can be forced to a specific setting
|
|
||||||
with this parameter.
|
|
||||||
|
|
||||||
|
|
||||||
4.2 Adapter Parameters
|
|
||||||
-----------------------
|
|
||||||
|
|
||||||
Connection Type (SK-98xx V2.0 copper adapters only)
|
|
||||||
---------------
|
|
||||||
Parameter: ConType
|
|
||||||
Values: Auto, 100FD, 100HD, 10FD, 10HD
|
|
||||||
Default: Auto
|
|
||||||
|
|
||||||
The parameter 'ConType' is a combination of all five per-port parameters
|
|
||||||
within one single parameter. This simplifies the configuration of both ports
|
|
||||||
of an adapter card! The different values of this variable reflect the most
|
|
||||||
meaningful combinations of port parameters.
|
|
||||||
|
|
||||||
The following table shows the values of 'ConType' and the corresponding
|
|
||||||
combinations of the per-port parameters:
|
|
||||||
|
|
||||||
ConType | DupCap AutoNeg FlowCtrl Role Speed
|
|
||||||
----------+------------------------------------------------------
|
|
||||||
Auto | Both On SymOrRem Auto Auto
|
|
||||||
100FD | Full Off None Auto (ignored) 100
|
|
||||||
100HD | Half Off None Auto (ignored) 100
|
|
||||||
10FD | Full Off None Auto (ignored) 10
|
|
||||||
10HD | Half Off None Auto (ignored) 10
|
|
||||||
|
|
||||||
Stating any other port parameter together with this 'ConType' variable
|
|
||||||
will result in a merged configuration of those settings. This due to
|
|
||||||
the fact, that the per-port parameters (e.g. Speed_? ) have a higher
|
|
||||||
priority than the combined variable 'ConType'.
|
|
||||||
|
|
||||||
NOTE: This parameter is always used on both ports of the adapter card.
|
|
||||||
|
|
||||||
Interrupt Moderation
|
|
||||||
--------------------
|
|
||||||
Parameter: Moderation
|
|
||||||
Values: None, Static, Dynamic
|
|
||||||
Default: None
|
|
||||||
|
|
||||||
Interrupt moderation is employed to limit the maximum number of interrupts
|
|
||||||
the driver has to serve. That is, one or more interrupts (which indicate any
|
|
||||||
transmit or receive packet to be processed) are queued until the driver
|
|
||||||
processes them. When queued interrupts are to be served, is determined by the
|
|
||||||
'IntsPerSec' parameter, which is explained later below.
|
|
||||||
|
|
||||||
Possible modes:
|
|
||||||
|
|
||||||
-- None - No interrupt moderation is applied on the adapter card.
|
|
||||||
Therefore, each transmit or receive interrupt is served immediately
|
|
||||||
as soon as it appears on the interrupt line of the adapter card.
|
|
||||||
|
|
||||||
-- Static - Interrupt moderation is applied on the adapter card.
|
|
||||||
All transmit and receive interrupts are queued until a complete
|
|
||||||
moderation interval ends. If such a moderation interval ends, all
|
|
||||||
queued interrupts are processed in one big bunch without any delay.
|
|
||||||
The term 'static' reflects the fact, that interrupt moderation is
|
|
||||||
always enabled, regardless how much network load is currently
|
|
||||||
passing via a particular interface. In addition, the duration of
|
|
||||||
the moderation interval has a fixed length that never changes while
|
|
||||||
the driver is operational.
|
|
||||||
|
|
||||||
-- Dynamic - Interrupt moderation might be applied on the adapter card,
|
|
||||||
depending on the load of the system. If the driver detects that the
|
|
||||||
system load is too high, the driver tries to shield the system against
|
|
||||||
too much network load by enabling interrupt moderation. If - at a later
|
|
||||||
time - the CPU utilization decreases again (or if the network load is
|
|
||||||
negligible) the interrupt moderation will automatically be disabled.
|
|
||||||
|
|
||||||
Interrupt moderation should be used when the driver has to handle one or more
|
|
||||||
interfaces with a high network load, which - as a consequence - leads also to a
|
|
||||||
high CPU utilization. When moderation is applied in such high network load
|
|
||||||
situations, CPU load might be reduced by 20-30%.
|
|
||||||
|
|
||||||
NOTE: The drawback of using interrupt moderation is an increase of the round-
|
|
||||||
trip-time (RTT), due to the queueing and serving of interrupts at dedicated
|
|
||||||
moderation times.
|
|
||||||
|
|
||||||
Interrupts per second
|
|
||||||
---------------------
|
|
||||||
Parameter: IntsPerSec
|
|
||||||
Values: 30...40000 (interrupts per second)
|
|
||||||
Default: 2000
|
|
||||||
|
|
||||||
This parameter is only used if either static or dynamic interrupt moderation
|
|
||||||
is used on a network adapter card. Using this parameter if no moderation is
|
|
||||||
applied will lead to no action performed.
|
|
||||||
|
|
||||||
This parameter determines the length of any interrupt moderation interval.
|
|
||||||
Assuming that static interrupt moderation is to be used, an 'IntsPerSec'
|
|
||||||
parameter value of 2000 will lead to an interrupt moderation interval of
|
|
||||||
500 microseconds.
|
|
||||||
|
|
||||||
NOTE: The duration of the moderation interval is to be chosen with care.
|
|
||||||
At first glance, selecting a very long duration (e.g. only 100 interrupts per
|
|
||||||
second) seems to be meaningful, but the increase of packet-processing delay
|
|
||||||
is tremendous. On the other hand, selecting a very short moderation time might
|
|
||||||
compensate the use of any moderation being applied.
|
|
||||||
|
|
||||||
|
|
||||||
Preferred Port
|
|
||||||
--------------
|
|
||||||
Parameter: PrefPort
|
|
||||||
Values: A, B
|
|
||||||
Default: A
|
|
||||||
|
|
||||||
This is used to force the preferred port to A or B (on dual-port network
|
|
||||||
adapters). The preferred port is the one that is used if both are detected
|
|
||||||
as fully functional.
|
|
||||||
|
|
||||||
RLMT Mode (Redundant Link Management Technology)
|
|
||||||
------------------------------------------------
|
|
||||||
Parameter: RlmtMode
|
|
||||||
Values: CheckLinkState,CheckLocalPort, CheckSeg, DualNet
|
|
||||||
Default: CheckLinkState
|
|
||||||
|
|
||||||
RLMT monitors the status of the port. If the link of the active port
|
|
||||||
fails, RLMT switches immediately to the standby link. The virtual link is
|
|
||||||
maintained as long as at least one 'physical' link is up.
|
|
||||||
|
|
||||||
Possible modes:
|
|
||||||
|
|
||||||
-- CheckLinkState - Check link state only: RLMT uses the link state
|
|
||||||
reported by the adapter hardware for each individual port to
|
|
||||||
determine whether a port can be used for all network traffic or
|
|
||||||
not.
|
|
||||||
|
|
||||||
-- CheckLocalPort - In this mode, RLMT monitors the network path
|
|
||||||
between the two ports of an adapter by regularly exchanging packets
|
|
||||||
between them. This mode requires a network configuration in which
|
|
||||||
the two ports are able to "see" each other (i.e. there must not be
|
|
||||||
any router between the ports).
|
|
||||||
|
|
||||||
-- CheckSeg - Check local port and segmentation: This mode supports the
|
|
||||||
same functions as the CheckLocalPort mode and additionally checks
|
|
||||||
network segmentation between the ports. Therefore, this mode is only
|
|
||||||
to be used if Gigabit Ethernet switches are installed on the network
|
|
||||||
that have been configured to use the Spanning Tree protocol.
|
|
||||||
|
|
||||||
-- DualNet - In this mode, ports A and B are used as separate devices.
|
|
||||||
If you have a dual port adapter, port A will be configured as eth0
|
|
||||||
and port B as eth1. Both ports can be used independently with
|
|
||||||
distinct IP addresses. The preferred port setting is not used.
|
|
||||||
RLMT is turned off.
|
|
||||||
|
|
||||||
NOTE: RLMT modes CLP and CLPSS are designed to operate in configurations
|
|
||||||
where a network path between the ports on one adapter exists.
|
|
||||||
Moreover, they are not designed to work where adapters are connected
|
|
||||||
back-to-back.
|
|
||||||
***
|
|
||||||
|
|
||||||
|
|
||||||
5 Large Frame Support
|
|
||||||
======================
|
|
||||||
|
|
||||||
The driver supports large frames (also called jumbo frames). Using large
|
|
||||||
frames can result in an improved throughput if transferring large amounts
|
|
||||||
of data.
|
|
||||||
To enable large frames, set the MTU (maximum transfer unit) of the
|
|
||||||
interface to the desired value (up to 9000), execute the following
|
|
||||||
command:
|
|
||||||
ifconfig eth0 mtu 9000
|
|
||||||
This will only work if you have two adapters connected back-to-back
|
|
||||||
or if you use a switch that supports large frames. When using a switch,
|
|
||||||
it should be configured to allow large frames and auto-negotiation should
|
|
||||||
be set to OFF. The setting must be configured on all adapters that can be
|
|
||||||
reached by the large frames. If one adapter is not set to receive large
|
|
||||||
frames, it will simply drop them.
|
|
||||||
|
|
||||||
You can switch back to the standard ethernet frame size by executing the
|
|
||||||
following command:
|
|
||||||
ifconfig eth0 mtu 1500
|
|
||||||
|
|
||||||
To permanently configure this setting, add a script with the 'ifconfig'
|
|
||||||
line to the system startup sequence (named something like "S99sk98lin"
|
|
||||||
in /etc/rc.d/rc2.d).
|
|
||||||
***
|
|
||||||
|
|
||||||
|
|
||||||
6 VLAN and Link Aggregation Support (IEEE 802.1, 802.1q, 802.3ad)
|
|
||||||
==================================================================
|
|
||||||
|
|
||||||
The Marvell Yukon/SysKonnect Linux drivers are able to support VLAN and
|
|
||||||
Link Aggregation according to IEEE standards 802.1, 802.1q, and 802.3ad.
|
|
||||||
These features are only available after installation of open source
|
|
||||||
modules available on the Internet:
|
|
||||||
For VLAN go to: http://www.candelatech.com/~greear/vlan.html
|
|
||||||
For Link Aggregation go to: http://www.st.rim.or.jp/~yumo
|
|
||||||
|
|
||||||
NOTE: SysKonnect GmbH does not offer any support for these open source
|
|
||||||
modules and does not take the responsibility for any kind of
|
|
||||||
failures or problems arising in connection with these modules.
|
|
||||||
|
|
||||||
NOTE: Configuring Link Aggregation on a SysKonnect dual link adapter may
|
|
||||||
cause problems when unloading the driver.
|
|
||||||
|
|
||||||
|
|
||||||
7 Troubleshooting
|
|
||||||
==================
|
|
||||||
|
|
||||||
If any problems occur during the installation process, check the
|
|
||||||
following list:
|
|
||||||
|
|
||||||
|
|
||||||
Problem: The SK-98xx adapter cannot be found by the driver.
|
|
||||||
Solution: In /proc/pci search for the following entry:
|
|
||||||
'Ethernet controller: SysKonnect SK-98xx ...'
|
|
||||||
If this entry exists, the SK-98xx or SK-98xx V2.0 adapter has
|
|
||||||
been found by the system and should be operational.
|
|
||||||
If this entry does not exist or if the file '/proc/pci' is not
|
|
||||||
found, there may be a hardware problem or the PCI support may
|
|
||||||
not be enabled in your kernel.
|
|
||||||
The adapter can be checked using the diagnostics program which
|
|
||||||
is available on the SysKonnect web site:
|
|
||||||
www.syskonnect.com
|
|
||||||
|
|
||||||
Some COMPAQ machines have problems dealing with PCI under Linux.
|
|
||||||
This problem is described in the 'PCI howto' document
|
|
||||||
(included in some distributions or available from the
|
|
||||||
web, e.g. at 'www.linux.org').
|
|
||||||
|
|
||||||
|
|
||||||
Problem: Programs such as 'ifconfig' or 'route' cannot be found or the
|
|
||||||
error message 'Operation not permitted' is displayed.
|
|
||||||
Reason: You are not logged in as user 'root'.
|
|
||||||
Solution: Logout and login as 'root' or change to 'root' via 'su'.
|
|
||||||
|
|
||||||
|
|
||||||
Problem: Upon use of the command 'ping <address>' the message
|
|
||||||
"ping: sendto: Network is unreachable" is displayed.
|
|
||||||
Reason: Your route is not set correctly.
|
|
||||||
Solution: If you are using RedHat, you probably forgot to set up the
|
|
||||||
route in the 'network configuration'.
|
|
||||||
Check the existing routes with the 'route' command and check
|
|
||||||
if an entry for 'eth0' exists, and if so, if it is set correctly.
|
|
||||||
|
|
||||||
|
|
||||||
Problem: The driver can be started, the adapter is connected to the
|
|
||||||
network, but you cannot receive or transmit any packets;
|
|
||||||
e.g. 'ping' does not work.
|
|
||||||
Reason: There is an incorrect route in your routing table.
|
|
||||||
Solution: Check the routing table with the command 'route' and read the
|
|
||||||
manual help pages dealing with routes (enter 'man route').
|
|
||||||
|
|
||||||
NOTE: Although the 2.2.x kernel versions generate the routing entry
|
|
||||||
automatically, problems of this kind may occur here as well. We've
|
|
||||||
come across a situation in which the driver started correctly at
|
|
||||||
system start, but after the driver has been removed and reloaded,
|
|
||||||
the route of the adapter's network pointed to the 'dummy0'device
|
|
||||||
and had to be corrected manually.
|
|
||||||
|
|
||||||
|
|
||||||
Problem: Your computer should act as a router between multiple
|
|
||||||
IP subnetworks (using multiple adapters), but computers in
|
|
||||||
other subnetworks cannot be reached.
|
|
||||||
Reason: Either the router's kernel is not configured for IP forwarding
|
|
||||||
or the routing table and gateway configuration of at least one
|
|
||||||
computer is not working.
|
|
||||||
|
|
||||||
Problem: Upon driver start, the following error message is displayed:
|
|
||||||
"eth0: -- ERROR --
|
|
||||||
Class: internal Software error
|
|
||||||
Nr: 0xcc
|
|
||||||
Msg: SkGeInitPort() cannot init running ports"
|
|
||||||
Reason: You are using a driver compiled for single processor machines
|
|
||||||
on a multiprocessor machine with SMP (Symmetric MultiProcessor)
|
|
||||||
kernel.
|
|
||||||
Solution: Configure your kernel appropriately and recompile the kernel or
|
|
||||||
the modules.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
If your problem is not listed here, please contact SysKonnect's technical
|
|
||||||
support for help (linux@syskonnect.de).
|
|
||||||
When contacting our technical support, please ensure that the following
|
|
||||||
information is available:
|
|
||||||
- System Manufacturer and HW Informations (CPU, Memory... )
|
|
||||||
- PCI-Boards in your system
|
|
||||||
- Distribution
|
|
||||||
- Kernel version
|
|
||||||
- Driver version
|
|
||||||
***
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
***End of Readme File***
|
|
|
@ -1,7 +1,7 @@
|
||||||
TCP protocol
|
TCP protocol
|
||||||
============
|
============
|
||||||
|
|
||||||
Last updated: 21 June 2005
|
Last updated: 9 February 2008
|
||||||
|
|
||||||
Contents
|
Contents
|
||||||
========
|
========
|
||||||
|
@ -52,9 +52,9 @@ research and RFC's before developing new modules.
|
||||||
The method that is used to determine which congestion control mechanism is
|
The method that is used to determine which congestion control mechanism is
|
||||||
determined by the setting of the sysctl net.ipv4.tcp_congestion_control.
|
determined by the setting of the sysctl net.ipv4.tcp_congestion_control.
|
||||||
The default congestion control will be the last one registered (LIFO);
|
The default congestion control will be the last one registered (LIFO);
|
||||||
so if you built everything as modules. the default will be reno. If you
|
so if you built everything as modules, the default will be reno. If you
|
||||||
build with the default's from Kconfig, then BIC will be builtin (not a module)
|
build with the defaults from Kconfig, then CUBIC will be builtin (not a
|
||||||
and it will end up the default.
|
module) and it will end up the default.
|
||||||
|
|
||||||
If you really want a particular default value then you will need
|
If you really want a particular default value then you will need
|
||||||
to set it with the sysctl. If you use a sysctl, the module will be autoloaded
|
to set it with the sysctl. If you use a sysctl, the module will be autoloaded
|
||||||
|
|
|
@ -1,621 +0,0 @@
|
||||||
------------------------------------------------------------------------------
|
|
||||||
Linux WAN Router Utilities Package
|
|
||||||
------------------------------------------------------------------------------
|
|
||||||
Version 2.2.1
|
|
||||||
Mar 28, 2001
|
|
||||||
Author: Nenad Corbic <ncorbic@sangoma.com>
|
|
||||||
Copyright (c) 1995-2001 Sangoma Technologies Inc.
|
|
||||||
------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
INTRODUCTION
|
|
||||||
|
|
||||||
Wide Area Networks (WANs) are used to interconnect Local Area Networks (LANs)
|
|
||||||
and/or stand-alone hosts over vast distances with data transfer rates
|
|
||||||
significantly higher than those achievable with commonly used dial-up
|
|
||||||
connections.
|
|
||||||
|
|
||||||
Usually an external device called `WAN router' sitting on your local network
|
|
||||||
or connected to your machine's serial port provides physical connection to
|
|
||||||
WAN. Although router's job may be as simple as taking your local network
|
|
||||||
traffic, converting it to WAN format and piping it through the WAN link, these
|
|
||||||
devices are notoriously expensive, with prices as much as 2 - 5 times higher
|
|
||||||
then the price of a typical PC box.
|
|
||||||
|
|
||||||
Alternatively, considering robustness and multitasking capabilities of Linux,
|
|
||||||
an internal router can be built (most routers use some sort of stripped down
|
|
||||||
Unix-like operating system anyway). With a number of relatively inexpensive WAN
|
|
||||||
interface cards available on the market, a perfectly usable router can be
|
|
||||||
built for less than half a price of an external router. Yet a Linux box
|
|
||||||
acting as a router can still be used for other purposes, such as fire-walling,
|
|
||||||
running FTP, WWW or DNS server, etc.
|
|
||||||
|
|
||||||
This kernel module introduces the notion of a WAN Link Driver (WLD) to Linux
|
|
||||||
operating system and provides generic hardware-independent services for such
|
|
||||||
drivers. Why can existing Linux network device interface not be used for
|
|
||||||
this purpose? Well, it can. However, there are a few key differences between
|
|
||||||
a typical network interface (e.g. Ethernet) and a WAN link.
|
|
||||||
|
|
||||||
Many WAN protocols, such as X.25 and frame relay, allow for multiple logical
|
|
||||||
connections (known as `virtual circuits' in X.25 terminology) over a single
|
|
||||||
physical link. Each such virtual circuit may (and almost always does) lead
|
|
||||||
to a different geographical location and, therefore, different network. As a
|
|
||||||
result, it is the virtual circuit, not the physical link, that represents a
|
|
||||||
route and, therefore, a network interface in Linux terms.
|
|
||||||
|
|
||||||
To further complicate things, virtual circuits are usually volatile in nature
|
|
||||||
(excluding so called `permanent' virtual circuits or PVCs). With almost no
|
|
||||||
time required to set up and tear down a virtual circuit, it is highly desirable
|
|
||||||
to implement on-demand connections in order to minimize network charges. So
|
|
||||||
unlike a typical network driver, the WAN driver must be able to handle multiple
|
|
||||||
network interfaces and cope as multiple virtual circuits come into existence
|
|
||||||
and go away dynamically.
|
|
||||||
|
|
||||||
Last, but not least, WAN configuration is much more complex than that of say
|
|
||||||
Ethernet and may well amount to several dozens of parameters. Some of them
|
|
||||||
are "link-wide" while others are virtual circuit-specific. The same holds
|
|
||||||
true for WAN statistics which is by far more extensive and extremely useful
|
|
||||||
when troubleshooting WAN connections. Extending the ifconfig utility to suit
|
|
||||||
these needs may be possible, but does not seem quite reasonable. Therefore, a
|
|
||||||
WAN configuration utility and corresponding application programmer's interface
|
|
||||||
is needed for this purpose.
|
|
||||||
|
|
||||||
Most of these problems are taken care of by this module. Its goal is to
|
|
||||||
provide a user with more-or-less standard look and feel for all WAN devices and
|
|
||||||
assist a WAN device driver writer by providing common services, such as:
|
|
||||||
|
|
||||||
o User-level interface via /proc file system
|
|
||||||
o Centralized configuration
|
|
||||||
o Device management (setup, shutdown, etc.)
|
|
||||||
o Network interface management (dynamic creation/destruction)
|
|
||||||
o Protocol encapsulation/decapsulation
|
|
||||||
|
|
||||||
To ba able to use the Linux WAN Router you will also need a WAN Tools package
|
|
||||||
available from
|
|
||||||
|
|
||||||
ftp.sangoma.com/pub/linux/current_wanpipe/wanpipe-X.Y.Z.tgz
|
|
||||||
|
|
||||||
where vX.Y.Z represent the wanpipe version number.
|
|
||||||
|
|
||||||
For technical questions and/or comments please e-mail to ncorbic@sangoma.com.
|
|
||||||
For general inquiries please contact Sangoma Technologies Inc. by
|
|
||||||
|
|
||||||
Hotline: 1-800-388-2475 (USA and Canada, toll free)
|
|
||||||
Phone: (905) 474-1990 ext: 106
|
|
||||||
Fax: (905) 474-9223
|
|
||||||
E-mail: dm@sangoma.com (David Mandelstam)
|
|
||||||
WWW: http://www.sangoma.com
|
|
||||||
|
|
||||||
|
|
||||||
INSTALLATION
|
|
||||||
|
|
||||||
Please read the WanpipeForLinux.pdf manual on how to
|
|
||||||
install the WANPIPE tools and drivers properly.
|
|
||||||
|
|
||||||
|
|
||||||
After installing wanpipe package: /usr/local/wanrouter/doc.
|
|
||||||
On the ftp.sangoma.com : /linux/current_wanpipe/doc
|
|
||||||
|
|
||||||
|
|
||||||
COPYRIGHT AND LICENSING INFORMATION
|
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify it under
|
|
||||||
the terms of the GNU General Public License as published by the Free Software
|
|
||||||
Foundation; either version 2, or (at your option) any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
|
||||||
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License along with
|
|
||||||
this program; if not, write to the Free Software Foundation, Inc., 675 Mass
|
|
||||||
Ave, Cambridge, MA 02139, USA.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
ACKNOWLEDGEMENTS
|
|
||||||
|
|
||||||
This product is based on the WANPIPE(tm) Multiprotocol WAN Router developed
|
|
||||||
by Sangoma Technologies Inc. for Linux 2.0.x and 2.2.x. Success of the WANPIPE
|
|
||||||
together with the next major release of Linux kernel in summer 1996 commanded
|
|
||||||
adequate changes to the WANPIPE code to take full advantage of new Linux
|
|
||||||
features.
|
|
||||||
|
|
||||||
Instead of continuing developing proprietary interface tied to Sangoma WAN
|
|
||||||
cards, we decided to separate all hardware-independent code into a separate
|
|
||||||
module and defined two levels of interfaces - one for user-level applications
|
|
||||||
and another for kernel-level WAN drivers. WANPIPE is now implemented as a
|
|
||||||
WAN driver compliant with the WAN Link Driver interface. Also a general
|
|
||||||
purpose WAN configuration utility and a set of shell scripts was developed to
|
|
||||||
support WAN router at the user level.
|
|
||||||
|
|
||||||
Many useful ideas concerning hardware-independent interface implementation
|
|
||||||
were given by Mike McLagan <mike.mclagan@linux.org> and his implementation
|
|
||||||
of the Frame Relay router and drivers for Sangoma cards (dlci/sdla).
|
|
||||||
|
|
||||||
With the new implementation of the APIs being incorporated into the WANPIPE,
|
|
||||||
a special thank goes to Alan Cox in providing insight into BSD sockets.
|
|
||||||
|
|
||||||
Special thanks to all the WANPIPE users who performed field-testing, reported
|
|
||||||
bugs and made valuable comments and suggestions that help us to improve this
|
|
||||||
product.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
NEW IN THIS RELEASE
|
|
||||||
|
|
||||||
o Updated the WANCFG utility
|
|
||||||
Calls the pppconfig to configure the PPPD
|
|
||||||
for async connections.
|
|
||||||
|
|
||||||
o Added the PPPCONFIG utility
|
|
||||||
Used to configure the PPPD daemon for the
|
|
||||||
WANPIPE Async PPP and standard serial port.
|
|
||||||
The wancfg calls the pppconfig to configure
|
|
||||||
the pppd.
|
|
||||||
|
|
||||||
o Fixed the PCI autodetect feature.
|
|
||||||
The SLOT 0 was used as an autodetect option
|
|
||||||
however, some high end PC's slot numbers start
|
|
||||||
from 0.
|
|
||||||
|
|
||||||
o This release has been tested with the new backupd
|
|
||||||
daemon release.
|
|
||||||
|
|
||||||
|
|
||||||
PRODUCT COMPONENTS AND RELATED FILES
|
|
||||||
|
|
||||||
/etc: (or user defined)
|
|
||||||
wanpipe1.conf default router configuration file
|
|
||||||
|
|
||||||
/lib/modules/X.Y.Z/misc:
|
|
||||||
wanrouter.o router kernel loadable module
|
|
||||||
af_wanpipe.o wanpipe api socket module
|
|
||||||
|
|
||||||
/lib/modules/X.Y.Z/net:
|
|
||||||
sdladrv.o Sangoma SDLA support module
|
|
||||||
wanpipe.o Sangoma WANPIPE(tm) driver module
|
|
||||||
|
|
||||||
/proc/net/wanrouter
|
|
||||||
Config reads current router configuration
|
|
||||||
Status reads current router status
|
|
||||||
{name} reads WAN driver statistics
|
|
||||||
|
|
||||||
/usr/sbin:
|
|
||||||
wanrouter wanrouter start-up script
|
|
||||||
wanconfig wanrouter configuration utility
|
|
||||||
sdladump WANPIPE adapter memory dump utility
|
|
||||||
fpipemon Monitor for Frame Relay
|
|
||||||
cpipemon Monitor for Cisco HDLC
|
|
||||||
ppipemon Monitor for PPP
|
|
||||||
xpipemon Monitor for X25
|
|
||||||
wpkbdmon WANPIPE keyboard led monitor/debugger
|
|
||||||
|
|
||||||
/usr/local/wanrouter:
|
|
||||||
README this file
|
|
||||||
COPYING GNU General Public License
|
|
||||||
Setup installation script
|
|
||||||
Filelist distribution definition file
|
|
||||||
wanrouter.rc meta-configuration file
|
|
||||||
(used by the Setup and wanrouter script)
|
|
||||||
|
|
||||||
/usr/local/wanrouter/doc:
|
|
||||||
wanpipeForLinux.pdf WAN Router User's Manual
|
|
||||||
|
|
||||||
/usr/local/wanrouter/patches:
|
|
||||||
wanrouter-v2213.gz patch for Linux kernels 2.2.11 up to 2.2.13.
|
|
||||||
wanrouter-v2214.gz patch for Linux kernel 2.2.14.
|
|
||||||
wanrouter-v2215.gz patch for Linux kernels 2.2.15 to 2.2.17.
|
|
||||||
wanrouter-v2218.gz patch for Linux kernels 2.2.18 and up.
|
|
||||||
wanrouter-v240.gz patch for Linux kernel 2.4.0.
|
|
||||||
wanrouter-v242.gz patch for Linux kernel 2.4.2 and up.
|
|
||||||
wanrouter-v2034.gz patch for Linux kernel 2.0.34
|
|
||||||
wanrouter-v2036.gz patch for Linux kernel 2.0.36 and up.
|
|
||||||
|
|
||||||
/usr/local/wanrouter/patches/kdrivers:
|
|
||||||
Sources of the latest WANPIPE device drivers.
|
|
||||||
These are used to UPGRADE the linux kernel to the newest
|
|
||||||
version if the kernel source has already been patched with
|
|
||||||
WANPIPE drivers.
|
|
||||||
|
|
||||||
/usr/local/wanrouter/samples:
|
|
||||||
interface sample interface configuration file
|
|
||||||
wanpipe1.cpri CHDLC primary port
|
|
||||||
wanpipe2.csec CHDLC secondary port
|
|
||||||
wanpipe1.fr Frame Relay protocol
|
|
||||||
wanpipe1.ppp PPP protocol )
|
|
||||||
wanpipe1.asy CHDLC ASYNC protocol
|
|
||||||
wanpipe1.x25 X25 protocol
|
|
||||||
wanpipe1.stty Sync TTY driver (Used by Kernel PPPD daemon)
|
|
||||||
wanpipe1.atty Async TTY driver (Used by Kernel PPPD daemon)
|
|
||||||
wanrouter.rc sample meta-configuration file
|
|
||||||
|
|
||||||
/usr/local/wanrouter/util:
|
|
||||||
* wan-tools utilities source code
|
|
||||||
|
|
||||||
/usr/local/wanrouter/api/x25:
|
|
||||||
* x25 api sample programs.
|
|
||||||
/usr/local/wanrouter/api/chdlc:
|
|
||||||
* chdlc api sample programs.
|
|
||||||
/usr/local/wanrouter/api/fr:
|
|
||||||
* fr api sample programs.
|
|
||||||
/usr/local/wanrouter/config/wancfg:
|
|
||||||
wancfg WANPIPE GUI configuration program.
|
|
||||||
Creates wanpipe#.conf files.
|
|
||||||
/usr/local/wanrouter/config/cfgft1:
|
|
||||||
cfgft1 GUI CSU/DSU configuration program.
|
|
||||||
|
|
||||||
/usr/include/linux:
|
|
||||||
wanrouter.h router API definitions
|
|
||||||
wanpipe.h WANPIPE API definitions
|
|
||||||
sdladrv.h SDLA support module API definitions
|
|
||||||
sdlasfm.h SDLA firmware module definitions
|
|
||||||
if_wanpipe.h WANPIPE Socket definitions
|
|
||||||
sdlapci.h WANPIPE PCI definitions
|
|
||||||
|
|
||||||
|
|
||||||
/usr/src/linux/net/wanrouter:
|
|
||||||
* wanrouter source code
|
|
||||||
|
|
||||||
/var/log:
|
|
||||||
wanrouter wanrouter start-up log (created by the Setup script)
|
|
||||||
|
|
||||||
/var/lock: (or /var/lock/subsys for RedHat)
|
|
||||||
wanrouter wanrouter lock file (created by the Setup script)
|
|
||||||
|
|
||||||
/usr/local/wanrouter/firmware:
|
|
||||||
fr514.sfm Frame relay firmware for Sangoma S508/S514 card
|
|
||||||
cdual514.sfm Dual Port Cisco HDLC firmware for Sangoma S508/S514 card
|
|
||||||
ppp514.sfm PPP Firmware for Sangoma S508 and S514 cards
|
|
||||||
x25_508.sfm X25 Firmware for Sangoma S508 card.
|
|
||||||
|
|
||||||
|
|
||||||
REVISION HISTORY
|
|
||||||
|
|
||||||
1.0.0 December 31, 1996 Initial version
|
|
||||||
|
|
||||||
1.0.1 January 30, 1997 Status and statistics can be read via /proc
|
|
||||||
filesystem entries.
|
|
||||||
|
|
||||||
1.0.2 April 30, 1997 Added UDP management via monitors.
|
|
||||||
|
|
||||||
1.0.3 June 3, 1997 UDP management for multiple boards using Frame
|
|
||||||
Relay and PPP
|
|
||||||
Enabled continuous transmission of Configure
|
|
||||||
Request Packet for PPP (for 508 only)
|
|
||||||
Connection Timeout for PPP changed from 900 to 0
|
|
||||||
Flow Control Problem fixed for Frame Relay
|
|
||||||
|
|
||||||
1.0.4 July 10, 1997 S508/FT1 monitoring capability in fpipemon and
|
|
||||||
ppipemon utilities.
|
|
||||||
Configurable TTL for UDP packets.
|
|
||||||
Multicast and Broadcast IP source addresses are
|
|
||||||
silently discarded.
|
|
||||||
|
|
||||||
1.0.5 July 28, 1997 Configurable T391,T392,N391,N392,N393 for Frame
|
|
||||||
Relay in router.conf.
|
|
||||||
Configurable Memory Address through router.conf
|
|
||||||
for Frame Relay, PPP and X.25. (commenting this
|
|
||||||
out enables auto-detection).
|
|
||||||
Fixed freeing up received buffers using kfree()
|
|
||||||
for Frame Relay and X.25.
|
|
||||||
Protect sdla_peek() by calling save_flags(),
|
|
||||||
cli() and restore_flags().
|
|
||||||
Changed number of Trace elements from 32 to 20
|
|
||||||
Added DLCI specific data monitoring in FPIPEMON.
|
|
||||||
2.0.0 Nov 07, 1997 Implemented protection of RACE conditions by
|
|
||||||
critical flags for FRAME RELAY and PPP.
|
|
||||||
DLCI List interrupt mode implemented.
|
|
||||||
IPX support in FRAME RELAY and PPP.
|
|
||||||
IPX Server Support (MARS)
|
|
||||||
More driver specific stats included in FPIPEMON
|
|
||||||
and PIPEMON.
|
|
||||||
|
|
||||||
2.0.1 Nov 28, 1997 Bug Fixes for version 2.0.0.
|
|
||||||
Protection of "enable_irq()" while
|
|
||||||
"disable_irq()" has been enabled from any other
|
|
||||||
routine (for Frame Relay, PPP and X25).
|
|
||||||
Added additional Stats for Fpipemon and Ppipemon
|
|
||||||
Improved Load Sharing for multiple boards
|
|
||||||
|
|
||||||
2.0.2 Dec 09, 1997 Support for PAP and CHAP for ppp has been
|
|
||||||
implemented.
|
|
||||||
|
|
||||||
2.0.3 Aug 15, 1998 New release supporting Cisco HDLC, CIR for Frame
|
|
||||||
relay, Dynamic IP assignment for PPP and Inverse
|
|
||||||
Arp support for Frame-relay. Man Pages are
|
|
||||||
included for better support and a new utility
|
|
||||||
for configuring FT1 cards.
|
|
||||||
|
|
||||||
2.0.4 Dec 09, 1998 Dual Port support for Cisco HDLC.
|
|
||||||
Support for HDLC (LAPB) API.
|
|
||||||
Supports BiSync Streaming code for S502E
|
|
||||||
and S503 cards.
|
|
||||||
Support for Streaming HDLC API.
|
|
||||||
Provides a BSD socket interface for
|
|
||||||
creating applications using BiSync
|
|
||||||
streaming.
|
|
||||||
|
|
||||||
2.0.5 Aug 04, 1999 CHDLC initialization bug fix.
|
|
||||||
PPP interrupt driven driver:
|
|
||||||
Fix to the PPP line hangup problem.
|
|
||||||
New PPP firmware
|
|
||||||
Added comments to the startup SYSTEM ERROR messages
|
|
||||||
Xpipemon debugging application for the X25 protocol
|
|
||||||
New USER_MANUAL.txt
|
|
||||||
Fixed the odd boundary 4byte writes to the board.
|
|
||||||
BiSync Streaming code has been taken out.
|
|
||||||
Available as a patch.
|
|
||||||
Streaming HDLC API has been taken out.
|
|
||||||
Available as a patch.
|
|
||||||
|
|
||||||
2.0.6 Aug 17, 1999 Increased debugging in statup scripts
|
|
||||||
Fixed installation bugs from 2.0.5
|
|
||||||
Kernel patch works for both 2.2.10 and 2.2.11 kernels.
|
|
||||||
There is no functional difference between the two packages
|
|
||||||
|
|
||||||
2.0.7 Aug 26, 1999 o Merged X25API code into WANPIPE.
|
|
||||||
o Fixed a memory leak for X25API
|
|
||||||
o Updated the X25API code for 2.2.X kernels.
|
|
||||||
o Improved NEM handling.
|
|
||||||
|
|
||||||
2.1.0 Oct 25, 1999 o New code for S514 PCI Card
|
|
||||||
o New CHDLC and Frame Relay drivers
|
|
||||||
o PPP and X25 are not supported in this release
|
|
||||||
|
|
||||||
2.1.1 Nov 30, 1999 o PPP support for S514 PCI Cards
|
|
||||||
|
|
||||||
2.1.3 Apr 06, 2000 o Socket based x25api
|
|
||||||
o Socket based chdlc api
|
|
||||||
o Socket based fr api
|
|
||||||
o Dual Port Receive only CHDLC support.
|
|
||||||
o Asynchronous CHDLC support (Secondary Port)
|
|
||||||
o cfgft1 GUI csu/dsu configurator
|
|
||||||
o wancfg GUI configuration file
|
|
||||||
configurator.
|
|
||||||
o Architectural directory changes.
|
|
||||||
|
|
||||||
beta-2.1.4 Jul 2000 o Dynamic interface configuration:
|
|
||||||
Network interfaces reflect the state
|
|
||||||
of protocol layer. If the protocol becomes
|
|
||||||
disconnected, driver will bring down
|
|
||||||
the interface. Once the protocol reconnects
|
|
||||||
the interface will be brought up.
|
|
||||||
|
|
||||||
Note: This option is turned off by default.
|
|
||||||
|
|
||||||
o Dynamic wanrouter setup using 'wanconfig':
|
|
||||||
wanconfig utility can be used to
|
|
||||||
shutdown,restart,start or reconfigure
|
|
||||||
a virtual circuit dynamically.
|
|
||||||
|
|
||||||
Frame Relay: Each DLCI can be:
|
|
||||||
created,stopped,restarted and reconfigured
|
|
||||||
dynamically using wanconfig.
|
|
||||||
|
|
||||||
ex: wanconfig card wanpipe1 dev wp1_fr16 up
|
|
||||||
|
|
||||||
o Wanrouter startup via command line arguments:
|
|
||||||
wanconfig also supports wanrouter startup via command line
|
|
||||||
arguments. Thus, there is no need to create a wanpipe#.conf
|
|
||||||
configuration file.
|
|
||||||
|
|
||||||
o Socket based x25api update/bug fixes.
|
|
||||||
Added support for LCN numbers greater than 255.
|
|
||||||
Option to pass up modem messages.
|
|
||||||
Provided a PCI IRQ check, so a single S514
|
|
||||||
card is guaranteed to have a non-sharing interrupt.
|
|
||||||
|
|
||||||
o Fixes to the wancfg utility.
|
|
||||||
o New FT1 debugging support via *pipemon utilities.
|
|
||||||
o Frame Relay ARP support Enabled.
|
|
||||||
|
|
||||||
beta3-2.1.4 Jul 2000 o X25 M_BIT Problem fix.
|
|
||||||
o Added the Multi-Port PPP
|
|
||||||
Updated utilities for the Multi-Port PPP.
|
|
||||||
|
|
||||||
2.1.4 Aut 2000
|
|
||||||
o In X25API:
|
|
||||||
Maximum packet an application can send
|
|
||||||
to the driver has been extended to 4096 bytes.
|
|
||||||
|
|
||||||
Fixed the x25 startup bug. Enable
|
|
||||||
communications only after all interfaces
|
|
||||||
come up. HIGH SVC/PVC is used to calculate
|
|
||||||
the number of channels.
|
|
||||||
Enable protocol only after all interfaces
|
|
||||||
are enabled.
|
|
||||||
|
|
||||||
o Added an extra state to the FT1 config, kernel module.
|
|
||||||
o Updated the pipemon debuggers.
|
|
||||||
|
|
||||||
o Blocked the Multi-Port PPP from running on kernels
|
|
||||||
2.2.16 or greater, due to syncppp kernel module
|
|
||||||
change.
|
|
||||||
|
|
||||||
beta1-2.1.5 Nov 15 2000
|
|
||||||
o Fixed the MultiPort PPP Support for kernels 2.2.16 and above.
|
|
||||||
2.2.X kernels only
|
|
||||||
|
|
||||||
o Secured the driver UDP debugging calls
|
|
||||||
- All illegal network debugging calls are reported to
|
|
||||||
the log.
|
|
||||||
- Defined a set of allowed commands, all other denied.
|
|
||||||
|
|
||||||
o Cpipemon
|
|
||||||
- Added set FT1 commands to the cpipemon. Thus CSU/DSU
|
|
||||||
configuration can be performed using cpipemon.
|
|
||||||
All systems that cannot run cfgft1 GUI utility should
|
|
||||||
use cpipemon to configure the on board CSU/DSU.
|
|
||||||
|
|
||||||
|
|
||||||
o Keyboard Led Monitor/Debugger
|
|
||||||
- A new utility /usr/sbin/wpkbdmon uses keyboard leds
|
|
||||||
to convey operational statistic information of the
|
|
||||||
Sangoma WANPIPE cards.
|
|
||||||
NUM_LOCK = Line State (On=connected, Off=disconnected)
|
|
||||||
CAPS_LOCK = Tx data (On=transmitting, Off=no tx data)
|
|
||||||
SCROLL_LOCK = Rx data (On=receiving, Off=no rx data
|
|
||||||
|
|
||||||
o Hardware probe on module load and dynamic device allocation
|
|
||||||
- During WANPIPE module load, all Sangoma cards are probed
|
|
||||||
and found information is printed in the /var/log/messages.
|
|
||||||
- If no cards are found, the module load fails.
|
|
||||||
- Appropriate number of devices are dynamically loaded
|
|
||||||
based on the number of Sangoma cards found.
|
|
||||||
|
|
||||||
Note: The kernel configuration option
|
|
||||||
CONFIG_WANPIPE_CARDS has been taken out.
|
|
||||||
|
|
||||||
o Fixed the Frame Relay and Chdlc network interfaces so they are
|
|
||||||
compatible with libpcap libraries. Meaning, tcpdump, snort,
|
|
||||||
ethereal, and all other packet sniffers and debuggers work on
|
|
||||||
all WANPIPE network interfaces.
|
|
||||||
- Set the network interface encoding type to ARPHRD_PPP.
|
|
||||||
This tell the sniffers that data obtained from the
|
|
||||||
network interface is in pure IP format.
|
|
||||||
Fix for 2.2.X kernels only.
|
|
||||||
|
|
||||||
o True interface encoding option for Frame Relay and CHDLC
|
|
||||||
- The above fix sets the network interface encoding
|
|
||||||
type to ARPHRD_PPP, however some customers use
|
|
||||||
the encoding interface type to determine the
|
|
||||||
protocol running. Therefore, the TURE ENCODING
|
|
||||||
option will set the interface type back to the
|
|
||||||
original value.
|
|
||||||
|
|
||||||
NOTE: If this option is used with Frame Relay and CHDLC
|
|
||||||
libpcap library support will be broken.
|
|
||||||
i.e. tcpdump will not work.
|
|
||||||
Fix for 2.2.x Kernels only.
|
|
||||||
|
|
||||||
o Ethernet Bridgind over Frame Relay
|
|
||||||
- The Frame Relay bridging has been developed by
|
|
||||||
Kristian Hoffmann and Mark Wells.
|
|
||||||
- The Linux kernel bridge is used to send ethernet
|
|
||||||
data over the frame relay links.
|
|
||||||
For 2.2.X Kernels only.
|
|
||||||
|
|
||||||
o Added extensive 2.0.X support. Most new features of
|
|
||||||
2.1.5 for protocols Frame Relay, PPP and CHDLC are
|
|
||||||
supported under 2.0.X kernels.
|
|
||||||
|
|
||||||
beta1-2.2.0 Dec 30 2000
|
|
||||||
o Updated drivers for 2.4.X kernels.
|
|
||||||
o Updated drivers for SMP support.
|
|
||||||
o X25API is now able to share PCI interrupts.
|
|
||||||
o Took out a general polling routine that was used
|
|
||||||
only by X25API.
|
|
||||||
o Added appropriate locks to the dynamic reconfiguration
|
|
||||||
code.
|
|
||||||
o Fixed a bug in the keyboard debug monitor.
|
|
||||||
|
|
||||||
beta2-2.2.0 Jan 8 2001
|
|
||||||
o Patches for 2.4.0 kernel
|
|
||||||
o Patches for 2.2.18 kernel
|
|
||||||
o Minor updates to PPP and CHLDC drivers.
|
|
||||||
Note: No functional difference.
|
|
||||||
|
|
||||||
beta3-2.2.9 Jan 10 2001
|
|
||||||
o I missed the 2.2.18 kernel patches in beta2-2.2.0
|
|
||||||
release. They are included in this release.
|
|
||||||
|
|
||||||
Stable Release
|
|
||||||
2.2.0 Feb 01 2001
|
|
||||||
o Bug fix in wancfg GUI configurator.
|
|
||||||
The edit function didn't work properly.
|
|
||||||
|
|
||||||
|
|
||||||
bata1-2.2.1 Feb 09 2001
|
|
||||||
o WANPIPE TTY Driver emulation.
|
|
||||||
Two modes of operation Sync and Async.
|
|
||||||
Sync: Using the PPPD daemon, kernel SyncPPP layer
|
|
||||||
and the Wanpipe sync TTY driver: a PPP protocol
|
|
||||||
connection can be established via Sangoma adapter, over
|
|
||||||
a T1 leased line.
|
|
||||||
|
|
||||||
The 2.4.0 kernel PPP layer supports MULTILINK
|
|
||||||
protocol, that can be used to bundle any number of Sangoma
|
|
||||||
adapters (T1 lines) into one, under a single IP address.
|
|
||||||
Thus, efficiently obtaining multiple T1 throughput.
|
|
||||||
|
|
||||||
NOTE: The remote side must also implement MULTILINK PPP
|
|
||||||
protocol.
|
|
||||||
|
|
||||||
Async:Using the PPPD daemon, kernel AsyncPPP layer
|
|
||||||
and the WANPIPE async TTY driver: a PPP protocol
|
|
||||||
connection can be established via Sangoma adapter and
|
|
||||||
a modem, over a telephone line.
|
|
||||||
|
|
||||||
Thus, the WANPIPE async TTY driver simulates a serial
|
|
||||||
TTY driver that would normally be used to interface the
|
|
||||||
MODEM to the linux kernel.
|
|
||||||
|
|
||||||
o WANPIPE PPP Backup Utility
|
|
||||||
This utility will monitor the state of the PPP T1 line.
|
|
||||||
In case of failure, a dial up connection will be established
|
|
||||||
via pppd daemon, ether via a serial tty driver (serial port),
|
|
||||||
or a WANPIPE async TTY driver (in case serial port is unavailable).
|
|
||||||
|
|
||||||
Furthermore, while in dial up mode, the primary PPP T1 link
|
|
||||||
will be monitored for signs of life.
|
|
||||||
|
|
||||||
If the PPP T1 link comes back to life, the dial up connection
|
|
||||||
will be shutdown and T1 line re-established.
|
|
||||||
|
|
||||||
|
|
||||||
o New Setup installation script.
|
|
||||||
Option to UPGRADE device drivers if the kernel source has
|
|
||||||
already been patched with WANPIPE.
|
|
||||||
|
|
||||||
Option to COMPILE WANPIPE modules against the currently
|
|
||||||
running kernel, thus no need for manual kernel and module
|
|
||||||
re-compilation.
|
|
||||||
|
|
||||||
o Updates and Bug Fixes to wancfg utility.
|
|
||||||
|
|
||||||
bata2-2.2.1 Feb 20 2001
|
|
||||||
|
|
||||||
o Bug fixes to the CHDLC device drivers.
|
|
||||||
The driver had compilation problems under kernels
|
|
||||||
2.2.14 or lower.
|
|
||||||
|
|
||||||
o Bug fixes to the Setup installation script.
|
|
||||||
The device drivers compilation options didn't work
|
|
||||||
properly.
|
|
||||||
|
|
||||||
o Update to the wpbackupd daemon.
|
|
||||||
Optimized the cross-over times, between the primary
|
|
||||||
link and the backup dialup.
|
|
||||||
|
|
||||||
beta3-2.2.1 Mar 02 2001
|
|
||||||
o Patches for 2.4.2 kernel.
|
|
||||||
|
|
||||||
o Bug fixes to util/ make files.
|
|
||||||
o Bug fixes to the Setup installation script.
|
|
||||||
|
|
||||||
o Took out the backupd support and made it into
|
|
||||||
as separate package.
|
|
||||||
|
|
||||||
beta4-2.2.1 Mar 12 2001
|
|
||||||
|
|
||||||
o Fix to the Frame Relay Device driver.
|
|
||||||
IPSAC sends a packet of zero length
|
|
||||||
header to the frame relay driver. The
|
|
||||||
driver tries to push its own 2 byte header
|
|
||||||
into the packet, which causes the driver to
|
|
||||||
crash.
|
|
||||||
|
|
||||||
o Fix the WANPIPE re-configuration code.
|
|
||||||
Bug was found by trying to run the cfgft1 while the
|
|
||||||
interface was already running.
|
|
||||||
|
|
||||||
o Updates to cfgft1.
|
|
||||||
Writes a wanpipe#.cfgft1 configuration file
|
|
||||||
once the CSU/DSU is configured. This file can
|
|
||||||
holds the current CSU/DSU configuration.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
>>>>>> END OF README <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
|
|
||||||
|
|
||||||
|
|
|
@ -23,8 +23,7 @@ kernel debugging options, such as Kernel Stack Meter or Kernel Tracer,
|
||||||
may implicitly disable the NMI watchdog.]
|
may implicitly disable the NMI watchdog.]
|
||||||
|
|
||||||
For x86-64, the needed APIC is always compiled in, and the NMI watchdog is
|
For x86-64, the needed APIC is always compiled in, and the NMI watchdog is
|
||||||
always enabled with I/O-APIC mode (nmi_watchdog=1). Currently, local APIC
|
always enabled with I/O-APIC mode (nmi_watchdog=1).
|
||||||
mode (nmi_watchdog=2) does not work on x86-64.
|
|
||||||
|
|
||||||
Using local APIC (nmi_watchdog=2) needs the first performance register, so
|
Using local APIC (nmi_watchdog=2) needs the first performance register, so
|
||||||
you can't use it for other purposes (such as high precision performance
|
you can't use it for other purposes (such as high precision performance
|
||||||
|
|
|
@ -14,6 +14,12 @@ 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
|
||||||
|
- info on Linux PM Quality of Service interface
|
||||||
|
power_supply_class.txt
|
||||||
|
- Tells userspace about battery, UPS, AC or DC power supply properties
|
||||||
s2ram.txt
|
s2ram.txt
|
||||||
- How to get suspend to ram working (and debug it when it isn't)
|
- How to get suspend to ram working (and debug it when it isn't)
|
||||||
states.txt
|
states.txt
|
||||||
|
|
|
@ -196,6 +196,11 @@ its parent; and can't be removed or suspended after that parent.
|
||||||
|
|
||||||
The policy is that the device tree should match hardware bus topology.
|
The policy is that the device tree should match hardware bus topology.
|
||||||
(Or at least the control bus, for devices which use multiple busses.)
|
(Or at least the control bus, for devices which use multiple busses.)
|
||||||
|
In particular, this means that a device registration may fail if the parent of
|
||||||
|
the device is suspending (ie. has been chosen by the PM core as the next
|
||||||
|
device to suspend) or has already suspended, as well as after all of the other
|
||||||
|
devices have been suspended. Device drivers must be prepared to cope with such
|
||||||
|
situations.
|
||||||
|
|
||||||
|
|
||||||
Suspending Devices
|
Suspending Devices
|
||||||
|
@ -310,9 +315,12 @@ used with suspend-to-disk:
|
||||||
PM_EVENT_SUSPEND -- quiesce the driver and put hardware into a low-power
|
PM_EVENT_SUSPEND -- quiesce the driver and put hardware into a low-power
|
||||||
state. When used with system sleep states like "suspend-to-RAM" or
|
state. When used with system sleep states like "suspend-to-RAM" or
|
||||||
"standby", the upcoming resume() call will often be able to rely on
|
"standby", the upcoming resume() call will often be able to rely on
|
||||||
state kept in hardware, or issue system wakeup events. When used
|
state kept in hardware, or issue system wakeup events.
|
||||||
instead with suspend-to-disk, few devices support this capability;
|
|
||||||
most are completely powered off.
|
PM_EVENT_HIBERNATE -- Put hardware into a low-power state and enable wakeup
|
||||||
|
events as appropriate. It is only used with hibernation
|
||||||
|
(suspend-to-disk) and few devices are able to wake up the system from
|
||||||
|
this state; most are completely powered off.
|
||||||
|
|
||||||
PM_EVENT_FREEZE -- quiesce the driver, but don't necessarily change into
|
PM_EVENT_FREEZE -- quiesce the driver, but don't necessarily change into
|
||||||
any low power mode. A system snapshot is about to be taken, often
|
any low power mode. A system snapshot is about to be taken, often
|
||||||
|
@ -329,8 +337,8 @@ used with suspend-to-disk:
|
||||||
wakeup events nor DMA are allowed.
|
wakeup events nor DMA are allowed.
|
||||||
|
|
||||||
To enter "standby" (ACPI S1) or "Suspend to RAM" (STR, ACPI S3) states, or
|
To enter "standby" (ACPI S1) or "Suspend to RAM" (STR, ACPI S3) states, or
|
||||||
the similarly named APM states, only PM_EVENT_SUSPEND is used; for "Suspend
|
the similarly named APM states, only PM_EVENT_SUSPEND is used; the other event
|
||||||
to Disk" (STD, hibernate, ACPI S4), all of those event codes are used.
|
codes are used for hibernation ("Suspend to Disk", STD, ACPI S4).
|
||||||
|
|
||||||
There's also PM_EVENT_ON, a value which never appears as a suspend event
|
There's also PM_EVENT_ON, a value which never appears as a suspend event
|
||||||
but is sometimes used to record the "not suspended" device state.
|
but is sometimes used to record the "not suspended" device state.
|
||||||
|
|
|
@ -59,12 +59,39 @@ Table of Contents
|
||||||
p) Freescale Synchronous Serial Interface
|
p) Freescale Synchronous Serial Interface
|
||||||
q) USB EHCI controllers
|
q) USB EHCI controllers
|
||||||
|
|
||||||
VII - Specifying interrupt information for devices
|
VII - Marvell Discovery mv64[345]6x System Controller chips
|
||||||
|
1) The /system-controller node
|
||||||
|
2) Child nodes of /system-controller
|
||||||
|
a) Marvell Discovery MDIO bus
|
||||||
|
b) Marvell Discovery ethernet controller
|
||||||
|
c) Marvell Discovery PHY nodes
|
||||||
|
d) Marvell Discovery SDMA nodes
|
||||||
|
e) Marvell Discovery BRG nodes
|
||||||
|
f) Marvell Discovery CUNIT nodes
|
||||||
|
g) Marvell Discovery MPSCROUTING nodes
|
||||||
|
h) Marvell Discovery MPSCINTR nodes
|
||||||
|
i) Marvell Discovery MPSC nodes
|
||||||
|
j) Marvell Discovery Watch Dog Timer nodes
|
||||||
|
k) Marvell Discovery I2C nodes
|
||||||
|
l) Marvell Discovery PIC (Programmable Interrupt Controller) nodes
|
||||||
|
m) Marvell Discovery MPP (Multipurpose Pins) multiplexing nodes
|
||||||
|
n) Marvell Discovery GPP (General Purpose Pins) nodes
|
||||||
|
o) Marvell Discovery PCI host bridge node
|
||||||
|
p) Marvell Discovery CPU Error nodes
|
||||||
|
q) Marvell Discovery SRAM Controller nodes
|
||||||
|
r) Marvell Discovery PCI Error Handler nodes
|
||||||
|
s) Marvell Discovery Memory Controller nodes
|
||||||
|
|
||||||
|
VIII - Specifying interrupt information for devices
|
||||||
1) interrupts property
|
1) interrupts property
|
||||||
2) interrupt-parent property
|
2) interrupt-parent property
|
||||||
3) OpenPIC Interrupt Controllers
|
3) OpenPIC Interrupt Controllers
|
||||||
4) ISA Interrupt Controllers
|
4) ISA Interrupt Controllers
|
||||||
|
|
||||||
|
VIII - Specifying GPIO information for devices
|
||||||
|
1) gpios property
|
||||||
|
2) gpio-controller nodes
|
||||||
|
|
||||||
Appendix A - Sample SOC node for MPC8540
|
Appendix A - Sample SOC node for MPC8540
|
||||||
|
|
||||||
|
|
||||||
|
@ -1269,10 +1296,6 @@ platforms are moved over to use the flattened-device-tree model.
|
||||||
|
|
||||||
Recommended properties:
|
Recommended properties:
|
||||||
|
|
||||||
- linux,network-index : This is the intended "index" of this
|
|
||||||
network device. This is used by the bootwrapper to interpret
|
|
||||||
MAC addresses passed by the firmware when no information other
|
|
||||||
than indices is available to associate an address with a device.
|
|
||||||
- phy-connection-type : a string naming the controller/PHY interface type,
|
- phy-connection-type : a string naming the controller/PHY interface type,
|
||||||
i.e., "mii" (default), "rmii", "gmii", "rgmii", "rgmii-id", "sgmii",
|
i.e., "mii" (default), "rmii", "gmii", "rgmii", "rgmii-id", "sgmii",
|
||||||
"tbi", or "rtbi". This property is only really needed if the connection
|
"tbi", or "rtbi". This property is only really needed if the connection
|
||||||
|
@ -1622,8 +1645,7 @@ platforms are moved over to use the flattened-device-tree model.
|
||||||
- device_type : should be "network", "hldc", "uart", "transparent"
|
- device_type : should be "network", "hldc", "uart", "transparent"
|
||||||
"bisync", "atm", or "serial".
|
"bisync", "atm", or "serial".
|
||||||
- compatible : could be "ucc_geth" or "fsl_atm" and so on.
|
- compatible : could be "ucc_geth" or "fsl_atm" and so on.
|
||||||
- model : should be "UCC".
|
- cell-index : the ucc number(1-8), corresponding to UCCx in UM.
|
||||||
- device-id : the ucc number(1-8), corresponding to UCCx in UM.
|
|
||||||
- reg : Offset and length of the register set for the device
|
- reg : Offset and length of the register set for the device
|
||||||
- interrupts : <a b> where a is the interrupt number and b is a
|
- interrupts : <a b> where a is the interrupt number and b is a
|
||||||
field that represents an encoding of the sense and level
|
field that represents an encoding of the sense and level
|
||||||
|
@ -1667,10 +1689,6 @@ platforms are moved over to use the flattened-device-tree model.
|
||||||
- phy-handle : The phandle for the PHY connected to this controller.
|
- phy-handle : The phandle for the PHY connected to this controller.
|
||||||
|
|
||||||
Recommended properties:
|
Recommended properties:
|
||||||
- linux,network-index : This is the intended "index" of this
|
|
||||||
network device. This is used by the bootwrapper to interpret
|
|
||||||
MAC addresses passed by the firmware when no information other
|
|
||||||
than indices is available to associate an address with a device.
|
|
||||||
- phy-connection-type : a string naming the controller/PHY interface type,
|
- phy-connection-type : a string naming the controller/PHY interface type,
|
||||||
i.e., "mii" (default), "rmii", "gmii", "rgmii", "rgmii-id" (Internal
|
i.e., "mii" (default), "rmii", "gmii", "rgmii", "rgmii-id" (Internal
|
||||||
Delay), "rgmii-txid" (delay on TX only), "rgmii-rxid" (delay on RX only),
|
Delay), "rgmii-txid" (delay on TX only), "rgmii-rxid" (delay on RX only),
|
||||||
|
@ -1680,8 +1698,7 @@ platforms are moved over to use the flattened-device-tree model.
|
||||||
ucc@2000 {
|
ucc@2000 {
|
||||||
device_type = "network";
|
device_type = "network";
|
||||||
compatible = "ucc_geth";
|
compatible = "ucc_geth";
|
||||||
model = "UCC";
|
cell-index = <1>;
|
||||||
device-id = <1>;
|
|
||||||
reg = <2000 200>;
|
reg = <2000 200>;
|
||||||
interrupts = <a0 0>;
|
interrupts = <a0 0>;
|
||||||
interrupt-parent = <700>;
|
interrupt-parent = <700>;
|
||||||
|
@ -1995,7 +2012,6 @@ platforms are moved over to use the flattened-device-tree model.
|
||||||
interrupts = <20 8>;
|
interrupts = <20 8>;
|
||||||
interrupt-parent = <&PIC>;
|
interrupt-parent = <&PIC>;
|
||||||
phy-handle = <&PHY0>;
|
phy-handle = <&PHY0>;
|
||||||
linux,network-index = <0>;
|
|
||||||
fsl,cpm-command = <12000300>;
|
fsl,cpm-command = <12000300>;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -2217,12 +2233,6 @@ platforms are moved over to use the flattened-device-tree model.
|
||||||
EMAC, that is the content of the current (bogus) "phy-port"
|
EMAC, that is the content of the current (bogus) "phy-port"
|
||||||
property.
|
property.
|
||||||
|
|
||||||
Recommended properties:
|
|
||||||
- linux,network-index : This is the intended "index" of this
|
|
||||||
network device. This is used by the bootwrapper to interpret
|
|
||||||
MAC addresses passed by the firmware when no information other
|
|
||||||
than indices is available to associate an address with a device.
|
|
||||||
|
|
||||||
Optional properties:
|
Optional properties:
|
||||||
- phy-address : 1 cell, optional, MDIO address of the PHY. If absent,
|
- phy-address : 1 cell, optional, MDIO address of the PHY. If absent,
|
||||||
a search is performed.
|
a search is performed.
|
||||||
|
@ -2246,7 +2256,6 @@ platforms are moved over to use the flattened-device-tree model.
|
||||||
Example:
|
Example:
|
||||||
|
|
||||||
EMAC0: ethernet@40000800 {
|
EMAC0: ethernet@40000800 {
|
||||||
linux,network-index = <0>;
|
|
||||||
device_type = "network";
|
device_type = "network";
|
||||||
compatible = "ibm,emac-440gp", "ibm,emac";
|
compatible = "ibm,emac-440gp", "ibm,emac";
|
||||||
interrupt-parent = <&UIC1>;
|
interrupt-parent = <&UIC1>;
|
||||||
|
@ -2817,9 +2826,528 @@ platforms are moved over to use the flattened-device-tree model.
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
More devices will be defined as this spec matures.
|
VII - Marvell Discovery mv64[345]6x System Controller chips
|
||||||
|
===========================================================
|
||||||
|
|
||||||
VII - Specifying interrupt information for devices
|
The Marvell mv64[345]60 series of system controller chips contain
|
||||||
|
many of the peripherals needed to implement a complete computer
|
||||||
|
system. In this section, we define device tree nodes to describe
|
||||||
|
the system controller chip itself and each of the peripherals
|
||||||
|
which it contains. Compatible string values for each node are
|
||||||
|
prefixed with the string "marvell,", for Marvell Technology Group Ltd.
|
||||||
|
|
||||||
|
1) The /system-controller node
|
||||||
|
|
||||||
|
This node is used to represent the system-controller and must be
|
||||||
|
present when the system uses a system contller chip. The top-level
|
||||||
|
system-controller node contains information that is global to all
|
||||||
|
devices within the system controller chip. The node name begins
|
||||||
|
with "system-controller" followed by the unit address, which is
|
||||||
|
the base address of the memory-mapped register set for the system
|
||||||
|
controller chip.
|
||||||
|
|
||||||
|
Required properties:
|
||||||
|
|
||||||
|
- ranges : Describes the translation of system controller addresses
|
||||||
|
for memory mapped registers.
|
||||||
|
- clock-frequency: Contains the main clock frequency for the system
|
||||||
|
controller chip.
|
||||||
|
- reg : This property defines the address and size of the
|
||||||
|
memory-mapped registers contained within the system controller
|
||||||
|
chip. The address specified in the "reg" property should match
|
||||||
|
the unit address of the system-controller node.
|
||||||
|
- #address-cells : Address representation for system controller
|
||||||
|
devices. This field represents the number of cells needed to
|
||||||
|
represent the address of the memory-mapped registers of devices
|
||||||
|
within the system controller chip.
|
||||||
|
- #size-cells : Size representation for for the memory-mapped
|
||||||
|
registers within the system controller chip.
|
||||||
|
- #interrupt-cells : Defines the width of cells used to represent
|
||||||
|
interrupts.
|
||||||
|
|
||||||
|
Optional properties:
|
||||||
|
|
||||||
|
- model : The specific model of the system controller chip. Such
|
||||||
|
as, "mv64360", "mv64460", or "mv64560".
|
||||||
|
- compatible : A string identifying the compatibility identifiers
|
||||||
|
of the system controller chip.
|
||||||
|
|
||||||
|
The system-controller node contains child nodes for each system
|
||||||
|
controller device that the platform uses. Nodes should not be created
|
||||||
|
for devices which exist on the system controller chip but are not used
|
||||||
|
|
||||||
|
Example Marvell Discovery mv64360 system-controller node:
|
||||||
|
|
||||||
|
system-controller@f1000000 { /* Marvell Discovery mv64360 */
|
||||||
|
#address-cells = <1>;
|
||||||
|
#size-cells = <1>;
|
||||||
|
model = "mv64360"; /* Default */
|
||||||
|
compatible = "marvell,mv64360";
|
||||||
|
clock-frequency = <133333333>;
|
||||||
|
reg = <0xf1000000 0x10000>;
|
||||||
|
virtual-reg = <0xf1000000>;
|
||||||
|
ranges = <0x88000000 0x88000000 0x1000000 /* PCI 0 I/O Space */
|
||||||
|
0x80000000 0x80000000 0x8000000 /* PCI 0 MEM Space */
|
||||||
|
0xa0000000 0xa0000000 0x4000000 /* User FLASH */
|
||||||
|
0x00000000 0xf1000000 0x0010000 /* Bridge's regs */
|
||||||
|
0xf2000000 0xf2000000 0x0040000>;/* Integrated SRAM */
|
||||||
|
|
||||||
|
[ child node definitions... ]
|
||||||
|
}
|
||||||
|
|
||||||
|
2) Child nodes of /system-controller
|
||||||
|
|
||||||
|
a) Marvell Discovery MDIO bus
|
||||||
|
|
||||||
|
The MDIO is a bus to which the PHY devices are connected. For each
|
||||||
|
device that exists on this bus, a child node should be created. See
|
||||||
|
the definition of the PHY node below for an example of how to define
|
||||||
|
a PHY.
|
||||||
|
|
||||||
|
Required properties:
|
||||||
|
- #address-cells : Should be <1>
|
||||||
|
- #size-cells : Should be <0>
|
||||||
|
- device_type : Should be "mdio"
|
||||||
|
- compatible : Should be "marvell,mv64360-mdio"
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
mdio {
|
||||||
|
#address-cells = <1>;
|
||||||
|
#size-cells = <0>;
|
||||||
|
device_type = "mdio";
|
||||||
|
compatible = "marvell,mv64360-mdio";
|
||||||
|
|
||||||
|
ethernet-phy@0 {
|
||||||
|
......
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
b) Marvell Discovery ethernet controller
|
||||||
|
|
||||||
|
The Discover ethernet controller is described with two levels
|
||||||
|
of nodes. The first level describes an ethernet silicon block
|
||||||
|
and the second level describes up to 3 ethernet nodes within
|
||||||
|
that block. The reason for the multiple levels is that the
|
||||||
|
registers for the node are interleaved within a single set
|
||||||
|
of registers. The "ethernet-block" level describes the
|
||||||
|
shared register set, and the "ethernet" nodes describe ethernet
|
||||||
|
port-specific properties.
|
||||||
|
|
||||||
|
Ethernet block node
|
||||||
|
|
||||||
|
Required properties:
|
||||||
|
- #address-cells : <1>
|
||||||
|
- #size-cells : <0>
|
||||||
|
- compatible : "marvell,mv64360-eth-block"
|
||||||
|
- reg : Offset and length of the register set for this block
|
||||||
|
|
||||||
|
Example Discovery Ethernet block node:
|
||||||
|
ethernet-block@2000 {
|
||||||
|
#address-cells = <1>;
|
||||||
|
#size-cells = <0>;
|
||||||
|
compatible = "marvell,mv64360-eth-block";
|
||||||
|
reg = <0x2000 0x2000>;
|
||||||
|
ethernet@0 {
|
||||||
|
.......
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
Ethernet port node
|
||||||
|
|
||||||
|
Required properties:
|
||||||
|
- device_type : Should be "network".
|
||||||
|
- compatible : Should be "marvell,mv64360-eth".
|
||||||
|
- reg : Should be <0>, <1>, or <2>, according to which registers
|
||||||
|
within the silicon block the device uses.
|
||||||
|
- interrupts : <a> where a is the interrupt number for the port.
|
||||||
|
- interrupt-parent : the phandle for the interrupt controller
|
||||||
|
that services interrupts for this device.
|
||||||
|
- phy : the phandle for the PHY connected to this ethernet
|
||||||
|
controller.
|
||||||
|
- local-mac-address : 6 bytes, MAC address
|
||||||
|
|
||||||
|
Example Discovery Ethernet port node:
|
||||||
|
ethernet@0 {
|
||||||
|
device_type = "network";
|
||||||
|
compatible = "marvell,mv64360-eth";
|
||||||
|
reg = <0>;
|
||||||
|
interrupts = <32>;
|
||||||
|
interrupt-parent = <&PIC>;
|
||||||
|
phy = <&PHY0>;
|
||||||
|
local-mac-address = [ 00 00 00 00 00 00 ];
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
c) Marvell Discovery PHY nodes
|
||||||
|
|
||||||
|
Required properties:
|
||||||
|
- device_type : Should be "ethernet-phy"
|
||||||
|
- interrupts : <a> where a is the interrupt number for this phy.
|
||||||
|
- interrupt-parent : the phandle for the interrupt controller that
|
||||||
|
services interrupts for this device.
|
||||||
|
- reg : The ID number for the phy, usually a small integer
|
||||||
|
|
||||||
|
Example Discovery PHY node:
|
||||||
|
ethernet-phy@1 {
|
||||||
|
device_type = "ethernet-phy";
|
||||||
|
compatible = "broadcom,bcm5421";
|
||||||
|
interrupts = <76>; /* GPP 12 */
|
||||||
|
interrupt-parent = <&PIC>;
|
||||||
|
reg = <1>;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
d) Marvell Discovery SDMA nodes
|
||||||
|
|
||||||
|
Represent DMA hardware associated with the MPSC (multiprotocol
|
||||||
|
serial controllers).
|
||||||
|
|
||||||
|
Required properties:
|
||||||
|
- compatible : "marvell,mv64360-sdma"
|
||||||
|
- reg : Offset and length of the register set for this device
|
||||||
|
- interrupts : <a> where a is the interrupt number for the DMA
|
||||||
|
device.
|
||||||
|
- interrupt-parent : the phandle for the interrupt controller
|
||||||
|
that services interrupts for this device.
|
||||||
|
|
||||||
|
Example Discovery SDMA node:
|
||||||
|
sdma@4000 {
|
||||||
|
compatible = "marvell,mv64360-sdma";
|
||||||
|
reg = <0x4000 0xc18>;
|
||||||
|
virtual-reg = <0xf1004000>;
|
||||||
|
interrupts = <36>;
|
||||||
|
interrupt-parent = <&PIC>;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
e) Marvell Discovery BRG nodes
|
||||||
|
|
||||||
|
Represent baud rate generator hardware associated with the MPSC
|
||||||
|
(multiprotocol serial controllers).
|
||||||
|
|
||||||
|
Required properties:
|
||||||
|
- compatible : "marvell,mv64360-brg"
|
||||||
|
- reg : Offset and length of the register set for this device
|
||||||
|
- clock-src : A value from 0 to 15 which selects the clock
|
||||||
|
source for the baud rate generator. This value corresponds
|
||||||
|
to the CLKS value in the BRGx configuration register. See
|
||||||
|
the mv64x60 User's Manual.
|
||||||
|
- clock-frequence : The frequency (in Hz) of the baud rate
|
||||||
|
generator's input clock.
|
||||||
|
- current-speed : The current speed setting (presumably by
|
||||||
|
firmware) of the baud rate generator.
|
||||||
|
|
||||||
|
Example Discovery BRG node:
|
||||||
|
brg@b200 {
|
||||||
|
compatible = "marvell,mv64360-brg";
|
||||||
|
reg = <0xb200 0x8>;
|
||||||
|
clock-src = <8>;
|
||||||
|
clock-frequency = <133333333>;
|
||||||
|
current-speed = <9600>;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
f) Marvell Discovery CUNIT nodes
|
||||||
|
|
||||||
|
Represent the Serial Communications Unit device hardware.
|
||||||
|
|
||||||
|
Required properties:
|
||||||
|
- reg : Offset and length of the register set for this device
|
||||||
|
|
||||||
|
Example Discovery CUNIT node:
|
||||||
|
cunit@f200 {
|
||||||
|
reg = <0xf200 0x200>;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
g) Marvell Discovery MPSCROUTING nodes
|
||||||
|
|
||||||
|
Represent the Discovery's MPSC routing hardware
|
||||||
|
|
||||||
|
Required properties:
|
||||||
|
- reg : Offset and length of the register set for this device
|
||||||
|
|
||||||
|
Example Discovery CUNIT node:
|
||||||
|
mpscrouting@b500 {
|
||||||
|
reg = <0xb400 0xc>;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
h) Marvell Discovery MPSCINTR nodes
|
||||||
|
|
||||||
|
Represent the Discovery's MPSC DMA interrupt hardware registers
|
||||||
|
(SDMA cause and mask registers).
|
||||||
|
|
||||||
|
Required properties:
|
||||||
|
- reg : Offset and length of the register set for this device
|
||||||
|
|
||||||
|
Example Discovery MPSCINTR node:
|
||||||
|
mpsintr@b800 {
|
||||||
|
reg = <0xb800 0x100>;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
i) Marvell Discovery MPSC nodes
|
||||||
|
|
||||||
|
Represent the Discovery's MPSC (Multiprotocol Serial Controller)
|
||||||
|
serial port.
|
||||||
|
|
||||||
|
Required properties:
|
||||||
|
- device_type : "serial"
|
||||||
|
- compatible : "marvell,mv64360-mpsc"
|
||||||
|
- reg : Offset and length of the register set for this device
|
||||||
|
- sdma : the phandle for the SDMA node used by this port
|
||||||
|
- brg : the phandle for the BRG node used by this port
|
||||||
|
- cunit : the phandle for the CUNIT node used by this port
|
||||||
|
- mpscrouting : the phandle for the MPSCROUTING node used by this port
|
||||||
|
- mpscintr : the phandle for the MPSCINTR node used by this port
|
||||||
|
- cell-index : the hardware index of this cell in the MPSC core
|
||||||
|
- max_idle : value needed for MPSC CHR3 (Maximum Frame Length)
|
||||||
|
register
|
||||||
|
- interrupts : <a> where a is the interrupt number for the MPSC.
|
||||||
|
- interrupt-parent : the phandle for the interrupt controller
|
||||||
|
that services interrupts for this device.
|
||||||
|
|
||||||
|
Example Discovery MPSCINTR node:
|
||||||
|
mpsc@8000 {
|
||||||
|
device_type = "serial";
|
||||||
|
compatible = "marvell,mv64360-mpsc";
|
||||||
|
reg = <0x8000 0x38>;
|
||||||
|
virtual-reg = <0xf1008000>;
|
||||||
|
sdma = <&SDMA0>;
|
||||||
|
brg = <&BRG0>;
|
||||||
|
cunit = <&CUNIT>;
|
||||||
|
mpscrouting = <&MPSCROUTING>;
|
||||||
|
mpscintr = <&MPSCINTR>;
|
||||||
|
cell-index = <0>;
|
||||||
|
max_idle = <40>;
|
||||||
|
interrupts = <40>;
|
||||||
|
interrupt-parent = <&PIC>;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
j) Marvell Discovery Watch Dog Timer nodes
|
||||||
|
|
||||||
|
Represent the Discovery's watchdog timer hardware
|
||||||
|
|
||||||
|
Required properties:
|
||||||
|
- compatible : "marvell,mv64360-wdt"
|
||||||
|
- reg : Offset and length of the register set for this device
|
||||||
|
|
||||||
|
Example Discovery Watch Dog Timer node:
|
||||||
|
wdt@b410 {
|
||||||
|
compatible = "marvell,mv64360-wdt";
|
||||||
|
reg = <0xb410 0x8>;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
k) Marvell Discovery I2C nodes
|
||||||
|
|
||||||
|
Represent the Discovery's I2C hardware
|
||||||
|
|
||||||
|
Required properties:
|
||||||
|
- device_type : "i2c"
|
||||||
|
- compatible : "marvell,mv64360-i2c"
|
||||||
|
- reg : Offset and length of the register set for this device
|
||||||
|
- interrupts : <a> where a is the interrupt number for the I2C.
|
||||||
|
- interrupt-parent : the phandle for the interrupt controller
|
||||||
|
that services interrupts for this device.
|
||||||
|
|
||||||
|
Example Discovery I2C node:
|
||||||
|
compatible = "marvell,mv64360-i2c";
|
||||||
|
reg = <0xc000 0x20>;
|
||||||
|
virtual-reg = <0xf100c000>;
|
||||||
|
interrupts = <37>;
|
||||||
|
interrupt-parent = <&PIC>;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
l) Marvell Discovery PIC (Programmable Interrupt Controller) nodes
|
||||||
|
|
||||||
|
Represent the Discovery's PIC hardware
|
||||||
|
|
||||||
|
Required properties:
|
||||||
|
- #interrupt-cells : <1>
|
||||||
|
- #address-cells : <0>
|
||||||
|
- compatible : "marvell,mv64360-pic"
|
||||||
|
- reg : Offset and length of the register set for this device
|
||||||
|
- interrupt-controller
|
||||||
|
|
||||||
|
Example Discovery PIC node:
|
||||||
|
pic {
|
||||||
|
#interrupt-cells = <1>;
|
||||||
|
#address-cells = <0>;
|
||||||
|
compatible = "marvell,mv64360-pic";
|
||||||
|
reg = <0x0 0x88>;
|
||||||
|
interrupt-controller;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
m) Marvell Discovery MPP (Multipurpose Pins) multiplexing nodes
|
||||||
|
|
||||||
|
Represent the Discovery's MPP hardware
|
||||||
|
|
||||||
|
Required properties:
|
||||||
|
- compatible : "marvell,mv64360-mpp"
|
||||||
|
- reg : Offset and length of the register set for this device
|
||||||
|
|
||||||
|
Example Discovery MPP node:
|
||||||
|
mpp@f000 {
|
||||||
|
compatible = "marvell,mv64360-mpp";
|
||||||
|
reg = <0xf000 0x10>;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
n) Marvell Discovery GPP (General Purpose Pins) nodes
|
||||||
|
|
||||||
|
Represent the Discovery's GPP hardware
|
||||||
|
|
||||||
|
Required properties:
|
||||||
|
- compatible : "marvell,mv64360-gpp"
|
||||||
|
- reg : Offset and length of the register set for this device
|
||||||
|
|
||||||
|
Example Discovery GPP node:
|
||||||
|
gpp@f000 {
|
||||||
|
compatible = "marvell,mv64360-gpp";
|
||||||
|
reg = <0xf100 0x20>;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
o) Marvell Discovery PCI host bridge node
|
||||||
|
|
||||||
|
Represents the Discovery's PCI host bridge device. The properties
|
||||||
|
for this node conform to Rev 2.1 of the PCI Bus Binding to IEEE
|
||||||
|
1275-1994. A typical value for the compatible property is
|
||||||
|
"marvell,mv64360-pci".
|
||||||
|
|
||||||
|
Example Discovery PCI host bridge node
|
||||||
|
pci@80000000 {
|
||||||
|
#address-cells = <3>;
|
||||||
|
#size-cells = <2>;
|
||||||
|
#interrupt-cells = <1>;
|
||||||
|
device_type = "pci";
|
||||||
|
compatible = "marvell,mv64360-pci";
|
||||||
|
reg = <0xcf8 0x8>;
|
||||||
|
ranges = <0x01000000 0x0 0x0
|
||||||
|
0x88000000 0x0 0x01000000
|
||||||
|
0x02000000 0x0 0x80000000
|
||||||
|
0x80000000 0x0 0x08000000>;
|
||||||
|
bus-range = <0 255>;
|
||||||
|
clock-frequency = <66000000>;
|
||||||
|
interrupt-parent = <&PIC>;
|
||||||
|
interrupt-map-mask = <0xf800 0x0 0x0 0x7>;
|
||||||
|
interrupt-map = <
|
||||||
|
/* IDSEL 0x0a */
|
||||||
|
0x5000 0 0 1 &PIC 80
|
||||||
|
0x5000 0 0 2 &PIC 81
|
||||||
|
0x5000 0 0 3 &PIC 91
|
||||||
|
0x5000 0 0 4 &PIC 93
|
||||||
|
|
||||||
|
/* IDSEL 0x0b */
|
||||||
|
0x5800 0 0 1 &PIC 91
|
||||||
|
0x5800 0 0 2 &PIC 93
|
||||||
|
0x5800 0 0 3 &PIC 80
|
||||||
|
0x5800 0 0 4 &PIC 81
|
||||||
|
|
||||||
|
/* IDSEL 0x0c */
|
||||||
|
0x6000 0 0 1 &PIC 91
|
||||||
|
0x6000 0 0 2 &PIC 93
|
||||||
|
0x6000 0 0 3 &PIC 80
|
||||||
|
0x6000 0 0 4 &PIC 81
|
||||||
|
|
||||||
|
/* IDSEL 0x0d */
|
||||||
|
0x6800 0 0 1 &PIC 93
|
||||||
|
0x6800 0 0 2 &PIC 80
|
||||||
|
0x6800 0 0 3 &PIC 81
|
||||||
|
0x6800 0 0 4 &PIC 91
|
||||||
|
>;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
p) Marvell Discovery CPU Error nodes
|
||||||
|
|
||||||
|
Represent the Discovery's CPU error handler device.
|
||||||
|
|
||||||
|
Required properties:
|
||||||
|
- compatible : "marvell,mv64360-cpu-error"
|
||||||
|
- reg : Offset and length of the register set for this device
|
||||||
|
- interrupts : the interrupt number for this device
|
||||||
|
- interrupt-parent : the phandle for the interrupt controller
|
||||||
|
that services interrupts for this device.
|
||||||
|
|
||||||
|
Example Discovery CPU Error node:
|
||||||
|
cpu-error@0070 {
|
||||||
|
compatible = "marvell,mv64360-cpu-error";
|
||||||
|
reg = <0x70 0x10 0x128 0x28>;
|
||||||
|
interrupts = <3>;
|
||||||
|
interrupt-parent = <&PIC>;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
q) Marvell Discovery SRAM Controller nodes
|
||||||
|
|
||||||
|
Represent the Discovery's SRAM controller device.
|
||||||
|
|
||||||
|
Required properties:
|
||||||
|
- compatible : "marvell,mv64360-sram-ctrl"
|
||||||
|
- reg : Offset and length of the register set for this device
|
||||||
|
- interrupts : the interrupt number for this device
|
||||||
|
- interrupt-parent : the phandle for the interrupt controller
|
||||||
|
that services interrupts for this device.
|
||||||
|
|
||||||
|
Example Discovery SRAM Controller node:
|
||||||
|
sram-ctrl@0380 {
|
||||||
|
compatible = "marvell,mv64360-sram-ctrl";
|
||||||
|
reg = <0x380 0x80>;
|
||||||
|
interrupts = <13>;
|
||||||
|
interrupt-parent = <&PIC>;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
r) Marvell Discovery PCI Error Handler nodes
|
||||||
|
|
||||||
|
Represent the Discovery's PCI error handler device.
|
||||||
|
|
||||||
|
Required properties:
|
||||||
|
- compatible : "marvell,mv64360-pci-error"
|
||||||
|
- reg : Offset and length of the register set for this device
|
||||||
|
- interrupts : the interrupt number for this device
|
||||||
|
- interrupt-parent : the phandle for the interrupt controller
|
||||||
|
that services interrupts for this device.
|
||||||
|
|
||||||
|
Example Discovery PCI Error Handler node:
|
||||||
|
pci-error@1d40 {
|
||||||
|
compatible = "marvell,mv64360-pci-error";
|
||||||
|
reg = <0x1d40 0x40 0xc28 0x4>;
|
||||||
|
interrupts = <12>;
|
||||||
|
interrupt-parent = <&PIC>;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
s) Marvell Discovery Memory Controller nodes
|
||||||
|
|
||||||
|
Represent the Discovery's memory controller device.
|
||||||
|
|
||||||
|
Required properties:
|
||||||
|
- compatible : "marvell,mv64360-mem-ctrl"
|
||||||
|
- reg : Offset and length of the register set for this device
|
||||||
|
- interrupts : the interrupt number for this device
|
||||||
|
- interrupt-parent : the phandle for the interrupt controller
|
||||||
|
that services interrupts for this device.
|
||||||
|
|
||||||
|
Example Discovery Memory Controller node:
|
||||||
|
mem-ctrl@1400 {
|
||||||
|
compatible = "marvell,mv64360-mem-ctrl";
|
||||||
|
reg = <0x1400 0x60>;
|
||||||
|
interrupts = <17>;
|
||||||
|
interrupt-parent = <&PIC>;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
VIII - Specifying interrupt information for devices
|
||||||
===================================================
|
===================================================
|
||||||
|
|
||||||
The device tree represents the busses and devices of a hardware
|
The device tree represents the busses and devices of a hardware
|
||||||
|
@ -2905,6 +3433,54 @@ encodings listed below:
|
||||||
2 = high to low edge sensitive type enabled
|
2 = high to low edge sensitive type enabled
|
||||||
3 = low to high edge sensitive type enabled
|
3 = low to high edge sensitive type enabled
|
||||||
|
|
||||||
|
VIII - Specifying GPIO information for devices
|
||||||
|
==============================================
|
||||||
|
|
||||||
|
1) gpios property
|
||||||
|
-----------------
|
||||||
|
|
||||||
|
Nodes that makes use of GPIOs should define them using `gpios' property,
|
||||||
|
format of which is: <&gpio-controller1-phandle gpio1-specifier
|
||||||
|
&gpio-controller2-phandle gpio2-specifier
|
||||||
|
0 /* holes are permitted, means no GPIO 3 */
|
||||||
|
&gpio-controller4-phandle gpio4-specifier
|
||||||
|
...>;
|
||||||
|
|
||||||
|
Note that gpio-specifier length is controller dependent.
|
||||||
|
|
||||||
|
gpio-specifier may encode: bank, pin position inside the bank,
|
||||||
|
whether pin is open-drain and whether pin is logically inverted.
|
||||||
|
|
||||||
|
Example of the node using GPIOs:
|
||||||
|
|
||||||
|
node {
|
||||||
|
gpios = <&qe_pio_e 18 0>;
|
||||||
|
};
|
||||||
|
|
||||||
|
In this example gpio-specifier is "18 0" and encodes GPIO pin number,
|
||||||
|
and empty GPIO flags as accepted by the "qe_pio_e" gpio-controller.
|
||||||
|
|
||||||
|
2) gpio-controller nodes
|
||||||
|
------------------------
|
||||||
|
|
||||||
|
Every GPIO controller node must have #gpio-cells property defined,
|
||||||
|
this information will be used to translate gpio-specifiers.
|
||||||
|
|
||||||
|
Example of two SOC GPIO banks defined as gpio-controller nodes:
|
||||||
|
|
||||||
|
qe_pio_a: gpio-controller@1400 {
|
||||||
|
#gpio-cells = <2>;
|
||||||
|
compatible = "fsl,qe-pario-bank-a", "fsl,qe-pario-bank";
|
||||||
|
reg = <0x1400 0x18>;
|
||||||
|
gpio-controller;
|
||||||
|
};
|
||||||
|
|
||||||
|
qe_pio_e: gpio-controller@1460 {
|
||||||
|
#gpio-cells = <2>;
|
||||||
|
compatible = "fsl,qe-pario-bank-e", "fsl,qe-pario-bank";
|
||||||
|
reg = <0x1460 0x18>;
|
||||||
|
gpio-controller;
|
||||||
|
};
|
||||||
|
|
||||||
Appendix A - Sample SOC node for MPC8540
|
Appendix A - Sample SOC node for MPC8540
|
||||||
========================================
|
========================================
|
||||||
|
|
|
@ -0,0 +1,127 @@
|
||||||
|
|
||||||
|
Hypervisor-Assisted Dump
|
||||||
|
------------------------
|
||||||
|
November 2007
|
||||||
|
|
||||||
|
The goal of hypervisor-assisted dump is to enable the dump of
|
||||||
|
a crashed system, and to do so from a fully-reset system, and
|
||||||
|
to minimize the total elapsed time until the system is back
|
||||||
|
in production use.
|
||||||
|
|
||||||
|
As compared to kdump or other strategies, hypervisor-assisted
|
||||||
|
dump offers several strong, practical advantages:
|
||||||
|
|
||||||
|
-- Unlike kdump, the system has been reset, and loaded
|
||||||
|
with a fresh copy of the kernel. In particular,
|
||||||
|
PCI and I/O devices have been reinitialized and are
|
||||||
|
in a clean, consistent state.
|
||||||
|
-- As the dump is performed, the dumped memory becomes
|
||||||
|
immediately available to the system for normal use.
|
||||||
|
-- After the dump is completed, no further reboots are
|
||||||
|
required; the system will be fully usable, and running
|
||||||
|
in it's normal, production mode on it normal kernel.
|
||||||
|
|
||||||
|
The above can only be accomplished by coordination with,
|
||||||
|
and assistance from the hypervisor. The procedure is
|
||||||
|
as follows:
|
||||||
|
|
||||||
|
-- When a system crashes, the hypervisor will save
|
||||||
|
the low 256MB of RAM to a previously registered
|
||||||
|
save region. It will also save system state, system
|
||||||
|
registers, and hardware PTE's.
|
||||||
|
|
||||||
|
-- After the low 256MB area has been saved, the
|
||||||
|
hypervisor will reset PCI and other hardware state.
|
||||||
|
It will *not* clear RAM. It will then launch the
|
||||||
|
bootloader, as normal.
|
||||||
|
|
||||||
|
-- The freshly booted kernel will notice that there
|
||||||
|
is a new node (ibm,dump-kernel) in the device tree,
|
||||||
|
indicating that there is crash data available from
|
||||||
|
a previous boot. It will boot into only 256MB of RAM,
|
||||||
|
reserving the rest of system memory.
|
||||||
|
|
||||||
|
-- Userspace tools will parse /sys/kernel/release_region
|
||||||
|
and read /proc/vmcore to obtain the contents of memory,
|
||||||
|
which holds the previous crashed kernel. The userspace
|
||||||
|
tools may copy this info to disk, or network, nas, san,
|
||||||
|
iscsi, etc. as desired.
|
||||||
|
|
||||||
|
For Example: the values in /sys/kernel/release-region
|
||||||
|
would look something like this (address-range pairs).
|
||||||
|
CPU:0x177fee000-0x10000: HPTE:0x177ffe020-0x1000: /
|
||||||
|
DUMP:0x177fff020-0x10000000, 0x10000000-0x16F1D370A
|
||||||
|
|
||||||
|
-- As the userspace tools complete saving a portion of
|
||||||
|
dump, they echo an offset and size to
|
||||||
|
/sys/kernel/release_region to release the reserved
|
||||||
|
memory back to general use.
|
||||||
|
|
||||||
|
An example of this is:
|
||||||
|
"echo 0x40000000 0x10000000 > /sys/kernel/release_region"
|
||||||
|
which will release 256MB at the 1GB boundary.
|
||||||
|
|
||||||
|
Please note that the hypervisor-assisted dump feature
|
||||||
|
is only available on Power6-based systems with recent
|
||||||
|
firmware versions.
|
||||||
|
|
||||||
|
Implementation details:
|
||||||
|
----------------------
|
||||||
|
|
||||||
|
During boot, a check is made to see if firmware supports
|
||||||
|
this feature on this particular machine. If it does, then
|
||||||
|
we check to see if a active dump is waiting for us. If yes
|
||||||
|
then everything but 256 MB of RAM is reserved during early
|
||||||
|
boot. This area is released once we collect a dump from user
|
||||||
|
land scripts that are run. If there is dump data, then
|
||||||
|
the /sys/kernel/release_region file is created, and
|
||||||
|
the reserved memory is held.
|
||||||
|
|
||||||
|
If there is no waiting dump data, then only the highest
|
||||||
|
256MB of the ram is reserved as a scratch area. This area
|
||||||
|
is *not* released: this region will be kept permanently
|
||||||
|
reserved, so that it can act as a receptacle for a copy
|
||||||
|
of the low 256MB in the case a crash does occur. See,
|
||||||
|
however, "open issues" below, as to whether
|
||||||
|
such a reserved region is really needed.
|
||||||
|
|
||||||
|
Currently the dump will be copied from /proc/vmcore to a
|
||||||
|
a new file upon user intervention. The starting address
|
||||||
|
to be read and the range for each data point in provided
|
||||||
|
in /sys/kernel/release_region.
|
||||||
|
|
||||||
|
The tools to examine the dump will be same as the ones
|
||||||
|
used for kdump.
|
||||||
|
|
||||||
|
General notes:
|
||||||
|
--------------
|
||||||
|
Security: please note that there are potential security issues
|
||||||
|
with any sort of dump mechanism. In particular, plaintext
|
||||||
|
(unencrypted) data, and possibly passwords, may be present in
|
||||||
|
the dump data. Userspace tools must take adequate precautions to
|
||||||
|
preserve security.
|
||||||
|
|
||||||
|
Open issues/ToDo:
|
||||||
|
------------
|
||||||
|
o The various code paths that tell the hypervisor that a crash
|
||||||
|
occurred, vs. it simply being a normal reboot, should be
|
||||||
|
reviewed, and possibly clarified/fixed.
|
||||||
|
|
||||||
|
o Instead of using /sys/kernel, should there be a /sys/dump
|
||||||
|
instead? There is a dump_subsys being created by the s390 code,
|
||||||
|
perhaps the pseries code should use a similar layout as well.
|
||||||
|
|
||||||
|
o Is reserving a 256MB region really required? The goal of
|
||||||
|
reserving a 256MB scratch area is to make sure that no
|
||||||
|
important crash data is clobbered when the hypervisor
|
||||||
|
save low mem to the scratch area. But, if one could assure
|
||||||
|
that nothing important is located in some 256MB area, then
|
||||||
|
it would not need to be reserved. Something that can be
|
||||||
|
improved in subsequent versions.
|
||||||
|
|
||||||
|
o Still working the kdump team to integrate this with kdump,
|
||||||
|
some work remains but this would not affect the current
|
||||||
|
patches.
|
||||||
|
|
||||||
|
o Still need to write a shell script, to copy the dump away.
|
||||||
|
Currently I am parsing it manually.
|
|
@ -0,0 +1,96 @@
|
||||||
|
/*
|
||||||
|
* Tests for prctl(PR_GET_TSC, ...) / prctl(PR_SET_TSC, ...)
|
||||||
|
*
|
||||||
|
* Tests if the control register is updated correctly
|
||||||
|
* at context switches
|
||||||
|
*
|
||||||
|
* Warning: this test will cause a very high load for a few seconds
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
#include <signal.h>
|
||||||
|
#include <inttypes.h>
|
||||||
|
#include <wait.h>
|
||||||
|
|
||||||
|
|
||||||
|
#include <sys/prctl.h>
|
||||||
|
#include <linux/prctl.h>
|
||||||
|
|
||||||
|
/* Get/set the process' ability to use the timestamp counter instruction */
|
||||||
|
#ifndef PR_GET_TSC
|
||||||
|
#define PR_GET_TSC 25
|
||||||
|
#define PR_SET_TSC 26
|
||||||
|
# define PR_TSC_ENABLE 1 /* allow the use of the timestamp counter */
|
||||||
|
# define PR_TSC_SIGSEGV 2 /* throw a SIGSEGV instead of reading the TSC */
|
||||||
|
#endif
|
||||||
|
|
||||||
|
uint64_t rdtsc() {
|
||||||
|
uint32_t lo, hi;
|
||||||
|
/* We cannot use "=A", since this would use %rax on x86_64 */
|
||||||
|
__asm__ __volatile__ ("rdtsc" : "=a" (lo), "=d" (hi));
|
||||||
|
return (uint64_t)hi << 32 | lo;
|
||||||
|
}
|
||||||
|
|
||||||
|
void sigsegv_expect(int sig)
|
||||||
|
{
|
||||||
|
/* */
|
||||||
|
}
|
||||||
|
|
||||||
|
void segvtask(void)
|
||||||
|
{
|
||||||
|
if (prctl(PR_SET_TSC, PR_TSC_SIGSEGV) < 0)
|
||||||
|
{
|
||||||
|
perror("prctl");
|
||||||
|
exit(0);
|
||||||
|
}
|
||||||
|
signal(SIGSEGV, sigsegv_expect);
|
||||||
|
alarm(10);
|
||||||
|
rdtsc();
|
||||||
|
fprintf(stderr, "FATAL ERROR, rdtsc() succeeded while disabled\n");
|
||||||
|
exit(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void sigsegv_fail(int sig)
|
||||||
|
{
|
||||||
|
fprintf(stderr, "FATAL ERROR, rdtsc() failed while enabled\n");
|
||||||
|
exit(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
void rdtsctask(void)
|
||||||
|
{
|
||||||
|
if (prctl(PR_SET_TSC, PR_TSC_ENABLE) < 0)
|
||||||
|
{
|
||||||
|
perror("prctl");
|
||||||
|
exit(0);
|
||||||
|
}
|
||||||
|
signal(SIGSEGV, sigsegv_fail);
|
||||||
|
alarm(10);
|
||||||
|
for(;;) rdtsc();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
int main(int argc, char **argv)
|
||||||
|
{
|
||||||
|
int n_tasks = 100, i;
|
||||||
|
|
||||||
|
fprintf(stderr, "[No further output means we're allright]\n");
|
||||||
|
|
||||||
|
for (i=0; i<n_tasks; i++)
|
||||||
|
if (fork() == 0)
|
||||||
|
{
|
||||||
|
if (i & 1)
|
||||||
|
segvtask();
|
||||||
|
else
|
||||||
|
rdtsctask();
|
||||||
|
}
|
||||||
|
|
||||||
|
for (i=0; i<n_tasks; i++)
|
||||||
|
wait(NULL);
|
||||||
|
|
||||||
|
exit(0);
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,95 @@
|
||||||
|
/*
|
||||||
|
* Tests for prctl(PR_GET_TSC, ...) / prctl(PR_SET_TSC, ...)
|
||||||
|
*
|
||||||
|
* Tests if the control register is updated correctly
|
||||||
|
* when set with prctl()
|
||||||
|
*
|
||||||
|
* Warning: this test will cause a very high load for a few seconds
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
#include <signal.h>
|
||||||
|
#include <inttypes.h>
|
||||||
|
#include <wait.h>
|
||||||
|
|
||||||
|
|
||||||
|
#include <sys/prctl.h>
|
||||||
|
#include <linux/prctl.h>
|
||||||
|
|
||||||
|
/* Get/set the process' ability to use the timestamp counter instruction */
|
||||||
|
#ifndef PR_GET_TSC
|
||||||
|
#define PR_GET_TSC 25
|
||||||
|
#define PR_SET_TSC 26
|
||||||
|
# define PR_TSC_ENABLE 1 /* allow the use of the timestamp counter */
|
||||||
|
# define PR_TSC_SIGSEGV 2 /* throw a SIGSEGV instead of reading the TSC */
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* snippet from wikipedia :-) */
|
||||||
|
|
||||||
|
uint64_t rdtsc() {
|
||||||
|
uint32_t lo, hi;
|
||||||
|
/* We cannot use "=A", since this would use %rax on x86_64 */
|
||||||
|
__asm__ __volatile__ ("rdtsc" : "=a" (lo), "=d" (hi));
|
||||||
|
return (uint64_t)hi << 32 | lo;
|
||||||
|
}
|
||||||
|
|
||||||
|
int should_segv = 0;
|
||||||
|
|
||||||
|
void sigsegv_cb(int sig)
|
||||||
|
{
|
||||||
|
if (!should_segv)
|
||||||
|
{
|
||||||
|
fprintf(stderr, "FATAL ERROR, rdtsc() failed while enabled\n");
|
||||||
|
exit(0);
|
||||||
|
}
|
||||||
|
if (prctl(PR_SET_TSC, PR_TSC_ENABLE) < 0)
|
||||||
|
{
|
||||||
|
perror("prctl");
|
||||||
|
exit(0);
|
||||||
|
}
|
||||||
|
should_segv = 0;
|
||||||
|
|
||||||
|
rdtsc();
|
||||||
|
}
|
||||||
|
|
||||||
|
void task(void)
|
||||||
|
{
|
||||||
|
signal(SIGSEGV, sigsegv_cb);
|
||||||
|
alarm(10);
|
||||||
|
for(;;)
|
||||||
|
{
|
||||||
|
rdtsc();
|
||||||
|
if (should_segv)
|
||||||
|
{
|
||||||
|
fprintf(stderr, "FATAL ERROR, rdtsc() succeeded while disabled\n");
|
||||||
|
exit(0);
|
||||||
|
}
|
||||||
|
if (prctl(PR_SET_TSC, PR_TSC_SIGSEGV) < 0)
|
||||||
|
{
|
||||||
|
perror("prctl");
|
||||||
|
exit(0);
|
||||||
|
}
|
||||||
|
should_segv = 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
int main(int argc, char **argv)
|
||||||
|
{
|
||||||
|
int n_tasks = 100, i;
|
||||||
|
|
||||||
|
fprintf(stderr, "[No further output means we're allright]\n");
|
||||||
|
|
||||||
|
for (i=0; i<n_tasks; i++)
|
||||||
|
if (fork() == 0)
|
||||||
|
task();
|
||||||
|
|
||||||
|
for (i=0; i<n_tasks; i++)
|
||||||
|
wait(NULL);
|
||||||
|
|
||||||
|
exit(0);
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,94 @@
|
||||||
|
/*
|
||||||
|
* Tests for prctl(PR_GET_TSC, ...) / prctl(PR_SET_TSC, ...)
|
||||||
|
*
|
||||||
|
* Basic test to test behaviour of PR_GET_TSC and PR_SET_TSC
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
#include <signal.h>
|
||||||
|
#include <inttypes.h>
|
||||||
|
|
||||||
|
|
||||||
|
#include <sys/prctl.h>
|
||||||
|
#include <linux/prctl.h>
|
||||||
|
|
||||||
|
/* Get/set the process' ability to use the timestamp counter instruction */
|
||||||
|
#ifndef PR_GET_TSC
|
||||||
|
#define PR_GET_TSC 25
|
||||||
|
#define PR_SET_TSC 26
|
||||||
|
# define PR_TSC_ENABLE 1 /* allow the use of the timestamp counter */
|
||||||
|
# define PR_TSC_SIGSEGV 2 /* throw a SIGSEGV instead of reading the TSC */
|
||||||
|
#endif
|
||||||
|
|
||||||
|
const char *tsc_names[] =
|
||||||
|
{
|
||||||
|
[0] = "[not set]",
|
||||||
|
[PR_TSC_ENABLE] = "PR_TSC_ENABLE",
|
||||||
|
[PR_TSC_SIGSEGV] = "PR_TSC_SIGSEGV",
|
||||||
|
};
|
||||||
|
|
||||||
|
uint64_t rdtsc() {
|
||||||
|
uint32_t lo, hi;
|
||||||
|
/* We cannot use "=A", since this would use %rax on x86_64 */
|
||||||
|
__asm__ __volatile__ ("rdtsc" : "=a" (lo), "=d" (hi));
|
||||||
|
return (uint64_t)hi << 32 | lo;
|
||||||
|
}
|
||||||
|
|
||||||
|
void sigsegv_cb(int sig)
|
||||||
|
{
|
||||||
|
int tsc_val = 0;
|
||||||
|
|
||||||
|
printf("[ SIG_SEGV ]\n");
|
||||||
|
printf("prctl(PR_GET_TSC, &tsc_val); ");
|
||||||
|
fflush(stdout);
|
||||||
|
|
||||||
|
if ( prctl(PR_GET_TSC, &tsc_val) == -1)
|
||||||
|
perror("prctl");
|
||||||
|
|
||||||
|
printf("tsc_val == %s\n", tsc_names[tsc_val]);
|
||||||
|
printf("prctl(PR_SET_TSC, PR_TSC_ENABLE)\n");
|
||||||
|
fflush(stdout);
|
||||||
|
if ( prctl(PR_SET_TSC, PR_TSC_ENABLE) == -1)
|
||||||
|
perror("prctl");
|
||||||
|
|
||||||
|
printf("rdtsc() == ");
|
||||||
|
}
|
||||||
|
|
||||||
|
int main(int argc, char **argv)
|
||||||
|
{
|
||||||
|
int tsc_val = 0;
|
||||||
|
|
||||||
|
signal(SIGSEGV, sigsegv_cb);
|
||||||
|
|
||||||
|
printf("rdtsc() == %llu\n", (unsigned long long)rdtsc());
|
||||||
|
printf("prctl(PR_GET_TSC, &tsc_val); ");
|
||||||
|
fflush(stdout);
|
||||||
|
|
||||||
|
if ( prctl(PR_GET_TSC, &tsc_val) == -1)
|
||||||
|
perror("prctl");
|
||||||
|
|
||||||
|
printf("tsc_val == %s\n", tsc_names[tsc_val]);
|
||||||
|
printf("rdtsc() == %llu\n", (unsigned long long)rdtsc());
|
||||||
|
printf("prctl(PR_SET_TSC, PR_TSC_ENABLE)\n");
|
||||||
|
fflush(stdout);
|
||||||
|
|
||||||
|
if ( prctl(PR_SET_TSC, PR_TSC_ENABLE) == -1)
|
||||||
|
perror("prctl");
|
||||||
|
|
||||||
|
printf("rdtsc() == %llu\n", (unsigned long long)rdtsc());
|
||||||
|
printf("prctl(PR_SET_TSC, PR_TSC_SIGSEGV)\n");
|
||||||
|
fflush(stdout);
|
||||||
|
|
||||||
|
if ( prctl(PR_SET_TSC, PR_TSC_SIGSEGV) == -1)
|
||||||
|
perror("prctl");
|
||||||
|
|
||||||
|
printf("rdtsc() == ");
|
||||||
|
fflush(stdout);
|
||||||
|
printf("%llu\n", (unsigned long long)rdtsc());
|
||||||
|
fflush(stdout);
|
||||||
|
|
||||||
|
exit(EXIT_SUCCESS);
|
||||||
|
}
|
||||||
|
|
|
@ -115,6 +115,27 @@ Return Value: Handle for generated debug area
|
||||||
Description: Allocates memory for a debug log
|
Description: Allocates memory for a debug log
|
||||||
Must not be called within an interrupt handler
|
Must not be called within an interrupt handler
|
||||||
|
|
||||||
|
----------------------------------------------------------------------------
|
||||||
|
debug_info_t *debug_register_mode(char *name, int pages, int nr_areas,
|
||||||
|
int buf_size, mode_t mode, uid_t uid,
|
||||||
|
gid_t gid);
|
||||||
|
|
||||||
|
Parameter: name: Name of debug log (e.g. used for debugfs entry)
|
||||||
|
pages: Number of pages, which will be allocated per area
|
||||||
|
nr_areas: Number of debug areas
|
||||||
|
buf_size: Size of data area in each debug entry
|
||||||
|
mode: File mode for debugfs files. E.g. S_IRWXUGO
|
||||||
|
uid: User ID for debugfs files. Currently only 0 is
|
||||||
|
supported.
|
||||||
|
gid: Group ID for debugfs files. Currently only 0 is
|
||||||
|
supported.
|
||||||
|
|
||||||
|
Return Value: Handle for generated debug area
|
||||||
|
NULL if register failed
|
||||||
|
|
||||||
|
Description: Allocates memory for a debug log
|
||||||
|
Must not be called within an interrupt handler
|
||||||
|
|
||||||
---------------------------------------------------------------------------
|
---------------------------------------------------------------------------
|
||||||
void debug_unregister (debug_info_t * id);
|
void debug_unregister (debug_info_t * id);
|
||||||
|
|
||||||
|
|
|
@ -1,59 +0,0 @@
|
||||||
|
|
||||||
|
|
||||||
Real-Time group scheduling.
|
|
||||||
|
|
||||||
The problem space:
|
|
||||||
|
|
||||||
In order to schedule multiple groups of realtime tasks each group must
|
|
||||||
be assigned a fixed portion of the CPU time available. Without a minimum
|
|
||||||
guarantee a realtime group can obviously fall short. A fuzzy upper limit
|
|
||||||
is of no use since it cannot be relied upon. Which leaves us with just
|
|
||||||
the single fixed portion.
|
|
||||||
|
|
||||||
CPU time is divided by means of specifying how much time can be spent
|
|
||||||
running in a given period. Say a frame fixed realtime renderer must
|
|
||||||
deliver 25 frames a second, which yields a period of 0.04s. Now say
|
|
||||||
it will also have to play some music and respond to input, leaving it
|
|
||||||
with around 80% for the graphics. We can then give this group a runtime
|
|
||||||
of 0.8 * 0.04s = 0.032s.
|
|
||||||
|
|
||||||
This way the graphics group will have a 0.04s period with a 0.032s runtime
|
|
||||||
limit.
|
|
||||||
|
|
||||||
Now if the audio thread needs to refill the DMA buffer every 0.005s, but
|
|
||||||
needs only about 3% CPU time to do so, it can do with a 0.03 * 0.005s
|
|
||||||
= 0.00015s.
|
|
||||||
|
|
||||||
|
|
||||||
The Interface:
|
|
||||||
|
|
||||||
system wide:
|
|
||||||
|
|
||||||
/proc/sys/kernel/sched_rt_period_ms
|
|
||||||
/proc/sys/kernel/sched_rt_runtime_us
|
|
||||||
|
|
||||||
CONFIG_FAIR_USER_SCHED
|
|
||||||
|
|
||||||
/sys/kernel/uids/<uid>/cpu_rt_runtime_us
|
|
||||||
|
|
||||||
or
|
|
||||||
|
|
||||||
CONFIG_FAIR_CGROUP_SCHED
|
|
||||||
|
|
||||||
/cgroup/<cgroup>/cpu.rt_runtime_us
|
|
||||||
|
|
||||||
[ time is specified in us because the interface is s32; this gives an
|
|
||||||
operating range of ~35m to 1us ]
|
|
||||||
|
|
||||||
The period takes values in [ 1, INT_MAX ], runtime in [ -1, INT_MAX - 1 ].
|
|
||||||
|
|
||||||
A runtime of -1 specifies runtime == period, ie. no limit.
|
|
||||||
|
|
||||||
New groups get the period from /proc/sys/kernel/sched_rt_period_us and
|
|
||||||
a runtime of 0.
|
|
||||||
|
|
||||||
Settings are constrained to:
|
|
||||||
|
|
||||||
\Sum_{i} runtime_{i} / global_period <= global_runtime / global_period
|
|
||||||
|
|
||||||
in order to keep the configuration schedulable.
|
|
|
@ -12,5 +12,7 @@ sched-domains.txt
|
||||||
- information on scheduling domains.
|
- information on scheduling domains.
|
||||||
sched-nice-design.txt
|
sched-nice-design.txt
|
||||||
- How and why the scheduler's nice levels are implemented.
|
- How and why the scheduler's nice levels are implemented.
|
||||||
|
sched-rt-group.txt
|
||||||
|
- real-time group scheduling.
|
||||||
sched-stats.txt
|
sched-stats.txt
|
||||||
- information on schedstats (Linux Scheduler Statistics).
|
- information on schedstats (Linux Scheduler Statistics).
|
||||||
|
|
|
@ -0,0 +1,177 @@
|
||||||
|
Real-Time group scheduling
|
||||||
|
--------------------------
|
||||||
|
|
||||||
|
CONTENTS
|
||||||
|
========
|
||||||
|
|
||||||
|
1. Overview
|
||||||
|
1.1 The problem
|
||||||
|
1.2 The solution
|
||||||
|
2. The interface
|
||||||
|
2.1 System-wide settings
|
||||||
|
2.2 Default behaviour
|
||||||
|
2.3 Basis for grouping tasks
|
||||||
|
3. Future plans
|
||||||
|
|
||||||
|
|
||||||
|
1. Overview
|
||||||
|
===========
|
||||||
|
|
||||||
|
|
||||||
|
1.1 The problem
|
||||||
|
---------------
|
||||||
|
|
||||||
|
Realtime scheduling is all about determinism, a group has to be able to rely on
|
||||||
|
the amount of bandwidth (eg. CPU time) being constant. In order to schedule
|
||||||
|
multiple groups of realtime tasks, each group must be assigned a fixed portion
|
||||||
|
of the CPU time available. Without a minimum guarantee a realtime group can
|
||||||
|
obviously fall short. A fuzzy upper limit is of no use since it cannot be
|
||||||
|
relied upon. Which leaves us with just the single fixed portion.
|
||||||
|
|
||||||
|
1.2 The solution
|
||||||
|
----------------
|
||||||
|
|
||||||
|
CPU time is divided by means of specifying how much time can be spent running
|
||||||
|
in a given period. We allocate this "run time" for each realtime group which
|
||||||
|
the other realtime groups will not be permitted to use.
|
||||||
|
|
||||||
|
Any time not allocated to a realtime group will be used to run normal priority
|
||||||
|
tasks (SCHED_OTHER). Any allocated run time not used will also be picked up by
|
||||||
|
SCHED_OTHER.
|
||||||
|
|
||||||
|
Let's consider an example: a frame fixed realtime renderer must deliver 25
|
||||||
|
frames a second, which yields a period of 0.04s per frame. Now say it will also
|
||||||
|
have to play some music and respond to input, leaving it with around 80% CPU
|
||||||
|
time dedicated for the graphics. We can then give this group a run time of 0.8
|
||||||
|
* 0.04s = 0.032s.
|
||||||
|
|
||||||
|
This way the graphics group will have a 0.04s period with a 0.032s run time
|
||||||
|
limit. Now if the audio thread needs to refill the DMA buffer every 0.005s, but
|
||||||
|
needs only about 3% CPU time to do so, it can do with a 0.03 * 0.005s =
|
||||||
|
0.00015s. So this group can be scheduled with a period of 0.005s and a run time
|
||||||
|
of 0.00015s.
|
||||||
|
|
||||||
|
The remaining CPU time will be used for user input and other tass. Because
|
||||||
|
realtime tasks have explicitly allocated the CPU time they need to perform
|
||||||
|
their tasks, buffer underruns in the graphocs or audio can be eliminated.
|
||||||
|
|
||||||
|
NOTE: the above example is not fully implemented as of yet (2.6.25). We still
|
||||||
|
lack an EDF scheduler to make non-uniform periods usable.
|
||||||
|
|
||||||
|
|
||||||
|
2. The Interface
|
||||||
|
================
|
||||||
|
|
||||||
|
|
||||||
|
2.1 System wide settings
|
||||||
|
------------------------
|
||||||
|
|
||||||
|
The system wide settings are configured under the /proc virtual file system:
|
||||||
|
|
||||||
|
/proc/sys/kernel/sched_rt_period_us:
|
||||||
|
The scheduling period that is equivalent to 100% CPU bandwidth
|
||||||
|
|
||||||
|
/proc/sys/kernel/sched_rt_runtime_us:
|
||||||
|
A global limit on how much time realtime scheduling may use. Even without
|
||||||
|
CONFIG_RT_GROUP_SCHED enabled, this will limit time reserved to realtime
|
||||||
|
processes. With CONFIG_RT_GROUP_SCHED it signifies the total bandwidth
|
||||||
|
available to all realtime groups.
|
||||||
|
|
||||||
|
* Time is specified in us because the interface is s32. This gives an
|
||||||
|
operating range from 1us to about 35 minutes.
|
||||||
|
* sched_rt_period_us takes values from 1 to INT_MAX.
|
||||||
|
* sched_rt_runtime_us takes values from -1 to (INT_MAX - 1).
|
||||||
|
* A run time of -1 specifies runtime == period, ie. no limit.
|
||||||
|
|
||||||
|
|
||||||
|
2.2 Default behaviour
|
||||||
|
---------------------
|
||||||
|
|
||||||
|
The default values for sched_rt_period_us (1000000 or 1s) and
|
||||||
|
sched_rt_runtime_us (950000 or 0.95s). This gives 0.05s to be used by
|
||||||
|
SCHED_OTHER (non-RT tasks). These defaults were chosen so that a run-away
|
||||||
|
realtime tasks will not lock up the machine but leave a little time to recover
|
||||||
|
it. By setting runtime to -1 you'd get the old behaviour back.
|
||||||
|
|
||||||
|
By default all bandwidth is assigned to the root group and new groups get the
|
||||||
|
period from /proc/sys/kernel/sched_rt_period_us and a run time of 0. If you
|
||||||
|
want to assign bandwidth to another group, reduce the root group's bandwidth
|
||||||
|
and assign some or all of the difference to another group.
|
||||||
|
|
||||||
|
Realtime group scheduling means you have to assign a portion of total CPU
|
||||||
|
bandwidth to the group before it will accept realtime tasks. Therefore you will
|
||||||
|
not be able to run realtime tasks as any user other than root until you have
|
||||||
|
done that, even if the user has the rights to run processes with realtime
|
||||||
|
priority!
|
||||||
|
|
||||||
|
|
||||||
|
2.3 Basis for grouping tasks
|
||||||
|
----------------------------
|
||||||
|
|
||||||
|
There are two compile-time settings for allocating CPU bandwidth. These are
|
||||||
|
configured using the "Basis for grouping tasks" multiple choice menu under
|
||||||
|
General setup > Group CPU Scheduler:
|
||||||
|
|
||||||
|
a. CONFIG_USER_SCHED (aka "Basis for grouping tasks" = "user id")
|
||||||
|
|
||||||
|
This lets you use the virtual files under
|
||||||
|
"/sys/kernel/uids/<uid>/cpu_rt_runtime_us" to control he CPU time reserved for
|
||||||
|
each user .
|
||||||
|
|
||||||
|
The other option is:
|
||||||
|
|
||||||
|
.o CONFIG_CGROUP_SCHED (aka "Basis for grouping tasks" = "Control groups")
|
||||||
|
|
||||||
|
This uses the /cgroup virtual file system and "/cgroup/<cgroup>/cpu.rt_runtime_us"
|
||||||
|
to control the CPU time reserved for each control group instead.
|
||||||
|
|
||||||
|
For more information on working with control groups, you should read
|
||||||
|
Documentation/cgroups.txt as well.
|
||||||
|
|
||||||
|
Group settings are checked against the following limits in order to keep the configuration
|
||||||
|
schedulable:
|
||||||
|
|
||||||
|
\Sum_{i} runtime_{i} / global_period <= global_runtime / global_period
|
||||||
|
|
||||||
|
For now, this can be simplified to just the following (but see Future plans):
|
||||||
|
|
||||||
|
\Sum_{i} runtime_{i} <= global_runtime
|
||||||
|
|
||||||
|
|
||||||
|
3. Future plans
|
||||||
|
===============
|
||||||
|
|
||||||
|
There is work in progress to make the scheduling period for each group
|
||||||
|
("/sys/kernel/uids/<uid>/cpu_rt_period_us" or
|
||||||
|
"/cgroup/<cgroup>/cpu.rt_period_us" respectively) configurable as well.
|
||||||
|
|
||||||
|
The constraint on the period is that a subgroup must have a smaller or
|
||||||
|
equal period to its parent. But realistically its not very useful _yet_
|
||||||
|
as its prone to starvation without deadline scheduling.
|
||||||
|
|
||||||
|
Consider two sibling groups A and B; both have 50% bandwidth, but A's
|
||||||
|
period is twice the length of B's.
|
||||||
|
|
||||||
|
* group A: period=100000us, runtime=10000us
|
||||||
|
- this runs for 0.01s once every 0.1s
|
||||||
|
|
||||||
|
* group B: period= 50000us, runtime=10000us
|
||||||
|
- this runs for 0.01s twice every 0.1s (or once every 0.05 sec).
|
||||||
|
|
||||||
|
This means that currently a while (1) loop in A will run for the full period of
|
||||||
|
B and can starve B's tasks (assuming they are of lower priority) for a whole
|
||||||
|
period.
|
||||||
|
|
||||||
|
The next project will be SCHED_EDF (Earliest Deadline First scheduling) to bring
|
||||||
|
full deadline scheduling to the linux kernel. Deadline scheduling the above
|
||||||
|
groups and treating end of the period as a deadline will ensure that they both
|
||||||
|
get their allocated time.
|
||||||
|
|
||||||
|
Implementing SCHED_EDF might take a while to complete. Priority Inheritance is
|
||||||
|
the biggest challenge as the current linux PI infrastructure is geared towards
|
||||||
|
the limited static priority levels 0-139. With deadline scheduling you need to
|
||||||
|
do deadline inheritance (since priority is inversely proportional to the
|
||||||
|
deadline delta (deadline - now).
|
||||||
|
|
||||||
|
This means the whole PI machinery will have to be reworked - and that is one of
|
||||||
|
the most complex pieces of code we have.
|
|
@ -142,7 +142,7 @@ of idleness (idle, busy, and newly idle):
|
||||||
|
|
||||||
/proc/<pid>/schedstat
|
/proc/<pid>/schedstat
|
||||||
----------------
|
----------------
|
||||||
schedstats also adds a new /proc/<pid/schedstat file to include some of
|
schedstats also adds a new /proc/<pid>/schedstat file to include some of
|
||||||
the same information on a per-process level. There are three fields in
|
the same information on a per-process level. There are three fields in
|
||||||
this file correlating for that process to:
|
this file correlating for that process to:
|
||||||
1) time spent on the cpu
|
1) time spent on the cpu
|
||||||
|
|
|
@ -109,4 +109,10 @@
|
||||||
** 8.replace pci_alloc_consistent()/pci_free_consistent() with kmalloc()/kfree() in arcmsr_iop_message_xfer()
|
** 8.replace pci_alloc_consistent()/pci_free_consistent() with kmalloc()/kfree() in arcmsr_iop_message_xfer()
|
||||||
** 9. fix the release of dma memory for type B in arcmsr_free_ccb_pool()
|
** 9. fix the release of dma memory for type B in arcmsr_free_ccb_pool()
|
||||||
** 10.fix the arcmsr_polling_hbb_ccbdone()
|
** 10.fix the arcmsr_polling_hbb_ccbdone()
|
||||||
|
** 1.20.00.15 02/27/2008 Erich Chen & Nick Cheng
|
||||||
|
** 1.arcmsr_iop_message_xfer() is called from atomic context under the
|
||||||
|
** queuecommand scsi_host_template handler. James Bottomley pointed out
|
||||||
|
** that the current GFP_KERNEL|GFP_DMA flags are wrong: firstly we are in
|
||||||
|
** atomic context, secondly this memory is not used for DMA.
|
||||||
|
** Also removed some unneeded casts. Thanks to Daniel Drake <dsd@gentoo.org>
|
||||||
**************************************************************************
|
**************************************************************************
|
||||||
|
|
|
@ -2,7 +2,7 @@ This file contains brief information about the SCSI tape driver.
|
||||||
The driver is currently maintained by Kai Mäkisara (email
|
The driver is currently maintained by Kai Mäkisara (email
|
||||||
Kai.Makisara@kolumbus.fi)
|
Kai.Makisara@kolumbus.fi)
|
||||||
|
|
||||||
Last modified: Mon Mar 7 21:14:44 2005 by kai.makisara
|
Last modified: Sun Feb 24 21:59:07 2008 by kai.makisara
|
||||||
|
|
||||||
|
|
||||||
BASICS
|
BASICS
|
||||||
|
@ -133,6 +133,11 @@ the defaults set by the user. The value -1 means the default is not set. The
|
||||||
file 'dev' contains the device numbers corresponding to this device. The links
|
file 'dev' contains the device numbers corresponding to this device. The links
|
||||||
'device' and 'driver' point to the SCSI device and driver entries.
|
'device' and 'driver' point to the SCSI device and driver entries.
|
||||||
|
|
||||||
|
Each directory also contains the entry 'options' which shows the currently
|
||||||
|
enabled driver and mode options. The value in the file is a bit mask where the
|
||||||
|
bit definitions are the same as those used with MTSETDRVBUFFER in setting the
|
||||||
|
options.
|
||||||
|
|
||||||
A link named 'tape' is made from the SCSI device directory to the class
|
A link named 'tape' is made from the SCSI device directory to the class
|
||||||
directory corresponding to the mode 0 auto-rewind device (e.g., st0).
|
directory corresponding to the mode 0 auto-rewind device (e.g., st0).
|
||||||
|
|
||||||
|
@ -372,6 +377,11 @@ MTSETDRVBUFFER
|
||||||
MT_ST_SYSV sets the SYSV semantics (mode)
|
MT_ST_SYSV sets the SYSV semantics (mode)
|
||||||
MT_ST_NOWAIT enables immediate mode (i.e., don't wait for
|
MT_ST_NOWAIT enables immediate mode (i.e., don't wait for
|
||||||
the command to finish) for some commands (e.g., rewind)
|
the command to finish) for some commands (e.g., rewind)
|
||||||
|
MT_ST_SILI enables setting the SILI bit in SCSI commands when
|
||||||
|
reading in variable block mode to enhance performance when
|
||||||
|
reading blocks shorter than the byte count; set this only
|
||||||
|
if you are sure that the drive supports SILI and the HBA
|
||||||
|
correctly returns transfer residuals
|
||||||
MT_ST_DEBUGGING debugging (global; debugging must be
|
MT_ST_DEBUGGING debugging (global; debugging must be
|
||||||
compiled into the driver)
|
compiled into the driver)
|
||||||
MT_ST_SETBOOLEANS
|
MT_ST_SETBOOLEANS
|
||||||
|
|
|
@ -116,6 +116,13 @@ low order bit. So when a chip's timing diagram shows the clock
|
||||||
starting low (CPOL=0) and data stabilized for sampling during the
|
starting low (CPOL=0) and data stabilized for sampling during the
|
||||||
trailing clock edge (CPHA=1), that's SPI mode 1.
|
trailing clock edge (CPHA=1), that's SPI mode 1.
|
||||||
|
|
||||||
|
Note that the clock mode is relevant as soon as the chipselect goes
|
||||||
|
active. So the master must set the clock to inactive before selecting
|
||||||
|
a slave, and the slave can tell the chosen polarity by sampling the
|
||||||
|
clock level when its select line goes active. That's why many devices
|
||||||
|
support for example both modes 0 and 3: they don't care about polarity,
|
||||||
|
and alway clock data in/out on rising clock edges.
|
||||||
|
|
||||||
|
|
||||||
How do these driver programming interfaces work?
|
How do these driver programming interfaces work?
|
||||||
------------------------------------------------
|
------------------------------------------------
|
||||||
|
@ -379,8 +386,14 @@ any more such messages.
|
||||||
+ when bidirectional reads and writes start ... by how its
|
+ when bidirectional reads and writes start ... by how its
|
||||||
sequence of spi_transfer requests is arranged;
|
sequence of spi_transfer requests is arranged;
|
||||||
|
|
||||||
|
+ which I/O buffers are used ... each spi_transfer wraps a
|
||||||
|
buffer for each transfer direction, supporting full duplex
|
||||||
|
(two pointers, maybe the same one in both cases) and half
|
||||||
|
duplex (one pointer is NULL) transfers;
|
||||||
|
|
||||||
+ optionally defining short delays after transfers ... using
|
+ optionally defining short delays after transfers ... using
|
||||||
the spi_transfer.delay_usecs setting;
|
the spi_transfer.delay_usecs setting (this delay can be the
|
||||||
|
only protocol effect, if the buffer length is zero);
|
||||||
|
|
||||||
+ whether the chipselect becomes inactive after a transfer and
|
+ whether the chipselect becomes inactive after a transfer and
|
||||||
any delay ... by using the spi_transfer.cs_change flag;
|
any delay ... by using the spi_transfer.cs_change flag;
|
||||||
|
|
|
@ -5,6 +5,28 @@ Please use DEFINE_SPINLOCK()/DEFINE_RWLOCK() or
|
||||||
__SPIN_LOCK_UNLOCKED()/__RW_LOCK_UNLOCKED() as appropriate for static
|
__SPIN_LOCK_UNLOCKED()/__RW_LOCK_UNLOCKED() as appropriate for static
|
||||||
initialization.
|
initialization.
|
||||||
|
|
||||||
|
Most of the time, you can simply turn:
|
||||||
|
|
||||||
|
static spinlock_t xxx_lock = SPIN_LOCK_UNLOCKED;
|
||||||
|
|
||||||
|
into:
|
||||||
|
|
||||||
|
static DEFINE_SPINLOCK(xxx_lock);
|
||||||
|
|
||||||
|
Static structure member variables go from:
|
||||||
|
|
||||||
|
struct foo bar {
|
||||||
|
.lock = SPIN_LOCK_UNLOCKED;
|
||||||
|
};
|
||||||
|
|
||||||
|
to:
|
||||||
|
|
||||||
|
struct foo bar {
|
||||||
|
.lock = __SPIN_LOCK_UNLOCKED(bar.lock);
|
||||||
|
};
|
||||||
|
|
||||||
|
Declaration of static rw_locks undergo a similar transformation.
|
||||||
|
|
||||||
Dynamic initialization, when necessary, may be performed as
|
Dynamic initialization, when necessary, may be performed as
|
||||||
demonstrated below.
|
demonstrated below.
|
||||||
|
|
||||||
|
|
|
@ -16,8 +16,9 @@ Rules on what kind of patches are accepted, and which ones are not, into the
|
||||||
race can be exploited is also provided.
|
race can be exploited is also provided.
|
||||||
- It cannot contain any "trivial" fixes in it (spelling changes,
|
- It cannot contain any "trivial" fixes in it (spelling changes,
|
||||||
whitespace cleanups, etc).
|
whitespace cleanups, etc).
|
||||||
- It must be accepted by the relevant subsystem maintainer.
|
|
||||||
- It must follow the Documentation/SubmittingPatches rules.
|
- It must follow the Documentation/SubmittingPatches rules.
|
||||||
|
- It or an equivalent fix must already exist in Linus' tree. Quote the
|
||||||
|
respective commit ID in Linus' tree in your patch submission to -stable.
|
||||||
|
|
||||||
|
|
||||||
Procedure for submitting patches to the -stable tree:
|
Procedure for submitting patches to the -stable tree:
|
||||||
|
@ -28,7 +29,9 @@ Procedure for submitting patches to the -stable tree:
|
||||||
queue, or a NAK if the patch is rejected. This response might take a few
|
queue, or a NAK if the patch is rejected. This response might take a few
|
||||||
days, according to the developer's schedules.
|
days, according to the developer's schedules.
|
||||||
- If accepted, the patch will be added to the -stable queue, for review by
|
- If accepted, the patch will be added to the -stable queue, for review by
|
||||||
other developers.
|
other developers and by the relevant subsystem maintainer.
|
||||||
|
- If the stable@kernel.org address is added to a patch, when it goes into
|
||||||
|
Linus's tree it will automatically be emailed to the stable team.
|
||||||
- Security patches should not be sent to this alias, but instead to the
|
- Security patches should not be sent to this alias, but instead to the
|
||||||
documented security@kernel.org address.
|
documented security@kernel.org address.
|
||||||
|
|
||||||
|
|
|
@ -143,10 +143,10 @@ type Strings which represent the thermal zone type.
|
||||||
This is given by thermal zone driver as part of registration.
|
This is given by thermal zone driver as part of registration.
|
||||||
Eg: "ACPI thermal zone" indicates it's a ACPI thermal device
|
Eg: "ACPI thermal zone" indicates it's a ACPI thermal device
|
||||||
RO
|
RO
|
||||||
Optional
|
Required
|
||||||
|
|
||||||
temp Current temperature as reported by thermal zone (sensor)
|
temp Current temperature as reported by thermal zone (sensor)
|
||||||
Unit: degree Celsius
|
Unit: millidegree Celsius
|
||||||
RO
|
RO
|
||||||
Required
|
Required
|
||||||
|
|
||||||
|
@ -163,7 +163,7 @@ mode One of the predefined values in [kernel, user]
|
||||||
charge of the thermal management.
|
charge of the thermal management.
|
||||||
|
|
||||||
trip_point_[0-*]_temp The temperature above which trip point will be fired
|
trip_point_[0-*]_temp The temperature above which trip point will be fired
|
||||||
Unit: degree Celsius
|
Unit: millidegree Celsius
|
||||||
RO
|
RO
|
||||||
Optional
|
Optional
|
||||||
|
|
||||||
|
@ -193,7 +193,7 @@ type String which represents the type of device
|
||||||
eg. For memory controller device on intel_menlow platform:
|
eg. For memory controller device on intel_menlow platform:
|
||||||
this should be "Memory controller"
|
this should be "Memory controller"
|
||||||
RO
|
RO
|
||||||
Optional
|
Required
|
||||||
|
|
||||||
max_state The maximum permissible cooling state of this cooling device.
|
max_state The maximum permissible cooling state of this cooling device.
|
||||||
RO
|
RO
|
||||||
|
@ -219,16 +219,16 @@ the sys I/F structure will be built like this:
|
||||||
|
|
||||||
|thermal_zone1:
|
|thermal_zone1:
|
||||||
|-----type: ACPI thermal zone
|
|-----type: ACPI thermal zone
|
||||||
|-----temp: 37
|
|-----temp: 37000
|
||||||
|-----mode: kernel
|
|-----mode: kernel
|
||||||
|-----trip_point_0_temp: 100
|
|-----trip_point_0_temp: 100000
|
||||||
|-----trip_point_0_type: critical
|
|-----trip_point_0_type: critical
|
||||||
|-----trip_point_1_temp: 80
|
|-----trip_point_1_temp: 80000
|
||||||
|-----trip_point_1_type: passive
|
|-----trip_point_1_type: passive
|
||||||
|-----trip_point_2_temp: 70
|
|-----trip_point_2_temp: 70000
|
||||||
|-----trip_point_2_type: active[0]
|
|-----trip_point_2_type: active0
|
||||||
|-----trip_point_3_temp: 60
|
|-----trip_point_3_temp: 60000
|
||||||
|-----trip_point_3_type: active[1]
|
|-----trip_point_3_type: active1
|
||||||
|-----cdev0: --->/sys/class/thermal/cooling_device0
|
|-----cdev0: --->/sys/class/thermal/cooling_device0
|
||||||
|-----cdev0_trip_point: 1 /* cdev0 can be used for passive */
|
|-----cdev0_trip_point: 1 /* cdev0 can be used for passive */
|
||||||
|-----cdev1: --->/sys/class/thermal/cooling_device3
|
|-----cdev1: --->/sys/class/thermal/cooling_device3
|
||||||
|
|
|
@ -98,7 +98,7 @@ System-level global event devices are used for the Linux periodic tick. Per-CPU
|
||||||
event devices are used to provide local CPU functionality such as process
|
event devices are used to provide local CPU functionality such as process
|
||||||
accounting, profiling, and high resolution timers.
|
accounting, profiling, and high resolution timers.
|
||||||
|
|
||||||
The management layer assignes one or more of the folliwing functions to a clock
|
The management layer assigns one or more of the following functions to a clock
|
||||||
event device:
|
event device:
|
||||||
- system global periodic tick (jiffies update)
|
- system global periodic tick (jiffies update)
|
||||||
- cpu local update_process_times
|
- cpu local update_process_times
|
|
@ -57,7 +57,7 @@ here; a summary of the common scenarios is presented below:
|
||||||
unaligned access to be corrected.
|
unaligned access to be corrected.
|
||||||
- Some architectures are not capable of unaligned memory access, but will
|
- Some architectures are not capable of unaligned memory access, but will
|
||||||
silently perform a different memory access to the one that was requested,
|
silently perform a different memory access to the one that was requested,
|
||||||
resulting a a subtle code bug that is hard to detect!
|
resulting in a subtle code bug that is hard to detect!
|
||||||
|
|
||||||
It should be obvious from the above that if your code causes unaligned
|
It should be obvious from the above that if your code causes unaligned
|
||||||
memory accesses to happen, your code will not work correctly on certain
|
memory accesses to happen, your code will not work correctly on certain
|
||||||
|
@ -209,7 +209,7 @@ memory and you wish to avoid unaligned access, its usage is as follows:
|
||||||
|
|
||||||
u32 value = get_unaligned((u32 *) data);
|
u32 value = get_unaligned((u32 *) data);
|
||||||
|
|
||||||
These macros work work for memory accesses of any length (not just 32 bits as
|
These macros work for memory accesses of any length (not just 32 bits as
|
||||||
in the examples above). Be aware that when compared to standard access of
|
in the examples above). Be aware that when compared to standard access of
|
||||||
aligned memory, using these macros to access unaligned memory can be costly in
|
aligned memory, using these macros to access unaligned memory can be costly in
|
||||||
terms of performance.
|
terms of performance.
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
usb-help.txt
|
usb-help.txt
|
||||||
2000-July-12
|
2008-Mar-7
|
||||||
|
|
||||||
For USB help other than the readme files that are located in
|
For USB help other than the readme files that are located in
|
||||||
Documentation/usb/*, see the following:
|
Documentation/usb/*, see the following:
|
||||||
|
@ -11,8 +11,6 @@ Linux USB Guide: http://linux-usb.sourceforge.net
|
||||||
Linux-USB device overview (working devices and drivers):
|
Linux-USB device overview (working devices and drivers):
|
||||||
http://www.qbik.ch/usb/devices/
|
http://www.qbik.ch/usb/devices/
|
||||||
|
|
||||||
The Linux-USB mailing lists are:
|
The Linux-USB mailing list is at linux-usb@vger.kernel.org
|
||||||
linux-usb-users@lists.sourceforge.net for general user help
|
|
||||||
linux-usb-devel@lists.sourceforge.net for developer discussions
|
|
||||||
|
|
||||||
###
|
###
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
7 -> Leadtek Winfast USB II (em2800)
|
7 -> Leadtek Winfast USB II (em2800)
|
||||||
8 -> Kworld USB2800 (em2800)
|
8 -> Kworld USB2800 (em2800)
|
||||||
9 -> Pinnacle Dazzle DVC 90/DVC 100 (em2820/em2840) [2304:0207,2304:021a]
|
9 -> Pinnacle Dazzle DVC 90/DVC 100 (em2820/em2840) [2304:0207,2304:021a]
|
||||||
10 -> Hauppauge WinTV HVR 900 (em2880) [2040:6500]
|
10 -> Hauppauge WinTV HVR 900 (em2880) [2040:6500,2040:6502]
|
||||||
11 -> Terratec Hybrid XS (em2880) [0ccd:0042]
|
11 -> Terratec Hybrid XS (em2880) [0ccd:0042]
|
||||||
12 -> Kworld PVR TV 2800 RF (em2820/em2840)
|
12 -> Kworld PVR TV 2800 RF (em2820/em2840)
|
||||||
13 -> Terratec Prodigy XS (em2880) [0ccd:0047]
|
13 -> Terratec Prodigy XS (em2880) [0ccd:0047]
|
||||||
|
|
Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше
Загрузка…
Ссылка в новой задаче