Merge commit 'v2.6.28-rc2' into x86/pci-ioapic-boot-irq-quirks
This commit is contained in:
commit
7a9787e1eb
15715 changed files with 1294867 additions and 590214 deletions
.mailmapCREDITS
Documentation
00-INDEXCodingStyleDMA-API.txtDMA-attributes.txtDMA-mapping.txt
ABI
stable
testing
DocBook
Makefilegadget.tmplkernel-api.tmplkernel-hacking.tmplkernel-locking.tmplkgdb.tmplmac80211.tmplprocfs-guide.tmplprocfs_example.cs390-drivers.tmplsh.tmpluio-howto.tmplvideobook.tmplz8530book.tmpl
HOWTOIntel-IOMMU.txtMSI-HOWTO.txtMakefilePCI
RCU
SAK.txtSELinux.txtSubmitChecklistSubmittingDriversSubmittingPatchesaccounting
arm
auxdisplay
blackfin
block
bt8xxgpio.txtcciss.txtcdrom
cgroups
cli-sti-removal.txtconnector
controllers
cpu-freq
cpu-hotplug.txtcpusets.txtcris
development-process
devices.txtdontdiffedac.txtfb
feature-removal-schedule.txtfilesystems
3
.mailmap
3
.mailmap
|
@ -66,6 +66,7 @@ Kenneth W Chen <kenneth.w.chen@intel.com>
|
|||
Koushik <raghavendra.koushik@neterion.com>
|
||||
Leonid I Ananiev <leonid.i.ananiev@intel.com>
|
||||
Linas Vepstas <linas@austin.ibm.com>
|
||||
Mark Brown <broonie@sirena.org.uk>
|
||||
Matthieu CASTET <castet.matthieu@free.fr>
|
||||
Michael Buesch <mb@bu3sch.de>
|
||||
Michael Buesch <mbuesch@freenet.de>
|
||||
|
@ -96,4 +97,6 @@ Tejun Heo <htejun@gmail.com>
|
|||
Thomas Graf <tgraf@suug.ch>
|
||||
Tony Luck <tony.luck@intel.com>
|
||||
Tsuneo Yoshioka <Tsuneo.Yoshioka@f-secure.com>
|
||||
Uwe Kleine-König <Uwe.Kleine-Koenig@digi.com>
|
||||
Uwe Kleine-König <ukleinek@informatik.uni-freiburg.de>
|
||||
Valdis Kletnieks <Valdis.Kletnieks@vt.edu>
|
||||
|
|
34
CREDITS
34
CREDITS
|
@ -317,6 +317,14 @@ S: 2322 37th Ave SW
|
|||
S: Seattle, Washington 98126-2010
|
||||
S: USA
|
||||
|
||||
N: Muli Ben-Yehuda
|
||||
E: mulix@mulix.org
|
||||
E: muli@il.ibm.com
|
||||
W: http://www.mulix.org
|
||||
D: trident OSS sound driver, x86-64 dma-ops and Calgary IOMMU,
|
||||
D: KVM and Xen bits and other misc. hackery.
|
||||
S: Haifa, Israel
|
||||
|
||||
N: Johannes Berg
|
||||
E: johannes@sipsolutions.net
|
||||
W: http://johannes.sipsolutions.net/
|
||||
|
@ -590,6 +598,11 @@ S: Tamsui town, Taipei county,
|
|||
S: Taiwan 251
|
||||
S: Republic of China
|
||||
|
||||
N: Reinette Chatre
|
||||
E: reinette.chatre@intel.com
|
||||
D: WiMedia Link Protocol implementation
|
||||
D: UWB stack bits and pieces
|
||||
|
||||
N: Michael Elizabeth Chastain
|
||||
E: mec@shout.net
|
||||
D: Configure, Menuconfig, xconfig
|
||||
|
@ -1645,14 +1658,14 @@ S: Chapel Hill, North Carolina 27514-4818
|
|||
S: USA
|
||||
|
||||
N: Dave Jones
|
||||
E: davej@codemonkey.org.uk
|
||||
E: davej@redhat.com
|
||||
W: http://www.codemonkey.org.uk
|
||||
D: x86 errata/setup maintenance.
|
||||
D: AGPGART driver.
|
||||
D: Assorted VIA x86 support.
|
||||
D: 2.5 AGPGART overhaul.
|
||||
D: CPUFREQ maintenance.
|
||||
D: Backport/Forwardport merge monkey.
|
||||
D: Various Janitor work.
|
||||
S: United Kingdom
|
||||
D: Fedora kernel maintainence.
|
||||
D: Misc/Other.
|
||||
S: 314 Littleton Rd, Westford, MA 01886, USA
|
||||
|
||||
N: Martin Josfsson
|
||||
E: gandalf@wlug.westbo.se
|
||||
|
@ -2687,6 +2700,12 @@ S: Demonstratsii 8-382
|
|||
S: Tula 300000
|
||||
S: Russia
|
||||
|
||||
N: Inaky Perez-Gonzalez
|
||||
E: inaky.perez-gonzalez@intel.com
|
||||
D: UWB stack, HWA-RC driver and HWA-HC drivers
|
||||
D: Wireless USB additions to the USB stack
|
||||
D: WiMedia Link Protocol bits and pieces
|
||||
|
||||
N: Gordon Peters
|
||||
E: GordPeters@smarttech.com
|
||||
D: Isochronous receive for IEEE 1394 driver (OHCI module).
|
||||
|
@ -3344,8 +3363,7 @@ S: Spain
|
|||
N: Linus Torvalds
|
||||
E: torvalds@linux-foundation.org
|
||||
D: Original kernel hacker
|
||||
S: 12725 SW Millikan Way, Suite 400
|
||||
S: Beaverton, Oregon 97005
|
||||
S: Portland, Oregon 97005
|
||||
S: USA
|
||||
|
||||
N: Marcelo Tosatti
|
||||
|
|
|
@ -21,6 +21,9 @@ Changes
|
|||
- list of changes that break older software packages.
|
||||
CodingStyle
|
||||
- how the boss likes the C code in the kernel to look.
|
||||
development-process/
|
||||
- An extended tutorial on how to work with the kernel development
|
||||
process.
|
||||
DMA-API.txt
|
||||
- DMA API, pci_ API & extensions for non-consistent memory machines.
|
||||
DMA-ISA-LPC.txt
|
||||
|
@ -89,8 +92,6 @@ cciss.txt
|
|||
- info, major/minor #'s for Compaq's SMART Array Controllers.
|
||||
cdrom/
|
||||
- directory with information on the CD-ROM drivers that Linux has.
|
||||
cli-sti-removal.txt
|
||||
- cli()/sti() removal guide.
|
||||
computone.txt
|
||||
- info on Computone Intelliport II/Plus Multiport Serial Driver.
|
||||
connector/
|
||||
|
@ -161,8 +162,6 @@ hayes-esp.txt
|
|||
- info on using the Hayes ESP serial driver.
|
||||
highuid.txt
|
||||
- notes on the change from 16 bit to 32 bit user/group IDs.
|
||||
hpet.txt
|
||||
- High Precision Event Timer Driver for Linux.
|
||||
timers/
|
||||
- info on the timer related topics
|
||||
hw_random.txt
|
||||
|
@ -253,8 +252,6 @@ mono.txt
|
|||
- how to execute Mono-based .NET binaries with the help of BINFMT_MISC.
|
||||
moxa-smartio
|
||||
- file with info on installing/using Moxa multiport serial driver.
|
||||
mtrr.txt
|
||||
- how to use PPro Memory Type Range Registers to increase performance.
|
||||
mutex-design.txt
|
||||
- info on the generic mutex subsystem.
|
||||
namespaces/
|
||||
|
@ -361,8 +358,6 @@ telephony/
|
|||
- directory with info on telephony (e.g. voice over IP) support.
|
||||
time_interpolators.txt
|
||||
- info on time interpolators.
|
||||
tipar.txt
|
||||
- information about Parallel link cable for Texas Instruments handhelds.
|
||||
tty.txt
|
||||
- guide to the locking policies of the tty layer.
|
||||
uml/
|
||||
|
|
62
Documentation/ABI/stable/sysfs-driver-usb-usbtmc
Normal file
62
Documentation/ABI/stable/sysfs-driver-usb-usbtmc
Normal file
|
@ -0,0 +1,62 @@
|
|||
What: /sys/bus/usb/drivers/usbtmc/devices/*/interface_capabilities
|
||||
What: /sys/bus/usb/drivers/usbtmc/devices/*/device_capabilities
|
||||
Date: August 2008
|
||||
Contact: Greg Kroah-Hartman <gregkh@suse.de>
|
||||
Description:
|
||||
These files show the various USB TMC capabilities as described
|
||||
by the device itself. The full description of the bitfields
|
||||
can be found in the USB TMC documents from the USB-IF entitled
|
||||
"Universal Serial Bus Test and Measurement Class Specification
|
||||
(USBTMC) Revision 1.0" section 4.2.1.8.
|
||||
|
||||
The files are read only.
|
||||
|
||||
|
||||
What: /sys/bus/usb/drivers/usbtmc/devices/*/usb488_interface_capabilities
|
||||
What: /sys/bus/usb/drivers/usbtmc/devices/*/usb488_device_capabilities
|
||||
Date: August 2008
|
||||
Contact: Greg Kroah-Hartman <gregkh@suse.de>
|
||||
Description:
|
||||
These files show the various USB TMC capabilities as described
|
||||
by the device itself. The full description of the bitfields
|
||||
can be found in the USB TMC documents from the USB-IF entitled
|
||||
"Universal Serial Bus Test and Measurement Class, Subclass
|
||||
USB488 Specification (USBTMC-USB488) Revision 1.0" section
|
||||
4.2.2.
|
||||
|
||||
The files are read only.
|
||||
|
||||
|
||||
What: /sys/bus/usb/drivers/usbtmc/devices/*/TermChar
|
||||
Date: August 2008
|
||||
Contact: Greg Kroah-Hartman <gregkh@suse.de>
|
||||
Description:
|
||||
This file is the TermChar value to be sent to the USB TMC
|
||||
device as described by the document, "Universal Serial Bus Test
|
||||
and Measurement Class Specification
|
||||
(USBTMC) Revision 1.0" as published by the USB-IF.
|
||||
|
||||
Note that the TermCharEnabled file determines if this value is
|
||||
sent to the device or not.
|
||||
|
||||
|
||||
What: /sys/bus/usb/drivers/usbtmc/devices/*/TermCharEnabled
|
||||
Date: August 2008
|
||||
Contact: Greg Kroah-Hartman <gregkh@suse.de>
|
||||
Description:
|
||||
This file determines if the TermChar is to be sent to the
|
||||
device on every transaction or not. For more details about
|
||||
this, please see the document, "Universal Serial Bus Test and
|
||||
Measurement Class Specification (USBTMC) Revision 1.0" as
|
||||
published by the USB-IF.
|
||||
|
||||
|
||||
What: /sys/bus/usb/drivers/usbtmc/devices/*/auto_abort
|
||||
Date: August 2008
|
||||
Contact: Greg Kroah-Hartman <gregkh@suse.de>
|
||||
Description:
|
||||
This file determines if the the transaction of the USB TMC
|
||||
device is to be automatically aborted if there is any error.
|
||||
For more details about this, please see the document,
|
||||
"Universal Serial Bus Test and Measurement Class Specification
|
||||
(USBTMC) Revision 1.0" as published by the USB-IF.
|
28
Documentation/ABI/testing/sysfs-bus-umc
Normal file
28
Documentation/ABI/testing/sysfs-bus-umc
Normal file
|
@ -0,0 +1,28 @@
|
|||
What: /sys/bus/umc/
|
||||
Date: July 2008
|
||||
KernelVersion: 2.6.27
|
||||
Contact: David Vrabel <david.vrabel@csr.com>
|
||||
Description:
|
||||
The Wireless Host Controller Interface (WHCI)
|
||||
specification describes a PCI-based device with
|
||||
multiple capabilities; the UWB Multi-interface
|
||||
Controller (UMC).
|
||||
|
||||
The umc bus presents each of the individual
|
||||
capabilties as a device.
|
||||
|
||||
What: /sys/bus/umc/devices/.../capability_id
|
||||
Date: July 2008
|
||||
KernelVersion: 2.6.27
|
||||
Contact: David Vrabel <david.vrabel@csr.com>
|
||||
Description:
|
||||
The ID of this capability, with 0 being the radio
|
||||
controller capability.
|
||||
|
||||
What: /sys/bus/umc/devices/.../version
|
||||
Date: July 2008
|
||||
KernelVersion: 2.6.27
|
||||
Contact: David Vrabel <david.vrabel@csr.com>
|
||||
Description:
|
||||
The specification version this capability's hardware
|
||||
interface complies with.
|
|
@ -85,3 +85,62 @@ Description:
|
|||
Users:
|
||||
PowerTOP <power@bughost.org>
|
||||
http://www.lesswatts.org/projects/powertop/
|
||||
|
||||
What: /sys/bus/usb/device/<busnum>-<devnum>...:<config num>-<interface num>/supports_autosuspend
|
||||
Date: January 2008
|
||||
KernelVersion: 2.6.27
|
||||
Contact: Sarah Sharp <sarah.a.sharp@intel.com>
|
||||
Description:
|
||||
When read, this file returns 1 if the interface driver
|
||||
for this interface supports autosuspend. It also
|
||||
returns 1 if no driver has claimed this interface, as an
|
||||
unclaimed interface will not stop the device from being
|
||||
autosuspended if all other interface drivers are idle.
|
||||
The file returns 0 if autosuspend support has not been
|
||||
added to the driver.
|
||||
Users:
|
||||
USB PM tool
|
||||
git://git.moblin.org/users/sarah/usb-pm-tool/
|
||||
|
||||
What: /sys/bus/usb/device/.../authorized
|
||||
Date: July 2008
|
||||
KernelVersion: 2.6.26
|
||||
Contact: David Vrabel <david.vrabel@csr.com>
|
||||
Description:
|
||||
Authorized devices are available for use by device
|
||||
drivers, non-authorized one are not. By default, wired
|
||||
USB devices are authorized.
|
||||
|
||||
Certified Wireless USB devices are not authorized
|
||||
initially and should be (by writing 1) after the
|
||||
device has been authenticated.
|
||||
|
||||
What: /sys/bus/usb/device/.../wusb_cdid
|
||||
Date: July 2008
|
||||
KernelVersion: 2.6.27
|
||||
Contact: David Vrabel <david.vrabel@csr.com>
|
||||
Description:
|
||||
For Certified Wireless USB devices only.
|
||||
|
||||
A devices's CDID, as 16 space-separated hex octets.
|
||||
|
||||
What: /sys/bus/usb/device/.../wusb_ck
|
||||
Date: July 2008
|
||||
KernelVersion: 2.6.27
|
||||
Contact: David Vrabel <david.vrabel@csr.com>
|
||||
Description:
|
||||
For Certified Wireless USB devices only.
|
||||
|
||||
Write the device's connection key (CK) to start the
|
||||
authentication of the device. The CK is 16
|
||||
space-separated hex octets.
|
||||
|
||||
What: /sys/bus/usb/device/.../wusb_disconnect
|
||||
Date: July 2008
|
||||
KernelVersion: 2.6.27
|
||||
Contact: David Vrabel <david.vrabel@csr.com>
|
||||
Description:
|
||||
For Certified Wireless USB devices only.
|
||||
|
||||
Write a 1 to force the device to disconnect
|
||||
(equivalent to unplugging a wired USB device).
|
||||
|
|
43
Documentation/ABI/testing/sysfs-bus-usb-devices-usbsevseg
Normal file
43
Documentation/ABI/testing/sysfs-bus-usb-devices-usbsevseg
Normal file
|
@ -0,0 +1,43 @@
|
|||
Where: /sys/bus/usb/.../powered
|
||||
Date: August 2008
|
||||
Kernel Version: 2.6.26
|
||||
Contact: Harrison Metzger <harrisonmetz@gmail.com>
|
||||
Description: Controls whether the device's display will powered.
|
||||
A value of 0 is off and a non-zero value is on.
|
||||
|
||||
Where: /sys/bus/usb/.../mode_msb
|
||||
Where: /sys/bus/usb/.../mode_lsb
|
||||
Date: August 2008
|
||||
Kernel Version: 2.6.26
|
||||
Contact: Harrison Metzger <harrisonmetz@gmail.com>
|
||||
Description: Controls the devices display mode.
|
||||
For a 6 character display the values are
|
||||
MSB 0x06; LSB 0x3F, and
|
||||
for an 8 character display the values are
|
||||
MSB 0x08; LSB 0xFF.
|
||||
|
||||
Where: /sys/bus/usb/.../textmode
|
||||
Date: August 2008
|
||||
Kernel Version: 2.6.26
|
||||
Contact: Harrison Metzger <harrisonmetz@gmail.com>
|
||||
Description: Controls the way the device interprets its text buffer.
|
||||
raw: each character controls its segment manually
|
||||
hex: each character is between 0-15
|
||||
ascii: each character is between '0'-'9' and 'A'-'F'.
|
||||
|
||||
Where: /sys/bus/usb/.../text
|
||||
Date: August 2008
|
||||
Kernel Version: 2.6.26
|
||||
Contact: Harrison Metzger <harrisonmetz@gmail.com>
|
||||
Description: The text (or data) for the device to display
|
||||
|
||||
Where: /sys/bus/usb/.../decimals
|
||||
Date: August 2008
|
||||
Kernel Version: 2.6.26
|
||||
Contact: Harrison Metzger <harrisonmetz@gmail.com>
|
||||
Description: Controls the decimal places on the device.
|
||||
To set the nth decimal place, give this field
|
||||
the value of 10 ** n. Assume this field has
|
||||
the value k and has 1 or more decimal places set,
|
||||
to set the mth place (where m is not already set),
|
||||
change this fields value to k + 10 ** m.
|
328
Documentation/ABI/testing/sysfs-class-regulator
Normal file
328
Documentation/ABI/testing/sysfs-class-regulator
Normal file
|
@ -0,0 +1,328 @@
|
|||
What: /sys/class/regulator/.../state
|
||||
Date: April 2008
|
||||
KernelVersion: 2.6.26
|
||||
Contact: Liam Girdwood <lrg@slimlogic.co.uk>
|
||||
Description:
|
||||
Each regulator directory will contain a field called
|
||||
state. This holds the regulator output state.
|
||||
|
||||
This will be one of the following strings:
|
||||
|
||||
'enabled'
|
||||
'disabled'
|
||||
'unknown'
|
||||
|
||||
'enabled' means the regulator output is ON and is supplying
|
||||
power to the system.
|
||||
|
||||
'disabled' means the regulator output is OFF and is not
|
||||
supplying power to the system..
|
||||
|
||||
'unknown' means software cannot determine the state.
|
||||
|
||||
NOTE: this field can be used in conjunction with microvolts
|
||||
and microamps to determine regulator output levels.
|
||||
|
||||
|
||||
What: /sys/class/regulator/.../type
|
||||
Date: April 2008
|
||||
KernelVersion: 2.6.26
|
||||
Contact: Liam Girdwood <lrg@slimlogic.co.uk>
|
||||
Description:
|
||||
Each regulator directory will contain a field called
|
||||
type. This holds the regulator type.
|
||||
|
||||
This will be one of the following strings:
|
||||
|
||||
'voltage'
|
||||
'current'
|
||||
'unknown'
|
||||
|
||||
'voltage' means the regulator output voltage can be controlled
|
||||
by software.
|
||||
|
||||
'current' means the regulator output current limit can be
|
||||
controlled by software.
|
||||
|
||||
'unknown' means software cannot control either voltage or
|
||||
current limit.
|
||||
|
||||
|
||||
What: /sys/class/regulator/.../microvolts
|
||||
Date: April 2008
|
||||
KernelVersion: 2.6.26
|
||||
Contact: Liam Girdwood <lrg@slimlogic.co.uk>
|
||||
Description:
|
||||
Each regulator directory will contain a field called
|
||||
microvolts. This holds the regulator output voltage setting
|
||||
measured in microvolts (i.e. E-6 Volts).
|
||||
|
||||
NOTE: This value should not be used to determine the regulator
|
||||
output voltage level as this value is the same regardless of
|
||||
whether the regulator is enabled or disabled.
|
||||
|
||||
|
||||
What: /sys/class/regulator/.../microamps
|
||||
Date: April 2008
|
||||
KernelVersion: 2.6.26
|
||||
Contact: Liam Girdwood <lrg@slimlogic.co.uk>
|
||||
Description:
|
||||
Each regulator directory will contain a field called
|
||||
microamps. This holds the regulator output current limit
|
||||
setting measured in microamps (i.e. E-6 Amps).
|
||||
|
||||
NOTE: This value should not be used to determine the regulator
|
||||
output current level as this value is the same regardless of
|
||||
whether the regulator is enabled or disabled.
|
||||
|
||||
|
||||
What: /sys/class/regulator/.../opmode
|
||||
Date: April 2008
|
||||
KernelVersion: 2.6.26
|
||||
Contact: Liam Girdwood <lrg@slimlogic.co.uk>
|
||||
Description:
|
||||
Each regulator directory will contain a field called
|
||||
opmode. This holds the regulator operating mode setting.
|
||||
|
||||
The opmode value can be one of the following strings:
|
||||
|
||||
'fast'
|
||||
'normal'
|
||||
'idle'
|
||||
'standby'
|
||||
'unknown'
|
||||
|
||||
The modes are described in include/linux/regulator/regulator.h
|
||||
|
||||
NOTE: This value should not be used to determine the regulator
|
||||
output operating mode as this value is the same regardless of
|
||||
whether the regulator is enabled or disabled.
|
||||
|
||||
|
||||
What: /sys/class/regulator/.../min_microvolts
|
||||
Date: April 2008
|
||||
KernelVersion: 2.6.26
|
||||
Contact: Liam Girdwood <lrg@slimlogic.co.uk>
|
||||
Description:
|
||||
Each regulator directory will contain a field called
|
||||
min_microvolts. This holds the minimum safe working regulator
|
||||
output voltage setting for this domain measured in microvolts.
|
||||
|
||||
NOTE: this will return the string 'constraint not defined' if
|
||||
the power domain has no min microvolts constraint defined by
|
||||
platform code.
|
||||
|
||||
|
||||
What: /sys/class/regulator/.../max_microvolts
|
||||
Date: April 2008
|
||||
KernelVersion: 2.6.26
|
||||
Contact: Liam Girdwood <lrg@slimlogic.co.uk>
|
||||
Description:
|
||||
Each regulator directory will contain a field called
|
||||
max_microvolts. This holds the maximum safe working regulator
|
||||
output voltage setting for this domain measured in microvolts.
|
||||
|
||||
NOTE: this will return the string 'constraint not defined' if
|
||||
the power domain has no max microvolts constraint defined by
|
||||
platform code.
|
||||
|
||||
|
||||
What: /sys/class/regulator/.../min_microamps
|
||||
Date: April 2008
|
||||
KernelVersion: 2.6.26
|
||||
Contact: Liam Girdwood <lrg@slimlogic.co.uk>
|
||||
Description:
|
||||
Each regulator directory will contain a field called
|
||||
min_microamps. This holds the minimum safe working regulator
|
||||
output current limit setting for this domain measured in
|
||||
microamps.
|
||||
|
||||
NOTE: this will return the string 'constraint not defined' if
|
||||
the power domain has no min microamps constraint defined by
|
||||
platform code.
|
||||
|
||||
|
||||
What: /sys/class/regulator/.../max_microamps
|
||||
Date: April 2008
|
||||
KernelVersion: 2.6.26
|
||||
Contact: Liam Girdwood <lrg@slimlogic.co.uk>
|
||||
Description:
|
||||
Each regulator directory will contain a field called
|
||||
max_microamps. This holds the maximum safe working regulator
|
||||
output current limit setting for this domain measured in
|
||||
microamps.
|
||||
|
||||
NOTE: this will return the string 'constraint not defined' if
|
||||
the power domain has no max microamps constraint defined by
|
||||
platform code.
|
||||
|
||||
|
||||
What: /sys/class/regulator/.../name
|
||||
Date: October 2008
|
||||
KernelVersion: 2.6.28
|
||||
Contact: Liam Girdwood <lrg@slimlogic.co.uk>
|
||||
Description:
|
||||
Each regulator directory will contain a field called
|
||||
name. This holds a string identifying the regulator for
|
||||
display purposes.
|
||||
|
||||
NOTE: this will be empty if no suitable name is provided
|
||||
by platform or regulator drivers.
|
||||
|
||||
|
||||
What: /sys/class/regulator/.../num_users
|
||||
Date: April 2008
|
||||
KernelVersion: 2.6.26
|
||||
Contact: Liam Girdwood <lrg@slimlogic.co.uk>
|
||||
Description:
|
||||
Each regulator directory will contain a field called
|
||||
num_users. This holds the number of consumer devices that
|
||||
have called regulator_enable() on this regulator.
|
||||
|
||||
|
||||
What: /sys/class/regulator/.../requested_microamps
|
||||
Date: April 2008
|
||||
KernelVersion: 2.6.26
|
||||
Contact: Liam Girdwood <lrg@slimlogic.co.uk>
|
||||
Description:
|
||||
Each regulator directory will contain a field called
|
||||
requested_microamps. This holds the total requested load
|
||||
current in microamps for this regulator from all its consumer
|
||||
devices.
|
||||
|
||||
|
||||
What: /sys/class/regulator/.../parent
|
||||
Date: April 2008
|
||||
KernelVersion: 2.6.26
|
||||
Contact: Liam Girdwood <lrg@slimlogic.co.uk>
|
||||
Description:
|
||||
Some regulator directories will contain a link called parent.
|
||||
This points to the parent or supply regulator if one exists.
|
||||
|
||||
What: /sys/class/regulator/.../suspend_mem_microvolts
|
||||
Date: May 2008
|
||||
KernelVersion: 2.6.26
|
||||
Contact: Liam Girdwood <lrg@slimlogic.co.uk>
|
||||
Description:
|
||||
Each regulator directory will contain a field called
|
||||
suspend_mem_microvolts. This holds the regulator output
|
||||
voltage setting for this domain measured in microvolts when
|
||||
the system is suspended to memory.
|
||||
|
||||
NOTE: this will return the string 'not defined' if
|
||||
the power domain has no suspend to memory voltage defined by
|
||||
platform code.
|
||||
|
||||
What: /sys/class/regulator/.../suspend_disk_microvolts
|
||||
Date: May 2008
|
||||
KernelVersion: 2.6.26
|
||||
Contact: Liam Girdwood <lrg@slimlogic.co.uk>
|
||||
Description:
|
||||
Each regulator directory will contain a field called
|
||||
suspend_disk_microvolts. This holds the regulator output
|
||||
voltage setting for this domain measured in microvolts when
|
||||
the system is suspended to disk.
|
||||
|
||||
NOTE: this will return the string 'not defined' if
|
||||
the power domain has no suspend to disk voltage defined by
|
||||
platform code.
|
||||
|
||||
What: /sys/class/regulator/.../suspend_standby_microvolts
|
||||
Date: May 2008
|
||||
KernelVersion: 2.6.26
|
||||
Contact: Liam Girdwood <lrg@slimlogic.co.uk>
|
||||
Description:
|
||||
Each regulator directory will contain a field called
|
||||
suspend_standby_microvolts. This holds the regulator output
|
||||
voltage setting for this domain measured in microvolts when
|
||||
the system is suspended to standby.
|
||||
|
||||
NOTE: this will return the string 'not defined' if
|
||||
the power domain has no suspend to standby voltage defined by
|
||||
platform code.
|
||||
|
||||
What: /sys/class/regulator/.../suspend_mem_mode
|
||||
Date: May 2008
|
||||
KernelVersion: 2.6.26
|
||||
Contact: Liam Girdwood <lrg@slimlogic.co.uk>
|
||||
Description:
|
||||
Each regulator directory will contain a field called
|
||||
suspend_mem_mode. This holds the regulator operating mode
|
||||
setting for this domain when the system is suspended to
|
||||
memory.
|
||||
|
||||
NOTE: this will return the string 'not defined' if
|
||||
the power domain has no suspend to memory mode defined by
|
||||
platform code.
|
||||
|
||||
What: /sys/class/regulator/.../suspend_disk_mode
|
||||
Date: May 2008
|
||||
KernelVersion: 2.6.26
|
||||
Contact: Liam Girdwood <lrg@slimlogic.co.uk>
|
||||
Description:
|
||||
Each regulator directory will contain a field called
|
||||
suspend_disk_mode. This holds the regulator operating mode
|
||||
setting for this domain when the system is suspended to disk.
|
||||
|
||||
NOTE: this will return the string 'not defined' if
|
||||
the power domain has no suspend to disk mode defined by
|
||||
platform code.
|
||||
|
||||
What: /sys/class/regulator/.../suspend_standby_mode
|
||||
Date: May 2008
|
||||
KernelVersion: 2.6.26
|
||||
Contact: Liam Girdwood <lrg@slimlogic.co.uk>
|
||||
Description:
|
||||
Each regulator directory will contain a field called
|
||||
suspend_standby_mode. This holds the regulator operating mode
|
||||
setting for this domain when the system is suspended to
|
||||
standby.
|
||||
|
||||
NOTE: this will return the string 'not defined' if
|
||||
the power domain has no suspend to standby mode defined by
|
||||
platform code.
|
||||
|
||||
What: /sys/class/regulator/.../suspend_mem_state
|
||||
Date: May 2008
|
||||
KernelVersion: 2.6.26
|
||||
Contact: Liam Girdwood <lrg@slimlogic.co.uk>
|
||||
Description:
|
||||
Each regulator directory will contain a field called
|
||||
suspend_mem_state. This holds the regulator operating state
|
||||
when suspended to memory.
|
||||
|
||||
This will be one of the following strings:
|
||||
|
||||
'enabled'
|
||||
'disabled'
|
||||
'not defined'
|
||||
|
||||
What: /sys/class/regulator/.../suspend_disk_state
|
||||
Date: May 2008
|
||||
KernelVersion: 2.6.26
|
||||
Contact: Liam Girdwood <lrg@slimlogic.co.uk>
|
||||
Description:
|
||||
Each regulator directory will contain a field called
|
||||
suspend_disk_state. This holds the regulator operating state
|
||||
when suspended to disk.
|
||||
|
||||
This will be one of the following strings:
|
||||
|
||||
'enabled'
|
||||
'disabled'
|
||||
'not defined'
|
||||
|
||||
What: /sys/class/regulator/.../suspend_standby_state
|
||||
Date: May 2008
|
||||
KernelVersion: 2.6.26
|
||||
Contact: Liam Girdwood <lrg@slimlogic.co.uk>
|
||||
Description:
|
||||
Each regulator directory will contain a field called
|
||||
suspend_standby_state. This holds the regulator operating
|
||||
state when suspended to standby.
|
||||
|
||||
This will be one of the following strings:
|
||||
|
||||
'enabled'
|
||||
'disabled'
|
||||
'not defined'
|
25
Documentation/ABI/testing/sysfs-class-usb_host
Normal file
25
Documentation/ABI/testing/sysfs-class-usb_host
Normal file
|
@ -0,0 +1,25 @@
|
|||
What: /sys/class/usb_host/usb_hostN/wusb_chid
|
||||
Date: July 2008
|
||||
KernelVersion: 2.6.27
|
||||
Contact: David Vrabel <david.vrabel@csr.com>
|
||||
Description:
|
||||
Write the CHID (16 space-separated hex octets) for this host controller.
|
||||
This starts the host controller, allowing it to accept connection from
|
||||
WUSB devices.
|
||||
|
||||
Set an all zero CHID to stop the host controller.
|
||||
|
||||
What: /sys/class/usb_host/usb_hostN/wusb_trust_timeout
|
||||
Date: July 2008
|
||||
KernelVersion: 2.6.27
|
||||
Contact: David Vrabel <david.vrabel@csr.com>
|
||||
Description:
|
||||
Devices that haven't sent a WUSB packet to the host
|
||||
within 'wusb_trust_timeout' ms are considered to have
|
||||
disconnected and are removed. The default value of
|
||||
4000 ms is the value required by the WUSB
|
||||
specification.
|
||||
|
||||
Since this relates to security (specifically, the
|
||||
lifetime of PTKs and GTKs) it should not be changed
|
||||
from the default.
|
144
Documentation/ABI/testing/sysfs-class-uwb_rc
Normal file
144
Documentation/ABI/testing/sysfs-class-uwb_rc
Normal file
|
@ -0,0 +1,144 @@
|
|||
What: /sys/class/uwb_rc
|
||||
Date: July 2008
|
||||
KernelVersion: 2.6.27
|
||||
Contact: linux-usb@vger.kernel.org
|
||||
Description:
|
||||
Interfaces for WiMedia Ultra Wideband Common Radio
|
||||
Platform (UWB) radio controllers.
|
||||
|
||||
Familiarity with the ECMA-368 'High Rate Ultra
|
||||
Wideband MAC and PHY Specification' is assumed.
|
||||
|
||||
What: /sys/class/uwb_rc/beacon_timeout_ms
|
||||
Date: July 2008
|
||||
KernelVersion: 2.6.27
|
||||
Description:
|
||||
If no beacons are received from a device for at least
|
||||
this time, the device will be considered to have gone
|
||||
and it will be removed. The default is 3 superframes
|
||||
(~197 ms) as required by the specification.
|
||||
|
||||
What: /sys/class/uwb_rc/uwbN/
|
||||
Date: July 2008
|
||||
KernelVersion: 2.6.27
|
||||
Contact: linux-usb@vger.kernel.org
|
||||
Description:
|
||||
An individual UWB radio controller.
|
||||
|
||||
What: /sys/class/uwb_rc/uwbN/beacon
|
||||
Date: July 2008
|
||||
KernelVersion: 2.6.27
|
||||
Contact: linux-usb@vger.kernel.org
|
||||
Description:
|
||||
Write:
|
||||
|
||||
<channel> [<bpst offset>]
|
||||
|
||||
to start beaconing on a specific channel, or stop
|
||||
beaconing if <channel> is -1. Valid channels depends
|
||||
on the radio controller's supported band groups.
|
||||
|
||||
<bpst offset> may be used to try and join a specific
|
||||
beacon group if more than one was found during a scan.
|
||||
|
||||
What: /sys/class/uwb_rc/uwbN/scan
|
||||
Date: July 2008
|
||||
KernelVersion: 2.6.27
|
||||
Contact: linux-usb@vger.kernel.org
|
||||
Description:
|
||||
Write:
|
||||
|
||||
<channel> <type> [<bpst offset>]
|
||||
|
||||
to start (or stop) scanning on a channel. <type> is one of:
|
||||
0 - scan
|
||||
1 - scan outside BP
|
||||
2 - scan while inactive
|
||||
3 - scanning disabled
|
||||
4 - scan (with start time of <bpst offset>)
|
||||
|
||||
What: /sys/class/uwb_rc/uwbN/mac_address
|
||||
Date: July 2008
|
||||
KernelVersion: 2.6.27
|
||||
Contact: linux-usb@vger.kernel.org
|
||||
Description:
|
||||
The EUI-48, in colon-separated hex octets, for this
|
||||
radio controller. A write will change the radio
|
||||
controller's EUI-48 but only do so while the device is
|
||||
not beaconing or scanning.
|
||||
|
||||
What: /sys/class/uwb_rc/uwbN/wusbhc
|
||||
Date: July 2008
|
||||
KernelVersion: 2.6.27
|
||||
Contact: linux-usb@vger.kernel.org
|
||||
Description:
|
||||
A symlink to the device (if any) of the WUSB Host
|
||||
Controller PAL using this radio controller.
|
||||
|
||||
What: /sys/class/uwb_rc/uwbN/<EUI-48>/
|
||||
Date: July 2008
|
||||
KernelVersion: 2.6.27
|
||||
Contact: linux-usb@vger.kernel.org
|
||||
Description:
|
||||
A neighbour UWB device that has either been detected
|
||||
as part of a scan or is a member of the radio
|
||||
controllers beacon group.
|
||||
|
||||
What: /sys/class/uwb_rc/uwbN/<EUI-48>/BPST
|
||||
Date: July 2008
|
||||
KernelVersion: 2.6.27
|
||||
Contact: linux-usb@vger.kernel.org
|
||||
Description:
|
||||
The time (using the radio controllers internal 1 ms
|
||||
interval superframe timer) of the last beacon from
|
||||
this device was received.
|
||||
|
||||
What: /sys/class/uwb_rc/uwbN/<EUI-48>/DevAddr
|
||||
Date: July 2008
|
||||
KernelVersion: 2.6.27
|
||||
Contact: linux-usb@vger.kernel.org
|
||||
Description:
|
||||
The current DevAddr of this device in colon separated
|
||||
hex octets.
|
||||
|
||||
What: /sys/class/uwb_rc/uwbN/<EUI-48>/EUI_48
|
||||
Date: July 2008
|
||||
KernelVersion: 2.6.27
|
||||
Contact: linux-usb@vger.kernel.org
|
||||
Description:
|
||||
|
||||
The EUI-48 of this device in colon separated hex
|
||||
octets.
|
||||
|
||||
What: /sys/class/uwb_rc/uwbN/<EUI-48>/BPST
|
||||
Date: July 2008
|
||||
KernelVersion: 2.6.27
|
||||
Contact: linux-usb@vger.kernel.org
|
||||
Description:
|
||||
|
||||
What: /sys/class/uwb_rc/uwbN/<EUI-48>/IEs
|
||||
Date: July 2008
|
||||
KernelVersion: 2.6.27
|
||||
Contact: linux-usb@vger.kernel.org
|
||||
Description:
|
||||
The latest IEs included in this device's beacon, in
|
||||
space separated hex octets with one IE per line.
|
||||
|
||||
What: /sys/class/uwb_rc/uwbN/<EUI-48>/LQE
|
||||
Date: July 2008
|
||||
KernelVersion: 2.6.27
|
||||
Contact: linux-usb@vger.kernel.org
|
||||
Description:
|
||||
Link Quality Estimate - the Signal to Noise Ratio
|
||||
(SNR) of all packets received from this device in dB.
|
||||
This gives an estimate on a suitable PHY rate. Refer
|
||||
to [ECMA-368] section 13.3 for more details.
|
||||
|
||||
What: /sys/class/uwb_rc/uwbN/<EUI-48>/RSSI
|
||||
Date: July 2008
|
||||
KernelVersion: 2.6.27
|
||||
Contact: linux-usb@vger.kernel.org
|
||||
Description:
|
||||
Received Signal Strength Indication - the strength of
|
||||
the received signal in dB. LQE is a more useful
|
||||
measure of the radio link quality.
|
20
Documentation/ABI/testing/sysfs-dev
Normal file
20
Documentation/ABI/testing/sysfs-dev
Normal file
|
@ -0,0 +1,20 @@
|
|||
What: /sys/dev
|
||||
Date: April 2008
|
||||
KernelVersion: 2.6.26
|
||||
Contact: Dan Williams <dan.j.williams@intel.com>
|
||||
Description: The /sys/dev tree provides a method to look up the sysfs
|
||||
path for a device using the information returned from
|
||||
stat(2). There are two directories, 'block' and 'char',
|
||||
beneath /sys/dev containing symbolic links with names of
|
||||
the form "<major>:<minor>". These links point to the
|
||||
corresponding sysfs path for the given device.
|
||||
|
||||
Example:
|
||||
$ readlink /sys/dev/block/8:32
|
||||
../../block/sdc
|
||||
|
||||
Entries in /sys/dev/char and /sys/dev/block will be
|
||||
dynamically created and destroyed as devices enter and
|
||||
leave the system.
|
||||
|
||||
Users: mdadm <linux-raid@vger.kernel.org>
|
24
Documentation/ABI/testing/sysfs-devices-memory
Normal file
24
Documentation/ABI/testing/sysfs-devices-memory
Normal file
|
@ -0,0 +1,24 @@
|
|||
What: /sys/devices/system/memory
|
||||
Date: June 2008
|
||||
Contact: Badari Pulavarty <pbadari@us.ibm.com>
|
||||
Description:
|
||||
The /sys/devices/system/memory contains a snapshot of the
|
||||
internal state of the kernel memory blocks. Files could be
|
||||
added or removed dynamically to represent hot-add/remove
|
||||
operations.
|
||||
|
||||
Users: hotplug memory add/remove tools
|
||||
https://w3.opensource.ibm.com/projects/powerpc-utils/
|
||||
|
||||
What: /sys/devices/system/memory/memoryX/removable
|
||||
Date: June 2008
|
||||
Contact: Badari Pulavarty <pbadari@us.ibm.com>
|
||||
Description:
|
||||
The file /sys/devices/system/memory/memoryX/removable
|
||||
indicates whether this memory block is removable or not.
|
||||
This is useful for a user-level agent to determine
|
||||
identify removable sections of the memory before attempting
|
||||
potentially expensive hot-remove memory operation
|
||||
|
||||
Users: hotplug memory remove tools
|
||||
https://w3.opensource.ibm.com/projects/powerpc-utils/
|
27
Documentation/ABI/testing/sysfs-firmware-sgi_uv
Normal file
27
Documentation/ABI/testing/sysfs-firmware-sgi_uv
Normal file
|
@ -0,0 +1,27 @@
|
|||
What: /sys/firmware/sgi_uv/
|
||||
Date: August 2008
|
||||
Contact: Russ Anderson <rja@sgi.com>
|
||||
Description:
|
||||
The /sys/firmware/sgi_uv directory contains information
|
||||
about the SGI UV platform.
|
||||
|
||||
Under that directory are a number of files:
|
||||
|
||||
partition_id
|
||||
coherence_id
|
||||
|
||||
The partition_id entry contains the partition id.
|
||||
SGI UV systems can be partitioned into multiple physical
|
||||
machines, which each partition running a unique copy
|
||||
of the operating system. Each partition will have a unique
|
||||
partition id. To display the partition id, use the command:
|
||||
|
||||
cat /sys/firmware/sgi_uv/partition_id
|
||||
|
||||
The coherence_id entry contains the coherence id.
|
||||
A partitioned SGI UV system can have one or more coherence
|
||||
domain. The coherence id indicates which coherence domain
|
||||
this partition is in. To display the coherence id, use the
|
||||
command:
|
||||
|
||||
cat /sys/firmware/sgi_uv/coherence_id
|
26
Documentation/ABI/testing/sysfs-gpio
Normal file
26
Documentation/ABI/testing/sysfs-gpio
Normal file
|
@ -0,0 +1,26 @@
|
|||
What: /sys/class/gpio/
|
||||
Date: July 2008
|
||||
KernelVersion: 2.6.27
|
||||
Contact: David Brownell <dbrownell@users.sourceforge.net>
|
||||
Description:
|
||||
|
||||
As a Kconfig option, individual GPIO signals may be accessed from
|
||||
userspace. GPIOs are only made available to userspace by an explicit
|
||||
"export" operation. If a given GPIO is not claimed for use by
|
||||
kernel code, it may be exported by userspace (and unexported later).
|
||||
Kernel code may export it for complete or partial access.
|
||||
|
||||
GPIOs are identified as they are inside the kernel, using integers in
|
||||
the range 0..INT_MAX. See Documentation/gpio.txt for more information.
|
||||
|
||||
/sys/class/gpio
|
||||
/export ... asks the kernel to export a GPIO to userspace
|
||||
/unexport ... to return a GPIO to the kernel
|
||||
/gpioN ... for each exported GPIO #N
|
||||
/value ... always readable, writes fail for input GPIOs
|
||||
/direction ... r/w as: in, out (default low); write: high, low
|
||||
/gpiochipN ... for each gpiochip; #N is its first GPIO
|
||||
/base ... (r/o) same as N
|
||||
/label ... (r/o) descriptive, not necessarily unique
|
||||
/ngpio ... (r/o) number of GPIOs; numbered N to N + (ngpio - 1)
|
||||
|
6
Documentation/ABI/testing/sysfs-kernel-mm
Normal file
6
Documentation/ABI/testing/sysfs-kernel-mm
Normal file
|
@ -0,0 +1,6 @@
|
|||
What: /sys/kernel/mm
|
||||
Date: July 2008
|
||||
Contact: Nishanth Aravamudan <nacc@us.ibm.com>, VM maintainers
|
||||
Description:
|
||||
/sys/kernel/mm/ should contain any and all VM
|
||||
related information in /sys/kernel/.
|
15
Documentation/ABI/testing/sysfs-kernel-mm-hugepages
Normal file
15
Documentation/ABI/testing/sysfs-kernel-mm-hugepages
Normal file
|
@ -0,0 +1,15 @@
|
|||
What: /sys/kernel/mm/hugepages/
|
||||
Date: June 2008
|
||||
Contact: Nishanth Aravamudan <nacc@us.ibm.com>, hugetlb maintainers
|
||||
Description:
|
||||
/sys/kernel/mm/hugepages/ contains a number of subdirectories
|
||||
of the form hugepages-<size>kB, where <size> is the page size
|
||||
of the hugepages supported by the kernel/CPU combination.
|
||||
|
||||
Under these directories are a number of files:
|
||||
nr_hugepages
|
||||
nr_overcommit_hugepages
|
||||
free_hugepages
|
||||
surplus_hugepages
|
||||
resv_hugepages
|
||||
See Documentation/vm/hugetlbpage.txt for details.
|
13
Documentation/ABI/testing/sysfs-profiling
Normal file
13
Documentation/ABI/testing/sysfs-profiling
Normal file
|
@ -0,0 +1,13 @@
|
|||
What: /sys/kernel/profile
|
||||
Date: September 2008
|
||||
Contact: Dave Hansen <dave@linux.vnet.ibm.com>
|
||||
Description:
|
||||
/sys/kernel/profile is the runtime equivalent
|
||||
of the boot-time profile= option.
|
||||
|
||||
You can get the same effect running:
|
||||
|
||||
echo 2 > /sys/kernel/profile
|
||||
|
||||
as you would by issuing profile=2 on the boot
|
||||
command line.
|
100
Documentation/ABI/testing/sysfs-wusb_cbaf
Normal file
100
Documentation/ABI/testing/sysfs-wusb_cbaf
Normal file
|
@ -0,0 +1,100 @@
|
|||
What: /sys/bus/usb/drivers/wusb_cbaf/.../wusb_*
|
||||
Date: August 2008
|
||||
KernelVersion: 2.6.27
|
||||
Contact: David Vrabel <david.vrabel@csr.com>
|
||||
Description:
|
||||
Various files for managing Cable Based Association of
|
||||
(wireless) USB devices.
|
||||
|
||||
The sequence of operations should be:
|
||||
|
||||
1. Device is plugged in.
|
||||
|
||||
2. The connection manager (CM) sees a device with CBA capability.
|
||||
(the wusb_chid etc. files in /sys/devices/blah/OURDEVICE).
|
||||
|
||||
3. The CM writes the host name, supported band groups,
|
||||
and the CHID (host ID) into the wusb_host_name,
|
||||
wusb_host_band_groups and wusb_chid files. These
|
||||
get sent to the device and the CDID (if any) for
|
||||
this host is requested.
|
||||
|
||||
4. The CM can verify that the device's supported band
|
||||
groups (wusb_device_band_groups) are compatible
|
||||
with the host.
|
||||
|
||||
5. The CM reads the wusb_cdid file.
|
||||
|
||||
6. The CM looks it up its database.
|
||||
|
||||
- If it has a matching CHID,CDID entry, the device
|
||||
has been authorized before and nothing further
|
||||
needs to be done.
|
||||
|
||||
- If the CDID is zero (or the CM doesn't find a
|
||||
matching CDID in its database), the device is
|
||||
assumed to be not known. The CM may associate
|
||||
the host with device by: writing a randomly
|
||||
generated CDID to wusb_cdid and then a random CK
|
||||
to wusb_ck (this uploads the new CC to the
|
||||
device).
|
||||
|
||||
CMD may choose to prompt the user before
|
||||
associating with a new device.
|
||||
|
||||
7. Device is unplugged.
|
||||
|
||||
References:
|
||||
[WUSB-AM] Association Models Supplement to the
|
||||
Certified Wireless Universal Serial Bus
|
||||
Specification, version 1.0.
|
||||
|
||||
What: /sys/bus/usb/drivers/wusb_cbaf/.../wusb_chid
|
||||
Date: August 2008
|
||||
KernelVersion: 2.6.27
|
||||
Contact: David Vrabel <david.vrabel@csr.com>
|
||||
Description:
|
||||
The CHID of the host formatted as 16 space-separated
|
||||
hex octets.
|
||||
|
||||
Writes fetches device's supported band groups and the
|
||||
the CDID for any existing association with this host.
|
||||
|
||||
What: /sys/bus/usb/drivers/wusb_cbaf/.../wusb_host_name
|
||||
Date: August 2008
|
||||
KernelVersion: 2.6.27
|
||||
Contact: David Vrabel <david.vrabel@csr.com>
|
||||
Description:
|
||||
A friendly name for the host as a UTF-8 encoded string.
|
||||
|
||||
What: /sys/bus/usb/drivers/wusb_cbaf/.../wusb_host_band_groups
|
||||
Date: August 2008
|
||||
KernelVersion: 2.6.27
|
||||
Contact: David Vrabel <david.vrabel@csr.com>
|
||||
Description:
|
||||
The band groups supported by the host, in the format
|
||||
defined in [WUSB-AM].
|
||||
|
||||
What: /sys/bus/usb/drivers/wusb_cbaf/.../wusb_device_band_groups
|
||||
Date: August 2008
|
||||
KernelVersion: 2.6.27
|
||||
Contact: David Vrabel <david.vrabel@csr.com>
|
||||
Description:
|
||||
The band groups supported by the device, in the format
|
||||
defined in [WUSB-AM].
|
||||
|
||||
What: /sys/bus/usb/drivers/wusb_cbaf/.../wusb_cdid
|
||||
Date: August 2008
|
||||
KernelVersion: 2.6.27
|
||||
Contact: David Vrabel <david.vrabel@csr.com>
|
||||
Description:
|
||||
The device's CDID formatted as 16 space-separated hex
|
||||
octets.
|
||||
|
||||
What: /sys/bus/usb/drivers/wusb_cbaf/.../wusb_ck
|
||||
Date: August 2008
|
||||
KernelVersion: 2.6.27
|
||||
Contact: David Vrabel <david.vrabel@csr.com>
|
||||
Description:
|
||||
Write 16 space-separated random, hex octets to
|
||||
associate with the device.
|
|
@ -474,25 +474,29 @@ make a good program).
|
|||
So, you can either get rid of GNU emacs, or change it to use saner
|
||||
values. To do the latter, you can stick the following in your .emacs file:
|
||||
|
||||
(defun linux-c-mode ()
|
||||
"C mode with adjusted defaults for use with the Linux kernel."
|
||||
(interactive)
|
||||
(c-mode)
|
||||
(c-set-style "K&R")
|
||||
(setq tab-width 8)
|
||||
(setq indent-tabs-mode t)
|
||||
(setq c-basic-offset 8))
|
||||
(defun c-lineup-arglist-tabs-only (ignored)
|
||||
"Line up argument lists by tabs, not spaces"
|
||||
(let* ((anchor (c-langelem-pos c-syntactic-element))
|
||||
(column (c-langelem-2nd-pos c-syntactic-element))
|
||||
(offset (- (1+ column) anchor))
|
||||
(steps (floor offset c-basic-offset)))
|
||||
(* (max steps 1)
|
||||
c-basic-offset)))
|
||||
|
||||
This will define the M-x linux-c-mode command. When hacking on a
|
||||
module, if you put the string -*- linux-c -*- somewhere on the first
|
||||
two lines, this mode will be automatically invoked. Also, you may want
|
||||
to add
|
||||
(add-hook 'c-mode-hook
|
||||
(lambda ()
|
||||
(let ((filename (buffer-file-name)))
|
||||
;; Enable kernel mode for the appropriate files
|
||||
(when (and filename
|
||||
(string-match "~/src/linux-trees" filename))
|
||||
(setq indent-tabs-mode t)
|
||||
(c-set-style "linux")
|
||||
(c-set-offset 'arglist-cont-nonempty
|
||||
'(c-lineup-gcc-asm-reg
|
||||
c-lineup-arglist-tabs-only))))))
|
||||
|
||||
(setq auto-mode-alist (cons '("/usr/src/linux.*/.*\\.[ch]$" . linux-c-mode)
|
||||
auto-mode-alist))
|
||||
|
||||
to your .emacs file if you want to have linux-c-mode switched on
|
||||
automagically when you edit source files under /usr/src/linux.
|
||||
This will make emacs go better with the kernel coding style for C
|
||||
files below ~/src/linux-trees.
|
||||
|
||||
But even if you fail in getting emacs to do sane formatting, not
|
||||
everything is lost: use "indent".
|
||||
|
|
|
@ -298,10 +298,10 @@ recommended that you never use these unless you really know what the
|
|||
cache width is.
|
||||
|
||||
int
|
||||
dma_mapping_error(dma_addr_t dma_addr)
|
||||
dma_mapping_error(struct device *dev, dma_addr_t dma_addr)
|
||||
|
||||
int
|
||||
pci_dma_mapping_error(dma_addr_t dma_addr)
|
||||
pci_dma_mapping_error(struct pci_dev *hwdev, dma_addr_t dma_addr)
|
||||
|
||||
In some circumstances dma_map_single and dma_map_page will fail to create
|
||||
a mapping. A driver can check for these errors by testing the returned
|
||||
|
@ -337,7 +337,7 @@ With scatterlists, you use the resulting mapping like this:
|
|||
int i, count = dma_map_sg(dev, sglist, nents, direction);
|
||||
struct scatterlist *sg;
|
||||
|
||||
for (i = 0, sg = sglist; i < count; i++, sg++) {
|
||||
for_each_sg(sglist, sg, count, i) {
|
||||
hw_address[i] = sg_dma_address(sg);
|
||||
hw_len[i] = sg_dma_len(sg);
|
||||
}
|
||||
|
|
|
@ -22,3 +22,12 @@ ready and available in memory. The DMA of the "completion indication"
|
|||
could race with data DMA. Mapping the memory used for completion
|
||||
indications with DMA_ATTR_WRITE_BARRIER would prevent the race.
|
||||
|
||||
DMA_ATTR_WEAK_ORDERING
|
||||
----------------------
|
||||
|
||||
DMA_ATTR_WEAK_ORDERING specifies that reads and writes to the mapping
|
||||
may be weakly ordered, that is that reads and writes may pass each other.
|
||||
|
||||
Since it is optional for platforms to implement DMA_ATTR_WEAK_ORDERING,
|
||||
those that do not will simply ignore the attribute and exhibit default
|
||||
behavior.
|
||||
|
|
|
@ -740,7 +740,7 @@ failure can be determined by:
|
|||
dma_addr_t dma_handle;
|
||||
|
||||
dma_handle = pci_map_single(pdev, addr, size, direction);
|
||||
if (pci_dma_mapping_error(dma_handle)) {
|
||||
if (pci_dma_mapping_error(pdev, dma_handle)) {
|
||||
/*
|
||||
* reduce current DMA mapping usage,
|
||||
* delay and try again later or
|
||||
|
|
|
@ -6,13 +6,13 @@
|
|||
# To add a new book the only step required is to add the book to the
|
||||
# list of DOCBOOKS.
|
||||
|
||||
DOCBOOKS := wanbook.xml z8530book.xml mcabook.xml videobook.xml \
|
||||
DOCBOOKS := wanbook.xml z8530book.xml mcabook.xml \
|
||||
kernel-hacking.xml kernel-locking.xml deviceiobook.xml \
|
||||
procfs-guide.xml writing_usb_driver.xml networking.xml \
|
||||
kernel-api.xml filesystems.xml lsm.xml usb.xml kgdb.xml \
|
||||
gadget.xml libata.xml mtdnand.xml librs.xml rapidio.xml \
|
||||
genericirq.xml s390-drivers.xml uio-howto.xml scsi.xml \
|
||||
mac80211.xml debugobjects.xml
|
||||
mac80211.xml debugobjects.xml sh.xml
|
||||
|
||||
###
|
||||
# The build process is as follows (targets):
|
||||
|
@ -102,6 +102,13 @@ C-procfs-example = procfs_example.xml
|
|||
C-procfs-example2 = $(addprefix $(obj)/,$(C-procfs-example))
|
||||
$(obj)/procfs-guide.xml: $(C-procfs-example2)
|
||||
|
||||
# List of programs to build
|
||||
##oops, this is a kernel module::hostprogs-y := procfs_example
|
||||
obj-m += procfs_example.o
|
||||
|
||||
# Tell kbuild to always build the programs
|
||||
always := $(hostprogs-y)
|
||||
|
||||
notfoundtemplate = echo "*** You have to install docbook-utils or xmlto ***"; \
|
||||
exit 1
|
||||
db2xtemplate = db2TYPE -o $(dir $@) $<
|
||||
|
|
|
@ -524,6 +524,47 @@ These utilities include endpoint autoconfiguration.
|
|||
<!-- !Edrivers/usb/gadget/epautoconf.c -->
|
||||
</sect1>
|
||||
|
||||
<sect1 id="composite"><title>Composite Device Framework</title>
|
||||
|
||||
<para>The core API is sufficient for writing drivers for composite
|
||||
USB devices (with more than one function in a given configuration),
|
||||
and also multi-configuration devices (also more than one function,
|
||||
but not necessarily sharing a given configuration).
|
||||
There is however an optional framework which makes it easier to
|
||||
reuse and combine functions.
|
||||
</para>
|
||||
|
||||
<para>Devices using this framework provide a <emphasis>struct
|
||||
usb_composite_driver</emphasis>, which in turn provides one or
|
||||
more <emphasis>struct usb_configuration</emphasis> instances.
|
||||
Each such configuration includes at least one
|
||||
<emphasis>struct usb_function</emphasis>, which packages a user
|
||||
visible role such as "network link" or "mass storage device".
|
||||
Management functions may also exist, such as "Device Firmware
|
||||
Upgrade".
|
||||
</para>
|
||||
|
||||
!Iinclude/linux/usb/composite.h
|
||||
!Edrivers/usb/gadget/composite.c
|
||||
|
||||
</sect1>
|
||||
|
||||
<sect1 id="functions"><title>Composite Device Functions</title>
|
||||
|
||||
<para>At this writing, a few of the current gadget drivers have
|
||||
been converted to this framework.
|
||||
Near-term plans include converting all of them, except for "gadgetfs".
|
||||
</para>
|
||||
|
||||
!Edrivers/usb/gadget/f_acm.c
|
||||
!Edrivers/usb/gadget/f_ecm.c
|
||||
!Edrivers/usb/gadget/f_subset.c
|
||||
!Edrivers/usb/gadget/f_obex.c
|
||||
!Edrivers/usb/gadget/f_serial.c
|
||||
|
||||
</sect1>
|
||||
|
||||
|
||||
</chapter>
|
||||
|
||||
<chapter id="controllers"><title>Peripheral Controller Drivers</title>
|
||||
|
|
|
@ -283,6 +283,7 @@ X!Earch/x86/kernel/mca_32.c
|
|||
<chapter id="security">
|
||||
<title>Security Framework</title>
|
||||
!Isecurity/security.c
|
||||
!Esecurity/inode.c
|
||||
</chapter>
|
||||
|
||||
<chapter id="audit">
|
||||
|
@ -364,6 +365,10 @@ X!Edrivers/pnp/system.c
|
|||
!Eblock/blk-barrier.c
|
||||
!Eblock/blk-tag.c
|
||||
!Iblock/blk-tag.c
|
||||
!Eblock/blk-integrity.c
|
||||
!Iblock/blktrace.c
|
||||
!Iblock/genhd.c
|
||||
!Eblock/genhd.c
|
||||
</chapter>
|
||||
|
||||
<chapter id="chrdev">
|
||||
|
|
|
@ -1105,7 +1105,7 @@ static struct block_device_operations opt_fops = {
|
|||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
Function names as strings (__FUNCTION__).
|
||||
Function names as strings (__func__).
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
|
|
|
@ -219,10 +219,10 @@
|
|||
</para>
|
||||
|
||||
<sect1 id="lock-intro">
|
||||
<title>Three Main Types of Kernel Locks: Spinlocks, Mutexes and Semaphores</title>
|
||||
<title>Two Main Types of Kernel Locks: Spinlocks and Mutexes</title>
|
||||
|
||||
<para>
|
||||
There are three main types of kernel locks. The fundamental type
|
||||
There are two main types of kernel locks. The fundamental type
|
||||
is the spinlock
|
||||
(<filename class="headerfile">include/asm/spinlock.h</filename>),
|
||||
which is a very simple single-holder lock: if you can't get the
|
||||
|
@ -239,14 +239,6 @@
|
|||
can't sleep (see <xref linkend="sleeping-things"/>), and so have to
|
||||
use a spinlock instead.
|
||||
</para>
|
||||
<para>
|
||||
The third type is a semaphore
|
||||
(<filename class="headerfile">include/linux/semaphore.h</filename>): it
|
||||
can have more than one holder at any time (the number decided at
|
||||
initialization time), although it is most commonly used as a
|
||||
single-holder lock (a mutex). If you can't get a semaphore, your
|
||||
task will be suspended and later on woken up - just like for mutexes.
|
||||
</para>
|
||||
<para>
|
||||
Neither type of lock is recursive: see
|
||||
<xref linkend="deadlock"/>.
|
||||
|
@ -278,7 +270,7 @@
|
|||
</para>
|
||||
|
||||
<para>
|
||||
Semaphores still exist, because they are required for
|
||||
Mutexes still exist, because they are required for
|
||||
synchronization between <firstterm linkend="gloss-usercontext">user
|
||||
contexts</firstterm>, as we will see below.
|
||||
</para>
|
||||
|
@ -289,18 +281,17 @@
|
|||
|
||||
<para>
|
||||
If you have a data structure which is only ever accessed from
|
||||
user context, then you can use a simple semaphore
|
||||
(<filename>linux/linux/semaphore.h</filename>) to protect it. This
|
||||
is the most trivial case: you initialize the semaphore to the number
|
||||
of resources available (usually 1), and call
|
||||
<function>down_interruptible()</function> to grab the semaphore, and
|
||||
<function>up()</function> to release it. There is also a
|
||||
<function>down()</function>, which should be avoided, because it
|
||||
user context, then you can use a simple mutex
|
||||
(<filename>include/linux/mutex.h</filename>) to protect it. This
|
||||
is the most trivial case: you initialize the mutex. Then you can
|
||||
call <function>mutex_lock_interruptible()</function> to grab the mutex,
|
||||
and <function>mutex_unlock()</function> to release it. There is also a
|
||||
<function>mutex_lock()</function>, which should be avoided, because it
|
||||
will not return if a signal is received.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Example: <filename>linux/net/core/netfilter.c</filename> allows
|
||||
Example: <filename>net/netfilter/nf_sockopt.c</filename> allows
|
||||
registration of new <function>setsockopt()</function> and
|
||||
<function>getsockopt()</function> calls, with
|
||||
<function>nf_register_sockopt()</function>. Registration and
|
||||
|
@ -515,7 +506,7 @@
|
|||
<listitem>
|
||||
<para>
|
||||
If you are in a process context (any syscall) and want to
|
||||
lock other process out, use a semaphore. You can take a semaphore
|
||||
lock other process out, use a mutex. You can take a mutex
|
||||
and sleep (<function>copy_from_user*(</function> or
|
||||
<function>kmalloc(x,GFP_KERNEL)</function>).
|
||||
</para>
|
||||
|
@ -662,7 +653,7 @@
|
|||
<entry>SLBH</entry>
|
||||
<entry>SLBH</entry>
|
||||
<entry>SLBH</entry>
|
||||
<entry>DI</entry>
|
||||
<entry>MLI</entry>
|
||||
<entry>None</entry>
|
||||
</row>
|
||||
|
||||
|
@ -692,8 +683,8 @@
|
|||
<entry>spin_lock_bh</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>DI</entry>
|
||||
<entry>down_interruptible</entry>
|
||||
<entry>MLI</entry>
|
||||
<entry>mutex_lock_interruptible</entry>
|
||||
</row>
|
||||
|
||||
</tbody>
|
||||
|
@ -1310,7 +1301,7 @@ as Alan Cox says, <quote>Lock data, not code</quote>.
|
|||
<para>
|
||||
There is a coding bug where a piece of code tries to grab a
|
||||
spinlock twice: it will spin forever, waiting for the lock to
|
||||
be released (spinlocks, rwlocks and semaphores are not
|
||||
be released (spinlocks, rwlocks and mutexes are not
|
||||
recursive in Linux). This is trivial to diagnose: not a
|
||||
stay-up-five-nights-talk-to-fluffy-code-bunnies kind of
|
||||
problem.
|
||||
|
@ -1335,7 +1326,7 @@ as Alan Cox says, <quote>Lock data, not code</quote>.
|
|||
|
||||
<para>
|
||||
This complete lockup is easy to diagnose: on SMP boxes the
|
||||
watchdog timer or compiling with <symbol>DEBUG_SPINLOCKS</symbol> set
|
||||
watchdog timer or compiling with <symbol>DEBUG_SPINLOCK</symbol> set
|
||||
(<filename>include/linux/spinlock.h</filename>) will show this up
|
||||
immediately when it happens.
|
||||
</para>
|
||||
|
@ -1558,7 +1549,7 @@ the amount of locking which needs to be done.
|
|||
<title>Read/Write Lock Variants</title>
|
||||
|
||||
<para>
|
||||
Both spinlocks and semaphores have read/write variants:
|
||||
Both spinlocks and mutexes have read/write variants:
|
||||
<type>rwlock_t</type> and <structname>struct rw_semaphore</structname>.
|
||||
These divide users into two classes: the readers and the writers. If
|
||||
you are only reading the data, you can get a read lock, but to write to
|
||||
|
@ -1681,7 +1672,7 @@ the amount of locking which needs to be done.
|
|||
#include <linux/slab.h>
|
||||
#include <linux/string.h>
|
||||
+#include <linux/rcupdate.h>
|
||||
#include <linux/semaphore.h>
|
||||
#include <linux/mutex.h>
|
||||
#include <asm/errno.h>
|
||||
|
||||
struct object
|
||||
|
@ -1913,7 +1904,7 @@ machines due to caching.
|
|||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
<function> put_user()</function>
|
||||
<function>put_user()</function>
|
||||
</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
|
@ -1927,13 +1918,13 @@ machines due to caching.
|
|||
|
||||
<listitem>
|
||||
<para>
|
||||
<function>down_interruptible()</function> and
|
||||
<function>down()</function>
|
||||
<function>mutex_lock_interruptible()</function> and
|
||||
<function>mutex_lock()</function>
|
||||
</para>
|
||||
<para>
|
||||
There is a <function>down_trylock()</function> which can be
|
||||
There is a <function>mutex_trylock()</function> which can be
|
||||
used inside interrupt context, as it will not sleep.
|
||||
<function>up()</function> will also never sleep.
|
||||
<function>mutex_unlock()</function> will also never sleep.
|
||||
</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
|
@ -2023,7 +2014,7 @@ machines due to caching.
|
|||
<para>
|
||||
Prior to 2.5, or when <symbol>CONFIG_PREEMPT</symbol> is
|
||||
unset, processes in user context inside the kernel would not
|
||||
preempt each other (ie. you had that CPU until you have it up,
|
||||
preempt each other (ie. you had that CPU until you gave it up,
|
||||
except for interrupts). With the addition of
|
||||
<symbol>CONFIG_PREEMPT</symbol> in 2.5.4, this changed: when
|
||||
in user context, higher priority tasks can "cut in": spinlocks
|
||||
|
|
|
@ -98,6 +98,24 @@
|
|||
"Kernel debugging" select "KGDB: kernel debugging with remote gdb".
|
||||
</para>
|
||||
<para>
|
||||
It is advised, but not required that you turn on the
|
||||
CONFIG_FRAME_POINTER kernel option. This option inserts code to
|
||||
into the compiled executable which saves the frame information in
|
||||
registers or on the stack at different points which will allow a
|
||||
debugger such as gdb to more accurately construct stack back traces
|
||||
while debugging the kernel.
|
||||
</para>
|
||||
<para>
|
||||
If the architecture that you are using supports the kernel option
|
||||
CONFIG_DEBUG_RODATA, you should consider turning it off. This
|
||||
option will prevent the use of software breakpoints because it
|
||||
marks certain regions of the kernel's memory space as read-only.
|
||||
If kgdb supports it for the architecture you are using, you can
|
||||
use hardware breakpoints if you desire to run with the
|
||||
CONFIG_DEBUG_RODATA option turned on, else you need to turn off
|
||||
this option.
|
||||
</para>
|
||||
<para>
|
||||
Next you should choose one of more I/O drivers to interconnect debugging
|
||||
host and debugged target. Early boot debugging requires a KGDB
|
||||
I/O driver that supports early debugging and the driver must be
|
||||
|
|
|
@ -145,7 +145,6 @@ usage should require reading the full document.
|
|||
this though and the recommendation to allow only a single
|
||||
interface in STA mode at first!
|
||||
</para>
|
||||
!Finclude/net/mac80211.h ieee80211_if_types
|
||||
!Finclude/net/mac80211.h ieee80211_if_init_conf
|
||||
!Finclude/net/mac80211.h ieee80211_if_conf
|
||||
</chapter>
|
||||
|
@ -177,8 +176,7 @@ usage should require reading the full document.
|
|||
<title>functions/definitions</title>
|
||||
!Finclude/net/mac80211.h ieee80211_rx_status
|
||||
!Finclude/net/mac80211.h mac80211_rx_flags
|
||||
!Finclude/net/mac80211.h ieee80211_tx_control
|
||||
!Finclude/net/mac80211.h ieee80211_tx_status_flags
|
||||
!Finclude/net/mac80211.h ieee80211_tx_info
|
||||
!Finclude/net/mac80211.h ieee80211_rx
|
||||
!Finclude/net/mac80211.h ieee80211_rx_irqsafe
|
||||
!Finclude/net/mac80211.h ieee80211_tx_status
|
||||
|
@ -189,12 +187,11 @@ usage should require reading the full document.
|
|||
!Finclude/net/mac80211.h ieee80211_ctstoself_duration
|
||||
!Finclude/net/mac80211.h ieee80211_generic_frame_duration
|
||||
!Finclude/net/mac80211.h ieee80211_get_hdrlen_from_skb
|
||||
!Finclude/net/mac80211.h ieee80211_get_hdrlen
|
||||
!Finclude/net/mac80211.h ieee80211_hdrlen
|
||||
!Finclude/net/mac80211.h ieee80211_wake_queue
|
||||
!Finclude/net/mac80211.h ieee80211_stop_queue
|
||||
!Finclude/net/mac80211.h ieee80211_start_queues
|
||||
!Finclude/net/mac80211.h ieee80211_stop_queues
|
||||
!Finclude/net/mac80211.h ieee80211_wake_queues
|
||||
!Finclude/net/mac80211.h ieee80211_stop_queues
|
||||
</sect1>
|
||||
</chapter>
|
||||
|
||||
|
@ -230,8 +227,7 @@ usage should require reading the full document.
|
|||
<title>Multiple queues and QoS support</title>
|
||||
<para>TBD</para>
|
||||
!Finclude/net/mac80211.h ieee80211_tx_queue_params
|
||||
!Finclude/net/mac80211.h ieee80211_tx_queue_stats_data
|
||||
!Finclude/net/mac80211.h ieee80211_tx_queue
|
||||
!Finclude/net/mac80211.h ieee80211_tx_queue_stats
|
||||
</chapter>
|
||||
|
||||
<chapter id="AP">
|
||||
|
|
|
@ -14,27 +14,30 @@
|
|||
<othername>(J.A.K.)</othername>
|
||||
<surname>Mouw</surname>
|
||||
<affiliation>
|
||||
<orgname>Delft University of Technology</orgname>
|
||||
<orgdiv>Faculty of Information Technology and Systems</orgdiv>
|
||||
<address>
|
||||
<email>J.A.K.Mouw@its.tudelft.nl</email>
|
||||
<pob>PO BOX 5031</pob>
|
||||
<postcode>2600 GA</postcode>
|
||||
<city>Delft</city>
|
||||
<country>The Netherlands</country>
|
||||
<email>mouw@nl.linux.org</email>
|
||||
</address>
|
||||
</affiliation>
|
||||
</author>
|
||||
<othercredit>
|
||||
<contrib>
|
||||
This software and documentation were written while working on the
|
||||
LART computing board
|
||||
(<ulink url="http://www.lartmaker.nl/">http://www.lartmaker.nl/</ulink>),
|
||||
which was sponsored by the Delt University of Technology projects
|
||||
Mobile Multi-media Communications and Ubiquitous Communications.
|
||||
</contrib>
|
||||
</othercredit>
|
||||
</authorgroup>
|
||||
|
||||
<revhistory>
|
||||
<revision>
|
||||
<revnumber>1.0 </revnumber>
|
||||
<revnumber>1.0</revnumber>
|
||||
<date>May 30, 2001</date>
|
||||
<revremark>Initial revision posted to linux-kernel</revremark>
|
||||
</revision>
|
||||
<revision>
|
||||
<revnumber>1.1 </revnumber>
|
||||
<revnumber>1.1</revnumber>
|
||||
<date>June 3, 2001</date>
|
||||
<revremark>Revised after comments from linux-kernel</revremark>
|
||||
</revision>
|
||||
|
@ -108,18 +111,6 @@
|
|||
proofreading.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
This documentation was written while working on the LART
|
||||
computing board (<ulink
|
||||
url="http://www.lart.tudelft.nl/">http://www.lart.tudelft.nl/</ulink>),
|
||||
which is sponsored by the Mobile Multi-media Communications
|
||||
(<ulink
|
||||
url="http://www.mmc.tudelft.nl/">http://www.mmc.tudelft.nl/</ulink>)
|
||||
and Ubiquitous Communications (<ulink
|
||||
url="http://www.ubicom.tudelft.nl/">http://www.ubicom.tudelft.nl/</ulink>)
|
||||
projects.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Erik
|
||||
</para>
|
||||
|
|
|
@ -1,28 +1,16 @@
|
|||
/*
|
||||
* procfs_example.c: an example proc interface
|
||||
*
|
||||
* Copyright (C) 2001, Erik Mouw (J.A.K.Mouw@its.tudelft.nl)
|
||||
* Copyright (C) 2001, Erik Mouw (mouw@nl.linux.org)
|
||||
*
|
||||
* This file accompanies the procfs-guide in the Linux kernel
|
||||
* source. Its main use is to demonstrate the concepts and
|
||||
* functions described in the guide.
|
||||
*
|
||||
* This software has been developed while working on the LART
|
||||
* computing board (http://www.lart.tudelft.nl/), which is
|
||||
* sponsored by the Mobile Multi-media Communications
|
||||
* (http://www.mmc.tudelft.nl/) and Ubiquitous Communications
|
||||
* (http://www.ubicom.tudelft.nl/) projects.
|
||||
*
|
||||
* The author can be reached at:
|
||||
*
|
||||
* Erik Mouw
|
||||
* Information and Communication Theory Group
|
||||
* Faculty of Information Technology and Systems
|
||||
* Delft University of Technology
|
||||
* P.O. Box 5031
|
||||
* 2600 GA Delft
|
||||
* The Netherlands
|
||||
*
|
||||
* computing board (http://www.lartmaker.nl), which was sponsored
|
||||
* by the Delt University of Technology projects Mobile Multi-media
|
||||
* Communications and Ubiquitous Communications.
|
||||
*
|
||||
* This program is free software; you can redistribute
|
||||
* it and/or modify it under the terms of the GNU General
|
||||
|
@ -189,8 +177,6 @@ static int __init init_procfs_example(void)
|
|||
return 0;
|
||||
|
||||
no_symlink:
|
||||
remove_proc_entry("tty", example_dir);
|
||||
no_tty:
|
||||
remove_proc_entry("bar", example_dir);
|
||||
no_bar:
|
||||
remove_proc_entry("foo", example_dir);
|
||||
|
@ -206,7 +192,6 @@ static int __init init_procfs_example(void)
|
|||
static void __exit cleanup_procfs_example(void)
|
||||
{
|
||||
remove_proc_entry("jiffies_too", example_dir);
|
||||
remove_proc_entry("tty", example_dir);
|
||||
remove_proc_entry("bar", example_dir);
|
||||
remove_proc_entry("foo", example_dir);
|
||||
remove_proc_entry("jiffies", example_dir);
|
||||
|
@ -222,3 +207,4 @@ module_exit(cleanup_procfs_example);
|
|||
|
||||
MODULE_AUTHOR("Erik Mouw");
|
||||
MODULE_DESCRIPTION("procfs examples");
|
||||
MODULE_LICENSE("GPL");
|
||||
|
|
|
@ -100,7 +100,7 @@
|
|||
the hardware structures represented here, please consult the Principles
|
||||
of Operation.
|
||||
</para>
|
||||
!Iinclude/asm-s390/cio.h
|
||||
!Iarch/s390/include/asm/cio.h
|
||||
</sect1>
|
||||
<sect1 id="ccwdev">
|
||||
<title>ccw devices</title>
|
||||
|
@ -114,7 +114,7 @@
|
|||
ccw device structure. Device drivers must not bypass those functions
|
||||
or strange side effects may happen.
|
||||
</para>
|
||||
!Iinclude/asm-s390/ccwdev.h
|
||||
!Iarch/s390/include/asm/ccwdev.h
|
||||
!Edrivers/s390/cio/device.c
|
||||
!Edrivers/s390/cio/device_ops.c
|
||||
</sect1>
|
||||
|
@ -125,7 +125,7 @@
|
|||
measurement data which is made available by the channel subsystem
|
||||
for each channel attached device.
|
||||
</para>
|
||||
!Iinclude/asm-s390/cmb.h
|
||||
!Iarch/s390/include/asm/cmb.h
|
||||
!Edrivers/s390/cio/cmf.c
|
||||
</sect1>
|
||||
</chapter>
|
||||
|
@ -142,7 +142,7 @@
|
|||
</para>
|
||||
<sect1 id="ccwgroupdevices">
|
||||
<title>ccw group devices</title>
|
||||
!Iinclude/asm-s390/ccwgroup.h
|
||||
!Iarch/s390/include/asm/ccwgroup.h
|
||||
!Edrivers/s390/cio/ccwgroup.c
|
||||
</sect1>
|
||||
</chapter>
|
||||
|
|
105
Documentation/DocBook/sh.tmpl
Normal file
105
Documentation/DocBook/sh.tmpl
Normal file
|
@ -0,0 +1,105 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" []>
|
||||
|
||||
<book id="sh-drivers">
|
||||
<bookinfo>
|
||||
<title>SuperH Interfaces Guide</title>
|
||||
|
||||
<authorgroup>
|
||||
<author>
|
||||
<firstname>Paul</firstname>
|
||||
<surname>Mundt</surname>
|
||||
<affiliation>
|
||||
<address>
|
||||
<email>lethal@linux-sh.org</email>
|
||||
</address>
|
||||
</affiliation>
|
||||
</author>
|
||||
</authorgroup>
|
||||
|
||||
<copyright>
|
||||
<year>2008</year>
|
||||
<holder>Paul Mundt</holder>
|
||||
</copyright>
|
||||
<copyright>
|
||||
<year>2008</year>
|
||||
<holder>Renesas Technology Corp.</holder>
|
||||
</copyright>
|
||||
|
||||
<legalnotice>
|
||||
<para>
|
||||
This documentation is free software; you can redistribute
|
||||
it and/or modify it under the terms of the GNU General Public
|
||||
License version 2 as published by the Free Software Foundation.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
This 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="mm">
|
||||
<title>Memory Management</title>
|
||||
<sect1 id="sh4">
|
||||
<title>SH-4</title>
|
||||
<sect2 id="sq">
|
||||
<title>Store Queue API</title>
|
||||
!Earch/sh/kernel/cpu/sh4/sq.c
|
||||
</sect2>
|
||||
</sect1>
|
||||
<sect1 id="sh5">
|
||||
<title>SH-5</title>
|
||||
<sect2 id="tlb">
|
||||
<title>TLB Interfaces</title>
|
||||
!Iarch/sh/mm/tlb-sh5.c
|
||||
!Iarch/sh/include/asm/tlb_64.h
|
||||
</sect2>
|
||||
</sect1>
|
||||
</chapter>
|
||||
<chapter id="clk">
|
||||
<title>Clock Framework Extensions</title>
|
||||
!Iarch/sh/include/asm/clock.h
|
||||
</chapter>
|
||||
<chapter id="mach">
|
||||
<title>Machine Specific Interfaces</title>
|
||||
<sect1 id="dreamcast">
|
||||
<title>mach-dreamcast</title>
|
||||
!Iarch/sh/boards/mach-dreamcast/rtc.c
|
||||
</sect1>
|
||||
<sect1 id="x3proto">
|
||||
<title>mach-x3proto</title>
|
||||
!Earch/sh/boards/mach-x3proto/ilsel.c
|
||||
</sect1>
|
||||
</chapter>
|
||||
<chapter id="busses">
|
||||
<title>Busses</title>
|
||||
<sect1 id="superhyway">
|
||||
<title>SuperHyway</title>
|
||||
!Edrivers/sh/superhyway/superhyway.c
|
||||
</sect1>
|
||||
|
||||
<sect1 id="maple">
|
||||
<title>Maple</title>
|
||||
!Edrivers/sh/maple/maple.c
|
||||
</sect1>
|
||||
</chapter>
|
||||
</book>
|
|
@ -21,6 +21,18 @@
|
|||
</affiliation>
|
||||
</author>
|
||||
|
||||
<copyright>
|
||||
<year>2006-2008</year>
|
||||
<holder>Hans-Jürgen Koch.</holder>
|
||||
</copyright>
|
||||
|
||||
<legalnotice>
|
||||
<para>
|
||||
This documentation is Free Software licensed under the terms of the
|
||||
GPL version 2.
|
||||
</para>
|
||||
</legalnotice>
|
||||
|
||||
<pubdate>2006-12-11</pubdate>
|
||||
|
||||
<abstract>
|
||||
|
@ -29,6 +41,12 @@
|
|||
</abstract>
|
||||
|
||||
<revhistory>
|
||||
<revision>
|
||||
<revnumber>0.5</revnumber>
|
||||
<date>2008-05-22</date>
|
||||
<authorinitials>hjk</authorinitials>
|
||||
<revremark>Added description of write() function.</revremark>
|
||||
</revision>
|
||||
<revision>
|
||||
<revnumber>0.4</revnumber>
|
||||
<date>2007-11-26</date>
|
||||
|
@ -57,20 +75,9 @@
|
|||
</bookinfo>
|
||||
|
||||
<chapter id="aboutthisdoc">
|
||||
<?dbhtml filename="about.html"?>
|
||||
<?dbhtml filename="aboutthis.html"?>
|
||||
<title>About this document</title>
|
||||
|
||||
<sect1 id="copyright">
|
||||
<?dbhtml filename="copyright.html"?>
|
||||
<title>Copyright and License</title>
|
||||
<para>
|
||||
Copyright (c) 2006 by Hans-Jürgen Koch.</para>
|
||||
<para>
|
||||
This documentation is Free Software licensed under the terms of the
|
||||
GPL version 2.
|
||||
</para>
|
||||
</sect1>
|
||||
|
||||
<sect1 id="translations">
|
||||
<?dbhtml filename="translations.html"?>
|
||||
<title>Translations</title>
|
||||
|
@ -189,6 +196,30 @@ interested in translating it, please email me
|
|||
represents the total interrupt count. You can use this number
|
||||
to figure out if you missed some interrupts.
|
||||
</para>
|
||||
<para>
|
||||
For some hardware that has more than one interrupt source internally,
|
||||
but not separate IRQ mask and status registers, there might be
|
||||
situations where userspace cannot determine what the interrupt source
|
||||
was if the kernel handler disables them by writing to the chip's IRQ
|
||||
register. In such a case, the kernel has to disable the IRQ completely
|
||||
to leave the chip's register untouched. Now the userspace part can
|
||||
determine the cause of the interrupt, but it cannot re-enable
|
||||
interrupts. Another cornercase is chips where re-enabling interrupts
|
||||
is a read-modify-write operation to a combined IRQ status/acknowledge
|
||||
register. This would be racy if a new interrupt occurred
|
||||
simultaneously.
|
||||
</para>
|
||||
<para>
|
||||
To address these problems, UIO also implements a write() function. It
|
||||
is normally not used and can be ignored for hardware that has only a
|
||||
single interrupt source or has separate IRQ mask and status registers.
|
||||
If you need it, however, a write to <filename>/dev/uioX</filename>
|
||||
will call the <function>irqcontrol()</function> function implemented
|
||||
by the driver. You have to write a 32-bit value that is usually either
|
||||
0 or 1 to disable or enable interrupts. If a driver does not implement
|
||||
<function>irqcontrol()</function>, <function>write()</function> will
|
||||
return with <varname>-ENOSYS</varname>.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
To handle interrupts properly, your custom kernel module can
|
||||
|
@ -362,6 +393,14 @@ device is actually used.
|
|||
<function>open()</function>, you will probably also want a custom
|
||||
<function>release()</function> function.
|
||||
</para></listitem>
|
||||
|
||||
<listitem><para>
|
||||
<varname>int (*irqcontrol)(struct uio_info *info, s32 irq_on)
|
||||
</varname>: Optional. If you need to be able to enable or disable
|
||||
interrupts from userspace by writing to <filename>/dev/uioX</filename>,
|
||||
you can implement this function. The parameter <varname>irq_on</varname>
|
||||
will be 0 to disable interrupts and 1 to enable them.
|
||||
</para></listitem>
|
||||
</itemizedlist>
|
||||
|
||||
<para>
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -69,12 +69,6 @@
|
|||
device to be used as both a tty interface and as a synchronous
|
||||
controller is a project for Linux post the 2.4 release
|
||||
</para>
|
||||
<para>
|
||||
The support code handles most common card configurations and
|
||||
supports running both Cisco HDLC and Synchronous PPP. With extra
|
||||
glue the frame relay and X.25 protocols can also be used with this
|
||||
driver.
|
||||
</para>
|
||||
</chapter>
|
||||
|
||||
<chapter id="Driver_Modes">
|
||||
|
@ -179,35 +173,27 @@
|
|||
<para>
|
||||
If you wish to use the network interface facilities of the driver,
|
||||
then you need to attach a network device to each channel that is
|
||||
present and in use. In addition to use the SyncPPP and Cisco HDLC
|
||||
present and in use. In addition to use the generic HDLC
|
||||
you need to follow some additional plumbing rules. They may seem
|
||||
complex but a look at the example hostess_sv11 driver should
|
||||
reassure you.
|
||||
</para>
|
||||
<para>
|
||||
The network device used for each channel should be pointed to by
|
||||
the netdevice field of each channel. The dev-> priv field of the
|
||||
the netdevice field of each channel. The hdlc-> priv field of the
|
||||
network device points to your private data - you will need to be
|
||||
able to find your ppp device from this. In addition to use the
|
||||
sync ppp layer the private data must start with a void * pointer
|
||||
to the syncppp structures.
|
||||
able to find your private data from this.
|
||||
</para>
|
||||
<para>
|
||||
The way most drivers approach this particular problem is to
|
||||
create a structure holding the Z8530 device definition and
|
||||
put that and the syncppp pointer into the private field of
|
||||
the network device. The network device fields of the channels
|
||||
then point back to the network devices. The ppp_device can also
|
||||
be put in the private structure conveniently.
|
||||
put that into the private field of the network device. The
|
||||
network device fields of the channels then point back to the
|
||||
network devices.
|
||||
</para>
|
||||
<para>
|
||||
If you wish to use the synchronous ppp then you need to attach
|
||||
the syncppp layer to the network device. You should do this before
|
||||
you register the network device. The
|
||||
<function>sppp_attach</function> requires that the first void *
|
||||
pointer in your private data is pointing to an empty struct
|
||||
ppp_device. The function fills in the initial data for the
|
||||
ppp/hdlc layer.
|
||||
If you wish to use the generic HDLC then you need to register
|
||||
the HDLC device.
|
||||
</para>
|
||||
<para>
|
||||
Before you register your network device you will also need to
|
||||
|
@ -314,10 +300,10 @@
|
|||
buffer in sk_buff format and queues it for transmission. The
|
||||
caller must provide the entire packet with the exception of the
|
||||
bitstuffing and CRC. This is normally done by the caller via
|
||||
the syncppp interface layer. It returns 0 if the buffer has been
|
||||
queued and non zero values for queue full. If the function accepts
|
||||
the buffer it becomes property of the Z8530 layer and the caller
|
||||
should not free it.
|
||||
the generic HDLC interface layer. It returns 0 if the buffer has been
|
||||
queued and non zero values for queue full. If the function accepts
|
||||
the buffer it becomes property of the Z8530 layer and the caller
|
||||
should not free it.
|
||||
</para>
|
||||
<para>
|
||||
The function <function>z8530_get_stats</function> returns a pointer
|
||||
|
|
|
@ -77,7 +77,8 @@ documentation files are also added which explain how to use the feature.
|
|||
When a kernel change causes the interface that the kernel exposes to
|
||||
userspace to change, it is recommended that you send the information or
|
||||
a patch to the manual pages explaining the change to the manual pages
|
||||
maintainer at mtk.manpages@gmail.com.
|
||||
maintainer at mtk.manpages@gmail.com, and CC the list
|
||||
linux-api@vger.kernel.org.
|
||||
|
||||
Here is a list of files that are in the kernel source tree that are
|
||||
required reading:
|
||||
|
@ -111,7 +112,7 @@ required reading:
|
|||
|
||||
Other excellent descriptions of how to create patches properly are:
|
||||
"The Perfect Patch"
|
||||
http://www.zip.com.au/~akpm/linux/patches/stuff/tpp.txt
|
||||
http://userweb.kernel.org/~akpm/stuff/tpp.txt
|
||||
"Linux kernel patch submission format"
|
||||
http://linux.yyz.us/patch-format.html
|
||||
|
||||
|
@ -358,7 +359,7 @@ Here is a list of some of the different kernel trees available:
|
|||
- pcmcia, Dominik Brodowski <linux@dominikbrodowski.net>
|
||||
git.kernel.org:/pub/scm/linux/kernel/git/brodo/pcmcia-2.6.git
|
||||
|
||||
- SCSI, James Bottomley <James.Bottomley@SteelEye.com>
|
||||
- SCSI, James Bottomley <James.Bottomley@hansenpartnership.com>
|
||||
git.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6.git
|
||||
|
||||
- x86, Ingo Molnar <mingo@elte.hu>
|
||||
|
@ -619,7 +620,7 @@ all time. It should describe the patch completely, containing:
|
|||
For more details on what this should all look like, please see the
|
||||
ChangeLog section of the document:
|
||||
"The Perfect Patch"
|
||||
http://www.zip.com.au/~akpm/linux/patches/stuff/tpp.txt
|
||||
http://userweb.kernel.org/~akpm/stuff/tpp.txt
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -48,7 +48,7 @@ IOVA generation is pretty generic. We used the same technique as vmalloc()
|
|||
but these are not global address spaces, but separate for each domain.
|
||||
Different DMA engines may support different number of domains.
|
||||
|
||||
We also allocate gaurd pages with each mapping, so we can attempt to catch
|
||||
We also allocate guard pages with each mapping, so we can attempt to catch
|
||||
any overflow that might happen.
|
||||
|
||||
|
||||
|
@ -112,4 +112,4 @@ TBD
|
|||
|
||||
- For compatibility testing, could use unity map domain for all devices, just
|
||||
provide a 1-1 for all useful memory under a single domain for all devices.
|
||||
- API for paravirt ops for abstracting functionlity for VMM folks.
|
||||
- API for paravirt ops for abstracting functionality for VMM folks.
|
||||
|
|
|
@ -236,10 +236,8 @@ software system can set different pages for controlling accesses to the
|
|||
MSI-X structure. The implementation of MSI support requires the PCI
|
||||
subsystem, not a device driver, to maintain full control of the MSI-X
|
||||
table/MSI-X PBA (Pending Bit Array) and MMIO address space of the MSI-X
|
||||
table/MSI-X PBA. A device driver is prohibited from requesting the MMIO
|
||||
address space of the MSI-X table/MSI-X PBA. Otherwise, the PCI subsystem
|
||||
will fail enabling MSI-X on its hardware device when it calls the function
|
||||
pci_enable_msix().
|
||||
table/MSI-X PBA. A device driver should not access the MMIO address
|
||||
space of the MSI-X table/MSI-X PBA.
|
||||
|
||||
5.3.2 API pci_enable_msix
|
||||
|
||||
|
|
3
Documentation/Makefile
Normal file
3
Documentation/Makefile
Normal file
|
@ -0,0 +1,3 @@
|
|||
obj-m := DocBook/ accounting/ auxdisplay/ connector/ \
|
||||
filesystems/configfs/ ia64/ networking/ \
|
||||
pcmcia/ spi/ video4linux/ vm/ watchdog/src/
|
|
@ -163,6 +163,10 @@ need pass only as many optional fields as necessary:
|
|||
o class and classmask fields default to 0
|
||||
o driver_data defaults to 0UL.
|
||||
|
||||
Note that driver_data must match the value used by any of the pci_device_id
|
||||
entries defined in the driver. This makes the driver_data field mandatory
|
||||
if all the pci_device_id entries have a non-zero driver_data value.
|
||||
|
||||
Once added, the driver probe routine will be invoked for any unclaimed
|
||||
PCI devices listed in its (newly updated) pci_ids list.
|
||||
|
||||
|
|
|
@ -203,22 +203,17 @@ to mmio_enabled.
|
|||
|
||||
3.3 helper functions
|
||||
|
||||
3.3.1 int pci_find_aer_capability(struct pci_dev *dev);
|
||||
pci_find_aer_capability locates the PCI Express AER capability
|
||||
in the device configuration space. If the device doesn't support
|
||||
PCI-Express AER, the function returns 0.
|
||||
|
||||
3.3.2 int pci_enable_pcie_error_reporting(struct pci_dev *dev);
|
||||
3.3.1 int pci_enable_pcie_error_reporting(struct pci_dev *dev);
|
||||
pci_enable_pcie_error_reporting enables the device to send error
|
||||
messages to root port when an error is detected. Note that devices
|
||||
don't enable the error reporting by default, so device drivers need
|
||||
call this function to enable it.
|
||||
|
||||
3.3.3 int pci_disable_pcie_error_reporting(struct pci_dev *dev);
|
||||
3.3.2 int pci_disable_pcie_error_reporting(struct pci_dev *dev);
|
||||
pci_disable_pcie_error_reporting disables the device to send error
|
||||
messages to root port when an error is detected.
|
||||
|
||||
3.3.4 int pci_cleanup_aer_uncorrect_error_status(struct pci_dev *dev);
|
||||
3.3.3 int pci_cleanup_aer_uncorrect_error_status(struct pci_dev *dev);
|
||||
pci_cleanup_aer_uncorrect_error_status cleanups the uncorrectable
|
||||
error status register.
|
||||
|
||||
|
|
|
@ -210,7 +210,7 @@ over a rather long period of time, but improvements are always welcome!
|
|||
number of updates per grace period.
|
||||
|
||||
9. All RCU list-traversal primitives, which include
|
||||
rcu_dereference(), list_for_each_rcu(), list_for_each_entry_rcu(),
|
||||
rcu_dereference(), list_for_each_entry_rcu(),
|
||||
list_for_each_continue_rcu(), and list_for_each_safe_rcu(),
|
||||
must be either within an RCU read-side critical section or
|
||||
must be protected by appropriate update-side locks. RCU
|
||||
|
|
|
@ -29,9 +29,9 @@ release_referenced() delete()
|
|||
}
|
||||
|
||||
If this list/array is made lock free using RCU as in changing the
|
||||
write_lock() in add() and delete() to spin_lock and changing read_lock
|
||||
in search_and_reference to rcu_read_lock(), the atomic_get in
|
||||
search_and_reference could potentially hold reference to an element which
|
||||
write_lock() in add() and delete() to spin_lock() and changing read_lock()
|
||||
in search_and_reference() to rcu_read_lock(), the atomic_inc() in
|
||||
search_and_reference() could potentially hold reference to an element which
|
||||
has already been deleted from the list/array. Use atomic_inc_not_zero()
|
||||
in this scenario as follows:
|
||||
|
||||
|
@ -40,20 +40,20 @@ add() search_and_reference()
|
|||
{ {
|
||||
alloc_object rcu_read_lock();
|
||||
... search_for_element
|
||||
atomic_set(&el->rc, 1); if (atomic_inc_not_zero(&el->rc)) {
|
||||
write_lock(&list_lock); rcu_read_unlock();
|
||||
atomic_set(&el->rc, 1); if (!atomic_inc_not_zero(&el->rc)) {
|
||||
spin_lock(&list_lock); rcu_read_unlock();
|
||||
return FAIL;
|
||||
add_element }
|
||||
... ...
|
||||
write_unlock(&list_lock); rcu_read_unlock();
|
||||
spin_unlock(&list_lock); rcu_read_unlock();
|
||||
} }
|
||||
3. 4.
|
||||
release_referenced() delete()
|
||||
{ {
|
||||
... write_lock(&list_lock);
|
||||
... spin_lock(&list_lock);
|
||||
if (atomic_dec_and_test(&el->rc)) ...
|
||||
call_rcu(&el->head, el_free); delete_element
|
||||
... write_unlock(&list_lock);
|
||||
... spin_unlock(&list_lock);
|
||||
} ...
|
||||
if (atomic_dec_and_test(&el->rc))
|
||||
call_rcu(&el->head, el_free);
|
||||
|
|
|
@ -786,8 +786,6 @@ RCU pointer/list traversal:
|
|||
list_for_each_entry_rcu
|
||||
hlist_for_each_entry_rcu
|
||||
|
||||
list_for_each_rcu (to be deprecated in favor of
|
||||
list_for_each_entry_rcu)
|
||||
list_for_each_continue_rcu (to be deprecated in favor of new
|
||||
list_for_each_entry_continue_rcu)
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
Linux 2.4.2 Secure Attention Key (SAK) handling
|
||||
18 March 2001, Andrew Morton <akpm@osdl.org>
|
||||
18 March 2001, Andrew Morton
|
||||
|
||||
An operating system's Secure Attention Key is a security tool which is
|
||||
provided as protection against trojan password capturing programs. It
|
||||
|
|
27
Documentation/SELinux.txt
Normal file
27
Documentation/SELinux.txt
Normal file
|
@ -0,0 +1,27 @@
|
|||
If you want to use SELinux, chances are you will want
|
||||
to use the distro-provided policies, or install the
|
||||
latest reference policy release from
|
||||
http://oss.tresys.com/projects/refpolicy
|
||||
|
||||
However, if you want to install a dummy policy for
|
||||
testing, you can do using 'mdp' provided under
|
||||
scripts/selinux. Note that this requires the selinux
|
||||
userspace to be installed - in particular you will
|
||||
need checkpolicy to compile a kernel, and setfiles and
|
||||
fixfiles to label the filesystem.
|
||||
|
||||
1. Compile the kernel with selinux enabled.
|
||||
2. Type 'make' to compile mdp.
|
||||
3. Make sure that you are not running with
|
||||
SELinux enabled and a real policy. If
|
||||
you are, reboot with selinux disabled
|
||||
before continuing.
|
||||
4. Run install_policy.sh:
|
||||
cd scripts/selinux
|
||||
sh install_policy.sh
|
||||
|
||||
Step 4 will create a new dummy policy valid for your
|
||||
kernel, with a single selinux user, role, and type.
|
||||
It will compile the policy, will set your SELINUXTYPE to
|
||||
dummy in /etc/selinux/config, install the compiled policy
|
||||
as 'dummy', and relabel your filesystem.
|
|
@ -67,6 +67,8 @@ kernel patches.
|
|||
|
||||
19: All new userspace interfaces are documented in Documentation/ABI/.
|
||||
See Documentation/ABI/README for more information.
|
||||
Patches that change userspace interfaces should be CCed to
|
||||
linux-api@vger.kernel.org.
|
||||
|
||||
20: Check that it all passes `make headers_check'.
|
||||
|
||||
|
@ -83,3 +85,6 @@ kernel patches.
|
|||
23: Tested after it has been merged into the -mm patchset to make sure
|
||||
that it still works with all of the other queued patches and various
|
||||
changes in the VM, VFS, and other subsystems.
|
||||
|
||||
24: All memory barriers {e.g., barrier(), rmb(), wmb()} need a comment in the
|
||||
source code that explains the logic of what they are doing and why.
|
||||
|
|
|
@ -41,7 +41,7 @@ Linux 2.4:
|
|||
Linux 2.6:
|
||||
The same rules apply as 2.4 except that you should follow linux-kernel
|
||||
to track changes in API's. The final contact point for Linux 2.6
|
||||
submissions is Andrew Morton <akpm@osdl.org>.
|
||||
submissions is Andrew Morton.
|
||||
|
||||
What Criteria Determine Acceptance
|
||||
----------------------------------
|
||||
|
|
|
@ -77,7 +77,7 @@ Quilt:
|
|||
http://savannah.nongnu.org/projects/quilt
|
||||
|
||||
Andrew Morton's patch scripts:
|
||||
http://www.zip.com.au/~akpm/linux/patches/
|
||||
http://userweb.kernel.org/~akpm/stuff/patch-scripts.tar.gz
|
||||
Instead of these scripts, quilt is the recommended patch management
|
||||
tool (see above).
|
||||
|
||||
|
@ -405,7 +405,7 @@ person it names. This tag documents that potentially interested parties
|
|||
have been included in the discussion
|
||||
|
||||
|
||||
14) Using Test-by: and Reviewed-by:
|
||||
14) Using Tested-by: and Reviewed-by:
|
||||
|
||||
A Tested-by: tag indicates that the patch has been successfully tested (in
|
||||
some environment) by the person named. This tag informs maintainers that
|
||||
|
@ -528,7 +528,33 @@ See more details on the proper patch format in the following
|
|||
references.
|
||||
|
||||
|
||||
16) Sending "git pull" requests (from Linus emails)
|
||||
|
||||
Please write the git repo address and branch name alone on the same line
|
||||
so that I can't even by mistake pull from the wrong branch, and so
|
||||
that a triple-click just selects the whole thing.
|
||||
|
||||
So the proper format is something along the lines of:
|
||||
|
||||
"Please pull from
|
||||
|
||||
git://jdelvare.pck.nerim.net/jdelvare-2.6 i2c-for-linus
|
||||
|
||||
to get these changes:"
|
||||
|
||||
so that I don't have to hunt-and-peck for the address and inevitably
|
||||
get it wrong (actually, I've only gotten it wrong a few times, and
|
||||
checking against the diffstat tells me when I get it wrong, but I'm
|
||||
just a lot more comfortable when I don't have to "look for" the right
|
||||
thing to pull, and double-check that I have the right branch-name).
|
||||
|
||||
|
||||
Please use "git diff -M --stat --summary" to generate the diffstat:
|
||||
the -M enables rename detection, and the summary enables a summary of
|
||||
new/deleted or renamed files.
|
||||
|
||||
With rename detection, the statistics are rather different [...]
|
||||
because git will notice that a fair number of the changes are renames.
|
||||
|
||||
-----------------------------------
|
||||
SECTION 2 - HINTS, TIPS, AND TRICKS
|
||||
|
@ -627,7 +653,7 @@ SECTION 3 - REFERENCES
|
|||
----------------------
|
||||
|
||||
Andrew Morton, "The perfect patch" (tpp).
|
||||
<http://www.zip.com.au/~akpm/linux/patches/stuff/tpp.txt>
|
||||
<http://userweb.kernel.org/~akpm/stuff/tpp.txt>
|
||||
|
||||
Jeff Garzik, "Linux kernel patch submission format".
|
||||
<http://linux.yyz.us/patch-format.html>
|
||||
|
@ -646,4 +672,9 @@ Kernel Documentation/CodingStyle:
|
|||
|
||||
Linus Torvalds's mail on the canonical patch format:
|
||||
<http://lkml.org/lkml/2005/4/7/183>
|
||||
|
||||
Andi Kleen, "On submitting kernel patches"
|
||||
Some strategies to get difficult or controversal changes in.
|
||||
http://halobates.de/on-submitting-patches.pdf
|
||||
|
||||
--
|
||||
|
|
10
Documentation/accounting/Makefile
Normal file
10
Documentation/accounting/Makefile
Normal file
|
@ -0,0 +1,10 @@
|
|||
# kbuild trick to avoid linker error. Can be omitted if a module is built.
|
||||
obj- := dummy.o
|
||||
|
||||
# List of programs to build
|
||||
hostprogs-y := getdelays
|
||||
|
||||
# Tell kbuild to always build the programs
|
||||
always := $(hostprogs-y)
|
||||
|
||||
HOSTCFLAGS_getdelays.o += -I$(objtree)/usr/include
|
|
@ -11,6 +11,7 @@ the delays experienced by a task while
|
|||
a) waiting for a CPU (while being runnable)
|
||||
b) completion of synchronous block I/O initiated by the task
|
||||
c) swapping in pages
|
||||
d) memory reclaim
|
||||
|
||||
and makes these statistics available to userspace through
|
||||
the taskstats interface.
|
||||
|
@ -41,7 +42,7 @@ this structure. See
|
|||
include/linux/taskstats.h
|
||||
for a description of the fields pertaining to delay accounting.
|
||||
It will generally be in the form of counters returning the cumulative
|
||||
delay seen for cpu, sync block I/O, swapin etc.
|
||||
delay seen for cpu, sync block I/O, swapin, memory reclaim etc.
|
||||
|
||||
Taking the difference of two successive readings of a given
|
||||
counter (say cpu_delay_total) for a task will give the delay
|
||||
|
@ -94,7 +95,9 @@ CPU count real total virtual total delay total
|
|||
7876 92005750 100000000 24001500
|
||||
IO count delay total
|
||||
0 0
|
||||
MEM count delay total
|
||||
SWAP count delay total
|
||||
0 0
|
||||
RECLAIM count delay total
|
||||
0 0
|
||||
|
||||
Get delays seen in executing a given simple command
|
||||
|
@ -108,5 +111,7 @@ CPU count real total virtual total delay total
|
|||
6 4000250 4000000 0
|
||||
IO count delay total
|
||||
0 0
|
||||
MEM count delay total
|
||||
SWAP count delay total
|
||||
0 0
|
||||
RECLAIM count delay total
|
||||
0 0
|
||||
|
|
|
@ -196,14 +196,24 @@ void print_delayacct(struct taskstats *t)
|
|||
" %15llu%15llu%15llu%15llu\n"
|
||||
"IO %15s%15s\n"
|
||||
" %15llu%15llu\n"
|
||||
"MEM %15s%15s\n"
|
||||
"SWAP %15s%15s\n"
|
||||
" %15llu%15llu\n"
|
||||
"RECLAIM %12s%15s\n"
|
||||
" %15llu%15llu\n",
|
||||
"count", "real total", "virtual total", "delay total",
|
||||
t->cpu_count, t->cpu_run_real_total, t->cpu_run_virtual_total,
|
||||
t->cpu_delay_total,
|
||||
(unsigned long long)t->cpu_count,
|
||||
(unsigned long long)t->cpu_run_real_total,
|
||||
(unsigned long long)t->cpu_run_virtual_total,
|
||||
(unsigned long long)t->cpu_delay_total,
|
||||
"count", "delay total",
|
||||
t->blkio_count, t->blkio_delay_total,
|
||||
"count", "delay total", t->swapin_count, t->swapin_delay_total);
|
||||
(unsigned long long)t->blkio_count,
|
||||
(unsigned long long)t->blkio_delay_total,
|
||||
"count", "delay total",
|
||||
(unsigned long long)t->swapin_count,
|
||||
(unsigned long long)t->swapin_delay_total,
|
||||
"count", "delay total",
|
||||
(unsigned long long)t->freepages_count,
|
||||
(unsigned long long)t->freepages_delay_total);
|
||||
}
|
||||
|
||||
void task_context_switch_counts(struct taskstats *t)
|
||||
|
@ -211,14 +221,17 @@ void task_context_switch_counts(struct taskstats *t)
|
|||
printf("\n\nTask %15s%15s\n"
|
||||
" %15llu%15llu\n",
|
||||
"voluntary", "nonvoluntary",
|
||||
t->nvcsw, t->nivcsw);
|
||||
(unsigned long long)t->nvcsw, (unsigned long long)t->nivcsw);
|
||||
}
|
||||
|
||||
void print_cgroupstats(struct cgroupstats *c)
|
||||
{
|
||||
printf("sleeping %llu, blocked %llu, running %llu, stopped %llu, "
|
||||
"uninterruptible %llu\n", c->nr_sleeping, c->nr_io_wait,
|
||||
c->nr_running, c->nr_stopped, c->nr_uninterruptible);
|
||||
"uninterruptible %llu\n", (unsigned long long)c->nr_sleeping,
|
||||
(unsigned long long)c->nr_io_wait,
|
||||
(unsigned long long)c->nr_running,
|
||||
(unsigned long long)c->nr_stopped,
|
||||
(unsigned long long)c->nr_uninterruptible);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@ This document contains an explanation of the struct taskstats fields.
|
|||
There are three different groups of fields in the struct taskstats:
|
||||
|
||||
1) Common and basic accounting fields
|
||||
If CONFIG_TASKSTATS is set, the taskstats inteface is enabled and
|
||||
If CONFIG_TASKSTATS is set, the taskstats interface is enabled and
|
||||
the common fields and basic accounting fields are collected for
|
||||
delivery at do_exit() of a task.
|
||||
2) Delay accounting fields
|
||||
|
@ -26,6 +26,8 @@ There are three different groups of fields in the struct taskstats:
|
|||
|
||||
5) Time accounting for SMT machines
|
||||
|
||||
6) Extended delay accounting fields for memory reclaim
|
||||
|
||||
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.
|
||||
|
||||
|
@ -170,4 +172,9 @@ struct taskstats {
|
|||
__u64 ac_utimescaled; /* utime scaled on frequency etc */
|
||||
__u64 ac_stimescaled; /* stime scaled on frequency etc */
|
||||
__u64 cpu_scaled_run_real_total; /* scaled cpu_run_real_total */
|
||||
|
||||
6) Extended delay accounting fields for memory reclaim
|
||||
/* Delay waiting for memory reclaim */
|
||||
__u64 freepages_count;
|
||||
__u64 freepages_delay_total;
|
||||
}
|
||||
|
|
|
@ -32,7 +32,7 @@ Linux currently supports the following features on the IXP4xx chips:
|
|||
- Flash access (MTD/JFFS)
|
||||
- I2C through GPIO on IXP42x
|
||||
- GPIO for input/output/interrupts
|
||||
See include/asm-arm/arch-ixp4xx/platform.h for access functions.
|
||||
See arch/arm/mach-ixp4xx/include/mach/platform.h for access functions.
|
||||
- Timers (watchdog, OS)
|
||||
|
||||
The following components of the chips are not supported by Linux and
|
||||
|
|
|
@ -138,14 +138,8 @@ So, what's changed?
|
|||
|
||||
Set active the IRQ edge(s)/level. This replaces the
|
||||
SA1111 INTPOL manipulation, and the set_GPIO_IRQ_edge()
|
||||
function. Type should be one of the following:
|
||||
|
||||
#define IRQT_NOEDGE (0)
|
||||
#define IRQT_RISING (__IRQT_RISEDGE)
|
||||
#define IRQT_FALLING (__IRQT_FALEDGE)
|
||||
#define IRQT_BOTHEDGE (__IRQT_RISEDGE|__IRQT_FALEDGE)
|
||||
#define IRQT_LOW (__IRQT_LOWLVL)
|
||||
#define IRQT_HIGH (__IRQT_HIGHLVL)
|
||||
function. Type should be one of IRQ_TYPE_xxx defined in
|
||||
<linux/irq.h>
|
||||
|
||||
3. set_GPIO_IRQ_edge() is obsolete, and should be replaced by set_irq_type.
|
||||
|
||||
|
@ -164,7 +158,7 @@ So, what's changed?
|
|||
be re-checked for pending events. (see the Neponset IRQ handler for
|
||||
details).
|
||||
|
||||
7. fixup_irq() is gone, as is include/asm-arm/arch-*/irq.h
|
||||
7. fixup_irq() is gone, as is arch/arm/mach-*/include/mach/irq.h
|
||||
|
||||
Please note that this will not solve all problems - some of them are
|
||||
hardware based. Mixing level-based and edge-based IRQs on the same
|
||||
|
|
|
@ -79,7 +79,7 @@ Machine/Platform support
|
|||
To this end, we now have arch/arm/mach-$(MACHINE) directories which are
|
||||
designed to house the non-driver files for a particular machine (eg, PCI,
|
||||
memory management, architecture definitions etc). For all future
|
||||
machines, there should be a corresponding include/asm-arm/arch-$(MACHINE)
|
||||
machines, there should be a corresponding arch/arm/mach-$(MACHINE)/include/mach
|
||||
directory.
|
||||
|
||||
|
||||
|
@ -176,7 +176,7 @@ Kernel entry (head.S)
|
|||
class typically based around one or more system on a chip devices, and
|
||||
acts as a natural container around the actual implementations. These
|
||||
classes are given directories - arch/arm/mach-<class> and
|
||||
include/asm-arm/arch-<class> - which contain the source files to
|
||||
arch/arm/mach-<class> - which contain the source files to/include/mach
|
||||
support the machine class. This directories also contain any machine
|
||||
specific supporting code.
|
||||
|
||||
|
|
|
@ -13,16 +13,31 @@ Introduction
|
|||
data-sheet/users manual to find out the complete list.
|
||||
|
||||
|
||||
GPIOLIB
|
||||
-------
|
||||
|
||||
With the event of the GPIOLIB in drivers/gpio, support for some
|
||||
of the GPIO functions such as reading and writing a pin will
|
||||
be removed in favour of this common access method.
|
||||
|
||||
Once all the extant drivers have been converted, the functions
|
||||
listed below will be removed (they may be marked as __deprecated
|
||||
in the near future).
|
||||
|
||||
- s3c2410_gpio_getpin
|
||||
- s3c2410_gpio_setpin
|
||||
|
||||
|
||||
Headers
|
||||
-------
|
||||
|
||||
See include/asm-arm/arch-s3c2410/regs-gpio.h for the list
|
||||
See arch/arm/mach-s3c2410/include/mach/regs-gpio.h for the list
|
||||
of GPIO pins, and the configuration values for them. This
|
||||
is included by using #include <asm/arch/regs-gpio.h>
|
||||
is included by using #include <mach/regs-gpio.h>
|
||||
|
||||
The GPIO management functions are defined in the hardware
|
||||
header include/asm-arm/arch-s3c2410/hardware.h which can be
|
||||
included by #include <asm/arch/hardware.h>
|
||||
header arch/arm/mach-s3c2410/include/mach/hardware.h which can be
|
||||
included by #include <mach/hardware.h>
|
||||
|
||||
A useful amount of documentation can be found in the hardware
|
||||
header on how the GPIO functions (and others) work.
|
||||
|
|
|
@ -8,9 +8,10 @@ Introduction
|
|||
|
||||
The Samsung S3C24XX range of ARM9 System-on-Chip CPUs are supported
|
||||
by the 's3c2410' architecture of ARM Linux. Currently the S3C2410,
|
||||
S3C2412, S3C2413, S3C2440 and S3C2442 devices are supported.
|
||||
S3C2412, S3C2413, S3C2440, S3C2442 and S3C2443 devices are supported.
|
||||
|
||||
Support for the S3C2400 and S3C24A0 series are in progress.
|
||||
|
||||
Support for the S3C2400 series is in progress.
|
||||
|
||||
Configuration
|
||||
-------------
|
||||
|
@ -36,7 +37,23 @@ Layout
|
|||
in arch/arm/mach-s3c2410 and S3C2440 in arch/arm/mach-s3c2440
|
||||
|
||||
Register, kernel and platform data definitions are held in the
|
||||
include/asm-arm/arch-s3c2410 directory.
|
||||
arch/arm/mach-s3c2410 directory./include/mach
|
||||
|
||||
arch/arm/plat-s3c24xx:
|
||||
|
||||
Files in here are either common to all the s3c24xx family,
|
||||
or are common to only some of them with names to indicate this
|
||||
status. The files that are not common to all are generally named
|
||||
with the initial cpu they support in the series to ensure a short
|
||||
name without any possibility of confusion with newer devices.
|
||||
|
||||
As an example, initially s3c244x would cover s3c2440 and s3c2442, but
|
||||
with the s3c2443 which does not share many of the same drivers in
|
||||
this directory, the name becomes invalid. We stick to s3c2440-<x>
|
||||
to indicate a driver that is s3c2440 and s3c2442 compatible.
|
||||
|
||||
This does mean that to find the status of any given SoC, a number
|
||||
of directories may need to be searched.
|
||||
|
||||
|
||||
Machines
|
||||
|
@ -159,6 +176,17 @@ NAND
|
|||
For more information see Documentation/arm/Samsung-S3C24XX/NAND.txt
|
||||
|
||||
|
||||
SD/MMC
|
||||
------
|
||||
|
||||
The SD/MMC hardware pre S3C2443 is supported in the current
|
||||
kernel, the driver is drivers/mmc/host/s3cmci.c and supports
|
||||
1 and 4 bit SD or MMC cards.
|
||||
|
||||
The SDIO behaviour of this driver has not been fully tested. There is no
|
||||
current support for hardware SDIO interrupts.
|
||||
|
||||
|
||||
Serial
|
||||
------
|
||||
|
||||
|
@ -178,6 +206,9 @@ GPIO
|
|||
The core contains support for manipulating the GPIO, see the
|
||||
documentation in GPIO.txt in the same directory as this file.
|
||||
|
||||
Newer kernels carry GPIOLIB, and support is being moved towards
|
||||
this with some of the older support in line to be removed.
|
||||
|
||||
|
||||
Clock Management
|
||||
----------------
|
||||
|
|
|
@ -49,7 +49,7 @@ Board Support
|
|||
Platform Data
|
||||
-------------
|
||||
|
||||
See linux/include/asm-arm/arch-s3c2410/usb-control.h for the
|
||||
See arch/arm/mach-s3c2410/include/mach/usb-control.h for the
|
||||
descriptions of the platform device data. An implementation
|
||||
can be found in linux/arch/arm/mach-s3c2410/usb-simtec.c .
|
||||
|
||||
|
|
10
Documentation/auxdisplay/Makefile
Normal file
10
Documentation/auxdisplay/Makefile
Normal file
|
@ -0,0 +1,10 @@
|
|||
# kbuild trick to avoid linker error. Can be omitted if a module is built.
|
||||
obj- := dummy.o
|
||||
|
||||
# List of programs to build
|
||||
hostprogs-y := cfag12864b-example
|
||||
|
||||
# Tell kbuild to always build the programs
|
||||
always := $(hostprogs-y)
|
||||
|
||||
HOSTCFLAGS_cfag12864b-example.o += -I$(objtree)/usr/include
|
|
@ -1,155 +0,0 @@
|
|||
A Simple Guide to Configure KGDB
|
||||
|
||||
Sonic Zhang <sonic.zhang@analog.com>
|
||||
Aug. 24th 2006
|
||||
|
||||
|
||||
This KGDB patch enables the kernel developer to do source level debugging on
|
||||
the kernel for the Blackfin architecture. The debugging works over either the
|
||||
ethernet interface or one of the uarts. Both software breakpoints and
|
||||
hardware breakpoints are supported in this version.
|
||||
http://docs.blackfin.uclinux.org/doku.php?id=kgdb
|
||||
|
||||
|
||||
2 known issues:
|
||||
1. This bug:
|
||||
http://blackfin.uclinux.org/tracker/index.php?func=detail&aid=544&group_id=18&atid=145
|
||||
The GDB client for Blackfin uClinux causes incorrect values of local
|
||||
variables to be displayed when the user breaks the running of kernel in GDB.
|
||||
2. Because of a hardware bug in Blackfin 533 v1.0.3:
|
||||
05000067 - Watchpoints (Hardware Breakpoints) are not supported
|
||||
Hardware breakpoints cannot be set properly.
|
||||
|
||||
|
||||
Debug over Ethernet:
|
||||
|
||||
1. Compile and install the cross platform version of gdb for blackfin, which
|
||||
can be found at $(BINROOT)/bfin-elf-gdb.
|
||||
|
||||
2. Apply this patch to the 2.6.x kernel. Select the menuconfig option under
|
||||
"Kernel hacking" -> "Kernel debugging" -> "KGDB: kernel debug with remote gdb".
|
||||
With this selected, option "Full Symbolic/Source Debugging support" and
|
||||
"Compile the kernel with frame pointers" are also selected.
|
||||
|
||||
3. Select option "KGDB: connect over (Ethernet)". Add "kgdboe=@target-IP/,@host-IP/" to
|
||||
the option "Compiled-in Kernel Boot Parameter" under "Kernel hacking".
|
||||
|
||||
4. Connect minicom to the serial port and boot the kernel image.
|
||||
|
||||
5. Configure the IP "/> ifconfig eth0 target-IP"
|
||||
|
||||
6. Start GDB client "bfin-elf-gdb vmlinux".
|
||||
|
||||
7. Connect to the target "(gdb) target remote udp:target-IP:6443".
|
||||
|
||||
8. Set software breakpoint "(gdb) break sys_open".
|
||||
|
||||
9. Continue "(gdb) c".
|
||||
|
||||
10. Run ls in the target console "/> ls".
|
||||
|
||||
11. Breakpoint hits. "Breakpoint 1: sys_open(..."
|
||||
|
||||
12. Display local variables and function paramters.
|
||||
(*) This operation gives wrong results, see known issue 1.
|
||||
|
||||
13. Single stepping "(gdb) si".
|
||||
|
||||
14. Remove breakpoint 1. "(gdb) del 1"
|
||||
|
||||
15. Set hardware breakpoint "(gdb) hbreak sys_open".
|
||||
|
||||
16. Continue "(gdb) c".
|
||||
|
||||
17. Run ls in the target console "/> ls".
|
||||
|
||||
18. Hardware breakpoint hits. "Breakpoint 1: sys_open(...".
|
||||
(*) This hardware breakpoint will not be hit, see known issue 2.
|
||||
|
||||
19. Continue "(gdb) c".
|
||||
|
||||
20. Interrupt the target in GDB "Ctrl+C".
|
||||
|
||||
21. Detach from the target "(gdb) detach".
|
||||
|
||||
22. Exit GDB "(gdb) quit".
|
||||
|
||||
|
||||
Debug over the UART:
|
||||
|
||||
1. Compile and install the cross platform version of gdb for blackfin, which
|
||||
can be found at $(BINROOT)/bfin-elf-gdb.
|
||||
|
||||
2. Apply this patch to the 2.6.x kernel. Select the menuconfig option under
|
||||
"Kernel hacking" -> "Kernel debugging" -> "KGDB: kernel debug with remote gdb".
|
||||
With this selected, option "Full Symbolic/Source Debugging support" and
|
||||
"Compile the kernel with frame pointers" are also selected.
|
||||
|
||||
3. Select option "KGDB: connect over (UART)". Set "KGDB: UART port number" to be
|
||||
a different one from the console. Don't forget to change the mode of
|
||||
blackfin serial driver to PIO. Otherwise kgdb works incorrectly on UART.
|
||||
|
||||
4. If you want connect to kgdb when the kernel boots, enable
|
||||
"KGDB: Wait for gdb connection early"
|
||||
|
||||
5. Compile kernel.
|
||||
|
||||
6. Connect minicom to the serial port of the console and boot the kernel image.
|
||||
|
||||
7. Start GDB client "bfin-elf-gdb vmlinux".
|
||||
|
||||
8. Set the baud rate in GDB "(gdb) set remotebaud 57600".
|
||||
|
||||
9. Connect to the target on the second serial port "(gdb) target remote /dev/ttyS1".
|
||||
|
||||
10. Set software breakpoint "(gdb) break sys_open".
|
||||
|
||||
11. Continue "(gdb) c".
|
||||
|
||||
12. Run ls in the target console "/> ls".
|
||||
|
||||
13. A breakpoint is hit. "Breakpoint 1: sys_open(..."
|
||||
|
||||
14. All other operations are the same as that in KGDB over Ethernet.
|
||||
|
||||
|
||||
Debug over the same UART as console:
|
||||
|
||||
1. Compile and install the cross platform version of gdb for blackfin, which
|
||||
can be found at $(BINROOT)/bfin-elf-gdb.
|
||||
|
||||
2. Apply this patch to the 2.6.x kernel. Select the menuconfig option under
|
||||
"Kernel hacking" -> "Kernel debugging" -> "KGDB: kernel debug with remote gdb".
|
||||
With this selected, option "Full Symbolic/Source Debugging support" and
|
||||
"Compile the kernel with frame pointers" are also selected.
|
||||
|
||||
3. Select option "KGDB: connect over UART". Set "KGDB: UART port number" to console.
|
||||
Don't forget to change the mode of blackfin serial driver to PIO.
|
||||
Otherwise kgdb works incorrectly on UART.
|
||||
|
||||
4. If you want connect to kgdb when the kernel boots, enable
|
||||
"KGDB: Wait for gdb connection early"
|
||||
|
||||
5. Connect minicom to the serial port and boot the kernel image.
|
||||
|
||||
6. (Optional) Ask target to wait for gdb connection by entering Ctrl+A. In minicom, you should enter Ctrl+A+A.
|
||||
|
||||
7. Start GDB client "bfin-elf-gdb vmlinux".
|
||||
|
||||
8. Set the baud rate in GDB "(gdb) set remotebaud 57600".
|
||||
|
||||
9. Connect to the target "(gdb) target remote /dev/ttyS0".
|
||||
|
||||
10. Set software breakpoint "(gdb) break sys_open".
|
||||
|
||||
11. Continue "(gdb) c". Then enter Ctrl+C twice to stop GDB connection.
|
||||
|
||||
12. Run ls in the target console "/> ls". Dummy string can be seen on the console.
|
||||
|
||||
13. Then connect the gdb to target again. "(gdb) target remote /dev/ttyS0".
|
||||
Now you will find a breakpoint is hit. "Breakpoint 1: sys_open(..."
|
||||
|
||||
14. All other operations are the same as that in KGDB over Ethernet. The only
|
||||
difference is that after continue command in GDB, please stop GDB
|
||||
connection by 2 "Ctrl+C"s and connect again after breakpoints are hit or
|
||||
Ctrl+A is entered.
|
|
@ -246,7 +246,7 @@ will require extra work due to the application tag.
|
|||
retrieve the tag buffer using bio_integrity_get_tag().
|
||||
|
||||
|
||||
6.3 PASSING EXISTING INTEGRITY METADATA
|
||||
5.3 PASSING EXISTING INTEGRITY METADATA
|
||||
|
||||
Filesystems that either generate their own integrity metadata or
|
||||
are capable of transferring IMD from user space can use the
|
||||
|
@ -283,7 +283,7 @@ will require extra work due to the application tag.
|
|||
integrity upon completion.
|
||||
|
||||
|
||||
6.4 REGISTERING A BLOCK DEVICE AS CAPABLE OF EXCHANGING INTEGRITY
|
||||
5.4 REGISTERING A BLOCK DEVICE AS CAPABLE OF EXCHANGING INTEGRITY
|
||||
METADATA
|
||||
|
||||
To enable integrity exchange on a block device the gendisk must be
|
||||
|
|
|
@ -30,12 +30,18 @@ write_expire (in ms)
|
|||
Similar to read_expire mentioned above, but for writes.
|
||||
|
||||
|
||||
fifo_batch
|
||||
fifo_batch (number of requests)
|
||||
----------
|
||||
|
||||
When a read request expires its deadline, we must move some requests from
|
||||
the sorted io scheduler list to the block device dispatch queue. fifo_batch
|
||||
controls how many requests we move.
|
||||
Requests are grouped into ``batches'' of a particular data direction (read or
|
||||
write) which are serviced in increasing sector order. To limit extra seeking,
|
||||
deadline expiries are only checked between batches. fifo_batch controls the
|
||||
maximum number of requests per batch.
|
||||
|
||||
This parameter tunes the balance between per-request latency and aggregate
|
||||
throughput. When low latency is the primary concern, smaller is better (where
|
||||
a value of 1 yields first-come first-served behaviour). Increasing fifo_batch
|
||||
generally improves throughput, at the cost of latency variation.
|
||||
|
||||
|
||||
writes_starved (number of dispatches)
|
||||
|
|
67
Documentation/bt8xxgpio.txt
Normal file
67
Documentation/bt8xxgpio.txt
Normal file
|
@ -0,0 +1,67 @@
|
|||
===============================================================
|
||||
== BT8XXGPIO driver ==
|
||||
== ==
|
||||
== A driver for a selfmade cheap BT8xx based PCI GPIO-card ==
|
||||
== ==
|
||||
== For advanced documentation, see ==
|
||||
== http://www.bu3sch.de/btgpio.php ==
|
||||
===============================================================
|
||||
|
||||
|
||||
A generic digital 24-port PCI GPIO card can be built out of an ordinary
|
||||
Brooktree bt848, bt849, bt878 or bt879 based analog TV tuner card. The
|
||||
Brooktree chip is used in old analog Hauppauge WinTV PCI cards. You can easily
|
||||
find them used for low prices on the net.
|
||||
|
||||
The bt8xx chip does have 24 digital GPIO ports.
|
||||
These ports are accessible via 24 pins on the SMD chip package.
|
||||
|
||||
|
||||
==============================================
|
||||
== How to physically access the GPIO pins ==
|
||||
==============================================
|
||||
|
||||
The are several ways to access these pins. One might unsolder the whole chip
|
||||
and put it on a custom PCI board, or one might only unsolder each individual
|
||||
GPIO pin and solder that to some tiny wire. As the chip package really is tiny
|
||||
there are some advanced soldering skills needed in any case.
|
||||
|
||||
The physical pinouts are drawn in the following ASCII art.
|
||||
The GPIO pins are marked with G00-G23
|
||||
|
||||
G G G G G G G G G G G G G G G G G G
|
||||
0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1
|
||||
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7
|
||||
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
|
||||
---------------------------------------------------------------------------
|
||||
--| ^ ^ |--
|
||||
--| pin 86 pin 67 |--
|
||||
--| |--
|
||||
--| pin 61 > |-- G18
|
||||
--| |-- G19
|
||||
--| |-- G20
|
||||
--| |-- G21
|
||||
--| |-- G22
|
||||
--| pin 56 > |-- G23
|
||||
--| |--
|
||||
--| Brooktree 878/879 |--
|
||||
--| |--
|
||||
--| |--
|
||||
--| |--
|
||||
--| |--
|
||||
--| |--
|
||||
--| |--
|
||||
--| |--
|
||||
--| |--
|
||||
--| |--
|
||||
--| |--
|
||||
--| |--
|
||||
--| |--
|
||||
--| |--
|
||||
--| O |--
|
||||
--| |--
|
||||
---------------------------------------------------------------------------
|
||||
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
|
||||
^
|
||||
This is pin 1
|
||||
|
|
@ -112,27 +112,18 @@ Hot plug support for SCSI tape drives
|
|||
|
||||
Hot plugging of SCSI tape drives is supported, with some caveats.
|
||||
The cciss driver must be informed that changes to the SCSI bus
|
||||
have been made, in addition to and prior to informing the SCSI
|
||||
mid layer. This may be done via the /proc filesystem. For example:
|
||||
have been made. This may be done via the /proc filesystem.
|
||||
For example:
|
||||
|
||||
echo "rescan" > /proc/scsi/cciss0/1
|
||||
|
||||
This causes the adapter to query the adapter about changes to the
|
||||
physical SCSI buses and/or fibre channel arbitrated loop and the
|
||||
This causes the driver to query the adapter about changes to the
|
||||
physical SCSI buses and/or fibre channel arbitrated loop and the
|
||||
driver to make note of any new or removed sequential access devices
|
||||
or medium changers. The driver will output messages indicating what
|
||||
devices have been added or removed and the controller, bus, target and
|
||||
lun used to address the device. Once this is done, the SCSI mid layer
|
||||
can be informed of changes to the virtual SCSI bus which the driver
|
||||
presents to it in the usual way. For example:
|
||||
|
||||
echo scsi add-single-device 3 2 1 0 > /proc/scsi/scsi
|
||||
|
||||
to add a device on controller 3, bus 2, target 1, lun 0. Note that
|
||||
the driver makes an effort to preserve the devices positions
|
||||
in the virtual SCSI bus, so if you are only moving tape drives
|
||||
around on the same adapter and not adding or removing tape drives
|
||||
from the adapter, informing the SCSI mid layer may not be necessary.
|
||||
lun used to address the device. It then notifies the SCSI mid layer
|
||||
of these changes.
|
||||
|
||||
Note that the naming convention of the /proc filesystem entries
|
||||
contains a number in addition to the driver name. (E.g. "cciss0"
|
||||
|
|
|
@ -145,8 +145,7 @@ useful for reading photocds.
|
|||
|
||||
To play an audio CD, you should first unmount and remove any data
|
||||
CDROM. Any of the CDROM player programs should then work (workman,
|
||||
workbone, cdplayer, etc.). Lacking anything else, you could use the
|
||||
cdtester program in Documentation/cdrom/sbpcd.
|
||||
workbone, cdplayer, etc.).
|
||||
|
||||
On a few drives, you can read digital audio directly using a program
|
||||
such as cdda2wav. The only types of drive which I've heard support
|
||||
|
|
99
Documentation/cgroups/freezer-subsystem.txt
Normal file
99
Documentation/cgroups/freezer-subsystem.txt
Normal file
|
@ -0,0 +1,99 @@
|
|||
The cgroup freezer is useful to batch job management system which start
|
||||
and stop sets of tasks in order to schedule the resources of a machine
|
||||
according to the desires of a system administrator. This sort of program
|
||||
is often used on HPC clusters to schedule access to the cluster as a
|
||||
whole. The cgroup freezer uses cgroups to describe the set of tasks to
|
||||
be started/stopped by the batch job management system. It also provides
|
||||
a means to start and stop the tasks composing the job.
|
||||
|
||||
The cgroup freezer will also be useful for checkpointing running groups
|
||||
of tasks. The freezer allows the checkpoint code to obtain a consistent
|
||||
image of the tasks by attempting to force the tasks in a cgroup into a
|
||||
quiescent state. Once the tasks are quiescent another task can
|
||||
walk /proc or invoke a kernel interface to gather information about the
|
||||
quiesced tasks. Checkpointed tasks can be restarted later should a
|
||||
recoverable error occur. This also allows the checkpointed tasks to be
|
||||
migrated between nodes in a cluster by copying the gathered information
|
||||
to another node and restarting the tasks there.
|
||||
|
||||
Sequences of SIGSTOP and SIGCONT are not always sufficient for stopping
|
||||
and resuming tasks in userspace. Both of these signals are observable
|
||||
from within the tasks we wish to freeze. While SIGSTOP cannot be caught,
|
||||
blocked, or ignored it can be seen by waiting or ptracing parent tasks.
|
||||
SIGCONT is especially unsuitable since it can be caught by the task. Any
|
||||
programs designed to watch for SIGSTOP and SIGCONT could be broken by
|
||||
attempting to use SIGSTOP and SIGCONT to stop and resume tasks. We can
|
||||
demonstrate this problem using nested bash shells:
|
||||
|
||||
$ echo $$
|
||||
16644
|
||||
$ bash
|
||||
$ echo $$
|
||||
16690
|
||||
|
||||
From a second, unrelated bash shell:
|
||||
$ kill -SIGSTOP 16690
|
||||
$ kill -SIGCONT 16990
|
||||
|
||||
<at this point 16990 exits and causes 16644 to exit too>
|
||||
|
||||
This happens because bash can observe both signals and choose how it
|
||||
responds to them.
|
||||
|
||||
Another example of a program which catches and responds to these
|
||||
signals is gdb. In fact any program designed to use ptrace is likely to
|
||||
have a problem with this method of stopping and resuming tasks.
|
||||
|
||||
In contrast, the cgroup freezer uses the kernel freezer code to
|
||||
prevent the freeze/unfreeze cycle from becoming visible to the tasks
|
||||
being frozen. This allows the bash example above and gdb to run as
|
||||
expected.
|
||||
|
||||
The freezer subsystem in the container filesystem defines a file named
|
||||
freezer.state. Writing "FROZEN" to the state file will freeze all tasks in the
|
||||
cgroup. Subsequently writing "THAWED" will unfreeze the tasks in the cgroup.
|
||||
Reading will return the current state.
|
||||
|
||||
* Examples of usage :
|
||||
|
||||
# mkdir /containers/freezer
|
||||
# mount -t cgroup -ofreezer freezer /containers
|
||||
# mkdir /containers/0
|
||||
# echo $some_pid > /containers/0/tasks
|
||||
|
||||
to get status of the freezer subsystem :
|
||||
|
||||
# cat /containers/0/freezer.state
|
||||
THAWED
|
||||
|
||||
to freeze all tasks in the container :
|
||||
|
||||
# echo FROZEN > /containers/0/freezer.state
|
||||
# cat /containers/0/freezer.state
|
||||
FREEZING
|
||||
# cat /containers/0/freezer.state
|
||||
FROZEN
|
||||
|
||||
to unfreeze all tasks in the container :
|
||||
|
||||
# echo THAWED > /containers/0/freezer.state
|
||||
# cat /containers/0/freezer.state
|
||||
THAWED
|
||||
|
||||
This is the basic mechanism which should do the right thing for user space task
|
||||
in a simple scenario.
|
||||
|
||||
It's important to note that freezing can be incomplete. In that case we return
|
||||
EBUSY. This means that some tasks in the cgroup are busy doing something that
|
||||
prevents us from completely freezing the cgroup at this time. After EBUSY,
|
||||
the cgroup will remain partially frozen -- reflected by freezer.state reporting
|
||||
"FREEZING" when read. The state will remain "FREEZING" until one of these
|
||||
things happens:
|
||||
|
||||
1) Userspace cancels the freezing operation by writing "THAWED" to
|
||||
the freezer.state file
|
||||
2) Userspace retries the freezing operation by writing "FROZEN" to
|
||||
the freezer.state file (writing "FREEZING" is not legal
|
||||
and returns EIO)
|
||||
3) The tasks that blocked the cgroup from entering the "FROZEN"
|
||||
state disappear from the cgroup's set of tasks.
|
|
@ -1,133 +0,0 @@
|
|||
|
||||
#### cli()/sti() removal guide, started by Ingo Molnar <mingo@redhat.com>
|
||||
|
||||
|
||||
as of 2.5.28, five popular macros have been removed on SMP, and
|
||||
are being phased out on UP:
|
||||
|
||||
cli(), sti(), save_flags(flags), save_flags_cli(flags), restore_flags(flags)
|
||||
|
||||
until now it was possible to protect driver code against interrupt
|
||||
handlers via a cli(), but from now on other, more lightweight methods
|
||||
have to be used for synchronization, such as spinlocks or semaphores.
|
||||
|
||||
for example, driver code that used to do something like:
|
||||
|
||||
struct driver_data;
|
||||
|
||||
irq_handler (...)
|
||||
{
|
||||
....
|
||||
driver_data.finish = 1;
|
||||
driver_data.new_work = 0;
|
||||
....
|
||||
}
|
||||
|
||||
...
|
||||
|
||||
ioctl_func (...)
|
||||
{
|
||||
...
|
||||
cli();
|
||||
...
|
||||
driver_data.finish = 0;
|
||||
driver_data.new_work = 2;
|
||||
...
|
||||
sti();
|
||||
...
|
||||
}
|
||||
|
||||
was SMP-correct because the cli() function ensured that no
|
||||
interrupt handler (amongst them the above irq_handler()) function
|
||||
would execute while the cli()-ed section is executing.
|
||||
|
||||
but from now on a more direct method of locking has to be used:
|
||||
|
||||
DEFINE_SPINLOCK(driver_lock);
|
||||
struct driver_data;
|
||||
|
||||
irq_handler (...)
|
||||
{
|
||||
unsigned long flags;
|
||||
....
|
||||
spin_lock_irqsave(&driver_lock, flags);
|
||||
....
|
||||
driver_data.finish = 1;
|
||||
driver_data.new_work = 0;
|
||||
....
|
||||
spin_unlock_irqrestore(&driver_lock, flags);
|
||||
....
|
||||
}
|
||||
|
||||
...
|
||||
|
||||
ioctl_func (...)
|
||||
{
|
||||
...
|
||||
spin_lock_irq(&driver_lock);
|
||||
...
|
||||
driver_data.finish = 0;
|
||||
driver_data.new_work = 2;
|
||||
...
|
||||
spin_unlock_irq(&driver_lock);
|
||||
...
|
||||
}
|
||||
|
||||
the above code has a number of advantages:
|
||||
|
||||
- the locking relation is easier to understand - actual lock usage
|
||||
pinpoints the critical sections. cli() usage is too opaque.
|
||||
Easier to understand means it's easier to debug.
|
||||
|
||||
- it's faster, because spinlocks are faster to acquire than the
|
||||
potentially heavily-used IRQ lock. Furthermore, your driver does
|
||||
not have to wait eg. for a big heavy SCSI interrupt to finish,
|
||||
because the driver_lock spinlock is only used by your driver.
|
||||
cli() on the other hand was used by many drivers, and extended
|
||||
the critical section to the whole IRQ handler function - creating
|
||||
serious lock contention.
|
||||
|
||||
|
||||
to make the transition easier, we've still kept the cli(), sti(),
|
||||
save_flags(), save_flags_cli() and restore_flags() macros defined
|
||||
on UP systems - but their usage will be phased out until 2.6 is
|
||||
released.
|
||||
|
||||
drivers that want to disable local interrupts (interrupts on the
|
||||
current CPU), can use the following five macros:
|
||||
|
||||
local_irq_disable(), local_irq_enable(), local_save_flags(flags),
|
||||
local_irq_save(flags), local_irq_restore(flags)
|
||||
|
||||
but beware, their meaning and semantics are much simpler, far from
|
||||
that of the old cli(), sti(), save_flags(flags) and restore_flags(flags)
|
||||
SMP meaning:
|
||||
|
||||
local_irq_disable() => turn local IRQs off
|
||||
|
||||
local_irq_enable() => turn local IRQs on
|
||||
|
||||
local_save_flags(flags) => save the current IRQ state into flags. The
|
||||
state can be on or off. (on some
|
||||
architectures there's even more bits in it.)
|
||||
|
||||
local_irq_save(flags) => save the current IRQ state into flags and
|
||||
disable interrupts.
|
||||
|
||||
local_irq_restore(flags) => restore the IRQ state from flags.
|
||||
|
||||
(local_irq_save can save both irqs on and irqs off state, and
|
||||
local_irq_restore can restore into both irqs on and irqs off state.)
|
||||
|
||||
another related change is that synchronize_irq() now takes a parameter:
|
||||
synchronize_irq(irq). This change too has the purpose of making SMP
|
||||
synchronization more lightweight - this way you can wait for your own
|
||||
interrupt handler to finish, no need to wait for other IRQ sources.
|
||||
|
||||
|
||||
why were these changes done? The main reason was the architectural burden
|
||||
of maintaining the cli()/sti() interface - it became a real problem. The
|
||||
new interrupt system is much more streamlined, easier to understand, debug,
|
||||
and it's also a bit faster - the same happened to it that will happen to
|
||||
cli()/sti() using drivers once they convert to spinlocks :-)
|
||||
|
11
Documentation/connector/Makefile
Normal file
11
Documentation/connector/Makefile
Normal file
|
@ -0,0 +1,11 @@
|
|||
ifneq ($(CONFIG_CONNECTOR),)
|
||||
obj-m += cn_test.o
|
||||
endif
|
||||
|
||||
# List of programs to build
|
||||
hostprogs-y := ucon
|
||||
|
||||
# Tell kbuild to always build the programs
|
||||
always := $(hostprogs-y)
|
||||
|
||||
HOSTCFLAGS_ucon.o += -I$(objtree)/usr/include
|
|
@ -112,14 +112,22 @@ the per cgroup LRU.
|
|||
|
||||
2.2.1 Accounting details
|
||||
|
||||
All mapped pages (RSS) and unmapped user pages (Page Cache) are accounted.
|
||||
RSS pages are accounted at the time of page_add_*_rmap() unless they've already
|
||||
been accounted for earlier. A file page will be accounted for as Page Cache;
|
||||
it's mapped into the page tables of a process, duplicate accounting is carefully
|
||||
avoided. Page Cache pages are accounted at the time of add_to_page_cache().
|
||||
The corresponding routines that remove a page from the page tables or removes
|
||||
a page from Page Cache is used to decrement the accounting counters of the
|
||||
cgroup.
|
||||
All mapped anon pages (RSS) and cache pages (Page Cache) are accounted.
|
||||
(some pages which never be reclaimable and will not be on global LRU
|
||||
are not accounted. we just accounts pages under usual vm management.)
|
||||
|
||||
RSS pages are accounted at page_fault unless they've already been accounted
|
||||
for earlier. A file page will be accounted for as Page Cache when it's
|
||||
inserted into inode (radix-tree). While it's mapped into the page tables of
|
||||
processes, duplicate accounting is carefully avoided.
|
||||
|
||||
A RSS page is unaccounted when it's fully unmapped. A PageCache page is
|
||||
unaccounted when it's removed from radix-tree.
|
||||
|
||||
At page migration, accounting information is kept.
|
||||
|
||||
Note: we just account pages-on-lru because our purpose is to control amount
|
||||
of used pages. not-on-lru pages are tend to be out-of-control from vm view.
|
||||
|
||||
2.3 Shared Page Accounting
|
||||
|
||||
|
@ -242,8 +250,7 @@ rmdir() if there are no tasks.
|
|||
1. Add support for accounting huge pages (as a separate controller)
|
||||
2. Make per-cgroup scanner reclaim not-shared pages first
|
||||
3. Teach controller to account for shared-pages
|
||||
4. Start reclamation when the limit is lowered
|
||||
5. Start reclamation in the background when the limit is
|
||||
4. Start reclamation in the background when the limit is
|
||||
not yet hit but the usage is getting closer
|
||||
|
||||
Summary
|
||||
|
|
|
@ -122,7 +122,7 @@ around '10000' or more.
|
|||
show_sampling_rate_(min|max): the minimum and maximum sampling rates
|
||||
available that you may set 'sampling_rate' to.
|
||||
|
||||
up_threshold: defines what the average CPU usaged between the samplings
|
||||
up_threshold: defines what the average CPU usage between the samplings
|
||||
of 'sampling_rate' needs to be for the kernel to make a decision on
|
||||
whether it should increase the frequency. For example when it is set
|
||||
to its default value of '80' it means that between the checking
|
||||
|
|
|
@ -35,11 +35,9 @@ Mailing List
|
|||
------------
|
||||
There is a CPU frequency changing CVS commit and general list where
|
||||
you can report bugs, problems or submit patches. To post a message,
|
||||
send an email to cpufreq@lists.linux.org.uk, to subscribe go to
|
||||
http://lists.linux.org.uk/mailman/listinfo/cpufreq. Previous post to the
|
||||
mailing list are available to subscribers at
|
||||
http://lists.linux.org.uk/mailman/private/cpufreq/.
|
||||
|
||||
send an email to cpufreq@vger.kernel.org, to subscribe go to
|
||||
http://vger.kernel.org/vger-lists.html#cpufreq and follow the
|
||||
instructions there.
|
||||
|
||||
Links
|
||||
-----
|
||||
|
@ -50,7 +48,7 @@ how to access the CVS repository:
|
|||
* http://cvs.arm.linux.org.uk/
|
||||
|
||||
the CPUFreq Mailing list:
|
||||
* http://lists.linux.org.uk/mailman/listinfo/cpufreq
|
||||
* http://vger.kernel.org/vger-lists.html#cpufreq
|
||||
|
||||
Clock and voltage scaling for the SA-1100:
|
||||
* http://www.lartmaker.nl/projects/scaling
|
||||
|
|
|
@ -59,15 +59,10 @@ 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.
|
||||
|
||||
s390 uses the number of cpus it detects at IPL time to also the number of bits
|
||||
in cpu_possible_map. If it is desired to add additional cpus at a later time
|
||||
the number should be specified using this option or the possible_cpus option.
|
||||
|
||||
possible_cpus=n [s390 only] use this to set hotpluggable cpus.
|
||||
This option sets possible_cpus bits in
|
||||
cpu_possible_map. Thus keeping the numbers of bits set
|
||||
constant even if the machine gets rebooted.
|
||||
This option overrides additional_cpus.
|
||||
|
||||
CPU maps and such
|
||||
-----------------
|
||||
|
|
|
@ -48,7 +48,7 @@ hooks, beyond what is already present, required to manage dynamic
|
|||
job placement on large systems.
|
||||
|
||||
Cpusets use the generic cgroup subsystem described in
|
||||
Documentation/cgroup.txt.
|
||||
Documentation/cgroups/cgroups.txt.
|
||||
|
||||
Requests by a task, using the sched_setaffinity(2) system call to
|
||||
include CPUs in its CPU affinity mask, and using the mbind(2) and
|
||||
|
@ -635,14 +635,16 @@ prior 'mems' setting, will not be moved.
|
|||
|
||||
There is an exception to the above. If hotplug functionality is used
|
||||
to remove all the CPUs that are currently assigned to a cpuset,
|
||||
then the kernel will automatically update the cpus_allowed of all
|
||||
tasks attached to CPUs in that cpuset to allow all CPUs. When memory
|
||||
hotplug functionality for removing Memory Nodes is available, a
|
||||
similar exception is expected to apply there as well. In general,
|
||||
the kernel prefers to violate cpuset placement, over starving a task
|
||||
that has had all its allowed CPUs or Memory Nodes taken offline. User
|
||||
code should reconfigure cpusets to only refer to online CPUs and Memory
|
||||
Nodes when using hotplug to add or remove such resources.
|
||||
then all the tasks in that cpuset will be moved to the nearest ancestor
|
||||
with non-empty cpus. But the moving of some (or all) tasks might fail if
|
||||
cpuset is bound with another cgroup subsystem which has some restrictions
|
||||
on task attaching. In this failing case, those tasks will stay
|
||||
in the original cpuset, and the kernel will automatically update
|
||||
their cpus_allowed to allow all online CPUs. When memory hotplug
|
||||
functionality for removing Memory Nodes is available, a similar exception
|
||||
is expected to apply there as well. In general, the kernel prefers to
|
||||
violate cpuset placement, over starving a task that has had all
|
||||
its allowed CPUs or Memory Nodes taken offline.
|
||||
|
||||
There is a second exception to the above. GFP_ATOMIC requests are
|
||||
kernel internal allocations that must be satisfied, immediately.
|
||||
|
|
|
@ -27,7 +27,7 @@ operating system.
|
|||
The ETRAX 100LX chip
|
||||
--------------------
|
||||
|
||||
For reference, plase see the press-release:
|
||||
For reference, please see the press-release:
|
||||
|
||||
http://www.axis.com/news/us/001101_etrax.htm
|
||||
|
||||
|
|
274
Documentation/development-process/1.Intro
Normal file
274
Documentation/development-process/1.Intro
Normal file
|
@ -0,0 +1,274 @@
|
|||
1: A GUIDE TO THE KERNEL DEVELOPMENT PROCESS
|
||||
|
||||
The purpose of this document is to help developers (and their managers)
|
||||
work with the development community with a minimum of frustration. It is
|
||||
an attempt to document how this community works in a way which is
|
||||
accessible to those who are not intimately familiar with Linux kernel
|
||||
development (or, indeed, free software development in general). While
|
||||
there is some technical material here, this is very much a process-oriented
|
||||
discussion which does not require a deep knowledge of kernel programming to
|
||||
understand.
|
||||
|
||||
|
||||
1.1: EXECUTIVE SUMMARY
|
||||
|
||||
The rest of this section covers the scope of the kernel development process
|
||||
and the kinds of frustrations that developers and their employers can
|
||||
encounter there. There are a great many reasons why kernel code should be
|
||||
merged into the official ("mainline") kernel, including automatic
|
||||
availability to users, community support in many forms, and the ability to
|
||||
influence the direction of kernel development. Code contributed to the
|
||||
Linux kernel must be made available under a GPL-compatible license.
|
||||
|
||||
Section 2 introduces the development process, the kernel release cycle, and
|
||||
the mechanics of the merge window. The various phases in the patch
|
||||
development, review, and merging cycle are covered. There is some
|
||||
discussion of tools and mailing lists. Developers wanting to get started
|
||||
with kernel development are encouraged to track down and fix bugs as an
|
||||
initial exercise.
|
||||
|
||||
Section 3 covers early-stage project planning, with an emphasis on
|
||||
involving the development community as soon as possible.
|
||||
|
||||
Section 4 is about the coding process; several pitfalls which have been
|
||||
encountered by other developers are discussed. Some requirements for
|
||||
patches are covered, and there is an introduction to some of the tools
|
||||
which can help to ensure that kernel patches are correct.
|
||||
|
||||
Section 5 talks about the process of posting patches for review. To be
|
||||
taken seriously by the development community, patches must be properly
|
||||
formatted and described, and they must be sent to the right place.
|
||||
Following the advice in this section should help to ensure the best
|
||||
possible reception for your work.
|
||||
|
||||
Section 6 covers what happens after posting patches; the job is far from
|
||||
done at that point. Working with reviewers is a crucial part of the
|
||||
development process; this section offers a number of tips on how to avoid
|
||||
problems at this important stage. Developers are cautioned against
|
||||
assuming that the job is done when a patch is merged into the mainline.
|
||||
|
||||
Section 7 introduces a couple of "advanced" topics: managing patches with
|
||||
git and reviewing patches posted by others.
|
||||
|
||||
Section 8 concludes the document with pointers to sources for more
|
||||
information on kernel development.
|
||||
|
||||
|
||||
1.2: WHAT THIS DOCUMENT IS ABOUT
|
||||
|
||||
The Linux kernel, at over 6 million lines of code and well over 1000 active
|
||||
contributors, is one of the largest and most active free software projects
|
||||
in existence. Since its humble beginning in 1991, this kernel has evolved
|
||||
into a best-of-breed operating system component which runs on pocket-sized
|
||||
digital music players, desktop PCs, the largest supercomputers in
|
||||
existence, and all types of systems in between. It is a robust, efficient,
|
||||
and scalable solution for almost any situation.
|
||||
|
||||
With the growth of Linux has come an increase in the number of developers
|
||||
(and companies) wishing to participate in its development. Hardware
|
||||
vendors want to ensure that Linux supports their products well, making
|
||||
those products attractive to Linux users. Embedded systems vendors, who
|
||||
use Linux as a component in an integrated product, want Linux to be as
|
||||
capable and well-suited to the task at hand as possible. Distributors and
|
||||
other software vendors who base their products on Linux have a clear
|
||||
interest in the capabilities, performance, and reliability of the Linux
|
||||
kernel. And end users, too, will often wish to change Linux to make it
|
||||
better suit their needs.
|
||||
|
||||
One of the most compelling features of Linux is that it is accessible to
|
||||
these developers; anybody with the requisite skills can improve Linux and
|
||||
influence the direction of its development. Proprietary products cannot
|
||||
offer this kind of openness, which is a characteristic of the free software
|
||||
process. But, if anything, the kernel is even more open than most other
|
||||
free software projects. A typical three-month kernel development cycle can
|
||||
involve over 1000 developers working for more than 100 different companies
|
||||
(or for no company at all).
|
||||
|
||||
Working with the kernel development community is not especially hard. But,
|
||||
that notwithstanding, many potential contributors have experienced
|
||||
difficulties when trying to do kernel work. The kernel community has
|
||||
evolved its own distinct ways of operating which allow it to function
|
||||
smoothly (and produce a high-quality product) in an environment where
|
||||
thousands of lines of code are being changed every day. So it is not
|
||||
surprising that Linux kernel development process differs greatly from
|
||||
proprietary development methods.
|
||||
|
||||
The kernel's development process may come across as strange and
|
||||
intimidating to new developers, but there are good reasons and solid
|
||||
experience behind it. A developer who does not understand the kernel
|
||||
community's ways (or, worse, who tries to flout or circumvent them) will
|
||||
have a frustrating experience in store. The development community, while
|
||||
being helpful to those who are trying to learn, has little time for those
|
||||
who will not listen or who do not care about the development process.
|
||||
|
||||
It is hoped that those who read this document will be able to avoid that
|
||||
frustrating experience. There is a lot of material here, but the effort
|
||||
involved in reading it will be repaid in short order. The development
|
||||
community is always in need of developers who will help to make the kernel
|
||||
better; the following text should help you - or those who work for you -
|
||||
join our community.
|
||||
|
||||
|
||||
1.3: CREDITS
|
||||
|
||||
This document was written by Jonathan Corbet, corbet@lwn.net. It has been
|
||||
improved by comments from Johannes Berg, James Berry, Alex Chiang, Roland
|
||||
Dreier, Randy Dunlap, Jake Edge, Jiri Kosina, Matt Mackall, Arthur Marsh,
|
||||
Amanda McPherson, Andrew Morton, Andrew Price, Tsugikazu Shibata, and
|
||||
Jochen Voß.
|
||||
|
||||
This work was supported by the Linux Foundation; thanks especially to
|
||||
Amanda McPherson, who saw the value of this effort and made it all happen.
|
||||
|
||||
|
||||
1.4: THE IMPORTANCE OF GETTING CODE INTO THE MAINLINE
|
||||
|
||||
Some companies and developers occasionally wonder why they should bother
|
||||
learning how to work with the kernel community and get their code into the
|
||||
mainline kernel (the "mainline" being the kernel maintained by Linus
|
||||
Torvalds and used as a base by Linux distributors). In the short term,
|
||||
contributing code can look like an avoidable expense; it seems easier to
|
||||
just keep the code separate and support users directly. The truth of the
|
||||
matter is that keeping code separate ("out of tree") is a false economy.
|
||||
|
||||
As a way of illustrating the costs of out-of-tree code, here are a few
|
||||
relevant aspects of the kernel development process; most of these will be
|
||||
discussed in greater detail later in this document. Consider:
|
||||
|
||||
- Code which has been merged into the mainline kernel is available to all
|
||||
Linux users. It will automatically be present on all distributions which
|
||||
enable it. There is no need for driver disks, downloads, or the hassles
|
||||
of supporting multiple versions of multiple distributions; it all just
|
||||
works, for the developer and for the user. Incorporation into the
|
||||
mainline solves a large number of distribution and support problems.
|
||||
|
||||
- While kernel developers strive to maintain a stable interface to user
|
||||
space, the internal kernel API is in constant flux. The lack of a stable
|
||||
internal interface is a deliberate design decision; it allows fundamental
|
||||
improvements to be made at any time and results in higher-quality code.
|
||||
But one result of that policy is that any out-of-tree code requires
|
||||
constant upkeep if it is to work with new kernels. Maintaining
|
||||
out-of-tree code requires significant amounts of work just to keep that
|
||||
code working.
|
||||
|
||||
Code which is in the mainline, instead, does not require this work as the
|
||||
result of a simple rule requiring any developer who makes an API change
|
||||
to also fix any code that breaks as the result of that change. So code
|
||||
which has been merged into the mainline has significantly lower
|
||||
maintenance costs.
|
||||
|
||||
- Beyond that, code which is in the kernel will often be improved by other
|
||||
developers. Surprising results can come from empowering your user
|
||||
community and customers to improve your product.
|
||||
|
||||
- Kernel code is subjected to review, both before and after merging into
|
||||
the mainline. No matter how strong the original developer's skills are,
|
||||
this review process invariably finds ways in which the code can be
|
||||
improved. Often review finds severe bugs and security problems. This is
|
||||
especially true for code which has been developed in a closed
|
||||
environment; such code benefits strongly from review by outside
|
||||
developers. Out-of-tree code is lower-quality code.
|
||||
|
||||
- Participation in the development process is your way to influence the
|
||||
direction of kernel development. Users who complain from the sidelines
|
||||
are heard, but active developers have a stronger voice - and the ability
|
||||
to implement changes which make the kernel work better for their needs.
|
||||
|
||||
- When code is maintained separately, the possibility that a third party
|
||||
will contribute a different implementation of a similar feature always
|
||||
exists. Should that happen, getting your code merged will become much
|
||||
harder - to the point of impossibility. Then you will be faced with the
|
||||
unpleasant alternatives of either (1) maintaining a nonstandard feature
|
||||
out of tree indefinitely, or (2) abandoning your code and migrating your
|
||||
users over to the in-tree version.
|
||||
|
||||
- Contribution of code is the fundamental action which makes the whole
|
||||
process work. By contributing your code you can add new functionality to
|
||||
the kernel and provide capabilities and examples which are of use to
|
||||
other kernel developers. If you have developed code for Linux (or are
|
||||
thinking about doing so), you clearly have an interest in the continued
|
||||
success of this platform; contributing code is one of the best ways to
|
||||
help ensure that success.
|
||||
|
||||
All of the reasoning above applies to any out-of-tree kernel code,
|
||||
including code which is distributed in proprietary, binary-only form.
|
||||
There are, however, additional factors which should be taken into account
|
||||
before considering any sort of binary-only kernel code distribution. These
|
||||
include:
|
||||
|
||||
- The legal issues around the distribution of proprietary kernel modules
|
||||
are cloudy at best; quite a few kernel copyright holders believe that
|
||||
most binary-only modules are derived products of the kernel and that, as
|
||||
a result, their distribution is a violation of the GNU General Public
|
||||
license (about which more will be said below). Your author is not a
|
||||
lawyer, and nothing in this document can possibly be considered to be
|
||||
legal advice. The true legal status of closed-source modules can only be
|
||||
determined by the courts. But the uncertainty which haunts those modules
|
||||
is there regardless.
|
||||
|
||||
- Binary modules greatly increase the difficulty of debugging kernel
|
||||
problems, to the point that most kernel developers will not even try. So
|
||||
the distribution of binary-only modules will make it harder for your
|
||||
users to get support from the community.
|
||||
|
||||
- Support is also harder for distributors of binary-only modules, who must
|
||||
provide a version of the module for every distribution and every kernel
|
||||
version they wish to support. Dozens of builds of a single module can
|
||||
be required to provide reasonably comprehensive coverage, and your users
|
||||
will have to upgrade your module separately every time they upgrade their
|
||||
kernel.
|
||||
|
||||
- Everything that was said above about code review applies doubly to
|
||||
closed-source code. Since this code is not available at all, it cannot
|
||||
have been reviewed by the community and will, beyond doubt, have serious
|
||||
problems.
|
||||
|
||||
Makers of embedded systems, in particular, may be tempted to disregard much
|
||||
of what has been said in this section in the belief that they are shipping
|
||||
a self-contained product which uses a frozen kernel version and requires no
|
||||
more development after its release. This argument misses the value of
|
||||
widespread code review and the value of allowing your users to add
|
||||
capabilities to your product. But these products, too, have a limited
|
||||
commercial life, after which a new version must be released. At that
|
||||
point, vendors whose code is in the mainline and well maintained will be
|
||||
much better positioned to get the new product ready for market quickly.
|
||||
|
||||
|
||||
1.5: LICENSING
|
||||
|
||||
Code is contributed to the Linux kernel under a number of licenses, but all
|
||||
code must be compatible with version 2 of the GNU General Public License
|
||||
(GPLv2), which is the license covering the kernel distribution as a whole.
|
||||
In practice, that means that all code contributions are covered either by
|
||||
GPLv2 (with, optionally, language allowing distribution under later
|
||||
versions of the GPL) or the three-clause BSD license. Any contributions
|
||||
which are not covered by a compatible license will not be accepted into the
|
||||
kernel.
|
||||
|
||||
Copyright assignments are not required (or requested) for code contributed
|
||||
to the kernel. All code merged into the mainline kernel retains its
|
||||
original ownership; as a result, the kernel now has thousands of owners.
|
||||
|
||||
One implication of this ownership structure is that any attempt to change
|
||||
the licensing of the kernel is doomed to almost certain failure. There are
|
||||
few practical scenarios where the agreement of all copyright holders could
|
||||
be obtained (or their code removed from the kernel). So, in particular,
|
||||
there is no prospect of a migration to version 3 of the GPL in the
|
||||
foreseeable future.
|
||||
|
||||
It is imperative that all code contributed to the kernel be legitimately
|
||||
free software. For that reason, code from anonymous (or pseudonymous)
|
||||
contributors will not be accepted. All contributors are required to "sign
|
||||
off" on their code, stating that the code can be distributed with the
|
||||
kernel under the GPL. Code which has not been licensed as free software by
|
||||
its owner, or which risks creating copyright-related problems for the
|
||||
kernel (such as code which derives from reverse-engineering efforts lacking
|
||||
proper safeguards) cannot be contributed.
|
||||
|
||||
Questions about copyright-related issues are common on Linux development
|
||||
mailing lists. Such questions will normally receive no shortage of
|
||||
answers, but one should bear in mind that the people answering those
|
||||
questions are not lawyers and cannot provide legal advice. If you have
|
||||
legal questions relating to Linux source code, there is no substitute for
|
||||
talking with a lawyer who understands this field. Relying on answers
|
||||
obtained on technical mailing lists is a risky affair.
|
459
Documentation/development-process/2.Process
Normal file
459
Documentation/development-process/2.Process
Normal file
|
@ -0,0 +1,459 @@
|
|||
2: HOW THE DEVELOPMENT PROCESS WORKS
|
||||
|
||||
Linux kernel development in the early 1990's was a pretty loose affair,
|
||||
with relatively small numbers of users and developers involved. With a
|
||||
user base in the millions and with some 2,000 developers involved over the
|
||||
course of one year, the kernel has since had to evolve a number of
|
||||
processes to keep development happening smoothly. A solid understanding of
|
||||
how the process works is required in order to be an effective part of it.
|
||||
|
||||
|
||||
2.1: THE BIG PICTURE
|
||||
|
||||
The kernel developers use a loosely time-based release process, with a new
|
||||
major kernel release happening every two or three months. The recent
|
||||
release history looks like this:
|
||||
|
||||
2.6.26 July 13, 2008
|
||||
2.6.25 April 16, 2008
|
||||
2.6.24 January 24, 2008
|
||||
2.6.23 October 9, 2007
|
||||
2.6.22 July 8, 2007
|
||||
2.6.21 April 25, 2007
|
||||
2.6.20 February 4, 2007
|
||||
|
||||
Every 2.6.x release is a major kernel release with new features, internal
|
||||
API changes, and more. A typical 2.6 release can contain over 10,000
|
||||
changesets with changes to several hundred thousand lines of code. 2.6 is
|
||||
thus the leading edge of Linux kernel development; the kernel uses a
|
||||
rolling development model which is continually integrating major changes.
|
||||
|
||||
A relatively straightforward discipline is followed with regard to the
|
||||
merging of patches for each release. At the beginning of each development
|
||||
cycle, the "merge window" is said to be open. At that time, code which is
|
||||
deemed to be sufficiently stable (and which is accepted by the development
|
||||
community) is merged into the mainline kernel. The bulk of changes for a
|
||||
new development cycle (and all of the major changes) will be merged during
|
||||
this time, at a rate approaching 1,000 changes ("patches," or "changesets")
|
||||
per day.
|
||||
|
||||
(As an aside, it is worth noting that the changes integrated during the
|
||||
merge window do not come out of thin air; they have been collected, tested,
|
||||
and staged ahead of time. How that process works will be described in
|
||||
detail later on).
|
||||
|
||||
The merge window lasts for two weeks. At the end of this time, Linus
|
||||
Torvalds will declare that the window is closed and release the first of
|
||||
the "rc" kernels. For the kernel which is destined to be 2.6.26, for
|
||||
example, the release which happens at the end of the merge window will be
|
||||
called 2.6.26-rc1. The -rc1 release is the signal that the time to merge
|
||||
new features has passed, and that the time to stabilize the next kernel has
|
||||
begun.
|
||||
|
||||
Over the next six to ten weeks, only patches which fix problems should be
|
||||
submitted to the mainline. On occasion a more significant change will be
|
||||
allowed, but such occasions are rare; developers who try to merge new
|
||||
features outside of the merge window tend to get an unfriendly reception.
|
||||
As a general rule, if you miss the merge window for a given feature, the
|
||||
best thing to do is to wait for the next development cycle. (An occasional
|
||||
exception is made for drivers for previously-unsupported hardware; if they
|
||||
touch no in-tree code, they cannot cause regressions and should be safe to
|
||||
add at any time).
|
||||
|
||||
As fixes make their way into the mainline, the patch rate will slow over
|
||||
time. Linus releases new -rc kernels about once a week; a normal series
|
||||
will get up to somewhere between -rc6 and -rc9 before the kernel is
|
||||
considered to be sufficiently stable and the final 2.6.x release is made.
|
||||
At that point the whole process starts over again.
|
||||
|
||||
As an example, here is how the 2.6.25 development cycle went (all dates in
|
||||
2008):
|
||||
|
||||
January 24 2.6.24 stable release
|
||||
February 10 2.6.25-rc1, merge window closes
|
||||
February 15 2.6.25-rc2
|
||||
February 24 2.6.25-rc3
|
||||
March 4 2.6.25-rc4
|
||||
March 9 2.6.25-rc5
|
||||
March 16 2.6.25-rc6
|
||||
March 25 2.6.25-rc7
|
||||
April 1 2.6.25-rc8
|
||||
April 11 2.6.25-rc9
|
||||
April 16 2.6.25 stable release
|
||||
|
||||
How do the developers decide when to close the development cycle and create
|
||||
the stable release? The most significant metric used is the list of
|
||||
regressions from previous releases. No bugs are welcome, but those which
|
||||
break systems which worked in the past are considered to be especially
|
||||
serious. For this reason, patches which cause regressions are looked upon
|
||||
unfavorably and are quite likely to be reverted during the stabilization
|
||||
period.
|
||||
|
||||
The developers' goal is to fix all known regressions before the stable
|
||||
release is made. In the real world, this kind of perfection is hard to
|
||||
achieve; there are just too many variables in a project of this size.
|
||||
There comes a point where delaying the final release just makes the problem
|
||||
worse; the pile of changes waiting for the next merge window will grow
|
||||
larger, creating even more regressions the next time around. So most 2.6.x
|
||||
kernels go out with a handful of known regressions though, hopefully, none
|
||||
of them are serious.
|
||||
|
||||
Once a stable release is made, its ongoing maintenance is passed off to the
|
||||
"stable team," currently comprised of Greg Kroah-Hartman and Chris Wright.
|
||||
The stable team will release occasional updates to the stable release using
|
||||
the 2.6.x.y numbering scheme. To be considered for an update release, a
|
||||
patch must (1) fix a significant bug, and (2) already be merged into the
|
||||
mainline for the next development kernel. Continuing our 2.6.25 example,
|
||||
the history (as of this writing) is:
|
||||
|
||||
May 1 2.6.25.1
|
||||
May 6 2.6.25.2
|
||||
May 9 2.6.25.3
|
||||
May 15 2.6.25.4
|
||||
June 7 2.6.25.5
|
||||
June 9 2.6.25.6
|
||||
June 16 2.6.25.7
|
||||
June 21 2.6.25.8
|
||||
June 24 2.6.25.9
|
||||
|
||||
Stable updates for a given kernel are made for approximately six months;
|
||||
after that, the maintenance of stable releases is solely the responsibility
|
||||
of the distributors which have shipped that particular kernel.
|
||||
|
||||
|
||||
2.2: THE LIFECYCLE OF A PATCH
|
||||
|
||||
Patches do not go directly from the developer's keyboard into the mainline
|
||||
kernel. There is, instead, a somewhat involved (if somewhat informal)
|
||||
process designed to ensure that each patch is reviewed for quality and that
|
||||
each patch implements a change which is desirable to have in the mainline.
|
||||
This process can happen quickly for minor fixes, or, in the case of large
|
||||
and controversial changes, go on for years. Much developer frustration
|
||||
comes from a lack of understanding of this process or from attempts to
|
||||
circumvent it.
|
||||
|
||||
In the hopes of reducing that frustration, this document will describe how
|
||||
a patch gets into the kernel. What follows below is an introduction which
|
||||
describes the process in a somewhat idealized way. A much more detailed
|
||||
treatment will come in later sections.
|
||||
|
||||
The stages that a patch goes through are, generally:
|
||||
|
||||
- Design. This is where the real requirements for the patch - and the way
|
||||
those requirements will be met - are laid out. Design work is often
|
||||
done without involving the community, but it is better to do this work
|
||||
in the open if at all possible; it can save a lot of time redesigning
|
||||
things later.
|
||||
|
||||
- Early review. Patches are posted to the relevant mailing list, and
|
||||
developers on that list reply with any comments they may have. This
|
||||
process should turn up any major problems with a patch if all goes
|
||||
well.
|
||||
|
||||
- Wider review. When the patch is getting close to ready for mainline
|
||||
inclusion, it will be accepted by a relevant subsystem maintainer -
|
||||
though this acceptance is not a guarantee that the patch will make it
|
||||
all the way to the mainline. The patch will show up in the maintainer's
|
||||
subsystem tree and into the staging trees (described below). When the
|
||||
process works, this step leads to more extensive review of the patch and
|
||||
the discovery of any problems resulting from the integration of this
|
||||
patch with work being done by others.
|
||||
|
||||
- Merging into the mainline. Eventually, a successful patch will be
|
||||
merged into the mainline repository managed by Linus Torvalds. More
|
||||
comments and/or problems may surface at this time; it is important that
|
||||
the developer be responsive to these and fix any issues which arise.
|
||||
|
||||
- Stable release. The number of users potentially affected by the patch
|
||||
is now large, so, once again, new problems may arise.
|
||||
|
||||
- Long-term maintenance. While it is certainly possible for a developer
|
||||
to forget about code after merging it, that sort of behavior tends to
|
||||
leave a poor impression in the development community. Merging code
|
||||
eliminates some of the maintenance burden, in that others will fix
|
||||
problems caused by API changes. But the original developer should
|
||||
continue to take responsibility for the code if it is to remain useful
|
||||
in the longer term.
|
||||
|
||||
One of the largest mistakes made by kernel developers (or their employers)
|
||||
is to try to cut the process down to a single "merging into the mainline"
|
||||
step. This approach invariably leads to frustration for everybody
|
||||
involved.
|
||||
|
||||
|
||||
2.3: HOW PATCHES GET INTO THE KERNEL
|
||||
|
||||
There is exactly one person who can merge patches into the mainline kernel
|
||||
repository: Linus Torvalds. But, of the over 12,000 patches which went
|
||||
into the 2.6.25 kernel, only 250 (around 2%) were directly chosen by Linus
|
||||
himself. The kernel project has long since grown to a size where no single
|
||||
developer could possibly inspect and select every patch unassisted. The
|
||||
way the kernel developers have addressed this growth is through the use of
|
||||
a lieutenant system built around a chain of trust.
|
||||
|
||||
The kernel code base is logically broken down into a set of subsystems:
|
||||
networking, specific architecture support, memory management, video
|
||||
devices, etc. Most subsystems have a designated maintainer, a developer
|
||||
who has overall responsibility for the code within that subsystem. These
|
||||
subsystem maintainers are the gatekeepers (in a loose way) for the portion
|
||||
of the kernel they manage; they are the ones who will (usually) accept a
|
||||
patch for inclusion into the mainline kernel.
|
||||
|
||||
Subsystem maintainers each manage their own version of the kernel source
|
||||
tree, usually (but certainly not always) using the git source management
|
||||
tool. Tools like git (and related tools like quilt or mercurial) allow
|
||||
maintainers to track a list of patches, including authorship information
|
||||
and other metadata. At any given time, the maintainer can identify which
|
||||
patches in his or her repository are not found in the mainline.
|
||||
|
||||
When the merge window opens, top-level maintainers will ask Linus to "pull"
|
||||
the patches they have selected for merging from their repositories. If
|
||||
Linus agrees, the stream of patches will flow up into his repository,
|
||||
becoming part of the mainline kernel. The amount of attention that Linus
|
||||
pays to specific patches received in a pull operation varies. It is clear
|
||||
that, sometimes, he looks quite closely. But, as a general rule, Linus
|
||||
trusts the subsystem maintainers to not send bad patches upstream.
|
||||
|
||||
Subsystem maintainers, in turn, can pull patches from other maintainers.
|
||||
For example, the networking tree is built from patches which accumulated
|
||||
first in trees dedicated to network device drivers, wireless networking,
|
||||
etc. This chain of repositories can be arbitrarily long, though it rarely
|
||||
exceeds two or three links. Since each maintainer in the chain trusts
|
||||
those managing lower-level trees, this process is known as the "chain of
|
||||
trust."
|
||||
|
||||
Clearly, in a system like this, getting patches into the kernel depends on
|
||||
finding the right maintainer. Sending patches directly to Linus is not
|
||||
normally the right way to go.
|
||||
|
||||
|
||||
2.4: STAGING TREES
|
||||
|
||||
The chain of subsystem trees guides the flow of patches into the kernel,
|
||||
but it also raises an interesting question: what if somebody wants to look
|
||||
at all of the patches which are being prepared for the next merge window?
|
||||
Developers will be interested in what other changes are pending to see
|
||||
whether there are any conflicts to worry about; a patch which changes a
|
||||
core kernel function prototype, for example, will conflict with any other
|
||||
patches which use the older form of that function. Reviewers and testers
|
||||
want access to the changes in their integrated form before all of those
|
||||
changes land in the mainline kernel. One could pull changes from all of
|
||||
the interesting subsystem trees, but that would be a big and error-prone
|
||||
job.
|
||||
|
||||
The answer comes in the form of staging trees, where subsystem trees are
|
||||
collected for testing and review. The older of these trees, maintained by
|
||||
Andrew Morton, is called "-mm" (for memory management, which is how it got
|
||||
started). The -mm tree integrates patches from a long list of subsystem
|
||||
trees; it also has some patches aimed at helping with debugging.
|
||||
|
||||
Beyond that, -mm contains a significant collection of patches which have
|
||||
been selected by Andrew directly. These patches may have been posted on a
|
||||
mailing list, or they may apply to a part of the kernel for which there is
|
||||
no designated subsystem tree. As a result, -mm operates as a sort of
|
||||
subsystem tree of last resort; if there is no other obvious path for a
|
||||
patch into the mainline, it is likely to end up in -mm. Miscellaneous
|
||||
patches which accumulate in -mm will eventually either be forwarded on to
|
||||
an appropriate subsystem tree or be sent directly to Linus. In a typical
|
||||
development cycle, approximately 10% of the patches going into the mainline
|
||||
get there via -mm.
|
||||
|
||||
The current -mm patch can always be found from the front page of
|
||||
|
||||
http://kernel.org/
|
||||
|
||||
Those who want to see the current state of -mm can get the "-mm of the
|
||||
moment" tree, found at:
|
||||
|
||||
http://userweb.kernel.org/~akpm/mmotm/
|
||||
|
||||
Use of the MMOTM tree is likely to be a frustrating experience, though;
|
||||
there is a definite chance that it will not even compile.
|
||||
|
||||
The other staging tree, started more recently, is linux-next, maintained by
|
||||
Stephen Rothwell. The linux-next tree is, by design, a snapshot of what
|
||||
the mainline is expected to look like after the next merge window closes.
|
||||
Linux-next trees are announced on the linux-kernel and linux-next mailing
|
||||
lists when they are assembled; they can be downloaded from:
|
||||
|
||||
http://www.kernel.org/pub/linux/kernel/people/sfr/linux-next/
|
||||
|
||||
Some information about linux-next has been gathered at:
|
||||
|
||||
http://linux.f-seidel.de/linux-next/pmwiki/
|
||||
|
||||
How the linux-next tree will fit into the development process is still
|
||||
changing. As of this writing, the first full development cycle involving
|
||||
linux-next (2.6.26) is coming to an end; thus far, it has proved to be a
|
||||
valuable resource for finding and fixing integration problems before the
|
||||
beginning of the merge window. See http://lwn.net/Articles/287155/ for
|
||||
more information on how linux-next has worked to set up the 2.6.27 merge
|
||||
window.
|
||||
|
||||
Some developers have begun to suggest that linux-next should be used as the
|
||||
target for future development as well. The linux-next tree does tend to be
|
||||
far ahead of the mainline and is more representative of the tree into which
|
||||
any new work will be merged. The downside to this idea is that the
|
||||
volatility of linux-next tends to make it a difficult development target.
|
||||
See http://lwn.net/Articles/289013/ for more information on this topic, and
|
||||
stay tuned; much is still in flux where linux-next is involved.
|
||||
|
||||
|
||||
2.5: TOOLS
|
||||
|
||||
As can be seen from the above text, the kernel development process depends
|
||||
heavily on the ability to herd collections of patches in various
|
||||
directions. The whole thing would not work anywhere near as well as it
|
||||
does without suitably powerful tools. Tutorials on how to use these tools
|
||||
are well beyond the scope of this document, but there is space for a few
|
||||
pointers.
|
||||
|
||||
By far the dominant source code management system used by the kernel
|
||||
community is git. Git is one of a number of distributed version control
|
||||
systems being developed in the free software community. It is well tuned
|
||||
for kernel development, in that it performs quite well when dealing with
|
||||
large repositories and large numbers of patches. It also has a reputation
|
||||
for being difficult to learn and use, though it has gotten better over
|
||||
time. Some sort of familiarity with git is almost a requirement for kernel
|
||||
developers; even if they do not use it for their own work, they'll need git
|
||||
to keep up with what other developers (and the mainline) are doing.
|
||||
|
||||
Git is now packaged by almost all Linux distributions. There is a home
|
||||
page at
|
||||
|
||||
http://git.or.cz/
|
||||
|
||||
That page has pointers to documentation and tutorials. One should be
|
||||
aware, in particular, of the Kernel Hacker's Guide to git, which has
|
||||
information specific to kernel development:
|
||||
|
||||
http://linux.yyz.us/git-howto.html
|
||||
|
||||
Among the kernel developers who do not use git, the most popular choice is
|
||||
almost certainly Mercurial:
|
||||
|
||||
http://www.selenic.com/mercurial/
|
||||
|
||||
Mercurial shares many features with git, but it provides an interface which
|
||||
many find easier to use.
|
||||
|
||||
The other tool worth knowing about is Quilt:
|
||||
|
||||
http://savannah.nongnu.org/projects/quilt/
|
||||
|
||||
Quilt is a patch management system, rather than a source code management
|
||||
system. It does not track history over time; it is, instead, oriented
|
||||
toward tracking a specific set of changes against an evolving code base.
|
||||
Some major subsystem maintainers use quilt to manage patches intended to go
|
||||
upstream. For the management of certain kinds of trees (-mm, for example),
|
||||
quilt is the best tool for the job.
|
||||
|
||||
|
||||
2.6: MAILING LISTS
|
||||
|
||||
A great deal of Linux kernel development work is done by way of mailing
|
||||
lists. It is hard to be a fully-functioning member of the community
|
||||
without joining at least one list somewhere. But Linux mailing lists also
|
||||
represent a potential hazard to developers, who risk getting buried under a
|
||||
load of electronic mail, running afoul of the conventions used on the Linux
|
||||
lists, or both.
|
||||
|
||||
Most kernel mailing lists are run on vger.kernel.org; the master list can
|
||||
be found at:
|
||||
|
||||
http://vger.kernel.org/vger-lists.html
|
||||
|
||||
There are lists hosted elsewhere, though; a number of them are at
|
||||
lists.redhat.com.
|
||||
|
||||
The core mailing list for kernel development is, of course, linux-kernel.
|
||||
This list is an intimidating place to be; volume can reach 500 messages per
|
||||
day, the amount of noise is high, the conversation can be severely
|
||||
technical, and participants are not always concerned with showing a high
|
||||
degree of politeness. But there is no other place where the kernel
|
||||
development community comes together as a whole; developers who avoid this
|
||||
list will miss important information.
|
||||
|
||||
There are a few hints which can help with linux-kernel survival:
|
||||
|
||||
- Have the list delivered to a separate folder, rather than your main
|
||||
mailbox. One must be able to ignore the stream for sustained periods of
|
||||
time.
|
||||
|
||||
- Do not try to follow every conversation - nobody else does. It is
|
||||
important to filter on both the topic of interest (though note that
|
||||
long-running conversations can drift away from the original subject
|
||||
without changing the email subject line) and the people who are
|
||||
participating.
|
||||
|
||||
- Do not feed the trolls. If somebody is trying to stir up an angry
|
||||
response, ignore them.
|
||||
|
||||
- When responding to linux-kernel email (or that on other lists) preserve
|
||||
the Cc: header for all involved. In the absence of a strong reason (such
|
||||
as an explicit request), you should never remove recipients. Always make
|
||||
sure that the person you are responding to is in the Cc: list. This
|
||||
convention also makes it unnecessary to explicitly ask to be copied on
|
||||
replies to your postings.
|
||||
|
||||
- Search the list archives (and the net as a whole) before asking
|
||||
questions. Some developers can get impatient with people who clearly
|
||||
have not done their homework.
|
||||
|
||||
- Avoid top-posting (the practice of putting your answer above the quoted
|
||||
text you are responding to). It makes your response harder to read and
|
||||
makes a poor impression.
|
||||
|
||||
- Ask on the correct mailing list. Linux-kernel may be the general meeting
|
||||
point, but it is not the best place to find developers from all
|
||||
subsystems.
|
||||
|
||||
The last point - finding the correct mailing list - is a common place for
|
||||
beginning developers to go wrong. Somebody who asks a networking-related
|
||||
question on linux-kernel will almost certainly receive a polite suggestion
|
||||
to ask on the netdev list instead, as that is the list frequented by most
|
||||
networking developers. Other lists exist for the SCSI, video4linux, IDE,
|
||||
filesystem, etc. subsystems. The best place to look for mailing lists is
|
||||
in the MAINTAINERS file packaged with the kernel source.
|
||||
|
||||
|
||||
2.7: GETTING STARTED WITH KERNEL DEVELOPMENT
|
||||
|
||||
Questions about how to get started with the kernel development process are
|
||||
common - from both individuals and companies. Equally common are missteps
|
||||
which make the beginning of the relationship harder than it has to be.
|
||||
|
||||
Companies often look to hire well-known developers to get a development
|
||||
group started. This can, in fact, be an effective technique. But it also
|
||||
tends to be expensive and does not do much to grow the pool of experienced
|
||||
kernel developers. It is possible to bring in-house developers up to speed
|
||||
on Linux kernel development, given the investment of a bit of time. Taking
|
||||
this time can endow an employer with a group of developers who understand
|
||||
the kernel and the company both, and who can help to train others as well.
|
||||
Over the medium term, this is often the more profitable approach.
|
||||
|
||||
Individual developers are often, understandably, at a loss for a place to
|
||||
start. Beginning with a large project can be intimidating; one often wants
|
||||
to test the waters with something smaller first. This is the point where
|
||||
some developers jump into the creation of patches fixing spelling errors or
|
||||
minor coding style issues. Unfortunately, such patches create a level of
|
||||
noise which is distracting for the development community as a whole, so,
|
||||
increasingly, they are looked down upon. New developers wishing to
|
||||
introduce themselves to the community will not get the sort of reception
|
||||
they wish for by these means.
|
||||
|
||||
Andrew Morton gives this advice for aspiring kernel developers
|
||||
|
||||
The #1 project for all kernel beginners should surely be "make sure
|
||||
that the kernel runs perfectly at all times on all machines which
|
||||
you can lay your hands on". Usually the way to do this is to work
|
||||
with others on getting things fixed up (this can require
|
||||
persistence!) but that's fine - it's a part of kernel development.
|
||||
|
||||
(http://lwn.net/Articles/283982/).
|
||||
|
||||
In the absence of obvious problems to fix, developers are advised to look
|
||||
at the current lists of regressions and open bugs in general. There is
|
||||
never any shortage of issues in need of fixing; by addressing these issues,
|
||||
developers will gain experience with the process while, at the same time,
|
||||
building respect with the rest of the development community.
|
195
Documentation/development-process/3.Early-stage
Normal file
195
Documentation/development-process/3.Early-stage
Normal file
|
@ -0,0 +1,195 @@
|
|||
3: EARLY-STAGE PLANNING
|
||||
|
||||
When contemplating a Linux kernel development project, it can be tempting
|
||||
to jump right in and start coding. As with any significant project,
|
||||
though, much of the groundwork for success is best laid before the first
|
||||
line of code is written. Some time spent in early planning and
|
||||
communication can save far more time later on.
|
||||
|
||||
|
||||
3.1: SPECIFYING THE PROBLEM
|
||||
|
||||
Like any engineering project, a successful kernel enhancement starts with a
|
||||
clear description of the problem to be solved. In some cases, this step is
|
||||
easy: when a driver is needed for a specific piece of hardware, for
|
||||
example. In others, though, it is tempting to confuse the real problem
|
||||
with the proposed solution, and that can lead to difficulties.
|
||||
|
||||
Consider an example: some years ago, developers working with Linux audio
|
||||
sought a way to run applications without dropouts or other artifacts caused
|
||||
by excessive latency in the system. The solution they arrived at was a
|
||||
kernel module intended to hook into the Linux Security Module (LSM)
|
||||
framework; this module could be configured to give specific applications
|
||||
access to the realtime scheduler. This module was implemented and sent to
|
||||
the linux-kernel mailing list, where it immediately ran into problems.
|
||||
|
||||
To the audio developers, this security module was sufficient to solve their
|
||||
immediate problem. To the wider kernel community, though, it was seen as a
|
||||
misuse of the LSM framework (which is not intended to confer privileges
|
||||
onto processes which they would not otherwise have) and a risk to system
|
||||
stability. Their preferred solutions involved realtime scheduling access
|
||||
via the rlimit mechanism for the short term, and ongoing latency reduction
|
||||
work in the long term.
|
||||
|
||||
The audio community, however, could not see past the particular solution
|
||||
they had implemented; they were unwilling to accept alternatives. The
|
||||
resulting disagreement left those developers feeling disillusioned with the
|
||||
entire kernel development process; one of them went back to an audio list
|
||||
and posted this:
|
||||
|
||||
There are a number of very good Linux kernel developers, but they
|
||||
tend to get outshouted by a large crowd of arrogant fools. Trying
|
||||
to communicate user requirements to these people is a waste of
|
||||
time. They are much too "intelligent" to listen to lesser mortals.
|
||||
|
||||
(http://lwn.net/Articles/131776/).
|
||||
|
||||
The reality of the situation was different; the kernel developers were far
|
||||
more concerned about system stability, long-term maintenance, and finding
|
||||
the right solution to the problem than they were with a specific module.
|
||||
The moral of the story is to focus on the problem - not a specific solution
|
||||
- and to discuss it with the development community before investing in the
|
||||
creation of a body of code.
|
||||
|
||||
So, when contemplating a kernel development project, one should obtain
|
||||
answers to a short set of questions:
|
||||
|
||||
- What, exactly, is the problem which needs to be solved?
|
||||
|
||||
- Who are the users affected by this problem? Which use cases should the
|
||||
solution address?
|
||||
|
||||
- How does the kernel fall short in addressing that problem now?
|
||||
|
||||
Only then does it make sense to start considering possible solutions.
|
||||
|
||||
|
||||
3.2: EARLY DISCUSSION
|
||||
|
||||
When planning a kernel development project, it makes great sense to hold
|
||||
discussions with the community before launching into implementation. Early
|
||||
communication can save time and trouble in a number of ways:
|
||||
|
||||
- It may well be that the problem is addressed by the kernel in ways which
|
||||
you have not understood. The Linux kernel is large and has a number of
|
||||
features and capabilities which are not immediately obvious. Not all
|
||||
kernel capabilities are documented as well as one might like, and it is
|
||||
easy to miss things. Your author has seen the posting of a complete
|
||||
driver which duplicated an existing driver that the new author had been
|
||||
unaware of. Code which reinvents existing wheels is not only wasteful;
|
||||
it will also not be accepted into the mainline kernel.
|
||||
|
||||
- There may be elements of the proposed solution which will not be
|
||||
acceptable for mainline merging. It is better to find out about
|
||||
problems like this before writing the code.
|
||||
|
||||
- It's entirely possible that other developers have thought about the
|
||||
problem; they may have ideas for a better solution, and may be willing
|
||||
to help in the creation of that solution.
|
||||
|
||||
Years of experience with the kernel development community have taught a
|
||||
clear lesson: kernel code which is designed and developed behind closed
|
||||
doors invariably has problems which are only revealed when the code is
|
||||
released into the community. Sometimes these problems are severe,
|
||||
requiring months or years of effort before the code can be brought up to
|
||||
the kernel community's standards. Some examples include:
|
||||
|
||||
- The Devicescape network stack was designed and implemented for
|
||||
single-processor systems. It could not be merged into the mainline
|
||||
until it was made suitable for multiprocessor systems. Retrofitting
|
||||
locking and such into code is a difficult task; as a result, the merging
|
||||
of this code (now called mac80211) was delayed for over a year.
|
||||
|
||||
- The Reiser4 filesystem included a number of capabilities which, in the
|
||||
core kernel developers' opinion, should have been implemented in the
|
||||
virtual filesystem layer instead. It also included features which could
|
||||
not easily be implemented without exposing the system to user-caused
|
||||
deadlocks. The late revelation of these problems - and refusal to
|
||||
address some of them - has caused Reiser4 to stay out of the mainline
|
||||
kernel.
|
||||
|
||||
- The AppArmor security module made use of internal virtual filesystem
|
||||
data structures in ways which were considered to be unsafe and
|
||||
unreliable. This code has since been significantly reworked, but
|
||||
remains outside of the mainline.
|
||||
|
||||
In each of these cases, a great deal of pain and extra work could have been
|
||||
avoided with some early discussion with the kernel developers.
|
||||
|
||||
|
||||
3.3: WHO DO YOU TALK TO?
|
||||
|
||||
When developers decide to take their plans public, the next question will
|
||||
be: where do we start? The answer is to find the right mailing list(s) and
|
||||
the right maintainer. For mailing lists, the best approach is to look in
|
||||
the MAINTAINERS file for a relevant place to post. If there is a suitable
|
||||
subsystem list, posting there is often preferable to posting on
|
||||
linux-kernel; you are more likely to reach developers with expertise in the
|
||||
relevant subsystem and the environment may be more supportive.
|
||||
|
||||
Finding maintainers can be a bit harder. Again, the MAINTAINERS file is
|
||||
the place to start. That file tends to not always be up to date, though,
|
||||
and not all subsystems are represented there. The person listed in the
|
||||
MAINTAINERS file may, in fact, not be the person who is actually acting in
|
||||
that role currently. So, when there is doubt about who to contact, a
|
||||
useful trick is to use git (and "git log" in particular) to see who is
|
||||
currently active within the subsystem of interest. Look at who is writing
|
||||
patches, and who, if anybody, is attaching Signed-off-by lines to those
|
||||
patches. Those are the people who will be best placed to help with a new
|
||||
development project.
|
||||
|
||||
If all else fails, talking to Andrew Morton can be an effective way to
|
||||
track down a maintainer for a specific piece of code.
|
||||
|
||||
|
||||
3.4: WHEN TO POST?
|
||||
|
||||
If possible, posting your plans during the early stages can only be
|
||||
helpful. Describe the problem being solved and any plans that have been
|
||||
made on how the implementation will be done. Any information you can
|
||||
provide can help the development community provide useful input on the
|
||||
project.
|
||||
|
||||
One discouraging thing which can happen at this stage is not a hostile
|
||||
reaction, but, instead, little or no reaction at all. The sad truth of the
|
||||
matter is (1) kernel developers tend to be busy, (2) there is no shortage
|
||||
of people with grand plans and little code (or even prospect of code) to
|
||||
back them up, and (3) nobody is obligated to review or comment on ideas
|
||||
posted by others. If a request-for-comments posting yields little in the
|
||||
way of comments, do not assume that it means there is no interest in the
|
||||
project. Unfortunately, you also cannot assume that there are no problems
|
||||
with your idea. The best thing to do in this situation is to proceed,
|
||||
keeping the community informed as you go.
|
||||
|
||||
|
||||
3.5: GETTING OFFICIAL BUY-IN
|
||||
|
||||
If your work is being done in a corporate environment - as most Linux
|
||||
kernel work is - you must, obviously, have permission from suitably
|
||||
empowered managers before you can post your company's plans or code to a
|
||||
public mailing list. The posting of code which has not been cleared for
|
||||
release under a GPL-compatible license can be especially problematic; the
|
||||
sooner that a company's management and legal staff can agree on the posting
|
||||
of a kernel development project, the better off everybody involved will be.
|
||||
|
||||
Some readers may be thinking at this point that their kernel work is
|
||||
intended to support a product which does not yet have an officially
|
||||
acknowledged existence. Revealing their employer's plans on a public
|
||||
mailing list may not be a viable option. In cases like this, it is worth
|
||||
considering whether the secrecy is really necessary; there is often no real
|
||||
need to keep development plans behind closed doors.
|
||||
|
||||
That said, there are also cases where a company legitimately cannot
|
||||
disclose its plans early in the development process. Companies with
|
||||
experienced kernel developers may choose to proceed in an open-loop manner
|
||||
on the assumption that they will be able to avoid serious integration
|
||||
problems later. For companies without that sort of in-house expertise, the
|
||||
best option is often to hire an outside developer to review the plans under
|
||||
a non-disclosure agreement. The Linux Foundation operates an NDA program
|
||||
designed to help with this sort of situation; more information can be found
|
||||
at:
|
||||
|
||||
http://www.linuxfoundation.org/en/NDA_program
|
||||
|
||||
This kind of review is often enough to avoid serious problems later on
|
||||
without requiring public disclosure of the project.
|
384
Documentation/development-process/4.Coding
Normal file
384
Documentation/development-process/4.Coding
Normal file
|
@ -0,0 +1,384 @@
|
|||
4: GETTING THE CODE RIGHT
|
||||
|
||||
While there is much to be said for a solid and community-oriented design
|
||||
process, the proof of any kernel development project is in the resulting
|
||||
code. It is the code which will be examined by other developers and merged
|
||||
(or not) into the mainline tree. So it is the quality of this code which
|
||||
will determine the ultimate success of the project.
|
||||
|
||||
This section will examine the coding process. We'll start with a look at a
|
||||
number of ways in which kernel developers can go wrong. Then the focus
|
||||
will shift toward doing things right and the tools which can help in that
|
||||
quest.
|
||||
|
||||
|
||||
4.1: PITFALLS
|
||||
|
||||
* Coding style
|
||||
|
||||
The kernel has long had a standard coding style, described in
|
||||
Documentation/CodingStyle. For much of that time, the policies described
|
||||
in that file were taken as being, at most, advisory. As a result, there is
|
||||
a substantial amount of code in the kernel which does not meet the coding
|
||||
style guidelines. The presence of that code leads to two independent
|
||||
hazards for kernel developers.
|
||||
|
||||
The first of these is to believe that the kernel coding standards do not
|
||||
matter and are not enforced. The truth of the matter is that adding new
|
||||
code to the kernel is very difficult if that code is not coded according to
|
||||
the standard; many developers will request that the code be reformatted
|
||||
before they will even review it. A code base as large as the kernel
|
||||
requires some uniformity of code to make it possible for developers to
|
||||
quickly understand any part of it. So there is no longer room for
|
||||
strangely-formatted code.
|
||||
|
||||
Occasionally, the kernel's coding style will run into conflict with an
|
||||
employer's mandated style. In such cases, the kernel's style will have to
|
||||
win before the code can be merged. Putting code into the kernel means
|
||||
giving up a degree of control in a number of ways - including control over
|
||||
how the code is formatted.
|
||||
|
||||
The other trap is to assume that code which is already in the kernel is
|
||||
urgently in need of coding style fixes. Developers may start to generate
|
||||
reformatting patches as a way of gaining familiarity with the process, or
|
||||
as a way of getting their name into the kernel changelogs - or both. But
|
||||
pure coding style fixes are seen as noise by the development community;
|
||||
they tend to get a chilly reception. So this type of patch is best
|
||||
avoided. It is natural to fix the style of a piece of code while working
|
||||
on it for other reasons, but coding style changes should not be made for
|
||||
their own sake.
|
||||
|
||||
The coding style document also should not be read as an absolute law which
|
||||
can never be transgressed. If there is a good reason to go against the
|
||||
style (a line which becomes far less readable if split to fit within the
|
||||
80-column limit, for example), just do it.
|
||||
|
||||
|
||||
* Abstraction layers
|
||||
|
||||
Computer Science professors teach students to make extensive use of
|
||||
abstraction layers in the name of flexibility and information hiding.
|
||||
Certainly the kernel makes extensive use of abstraction; no project
|
||||
involving several million lines of code could do otherwise and survive.
|
||||
But experience has shown that excessive or premature abstraction can be
|
||||
just as harmful as premature optimization. Abstraction should be used to
|
||||
the level required and no further.
|
||||
|
||||
At a simple level, consider a function which has an argument which is
|
||||
always passed as zero by all callers. One could retain that argument just
|
||||
in case somebody eventually needs to use the extra flexibility that it
|
||||
provides. By that time, though, chances are good that the code which
|
||||
implements this extra argument has been broken in some subtle way which was
|
||||
never noticed - because it has never been used. Or, when the need for
|
||||
extra flexibility arises, it does not do so in a way which matches the
|
||||
programmer's early expectation. Kernel developers will routinely submit
|
||||
patches to remove unused arguments; they should, in general, not be added
|
||||
in the first place.
|
||||
|
||||
Abstraction layers which hide access to hardware - often to allow the bulk
|
||||
of a driver to be used with multiple operating systems - are especially
|
||||
frowned upon. Such layers obscure the code and may impose a performance
|
||||
penalty; they do not belong in the Linux kernel.
|
||||
|
||||
On the other hand, if you find yourself copying significant amounts of code
|
||||
from another kernel subsystem, it is time to ask whether it would, in fact,
|
||||
make sense to pull out some of that code into a separate library or to
|
||||
implement that functionality at a higher level. There is no value in
|
||||
replicating the same code throughout the kernel.
|
||||
|
||||
|
||||
* #ifdef and preprocessor use in general
|
||||
|
||||
The C preprocessor seems to present a powerful temptation to some C
|
||||
programmers, who see it as a way to efficiently encode a great deal of
|
||||
flexibility into a source file. But the preprocessor is not C, and heavy
|
||||
use of it results in code which is much harder for others to read and
|
||||
harder for the compiler to check for correctness. Heavy preprocessor use
|
||||
is almost always a sign of code which needs some cleanup work.
|
||||
|
||||
Conditional compilation with #ifdef is, indeed, a powerful feature, and it
|
||||
is used within the kernel. But there is little desire to see code which is
|
||||
sprinkled liberally with #ifdef blocks. As a general rule, #ifdef use
|
||||
should be confined to header files whenever possible.
|
||||
Conditionally-compiled code can be confined to functions which, if the code
|
||||
is not to be present, simply become empty. The compiler will then quietly
|
||||
optimize out the call to the empty function. The result is far cleaner
|
||||
code which is easier to follow.
|
||||
|
||||
C preprocessor macros present a number of hazards, including possible
|
||||
multiple evaluation of expressions with side effects and no type safety.
|
||||
If you are tempted to define a macro, consider creating an inline function
|
||||
instead. The code which results will be the same, but inline functions are
|
||||
easier to read, do not evaluate their arguments multiple times, and allow
|
||||
the compiler to perform type checking on the arguments and return value.
|
||||
|
||||
|
||||
* Inline functions
|
||||
|
||||
Inline functions present a hazard of their own, though. Programmers can
|
||||
become enamored of the perceived efficiency inherent in avoiding a function
|
||||
call and fill a source file with inline functions. Those functions,
|
||||
however, can actually reduce performance. Since their code is replicated
|
||||
at each call site, they end up bloating the size of the compiled kernel.
|
||||
That, in turn, creates pressure on the processor's memory caches, which can
|
||||
slow execution dramatically. Inline functions, as a rule, should be quite
|
||||
small and relatively rare. The cost of a function call, after all, is not
|
||||
that high; the creation of large numbers of inline functions is a classic
|
||||
example of premature optimization.
|
||||
|
||||
In general, kernel programmers ignore cache effects at their peril. The
|
||||
classic time/space tradeoff taught in beginning data structures classes
|
||||
often does not apply to contemporary hardware. Space *is* time, in that a
|
||||
larger program will run slower than one which is more compact.
|
||||
|
||||
|
||||
* Locking
|
||||
|
||||
In May, 2006, the "Devicescape" networking stack was, with great
|
||||
fanfare, released under the GPL and made available for inclusion in the
|
||||
mainline kernel. This donation was welcome news; support for wireless
|
||||
networking in Linux was considered substandard at best, and the Devicescape
|
||||
stack offered the promise of fixing that situation. Yet, this code did not
|
||||
actually make it into the mainline until June, 2007 (2.6.22). What
|
||||
happened?
|
||||
|
||||
This code showed a number of signs of having been developed behind
|
||||
corporate doors. But one large problem in particular was that it was not
|
||||
designed to work on multiprocessor systems. Before this networking stack
|
||||
(now called mac80211) could be merged, a locking scheme needed to be
|
||||
retrofitted onto it.
|
||||
|
||||
Once upon a time, Linux kernel code could be developed without thinking
|
||||
about the concurrency issues presented by multiprocessor systems. Now,
|
||||
however, this document is being written on a dual-core laptop. Even on
|
||||
single-processor systems, work being done to improve responsiveness will
|
||||
raise the level of concurrency within the kernel. The days when kernel
|
||||
code could be written without thinking about locking are long past.
|
||||
|
||||
Any resource (data structures, hardware registers, etc.) which could be
|
||||
accessed concurrently by more than one thread must be protected by a lock.
|
||||
New code should be written with this requirement in mind; retrofitting
|
||||
locking after the fact is a rather more difficult task. Kernel developers
|
||||
should take the time to understand the available locking primitives well
|
||||
enough to pick the right tool for the job. Code which shows a lack of
|
||||
attention to concurrency will have a difficult path into the mainline.
|
||||
|
||||
|
||||
* Regressions
|
||||
|
||||
One final hazard worth mentioning is this: it can be tempting to make a
|
||||
change (which may bring big improvements) which causes something to break
|
||||
for existing users. This kind of change is called a "regression," and
|
||||
regressions have become most unwelcome in the mainline kernel. With few
|
||||
exceptions, changes which cause regressions will be backed out if the
|
||||
regression cannot be fixed in a timely manner. Far better to avoid the
|
||||
regression in the first place.
|
||||
|
||||
It is often argued that a regression can be justified if it causes things
|
||||
to work for more people than it creates problems for. Why not make a
|
||||
change if it brings new functionality to ten systems for each one it
|
||||
breaks? The best answer to this question was expressed by Linus in July,
|
||||
2007:
|
||||
|
||||
So we don't fix bugs by introducing new problems. That way lies
|
||||
madness, and nobody ever knows if you actually make any real
|
||||
progress at all. Is it two steps forwards, one step back, or one
|
||||
step forward and two steps back?
|
||||
|
||||
(http://lwn.net/Articles/243460/).
|
||||
|
||||
An especially unwelcome type of regression is any sort of change to the
|
||||
user-space ABI. Once an interface has been exported to user space, it must
|
||||
be supported indefinitely. This fact makes the creation of user-space
|
||||
interfaces particularly challenging: since they cannot be changed in
|
||||
incompatible ways, they must be done right the first time. For this
|
||||
reason, a great deal of thought, clear documentation, and wide review for
|
||||
user-space interfaces is always required.
|
||||
|
||||
|
||||
|
||||
4.2: CODE CHECKING TOOLS
|
||||
|
||||
For now, at least, the writing of error-free code remains an ideal that few
|
||||
of us can reach. What we can hope to do, though, is to catch and fix as
|
||||
many of those errors as possible before our code goes into the mainline
|
||||
kernel. To that end, the kernel developers have put together an impressive
|
||||
array of tools which can catch a wide variety of obscure problems in an
|
||||
automated way. Any problem caught by the computer is a problem which will
|
||||
not afflict a user later on, so it stands to reason that the automated
|
||||
tools should be used whenever possible.
|
||||
|
||||
The first step is simply to heed the warnings produced by the compiler.
|
||||
Contemporary versions of gcc can detect (and warn about) a large number of
|
||||
potential errors. Quite often, these warnings point to real problems.
|
||||
Code submitted for review should, as a rule, not produce any compiler
|
||||
warnings. When silencing warnings, take care to understand the real cause
|
||||
and try to avoid "fixes" which make the warning go away without addressing
|
||||
its cause.
|
||||
|
||||
Note that not all compiler warnings are enabled by default. Build the
|
||||
kernel with "make EXTRA_CFLAGS=-W" to get the full set.
|
||||
|
||||
The kernel provides several configuration options which turn on debugging
|
||||
features; most of these are found in the "kernel hacking" submenu. Several
|
||||
of these options should be turned on for any kernel used for development or
|
||||
testing purposes. In particular, you should turn on:
|
||||
|
||||
- ENABLE_WARN_DEPRECATED, ENABLE_MUST_CHECK, and FRAME_WARN to get an
|
||||
extra set of warnings for problems like the use of deprecated interfaces
|
||||
or ignoring an important return value from a function. The output
|
||||
generated by these warnings can be verbose, but one need not worry about
|
||||
warnings from other parts of the kernel.
|
||||
|
||||
- DEBUG_OBJECTS will add code to track the lifetime of various objects
|
||||
created by the kernel and warn when things are done out of order. If
|
||||
you are adding a subsystem which creates (and exports) complex objects
|
||||
of its own, consider adding support for the object debugging
|
||||
infrastructure.
|
||||
|
||||
- DEBUG_SLAB can find a variety of memory allocation and use errors; it
|
||||
should be used on most development kernels.
|
||||
|
||||
- DEBUG_SPINLOCK, DEBUG_SPINLOCK_SLEEP, and DEBUG_MUTEXES will find a
|
||||
number of common locking errors.
|
||||
|
||||
There are quite a few other debugging options, some of which will be
|
||||
discussed below. Some of them have a significant performance impact and
|
||||
should not be used all of the time. But some time spent learning the
|
||||
available options will likely be paid back many times over in short order.
|
||||
|
||||
One of the heavier debugging tools is the locking checker, or "lockdep."
|
||||
This tool will track the acquisition and release of every lock (spinlock or
|
||||
mutex) in the system, the order in which locks are acquired relative to
|
||||
each other, the current interrupt environment, and more. It can then
|
||||
ensure that locks are always acquired in the same order, that the same
|
||||
interrupt assumptions apply in all situations, and so on. In other words,
|
||||
lockdep can find a number of scenarios in which the system could, on rare
|
||||
occasion, deadlock. This kind of problem can be painful (for both
|
||||
developers and users) in a deployed system; lockdep allows them to be found
|
||||
in an automated manner ahead of time. Code with any sort of non-trivial
|
||||
locking should be run with lockdep enabled before being submitted for
|
||||
inclusion.
|
||||
|
||||
As a diligent kernel programmer, you will, beyond doubt, check the return
|
||||
status of any operation (such as a memory allocation) which can fail. The
|
||||
fact of the matter, though, is that the resulting failure recovery paths
|
||||
are, probably, completely untested. Untested code tends to be broken code;
|
||||
you could be much more confident of your code if all those error-handling
|
||||
paths had been exercised a few times.
|
||||
|
||||
The kernel provides a fault injection framework which can do exactly that,
|
||||
especially where memory allocations are involved. With fault injection
|
||||
enabled, a configurable percentage of memory allocations will be made to
|
||||
fail; these failures can be restricted to a specific range of code.
|
||||
Running with fault injection enabled allows the programmer to see how the
|
||||
code responds when things go badly. See
|
||||
Documentation/fault-injection/fault-injection.text for more information on
|
||||
how to use this facility.
|
||||
|
||||
Other kinds of errors can be found with the "sparse" static analysis tool.
|
||||
With sparse, the programmer can be warned about confusion between
|
||||
user-space and kernel-space addresses, mixture of big-endian and
|
||||
small-endian quantities, the passing of integer values where a set of bit
|
||||
flags is expected, and so on. Sparse must be installed separately (it can
|
||||
be found at http://www.kernel.org/pub/software/devel/sparse/ if your
|
||||
distributor does not package it); it can then be run on the code by adding
|
||||
"C=1" to your make command.
|
||||
|
||||
Other kinds of portability errors are best found by compiling your code for
|
||||
other architectures. If you do not happen to have an S/390 system or a
|
||||
Blackfin development board handy, you can still perform the compilation
|
||||
step. A large set of cross compilers for x86 systems can be found at
|
||||
|
||||
http://www.kernel.org/pub/tools/crosstool/
|
||||
|
||||
Some time spent installing and using these compilers will help avoid
|
||||
embarrassment later.
|
||||
|
||||
|
||||
4.3: DOCUMENTATION
|
||||
|
||||
Documentation has often been more the exception than the rule with kernel
|
||||
development. Even so, adequate documentation will help to ease the merging
|
||||
of new code into the kernel, make life easier for other developers, and
|
||||
will be helpful for your users. In many cases, the addition of
|
||||
documentation has become essentially mandatory.
|
||||
|
||||
The first piece of documentation for any patch is its associated
|
||||
changelog. Log entries should describe the problem being solved, the form
|
||||
of the solution, the people who worked on the patch, any relevant
|
||||
effects on performance, and anything else that might be needed to
|
||||
understand the patch.
|
||||
|
||||
Any code which adds a new user-space interface - including new sysfs or
|
||||
/proc files - should include documentation of that interface which enables
|
||||
user-space developers to know what they are working with. See
|
||||
Documentation/ABI/README for a description of how this documentation should
|
||||
be formatted and what information needs to be provided.
|
||||
|
||||
The file Documentation/kernel-parameters.txt describes all of the kernel's
|
||||
boot-time parameters. Any patch which adds new parameters should add the
|
||||
appropriate entries to this file.
|
||||
|
||||
Any new configuration options must be accompanied by help text which
|
||||
clearly explains the options and when the user might want to select them.
|
||||
|
||||
Internal API information for many subsystems is documented by way of
|
||||
specially-formatted comments; these comments can be extracted and formatted
|
||||
in a number of ways by the "kernel-doc" script. If you are working within
|
||||
a subsystem which has kerneldoc comments, you should maintain them and add
|
||||
them, as appropriate, for externally-available functions. Even in areas
|
||||
which have not been so documented, there is no harm in adding kerneldoc
|
||||
comments for the future; indeed, this can be a useful activity for
|
||||
beginning kernel developers. The format of these comments, along with some
|
||||
information on how to create kerneldoc templates can be found in the file
|
||||
Documentation/kernel-doc-nano-HOWTO.txt.
|
||||
|
||||
Anybody who reads through a significant amount of existing kernel code will
|
||||
note that, often, comments are most notable by their absence. Once again,
|
||||
the expectations for new code are higher than they were in the past;
|
||||
merging uncommented code will be harder. That said, there is little desire
|
||||
for verbosely-commented code. The code should, itself, be readable, with
|
||||
comments explaining the more subtle aspects.
|
||||
|
||||
Certain things should always be commented. Uses of memory barriers should
|
||||
be accompanied by a line explaining why the barrier is necessary. The
|
||||
locking rules for data structures generally need to be explained somewhere.
|
||||
Major data structures need comprehensive documentation in general.
|
||||
Non-obvious dependencies between separate bits of code should be pointed
|
||||
out. Anything which might tempt a code janitor to make an incorrect
|
||||
"cleanup" needs a comment saying why it is done the way it is. And so on.
|
||||
|
||||
|
||||
4.4: INTERNAL API CHANGES
|
||||
|
||||
The binary interface provided by the kernel to user space cannot be broken
|
||||
except under the most severe circumstances. The kernel's internal
|
||||
programming interfaces, instead, are highly fluid and can be changed when
|
||||
the need arises. If you find yourself having to work around a kernel API,
|
||||
or simply not using a specific functionality because it does not meet your
|
||||
needs, that may be a sign that the API needs to change. As a kernel
|
||||
developer, you are empowered to make such changes.
|
||||
|
||||
There are, of course, some catches. API changes can be made, but they need
|
||||
to be well justified. So any patch making an internal API change should be
|
||||
accompanied by a description of what the change is and why it is
|
||||
necessary. This kind of change should also be broken out into a separate
|
||||
patch, rather than buried within a larger patch.
|
||||
|
||||
The other catch is that a developer who changes an internal API is
|
||||
generally charged with the task of fixing any code within the kernel tree
|
||||
which is broken by the change. For a widely-used function, this duty can
|
||||
lead to literally hundreds or thousands of changes - many of which are
|
||||
likely to conflict with work being done by other developers. Needless to
|
||||
say, this can be a large job, so it is best to be sure that the
|
||||
justification is solid.
|
||||
|
||||
When making an incompatible API change, one should, whenever possible,
|
||||
ensure that code which has not been updated is caught by the compiler.
|
||||
This will help you to be sure that you have found all in-tree uses of that
|
||||
interface. It will also alert developers of out-of-tree code that there is
|
||||
a change that they need to respond to. Supporting out-of-tree code is not
|
||||
something that kernel developers need to be worried about, but we also do
|
||||
not have to make life harder for out-of-tree developers than it it needs to
|
||||
be.
|
278
Documentation/development-process/5.Posting
Normal file
278
Documentation/development-process/5.Posting
Normal file
|
@ -0,0 +1,278 @@
|
|||
5: POSTING PATCHES
|
||||
|
||||
Sooner or later, the time comes when your work is ready to be presented to
|
||||
the community for review and, eventually, inclusion into the mainline
|
||||
kernel. Unsurprisingly, the kernel development community has evolved a set
|
||||
of conventions and procedures which are used in the posting of patches;
|
||||
following them will make life much easier for everybody involved. This
|
||||
document will attempt to cover these expectations in reasonable detail;
|
||||
more information can also be found in the files SubmittingPatches,
|
||||
SubmittingDrivers, and SubmitChecklist in the kernel documentation
|
||||
directory.
|
||||
|
||||
|
||||
5.1: WHEN TO POST
|
||||
|
||||
There is a constant temptation to avoid posting patches before they are
|
||||
completely "ready." For simple patches, that is not a problem. If the
|
||||
work being done is complex, though, there is a lot to be gained by getting
|
||||
feedback from the community before the work is complete. So you should
|
||||
consider posting in-progress work, or even making a git tree available so
|
||||
that interested developers can catch up with your work at any time.
|
||||
|
||||
When posting code which is not yet considered ready for inclusion, it is a
|
||||
good idea to say so in the posting itself. Also mention any major work
|
||||
which remains to be done and any known problems. Fewer people will look at
|
||||
patches which are known to be half-baked, but those who do will come in
|
||||
with the idea that they can help you drive the work in the right direction.
|
||||
|
||||
|
||||
5.2: BEFORE CREATING PATCHES
|
||||
|
||||
There are a number of things which should be done before you consider
|
||||
sending patches to the development community. These include:
|
||||
|
||||
- Test the code to the extent that you can. Make use of the kernel's
|
||||
debugging tools, ensure that the kernel will build with all reasonable
|
||||
combinations of configuration options, use cross-compilers to build for
|
||||
different architectures, etc.
|
||||
|
||||
- Make sure your code is compliant with the kernel coding style
|
||||
guidelines.
|
||||
|
||||
- Does your change have performance implications? If so, you should run
|
||||
benchmarks showing what the impact (or benefit) of your change is; a
|
||||
summary of the results should be included with the patch.
|
||||
|
||||
- Be sure that you have the right to post the code. If this work was done
|
||||
for an employer, the employer likely has a right to the work and must be
|
||||
agreeable with its release under the GPL.
|
||||
|
||||
As a general rule, putting in some extra thought before posting code almost
|
||||
always pays back the effort in short order.
|
||||
|
||||
|
||||
5.3: PATCH PREPARATION
|
||||
|
||||
The preparation of patches for posting can be a surprising amount of work,
|
||||
but, once again, attempting to save time here is not generally advisable
|
||||
even in the short term.
|
||||
|
||||
Patches must be prepared against a specific version of the kernel. As a
|
||||
general rule, a patch should be based on the current mainline as found in
|
||||
Linus's git tree. It may become necessary to make versions against -mm,
|
||||
linux-next, or a subsystem tree, though, to facilitate wider testing and
|
||||
review. Depending on the area of your patch and what is going on
|
||||
elsewhere, basing a patch against these other trees can require a
|
||||
significant amount of work resolving conflicts and dealing with API
|
||||
changes.
|
||||
|
||||
Only the most simple changes should be formatted as a single patch;
|
||||
everything else should be made as a logical series of changes. Splitting
|
||||
up patches is a bit of an art; some developers spend a long time figuring
|
||||
out how to do it in the way that the community expects. There are a few
|
||||
rules of thumb, however, which can help considerably:
|
||||
|
||||
- The patch series you post will almost certainly not be the series of
|
||||
changes found in your working revision control system. Instead, the
|
||||
changes you have made need to be considered in their final form, then
|
||||
split apart in ways which make sense. The developers are interested in
|
||||
discrete, self-contained changes, not the path you took to get to those
|
||||
changes.
|
||||
|
||||
- Each logically independent change should be formatted as a separate
|
||||
patch. These changes can be small ("add a field to this structure") or
|
||||
large (adding a significant new driver, for example), but they should be
|
||||
conceptually small and amenable to a one-line description. Each patch
|
||||
should make a specific change which can be reviewed on its own and
|
||||
verified to do what it says it does.
|
||||
|
||||
- As a way of restating the guideline above: do not mix different types of
|
||||
changes in the same patch. If a single patch fixes a critical security
|
||||
bug, rearranges a few structures, and reformats the code, there is a
|
||||
good chance that it will be passed over and the important fix will be
|
||||
lost.
|
||||
|
||||
- Each patch should yield a kernel which builds and runs properly; if your
|
||||
patch series is interrupted in the middle, the result should still be a
|
||||
working kernel. Partial application of a patch series is a common
|
||||
scenario when the "git bisect" tool is used to find regressions; if the
|
||||
result is a broken kernel, you will make life harder for developers and
|
||||
users who are engaging in the noble work of tracking down problems.
|
||||
|
||||
- Do not overdo it, though. One developer recently posted a set of edits
|
||||
to a single file as 500 separate patches - an act which did not make him
|
||||
the most popular person on the kernel mailing list. A single patch can
|
||||
be reasonably large as long as it still contains a single *logical*
|
||||
change.
|
||||
|
||||
- It can be tempting to add a whole new infrastructure with a series of
|
||||
patches, but to leave that infrastructure unused until the final patch
|
||||
in the series enables the whole thing. This temptation should be
|
||||
avoided if possible; if that series adds regressions, bisection will
|
||||
finger the last patch as the one which caused the problem, even though
|
||||
the real bug is elsewhere. Whenever possible, a patch which adds new
|
||||
code should make that code active immediately.
|
||||
|
||||
Working to create the perfect patch series can be a frustrating process
|
||||
which takes quite a bit of time and thought after the "real work" has been
|
||||
done. When done properly, though, it is time well spent.
|
||||
|
||||
|
||||
5.4: PATCH FORMATTING
|
||||
|
||||
So now you have a perfect series of patches for posting, but the work is
|
||||
not done quite yet. Each patch needs to be formatted into a message which
|
||||
quickly and clearly communicates its purpose to the rest of the world. To
|
||||
that end, each patch will be composed of the following:
|
||||
|
||||
- An optional "From" line naming the author of the patch. This line is
|
||||
only necessary if you are passing on somebody else's patch via email,
|
||||
but it never hurts to add it when in doubt.
|
||||
|
||||
- A one-line description of what the patch does. This message should be
|
||||
enough for a reader who sees it with no other context to figure out the
|
||||
scope of the patch; it is the line that will show up in the "short form"
|
||||
changelogs. This message is usually formatted with the relevant
|
||||
subsystem name first, followed by the purpose of the patch. For
|
||||
example:
|
||||
|
||||
gpio: fix build on CONFIG_GPIO_SYSFS=n
|
||||
|
||||
- A blank line followed by a detailed description of the contents of the
|
||||
patch. This description can be as long as is required; it should say
|
||||
what the patch does and why it should be applied to the kernel.
|
||||
|
||||
- One or more tag lines, with, at a minimum, one Signed-off-by: line from
|
||||
the author of the patch. Tags will be described in more detail below.
|
||||
|
||||
The above three items should, normally, be the text used when committing
|
||||
the change to a revision control system. They are followed by:
|
||||
|
||||
- The patch itself, in the unified ("-u") patch format. Using the "-p"
|
||||
option to diff will associate function names with changes, making the
|
||||
resulting patch easier for others to read.
|
||||
|
||||
You should avoid including changes to irrelevant files (those generated by
|
||||
the build process, for example, or editor backup files) in the patch. The
|
||||
file "dontdiff" in the Documentation directory can help in this regard;
|
||||
pass it to diff with the "-X" option.
|
||||
|
||||
The tags mentioned above are used to describe how various developers have
|
||||
been associated with the development of this patch. They are described in
|
||||
detail in the SubmittingPatches document; what follows here is a brief
|
||||
summary. Each of these lines has the format:
|
||||
|
||||
tag: Full Name <email address> optional-other-stuff
|
||||
|
||||
The tags in common use are:
|
||||
|
||||
- Signed-off-by: this is a developer's certification that he or she has
|
||||
the right to submit the patch for inclusion into the kernel. It is an
|
||||
agreement to the Developer's Certificate of Origin, the full text of
|
||||
which can be found in Documentation/SubmittingPatches. Code without a
|
||||
proper signoff cannot be merged into the mainline.
|
||||
|
||||
- Acked-by: indicates an agreement by another developer (often a
|
||||
maintainer of the relevant code) that the patch is appropriate for
|
||||
inclusion into the kernel.
|
||||
|
||||
- Tested-by: states that the named person has tested the patch and found
|
||||
it to work.
|
||||
|
||||
- Reviewed-by: the named developer has reviewed the patch for correctness;
|
||||
see the reviewer's statement in Documentation/SubmittingPatches for more
|
||||
detail.
|
||||
|
||||
- Reported-by: names a user who reported a problem which is fixed by this
|
||||
patch; this tag is used to give credit to the (often underappreciated)
|
||||
people who test our code and let us know when things do not work
|
||||
correctly.
|
||||
|
||||
- Cc: the named person received a copy of the patch and had the
|
||||
opportunity to comment on it.
|
||||
|
||||
Be careful in the addition of tags to your patches: only Cc: is appropriate
|
||||
for addition without the explicit permission of the person named.
|
||||
|
||||
|
||||
5.5: SENDING THE PATCH
|
||||
|
||||
Before you mail your patches, there are a couple of other things you should
|
||||
take care of:
|
||||
|
||||
- Are you sure that your mailer will not corrupt the patches? Patches
|
||||
which have had gratuitous white-space changes or line wrapping performed
|
||||
by the mail client will not apply at the other end, and often will not
|
||||
be examined in any detail. If there is any doubt at all, mail the patch
|
||||
to yourself and convince yourself that it shows up intact.
|
||||
|
||||
Documentation/email-clients.txt has some helpful hints on making
|
||||
specific mail clients work for sending patches.
|
||||
|
||||
- Are you sure your patch is free of silly mistakes? You should always
|
||||
run patches through scripts/checkpatch.pl and address the complaints it
|
||||
comes up with. Please bear in mind that checkpatch.pl, while being the
|
||||
embodiment of a fair amount of thought about what kernel patches should
|
||||
look like, is not smarter than you. If fixing a checkpatch.pl complaint
|
||||
would make the code worse, don't do it.
|
||||
|
||||
Patches should always be sent as plain text. Please do not send them as
|
||||
attachments; that makes it much harder for reviewers to quote sections of
|
||||
the patch in their replies. Instead, just put the patch directly into your
|
||||
message.
|
||||
|
||||
When mailing patches, it is important to send copies to anybody who might
|
||||
be interested in it. Unlike some other projects, the kernel encourages
|
||||
people to err on the side of sending too many copies; don't assume that the
|
||||
relevant people will see your posting on the mailing lists. In particular,
|
||||
copies should go to:
|
||||
|
||||
- The maintainer(s) of the affected subsystem(s). As described earlier,
|
||||
the MAINTAINERS file is the first place to look for these people.
|
||||
|
||||
- Other developers who have been working in the same area - especially
|
||||
those who might be working there now. Using git to see who else has
|
||||
modified the files you are working on can be helpful.
|
||||
|
||||
- If you are responding to a bug report or a feature request, copy the
|
||||
original poster as well.
|
||||
|
||||
- Send a copy to the relevant mailing list, or, if nothing else applies,
|
||||
the linux-kernel list.
|
||||
|
||||
- If you are fixing a bug, think about whether the fix should go into the
|
||||
next stable update. If so, stable@kernel.org should get a copy of the
|
||||
patch. Also add a "Cc: stable@kernel.org" to the tags within the patch
|
||||
itself; that will cause the stable team to get a notification when your
|
||||
fix goes into the mainline.
|
||||
|
||||
When selecting recipients for a patch, it is good to have an idea of who
|
||||
you think will eventually accept the patch and get it merged. While it
|
||||
is possible to send patches directly to Linus Torvalds and have him merge
|
||||
them, things are not normally done that way. Linus is busy, and there are
|
||||
subsystem maintainers who watch over specific parts of the kernel. Usually
|
||||
you will be wanting that maintainer to merge your patches. If there is no
|
||||
obvious maintainer, Andrew Morton is often the patch target of last resort.
|
||||
|
||||
Patches need good subject lines. The canonical format for a patch line is
|
||||
something like:
|
||||
|
||||
[PATCH nn/mm] subsys: one-line description of the patch
|
||||
|
||||
where "nn" is the ordinal number of the patch, "mm" is the total number of
|
||||
patches in the series, and "subsys" is the name of the affected subsystem.
|
||||
Clearly, nn/mm can be omitted for a single, standalone patch.
|
||||
|
||||
If you have a significant series of patches, it is customary to send an
|
||||
introductory description as part zero. This convention is not universally
|
||||
followed though; if you use it, remember that information in the
|
||||
introduction does not make it into the kernel changelogs. So please ensure
|
||||
that the patches, themselves, have complete changelog information.
|
||||
|
||||
In general, the second and following parts of a multi-part patch should be
|
||||
sent as a reply to the first part so that they all thread together at the
|
||||
receiving end. Tools like git and quilt have commands to mail out a set of
|
||||
patches with the proper threading. If you have a long series, though, and
|
||||
are using git, please provide the --no-chain-reply-to option to avoid
|
||||
creating exceptionally deep nesting.
|
202
Documentation/development-process/6.Followthrough
Normal file
202
Documentation/development-process/6.Followthrough
Normal file
|
@ -0,0 +1,202 @@
|
|||
6: FOLLOWTHROUGH
|
||||
|
||||
At this point, you have followed the guidelines given so far and, with the
|
||||
addition of your own engineering skills, have posted a perfect series of
|
||||
patches. One of the biggest mistakes that even experienced kernel
|
||||
developers can make is to conclude that their work is now done. In truth,
|
||||
posting patches indicates a transition into the next stage of the process,
|
||||
with, possibly, quite a bit of work yet to be done.
|
||||
|
||||
It is a rare patch which is so good at its first posting that there is no
|
||||
room for improvement. The kernel development process recognizes this fact,
|
||||
and, as a result, is heavily oriented toward the improvement of posted
|
||||
code. You, as the author of that code, will be expected to work with the
|
||||
kernel community to ensure that your code is up to the kernel's quality
|
||||
standards. A failure to participate in this process is quite likely to
|
||||
prevent the inclusion of your patches into the mainline.
|
||||
|
||||
|
||||
6.1: WORKING WITH REVIEWERS
|
||||
|
||||
A patch of any significance will result in a number of comments from other
|
||||
developers as they review the code. Working with reviewers can be, for
|
||||
many developers, the most intimidating part of the kernel development
|
||||
process. Life can be made much easier, though, if you keep a few things in
|
||||
mind:
|
||||
|
||||
- If you have explained your patch well, reviewers will understand its
|
||||
value and why you went to the trouble of writing it. But that value
|
||||
will not keep them from asking a fundamental question: what will it be
|
||||
like to maintain a kernel with this code in it five or ten years later?
|
||||
Many of the changes you may be asked to make - from coding style tweaks
|
||||
to substantial rewrites - come from the understanding that Linux will
|
||||
still be around and under development a decade from now.
|
||||
|
||||
- Code review is hard work, and it is a relatively thankless occupation;
|
||||
people remember who wrote kernel code, but there is little lasting fame
|
||||
for those who reviewed it. So reviewers can get grumpy, especially when
|
||||
they see the same mistakes being made over and over again. If you get a
|
||||
review which seems angry, insulting, or outright offensive, resist the
|
||||
impulse to respond in kind. Code review is about the code, not about
|
||||
the people, and code reviewers are not attacking you personally.
|
||||
|
||||
- Similarly, code reviewers are not trying to promote their employers'
|
||||
agendas at the expense of your own. Kernel developers often expect to
|
||||
be working on the kernel years from now, but they understand that their
|
||||
employer could change. They truly are, almost without exception,
|
||||
working toward the creation of the best kernel they can; they are not
|
||||
trying to create discomfort for their employers' competitors.
|
||||
|
||||
What all of this comes down to is that, when reviewers send you comments,
|
||||
you need to pay attention to the technical observations that they are
|
||||
making. Do not let their form of expression or your own pride keep that
|
||||
from happening. When you get review comments on a patch, take the time to
|
||||
understand what the reviewer is trying to say. If possible, fix the things
|
||||
that the reviewer is asking you to fix. And respond back to the reviewer:
|
||||
thank them, and describe how you will answer their questions.
|
||||
|
||||
Note that you do not have to agree with every change suggested by
|
||||
reviewers. If you believe that the reviewer has misunderstood your code,
|
||||
explain what is really going on. If you have a technical objection to a
|
||||
suggested change, describe it and justify your solution to the problem. If
|
||||
your explanations make sense, the reviewer will accept them. Should your
|
||||
explanation not prove persuasive, though, especially if others start to
|
||||
agree with the reviewer, take some time to think things over again. It can
|
||||
be easy to become blinded by your own solution to a problem to the point
|
||||
that you don't realize that something is fundamentally wrong or, perhaps,
|
||||
you're not even solving the right problem.
|
||||
|
||||
One fatal mistake is to ignore review comments in the hope that they will
|
||||
go away. They will not go away. If you repost code without having
|
||||
responded to the comments you got the time before, you're likely to find
|
||||
that your patches go nowhere.
|
||||
|
||||
Speaking of reposting code: please bear in mind that reviewers are not
|
||||
going to remember all the details of the code you posted the last time
|
||||
around. So it is always a good idea to remind reviewers of previously
|
||||
raised issues and how you dealt with them; the patch changelog is a good
|
||||
place for this kind of information. Reviewers should not have to search
|
||||
through list archives to familiarize themselves with what was said last
|
||||
time; if you help them get a running start, they will be in a better mood
|
||||
when they revisit your code.
|
||||
|
||||
What if you've tried to do everything right and things still aren't going
|
||||
anywhere? Most technical disagreements can be resolved through discussion,
|
||||
but there are times when somebody simply has to make a decision. If you
|
||||
honestly believe that this decision is going against you wrongly, you can
|
||||
always try appealing to a higher power. As of this writing, that higher
|
||||
power tends to be Andrew Morton. Andrew has a great deal of respect in the
|
||||
kernel development community; he can often unjam a situation which seems to
|
||||
be hopelessly blocked. Appealing to Andrew should not be done lightly,
|
||||
though, and not before all other alternatives have been explored. And bear
|
||||
in mind, of course, that he may not agree with you either.
|
||||
|
||||
|
||||
6.2: WHAT HAPPENS NEXT
|
||||
|
||||
If a patch is considered to be a good thing to add to the kernel, and once
|
||||
most of the review issues have been resolved, the next step is usually
|
||||
entry into a subsystem maintainer's tree. How that works varies from one
|
||||
subsystem to the next; each maintainer has his or her own way of doing
|
||||
things. In particular, there may be more than one tree - one, perhaps,
|
||||
dedicated to patches planned for the next merge window, and another for
|
||||
longer-term work.
|
||||
|
||||
For patches applying to areas for which there is no obvious subsystem tree
|
||||
(memory management patches, for example), the default tree often ends up
|
||||
being -mm. Patches which affect multiple subsystems can also end up going
|
||||
through the -mm tree.
|
||||
|
||||
Inclusion into a subsystem tree can bring a higher level of visibility to a
|
||||
patch. Now other developers working with that tree will get the patch by
|
||||
default. Subsystem trees typically feed into -mm and linux-next as well,
|
||||
making their contents visible to the development community as a whole. At
|
||||
this point, there's a good chance that you will get more comments from a
|
||||
new set of reviewers; these comments need to be answered as in the previous
|
||||
round.
|
||||
|
||||
What may also happen at this point, depending on the nature of your patch,
|
||||
is that conflicts with work being done by others turn up. In the worst
|
||||
case, heavy patch conflicts can result in some work being put on the back
|
||||
burner so that the remaining patches can be worked into shape and merged.
|
||||
Other times, conflict resolution will involve working with the other
|
||||
developers and, possibly, moving some patches between trees to ensure that
|
||||
everything applies cleanly. This work can be a pain, but count your
|
||||
blessings: before the advent of the linux-next tree, these conflicts often
|
||||
only turned up during the merge window and had to be addressed in a hurry.
|
||||
Now they can be resolved at leisure, before the merge window opens.
|
||||
|
||||
Some day, if all goes well, you'll log on and see that your patch has been
|
||||
merged into the mainline kernel. Congratulations! Once the celebration is
|
||||
complete (and you have added yourself to the MAINTAINERS file), though, it
|
||||
is worth remembering an important little fact: the job still is not done.
|
||||
Merging into the mainline brings its own challenges.
|
||||
|
||||
To begin with, the visibility of your patch has increased yet again. There
|
||||
may be a new round of comments from developers who had not been aware of
|
||||
the patch before. It may be tempting to ignore them, since there is no
|
||||
longer any question of your code being merged. Resist that temptation,
|
||||
though; you still need to be responsive to developers who have questions or
|
||||
suggestions.
|
||||
|
||||
More importantly, though: inclusion into the mainline puts your code into
|
||||
the hands of a much larger group of testers. Even if you have contributed
|
||||
a driver for hardware which is not yet available, you will be surprised by
|
||||
how many people will build your code into their kernels. And, of course,
|
||||
where there are testers, there will be bug reports.
|
||||
|
||||
The worst sort of bug reports are regressions. If your patch causes a
|
||||
regression, you'll find an uncomfortable number of eyes upon you;
|
||||
regressions need to be fixed as soon as possible. If you are unwilling or
|
||||
unable to fix the regression (and nobody else does it for you), your patch
|
||||
will almost certainly be removed during the stabilization period. Beyond
|
||||
negating all of the work you have done to get your patch into the mainline,
|
||||
having a patch pulled as the result of a failure to fix a regression could
|
||||
well make it harder for you to get work merged in the future.
|
||||
|
||||
After any regressions have been dealt with, there may be other, ordinary
|
||||
bugs to deal with. The stabilization period is your best opportunity to
|
||||
fix these bugs and ensure that your code's debut in a mainline kernel
|
||||
release is as solid as possible. So, please, answer bug reports, and fix
|
||||
the problems if at all possible. That's what the stabilization period is
|
||||
for; you can start creating cool new patches once any problems with the old
|
||||
ones have been taken care of.
|
||||
|
||||
And don't forget that there are other milestones which may also create bug
|
||||
reports: the next mainline stable release, when prominent distributors pick
|
||||
up a version of the kernel containing your patch, etc. Continuing to
|
||||
respond to these reports is a matter of basic pride in your work. If that
|
||||
is insufficient motivation, though, it's also worth considering that the
|
||||
development community remembers developers who lose interest in their code
|
||||
after it's merged. The next time you post a patch, they will be evaluating
|
||||
it with the assumption that you will not be around to maintain it
|
||||
afterward.
|
||||
|
||||
|
||||
6.3: OTHER THINGS THAT CAN HAPPEN
|
||||
|
||||
One day, you may open your mail client and see that somebody has mailed you
|
||||
a patch to your code. That is one of the advantages of having your code
|
||||
out there in the open, after all. If you agree with the patch, you can
|
||||
either forward it on to the subsystem maintainer (be sure to include a
|
||||
proper From: line so that the attribution is correct, and add a signoff of
|
||||
your own), or send an Acked-by: response back and let the original poster
|
||||
send it upward.
|
||||
|
||||
If you disagree with the patch, send a polite response explaining why. If
|
||||
possible, tell the author what changes need to be made to make the patch
|
||||
acceptable to you. There is a certain resistance to merging patches which
|
||||
are opposed by the author and maintainer of the code, but it only goes so
|
||||
far. If you are seen as needlessly blocking good work, those patches will
|
||||
eventually flow around you and get into the mainline anyway. In the Linux
|
||||
kernel, nobody has absolute veto power over any code. Except maybe Linus.
|
||||
|
||||
On very rare occasion, you may see something completely different: another
|
||||
developer posts a different solution to your problem. At that point,
|
||||
chances are that one of the two patches will not be merged, and "mine was
|
||||
here first" is not considered to be a compelling technical argument. If
|
||||
somebody else's patch displaces yours and gets into the mainline, there is
|
||||
really only one way to respond: be pleased that your problem got solved and
|
||||
get on with your work. Having one's work shoved aside in this manner can
|
||||
be hurtful and discouraging, but the community will remember your reaction
|
||||
long after they have forgotten whose patch actually got merged.
|
173
Documentation/development-process/7.AdvancedTopics
Normal file
173
Documentation/development-process/7.AdvancedTopics
Normal file
|
@ -0,0 +1,173 @@
|
|||
7: ADVANCED TOPICS
|
||||
|
||||
At this point, hopefully, you have a handle on how the development process
|
||||
works. There is still more to learn, however! This section will cover a
|
||||
number of topics which can be helpful for developers wanting to become a
|
||||
regular part of the Linux kernel development process.
|
||||
|
||||
7.1: MANAGING PATCHES WITH GIT
|
||||
|
||||
The use of distributed version control for the kernel began in early 2002,
|
||||
when Linus first started playing with the proprietary BitKeeper
|
||||
application. While BitKeeper was controversial, the approach to software
|
||||
version management it embodied most certainly was not. Distributed version
|
||||
control enabled an immediate acceleration of the kernel development
|
||||
project. In current times, there are several free alternatives to
|
||||
BitKeeper. For better or for worse, the kernel project has settled on git
|
||||
as its tool of choice.
|
||||
|
||||
Managing patches with git can make life much easier for the developer,
|
||||
especially as the volume of those patches grows. Git also has its rough
|
||||
edges and poses certain hazards; it is a young and powerful tool which is
|
||||
still being civilized by its developers. This document will not attempt to
|
||||
teach the reader how to use git; that would be sufficient material for a
|
||||
long document in its own right. Instead, the focus here will be on how git
|
||||
fits into the kernel development process in particular. Developers who
|
||||
wish to come up to speed with git will find more information at:
|
||||
|
||||
http://git.or.cz/
|
||||
|
||||
http://www.kernel.org/pub/software/scm/git/docs/user-manual.html
|
||||
|
||||
and on various tutorials found on the web.
|
||||
|
||||
The first order of business is to read the above sites and get a solid
|
||||
understanding of how git works before trying to use it to make patches
|
||||
available to others. A git-using developer should be able to obtain a copy
|
||||
of the mainline repository, explore the revision history, commit changes to
|
||||
the tree, use branches, etc. An understanding of git's tools for the
|
||||
rewriting of history (such as rebase) is also useful. Git comes with its
|
||||
own terminology and concepts; a new user of git should know about refs,
|
||||
remote branches, the index, fast-forward merges, pushes and pulls, detached
|
||||
heads, etc. It can all be a little intimidating at the outset, but the
|
||||
concepts are not that hard to grasp with a bit of study.
|
||||
|
||||
Using git to generate patches for submission by email can be a good
|
||||
exercise while coming up to speed.
|
||||
|
||||
When you are ready to start putting up git trees for others to look at, you
|
||||
will, of course, need a server that can be pulled from. Setting up such a
|
||||
server with git-daemon is relatively straightforward if you have a system
|
||||
which is accessible to the Internet. Otherwise, free, public hosting sites
|
||||
(Github, for example) are starting to appear on the net. Established
|
||||
developers can get an account on kernel.org, but those are not easy to come
|
||||
by; see http://kernel.org/faq/ for more information.
|
||||
|
||||
The normal git workflow involves the use of a lot of branches. Each line
|
||||
of development can be separated into a separate "topic branch" and
|
||||
maintained independently. Branches in git are cheap, there is no reason to
|
||||
not make free use of them. And, in any case, you should not do your
|
||||
development in any branch which you intend to ask others to pull from.
|
||||
Publicly-available branches should be created with care; merge in patches
|
||||
from development branches when they are in complete form and ready to go -
|
||||
not before.
|
||||
|
||||
Git provides some powerful tools which can allow you to rewrite your
|
||||
development history. An inconvenient patch (one which breaks bisection,
|
||||
say, or which has some other sort of obvious bug) can be fixed in place or
|
||||
made to disappear from the history entirely. A patch series can be
|
||||
rewritten as if it had been written on top of today's mainline, even though
|
||||
you have been working on it for months. Changes can be transparently
|
||||
shifted from one branch to another. And so on. Judicious use of git's
|
||||
ability to revise history can help in the creation of clean patch sets with
|
||||
fewer problems.
|
||||
|
||||
Excessive use of this capability can lead to other problems, though, beyond
|
||||
a simple obsession for the creation of the perfect project history.
|
||||
Rewriting history will rewrite the changes contained in that history,
|
||||
turning a tested (hopefully) kernel tree into an untested one. But, beyond
|
||||
that, developers cannot easily collaborate if they do not have a shared
|
||||
view of the project history; if you rewrite history which other developers
|
||||
have pulled into their repositories, you will make life much more difficult
|
||||
for those developers. So a simple rule of thumb applies here: history
|
||||
which has been exported to others should generally be seen as immutable
|
||||
thereafter.
|
||||
|
||||
So, once you push a set of changes to your publicly-available server, those
|
||||
changes should not be rewritten. Git will attempt to enforce this rule if
|
||||
you try to push changes which do not result in a fast-forward merge
|
||||
(i.e. changes which do not share the same history). It is possible to
|
||||
override this check, and there may be times when it is necessary to rewrite
|
||||
an exported tree. Moving changesets between trees to avoid conflicts in
|
||||
linux-next is one example. But such actions should be rare. This is one
|
||||
of the reasons why development should be done in private branches (which
|
||||
can be rewritten if necessary) and only moved into public branches when
|
||||
it's in a reasonably advanced state.
|
||||
|
||||
As the mainline (or other tree upon which a set of changes is based)
|
||||
advances, it is tempting to merge with that tree to stay on the leading
|
||||
edge. For a private branch, rebasing can be an easy way to keep up with
|
||||
another tree, but rebasing is not an option once a tree is exported to the
|
||||
world. Once that happens, a full merge must be done. Merging occasionally
|
||||
makes good sense, but overly frequent merges can clutter the history
|
||||
needlessly. Suggested technique in this case is to merge infrequently, and
|
||||
generally only at specific release points (such as a mainline -rc
|
||||
release). If you are nervous about specific changes, you can always
|
||||
perform test merges in a private branch. The git "rerere" tool can be
|
||||
useful in such situations; it remembers how merge conflicts were resolved
|
||||
so that you don't have to do the same work twice.
|
||||
|
||||
One of the biggest recurring complaints about tools like git is this: the
|
||||
mass movement of patches from one repository to another makes it easy to
|
||||
slip in ill-advised changes which go into the mainline below the review
|
||||
radar. Kernel developers tend to get unhappy when they see that kind of
|
||||
thing happening; putting up a git tree with unreviewed or off-topic patches
|
||||
can affect your ability to get trees pulled in the future. Quoting Linus:
|
||||
|
||||
You can send me patches, but for me to pull a git patch from you, I
|
||||
need to know that you know what you're doing, and I need to be able
|
||||
to trust things *without* then having to go and check every
|
||||
individual change by hand.
|
||||
|
||||
(http://lwn.net/Articles/224135/).
|
||||
|
||||
To avoid this kind of situation, ensure that all patches within a given
|
||||
branch stick closely to the associated topic; a "driver fixes" branch
|
||||
should not be making changes to the core memory management code. And, most
|
||||
importantly, do not use a git tree to bypass the review process. Post an
|
||||
occasional summary of the tree to the relevant list, and, when the time is
|
||||
right, request that the tree be included in linux-next.
|
||||
|
||||
If and when others start to send patches for inclusion into your tree,
|
||||
don't forget to review them. Also ensure that you maintain the correct
|
||||
authorship information; the git "am" tool does its best in this regard, but
|
||||
you may have to add a "From:" line to the patch if it has been relayed to
|
||||
you via a third party.
|
||||
|
||||
When requesting a pull, be sure to give all the relevant information: where
|
||||
your tree is, what branch to pull, and what changes will result from the
|
||||
pull. The git request-pull command can be helpful in this regard; it will
|
||||
format the request as other developers expect, and will also check to be
|
||||
sure that you have remembered to push those changes to the public server.
|
||||
|
||||
|
||||
7.2: REVIEWING PATCHES
|
||||
|
||||
Some readers will certainly object to putting this section with "advanced
|
||||
topics" on the grounds that even beginning kernel developers should be
|
||||
reviewing patches. It is certainly true that there is no better way to
|
||||
learn how to program in the kernel environment than by looking at code
|
||||
posted by others. In addition, reviewers are forever in short supply; by
|
||||
looking at code you can make a significant contribution to the process as a
|
||||
whole.
|
||||
|
||||
Reviewing code can be an intimidating prospect, especially for a new kernel
|
||||
developer who may well feel nervous about questioning code - in public -
|
||||
which has been posted by those with more experience. Even code written by
|
||||
the most experienced developers can be improved, though. Perhaps the best
|
||||
piece of advice for reviewers (all reviewers) is this: phrase review
|
||||
comments as questions rather than criticisms. Asking "how does the lock
|
||||
get released in this path?" will always work better than stating "the
|
||||
locking here is wrong."
|
||||
|
||||
Different developers will review code from different points of view. Some
|
||||
are mostly concerned with coding style and whether code lines have trailing
|
||||
white space. Others will focus primarily on whether the change implemented
|
||||
by the patch as a whole is a good thing for the kernel or not. Yet others
|
||||
will check for problematic locking, excessive stack usage, possible
|
||||
security issues, duplication of code found elsewhere, adequate
|
||||
documentation, adverse effects on performance, user-space ABI changes, etc.
|
||||
All types of review, if they lead to better code going into the kernel, are
|
||||
welcome and worthwhile.
|
||||
|
||||
|
74
Documentation/development-process/8.Conclusion
Normal file
74
Documentation/development-process/8.Conclusion
Normal file
|
@ -0,0 +1,74 @@
|
|||
8: FOR MORE INFORMATION
|
||||
|
||||
There are numerous sources of information on Linux kernel development and
|
||||
related topics. First among those will always be the Documentation
|
||||
directory found in the kernel source distribution. The top-level HOWTO
|
||||
file is an important starting point; SubmittingPatches and
|
||||
SubmittingDrivers are also something which all kernel developers should
|
||||
read. Many internal kernel APIs are documented using the kerneldoc
|
||||
mechanism; "make htmldocs" or "make pdfdocs" can be used to generate those
|
||||
documents in HTML or PDF format (though the version of TeX shipped by some
|
||||
distributions runs into internal limits and fails to process the documents
|
||||
properly).
|
||||
|
||||
Various web sites discuss kernel development at all levels of detail. Your
|
||||
author would like to humbly suggest http://lwn.net/ as a source;
|
||||
information on many specific kernel topics can be found via the LWN kernel
|
||||
index at:
|
||||
|
||||
http://lwn.net/Kernel/Index/
|
||||
|
||||
Beyond that, a valuable resource for kernel developers is:
|
||||
|
||||
http://kernelnewbies.org/
|
||||
|
||||
Information about the linux-next tree gathers at:
|
||||
|
||||
http://linux.f-seidel.de/linux-next/pmwiki/
|
||||
|
||||
And, of course, one should not forget http://kernel.org/, the definitive
|
||||
location for kernel release information.
|
||||
|
||||
There are a number of books on kernel development:
|
||||
|
||||
Linux Device Drivers, 3rd Edition (Jonathan Corbet, Alessandro
|
||||
Rubini, and Greg Kroah-Hartman). Online at
|
||||
http://lwn.net/Kernel/LDD3/.
|
||||
|
||||
Linux Kernel Development (Robert Love).
|
||||
|
||||
Understanding the Linux Kernel (Daniel Bovet and Marco Cesati).
|
||||
|
||||
All of these books suffer from a common fault, though: they tend to be
|
||||
somewhat obsolete by the time they hit the shelves, and they have been on
|
||||
the shelves for a while now. Still, there is quite a bit of good
|
||||
information to be found there.
|
||||
|
||||
Documentation for git can be found at:
|
||||
|
||||
http://www.kernel.org/pub/software/scm/git/docs/
|
||||
|
||||
http://www.kernel.org/pub/software/scm/git/docs/user-manual.html
|
||||
|
||||
|
||||
9: CONCLUSION
|
||||
|
||||
Congratulations to anybody who has made it through this long-winded
|
||||
document. Hopefully it has provided a helpful understanding of how the
|
||||
Linux kernel is developed and how you can participate in that process.
|
||||
|
||||
In the end, it's the participation that matters. Any open source software
|
||||
project is no more than the sum of what its contributors put into it. The
|
||||
Linux kernel has progressed as quickly and as well as it has because it has
|
||||
been helped by an impressively large group of developers, all of whom are
|
||||
working to make it better. The kernel is a premier example of what can be
|
||||
done when thousands of people work together toward a common goal.
|
||||
|
||||
The kernel can always benefit from a larger developer base, though. There
|
||||
is always more work to do. But, just as importantly, most other
|
||||
participants in the Linux ecosystem can benefit through contributing to the
|
||||
kernel. Getting code into the mainline is the key to higher code quality,
|
||||
lower maintenance and distribution costs, a higher level of influence over
|
||||
the direction of kernel development, and more. It is a situation where
|
||||
everybody involved wins. Fire up your editor and come join us; you will be
|
||||
more than welcome.
|
|
@ -2560,9 +2560,6 @@ Your cooperation is appreciated.
|
|||
96 = /dev/usb/hiddev0 1st USB HID device
|
||||
...
|
||||
111 = /dev/usb/hiddev15 16th USB HID device
|
||||
112 = /dev/usb/auer0 1st auerswald ISDN device
|
||||
...
|
||||
127 = /dev/usb/auer15 16th auerswald ISDN device
|
||||
128 = /dev/usb/brlvgr0 First Braille Voyager device
|
||||
...
|
||||
131 = /dev/usb/brlvgr3 Fourth Braille Voyager device
|
||||
|
@ -2574,6 +2571,9 @@ Your cooperation is appreciated.
|
|||
160 = /dev/usb/legousbtower0 1st USB Legotower device
|
||||
...
|
||||
175 = /dev/usb/legousbtower15 16th USB Legotower device
|
||||
176 = /dev/usb/usbtmc1 First USB TMC device
|
||||
...
|
||||
192 = /dev/usb/usbtmc16 16th USB TMC device
|
||||
240 = /dev/usb/dabusb0 First daubusb device
|
||||
...
|
||||
243 = /dev/usb/dabusb3 Fourth dabusb device
|
||||
|
|
|
@ -2,9 +2,13 @@
|
|||
*.aux
|
||||
*.bin
|
||||
*.cpio
|
||||
*.css
|
||||
*.csp
|
||||
*.dsp
|
||||
*.dvi
|
||||
*.elf
|
||||
*.eps
|
||||
*.fw
|
||||
*.gen.S
|
||||
*.gif
|
||||
*.grep
|
||||
*.grp
|
||||
|
@ -28,6 +32,7 @@
|
|||
*.s
|
||||
*.sgml
|
||||
*.so
|
||||
*.so.dbg
|
||||
*.symtypes
|
||||
*.tab.c
|
||||
*.tab.h
|
||||
|
@ -36,24 +41,17 @@
|
|||
*.xml
|
||||
*_MODULES
|
||||
*_vga16.c
|
||||
*cscope*
|
||||
*~
|
||||
*.9
|
||||
*.9.gz
|
||||
.*
|
||||
.cscope
|
||||
.gitignore
|
||||
.mailmap
|
||||
.mm
|
||||
53c700_d.h
|
||||
53c8xx_d.h*
|
||||
COPYING
|
||||
CREDITS
|
||||
CVS
|
||||
ChangeSet
|
||||
Image
|
||||
Kerntypes
|
||||
MODS.txt
|
||||
Module.markers
|
||||
Module.symvers
|
||||
PENDING
|
||||
SCCS
|
||||
|
@ -71,7 +69,9 @@ autoconf.h*
|
|||
bbootsect
|
||||
bin2c
|
||||
binkernel.spec
|
||||
binoffset
|
||||
bootsect
|
||||
bounds.h
|
||||
bsetup
|
||||
btfixupprep
|
||||
build
|
||||
|
@ -87,39 +87,36 @@ config_data.h*
|
|||
config_data.gz*
|
||||
conmakehash
|
||||
consolemap_deftbl.c*
|
||||
cpustr.h
|
||||
crc32table.h*
|
||||
cscope.*
|
||||
defkeymap.c*
|
||||
defkeymap.c
|
||||
devlist.h*
|
||||
docproc
|
||||
dummy_sym.c*
|
||||
elf2ecoff
|
||||
elfconfig.h*
|
||||
filelist
|
||||
fixdep
|
||||
fore200e_mkfirm
|
||||
fore200e_pca_fw.c*
|
||||
gconf
|
||||
gen-devlist
|
||||
gen-kdb_cmds.c*
|
||||
gen_crc32table
|
||||
gen_init_cpio
|
||||
genksyms
|
||||
gentbl
|
||||
*_gray256.c
|
||||
ihex2fw
|
||||
ikconfig.h*
|
||||
initramfs_data.cpio
|
||||
initramfs_data.cpio.gz
|
||||
initramfs_list
|
||||
kallsyms
|
||||
kconfig
|
||||
kconfig.tk
|
||||
keywords.c*
|
||||
keywords.c
|
||||
ksym.c*
|
||||
ksym.h*
|
||||
kxgettext
|
||||
lkc_defs.h
|
||||
lex.c*
|
||||
lex.c
|
||||
lex.*.c
|
||||
logo_*.c
|
||||
logo_*_clut224.c
|
||||
|
@ -128,7 +125,6 @@ lxdialog
|
|||
mach-types
|
||||
mach-types.h
|
||||
machtypes.h
|
||||
make_times_h
|
||||
map
|
||||
maui_boot.h
|
||||
mconf
|
||||
|
@ -136,6 +132,7 @@ miboot*
|
|||
mk_elfconfig
|
||||
mkboot
|
||||
mkbugboot
|
||||
mkcpustr
|
||||
mkdep
|
||||
mkprep
|
||||
mktables
|
||||
|
@ -143,11 +140,12 @@ mktree
|
|||
modpost
|
||||
modules.order
|
||||
modversions.h*
|
||||
ncscope.*
|
||||
offset.h
|
||||
offsets.h
|
||||
oui.c*
|
||||
parse.c*
|
||||
parse.h*
|
||||
parse.c
|
||||
parse.h
|
||||
patches*
|
||||
pca200e.bin
|
||||
pca200e_ecd.bin2
|
||||
|
@ -155,7 +153,7 @@ piggy.gz
|
|||
piggyback
|
||||
pnmtologo
|
||||
ppc_defs.h*
|
||||
promcon_tbl.c*
|
||||
promcon_tbl.c
|
||||
pss_boot.h
|
||||
qconf
|
||||
raid6altivec*.c
|
||||
|
@ -166,27 +164,38 @@ series
|
|||
setup
|
||||
setup.bin
|
||||
setup.elf
|
||||
sim710_d.h*
|
||||
sImage
|
||||
sm_tbl*
|
||||
split-include
|
||||
syscalltab.h
|
||||
tags
|
||||
tftpboot.img
|
||||
timeconst.h
|
||||
times.h*
|
||||
tkparse
|
||||
trix_boot.h
|
||||
utsrelease.h*
|
||||
vdso-syms.lds
|
||||
vdso.lds
|
||||
vdso32-int80-syms.lds
|
||||
vdso32-syms.lds
|
||||
vdso32-syscall-syms.lds
|
||||
vdso32-sysenter-syms.lds
|
||||
vdso32.lds
|
||||
vdso32.so.dbg
|
||||
vdso64.lds
|
||||
vdso64.so.dbg
|
||||
version.h*
|
||||
vmlinux
|
||||
vmlinux-*
|
||||
vmlinux.aout
|
||||
vmlinux*.lds*
|
||||
vmlinux*.scr
|
||||
vmlinux.lds
|
||||
vsyscall.lds
|
||||
vsyscall_32.lds
|
||||
wanxlfw.inc
|
||||
uImage
|
||||
unifdef
|
||||
wakeup.bin
|
||||
wakeup.elf
|
||||
wakeup.lds
|
||||
zImage*
|
||||
zconf.hash.c
|
||||
|
|
|
@ -222,74 +222,9 @@ both csrow2 and csrow3 are populated, this indicates a dual ranked
|
|||
set of DIMMs for channels 0 and 1.
|
||||
|
||||
|
||||
Within each of the 'mc','mcX' and 'csrowX' directories are several
|
||||
Within each of the 'mcX' and 'csrowX' directories are several
|
||||
EDAC control and attribute files.
|
||||
|
||||
|
||||
============================================================================
|
||||
DIRECTORY 'mc'
|
||||
|
||||
In directory 'mc' are EDAC system overall control and attribute files:
|
||||
|
||||
|
||||
Panic on UE control file:
|
||||
|
||||
'edac_mc_panic_on_ue'
|
||||
|
||||
An uncorrectable error will cause a machine panic. This is usually
|
||||
desirable. It is a bad idea to continue when an uncorrectable error
|
||||
occurs - it is indeterminate what was uncorrected and the operating
|
||||
system context might be so mangled that continuing will lead to further
|
||||
corruption. If the kernel has MCE configured, then EDAC will never
|
||||
notice the UE.
|
||||
|
||||
LOAD TIME: module/kernel parameter: panic_on_ue=[0|1]
|
||||
|
||||
RUN TIME: echo "1" >/sys/devices/system/edac/mc/edac_mc_panic_on_ue
|
||||
|
||||
|
||||
Log UE control file:
|
||||
|
||||
'edac_mc_log_ue'
|
||||
|
||||
Generate kernel messages describing uncorrectable errors. These errors
|
||||
are reported through the system message log system. UE statistics
|
||||
will be accumulated even when UE logging is disabled.
|
||||
|
||||
LOAD TIME: module/kernel parameter: log_ue=[0|1]
|
||||
|
||||
RUN TIME: echo "1" >/sys/devices/system/edac/mc/edac_mc_log_ue
|
||||
|
||||
|
||||
Log CE control file:
|
||||
|
||||
'edac_mc_log_ce'
|
||||
|
||||
Generate kernel messages describing correctable errors. These
|
||||
errors are reported through the system message log system.
|
||||
CE statistics will be accumulated even when CE logging is disabled.
|
||||
|
||||
LOAD TIME: module/kernel parameter: log_ce=[0|1]
|
||||
|
||||
RUN TIME: echo "1" >/sys/devices/system/edac/mc/edac_mc_log_ce
|
||||
|
||||
|
||||
Polling period control file:
|
||||
|
||||
'edac_mc_poll_msec'
|
||||
|
||||
The time period, in milliseconds, for polling for error information.
|
||||
Too small a value wastes resources. Too large a value might delay
|
||||
necessary handling of errors and might loose valuable information for
|
||||
locating the error. 1000 milliseconds (once each second) is the current
|
||||
default. Systems which require all the bandwidth they can get, may
|
||||
increase this.
|
||||
|
||||
LOAD TIME: module/kernel parameter: poll_msec=[0|1]
|
||||
|
||||
RUN TIME: echo "1000" >/sys/devices/system/edac/mc/edac_mc_poll_msec
|
||||
|
||||
|
||||
============================================================================
|
||||
'mcX' DIRECTORIES
|
||||
|
||||
|
@ -392,7 +327,7 @@ Sdram memory scrubbing rate:
|
|||
'sdram_scrub_rate'
|
||||
|
||||
Read/Write attribute file that controls memory scrubbing. The scrubbing
|
||||
rate is set by writing a minimum bandwith in bytes/sec to the attribute
|
||||
rate is set by writing a minimum bandwidth in bytes/sec to the attribute
|
||||
file. The rate will be translated to an internal value that gives at
|
||||
least the specified rate.
|
||||
|
||||
|
@ -537,7 +472,6 @@ Channel 1 DIMM Label control file:
|
|||
motherboard specific and determination of this information
|
||||
must occur in userland at this time.
|
||||
|
||||
|
||||
============================================================================
|
||||
SYSTEM LOGGING
|
||||
|
||||
|
@ -570,7 +504,6 @@ error type, a notice of "no info" and then an optional,
|
|||
driver-specific error message.
|
||||
|
||||
|
||||
|
||||
============================================================================
|
||||
PCI Bus Parity Detection
|
||||
|
||||
|
@ -604,6 +537,74 @@ Enable/Disable PCI Parity checking control file:
|
|||
echo "0" >/sys/devices/system/edac/pci/check_pci_parity
|
||||
|
||||
|
||||
Parity Count:
|
||||
|
||||
'pci_parity_count'
|
||||
|
||||
This attribute file will display the number of parity errors that
|
||||
have been detected.
|
||||
|
||||
|
||||
============================================================================
|
||||
MODULE PARAMETERS
|
||||
|
||||
Panic on UE control file:
|
||||
|
||||
'edac_mc_panic_on_ue'
|
||||
|
||||
An uncorrectable error will cause a machine panic. This is usually
|
||||
desirable. It is a bad idea to continue when an uncorrectable error
|
||||
occurs - it is indeterminate what was uncorrected and the operating
|
||||
system context might be so mangled that continuing will lead to further
|
||||
corruption. If the kernel has MCE configured, then EDAC will never
|
||||
notice the UE.
|
||||
|
||||
LOAD TIME: module/kernel parameter: edac_mc_panic_on_ue=[0|1]
|
||||
|
||||
RUN TIME: echo "1" > /sys/module/edac_core/parameters/edac_mc_panic_on_ue
|
||||
|
||||
|
||||
Log UE control file:
|
||||
|
||||
'edac_mc_log_ue'
|
||||
|
||||
Generate kernel messages describing uncorrectable errors. These errors
|
||||
are reported through the system message log system. UE statistics
|
||||
will be accumulated even when UE logging is disabled.
|
||||
|
||||
LOAD TIME: module/kernel parameter: edac_mc_log_ue=[0|1]
|
||||
|
||||
RUN TIME: echo "1" > /sys/module/edac_core/parameters/edac_mc_log_ue
|
||||
|
||||
|
||||
Log CE control file:
|
||||
|
||||
'edac_mc_log_ce'
|
||||
|
||||
Generate kernel messages describing correctable errors. These
|
||||
errors are reported through the system message log system.
|
||||
CE statistics will be accumulated even when CE logging is disabled.
|
||||
|
||||
LOAD TIME: module/kernel parameter: edac_mc_log_ce=[0|1]
|
||||
|
||||
RUN TIME: echo "1" > /sys/module/edac_core/parameters/edac_mc_log_ce
|
||||
|
||||
|
||||
Polling period control file:
|
||||
|
||||
'edac_mc_poll_msec'
|
||||
|
||||
The time period, in milliseconds, for polling for error information.
|
||||
Too small a value wastes resources. Too large a value might delay
|
||||
necessary handling of errors and might loose valuable information for
|
||||
locating the error. 1000 milliseconds (once each second) is the current
|
||||
default. Systems which require all the bandwidth they can get, may
|
||||
increase this.
|
||||
|
||||
LOAD TIME: module/kernel parameter: edac_mc_poll_msec=[0|1]
|
||||
|
||||
RUN TIME: echo "1000" > /sys/module/edac_core/parameters/edac_mc_poll_msec
|
||||
|
||||
|
||||
Panic on PCI PARITY Error:
|
||||
|
||||
|
@ -614,21 +615,13 @@ Panic on PCI PARITY Error:
|
|||
error has been detected.
|
||||
|
||||
|
||||
module/kernel parameter: panic_on_pci_parity=[0|1]
|
||||
module/kernel parameter: edac_panic_on_pci_pe=[0|1]
|
||||
|
||||
Enable:
|
||||
echo "1" >/sys/devices/system/edac/pci/panic_on_pci_parity
|
||||
echo "1" > /sys/module/edac_core/parameters/edac_panic_on_pci_pe
|
||||
|
||||
Disable:
|
||||
echo "0" >/sys/devices/system/edac/pci/panic_on_pci_parity
|
||||
|
||||
|
||||
Parity Count:
|
||||
|
||||
'pci_parity_count'
|
||||
|
||||
This attribute file will display the number of parity errors that
|
||||
have been detected.
|
||||
echo "0" > /sys/module/edac_core/parameters/edac_panic_on_pci_pe
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -14,6 +14,7 @@ graphics devices. These would include:
|
|||
Intel 915GM
|
||||
Intel 945G
|
||||
Intel 945GM
|
||||
Intel 945GME
|
||||
Intel 965G
|
||||
Intel 965GM
|
||||
|
||||
|
|
131
Documentation/fb/sh7760fb.txt
Normal file
131
Documentation/fb/sh7760fb.txt
Normal file
|
@ -0,0 +1,131 @@
|
|||
SH7760/SH7763 integrated LCDC Framebuffer driver
|
||||
================================================
|
||||
|
||||
0. Overwiew
|
||||
-----------
|
||||
The SH7760/SH7763 have an integrated LCD Display controller (LCDC) which
|
||||
supports (in theory) resolutions ranging from 1x1 to 1024x1024,
|
||||
with color depths ranging from 1 to 16 bits, on STN, DSTN and TFT Panels.
|
||||
|
||||
Caveats:
|
||||
* Framebuffer memory must be a large chunk allocated at the top
|
||||
of Area3 (HW requirement). Because of this requirement you should NOT
|
||||
make the driver a module since at runtime it may become impossible to
|
||||
get a large enough contiguous chunk of memory.
|
||||
|
||||
* The driver does not support changing resolution while loaded
|
||||
(displays aren't hotpluggable anyway)
|
||||
|
||||
* Heavy flickering may be observed
|
||||
a) if you're using 15/16bit color modes at >= 640x480 px resolutions,
|
||||
b) during PCMCIA (or any other slow bus) activity.
|
||||
|
||||
* Rotation works only 90degress clockwise, and only if horizontal
|
||||
resolution is <= 320 pixels.
|
||||
|
||||
files: drivers/video/sh7760fb.c
|
||||
include/asm-sh/sh7760fb.h
|
||||
Documentation/fb/sh7760fb.txt
|
||||
|
||||
1. Platform setup
|
||||
-----------------
|
||||
SH7760:
|
||||
Video data is fetched via the DMABRG DMA engine, so you have to
|
||||
configure the SH DMAC for DMABRG mode (write 0x94808080 to the
|
||||
DMARSRA register somewhere at boot).
|
||||
|
||||
PFC registers PCCR and PCDR must be set to peripheral mode.
|
||||
(write zeros to both).
|
||||
|
||||
The driver does NOT do the above for you since board setup is, well, job
|
||||
of the board setup code.
|
||||
|
||||
2. Panel definitions
|
||||
--------------------
|
||||
The LCDC must explicitly be told about the type of LCD panel
|
||||
attached. Data must be wrapped in a "struct sh7760fb_platdata" and
|
||||
passed to the driver as platform_data.
|
||||
|
||||
Suggest you take a closer look at the SH7760 Manual, Section 30.
|
||||
(http://documentation.renesas.com/eng/products/mpumcu/e602291_sh7760.pdf)
|
||||
|
||||
The following code illustrates what needs to be done to
|
||||
get the framebuffer working on a 640x480 TFT:
|
||||
|
||||
====================== cut here ======================================
|
||||
|
||||
#include <linux/fb.h>
|
||||
#include <asm/sh7760fb.h>
|
||||
|
||||
/*
|
||||
* NEC NL6440bc26-01 640x480 TFT
|
||||
* dotclock 25175 kHz
|
||||
* Xres 640 Yres 480
|
||||
* Htotal 800 Vtotal 525
|
||||
* HsynStart 656 VsynStart 490
|
||||
* HsynLenn 30 VsynLenn 2
|
||||
*
|
||||
* The linux framebuffer layer does not use the syncstart/synclen
|
||||
* values but right/left/upper/lower margin values. The comments
|
||||
* for the x_margin explain how to calculate those from given
|
||||
* panel sync timings.
|
||||
*/
|
||||
static struct fb_videomode nl6448bc26 = {
|
||||
.name = "NL6448BC26",
|
||||
.refresh = 60,
|
||||
.xres = 640,
|
||||
.yres = 480,
|
||||
.pixclock = 39683, /* in picoseconds! */
|
||||
.hsync_len = 30,
|
||||
.vsync_len = 2,
|
||||
.left_margin = 114, /* HTOT - (HSYNSLEN + HSYNSTART) */
|
||||
.right_margin = 16, /* HSYNSTART - XRES */
|
||||
.upper_margin = 33, /* VTOT - (VSYNLEN + VSYNSTART) */
|
||||
.lower_margin = 10, /* VSYNSTART - YRES */
|
||||
.sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
|
||||
.vmode = FB_VMODE_NONINTERLACED,
|
||||
.flag = 0,
|
||||
};
|
||||
|
||||
static struct sh7760fb_platdata sh7760fb_nl6448 = {
|
||||
.def_mode = &nl6448bc26,
|
||||
.ldmtr = LDMTR_TFT_COLOR_16, /* 16bit TFT panel */
|
||||
.lddfr = LDDFR_8BPP, /* we want 8bit output */
|
||||
.ldpmmr = 0x0070,
|
||||
.ldpspr = 0x0500,
|
||||
.ldaclnr = 0,
|
||||
.ldickr = LDICKR_CLKSRC(LCDC_CLKSRC_EXTERNAL) |
|
||||
LDICKR_CLKDIV(1),
|
||||
.rotate = 0,
|
||||
.novsync = 1,
|
||||
.blank = NULL,
|
||||
};
|
||||
|
||||
/* SH7760:
|
||||
* 0xFE300800: 256 * 4byte xRGB palette ram
|
||||
* 0xFE300C00: 42 bytes ctrl registers
|
||||
*/
|
||||
static struct resource sh7760_lcdc_res[] = {
|
||||
[0] = {
|
||||
.start = 0xFE300800,
|
||||
.end = 0xFE300CFF,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
[1] = {
|
||||
.start = 65,
|
||||
.end = 65,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
};
|
||||
|
||||
static struct platform_device sh7760_lcdc_dev = {
|
||||
.dev = {
|
||||
.platform_data = &sh7760fb_nl6448,
|
||||
},
|
||||
.name = "sh7760-lcdc",
|
||||
.id = -1,
|
||||
.resource = sh7760_lcdc_res,
|
||||
.num_resources = ARRAY_SIZE(sh7760_lcdc_res),
|
||||
};
|
||||
|
||||
====================== cut here ======================================
|
|
@ -3,11 +3,25 @@ Tridentfb is a framebuffer driver for some Trident chip based cards.
|
|||
The following list of chips is thought to be supported although not all are
|
||||
tested:
|
||||
|
||||
those from the Image series with Cyber in their names - accelerated
|
||||
those with Blade in their names (Blade3D,CyberBlade...) - accelerated
|
||||
the newer CyberBladeXP family - nonaccelerated
|
||||
those from the TGUI series 9440/96XX and with Cyber in their names
|
||||
those from the Image series and with Cyber in their names
|
||||
those with Blade in their names (Blade3D,CyberBlade...)
|
||||
the newer CyberBladeXP family
|
||||
|
||||
Only PCI/AGP based cards are supported, none of the older Tridents.
|
||||
All families are accelerated. Only PCI/AGP based cards are supported,
|
||||
none of the older Tridents.
|
||||
The driver supports 8, 16 and 32 bits per pixel depths.
|
||||
The TGUI family requires a line length to be power of 2 if acceleration
|
||||
is enabled. This means that range of possible resolutions and bpp is
|
||||
limited comparing to the range if acceleration is disabled (see list
|
||||
of parameters below).
|
||||
|
||||
Known bugs:
|
||||
1. The driver randomly locks up on 3DImage975 chip with acceleration
|
||||
enabled. The same happens in X11 (Xorg).
|
||||
2. The ramdac speeds require some more fine tuning. It is possible to
|
||||
switch resolution which the chip does not support at some depths for
|
||||
older chips.
|
||||
|
||||
How to use it?
|
||||
==============
|
||||
|
@ -17,12 +31,11 @@ video=tridentfb
|
|||
|
||||
The parameters for tridentfb are concatenated with a ':' as in this example.
|
||||
|
||||
video=tridentfb:800x600,bpp=16,noaccel
|
||||
video=tridentfb:800x600-16@75,noaccel
|
||||
|
||||
The second level parameters that tridentfb understands are:
|
||||
|
||||
noaccel - turns off acceleration (when it doesn't work for your card)
|
||||
accel - force text acceleration (for boards which by default are noacceled)
|
||||
|
||||
fp - use flat panel related stuff
|
||||
crt - assume monitor is present instead of fp
|
||||
|
@ -31,21 +44,24 @@ center - for flat panels and resolutions smaller than native size center the
|
|||
image, otherwise use
|
||||
stretch
|
||||
|
||||
memsize - integer value in Kb, use if your card's memory size is misdetected.
|
||||
memsize - integer value in KB, use if your card's memory size is misdetected.
|
||||
look at the driver output to see what it says when initializing.
|
||||
memdiff - integer value in Kb,should be nonzero if your card reports
|
||||
more memory than it actually has.For instance mine is 192K less than
|
||||
|
||||
memdiff - integer value in KB, should be nonzero if your card reports
|
||||
more memory than it actually has. For instance mine is 192K less than
|
||||
detection says in all three BIOS selectable situations 2M, 4M, 8M.
|
||||
Only use if your video memory is taken from main memory hence of
|
||||
configurable size.Otherwise use memsize.
|
||||
If in some modes which barely fit the memory you see garbage at the bottom
|
||||
this might help by not letting change to that mode anymore.
|
||||
configurable size. Otherwise use memsize.
|
||||
If in some modes which barely fit the memory you see garbage
|
||||
at the bottom this might help by not letting change to that mode
|
||||
anymore.
|
||||
|
||||
nativex - the width in pixels of the flat panel.If you know it (usually 1024
|
||||
800 or 1280) and it is not what the driver seems to detect use it.
|
||||
|
||||
bpp - bits per pixel (8,16 or 32)
|
||||
mode - a mode name like 800x600 (as described in Documentation/fb/modedb.txt)
|
||||
bpp - bits per pixel (8,16 or 32)
|
||||
mode - a mode name like 800x600-8@75 as described in
|
||||
Documentation/fb/modedb.txt
|
||||
|
||||
Using insane values for the above parameters will probably result in driver
|
||||
misbehaviour so take care(for instance memsize=12345678 or memdiff=23784 or
|
||||
|
|
|
@ -52,7 +52,7 @@ are either given on the kernel command line or as module parameters, e.g.:
|
|||
|
||||
video=uvesafb:1024x768-32,mtrr:3,ywrap (compiled into the kernel)
|
||||
|
||||
# modprobe uvesafb mode=1024x768-32 mtrr=3 scroll=ywrap (module)
|
||||
# modprobe uvesafb mode_option=1024x768-32 mtrr=3 scroll=ywrap (module)
|
||||
|
||||
Accepted options:
|
||||
|
||||
|
@ -105,7 +105,7 @@ vtotal:n
|
|||
<mode> The mode you want to set, in the standard modedb format. Refer to
|
||||
modedb.txt for a detailed description. When uvesafb is compiled as
|
||||
a module, the mode string should be provided as a value of the
|
||||
'mode' option.
|
||||
'mode_option' option.
|
||||
|
||||
vbemode:x
|
||||
Force the use of VBE mode x. The mode will only be set if it's
|
||||
|
|
870
Documentation/fb/viafb.modes
Normal file
870
Documentation/fb/viafb.modes
Normal file
|
@ -0,0 +1,870 @@
|
|||
#
|
||||
#
|
||||
# These data are based on the CRTC parameters in
|
||||
#
|
||||
# VIA Integration Graphics Chip
|
||||
# (C) 2004 VIA Technologies Inc.
|
||||
#
|
||||
|
||||
#
|
||||
# 640x480, 60 Hz, Non-Interlaced (25.175 MHz dotclock)
|
||||
#
|
||||
# Horizontal Vertical
|
||||
# Resolution 640 480
|
||||
# Scan Frequency 31.469 kHz 59.94 Hz
|
||||
# Sync Width 3.813 us 0.064 ms
|
||||
# 12 chars 2 lines
|
||||
# Front Porch 0.636 us 0.318 ms
|
||||
# 2 chars 10 lines
|
||||
# Back Porch 1.907 us 1.048 ms
|
||||
# 6 chars 33 lines
|
||||
# Active Time 25.422 us 15.253 ms
|
||||
# 80 chars 480 lines
|
||||
# Blank Time 6.356 us 1.430 ms
|
||||
# 20 chars 45 lines
|
||||
# Polarity negative negative
|
||||
#
|
||||
|
||||
mode "640x480-60"
|
||||
# D: 25.175 MHz, H: 31.469 kHz, V: 59.94 Hz
|
||||
geometry 640 480 640 480 32
|
||||
timings 39722 48 16 33 10 96 2 endmode mode "480x640-60"
|
||||
# D: 24.823 MHz, H: 39.780 kHz, V: 60.00 Hz
|
||||
geometry 480 640 480 640 32 timings 39722 72 24 19 1 48 3 endmode
|
||||
#
|
||||
# 640x480, 75 Hz, Non-Interlaced (31.50 MHz dotclock)
|
||||
#
|
||||
# Horizontal Vertical
|
||||
# Resolution 640 480
|
||||
# Scan Frequency 37.500 kHz 75.00 Hz
|
||||
# Sync Width 2.032 us 0.080 ms
|
||||
# 8 chars 3 lines
|
||||
# Front Porch 0.508 us 0.027 ms
|
||||
# 2 chars 1 lines
|
||||
# Back Porch 3.810 us 0.427 ms
|
||||
# 15 chars 16 lines
|
||||
# Active Time 20.317 us 12.800 ms
|
||||
# 80 chars 480 lines
|
||||
# Blank Time 6.349 us 0.533 ms
|
||||
# 25 chars 20 lines
|
||||
# Polarity negative negative
|
||||
#
|
||||
mode "640x480-75"
|
||||
# D: 31.50 MHz, H: 37.500 kHz, V: 75.00 Hz
|
||||
geometry 640 480 640 480 32 timings 31747 120 16 16 1 64 3 endmode
|
||||
#
|
||||
# 640x480, 85 Hz, Non-Interlaced (36.000 MHz dotclock)
|
||||
#
|
||||
# Horizontal Vertical
|
||||
# Resolution 640 480
|
||||
# Scan Frequency 43.269 kHz 85.00 Hz
|
||||
# Sync Width 1.556 us 0.069 ms
|
||||
# 7 chars 3 lines
|
||||
# Front Porch 1.556 us 0.023 ms
|
||||
# 7 chars 1 lines
|
||||
# Back Porch 2.222 us 0.578 ms
|
||||
# 10 chars 25 lines
|
||||
# Active Time 17.778 us 11.093 ms
|
||||
# 80 chars 480 lines
|
||||
# Blank Time 5.333 us 0.670 ms
|
||||
# 24 chars 29 lines
|
||||
# Polarity negative negative
|
||||
#
|
||||
mode "640x480-85"
|
||||
# D: 36.000 MHz, H: 43.269 kHz, V: 85.00 Hz
|
||||
geometry 640 480 640 480 32 timings 27777 80 56 25 1 56 3 endmode
|
||||
#
|
||||
# 640x480, 100 Hz, Non-Interlaced (43.163 MHz dotclock)
|
||||
#
|
||||
# Horizontal Vertical
|
||||
# Resolution 640 480
|
||||
# Scan Frequency 50.900 kHz 100.00 Hz
|
||||
# Sync Width 1.483 us 0.058 ms
|
||||
# 8 chars 3 lines
|
||||
# Front Porch 0.927 us 0.019 ms
|
||||
# 5 chars 1 lines
|
||||
# Back Porch 2.409 us 0.475 ms
|
||||
# 13 chars 25 lines
|
||||
# Active Time 14.827 us 9.430 ms
|
||||
# 80 chars 480 lines
|
||||
# Blank Time 4.819 us 0.570 ms
|
||||
# 26 chars 29 lines
|
||||
# Polarity positive positive
|
||||
#
|
||||
mode "640x480-100"
|
||||
# D: 43.163 MHz, H: 50.900 kHz, V: 100.00 Hz
|
||||
geometry 640 480 640 480 32 timings 23168 104 40 25 1 64 3 endmode
|
||||
#
|
||||
# 640x480, 120 Hz, Non-Interlaced (52.406 MHz dotclock)
|
||||
#
|
||||
# Horizontal Vertical
|
||||
# Resolution 640 480
|
||||
# Scan Frequency 61.800 kHz 120.00 Hz
|
||||
# Sync Width 1.221 us 0.048 ms
|
||||
# 8 chars 3 lines
|
||||
# Front Porch 0.763 us 0.016 ms
|
||||
# 5 chars 1 lines
|
||||
# Back Porch 1.984 us 0.496 ms
|
||||
# 13 chars 31 lines
|
||||
# Active Time 12.212 us 7.767 ms
|
||||
# 80 chars 480 lines
|
||||
# Blank Time 3.969 us 0.566 ms
|
||||
# 26 chars 35 lines
|
||||
# Polarity positive positive
|
||||
#
|
||||
mode "640x480-120"
|
||||
# D: 52.406 MHz, H: 61.800 kHz, V: 120.00 Hz
|
||||
geometry 640 480 640 480 32 timings 19081 104 40 31 1 64 3 endmode
|
||||
#
|
||||
# 720x480, 60 Hz, Non-Interlaced (26.880 MHz dotclock)
|
||||
#
|
||||
# Horizontal Vertical
|
||||
# Resolution 720 480
|
||||
# Scan Frequency 30.000 kHz 60.241 Hz
|
||||
# Sync Width 2.679 us 0.099 ms
|
||||
# 9 chars 3 lines
|
||||
# Front Porch 0.595 us 0.033 ms
|
||||
# 2 chars 1 lines
|
||||
# Back Porch 3.274 us 0.462 ms
|
||||
# 11 chars 14 lines
|
||||
# Active Time 26.786 us 16.000 ms
|
||||
# 90 chars 480 lines
|
||||
# Blank Time 6.548 us 0.600 ms
|
||||
# 22 chars 18 lines
|
||||
# Polarity positive positive
|
||||
#
|
||||
mode "720x480-60"
|
||||
# D: 26.880 MHz, H: 30.000 kHz, V: 60.24 Hz
|
||||
geometry 720 480 720 480 32 timings 37202 88 16 14 1 72 3 endmode
|
||||
#
|
||||
# 800x480, 60 Hz, Non-Interlaced (29.581 MHz dotclock)
|
||||
#
|
||||
# Horizontal Vertical
|
||||
# Resolution 800 480
|
||||
# Scan Frequency 29.892 kHz 60.00 Hz
|
||||
# Sync Width 2.704 us 100.604 us
|
||||
# 10 chars 3 lines
|
||||
# Front Porch 0.541 us 33.535 us
|
||||
# 2 chars 1 lines
|
||||
# Back Porch 3.245 us 435.949 us
|
||||
# 12 chars 13 lines
|
||||
# Active Time 27.044 us 16.097 ms
|
||||
# 100 chars 480 lines
|
||||
# Blank Time 6.491 us 0.570 ms
|
||||
# 24 chars 17 lines
|
||||
# Polarity positive positive
|
||||
#
|
||||
mode "800x480-60"
|
||||
# D: 29.500 MHz, H: 29.738 kHz, V: 60.00 Hz
|
||||
geometry 800 480 800 480 32 timings 33805 96 24 10 3 72 7 endmode
|
||||
#
|
||||
# 720x576, 60 Hz, Non-Interlaced (32.668 MHz dotclock)
|
||||
#
|
||||
# Horizontal Vertical
|
||||
# Resolution 720 576
|
||||
# Scan Frequency 35.820 kHz 60.00 Hz
|
||||
# Sync Width 2.204 us 0.083 ms
|
||||
# 9 chars 3 lines
|
||||
# Front Porch 0.735 us 0.027 ms
|
||||
# 3 chars 1 lines
|
||||
# Back Porch 2.939 us 0.459 ms
|
||||
# 12 chars 17 lines
|
||||
# Active Time 22.040 us 16.080 ms
|
||||
# 90 chars 476 lines
|
||||
# Blank Time 5.877 us 0.586 ms
|
||||
# 24 chars 21 lines
|
||||
# Polarity positive positive
|
||||
#
|
||||
mode "720x576-60"
|
||||
# D: 32.668 MHz, H: 35.820 kHz, V: 60.00 Hz
|
||||
geometry 720 576 720 576 32 timings 30611 96 24 17 1 72 3 endmode
|
||||
#
|
||||
# 800x600, 60 Hz, Non-Interlaced (40.00 MHz dotclock)
|
||||
#
|
||||
# Horizontal Vertical
|
||||
# Resolution 800 600
|
||||
# Scan Frequency 37.879 kHz 60.32 Hz
|
||||
# Sync Width 3.200 us 0.106 ms
|
||||
# 16 chars 4 lines
|
||||
# Front Porch 1.000 us 0.026 ms
|
||||
# 5 chars 1 lines
|
||||
# Back Porch 2.200 us 0.607 ms
|
||||
# 11 chars 23 lines
|
||||
# Active Time 20.000 us 15.840 ms
|
||||
# 100 chars 600 lines
|
||||
# Blank Time 6.400 us 0.739 ms
|
||||
# 32 chars 28 lines
|
||||
# Polarity positive positive
|
||||
#
|
||||
mode "800x600-60"
|
||||
# D: 40.00 MHz, H: 37.879 kHz, V: 60.32 Hz
|
||||
geometry 800 600 800 600 32
|
||||
timings 25000 88 40 23 1 128 4 hsync high vsync high endmode
|
||||
#
|
||||
# 800x600, 75 Hz, Non-Interlaced (49.50 MHz dotclock)
|
||||
#
|
||||
# Horizontal Vertical
|
||||
# Resolution 800 600
|
||||
# Scan Frequency 46.875 kHz 75.00 Hz
|
||||
# Sync Width 1.616 us 0.064 ms
|
||||
# 10 chars 3 lines
|
||||
# Front Porch 0.323 us 0.021 ms
|
||||
# 2 chars 1 lines
|
||||
# Back Porch 3.232 us 0.448 ms
|
||||
# 20 chars 21 lines
|
||||
# Active Time 16.162 us 12.800 ms
|
||||
# 100 chars 600 lines
|
||||
# Blank Time 5.172 us 0.533 ms
|
||||
# 32 chars 25 lines
|
||||
# Polarity positive positive
|
||||
#
|
||||
mode "800x600-75"
|
||||
# D: 49.50 MHz, H: 46.875 kHz, V: 75.00 Hz
|
||||
geometry 800 600 800 600 32
|
||||
timings 20203 160 16 21 1 80 3 hsync high vsync high endmode
|
||||
#
|
||||
# 800x600, 85 Hz, Non-Interlaced (56.25 MHz dotclock)
|
||||
#
|
||||
# Horizontal Vertical
|
||||
# Resolution 800 600
|
||||
# Scan Frequency 53.674 kHz 85.061 Hz
|
||||
# Sync Width 1.138 us 0.056 ms
|
||||
# 8 chars 3 lines
|
||||
# Front Porch 0.569 us 0.019 ms
|
||||
# 4 chars 1 lines
|
||||
# Back Porch 2.702 us 0.503 ms
|
||||
# 19 chars 27 lines
|
||||
# Active Time 14.222 us 11.179 ms
|
||||
# 100 chars 600 lines
|
||||
# Blank Time 4.409 us 0.578 ms
|
||||
# 31 chars 31 lines
|
||||
# Polarity positive positive
|
||||
#
|
||||
mode "800x600-85"
|
||||
# D: 56.25 MHz, H: 53.674 kHz, V: 85.061 Hz
|
||||
geometry 800 600 800 600 32
|
||||
timings 17777 152 32 27 1 64 3 hsync high vsync high endmode
|
||||
#
|
||||
# 800x600, 100 Hz, Non-Interlaced (67.50 MHz dotclock)
|
||||
#
|
||||
# Horizontal Vertical
|
||||
# Resolution 800 600
|
||||
# Scan Frequency 62.500 kHz 100.00 Hz
|
||||
# Sync Width 0.948 us 0.064 ms
|
||||
# 8 chars 4 lines
|
||||
# Front Porch 0.000 us 0.112 ms
|
||||
# 0 chars 7 lines
|
||||
# Back Porch 3.200 us 0.224 ms
|
||||
# 27 chars 14 lines
|
||||
# Active Time 11.852 us 9.600 ms
|
||||
# 100 chars 600 lines
|
||||
# Blank Time 4.148 us 0.400 ms
|
||||
# 35 chars 25 lines
|
||||
# Polarity positive positive
|
||||
#
|
||||
mode "800x600-100"
|
||||
# D: 67.50 MHz, H: 62.500 kHz, V: 100.00 Hz
|
||||
geometry 800 600 800 600 32
|
||||
timings 14667 216 0 14 7 64 4 hsync high vsync high endmode
|
||||
#
|
||||
# 800x600, 120 Hz, Non-Interlaced (83.950 MHz dotclock)
|
||||
#
|
||||
# Horizontal Vertical
|
||||
# Resolution 800 600
|
||||
# Scan Frequency 77.160 kHz 120.00 Hz
|
||||
# Sync Width 1.048 us 0.039 ms
|
||||
# 11 chars 3 lines
|
||||
# Front Porch 0.667 us 0.013 ms
|
||||
# 7 chars 1 lines
|
||||
# Back Porch 1.715 us 0.507 ms
|
||||
# 18 chars 39 lines
|
||||
# Active Time 9.529 us 7.776 ms
|
||||
# 100 chars 600 lines
|
||||
# Blank Time 3.431 us 0.557 ms
|
||||
# 36 chars 43 lines
|
||||
# Polarity positive positive
|
||||
#
|
||||
mode "800x600-120"
|
||||
# D: 83.950 MHz, H: 77.160 kHz, V: 120.00 Hz
|
||||
geometry 800 600 800 600 32
|
||||
timings 11912 144 56 39 1 88 3 hsync high vsync high endmode
|
||||
#
|
||||
# 848x480, 60 Hz, Non-Interlaced (31.490 MHz dotclock)
|
||||
#
|
||||
# Horizontal Vertical
|
||||
# Resolution 848 480
|
||||
# Scan Frequency 29.820 kHz 60.00 Hz
|
||||
# Sync Width 2.795 us 0.099 ms
|
||||
# 11 chars 3 lines
|
||||
# Front Porch 0.508 us 0.033 ms
|
||||
# 2 chars 1 lines
|
||||
# Back Porch 3.303 us 0.429 ms
|
||||
# 13 chars 13 lines
|
||||
# Active Time 26.929 us 16.097 ms
|
||||
# 106 chars 480 lines
|
||||
# Blank Time 6.605 us 0.570 ms
|
||||
# 26 chars 17 lines
|
||||
# Polarity positive positive
|
||||
#
|
||||
mode "848x480-60"
|
||||
# D: 31.500 MHz, H: 29.830 kHz, V: 60.00 Hz
|
||||
geometry 848 480 848 480 32
|
||||
timings 31746 104 24 12 3 80 5 hsync high vsync high endmode
|
||||
#
|
||||
# 856x480, 60 Hz, Non-Interlaced (31.728 MHz dotclock)
|
||||
#
|
||||
# Horizontal Vertical
|
||||
# Resolution 856 480
|
||||
# Scan Frequency 29.820 kHz 60.00 Hz
|
||||
# Sync Width 2.774 us 0.099 ms
|
||||
# 11 chars 3 lines
|
||||
# Front Porch 0.504 us 0.033 ms
|
||||
# 2 chars 1 lines
|
||||
# Back Porch 3.728 us 0.429 ms
|
||||
# 13 chars 13 lines
|
||||
# Active Time 26.979 us 16.097 ms
|
||||
# 107 chars 480 lines
|
||||
# Blank Time 6.556 us 0.570 ms
|
||||
# 26 chars 17 lines
|
||||
# Polarity positive positive
|
||||
#
|
||||
mode "856x480-60"
|
||||
# D: 31.728 MHz, H: 29.820 kHz, V: 60.00 Hz
|
||||
geometry 856 480 856 480 32
|
||||
timings 31518 104 16 13 1 88 3
|
||||
hsync high vsync high endmode mode "960x600-60"
|
||||
# D: 45.250 MHz, H: 37.212 kHz, V: 60.00 Hz
|
||||
geometry 960 600 960 600 32 timings 22099 128 32 15 3 96 6 endmode
|
||||
#
|
||||
# 1000x600, 60 Hz, Non-Interlaced (48.068 MHz dotclock)
|
||||
#
|
||||
# Horizontal Vertical
|
||||
# Resolution 1000 600
|
||||
# Scan Frequency 37.320 kHz 60.00 Hz
|
||||
# Sync Width 2.164 us 0.080 ms
|
||||
# 13 chars 3 lines
|
||||
# Front Porch 0.832 us 0.027 ms
|
||||
# 5 chars 1 lines
|
||||
# Back Porch 2.996 us 0.483 ms
|
||||
# 18 chars 18 lines
|
||||
# Active Time 20.804 us 16.077 ms
|
||||
# 125 chars 600 lines
|
||||
# Blank Time 5.991 us 0.589 ms
|
||||
# 36 chars 22 lines
|
||||
# Polarity negative positive
|
||||
#
|
||||
mode "1000x600-60"
|
||||
# D: 48.068 MHz, H: 37.320 kHz, V: 60.00 Hz
|
||||
geometry 1000 600 1000 600 32
|
||||
timings 20834 144 40 18 1 104 3 endmode mode "1024x576-60"
|
||||
# D: 46.996 MHz, H: 35.820 kHz, V: 60.00 Hz
|
||||
geometry 1024 576 1024 576 32
|
||||
timings 21278 144 40 17 1 104 3 endmode mode "1024x600-60"
|
||||
# D: 48.964 MHz, H: 37.320 kHz, V: 60.00 Hz
|
||||
geometry 1024 600 1024 600 32
|
||||
timings 20461 144 40 18 1 104 3 endmode mode "1088x612-60"
|
||||
# D: 52.952 MHz, H: 38.040 kHz, V: 60.00 Hz
|
||||
geometry 1088 612 1088 612 32 timings 18877 152 48 16 3 104 5 endmode
|
||||
#
|
||||
# 1024x512, 60 Hz, Non-Interlaced (41.291 MHz dotclock)
|
||||
#
|
||||
# Horizontal Vertical
|
||||
# Resolution 1024 512
|
||||
# Scan Frequency 31.860 kHz 60.00 Hz
|
||||
# Sync Width 2.519 us 0.094 ms
|
||||
# 13 chars 3 lines
|
||||
# Front Porch 0.775 us 0.031 ms
|
||||
# 4 chars 1 lines
|
||||
# Back Porch 3.294 us 0.465 ms
|
||||
# 17 chars 15 lines
|
||||
# Active Time 24.800 us 16.070 ms
|
||||
# 128 chars 512 lines
|
||||
# Blank Time 6.587 us 0.596 ms
|
||||
# 34 chars 19 lines
|
||||
# Polarity positive positive
|
||||
#
|
||||
mode "1024x512-60"
|
||||
# D: 41.291 MHz, H: 31.860 kHz, V: 60.00 Hz
|
||||
geometry 1024 512 1024 512 32
|
||||
timings 24218 126 32 15 1 104 3 hsync high vsync high endmode
|
||||
#
|
||||
# 1024x600, 60 Hz, Non-Interlaced (48.875 MHz dotclock)
|
||||
#
|
||||
# Horizontal Vertical
|
||||
# Resolution 1024 768
|
||||
# Scan Frequency 37.252 kHz 60.00 Hz
|
||||
# Sync Width 2.128 us 80.532us
|
||||
# 13 chars 3 lines
|
||||
# Front Porch 0.818 us 26.844 us
|
||||
# 5 chars 1 lines
|
||||
# Back Porch 2.946 us 483.192 us
|
||||
# 18 chars 18 lines
|
||||
# Active Time 20.951 us 16.697 ms
|
||||
# 128 chars 622 lines
|
||||
# Blank Time 5.893 us 0.591 ms
|
||||
# 36 chars 22 lines
|
||||
# Polarity negative positive
|
||||
#
|
||||
#mode "1024x600-60"
|
||||
# # D: 48.875 MHz, H: 37.252 kHz, V: 60.00 Hz
|
||||
# geometry 1024 600 1024 600 32
|
||||
# timings 20460 144 40 18 1 104 3
|
||||
# endmode
|
||||
#
|
||||
# 1024x768, 60 Hz, Non-Interlaced (65.00 MHz dotclock)
|
||||
#
|
||||
# Horizontal Vertical
|
||||
# Resolution 1024 768
|
||||
# Scan Frequency 48.363 kHz 60.00 Hz
|
||||
# Sync Width 2.092 us 0.124 ms
|
||||
# 17 chars 6 lines
|
||||
# Front Porch 0.369 us 0.062 ms
|
||||
# 3 chars 3 lines
|
||||
# Back Porch 2.462 us 0.601 ms
|
||||
# 20 chars 29 lines
|
||||
# Active Time 15.754 us 15.880 ms
|
||||
# 128 chars 768 lines
|
||||
# Blank Time 4.923 us 0.786 ms
|
||||
# 40 chars 38 lines
|
||||
# Polarity negative negative
|
||||
#
|
||||
mode "1024x768-60"
|
||||
# D: 65.00 MHz, H: 48.363 kHz, V: 60.00 Hz
|
||||
geometry 1024 768 1024 768 32 timings 15385 160 24 29 3 136 6 endmode
|
||||
#
|
||||
# 1024x768, 75 Hz, Non-Interlaced (78.75 MHz dotclock)
|
||||
#
|
||||
# Horizontal Vertical
|
||||
# Resolution 1024 768
|
||||
# Scan Frequency 60.023 kHz 75.03 Hz
|
||||
# Sync Width 1.219 us 0.050 ms
|
||||
# 12 chars 3 lines
|
||||
# Front Porch 0.203 us 0.017 ms
|
||||
# 2 chars 1 lines
|
||||
# Back Porch 2.235 us 0.466 ms
|
||||
# 22 chars 28 lines
|
||||
# Active Time 13.003 us 12.795 ms
|
||||
# 128 chars 768 lines
|
||||
# Blank Time 3.657 us 0.533 ms
|
||||
# 36 chars 32 lines
|
||||
# Polarity positive positive
|
||||
#
|
||||
mode "1024x768-75"
|
||||
# D: 78.75 MHz, H: 60.023 kHz, V: 75.03 Hz
|
||||
geometry 1024 768 1024 768 32
|
||||
timings 12699 176 16 28 1 96 3 hsync high vsync high endmode
|
||||
#
|
||||
# 1024x768, 85 Hz, Non-Interlaced (94.50 MHz dotclock)
|
||||
#
|
||||
# Horizontal Vertical
|
||||
# Resolution 1024 768
|
||||
# Scan Frequency 68.677 kHz 85.00 Hz
|
||||
# Sync Width 1.016 us 0.044 ms
|
||||
# 12 chars 3 lines
|
||||
# Front Porch 0.508 us 0.015 ms
|
||||
# 6 chars 1 lines
|
||||
# Back Porch 2.201 us 0.524 ms
|
||||
# 26 chars 36 lines
|
||||
# Active Time 10.836 us 11.183 ms
|
||||
# 128 chars 768 lines
|
||||
# Blank Time 3.725 us 0.582 ms
|
||||
# 44 chars 40 lines
|
||||
# Polarity positive positive
|
||||
#
|
||||
mode "1024x768-85"
|
||||
# D: 94.50 MHz, H: 68.677 kHz, V: 85.00 Hz
|
||||
geometry 1024 768 1024 768 32
|
||||
timings 10582 208 48 36 1 96 3 hsync high vsync high endmode
|
||||
#
|
||||
# 1024x768, 100 Hz, Non-Interlaced (110.0 MHz dotclock)
|
||||
#
|
||||
# Horizontal Vertical
|
||||
# Resolution 1024 768
|
||||
# Scan Frequency 79.023 kHz 99.78 Hz
|
||||
# Sync Width 0.800 us 0.101 ms
|
||||
# 11 chars 8 lines
|
||||
# Front Porch 0.000 us 0.000 ms
|
||||
# 0 chars 0 lines
|
||||
# Back Porch 2.545 us 0.202 ms
|
||||
# 35 chars 16 lines
|
||||
# Active Time 9.309 us 9.719 ms
|
||||
# 128 chars 768 lines
|
||||
# Blank Time 3.345 us 0.304 ms
|
||||
# 46 chars 24 lines
|
||||
# Polarity negative negative
|
||||
#
|
||||
mode "1024x768-100"
|
||||
# D: 113.3 MHz, H: 79.023 kHz, V: 99.78 Hz
|
||||
geometry 1024 768 1024 768 32
|
||||
timings 8825 280 0 16 0 88 8 endmode mode "1152x720-60"
|
||||
# D: 66.750 MHz, H: 44.859 kHz, V: 60.00 Hz
|
||||
geometry 1152 720 1152 720 32 timings 14981 168 56 19 3 112 6 endmode
|
||||
#
|
||||
# 1152x864, 75 Hz, Non-Interlaced (110.0 MHz dotclock)
|
||||
#
|
||||
# Horizontal Vertical
|
||||
# Resolution 1152 864
|
||||
# Scan Frequency 75.137 kHz 74.99 Hz
|
||||
# Sync Width 1.309 us 0.106 ms
|
||||
# 18 chars 8 lines
|
||||
# Front Porch 0.245 us 0.599 ms
|
||||
# 3 chars 45 lines
|
||||
# Back Porch 1.282 us 1.132 ms
|
||||
# 18 chars 85 lines
|
||||
# Active Time 10.473 us 11.499 ms
|
||||
# 144 chars 864 lines
|
||||
# Blank Time 2.836 us 1.837 ms
|
||||
# 39 chars 138 lines
|
||||
# Polarity positive positive
|
||||
#
|
||||
mode "1152x864-75"
|
||||
# D: 110.0 MHz, H: 75.137 kHz, V: 74.99 Hz
|
||||
geometry 1152 864 1152 864 32
|
||||
timings 9259 144 24 85 45 144 8
|
||||
hsync high vsync high endmode mode "1200x720-60"
|
||||
# D: 70.184 MHz, H: 44.760 kHz, V: 60.00 Hz
|
||||
geometry 1200 720 1200 720 32
|
||||
timings 14253 184 28 22 1 128 3 endmode mode "1280x600-60"
|
||||
# D: 61.503 MHz, H: 37.320 kHz, V: 60.00 Hz
|
||||
geometry 1280 600 1280 600 32
|
||||
timings 16260 184 28 18 1 128 3 endmode mode "1280x720-50"
|
||||
# D: 60.466 MHz, H: 37.050 kHz, V: 50.00 Hz
|
||||
geometry 1280 720 1280 720 32
|
||||
timings 16538 176 48 17 1 128 3 endmode mode "1280x768-50"
|
||||
# D: 65.178 MHz, H: 39.550 kHz, V: 50.00 Hz
|
||||
geometry 1280 768 1280 768 32 timings 15342 184 28 19 1 128 3 endmode
|
||||
#
|
||||
# 1280x768, 60 Hz, Non-Interlaced (80.136 MHz dotclock)
|
||||
#
|
||||
# Horizontal Vertical
|
||||
# Resolution 1280 768
|
||||
# Scan Frequency 47.700 kHz 60.00 Hz
|
||||
# Sync Width 1.697 us 0.063 ms
|
||||
# 17 chars 3 lines
|
||||
# Front Porch 0.799 us 0.021 ms
|
||||
# 8 chars 1 lines
|
||||
# Back Porch 2.496 us 0.483 ms
|
||||
# 25 chars 23 lines
|
||||
# Active Time 15.973 us 16.101 ms
|
||||
# 160 chars 768 lines
|
||||
# Blank Time 4.992 us 0.566 ms
|
||||
# 50 chars 27 lines
|
||||
# Polarity positive positive
|
||||
#
|
||||
mode "1280x768-60"
|
||||
# D: 80.13 MHz, H: 47.700 kHz, V: 60.00 Hz
|
||||
geometry 1280 768 1280 768 32
|
||||
timings 12480 200 48 23 1 126 3 hsync high vsync high endmode
|
||||
#
|
||||
# 1280x800, 60 Hz, Non-Interlaced (83.375 MHz dotclock)
|
||||
#
|
||||
# Horizontal Vertical
|
||||
# Resolution 1280 800
|
||||
# Scan Frequency 49.628 kHz 60.00 Hz
|
||||
# Sync Width 1.631 us 60.450 us
|
||||
# 17 chars 3 lines
|
||||
# Front Porch 0.768 us 20.15 us
|
||||
# 8 chars 1 lines
|
||||
# Back Porch 2.399 us 0.483 ms
|
||||
# 25 chars 24 lines
|
||||
# Active Time 15.352 us 16.120 ms
|
||||
# 160 chars 800 lines
|
||||
# Blank Time 4.798 us 0.564 ms
|
||||
# 50 chars 28 lines
|
||||
# Polarity negtive positive
|
||||
#
|
||||
mode "1280x800-60"
|
||||
# D: 83.500 MHz, H: 49.702 kHz, V: 60.00 Hz
|
||||
geometry 1280 800 1280 800 32 timings 11994 200 72 22 3 128 6 endmode
|
||||
#
|
||||
# 1280x960, 60 Hz, Non-Interlaced (108.00 MHz dotclock)
|
||||
#
|
||||
# Horizontal Vertical
|
||||
# Resolution 1280 960
|
||||
# Scan Frequency 60.000 kHz 60.00 Hz
|
||||
# Sync Width 1.037 us 0.050 ms
|
||||
# 14 chars 3 lines
|
||||
# Front Porch 0.889 us 0.017 ms
|
||||
# 12 chars 1 lines
|
||||
# Back Porch 2.889 us 0.600 ms
|
||||
# 39 chars 36 lines
|
||||
# Active Time 11.852 us 16.000 ms
|
||||
# 160 chars 960 lines
|
||||
# Blank Time 4.815 us 0.667 ms
|
||||
# 65 chars 40 lines
|
||||
# Polarity positive positive
|
||||
#
|
||||
mode "1280x960-60"
|
||||
# D: 108.00 MHz, H: 60.000 kHz, V: 60.00 Hz
|
||||
geometry 1280 960 1280 960 32
|
||||
timings 9259 312 96 36 1 112 3 hsync high vsync high endmode
|
||||
#
|
||||
# 1280x1024, 60 Hz, Non-Interlaced (108.00 MHz dotclock)
|
||||
#
|
||||
# Horizontal Vertical
|
||||
# Resolution 1280 1024
|
||||
# Scan Frequency 63.981 kHz 60.02 Hz
|
||||
# Sync Width 1.037 us 0.047 ms
|
||||
# 14 chars 3 lines
|
||||
# Front Porch 0.444 us 0.015 ms
|
||||
# 6 chars 1 lines
|
||||
# Back Porch 2.297 us 0.594 ms
|
||||
# 31 chars 38 lines
|
||||
# Active Time 11.852 us 16.005 ms
|
||||
# 160 chars 1024 lines
|
||||
# Blank Time 3.778 us 0.656 ms
|
||||
# 51 chars 42 lines
|
||||
# Polarity positive positive
|
||||
#
|
||||
mode "1280x1024-60"
|
||||
# D: 108.00 MHz, H: 63.981 kHz, V: 60.02 Hz
|
||||
geometry 1280 1024 1280 1024 32
|
||||
timings 9260 248 48 38 1 112 3 hsync high vsync high endmode
|
||||
#
|
||||
# 1280x1024, 75 Hz, Non-Interlaced (135.00 MHz dotclock)
|
||||
#
|
||||
# Horizontal Vertical
|
||||
# Resolution 1280 1024
|
||||
# Scan Frequency 79.976 kHz 75.02 Hz
|
||||
# Sync Width 1.067 us 0.038 ms
|
||||
# 18 chars 3 lines
|
||||
# Front Porch 0.119 us 0.012 ms
|
||||
# 2 chars 1 lines
|
||||
# Back Porch 1.837 us 0.475 ms
|
||||
# 31 chars 38 lines
|
||||
# Active Time 9.481 us 12.804 ms
|
||||
# 160 chars 1024 lines
|
||||
# Blank Time 3.022 us 0.525 ms
|
||||
# 51 chars 42 lines
|
||||
# Polarity positive positive
|
||||
#
|
||||
mode "1280x1024-75"
|
||||
# D: 135.00 MHz, H: 79.976 kHz, V: 75.02 Hz
|
||||
geometry 1280 1024 1280 1024 32
|
||||
timings 7408 248 16 38 1 144 3 hsync high vsync high endmode
|
||||
#
|
||||
# 1280x1024, 85 Hz, Non-Interlaced (157.50 MHz dotclock)
|
||||
#
|
||||
# Horizontal Vertical
|
||||
# Resolution 1280 1024
|
||||
# Scan Frequency 91.146 kHz 85.02 Hz
|
||||
# Sync Width 1.016 us 0.033 ms
|
||||
# 20 chars 3 lines
|
||||
# Front Porch 0.406 us 0.011 ms
|
||||
# 8 chars 1 lines
|
||||
# Back Porch 1.422 us 0.483 ms
|
||||
# 28 chars 44 lines
|
||||
# Active Time 8.127 us 11.235 ms
|
||||
# 160 chars 1024 lines
|
||||
# Blank Time 2.844 us 0.527 ms
|
||||
# 56 chars 48 lines
|
||||
# Polarity positive positive
|
||||
#
|
||||
mode "1280x1024-85"
|
||||
# D: 157.50 MHz, H: 91.146 kHz, V: 85.02 Hz
|
||||
geometry 1280 1024 1280 1024 32
|
||||
timings 6349 224 64 44 1 160 3
|
||||
hsync high vsync high endmode mode "1440x900-60"
|
||||
# D: 106.500 MHz, H: 55.935 kHz, V: 60.00 Hz
|
||||
geometry 1440 900 1440 900 32
|
||||
timings 9390 232 80 25 3 152 6
|
||||
hsync high vsync high endmode mode "1440x900-75"
|
||||
# D: 136.750 MHz, H: 70.635 kHz, V: 75.00 Hz
|
||||
geometry 1440 900 1440 900 32
|
||||
timings 7315 248 96 33 3 152 6 hsync high vsync high endmode
|
||||
#
|
||||
# 1440x1050, 60 Hz, Non-Interlaced (125.10 MHz dotclock)
|
||||
#
|
||||
# Horizontal Vertical
|
||||
# Resolution 1440 1050
|
||||
# Scan Frequency 65.220 kHz 60.00 Hz
|
||||
# Sync Width 1.204 us 0.046 ms
|
||||
# 19 chars 3 lines
|
||||
# Front Porch 0.760 us 0.015 ms
|
||||
# 12 chars 1 lines
|
||||
# Back Porch 1.964 us 0.495 ms
|
||||
# 31 chars 33 lines
|
||||
# Active Time 11.405 us 16.099 ms
|
||||
# 180 chars 1050 lines
|
||||
# Blank Time 3.928 us 0.567 ms
|
||||
# 62 chars 37 lines
|
||||
# Polarity positive positive
|
||||
#
|
||||
mode "1440x1050-60"
|
||||
# D: 125.10 MHz, H: 65.220 kHz, V: 60.00 Hz
|
||||
geometry 1440 1050 1440 1050 32
|
||||
timings 7993 248 96 33 1 152 3
|
||||
hsync high vsync high endmode mode "1600x900-60"
|
||||
# D: 118.250 MHz, H: 55.990 kHz, V: 60.00 Hz
|
||||
geometry 1600 900 1600 900 32
|
||||
timings 8415 256 88 26 3 168 5 endmode mode "1600x1024-60"
|
||||
# D: 136.358 MHz, H: 63.600 kHz, V: 60.00 Hz
|
||||
geometry 1600 1024 1600 1024 32 timings 7315 272 104 32 1 168 3 endmode
|
||||
#
|
||||
# 1600x1200, 60 Hz, Non-Interlaced (156.00 MHz dotclock)
|
||||
#
|
||||
# Horizontal Vertical
|
||||
# Resolution 1600 1200
|
||||
# Scan Frequency 76.200 kHz 60.00 Hz
|
||||
# Sync Width 1.026 us 0.105 ms
|
||||
# 20 chars 8 lines
|
||||
# Front Porch 0.205 us 0.131 ms
|
||||
# 4 chars 10 lines
|
||||
# Back Porch 1.636 us 0.682 ms
|
||||
# 32 chars 52 lines
|
||||
# Active Time 10.256 us 15.748 ms
|
||||
# 200 chars 1200 lines
|
||||
# Blank Time 2.872 us 0.866 ms
|
||||
# 56 chars 66 lines
|
||||
# Polarity negative negative
|
||||
#
|
||||
mode "1600x1200-60"
|
||||
# D: 156.00 MHz, H: 76.200 kHz, V: 60.00 Hz
|
||||
geometry 1600 1200 1600 1200 32 timings 6172 256 32 52 10 160 8 endmode
|
||||
#
|
||||
# 1600x1200, 75 Hz, Non-Interlaced (202.50 MHz dotclock)
|
||||
#
|
||||
# Horizontal Vertical
|
||||
# Resolution 1600 1200
|
||||
# Scan Frequency 93.750 kHz 75.00 Hz
|
||||
# Sync Width 0.948 us 0.032 ms
|
||||
# 24 chars 3 lines
|
||||
# Front Porch 0.316 us 0.011 ms
|
||||
# 8 chars 1 lines
|
||||
# Back Porch 1.501 us 0.491 ms
|
||||
# 38 chars 46 lines
|
||||
# Active Time 7.901 us 12.800 ms
|
||||
# 200 chars 1200 lines
|
||||
# Blank Time 2.765 us 0.533 ms
|
||||
# 70 chars 50 lines
|
||||
# Polarity positive positive
|
||||
#
|
||||
mode "1600x1200-75"
|
||||
# D: 202.50 MHz, H: 93.750 kHz, V: 75.00 Hz
|
||||
geometry 1600 1200 1600 1200 32
|
||||
timings 4938 304 64 46 1 192 3
|
||||
hsync high vsync high endmode mode "1680x1050-60"
|
||||
# D: 146.250 MHz, H: 65.290 kHz, V: 59.954 Hz
|
||||
geometry 1680 1050 1680 1050 32
|
||||
timings 6814 280 104 30 3 176 6
|
||||
hsync high vsync high endmode mode "1680x1050-75"
|
||||
# D: 187.000 MHz, H: 82.306 kHz, V: 74.892 Hz
|
||||
geometry 1680 1050 1680 1050 32
|
||||
timings 5348 296 120 40 3 176 6
|
||||
hsync high vsync high endmode mode "1792x1344-60"
|
||||
# D: 202.975 MHz, H: 83.460 kHz, V: 60.00 Hz
|
||||
geometry 1792 1344 1792 1344 32
|
||||
timings 4902 320 128 43 1 192 3
|
||||
hsync high vsync high endmode mode "1856x1392-60"
|
||||
# D: 218.571 MHz, H: 86.460 kHz, V: 60.00 Hz
|
||||
geometry 1856 1392 1856 1392 32
|
||||
timings 4577 336 136 45 1 200 3
|
||||
hsync high vsync high endmode mode "1920x1200-60"
|
||||
# D: 193.250 MHz, H: 74.556 kHz, V: 60.00 Hz
|
||||
geometry 1920 1200 1920 1200 32
|
||||
timings 5173 336 136 36 3 200 6
|
||||
hsync high vsync high endmode mode "1920x1440-60"
|
||||
# D: 234.000 MHz, H:90.000 kHz, V: 60.00 Hz
|
||||
geometry 1920 1440 1920 1440 32
|
||||
timings 4274 344 128 56 1 208 3
|
||||
hsync high vsync high endmode mode "1920x1440-75"
|
||||
# D: 297.000 MHz, H:112.500 kHz, V: 75.00 Hz
|
||||
geometry 1920 1440 1920 1440 32
|
||||
timings 3367 352 144 56 1 224 3
|
||||
hsync high vsync high endmode mode "2048x1536-60"
|
||||
# D: 267.250 MHz, H: 95.446 kHz, V: 60.00 Hz
|
||||
geometry 2048 1536 2048 1536 32
|
||||
timings 3742 376 152 49 3 224 4 hsync high vsync high endmode
|
||||
#
|
||||
# 1280x720, 60 Hz, Non-Interlaced (74.481 MHz dotclock)
|
||||
#
|
||||
# Horizontal Vertical
|
||||
# Resolution 1280 720
|
||||
# Scan Frequency 44.760 kHz 60.00 Hz
|
||||
# Sync Width 1.826 us 67.024 ms
|
||||
# 17 chars 3 lines
|
||||
# Front Porch 0.752 us 22.341 ms
|
||||
# 7 chars 1 lines
|
||||
# Back Porch 2.578 us 491.510 ms
|
||||
# 24 chars 22 lines
|
||||
# Active Time 17.186 us 16.086 ms
|
||||
# 160 chars 720 lines
|
||||
# Blank Time 5.156 us 0.581 ms
|
||||
# 48 chars 26 lines
|
||||
# Polarity negative negative
|
||||
#
|
||||
mode "1280x720-60"
|
||||
# D: 74.481 MHz, H: 44.760 kHz, V: 60.00 Hz
|
||||
geometry 1280 720 1280 720 32 timings 13426 192 64 22 1 136 3 endmode
|
||||
#
|
||||
# 1920x1080, 60 Hz, Non-Interlaced (172.798 MHz dotclock)
|
||||
#
|
||||
# Horizontal Vertical
|
||||
# Resolution 1920 1080
|
||||
# Scan Frequency 67.080 kHz 60.00 Hz
|
||||
# Sync Width 1.204 us 44.723 ms
|
||||
# 26 chars 3 lines
|
||||
# Front Porch 0.694 us 14.908 ms
|
||||
# 15 chars 1 lines
|
||||
# Back Porch 1.898 us 506.857 ms
|
||||
# 41 chars 34 lines
|
||||
# Active Time 11.111 us 16.100 ms
|
||||
# 240 chars 1080 lines
|
||||
# Blank Time 3.796 us 0.566 ms
|
||||
# 82 chars 38 lines
|
||||
# Polarity negative negative
|
||||
#
|
||||
mode "1920x1080-60"
|
||||
# D: 74.481 MHz, H: 67.080 kHz, V: 60.00 Hz
|
||||
geometry 1920 1080 1920 1080 32 timings 5787 328 120 34 1 208 3 endmode
|
||||
#
|
||||
# 1400x1050, 60 Hz, Non-Interlaced (122.61 MHz dotclock)
|
||||
#
|
||||
# Horizontal Vertical
|
||||
# Resolution 1400 1050
|
||||
# Scan Frequency 65.218 kHz 59.99 Hz
|
||||
# Sync Width 1.037 us 0.047 ms
|
||||
# 19 chars 3 lines
|
||||
# Front Porch 0.444 us 0.015 ms
|
||||
# 11 chars 1 lines
|
||||
# Back Porch 1.185 us 0.188 ms
|
||||
# 30 chars 33 lines
|
||||
# Active Time 12.963 us 16.411 ms
|
||||
# 175 chars 1050 lines
|
||||
# Blank Time 2.667 us 0.250 ms
|
||||
# 60 chars 37 lines
|
||||
# Polarity negative positive
|
||||
#
|
||||
mode "1400x1050-60"
|
||||
# D: 122.750 MHz, H: 65.317 kHz, V: 59.99 Hz
|
||||
geometry 1400 1050 1408 1050 32
|
||||
timings 8214 232 88 32 3 144 4 endmode mode "1400x1050-75"
|
||||
# D: 156.000 MHz, H: 82.278 kHz, V: 74.867 Hz
|
||||
geometry 1400 1050 1408 1050 32 timings 6410 248 104 42 3 144 4 endmode
|
||||
#
|
||||
# 1366x768, 60 Hz, Non-Interlaced (85.86 MHz dotclock)
|
||||
#
|
||||
# Horizontal Vertical
|
||||
# Resolution 1366 768
|
||||
# Scan Frequency 47.700 kHz 60.00 Hz
|
||||
# Sync Width 1.677 us 0.063 ms
|
||||
# 18 chars 3 lines
|
||||
# Front Porch 0.839 us 0.021 ms
|
||||
# 9 chars 1 lines
|
||||
# Back Porch 2.516 us 0.482 ms
|
||||
# 27 chars 23 lines
|
||||
# Active Time 15.933 us 16.101 ms
|
||||
# 171 chars 768 lines
|
||||
# Blank Time 5.031 us 0.566 ms
|
||||
# 54 chars 27 lines
|
||||
# Polarity negative positive
|
||||
#
|
||||
mode "1360x768-60"
|
||||
# D: 84.750 MHz, H: 47.720 kHz, V: 60.00 Hz
|
||||
geometry 1360 768 1360 768 32
|
||||
timings 11799 208 72 22 3 136 5 endmode mode "1366x768-60"
|
||||
# D: 85.86 MHz, H: 47.700 kHz, V: 60.00 Hz
|
||||
geometry 1366 768 1366 768 32
|
||||
timings 11647 216 72 23 1 144 3 endmode mode "1366x768-50"
|
||||
# D: 69,924 MHz, H: 39.550 kHz, V: 50.00 Hz
|
||||
geometry 1366 768 1366 768 32 timings 14301 200 56 19 1 144 3 endmode
|
214
Documentation/fb/viafb.txt
Normal file
214
Documentation/fb/viafb.txt
Normal file
|
@ -0,0 +1,214 @@
|
|||
|
||||
VIA Integration Graphic Chip Console Framebuffer Driver
|
||||
|
||||
[Platform]
|
||||
-----------------------
|
||||
The console framebuffer driver is for graphics chips of
|
||||
VIA UniChrome Family(CLE266, PM800 / CN400 / CN300,
|
||||
P4M800CE / P4M800Pro / CN700 / VN800,
|
||||
CX700 / VX700, K8M890, P4M890,
|
||||
CN896 / P4M900, VX800)
|
||||
|
||||
[Driver features]
|
||||
------------------------
|
||||
Device: CRT, LCD, DVI
|
||||
|
||||
Support viafb_mode:
|
||||
CRT:
|
||||
640x480(60, 75, 85, 100, 120 Hz), 720x480(60 Hz),
|
||||
720x576(60 Hz), 800x600(60, 75, 85, 100, 120 Hz),
|
||||
848x480(60 Hz), 856x480(60 Hz), 1024x512(60 Hz),
|
||||
1024x768(60, 75, 85, 100 Hz), 1152x864(75 Hz),
|
||||
1280x768(60 Hz), 1280x960(60 Hz), 1280x1024(60, 75, 85 Hz),
|
||||
1440x1050(60 Hz), 1600x1200(60, 75 Hz), 1280x720(60 Hz),
|
||||
1920x1080(60 Hz), 1400x1050(60 Hz), 800x480(60 Hz)
|
||||
|
||||
color depth: 8 bpp, 16 bpp, 32 bpp supports.
|
||||
|
||||
Support 2D hardware accelerator.
|
||||
|
||||
[Using the viafb module]
|
||||
-- -- --------------------
|
||||
Start viafb with default settings:
|
||||
#modprobe viafb
|
||||
|
||||
Start viafb with with user options:
|
||||
#modprobe viafb viafb_mode=800x600 viafb_bpp=16 viafb_refresh=60
|
||||
viafb_active_dev=CRT+DVI viafb_dvi_port=DVP1
|
||||
viafb_mode1=1024x768 viafb_bpp=16 viafb_refresh1=60
|
||||
viafb_SAMM_ON=1
|
||||
|
||||
viafb_mode:
|
||||
640x480 (default)
|
||||
720x480
|
||||
800x600
|
||||
1024x768
|
||||
......
|
||||
|
||||
viafb_bpp:
|
||||
8, 16, 32 (default:32)
|
||||
|
||||
viafb_refresh:
|
||||
60, 75, 85, 100, 120 (default:60)
|
||||
|
||||
viafb_lcd_dsp_method:
|
||||
0 : expansion (default)
|
||||
1 : centering
|
||||
|
||||
viafb_lcd_mode:
|
||||
0 : LCD panel with LSB data format input (default)
|
||||
1 : LCD panel with MSB data format input
|
||||
|
||||
viafb_lcd_panel_id:
|
||||
0 : Resolution: 640x480, Channel: single, Dithering: Enable
|
||||
1 : Resolution: 800x600, Channel: single, Dithering: Enable
|
||||
2 : Resolution: 1024x768, Channel: single, Dithering: Enable (default)
|
||||
3 : Resolution: 1280x768, Channel: single, Dithering: Enable
|
||||
4 : Resolution: 1280x1024, Channel: dual, Dithering: Enable
|
||||
5 : Resolution: 1400x1050, Channel: dual, Dithering: Enable
|
||||
6 : Resolution: 1600x1200, Channel: dual, Dithering: Enable
|
||||
|
||||
8 : Resolution: 800x480, Channel: single, Dithering: Enable
|
||||
9 : Resolution: 1024x768, Channel: dual, Dithering: Enable
|
||||
10: Resolution: 1024x768, Channel: single, Dithering: Disable
|
||||
11: Resolution: 1024x768, Channel: dual, Dithering: Disable
|
||||
12: Resolution: 1280x768, Channel: single, Dithering: Disable
|
||||
13: Resolution: 1280x1024, Channel: dual, Dithering: Disable
|
||||
14: Resolution: 1400x1050, Channel: dual, Dithering: Disable
|
||||
15: Resolution: 1600x1200, Channel: dual, Dithering: Disable
|
||||
16: Resolution: 1366x768, Channel: single, Dithering: Disable
|
||||
17: Resolution: 1024x600, Channel: single, Dithering: Enable
|
||||
18: Resolution: 1280x768, Channel: dual, Dithering: Enable
|
||||
19: Resolution: 1280x800, Channel: single, Dithering: Enable
|
||||
|
||||
viafb_accel:
|
||||
0 : No 2D Hardware Acceleration
|
||||
1 : 2D Hardware Acceleration (default)
|
||||
|
||||
viafb_SAMM_ON:
|
||||
0 : viafb_SAMM_ON disable (default)
|
||||
1 : viafb_SAMM_ON enable
|
||||
|
||||
viafb_mode1: (secondary display device)
|
||||
640x480 (default)
|
||||
720x480
|
||||
800x600
|
||||
1024x768
|
||||
... ...
|
||||
|
||||
viafb_bpp1: (secondary display device)
|
||||
8, 16, 32 (default:32)
|
||||
|
||||
viafb_refresh1: (secondary display device)
|
||||
60, 75, 85, 100, 120 (default:60)
|
||||
|
||||
viafb_active_dev:
|
||||
This option is used to specify active devices.(CRT, DVI, CRT+LCD...)
|
||||
DVI stands for DVI or HDMI, E.g., If you want to enable HDMI,
|
||||
set viafb_active_dev=DVI. In SAMM case, the previous of
|
||||
viafb_active_dev is primary device, and the following is
|
||||
secondary device.
|
||||
|
||||
For example:
|
||||
To enable one device, such as DVI only, we can use:
|
||||
modprobe viafb viafb_active_dev=DVI
|
||||
To enable two devices, such as CRT+DVI:
|
||||
modprobe viafb viafb_active_dev=CRT+DVI;
|
||||
|
||||
For DuoView case, we can use:
|
||||
modprobe viafb viafb_active_dev=CRT+DVI
|
||||
OR
|
||||
modprobe viafb viafb_active_dev=DVI+CRT...
|
||||
|
||||
For SAMM case:
|
||||
If CRT is primary and DVI is secondary, we should use:
|
||||
modprobe viafb viafb_active_dev=CRT+DVI viafb_SAMM_ON=1...
|
||||
If DVI is primary and CRT is secondary, we should use:
|
||||
modprobe viafb viafb_active_dev=DVI+CRT viafb_SAMM_ON=1...
|
||||
|
||||
viafb_display_hardware_layout:
|
||||
This option is used to specify display hardware layout for CX700 chip.
|
||||
1 : LCD only
|
||||
2 : DVI only
|
||||
3 : LCD+DVI (default)
|
||||
4 : LCD1+LCD2 (internal + internal)
|
||||
16: LCD1+ExternalLCD2 (internal + external)
|
||||
|
||||
viafb_second_size:
|
||||
This option is used to set second device memory size(MB) in SAMM case.
|
||||
The minimal size is 16.
|
||||
|
||||
viafb_platform_epia_dvi:
|
||||
This option is used to enable DVI on EPIA - M
|
||||
0 : No DVI on EPIA - M (default)
|
||||
1 : DVI on EPIA - M
|
||||
|
||||
viafb_bus_width:
|
||||
When using 24 - Bit Bus Width Digital Interface,
|
||||
this option should be set.
|
||||
12: 12-Bit LVDS or 12-Bit TMDS (default)
|
||||
24: 24-Bit LVDS or 24-Bit TMDS
|
||||
|
||||
viafb_device_lcd_dualedge:
|
||||
When using Dual Edge Panel, this option should be set.
|
||||
0 : No Dual Edge Panel (default)
|
||||
1 : Dual Edge Panel
|
||||
|
||||
viafb_video_dev:
|
||||
This option is used to specify video output devices(CRT, DVI, LCD) for
|
||||
duoview case.
|
||||
For example:
|
||||
To output video on DVI, we should use:
|
||||
modprobe viafb viafb_video_dev=DVI...
|
||||
|
||||
viafb_lcd_port:
|
||||
This option is used to specify LCD output port,
|
||||
available values are "DVP0" "DVP1" "DFP_HIGHLOW" "DFP_HIGH" "DFP_LOW".
|
||||
for external LCD + external DVI on CX700(External LCD is on DVP0),
|
||||
we should use:
|
||||
modprobe viafb viafb_lcd_port=DVP0...
|
||||
|
||||
Notes:
|
||||
1. CRT may not display properly for DuoView CRT & DVI display at
|
||||
the "640x480" PAL mode with DVI overscan enabled.
|
||||
2. SAMM stands for single adapter multi monitors. It is different from
|
||||
multi-head since SAMM support multi monitor at driver layers, thus fbcon
|
||||
layer doesn't even know about it; SAMM's second screen doesn't have a
|
||||
device node file, thus a user mode application can't access it directly.
|
||||
When SAMM is enabled, viafb_mode and viafb_mode1, viafb_bpp and
|
||||
viafb_bpp1, viafb_refresh and viafb_refresh1 can be different.
|
||||
3. When console is depending on viafbinfo1, dynamically change resolution
|
||||
and bpp, need to call VIAFB specified ioctl interface VIAFB_SET_DEVICE
|
||||
instead of calling common ioctl function FBIOPUT_VSCREENINFO since
|
||||
viafb doesn't support multi-head well, or it will cause screen crush.
|
||||
4. VX800 2D accelerator hasn't been supported in this driver yet. When
|
||||
using driver on VX800, the driver will disable the acceleration
|
||||
function as default.
|
||||
|
||||
|
||||
[Configure viafb with "fbset" tool]
|
||||
-----------------------------------
|
||||
"fbset" is an inbox utility of Linux.
|
||||
1. Inquire current viafb information, type,
|
||||
# fbset -i
|
||||
|
||||
2. Set various resolutions and viafb_refresh rates,
|
||||
# fbset <resolution-vertical_sync>
|
||||
|
||||
example,
|
||||
# fbset "1024x768-75"
|
||||
or
|
||||
# fbset -g 1024 768 1024 768 32
|
||||
Check the file "/etc/fb.modes" to find display modes available.
|
||||
|
||||
3. Set the color depth,
|
||||
# fbset -depth <value>
|
||||
|
||||
example,
|
||||
# fbset -depth 16
|
||||
|
||||
[Bootup with viafb]:
|
||||
--------------------
|
||||
Add the following line to your grub.conf:
|
||||
append = "video=viafb:viafb_mode=1024x768,viafb_bpp=32,viafb_refresh=85"
|
||||
|
|
@ -6,6 +6,24 @@ be removed from this file.
|
|||
|
||||
---------------------------
|
||||
|
||||
What: old static regulatory information and ieee80211_regdom module parameter
|
||||
When: 2.6.29
|
||||
Why: The old regulatory infrastructure has been replaced with a new one
|
||||
which does not require statically defined regulatory domains. We do
|
||||
not want to keep static regulatory domains in the kernel due to the
|
||||
the dynamic nature of regulatory law and localization. We kept around
|
||||
the old static definitions for the regulatory domains of:
|
||||
* US
|
||||
* JP
|
||||
* EU
|
||||
and used by default the US when CONFIG_WIRELESS_OLD_REGULATORY was
|
||||
set. We also kept around the ieee80211_regdom module parameter in case
|
||||
some applications were relying on it. Changing regulatory domains
|
||||
can now be done instead by using nl80211, as is done with iw.
|
||||
Who: Luis R. Rodriguez <lrodriguez@atheros.com>
|
||||
|
||||
---------------------------
|
||||
|
||||
What: dev->power.power_state
|
||||
When: July 2007
|
||||
Why: Broken design for runtime control over driver power states, confusing
|
||||
|
@ -19,15 +37,6 @@ Who: Pavel Machek <pavel@suse.cz>
|
|||
|
||||
---------------------------
|
||||
|
||||
What: old NCR53C9x driver
|
||||
When: October 2007
|
||||
Why: Replaced by the much better esp_scsi driver. Actual low-level
|
||||
driver can be ported over almost trivially.
|
||||
Who: David Miller <davem@davemloft.net>
|
||||
Christoph Hellwig <hch@lst.de>
|
||||
|
||||
---------------------------
|
||||
|
||||
What: Video4Linux API 1 ioctls and video_decoder.h from Video devices.
|
||||
When: December 2008
|
||||
Files: include/linux/video_decoder.h include/linux/videodev.h
|
||||
|
@ -47,6 +56,30 @@ Who: Mauro Carvalho Chehab <mchehab@infradead.org>
|
|||
|
||||
---------------------------
|
||||
|
||||
What: old tuner-3036 i2c driver
|
||||
When: 2.6.28
|
||||
Why: This driver is for VERY old i2c-over-parallel port teletext receiver
|
||||
boxes. Rather then spending effort on converting this driver to V4L2,
|
||||
and since it is extremely unlikely that anyone still uses one of these
|
||||
devices, it was decided to drop it.
|
||||
Who: Hans Verkuil <hverkuil@xs4all.nl>
|
||||
Mauro Carvalho Chehab <mchehab@infradead.org>
|
||||
|
||||
---------------------------
|
||||
|
||||
What: V4L2 dpc7146 driver
|
||||
When: 2.6.28
|
||||
Why: Old driver for the dpc7146 demonstration board that is no longer
|
||||
relevant. The last time this was tested on actual hardware was
|
||||
probably around 2002. Since this is a driver for a demonstration
|
||||
board the decision was made to remove it rather than spending a
|
||||
lot of effort continually updating this driver to stay in sync
|
||||
with the latest internal V4L2 or I2C API.
|
||||
Who: Hans Verkuil <hverkuil@xs4all.nl>
|
||||
Mauro Carvalho Chehab <mchehab@infradead.org>
|
||||
|
||||
---------------------------
|
||||
|
||||
What: PCMCIA control ioctl (needed for pcmcia-cs [cardmgr, cardctl])
|
||||
When: November 2005
|
||||
Files: drivers/pcmcia/: pcmcia_ioctl.c
|
||||
|
@ -138,24 +171,6 @@ Who: Kay Sievers <kay.sievers@suse.de>
|
|||
|
||||
---------------------------
|
||||
|
||||
What: find_task_by_pid
|
||||
When: 2.6.26
|
||||
Why: With pid namespaces, calling this funciton will return the
|
||||
wrong task when called from inside a namespace.
|
||||
|
||||
The best way to save a task pid and find a task by this
|
||||
pid later, is to find this task's struct pid pointer (or get
|
||||
it directly from the task) and call pid_task() later.
|
||||
|
||||
If someone really needs to get a task by its pid_t, then
|
||||
he most likely needs the find_task_by_vpid() to get the
|
||||
task from the same namespace as the current task is in, but
|
||||
this may be not so in general.
|
||||
|
||||
Who: Pavel Emelyanov <xemul@openvz.org>
|
||||
|
||||
---------------------------
|
||||
|
||||
What: ACPI procfs interface
|
||||
When: July 2008
|
||||
Why: ACPI sysfs conversion should be finished by January 2008.
|
||||
|
@ -199,19 +214,6 @@ Who: Tejun Heo <htejun@gmail.com>
|
|||
|
||||
---------------------------
|
||||
|
||||
What: The arch/ppc and include/asm-ppc directories
|
||||
When: Jun 2008
|
||||
Why: The arch/powerpc tree is the merged architecture for ppc32 and ppc64
|
||||
platforms. Currently there are efforts underway to port the remaining
|
||||
arch/ppc platforms to the merged tree. New submissions to the arch/ppc
|
||||
tree have been frozen with the 2.6.22 kernel release and that tree will
|
||||
remain in bug-fix only mode until its scheduled removal. Platforms
|
||||
that are not ported by June 2008 will be removed due to the lack of an
|
||||
interested maintainer.
|
||||
Who: linuxppc-dev@ozlabs.org
|
||||
|
||||
---------------------------
|
||||
|
||||
What: i386/x86_64 bzImage symlinks
|
||||
When: April 2010
|
||||
|
||||
|
@ -248,6 +250,9 @@ What (Why):
|
|||
- xt_mark match revision 0
|
||||
(superseded by xt_mark match revision 1)
|
||||
|
||||
- xt_recent: the old ipt_recent proc dir
|
||||
(superseded by /proc/net/xt_recent)
|
||||
|
||||
When: January 2009 or Linux 2.7.0, whichever comes first
|
||||
Why: Superseded by newer revisions or modules
|
||||
Who: Jan Engelhardt <jengelh@computergmbh.de>
|
||||
|
@ -282,11 +287,19 @@ Who: Glauber Costa <gcosta@redhat.com>
|
|||
|
||||
---------------------------
|
||||
|
||||
What: old style serial driver for ColdFire (CONFIG_SERIAL_COLDFIRE)
|
||||
When: 2.6.28
|
||||
Why: This driver still uses the old interface and has been replaced
|
||||
by CONFIG_SERIAL_MCF.
|
||||
Who: Sebastian Siewior <sebastian@breakpoint.cc>
|
||||
What: remove HID compat support
|
||||
When: 2.6.29
|
||||
Why: needed only as a temporary solution until distros fix themselves up
|
||||
Who: Jiri Slaby <jirislaby@gmail.com>
|
||||
|
||||
---------------------------
|
||||
|
||||
What: print_fn_descriptor_symbol()
|
||||
When: October 2009
|
||||
Why: The %pF vsprintf format provides the same functionality in a
|
||||
simpler way. print_fn_descriptor_symbol() is deprecated but
|
||||
still present to give out-of-tree modules time to change.
|
||||
Who: Bjorn Helgaas <bjorn.helgaas@hp.com>
|
||||
|
||||
---------------------------
|
||||
|
||||
|
@ -300,11 +313,15 @@ Who: ocfs2-devel@oss.oracle.com
|
|||
|
||||
---------------------------
|
||||
|
||||
What: asm/semaphore.h
|
||||
When: 2.6.26
|
||||
Why: Implementation became generic; users should now include
|
||||
linux/semaphore.h instead.
|
||||
Who: Matthew Wilcox <willy@linux.intel.com>
|
||||
What: SCTP_GET_PEER_ADDRS_NUM_OLD, SCTP_GET_PEER_ADDRS_OLD,
|
||||
SCTP_GET_LOCAL_ADDRS_NUM_OLD, SCTP_GET_LOCAL_ADDRS_OLD
|
||||
When: June 2009
|
||||
Why: A newer version of the options have been introduced in 2005 that
|
||||
removes the limitions of the old API. The sctp library has been
|
||||
converted to use these new options at the same time. Any user
|
||||
space app that directly uses the old options should convert to using
|
||||
the new options.
|
||||
Who: Vlad Yasevich <vladislav.yasevich@hp.com>
|
||||
|
||||
---------------------------
|
||||
|
||||
|
@ -314,3 +331,39 @@ Why: This option was introduced just to allow older lm-sensors userspace
|
|||
to keep working over the upgrade to 2.6.26. At the scheduled time of
|
||||
removal fixed lm-sensors (2.x or 3.x) should be readily available.
|
||||
Who: Rene Herman <rene.herman@gmail.com>
|
||||
|
||||
---------------------------
|
||||
|
||||
What: Code that is now under CONFIG_WIRELESS_EXT_SYSFS
|
||||
(in net/core/net-sysfs.c)
|
||||
When: After the only user (hal) has seen a release with the patches
|
||||
for enough time, probably some time in 2010.
|
||||
Why: Over 1K .text/.data size reduction, data is available in other
|
||||
ways (ioctls)
|
||||
Who: Johannes Berg <johannes@sipsolutions.net>
|
||||
|
||||
---------------------------
|
||||
|
||||
What: CONFIG_NF_CT_ACCT
|
||||
When: 2.6.29
|
||||
Why: Accounting can now be enabled/disabled without kernel recompilation.
|
||||
Currently used only to set a default value for a feature that is also
|
||||
controlled by a kernel/module/sysfs/sysctl parameter.
|
||||
Who: Krzysztof Piotr Oledzki <ole@ans.pl>
|
||||
|
||||
---------------------------
|
||||
|
||||
What: ide-scsi (BLK_DEV_IDESCSI)
|
||||
When: 2.6.29
|
||||
Why: The 2.6 kernel supports direct writing to ide CD drives, which
|
||||
eliminates the need for ide-scsi. The new method is more
|
||||
efficient in every way.
|
||||
Who: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
||||
|
||||
---------------------------
|
||||
|
||||
What: i2c_attach_client(), i2c_detach_client(), i2c_driver->detach_client()
|
||||
When: 2.6.29 (ideally) or 2.6.30 (more likely)
|
||||
Why: Deprecated by the new (standard) device driver binding model. Use
|
||||
i2c_driver->probe() and ->remove() instead.
|
||||
Who: Jean Delvare <khali@linux-fr.org>
|
||||
|
|
|
@ -144,8 +144,8 @@ prototypes:
|
|||
void (*kill_sb) (struct super_block *);
|
||||
locking rules:
|
||||
may block BKL
|
||||
get_sb yes yes
|
||||
kill_sb yes yes
|
||||
get_sb yes no
|
||||
kill_sb yes no
|
||||
|
||||
->get_sb() returns error or 0 with locked superblock attached to the vfsmount
|
||||
(exclusive on ->s_umount).
|
||||
|
@ -409,12 +409,12 @@ ioctl: yes (see below)
|
|||
unlocked_ioctl: no (see below)
|
||||
compat_ioctl: no
|
||||
mmap: no
|
||||
open: maybe (see below)
|
||||
open: no
|
||||
flush: no
|
||||
release: no
|
||||
fsync: no (see below)
|
||||
aio_fsync: no
|
||||
fasync: yes (see below)
|
||||
fasync: no
|
||||
lock: yes
|
||||
readv: no
|
||||
writev: no
|
||||
|
@ -431,13 +431,6 @@ For many filesystems, it is probably safe to acquire the inode
|
|||
semaphore. Note some filesystems (i.e. remote ones) provide no
|
||||
protection for i_size so you will need to use the BKL.
|
||||
|
||||
->open() locking is in-transit: big lock partially moved into the methods.
|
||||
The only exception is ->open() in the instances of file_operations that never
|
||||
end up in ->i_fop/->proc_fops, i.e. ones that belong to character devices
|
||||
(chrdev_open() takes lock before replacing ->f_op and calling the secondary
|
||||
method. As soon as we fix the handling of module reference counters all
|
||||
instances of ->open() will be called without the BKL.
|
||||
|
||||
Note: ext2_release() was *the* source of contention on fs-intensive
|
||||
loads and dropping BKL on ->release() helps to get rid of that (we still
|
||||
grab BKL for cases when we close a file that had been opened r/w, but that
|
||||
|
@ -510,6 +503,7 @@ prototypes:
|
|||
void (*close)(struct vm_area_struct*);
|
||||
int (*fault)(struct vm_area_struct*, struct vm_fault *);
|
||||
int (*page_mkwrite)(struct vm_area_struct *, struct page *);
|
||||
int (*access)(struct vm_area_struct *, unsigned long, void*, int, int);
|
||||
|
||||
locking rules:
|
||||
BKL mmap_sem PageLocked(page)
|
||||
|
@ -517,6 +511,7 @@ open: no yes
|
|||
close: no yes
|
||||
fault: no yes
|
||||
page_mkwrite: no yes no
|
||||
access: no yes
|
||||
|
||||
->page_mkwrite() is called when a previously read-only page is
|
||||
about to become writeable. The file system is responsible for
|
||||
|
@ -525,6 +520,11 @@ taking to lock out truncate, the page range should be verified to be
|
|||
within i_size. The page mapping should also be checked that it is not
|
||||
NULL.
|
||||
|
||||
->access() is called when get_user_pages() fails in
|
||||
acces_process_vm(), typically used to debug a process through
|
||||
/proc/pid/mem or ptrace. This function is needed only for
|
||||
VM_IO | VM_PFNMAP VMAs.
|
||||
|
||||
================================================================================
|
||||
Dubious stuff
|
||||
|
||||
|
|
393
Documentation/filesystems/autofs4-mount-control.txt
Normal file
393
Documentation/filesystems/autofs4-mount-control.txt
Normal file
|
@ -0,0 +1,393 @@
|
|||
|
||||
Miscellaneous Device control operations for the autofs4 kernel module
|
||||
====================================================================
|
||||
|
||||
The problem
|
||||
===========
|
||||
|
||||
There is a problem with active restarts in autofs (that is to say
|
||||
restarting autofs when there are busy mounts).
|
||||
|
||||
During normal operation autofs uses a file descriptor opened on the
|
||||
directory that is being managed in order to be able to issue control
|
||||
operations. Using a file descriptor gives ioctl operations access to
|
||||
autofs specific information stored in the super block. The operations
|
||||
are things such as setting an autofs mount catatonic, setting the
|
||||
expire timeout and requesting expire checks. As is explained below,
|
||||
certain types of autofs triggered mounts can end up covering an autofs
|
||||
mount itself which prevents us being able to use open(2) to obtain a
|
||||
file descriptor for these operations if we don't already have one open.
|
||||
|
||||
Currently autofs uses "umount -l" (lazy umount) to clear active mounts
|
||||
at restart. While using lazy umount works for most cases, anything that
|
||||
needs to walk back up the mount tree to construct a path, such as
|
||||
getcwd(2) and the proc file system /proc/<pid>/cwd, no longer works
|
||||
because the point from which the path is constructed has been detached
|
||||
from the mount tree.
|
||||
|
||||
The actual problem with autofs is that it can't reconnect to existing
|
||||
mounts. Immediately one thinks of just adding the ability to remount
|
||||
autofs file systems would solve it, but alas, that can't work. This is
|
||||
because autofs direct mounts and the implementation of "on demand mount
|
||||
and expire" of nested mount trees have the file system mounted directly
|
||||
on top of the mount trigger directory dentry.
|
||||
|
||||
For example, there are two types of automount maps, direct (in the kernel
|
||||
module source you will see a third type called an offset, which is just
|
||||
a direct mount in disguise) and indirect.
|
||||
|
||||
Here is a master map with direct and indirect map entries:
|
||||
|
||||
/- /etc/auto.direct
|
||||
/test /etc/auto.indirect
|
||||
|
||||
and the corresponding map files:
|
||||
|
||||
/etc/auto.direct:
|
||||
|
||||
/automount/dparse/g6 budgie:/autofs/export1
|
||||
/automount/dparse/g1 shark:/autofs/export1
|
||||
and so on.
|
||||
|
||||
/etc/auto.indirect:
|
||||
|
||||
g1 shark:/autofs/export1
|
||||
g6 budgie:/autofs/export1
|
||||
and so on.
|
||||
|
||||
For the above indirect map an autofs file system is mounted on /test and
|
||||
mounts are triggered for each sub-directory key by the inode lookup
|
||||
operation. So we see a mount of shark:/autofs/export1 on /test/g1, for
|
||||
example.
|
||||
|
||||
The way that direct mounts are handled is by making an autofs mount on
|
||||
each full path, such as /automount/dparse/g1, and using it as a mount
|
||||
trigger. So when we walk on the path we mount shark:/autofs/export1 "on
|
||||
top of this mount point". Since these are always directories we can
|
||||
use the follow_link inode operation to trigger the mount.
|
||||
|
||||
But, each entry in direct and indirect maps can have offsets (making
|
||||
them multi-mount map entries).
|
||||
|
||||
For example, an indirect mount map entry could also be:
|
||||
|
||||
g1 \
|
||||
/ shark:/autofs/export5/testing/test \
|
||||
/s1 shark:/autofs/export/testing/test/s1 \
|
||||
/s2 shark:/autofs/export5/testing/test/s2 \
|
||||
/s1/ss1 shark:/autofs/export1 \
|
||||
/s2/ss2 shark:/autofs/export2
|
||||
|
||||
and a similarly a direct mount map entry could also be:
|
||||
|
||||
/automount/dparse/g1 \
|
||||
/ shark:/autofs/export5/testing/test \
|
||||
/s1 shark:/autofs/export/testing/test/s1 \
|
||||
/s2 shark:/autofs/export5/testing/test/s2 \
|
||||
/s1/ss1 shark:/autofs/export2 \
|
||||
/s2/ss2 shark:/autofs/export2
|
||||
|
||||
One of the issues with version 4 of autofs was that, when mounting an
|
||||
entry with a large number of offsets, possibly with nesting, we needed
|
||||
to mount and umount all of the offsets as a single unit. Not really a
|
||||
problem, except for people with a large number of offsets in map entries.
|
||||
This mechanism is used for the well known "hosts" map and we have seen
|
||||
cases (in 2.4) where the available number of mounts are exhausted or
|
||||
where the number of privileged ports available is exhausted.
|
||||
|
||||
In version 5 we mount only as we go down the tree of offsets and
|
||||
similarly for expiring them which resolves the above problem. There is
|
||||
somewhat more detail to the implementation but it isn't needed for the
|
||||
sake of the problem explanation. The one important detail is that these
|
||||
offsets are implemented using the same mechanism as the direct mounts
|
||||
above and so the mount points can be covered by a mount.
|
||||
|
||||
The current autofs implementation uses an ioctl file descriptor opened
|
||||
on the mount point for control operations. The references held by the
|
||||
descriptor are accounted for in checks made to determine if a mount is
|
||||
in use and is also used to access autofs file system information held
|
||||
in the mount super block. So the use of a file handle needs to be
|
||||
retained.
|
||||
|
||||
|
||||
The Solution
|
||||
============
|
||||
|
||||
To be able to restart autofs leaving existing direct, indirect and
|
||||
offset mounts in place we need to be able to obtain a file handle
|
||||
for these potentially covered autofs mount points. Rather than just
|
||||
implement an isolated operation it was decided to re-implement the
|
||||
existing ioctl interface and add new operations to provide this
|
||||
functionality.
|
||||
|
||||
In addition, to be able to reconstruct a mount tree that has busy mounts,
|
||||
the uid and gid of the last user that triggered the mount needs to be
|
||||
available because these can be used as macro substitution variables in
|
||||
autofs maps. They are recorded at mount request time and an operation
|
||||
has been added to retrieve them.
|
||||
|
||||
Since we're re-implementing the control interface, a couple of other
|
||||
problems with the existing interface have been addressed. First, when
|
||||
a mount or expire operation completes a status is returned to the
|
||||
kernel by either a "send ready" or a "send fail" operation. The
|
||||
"send fail" operation of the ioctl interface could only ever send
|
||||
ENOENT so the re-implementation allows user space to send an actual
|
||||
status. Another expensive operation in user space, for those using
|
||||
very large maps, is discovering if a mount is present. Usually this
|
||||
involves scanning /proc/mounts and since it needs to be done quite
|
||||
often it can introduce significant overhead when there are many entries
|
||||
in the mount table. An operation to lookup the mount status of a mount
|
||||
point dentry (covered or not) has also been added.
|
||||
|
||||
Current kernel development policy recommends avoiding the use of the
|
||||
ioctl mechanism in favor of systems such as Netlink. An implementation
|
||||
using this system was attempted to evaluate its suitability and it was
|
||||
found to be inadequate, in this case. The Generic Netlink system was
|
||||
used for this as raw Netlink would lead to a significant increase in
|
||||
complexity. There's no question that the Generic Netlink system is an
|
||||
elegant solution for common case ioctl functions but it's not a complete
|
||||
replacement probably because it's primary purpose in life is to be a
|
||||
message bus implementation rather than specifically an ioctl replacement.
|
||||
While it would be possible to work around this there is one concern
|
||||
that lead to the decision to not use it. This is that the autofs
|
||||
expire in the daemon has become far to complex because umount
|
||||
candidates are enumerated, almost for no other reason than to "count"
|
||||
the number of times to call the expire ioctl. This involves scanning
|
||||
the mount table which has proved to be a big overhead for users with
|
||||
large maps. The best way to improve this is try and get back to the
|
||||
way the expire was done long ago. That is, when an expire request is
|
||||
issued for a mount (file handle) we should continually call back to
|
||||
the daemon until we can't umount any more mounts, then return the
|
||||
appropriate status to the daemon. At the moment we just expire one
|
||||
mount at a time. A Generic Netlink implementation would exclude this
|
||||
possibility for future development due to the requirements of the
|
||||
message bus architecture.
|
||||
|
||||
|
||||
autofs4 Miscellaneous Device mount control interface
|
||||
====================================================
|
||||
|
||||
The control interface is opening a device node, typically /dev/autofs.
|
||||
|
||||
All the ioctls use a common structure to pass the needed parameter
|
||||
information and return operation results:
|
||||
|
||||
struct autofs_dev_ioctl {
|
||||
__u32 ver_major;
|
||||
__u32 ver_minor;
|
||||
__u32 size; /* total size of data passed in
|
||||
* including this struct */
|
||||
__s32 ioctlfd; /* automount command fd */
|
||||
|
||||
__u32 arg1; /* Command parameters */
|
||||
__u32 arg2;
|
||||
|
||||
char path[0];
|
||||
};
|
||||
|
||||
The ioctlfd field is a mount point file descriptor of an autofs mount
|
||||
point. It is returned by the open call and is used by all calls except
|
||||
the check for whether a given path is a mount point, where it may
|
||||
optionally be used to check a specific mount corresponding to a given
|
||||
mount point file descriptor, and when requesting the uid and gid of the
|
||||
last successful mount on a directory within the autofs file system.
|
||||
|
||||
The fields arg1 and arg2 are used to communicate parameters and results of
|
||||
calls made as described below.
|
||||
|
||||
The path field is used to pass a path where it is needed and the size field
|
||||
is used account for the increased structure length when translating the
|
||||
structure sent from user space.
|
||||
|
||||
This structure can be initialized before setting specific fields by using
|
||||
the void function call init_autofs_dev_ioctl(struct autofs_dev_ioctl *).
|
||||
|
||||
All of the ioctls perform a copy of this structure from user space to
|
||||
kernel space and return -EINVAL if the size parameter is smaller than
|
||||
the structure size itself, -ENOMEM if the kernel memory allocation fails
|
||||
or -EFAULT if the copy itself fails. Other checks include a version check
|
||||
of the compiled in user space version against the module version and a
|
||||
mismatch results in a -EINVAL return. If the size field is greater than
|
||||
the structure size then a path is assumed to be present and is checked to
|
||||
ensure it begins with a "/" and is NULL terminated, otherwise -EINVAL is
|
||||
returned. Following these checks, for all ioctl commands except
|
||||
AUTOFS_DEV_IOCTL_VERSION_CMD, AUTOFS_DEV_IOCTL_OPENMOUNT_CMD and
|
||||
AUTOFS_DEV_IOCTL_CLOSEMOUNT_CMD the ioctlfd is validated and if it is
|
||||
not a valid descriptor or doesn't correspond to an autofs mount point
|
||||
an error of -EBADF, -ENOTTY or -EINVAL (not an autofs descriptor) is
|
||||
returned.
|
||||
|
||||
|
||||
The ioctls
|
||||
==========
|
||||
|
||||
An example of an implementation which uses this interface can be seen
|
||||
in autofs version 5.0.4 and later in file lib/dev-ioctl-lib.c of the
|
||||
distribution tar available for download from kernel.org in directory
|
||||
/pub/linux/daemons/autofs/v5.
|
||||
|
||||
The device node ioctl operations implemented by this interface are:
|
||||
|
||||
|
||||
AUTOFS_DEV_IOCTL_VERSION
|
||||
------------------------
|
||||
|
||||
Get the major and minor version of the autofs4 device ioctl kernel module
|
||||
implementation. It requires an initialized struct autofs_dev_ioctl as an
|
||||
input parameter and sets the version information in the passed in structure.
|
||||
It returns 0 on success or the error -EINVAL if a version mismatch is
|
||||
detected.
|
||||
|
||||
|
||||
AUTOFS_DEV_IOCTL_PROTOVER_CMD and AUTOFS_DEV_IOCTL_PROTOSUBVER_CMD
|
||||
------------------------------------------------------------------
|
||||
|
||||
Get the major and minor version of the autofs4 protocol version understood
|
||||
by loaded module. This call requires an initialized struct autofs_dev_ioctl
|
||||
with the ioctlfd field set to a valid autofs mount point descriptor
|
||||
and sets the requested version number in structure field arg1. These
|
||||
commands return 0 on success or one of the negative error codes if
|
||||
validation fails.
|
||||
|
||||
|
||||
AUTOFS_DEV_IOCTL_OPENMOUNT and AUTOFS_DEV_IOCTL_CLOSEMOUNT
|
||||
----------------------------------------------------------
|
||||
|
||||
Obtain and release a file descriptor for an autofs managed mount point
|
||||
path. The open call requires an initialized struct autofs_dev_ioctl with
|
||||
the the path field set and the size field adjusted appropriately as well
|
||||
as the arg1 field set to the device number of the autofs mount. The
|
||||
device number can be obtained from the mount options shown in
|
||||
/proc/mounts. The close call requires an initialized struct
|
||||
autofs_dev_ioct with the ioctlfd field set to the descriptor obtained
|
||||
from the open call. The release of the file descriptor can also be done
|
||||
with close(2) so any open descriptors will also be closed at process exit.
|
||||
The close call is included in the implemented operations largely for
|
||||
completeness and to provide for a consistent user space implementation.
|
||||
|
||||
|
||||
AUTOFS_DEV_IOCTL_READY_CMD and AUTOFS_DEV_IOCTL_FAIL_CMD
|
||||
--------------------------------------------------------
|
||||
|
||||
Return mount and expire result status from user space to the kernel.
|
||||
Both of these calls require an initialized struct autofs_dev_ioctl
|
||||
with the ioctlfd field set to the descriptor obtained from the open
|
||||
call and the arg1 field set to the wait queue token number, received
|
||||
by user space in the foregoing mount or expire request. The arg2 field
|
||||
is set to the status to be returned. For the ready call this is always
|
||||
0 and for the fail call it is set to the errno of the operation.
|
||||
|
||||
|
||||
AUTOFS_DEV_IOCTL_SETPIPEFD_CMD
|
||||
------------------------------
|
||||
|
||||
Set the pipe file descriptor used for kernel communication to the daemon.
|
||||
Normally this is set at mount time using an option but when reconnecting
|
||||
to a existing mount we need to use this to tell the autofs mount about
|
||||
the new kernel pipe descriptor. In order to protect mounts against
|
||||
incorrectly setting the pipe descriptor we also require that the autofs
|
||||
mount be catatonic (see next call).
|
||||
|
||||
The call requires an initialized struct autofs_dev_ioctl with the
|
||||
ioctlfd field set to the descriptor obtained from the open call and
|
||||
the arg1 field set to descriptor of the pipe. On success the call
|
||||
also sets the process group id used to identify the controlling process
|
||||
(eg. the owning automount(8) daemon) to the process group of the caller.
|
||||
|
||||
|
||||
AUTOFS_DEV_IOCTL_CATATONIC_CMD
|
||||
------------------------------
|
||||
|
||||
Make the autofs mount point catatonic. The autofs mount will no longer
|
||||
issue mount requests, the kernel communication pipe descriptor is released
|
||||
and any remaining waits in the queue released.
|
||||
|
||||
The call requires an initialized struct autofs_dev_ioctl with the
|
||||
ioctlfd field set to the descriptor obtained from the open call.
|
||||
|
||||
|
||||
AUTOFS_DEV_IOCTL_TIMEOUT_CMD
|
||||
----------------------------
|
||||
|
||||
Set the expire timeout for mounts withing an autofs mount point.
|
||||
|
||||
The call requires an initialized struct autofs_dev_ioctl with the
|
||||
ioctlfd field set to the descriptor obtained from the open call.
|
||||
|
||||
|
||||
AUTOFS_DEV_IOCTL_REQUESTER_CMD
|
||||
------------------------------
|
||||
|
||||
Return the uid and gid of the last process to successfully trigger a the
|
||||
mount on the given path dentry.
|
||||
|
||||
The call requires an initialized struct autofs_dev_ioctl with the path
|
||||
field set to the mount point in question and the size field adjusted
|
||||
appropriately as well as the arg1 field set to the device number of the
|
||||
containing autofs mount. Upon return the struct field arg1 contains the
|
||||
uid and arg2 the gid.
|
||||
|
||||
When reconstructing an autofs mount tree with active mounts we need to
|
||||
re-connect to mounts that may have used the original process uid and
|
||||
gid (or string variations of them) for mount lookups within the map entry.
|
||||
This call provides the ability to obtain this uid and gid so they may be
|
||||
used by user space for the mount map lookups.
|
||||
|
||||
|
||||
AUTOFS_DEV_IOCTL_EXPIRE_CMD
|
||||
---------------------------
|
||||
|
||||
Issue an expire request to the kernel for an autofs mount. Typically
|
||||
this ioctl is called until no further expire candidates are found.
|
||||
|
||||
The call requires an initialized struct autofs_dev_ioctl with the
|
||||
ioctlfd field set to the descriptor obtained from the open call. In
|
||||
addition an immediate expire, independent of the mount timeout, can be
|
||||
requested by setting the arg1 field to 1. If no expire candidates can
|
||||
be found the ioctl returns -1 with errno set to EAGAIN.
|
||||
|
||||
This call causes the kernel module to check the mount corresponding
|
||||
to the given ioctlfd for mounts that can be expired, issues an expire
|
||||
request back to the daemon and waits for completion.
|
||||
|
||||
AUTOFS_DEV_IOCTL_ASKUMOUNT_CMD
|
||||
------------------------------
|
||||
|
||||
Checks if an autofs mount point is in use.
|
||||
|
||||
The call requires an initialized struct autofs_dev_ioctl with the
|
||||
ioctlfd field set to the descriptor obtained from the open call and
|
||||
it returns the result in the arg1 field, 1 for busy and 0 otherwise.
|
||||
|
||||
|
||||
AUTOFS_DEV_IOCTL_ISMOUNTPOINT_CMD
|
||||
---------------------------------
|
||||
|
||||
Check if the given path is a mountpoint.
|
||||
|
||||
The call requires an initialized struct autofs_dev_ioctl. There are two
|
||||
possible variations. Both use the path field set to the path of the mount
|
||||
point to check and the size field adjusted appropriately. One uses the
|
||||
ioctlfd field to identify a specific mount point to check while the other
|
||||
variation uses the path and optionaly arg1 set to an autofs mount type.
|
||||
The call returns 1 if this is a mount point and sets arg1 to the device
|
||||
number of the mount and field arg2 to the relevant super block magic
|
||||
number (described below) or 0 if it isn't a mountpoint. In both cases
|
||||
the the device number (as returned by new_encode_dev()) is returned
|
||||
in field arg1.
|
||||
|
||||
If supplied with a file descriptor we're looking for a specific mount,
|
||||
not necessarily at the top of the mounted stack. In this case the path
|
||||
the descriptor corresponds to is considered a mountpoint if it is itself
|
||||
a mountpoint or contains a mount, such as a multi-mount without a root
|
||||
mount. In this case we return 1 if the descriptor corresponds to a mount
|
||||
point and and also returns the super magic of the covering mount if there
|
||||
is one or 0 if it isn't a mountpoint.
|
||||
|
||||
If a path is supplied (and the ioctlfd field is set to -1) then the path
|
||||
is looked up and is checked to see if it is the root of a mount. If a
|
||||
type is also given we are looking for a particular autofs mount and if
|
||||
a match isn't found a fail is returned. If the the located path is the
|
||||
root of a mount 1 is returned along with the super magic of the mount
|
||||
or 0 otherwise.
|
||||
|
|
@ -26,11 +26,11 @@ You can simplify mounting by just typing:
|
|||
|
||||
this will allocate the first available loopback device (and load loop.o
|
||||
kernel module if necessary) automatically. If the loopback driver is not
|
||||
loaded automatically, make sure that your kernel is compiled with kmod
|
||||
support (CONFIG_KMOD) enabled. Beware that umount will not
|
||||
deallocate /dev/loopN device if /etc/mtab file on your system is a
|
||||
symbolic link to /proc/mounts. You will need to do it manually using
|
||||
"-d" switch of losetup(8). Read losetup(8) manpage for more info.
|
||||
loaded automatically, make sure that you have compiled the module and
|
||||
that modprobe is functioning. Beware that umount will not deallocate
|
||||
/dev/loopN device if /etc/mtab file on your system is a symbolic link to
|
||||
/proc/mounts. You will need to do it manually using "-d" switch of
|
||||
losetup(8). Read losetup(8) manpage for more info.
|
||||
|
||||
To create the BFS image under UnixWare you need to find out first which
|
||||
slice contains it. The command prtvtoc(1M) is your friend:
|
||||
|
|
3
Documentation/filesystems/configfs/Makefile
Normal file
3
Documentation/filesystems/configfs/Makefile
Normal file
|
@ -0,0 +1,3 @@
|
|||
ifneq ($(CONFIG_CONFIGFS_FS),)
|
||||
obj-m += configfs_example_explicit.o configfs_example_macros.o
|
||||
endif
|
|
@ -233,12 +233,10 @@ accomplished via the group operations specified on the group's
|
|||
config_item_type.
|
||||
|
||||
struct configfs_group_operations {
|
||||
int (*make_item)(struct config_group *group,
|
||||
const char *name,
|
||||
struct config_item **new_item);
|
||||
int (*make_group)(struct config_group *group,
|
||||
const char *name,
|
||||
struct config_group **new_group);
|
||||
struct config_item *(*make_item)(struct config_group *group,
|
||||
const char *name);
|
||||
struct config_group *(*make_group)(struct config_group *group,
|
||||
const char *name);
|
||||
int (*commit_item)(struct config_item *item);
|
||||
void (*disconnect_notify)(struct config_group *group,
|
||||
struct config_item *item);
|
||||
|
@ -313,9 +311,20 @@ the subsystem must be ready for it.
|
|||
[An Example]
|
||||
|
||||
The best example of these basic concepts is the simple_children
|
||||
subsystem/group and the simple_child item in configfs_example.c It
|
||||
shows a trivial object displaying and storing an attribute, and a simple
|
||||
group creating and destroying these children.
|
||||
subsystem/group and the simple_child item in configfs_example_explicit.c
|
||||
and configfs_example_macros.c. It shows a trivial object displaying and
|
||||
storing an attribute, and a simple group creating and destroying these
|
||||
children.
|
||||
|
||||
The only difference between configfs_example_explicit.c and
|
||||
configfs_example_macros.c is how the attributes of the childless item
|
||||
are defined. The childless item has extended attributes, each with
|
||||
their own show()/store() operation. This follows a convention commonly
|
||||
used in sysfs. configfs_example_explicit.c creates these attributes
|
||||
by explicitly defining the structures involved. Conversely
|
||||
configfs_example_macros.c uses some convenience macros from configfs.h
|
||||
to define the attributes. These macros are similar to their sysfs
|
||||
counterparts.
|
||||
|
||||
[Hierarchy Navigation and the Subsystem Mutex]
|
||||
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue