Merge ../linus
This commit is contained in:
commit
f0eef25339
1
.gitignore
vendored
1
.gitignore
vendored
@ -20,6 +20,7 @@
|
||||
# Top-level generic files
|
||||
#
|
||||
tags
|
||||
TAGS
|
||||
vmlinux*
|
||||
System.map
|
||||
Module.symvers
|
||||
|
61
CREDITS
61
CREDITS
@ -34,6 +34,7 @@ E: magrawal@nortelnetworks.com
|
||||
D: Basic Interphase 5575 driver with UBR and ABR support.
|
||||
S: 75 Donald St, Apt 42
|
||||
S: Weymouth, MA 02188
|
||||
S: USA
|
||||
|
||||
N: Dave Airlie
|
||||
E: airlied@linux.ie
|
||||
@ -44,7 +45,7 @@ S: Longford, Ireland
|
||||
S: Sydney, Australia
|
||||
|
||||
N: Tigran A. Aivazian
|
||||
E: tigran@veritas.com
|
||||
E: tigran@aivazian.fsnet.co.uk
|
||||
W: http://www.moses.uklinux.net/patches
|
||||
D: BFS filesystem
|
||||
D: Intel IA32 CPU microcode update support
|
||||
@ -202,6 +203,7 @@ S: MS42
|
||||
S: Hewlett-Packard
|
||||
S: 3404 E Harmony Rd
|
||||
S: Fort Collins, CO 80525
|
||||
S: USA
|
||||
|
||||
N: Arindam Banerji
|
||||
E: axb@cse.nd.edu
|
||||
@ -444,6 +446,7 @@ E: rbradetich@uswest.net
|
||||
D: Linux/PA-RISC hacker
|
||||
S: 1200 Goldenrod Dr.
|
||||
S: Nampa, Idaho 83686
|
||||
S: USA
|
||||
|
||||
N: Derrick J. Brashear
|
||||
E: shadow@dementia.org
|
||||
@ -633,6 +636,7 @@ E: scole@lanl.gov
|
||||
E: elenstev@mesatop.com
|
||||
D: Various build fixes and kernel documentation.
|
||||
S: Los Alamos, New Mexico
|
||||
S: USA
|
||||
|
||||
N: Hamish Coleman
|
||||
E: hamish@zot.apana.org.au
|
||||
@ -951,6 +955,12 @@ S: Brevia 1043
|
||||
S: S-114 79 Stockholm
|
||||
S: Sweden
|
||||
|
||||
N: Pekka Enberg
|
||||
E: penberg@cs.helsinki.fi
|
||||
W: http://www.cs.helsinki.fi/u/penberg/
|
||||
D: Various kernel hacks, fixes, and cleanups.
|
||||
S: Finland
|
||||
|
||||
N: David Engebretsen
|
||||
E: engebret@us.ibm.com
|
||||
D: Linux port to 64-bit PowerPC architecture
|
||||
@ -1620,7 +1630,8 @@ D: fbdev hacking
|
||||
|
||||
N: Jesper Juhl
|
||||
E: jesper.juhl@gmail.com
|
||||
D: Various fixes, cleanups and minor features.
|
||||
D: Various fixes, cleanups and minor features all over the tree.
|
||||
D: Wrote initial version of the hdaps driver (since passed on to others).
|
||||
S: Lemnosvej 1, 3.tv
|
||||
S: 2300 Copenhagen S.
|
||||
S: Denmark
|
||||
@ -1797,6 +1808,14 @@ S: Kruislaan 419
|
||||
S: 1098 VA Amsterdam
|
||||
S: The Netherlands
|
||||
|
||||
N: Jiri Kosina
|
||||
E: jikos@jikos.cz
|
||||
E: jkosina@suse.cz
|
||||
D: Generic HID layer - original code split, fixes
|
||||
D: Various ACPI fixes, keeping correct battery state through suspend
|
||||
D: various lockdep annotations, autofs and other random bugfixes
|
||||
S: Prague, Czech Republic
|
||||
|
||||
N: Gene Kozin
|
||||
E: 74604.152@compuserve.com
|
||||
W: http://www.sangoma.com
|
||||
@ -2002,6 +2021,7 @@ W: http://www.mathematik.uni-stuttgart.de/~floeff
|
||||
D: Busmaster driver for HP 10/100 Mbit Network Adapters
|
||||
S: University of Stuttgart, Germany and
|
||||
S: Ecole Nationale Superieure des Telecommunications, Paris
|
||||
S: France
|
||||
|
||||
N: Jamie Lokier
|
||||
E: jamie@shareable.org
|
||||
@ -2171,6 +2191,7 @@ S: Hewlett Packard
|
||||
S: MS 42
|
||||
S: 3404 E. Harmony Road
|
||||
S: Fort Collins, CO 80528
|
||||
S: USA
|
||||
|
||||
N: Torben Mathiasen
|
||||
E: torben.mathiasen@compaq.com
|
||||
@ -2227,6 +2248,12 @@ D: tc: HFSC scheduler
|
||||
S: Freiburg
|
||||
S: Germany
|
||||
|
||||
N: Paul E. McKenney
|
||||
E: paulmck@us.ibm.com
|
||||
W: http://www.rdrop.com/users/paulmck/
|
||||
D: RCU and variants
|
||||
D: rcutorture module
|
||||
|
||||
N: Mike McLagan
|
||||
E: mike.mclagan@linux.org
|
||||
W: http://www.invlogic.com/~mmclagan
|
||||
@ -2477,7 +2504,8 @@ S: Derbyshire DE4 3RL
|
||||
S: United Kingdom
|
||||
|
||||
N: Ian S. Nelson
|
||||
E: ian.nelson@echostar.com
|
||||
E: nelsonis@earthlink.net
|
||||
P: 1024D/00D3D983 3EFD 7B86 B888 D7E2 29B6 9E97 576F 1B97 00D3 D983
|
||||
D: Minor mmap and ide hacks
|
||||
S: 1370 Atlantis Ave.
|
||||
S: Lafayette CO, 80026
|
||||
@ -2578,6 +2606,9 @@ S: Ucitelska 1576
|
||||
S: Prague 8
|
||||
S: 182 00 Czech Republic
|
||||
|
||||
N: Rick Payne
|
||||
D: RFC2385 Support for TCP
|
||||
|
||||
N: Barak A. Pearlmutter
|
||||
E: bap@cs.unm.edu
|
||||
W: http://www.cs.unm.edu/~bap/
|
||||
@ -2967,6 +2998,10 @@ S: 69 rue Dunois
|
||||
S: 75013 Paris
|
||||
S: France
|
||||
|
||||
N: Dipankar Sarma
|
||||
E: dipankar@in.ibm.com
|
||||
D: RCU
|
||||
|
||||
N: Hannu Savolainen
|
||||
E: hannu@opensound.com
|
||||
D: Maintainer of the sound drivers until 2.1.x days.
|
||||
@ -3279,6 +3314,12 @@ S: 3 Ballow Crescent
|
||||
S: MacGregor A.C.T 2615
|
||||
S: Australia
|
||||
|
||||
N: Josh Triplett
|
||||
E: josh@freedesktop.org
|
||||
P: 1024D/D0FE7AFB B24A 65C9 1D71 2AC2 DE87 CA26 189B 9946 D0FE 7AFB
|
||||
D: rcutorture maintainer
|
||||
D: lock annotations, finding and fixing lock bugs
|
||||
|
||||
N: Winfried Trümper
|
||||
E: winni@xpilot.org
|
||||
W: http://www.shop.de/~winni/
|
||||
@ -3481,14 +3522,12 @@ D: The Linux Support Team Erlangen
|
||||
|
||||
N: David Weinehall
|
||||
E: tao@acc.umu.se
|
||||
P: 1024D/DC47CA16 7ACE 0FB0 7A74 F994 9B36 E1D1 D14E 8526 DC47 CA16
|
||||
W: http://www.acc.umu.se/~tao/
|
||||
W: http://www.acc.umu.se/~mcalinux/
|
||||
D: v2.0 kernel maintainer
|
||||
D: Fixes for the NE/2-driver
|
||||
D: Miscellaneous MCA-support
|
||||
D: Cleanup of the Config-files
|
||||
S: Axtorpsvagen 40:20
|
||||
S: S-903 37 UMEA
|
||||
S: Sweden
|
||||
|
||||
N: Matt Welsh
|
||||
E: mdw@metalab.unc.edu
|
||||
@ -3548,11 +3587,11 @@ S: Fargo, North Dakota 58122
|
||||
S: USA
|
||||
|
||||
N: Steven Whitehouse
|
||||
E: SteveW@ACM.org
|
||||
E: steve@chygwyn.com
|
||||
W: http://www.chygwyn.com/~steve
|
||||
D: Linux DECnet project: http://www.sucs.swan.ac.uk/~rohan/DECnet/index.html
|
||||
D: Linux DECnet project
|
||||
D: Minor debugging of other networking protocols.
|
||||
D: Misc bug fixes and filesystem development
|
||||
D: Misc bug fixes and GFS2 filesystem development
|
||||
|
||||
N: Hans-Joachim Widmaier
|
||||
E: hjw@zvw.de
|
||||
@ -3650,7 +3689,7 @@ S: Portland, OR
|
||||
S: USA
|
||||
|
||||
N: Michal Wronski
|
||||
E: Michal.Wronski@motorola.com
|
||||
E: michal.wronski@gmail.com
|
||||
D: POSIX message queues fs (with K. Benedyczak)
|
||||
S: Krakow
|
||||
S: Poland
|
||||
|
@ -104,8 +104,6 @@ firmware_class/
|
||||
- request_firmware() hotplug interface info.
|
||||
floppy.txt
|
||||
- notes and driver options for the floppy disk driver.
|
||||
ftape.txt
|
||||
- notes about the floppy tape device driver.
|
||||
hayes-esp.txt
|
||||
- info on using the Hayes ESP serial driver.
|
||||
highuid.txt
|
||||
|
20
Documentation/ABI/testing/debugfs-pktcdvd
Normal file
20
Documentation/ABI/testing/debugfs-pktcdvd
Normal file
@ -0,0 +1,20 @@
|
||||
What: /debug/pktcdvd/pktcdvd[0-7]
|
||||
Date: Oct. 2006
|
||||
KernelVersion: 2.6.19
|
||||
Contact: Thomas Maier <balagi@justmail.de>
|
||||
Description:
|
||||
|
||||
debugfs interface
|
||||
-----------------
|
||||
|
||||
The pktcdvd module (packet writing driver) creates
|
||||
these files in debugfs:
|
||||
|
||||
/debug/pktcdvd/pktcdvd[0-7]/
|
||||
info (0444) Lots of human readable driver
|
||||
statistics and infos. Multiple lines!
|
||||
|
||||
Example:
|
||||
-------
|
||||
|
||||
cat /debug/pktcdvd/pktcdvd0/info
|
72
Documentation/ABI/testing/sysfs-class-pktcdvd
Normal file
72
Documentation/ABI/testing/sysfs-class-pktcdvd
Normal file
@ -0,0 +1,72 @@
|
||||
What: /sys/class/pktcdvd/
|
||||
Date: Oct. 2006
|
||||
KernelVersion: 2.6.19
|
||||
Contact: Thomas Maier <balagi@justmail.de>
|
||||
Description:
|
||||
|
||||
sysfs interface
|
||||
---------------
|
||||
|
||||
The pktcdvd module (packet writing driver) creates
|
||||
these files in the sysfs:
|
||||
(<devid> is in format major:minor )
|
||||
|
||||
/sys/class/pktcdvd/
|
||||
add (0200) Write a block device id (major:minor)
|
||||
to create a new pktcdvd device and map
|
||||
it to the block device.
|
||||
|
||||
remove (0200) Write the pktcdvd device id (major:minor)
|
||||
to it to remove the pktcdvd device.
|
||||
|
||||
device_map (0444) Shows the device mapping in format:
|
||||
pktcdvd[0-7] <pktdevid> <blkdevid>
|
||||
|
||||
/sys/class/pktcdvd/pktcdvd[0-7]/
|
||||
dev (0444) Device id
|
||||
uevent (0200) To send an uevent.
|
||||
|
||||
/sys/class/pktcdvd/pktcdvd[0-7]/stat/
|
||||
packets_started (0444) Number of started packets.
|
||||
packets_finished (0444) Number of finished packets.
|
||||
|
||||
kb_written (0444) kBytes written.
|
||||
kb_read (0444) kBytes read.
|
||||
kb_read_gather (0444) kBytes read to fill write packets.
|
||||
|
||||
reset (0200) Write any value to it to reset
|
||||
pktcdvd device statistic values, like
|
||||
bytes read/written.
|
||||
|
||||
/sys/class/pktcdvd/pktcdvd[0-7]/write_queue/
|
||||
size (0444) Contains the size of the bio write
|
||||
queue.
|
||||
|
||||
congestion_off (0644) If bio write queue size is below
|
||||
this mark, accept new bio requests
|
||||
from the block layer.
|
||||
|
||||
congestion_on (0644) If bio write queue size is higher
|
||||
as this mark, do no longer accept
|
||||
bio write requests from the block
|
||||
layer and wait till the pktcdvd
|
||||
device has processed enough bio's
|
||||
so that bio write queue size is
|
||||
below congestion off mark.
|
||||
A value of <= 0 disables congestion
|
||||
control.
|
||||
|
||||
|
||||
Example:
|
||||
--------
|
||||
To use the pktcdvd sysfs interface directly, you can do:
|
||||
|
||||
# create a new pktcdvd device mapped to /dev/hdc
|
||||
echo "22:0" >/sys/class/pktcdvd/add
|
||||
cat /sys/class/pktcdvd/device_map
|
||||
# assuming device pktcdvd0 was created, look at stat's
|
||||
cat /sys/class/pktcdvd/pktcdvd0/stat/kb_written
|
||||
# print the device id of the mapped block device
|
||||
fgrep pktcdvd0 /sys/class/pktcdvd/device_map
|
||||
# remove device, using pktcdvd0 device id 253:0
|
||||
echo "253:0" >/sys/class/pktcdvd/remove
|
@ -21,7 +21,7 @@ Description:
|
||||
these states.
|
||||
|
||||
What: /sys/power/disk
|
||||
Date: August 2006
|
||||
Date: September 2006
|
||||
Contact: Rafael J. Wysocki <rjw@sisk.pl>
|
||||
Description:
|
||||
The /sys/power/disk file controls the operating mode of the
|
||||
@ -39,6 +39,19 @@ Description:
|
||||
'reboot' - the memory image will be saved by the kernel and
|
||||
the system will be rebooted.
|
||||
|
||||
Additionally, /sys/power/disk can be used to turn on one of the
|
||||
two testing modes of the suspend-to-disk mechanism: 'testproc'
|
||||
or 'test'. If the suspend-to-disk mechanism is in the
|
||||
'testproc' mode, writing 'disk' to /sys/power/state will cause
|
||||
the kernel to disable nonboot CPUs and freeze tasks, wait for 5
|
||||
seconds, unfreeze tasks and enable nonboot CPUs. If it is in
|
||||
the 'test' mode, writing 'disk' to /sys/power/state will cause
|
||||
the kernel to disable nonboot CPUs and freeze tasks, shrink
|
||||
memory, suspend devices, wait for 5 seconds, resume devices,
|
||||
unfreeze tasks and enable nonboot CPUs. Then, we are able to
|
||||
look in the log messages and work out, for example, which code
|
||||
is being slow and which device drivers are misbehaving.
|
||||
|
||||
The suspend-to-disk method may be chosen by writing to this
|
||||
file one of the accepted strings:
|
||||
|
||||
@ -46,6 +59,8 @@ Description:
|
||||
'platform'
|
||||
'shutdown'
|
||||
'reboot'
|
||||
'testproc'
|
||||
'test'
|
||||
|
||||
It will only change to 'firmware' or 'platform' if the system
|
||||
supports that.
|
||||
|
@ -201,7 +201,7 @@ udev
|
||||
----
|
||||
udev is a userspace application for populating /dev dynamically with
|
||||
only entries for devices actually present. udev replaces the basic
|
||||
functionality of devfs, while allowing persistant device naming for
|
||||
functionality of devfs, while allowing persistent device naming for
|
||||
devices.
|
||||
|
||||
FUSE
|
||||
|
@ -35,12 +35,37 @@ In short, 8-char indents make things easier to read, and have the added
|
||||
benefit of warning you when you're nesting your functions too deep.
|
||||
Heed that warning.
|
||||
|
||||
The preferred way to ease multiple indentation levels in a switch statement is
|
||||
to align the "switch" and its subordinate "case" labels in the same column
|
||||
instead of "double-indenting" the "case" labels. E.g.:
|
||||
|
||||
switch (suffix) {
|
||||
case 'G':
|
||||
case 'g':
|
||||
mem <<= 30;
|
||||
break;
|
||||
case 'M':
|
||||
case 'm':
|
||||
mem <<= 20;
|
||||
break;
|
||||
case 'K':
|
||||
case 'k':
|
||||
mem <<= 10;
|
||||
/* fall through */
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
Don't put multiple statements on a single line unless you have
|
||||
something to hide:
|
||||
|
||||
if (condition) do_this;
|
||||
do_something_everytime;
|
||||
|
||||
Don't put multiple assignments on a single line either. Kernel coding style
|
||||
is super simple. Avoid tricky expressions.
|
||||
|
||||
Outside of comments, documentation and except in Kconfig, spaces are never
|
||||
used for indentation, and the above example is deliberately broken.
|
||||
|
||||
@ -69,7 +94,7 @@ void fun(int a, int b, int c)
|
||||
next_statement;
|
||||
}
|
||||
|
||||
Chapter 3: Placing Braces
|
||||
Chapter 3: Placing Braces and Spaces
|
||||
|
||||
The other issue that always comes up in C styling is the placement of
|
||||
braces. Unlike the indent size, there are few technical reasons to
|
||||
@ -81,6 +106,20 @@ brace last on the line, and put the closing brace first, thusly:
|
||||
we do y
|
||||
}
|
||||
|
||||
This applies to all non-function statement blocks (if, switch, for,
|
||||
while, do). E.g.:
|
||||
|
||||
switch (action) {
|
||||
case KOBJ_ADD:
|
||||
return "add";
|
||||
case KOBJ_REMOVE:
|
||||
return "remove";
|
||||
case KOBJ_CHANGE:
|
||||
return "change";
|
||||
default:
|
||||
return NULL;
|
||||
}
|
||||
|
||||
However, there is one special case, namely functions: they have the
|
||||
opening brace at the beginning of the next line, thus:
|
||||
|
||||
@ -121,6 +160,49 @@ supply of new-lines on your screen is not a renewable resource (think
|
||||
25-line terminal screens here), you have more empty lines to put
|
||||
comments on.
|
||||
|
||||
3.1: Spaces
|
||||
|
||||
Linux kernel style for use of spaces depends (mostly) on
|
||||
function-versus-keyword usage. Use a space after (most) keywords. The
|
||||
notable exceptions are sizeof, typeof, alignof, and __attribute__, which look
|
||||
somewhat like functions (and are usually used with parentheses in Linux,
|
||||
although they are not required in the language, as in: "sizeof info" after
|
||||
"struct fileinfo info;" is declared).
|
||||
|
||||
So use a space after these keywords:
|
||||
if, switch, case, for, do, while
|
||||
but not with sizeof, typeof, alignof, or __attribute__. E.g.,
|
||||
s = sizeof(struct file);
|
||||
|
||||
Do not add spaces around (inside) parenthesized expressions. This example is
|
||||
*bad*:
|
||||
|
||||
s = sizeof( struct file );
|
||||
|
||||
When declaring pointer data or a function that returns a pointer type, the
|
||||
preferred use of '*' is adjacent to the data name or function name and not
|
||||
adjacent to the type name. Examples:
|
||||
|
||||
char *linux_banner;
|
||||
unsigned long long memparse(char *ptr, char **retptr);
|
||||
char *match_strdup(substring_t *s);
|
||||
|
||||
Use one space around (on each side of) most binary and ternary operators,
|
||||
such as any of these:
|
||||
|
||||
= + - < > * / % | & ^ <= >= == != ? :
|
||||
|
||||
but no space after unary operators:
|
||||
& * + - ~ ! sizeof typeof alignof __attribute__ defined
|
||||
|
||||
no space before the postfix increment & decrement unary operators:
|
||||
++ --
|
||||
|
||||
no space after the prefix increment & decrement unary operators:
|
||||
++ --
|
||||
|
||||
and no space around the '.' and "->" structure member operators.
|
||||
|
||||
|
||||
Chapter 4: Naming
|
||||
|
||||
@ -152,7 +234,7 @@ variable that is used to hold a temporary value.
|
||||
|
||||
If you are afraid to mix up your local variable names, you have another
|
||||
problem, which is called the function-growth-hormone-imbalance syndrome.
|
||||
See next chapter.
|
||||
See chapter 6 (Functions).
|
||||
|
||||
|
||||
Chapter 5: Typedefs
|
||||
@ -258,6 +340,20 @@ generally easily keep track of about 7 different things, anything more
|
||||
and it gets confused. You know you're brilliant, but maybe you'd like
|
||||
to understand what you did 2 weeks from now.
|
||||
|
||||
In source files, separate functions with one blank line. If the function is
|
||||
exported, the EXPORT* macro for it should follow immediately after the closing
|
||||
function brace line. E.g.:
|
||||
|
||||
int system_is_up(void)
|
||||
{
|
||||
return system_state == SYSTEM_RUNNING;
|
||||
}
|
||||
EXPORT_SYMBOL(system_is_up);
|
||||
|
||||
In function prototypes, include parameter names with their data types.
|
||||
Although this is not required by the C language, it is preferred in Linux
|
||||
because it is a simple way to add valuable information for the reader.
|
||||
|
||||
|
||||
Chapter 7: Centralized exiting of functions
|
||||
|
||||
@ -306,16 +402,36 @@ time to explain badly written code.
|
||||
Generally, you want your comments to tell WHAT your code does, not HOW.
|
||||
Also, try to avoid putting comments inside a function body: if the
|
||||
function is so complex that you need to separately comment parts of it,
|
||||
you should probably go back to chapter 5 for a while. You can make
|
||||
you should probably go back to chapter 6 for a while. You can make
|
||||
small comments to note or warn about something particularly clever (or
|
||||
ugly), but try to avoid excess. Instead, put the comments at the head
|
||||
of the function, telling people what it does, and possibly WHY it does
|
||||
it.
|
||||
|
||||
When commenting the kernel API functions, please use the kerneldoc format.
|
||||
When commenting the kernel API functions, please use the kernel-doc format.
|
||||
See the files Documentation/kernel-doc-nano-HOWTO.txt and scripts/kernel-doc
|
||||
for details.
|
||||
|
||||
Linux style for comments is the C89 "/* ... */" style.
|
||||
Don't use C99-style "// ..." comments.
|
||||
|
||||
The preferred style for long (multi-line) comments is:
|
||||
|
||||
/*
|
||||
* This is the preferred style for multi-line
|
||||
* comments in the Linux kernel source code.
|
||||
* Please use it consistently.
|
||||
*
|
||||
* Description: A column of asterisks on the left side,
|
||||
* with beginning and ending almost-blank lines.
|
||||
*/
|
||||
|
||||
It's also important to comment data, whether they are basic types or derived
|
||||
types. To this end, use just one data declaration per line (no commas for
|
||||
multiple data declarations). This leaves you room for a small comment on each
|
||||
item, explaining its use.
|
||||
|
||||
|
||||
Chapter 9: You've made a mess of it
|
||||
|
||||
That's OK, we all do. You've probably been told by your long-time Unix
|
||||
@ -532,6 +648,40 @@ appears outweighs the potential value of the hint that tells gcc to do
|
||||
something it would have done anyway.
|
||||
|
||||
|
||||
Chapter 16: Function return values and names
|
||||
|
||||
Functions can return values of many different kinds, and one of the
|
||||
most common is a value indicating whether the function succeeded or
|
||||
failed. Such a value can be represented as an error-code integer
|
||||
(-Exxx = failure, 0 = success) or a "succeeded" boolean (0 = failure,
|
||||
non-zero = success).
|
||||
|
||||
Mixing up these two sorts of representations is a fertile source of
|
||||
difficult-to-find bugs. If the C language included a strong distinction
|
||||
between integers and booleans then the compiler would find these mistakes
|
||||
for us... but it doesn't. To help prevent such bugs, always follow this
|
||||
convention:
|
||||
|
||||
If the name of a function is an action or an imperative command,
|
||||
the function should return an error-code integer. If the name
|
||||
is a predicate, the function should return a "succeeded" boolean.
|
||||
|
||||
For example, "add work" is a command, and the add_work() function returns 0
|
||||
for success or -EBUSY for failure. In the same way, "PCI device present" is
|
||||
a predicate, and the pci_dev_present() function returns 1 if it succeeds in
|
||||
finding a matching device or 0 if it doesn't.
|
||||
|
||||
All EXPORTed functions must respect this convention, and so should all
|
||||
public functions. Private (static) functions need not, but it is
|
||||
recommended that they do.
|
||||
|
||||
Functions whose return value is the actual result of a computation, rather
|
||||
than an indication of whether the computation succeeded, are not subject to
|
||||
this rule. Generally they indicate failure by returning some out-of-range
|
||||
result. Typical examples would be functions that return pointers; they use
|
||||
NULL or the ERR_PTR mechanism to report failure.
|
||||
|
||||
|
||||
|
||||
Appendix I: References
|
||||
|
||||
@ -557,4 +707,4 @@ Kernel CodingStyle, by greg@kroah.com at OLS 2002:
|
||||
http://www.kroah.com/linux/talks/ols_2002_kernel_codingstyle_talk/html/
|
||||
|
||||
--
|
||||
Last updated on 30 April 2006.
|
||||
Last updated on 2006-December-06.
|
||||
|
@ -77,7 +77,7 @@ To get this part of the dma_ API, you must #include <linux/dmapool.h>
|
||||
Many drivers need lots of small dma-coherent memory regions for DMA
|
||||
descriptors or I/O buffers. Rather than allocating in units of a page
|
||||
or more using dma_alloc_coherent(), you can use DMA pools. These work
|
||||
much like a kmem_cache_t, except that they use the dma-coherent allocator
|
||||
much like a struct kmem_cache, except that they use the dma-coherent allocator
|
||||
not __get_free_pages(). Also, they understand common hardware constraints
|
||||
for alignment, like queue heads needing to be aligned on N byte boundaries.
|
||||
|
||||
@ -94,7 +94,7 @@ The pool create() routines initialize a pool of dma-coherent buffers
|
||||
for use with a given device. It must be called in a context which
|
||||
can sleep.
|
||||
|
||||
The "name" is for diagnostics (like a kmem_cache_t name); dev and size
|
||||
The "name" is for diagnostics (like a struct kmem_cache name); dev and size
|
||||
are like what you'd pass to dma_alloc_coherent(). The device's hardware
|
||||
alignment requirement for this type of data is "align" (which is expressed
|
||||
in bytes, and must be a power of two). If your device has no boundary
|
||||
@ -431,10 +431,10 @@ be identical to those passed in (and returned by
|
||||
dma_alloc_noncoherent()).
|
||||
|
||||
int
|
||||
dma_is_consistent(dma_addr_t dma_handle)
|
||||
dma_is_consistent(struct device *dev, dma_addr_t dma_handle)
|
||||
|
||||
returns true if the memory pointed to by the dma_handle is actually
|
||||
consistent.
|
||||
returns true if the device dev is performing consistent DMA on the memory
|
||||
area pointed to by the dma_handle.
|
||||
|
||||
int
|
||||
dma_get_cache_alignment(void)
|
||||
@ -459,7 +459,7 @@ anything like this. You must also be extra careful about accessing
|
||||
memory you intend to sync partially.
|
||||
|
||||
void
|
||||
dma_cache_sync(void *vaddr, size_t size,
|
||||
dma_cache_sync(struct device *dev, void *vaddr, size_t size,
|
||||
enum dma_data_direction direction)
|
||||
|
||||
Do a partial sync of memory that was allocated by
|
||||
@ -489,7 +489,7 @@ size is the size of the area (must be multiples of PAGE_SIZE).
|
||||
flags can be or'd together and are
|
||||
|
||||
DMA_MEMORY_MAP - request that the memory returned from
|
||||
dma_alloc_coherent() be directly writeable.
|
||||
dma_alloc_coherent() be directly writable.
|
||||
|
||||
DMA_MEMORY_IO - request that the memory returned from
|
||||
dma_alloc_coherent() be addressable using read/write/memcpy_toio etc.
|
||||
|
@ -110,7 +110,7 @@ lock.
|
||||
|
||||
Once the DMA transfer is finished (or timed out) you should disable
|
||||
the channel again. You should also check get_dma_residue() to make
|
||||
sure that all data has been transfered.
|
||||
sure that all data has been transferred.
|
||||
|
||||
Example:
|
||||
|
||||
|
@ -107,7 +107,7 @@ The query is performed via a call to pci_set_dma_mask():
|
||||
|
||||
int pci_set_dma_mask(struct pci_dev *pdev, u64 device_mask);
|
||||
|
||||
The query for consistent allocations is performed via a a call to
|
||||
The query for consistent allocations is performed via a call to
|
||||
pci_set_consistent_dma_mask():
|
||||
|
||||
int pci_set_consistent_dma_mask(struct pci_dev *pdev, u64 device_mask);
|
||||
@ -117,7 +117,7 @@ device_mask is a bit mask describing which bits of a PCI address your
|
||||
device supports. It returns zero if your card can perform DMA
|
||||
properly on the machine given the address mask you provided.
|
||||
|
||||
If it returns non-zero, your device can not perform DMA properly on
|
||||
If it returns non-zero, your device cannot perform DMA properly on
|
||||
this platform, and attempting to do so will result in undefined
|
||||
behavior. You must either use a different mask, or not use DMA.
|
||||
|
||||
|
@ -9,7 +9,7 @@
|
||||
DOCBOOKS := wanbook.xml z8530book.xml mcabook.xml videobook.xml \
|
||||
kernel-hacking.xml kernel-locking.xml deviceiobook.xml \
|
||||
procfs-guide.xml writing_usb_driver.xml \
|
||||
kernel-api.xml journal-api.xml lsm.xml usb.xml \
|
||||
kernel-api.xml filesystems.xml lsm.xml usb.xml \
|
||||
gadget.xml libata.xml mtdnand.xml librs.xml rapidio.xml \
|
||||
genericirq.xml
|
||||
|
||||
@ -190,9 +190,13 @@ quiet_cmd_fig2png = FIG2PNG $@
|
||||
###
|
||||
# Help targets as used by the top-level makefile
|
||||
dochelp:
|
||||
@echo ' Linux kernel internal documentation in different formats:'
|
||||
@echo ' xmldocs (XML DocBook), psdocs (Postscript), pdfdocs (PDF)'
|
||||
@echo ' htmldocs (HTML), mandocs (man pages, use installmandocs to install)'
|
||||
@echo ' Linux kernel internal documentation in different formats:'
|
||||
@echo ' htmldocs - HTML'
|
||||
@echo ' installmandocs - install man pages generated by mandocs'
|
||||
@echo ' mandocs - man pages'
|
||||
@echo ' pdfdocs - PDF'
|
||||
@echo ' psdocs - Postscript'
|
||||
@echo ' xmldocs - XML DocBook'
|
||||
|
||||
###
|
||||
# Temporary files left by various tools
|
||||
|
@ -2,9 +2,106 @@
|
||||
<!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="LinuxJBDAPI">
|
||||
<book id="Linux-filesystems-API">
|
||||
<bookinfo>
|
||||
<title>Linux Filesystems API</title>
|
||||
|
||||
<legalnotice>
|
||||
<para>
|
||||
This documentation is free software; you can redistribute
|
||||
it and/or modify it under the terms of the GNU General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later
|
||||
version.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
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.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
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., 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>
|
||||
</bookinfo>
|
||||
|
||||
<toc></toc>
|
||||
|
||||
<chapter id="vfs">
|
||||
<title>The Linux VFS</title>
|
||||
<sect1><title>The Filesystem types</title>
|
||||
!Iinclude/linux/fs.h
|
||||
</sect1>
|
||||
<sect1><title>The Directory Cache</title>
|
||||
!Efs/dcache.c
|
||||
!Iinclude/linux/dcache.h
|
||||
</sect1>
|
||||
<sect1><title>Inode Handling</title>
|
||||
!Efs/inode.c
|
||||
!Efs/bad_inode.c
|
||||
</sect1>
|
||||
<sect1><title>Registration and Superblocks</title>
|
||||
!Efs/super.c
|
||||
</sect1>
|
||||
<sect1><title>File Locks</title>
|
||||
!Efs/locks.c
|
||||
!Ifs/locks.c
|
||||
</sect1>
|
||||
<sect1><title>Other Functions</title>
|
||||
!Efs/mpage.c
|
||||
!Efs/namei.c
|
||||
!Efs/buffer.c
|
||||
!Efs/bio.c
|
||||
!Efs/seq_file.c
|
||||
!Efs/filesystems.c
|
||||
!Efs/fs-writeback.c
|
||||
!Efs/block_dev.c
|
||||
</sect1>
|
||||
</chapter>
|
||||
|
||||
<chapter id="proc">
|
||||
<title>The proc filesystem</title>
|
||||
|
||||
<sect1><title>sysctl interface</title>
|
||||
!Ekernel/sysctl.c
|
||||
</sect1>
|
||||
|
||||
<sect1><title>proc filesystem interface</title>
|
||||
!Ifs/proc/base.c
|
||||
</sect1>
|
||||
</chapter>
|
||||
|
||||
<chapter id="sysfs">
|
||||
<title>The Filesystem for Exporting Kernel Objects</title>
|
||||
!Efs/sysfs/file.c
|
||||
!Efs/sysfs/symlink.c
|
||||
!Efs/sysfs/bin.c
|
||||
</chapter>
|
||||
|
||||
<chapter id="debugfs">
|
||||
<title>The debugfs filesystem</title>
|
||||
|
||||
<sect1><title>debugfs interface</title>
|
||||
!Efs/debugfs/inode.c
|
||||
!Efs/debugfs/file.c
|
||||
</sect1>
|
||||
</chapter>
|
||||
|
||||
<chapter id="LinuxJDBAPI">
|
||||
<chapterinfo>
|
||||
<title>The Linux Journalling API</title>
|
||||
|
||||
<authorgroup>
|
||||
<author>
|
||||
<firstname>Roger</firstname>
|
||||
@ -14,9 +111,9 @@
|
||||
<email>rgammans@computer-surgery.co.uk</email>
|
||||
</address>
|
||||
</affiliation>
|
||||
</author>
|
||||
</author>
|
||||
</authorgroup>
|
||||
|
||||
|
||||
<authorgroup>
|
||||
<author>
|
||||
<firstname>Stephen</firstname>
|
||||
@ -33,50 +130,21 @@
|
||||
<year>2002</year>
|
||||
<holder>Roger Gammans</holder>
|
||||
</copyright>
|
||||
</chapterinfo>
|
||||
|
||||
<legalnotice>
|
||||
<para>
|
||||
This documentation is free software; you can redistribute
|
||||
it and/or modify it under the terms of the GNU General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later
|
||||
version.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
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.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
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., 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>
|
||||
</bookinfo>
|
||||
<title>The Linux Journalling API</title>
|
||||
|
||||
<toc></toc>
|
||||
|
||||
<chapter id="Overview">
|
||||
<sect1>
|
||||
<title>Overview</title>
|
||||
<sect1>
|
||||
<sect2>
|
||||
<title>Details</title>
|
||||
<para>
|
||||
The journalling layer is easy to use. You need to
|
||||
The journalling layer is easy to use. You need to
|
||||
first of all create a journal_t data structure. There are
|
||||
two calls to do this dependent on how you decide to allocate the physical
|
||||
media on which the journal resides. The journal_init_inode() call
|
||||
media on which the journal resides. The journal_init_inode() call
|
||||
is for journals stored in filesystem inodes, or the journal_init_dev()
|
||||
call can be use for journal stored on a raw device (in a continuous range
|
||||
call can be use for journal stored on a raw device (in a continuous range
|
||||
of blocks). A journal_t is a typedef for a struct pointer, so when
|
||||
you are finally finished make sure you call journal_destroy() on it
|
||||
to free up any used kernel memory.
|
||||
@ -91,27 +159,26 @@ need to call journal_create().
|
||||
<para>
|
||||
Most of the time however your journal file will already have been created, but
|
||||
before you load it you must call journal_wipe() to empty the journal file.
|
||||
Hang on, you say , what if the filesystem wasn't cleanly umount()'d . Well, it is the
|
||||
Hang on, you say , what if the filesystem wasn't cleanly umount()'d . Well, it is the
|
||||
job of the client file system to detect this and skip the call to journal_wipe().
|
||||
</para>
|
||||
|
||||
<para>
|
||||
In either case the next call should be to journal_load() which prepares the
|
||||
journal file for use. Note that journal_wipe(..,0) calls journal_skip_recovery()
|
||||
journal file for use. Note that journal_wipe(..,0) calls journal_skip_recovery()
|
||||
for you if it detects any outstanding transactions in the journal and similarly
|
||||
journal_load() will call journal_recover() if necessary.
|
||||
I would advise reading fs/ext3/super.c for examples on this stage.
|
||||
[RGG: Why is the journal_wipe() call necessary - doesn't this needlessly
|
||||
complicate the API. Or isn't a good idea for the journal layer to hide
|
||||
[RGG: Why is the journal_wipe() call necessary - doesn't this needlessly
|
||||
complicate the API. Or isn't a good idea for the journal layer to hide
|
||||
dirty mounts from the client fs]
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Now you can go ahead and start modifying the underlying
|
||||
Now you can go ahead and start modifying the underlying
|
||||
filesystem. Almost.
|
||||
</para>
|
||||
|
||||
|
||||
<para>
|
||||
|
||||
You still need to actually journal your filesystem changes, this
|
||||
@ -138,10 +205,10 @@ individual buffers (blocks). Before you start to modify a buffer you
|
||||
need to call journal_get_{create,write,undo}_access() as appropriate,
|
||||
this allows the journalling layer to copy the unmodified data if it
|
||||
needs to. After all the buffer may be part of a previously uncommitted
|
||||
transaction.
|
||||
transaction.
|
||||
At this point you are at last ready to modify a buffer, and once
|
||||
you are have done so you need to call journal_dirty_{meta,}data().
|
||||
Or if you've asked for access to a buffer you now know is now longer
|
||||
Or if you've asked for access to a buffer you now know is now longer
|
||||
required to be pushed back on the device you can call journal_forget()
|
||||
in much the same way as you might have used bforget() in the past.
|
||||
</para>
|
||||
@ -156,7 +223,6 @@ Then at umount time , in your put_super() (2.4) or write_super() (2.5)
|
||||
you can then call journal_destroy() to clean up your in-core journal object.
|
||||
</para>
|
||||
|
||||
|
||||
<para>
|
||||
Unfortunately there a couple of ways the journal layer can cause a deadlock.
|
||||
The first thing to note is that each task can only have
|
||||
@ -164,19 +230,19 @@ a single outstanding transaction at any one time, remember nothing
|
||||
commits until the outermost journal_stop(). This means
|
||||
you must complete the transaction at the end of each file/inode/address
|
||||
etc. operation you perform, so that the journalling system isn't re-entered
|
||||
on another journal. Since transactions can't be nested/batched
|
||||
on another journal. Since transactions can't be nested/batched
|
||||
across differing journals, and another filesystem other than
|
||||
yours (say ext3) may be modified in a later syscall.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The second case to bear in mind is that journal_start() can
|
||||
block if there isn't enough space in the journal for your transaction
|
||||
The second case to bear in mind is that journal_start() can
|
||||
block if there isn't enough space in the journal for your transaction
|
||||
(based on the passed nblocks param) - when it blocks it merely(!) needs to
|
||||
wait for transactions to complete and be committed from other tasks,
|
||||
so essentially we are waiting for journal_stop(). So to avoid
|
||||
wait for transactions to complete and be committed from other tasks,
|
||||
so essentially we are waiting for journal_stop(). So to avoid
|
||||
deadlocks you must treat journal_start/stop() as if they
|
||||
were semaphores and include them in your semaphore ordering rules to prevent
|
||||
were semaphores and include them in your semaphore ordering rules to prevent
|
||||
deadlocks. Note that journal_extend() has similar blocking behaviour to
|
||||
journal_start() so you can deadlock here just as easily as on journal_start().
|
||||
</para>
|
||||
@ -184,7 +250,7 @@ journal_start() so you can deadlock here just as easily as on journal_start().
|
||||
<para>
|
||||
Try to reserve the right number of blocks the first time. ;-). This will
|
||||
be the maximum number of blocks you are going to touch in this transaction.
|
||||
I advise having a look at at least ext3_jbd.h to see the basis on which
|
||||
I advise having a look at at least ext3_jbd.h to see the basis on which
|
||||
ext3 uses to make these decisions.
|
||||
</para>
|
||||
|
||||
@ -193,13 +259,13 @@ Another wriggle to watch out for is your on-disk block allocation strategy.
|
||||
why? Because, if you undo a delete, you need to ensure you haven't reused any
|
||||
of the freed blocks in a later transaction. One simple way of doing this
|
||||
is make sure any blocks you allocate only have checkpointed transactions
|
||||
listed against them. Ext3 does this in ext3_test_allocatable().
|
||||
listed against them. Ext3 does this in ext3_test_allocatable().
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Lock is also providing through journal_{un,}lock_updates(),
|
||||
ext3 uses this when it wants a window with a clean and stable fs for a moment.
|
||||
eg.
|
||||
eg.
|
||||
</para>
|
||||
|
||||
<programlisting>
|
||||
@ -230,19 +296,19 @@ extend it like this:-
|
||||
struct journal_callback for_jbd;
|
||||
// Stuff for myfs allocated together.
|
||||
myfs_inode* i_commited;
|
||||
|
||||
|
||||
}
|
||||
</programlisting>
|
||||
|
||||
<para>
|
||||
this would be useful if you needed to know when data was committed to a
|
||||
this would be useful if you needed to know when data was committed to a
|
||||
particular inode.
|
||||
</para>
|
||||
|
||||
</sect1>
|
||||
</sect2>
|
||||
|
||||
<sect1>
|
||||
<title>Summary</title>
|
||||
<sect2>
|
||||
<title>Summary</title>
|
||||
<para>
|
||||
Using the journal is a matter of wrapping the different context changes,
|
||||
being each mount, each modification (transaction) and each changed buffer
|
||||
@ -260,15 +326,15 @@ an example.
|
||||
if (clean) journal_wipe();
|
||||
journal_load();
|
||||
|
||||
foreach(transaction) { /*transactions must be
|
||||
foreach(transaction) { /*transactions must be
|
||||
completed before
|
||||
a syscall returns to
|
||||
a syscall returns to
|
||||
userspace*/
|
||||
|
||||
handle_t * xct=journal_start(my_jnrl);
|
||||
foreach(bh) {
|
||||
journal_get_{create,write,undo}_access(xact,bh);
|
||||
if ( myfs_modify(bh) ) { /* returns true
|
||||
if ( myfs_modify(bh) ) { /* returns true
|
||||
if makes changes */
|
||||
journal_dirty_{meta,}data(xact,bh);
|
||||
} else {
|
||||
@ -279,55 +345,57 @@ an example.
|
||||
}
|
||||
journal_destroy(my_jrnl);
|
||||
</programlisting>
|
||||
</sect1>
|
||||
</sect2>
|
||||
|
||||
</chapter>
|
||||
</sect1>
|
||||
|
||||
<chapter id="adt">
|
||||
<sect1>
|
||||
<title>Data Types</title>
|
||||
<para>
|
||||
<para>
|
||||
The journalling layer uses typedefs to 'hide' the concrete definitions
|
||||
of the structures used. As a client of the JBD layer you can
|
||||
just rely on the using the pointer as a magic cookie of some sort.
|
||||
|
||||
Obviously the hiding is not enforced as this is 'C'.
|
||||
</para>
|
||||
<sect1><title>Structures</title>
|
||||
!Iinclude/linux/jbd.h
|
||||
</sect1>
|
||||
</chapter>
|
||||
|
||||
<chapter id="calls">
|
||||
Obviously the hiding is not enforced as this is 'C'.
|
||||
</para>
|
||||
<sect2><title>Structures</title>
|
||||
!Iinclude/linux/jbd.h
|
||||
</sect2>
|
||||
</sect1>
|
||||
|
||||
<sect1>
|
||||
<title>Functions</title>
|
||||
<para>
|
||||
<para>
|
||||
The functions here are split into two groups those that
|
||||
affect a journal as a whole, and those which are used to
|
||||
manage transactions
|
||||
</para>
|
||||
<sect1><title>Journal Level</title>
|
||||
</para>
|
||||
<sect2><title>Journal Level</title>
|
||||
!Efs/jbd/journal.c
|
||||
!Ifs/jbd/recovery.c
|
||||
</sect1>
|
||||
<sect1><title>Transasction Level</title>
|
||||
!Efs/jbd/transaction.c
|
||||
</sect1>
|
||||
</chapter>
|
||||
<chapter>
|
||||
</sect2>
|
||||
<sect2><title>Transasction Level</title>
|
||||
!Efs/jbd/transaction.c
|
||||
</sect2>
|
||||
</sect1>
|
||||
<sect1>
|
||||
<title>See also</title>
|
||||
<para>
|
||||
<citation>
|
||||
<citation>
|
||||
<ulink url="ftp://ftp.uk.linux.org/pub/linux/sct/fs/jfs/journal-design.ps.gz">
|
||||
Journaling the Linux ext2fs Filesystem,LinuxExpo 98, Stephen Tweedie
|
||||
Journaling the Linux ext2fs Filesystem, LinuxExpo 98, Stephen Tweedie
|
||||
</ulink>
|
||||
</citation>
|
||||
</para>
|
||||
<para>
|
||||
</citation>
|
||||
</para>
|
||||
<para>
|
||||
<citation>
|
||||
<ulink url="http://olstrans.sourceforge.net/release/OLS2000-ext3/OLS2000-ext3.html">
|
||||
Ext3 Journalling FileSystem , OLS 2000, Dr. Stephen Tweedie
|
||||
Ext3 Journalling FileSystem, OLS 2000, Dr. Stephen Tweedie
|
||||
</ulink>
|
||||
</citation>
|
||||
</para>
|
||||
</chapter>
|
||||
</para>
|
||||
</sect1>
|
||||
|
||||
</chapter>
|
||||
|
||||
</book>
|
@ -158,6 +158,7 @@ X!Ilib/string.c
|
||||
!Emm/filemap.c
|
||||
!Emm/memory.c
|
||||
!Emm/vmalloc.c
|
||||
!Imm/page_alloc.c
|
||||
!Emm/mempool.c
|
||||
!Emm/page-writeback.c
|
||||
!Emm/truncate.c
|
||||
@ -181,56 +182,19 @@ X!Ilib/string.c
|
||||
</sect1>
|
||||
</chapter>
|
||||
|
||||
<chapter id="proc">
|
||||
<title>The proc filesystem</title>
|
||||
|
||||
<sect1><title>sysctl interface</title>
|
||||
!Ekernel/sysctl.c
|
||||
</sect1>
|
||||
<chapter id="relayfs">
|
||||
<title>relay interface support</title>
|
||||
|
||||
<sect1><title>proc filesystem interface</title>
|
||||
!Ifs/proc/base.c
|
||||
</sect1>
|
||||
</chapter>
|
||||
<para>
|
||||
Relay interface support
|
||||
is designed to provide an efficient mechanism for tools and
|
||||
facilities to relay large amounts of data from kernel space to
|
||||
user space.
|
||||
</para>
|
||||
|
||||
<chapter id="debugfs">
|
||||
<title>The debugfs filesystem</title>
|
||||
|
||||
<sect1><title>debugfs interface</title>
|
||||
!Efs/debugfs/inode.c
|
||||
!Efs/debugfs/file.c
|
||||
</sect1>
|
||||
</chapter>
|
||||
|
||||
<chapter id="vfs">
|
||||
<title>The Linux VFS</title>
|
||||
<sect1><title>The Filesystem types</title>
|
||||
!Iinclude/linux/fs.h
|
||||
</sect1>
|
||||
<sect1><title>The Directory Cache</title>
|
||||
!Efs/dcache.c
|
||||
!Iinclude/linux/dcache.h
|
||||
</sect1>
|
||||
<sect1><title>Inode Handling</title>
|
||||
!Efs/inode.c
|
||||
!Efs/bad_inode.c
|
||||
</sect1>
|
||||
<sect1><title>Registration and Superblocks</title>
|
||||
!Efs/super.c
|
||||
</sect1>
|
||||
<sect1><title>File Locks</title>
|
||||
!Efs/locks.c
|
||||
!Ifs/locks.c
|
||||
</sect1>
|
||||
<sect1><title>Other Functions</title>
|
||||
!Efs/mpage.c
|
||||
!Efs/namei.c
|
||||
!Efs/buffer.c
|
||||
!Efs/bio.c
|
||||
!Efs/seq_file.c
|
||||
!Efs/filesystems.c
|
||||
!Efs/fs-writeback.c
|
||||
!Efs/block_dev.c
|
||||
<sect1><title>relay interface</title>
|
||||
!Ekernel/relay.c
|
||||
!Ikernel/relay.c
|
||||
</sect1>
|
||||
</chapter>
|
||||
|
||||
@ -302,8 +266,13 @@ X!Ekernel/module.c
|
||||
!Ekernel/irq/manage.c
|
||||
</sect1>
|
||||
|
||||
<sect1><title>DMA Channels</title>
|
||||
!Ekernel/dma.c
|
||||
</sect1>
|
||||
|
||||
<sect1><title>Resources Management</title>
|
||||
!Ikernel/resource.c
|
||||
!Ekernel/resource.c
|
||||
</sect1>
|
||||
|
||||
<sect1><title>MTRR Handling</title>
|
||||
@ -349,13 +318,6 @@ X!Earch/i386/kernel/mca.c
|
||||
</sect1>
|
||||
</chapter>
|
||||
|
||||
<chapter id="sysfs">
|
||||
<title>The Filesystem for Exporting Kernel Objects</title>
|
||||
!Efs/sysfs/file.c
|
||||
!Efs/sysfs/symlink.c
|
||||
!Efs/sysfs/bin.c
|
||||
</chapter>
|
||||
|
||||
<chapter id="security">
|
||||
<title>Security Framework</title>
|
||||
!Esecurity/security.c
|
||||
@ -386,6 +348,7 @@ X!Iinclude/linux/device.h
|
||||
-->
|
||||
!Edrivers/base/driver.c
|
||||
!Edrivers/base/core.c
|
||||
!Edrivers/base/class.c
|
||||
!Edrivers/base/firmware_class.c
|
||||
!Edrivers/base/transport_class.c
|
||||
!Edrivers/base/dmapool.c
|
||||
@ -437,6 +400,11 @@ X!Edrivers/pnp/system.c
|
||||
!Eblock/ll_rw_blk.c
|
||||
</chapter>
|
||||
|
||||
<chapter id="chrdev">
|
||||
<title>Char devices</title>
|
||||
!Efs/char_dev.c
|
||||
</chapter>
|
||||
|
||||
<chapter id="miscdev">
|
||||
<title>Miscellaneous Devices</title>
|
||||
!Edrivers/char/misc.c
|
||||
@ -450,9 +418,35 @@ X!Edrivers/pnp/system.c
|
||||
!Idrivers/parport/daisy.c
|
||||
</chapter>
|
||||
|
||||
<chapter id="viddev">
|
||||
<title>Video4Linux</title>
|
||||
!Edrivers/media/video/videodev.c
|
||||
<chapter id="message_devices">
|
||||
<title>Message-based devices</title>
|
||||
<sect1><title>Fusion message devices</title>
|
||||
!Edrivers/message/fusion/mptbase.c
|
||||
!Idrivers/message/fusion/mptbase.c
|
||||
!Edrivers/message/fusion/mptscsih.c
|
||||
!Idrivers/message/fusion/mptscsih.c
|
||||
!Idrivers/message/fusion/mptctl.c
|
||||
!Idrivers/message/fusion/mptspi.c
|
||||
!Idrivers/message/fusion/mptfc.c
|
||||
!Idrivers/message/fusion/mptlan.c
|
||||
</sect1>
|
||||
<sect1><title>I2O message devices</title>
|
||||
!Iinclude/linux/i2o.h
|
||||
!Idrivers/message/i2o/core.h
|
||||
!Edrivers/message/i2o/iop.c
|
||||
!Idrivers/message/i2o/iop.c
|
||||
!Idrivers/message/i2o/config-osm.c
|
||||
!Edrivers/message/i2o/exec-osm.c
|
||||
!Idrivers/message/i2o/exec-osm.c
|
||||
!Idrivers/message/i2o/bus-osm.c
|
||||
!Edrivers/message/i2o/device.c
|
||||
!Idrivers/message/i2o/device.c
|
||||
!Idrivers/message/i2o/driver.c
|
||||
!Idrivers/message/i2o/pci.c
|
||||
!Idrivers/message/i2o/i2o_block.c
|
||||
!Idrivers/message/i2o/i2o_scsi.c
|
||||
!Idrivers/message/i2o/i2o_proc.c
|
||||
</sect1>
|
||||
</chapter>
|
||||
|
||||
<chapter id="snddev">
|
||||
@ -565,4 +559,12 @@ X!Idrivers/video/console/fonts.c
|
||||
-->
|
||||
</sect1>
|
||||
</chapter>
|
||||
|
||||
<chapter id="input_subsystem">
|
||||
<title>Input Subsystem</title>
|
||||
!Iinclude/linux/input.h
|
||||
!Edrivers/input/input.c
|
||||
!Edrivers/input/ff-core.c
|
||||
!Edrivers/input/ff-memless.c
|
||||
</chapter>
|
||||
</book>
|
||||
|
@ -14,7 +14,7 @@
|
||||
</authorgroup>
|
||||
|
||||
<copyright>
|
||||
<year>2003-2005</year>
|
||||
<year>2003-2006</year>
|
||||
<holder>Jeff Garzik</holder>
|
||||
</copyright>
|
||||
|
||||
@ -1400,7 +1400,7 @@ and other resources, etc.
|
||||
<listitem>
|
||||
<para>
|
||||
When it's known that HBA is in ready state but ATA/ATAPI
|
||||
device in in unknown state, reset only device.
|
||||
device is in unknown state, reset only device.
|
||||
</para>
|
||||
</listitem>
|
||||
|
||||
|
@ -43,59 +43,52 @@
|
||||
|
||||
<para>A Universal Serial Bus (USB) is used to connect a host,
|
||||
such as a PC or workstation, to a number of peripheral
|
||||
devices. USB uses a tree structure, with the host at the
|
||||
devices. USB uses a tree structure, with the host as the
|
||||
root (the system's master), hubs as interior nodes, and
|
||||
peripheral devices as leaves (and slaves).
|
||||
peripherals as leaves (and slaves).
|
||||
Modern PCs support several such trees of USB devices, usually
|
||||
one USB 2.0 tree (480 Mbit/sec each) with
|
||||
a few USB 1.1 trees (12 Mbit/sec each) that are used when you
|
||||
connect a USB 1.1 device directly to the machine's "root hub".
|
||||
</para>
|
||||
|
||||
<para>That master/slave asymmetry was designed in part for
|
||||
ease of use. It is not physically possible to assemble
|
||||
(legal) USB cables incorrectly: all upstream "to-the-host"
|
||||
connectors are the rectangular type, matching the sockets on
|
||||
root hubs, and the downstream type are the squarish type
|
||||
(or they are built in to the peripheral).
|
||||
Software doesn't need to deal with distributed autoconfiguration
|
||||
since the pre-designated master node manages all that.
|
||||
At the electrical level, bus protocol overhead is reduced by
|
||||
eliminating arbitration and moving scheduling into host software.
|
||||
<para>That master/slave asymmetry was designed-in for a number of
|
||||
reasons, one being ease of use. It is not physically possible to
|
||||
assemble (legal) USB cables incorrectly: all upstream "to the host"
|
||||
connectors are the rectangular type (matching the sockets on
|
||||
root hubs), and all downstream connectors are the squarish type
|
||||
(or they are built into the peripheral).
|
||||
Also, the host software doesn't need to deal with distributed
|
||||
auto-configuration since the pre-designated master node manages all that.
|
||||
And finally, at the electrical level, bus protocol overhead is reduced by
|
||||
eliminating arbitration and moving scheduling into the host software.
|
||||
</para>
|
||||
|
||||
<para>USB 1.0 was announced in January 1996, and was revised
|
||||
<para>USB 1.0 was announced in January 1996 and was revised
|
||||
as USB 1.1 (with improvements in hub specification and
|
||||
support for interrupt-out transfers) in September 1998.
|
||||
USB 2.0 was released in April 2000, including high speed
|
||||
transfers and transaction translating hubs (used for USB 1.1
|
||||
USB 2.0 was released in April 2000, adding high-speed
|
||||
transfers and transaction-translating hubs (used for USB 1.1
|
||||
and 1.0 backward compatibility).
|
||||
</para>
|
||||
|
||||
<para>USB support was added to Linux early in the 2.2 kernel series
|
||||
shortly before the 2.3 development forked off. Updates
|
||||
from 2.3 were regularly folded back into 2.2 releases, bringing
|
||||
new features such as <filename>/sbin/hotplug</filename> support,
|
||||
more drivers, and more robustness.
|
||||
The 2.5 kernel series continued such improvements, and also
|
||||
worked on USB 2.0 support,
|
||||
higher performance,
|
||||
better consistency between host controller drivers,
|
||||
API simplification (to make bugs less likely),
|
||||
and providing internal "kerneldoc" documentation.
|
||||
<para>Kernel developers added USB support to Linux early in the 2.2 kernel
|
||||
series, shortly before 2.3 development forked. Updates from 2.3 were
|
||||
regularly folded back into 2.2 releases, which improved reliability and
|
||||
brought <filename>/sbin/hotplug</filename> support as well more drivers.
|
||||
Such improvements were continued in the 2.5 kernel series, where they added
|
||||
USB 2.0 support, improved performance, and made the host controller drivers
|
||||
(HCDs) more consistent. They also simplified the API (to make bugs less
|
||||
likely) and added internal "kerneldoc" documentation.
|
||||
</para>
|
||||
|
||||
<para>Linux can run inside USB devices as well as on
|
||||
the hosts that control the devices.
|
||||
Because the Linux 2.x USB support evolved to support mass market
|
||||
platforms such as Apple Macintosh or PC-compatible systems,
|
||||
it didn't address design concerns for those types of USB systems.
|
||||
So it can't be used inside mass-market PDAs, or other peripherals.
|
||||
USB device drivers running inside those Linux peripherals
|
||||
But USB device drivers running inside those peripherals
|
||||
don't do the same things as the ones running inside hosts,
|
||||
and so they've been given a different name:
|
||||
they're called <emphasis>gadget drivers</emphasis>.
|
||||
This document does not present gadget drivers.
|
||||
so they've been given a different name:
|
||||
<emphasis>gadget drivers</emphasis>.
|
||||
This document does not cover gadget drivers.
|
||||
</para>
|
||||
|
||||
</chapter>
|
||||
@ -103,17 +96,14 @@
|
||||
<chapter id="host">
|
||||
<title>USB Host-Side API Model</title>
|
||||
|
||||
<para>Within the kernel,
|
||||
host-side drivers for USB devices talk to the "usbcore" APIs.
|
||||
There are two types of public "usbcore" APIs, targetted at two different
|
||||
layers of USB driver. Those are
|
||||
<emphasis>general purpose</emphasis> drivers, exposed through
|
||||
driver frameworks such as block, character, or network devices;
|
||||
and drivers that are <emphasis>part of the core</emphasis>,
|
||||
which are involved in managing a USB bus.
|
||||
Such core drivers include the <emphasis>hub</emphasis> driver,
|
||||
which manages trees of USB devices, and several different kinds
|
||||
of <emphasis>host controller driver (HCD)</emphasis>,
|
||||
<para>Host-side drivers for USB devices talk to the "usbcore" APIs.
|
||||
There are two. One is intended for
|
||||
<emphasis>general-purpose</emphasis> drivers (exposed through
|
||||
driver frameworks), and the other is for drivers that are
|
||||
<emphasis>part of the core</emphasis>.
|
||||
Such core drivers include the <emphasis>hub</emphasis> driver
|
||||
(which manages trees of USB devices) and several different kinds
|
||||
of <emphasis>host controller drivers</emphasis>,
|
||||
which control individual busses.
|
||||
</para>
|
||||
|
||||
@ -122,21 +112,21 @@
|
||||
|
||||
<itemizedlist>
|
||||
|
||||
<listitem><para>USB supports four kinds of data transfer
|
||||
(control, bulk, interrupt, and isochronous). Two transfer
|
||||
types use bandwidth as it's available (control and bulk),
|
||||
while the other two types of transfer (interrupt and isochronous)
|
||||
<listitem><para>USB supports four kinds of data transfers
|
||||
(control, bulk, interrupt, and isochronous). Two of them (control
|
||||
and bulk) use bandwidth as it's available,
|
||||
while the other two (interrupt and isochronous)
|
||||
are scheduled to provide guaranteed bandwidth.
|
||||
</para></listitem>
|
||||
|
||||
<listitem><para>The device description model includes one or more
|
||||
"configurations" per device, only one of which is active at a time.
|
||||
Devices that are capable of high speed operation must also support
|
||||
full speed configurations, along with a way to ask about the
|
||||
"other speed" configurations that might be used.
|
||||
Devices that are capable of high-speed operation must also support
|
||||
full-speed configurations, along with a way to ask about the
|
||||
"other speed" configurations which might be used.
|
||||
</para></listitem>
|
||||
|
||||
<listitem><para>Configurations have one or more "interface", each
|
||||
<listitem><para>Configurations have one or more "interfaces", each
|
||||
of which may have "alternate settings". Interfaces may be
|
||||
standardized by USB "Class" specifications, or may be specific to
|
||||
a vendor or device.</para>
|
||||
@ -162,7 +152,7 @@
|
||||
</para></listitem>
|
||||
|
||||
<listitem><para>The Linux USB API supports synchronous calls for
|
||||
control and bulk messaging.
|
||||
control and bulk messages.
|
||||
It also supports asynchnous calls for all kinds of data transfer,
|
||||
using request structures called "URBs" (USB Request Blocks).
|
||||
</para></listitem>
|
||||
@ -324,8 +314,7 @@
|
||||
<emphasis>usbdevfs</emphasis> although it wasn't solving what
|
||||
<emphasis>devfs</emphasis> was.
|
||||
Every USB device will appear in usbfs, regardless of whether or
|
||||
not it has a kernel driver; but only devices with kernel drivers
|
||||
show up in devfs.
|
||||
not it has a kernel driver.
|
||||
</para>
|
||||
|
||||
<sect1>
|
||||
@ -463,14 +452,25 @@
|
||||
file in your Linux kernel sources.
|
||||
</para>
|
||||
|
||||
<para>Otherwise the main use for this file from programs
|
||||
is to poll() it to get notifications of usb devices
|
||||
as they're plugged or unplugged.
|
||||
To see what changed, you'd need to read the file and
|
||||
compare "before" and "after" contents, scan the filesystem,
|
||||
or see its hotplug event.
|
||||
</para>
|
||||
<para>This file, in combination with the poll() system call, can
|
||||
also be used to detect when devices are added or removed:
|
||||
<programlisting>int fd;
|
||||
struct pollfd pfd;
|
||||
|
||||
fd = open("/proc/bus/usb/devices", O_RDONLY);
|
||||
pfd = { fd, POLLIN, 0 };
|
||||
for (;;) {
|
||||
/* The first time through, this call will return immediately. */
|
||||
poll(&pfd, 1, -1);
|
||||
|
||||
/* To see what's changed, compare the file's previous and current
|
||||
contents or scan the filesystem. (Scanning is more precise.) */
|
||||
}</programlisting>
|
||||
Note that this behavior is intended to be used for informational
|
||||
and debug purposes. It would be more appropriate to use programs
|
||||
such as udev or HAL to initialize a device or start a user-mode
|
||||
helper program, for instance.
|
||||
</para>
|
||||
</sect1>
|
||||
|
||||
<sect1>
|
||||
@ -740,7 +740,7 @@ usbdev_ioctl (int fd, int ifno, unsigned request, void *param)
|
||||
<title>Synchronous I/O Support</title>
|
||||
|
||||
<para>Synchronous requests involve the kernel blocking
|
||||
until until the user mode request completes, either by
|
||||
until the user mode request completes, either by
|
||||
finishing successfully or by reporting an error.
|
||||
In most cases this is the simplest way to use usbfs,
|
||||
although as noted above it does prevent performing I/O
|
||||
|
@ -224,13 +224,8 @@ static int skel_probe(struct usb_interface *interface,
|
||||
Conversely, when the device is removed from the USB bus, the disconnect
|
||||
function is called with the device pointer. The driver needs to clean any
|
||||
private data that has been allocated at this time and to shut down any
|
||||
pending urbs that are in the USB system. The driver also unregisters
|
||||
itself from the devfs subsystem with the call:
|
||||
pending urbs that are in the USB system.
|
||||
</para>
|
||||
<programlisting>
|
||||
/* remove our devfs node */
|
||||
devfs_unregister(skel->devfs);
|
||||
</programlisting>
|
||||
<para>
|
||||
Now that the device is plugged into the system and the driver is bound to
|
||||
the device, any of the functions in the file_operations structure that
|
||||
@ -350,8 +345,7 @@ static inline void skel_delete (struct usb_skel *dev)
|
||||
usb_buffer_free (dev->udev, dev->bulk_out_size,
|
||||
dev->bulk_out_buffer,
|
||||
dev->write_urb->transfer_dma);
|
||||
if (dev->write_urb != NULL)
|
||||
usb_free_urb (dev->write_urb);
|
||||
usb_free_urb (dev->write_urb);
|
||||
kfree (dev);
|
||||
}
|
||||
</programlisting>
|
||||
|
@ -375,6 +375,46 @@ of information is needed by the kernel developers to help track down the
|
||||
problem.
|
||||
|
||||
|
||||
Managing bug reports
|
||||
--------------------
|
||||
|
||||
One of the best ways to put into practice your hacking skills is by fixing
|
||||
bugs reported by other people. Not only you will help to make the kernel
|
||||
more stable, you'll learn to fix real world problems and you will improve
|
||||
your skills, and other developers will be aware of your presence. Fixing
|
||||
bugs is one of the best ways to earn merit amongst the developers, because
|
||||
not many people like wasting time fixing other people's bugs.
|
||||
|
||||
To work in the already reported bug reports, go to http://bugzilla.kernel.org.
|
||||
If you want to be advised of the future bug reports, you can subscribe to the
|
||||
bugme-new mailing list (only new bug reports are mailed here) or to the
|
||||
bugme-janitor mailing list (every change in the bugzilla is mailed here)
|
||||
|
||||
http://lists.osdl.org/mailman/listinfo/bugme-new
|
||||
http://lists.osdl.org/mailman/listinfo/bugme-janitors
|
||||
|
||||
|
||||
|
||||
Managing bug reports
|
||||
--------------------
|
||||
|
||||
One of the best ways to put into practice your hacking skills is by fixing
|
||||
bugs reported by other people. Not only you will help to make the kernel
|
||||
more stable, you'll learn to fix real world problems and you will improve
|
||||
your skills, and other developers will be aware of your presence. Fixing
|
||||
bugs is one of the best ways to get merits among other developers, because
|
||||
not many people like wasting time fixing other people's bugs.
|
||||
|
||||
To work in the already reported bug reports, go to http://bugzilla.kernel.org.
|
||||
If you want to be advised of the future bug reports, you can subscribe to the
|
||||
bugme-new mailing list (only new bug reports are mailed here) or to the
|
||||
bugme-janitor mailing list (every change in the bugzilla is mailed here)
|
||||
|
||||
http://lists.osdl.org/mailman/listinfo/bugme-new
|
||||
http://lists.osdl.org/mailman/listinfo/bugme-janitors
|
||||
|
||||
|
||||
|
||||
Mailing lists
|
||||
-------------
|
||||
|
||||
|
@ -326,9 +326,12 @@ for events, they will all receive all events that come in.
|
||||
|
||||
For receiving commands, you have to individually register commands you
|
||||
want to receive. Call ipmi_register_for_cmd() and supply the netfn
|
||||
and command name for each command you want to receive. Only one user
|
||||
may be registered for each netfn/cmd, but different users may register
|
||||
for different commands.
|
||||
and command name for each command you want to receive. You also
|
||||
specify a bitmask of the channels you want to receive the command from
|
||||
(or use IPMI_CHAN_ALL for all channels if you don't care). Only one
|
||||
user may be registered for each netfn/cmd/channel, but different users
|
||||
may register for different commands, or the same command if the
|
||||
channel bitmasks do not overlap.
|
||||
|
||||
From userland, equivalent IOCTLs are provided to do these functions.
|
||||
|
||||
@ -361,6 +364,8 @@ You can change this at module load time (for a module) with:
|
||||
regspacings=<sp1>,<sp2>,... regsizes=<size1>,<size2>,...
|
||||
regshifts=<shift1>,<shift2>,...
|
||||
slave_addrs=<addr1>,<addr2>,...
|
||||
force_kipmid=<enable1>,<enable2>,...
|
||||
unload_when_empty=[0|1]
|
||||
|
||||
Each of these except si_trydefaults is a list, the first item for the
|
||||
first interface, second item for the second interface, etc.
|
||||
@ -406,7 +411,18 @@ The slave_addrs specifies the IPMI address of the local BMC. This is
|
||||
usually 0x20 and the driver defaults to that, but in case it's not, it
|
||||
can be specified when the driver starts up.
|
||||
|
||||
When compiled into the kernel, the addresses can be specified on the
|
||||
The force_ipmid parameter forcefully enables (if set to 1) or disables
|
||||
(if set to 0) the kernel IPMI daemon. Normally this is auto-detected
|
||||
by the driver, but systems with broken interrupts might need an enable,
|
||||
or users that don't want the daemon (don't need the performance, don't
|
||||
want the CPU hit) can disable it.
|
||||
|
||||
If unload_when_empty is set to 1, the driver will be unloaded if it
|
||||
doesn't find any interfaces or all the interfaces fail to work. The
|
||||
default is one. Setting to 0 is useful with the hotmod, but is
|
||||
obviously only useful for modules.
|
||||
|
||||
When compiled into the kernel, the parameters can be specified on the
|
||||
kernel command line as:
|
||||
|
||||
ipmi_si.type=<type1>,<type2>...
|
||||
@ -416,6 +432,7 @@ kernel command line as:
|
||||
ipmi_si.regsizes=<size1>,<size2>,...
|
||||
ipmi_si.regshifts=<shift1>,<shift2>,...
|
||||
ipmi_si.slave_addrs=<addr1>,<addr2>,...
|
||||
ipmi_si.force_kipmid=<enable1>,<enable2>,...
|
||||
|
||||
It works the same as the module parameters of the same names.
|
||||
|
||||
@ -430,6 +447,25 @@ have high-res timers enabled in the kernel and you don't have
|
||||
interrupts enabled, the driver will run VERY slowly. Don't blame me,
|
||||
these interfaces suck.
|
||||
|
||||
The driver supports a hot add and remove of interfaces. This way,
|
||||
interfaces can be added or removed after the kernel is up and running.
|
||||
This is done using /sys/modules/ipmi_si/hotmod, which is a write-only
|
||||
parameter. You write a string to this interface. The string has the
|
||||
format:
|
||||
<op1>[:op2[:op3...]]
|
||||
The "op"s are:
|
||||
add|remove,kcs|bt|smic,mem|i/o,<address>[,<opt1>[,<opt2>[,...]]]
|
||||
You can specify more than one interface on the line. The "opt"s are:
|
||||
rsp=<regspacing>
|
||||
rsi=<regsize>
|
||||
rsh=<regshift>
|
||||
irq=<irq>
|
||||
ipmb=<ipmb slave addr>
|
||||
and these have the same meanings as discussed above. Note that you
|
||||
can also use this on the kernel command line for a more compact format
|
||||
for specifying an interface. Note that when removing an interface,
|
||||
only the first three parameters (si type, address type, and address)
|
||||
are used for the comparison. Any options are ignored for removing.
|
||||
|
||||
The SMBus Driver
|
||||
----------------
|
||||
@ -457,12 +493,12 @@ BMCs specified on the smb_addr line will be detected.
|
||||
Setting smb_dbg_probe to 1 will enable debugging of the probing and
|
||||
detection process for BMCs on the SMBusses.
|
||||
|
||||
Discovering the IPMI compilant BMC on the SMBus can cause devices
|
||||
Discovering the IPMI compliant BMC on the SMBus can cause devices
|
||||
on the I2C bus to fail. The SMBus driver writes a "Get Device ID" IPMI
|
||||
message as a block write to the I2C bus and waits for a response.
|
||||
This action can be detrimental to some I2C devices. It is highly recommended
|
||||
that the known I2c address be given to the SMBus driver in the smb_addr
|
||||
parameter. The default adrress range will not be used when a smb_addr
|
||||
parameter. The default address range will not be used when a smb_addr
|
||||
parameter is provided.
|
||||
|
||||
When compiled into the kernel, the addresses can be specified on the
|
||||
@ -491,7 +527,10 @@ used to control it:
|
||||
|
||||
modprobe ipmi_watchdog timeout=<t> pretimeout=<t> action=<action type>
|
||||
preaction=<preaction type> preop=<preop type> start_now=x
|
||||
nowayout=x
|
||||
nowayout=x ifnum_to_use=n
|
||||
|
||||
ifnum_to_use specifies which interface the watchdog timer should use.
|
||||
The default is -1, which means to pick the first one registered.
|
||||
|
||||
The timeout is the number of seconds to the action, and the pretimeout
|
||||
is the amount of seconds before the reset that the pre-timeout panic will
|
||||
@ -613,5 +652,9 @@ command line. The parameter is also available via the proc filesystem
|
||||
in /proc/sys/dev/ipmi/poweroff_powercycle. Note that if the system
|
||||
does not support power cycling, it will always do the power off.
|
||||
|
||||
The "ifnum_to_use" parameter specifies which interface the poweroff
|
||||
code should use. The default is -1, which means to pick the first one
|
||||
registered.
|
||||
|
||||
Note that if you have ACPI enabled, the system will prefer using ACPI to
|
||||
power off.
|
||||
|
@ -219,7 +219,7 @@ into the field vector of each element contained in a second argument.
|
||||
Note that the pre-assigned IOAPIC dev->irq is valid only if the device
|
||||
operates in PIN-IRQ assertion mode. In MSI-X mode, any attempt at
|
||||
using dev->irq by the device driver to request for interrupt service
|
||||
may result unpredictabe behavior.
|
||||
may result in unpredictable behavior.
|
||||
|
||||
For each MSI-X vector granted, a device driver is responsible for calling
|
||||
other functions like request_irq(), enable_irq(), etc. to enable
|
||||
@ -267,7 +267,7 @@ y = The number of MSI capable devices populated in the system.
|
||||
vector reserved to avoid the case where some MSI-X capable
|
||||
drivers may attempt to claim all available vector resources.
|
||||
|
||||
z = The number of MSI-X capable devices pupulated in the system.
|
||||
z = The number of MSI-X capable devices populated in the system.
|
||||
This policy ensures that maximum (x - y) is distributed
|
||||
evenly among MSI-X capable devices.
|
||||
|
||||
@ -470,7 +470,68 @@ LOC: 324553 325068
|
||||
ERR: 0
|
||||
MIS: 0
|
||||
|
||||
6. FAQ
|
||||
6. MSI quirks
|
||||
|
||||
Several PCI chipsets or devices are known to not support MSI.
|
||||
The PCI stack provides 3 possible levels of MSI disabling:
|
||||
* on a single device
|
||||
* on all devices behind a specific bridge
|
||||
* globally
|
||||
|
||||
6.1. Disabling MSI on a single device
|
||||
|
||||
Under some circumstances, it might be required to disable MSI on a
|
||||
single device, It may be achived by either not calling pci_enable_msi()
|
||||
or all, or setting the pci_dev->no_msi flag before (most of the time
|
||||
in a quirk).
|
||||
|
||||
6.2. Disabling MSI below a bridge
|
||||
|
||||
The vast majority of MSI quirks are required by PCI bridges not
|
||||
being able to route MSI between busses. In this case, MSI have to be
|
||||
disabled on all devices behind this bridge. It is achieves by setting
|
||||
the PCI_BUS_FLAGS_NO_MSI flag in the pci_bus->bus_flags of the bridge
|
||||
subordinate bus. There is no need to set the same flag on bridges that
|
||||
are below the broken brigde. When pci_enable_msi() is called to enable
|
||||
MSI on a device, pci_msi_supported() takes care of checking the NO_MSI
|
||||
flag in all parent busses of the device.
|
||||
|
||||
Some bridges actually support dynamic MSI support enabling/disabling
|
||||
by changing some bits in their PCI configuration space (especially
|
||||
the Hypertransport chipsets such as the nVidia nForce and Serverworks
|
||||
HT2000). It may then be required to update the NO_MSI flag on the
|
||||
corresponding devices in the sysfs hierarchy. To enable MSI support
|
||||
on device "0000:00:0e", do:
|
||||
|
||||
echo 1 > /sys/bus/pci/devices/0000:00:0e/msi_bus
|
||||
|
||||
To disable MSI support, echo 0 instead of 1. Note that it should be
|
||||
used with caution since changing this value might break interrupts.
|
||||
|
||||
6.3. Disabling MSI globally
|
||||
|
||||
Some extreme cases may require to disable MSI globally on the system.
|
||||
For now, the only known case is a Serverworks PCI-X chipsets (MSI are
|
||||
not supported on several busses that are not all connected to the
|
||||
chipset in the Linux PCI hierarchy). In the vast majority of other
|
||||
cases, disabling only behind a specific bridge is enough.
|
||||
|
||||
For debugging purpose, the user may also pass pci=nomsi on the kernel
|
||||
command-line to explicitly disable MSI globally. But, once the appro-
|
||||
priate quirks are added to the kernel, this option should not be
|
||||
required anymore.
|
||||
|
||||
6.4. Finding why MSI cannot be enabled on a device
|
||||
|
||||
Assuming that MSI are not enabled on a device, you should look at
|
||||
dmesg to find messages that quirks may output when disabling MSI
|
||||
on some devices, some bridges or even globally.
|
||||
Then, lspci -t gives the list of bridges above a device. Reading
|
||||
/sys/bus/pci/devices/0000:00:0e/msi_bus will tell you whether MSI
|
||||
are enabled (1) or disabled (0). In 0 is found in a single bridge
|
||||
msi_bus file above the device, MSI cannot be enabled.
|
||||
|
||||
7. FAQ
|
||||
|
||||
Q1. Are there any limitations on using the MSI?
|
||||
|
||||
|
@ -221,3 +221,41 @@ over a rather long period of time, but improvements are always welcome!
|
||||
disable irq on a given acquisition of that lock will result in
|
||||
deadlock as soon as the RCU callback happens to interrupt that
|
||||
acquisition's critical section.
|
||||
|
||||
13. SRCU (srcu_read_lock(), srcu_read_unlock(), and synchronize_srcu())
|
||||
may only be invoked from process context. Unlike other forms of
|
||||
RCU, it -is- permissible to block in an SRCU read-side critical
|
||||
section (demarked by srcu_read_lock() and srcu_read_unlock()),
|
||||
hence the "SRCU": "sleepable RCU". Please note that if you
|
||||
don't need to sleep in read-side critical sections, you should
|
||||
be using RCU rather than SRCU, because RCU is almost always
|
||||
faster and easier to use than is SRCU.
|
||||
|
||||
Also unlike other forms of RCU, explicit initialization
|
||||
and cleanup is required via init_srcu_struct() and
|
||||
cleanup_srcu_struct(). These are passed a "struct srcu_struct"
|
||||
that defines the scope of a given SRCU domain. Once initialized,
|
||||
the srcu_struct is passed to srcu_read_lock(), srcu_read_unlock()
|
||||
and synchronize_srcu(). A given synchronize_srcu() waits only
|
||||
for SRCU read-side critical sections governed by srcu_read_lock()
|
||||
and srcu_read_unlock() calls that have been passd the same
|
||||
srcu_struct. This property is what makes sleeping read-side
|
||||
critical sections tolerable -- a given subsystem delays only
|
||||
its own updates, not those of other subsystems using SRCU.
|
||||
Therefore, SRCU is less prone to OOM the system than RCU would
|
||||
be if RCU's read-side critical sections were permitted to
|
||||
sleep.
|
||||
|
||||
The ability to sleep in read-side critical sections does not
|
||||
come for free. First, corresponding srcu_read_lock() and
|
||||
srcu_read_unlock() calls must be passed the same srcu_struct.
|
||||
Second, grace-period-detection overhead is amortized only
|
||||
over those updates sharing a given srcu_struct, rather than
|
||||
being globally amortized as they are for other forms of RCU.
|
||||
Therefore, SRCU should be used in preference to rw_semaphore
|
||||
only in extremely read-intensive situations, or in situations
|
||||
requiring SRCU's read-side deadlock immunity or low read-side
|
||||
realtime latency.
|
||||
|
||||
Note that, rcu_assign_pointer() and rcu_dereference() relate to
|
||||
SRCU just as they do to other forms of RCU.
|
||||
|
@ -45,7 +45,8 @@ o How can I see where RCU is currently used in the Linux kernel?
|
||||
|
||||
Search for "rcu_read_lock", "rcu_read_unlock", "call_rcu",
|
||||
"rcu_read_lock_bh", "rcu_read_unlock_bh", "call_rcu_bh",
|
||||
"synchronize_rcu", and "synchronize_net".
|
||||
"srcu_read_lock", "srcu_read_unlock", "synchronize_rcu",
|
||||
"synchronize_net", and "synchronize_srcu".
|
||||
|
||||
o What guidelines should I follow when writing code that uses RCU?
|
||||
|
||||
|
@ -28,6 +28,15 @@ nreaders This is the number of RCU reading threads supported.
|
||||
To properly exercise RCU implementations with preemptible
|
||||
read-side critical sections.
|
||||
|
||||
nfakewriters This is the number of RCU fake writer threads to run. Fake
|
||||
writer threads repeatedly use the synchronous "wait for
|
||||
current readers" function of the interface selected by
|
||||
torture_type, with a delay between calls to allow for various
|
||||
different numbers of writers running in parallel.
|
||||
nfakewriters defaults to 4, which provides enough parallelism
|
||||
to trigger special cases caused by multiple writers, such as
|
||||
the synchronize_srcu() early return optimization.
|
||||
|
||||
stat_interval The number of seconds between output of torture
|
||||
statistics (via printk()). Regardless of the interval,
|
||||
statistics are printed when the module is unloaded.
|
||||
@ -44,9 +53,12 @@ test_no_idle_hz Whether or not to test the ability of RCU to operate in
|
||||
a kernel that disables the scheduling-clock interrupt to
|
||||
idle CPUs. Boolean parameter, "1" to test, "0" otherwise.
|
||||
|
||||
torture_type The type of RCU to test: "rcu" for the rcu_read_lock()
|
||||
API, "rcu_bh" for the rcu_read_lock_bh() API, and "srcu"
|
||||
for the "srcu_read_lock()" API.
|
||||
torture_type The type of RCU to test: "rcu" for the rcu_read_lock() API,
|
||||
"rcu_sync" for rcu_read_lock() with synchronous reclamation,
|
||||
"rcu_bh" for the rcu_read_lock_bh() API, "rcu_bh_sync" for
|
||||
rcu_read_lock_bh() with synchronous reclamation, "srcu" for
|
||||
the "srcu_read_lock()" API, and "sched" for the use of
|
||||
preempt_disable() together with synchronize_sched().
|
||||
|
||||
verbose Enable debug printk()s. Default is disabled.
|
||||
|
||||
@ -118,6 +130,21 @@ o "Free-Block Circulation": Shows the number of torture structures
|
||||
as it is only incremented if a torture structure's counter
|
||||
somehow gets incremented farther than it should.
|
||||
|
||||
Different implementations of RCU can provide implementation-specific
|
||||
additional information. For example, SRCU provides the following:
|
||||
|
||||
srcu-torture: rtc: f8cf46a8 ver: 355 tfle: 0 rta: 356 rtaf: 0 rtf: 346 rtmbe: 0
|
||||
srcu-torture: Reader Pipe: 559738 939 0 0 0 0 0 0 0 0 0
|
||||
srcu-torture: Reader Batch: 560434 243 0 0 0 0 0 0 0 0
|
||||
srcu-torture: Free-Block Circulation: 355 354 353 352 351 350 349 348 347 346 0
|
||||
srcu-torture: per-CPU(idx=1): 0(0,1) 1(0,1) 2(0,0) 3(0,1)
|
||||
|
||||
The first four lines are similar to those for RCU. The last line shows
|
||||
the per-CPU counter state. The numbers in parentheses are the values
|
||||
of the "old" and "current" counters for the corresponding CPU. The
|
||||
"idx" value maps the "old" and "current" values to the underlying array,
|
||||
and is useful for debugging.
|
||||
|
||||
|
||||
USAGE
|
||||
|
||||
|
@ -582,7 +582,7 @@ The rcu_read_lock() and rcu_read_unlock() primitive read-acquire
|
||||
and release a global reader-writer lock. The synchronize_rcu()
|
||||
primitive write-acquires this same lock, then immediately releases
|
||||
it. This means that once synchronize_rcu() exits, all RCU read-side
|
||||
critical sections that were in progress before synchonize_rcu() was
|
||||
critical sections that were in progress before synchronize_rcu() was
|
||||
called are guaranteed to have completed -- there is no way that
|
||||
synchronize_rcu() would have been able to write-acquire the lock
|
||||
otherwise.
|
||||
@ -750,7 +750,7 @@ Or, for those who prefer a side-by-side listing:
|
||||
|
||||
Either way, the differences are quite small. Read-side locking moves
|
||||
to rcu_read_lock() and rcu_read_unlock, update-side locking moves from
|
||||
from a reader-writer lock to a simple spinlock, and a synchronize_rcu()
|
||||
a reader-writer lock to a simple spinlock, and a synchronize_rcu()
|
||||
precedes the kfree().
|
||||
|
||||
However, there is one potential catch: the read-side and update-side
|
||||
@ -778,6 +778,8 @@ Markers for RCU read-side critical sections:
|
||||
rcu_read_unlock
|
||||
rcu_read_lock_bh
|
||||
rcu_read_unlock_bh
|
||||
srcu_read_lock
|
||||
srcu_read_unlock
|
||||
|
||||
RCU pointer/list traversal:
|
||||
|
||||
@ -804,6 +806,7 @@ RCU grace period:
|
||||
synchronize_net
|
||||
synchronize_sched
|
||||
synchronize_rcu
|
||||
synchronize_srcu
|
||||
call_rcu
|
||||
call_rcu_bh
|
||||
|
||||
|
@ -61,3 +61,14 @@ kernel patches.
|
||||
Documentation/kernel-parameters.txt.
|
||||
|
||||
18: All new module parameters are documented with MODULE_PARM_DESC()
|
||||
|
||||
19: All new userspace interfaces are documented in Documentation/ABI/.
|
||||
See Documentation/ABI/README for more information.
|
||||
|
||||
20: Check that it all passes `make headers_check'.
|
||||
|
||||
21: Has been checked with injection of at least slab and page-allocation
|
||||
fauilures. See Documentation/fault-injection/.
|
||||
|
||||
If the new code is substantial, addition of subsystem-specific fault
|
||||
injection might be appropriate.
|
||||
|
@ -59,11 +59,11 @@ Copyright: The copyright owner must agree to use of GPL.
|
||||
are the same person/entity. If not, the name of
|
||||
the person/entity authorizing use of GPL should be
|
||||
listed in case it's necessary to verify the will of
|
||||
the copright owner.
|
||||
the copyright owner.
|
||||
|
||||
Interfaces: If your driver uses existing interfaces and behaves like
|
||||
other drivers in the same class it will be much more likely
|
||||
to be accepted than if it invents gratuitous new ones.
|
||||
to be accepted than if it invents gratuitous new ones.
|
||||
If you need to implement a common API over Linux and NT
|
||||
drivers do it in userspace.
|
||||
|
||||
@ -88,7 +88,7 @@ Clarity: It helps if anyone can see how to fix the driver. It helps
|
||||
it will go in the bitbucket.
|
||||
|
||||
Control: In general if there is active maintainance of a driver by
|
||||
the author then patches will be redirected to them unless
|
||||
the author then patches will be redirected to them unless
|
||||
they are totally obvious and without need of checking.
|
||||
If you want to be the contact and update point for the
|
||||
driver it is a good idea to state this in the comments,
|
||||
@ -100,7 +100,7 @@ What Criteria Do Not Determine Acceptance
|
||||
Vendor: Being the hardware vendor and maintaining the driver is
|
||||
often a good thing. If there is a stable working driver from
|
||||
other people already in the tree don't expect 'we are the
|
||||
vendor' to get your driver chosen. Ideally work with the
|
||||
vendor' to get your driver chosen. Ideally work with the
|
||||
existing driver author to build a single perfect driver.
|
||||
|
||||
Author: It doesn't matter if a large Linux company wrote the driver,
|
||||
@ -116,17 +116,13 @@ Linux kernel master tree:
|
||||
ftp.??.kernel.org:/pub/linux/kernel/...
|
||||
?? == your country code, such as "us", "uk", "fr", etc.
|
||||
|
||||
Linux kernel mailing list:
|
||||
Linux kernel mailing list:
|
||||
linux-kernel@vger.kernel.org
|
||||
[mail majordomo@vger.kernel.org to subscribe]
|
||||
|
||||
Linux Device Drivers, Third Edition (covers 2.6.10):
|
||||
http://lwn.net/Kernel/LDD3/ (free version)
|
||||
|
||||
Kernel traffic:
|
||||
Weekly summary of kernel list activity (much easier to read)
|
||||
http://www.kerneltraffic.org/kernel-traffic/
|
||||
|
||||
LWN.net:
|
||||
Weekly summary of kernel development activity - http://lwn.net/
|
||||
2.6 API changes:
|
||||
@ -145,11 +141,8 @@ KernelNewbies:
|
||||
Linux USB project:
|
||||
http://www.linux-usb.org/
|
||||
|
||||
How to NOT write kernel driver by arjanv@redhat.com
|
||||
http://people.redhat.com/arjanv/olspaper.pdf
|
||||
How to NOT write kernel driver by Arjan van de Ven:
|
||||
http://www.fenrus.org/how-to-not-write-a-device-driver-paper.pdf
|
||||
|
||||
Kernel Janitor:
|
||||
http://janitor.kernelnewbies.org/
|
||||
|
||||
--
|
||||
Last updated on 17 Nov 2005.
|
||||
|
@ -173,15 +173,15 @@ For small patches you may want to CC the Trivial Patch Monkey
|
||||
trivial@kernel.org managed by Adrian Bunk; which collects "trivial"
|
||||
patches. Trivial patches must qualify for one of the following rules:
|
||||
Spelling fixes in documentation
|
||||
Spelling fixes which could break grep(1).
|
||||
Spelling fixes which could break grep(1)
|
||||
Warning fixes (cluttering with useless warnings is bad)
|
||||
Compilation fixes (only if they are actually correct)
|
||||
Runtime fixes (only if they actually fix things)
|
||||
Removing use of deprecated functions/macros (eg. check_region).
|
||||
Removing use of deprecated functions/macros (eg. check_region)
|
||||
Contact detail and documentation fixes
|
||||
Non-portable code replaced by portable code (even in arch-specific,
|
||||
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)
|
||||
URL: <http://www.kernel.org/pub/linux/kernel/people/bunk/trivial/>
|
||||
|
||||
@ -209,6 +209,19 @@ Exception: If your mailer is mangling patches then someone may ask
|
||||
you to re-send them using MIME.
|
||||
|
||||
|
||||
WARNING: Some mailers like Mozilla send your messages with
|
||||
---- message header ----
|
||||
Content-Type: text/plain; charset=us-ascii; format=flowed
|
||||
---- message header ----
|
||||
The problem is that "format=flowed" makes some of the mailers
|
||||
on receiving side to replace TABs with spaces and do similar
|
||||
changes. Thus the patches from you can look corrupted.
|
||||
|
||||
To fix this just make your mozilla defaults/pref/mailnews.js file to look like:
|
||||
pref("mailnews.send_plaintext_flowed", false); // RFC 2646=======
|
||||
pref("mailnews.display.disable_format_flowed_support", true);
|
||||
|
||||
|
||||
|
||||
7) E-mail size.
|
||||
|
||||
@ -245,13 +258,13 @@ updated change.
|
||||
It is quite common for Linus to "drop" your patch without comment.
|
||||
That's the nature of the system. If he drops your patch, it could be
|
||||
due to
|
||||
* Your patch did not apply cleanly to the latest kernel version
|
||||
* Your patch did not apply cleanly to the latest kernel version.
|
||||
* Your patch was not sufficiently discussed on linux-kernel.
|
||||
* A style issue (see section 2),
|
||||
* An e-mail formatting issue (re-read this section)
|
||||
* A technical problem with your change
|
||||
* He gets tons of e-mail, and yours got lost in the shuffle
|
||||
* You are being annoying (See Figure 1)
|
||||
* A style issue (see section 2).
|
||||
* An e-mail formatting issue (re-read this section).
|
||||
* A technical problem with your change.
|
||||
* He gets tons of e-mail, and yours got lost in the shuffle.
|
||||
* You are being annoying.
|
||||
|
||||
When in doubt, solicit comments on linux-kernel mailing list.
|
||||
|
||||
@ -476,10 +489,10 @@ SECTION 3 - REFERENCES
|
||||
Andrew Morton, "The perfect patch" (tpp).
|
||||
<http://www.zip.com.au/~akpm/linux/patches/stuff/tpp.txt>
|
||||
|
||||
Jeff Garzik, "Linux kernel patch submission format."
|
||||
Jeff Garzik, "Linux kernel patch submission format".
|
||||
<http://linux.yyz.us/patch-format.html>
|
||||
|
||||
Greg Kroah-Hartman "How to piss off a kernel subsystem maintainer".
|
||||
Greg Kroah-Hartman, "How to piss off a kernel subsystem maintainer".
|
||||
<http://www.kroah.com/log/2005/03/31/>
|
||||
<http://www.kroah.com/log/2005/07/08/>
|
||||
<http://www.kroah.com/log/2005/10/19/>
|
||||
@ -488,9 +501,9 @@ Greg Kroah-Hartman "How to piss off a kernel subsystem maintainer".
|
||||
NO!!!! No more huge patch bombs to linux-kernel@vger.kernel.org people!
|
||||
<http://marc.theaimsgroup.com/?l=linux-kernel&m=112112749912944&w=2>
|
||||
|
||||
Kernel Documentation/CodingStyle
|
||||
Kernel Documentation/CodingStyle:
|
||||
<http://sosdg.org/~coywolf/lxr/source/Documentation/CodingStyle>
|
||||
|
||||
Linus Torvald's mail on the canonical patch format:
|
||||
Linus Torvalds's mail on the canonical patch format:
|
||||
<http://lkml.org/lkml/2005/4/7/183>
|
||||
--
|
||||
|
@ -7,6 +7,8 @@
|
||||
* Copyright (C) Balbir Singh, IBM Corp. 2006
|
||||
* Copyright (c) Jay Lan, SGI. 2006
|
||||
*
|
||||
* Compile with
|
||||
* gcc -I/usr/src/linux/include getdelays.c -o getdelays
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
@ -35,13 +37,20 @@
|
||||
#define NLA_DATA(na) ((void *)((char*)(na) + NLA_HDRLEN))
|
||||
#define NLA_PAYLOAD(len) (len - NLA_HDRLEN)
|
||||
|
||||
#define err(code, fmt, arg...) do { printf(fmt, ##arg); exit(code); } while (0)
|
||||
int done = 0;
|
||||
int rcvbufsz=0;
|
||||
#define err(code, fmt, arg...) \
|
||||
do { \
|
||||
fprintf(stderr, fmt, ##arg); \
|
||||
exit(code); \
|
||||
} while (0)
|
||||
|
||||
char name[100];
|
||||
int dbg=0, print_delays=0;
|
||||
int done;
|
||||
int rcvbufsz;
|
||||
char name[100];
|
||||
int dbg;
|
||||
int print_delays;
|
||||
int print_io_accounting;
|
||||
__u64 stime, utime;
|
||||
|
||||
#define PRINTF(fmt, arg...) { \
|
||||
if (dbg) { \
|
||||
printf(fmt, ##arg); \
|
||||
@ -49,7 +58,7 @@ __u64 stime, utime;
|
||||
}
|
||||
|
||||
/* Maximum size of response requested or message sent */
|
||||
#define MAX_MSG_SIZE 256
|
||||
#define MAX_MSG_SIZE 1024
|
||||
/* Maximum number of cpus expected to be specified in a cpumask */
|
||||
#define MAX_CPUS 32
|
||||
/* Maximum length of pathname to log file */
|
||||
@ -78,8 +87,9 @@ static int create_nl_socket(int protocol)
|
||||
if (rcvbufsz)
|
||||
if (setsockopt(fd, SOL_SOCKET, SO_RCVBUF,
|
||||
&rcvbufsz, sizeof(rcvbufsz)) < 0) {
|
||||
printf("Unable to set socket rcv buf size to %d\n",
|
||||
rcvbufsz);
|
||||
fprintf(stderr, "Unable to set socket rcv buf size "
|
||||
"to %d\n",
|
||||
rcvbufsz);
|
||||
return -1;
|
||||
}
|
||||
|
||||
@ -186,6 +196,15 @@ void print_delayacct(struct taskstats *t)
|
||||
"count", "delay total", t->swapin_count, t->swapin_delay_total);
|
||||
}
|
||||
|
||||
void print_ioacct(struct taskstats *t)
|
||||
{
|
||||
printf("%s: read=%llu, write=%llu, cancelled_write=%llu\n",
|
||||
t->ac_comm,
|
||||
(unsigned long long)t->read_bytes,
|
||||
(unsigned long long)t->write_bytes,
|
||||
(unsigned long long)t->cancelled_write_bytes);
|
||||
}
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
int c, rc, rep_len, aggr_len, len2, cmd_type;
|
||||
@ -208,7 +227,7 @@ int main(int argc, char *argv[])
|
||||
struct msgtemplate msg;
|
||||
|
||||
while (1) {
|
||||
c = getopt(argc, argv, "dw:r:m:t:p:v:l");
|
||||
c = getopt(argc, argv, "diw:r:m:t:p:v:l");
|
||||
if (c < 0)
|
||||
break;
|
||||
|
||||
@ -217,6 +236,10 @@ int main(int argc, char *argv[])
|
||||
printf("print delayacct stats ON\n");
|
||||
print_delays = 1;
|
||||
break;
|
||||
case 'i':
|
||||
printf("printing IO accounting\n");
|
||||
print_io_accounting = 1;
|
||||
break;
|
||||
case 'w':
|
||||
strncpy(logfile, optarg, MAX_FILENAME);
|
||||
printf("write to file %s\n", logfile);
|
||||
@ -238,14 +261,12 @@ int main(int argc, char *argv[])
|
||||
if (!tid)
|
||||
err(1, "Invalid tgid\n");
|
||||
cmd_type = TASKSTATS_CMD_ATTR_TGID;
|
||||
print_delays = 1;
|
||||
break;
|
||||
case 'p':
|
||||
tid = atoi(optarg);
|
||||
if (!tid)
|
||||
err(1, "Invalid pid\n");
|
||||
cmd_type = TASKSTATS_CMD_ATTR_PID;
|
||||
print_delays = 1;
|
||||
break;
|
||||
case 'v':
|
||||
printf("debug on\n");
|
||||
@ -277,7 +298,7 @@ int main(int argc, char *argv[])
|
||||
mypid = getpid();
|
||||
id = get_family_id(nl_sd);
|
||||
if (!id) {
|
||||
printf("Error getting family id, errno %d", errno);
|
||||
fprintf(stderr, "Error getting family id, errno %d\n", errno);
|
||||
goto err;
|
||||
}
|
||||
PRINTF("family id %d\n", id);
|
||||
@ -285,10 +306,10 @@ int main(int argc, char *argv[])
|
||||
if (maskset) {
|
||||
rc = send_cmd(nl_sd, id, mypid, TASKSTATS_CMD_GET,
|
||||
TASKSTATS_CMD_ATTR_REGISTER_CPUMASK,
|
||||
&cpumask, sizeof(cpumask));
|
||||
&cpumask, strlen(cpumask) + 1);
|
||||
PRINTF("Sent register cpumask, retval %d\n", rc);
|
||||
if (rc < 0) {
|
||||
printf("error sending register cpumask\n");
|
||||
fprintf(stderr, "error sending register cpumask\n");
|
||||
goto err;
|
||||
}
|
||||
}
|
||||
@ -298,7 +319,7 @@ int main(int argc, char *argv[])
|
||||
cmd_type, &tid, sizeof(__u32));
|
||||
PRINTF("Sent pid/tgid, retval %d\n", rc);
|
||||
if (rc < 0) {
|
||||
printf("error sending tid/tgid cmd\n");
|
||||
fprintf(stderr, "error sending tid/tgid cmd\n");
|
||||
goto done;
|
||||
}
|
||||
}
|
||||
@ -310,12 +331,15 @@ int main(int argc, char *argv[])
|
||||
PRINTF("received %d bytes\n", rep_len);
|
||||
|
||||
if (rep_len < 0) {
|
||||
printf("nonfatal reply error: errno %d\n", errno);
|
||||
fprintf(stderr, "nonfatal reply error: errno %d\n",
|
||||
errno);
|
||||
continue;
|
||||
}
|
||||
if (msg.n.nlmsg_type == NLMSG_ERROR ||
|
||||
!NLMSG_OK((&msg.n), rep_len)) {
|
||||
printf("fatal reply error, errno %d\n", errno);
|
||||
struct nlmsgerr *err = NLMSG_DATA(&msg);
|
||||
fprintf(stderr, "fatal reply error, errno %d\n",
|
||||
err->error);
|
||||
goto done;
|
||||
}
|
||||
|
||||
@ -355,6 +379,8 @@ int main(int argc, char *argv[])
|
||||
count++;
|
||||
if (print_delays)
|
||||
print_delayacct((struct taskstats *) NLA_DATA(na));
|
||||
if (print_io_accounting)
|
||||
print_ioacct((struct taskstats *) NLA_DATA(na));
|
||||
if (fd) {
|
||||
if (write(fd, NLA_DATA(na), na->nla_len) < 0) {
|
||||
err(1,"write error\n");
|
||||
@ -364,7 +390,9 @@ int main(int argc, char *argv[])
|
||||
goto done;
|
||||
break;
|
||||
default:
|
||||
printf("Unknown nested nla_type %d\n", na->nla_type);
|
||||
fprintf(stderr, "Unknown nested"
|
||||
" nla_type %d\n",
|
||||
na->nla_type);
|
||||
break;
|
||||
}
|
||||
len2 += NLA_ALIGN(na->nla_len);
|
||||
@ -373,7 +401,8 @@ int main(int argc, char *argv[])
|
||||
break;
|
||||
|
||||
default:
|
||||
printf("Unknown nla_type %d\n", na->nla_type);
|
||||
fprintf(stderr, "Unknown nla_type %d\n",
|
||||
na->nla_type);
|
||||
break;
|
||||
}
|
||||
na = (struct nlattr *) (GENLMSG_DATA(&msg) + len);
|
||||
@ -383,7 +412,7 @@ done:
|
||||
if (maskset) {
|
||||
rc = send_cmd(nl_sd, id, mypid, TASKSTATS_CMD_GET,
|
||||
TASKSTATS_CMD_ATTR_DEREGISTER_CPUMASK,
|
||||
&cpumask, sizeof(cpumask));
|
||||
&cpumask, strlen(cpumask) + 1);
|
||||
printf("Sent deregister mask, retval %d\n", rc);
|
||||
if (rc < 0)
|
||||
err(rc, "error sending deregister cpumask\n");
|
||||
|
161
Documentation/accounting/taskstats-struct.txt
Normal file
161
Documentation/accounting/taskstats-struct.txt
Normal file
@ -0,0 +1,161 @@
|
||||
The struct taskstats
|
||||
--------------------
|
||||
|
||||
This document contains an explanation of the struct taskstats fields.
|
||||
|
||||
There are three different groups of fields in the struct taskstats:
|
||||
|
||||
1) Common and basic accounting fields
|
||||
If CONFIG_TASKSTATS is set, the taskstats inteface is enabled and
|
||||
the common fields and basic accounting fields are collected for
|
||||
delivery at do_exit() of a task.
|
||||
2) Delay accounting fields
|
||||
These fields are placed between
|
||||
/* Delay accounting fields start */
|
||||
and
|
||||
/* Delay accounting fields end */
|
||||
Their values are collected if CONFIG_TASK_DELAY_ACCT is set.
|
||||
3) Extended accounting fields
|
||||
These fields are placed between
|
||||
/* Extended accounting fields start */
|
||||
and
|
||||
/* Extended accounting fields end */
|
||||
Their values are collected if CONFIG_TASK_XACCT is set.
|
||||
|
||||
Future extension should add fields to the end of the taskstats struct, and
|
||||
should not change the relative position of each field within the struct.
|
||||
|
||||
|
||||
struct taskstats {
|
||||
|
||||
1) Common and basic accounting fields:
|
||||
/* The version number of this struct. This field is always set to
|
||||
* TAKSTATS_VERSION, which is defined in <linux/taskstats.h>.
|
||||
* Each time the struct is changed, the value should be incremented.
|
||||
*/
|
||||
__u16 version;
|
||||
|
||||
/* The exit code of a task. */
|
||||
__u32 ac_exitcode; /* Exit status */
|
||||
|
||||
/* The accounting flags of a task as defined in <linux/acct.h>
|
||||
* Defined values are AFORK, ASU, ACOMPAT, ACORE, and AXSIG.
|
||||
*/
|
||||
__u8 ac_flag; /* Record flags */
|
||||
|
||||
/* The value of task_nice() of a task. */
|
||||
__u8 ac_nice; /* task_nice */
|
||||
|
||||
/* The name of the command that started this task. */
|
||||
char ac_comm[TS_COMM_LEN]; /* Command name */
|
||||
|
||||
/* The scheduling discipline as set in task->policy field. */
|
||||
__u8 ac_sched; /* Scheduling discipline */
|
||||
|
||||
__u8 ac_pad[3];
|
||||
__u32 ac_uid; /* User ID */
|
||||
__u32 ac_gid; /* Group ID */
|
||||
__u32 ac_pid; /* Process ID */
|
||||
__u32 ac_ppid; /* Parent process ID */
|
||||
|
||||
/* The time when a task begins, in [secs] since 1970. */
|
||||
__u32 ac_btime; /* Begin time [sec since 1970] */
|
||||
|
||||
/* The elapsed time of a task, in [usec]. */
|
||||
__u64 ac_etime; /* Elapsed time [usec] */
|
||||
|
||||
/* The user CPU time of a task, in [usec]. */
|
||||
__u64 ac_utime; /* User CPU time [usec] */
|
||||
|
||||
/* The system CPU time of a task, in [usec]. */
|
||||
__u64 ac_stime; /* System CPU time [usec] */
|
||||
|
||||
/* The minor page fault count of a task, as set in task->min_flt. */
|
||||
__u64 ac_minflt; /* Minor Page Fault Count */
|
||||
|
||||
/* The major page fault count of a task, as set in task->maj_flt. */
|
||||
__u64 ac_majflt; /* Major Page Fault Count */
|
||||
|
||||
|
||||
2) Delay accounting fields:
|
||||
/* Delay accounting fields start
|
||||
*
|
||||
* All values, until the comment "Delay accounting fields end" are
|
||||
* available only if delay accounting is enabled, even though the last
|
||||
* few fields are not delays
|
||||
*
|
||||
* xxx_count is the number of delay values recorded
|
||||
* xxx_delay_total is the corresponding cumulative delay in nanoseconds
|
||||
*
|
||||
* xxx_delay_total wraps around to zero on overflow
|
||||
* xxx_count incremented regardless of overflow
|
||||
*/
|
||||
|
||||
/* Delay waiting for cpu, while runnable
|
||||
* count, delay_total NOT updated atomically
|
||||
*/
|
||||
__u64 cpu_count;
|
||||
__u64 cpu_delay_total;
|
||||
|
||||
/* Following four fields atomically updated using task->delays->lock */
|
||||
|
||||
/* Delay waiting for synchronous block I/O to complete
|
||||
* does not account for delays in I/O submission
|
||||
*/
|
||||
__u64 blkio_count;
|
||||
__u64 blkio_delay_total;
|
||||
|
||||
/* Delay waiting for page fault I/O (swap in only) */
|
||||
__u64 swapin_count;
|
||||
__u64 swapin_delay_total;
|
||||
|
||||
/* cpu "wall-clock" running time
|
||||
* On some architectures, value will adjust for cpu time stolen
|
||||
* from the kernel in involuntary waits due to virtualization.
|
||||
* Value is cumulative, in nanoseconds, without a corresponding count
|
||||
* and wraps around to zero silently on overflow
|
||||
*/
|
||||
__u64 cpu_run_real_total;
|
||||
|
||||
/* cpu "virtual" running time
|
||||
* Uses time intervals seen by the kernel i.e. no adjustment
|
||||
* for kernel's involuntary waits due to virtualization.
|
||||
* Value is cumulative, in nanoseconds, without a corresponding count
|
||||
* and wraps around to zero silently on overflow
|
||||
*/
|
||||
__u64 cpu_run_virtual_total;
|
||||
/* Delay accounting fields end */
|
||||
/* version 1 ends here */
|
||||
|
||||
|
||||
3) Extended accounting fields
|
||||
/* Extended accounting fields start */
|
||||
|
||||
/* Accumulated RSS usage in duration of a task, in MBytes-usecs.
|
||||
* The current rss usage is added to this counter every time
|
||||
* a tick is charged to a task's system time. So, at the end we
|
||||
* will have memory usage multiplied by system time. Thus an
|
||||
* average usage per system time unit can be calculated.
|
||||
*/
|
||||
__u64 coremem; /* accumulated RSS usage in MB-usec */
|
||||
|
||||
/* Accumulated virtual memory usage in duration of a task.
|
||||
* Same as acct_rss_mem1 above except that we keep track of VM usage.
|
||||
*/
|
||||
__u64 virtmem; /* accumulated VM usage in MB-usec */
|
||||
|
||||
/* High watermark of RSS usage in duration of a task, in KBytes. */
|
||||
__u64 hiwater_rss; /* High-watermark of RSS usage */
|
||||
|
||||
/* High watermark of VM usage in duration of a task, in KBytes. */
|
||||
__u64 hiwater_vm; /* High-water virtual memory usage */
|
||||
|
||||
/* The following four fields are I/O statistics of a task. */
|
||||
__u64 read_char; /* bytes read */
|
||||
__u64 write_char; /* bytes written */
|
||||
__u64 read_syscalls; /* read syscalls */
|
||||
__u64 write_syscalls; /* write syscalls */
|
||||
|
||||
/* Extended accounting fields end */
|
||||
|
||||
}
|
@ -96,9 +96,9 @@ a) TASKSTATS_TYPE_AGGR_PID/TGID : attribute containing no payload but indicates
|
||||
a pid/tgid will be followed by some stats.
|
||||
|
||||
b) TASKSTATS_TYPE_PID/TGID: attribute whose payload is the pid/tgid whose stats
|
||||
is being returned.
|
||||
are being returned.
|
||||
|
||||
c) TASKSTATS_TYPE_STATS: attribute with a struct taskstsats as payload. The
|
||||
c) TASKSTATS_TYPE_STATS: attribute with a struct taskstats as payload. The
|
||||
same structure is used for both per-pid and per-tgid stats.
|
||||
|
||||
3. New message sent by kernel whenever a task exits. The payload consists of a
|
||||
@ -122,12 +122,12 @@ of atomicity).
|
||||
|
||||
However, maintaining per-process, in addition to per-task stats, within the
|
||||
kernel has space and time overheads. To address this, the taskstats code
|
||||
accumalates each exiting task's statistics into a process-wide data structure.
|
||||
When the last task of a process exits, the process level data accumalated also
|
||||
accumulates each exiting task's statistics into a process-wide data structure.
|
||||
When the last task of a process exits, the process level data accumulated also
|
||||
gets sent to userspace (along with the per-task data).
|
||||
|
||||
When a user queries to get per-tgid data, the sum of all other live threads in
|
||||
the group is added up and added to the accumalated total for previously exited
|
||||
the group is added up and added to the accumulated total for previously exited
|
||||
threads of the same thread group.
|
||||
|
||||
Extending taskstats
|
||||
|
@ -7,7 +7,7 @@ not been observed, but it would be nice to eliminate any potential for
|
||||
deadlock under memory pressure.
|
||||
|
||||
Because ATA over Ethernet is not fragmented by the kernel's IP code,
|
||||
the destructore member of the struct sk_buff is available to the aoe
|
||||
the destructor member of the struct sk_buff is available to the aoe
|
||||
driver. By using a mempool for allocating all but the first few
|
||||
sk_buffs, and by registering a destructor, we should be able to
|
||||
efficiently allocate sk_buffs without introducing any potential for
|
||||
|
@ -24,8 +24,8 @@ The SA1100 serial port had its major/minor numbers officially assigned:
|
||||
> 7 = /dev/cusa2 Callout device for ttySA2
|
||||
>
|
||||
|
||||
If you're not using devfs, you must create those inodes in /dev
|
||||
on the root filesystem used by your SA1100-based device:
|
||||
You must create those inodes in /dev on the root filesystem used
|
||||
by your SA1100-based device:
|
||||
|
||||
mknod ttySA0 c 204 5
|
||||
mknod ttySA1 c 204 6
|
||||
|
@ -38,7 +38,7 @@ MTD
|
||||
---
|
||||
|
||||
The NAND and NOR support has been merged from the linux-mtd project.
|
||||
Any prolbems, see http://www.linux-mtd.infradead.org/ for more
|
||||
Any problems, see http://www.linux-mtd.infradead.org/ for more
|
||||
information or up-to-date versions of linux-mtd.
|
||||
|
||||
|
||||
|
@ -24,7 +24,7 @@ Headers
|
||||
header include/asm-arm/arch-s3c2410/hardware.h which can be
|
||||
included by #include <asm/arch/hardware.h>
|
||||
|
||||
A useful ammount of documentation can be found in the hardware
|
||||
A useful amount of documentation can be found in the hardware
|
||||
header on how the GPIO functions (and others) work.
|
||||
|
||||
Whilst a number of these functions do make some checks on what
|
||||
|
@ -80,7 +80,7 @@ Machines
|
||||
Adding New Machines
|
||||
-------------------
|
||||
|
||||
The archicture has been designed to support as many machines as can
|
||||
The architecture has been designed to support as many machines as can
|
||||
be configured for it in one kernel build, and any future additions
|
||||
should keep this in mind before altering items outside of their own
|
||||
machine files.
|
||||
|
@ -80,7 +80,7 @@ RTC
|
||||
Watchdog
|
||||
--------
|
||||
|
||||
The watchdog harware is the same as the S3C2410, and is supported by
|
||||
The watchdog hardware is the same as the S3C2410, and is supported by
|
||||
the s3c2410_wdt driver.
|
||||
|
||||
|
||||
|
@ -24,8 +24,10 @@ very similar behavior to the deadline IO scheduler.
|
||||
Selecting IO schedulers
|
||||
-----------------------
|
||||
To choose IO schedulers at boot time, use the argument 'elevator=deadline'.
|
||||
'noop' and 'as' (the default) are also available. IO schedulers are assigned
|
||||
globally at boot time only presently.
|
||||
'noop', 'as' and 'cfq' (the default) are also available. IO schedulers are
|
||||
assigned globally at boot time only presently. It's also possible to change
|
||||
the IO scheduler for a determined device on the fly, as described in
|
||||
Documentation/block/switching-sched.txt.
|
||||
|
||||
|
||||
Anticipatory IO scheduler Policies
|
||||
@ -99,8 +101,8 @@ contrast, many write requests may be dispatched to the disk controller
|
||||
at a time during a write batch. It is this characteristic that can make
|
||||
the anticipatory scheduler perform anomalously with controllers supporting
|
||||
TCQ, or with hardware striped RAID devices. Setting the antic_expire
|
||||
queue paramter (see below) to zero disables this behavior, and the anticipatory
|
||||
scheduler behaves essentially like the deadline scheduler.
|
||||
queue parameter (see below) to zero disables this behavior, and the
|
||||
anticipatory scheduler behaves essentially like the deadline scheduler.
|
||||
|
||||
When read anticipation is enabled (antic_expire is not zero), reads
|
||||
are dispatched to the disk controller one at a time.
|
||||
|
@ -25,7 +25,7 @@ of the following three ways.
|
||||
i. For devices which have queue depth greater than 1 (TCQ devices) and
|
||||
support ordered tags, block layer can just issue the barrier as an
|
||||
ordered request and the lower level driver, controller and drive
|
||||
itself are responsible for making sure that the ordering contraint is
|
||||
itself are responsible for making sure that the ordering constraint is
|
||||
met. Most modern SCSI controllers/drives should support this.
|
||||
|
||||
NOTE: SCSI ordered tag isn't currently used due to limitation in the
|
||||
@ -42,7 +42,7 @@ iii. Devices which have queue depth of 1. This is a degenerate case
|
||||
of ii. Just keeping issue order suffices. Ancient SCSI
|
||||
controllers/drives and IDE drives are in this category.
|
||||
|
||||
2. Forced flushing to physcial medium
|
||||
2. Forced flushing to physical medium
|
||||
|
||||
Again, if you're not gonna do synchronization with disk drives (dang,
|
||||
it sounds even more appealing now!), the reason you use I/O barriers
|
||||
@ -56,7 +56,7 @@ There are four cases,
|
||||
i. No write-back cache. Keeping requests ordered is enough.
|
||||
|
||||
ii. Write-back cache but no flush operation. There's no way to
|
||||
gurantee physical-medium commit order. This kind of devices can't to
|
||||
guarantee physical-medium commit order. This kind of devices can't to
|
||||
I/O barriers.
|
||||
|
||||
iii. Write-back cache and flush operation but no FUA (forced unit
|
||||
|
@ -135,7 +135,7 @@ Some new queue property settings:
|
||||
Sets two variables that limit the size of the request.
|
||||
|
||||
- The request queue's max_sectors, which is a soft size in
|
||||
in units of 512 byte sectors, and could be dynamically varied
|
||||
units of 512 byte sectors, and could be dynamically varied
|
||||
by the core kernel.
|
||||
|
||||
- The request queue's max_hw_sectors, which is a hard limit
|
||||
@ -183,7 +183,7 @@ it, the pci dma mapping routines and associated data structures have now been
|
||||
modified to accomplish a direct page -> bus translation, without requiring
|
||||
a virtual address mapping (unlike the earlier scheme of virtual address
|
||||
-> bus translation). So this works uniformly for high-memory pages (which
|
||||
do not have a correponding kernel virtual address space mapping) and
|
||||
do not have a corresponding kernel virtual address space mapping) and
|
||||
low-memory pages.
|
||||
|
||||
Note: Please refer to DMA-mapping.txt for a discussion on PCI high mem DMA
|
||||
@ -391,7 +391,7 @@ forced such requests to be broken up into small chunks before being passed
|
||||
on to the generic block layer, only to be merged by the i/o scheduler
|
||||
when the underlying device was capable of handling the i/o in one shot.
|
||||
Also, using the buffer head as an i/o structure for i/os that didn't originate
|
||||
from the buffer cache unecessarily added to the weight of the descriptors
|
||||
from the buffer cache unnecessarily added to the weight of the descriptors
|
||||
which were generated for each such chunk.
|
||||
|
||||
The following were some of the goals and expectations considered in the
|
||||
@ -403,14 +403,14 @@ i. Should be appropriate as a descriptor for both raw and buffered i/o -
|
||||
for raw i/o.
|
||||
ii. Ability to represent high-memory buffers (which do not have a virtual
|
||||
address mapping in kernel address space).
|
||||
iii.Ability to represent large i/os w/o unecessarily breaking them up (i.e
|
||||
iii.Ability to represent large i/os w/o unnecessarily breaking them up (i.e
|
||||
greater than PAGE_SIZE chunks in one shot)
|
||||
iv. At the same time, ability to retain independent identity of i/os from
|
||||
different sources or i/o units requiring individual completion (e.g. for
|
||||
latency reasons)
|
||||
v. Ability to represent an i/o involving multiple physical memory segments
|
||||
(including non-page aligned page fragments, as specified via readv/writev)
|
||||
without unecessarily breaking it up, if the underlying device is capable of
|
||||
without unnecessarily breaking it up, if the underlying device is capable of
|
||||
handling it.
|
||||
vi. Preferably should be based on a memory descriptor structure that can be
|
||||
passed around different types of subsystems or layers, maybe even
|
||||
@ -783,7 +783,7 @@ all the outstanding requests. There's a third helper to do that:
|
||||
|
||||
blk_queue_invalidate_tags(request_queue_t *q)
|
||||
|
||||
Clear the internal block tag queue and readd all the pending requests
|
||||
Clear the internal block tag queue and re-add all the pending requests
|
||||
to the request queue. The driver will receive them again on the
|
||||
next request_fn run, just like it did the first time it encountered
|
||||
them.
|
||||
@ -890,7 +890,7 @@ Aside:
|
||||
|
||||
Kvec i/o:
|
||||
|
||||
Ben LaHaise's aio code uses a slighly different structure instead
|
||||
Ben LaHaise's aio code uses a slightly different structure instead
|
||||
of kiobufs, called a kvec_cb. This contains an array of <page, offset, len>
|
||||
tuples (very much like the networking code), together with a callback function
|
||||
and data pointer. This is embedded into a brw_cb structure when passed
|
||||
@ -988,7 +988,7 @@ elevator_exit_fn Allocate and free any elevator specific storage
|
||||
for a queue.
|
||||
|
||||
4.2 Request flows seen by I/O schedulers
|
||||
All requests seens by I/O schedulers strictly follow one of the following three
|
||||
All requests seen by I/O schedulers strictly follow one of the following three
|
||||
flows.
|
||||
|
||||
set_req_fn ->
|
||||
@ -1013,7 +1013,7 @@ Characteristics:
|
||||
i. Binary tree
|
||||
AS and deadline i/o schedulers use red black binary trees for disk position
|
||||
sorting and searching, and a fifo linked list for time-based searching. This
|
||||
gives good scalability and good availablility of information. Requests are
|
||||
gives good scalability and good availability of information. Requests are
|
||||
almost always dispatched in disk sort order, so a cache is kept of the next
|
||||
request in sort order to prevent binary tree lookups.
|
||||
|
||||
@ -1203,6 +1203,6 @@ temporarily map a bio into the virtual address space.
|
||||
and Linus' comments - Jan 2001)
|
||||
9.2 Discussions about kiobuf and bh design on lkml between sct, linus, alan
|
||||
et al - Feb-March 2001 (many of the initial thoughts that led to bio were
|
||||
brought up in this discusion thread)
|
||||
brought up in this discussion thread)
|
||||
9.3 Discussions on mempool on lkml - Dec 2001.
|
||||
|
||||
|
@ -23,11 +23,11 @@ you can do so by typing:
|
||||
read_expire (in ms)
|
||||
-----------
|
||||
|
||||
The goal of the deadline io scheduler is to attempt to guarentee a start
|
||||
The goal of the deadline io scheduler is to attempt to guarantee a start
|
||||
service time for a request. As we focus mainly on read latencies, this is
|
||||
tunable. When a read request first enters the io scheduler, it is assigned
|
||||
a deadline that is the current time + the read_expire value in units of
|
||||
miliseconds.
|
||||
milliseconds.
|
||||
|
||||
|
||||
write_expire (in ms)
|
||||
|
@ -80,7 +80,7 @@ the /proc filesystem entry which the "block" side of the driver creates as
|
||||
the SCSI core may not yet be initialized (because the driver is a block
|
||||
driver) and attempting to register it with the SCSI core in such a case
|
||||
would cause a hang. This is best done via an initialization script
|
||||
(typically in /etc/init.d, but could vary depending on distibution).
|
||||
(typically in /etc/init.d, but could vary depending on distribution).
|
||||
For example:
|
||||
|
||||
for x in /proc/driver/cciss/cciss[0-9]*
|
||||
@ -152,7 +152,7 @@ side during the SCSI error recovery process, the cciss driver only
|
||||
implements the first two of these actions, aborting the command, and
|
||||
resetting the device. Additionally, most tape drives will not oblige
|
||||
in aborting commands, and sometimes it appears they will not even
|
||||
obey a reset coommand, though in most circumstances they will. In
|
||||
obey a reset command, though in most circumstances they will. In
|
||||
the case that the command cannot be aborted and the device cannot be
|
||||
reset, the device will be set offline.
|
||||
|
||||
|
@ -90,6 +90,41 @@ Notes
|
||||
to create an ext2 filesystem on the disc.
|
||||
|
||||
|
||||
Using the pktcdvd sysfs interface
|
||||
---------------------------------
|
||||
|
||||
Since Linux 2.6.19, the pktcdvd module has a sysfs interface
|
||||
and can be controlled by it. For example the "pktcdvd" tool uses
|
||||
this interface. (see http://people.freenet.de/BalaGi#pktcdvd )
|
||||
|
||||
"pktcdvd" works similar to "pktsetup", e.g.:
|
||||
|
||||
# pktcdvd -a dev_name /dev/hdc
|
||||
# mkudffs /dev/pktcdvd/dev_name
|
||||
# mount -t udf -o rw,noatime /dev/pktcdvd/dev_name /dvdram
|
||||
# cp files /dvdram
|
||||
# umount /dvdram
|
||||
# pktcdvd -r dev_name
|
||||
|
||||
|
||||
For a description of the sysfs interface look into the file:
|
||||
|
||||
Documentation/ABI/testing/sysfs-block-pktcdvd
|
||||
|
||||
|
||||
Using the pktcdvd debugfs interface
|
||||
-----------------------------------
|
||||
|
||||
To read pktcdvd device infos in human readable form, do:
|
||||
|
||||
# cat /debug/pktcdvd/pktcdvd[0-7]/info
|
||||
|
||||
For a description of the debugfs interface look into the file:
|
||||
|
||||
Documentation/ABI/testing/debugfs-pktcdvd
|
||||
|
||||
|
||||
|
||||
Links
|
||||
-----
|
||||
|
||||
|
@ -199,30 +199,6 @@ boxes this will leave gaps in the sequence of device names. ip2mkdev uses
|
||||
Linux tty naming conventions: ttyF0 - ttyF255 for normal devices, and
|
||||
cuf0 - cuf255 for callout devices.
|
||||
|
||||
If you are using devfs, existing devices are automatically created within
|
||||
the devfs name space. Normal devices will be tts/F0 - tts/F255 and callout
|
||||
devices will be cua/F0 - cua/F255. With devfs installed, ip2mkdev will
|
||||
create symbolic links in /dev from the old conventional names to the newer
|
||||
devfs names as follows:
|
||||
|
||||
/dev/ip2ipl[n] -> /dev/ip2/ipl[n] n = 0 - 3
|
||||
/dev/ip2stat[n] -> /dev/ip2/stat[n] n = 0 - 3
|
||||
/dev/ttyF[n] -> /dev/tts/F[n] n = 0 - 255
|
||||
/dev/cuf[n] -> /dev/cua/F[n] n = 0 - 255
|
||||
|
||||
Only devices for existing ports and boards will be created.
|
||||
|
||||
IMPORTANT NOTE: The naming convention used for devfs by this driver
|
||||
was changed from 1.2.12 to 1.2.13. The old naming convention was to
|
||||
use ttf/%d for the tty device and cuf/%d for the cua device. That
|
||||
has been changed to conform to an agreed-upon standard of placing
|
||||
all the tty devices under tts. The device names are now tts/F%d for
|
||||
the tty device and cua/F%d for the cua devices. If you were using
|
||||
the older devfs names, you must update for the newer convention.
|
||||
|
||||
You do not need to run ip2mkdev if you are using devfs and only want to
|
||||
use the devfs native device names.
|
||||
|
||||
|
||||
4. USING THE DRIVERS
|
||||
|
||||
@ -256,57 +232,15 @@ cut out and run as "ip2mkdev" to create the necessary device files. To
|
||||
use the ip2mkdev script, you must have procfs enabled and the proc file
|
||||
system mounted on /proc.
|
||||
|
||||
You do not need to run ip2mkdev if you are using devfs and only want to
|
||||
use the devfs native device names.
|
||||
|
||||
|
||||
6. DEVFS
|
||||
|
||||
DEVFS is the DEVice File System available as an add on package for the
|
||||
2.2.x kernels and available as a configuration option in 2.3.46 and higher.
|
||||
Devfs allows for the automatic creation and management of device names
|
||||
under control of the device drivers themselves. The Devfs namespace is
|
||||
hierarchical and reduces the clutter present in the normal flat /dev
|
||||
namespace. Devfs names and conventional device names may be intermixed.
|
||||
A userspace daemon, devfsd, exists to allow for automatic creation and
|
||||
management of symbolic links from the devfs name space to the conventional
|
||||
names. More details on devfs can be found on the DEVFS home site at
|
||||
<http://www.atnf.csiro.au/~rgooch/linux/> or in the file kernel
|
||||
documentation files, .../linux/Documentation/filesystems/devfs/README.
|
||||
|
||||
If you are using devfs, existing devices are automatically created within
|
||||
the devfs name space. Normal devices will be tts/F0 - tts/F255 and callout
|
||||
devices will be cua/F0 - cua/F255. With devfs installed, ip2mkdev will
|
||||
create symbolic links in /dev from the old conventional names to the newer
|
||||
devfs names as follows:
|
||||
|
||||
/dev/ip2ipl[n] -> /dev/ip2/ipl[n] n = 0 - 3
|
||||
/dev/ip2stat[n] -> /dev/ip2/stat[n] n = 0 - 3
|
||||
/dev/ttyF[n] -> /dev/tts/F[n] n = 0 - 255
|
||||
/dev/cuf[n] -> /dev/cua/F[n] n = 0 - 255
|
||||
|
||||
Only devices for existing ports and boards will be created.
|
||||
|
||||
IMPORTANT NOTE: The naming convention used for devfs by this driver
|
||||
was changed from 1.2.12 to 1.2.13. The old naming convention was to
|
||||
use ttf/%d for the tty device and cuf/%d for the cua device. That
|
||||
has been changed to conform to an agreed-upon standard of placing
|
||||
all the tty devices under tts. The device names are now tts/F%d for
|
||||
the tty device and cua/F%d for the cua devices. If you were using
|
||||
the older devfs names, you must update for the newer convention.
|
||||
|
||||
You do not need to run ip2mkdev if you are using devfs and only want to
|
||||
use the devfs native device names.
|
||||
|
||||
|
||||
7. NOTES
|
||||
6. NOTES
|
||||
|
||||
This is a release version of the driver, but it is impossible to test it
|
||||
in all configurations of Linux. If there is any anomalous behaviour that
|
||||
does not match the standard serial port's behaviour please let us know.
|
||||
|
||||
|
||||
8. ip2mkdev shell script
|
||||
7. ip2mkdev shell script
|
||||
|
||||
Previously, this script was simply attached here. It is now attached as a
|
||||
shar archive to make it easier to extract the script from the documentation.
|
||||
|
@ -1,7 +1,7 @@
|
||||
|
||||
The cpufreq-nforce2 driver changes the FSB on nVidia nForce2 plattforms.
|
||||
The cpufreq-nforce2 driver changes the FSB on nVidia nForce2 platforms.
|
||||
|
||||
This works better than on other plattforms, because the FSB of the CPU
|
||||
This works better than on other platforms, because the FSB of the CPU
|
||||
can be controlled independently from the PCI/AGP clock.
|
||||
|
||||
The module has two options:
|
||||
|
@ -1,5 +1,5 @@
|
||||
|
||||
CPU frequency and voltage scaling statictics in the Linux(TM) kernel
|
||||
CPU frequency and voltage scaling statistics in the Linux(TM) kernel
|
||||
|
||||
|
||||
L i n u x c p u f r e q - s t a t s d r i v e r
|
||||
@ -18,8 +18,8 @@ Contents
|
||||
1. Introduction
|
||||
|
||||
cpufreq-stats is a driver that provices CPU frequency statistics for each CPU.
|
||||
This statistics is provided in /sysfs as a bunch of read_only interfaces. This
|
||||
interface (when configured) will appear in a seperate directory under cpufreq
|
||||
These statistics are provided in /sysfs as a bunch of read_only interfaces. This
|
||||
interface (when configured) will appear in a separate directory under cpufreq
|
||||
in /sysfs (<sysfs root>/devices/system/cpu/cpuX/cpufreq/stats/) for each CPU.
|
||||
Various statistics will form read_only files under this directory.
|
||||
|
||||
@ -53,7 +53,7 @@ drwxr-xr-x 3 root root 0 May 14 15:58 ..
|
||||
This gives the amount of time spent in each of the frequencies supported by
|
||||
this CPU. The cat output will have "<frequency> <time>" pair in each line, which
|
||||
will mean this CPU spent <time> usertime units of time at <frequency>. Output
|
||||
will have one line for each of the supported freuencies. usertime units here
|
||||
will have one line for each of the supported frequencies. usertime units here
|
||||
is 10mS (similar to other time exported in /proc).
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
@ -115,7 +115,7 @@ basic statistics which includes time_in_state and total_trans.
|
||||
|
||||
"CPU frequency translation statistics details" (CONFIG_CPU_FREQ_STAT_DETAILS)
|
||||
provides fine grained cpufreq stats by trans_table. The reason for having a
|
||||
seperate config option for trans_table is:
|
||||
separate config option for trans_table is:
|
||||
- trans_table goes against the traditional /sysfs rule of one value per
|
||||
interface. It provides a whole bunch of value in a 2 dimensional matrix
|
||||
form.
|
||||
|
@ -57,7 +57,7 @@ selected for each specific use.
|
||||
|
||||
Basically, it's the following flow graph:
|
||||
|
||||
CPU can be set to switch independetly | CPU can only be set
|
||||
CPU can be set to switch independently | CPU can only be set
|
||||
within specific "limits" | to specific frequencies
|
||||
|
||||
"CPUfreq policy"
|
||||
@ -109,7 +109,7 @@ directory.
|
||||
2.4 Ondemand
|
||||
------------
|
||||
|
||||
The CPUfreq govenor "ondemand" sets the CPU depending on the
|
||||
The CPUfreq governor "ondemand" sets the CPU depending on the
|
||||
current usage. To do this the CPU must have the capability to
|
||||
switch the frequency very quickly. There are a number of sysfs file
|
||||
accessible parameters:
|
||||
@ -137,11 +137,11 @@ have to be made in a row before the CPU frequency is actually lower.
|
||||
If set to '1' then the frequency decreases as quickly as it increases,
|
||||
if set to '2' it decreases at half the rate of the increase.
|
||||
|
||||
ignore_nice_load: this parameter takes a value of '0' or '1', when set
|
||||
to '0' (its default) then all processes are counted towards towards the
|
||||
'cpu utilisation' value. When set to '1' then processes that are
|
||||
ignore_nice_load: this parameter takes a value of '0' or '1'. When
|
||||
set to '0' (its default), all processes are counted towards the
|
||||
'cpu utilisation' value. When set to '1', the processes that are
|
||||
run with a 'nice' value will not count (and thus be ignored) in the
|
||||
overal usage calculation. This is useful if you are running a CPU
|
||||
overall usage calculation. This is useful if you are running a CPU
|
||||
intensive calculation on your laptop that you do not care how long it
|
||||
takes to complete as you can 'nice' it and prevent it from taking part
|
||||
in the deciding process of whether to increase your CPU frequency.
|
||||
|
@ -46,7 +46,7 @@ maxcpus=n Restrict boot time cpus to n. Say if you have 4 cpus, using
|
||||
maxcpus=2 will only boot 2. You can choose to bring the
|
||||
other cpus later online, read FAQ's for more info.
|
||||
|
||||
additional_cpus*=n Use this to limit hotpluggable cpus. This option sets
|
||||
additional_cpus=n (*) Use this to limit hotpluggable cpus. This option sets
|
||||
cpu_possible_map = cpu_present_map + additional_cpus
|
||||
|
||||
(*) Option valid only for following architectures
|
||||
@ -54,8 +54,8 @@ additional_cpus*=n Use this to limit hotpluggable cpus. This option sets
|
||||
|
||||
ia64 and x86_64 use the number of disabled local apics in ACPI tables MADT
|
||||
to determine the number of potentially hot-pluggable cpus. The implementation
|
||||
should only rely on this to count the #of cpus, but *MUST* not rely on the
|
||||
apicid values in those tables for disabled apics. In the event BIOS doesnt
|
||||
should only rely on this to count the # of cpus, but *MUST* not rely on the
|
||||
apicid values in those tables for disabled apics. In the event BIOS doesn't
|
||||
mark such hot-pluggable cpus as disabled entries, one could use this
|
||||
parameter "additional_cpus=x" to represent those cpus in the cpu_possible_map.
|
||||
|
||||
@ -101,15 +101,15 @@ cpu_possible_map/for_each_possible_cpu() to iterate.
|
||||
|
||||
Never use anything other than cpumask_t to represent bitmap of CPUs.
|
||||
|
||||
#include <linux/cpumask.h>
|
||||
#include <linux/cpumask.h>
|
||||
|
||||
for_each_possible_cpu - Iterate over cpu_possible_map
|
||||
for_each_online_cpu - Iterate over cpu_online_map
|
||||
for_each_present_cpu - Iterate over cpu_present_map
|
||||
for_each_cpu_mask(x,mask) - Iterate over some random collection of cpu mask.
|
||||
for_each_possible_cpu - Iterate over cpu_possible_map
|
||||
for_each_online_cpu - Iterate over cpu_online_map
|
||||
for_each_present_cpu - Iterate over cpu_present_map
|
||||
for_each_cpu_mask(x,mask) - Iterate over some random collection of cpu mask.
|
||||
|
||||
#include <linux/cpu.h>
|
||||
lock_cpu_hotplug() and unlock_cpu_hotplug():
|
||||
#include <linux/cpu.h>
|
||||
lock_cpu_hotplug() and unlock_cpu_hotplug():
|
||||
|
||||
The above calls are used to inhibit cpu hotplug operations. While holding the
|
||||
cpucontrol mutex, cpu_online_map will not change. If you merely need to avoid
|
||||
@ -120,7 +120,7 @@ will work as long as stop_machine_run() is used to take a cpu down.
|
||||
|
||||
CPU Hotplug - Frequently Asked Questions.
|
||||
|
||||
Q: How to i enable my kernel to support CPU hotplug?
|
||||
Q: How to enable my kernel to support CPU hotplug?
|
||||
A: When doing make defconfig, Enable CPU hotplug support
|
||||
|
||||
"Processor type and Features" -> Support for Hotpluggable CPUs
|
||||
@ -141,39 +141,39 @@ A: You should now notice an entry in sysfs.
|
||||
Check if sysfs is mounted, using the "mount" command. You should notice
|
||||
an entry as shown below in the output.
|
||||
|
||||
....
|
||||
none on /sys type sysfs (rw)
|
||||
....
|
||||
....
|
||||
none on /sys type sysfs (rw)
|
||||
....
|
||||
|
||||
if this is not mounted, do the following.
|
||||
If this is not mounted, do the following.
|
||||
|
||||
#mkdir /sysfs
|
||||
#mount -t sysfs sys /sys
|
||||
#mkdir /sysfs
|
||||
#mount -t sysfs sys /sys
|
||||
|
||||
now you should see entries for all present cpu, the following is an example
|
||||
Now you should see entries for all present cpu, the following is an example
|
||||
in a 8-way system.
|
||||
|
||||
#pwd
|
||||
#/sys/devices/system/cpu
|
||||
#ls -l
|
||||
total 0
|
||||
drwxr-xr-x 10 root root 0 Sep 19 07:44 .
|
||||
drwxr-xr-x 13 root root 0 Sep 19 07:45 ..
|
||||
drwxr-xr-x 3 root root 0 Sep 19 07:44 cpu0
|
||||
drwxr-xr-x 3 root root 0 Sep 19 07:44 cpu1
|
||||
drwxr-xr-x 3 root root 0 Sep 19 07:44 cpu2
|
||||
drwxr-xr-x 3 root root 0 Sep 19 07:44 cpu3
|
||||
drwxr-xr-x 3 root root 0 Sep 19 07:44 cpu4
|
||||
drwxr-xr-x 3 root root 0 Sep 19 07:44 cpu5
|
||||
drwxr-xr-x 3 root root 0 Sep 19 07:44 cpu6
|
||||
drwxr-xr-x 3 root root 0 Sep 19 07:48 cpu7
|
||||
#pwd
|
||||
#/sys/devices/system/cpu
|
||||
#ls -l
|
||||
total 0
|
||||
drwxr-xr-x 10 root root 0 Sep 19 07:44 .
|
||||
drwxr-xr-x 13 root root 0 Sep 19 07:45 ..
|
||||
drwxr-xr-x 3 root root 0 Sep 19 07:44 cpu0
|
||||
drwxr-xr-x 3 root root 0 Sep 19 07:44 cpu1
|
||||
drwxr-xr-x 3 root root 0 Sep 19 07:44 cpu2
|
||||
drwxr-xr-x 3 root root 0 Sep 19 07:44 cpu3
|
||||
drwxr-xr-x 3 root root 0 Sep 19 07:44 cpu4
|
||||
drwxr-xr-x 3 root root 0 Sep 19 07:44 cpu5
|
||||
drwxr-xr-x 3 root root 0 Sep 19 07:44 cpu6
|
||||
drwxr-xr-x 3 root root 0 Sep 19 07:48 cpu7
|
||||
|
||||
Under each directory you would find an "online" file which is the control
|
||||
file to logically online/offline a processor.
|
||||
|
||||
Q: Does hot-add/hot-remove refer to physical add/remove of cpus?
|
||||
A: The usage of hot-add/remove may not be very consistently used in the code.
|
||||
CONFIG_CPU_HOTPLUG enables logical online/offline capability in the kernel.
|
||||
CONFIG_HOTPLUG_CPU enables logical online/offline capability in the kernel.
|
||||
To support physical addition/removal, one would need some BIOS hooks and
|
||||
the platform should have something like an attention button in PCI hotplug.
|
||||
CONFIG_ACPI_HOTPLUG_CPU enables ACPI support for physical add/remove of CPUs.
|
||||
@ -181,17 +181,17 @@ CONFIG_ACPI_HOTPLUG_CPU enables ACPI support for physical add/remove of CPUs.
|
||||
Q: How do i logically offline a CPU?
|
||||
A: Do the following.
|
||||
|
||||
#echo 0 > /sys/devices/system/cpu/cpuX/online
|
||||
#echo 0 > /sys/devices/system/cpu/cpuX/online
|
||||
|
||||
once the logical offline is successful, check
|
||||
Once the logical offline is successful, check
|
||||
|
||||
#cat /proc/interrupts
|
||||
#cat /proc/interrupts
|
||||
|
||||
you should now not see the CPU that you removed. Also online file will report
|
||||
You should now not see the CPU that you removed. Also online file will report
|
||||
the state as 0 when a cpu if offline and 1 when its online.
|
||||
|
||||
#To display the current cpu state.
|
||||
#cat /sys/devices/system/cpu/cpuX/online
|
||||
#To display the current cpu state.
|
||||
#cat /sys/devices/system/cpu/cpuX/online
|
||||
|
||||
Q: Why cant i remove CPU0 on some systems?
|
||||
A: Some architectures may have some special dependency on a certain CPU.
|
||||
@ -234,8 +234,8 @@ Q: If i have some kernel code that needs to be aware of CPU arrival and
|
||||
departure, how to i arrange for proper notification?
|
||||
A: This is what you would need in your kernel code to receive notifications.
|
||||
|
||||
#include <linux/cpu.h>
|
||||
static int __cpuinit foobar_cpu_callback(struct notifier_block *nfb,
|
||||
#include <linux/cpu.h>
|
||||
static int __cpuinit foobar_cpu_callback(struct notifier_block *nfb,
|
||||
unsigned long action, void *hcpu)
|
||||
{
|
||||
unsigned int cpu = (unsigned long)hcpu;
|
||||
@ -279,10 +279,10 @@ Q: I don't see my action being called for all CPUs already up and running?
|
||||
A: Yes, CPU notifiers are called only when new CPUs are on-lined or offlined.
|
||||
If you need to perform some action for each cpu already in the system, then
|
||||
|
||||
for_each_online_cpu(i) {
|
||||
for_each_online_cpu(i) {
|
||||
foobar_cpu_callback(&foobar_cpu_notifier, CPU_UP_PREPARE, i);
|
||||
foobar_cpu_callback(&foobar-cpu_notifier, CPU_ONLINE, i);
|
||||
}
|
||||
foobar_cpu_callback(&foobar_cpu_notifier, CPU_ONLINE, i);
|
||||
}
|
||||
|
||||
Q: If i would like to develop cpu hotplug support for a new architecture,
|
||||
what do i need at a minimum?
|
||||
@ -307,38 +307,38 @@ Q: I need to ensure that a particular cpu is not removed when there is some
|
||||
work specific to this cpu is in progress.
|
||||
A: First switch the current thread context to preferred cpu
|
||||
|
||||
int my_func_on_cpu(int cpu)
|
||||
{
|
||||
cpumask_t saved_mask, new_mask = CPU_MASK_NONE;
|
||||
int curr_cpu, err = 0;
|
||||
int my_func_on_cpu(int cpu)
|
||||
{
|
||||
cpumask_t saved_mask, new_mask = CPU_MASK_NONE;
|
||||
int curr_cpu, err = 0;
|
||||
|
||||
saved_mask = current->cpus_allowed;
|
||||
cpu_set(cpu, new_mask);
|
||||
err = set_cpus_allowed(current, new_mask);
|
||||
saved_mask = current->cpus_allowed;
|
||||
cpu_set(cpu, new_mask);
|
||||
err = set_cpus_allowed(current, new_mask);
|
||||
|
||||
if (err)
|
||||
return err;
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
/*
|
||||
* If we got scheduled out just after the return from
|
||||
* set_cpus_allowed() before running the work, this ensures
|
||||
* we stay locked.
|
||||
*/
|
||||
curr_cpu = get_cpu();
|
||||
/*
|
||||
* If we got scheduled out just after the return from
|
||||
* set_cpus_allowed() before running the work, this ensures
|
||||
* we stay locked.
|
||||
*/
|
||||
curr_cpu = get_cpu();
|
||||
|
||||
if (curr_cpu != cpu) {
|
||||
err = -EAGAIN;
|
||||
goto ret;
|
||||
} else {
|
||||
/*
|
||||
* Do work : But cant sleep, since get_cpu() disables preempt
|
||||
*/
|
||||
}
|
||||
ret:
|
||||
put_cpu();
|
||||
set_cpus_allowed(current, saved_mask);
|
||||
return err;
|
||||
}
|
||||
if (curr_cpu != cpu) {
|
||||
err = -EAGAIN;
|
||||
goto ret;
|
||||
} else {
|
||||
/*
|
||||
* Do work : But cant sleep, since get_cpu() disables preempt
|
||||
*/
|
||||
}
|
||||
ret:
|
||||
put_cpu();
|
||||
set_cpus_allowed(current, saved_mask);
|
||||
return err;
|
||||
}
|
||||
|
||||
|
||||
Q: How do we determine how many CPUs are available for hotplug.
|
||||
|
@ -217,11 +217,11 @@ exclusive cpuset. Also, the use of a Linux virtual file system (vfs)
|
||||
to represent the cpuset hierarchy provides for a familiar permission
|
||||
and name space for cpusets, with a minimum of additional kernel code.
|
||||
|
||||
The cpus file in the root (top_cpuset) cpuset is read-only.
|
||||
It automatically tracks the value of cpu_online_map, using a CPU
|
||||
hotplug notifier. If and when memory nodes can be hotplugged,
|
||||
we expect to make the mems file in the root cpuset read-only
|
||||
as well, and have it track the value of node_online_map.
|
||||
The cpus and mems files in the root (top_cpuset) cpuset are
|
||||
read-only. The cpus file automatically tracks the value of
|
||||
cpu_online_map using a CPU hotplug notifier, and the mems file
|
||||
automatically tracks the value of node_online_map using the
|
||||
cpuset_track_online_nodes() hook.
|
||||
|
||||
|
||||
1.4 What are exclusive cpusets ?
|
||||
|
@ -26,7 +26,7 @@ The type of **_id is int.
|
||||
The type of siblings is cpumask_t.
|
||||
|
||||
To be consistent on all architectures, the 4 attributes should have
|
||||
deafult values if their values are unavailable. Below is the rule.
|
||||
default values if their values are unavailable. Below is the rule.
|
||||
1) physical_package_id: If cpu has no physical package id, -1 is the
|
||||
default value.
|
||||
2) core_id: If cpu doesn't support multi-core, its core id is 0.
|
||||
|
@ -4,7 +4,7 @@ for updating BIOS images on Dell servers and desktops.
|
||||
|
||||
Scope:
|
||||
This document discusses the functionality of the rbu driver only.
|
||||
It does not cover the support needed from aplications to enable the BIOS to
|
||||
It does not cover the support needed from applications to enable the BIOS to
|
||||
update itself with the image downloaded in to the memory.
|
||||
|
||||
Overview:
|
||||
@ -16,8 +16,8 @@ OpenManage and Dell Update packages (DUP).
|
||||
Libsmbios can also be used to update BIOS on Dell systems go to
|
||||
http://linux.dell.com/libsmbios/ for details.
|
||||
|
||||
Dell_RBU driver supports BIOS update using the monilothic image and packetized
|
||||
image methods. In case of moniolithic the driver allocates a contiguous chunk
|
||||
Dell_RBU driver supports BIOS update using the monolithic image and packetized
|
||||
image methods. In case of monolithic the driver allocates a contiguous chunk
|
||||
of physical pages having the BIOS image. In case of packetized the app
|
||||
using the driver breaks the image in to packets of fixed sizes and the driver
|
||||
would place each packet in contiguous physical memory. The driver also
|
||||
@ -41,7 +41,7 @@ The driver supports two types of update mechanism; monolithic and packetized.
|
||||
These update mechanism depends upon the BIOS currently running on the system.
|
||||
Most of the Dell systems support a monolithic update where the BIOS image is
|
||||
copied to a single contiguous block of physical memory.
|
||||
In case of packet mechanism the single memory can be broken in smaller chuks
|
||||
In case of packet mechanism the single memory can be broken in smaller chunks
|
||||
of contiguous memory and the BIOS image is scattered in these packets.
|
||||
|
||||
By default the driver uses monolithic memory for the update type. This can be
|
||||
@ -52,11 +52,11 @@ echo packet > /sys/devices/platform/dell_rbu/image_type
|
||||
In packet update mode the packet size has to be given before any packets can
|
||||
be downloaded. It is done as below
|
||||
echo XXXX > /sys/devices/platform/dell_rbu/packet_size
|
||||
In the packet update mechanism, the user neesd to create a new file having
|
||||
In the packet update mechanism, the user needs to create a new file having
|
||||
packets of data arranged back to back. It can be done as follows
|
||||
The user creates packets header, gets the chunk of the BIOS image and
|
||||
placs it next to the packetheader; now, the packetheader + BIOS image chunk
|
||||
added to geather should match the specified packet_size. This makes one
|
||||
places it next to the packetheader; now, the packetheader + BIOS image chunk
|
||||
added together should match the specified packet_size. This makes one
|
||||
packet, the user needs to create more such packets out of the entire BIOS
|
||||
image file and then arrange all these packets back to back in to one single
|
||||
file.
|
||||
@ -93,8 +93,8 @@ read back the image downloaded.
|
||||
NOTE:
|
||||
This driver requires a patch for firmware_class.c which has the modified
|
||||
request_firmware_nowait function.
|
||||
Also after updating the BIOS image an user mdoe application neeeds to execute
|
||||
code which message the BIOS update request to the BIOS. So on the next reboot
|
||||
the BIOS knows about the new image downloaded and it updates it self.
|
||||
Also don't unload the rbu drive if the image has to be updated.
|
||||
Also after updating the BIOS image a user mode application needs to execute
|
||||
code which sends the BIOS update request to the BIOS. So on the next reboot
|
||||
the BIOS knows about the new image downloaded and it updates itself.
|
||||
Also don't unload the rbu driver if the image has to be updated.
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
Maintained by Torben Mathiasen <device@lanana.org>
|
||||
|
||||
Last revised: 15 May 2006
|
||||
Last revised: 29 November 2006
|
||||
|
||||
This list is the Linux Device List, the official registry of allocated
|
||||
device numbers and /dev directory nodes for the Linux operating
|
||||
@ -92,8 +92,9 @@ Your cooperation is appreciated.
|
||||
7 = /dev/full Returns ENOSPC on write
|
||||
8 = /dev/random Nondeterministic random number gen.
|
||||
9 = /dev/urandom Faster, less secure random number gen.
|
||||
10 = /dev/aio Asyncronous I/O notification interface
|
||||
10 = /dev/aio Asynchronous I/O notification interface
|
||||
11 = /dev/kmsg Writes to this come out as printk's
|
||||
|
||||
1 block RAM disk
|
||||
0 = /dev/ram0 First RAM disk
|
||||
1 = /dev/ram1 Second RAM disk
|
||||
@ -122,7 +123,7 @@ Your cooperation is appreciated.
|
||||
devices are on major 128 and above and use the PTY
|
||||
master multiplex (/dev/ptmx) to acquire a PTY on
|
||||
demand.
|
||||
|
||||
|
||||
2 block Floppy disks
|
||||
0 = /dev/fd0 Controller 0, drive 0, autodetect
|
||||
1 = /dev/fd1 Controller 0, drive 1, autodetect
|
||||
@ -257,7 +258,7 @@ Your cooperation is appreciated.
|
||||
129 = /dev/vcsa1 tty1 text/attribute contents
|
||||
...
|
||||
191 = /dev/vcsa63 tty63 text/attribute contents
|
||||
|
||||
|
||||
NOTE: These devices permit both read and write access.
|
||||
|
||||
7 block Loopback devices
|
||||
@ -411,7 +412,7 @@ Your cooperation is appreciated.
|
||||
207 = /dev/video/em8300_sp EM8300 DVD decoder subpicture
|
||||
208 = /dev/compaq/cpqphpc Compaq PCI Hot Plug Controller
|
||||
209 = /dev/compaq/cpqrid Compaq Remote Insight Driver
|
||||
210 = /dev/impi/bt IMPI coprocessor block transfer
|
||||
210 = /dev/impi/bt IMPI coprocessor block transfer
|
||||
211 = /dev/impi/smic IMPI coprocessor stream interface
|
||||
212 = /dev/watchdogs/0 First watchdog device
|
||||
213 = /dev/watchdogs/1 Second watchdog device
|
||||
@ -506,6 +507,7 @@ Your cooperation is appreciated.
|
||||
33 = /dev/patmgr1 Sequencer patch manager
|
||||
34 = /dev/midi02 Third MIDI port
|
||||
50 = /dev/midi03 Fourth MIDI port
|
||||
|
||||
14 block BIOS harddrive callback support {2.6}
|
||||
0 = /dev/dos_hda First BIOS harddrive whole disk
|
||||
64 = /dev/dos_hdb Second BIOS harddrive whole disk
|
||||
@ -527,6 +529,7 @@ Your cooperation is appreciated.
|
||||
|
||||
16 char Non-SCSI scanners
|
||||
0 = /dev/gs4500 Genius 4500 handheld scanner
|
||||
|
||||
16 block GoldStar CD-ROM
|
||||
0 = /dev/gscd GoldStar CD-ROM
|
||||
|
||||
@ -548,6 +551,7 @@ Your cooperation is appreciated.
|
||||
0 = /dev/ttyC0 First Cyclades port
|
||||
...
|
||||
31 = /dev/ttyC31 32nd Cyclades port
|
||||
|
||||
19 block "Double" compressed disk
|
||||
0 = /dev/double0 First compressed disk
|
||||
...
|
||||
@ -563,6 +567,7 @@ Your cooperation is appreciated.
|
||||
0 = /dev/cub0 Callout device for ttyC0
|
||||
...
|
||||
31 = /dev/cub31 Callout device for ttyC31
|
||||
|
||||
20 block Hitachi CD-ROM (under development)
|
||||
0 = /dev/hitcd Hitachi CD-ROM
|
||||
|
||||
@ -582,7 +587,7 @@ Your cooperation is appreciated.
|
||||
|
||||
This device is used on the ARM-based Acorn RiscPC.
|
||||
Partitions are handled the same way as for IDE disks
|
||||
(see major number 3).
|
||||
(see major number 3).
|
||||
|
||||
22 char Digiboard serial card
|
||||
0 = /dev/ttyD0 First Digiboard port
|
||||
@ -591,7 +596,7 @@ Your cooperation is appreciated.
|
||||
22 block Second IDE hard disk/CD-ROM interface
|
||||
0 = /dev/hdc Master: whole disk (or CD-ROM)
|
||||
64 = /dev/hdd Slave: whole disk (or CD-ROM)
|
||||
|
||||
|
||||
Partitions are handled the same way as for the first
|
||||
interface (see major number 3).
|
||||
|
||||
@ -639,6 +644,7 @@ Your cooperation is appreciated.
|
||||
|
||||
26 char Quanta WinVision frame grabber {2.6}
|
||||
0 = /dev/wvisfgrab Quanta WinVision frame grabber
|
||||
|
||||
26 block Second Matsushita (Panasonic/SoundBlaster) CD-ROM
|
||||
0 = /dev/sbpcd4 Panasonic CD-ROM controller 1 unit 0
|
||||
1 = /dev/sbpcd5 Panasonic CD-ROM controller 1 unit 1
|
||||
@ -670,6 +676,7 @@ Your cooperation is appreciated.
|
||||
37 = /dev/nrawqft1 Unit 1, no rewind-on-close, no file marks
|
||||
38 = /dev/nrawqft2 Unit 2, no rewind-on-close, no file marks
|
||||
39 = /dev/nrawqft3 Unit 3, no rewind-on-close, no file marks
|
||||
|
||||
27 block Third Matsushita (Panasonic/SoundBlaster) CD-ROM
|
||||
0 = /dev/sbpcd8 Panasonic CD-ROM controller 2 unit 0
|
||||
1 = /dev/sbpcd9 Panasonic CD-ROM controller 2 unit 1
|
||||
@ -681,6 +688,7 @@ Your cooperation is appreciated.
|
||||
1 = /dev/staliomem1 Second Stallion card I/O memory
|
||||
2 = /dev/staliomem2 Third Stallion card I/O memory
|
||||
3 = /dev/staliomem3 Fourth Stallion card I/O memory
|
||||
|
||||
28 char Atari SLM ACSI laser printer (68k/Atari)
|
||||
0 = /dev/slm0 First SLM laser printer
|
||||
1 = /dev/slm1 Second SLM laser printer
|
||||
@ -690,6 +698,7 @@ Your cooperation is appreciated.
|
||||
1 = /dev/sbpcd13 Panasonic CD-ROM controller 3 unit 1
|
||||
2 = /dev/sbpcd14 Panasonic CD-ROM controller 3 unit 2
|
||||
3 = /dev/sbpcd15 Panasonic CD-ROM controller 3 unit 3
|
||||
|
||||
28 block ACSI disk (68k/Atari)
|
||||
0 = /dev/ada First ACSI disk whole disk
|
||||
16 = /dev/adb Second ACSI disk whole disk
|
||||
@ -750,6 +759,7 @@ Your cooperation is appreciated.
|
||||
31 char MPU-401 MIDI
|
||||
0 = /dev/mpu401data MPU-401 data port
|
||||
1 = /dev/mpu401stat MPU-401 status port
|
||||
|
||||
31 block ROM/flash memory card
|
||||
0 = /dev/rom0 First ROM card (rw)
|
||||
...
|
||||
@ -801,7 +811,7 @@ Your cooperation is appreciated.
|
||||
34 block Fourth IDE hard disk/CD-ROM interface
|
||||
0 = /dev/hdg Master: whole disk (or CD-ROM)
|
||||
64 = /dev/hdh Slave: whole disk (or CD-ROM)
|
||||
|
||||
|
||||
Partitions are handled the same way as for the first
|
||||
interface (see major number 3).
|
||||
|
||||
@ -818,6 +828,7 @@ Your cooperation is appreciated.
|
||||
129 = /dev/smpte1 Second MIDI port, SMPTE timed
|
||||
130 = /dev/smpte2 Third MIDI port, SMPTE timed
|
||||
131 = /dev/smpte3 Fourth MIDI port, SMPTE timed
|
||||
|
||||
35 block Slow memory ramdisk
|
||||
0 = /dev/slram Slow memory ramdisk
|
||||
|
||||
@ -828,6 +839,7 @@ Your cooperation is appreciated.
|
||||
16 = /dev/tap0 First Ethertap device
|
||||
...
|
||||
31 = /dev/tap15 16th Ethertap device
|
||||
|
||||
36 block MCA ESDI hard disk
|
||||
0 = /dev/eda First ESDI disk whole disk
|
||||
64 = /dev/edb Second ESDI disk whole disk
|
||||
@ -882,6 +894,7 @@ Your cooperation is appreciated.
|
||||
|
||||
40 char Matrox Meteor frame grabber {2.6}
|
||||
0 = /dev/mmetfgrab Matrox Meteor frame grabber
|
||||
|
||||
40 block Syquest EZ135 parallel port removable drive
|
||||
0 = /dev/eza Parallel EZ135 drive, whole disk
|
||||
|
||||
@ -893,6 +906,7 @@ Your cooperation is appreciated.
|
||||
|
||||
41 char Yet Another Micro Monitor
|
||||
0 = /dev/yamm Yet Another Micro Monitor
|
||||
|
||||
41 block MicroSolutions BackPack parallel port CD-ROM
|
||||
0 = /dev/bpcd BackPack CD-ROM
|
||||
|
||||
@ -901,6 +915,7 @@ Your cooperation is appreciated.
|
||||
the parallel port ATAPI CD-ROM driver at major number 46.
|
||||
|
||||
42 char Demo/sample use
|
||||
|
||||
42 block Demo/sample use
|
||||
|
||||
This number is intended for use in sample code, as
|
||||
@ -918,6 +933,7 @@ Your cooperation is appreciated.
|
||||
0 = /dev/ttyI0 First virtual modem
|
||||
...
|
||||
63 = /dev/ttyI63 64th virtual modem
|
||||
|
||||
43 block Network block devices
|
||||
0 = /dev/nb0 First network block device
|
||||
1 = /dev/nb1 Second network block device
|
||||
@ -934,12 +950,13 @@ Your cooperation is appreciated.
|
||||
0 = /dev/cui0 Callout device for ttyI0
|
||||
...
|
||||
63 = /dev/cui63 Callout device for ttyI63
|
||||
|
||||
44 block Flash Translation Layer (FTL) filesystems
|
||||
0 = /dev/ftla FTL on first Memory Technology Device
|
||||
16 = /dev/ftlb FTL on second Memory Technology Device
|
||||
32 = /dev/ftlc FTL on third Memory Technology Device
|
||||
...
|
||||
240 = /dev/ftlp FTL on 16th Memory Technology Device
|
||||
240 = /dev/ftlp FTL on 16th Memory Technology Device
|
||||
|
||||
Partitions are handled in the same way as for IDE
|
||||
disks (see major number 3) except that the partition
|
||||
@ -958,6 +975,7 @@ Your cooperation is appreciated.
|
||||
191 = /dev/ippp63 64th SyncPPP device
|
||||
|
||||
255 = /dev/isdninfo ISDN monitor interface
|
||||
|
||||
45 block Parallel port IDE disk devices
|
||||
0 = /dev/pda First parallel port IDE disk
|
||||
16 = /dev/pdb Second parallel port IDE disk
|
||||
@ -1044,6 +1062,7 @@ Your cooperation is appreciated.
|
||||
1 = /dev/dcbri1 Second DataComm card
|
||||
2 = /dev/dcbri2 Third DataComm card
|
||||
3 = /dev/dcbri3 Fourth DataComm card
|
||||
|
||||
52 block Mylex DAC960 PCI RAID controller; fifth controller
|
||||
0 = /dev/rd/c4d0 First disk, whole disk
|
||||
8 = /dev/rd/c4d1 Second disk, whole disk
|
||||
@ -1093,7 +1112,8 @@ Your cooperation is appreciated.
|
||||
|
||||
55 char DSP56001 digital signal processor
|
||||
0 = /dev/dsp56k First DSP56001
|
||||
55 block Mylex DAC960 PCI RAID controller; eigth controller
|
||||
|
||||
55 block Mylex DAC960 PCI RAID controller; eighth controller
|
||||
0 = /dev/rd/c7d0 First disk, whole disk
|
||||
8 = /dev/rd/c7d1 Second disk, whole disk
|
||||
...
|
||||
@ -1130,6 +1150,7 @@ Your cooperation is appreciated.
|
||||
0 = /dev/cup0 Callout device for ttyP0
|
||||
1 = /dev/cup1 Callout device for ttyP1
|
||||
...
|
||||
|
||||
58 block Reserved for logical volume manager
|
||||
|
||||
59 char sf firewall package
|
||||
@ -1149,6 +1170,7 @@ Your cooperation is appreciated.
|
||||
NAMING CONFLICT -- PROPOSED REVISED NAME /dev/rpda0 etc
|
||||
|
||||
60-63 char LOCAL/EXPERIMENTAL USE
|
||||
|
||||
60-63 block LOCAL/EXPERIMENTAL USE
|
||||
Allocated for local/experimental use. For devices not
|
||||
assigned official numbers, these ranges should be
|
||||
@ -1434,7 +1456,6 @@ Your cooperation is appreciated.
|
||||
DAC960 (see major number 48) except that the limit on
|
||||
partitions is 15.
|
||||
|
||||
|
||||
78 char PAM Software's multimodem boards
|
||||
0 = /dev/ttyM0 First PAM modem
|
||||
1 = /dev/ttyM1 Second PAM modem
|
||||
@ -1450,13 +1471,12 @@ Your cooperation is appreciated.
|
||||
DAC960 (see major number 48) except that the limit on
|
||||
partitions is 15.
|
||||
|
||||
|
||||
79 char PAM Software's multimodem boards - alternate devices
|
||||
0 = /dev/cum0 Callout device for ttyM0
|
||||
1 = /dev/cum1 Callout device for ttyM1
|
||||
...
|
||||
|
||||
79 block Compaq Intelligent Drive Array, eigth controller
|
||||
79 block Compaq Intelligent Drive Array, eighth controller
|
||||
0 = /dev/ida/c7d0 First logical drive whole disk
|
||||
16 = /dev/ida/c7d1 Second logical drive whole disk
|
||||
...
|
||||
@ -1466,7 +1486,6 @@ Your cooperation is appreciated.
|
||||
DAC960 (see major number 48) except that the limit on
|
||||
partitions is 15.
|
||||
|
||||
|
||||
80 char Photometrics AT200 CCD camera
|
||||
0 = /dev/at200 Photometrics AT200 CCD camera
|
||||
|
||||
@ -1679,7 +1698,7 @@ Your cooperation is appreciated.
|
||||
1 = /dev/dcxx1 Second capture card
|
||||
...
|
||||
|
||||
94 block IBM S/390 DASD block storage
|
||||
94 block IBM S/390 DASD block storage
|
||||
0 = /dev/dasda First DASD device, major
|
||||
1 = /dev/dasda1 First DASD device, block 1
|
||||
2 = /dev/dasda2 First DASD device, block 2
|
||||
@ -1695,7 +1714,7 @@ Your cooperation is appreciated.
|
||||
1 = /dev/ipnat NAT control device/log file
|
||||
2 = /dev/ipstate State information log file
|
||||
3 = /dev/ipauth Authentication control device/log file
|
||||
...
|
||||
...
|
||||
|
||||
96 char Parallel port ATAPI tape devices
|
||||
0 = /dev/pt0 First parallel port ATAPI tape
|
||||
@ -1705,7 +1724,7 @@ Your cooperation is appreciated.
|
||||
129 = /dev/npt1 Second p.p. ATAPI tape, no rewind
|
||||
...
|
||||
|
||||
96 block Inverse NAND Flash Translation Layer
|
||||
96 block Inverse NAND Flash Translation Layer
|
||||
0 = /dev/inftla First INFTL layer
|
||||
16 = /dev/inftlb Second INFTL layer
|
||||
...
|
||||
@ -1900,7 +1919,7 @@ Your cooperation is appreciated.
|
||||
1 = /dev/av1 Second A/V card
|
||||
...
|
||||
|
||||
111 block Compaq Next Generation Drive Array, eigth controller
|
||||
111 block Compaq Next Generation Drive Array, eighth controller
|
||||
0 = /dev/cciss/c7d0 First logical drive, whole disk
|
||||
16 = /dev/cciss/c7d1 Second logical drive, whole disk
|
||||
...
|
||||
@ -1937,7 +1956,6 @@ Your cooperation is appreciated.
|
||||
...
|
||||
|
||||
113 block IBM iSeries virtual CD-ROM
|
||||
|
||||
0 = /dev/iseries/vcda First virtual CD-ROM
|
||||
1 = /dev/iseries/vcdb Second virtual CD-ROM
|
||||
...
|
||||
@ -2005,7 +2023,7 @@ Your cooperation is appreciated.
|
||||
116 char Advanced Linux Sound Driver (ALSA)
|
||||
|
||||
116 block MicroMemory battery backed RAM adapter (NVRAM)
|
||||
Supports 16 boards, 15 paritions each.
|
||||
Supports 16 boards, 15 partitions each.
|
||||
Requested by neilb at cse.unsw.edu.au.
|
||||
|
||||
0 = /dev/umem/d0 Whole of first board
|
||||
@ -2059,11 +2077,12 @@ Your cooperation is appreciated.
|
||||
...
|
||||
|
||||
119 char VMware virtual network control
|
||||
0 = /dev/vnet0 1st virtual network
|
||||
1 = /dev/vnet1 2nd virtual network
|
||||
0 = /dev/vmnet0 1st virtual network
|
||||
1 = /dev/vmnet1 2nd virtual network
|
||||
...
|
||||
|
||||
120-127 char LOCAL/EXPERIMENTAL USE
|
||||
|
||||
120-127 block LOCAL/EXPERIMENTAL USE
|
||||
Allocated for local/experimental use. For devices not
|
||||
assigned official numbers, these ranges should be
|
||||
@ -2075,7 +2094,6 @@ Your cooperation is appreciated.
|
||||
nodes; instead they should be accessed through the
|
||||
/dev/ptmx cloning interface.
|
||||
|
||||
|
||||
128 block SCSI disk devices (128-143)
|
||||
0 = /dev/sddy 129th SCSI disk whole disk
|
||||
16 = /dev/sddz 130th SCSI disk whole disk
|
||||
@ -2087,7 +2105,6 @@ Your cooperation is appreciated.
|
||||
disks (see major number 3) except that the limit on
|
||||
partitions is 15.
|
||||
|
||||
|
||||
129 block SCSI disk devices (144-159)
|
||||
0 = /dev/sdeo 145th SCSI disk whole disk
|
||||
16 = /dev/sdep 146th SCSI disk whole disk
|
||||
@ -2123,7 +2140,6 @@ Your cooperation is appreciated.
|
||||
disks (see major number 3) except that the limit on
|
||||
partitions is 15.
|
||||
|
||||
|
||||
132 block SCSI disk devices (192-207)
|
||||
0 = /dev/sdgk 193rd SCSI disk whole disk
|
||||
16 = /dev/sdgl 194th SCSI disk whole disk
|
||||
@ -2135,7 +2151,6 @@ Your cooperation is appreciated.
|
||||
disks (see major number 3) except that the limit on
|
||||
partitions is 15.
|
||||
|
||||
|
||||
133 block SCSI disk devices (208-223)
|
||||
0 = /dev/sdha 209th SCSI disk whole disk
|
||||
16 = /dev/sdhb 210th SCSI disk whole disk
|
||||
@ -2147,7 +2162,6 @@ Your cooperation is appreciated.
|
||||
disks (see major number 3) except that the limit on
|
||||
partitions is 15.
|
||||
|
||||
|
||||
134 block SCSI disk devices (224-239)
|
||||
0 = /dev/sdhq 225th SCSI disk whole disk
|
||||
16 = /dev/sdhr 226th SCSI disk whole disk
|
||||
@ -2159,7 +2173,6 @@ Your cooperation is appreciated.
|
||||
disks (see major number 3) except that the limit on
|
||||
partitions is 15.
|
||||
|
||||
|
||||
135 block SCSI disk devices (240-255)
|
||||
0 = /dev/sdig 241st SCSI disk whole disk
|
||||
16 = /dev/sdih 242nd SCSI disk whole disk
|
||||
@ -2171,7 +2184,6 @@ Your cooperation is appreciated.
|
||||
disks (see major number 3) except that the limit on
|
||||
partitions is 15.
|
||||
|
||||
|
||||
136-143 char Unix98 PTY slaves
|
||||
0 = /dev/pts/0 First Unix98 pseudo-TTY
|
||||
1 = /dev/pts/1 Second Unix98 pesudo-TTY
|
||||
@ -2384,6 +2396,7 @@ Your cooperation is appreciated.
|
||||
...
|
||||
|
||||
159 char RESERVED
|
||||
|
||||
159 block RESERVED
|
||||
|
||||
160 char General Purpose Instrument Bus (GPIB)
|
||||
@ -2427,7 +2440,7 @@ Your cooperation is appreciated.
|
||||
|
||||
Partitions are handled in the same way as for IDE
|
||||
disks (see major number 3) except that the limit on
|
||||
partitions is 31.
|
||||
partitions is 31.
|
||||
|
||||
162 char Raw block device interface
|
||||
0 = /dev/rawctl Raw I/O control device
|
||||
@ -2483,7 +2496,6 @@ Your cooperation is appreciated.
|
||||
|
||||
171 char Reserved for IEEE 1394 (Firewire)
|
||||
|
||||
|
||||
172 char Moxa Intellio serial card
|
||||
0 = /dev/ttyMX0 First Moxa port
|
||||
1 = /dev/ttyMX1 Second Moxa port
|
||||
@ -2555,7 +2567,7 @@ Your cooperation is appreciated.
|
||||
132 = /dev/usb/idmouse ID Mouse (fingerprint scanner) device
|
||||
133 = /dev/usb/sisusbvga1 First SiSUSB VGA device
|
||||
...
|
||||
140 = /dev/usb/sisusbvga8 Eigth SISUSB VGA device
|
||||
140 = /dev/usb/sisusbvga8 Eighth SISUSB VGA device
|
||||
144 = /dev/usb/lcd USB LCD device
|
||||
160 = /dev/usb/legousbtower0 1st USB Legotower device
|
||||
...
|
||||
@ -2568,7 +2580,7 @@ Your cooperation is appreciated.
|
||||
0 = /dev/uba First USB block device
|
||||
8 = /dev/ubb Second USB block device
|
||||
16 = /dev/ubc Third USB block device
|
||||
...
|
||||
...
|
||||
|
||||
181 char Conrad Electronic parallel port radio clocks
|
||||
0 = /dev/pcfclock0 First Conrad radio clock
|
||||
@ -2654,7 +2666,7 @@ Your cooperation is appreciated.
|
||||
32 = /dev/mvideo/status2 Third device
|
||||
...
|
||||
...
|
||||
240 = /dev/mvideo/status15 16th device
|
||||
240 = /dev/mvideo/status15 16th device
|
||||
...
|
||||
|
||||
195 char Nvidia graphics devices
|
||||
@ -2792,6 +2804,10 @@ Your cooperation is appreciated.
|
||||
...
|
||||
185 = /dev/ttyNX15 Hilscher netX serial port 15
|
||||
186 = /dev/ttyJ0 JTAG1 DCC protocol based serial port emulation
|
||||
187 = /dev/ttyUL0 Xilinx uartlite - port 0
|
||||
...
|
||||
190 = /dev/ttyUL3 Xilinx uartlite - port 3
|
||||
191 = /dev/xvc0 Xen virtual console - port 0
|
||||
|
||||
205 char Low-density serial ports (alternate device)
|
||||
0 = /dev/culu0 Callout device for ttyLU0
|
||||
@ -2829,7 +2845,6 @@ Your cooperation is appreciated.
|
||||
82 = /dev/cuvr0 Callout device for ttyVR0
|
||||
83 = /dev/cuvr1 Callout device for ttyVR1
|
||||
|
||||
|
||||
206 char OnStream SC-x0 tape devices
|
||||
0 = /dev/osst0 First OnStream SCSI tape, mode 0
|
||||
1 = /dev/osst1 Second OnStream SCSI tape, mode 0
|
||||
@ -2919,7 +2934,6 @@ Your cooperation is appreciated.
|
||||
...
|
||||
|
||||
212 char LinuxTV.org DVB driver subsystem
|
||||
|
||||
0 = /dev/dvb/adapter0/video0 first video decoder of first card
|
||||
1 = /dev/dvb/adapter0/audio0 first audio decoder of first card
|
||||
2 = /dev/dvb/adapter0/sec0 (obsolete/unused)
|
||||
@ -3005,9 +3019,9 @@ Your cooperation is appreciated.
|
||||
2 = /dev/3270/tub2 Second 3270 terminal
|
||||
...
|
||||
|
||||
229 char IBM iSeries virtual console
|
||||
0 = /dev/iseries/vtty0 First console port
|
||||
1 = /dev/iseries/vtty1 Second console port
|
||||
229 char IBM iSeries/pSeries virtual console
|
||||
0 = /dev/hvc0 First console port
|
||||
1 = /dev/hvc1 Second console port
|
||||
...
|
||||
|
||||
230 char IBM iSeries virtual tape
|
||||
@ -3080,18 +3094,20 @@ Your cooperation is appreciated.
|
||||
234-239 UNASSIGNED
|
||||
|
||||
240-254 char LOCAL/EXPERIMENTAL USE
|
||||
|
||||
240-254 block LOCAL/EXPERIMENTAL USE
|
||||
Allocated for local/experimental use. For devices not
|
||||
assigned official numbers, these ranges should be
|
||||
used in order to avoid conflicting with future assignments.
|
||||
|
||||
255 char RESERVED
|
||||
|
||||
255 block RESERVED
|
||||
|
||||
This major is reserved to assist the expansion to a
|
||||
larger number space. No device nodes with this major
|
||||
should ever be created on the filesystem.
|
||||
(This is probaly not true anymore, but I'll leave it
|
||||
(This is probably not true anymore, but I'll leave it
|
||||
for now /Torben)
|
||||
|
||||
---LARGE MAJORS!!!!!---
|
||||
@ -3112,7 +3128,20 @@ Your cooperation is appreciated.
|
||||
257 char Phoenix Technologies Cryptographic Services Driver
|
||||
0 = /dev/ptlsec Crypto Services Driver
|
||||
|
||||
257 block SSFDC Flash Translation Layer filesystem
|
||||
0 = /dev/ssfdca First SSFDC layer
|
||||
8 = /dev/ssfdcb Second SSFDC layer
|
||||
16 = /dev/ssfdcc Third SSFDC layer
|
||||
24 = /dev/ssfdcd 4th SSFDC layer
|
||||
32 = /dev/ssfdce 5th SSFDC layer
|
||||
40 = /dev/ssfdcf 6th SSFDC layer
|
||||
48 = /dev/ssfdcg 7th SSFDC layer
|
||||
56 = /dev/ssfdch 8th SSFDC layer
|
||||
|
||||
258 block ROM/Flash read-only translation layer
|
||||
0 = /dev/blockrom0 First ROM card's translation layer interface
|
||||
1 = /dev/blockrom1 Second ROM card's translation layer interface
|
||||
...
|
||||
|
||||
**** ADDITIONAL /dev DIRECTORY ENTRIES
|
||||
|
||||
@ -3202,7 +3231,7 @@ for a session; this includes virtual consoles, serial ports, and
|
||||
pseudoterminals (PTYs).
|
||||
|
||||
All terminal devices share a common set of capabilities known as line
|
||||
diciplines; these include the common terminal line dicipline as well
|
||||
disciplines; these include the common terminal line discipline as well
|
||||
as SLIP and PPP modes.
|
||||
|
||||
All terminal devices are named similarly; this section explains the
|
||||
@ -3282,7 +3311,7 @@ port TTY, for which no alternate device would exist.
|
||||
Pseudoterminals (PTYs)
|
||||
|
||||
Pseudoterminals, or PTYs, are used to create login sessions or provide
|
||||
other capabilities requiring a TTY line dicipline (including SLIP or
|
||||
other capabilities requiring a TTY line discipline (including SLIP or
|
||||
PPP capability) to arbitrary data-generation processes. Each PTY has
|
||||
a master side, named /dev/pty[p-za-e][0-9a-f], and a slave side, named
|
||||
/dev/tty[p-za-e][0-9a-f]. The kernel arbitrates the use of PTYs by
|
||||
|
@ -12,7 +12,7 @@ device. The following device classes have been identified:
|
||||
|
||||
Each device class defines a set of semantics and a programming interface
|
||||
that devices of that class adhere to. Device drivers are the
|
||||
implemention of that programming interface for a particular device on
|
||||
implementation of that programming interface for a particular device on
|
||||
a particular bus.
|
||||
|
||||
Device classes are agnostic with respect to what bus a device resides
|
||||
|
@ -178,7 +178,7 @@ the driver to that device.
|
||||
|
||||
A driver's probe() may return a negative errno value to indicate that
|
||||
the driver did not bind to this device, in which case it should have
|
||||
released all reasources it allocated.
|
||||
released all resources it allocated.
|
||||
|
||||
int (*remove) (struct device * dev);
|
||||
|
||||
|
@ -57,7 +57,7 @@ the two.
|
||||
|
||||
The PCI bus layer freely accesses the fields of struct device. It knows about
|
||||
the structure of struct pci_dev, and it should know the structure of struct
|
||||
device. Individual PCI device drivers that have been converted the the current
|
||||
device. Individual PCI device drivers that have been converted to the current
|
||||
driver model generally do not and should not touch the fields of struct device,
|
||||
unless there is a strong compelling reason to do so.
|
||||
|
||||
|
@ -1,99 +1,131 @@
|
||||
Platform Devices and Drivers
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
See <linux/platform_device.h> for the driver model interface to the
|
||||
platform bus: platform_device, and platform_driver. This pseudo-bus
|
||||
is used to connect devices on busses with minimal infrastructure,
|
||||
like those used to integrate peripherals on many system-on-chip
|
||||
processors, or some "legacy" PC interconnects; as opposed to large
|
||||
formally specified ones like PCI or USB.
|
||||
|
||||
|
||||
Platform devices
|
||||
~~~~~~~~~~~~~~~~
|
||||
Platform devices are devices that typically appear as autonomous
|
||||
entities in the system. This includes legacy port-based devices and
|
||||
host bridges to peripheral buses.
|
||||
host bridges to peripheral buses, and most controllers integrated
|
||||
into system-on-chip platforms. What they usually have in common
|
||||
is direct addressing from a CPU bus. Rarely, a platform_device will
|
||||
be connected through a segment of some other kind of bus; but its
|
||||
registers will still be directly addressible.
|
||||
|
||||
Platform devices are given a name, used in driver binding, and a
|
||||
list of resources such as addresses and IRQs.
|
||||
|
||||
struct platform_device {
|
||||
const char *name;
|
||||
u32 id;
|
||||
struct device dev;
|
||||
u32 num_resources;
|
||||
struct resource *resource;
|
||||
};
|
||||
|
||||
|
||||
Platform drivers
|
||||
~~~~~~~~~~~~~~~~
|
||||
Drivers for platform devices are typically very simple and
|
||||
unstructured. Either the device was present at a particular I/O port
|
||||
and the driver was loaded, or it was not. There was no possibility
|
||||
of hotplugging or alternative discovery besides probing at a specific
|
||||
I/O address and expecting a specific response.
|
||||
Platform drivers follow the standard driver model convention, where
|
||||
discovery/enumeration is handled outside the drivers, and drivers
|
||||
provide probe() and remove() methods. They support power management
|
||||
and shutdown notifications using the standard conventions.
|
||||
|
||||
struct platform_driver {
|
||||
int (*probe)(struct platform_device *);
|
||||
int (*remove)(struct platform_device *);
|
||||
void (*shutdown)(struct platform_device *);
|
||||
int (*suspend)(struct platform_device *, pm_message_t state);
|
||||
int (*suspend_late)(struct platform_device *, pm_message_t state);
|
||||
int (*resume_early)(struct platform_device *);
|
||||
int (*resume)(struct platform_device *);
|
||||
struct device_driver driver;
|
||||
};
|
||||
|
||||
Note that probe() should general verify that the specified device hardware
|
||||
actually exists; sometimes platform setup code can't be sure. The probing
|
||||
can use device resources, including clocks, and device platform_data.
|
||||
|
||||
Platform drivers register themselves the normal way:
|
||||
|
||||
int platform_driver_register(struct platform_driver *drv);
|
||||
|
||||
Or, in common situations where the device is known not to be hot-pluggable,
|
||||
the probe() routine can live in an init section to reduce the driver's
|
||||
runtime memory footprint:
|
||||
|
||||
int platform_driver_probe(struct platform_driver *drv,
|
||||
int (*probe)(struct platform_device *))
|
||||
|
||||
|
||||
Other Architectures, Modern Firmware, and new Platforms
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
These devices are not always at the legacy I/O ports. This is true on
|
||||
other architectures and on some modern architectures. In most cases,
|
||||
the drivers are modified to discover the devices at other well-known
|
||||
ports for the given platform. However, the firmware in these systems
|
||||
does usually know where exactly these devices reside, and in some
|
||||
cases, it's the only way of discovering them.
|
||||
Device Enumeration
|
||||
~~~~~~~~~~~~~~~~~~
|
||||
As a rule, platform specific (and often board-specific) setup code wil
|
||||
register platform devices:
|
||||
|
||||
int platform_device_register(struct platform_device *pdev);
|
||||
|
||||
int platform_add_devices(struct platform_device **pdevs, int ndev);
|
||||
|
||||
The general rule is to register only those devices that actually exist,
|
||||
but in some cases extra devices might be registered. For example, a kernel
|
||||
might be configured to work with an external network adapter that might not
|
||||
be populated on all boards, or likewise to work with an integrated controller
|
||||
that some boards might not hook up to any peripherals.
|
||||
|
||||
In some cases, boot firmware will export tables describing the devices
|
||||
that are populated on a given board. Without such tables, often the
|
||||
only way for system setup code to set up the correct devices is to build
|
||||
a kernel for a specific target board. Such board-specific kernels are
|
||||
common with embedded and custom systems development.
|
||||
|
||||
In many cases, the memory and IRQ resources associated with the platform
|
||||
device are not enough to let the device's driver work. Board setup code
|
||||
will often provide additional information using the device's platform_data
|
||||
field to hold additional information.
|
||||
|
||||
Embedded systems frequently need one or more clocks for platform devices,
|
||||
which are normally kept off until they're actively needed (to save power).
|
||||
System setup also associates those clocks with the device, so that that
|
||||
calls to clk_get(&pdev->dev, clock_name) return them as needed.
|
||||
|
||||
|
||||
The Platform Bus
|
||||
~~~~~~~~~~~~~~~~
|
||||
A platform bus has been created to deal with these issues. First and
|
||||
foremost, it groups all the legacy devices under a common bus, and
|
||||
gives them a common parent if they don't already have one.
|
||||
Device Naming and Driver Binding
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
The platform_device.dev.bus_id is the canonical name for the devices.
|
||||
It's built from two components:
|
||||
|
||||
But, besides the organizational benefits, the platform bus can also
|
||||
accommodate firmware-based enumeration.
|
||||
* platform_device.name ... which is also used to for driver matching.
|
||||
|
||||
* platform_device.id ... the device instance number, or else "-1"
|
||||
to indicate there's only one.
|
||||
|
||||
Device Discovery
|
||||
~~~~~~~~~~~~~~~~
|
||||
The platform bus has no concept of probing for devices. Devices
|
||||
discovery is left up to either the legacy drivers or the
|
||||
firmware. These entities are expected to notify the platform of
|
||||
devices that it discovers via the bus's add() callback:
|
||||
These are catenated, so name/id "serial"/0 indicates bus_id "serial.0", and
|
||||
"serial/3" indicates bus_id "serial.3"; both would use the platform_driver
|
||||
named "serial". While "my_rtc"/-1 would be bus_id "my_rtc" (no instance id)
|
||||
and use the platform_driver called "my_rtc".
|
||||
|
||||
platform_bus.add(parent,bus_id).
|
||||
Driver binding is performed automatically by the driver core, invoking
|
||||
driver probe() after finding a match between device and driver. If the
|
||||
probe() succeeds, the driver and device are bound as usual. There are
|
||||
three different ways to find such a match:
|
||||
|
||||
- Whenever a device is registered, the drivers for that bus are
|
||||
checked for matches. Platform devices should be registered very
|
||||
early during system boot.
|
||||
|
||||
Bus IDs
|
||||
~~~~~~~
|
||||
Bus IDs are the canonical names for the devices. There is no globally
|
||||
standard addressing mechanism for legacy devices. In the IA-32 world,
|
||||
we have Pnp IDs to use, as well as the legacy I/O ports. However,
|
||||
neither tell what the device really is or have any meaning on other
|
||||
platforms.
|
||||
- When a driver is registered using platform_driver_register(), all
|
||||
unbound devices on that bus are checked for matches. Drivers
|
||||
usually register later during booting, or by module loading.
|
||||
|
||||
Since both PnP IDs and the legacy I/O ports (and other standard I/O
|
||||
ports for specific devices) have a 1:1 mapping, we map the
|
||||
platform-specific name or identifier to a generic name (at least
|
||||
within the scope of the kernel).
|
||||
|
||||
For example, a serial driver might find a device at I/O 0x3f8. The
|
||||
ACPI firmware might also discover a device with PnP ID (_HID)
|
||||
PNP0501. Both correspond to the same device and should be mapped to the
|
||||
canonical name 'serial'.
|
||||
|
||||
The bus_id field should be a concatenation of the canonical name and
|
||||
the instance of that type of device. For example, the device at I/O
|
||||
port 0x3f8 should have a bus_id of "serial0". This places the
|
||||
responsibility of enumerating devices of a particular type up to the
|
||||
discovery mechanism. But, they are the entity that should know best
|
||||
(as opposed to the platform bus driver).
|
||||
|
||||
|
||||
Drivers
|
||||
~~~~~~~
|
||||
Drivers for platform devices should have a name that is the same as
|
||||
the canonical name of the devices they support. This allows the
|
||||
platform bus driver to do simple matching with the basic data
|
||||
structures to determine if a driver supports a certain device.
|
||||
|
||||
For example, a legacy serial driver should have a name of 'serial' and
|
||||
register itself with the platform bus.
|
||||
|
||||
|
||||
Driver Binding
|
||||
~~~~~~~~~~~~~~
|
||||
Legacy drivers assume they are bound to the device once they start up
|
||||
and probe an I/O port. Divorcing them from this will be a difficult
|
||||
process. However, that shouldn't prevent us from implementing
|
||||
firmware-based enumeration.
|
||||
|
||||
The firmware should notify the platform bus about devices before the
|
||||
legacy drivers have had a chance to load. Once the drivers are loaded,
|
||||
they driver model core will attempt to bind the driver to any
|
||||
previously-discovered devices. Once that has happened, it will be free
|
||||
to discover any other devices it pleases.
|
||||
- Registering a driver using platform_driver_probe() works just like
|
||||
using platform_driver_register(), except that the the driver won't
|
||||
be probed later if another device registers. (Which is OK, since
|
||||
this interface is only for use with non-hotpluggable devices.)
|
||||
|
||||
|
@ -92,7 +92,7 @@ struct device represents a single device. It mainly contains metadata
|
||||
describing the relationship the device has to other entities.
|
||||
|
||||
|
||||
- Embedd a struct device in the bus-specific device type.
|
||||
- Embed a struct device in the bus-specific device type.
|
||||
|
||||
|
||||
struct pci_dev {
|
||||
|
@ -45,9 +45,9 @@ Assumptions and Introduction
|
||||
by circuitry on the card and is often presented uncompressed.
|
||||
For a PAL TV signal encoded at a resolution of 768x576 24-bit
|
||||
color pixels over 25 frames per second - a fair amount of data
|
||||
is generated and must be proceesed by the PC before it can be
|
||||
is generated and must be processed by the PC before it can be
|
||||
displayed on the video monitor screen. Some Analogue TV cards
|
||||
for PC's have onboard MPEG2 encoders which permit the raw
|
||||
for PCs have onboard MPEG2 encoders which permit the raw
|
||||
digital data stream to be presented to the PC in an encoded
|
||||
and compressed form - similar to the form that is used in
|
||||
Digital TV.
|
||||
|
@ -5,7 +5,7 @@ Hardware supported by the linuxtv.org DVB drivers
|
||||
frontends (i.e. tuner / demodulator units) used, usually without
|
||||
changing the product name, revision number or specs. Some cards
|
||||
are also available in versions with different frontends for
|
||||
DVB-S/DVB-C/DVB-T. Thus the frontend drivers are listed seperately.
|
||||
DVB-S/DVB-C/DVB-T. Thus the frontend drivers are listed separately.
|
||||
|
||||
Note 1: There is no guarantee that every frontend driver works
|
||||
out of the box with every card, because of different wiring.
|
||||
@ -22,10 +22,10 @@ o Frontends drivers:
|
||||
- ves1x93 : Alps BSRV2 (ves1893 demodulator) and dbox2 (ves1993)
|
||||
- cx24110 : Conexant HM1221/HM1811 (cx24110 or cx24106 demod, cx24108 PLL)
|
||||
- grundig_29504-491 : Grundig 29504-491 (Philips TDA8083 demodulator), tsa5522 PLL
|
||||
- mt312 : Zarlink mt312 or Mitel vp310 demodulator, sl1935 or tsa5059 PLL
|
||||
- mt312 : Zarlink mt312 or Mitel vp310 demodulator, sl1935 or tsa5059 PLLi, Technisat Sky2Pc with bios Rev. 2.3
|
||||
- stv0299 : Alps BSRU6 (tsa5059 PLL), LG TDQB-S00x (tsa5059 PLL),
|
||||
LG TDQF-S001F (sl1935 PLL), Philips SU1278 (tua6100 PLL),
|
||||
Philips SU1278SH (tsa5059 PLL), Samsung TBMU24112IMB
|
||||
Philips SU1278SH (tsa5059 PLL), Samsung TBMU24112IMB, Technisat Sky2Pc with bios Rev. 2.6
|
||||
DVB-C:
|
||||
- ves1820 : various (ves1820 demodulator, sp5659c or spXXXX PLL)
|
||||
- at76c651 : Atmel AT76c651(B) with DAT7021 PLL
|
||||
|
@ -32,7 +32,7 @@ This application requires the following to function properly as of now.
|
||||
descrambler to function,
|
||||
eg: $ ca_zap channels.conf "TMC"
|
||||
|
||||
(d) Hopeflly Enjoy your favourite subscribed channel as you do with
|
||||
(d) Hopefully enjoy your favourite subscribed channel as you do with
|
||||
a FTA card.
|
||||
|
||||
(3) Currently ca_zap, and dst_test, both are meant for demonstration
|
||||
@ -65,13 +65,13 @@ Modules that have been tested by this driver at present are
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
With the High Level CI approach any new card with almost any random
|
||||
architecture can be implemented with this style, the definitions
|
||||
insidethe switch statement can be easily adapted for any card, thereby
|
||||
inside the switch statement can be easily adapted for any card, thereby
|
||||
eliminating the need for any additional ioctls.
|
||||
|
||||
The disadvantage is that the driver/hardware has to manage the rest. For
|
||||
the application programmer it would be as simple as sending/receiving an
|
||||
array to/from the CI ioctls as defined in the Linux DVB API. No changes
|
||||
have been made in the API to accomodate this feature.
|
||||
have been made in the API to accommodate this feature.
|
||||
|
||||
|
||||
* Why the need for another CI interface ?
|
||||
@ -102,7 +102,7 @@ This CI interface follows the CI high level interface, which is not
|
||||
implemented by most applications. Hence this area is revisited.
|
||||
|
||||
This CI interface is quite different in the case that it tries to
|
||||
accomodate all other CI based devices, that fall into the other categories
|
||||
accommodate all other CI based devices, that fall into the other categories.
|
||||
|
||||
This means that this CI interface handles the EN50221 style tags in the
|
||||
Application layer only and no session management is taken care of by the
|
||||
|
@ -5,7 +5,7 @@ Some very frequently asked questions about linuxtv-dvb
|
||||
It's not a bug, it's a feature. Because the frontends have
|
||||
significant power requirements (and hence get very hot), they
|
||||
are powered down if they are unused (i.e. if the frontend device
|
||||
is closed). The dvb-core.o module paramter "dvb_shutdown_timeout"
|
||||
is closed). The dvb-core.o module parameter "dvb_shutdown_timeout"
|
||||
allow you to change the timeout (default 5 seconds). Setting the
|
||||
timeout to 0 disables the timeout feature.
|
||||
|
||||
@ -138,7 +138,7 @@ Some very frequently asked questions about linuxtv-dvb
|
||||
|
||||
- v4l2-common: common functions for Video4Linux-2 drivers
|
||||
|
||||
- v4l1-compat: backward compatiblity layer for Video4Linux-1 legacy
|
||||
- v4l1-compat: backward compatibility layer for Video4Linux-1 legacy
|
||||
applications
|
||||
|
||||
- dvb-core: DVB core module. This provides you with the
|
||||
@ -153,7 +153,7 @@ Some very frequently asked questions about linuxtv-dvb
|
||||
- video-buf: capture helper module for the saa7146_vv driver. This
|
||||
one is responsible to handle capture buffers.
|
||||
|
||||
- dvb-ttpci: The main driver for AV7110 based, full-featued
|
||||
- dvb-ttpci: The main driver for AV7110 based, full-featured
|
||||
DVB-S/C/T cards
|
||||
|
||||
eof
|
||||
|
77
Documentation/ecryptfs.txt
Normal file
77
Documentation/ecryptfs.txt
Normal file
@ -0,0 +1,77 @@
|
||||
eCryptfs: A stacked cryptographic filesystem for Linux
|
||||
|
||||
eCryptfs is free software. Please see the file COPYING for details.
|
||||
For documentation, please see the files in the doc/ subdirectory. For
|
||||
building and installation instructions please see the INSTALL file.
|
||||
|
||||
Maintainer: Phillip Hellewell
|
||||
Lead developer: Michael A. Halcrow <mhalcrow@us.ibm.com>
|
||||
Developers: Michael C. Thompson
|
||||
Kent Yoder
|
||||
Web Site: http://ecryptfs.sf.net
|
||||
|
||||
This software is currently undergoing development. Make sure to
|
||||
maintain a backup copy of any data you write into eCryptfs.
|
||||
|
||||
eCryptfs requires the userspace tools downloadable from the
|
||||
SourceForge site:
|
||||
|
||||
http://sourceforge.net/projects/ecryptfs/
|
||||
|
||||
Userspace requirements include:
|
||||
- David Howells' userspace keyring headers and libraries (version
|
||||
1.0 or higher), obtainable from
|
||||
http://people.redhat.com/~dhowells/keyutils/
|
||||
- Libgcrypt
|
||||
|
||||
|
||||
NOTES
|
||||
|
||||
In the beta/experimental releases of eCryptfs, when you upgrade
|
||||
eCryptfs, you should copy the files to an unencrypted location and
|
||||
then copy the files back into the new eCryptfs mount to migrate the
|
||||
files.
|
||||
|
||||
|
||||
MOUNT-WIDE PASSPHRASE
|
||||
|
||||
Create a new directory into which eCryptfs will write its encrypted
|
||||
files (i.e., /root/crypt). Then, create the mount point directory
|
||||
(i.e., /mnt/crypt). Now it's time to mount eCryptfs:
|
||||
|
||||
mount -t ecryptfs /root/crypt /mnt/crypt
|
||||
|
||||
You should be prompted for a passphrase and a salt (the salt may be
|
||||
blank).
|
||||
|
||||
Try writing a new file:
|
||||
|
||||
echo "Hello, World" > /mnt/crypt/hello.txt
|
||||
|
||||
The operation will complete. Notice that there is a new file in
|
||||
/root/crypt that is at least 12288 bytes in size (depending on your
|
||||
host page size). This is the encrypted underlying file for what you
|
||||
just wrote. To test reading, from start to finish, you need to clear
|
||||
the user session keyring:
|
||||
|
||||
keyctl clear @u
|
||||
|
||||
Then umount /mnt/crypt and mount again per the instructions given
|
||||
above.
|
||||
|
||||
cat /mnt/crypt/hello.txt
|
||||
|
||||
|
||||
NOTES
|
||||
|
||||
eCryptfs version 0.1 should only be mounted on (1) empty directories
|
||||
or (2) directories containing files only created by eCryptfs. If you
|
||||
mount a directory that has pre-existing files not created by eCryptfs,
|
||||
then behavior is undefined. Do not run eCryptfs in higher verbosity
|
||||
levels unless you are doing so for the sole purpose of debugging or
|
||||
development, since secret values will be written out to the system log
|
||||
in that case.
|
||||
|
||||
|
||||
Mike Halcrow
|
||||
mhalcrow@us.ibm.com
|
@ -18,7 +18,7 @@ The EISA infrastructure is made up of three parts :
|
||||
|
||||
- The bus code implements most of the generic code. It is shared
|
||||
among all the architectures that the EISA code runs on. It
|
||||
implements bus probing (detecting EISA cards avaible on the bus),
|
||||
implements bus probing (detecting EISA cards available on the bus),
|
||||
allocates I/O resources, allows fancy naming through sysfs, and
|
||||
offers interfaces for driver to register.
|
||||
|
||||
@ -62,7 +62,7 @@ res : root device I/O resource
|
||||
bus_base_addr : slot 0 address on this bus
|
||||
slots : max slot number to probe
|
||||
force_probe : Probe even when slot 0 is empty (no EISA mainboard)
|
||||
dma_mask : Default DMA mask. Usualy the bridge device dma_mask.
|
||||
dma_mask : Default DMA mask. Usually the bridge device dma_mask.
|
||||
bus_nr : unique bus id, set by eisa_root_register
|
||||
|
||||
** Driver :
|
||||
@ -84,7 +84,7 @@ struct eisa_driver {
|
||||
|
||||
id_table : an array of NULL terminated EISA id strings,
|
||||
followed by an empty string. Each string can
|
||||
optionnaly be paired with a driver-dependant value
|
||||
optionally be paired with a driver-dependant value
|
||||
(driver_data).
|
||||
|
||||
driver : a generic driver, such as described in
|
||||
|
@ -10,7 +10,7 @@ int verify_area(int type, const void * addr, unsigned long size)
|
||||
function (which has since been replaced by access_ok()).
|
||||
|
||||
This function verified that the memory area starting at address
|
||||
addr and of size size was accessible for the operation specified
|
||||
'addr' and of size 'size' was accessible for the operation specified
|
||||
in type (read or write). To do this, verify_read had to look up the
|
||||
virtual memory area (vma) that contained the address addr. In the
|
||||
normal case (correctly working program), this test was successful.
|
||||
|
4
Documentation/fault-injection/failcmd.sh
Normal file
4
Documentation/fault-injection/failcmd.sh
Normal file
@ -0,0 +1,4 @@
|
||||
#!/bin/bash
|
||||
|
||||
echo 1 > /proc/self/make-it-fail
|
||||
exec $*
|
31
Documentation/fault-injection/failmodule.sh
Normal file
31
Documentation/fault-injection/failmodule.sh
Normal file
@ -0,0 +1,31 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Usage: failmodule <failname> <modulename> [stacktrace-depth]
|
||||
#
|
||||
# <failname>: "failslab", "fail_alloc_page", or "fail_make_request"
|
||||
#
|
||||
# <modulename>: module name that you want to inject faults.
|
||||
#
|
||||
# [stacktrace-depth]: the maximum number of stacktrace walking allowed
|
||||
#
|
||||
|
||||
STACKTRACE_DEPTH=5
|
||||
if [ $# -gt 2 ]; then
|
||||
STACKTRACE_DEPTH=$3
|
||||
fi
|
||||
|
||||
if [ ! -d /debug/$1 ]; then
|
||||
echo "Fault-injection $1 does not exist" >&2
|
||||
exit 1
|
||||
fi
|
||||
if [ ! -d /sys/module/$2 ]; then
|
||||
echo "Module $2 does not exist" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Disable any fault injection
|
||||
echo 0 > /debug/$1/stacktrace-depth
|
||||
|
||||
echo `cat /sys/module/$2/sections/.text` > /debug/$1/require-start
|
||||
echo `cat /sys/module/$2/sections/.exit.text` > /debug/$1/require-end
|
||||
echo $STACKTRACE_DEPTH > /debug/$1/stacktrace-depth
|
225
Documentation/fault-injection/fault-injection.txt
Normal file
225
Documentation/fault-injection/fault-injection.txt
Normal file
@ -0,0 +1,225 @@
|
||||
Fault injection capabilities infrastructure
|
||||
===========================================
|
||||
|
||||
See also drivers/md/faulty.c and "every_nth" module option for scsi_debug.
|
||||
|
||||
|
||||
Available fault injection capabilities
|
||||
--------------------------------------
|
||||
|
||||
o failslab
|
||||
|
||||
injects slab allocation failures. (kmalloc(), kmem_cache_alloc(), ...)
|
||||
|
||||
o fail_page_alloc
|
||||
|
||||
injects page allocation failures. (alloc_pages(), get_free_pages(), ...)
|
||||
|
||||
o fail_make_request
|
||||
|
||||
injects disk IO errors on devices permitted by setting
|
||||
/sys/block/<device>/make-it-fail or
|
||||
/sys/block/<device>/<partition>/make-it-fail. (generic_make_request())
|
||||
|
||||
Configure fault-injection capabilities behavior
|
||||
-----------------------------------------------
|
||||
|
||||
o debugfs entries
|
||||
|
||||
fault-inject-debugfs kernel module provides some debugfs entries for runtime
|
||||
configuration of fault-injection capabilities.
|
||||
|
||||
- /debug/fail*/probability:
|
||||
|
||||
likelihood of failure injection, in percent.
|
||||
Format: <percent>
|
||||
|
||||
Note that one-failure-per-hundred is a very high error rate
|
||||
for some testcases. Consider setting probability=100 and configure
|
||||
/debug/fail*/interval for such testcases.
|
||||
|
||||
- /debug/fail*/interval:
|
||||
|
||||
specifies the interval between failures, for calls to
|
||||
should_fail() that pass all the other tests.
|
||||
|
||||
Note that if you enable this, by setting interval>1, you will
|
||||
probably want to set probability=100.
|
||||
|
||||
- /debug/fail*/times:
|
||||
|
||||
specifies how many times failures may happen at most.
|
||||
A value of -1 means "no limit".
|
||||
|
||||
- /debug/fail*/space:
|
||||
|
||||
specifies an initial resource "budget", decremented by "size"
|
||||
on each call to should_fail(,size). Failure injection is
|
||||
suppressed until "space" reaches zero.
|
||||
|
||||
- /debug/fail*/verbose
|
||||
|
||||
Format: { 0 | 1 | 2 }
|
||||
specifies the verbosity of the messages when failure is
|
||||
injected. '0' means no messages; '1' will print only a single
|
||||
log line per failure; '2' will print a call trace too -- useful
|
||||
to debug the problems revealed by fault injection.
|
||||
|
||||
- /debug/fail*/task-filter:
|
||||
|
||||
Format: { 'Y' | 'N' }
|
||||
A value of 'N' disables filtering by process (default).
|
||||
Any positive value limits failures to only processes indicated by
|
||||
/proc/<pid>/make-it-fail==1.
|
||||
|
||||
- /debug/fail*/require-start:
|
||||
- /debug/fail*/require-end:
|
||||
- /debug/fail*/reject-start:
|
||||
- /debug/fail*/reject-end:
|
||||
|
||||
specifies the range of virtual addresses tested during
|
||||
stacktrace walking. Failure is injected only if some caller
|
||||
in the walked stacktrace lies within the required range, and
|
||||
none lies within the rejected range.
|
||||
Default required range is [0,ULONG_MAX) (whole of virtual address space).
|
||||
Default rejected range is [0,0).
|
||||
|
||||
- /debug/fail*/stacktrace-depth:
|
||||
|
||||
specifies the maximum stacktrace depth walked during search
|
||||
for a caller within [require-start,require-end) OR
|
||||
[reject-start,reject-end).
|
||||
|
||||
- /debug/fail_page_alloc/ignore-gfp-highmem:
|
||||
|
||||
Format: { 'Y' | 'N' }
|
||||
default is 'N', setting it to 'Y' won't inject failures into
|
||||
highmem/user allocations.
|
||||
|
||||
- /debug/failslab/ignore-gfp-wait:
|
||||
- /debug/fail_page_alloc/ignore-gfp-wait:
|
||||
|
||||
Format: { 'Y' | 'N' }
|
||||
default is 'N', setting it to 'Y' will inject failures
|
||||
only into non-sleep allocations (GFP_ATOMIC allocations).
|
||||
|
||||
o Boot option
|
||||
|
||||
In order to inject faults while debugfs is not available (early boot time),
|
||||
use the boot option:
|
||||
|
||||
failslab=
|
||||
fail_page_alloc=
|
||||
fail_make_request=<interval>,<probability>,<space>,<times>
|
||||
|
||||
How to add new fault injection capability
|
||||
-----------------------------------------
|
||||
|
||||
o #include <linux/fault-inject.h>
|
||||
|
||||
o define the fault attributes
|
||||
|
||||
DECLARE_FAULT_INJECTION(name);
|
||||
|
||||
Please see the definition of struct fault_attr in fault-inject.h
|
||||
for details.
|
||||
|
||||
o provide a way to configure fault attributes
|
||||
|
||||
- boot option
|
||||
|
||||
If you need to enable the fault injection capability from boot time, you can
|
||||
provide boot option to configure it. There is a helper function for it:
|
||||
|
||||
setup_fault_attr(attr, str);
|
||||
|
||||
- debugfs entries
|
||||
|
||||
failslab, fail_page_alloc, and fail_make_request use this way.
|
||||
Helper functions:
|
||||
|
||||
init_fault_attr_entries(entries, attr, name);
|
||||
void cleanup_fault_attr_entries(entries);
|
||||
|
||||
- module parameters
|
||||
|
||||
If the scope of the fault injection capability is limited to a
|
||||
single kernel module, it is better to provide module parameters to
|
||||
configure the fault attributes.
|
||||
|
||||
o add a hook to insert failures
|
||||
|
||||
Upon should_fail() returning true, client code should inject a failure.
|
||||
|
||||
should_fail(attr, size);
|
||||
|
||||
Application Examples
|
||||
--------------------
|
||||
|
||||
o inject slab allocation failures into module init/cleanup code
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
#!/bin/bash
|
||||
|
||||
FAILCMD=Documentation/fault-injection/failcmd.sh
|
||||
BLACKLIST="root_plug evbug"
|
||||
|
||||
FAILNAME=failslab
|
||||
echo Y > /debug/$FAILNAME/task-filter
|
||||
echo 10 > /debug/$FAILNAME/probability
|
||||
echo 100 > /debug/$FAILNAME/interval
|
||||
echo -1 > /debug/$FAILNAME/times
|
||||
echo 2 > /debug/$FAILNAME/verbose
|
||||
echo 1 > /debug/$FAILNAME/ignore-gfp-wait
|
||||
|
||||
blacklist()
|
||||
{
|
||||
echo $BLACKLIST | grep $1 > /dev/null 2>&1
|
||||
}
|
||||
|
||||
oops()
|
||||
{
|
||||
dmesg | grep BUG > /dev/null 2>&1
|
||||
}
|
||||
|
||||
find /lib/modules/`uname -r` -name '*.ko' -exec basename {} .ko \; |
|
||||
while read i
|
||||
do
|
||||
oops && exit 1
|
||||
|
||||
if ! blacklist $i
|
||||
then
|
||||
echo inserting $i...
|
||||
bash $FAILCMD modprobe $i
|
||||
fi
|
||||
done
|
||||
|
||||
lsmod | awk '{ if ($3 == 0) { print $1 } }' |
|
||||
while read i
|
||||
do
|
||||
oops && exit 1
|
||||
|
||||
if ! blacklist $i
|
||||
then
|
||||
echo removing $i...
|
||||
bash $FAILCMD modprobe -r $i
|
||||
fi
|
||||
done
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
o inject slab allocation failures only for a specific module
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
#!/bin/bash
|
||||
|
||||
FAILMOD=Documentation/fault-injection/failmodule.sh
|
||||
|
||||
echo injecting errors into the module $1...
|
||||
|
||||
modprobe $1
|
||||
bash $FAILMOD failslab $1 10
|
||||
echo 25 > /debug/failslab/probability
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
|
@ -163,7 +163,7 @@ from the console layer before unloading the driver. The VGA driver cannot be
|
||||
unloaded if it is still bound to the console layer. (See
|
||||
Documentation/console/console.txt for more information).
|
||||
|
||||
This is more complicated in the case of the the framebuffer console (fbcon),
|
||||
This is more complicated in the case of the framebuffer console (fbcon),
|
||||
because fbcon is an intermediate layer between the console and the drivers:
|
||||
|
||||
console ---> fbcon ---> fbdev drivers ---> hardware
|
||||
|
@ -9,8 +9,9 @@ Intel 810/815 Framebuffer driver
|
||||
================================================================
|
||||
|
||||
A. Introduction
|
||||
|
||||
This is a framebuffer driver for various Intel 810/815 compatible
|
||||
graphics devices. These would include:
|
||||
graphics devices. These include:
|
||||
|
||||
Intel 810
|
||||
Intel 810E
|
||||
@ -21,136 +22,136 @@ graphics devices. These would include:
|
||||
|
||||
B. Features
|
||||
|
||||
- Choice of using Discrete Video Timings, VESA Generalized Timing
|
||||
- Choice of using Discrete Video Timings, VESA Generalized Timing
|
||||
Formula, or a framebuffer specific database to set the video mode
|
||||
|
||||
- Supports a variable range of horizontal and vertical resolution, and
|
||||
vertical refresh rates if the VESA Generalized Timing Formula is
|
||||
- Supports a variable range of horizontal and vertical resolution and
|
||||
vertical refresh rates if the VESA Generalized Timing Formula is
|
||||
enabled.
|
||||
|
||||
- Supports color depths of 8, 16, 24 and 32 bits per pixel
|
||||
- Supports color depths of 8, 16, 24 and 32 bits per pixel
|
||||
|
||||
- Supports pseudocolor, directcolor, or truecolor visuals
|
||||
|
||||
- Full and optimized hardware acceleration at 8, 16 and 24 bpp
|
||||
- Full and optimized hardware acceleration at 8, 16 and 24 bpp
|
||||
|
||||
- Robust video state save and restore
|
||||
|
||||
- MTRR support
|
||||
- MTRR support
|
||||
|
||||
- Utilizes user-entered monitor specifications to automatically
|
||||
calculate required video mode parameters.
|
||||
|
||||
- Can concurrently run with xfree86 running with native i810 drivers
|
||||
- Can concurrently run with xfree86 running with native i810 drivers
|
||||
|
||||
- Hardware Cursor Support
|
||||
|
||||
- Supports EDID probing either by DDC/I2C or through the BIOS
|
||||
|
||||
C. List of available options
|
||||
|
||||
a. "video=i810fb"
|
||||
|
||||
a. "video=i810fb"
|
||||
enables the i810 driver
|
||||
|
||||
Recommendation: required
|
||||
|
||||
b. "xres:<value>"
|
||||
|
||||
b. "xres:<value>"
|
||||
select horizontal resolution in pixels. (This parameter will be
|
||||
ignored if 'mode_option' is specified. See 'o' below).
|
||||
|
||||
Recommendation: user preference
|
||||
Recommendation: user preference
|
||||
(default = 640)
|
||||
|
||||
c. "yres:<value>"
|
||||
select vertical resolution in scanlines. If Discrete Video Timings
|
||||
is enabled, this will be ignored and computed as 3*xres/4. (This
|
||||
parameter will be ignored if 'mode_option' is specified. See 'o'
|
||||
below)
|
||||
below)
|
||||
|
||||
Recommendation: user preference
|
||||
(default = 480)
|
||||
|
||||
d. "vyres:<value>"
|
||||
|
||||
d. "vyres:<value>"
|
||||
select virtual vertical resolution in scanlines. If (0) or none
|
||||
is specified, this will be computed against maximum available memory.
|
||||
is specified, this will be computed against maximum available memory.
|
||||
|
||||
Recommendation: do not set
|
||||
(default = 480)
|
||||
|
||||
e. "vram:<value>"
|
||||
select amount of system RAM in MB to allocate for the video memory
|
||||
select amount of system RAM in MB to allocate for the video memory
|
||||
|
||||
Recommendation: 1 - 4 MB.
|
||||
(default = 4)
|
||||
|
||||
f. "bpp:<value>"
|
||||
select desired pixel depth
|
||||
f. "bpp:<value>"
|
||||
select desired pixel depth
|
||||
|
||||
Recommendation: 8
|
||||
(default = 8)
|
||||
|
||||
g. "hsync1/hsync2:<value>"
|
||||
select the minimum and maximum Horizontal Sync Frequency of the
|
||||
monitor in KHz. If a using a fixed frequency monitor, hsync1 must
|
||||
g. "hsync1/hsync2:<value>"
|
||||
select the minimum and maximum Horizontal Sync Frequency of the
|
||||
monitor in kHz. If using a fixed frequency monitor, hsync1 must
|
||||
be equal to hsync2. If EDID probing is successful, these will be
|
||||
ignored and values will be taken from the EDID block.
|
||||
|
||||
Recommendation: check monitor manual for correct values
|
||||
default (29/30)
|
||||
(default = 29/30)
|
||||
|
||||
h. "vsync1/vsync2:<value>"
|
||||
h. "vsync1/vsync2:<value>"
|
||||
select the minimum and maximum Vertical Sync Frequency of the monitor
|
||||
in Hz. You can also use this option to lock your monitor's refresh
|
||||
in Hz. You can also use this option to lock your monitor's refresh
|
||||
rate. If EDID probing is successful, these will be ignored and values
|
||||
will be taken from the EDID block.
|
||||
|
||||
Recommendation: check monitor manual for correct values
|
||||
(default = 60/60)
|
||||
|
||||
IMPORTANT: If you need to clamp your timings, try to give some
|
||||
leeway for computational errors (over/underflows). Example: if
|
||||
IMPORTANT: If you need to clamp your timings, try to give some
|
||||
leeway for computational errors (over/underflows). Example: if
|
||||
using vsync1/vsync2 = 60/60, make sure hsync1/hsync2 has at least
|
||||
a 1 unit difference, and vice versa.
|
||||
|
||||
i. "voffset:<value>"
|
||||
select at what offset in MB of the logical memory to allocate the
|
||||
i. "voffset:<value>"
|
||||
select at what offset in MB of the logical memory to allocate the
|
||||
framebuffer memory. The intent is to avoid the memory blocks
|
||||
used by standard graphics applications (XFree86). The default
|
||||
offset (16 MB for a 64MB aperture, 8 MB for a 32MB aperture) will
|
||||
avoid XFree86's usage and allows up to 7MB/15MB of framebuffer
|
||||
memory. Depending on your usage, adjust the value up or down,
|
||||
(0 for maximum usage, 31/63 MB for the least amount). Note, an
|
||||
offset (16 MB for a 64 MB aperture, 8 MB for a 32 MB aperture) will
|
||||
avoid XFree86's usage and allows up to 7 MB/15 MB of framebuffer
|
||||
memory. Depending on your usage, adjust the value up or down
|
||||
(0 for maximum usage, 31/63 MB for the least amount). Note, an
|
||||
arbitrary setting may conflict with XFree86.
|
||||
|
||||
Recommendation: do not set
|
||||
(default = 8 or 16 MB)
|
||||
|
||||
j. "accel"
|
||||
enable text acceleration. This can be enabled/reenabled anytime
|
||||
by using 'fbset -accel true/false'.
|
||||
|
||||
j. "accel"
|
||||
enable text acceleration. This can be enabled/reenabled anytime
|
||||
by using 'fbset -accel true/false'.
|
||||
|
||||
Recommendation: enable
|
||||
(default = not set)
|
||||
(default = not set)
|
||||
|
||||
k. "mtrr"
|
||||
k. "mtrr"
|
||||
enable MTRR. This allows data transfers to the framebuffer memory
|
||||
to occur in bursts which can significantly increase performance.
|
||||
Not very helpful with the i810/i815 because of 'shared memory'.
|
||||
Not very helpful with the i810/i815 because of 'shared memory'.
|
||||
|
||||
Recommendation: do not set
|
||||
(default = not set)
|
||||
(default = not set)
|
||||
|
||||
l. "extvga"
|
||||
if specified, secondary/external VGA output will always be enabled.
|
||||
Useful if the BIOS turns off the VGA port when no monitor is attached.
|
||||
The external VGA monitor can then be attached without rebooting.
|
||||
The external VGA monitor can then be attached without rebooting.
|
||||
|
||||
Recommendation: do not set
|
||||
(default = not set)
|
||||
|
||||
m. "sync"
|
||||
|
||||
m. "sync"
|
||||
Forces the hardware engine to do a "sync" or wait for the hardware
|
||||
to finish before starting another instruction. This will produce a
|
||||
to finish before starting another instruction. This will produce a
|
||||
more stable setup, but will be slower.
|
||||
|
||||
Recommendation: do not set
|
||||
@ -162,6 +163,7 @@ C. List of available options
|
||||
|
||||
Recommendation: do not set
|
||||
(default = not set)
|
||||
|
||||
o. <xres>x<yres>[-<bpp>][@<refresh>]
|
||||
The driver will now accept specification of boot mode option. If this
|
||||
is specified, the options 'xres' and 'yres' will be ignored. See
|
||||
@ -183,8 +185,8 @@ append="video=i810fb:vram:2,xres:1024,yres:768,bpp:8,hsync1:30,hsync2:55, \
|
||||
vsync1:50,vsync2:85,accel,mtrr"
|
||||
|
||||
This will initialize the framebuffer to 1024x768 at 8bpp. The framebuffer
|
||||
will use 2 MB of System RAM. MTRR support will be enabled. The refresh rate
|
||||
will be computed based on the hsync1/hsync2 and vsync1/vsync2 values.
|
||||
will use 2 MB of System RAM. MTRR support will be enabled. The refresh rate
|
||||
will be computed based on the hsync1/hsync2 and vsync1/vsync2 values.
|
||||
|
||||
IMPORTANT:
|
||||
You must include hsync1, hsync2, vsync1 and vsync2 to enable video modes
|
||||
@ -194,10 +196,10 @@ vsync1 and vsync2 parameters. These parameters will be taken from the EDID
|
||||
block.
|
||||
|
||||
E. Module options
|
||||
|
||||
The module parameters are essentially similar to the kernel
|
||||
parameters. The main difference is that you need to include a Boolean value
|
||||
(1 for TRUE, and 0 for FALSE) for those options which don't need a value.
|
||||
|
||||
The module parameters are essentially similar to the kernel
|
||||
parameters. The main difference is that you need to include a Boolean value
|
||||
(1 for TRUE, and 0 for FALSE) for those options which don't need a value.
|
||||
|
||||
Example, to enable MTRR, include "mtrr=1".
|
||||
|
||||
@ -214,62 +216,62 @@ Or just add the following to /etc/modprobe.conf
|
||||
options i810fb vram=2 xres=1024 bpp=16 hsync1=30 hsync2=55 vsync1=50 \
|
||||
vsync2=85 accel=1 mtrr=1
|
||||
|
||||
and just do a
|
||||
and just do a
|
||||
|
||||
modprobe i810fb
|
||||
|
||||
|
||||
F. Setup
|
||||
|
||||
a. Do your usual method of configuring the kernel.
|
||||
|
||||
a. Do your usual method of configuring the kernel.
|
||||
|
||||
make menuconfig/xconfig/config
|
||||
|
||||
b. Under "Code Maturity Options", enable "Prompt for experimental/
|
||||
incomplete code/drivers".
|
||||
b. Under "Code maturity level options" enable "Prompt for development
|
||||
and/or incomplete code/drivers".
|
||||
|
||||
c. Enable agpgart support for the Intel 810/815 on-board graphics.
|
||||
This is required. The option is under "Character Devices"
|
||||
This is required. The option is under "Character Devices".
|
||||
|
||||
d. Under "Graphics Support", select "Intel 810/815" either statically
|
||||
or as a module. Choose "use VESA Generalized Timing Formula" if
|
||||
you need to maximize the capability of your display. To be on the
|
||||
safe side, you can leave this unselected.
|
||||
|
||||
you need to maximize the capability of your display. To be on the
|
||||
safe side, you can leave this unselected.
|
||||
|
||||
e. If you want support for DDC/I2C probing (Plug and Play Displays),
|
||||
set 'Enable DDC Support' to 'y'. To make this option appear, set
|
||||
'use VESA Generalized Timing Formula' to 'y'.
|
||||
|
||||
f. If you want a framebuffer console, enable it under "Console
|
||||
Drivers"
|
||||
f. If you want a framebuffer console, enable it under "Console
|
||||
Drivers".
|
||||
|
||||
g. Compile your kernel.
|
||||
|
||||
h. Load the driver as described in sections D and E.
|
||||
|
||||
g. Compile your kernel.
|
||||
|
||||
h. Load the driver as described in section D and E.
|
||||
|
||||
i. Try the DirectFB (http://www.directfb.org) + the i810 gfxdriver
|
||||
patch to see the chipset in action (or inaction :-).
|
||||
|
||||
G. Acknowledgment:
|
||||
|
||||
1. Geert Uytterhoeven - his excellent howto and the virtual
|
||||
framebuffer driver code made this possible.
|
||||
|
||||
2. Jeff Hartmann for his agpgart code.
|
||||
1. Geert Uytterhoeven - his excellent howto and the virtual
|
||||
framebuffer driver code made this possible.
|
||||
|
||||
2. Jeff Hartmann for his agpgart code.
|
||||
|
||||
3. The X developers. Insights were provided just by reading the
|
||||
XFree86 source code.
|
||||
|
||||
4. Intel(c). For this value-oriented chipset driver and for
|
||||
providing documentation.
|
||||
providing documentation.
|
||||
|
||||
5. Matt Sottek. His inputs and ideas helped in making some
|
||||
optimizations possible.
|
||||
optimizations possible.
|
||||
|
||||
H. Home Page:
|
||||
|
||||
A more complete, and probably updated information is provided at
|
||||
http://i810fb.sourceforge.net.
|
||||
http://i810fb.sourceforge.net.
|
||||
|
||||
###########################
|
||||
Tony
|
||||
|
@ -1,16 +1,19 @@
|
||||
Intel 830M/845G/852GM/855GM/865G/915G Framebuffer driver
|
||||
Intel 830M/845G/852GM/855GM/865G/915G/945G Framebuffer driver
|
||||
================================================================
|
||||
|
||||
A. Introduction
|
||||
This is a framebuffer driver for various Intel 810/815 compatible
|
||||
This is a framebuffer driver for various Intel 8xx/9xx compatible
|
||||
graphics devices. These would include:
|
||||
|
||||
Intel 830M
|
||||
Intel 810E845G
|
||||
Intel 845G
|
||||
Intel 852GM
|
||||
Intel 855GM
|
||||
Intel 865G
|
||||
Intel 915G
|
||||
Intel 915GM
|
||||
Intel 945G
|
||||
Intel 945GM
|
||||
|
||||
B. List of available options
|
||||
|
||||
@ -78,19 +81,27 @@ C. Kernel booting
|
||||
Separate each option/option-pair by commas (,) and the option from its value
|
||||
with an equals sign (=) as in the following:
|
||||
|
||||
video=i810fb:option1,option2=value2
|
||||
video=intelfb:option1,option2=value2
|
||||
|
||||
Sample Usage
|
||||
------------
|
||||
|
||||
In /etc/lilo.conf, add the line:
|
||||
|
||||
append="video=intelfb:800x600-32@75,accel,hwcursor,vram=8"
|
||||
append="video=intelfb:mode=800x600-32@75,accel,hwcursor,vram=8"
|
||||
|
||||
This will initialize the framebuffer to 800x600 at 32bpp and 75Hz. The
|
||||
framebuffer will use 8 MB of System RAM. hw acceleration of text and cursor
|
||||
will be enabled.
|
||||
|
||||
Remarks
|
||||
-------
|
||||
|
||||
If setting this parameter doesn't work (you stay in a 80x25 text-mode),
|
||||
you might need to set the "vga=<mode>" parameter too - see vesafb.txt
|
||||
in this directory.
|
||||
|
||||
|
||||
D. Module options
|
||||
|
||||
The module parameters are essentially similar to the kernel
|
||||
|
@ -72,7 +72,7 @@ information. Additionally, "modinfo sisfb" gives an overview over all
|
||||
supported options including some explanation.
|
||||
|
||||
The desired display mode can be specified using the keyword "mode" with
|
||||
a parameter in one of the follwing formats:
|
||||
a parameter in one of the following formats:
|
||||
- XxYxDepth or
|
||||
- XxY-Depth or
|
||||
- XxY-Depth@Rate or
|
||||
|
@ -48,12 +48,12 @@ Module Usage
|
||||
|
||||
Module insertion:
|
||||
# insmod sstfb.o
|
||||
you should see some strange output frome the board:
|
||||
you should see some strange output from the board:
|
||||
a big blue square, a green and a red small squares and a vertical
|
||||
white rectangle. why ? the function's name is self explanatory :
|
||||
white rectangle. why? the function's name is self-explanatory:
|
||||
"sstfb_test()"...
|
||||
(if you don't have a second monitor, you'll have to plug your monitor
|
||||
directely to the 2D videocard to see what you're typing)
|
||||
directly to the 2D videocard to see what you're typing)
|
||||
# con2fb /dev/fbx /dev/ttyx
|
||||
bind a tty to the new frame buffer. if you already have a frame
|
||||
buffer driver, the voodoo fb will likely be /dev/fb1. if not,
|
||||
@ -72,12 +72,12 @@ Module Usage
|
||||
|
||||
Kernel/Modules Options
|
||||
|
||||
You can pass some otions to sstfb module, and via the kernel command
|
||||
line when the driver is compiled in :
|
||||
You can pass some options to the sstfb module, and via the kernel
|
||||
command line when the driver is compiled in:
|
||||
for module : insmod sstfb.o option1=value1 option2=value2 ...
|
||||
in kernel : video=sstfb:option1,option2:value2,option3 ...
|
||||
|
||||
sstfb supports the folowing options :
|
||||
sstfb supports the following options :
|
||||
|
||||
Module Kernel Description
|
||||
|
||||
@ -95,11 +95,11 @@ inverse=1 inverse Supposed to enable inverse console.
|
||||
|
||||
clipping=1 clipping Enable or disable clipping.
|
||||
clipping=0 noclipping With clipping enabled, all offscreen
|
||||
reads and writes are disgarded.
|
||||
reads and writes are discarded.
|
||||
Default: enable clipping.
|
||||
|
||||
gfxclk=x gfxclk:x Force graphic clock frequency (in MHz).
|
||||
Be carefull with this option, it may be
|
||||
Be careful with this option, it may be
|
||||
DANGEROUS.
|
||||
Default: auto
|
||||
50Mhz for Voodoo 1,
|
||||
@ -137,23 +137,23 @@ Bugs
|
||||
- The driver is 16 bpp only, 24/32 won't work.
|
||||
- The driver is not your_favorite_toy-safe. this includes SMP...
|
||||
[Actually from inspection it seems to be safe - Alan]
|
||||
- when using XFree86 FBdev (X over fbdev) you may see strange color
|
||||
- When using XFree86 FBdev (X over fbdev) you may see strange color
|
||||
patterns at the border of your windows (the pixels lose the lowest
|
||||
byte -> basicaly the blue component nd some of the green) . I'm unable
|
||||
byte -> basically the blue component and some of the green). I'm unable
|
||||
to reproduce this with XFree86-3.3, but one of the testers has this
|
||||
problem with XFree86-4. apparently recent Xfree86-4.x solve this
|
||||
problem with XFree86-4. Apparently recent Xfree86-4.x solve this
|
||||
problem.
|
||||
- I didn't really test changing the palette, so you may find some weird
|
||||
things when playing with that.
|
||||
- Sometimes the driver will not recognise the DAC , and the
|
||||
initialisation will fail. this is specificaly true for
|
||||
voodoo 2 boards , but it should be solved in recent versions. please
|
||||
contact me .
|
||||
- the 24/32 is not likely to work anytime soon , knowing that the
|
||||
hardware does ... unusual thigs in 24/32 bpp
|
||||
- When used with anther video board, current limitations of linux
|
||||
console subsystem can cause some troubles, specificaly, you should
|
||||
disable software scrollback , as it can oops badly ...
|
||||
- Sometimes the driver will not recognise the DAC, and the
|
||||
initialisation will fail. This is specifically true for
|
||||
voodoo 2 boards, but it should be solved in recent versions. Please
|
||||
contact me.
|
||||
- The 24/32 is not likely to work anytime soon, knowing that the
|
||||
hardware does ... unusual things in 24/32 bpp.
|
||||
- When used with another video board, current limitations of the linux
|
||||
console subsystem can cause some troubles, specifically, you should
|
||||
disable software scrollback, as it can oops badly ...
|
||||
|
||||
Todo
|
||||
|
||||
@ -161,7 +161,7 @@ Todo
|
||||
- Buy more coffee.
|
||||
- test/port to other arch.
|
||||
- try to add panning using tweeks with front and back buffer .
|
||||
- try to implement accel on voodoo2 , this board can actualy do a
|
||||
- try to implement accel on voodoo2, this board can actually do a
|
||||
lot in 2D even if it was sold as a 3D only board ...
|
||||
|
||||
ghoz.
|
||||
|
@ -29,34 +29,45 @@ Who: Adrian Bunk <bunk@stusta.de>
|
||||
|
||||
---------------------------
|
||||
|
||||
What: drivers that were depending on OBSOLETE_OSS_DRIVER
|
||||
(config options already removed)
|
||||
When: before 2.6.19
|
||||
Why: OSS drivers with ALSA replacements
|
||||
Who: Adrian Bunk <bunk@stusta.de>
|
||||
|
||||
---------------------------
|
||||
|
||||
What: raw1394: requests of type RAW1394_REQ_ISO_SEND, RAW1394_REQ_ISO_LISTEN
|
||||
When: November 2006
|
||||
Why: Deprecated in favour of the new ioctl-based rawiso interface, which is
|
||||
more efficient. You should really be using libraw1394 for raw1394
|
||||
access anyway.
|
||||
Who: Jody McIntyre <scjody@modernduck.com>
|
||||
When: June 2007
|
||||
Why: Deprecated in favour of the more efficient and robust rawiso interface.
|
||||
Affected are applications which use the deprecated part of libraw1394
|
||||
(raw1394_iso_write, raw1394_start_iso_write, raw1394_start_iso_rcv,
|
||||
raw1394_stop_iso_rcv) or bypass libraw1394.
|
||||
Who: Dan Dennedy <dan@dennedy.org>, Stefan Richter <stefanr@s5r6.in-berlin.de>
|
||||
|
||||
---------------------------
|
||||
|
||||
What: sbp2: module parameter "force_inquiry_hack"
|
||||
When: July 2006
|
||||
Why: Superceded by parameter "workarounds". Both parameters are meant to be
|
||||
used ad-hoc and for single devices only, i.e. not in modprobe.conf,
|
||||
therefore the impact of this feature replacement should be low.
|
||||
What: dv1394 driver (CONFIG_IEEE1394_DV1394)
|
||||
When: June 2007
|
||||
Why: Replaced by raw1394 + userspace libraries, notably libiec61883. This
|
||||
shift of application support has been indicated on www.linux1394.org
|
||||
and developers' mailinglists for quite some time. Major applications
|
||||
have been converted, with the exception of ffmpeg and hence xine.
|
||||
Piped output of dvgrab2 is a partial equivalent to dv1394.
|
||||
Who: Dan Dennedy <dan@dennedy.org>, Stefan Richter <stefanr@s5r6.in-berlin.de>
|
||||
|
||||
---------------------------
|
||||
|
||||
What: ieee1394 core's unused exports (CONFIG_IEEE1394_EXPORT_FULL_API)
|
||||
When: January 2007
|
||||
Why: There are no projects known to use these exported symbols, except
|
||||
dfg1394 (uses one symbol whose functionality is core-internal now).
|
||||
Who: Stefan Richter <stefanr@s5r6.in-berlin.de>
|
||||
|
||||
---------------------------
|
||||
|
||||
What: ieee1394's *_oui sysfs attributes (CONFIG_IEEE1394_OUI_DB)
|
||||
When: January 2007
|
||||
Files: drivers/ieee1394/: oui.db, oui2c.sh
|
||||
Why: big size, little value
|
||||
Who: Stefan Richter <stefanr@s5r6.in-berlin.de>
|
||||
|
||||
---------------------------
|
||||
|
||||
What: Video4Linux API 1 ioctls and video_decoder.h from Video devices.
|
||||
When: July 2006
|
||||
When: December 2006
|
||||
Why: V4L1 AP1 was replaced by V4L2 API. during migration from 2.4 to 2.6
|
||||
series. The old API have lots of drawbacks and don't provide enough
|
||||
means to work with all video and audio standards. The newer API is
|
||||
@ -87,18 +98,6 @@ Who: Dominik Brodowski <linux@brodo.de>
|
||||
|
||||
---------------------------
|
||||
|
||||
What: ip_queue and ip6_queue (old ipv4-only and ipv6-only netfilter queue)
|
||||
When: December 2005
|
||||
Why: This interface has been obsoleted by the new layer3-independent
|
||||
"nfnetlink_queue". The Kernel interface is compatible, so the old
|
||||
ip[6]tables "QUEUE" targets still work and will transparently handle
|
||||
all packets into nfnetlink queue number 0. Userspace users will have
|
||||
to link against API-compatible library on top of libnfnetlink_queue
|
||||
instead of the current 'libipq'.
|
||||
Who: Harald Welte <laforge@netfilter.org>
|
||||
|
||||
---------------------------
|
||||
|
||||
What: remove EXPORT_SYMBOL(kernel_thread)
|
||||
When: August 2006
|
||||
Files: arch/*/kernel/*_ksyms.c
|
||||
@ -119,15 +118,6 @@ Who: Arjan van de Ven
|
||||
|
||||
---------------------------
|
||||
|
||||
What: START_ARRAY ioctl for md
|
||||
When: July 2006
|
||||
Files: drivers/md/md.c
|
||||
Why: Not reliable by design - can fail when most needed.
|
||||
Alternatives exist
|
||||
Who: NeilBrown <neilb@suse.de>
|
||||
|
||||
---------------------------
|
||||
|
||||
What: eepro100 network driver
|
||||
When: January 2007
|
||||
Why: replaced by the e100 driver
|
||||
@ -190,7 +180,7 @@ Who: Greg Kroah-Hartman <gregkh@suse.de>
|
||||
---------------------------
|
||||
|
||||
What: USB driver API moves to EXPORT_SYMBOL_GPL
|
||||
When: Febuary 2008
|
||||
When: February 2008
|
||||
Files: include/linux/usb.h, drivers/usb/core/driver.c
|
||||
Why: The USB subsystem has changed a lot over time, and it has been
|
||||
possible to create userspace USB drivers using usbfs/libusb/gadgetfs
|
||||
@ -217,50 +207,6 @@ Who: Nick Piggin <npiggin@suse.de>
|
||||
|
||||
---------------------------
|
||||
|
||||
What: Support for the MIPS EV96100 evaluation board
|
||||
When: September 2006
|
||||
Why: Does no longer build since at least November 15, 2003, apparently
|
||||
no userbase left.
|
||||
Who: Ralf Baechle <ralf@linux-mips.org>
|
||||
|
||||
---------------------------
|
||||
|
||||
What: Support for the Momentum / PMC-Sierra Jaguar ATX evaluation board
|
||||
When: September 2006
|
||||
Why: Does no longer build since quite some time, and was never popular,
|
||||
due to the platform being replaced by successor models. Apparently
|
||||
no user base left. It also is one of the last users of
|
||||
WANT_PAGE_VIRTUAL.
|
||||
Who: Ralf Baechle <ralf@linux-mips.org>
|
||||
|
||||
---------------------------
|
||||
|
||||
What: Support for the Momentum Ocelot, Ocelot 3, Ocelot C and Ocelot G
|
||||
When: September 2006
|
||||
Why: Some do no longer build and apparently there is no user base left
|
||||
for these platforms.
|
||||
Who: Ralf Baechle <ralf@linux-mips.org>
|
||||
|
||||
---------------------------
|
||||
|
||||
What: Support for MIPS Technologies' Altas and SEAD evaluation board
|
||||
When: September 2006
|
||||
Why: Some do no longer build and apparently there is no user base left
|
||||
for these platforms. Hardware out of production since several years.
|
||||
Who: Ralf Baechle <ralf@linux-mips.org>
|
||||
|
||||
---------------------------
|
||||
|
||||
What: Support for the IT8172-based platforms, ITE 8172G and Globespan IVR
|
||||
When: September 2006
|
||||
Why: Code does no longer build since at least 2.6.0, apparently there is
|
||||
no user base left for these platforms. Hardware out of production
|
||||
since several years and hardly a trace of the manufacturer left on
|
||||
the net.
|
||||
Who: Ralf Baechle <ralf@linux-mips.org>
|
||||
|
||||
---------------------------
|
||||
|
||||
What: Interrupt only SA_* flags
|
||||
When: Januar 2007
|
||||
Why: The interrupt related SA_* flags are replaced by IRQF_* to move them
|
||||
@ -270,17 +216,6 @@ Who: Thomas Gleixner <tglx@linutronix.de>
|
||||
|
||||
---------------------------
|
||||
|
||||
What: i2c-ite and i2c-algo-ite drivers
|
||||
When: September 2006
|
||||
Why: These drivers never compiled since they were added to the kernel
|
||||
tree 5 years ago. This feature removal can be reevaluated if
|
||||
someone shows interest in the drivers, fixes them and takes over
|
||||
maintenance.
|
||||
http://marc.theaimsgroup.com/?l=linux-mips&m=115040510817448
|
||||
Who: Jean Delvare <khali@linux-fr.org>
|
||||
|
||||
---------------------------
|
||||
|
||||
What: Bridge netfilter deferred IPv4/IPv6 output hook calling
|
||||
When: January 2007
|
||||
Why: The deferred output hooks are a layering violation causing unusual
|
||||
@ -297,23 +232,8 @@ Who: Patrick McHardy <kaber@trash.net>
|
||||
|
||||
---------------------------
|
||||
|
||||
What: frame diverter
|
||||
When: November 2006
|
||||
Why: The frame diverter is included in most distribution kernels, but is
|
||||
broken. It does not correctly handle many things:
|
||||
- IPV6
|
||||
- non-linear skb's
|
||||
- network device RCU on removal
|
||||
- input frames not correctly checked for protocol errors
|
||||
It also adds allocation overhead even if not enabled.
|
||||
It is not clear if anyone is still using it.
|
||||
Who: Stephen Hemminger <shemminger@osdl.org>
|
||||
|
||||
---------------------------
|
||||
|
||||
|
||||
What: PHYSDEVPATH, PHYSDEVBUS, PHYSDEVDRIVER in the uevent environment
|
||||
When: Oktober 2008
|
||||
When: October 2008
|
||||
Why: The stacking of class devices makes these values misleading and
|
||||
inconsistent.
|
||||
Class devices should not carry any of these properties, and bus
|
||||
@ -321,3 +241,21 @@ Why: The stacking of class devices makes these values misleading and
|
||||
Who: Kay Sievers <kay.sievers@suse.de>
|
||||
|
||||
---------------------------
|
||||
|
||||
What: i2c-isa
|
||||
When: December 2006
|
||||
Why: i2c-isa is a non-sense and doesn't fit in the device driver
|
||||
model. Drivers relying on it are better implemented as platform
|
||||
drivers.
|
||||
Who: Jean Delvare <khali@linux-fr.org>
|
||||
|
||||
---------------------------
|
||||
|
||||
What: IPv4 only connection tracking/NAT/helpers
|
||||
When: 2.6.22
|
||||
Why: The new layer 3 independant connection tracking replaces the old
|
||||
IPv4 only version. After some stabilization of the new code the
|
||||
old one will be removed.
|
||||
Who: Patrick McHardy <kaber@trash.net>
|
||||
|
||||
---------------------------
|
||||
|
@ -26,8 +26,6 @@ cramfs.txt
|
||||
- info on the cram filesystem for small storage (ROMs etc).
|
||||
dentry-locking.txt
|
||||
- info on the RCU-based dcache locking model.
|
||||
devfs/
|
||||
- directory containing devfs documentation.
|
||||
directory-locking
|
||||
- info about the locking scheme used for directory operations.
|
||||
dlmfs.txt
|
||||
@ -36,6 +34,8 @@ ext2.txt
|
||||
- info, mount options and specifications for the Ext2 filesystem.
|
||||
ext3.txt
|
||||
- info, mount options and specifications for the Ext3 filesystem.
|
||||
ext4.txt
|
||||
- info, mount options and specifications for the Ext4 filesystem.
|
||||
files.txt
|
||||
- info on file management in the Linux kernel.
|
||||
fuse.txt
|
||||
|
@ -124,7 +124,7 @@ sync_fs: no no read
|
||||
write_super_lockfs: ?
|
||||
unlockfs: ?
|
||||
statfs: no no no
|
||||
remount_fs: no yes maybe (see below)
|
||||
remount_fs: yes yes maybe (see below)
|
||||
clear_inode: no
|
||||
umount_begin: yes no no
|
||||
show_options: no (vfsmount->sem)
|
||||
@ -356,10 +356,9 @@ The last two are called only from check_disk_change().
|
||||
prototypes:
|
||||
loff_t (*llseek) (struct file *, loff_t, int);
|
||||
ssize_t (*read) (struct file *, char __user *, size_t, loff_t *);
|
||||
ssize_t (*aio_read) (struct kiocb *, char __user *, size_t, loff_t);
|
||||
ssize_t (*write) (struct file *, const char __user *, size_t, loff_t *);
|
||||
ssize_t (*aio_write) (struct kiocb *, const char __user *, size_t,
|
||||
loff_t);
|
||||
ssize_t (*aio_read) (struct kiocb *, const struct iovec *, unsigned long, loff_t);
|
||||
ssize_t (*aio_write) (struct kiocb *, const struct iovec *, unsigned long, loff_t);
|
||||
int (*readdir) (struct file *, void *, filldir_t);
|
||||
unsigned int (*poll) (struct file *, struct poll_table_struct *);
|
||||
int (*ioctl) (struct inode *, struct file *, unsigned int,
|
||||
|
@ -3,7 +3,7 @@ Mount options for ADFS
|
||||
|
||||
uid=nnn All files in the partition will be owned by
|
||||
user id nnn. Default 0 (root).
|
||||
gid=nnn All files in the partition willbe in group
|
||||
gid=nnn All files in the partition will be in group
|
||||
nnn. Default 0 (root).
|
||||
ownmask=nnn The permission mask for ADFS 'owner' permissions
|
||||
will be nnn. Default 0700.
|
||||
|
@ -7,7 +7,7 @@ WARNING
|
||||
Make sure you understand that this is alpha software. This means that the
|
||||
implementation is neither complete nor well-tested.
|
||||
|
||||
I DISCLAIM ALL RESPONSIBILTY FOR ANY POSSIBLE BAD EFFECTS OF THIS CODE!
|
||||
I DISCLAIM ALL RESPONSIBILITY FOR ANY POSSIBLE BAD EFFECTS OF THIS CODE!
|
||||
|
||||
LICENSE
|
||||
=====
|
||||
@ -22,7 +22,7 @@ He has been working on the code since Aug 13, 2001. See the changelog for
|
||||
details.
|
||||
|
||||
Original Author: Makoto Kato <m_kato@ga2.so-net.ne.jp>
|
||||
His orriginal code can still be found at:
|
||||
His original code can still be found at:
|
||||
<http://hp.vector.co.jp/authors/VA008030/bfs/>
|
||||
Does anyone know of a more current email address for Makoto? He doesn't
|
||||
respond to the address given above...
|
||||
@ -39,7 +39,7 @@ Which is it, BFS or BEFS?
|
||||
================
|
||||
Be, Inc said, "BeOS Filesystem is officially called BFS, not BeFS".
|
||||
But Unixware Boot Filesystem is called bfs, too. And they are already in
|
||||
the kernel. Because of this nameing conflict, on Linux the BeOS
|
||||
the kernel. Because of this naming conflict, on Linux the BeOS
|
||||
filesystem is called befs.
|
||||
|
||||
HOW TO INSTALL
|
||||
@ -57,7 +57,7 @@ if the patching step fails (i.e. there are rejected hunks), you can try to
|
||||
figure it out yourself (it shouldn't be hard), or mail the maintainer
|
||||
(Will Dyson <will_dyson@pobox.com>) for help.
|
||||
|
||||
step 2. Configuretion & make kernel
|
||||
step 2. Configuration & make kernel
|
||||
|
||||
The linux kernel has many compile-time options. Most of them are beyond the
|
||||
scope of this document. I suggest the Kernel-HOWTO document as a good general
|
||||
|
@ -1,5 +1,5 @@
|
||||
|
||||
configfs - Userspace-driven kernel object configuation.
|
||||
configfs - Userspace-driven kernel object configuration.
|
||||
|
||||
Joel Becker <joel.becker@oracle.com>
|
||||
|
||||
@ -209,7 +209,7 @@ will happen for write(2).
|
||||
|
||||
[struct config_group]
|
||||
|
||||
A config_item cannot live in a vaccum. The only way one can be created
|
||||
A config_item cannot live in a vacuum. The only way one can be created
|
||||
is via mkdir(2) on a config_group. This will trigger creation of a
|
||||
child item.
|
||||
|
||||
@ -254,7 +254,7 @@ using the group _init() functions on the group.
|
||||
|
||||
Finally, when userspace calls rmdir(2) on the item or group,
|
||||
ct_group_ops->drop_item() is called. As a config_group is also a
|
||||
config_item, it is not necessary for a seperate drop_group() method.
|
||||
config_item, it is not necessary for a separate drop_group() method.
|
||||
The subsystem must config_item_put() the reference that was initialized
|
||||
upon item allocation. If a subsystem has no work to do, it may omit
|
||||
the ct_group_ops->drop_item() method, and configfs will call
|
||||
@ -275,7 +275,7 @@ directory is not empty.
|
||||
|
||||
[struct configfs_subsystem]
|
||||
|
||||
A subsystem must register itself, ususally at module_init time. This
|
||||
A subsystem must register itself, usually at module_init time. This
|
||||
tells configfs to make the subsystem appear in the file tree.
|
||||
|
||||
struct configfs_subsystem {
|
||||
@ -406,7 +406,7 @@ that condition is met.
|
||||
|
||||
Far better would be an explicit action notifying the subsystem that the
|
||||
config_item is ready to go. More importantly, an explicit action allows
|
||||
the subsystem to provide feedback as to whether the attibutes are
|
||||
the subsystem to provide feedback as to whether the attributes are
|
||||
initialized in a way that makes sense. configfs provides this as
|
||||
committable items.
|
||||
|
||||
@ -422,7 +422,7 @@ support mkdir(2) or rmdir(2) either. It only allows rename(2). The
|
||||
"pending" directory does allow mkdir(2) and rmdir(2). An item is
|
||||
created in the "pending" directory. Its attributes can be modified at
|
||||
will. Userspace commits the item by renaming it into the "live"
|
||||
directory. At this point, the subsystem recieves the ->commit_item()
|
||||
directory. At this point, the subsystem receives the ->commit_item()
|
||||
callback. If all required attributes are filled to satisfaction, the
|
||||
method returns zero and the item is moved to the "live" directory.
|
||||
|
||||
|
@ -82,7 +82,7 @@ own descendent. Moreover, there is exactly one cross-directory rename
|
||||
|
||||
Consider the object blocking the cross-directory rename. One
|
||||
of its descendents is locked by cross-directory rename (otherwise we
|
||||
would again have an infinite set of of contended objects). But that
|
||||
would again have an infinite set of contended objects). But that
|
||||
means that cross-directory rename is taking locks out of order. Due
|
||||
to (2) the order hadn't changed since we had acquired filesystem lock.
|
||||
But locking rules for cross-directory rename guarantee that we do not
|
||||
|
@ -68,7 +68,7 @@ request for an already acquired lock will not generate another DLM
|
||||
call. Userspace programs are assumed to handle their own local
|
||||
locking.
|
||||
|
||||
Two levels of locks are supported - Shared Read, and Exlcusive.
|
||||
Two levels of locks are supported - Shared Read, and Exclusive.
|
||||
Also supported is a Trylock operation.
|
||||
|
||||
For information on the libo2dlm interface, please see o2dlm.h,
|
||||
|
@ -205,7 +205,7 @@ Reserved Space
|
||||
|
||||
In ext2, there is a mechanism for reserving a certain number of blocks
|
||||
for a particular user (normally the super-user). This is intended to
|
||||
allow for the system to continue functioning even if non-priveleged users
|
||||
allow for the system to continue functioning even if non-privileged users
|
||||
fill up all the space available to them (this is independent of filesystem
|
||||
quotas). It also keeps the filesystem from filling up entirely which
|
||||
helps combat fragmentation.
|
||||
|
236
Documentation/filesystems/ext4.txt
Normal file
236
Documentation/filesystems/ext4.txt
Normal file
@ -0,0 +1,236 @@
|
||||
|
||||
Ext4 Filesystem
|
||||
===============
|
||||
|
||||
This is a development version of the ext4 filesystem, an advanced level
|
||||
of the ext3 filesystem which incorporates scalability and reliability
|
||||
enhancements for supporting large filesystems (64 bit) in keeping with
|
||||
increasing disk capacities and state-of-the-art feature requirements.
|
||||
|
||||
Mailing list: linux-ext4@vger.kernel.org
|
||||
|
||||
|
||||
1. Quick usage instructions:
|
||||
===========================
|
||||
|
||||
- Grab updated e2fsprogs from
|
||||
ftp://ftp.kernel.org/pub/linux/kernel/people/tytso/e2fsprogs-interim/
|
||||
This is a patchset on top of e2fsprogs-1.39, which can be found at
|
||||
ftp://ftp.kernel.org/pub/linux/kernel/people/tytso/e2fsprogs/
|
||||
|
||||
- It's still mke2fs -j /dev/hda1
|
||||
|
||||
- mount /dev/hda1 /wherever -t ext4dev
|
||||
|
||||
- To enable extents,
|
||||
|
||||
mount /dev/hda1 /wherever -t ext4dev -o extents
|
||||
|
||||
- The filesystem is compatible with the ext3 driver until you add a file
|
||||
which has extents (ie: `mount -o extents', then create a file).
|
||||
|
||||
NOTE: The "extents" mount flag is temporary. It will soon go away and
|
||||
extents will be enabled by the "-o extents" flag to mke2fs or tune2fs
|
||||
|
||||
- When comparing performance with other filesystems, remember that
|
||||
ext3/4 by default offers higher data integrity guarantees than most. So
|
||||
when comparing with a metadata-only journalling filesystem, use `mount -o
|
||||
data=writeback'. And you might as well use `mount -o nobh' too along
|
||||
with it. Making the journal larger than the mke2fs default often helps
|
||||
performance with metadata-intensive workloads.
|
||||
|
||||
2. Features
|
||||
===========
|
||||
|
||||
2.1 Currently available
|
||||
|
||||
* ability to use filesystems > 16TB
|
||||
* extent format reduces metadata overhead (RAM, IO for access, transactions)
|
||||
* extent format more robust in face of on-disk corruption due to magics,
|
||||
* internal redunancy in tree
|
||||
|
||||
2.1 Previously available, soon to be enabled by default by "mkefs.ext4":
|
||||
|
||||
* dir_index and resize inode will be on by default
|
||||
* large inodes will be used by default for fast EAs, nsec timestamps, etc
|
||||
|
||||
2.2 Candidate features for future inclusion
|
||||
|
||||
There are several under discussion, whether they all make it in is
|
||||
partly a function of how much time everyone has to work on them:
|
||||
|
||||
* improved file allocation (multi-block alloc, delayed alloc; basically done)
|
||||
* fix 32000 subdirectory limit (patch exists, needs some e2fsck work)
|
||||
* nsec timestamps for mtime, atime, ctime, create time (patch exists,
|
||||
needs some e2fsck work)
|
||||
* inode version field on disk (NFSv4, Lustre; prototype exists)
|
||||
* reduced mke2fs/e2fsck time via uninitialized groups (prototype exists)
|
||||
* journal checksumming for robustness, performance (prototype exists)
|
||||
* persistent file preallocation (e.g for streaming media, databases)
|
||||
|
||||
Features like metadata checksumming have been discussed and planned for
|
||||
a bit but no patches exist yet so I'm not sure they're in the near-term
|
||||
roadmap.
|
||||
|
||||
The big performance win will come with mballoc and delalloc. CFS has
|
||||
been using mballoc for a few years already with Lustre, and IBM + Bull
|
||||
did a lot of benchmarking on it. The reason it isn't in the first set of
|
||||
patches is partly a manageability issue, and partly because it doesn't
|
||||
directly affect the on-disk format (outside of much better allocation)
|
||||
so it isn't critical to get into the first round of changes. I believe
|
||||
Alex is working on a new set of patches right now.
|
||||
|
||||
3. Options
|
||||
==========
|
||||
|
||||
When mounting an ext4 filesystem, the following option are accepted:
|
||||
(*) == default
|
||||
|
||||
extents ext4 will use extents to address file data. The
|
||||
file system will no longer be mountable by ext3.
|
||||
|
||||
journal=update Update the ext4 file system's journal to the current
|
||||
format.
|
||||
|
||||
journal=inum When a journal already exists, this option is ignored.
|
||||
Otherwise, it specifies the number of the inode which
|
||||
will represent the ext4 file system's journal file.
|
||||
|
||||
journal_dev=devnum When the external journal device's major/minor numbers
|
||||
have changed, this option allows the user to specify
|
||||
the new journal location. The journal device is
|
||||
identified through its new major/minor numbers encoded
|
||||
in devnum.
|
||||
|
||||
noload Don't load the journal on mounting.
|
||||
|
||||
data=journal All data are committed into the journal prior to being
|
||||
written into the main file system.
|
||||
|
||||
data=ordered (*) All data are forced directly out to the main file
|
||||
system prior to its metadata being committed to the
|
||||
journal.
|
||||
|
||||
data=writeback Data ordering is not preserved, data may be written
|
||||
into the main file system after its metadata has been
|
||||
committed to the journal.
|
||||
|
||||
commit=nrsec (*) Ext4 can be told to sync all its data and metadata
|
||||
every 'nrsec' seconds. The default value is 5 seconds.
|
||||
This means that if you lose your power, you will lose
|
||||
as much as the latest 5 seconds of work (your
|
||||
filesystem will not be damaged though, thanks to the
|
||||
journaling). This default value (or any low value)
|
||||
will hurt performance, but it's good for data-safety.
|
||||
Setting it to 0 will have the same effect as leaving
|
||||
it at the default (5 seconds).
|
||||
Setting it to very large values will improve
|
||||
performance.
|
||||
|
||||
barrier=1 This enables/disables barriers. barrier=0 disables
|
||||
it, barrier=1 enables it.
|
||||
|
||||
orlov (*) This enables the new Orlov block allocator. It is
|
||||
enabled by default.
|
||||
|
||||
oldalloc This disables the Orlov block allocator and enables
|
||||
the old block allocator. Orlov should have better
|
||||
performance - we'd like to get some feedback if it's
|
||||
the contrary for you.
|
||||
|
||||
user_xattr Enables Extended User Attributes. Additionally, you
|
||||
need to have extended attribute support enabled in the
|
||||
kernel configuration (CONFIG_EXT4_FS_XATTR). See the
|
||||
attr(5) manual page and http://acl.bestbits.at/ to
|
||||
learn more about extended attributes.
|
||||
|
||||
nouser_xattr Disables Extended User Attributes.
|
||||
|
||||
acl Enables POSIX Access Control Lists support.
|
||||
Additionally, you need to have ACL support enabled in
|
||||
the kernel configuration (CONFIG_EXT4_FS_POSIX_ACL).
|
||||
See the acl(5) manual page and http://acl.bestbits.at/
|
||||
for more information.
|
||||
|
||||
noacl This option disables POSIX Access Control List
|
||||
support.
|
||||
|
||||
reservation
|
||||
|
||||
noreservation
|
||||
|
||||
bsddf (*) Make 'df' act like BSD.
|
||||
minixdf Make 'df' act like Minix.
|
||||
|
||||
check=none Don't do extra checking of bitmaps on mount.
|
||||
nocheck
|
||||
|
||||
debug Extra debugging information is sent to syslog.
|
||||
|
||||
errors=remount-ro(*) Remount the filesystem read-only on an error.
|
||||
errors=continue Keep going on a filesystem error.
|
||||
errors=panic Panic and halt the machine if an error occurs.
|
||||
|
||||
grpid Give objects the same group ID as their creator.
|
||||
bsdgroups
|
||||
|
||||
nogrpid (*) New objects have the group ID of their creator.
|
||||
sysvgroups
|
||||
|
||||
resgid=n The group ID which may use the reserved blocks.
|
||||
|
||||
resuid=n The user ID which may use the reserved blocks.
|
||||
|
||||
sb=n Use alternate superblock at this location.
|
||||
|
||||
quota
|
||||
noquota
|
||||
grpquota
|
||||
usrquota
|
||||
|
||||
bh (*) ext4 associates buffer heads to data pages to
|
||||
nobh (a) cache disk block mapping information
|
||||
(b) link pages into transaction to provide
|
||||
ordering guarantees.
|
||||
"bh" option forces use of buffer heads.
|
||||
"nobh" option tries to avoid associating buffer
|
||||
heads (supported only for "writeback" mode).
|
||||
|
||||
|
||||
Data Mode
|
||||
---------
|
||||
There are 3 different data modes:
|
||||
|
||||
* writeback mode
|
||||
In data=writeback mode, ext4 does not journal data at all. This mode provides
|
||||
a similar level of journaling as that of XFS, JFS, and ReiserFS in its default
|
||||
mode - metadata journaling. A crash+recovery can cause incorrect data to
|
||||
appear in files which were written shortly before the crash. This mode will
|
||||
typically provide the best ext4 performance.
|
||||
|
||||
* ordered mode
|
||||
In data=ordered mode, ext4 only officially journals metadata, but it logically
|
||||
groups metadata and data blocks into a single unit called a transaction. When
|
||||
it's time to write the new metadata out to disk, the associated data blocks
|
||||
are written first. In general, this mode performs slightly slower than
|
||||
writeback but significantly faster than journal mode.
|
||||
|
||||
* journal mode
|
||||
data=journal mode provides full data and metadata journaling. All new data is
|
||||
written to the journal first, and then to its final location.
|
||||
In the event of a crash, the journal can be replayed, bringing both data and
|
||||
metadata into a consistent state. This mode is the slowest except when data
|
||||
needs to be read from and written to disk at the same time where it
|
||||
outperforms all others modes.
|
||||
|
||||
References
|
||||
==========
|
||||
|
||||
kernel source: <file:fs/ext4/>
|
||||
<file:fs/jbd2/>
|
||||
|
||||
programs: http://e2fsprogs.sourceforge.net/
|
||||
http://ext2resize.sourceforge.net
|
||||
|
||||
useful links: http://fedoraproject.org/wiki/ext3-devel
|
||||
http://www.bullopensource.org/ext4/
|
@ -55,7 +55,7 @@ the fdtable structure -
|
||||
2. Reading of the fdtable as described above must be protected
|
||||
by rcu_read_lock()/rcu_read_unlock().
|
||||
|
||||
3. For any update to the the fd table, files->file_lock must
|
||||
3. For any update to the fd table, files->file_lock must
|
||||
be held.
|
||||
|
||||
4. To look up the file structure given an fd, a reader
|
||||
|
@ -51,6 +51,22 @@ homepage:
|
||||
|
||||
http://fuse.sourceforge.net/
|
||||
|
||||
Filesystem type
|
||||
~~~~~~~~~~~~~~~
|
||||
|
||||
The filesystem type given to mount(2) can be one of the following:
|
||||
|
||||
'fuse'
|
||||
|
||||
This is the usual way to mount a FUSE filesystem. The first
|
||||
argument of the mount system call may contain an arbitrary string,
|
||||
which is not interpreted by the kernel.
|
||||
|
||||
'fuseblk'
|
||||
|
||||
The filesystem is block device based. The first argument of the
|
||||
mount system call is interpreted as the name of the device.
|
||||
|
||||
Mount options
|
||||
~~~~~~~~~~~~~
|
||||
|
||||
@ -94,6 +110,11 @@ Mount options
|
||||
The default is infinite. Note that the size of read requests is
|
||||
limited anyway to 32 pages (which is 128kbyte on i386).
|
||||
|
||||
'blksize=N'
|
||||
|
||||
Set the block size for the filesystem. The default is 512. This
|
||||
option is only valid for 'fuseblk' type mounts.
|
||||
|
||||
Control filesystem
|
||||
~~~~~~~~~~~~~~~~~~
|
||||
|
||||
@ -111,7 +132,7 @@ For each connection the following files exist within this directory:
|
||||
|
||||
'waiting'
|
||||
|
||||
The number of requests which are waiting to be transfered to
|
||||
The number of requests which are waiting to be transferred to
|
||||
userspace or being processed by the filesystem daemon. If there is
|
||||
no filesystem activity and 'waiting' is non-zero, then the
|
||||
filesystem is hung or deadlocked.
|
||||
@ -136,7 +157,7 @@ following will happen:
|
||||
|
||||
2) If the request is not yet sent to userspace AND the signal is not
|
||||
fatal, then an 'interrupted' flag is set for the request. When
|
||||
the request has been successfully transfered to userspace and
|
||||
the request has been successfully transferred to userspace and
|
||||
this flag is set, an INTERRUPT request is queued.
|
||||
|
||||
3) If the request is already sent to userspace, then an INTERRUPT
|
||||
|
43
Documentation/filesystems/gfs2.txt
Normal file
43
Documentation/filesystems/gfs2.txt
Normal file
@ -0,0 +1,43 @@
|
||||
Global File System
|
||||
------------------
|
||||
|
||||
http://sources.redhat.com/cluster/
|
||||
|
||||
GFS is a cluster file system. It allows a cluster of computers to
|
||||
simultaneously use a block device that is shared between them (with FC,
|
||||
iSCSI, NBD, etc). GFS reads and writes to the block device like a local
|
||||
file system, but also uses a lock module to allow the computers coordinate
|
||||
their I/O so file system consistency is maintained. One of the nifty
|
||||
features of GFS is perfect consistency -- changes made to the file system
|
||||
on one machine show up immediately on all other machines in the cluster.
|
||||
|
||||
GFS uses interchangable inter-node locking mechanisms. Different lock
|
||||
modules can plug into GFS and each file system selects the appropriate
|
||||
lock module at mount time. Lock modules include:
|
||||
|
||||
lock_nolock -- allows gfs to be used as a local file system
|
||||
|
||||
lock_dlm -- uses a distributed lock manager (dlm) for inter-node locking
|
||||
The dlm is found at linux/fs/dlm/
|
||||
|
||||
In addition to interfacing with an external locking manager, a gfs lock
|
||||
module is responsible for interacting with external cluster management
|
||||
systems. Lock_dlm depends on user space cluster management systems found
|
||||
at the URL above.
|
||||
|
||||
To use gfs as a local file system, no external clustering systems are
|
||||
needed, simply:
|
||||
|
||||
$ mkfs -t gfs2 -p lock_nolock -j 1 /dev/block_device
|
||||
$ mount -t gfs2 /dev/block_device /dir
|
||||
|
||||
GFS2 is not on-disk compatible with previous versions of GFS.
|
||||
|
||||
The following man pages can be found at the URL above:
|
||||
gfs2_fsck to repair a filesystem
|
||||
gfs2_grow to expand a filesystem online
|
||||
gfs2_jadd to add journals to a filesystem online
|
||||
gfs2_tool to manipulate, examine and tune a filesystem
|
||||
gfs2_quota to examine and change quota values in a filesystem
|
||||
mount.gfs2 to help mount(8) mount a filesystem
|
||||
mkfs.gfs2 to make a filesystem
|
@ -274,7 +274,7 @@ History
|
||||
Fixed race-condition in buffer code - it is in all filesystems in Linux;
|
||||
when reading device (cat /dev/hda) while creating files on it, files
|
||||
could be damaged
|
||||
2.02 Woraround for bug in breada in Linux. breada could cause accesses beyond
|
||||
2.02 Workaround for bug in breada in Linux. breada could cause accesses beyond
|
||||
end of partition
|
||||
2.03 Char, block devices and pipes are correctly created
|
||||
Fixed non-crashing race in unlink (Alexander Viro)
|
||||
|
@ -13,7 +13,7 @@ Table of contents
|
||||
- Using NTFS volume and stripe sets
|
||||
- The Device-Mapper driver
|
||||
- The Software RAID / MD driver
|
||||
- Limitiations when using the MD driver
|
||||
- Limitations when using the MD driver
|
||||
- ChangeLog
|
||||
|
||||
|
||||
@ -43,7 +43,7 @@ There is plenty of additional information on the linux-ntfs web site
|
||||
at http://linux-ntfs.sourceforge.net/
|
||||
|
||||
The web site has a lot of additional information, such as a comprehensive
|
||||
FAQ, documentation on the NTFS on-disk format, informaiton on the Linux-NTFS
|
||||
FAQ, documentation on the NTFS on-disk format, information on the Linux-NTFS
|
||||
userspace utilities, etc.
|
||||
|
||||
|
||||
@ -337,7 +337,7 @@ Finally, for a mirrored volume, i.e. raid level 1, the table would look like
|
||||
this (note all values are in 512-byte sectors):
|
||||
|
||||
--- cut here ---
|
||||
# Ofs Size Raid Log Number Region Should Number Source Start Taget Start
|
||||
# Ofs Size Raid Log Number Region Should Number Source Start Target Start
|
||||
# in of the type type of log size sync? of Device in Device in
|
||||
# vol volume params mirrors Device Device
|
||||
0 2056320 mirror core 2 16 nosync 2 /dev/hda1 0 /dev/hdb1 0
|
||||
@ -383,14 +383,14 @@ Software RAID / MD driver. For which you need to set up your /etc/raidtab
|
||||
appropriately (see man 5 raidtab).
|
||||
|
||||
Linear volume sets, i.e. linear raid, as well as stripe sets, i.e. raid level
|
||||
0, have been tested and work fine (though see section "Limitiations when using
|
||||
0, have been tested and work fine (though see section "Limitations when using
|
||||
the MD driver with NTFS volumes" especially if you want to use linear raid).
|
||||
Even though untested, there is no reason why mirrors, i.e. raid level 1, and
|
||||
stripes with parity, i.e. raid level 5, should not work, too.
|
||||
|
||||
You have to use the "persistent-superblock 0" option for each raid-disk in the
|
||||
NTFS volume/stripe you are configuring in /etc/raidtab as the persistent
|
||||
superblock used by the MD driver would damange the NTFS volume.
|
||||
superblock used by the MD driver would damage the NTFS volume.
|
||||
|
||||
Windows by default uses a stripe chunk size of 64k, so you probably want the
|
||||
"chunk-size 64k" option for each raid-disk, too.
|
||||
@ -435,7 +435,7 @@ setup correctly to avoid the possibility of causing damage to the data on the
|
||||
ntfs volume.
|
||||
|
||||
|
||||
Limitiations when using the Software RAID / MD driver
|
||||
Limitations when using the Software RAID / MD driver
|
||||
-----------------------------------------------------
|
||||
|
||||
Using the md driver will not work properly if any of your NTFS partitions have
|
||||
@ -599,7 +599,7 @@ Note, a technical ChangeLog aimed at kernel hackers is in fs/ntfs/ChangeLog.
|
||||
- Major bug fixes for reading files and volumes in corner cases which
|
||||
were being hit by Windows 2k/XP users.
|
||||
2.1.2:
|
||||
- Major bug fixes aleviating the hangs in statfs experienced by some
|
||||
- Major bug fixes alleviating the hangs in statfs experienced by some
|
||||
users.
|
||||
2.1.1:
|
||||
- Update handling of compressed files so people no longer get the
|
||||
|
@ -30,7 +30,7 @@ Caveats
|
||||
Features which OCFS2 does not support yet:
|
||||
- sparse files
|
||||
- extended attributes
|
||||
- shared writeable mmap
|
||||
- shared writable mmap
|
||||
- loopback is supported, but data written will not
|
||||
be cluster coherent.
|
||||
- quotas
|
||||
@ -54,3 +54,6 @@ errors=panic Panic and halt the machine if an error occurs.
|
||||
intr (*) Allow signals to interrupt cluster operations.
|
||||
nointr Do not allow signals to interrupt cluster
|
||||
operations.
|
||||
atime_quantum=60(*) OCFS2 will not update atime unless this number
|
||||
of seconds has passed since the last update.
|
||||
Set to zero to always update atime.
|
||||
|
@ -39,6 +39,8 @@ Table of Contents
|
||||
2.9 Appletalk
|
||||
2.10 IPX
|
||||
2.11 /proc/sys/fs/mqueue - POSIX message queues filesystem
|
||||
2.12 /proc/<pid>/oom_adj - Adjust the oom-killer score
|
||||
2.13 /proc/<pid>/oom_score - Display current oom-killer score
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
Preface
|
||||
@ -408,7 +410,7 @@ VmallocChunk: 111088 kB
|
||||
this memory, making it slower to access than lowmem.
|
||||
LowTotal:
|
||||
LowFree: Lowmem is memory which can be used for everything that
|
||||
highmem can be used for, but it is also availble for the
|
||||
highmem can be used for, but it is also available for the
|
||||
kernel's use for its own data structures. Among many
|
||||
other things, it is where everything from the Slab is
|
||||
allocated. Bad things happen when you're out of lowmem.
|
||||
@ -1218,9 +1220,9 @@ applications are using mlock(), or if you are running with no swap then
|
||||
you probably should increase the lower_zone_protection setting.
|
||||
|
||||
The units of this tunable are fairly vague. It is approximately equal
|
||||
to "megabytes". So setting lower_zone_protection=100 will protect around 100
|
||||
to "megabytes," so setting lower_zone_protection=100 will protect around 100
|
||||
megabytes of the lowmem zone from user allocations. It will also make
|
||||
those 100 megabytes unavaliable for use by applications and by
|
||||
those 100 megabytes unavailable for use by applications and by
|
||||
pagecache, so there is a cost.
|
||||
|
||||
The effects of this tunable may be observed by monitoring
|
||||
@ -1253,7 +1255,7 @@ to allocate (but not use) more memory than is actually available.
|
||||
address space are refused. Used for a typical system. It
|
||||
ensures a seriously wild allocation fails while allowing
|
||||
overcommit to reduce swap usage. root is allowed to
|
||||
allocate slighly more memory in this mode. This is the
|
||||
allocate slightly more memory in this mode. This is the
|
||||
default.
|
||||
|
||||
1 - Always overcommit. Appropriate for some scientific
|
||||
@ -1536,10 +1538,10 @@ TCP settings
|
||||
tcp_ecn
|
||||
-------
|
||||
|
||||
This file controls the use of the ECN bit in the IPv4 headers, this is a new
|
||||
This file controls the use of the ECN bit in the IPv4 headers. This is a new
|
||||
feature about Explicit Congestion Notification, but some routers and firewalls
|
||||
block trafic that has this bit set, so it could be necessary to echo 0 to
|
||||
/proc/sys/net/ipv4/tcp_ecn, if you want to talk to this sites. For more info
|
||||
block traffic that has this bit set, so it could be necessary to echo 0 to
|
||||
/proc/sys/net/ipv4/tcp_ecn if you want to talk to these sites. For more info
|
||||
you could read RFC2481.
|
||||
|
||||
tcp_retrans_collapse
|
||||
@ -1586,7 +1588,7 @@ Enable the strict RFC793 interpretation of the TCP urgent pointer field. The
|
||||
default is to use the BSD compatible interpretation of the urgent pointer
|
||||
pointing to the first byte after the urgent data. The RFC793 interpretation is
|
||||
to have it point to the last byte of urgent data. Enabling this option may
|
||||
lead to interoperatibility problems. Disabled by default.
|
||||
lead to interoperability problems. Disabled by default.
|
||||
|
||||
tcp_syncookies
|
||||
--------------
|
||||
@ -1731,7 +1733,7 @@ error_burst and error_cost
|
||||
|
||||
These parameters are used to limit how many ICMP destination unreachable to
|
||||
send from the host in question. ICMP destination unreachable messages are
|
||||
sent when we can not reach the next hop, while trying to transmit a packet.
|
||||
sent when we cannot reach the next hop while trying to transmit a packet.
|
||||
It will also print some error messages to kernel logs if someone is ignoring
|
||||
our ICMP redirects. The higher the error_cost factor is, the fewer
|
||||
destination unreachable and error messages will be let through. Error_burst
|
||||
@ -1855,7 +1857,7 @@ proxy_qlen
|
||||
|
||||
Maximum queue length of the delayed proxy arp timer. (see proxy_delay).
|
||||
|
||||
app_solcit
|
||||
app_solicit
|
||||
----------
|
||||
|
||||
Determines the number of requests to send to the user level ARP daemon. Use 0
|
||||
@ -1962,6 +1964,22 @@ a queue must be less or equal then msg_max.
|
||||
maximum message size value (it is every message queue's attribute set during
|
||||
its creation).
|
||||
|
||||
2.12 /proc/<pid>/oom_adj - Adjust the oom-killer score
|
||||
------------------------------------------------------
|
||||
|
||||
This file can be used to adjust the score used to select which processes
|
||||
should be killed in an out-of-memory situation. Giving it a high score will
|
||||
increase the likelihood of this process being killed by the oom-killer. Valid
|
||||
values are in the range -16 to +15, plus the special value -17, which disables
|
||||
oom-killing altogether for this process.
|
||||
|
||||
2.13 /proc/<pid>/oom_score - Display current oom-killer score
|
||||
-------------------------------------------------------------
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
This file can be used to check the current score used by the oom-killer is for
|
||||
any given <pid>. Use it together with /proc/<pid>/oom_adj to tune which
|
||||
process should be killed in an out-of-memory situation.
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
Summary
|
||||
|
@ -84,7 +84,7 @@ FILES
|
||||
/ibox
|
||||
The second SPU to CPU communication mailbox. This file is similar to
|
||||
the first mailbox file, but can be read in blocking I/O mode, and the
|
||||
poll familiy of system calls can be used to wait for it. The possible
|
||||
poll family of system calls can be used to wait for it. The possible
|
||||
operations on an open ibox file are:
|
||||
|
||||
read(2)
|
||||
@ -105,7 +105,7 @@ FILES
|
||||
|
||||
|
||||
/wbox
|
||||
The CPU to SPU communation mailbox. It is write-only can can be written
|
||||
The CPU to SPU communation mailbox. It is write-only and can be written
|
||||
in units of 32 bits. If the mailbox is full, write() will block and
|
||||
poll can be used to wait for it becoming empty again. The possible
|
||||
operations on an open wbox file are: write(2) If a count smaller than
|
||||
@ -210,7 +210,7 @@ FILES
|
||||
/signal2
|
||||
The two signal notification channels of an SPU. These are read-write
|
||||
files that operate on a 32 bit word. Writing to one of these files
|
||||
triggers an interrupt on the SPU. The value writting to the signal
|
||||
triggers an interrupt on the SPU. The value written to the signal
|
||||
files can be read from the SPU through a channel read or from host user
|
||||
space through the file. After the value has been read by the SPU, it
|
||||
is reset to zero. The possible operations on an open signal1 or sig-
|
||||
@ -359,7 +359,7 @@ ERRORS
|
||||
EFAULT npc is not a valid pointer or status is neither NULL nor a valid
|
||||
pointer.
|
||||
|
||||
EINTR A signal occured while spu_run was in progress. The npc value
|
||||
EINTR A signal occurred while spu_run was in progress. The npc value
|
||||
has been updated to the new program counter value if necessary.
|
||||
|
||||
EINVAL fd is not a file descriptor returned from spu_create(2).
|
||||
|
@ -238,7 +238,7 @@ Top Level Directory Layout
|
||||
The sysfs directory arrangement exposes the relationship of kernel
|
||||
data structures.
|
||||
|
||||
The top level sysfs diretory looks like:
|
||||
The top level sysfs directory looks like:
|
||||
|
||||
block/
|
||||
bus/
|
||||
|
@ -1,11 +1,8 @@
|
||||
This is the implementation of the SystemV/Coherent filesystem for Linux.
|
||||
It implements all of
|
||||
- Xenix FS,
|
||||
- SystemV/386 FS,
|
||||
- Coherent FS.
|
||||
|
||||
This is version beta 4.
|
||||
|
||||
To install:
|
||||
* Answer the 'System V and Coherent filesystem support' question with 'y'
|
||||
when configuring the kernel.
|
||||
@ -28,11 +25,173 @@ Bugs in the present implementation:
|
||||
for this FS on hard disk yet.
|
||||
|
||||
|
||||
Please report any bugs and suggestions to
|
||||
Bruno Haible <haible@ma2s2.mathematik.uni-karlsruhe.de>
|
||||
Pascal Haible <haible@izfm.uni-stuttgart.de>
|
||||
Krzysztof G. Baranowski <kgb@manjak.knm.org.pl>
|
||||
These filesystems are rather similar. Here is a comparison with Minix FS:
|
||||
|
||||
Bruno Haible
|
||||
<haible@ma2s2.mathematik.uni-karlsruhe.de>
|
||||
* Linux fdisk reports on partitions
|
||||
- Minix FS 0x81 Linux/Minix
|
||||
- Xenix FS ??
|
||||
- SystemV FS ??
|
||||
- Coherent FS 0x08 AIX bootable
|
||||
|
||||
* Size of a block or zone (data allocation unit on disk)
|
||||
- Minix FS 1024
|
||||
- Xenix FS 1024 (also 512 ??)
|
||||
- SystemV FS 1024 (also 512 and 2048)
|
||||
- Coherent FS 512
|
||||
|
||||
* General layout: all have one boot block, one super block and
|
||||
separate areas for inodes and for directories/data.
|
||||
On SystemV Release 2 FS (e.g. Microport) the first track is reserved and
|
||||
all the block numbers (including the super block) are offset by one track.
|
||||
|
||||
* Byte ordering of "short" (16 bit entities) on disk:
|
||||
- Minix FS little endian 0 1
|
||||
- Xenix FS little endian 0 1
|
||||
- SystemV FS little endian 0 1
|
||||
- Coherent FS little endian 0 1
|
||||
Of course, this affects only the file system, not the data of files on it!
|
||||
|
||||
* Byte ordering of "long" (32 bit entities) on disk:
|
||||
- Minix FS little endian 0 1 2 3
|
||||
- Xenix FS little endian 0 1 2 3
|
||||
- SystemV FS little endian 0 1 2 3
|
||||
- Coherent FS PDP-11 2 3 0 1
|
||||
Of course, this affects only the file system, not the data of files on it!
|
||||
|
||||
* Inode on disk: "short", 0 means non-existent, the root dir ino is:
|
||||
- Minix FS 1
|
||||
- Xenix FS, SystemV FS, Coherent FS 2
|
||||
|
||||
* Maximum number of hard links to a file:
|
||||
- Minix FS 250
|
||||
- Xenix FS ??
|
||||
- SystemV FS ??
|
||||
- Coherent FS >=10000
|
||||
|
||||
* Free inode management:
|
||||
- Minix FS a bitmap
|
||||
- Xenix FS, SystemV FS, Coherent FS
|
||||
There is a cache of a certain number of free inodes in the super-block.
|
||||
When it is exhausted, new free inodes are found using a linear search.
|
||||
|
||||
* Free block management:
|
||||
- Minix FS a bitmap
|
||||
- Xenix FS, SystemV FS, Coherent FS
|
||||
Free blocks are organized in a "free list". Maybe a misleading term,
|
||||
since it is not true that every free block contains a pointer to
|
||||
the next free block. Rather, the free blocks are organized in chunks
|
||||
of limited size, and every now and then a free block contains pointers
|
||||
to the free blocks pertaining to the next chunk; the first of these
|
||||
contains pointers and so on. The list terminates with a "block number"
|
||||
0 on Xenix FS and SystemV FS, with a block zeroed out on Coherent FS.
|
||||
|
||||
* Super-block location:
|
||||
- Minix FS block 1 = bytes 1024..2047
|
||||
- Xenix FS block 1 = bytes 1024..2047
|
||||
- SystemV FS bytes 512..1023
|
||||
- Coherent FS block 1 = bytes 512..1023
|
||||
|
||||
* Super-block layout:
|
||||
- Minix FS
|
||||
unsigned short s_ninodes;
|
||||
unsigned short s_nzones;
|
||||
unsigned short s_imap_blocks;
|
||||
unsigned short s_zmap_blocks;
|
||||
unsigned short s_firstdatazone;
|
||||
unsigned short s_log_zone_size;
|
||||
unsigned long s_max_size;
|
||||
unsigned short s_magic;
|
||||
- Xenix FS, SystemV FS, Coherent FS
|
||||
unsigned short s_firstdatazone;
|
||||
unsigned long s_nzones;
|
||||
unsigned short s_fzone_count;
|
||||
unsigned long s_fzones[NICFREE];
|
||||
unsigned short s_finode_count;
|
||||
unsigned short s_finodes[NICINOD];
|
||||
char s_flock;
|
||||
char s_ilock;
|
||||
char s_modified;
|
||||
char s_rdonly;
|
||||
unsigned long s_time;
|
||||
short s_dinfo[4]; -- SystemV FS only
|
||||
unsigned long s_free_zones;
|
||||
unsigned short s_free_inodes;
|
||||
short s_dinfo[4]; -- Xenix FS only
|
||||
unsigned short s_interleave_m,s_interleave_n; -- Coherent FS only
|
||||
char s_fname[6];
|
||||
char s_fpack[6];
|
||||
then they differ considerably:
|
||||
Xenix FS
|
||||
char s_clean;
|
||||
char s_fill[371];
|
||||
long s_magic;
|
||||
long s_type;
|
||||
SystemV FS
|
||||
long s_fill[12 or 14];
|
||||
long s_state;
|
||||
long s_magic;
|
||||
long s_type;
|
||||
Coherent FS
|
||||
unsigned long s_unique;
|
||||
Note that Coherent FS has no magic.
|
||||
|
||||
* Inode layout:
|
||||
- Minix FS
|
||||
unsigned short i_mode;
|
||||
unsigned short i_uid;
|
||||
unsigned long i_size;
|
||||
unsigned long i_time;
|
||||
unsigned char i_gid;
|
||||
unsigned char i_nlinks;
|
||||
unsigned short i_zone[7+1+1];
|
||||
- Xenix FS, SystemV FS, Coherent FS
|
||||
unsigned short i_mode;
|
||||
unsigned short i_nlink;
|
||||
unsigned short i_uid;
|
||||
unsigned short i_gid;
|
||||
unsigned long i_size;
|
||||
unsigned char i_zone[3*(10+1+1+1)];
|
||||
unsigned long i_atime;
|
||||
unsigned long i_mtime;
|
||||
unsigned long i_ctime;
|
||||
|
||||
* Regular file data blocks are organized as
|
||||
- Minix FS
|
||||
7 direct blocks
|
||||
1 indirect block (pointers to blocks)
|
||||
1 double-indirect block (pointer to pointers to blocks)
|
||||
- Xenix FS, SystemV FS, Coherent FS
|
||||
10 direct blocks
|
||||
1 indirect block (pointers to blocks)
|
||||
1 double-indirect block (pointer to pointers to blocks)
|
||||
1 triple-indirect block (pointer to pointers to pointers to blocks)
|
||||
|
||||
* Inode size, inodes per block
|
||||
- Minix FS 32 32
|
||||
- Xenix FS 64 16
|
||||
- SystemV FS 64 16
|
||||
- Coherent FS 64 8
|
||||
|
||||
* Directory entry on disk
|
||||
- Minix FS
|
||||
unsigned short inode;
|
||||
char name[14/30];
|
||||
- Xenix FS, SystemV FS, Coherent FS
|
||||
unsigned short inode;
|
||||
char name[14];
|
||||
|
||||
* Dir entry size, dir entries per block
|
||||
- Minix FS 16/32 64/32
|
||||
- Xenix FS 16 64
|
||||
- SystemV FS 16 64
|
||||
- Coherent FS 16 32
|
||||
|
||||
* How to implement symbolic links such that the host fsck doesn't scream:
|
||||
- Minix FS normal
|
||||
- Xenix FS kludge: as regular files with chmod 1000
|
||||
- SystemV FS ??
|
||||
- Coherent FS kludge: as regular files with chmod 1000
|
||||
|
||||
|
||||
Notation: We often speak of a "block" but mean a zone (the allocation unit)
|
||||
and not the disk driver's notion of "block".
|
||||
|
@ -39,7 +39,7 @@ tmpfs has the following uses:
|
||||
tmpfs /dev/shm tmpfs defaults 0 0
|
||||
|
||||
Remember to create the directory that you intend to mount tmpfs on
|
||||
if necessary (/dev/shm is automagically created if you use devfs).
|
||||
if necessary.
|
||||
|
||||
This mount is _not_ needed for SYSV shared memory. The internal
|
||||
mount is used for that. (In the 2.3 kernel versions it was
|
||||
@ -63,7 +63,7 @@ size: The limit of allocated bytes for this tmpfs instance. The
|
||||
nr_blocks: The same as size, but in blocks of PAGE_CACHE_SIZE.
|
||||
nr_inodes: The maximum number of inodes for this instance. The default
|
||||
is half of the number of your physical RAM pages, or (on a
|
||||
a machine with highmem) the number of lowmem RAM pages,
|
||||
machine with highmem) the number of lowmem RAM pages,
|
||||
whichever is the lower.
|
||||
|
||||
These parameters accept a suffix k, m or g for kilo, mega and giga and
|
||||
|
@ -7,8 +7,17 @@ If you encounter problems with reading UDF discs using this driver,
|
||||
please report them to linux_udf@hpesjro.fc.hp.com, which is the
|
||||
developer's list.
|
||||
|
||||
Write support requires a block driver which supports writing. The current
|
||||
scsi and ide cdrom drivers do not support writing.
|
||||
Write support requires a block driver which supports writing. Currently
|
||||
dvd+rw drives and media support true random sector writes, and so a udf
|
||||
filesystem on such devices can be directly mounted read/write. CD-RW
|
||||
media however, does not support this. Instead the media can be formatted
|
||||
for packet mode using the utility cdrwtool, then the pktcdvd driver can
|
||||
be bound to the underlying cd device to provide the required buffering
|
||||
and read-modify-write cycles to allow the filesystem random sector writes
|
||||
while providing the hardware with only full packet writes. While not
|
||||
required for dvd+rw media, use of the pktcdvd driver often enhances
|
||||
performance due to very poor read-modify-write support supplied internally
|
||||
by drive firmware.
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
The following mount options are supported:
|
||||
|
@ -35,7 +35,7 @@ iocharset=name -- Character set to use for converting between the
|
||||
you should consider the following option instead.
|
||||
|
||||
utf8=<bool> -- UTF-8 is the filesystem safe version of Unicode that
|
||||
is used by the console. It can be be enabled for the
|
||||
is used by the console. It can be enabled for the
|
||||
filesystem with this option. If 'uni_xlate' gets set,
|
||||
UTF-8 gets disabled.
|
||||
|
||||
|
@ -410,7 +410,7 @@ otherwise noted.
|
||||
|
||||
put_link: called by the VFS to release resources allocated by
|
||||
follow_link(). The cookie returned by follow_link() is passed
|
||||
to to this method as the last parameter. It is used by
|
||||
to this method as the last parameter. It is used by
|
||||
filesystems such as NFS where page cache is not stable
|
||||
(i.e. page that was installed when the symbolic link walk
|
||||
started might not be in the page cache at the end of the
|
||||
@ -699,9 +699,9 @@ This describes how the VFS can manipulate an open file. As of kernel
|
||||
struct file_operations {
|
||||
loff_t (*llseek) (struct file *, loff_t, int);
|
||||
ssize_t (*read) (struct file *, char __user *, size_t, loff_t *);
|
||||
ssize_t (*aio_read) (struct kiocb *, char __user *, size_t, loff_t);
|
||||
ssize_t (*write) (struct file *, const char __user *, size_t, loff_t *);
|
||||
ssize_t (*aio_write) (struct kiocb *, const char __user *, size_t, loff_t);
|
||||
ssize_t (*aio_read) (struct kiocb *, const struct iovec *, unsigned long, loff_t);
|
||||
ssize_t (*aio_write) (struct kiocb *, const struct iovec *, unsigned long, loff_t);
|
||||
int (*readdir) (struct file *, void *, filldir_t);
|
||||
unsigned int (*poll) (struct file *, struct poll_table_struct *);
|
||||
int (*ioctl) (struct inode *, struct file *, unsigned int, unsigned long);
|
||||
|
@ -1,307 +0,0 @@
|
||||
Intro
|
||||
=====
|
||||
|
||||
This file describes some issues involved when using the "ftape"
|
||||
floppy tape device driver that comes with the Linux kernel.
|
||||
|
||||
ftape has a home page at
|
||||
|
||||
http://ftape.dot-heine.de/
|
||||
|
||||
which contains further information about ftape. Please cross check
|
||||
this WWW address against the address given (if any) in the MAINTAINERS
|
||||
file located in the top level directory of the Linux kernel source
|
||||
tree.
|
||||
|
||||
NOTE: This is an unmaintained set of drivers, and it is not guaranteed to work.
|
||||
If you are interested in taking over maintenance, contact Claus-Justus Heine
|
||||
<ch@dot-heine.de>, the former maintainer.
|
||||
|
||||
Contents
|
||||
========
|
||||
|
||||
A minus 1: Ftape documentation
|
||||
|
||||
A. Changes
|
||||
1. Goal
|
||||
2. I/O Block Size
|
||||
3. Write Access when not at EOD (End Of Data) or BOT (Begin Of Tape)
|
||||
4. Formatting
|
||||
5. Interchanging cartridges with other operating systems
|
||||
|
||||
B. Debugging Output
|
||||
1. Introduction
|
||||
2. Tuning the debugging output
|
||||
|
||||
C. Boot and load time configuration
|
||||
1. Setting boot time parameters
|
||||
2. Module load time parameters
|
||||
3. Ftape boot- and load time options
|
||||
4. Example kernel parameter setting
|
||||
5. Example module parameter setting
|
||||
|
||||
D. Support and contacts
|
||||
|
||||
*******************************************************************************
|
||||
|
||||
A minus 1. Ftape documentation
|
||||
==============================
|
||||
|
||||
Unluckily, the ftape-HOWTO is out of date. This really needs to be
|
||||
changed. Up to date documentation as well as recent development
|
||||
versions of ftape and useful links to related topics can be found at
|
||||
the ftape home page at
|
||||
|
||||
http://ftape.dot-heine.de/
|
||||
|
||||
*******************************************************************************
|
||||
|
||||
A. Changes
|
||||
==========
|
||||
|
||||
1. Goal
|
||||
~~~~
|
||||
The goal of all that incompatibilities was to give ftape an interface
|
||||
that resembles the interface provided by SCSI tape drives as close
|
||||
as possible. Thus any Unix backup program that is known to work
|
||||
with SCSI tape drives should also work.
|
||||
|
||||
The concept of a fixed block size for read/write transfers is
|
||||
rather unrelated to this SCSI tape compatibility at the file system
|
||||
interface level. It developed out of a feature of zftape, a
|
||||
block wise user transparent on-the-fly compression. That compression
|
||||
support will not be dropped in future releases for compatibility
|
||||
reasons with previous releases of zftape.
|
||||
|
||||
2. I/O Block Size
|
||||
~~~~~~~~~~~~~~
|
||||
The block size defaults to 10k which is the default block size of
|
||||
GNU tar.
|
||||
|
||||
The block size can be tuned either during kernel configuration or
|
||||
at runtime with the MTIOCTOP ioctl using the MTSETBLK operation
|
||||
(i.e. do "mt -f /dev/qft0" setblk #BLKSZ). A block size of 0
|
||||
switches to variable block size mode i.e. "mt setblk 0" switches
|
||||
off the block size restriction. However, this disables zftape's
|
||||
built in on-the-fly compression which doesn't work with variable
|
||||
block size mode.
|
||||
|
||||
The BLKSZ parameter must be given as a byte count and must be a
|
||||
multiple of 32k or 0, i.e. use "mt setblk 32768" to switch to a
|
||||
block size of 32k.
|
||||
|
||||
The typical symptom of a block size mismatch is an "invalid
|
||||
argument" error message.
|
||||
|
||||
3. Write Access when not at EOD (End Of Data) or BOT (Begin Of Tape)
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
zftape (the file system interface of ftape-3.x) denies write access
|
||||
to the tape cartridge when it isn't positioned either at BOT or
|
||||
EOD.
|
||||
|
||||
4. Formatting
|
||||
~~~~~~~~~~
|
||||
ftape DOES support formatting of floppy tape cartridges. You need the
|
||||
`ftformat' program that is shipped with the modules version of ftape.
|
||||
Please get the latest version of ftape from
|
||||
|
||||
ftp://sunsite.unc.edu/pub/Linux/kernel/tapes
|
||||
|
||||
or from the ftape home page at
|
||||
|
||||
http://ftape.dot-heine.de/
|
||||
|
||||
`ftformat' is contained in the `./contrib/' subdirectory of that
|
||||
separate ftape package.
|
||||
|
||||
5. Interchanging cartridges with other operating systems
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
The internal emulation of Unix tape device file marks has changed
|
||||
completely. ftape now uses the volume table segment as specified
|
||||
by the QIC-40/80/3010/3020/113 standards to emulate file marks. As
|
||||
a consequence there is limited support to interchange cartridges
|
||||
with other operating systems.
|
||||
|
||||
To be more precise: ftape will detect volumes written by other OS's
|
||||
programs and other OS's programs will detect volumes written by
|
||||
ftape.
|
||||
|
||||
However, it isn't possible to extract the data dumped to the tape
|
||||
by some MSDOS program with ftape. This exceeds the scope of a
|
||||
kernel device driver. If you need such functionality, then go ahead
|
||||
and write a user space utility that is able to do that. ftape already
|
||||
provides all kernel level support necessary to do that.
|
||||
|
||||
*******************************************************************************
|
||||
|
||||
B. Debugging Output
|
||||
================
|
||||
|
||||
1. Introduction
|
||||
~~~~~~~~~~~~
|
||||
The ftape driver can be very noisy in that is can print lots of
|
||||
debugging messages to the kernel log files and the system console.
|
||||
While this is useful for debugging it might be annoying during
|
||||
normal use and enlarges the size of the driver by several kilobytes.
|
||||
|
||||
To reduce the size of the driver you can trim the maximal amount of
|
||||
debugging information available during kernel configuration. Please
|
||||
refer to the kernel configuration script and its on-line help
|
||||
functionality.
|
||||
|
||||
The amount of debugging output maps to the "tracing" boot time
|
||||
option and the "ft_tracing" modules option as follows:
|
||||
|
||||
0 bugs
|
||||
1 + errors (with call-stack dump)
|
||||
2 + warnings
|
||||
3 + information
|
||||
4 + more information
|
||||
5 + program flow
|
||||
6 + fdc/dma info
|
||||
7 + data flow
|
||||
8 + everything else
|
||||
|
||||
2. Tuning the debugging output
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
To reduce the amount of debugging output printed to the system
|
||||
console you can
|
||||
|
||||
i) trim the debugging output at run-time with
|
||||
|
||||
mt -f /dev/nqft0 setdensity #DBGLVL
|
||||
|
||||
where "#DBGLVL" is a number between 0 and 9
|
||||
|
||||
ii) trim the debugging output at module load time with
|
||||
|
||||
modprobe ftape ft_tracing=#DBGLVL
|
||||
|
||||
Of course, this applies only if you have configured ftape to be
|
||||
compiled as a module.
|
||||
|
||||
iii) trim the debugging output during system boot time. Add the
|
||||
following to the kernel command line:
|
||||
|
||||
ftape=#DBGLVL,tracing
|
||||
|
||||
Please refer also to the next section if you don't know how to
|
||||
set boot time parameters.
|
||||
|
||||
*******************************************************************************
|
||||
|
||||
C. Boot and load time configuration
|
||||
================================
|
||||
|
||||
1. Setting boot time parameters
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Assuming that you use lilo, the LI)nux LO)ader, boot time kernel
|
||||
parameters can be set by adding a line
|
||||
|
||||
append some_kernel_boot_time_parameter
|
||||
|
||||
to `/etc/lilo.conf' or at real boot time by typing in the options
|
||||
at the prompt provided by LILO. I can't give you advice on how to
|
||||
specify those parameters with other loaders as I don't use them.
|
||||
|
||||
For ftape, each "some_kernel_boot_time_parameter" looks like
|
||||
"ftape=value,option". As an example, the debugging output can be
|
||||
increased with
|
||||
|
||||
ftape=4,tracing
|
||||
|
||||
NOTE: the value precedes the option name.
|
||||
|
||||
2. Module load time parameters
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Module parameters can be specified either directly when invoking
|
||||
the program 'modprobe' at the shell prompt:
|
||||
|
||||
modprobe ftape ft_tracing=4
|
||||
|
||||
or by editing the file `/etc/modprobe.conf' in which case they take
|
||||
effect each time when the module is loaded with `modprobe' (please
|
||||
refer to the respective manual pages). Thus, you should add a line
|
||||
|
||||
options ftape ft_tracing=4
|
||||
|
||||
to `/etc/modprobe.conf` if you intend to increase the debugging
|
||||
output of the driver.
|
||||
|
||||
|
||||
3. Ftape boot- and load time options
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
i. Controlling the amount of debugging output
|
||||
DBGLVL has to be replaced by a number between 0 and 8.
|
||||
|
||||
module | kernel command line
|
||||
-----------------------|----------------------
|
||||
ft_tracing=DBGLVL | ftape=DBGLVL,tracing
|
||||
|
||||
ii. Hardware setup
|
||||
BASE is the base address of your floppy disk controller,
|
||||
IRQ and DMA give its interrupt and DMA channel, respectively.
|
||||
BOOL is an integer, "0" means "no"; any other value means
|
||||
"yes". You don't need to specify anything if connecting your tape
|
||||
drive to the standard floppy disk controller. All of these
|
||||
values have reasonable defaults. The defaults can be modified
|
||||
during kernel configuration, i.e. while running "make config",
|
||||
"make menuconfig" or "make xconfig" in the top level directory
|
||||
of the Linux kernel source tree. Please refer also to the on
|
||||
line documentation provided during that kernel configuration
|
||||
process.
|
||||
|
||||
ft_probe_fc10 is set to a non-zero value if you wish for ftape to
|
||||
probe for a Colorado FC-10 or FC-20 controller.
|
||||
|
||||
ft_mach2 is set to a non-zero value if you wish for ftape to probe
|
||||
for a Mountain MACH-2 controller.
|
||||
|
||||
module | kernel command line
|
||||
-----------------------|----------------------
|
||||
ft_fdc_base=BASE | ftape=BASE,ioport
|
||||
ft_fdc_irq=IRQ | ftape=IRQ,irq
|
||||
ft_fdc_dma=DMA | ftape=DMA,dma
|
||||
ft_probe_fc10=BOOL | ftape=BOOL,fc10
|
||||
ft_mach2=BOOL | ftape=BOOL,mach2
|
||||
ft_fdc_threshold=THR | ftape=THR,threshold
|
||||
ft_fdc_rate_limit=RATE | ftape=RATE,datarate
|
||||
|
||||
4. Example kernel parameter setting
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
To configure ftape to probe for a Colorado FC-10/FC-20 controller
|
||||
and to increase the amount of debugging output a little bit, add
|
||||
the following line to `/etc/lilo.conf':
|
||||
|
||||
append ftape=1,fc10 ftape=4,tracing
|
||||
|
||||
5. Example module parameter setting
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
To do the same, but with ftape compiled as a loadable kernel
|
||||
module, add the following line to `/etc/modprobe.conf':
|
||||
|
||||
options ftape ft_probe_fc10=1 ft_tracing=4
|
||||
|
||||
*******************************************************************************
|
||||
|
||||
D. Support and contacts
|
||||
====================
|
||||
|
||||
Ftape is distributed under the GNU General Public License. There is
|
||||
absolutely no warranty for this software. However, you can reach
|
||||
the current maintainer of the ftape package under the email address
|
||||
given in the MAINTAINERS file which is located in the top level
|
||||
directory of the Linux kernel source tree. There you'll find also
|
||||
the relevant mailing list to use as a discussion forum and the web
|
||||
page to query for the most recent documentation, related work and
|
||||
development versions of ftape.
|
||||
|
||||
Changelog:
|
||||
==========
|
||||
|
||||
~1996: Original Document
|
||||
|
||||
10-24-2004: General cleanup and updating, noting additional module options.
|
||||
James Nelson <james4765@gmail.com>
|
@ -59,7 +59,7 @@ the following things on the "Kernel Hacking" tab:
|
||||
Then build as usual, download to the board and execute. Note that if
|
||||
"Immediate activation" was selected, then the kernel will wait for GDB to
|
||||
attach. If not, then the kernel will boot immediately and GDB will have to
|
||||
interupt it or wait for an exception to occur if before doing anything with
|
||||
interrupt it or wait for an exception to occur before doing anything with
|
||||
the kernel.
|
||||
|
||||
|
||||
|
@ -156,7 +156,7 @@ with the main kernel in this regard. Hence the debug mode code (gdbstub) is
|
||||
almost completely self-contained. The only external code used is the
|
||||
sprintf family of functions.
|
||||
|
||||
Futhermore, break.S is so complicated because single-step mode does not
|
||||
Furthermore, break.S is so complicated because single-step mode does not
|
||||
switch off on entry to an exception. That means unless manually disabled,
|
||||
single-stepping will blithely go on stepping into things like interrupts.
|
||||
See gdbstub.txt for more information.
|
||||
|
@ -233,7 +233,7 @@ related kernel services:
|
||||
(*) __debug_mmu.iamr[]
|
||||
(*) __debug_mmu.damr[]
|
||||
|
||||
These receive the current IAMR and DAMR contents. These can be viewed with with the _amr
|
||||
These receive the current IAMR and DAMR contents. These can be viewed with the _amr
|
||||
GDB macro:
|
||||
|
||||
(gdb) _amr
|
||||
|
@ -57,7 +57,7 @@ What's left to be done for 32-bit UIDs on all Linux architectures:
|
||||
|
||||
Other filesystems have not been checked yet.
|
||||
|
||||
- The ncpfs and smpfs filesystems can not presently use 32-bit UIDs in
|
||||
- The ncpfs and smpfs filesystems cannot presently use 32-bit UIDs in
|
||||
all ioctl()s. Some new ioctl()s have been added with 32-bit UIDs, but
|
||||
more are needed. (as well as new user<->kernel data structures)
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user