提交 0fc4f78f 编写于 作者: D Daniel Vetter

Merge remote-tracking branch 'airlied/drm-next' into topic/drm-misc

Backmerge latest drm-next to have a baseline for the
s/fence/dma_fence/ patch from Chris.
Signed-off-by: NDaniel Vetter <daniel.vetter@intel.com>

要显示的变更太多。

To preserve performance only 1000 of 1000+ files are displayed.
*.c diff=cpp
*.h diff=cpp
...@@ -69,11 +69,14 @@ James Bottomley <jejb@mulgrave.(none)> ...@@ -69,11 +69,14 @@ James Bottomley <jejb@mulgrave.(none)>
James Bottomley <jejb@titanic.il.steeleye.com> James Bottomley <jejb@titanic.il.steeleye.com>
James E Wilson <wilson@specifix.com> James E Wilson <wilson@specifix.com>
James Ketrenos <jketreno@io.(none)> James Ketrenos <jketreno@io.(none)>
Javi Merino <javi.merino@kernel.org> <javi.merino@arm.com>
<javier@osg.samsung.com> <javier.martinez@collabora.co.uk> <javier@osg.samsung.com> <javier.martinez@collabora.co.uk>
Jean Tourrilhes <jt@hpl.hp.com> Jean Tourrilhes <jt@hpl.hp.com>
Jeff Garzik <jgarzik@pretzel.yyz.us> Jeff Garzik <jgarzik@pretzel.yyz.us>
Jens Axboe <axboe@suse.de> Jens Axboe <axboe@suse.de>
Jens Osterkamp <Jens.Osterkamp@de.ibm.com> Jens Osterkamp <Jens.Osterkamp@de.ibm.com>
Johan Hovold <johan@kernel.org> <jhovold@gmail.com>
Johan Hovold <johan@kernel.org> <johan@hovoldconsulting.com>
John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de> John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
John Stultz <johnstul@us.ibm.com> John Stultz <johnstul@us.ibm.com>
<josh@joshtriplett.org> <josh@freedesktop.org> <josh@joshtriplett.org> <josh@freedesktop.org>
...@@ -124,6 +127,7 @@ Peter Oruba <peter@oruba.de> ...@@ -124,6 +127,7 @@ Peter Oruba <peter@oruba.de>
Peter Oruba <peter.oruba@amd.com> Peter Oruba <peter.oruba@amd.com>
Pratyush Anand <pratyush.anand@gmail.com> <pratyush.anand@st.com> Pratyush Anand <pratyush.anand@gmail.com> <pratyush.anand@st.com>
Praveen BP <praveenbp@ti.com> Praveen BP <praveenbp@ti.com>
Qais Yousef <qsyousef@gmail.com> <qais.yousef@imgtec.com>
Rajesh Shah <rajesh.shah@intel.com> Rajesh Shah <rajesh.shah@intel.com>
Ralf Baechle <ralf@linux-mips.org> Ralf Baechle <ralf@linux-mips.org>
Ralf Wildenhues <Ralf.Wildenhues@gmx.de> Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
...@@ -159,6 +163,7 @@ Valdis Kletnieks <Valdis.Kletnieks@vt.edu> ...@@ -159,6 +163,7 @@ Valdis Kletnieks <Valdis.Kletnieks@vt.edu>
Viresh Kumar <vireshk@kernel.org> <viresh.kumar@st.com> Viresh Kumar <vireshk@kernel.org> <viresh.kumar@st.com>
Viresh Kumar <vireshk@kernel.org> <viresh.linux@gmail.com> Viresh Kumar <vireshk@kernel.org> <viresh.linux@gmail.com>
Viresh Kumar <vireshk@kernel.org> <viresh.kumar2@arm.com> Viresh Kumar <vireshk@kernel.org> <viresh.kumar2@arm.com>
Vlad Dogaru <ddvlad@gmail.com> <vlad.dogaru@intel.com>
Vladimir Davydov <vdavydov.dev@gmail.com> <vdavydov@virtuozzo.com> Vladimir Davydov <vdavydov.dev@gmail.com> <vdavydov@virtuozzo.com>
Vladimir Davydov <vdavydov.dev@gmail.com> <vdavydov@parallels.com> Vladimir Davydov <vdavydov.dev@gmail.com> <vdavydov@parallels.com>
Takashi YOSHII <takashi.yoshii.zj@renesas.com> Takashi YOSHII <takashi.yoshii.zj@renesas.com>
......
...@@ -1090,6 +1090,10 @@ S: 6350 Stoneridge Mall Road ...@@ -1090,6 +1090,10 @@ S: 6350 Stoneridge Mall Road
S: Pleasanton, CA 94588 S: Pleasanton, CA 94588
S: USA S: USA
N: Dmitry Eremin-Solenikov
E: dbaryshkov@gmail.com
D: Power Supply Maintainer from v3.14 - v3.15
N: Doug Evans N: Doug Evans
E: dje@cygnus.com E: dje@cygnus.com
D: Wrote Xenix FS (part of standard kernel since 0.99.15) D: Wrote Xenix FS (part of standard kernel since 0.99.15)
...@@ -1944,6 +1948,11 @@ E: kraxel@bytesex.org ...@@ -1944,6 +1948,11 @@ E: kraxel@bytesex.org
E: kraxel@suse.de E: kraxel@suse.de
D: video4linux, bttv, vesafb, some scsi, misc fixes D: video4linux, bttv, vesafb, some scsi, misc fixes
N: Hans J. Koch
D: USERSPACE I/O, MAX6650
D: Hans passed away in June 2016, and will be greatly missed.
W: https://lwn.net/Articles/691000/
N: Harald Koenig N: Harald Koenig
E: koenig@tat.physik.uni-tuebingen.de E: koenig@tat.physik.uni-tuebingen.de
D: XFree86 (S3), DCF77, some kernel hacks and fixes D: XFree86 (S3), DCF77, some kernel hacks and fixes
...@@ -2287,11 +2296,11 @@ D: Initial implementation of VC's, pty's and select() ...@@ -2287,11 +2296,11 @@ D: Initial implementation of VC's, pty's and select()
N: Pavel Machek N: Pavel Machek
E: pavel@ucw.cz E: pavel@ucw.cz
D: Softcursor for vga, hypertech cdrom support, vcsa bugfix, nbd P: 4096R/92DFCE96 4FA7 9EEF FCD4 C44F C585 B8C7 C060 2241 92DF CE96
D: Softcursor for vga, hypertech cdrom support, vcsa bugfix, nbd,
D: sun4/330 port, capabilities for elf, speedup for rm on ext2, USB, D: sun4/330 port, capabilities for elf, speedup for rm on ext2, USB,
D: work on suspend-to-ram/disk, killing duplicates from ioctl32 D: work on suspend-to-ram/disk, killing duplicates from ioctl32,
S: Volkova 1131 D: Altera SoCFPGA and Nokia N900 support.
S: 198 00 Praha 9
S: Czech Republic S: Czech Republic
N: Paul Mackerras N: Paul Mackerras
...@@ -3518,6 +3527,10 @@ S: 145 Howard St. ...@@ -3518,6 +3527,10 @@ S: 145 Howard St.
S: Northborough, MA 01532 S: Northborough, MA 01532
S: USA S: USA
N: Doug Thompson
E: dougthompson@xmission.com
D: EDAC
N: Tommy Thorn N: Tommy Thorn
E: Tommy.Thorn@irisa.fr E: Tommy.Thorn@irisa.fr
W: http://www.irisa.fr/prive/thorn/index.html W: http://www.irisa.fr/prive/thorn/index.html
...@@ -3654,6 +3667,10 @@ S: Obere Heerbergstrasse 17 ...@@ -3654,6 +3667,10 @@ S: Obere Heerbergstrasse 17
S: 97078 Wuerzburg S: 97078 Wuerzburg
S: Germany S: Germany
N: Jason Uhlenkott
E: juhlenko@akamai.com
D: I3000 EDAC driver
N: Greg Ungerer N: Greg Ungerer
E: gerg@snapgear.com E: gerg@snapgear.com
D: uClinux kernel hacker D: uClinux kernel hacker
...@@ -3691,7 +3708,7 @@ S: Germany ...@@ -3691,7 +3708,7 @@ S: Germany
N: Geert Uytterhoeven N: Geert Uytterhoeven
E: geert@linux-m68k.org E: geert@linux-m68k.org
W: http://users.telenet.be/geertu/ W: http://users.telenet.be/geertu/
P: 1024/862678A6 C51D 361C 0BD1 4C90 B275 C553 6EEA 11BA 8626 78A6 P: 4096R/4804B4BC3F55EEFB 750D 82B0 A781 5431 5E25 925B 4804 B4BC 3F55 EEFB
D: m68k/Amiga and PPC/CHRP Longtrail coordinator D: m68k/Amiga and PPC/CHRP Longtrail coordinator
D: Frame buffer device and XF68_FBDev maintainer D: Frame buffer device and XF68_FBDev maintainer
D: m68k IDE maintainer D: m68k IDE maintainer
......
...@@ -46,7 +46,8 @@ IRQ.txt ...@@ -46,7 +46,8 @@ IRQ.txt
Intel-IOMMU.txt Intel-IOMMU.txt
- basic info on the Intel IOMMU virtualization support. - basic info on the Intel IOMMU virtualization support.
Makefile Makefile
- some files in Documentation dir are actually sample code to build - This file does nothing. Removing it breaks make htmldocs and
make distclean.
ManagementStyle ManagementStyle
- how to (attempt to) manage kernel hackers. - how to (attempt to) manage kernel hackers.
RCU/ RCU/
......
==================
cfg80211 subsystem
==================
Device registration
===================
.. kernel-doc:: include/net/cfg80211.h
:doc: Device registration
.. kernel-doc:: include/net/cfg80211.h
:functions: ieee80211_channel_flags
.. kernel-doc:: include/net/cfg80211.h
:functions: ieee80211_channel
.. kernel-doc:: include/net/cfg80211.h
:functions: ieee80211_rate_flags
.. kernel-doc:: include/net/cfg80211.h
:functions: ieee80211_rate
.. kernel-doc:: include/net/cfg80211.h
:functions: ieee80211_sta_ht_cap
.. kernel-doc:: include/net/cfg80211.h
:functions: ieee80211_supported_band
.. kernel-doc:: include/net/cfg80211.h
:functions: cfg80211_signal_type
.. kernel-doc:: include/net/cfg80211.h
:functions: wiphy_params_flags
.. kernel-doc:: include/net/cfg80211.h
:functions: wiphy_flags
.. kernel-doc:: include/net/cfg80211.h
:functions: wiphy
.. kernel-doc:: include/net/cfg80211.h
:functions: wireless_dev
.. kernel-doc:: include/net/cfg80211.h
:functions: wiphy_new
.. kernel-doc:: include/net/cfg80211.h
:functions: wiphy_register
.. kernel-doc:: include/net/cfg80211.h
:functions: wiphy_unregister
.. kernel-doc:: include/net/cfg80211.h
:functions: wiphy_free
.. kernel-doc:: include/net/cfg80211.h
:functions: wiphy_name
.. kernel-doc:: include/net/cfg80211.h
:functions: wiphy_dev
.. kernel-doc:: include/net/cfg80211.h
:functions: wiphy_priv
.. kernel-doc:: include/net/cfg80211.h
:functions: priv_to_wiphy
.. kernel-doc:: include/net/cfg80211.h
:functions: set_wiphy_dev
.. kernel-doc:: include/net/cfg80211.h
:functions: wdev_priv
.. kernel-doc:: include/net/cfg80211.h
:functions: ieee80211_iface_limit
.. kernel-doc:: include/net/cfg80211.h
:functions: ieee80211_iface_combination
.. kernel-doc:: include/net/cfg80211.h
:functions: cfg80211_check_combinations
Actions and configuration
=========================
.. kernel-doc:: include/net/cfg80211.h
:doc: Actions and configuration
.. kernel-doc:: include/net/cfg80211.h
:functions: cfg80211_ops
.. kernel-doc:: include/net/cfg80211.h
:functions: vif_params
.. kernel-doc:: include/net/cfg80211.h
:functions: key_params
.. kernel-doc:: include/net/cfg80211.h
:functions: survey_info_flags
.. kernel-doc:: include/net/cfg80211.h
:functions: survey_info
.. kernel-doc:: include/net/cfg80211.h
:functions: cfg80211_beacon_data
.. kernel-doc:: include/net/cfg80211.h
:functions: cfg80211_ap_settings
.. kernel-doc:: include/net/cfg80211.h
:functions: station_parameters
.. kernel-doc:: include/net/cfg80211.h
:functions: rate_info_flags
.. kernel-doc:: include/net/cfg80211.h
:functions: rate_info
.. kernel-doc:: include/net/cfg80211.h
:functions: station_info
.. kernel-doc:: include/net/cfg80211.h
:functions: monitor_flags
.. kernel-doc:: include/net/cfg80211.h
:functions: mpath_info_flags
.. kernel-doc:: include/net/cfg80211.h
:functions: mpath_info
.. kernel-doc:: include/net/cfg80211.h
:functions: bss_parameters
.. kernel-doc:: include/net/cfg80211.h
:functions: ieee80211_txq_params
.. kernel-doc:: include/net/cfg80211.h
:functions: cfg80211_crypto_settings
.. kernel-doc:: include/net/cfg80211.h
:functions: cfg80211_auth_request
.. kernel-doc:: include/net/cfg80211.h
:functions: cfg80211_assoc_request
.. kernel-doc:: include/net/cfg80211.h
:functions: cfg80211_deauth_request
.. kernel-doc:: include/net/cfg80211.h
:functions: cfg80211_disassoc_request
.. kernel-doc:: include/net/cfg80211.h
:functions: cfg80211_ibss_params
.. kernel-doc:: include/net/cfg80211.h
:functions: cfg80211_connect_params
.. kernel-doc:: include/net/cfg80211.h
:functions: cfg80211_pmksa
.. kernel-doc:: include/net/cfg80211.h
:functions: cfg80211_rx_mlme_mgmt
.. kernel-doc:: include/net/cfg80211.h
:functions: cfg80211_auth_timeout
.. kernel-doc:: include/net/cfg80211.h
:functions: cfg80211_rx_assoc_resp
.. kernel-doc:: include/net/cfg80211.h
:functions: cfg80211_assoc_timeout
.. kernel-doc:: include/net/cfg80211.h
:functions: cfg80211_tx_mlme_mgmt
.. kernel-doc:: include/net/cfg80211.h
:functions: cfg80211_ibss_joined
.. kernel-doc:: include/net/cfg80211.h
:functions: cfg80211_connect_result
.. kernel-doc:: include/net/cfg80211.h
:functions: cfg80211_connect_bss
.. kernel-doc:: include/net/cfg80211.h
:functions: cfg80211_connect_timeout
.. kernel-doc:: include/net/cfg80211.h
:functions: cfg80211_roamed
.. kernel-doc:: include/net/cfg80211.h
:functions: cfg80211_disconnected
.. kernel-doc:: include/net/cfg80211.h
:functions: cfg80211_ready_on_channel
.. kernel-doc:: include/net/cfg80211.h
:functions: cfg80211_remain_on_channel_expired
.. kernel-doc:: include/net/cfg80211.h
:functions: cfg80211_new_sta
.. kernel-doc:: include/net/cfg80211.h
:functions: cfg80211_rx_mgmt
.. kernel-doc:: include/net/cfg80211.h
:functions: cfg80211_mgmt_tx_status
.. kernel-doc:: include/net/cfg80211.h
:functions: cfg80211_cqm_rssi_notify
.. kernel-doc:: include/net/cfg80211.h
:functions: cfg80211_cqm_pktloss_notify
.. kernel-doc:: include/net/cfg80211.h
:functions: cfg80211_michael_mic_failure
Scanning and BSS list handling
==============================
.. kernel-doc:: include/net/cfg80211.h
:doc: Scanning and BSS list handling
.. kernel-doc:: include/net/cfg80211.h
:functions: cfg80211_ssid
.. kernel-doc:: include/net/cfg80211.h
:functions: cfg80211_scan_request
.. kernel-doc:: include/net/cfg80211.h
:functions: cfg80211_scan_done
.. kernel-doc:: include/net/cfg80211.h
:functions: cfg80211_bss
.. kernel-doc:: include/net/cfg80211.h
:functions: cfg80211_inform_bss
.. kernel-doc:: include/net/cfg80211.h
:functions: cfg80211_inform_bss_frame_data
.. kernel-doc:: include/net/cfg80211.h
:functions: cfg80211_inform_bss_data
.. kernel-doc:: include/net/cfg80211.h
:functions: cfg80211_unlink_bss
.. kernel-doc:: include/net/cfg80211.h
:functions: cfg80211_find_ie
.. kernel-doc:: include/net/cfg80211.h
:functions: ieee80211_bss_get_ie
Utility functions
=================
.. kernel-doc:: include/net/cfg80211.h
:doc: Utility functions
.. kernel-doc:: include/net/cfg80211.h
:functions: ieee80211_channel_to_frequency
.. kernel-doc:: include/net/cfg80211.h
:functions: ieee80211_frequency_to_channel
.. kernel-doc:: include/net/cfg80211.h
:functions: ieee80211_get_channel
.. kernel-doc:: include/net/cfg80211.h
:functions: ieee80211_get_response_rate
.. kernel-doc:: include/net/cfg80211.h
:functions: ieee80211_hdrlen
.. kernel-doc:: include/net/cfg80211.h
:functions: ieee80211_get_hdrlen_from_skb
.. kernel-doc:: include/net/cfg80211.h
:functions: ieee80211_radiotap_iterator
Data path helpers
=================
.. kernel-doc:: include/net/cfg80211.h
:doc: Data path helpers
.. kernel-doc:: include/net/cfg80211.h
:functions: ieee80211_data_to_8023
.. kernel-doc:: include/net/cfg80211.h
:functions: ieee80211_data_from_8023
.. kernel-doc:: include/net/cfg80211.h
:functions: ieee80211_amsdu_to_8023s
.. kernel-doc:: include/net/cfg80211.h
:functions: cfg80211_classify8021d
Regulatory enforcement infrastructure
=====================================
.. kernel-doc:: include/net/cfg80211.h
:doc: Regulatory enforcement infrastructure
.. kernel-doc:: include/net/cfg80211.h
:functions: regulatory_hint
.. kernel-doc:: include/net/cfg80211.h
:functions: wiphy_apply_custom_regulatory
.. kernel-doc:: include/net/cfg80211.h
:functions: freq_reg_info
RFkill integration
==================
.. kernel-doc:: include/net/cfg80211.h
:doc: RFkill integration
.. kernel-doc:: include/net/cfg80211.h
:functions: wiphy_rfkill_set_hw_state
.. kernel-doc:: include/net/cfg80211.h
:functions: wiphy_rfkill_start_polling
.. kernel-doc:: include/net/cfg80211.h
:functions: wiphy_rfkill_stop_polling
Test mode
=========
.. kernel-doc:: include/net/cfg80211.h
:doc: Test mode
.. kernel-doc:: include/net/cfg80211.h
:functions: cfg80211_testmode_alloc_reply_skb
.. kernel-doc:: include/net/cfg80211.h
:functions: cfg80211_testmode_reply
.. kernel-doc:: include/net/cfg80211.h
:functions: cfg80211_testmode_alloc_event_skb
.. kernel-doc:: include/net/cfg80211.h
:functions: cfg80211_testmode_event
# -*- coding: utf-8; mode: python -*-
project = "Linux 802.11 Driver Developer's Guide"
tags.add("subproject")
=====================================
Linux 802.11 Driver Developer's Guide
=====================================
.. toctree::
introduction
cfg80211
mac80211
mac80211-advanced
.. only:: subproject
Indices
=======
* :ref:`genindex`
============
Introduction
============
Explaining wireless 802.11 networking in the Linux kernel
Copyright 2007-2009 Johannes Berg
These books attempt to give a description of the various subsystems
that play a role in 802.11 wireless networking in Linux. Since these
books are for kernel developers they attempts to document the
structures and functions used in the kernel as well as giving a
higher-level overview.
The reader is expected to be familiar with the 802.11 standard as
published by the IEEE in 802.11-2007 (or possibly later versions).
References to this standard will be given as "802.11-2007 8.1.5".
=============================
mac80211 subsystem (advanced)
=============================
Information contained within this part of the book is of interest only
for advanced interaction of mac80211 with drivers to exploit more
hardware capabilities and improve performance.
LED support
===========
Mac80211 supports various ways of blinking LEDs. Wherever possible,
device LEDs should be exposed as LED class devices and hooked up to the
appropriate trigger, which will then be triggered appropriately by
mac80211.
.. kernel-doc:: include/net/mac80211.h
:functions: ieee80211_get_tx_led_name
.. kernel-doc:: include/net/mac80211.h
:functions: ieee80211_get_rx_led_name
.. kernel-doc:: include/net/mac80211.h
:functions: ieee80211_get_assoc_led_name
.. kernel-doc:: include/net/mac80211.h
:functions: ieee80211_get_radio_led_name
.. kernel-doc:: include/net/mac80211.h
:functions: ieee80211_tpt_blink
.. kernel-doc:: include/net/mac80211.h
:functions: ieee80211_tpt_led_trigger_flags
.. kernel-doc:: include/net/mac80211.h
:functions: ieee80211_create_tpt_led_trigger
Hardware crypto acceleration
============================
.. kernel-doc:: include/net/mac80211.h
:doc: Hardware crypto acceleration
.. kernel-doc:: include/net/mac80211.h
:functions: set_key_cmd
.. kernel-doc:: include/net/mac80211.h
:functions: ieee80211_key_conf
.. kernel-doc:: include/net/mac80211.h
:functions: ieee80211_key_flags
.. kernel-doc:: include/net/mac80211.h
:functions: ieee80211_get_tkip_p1k
.. kernel-doc:: include/net/mac80211.h
:functions: ieee80211_get_tkip_p1k_iv
.. kernel-doc:: include/net/mac80211.h
:functions: ieee80211_get_tkip_p2k
Powersave support
=================
.. kernel-doc:: include/net/mac80211.h
:doc: Powersave support
Beacon filter support
=====================
.. kernel-doc:: include/net/mac80211.h
:doc: Beacon filter support
.. kernel-doc:: include/net/mac80211.h
:functions: ieee80211_beacon_loss
Multiple queues and QoS support
===============================
TBD
.. kernel-doc:: include/net/mac80211.h
:functions: ieee80211_tx_queue_params
Access point mode support
=========================
TBD
Some parts of the if_conf should be discussed here instead
Insert notes about VLAN interfaces with hw crypto here or in the hw
crypto chapter.
support for powersaving clients
-------------------------------
.. kernel-doc:: include/net/mac80211.h
:doc: AP support for powersaving clients
.. kernel-doc:: include/net/mac80211.h
:functions: ieee80211_get_buffered_bc
.. kernel-doc:: include/net/mac80211.h
:functions: ieee80211_beacon_get
.. kernel-doc:: include/net/mac80211.h
:functions: ieee80211_sta_eosp
.. kernel-doc:: include/net/mac80211.h
:functions: ieee80211_frame_release_type
.. kernel-doc:: include/net/mac80211.h
:functions: ieee80211_sta_ps_transition
.. kernel-doc:: include/net/mac80211.h
:functions: ieee80211_sta_ps_transition_ni
.. kernel-doc:: include/net/mac80211.h
:functions: ieee80211_sta_set_buffered
.. kernel-doc:: include/net/mac80211.h
:functions: ieee80211_sta_block_awake
Supporting multiple virtual interfaces
======================================
TBD
Note: WDS with identical MAC address should almost always be OK
Insert notes about having multiple virtual interfaces with different MAC
addresses here, note which configurations are supported by mac80211, add
notes about supporting hw crypto with it.
.. kernel-doc:: include/net/mac80211.h
:functions: ieee80211_iterate_active_interfaces
.. kernel-doc:: include/net/mac80211.h
:functions: ieee80211_iterate_active_interfaces_atomic
Station handling
================
TODO
.. kernel-doc:: include/net/mac80211.h
:functions: ieee80211_sta
.. kernel-doc:: include/net/mac80211.h
:functions: sta_notify_cmd
.. kernel-doc:: include/net/mac80211.h
:functions: ieee80211_find_sta
.. kernel-doc:: include/net/mac80211.h
:functions: ieee80211_find_sta_by_ifaddr
Hardware scan offload
=====================
TBD
.. kernel-doc:: include/net/mac80211.h
:functions: ieee80211_scan_completed
Aggregation
===========
TX A-MPDU aggregation
---------------------
.. kernel-doc:: net/mac80211/agg-tx.c
:doc: TX A-MPDU aggregation
.. WARNING: DOCPROC directive not supported: !Cnet/mac80211/agg-tx.c
RX A-MPDU aggregation
---------------------
.. kernel-doc:: net/mac80211/agg-rx.c
:doc: RX A-MPDU aggregation
.. WARNING: DOCPROC directive not supported: !Cnet/mac80211/agg-rx.c
.. kernel-doc:: include/net/mac80211.h
:functions: ieee80211_ampdu_mlme_action
Spatial Multiplexing Powersave (SMPS)
=====================================
.. kernel-doc:: include/net/mac80211.h
:doc: Spatial multiplexing power save
.. kernel-doc:: include/net/mac80211.h
:functions: ieee80211_request_smps
.. kernel-doc:: include/net/mac80211.h
:functions: ieee80211_smps_mode
TBD
This part of the book describes the rate control algorithm interface and
how it relates to mac80211 and drivers.
Rate Control API
================
TBD
.. kernel-doc:: include/net/mac80211.h
:functions: ieee80211_start_tx_ba_session
.. kernel-doc:: include/net/mac80211.h
:functions: ieee80211_start_tx_ba_cb_irqsafe
.. kernel-doc:: include/net/mac80211.h
:functions: ieee80211_stop_tx_ba_session
.. kernel-doc:: include/net/mac80211.h
:functions: ieee80211_stop_tx_ba_cb_irqsafe
.. kernel-doc:: include/net/mac80211.h
:functions: ieee80211_rate_control_changed
.. kernel-doc:: include/net/mac80211.h
:functions: ieee80211_tx_rate_control
.. kernel-doc:: include/net/mac80211.h
:functions: rate_control_send_low
TBD
This part of the book describes mac80211 internals.
Key handling
============
Key handling basics
-------------------
.. kernel-doc:: net/mac80211/key.c
:doc: Key handling basics
MORE TBD
--------
TBD
Receive processing
==================
TBD
Transmit processing
===================
TBD
Station info handling
=====================
Programming information
-----------------------
.. kernel-doc:: net/mac80211/sta_info.h
:functions: sta_info
.. kernel-doc:: net/mac80211/sta_info.h
:functions: ieee80211_sta_info_flags
STA information lifetime rules
------------------------------
.. kernel-doc:: net/mac80211/sta_info.c
:doc: STA information lifetime rules
Aggregation
===========
.. kernel-doc:: net/mac80211/sta_info.h
:functions: sta_ampdu_mlme
.. kernel-doc:: net/mac80211/sta_info.h
:functions: tid_ampdu_tx
.. kernel-doc:: net/mac80211/sta_info.h
:functions: tid_ampdu_rx
Synchronisation
===============
TBD
Locking, lots of RCU
===========================
mac80211 subsystem (basics)
===========================
You should read and understand the information contained within this
part of the book while implementing a mac80211 driver. In some chapters,
advanced usage is noted, those may be skipped if this isn't needed.
This part of the book only covers station and monitor mode
functionality, additional information required to implement the other
modes is covered in the second part of the book.
Basic hardware handling
=======================
TBD
This chapter shall contain information on getting a hw struct allocated
and registered with mac80211.
Since it is required to allocate rates/modes before registering a hw
struct, this chapter shall also contain information on setting up the
rate/mode structs.
Additionally, some discussion about the callbacks and the general
programming model should be in here, including the definition of
ieee80211_ops which will be referred to a lot.
Finally, a discussion of hardware capabilities should be done with
references to other parts of the book.
.. kernel-doc:: include/net/mac80211.h
:functions: ieee80211_hw
.. kernel-doc:: include/net/mac80211.h
:functions: ieee80211_hw_flags
.. kernel-doc:: include/net/mac80211.h
:functions: SET_IEEE80211_DEV
.. kernel-doc:: include/net/mac80211.h
:functions: SET_IEEE80211_PERM_ADDR
.. kernel-doc:: include/net/mac80211.h
:functions: ieee80211_ops
.. kernel-doc:: include/net/mac80211.h
:functions: ieee80211_alloc_hw
.. kernel-doc:: include/net/mac80211.h
:functions: ieee80211_register_hw
.. kernel-doc:: include/net/mac80211.h
:functions: ieee80211_unregister_hw
.. kernel-doc:: include/net/mac80211.h
:functions: ieee80211_free_hw
PHY configuration
=================
TBD
This chapter should describe PHY handling including start/stop callbacks
and the various structures used.
.. kernel-doc:: include/net/mac80211.h
:functions: ieee80211_conf
.. kernel-doc:: include/net/mac80211.h
:functions: ieee80211_conf_flags
Virtual interfaces
==================
TBD
This chapter should describe virtual interface basics that are relevant
to the driver (VLANs, MGMT etc are not.) It should explain the use of
the add_iface/remove_iface callbacks as well as the interface
configuration callbacks.
Things related to AP mode should be discussed there.
Things related to supporting multiple interfaces should be in the
appropriate chapter, a BIG FAT note should be here about this though and
the recommendation to allow only a single interface in STA mode at
first!
.. kernel-doc:: include/net/mac80211.h
:functions: ieee80211_vif
Receive and transmit processing
===============================
what should be here
-------------------
TBD
This should describe the receive and transmit paths in mac80211/the
drivers as well as transmit status handling.
Frame format
------------
.. kernel-doc:: include/net/mac80211.h
:doc: Frame format
Packet alignment
----------------
.. kernel-doc:: net/mac80211/rx.c
:doc: Packet alignment
Calling into mac80211 from interrupts
-------------------------------------
.. kernel-doc:: include/net/mac80211.h
:doc: Calling mac80211 from interrupts
functions/definitions
---------------------
.. kernel-doc:: include/net/mac80211.h
:functions: ieee80211_rx_status
.. kernel-doc:: include/net/mac80211.h
:functions: mac80211_rx_flags
.. kernel-doc:: include/net/mac80211.h
:functions: mac80211_tx_info_flags
.. kernel-doc:: include/net/mac80211.h
:functions: mac80211_tx_control_flags
.. kernel-doc:: include/net/mac80211.h
:functions: mac80211_rate_control_flags
.. kernel-doc:: include/net/mac80211.h
:functions: ieee80211_tx_rate
.. kernel-doc:: include/net/mac80211.h
:functions: ieee80211_tx_info
.. kernel-doc:: include/net/mac80211.h
:functions: ieee80211_tx_info_clear_status
.. kernel-doc:: include/net/mac80211.h
:functions: ieee80211_rx
.. kernel-doc:: include/net/mac80211.h
:functions: ieee80211_rx_ni
.. kernel-doc:: include/net/mac80211.h
:functions: ieee80211_rx_irqsafe
.. kernel-doc:: include/net/mac80211.h
:functions: ieee80211_tx_status
.. kernel-doc:: include/net/mac80211.h
:functions: ieee80211_tx_status_ni
.. kernel-doc:: include/net/mac80211.h
:functions: ieee80211_tx_status_irqsafe
.. kernel-doc:: include/net/mac80211.h
:functions: ieee80211_rts_get
.. kernel-doc:: include/net/mac80211.h
:functions: ieee80211_rts_duration
.. kernel-doc:: include/net/mac80211.h
:functions: ieee80211_ctstoself_get
.. kernel-doc:: include/net/mac80211.h
:functions: ieee80211_ctstoself_duration
.. kernel-doc:: include/net/mac80211.h
:functions: ieee80211_generic_frame_duration
.. kernel-doc:: include/net/mac80211.h
:functions: ieee80211_wake_queue
.. kernel-doc:: include/net/mac80211.h
:functions: ieee80211_stop_queue
.. kernel-doc:: include/net/mac80211.h
:functions: ieee80211_wake_queues
.. kernel-doc:: include/net/mac80211.h
:functions: ieee80211_stop_queues
.. kernel-doc:: include/net/mac80211.h
:functions: ieee80211_queue_stopped
Frame filtering
===============
.. kernel-doc:: include/net/mac80211.h
:doc: Frame filtering
.. kernel-doc:: include/net/mac80211.h
:functions: ieee80211_filter_flags
The mac80211 workqueue
======================
.. kernel-doc:: include/net/mac80211.h
:doc: mac80211 workqueue
.. kernel-doc:: include/net/mac80211.h
:functions: ieee80211_queue_work
.. kernel-doc:: include/net/mac80211.h
:functions: ieee80211_queue_delayed_work
...@@ -6,7 +6,7 @@ Description: ...@@ -6,7 +6,7 @@ Description:
Being used for adding and removing rbd block devices. Being used for adding and removing rbd block devices.
Usage: <mon ip addr> <options> <pool name> <rbd image name> [snap name] Usage: <mon ip addr> <options> <pool name> <rbd image name> [<snap name>]
$ echo "192.168.0.1 name=admin rbd foo" > /sys/bus/rbd/add $ echo "192.168.0.1 name=admin rbd foo" > /sys/bus/rbd/add
...@@ -14,9 +14,13 @@ The snapshot name can be "-" or omitted to map the image read/write. A <dev-id> ...@@ -14,9 +14,13 @@ The snapshot name can be "-" or omitted to map the image read/write. A <dev-id>
will be assigned for any registered block device. If snapshot is used, it will will be assigned for any registered block device. If snapshot is used, it will
be mapped read-only. be mapped read-only.
Removal of a device: Usage: <dev-id> [force]
$ echo <dev-id> > /sys/bus/rbd/remove $ echo 2 > /sys/bus/rbd/remove
Optional "force" argument which when passed will wait for running requests and
then unmap the image. Requests sent to the driver after initiating the removal
will be failed. (August 2016, since 4.9.)
What: /sys/bus/rbd/add_single_major What: /sys/bus/rbd/add_single_major
Date: December 2013 Date: December 2013
...@@ -43,10 +47,25 @@ Description: Available only if rbd module is inserted with single_major ...@@ -43,10 +47,25 @@ Description: Available only if rbd module is inserted with single_major
Entries under /sys/bus/rbd/devices/<dev-id>/ Entries under /sys/bus/rbd/devices/<dev-id>/
-------------------------------------------- --------------------------------------------
client_addr
The ceph unique client entity_addr_t (address + nonce).
The format is <address>:<port>/<nonce>: '1.2.3.4:1234/5678' or
'[1:2:3:4:5:6:7:8]:1234/5678'. (August 2016, since 4.9.)
client_id client_id
The ceph unique client id that was assigned for this specific session. The ceph unique client id that was assigned for this specific session.
cluster_fsid
The ceph cluster UUID. (August 2016, since 4.9.)
config_info
The string written into /sys/bus/rbd/add{,_single_major}. (August
2016, since 4.9.)
features features
A hexadecimal encoding of the feature bits for this image. A hexadecimal encoding of the feature bits for this image.
...@@ -92,6 +111,10 @@ current_snap ...@@ -92,6 +111,10 @@ current_snap
The current snapshot for which the device is mapped. The current snapshot for which the device is mapped.
snap_id
The current snapshot's id. (August 2016, since 4.9.)
parent parent
Information identifying the chain of parent images in a layered rbd Information identifying the chain of parent images in a layered rbd
......
...@@ -220,8 +220,11 @@ What: /sys/class/cxl/<card>/reset ...@@ -220,8 +220,11 @@ What: /sys/class/cxl/<card>/reset
Date: October 2014 Date: October 2014
Contact: linuxppc-dev@lists.ozlabs.org Contact: linuxppc-dev@lists.ozlabs.org
Description: write only Description: write only
Writing 1 will issue a PERST to card which may cause the card Writing 1 will issue a PERST to card provided there are no
to reload the FPGA depending on load_image_on_perst. contexts active on any one of the card AFUs. This may cause
the card to reload the FPGA depending on load_image_on_perst.
Writing -1 will do a force PERST irrespective of any active
contexts on the card AFUs.
Users: https://github.com/ibm-capi/libcxl Users: https://github.com/ibm-capi/libcxl
What: /sys/class/cxl/<card>/perst_reloads_same_image (not in a guest) What: /sys/class/cxl/<card>/perst_reloads_same_image (not in a guest)
......
...@@ -24,7 +24,8 @@ Description: ...@@ -24,7 +24,8 @@ Description:
of led events. of led events.
You can change triggers in a similar manner to the way an IO You can change triggers in a similar manner to the way an IO
scheduler is chosen. Trigger specific parameters can appear in scheduler is chosen. Trigger specific parameters can appear in
/sys/class/leds/<led> once a given trigger is selected. /sys/class/leds/<led> once a given trigger is selected. For
their documentation see sysfs-class-led-trigger-*.
What: /sys/class/leds/<led>/inverted What: /sys/class/leds/<led>/inverted
Date: January 2011 Date: January 2011
......
What: /sys/class/leds/<led>/delay_on
Date: Jun 2012
KernelVersion: 3.6
Contact: linux-leds@vger.kernel.org
Description:
Specifies for how many milliseconds the LED has to stay at
LED_FULL brightness after it has been armed.
Defaults to 100 ms.
What: /sys/class/leds/<led>/delay_off
Date: Jun 2012
KernelVersion: 3.6
Contact: linux-leds@vger.kernel.org
Description:
Specifies for how many milliseconds the LED has to stay at
LED_OFF brightness after it has been armed.
Defaults to 100 ms.
What: /sys/class/leds/<led>/invert
Date: Jun 2012
KernelVersion: 3.6
Contact: linux-leds@vger.kernel.org
Description:
Reverse the blink logic. If set to 0 (default) blink on for
delay_on ms, then blink off for delay_off ms, leaving the LED
normally off. If set to 1, blink off for delay_off ms, then
blink on for delay_on ms, leaving the LED normally on.
Setting this value also immediately changes the LED state.
What: /sys/class/leds/<led>/shot
Date: Jun 2012
KernelVersion: 3.6
Contact: linux-leds@vger.kernel.org
Description:
Write any non-empty string to signal an events, this starts a
blink sequence if not already running.
What: /sys/class/leds/<led>/ports/<port>
Date: September 2016
KernelVersion: 4.9
Contact: linux-leds@vger.kernel.org
linux-usb@vger.kernel.org
Description:
Every dir entry represents a single USB port that can be
selected for the USB port trigger. Selecting ports makes trigger
observing them for any connected devices and lighting on LED if
there are any.
Echoing "1" value selects USB port. Echoing "0" unselects it.
Current state can be also read.
...@@ -153,7 +153,7 @@ Description: ...@@ -153,7 +153,7 @@ Description:
What: /sys/class/mic/mic(x)/heartbeat_enable What: /sys/class/mic/mic(x)/heartbeat_enable
Date: March 2015 Date: March 2015
KernelVersion: 3.20 KernelVersion: 4.4
Contact: Ashutosh Dixit <ashutosh.dixit@intel.com> Contact: Ashutosh Dixit <ashutosh.dixit@intel.com>
Description: Description:
The MIC drivers detect and inform user space about card crashes The MIC drivers detect and inform user space about card crashes
......
...@@ -22,7 +22,7 @@ Description: ...@@ -22,7 +22,7 @@ Description:
What: /sys/class/power_supply/max14577-charger/device/fast_charge_timer What: /sys/class/power_supply/max14577-charger/device/fast_charge_timer
Date: October 2014 Date: October 2014
KernelVersion: 3.18.0 KernelVersion: 3.18.0
Contact: Krzysztof Kozlowski <k.kozlowski@samsung.com> Contact: Krzysztof Kozlowski <krzk@kernel.org>
Description: Description:
This entry shows and sets the maximum time the max14577 This entry shows and sets the maximum time the max14577
charger operates in fast-charge mode. When the timer expires charger operates in fast-charge mode. When the timer expires
...@@ -36,7 +36,7 @@ Description: ...@@ -36,7 +36,7 @@ Description:
What: /sys/class/power_supply/max77693-charger/device/fast_charge_timer What: /sys/class/power_supply/max77693-charger/device/fast_charge_timer
Date: January 2015 Date: January 2015
KernelVersion: 3.19.0 KernelVersion: 3.19.0
Contact: Krzysztof Kozlowski <k.kozlowski@samsung.com> Contact: Krzysztof Kozlowski <krzk@kernel.org>
Description: Description:
This entry shows and sets the maximum time the max77693 This entry shows and sets the maximum time the max77693
charger operates in fast-charge mode. When the timer expires charger operates in fast-charge mode. When the timer expires
...@@ -50,7 +50,7 @@ Description: ...@@ -50,7 +50,7 @@ Description:
What: /sys/class/power_supply/max77693-charger/device/top_off_threshold_current What: /sys/class/power_supply/max77693-charger/device/top_off_threshold_current
Date: January 2015 Date: January 2015
KernelVersion: 3.19.0 KernelVersion: 3.19.0
Contact: Krzysztof Kozlowski <k.kozlowski@samsung.com> Contact: Krzysztof Kozlowski <krzk@kernel.org>
Description: Description:
This entry shows and sets the charging current threshold for This entry shows and sets the charging current threshold for
entering top-off charging mode. When charging current in fast entering top-off charging mode. When charging current in fast
...@@ -65,7 +65,7 @@ Description: ...@@ -65,7 +65,7 @@ Description:
What: /sys/class/power_supply/max77693-charger/device/top_off_timer What: /sys/class/power_supply/max77693-charger/device/top_off_timer
Date: January 2015 Date: January 2015
KernelVersion: 3.19.0 KernelVersion: 3.19.0
Contact: Krzysztof Kozlowski <k.kozlowski@samsung.com> Contact: Krzysztof Kozlowski <krzk@kernel.org>
Description: Description:
This entry shows and sets the maximum time the max77693 This entry shows and sets the maximum time the max77693
charger operates in top-off charge mode. When the timer expires charger operates in top-off charge mode. When the timer expires
......
...@@ -35,6 +35,12 @@ Description: Displays a set of alternate modes supported by a wheel. Each ...@@ -35,6 +35,12 @@ Description: Displays a set of alternate modes supported by a wheel. Each
DF-EX <*--------> G25 <-> G27 DF-EX <*--------> G25 <-> G27
DF-EX <*----------------> G27 DF-EX <*----------------> G27
G29:
DF-EX <*> DFP <-> G25 <-> G27 <-> G29
DF-EX <*--------> G25 <-> G27 <-> G29
DF-EX <*----------------> G27 <-> G29
DF-EX <*------------------------> G29
DFGT: DFGT:
DF-EX <*> DFP <-> DFGT DF-EX <*> DFP <-> DFGT
DF-EX <*--------> DFGT DF-EX <*--------> DFGT
...@@ -50,3 +56,12 @@ Description: Displays the real model of the wheel regardless of any ...@@ -50,3 +56,12 @@ Description: Displays the real model of the wheel regardless of any
alternate mode the wheel might be switched to. alternate mode the wheel might be switched to.
It is a read-only value. It is a read-only value.
This entry is not created for devices that have only one mode. This entry is not created for devices that have only one mode.
What: /sys/bus/hid/drivers/logitech/<dev>/combine_pedals
Date: Sep 2016
KernelVersion: 4.9
Contact: Simon Wood <simon@mungewell.org>
Description: Controls whether a combined value of accelerator and brake is
reported on the Y axis of the controller. Useful for older games
which can do not work with separate accelerator/brake axis.
Off ('0') by default, enabled by setting '1'.
...@@ -24,6 +24,7 @@ What: /sys/bus/hid/devices/<bus>:<vid>:<pid>.<n>/wacom_led/status0_luminance ...@@ -24,6 +24,7 @@ What: /sys/bus/hid/devices/<bus>:<vid>:<pid>.<n>/wacom_led/status0_luminance
Date: August 2014 Date: August 2014
Contact: linux-input@vger.kernel.org Contact: linux-input@vger.kernel.org
Description: Description:
<obsoleted by the LED class API now exported by the driver>
Writing to this file sets the status LED luminance (1..127) Writing to this file sets the status LED luminance (1..127)
when the stylus does not touch the tablet surface, and no when the stylus does not touch the tablet surface, and no
button is pressed on the stylus. This luminance level is button is pressed on the stylus. This luminance level is
...@@ -33,6 +34,7 @@ What: /sys/bus/hid/devices/<bus>:<vid>:<pid>.<n>/wacom_led/status1_luminance ...@@ -33,6 +34,7 @@ What: /sys/bus/hid/devices/<bus>:<vid>:<pid>.<n>/wacom_led/status1_luminance
Date: August 2014 Date: August 2014
Contact: linux-input@vger.kernel.org Contact: linux-input@vger.kernel.org
Description: Description:
<obsoleted by the LED class API now exported by the driver>
Writing to this file sets the status LED luminance (1..127) Writing to this file sets the status LED luminance (1..127)
when the stylus touches the tablet surface, or any button is when the stylus touches the tablet surface, or any button is
pressed on the stylus. pressed on the stylus.
...@@ -41,6 +43,7 @@ What: /sys/bus/hid/devices/<bus>:<vid>:<pid>.<n>/wacom_led/status_led0_select ...@@ -41,6 +43,7 @@ What: /sys/bus/hid/devices/<bus>:<vid>:<pid>.<n>/wacom_led/status_led0_select
Date: August 2014 Date: August 2014
Contact: linux-input@vger.kernel.org Contact: linux-input@vger.kernel.org
Description: Description:
<obsoleted by the LED class API now exported by the driver>
Writing to this file sets which one of the four (for Intuos 4 Writing to this file sets which one of the four (for Intuos 4
and Intuos 5) or of the right four (for Cintiq 21UX2 and Cintiq and Intuos 5) or of the right four (for Cintiq 21UX2 and Cintiq
24HD) status LEDs is active (0..3). The other three LEDs on the 24HD) status LEDs is active (0..3). The other three LEDs on the
...@@ -50,6 +53,7 @@ What: /sys/bus/hid/devices/<bus>:<vid>:<pid>.<n>/wacom_led/status_led1_select ...@@ -50,6 +53,7 @@ What: /sys/bus/hid/devices/<bus>:<vid>:<pid>.<n>/wacom_led/status_led1_select
Date: August 2014 Date: August 2014
Contact: linux-input@vger.kernel.org Contact: linux-input@vger.kernel.org
Description: Description:
<obsoleted by the LED class API now exported by the driver>
Writing to this file sets which one of the left four (for Cintiq 21UX2 Writing to this file sets which one of the left four (for Cintiq 21UX2
and Cintiq 24HD) status LEDs is active (0..3). The other three LEDs on and Cintiq 24HD) status LEDs is active (0..3). The other three LEDs on
the left are always inactive. the left are always inactive.
...@@ -91,6 +95,7 @@ What: /sys/bus/hid/devices/<bus>:<vid>:<pid>.<n>/wacom_remote/<serial_number>/r ...@@ -91,6 +95,7 @@ What: /sys/bus/hid/devices/<bus>:<vid>:<pid>.<n>/wacom_remote/<serial_number>/r
Date: July 2015 Date: July 2015
Contact: linux-input@vger.kernel.org Contact: linux-input@vger.kernel.org
Description: Description:
<obsoleted by the LED class API now exported by the driver>
Reading from this file reports the mode status of the Reading from this file reports the mode status of the
remote as indicated by the LED lights on the device. If no remote as indicated by the LED lights on the device. If no
reports have been received from the paired device, reading reports have been received from the paired device, reading
......
What: /sys/bus/i2c/devices/<busnum>-<devaddr>/pressure0_input
Date: June 2010
Contact: Christoph Mair <christoph.mair@gmail.com>
Description: Start a pressure measurement and read the result. Values
represent the ambient air pressure in pascal (0.01 millibar).
Reading: returns the current air pressure.
What: /sys/bus/i2c/devices/<busnum>-<devaddr>/temp0_input
Date: June 2010
Contact: Christoph Mair <christoph.mair@gmail.com>
Description: Measure the ambient temperature. The returned value represents
the ambient temperature in units of 0.1 degree celsius.
Reading: returns the current temperature.
What: /sys/bus/i2c/devices/<busnum>-<devaddr>/oversampling
Date: June 2010
Contact: Christoph Mair <christoph.mair@gmail.com>
Description: Tell the bmp085 to use more samples to calculate a pressure
value. When writing to this file the chip will use 2^x samples
to calculate the next pressure value with x being the value
written. Using this feature will decrease RMS noise and
increase the measurement time.
Reading: returns the current oversampling setting.
Writing: sets a new oversampling setting.
Accepted values: 0..3.
What: /sys/kernel/irq
Date: September 2016
KernelVersion: 4.9
Contact: Craig Gallek <kraig@google.com>
Description: Directory containing information about the system's IRQs.
Specifically, data from the associated struct irq_desc.
The information here is similar to that in /proc/interrupts
but in a more machine-friendly format. This directory contains
one subdirectory for each Linux IRQ number.
What: /sys/kernel/irq/<irq>/actions
Date: September 2016
KernelVersion: 4.9
Contact: Craig Gallek <kraig@google.com>
Description: The IRQ action chain. A comma-separated list of zero or more
device names associated with this interrupt.
What: /sys/kernel/irq/<irq>/chip_name
Date: September 2016
KernelVersion: 4.9
Contact: Craig Gallek <kraig@google.com>
Description: Human-readable chip name supplied by the associated device
driver.
What: /sys/kernel/irq/<irq>/hwirq
Date: September 2016
KernelVersion: 4.9
Contact: Craig Gallek <kraig@google.com>
Description: When interrupt translation domains are used, this file contains
the underlying hardware IRQ number used for this Linux IRQ.
What: /sys/kernel/irq/<irq>/name
Date: September 2016
KernelVersion: 4.9
Contact: Craig Gallek <kraig@google.com>
Description: Human-readable flow handler name as defined by the irq chip
driver.
What: /sys/kernel/irq/<irq>/per_cpu_count
Date: September 2016
KernelVersion: 4.9
Contact: Craig Gallek <kraig@google.com>
Description: The number of times the interrupt has fired since boot. This
is a comma-separated list of counters; one per CPU in CPU id
order. NOTE: This file consistently shows counters for all
CPU ids. This differs from the behavior of /proc/interrupts
which only shows counters for online CPUs.
What: /sys/kernel/irq/<irq>/type
Date: September 2016
KernelVersion: 4.9
Contact: Craig Gallek <kraig@google.com>
Description: The type of the interrupt. Either the string 'level' or 'edge'.
.. _changes:
Minimal requerements to compile the Kernel
++++++++++++++++++++++++++++++++++++++++++
Intro Intro
===== =====
This document is designed to provide a list of the minimum levels of This document is designed to provide a list of the minimum levels of
software necessary to run the 3.0 kernels. software necessary to run the 4.x kernels.
This document is originally based on my "Changes" file for 2.0.x kernels This document is originally based on my "Changes" file for 2.0.x kernels
and therefore owes credit to the same people as that file (Jared Mauch, and therefore owes credit to the same people as that file (Jared Mauch,
...@@ -10,9 +15,9 @@ Axel Boldt, Alessandro Sigala, and countless other users all over the ...@@ -10,9 +15,9 @@ Axel Boldt, Alessandro Sigala, and countless other users all over the
'net). 'net).
Current Minimal Requirements Current Minimal Requirements
============================ ****************************
Upgrade to at *least* these software revisions before thinking you've Upgrade to at **least** these software revisions before thinking you've
encountered a bug! If you're unsure what version you're currently encountered a bug! If you're unsure what version you're currently
running, the suggested command should tell you. running, the suggested command should tell you.
...@@ -21,34 +26,40 @@ running a Linux kernel. Also, not all tools are necessary on all ...@@ -21,34 +26,40 @@ running a Linux kernel. Also, not all tools are necessary on all
systems; obviously, if you don't have any ISDN hardware, for example, systems; obviously, if you don't have any ISDN hardware, for example,
you probably needn't concern yourself with isdn4k-utils. you probably needn't concern yourself with isdn4k-utils.
o GNU C 3.2 # gcc --version ====================== =============== ========================================
o GNU make 3.80 # make --version Program Minimal version Command to check the version
o binutils 2.12 # ld -v ====================== =============== ========================================
o util-linux 2.10o # fdformat --version GNU C 3.2 gcc --version
o module-init-tools 0.9.10 # depmod -V GNU make 3.80 make --version
o e2fsprogs 1.41.4 # e2fsck -V binutils 2.12 ld -v
o jfsutils 1.1.3 # fsck.jfs -V util-linux 2.10o fdformat --version
o reiserfsprogs 3.6.3 # reiserfsck -V module-init-tools 0.9.10 depmod -V
o xfsprogs 2.6.0 # xfs_db -V e2fsprogs 1.41.4 e2fsck -V
o squashfs-tools 4.0 # mksquashfs -version jfsutils 1.1.3 fsck.jfs -V
o btrfs-progs 0.18 # btrfsck reiserfsprogs 3.6.3 reiserfsck -V
o pcmciautils 004 # pccardctl -V xfsprogs 2.6.0 xfs_db -V
o quota-tools 3.09 # quota -V squashfs-tools 4.0 mksquashfs -version
o PPP 2.4.0 # pppd --version btrfs-progs 0.18 btrfsck
o isdn4k-utils 3.1pre1 # isdnctrl 2>&1|grep version pcmciautils 004 pccardctl -V
o nfs-utils 1.0.5 # showmount --version quota-tools 3.09 quota -V
o procps 3.2.0 # ps --version PPP 2.4.0 pppd --version
o oprofile 0.9 # oprofiled --version isdn4k-utils 3.1pre1 isdnctrl 2>&1|grep version
o udev 081 # udevd --version nfs-utils 1.0.5 showmount --version
o grub 0.93 # grub --version || grub-install --version procps 3.2.0 ps --version
o mcelog 0.6 # mcelog --version oprofile 0.9 oprofiled --version
o iptables 1.4.2 # iptables -V udev 081 udevd --version
o openssl & libcrypto 1.0.0 # openssl version grub 0.93 grub --version || grub-install --version
o bc 1.06.95 # bc --version mcelog 0.6 mcelog --version
iptables 1.4.2 iptables -V
openssl & libcrypto 1.0.0 openssl version
bc 1.06.95 bc --version
Sphinx\ [#f1]_ 1.2 sphinx-build --version
====================== =============== ========================================
.. [#f1] Sphinx is needed only to build the Kernel documentation
Kernel compilation Kernel compilation
================== ******************
GCC GCC
--- ---
...@@ -64,16 +75,16 @@ You will need GNU make 3.80 or later to build the kernel. ...@@ -64,16 +75,16 @@ You will need GNU make 3.80 or later to build the kernel.
Binutils Binutils
-------- --------
Linux on IA-32 has recently switched from using as86 to using gas for Linux on IA-32 has recently switched from using ``as86`` to using ``gas`` for
assembling the 16-bit boot code, removing the need for as86 to compile assembling the 16-bit boot code, removing the need for ``as86`` to compile
your kernel. This change does, however, mean that you need a recent your kernel. This change does, however, mean that you need a recent
release of binutils. release of binutils.
Perl Perl
---- ----
You will need perl 5 and the following modules: Getopt::Long, Getopt::Std, You will need perl 5 and the following modules: ``Getopt::Long``,
File::Basename, and File::Find to build the kernel. ``Getopt::Std``, ``File::Basename``, and ``File::Find`` to build the kernel.
BC BC
-- --
...@@ -93,7 +104,7 @@ and higher. ...@@ -93,7 +104,7 @@ and higher.
System utilities System utilities
================ ****************
Architectural changes Architectural changes
--------------------- ---------------------
...@@ -115,7 +126,7 @@ well as the desired DocBook stylesheets. ...@@ -115,7 +126,7 @@ well as the desired DocBook stylesheets.
Util-linux Util-linux
---------- ----------
New versions of util-linux provide *fdisk support for larger disks, New versions of util-linux provide ``fdisk`` support for larger disks,
support new options to mount, recognize more supported partition support new options to mount, recognize more supported partition
types, have a fdformat which works with 2.4 kernels, and similar goodies. types, have a fdformat which works with 2.4 kernels, and similar goodies.
You'll probably want to upgrade. You'll probably want to upgrade.
...@@ -125,54 +136,57 @@ Ksymoops ...@@ -125,54 +136,57 @@ Ksymoops
If the unthinkable happens and your kernel oopses, you may need the If the unthinkable happens and your kernel oopses, you may need the
ksymoops tool to decode it, but in most cases you don't. ksymoops tool to decode it, but in most cases you don't.
It is generally preferred to build the kernel with CONFIG_KALLSYMS so It is generally preferred to build the kernel with ``CONFIG_KALLSYMS`` so
that it produces readable dumps that can be used as-is (this also that it produces readable dumps that can be used as-is (this also
produces better output than ksymoops). If for some reason your kernel produces better output than ksymoops). If for some reason your kernel
is not build with CONFIG_KALLSYMS and you have no way to rebuild and is not build with ``CONFIG_KALLSYMS`` and you have no way to rebuild and
reproduce the Oops with that option, then you can still decode that Oops reproduce the Oops with that option, then you can still decode that Oops
with ksymoops. with ksymoops.
Module-Init-Tools Module-Init-Tools
----------------- -----------------
A new module loader is now in the kernel that requires module-init-tools A new module loader is now in the kernel that requires ``module-init-tools``
to use. It is backward compatible with the 2.4.x series kernels. to use. It is backward compatible with the 2.4.x series kernels.
Mkinitrd Mkinitrd
-------- --------
These changes to the /lib/modules file tree layout also require that These changes to the ``/lib/modules`` file tree layout also require that
mkinitrd be upgraded. mkinitrd be upgraded.
E2fsprogs E2fsprogs
--------- ---------
The latest version of e2fsprogs fixes several bugs in fsck and The latest version of ``e2fsprogs`` fixes several bugs in fsck and
debugfs. Obviously, it's a good idea to upgrade. debugfs. Obviously, it's a good idea to upgrade.
JFSutils JFSutils
-------- --------
The jfsutils package contains the utilities for the file system. The ``jfsutils`` package contains the utilities for the file system.
The following utilities are available: The following utilities are available:
o fsck.jfs - initiate replay of the transaction log, and check
- ``fsck.jfs`` - initiate replay of the transaction log, and check
and repair a JFS formatted partition. and repair a JFS formatted partition.
o mkfs.jfs - create a JFS formatted partition.
o other file system utilities are also available in this package. - ``mkfs.jfs`` - create a JFS formatted partition.
- other file system utilities are also available in this package.
Reiserfsprogs Reiserfsprogs
------------- -------------
The reiserfsprogs package should be used for reiserfs-3.6.x The reiserfsprogs package should be used for reiserfs-3.6.x
(Linux kernels 2.4.x). It is a combined package and contains working (Linux kernels 2.4.x). It is a combined package and contains working
versions of mkreiserfs, resize_reiserfs, debugreiserfs and versions of ``mkreiserfs``, ``resize_reiserfs``, ``debugreiserfs`` and
reiserfsck. These utils work on both i386 and alpha platforms. ``reiserfsck``. These utils work on both i386 and alpha platforms.
Xfsprogs Xfsprogs
-------- --------
The latest version of xfsprogs contains mkfs.xfs, xfs_db, and the The latest version of ``xfsprogs`` contains ``mkfs.xfs``, ``xfs_db``, and the
xfs_repair utilities, among others, for the XFS filesystem. It is ``xfs_repair`` utilities, among others, for the XFS filesystem. It is
architecture independent and any version from 2.0.0 onward should architecture independent and any version from 2.0.0 onward should
work correctly with this version of the XFS kernel code (2.6.0 or work correctly with this version of the XFS kernel code (2.6.0 or
later is recommended, due to some significant improvements). later is recommended, due to some significant improvements).
...@@ -180,7 +194,7 @@ later is recommended, due to some significant improvements). ...@@ -180,7 +194,7 @@ later is recommended, due to some significant improvements).
PCMCIAutils PCMCIAutils
----------- -----------
PCMCIAutils replaces pcmcia-cs. It properly sets up PCMCIAutils replaces ``pcmcia-cs``. It properly sets up
PCMCIA sockets at system startup and loads the appropriate modules PCMCIA sockets at system startup and loads the appropriate modules
for 16-bit PCMCIA devices if the kernel is modularized and the hotplug for 16-bit PCMCIA devices if the kernel is modularized and the hotplug
subsystem is used. subsystem is used.
...@@ -198,19 +212,20 @@ Intel IA32 microcode ...@@ -198,19 +212,20 @@ Intel IA32 microcode
A driver has been added to allow updating of Intel IA32 microcode, A driver has been added to allow updating of Intel IA32 microcode,
accessible as a normal (misc) character device. If you are not using accessible as a normal (misc) character device. If you are not using
udev you may need to: udev you may need to::
mkdir /dev/cpu mkdir /dev/cpu
mknod /dev/cpu/microcode c 10 184 mknod /dev/cpu/microcode c 10 184
chmod 0644 /dev/cpu/microcode chmod 0644 /dev/cpu/microcode
as root before you can use this. You'll probably also want to as root before you can use this. You'll probably also want to
get the user-space microcode_ctl utility to use with this. get the user-space microcode_ctl utility to use with this.
udev udev
---- ----
udev is a userspace application for populating /dev dynamically with
only entries for devices actually present. udev replaces the basic ``udev`` is a userspace application for populating ``/dev`` dynamically with
only entries for devices actually present. ``udev`` replaces the basic
functionality of devfs, while allowing persistent device naming for functionality of devfs, while allowing persistent device naming for
devices. devices.
...@@ -218,10 +233,10 @@ FUSE ...@@ -218,10 +233,10 @@ FUSE
---- ----
Needs libfuse 2.4.0 or later. Absolute minimum is 2.3.0 but mount Needs libfuse 2.4.0 or later. Absolute minimum is 2.3.0 but mount
options 'direct_io' and 'kernel_cache' won't work. options ``direct_io`` and ``kernel_cache`` won't work.
Networking Networking
========== **********
General changes General changes
--------------- ---------------
...@@ -243,9 +258,9 @@ enable it to operate over diverse media layers. If you use PPP, ...@@ -243,9 +258,9 @@ enable it to operate over diverse media layers. If you use PPP,
upgrade pppd to at least 2.4.0. upgrade pppd to at least 2.4.0.
If you are not using udev, you must have the device file /dev/ppp If you are not using udev, you must have the device file /dev/ppp
which can be made by: which can be made by::
mknod /dev/ppp c 108 0 mknod /dev/ppp c 108 0
as root. as root.
...@@ -260,22 +275,22 @@ NFS-utils ...@@ -260,22 +275,22 @@ NFS-utils
In ancient (2.4 and earlier) kernels, the nfs server needed to know In ancient (2.4 and earlier) kernels, the nfs server needed to know
about any client that expected to be able to access files via NFS. This about any client that expected to be able to access files via NFS. This
information would be given to the kernel by "mountd" when the client information would be given to the kernel by ``mountd`` when the client
mounted the filesystem, or by "exportfs" at system startup. exportfs mounted the filesystem, or by ``exportfs`` at system startup. exportfs
would take information about active clients from /var/lib/nfs/rmtab. would take information about active clients from ``/var/lib/nfs/rmtab``.
This approach is quite fragile as it depends on rmtab being correct This approach is quite fragile as it depends on rmtab being correct
which is not always easy, particularly when trying to implement which is not always easy, particularly when trying to implement
fail-over. Even when the system is working well, rmtab suffers from fail-over. Even when the system is working well, ``rmtab`` suffers from
getting lots of old entries that never get removed. getting lots of old entries that never get removed.
With modern kernels we have the option of having the kernel tell mountd With modern kernels we have the option of having the kernel tell mountd
when it gets a request from an unknown host, and mountd can give when it gets a request from an unknown host, and mountd can give
appropriate export information to the kernel. This removes the appropriate export information to the kernel. This removes the
dependency on rmtab and means that the kernel only needs to know about dependency on ``rmtab`` and means that the kernel only needs to know about
currently active clients. currently active clients.
To enable this new functionality, you need to: To enable this new functionality, you need to::
mount -t nfsd nfsd /proc/fs/nfsd mount -t nfsd nfsd /proc/fs/nfsd
...@@ -287,8 +302,32 @@ mcelog ...@@ -287,8 +302,32 @@ mcelog
------ ------
On x86 kernels the mcelog utility is needed to process and log machine check On x86 kernels the mcelog utility is needed to process and log machine check
events when CONFIG_X86_MCE is enabled. Machine check events are errors reported events when ``CONFIG_X86_MCE`` is enabled. Machine check events are errors
by the CPU. Processing them is strongly encouraged. reported by the CPU. Processing them is strongly encouraged.
Kernel documentation
********************
Sphinx
------
The ReST markups currently used by the Documentation/ files are meant to be
built with ``Sphinx`` version 1.2 or upper. If you're desiring to build
PDF outputs, it is recommended to use version 1.4.6.
.. note::
Please notice that, for PDF and LaTeX output, you'll also need ``XeLaTeX``
version 3.14159265. Depending on the distribution, you may also need
to install a series of ``texlive`` packages that provide the minimal
set of functionalities required for ``XeLaTex`` to work.
Other tools
-----------
In order to produce documentation from DocBook, you'll also need ``xmlto``.
Please notice, however, that we're currently migrating all documents to use
``Sphinx``.
Getting updated software Getting updated software
======================== ========================
...@@ -298,114 +337,149 @@ Kernel compilation ...@@ -298,114 +337,149 @@ Kernel compilation
gcc gcc
--- ---
o <ftp://ftp.gnu.org/gnu/gcc/>
- <ftp://ftp.gnu.org/gnu/gcc/>
Make Make
---- ----
o <ftp://ftp.gnu.org/gnu/make/>
- <ftp://ftp.gnu.org/gnu/make/>
Binutils Binutils
-------- --------
o <ftp://ftp.kernel.org/pub/linux/devel/binutils/>
- <ftp://ftp.kernel.org/pub/linux/devel/binutils/>
OpenSSL OpenSSL
------- -------
o <https://www.openssl.org/>
- <https://www.openssl.org/>
System utilities System utilities
**************** ****************
Util-linux Util-linux
---------- ----------
o <ftp://ftp.kernel.org/pub/linux/utils/util-linux/>
- <ftp://ftp.kernel.org/pub/linux/utils/util-linux/>
Ksymoops Ksymoops
-------- --------
o <ftp://ftp.kernel.org/pub/linux/utils/kernel/ksymoops/v2.4/>
- <ftp://ftp.kernel.org/pub/linux/utils/kernel/ksymoops/v2.4/>
Module-Init-Tools Module-Init-Tools
----------------- -----------------
o <ftp://ftp.kernel.org/pub/linux/kernel/people/rusty/modules/>
- <ftp://ftp.kernel.org/pub/linux/kernel/people/rusty/modules/>
Mkinitrd Mkinitrd
-------- --------
o <https://code.launchpad.net/initrd-tools/main>
- <https://code.launchpad.net/initrd-tools/main>
E2fsprogs E2fsprogs
--------- ---------
o <http://prdownloads.sourceforge.net/e2fsprogs/e2fsprogs-1.29.tar.gz>
- <http://prdownloads.sourceforge.net/e2fsprogs/e2fsprogs-1.29.tar.gz>
JFSutils JFSutils
-------- --------
o <http://jfs.sourceforge.net/>
- <http://jfs.sourceforge.net/>
Reiserfsprogs Reiserfsprogs
------------- -------------
o <http://www.kernel.org/pub/linux/utils/fs/reiserfs/>
- <http://www.kernel.org/pub/linux/utils/fs/reiserfs/>
Xfsprogs Xfsprogs
-------- --------
o <ftp://oss.sgi.com/projects/xfs/>
- <ftp://oss.sgi.com/projects/xfs/>
Pcmciautils Pcmciautils
----------- -----------
o <ftp://ftp.kernel.org/pub/linux/utils/kernel/pcmcia/>
- <ftp://ftp.kernel.org/pub/linux/utils/kernel/pcmcia/>
Quota-tools Quota-tools
---------- -----------
o <http://sourceforge.net/projects/linuxquota/>
- <http://sourceforge.net/projects/linuxquota/>
DocBook Stylesheets DocBook Stylesheets
------------------- -------------------
o <http://sourceforge.net/projects/docbook/files/docbook-dsssl/>
- <http://sourceforge.net/projects/docbook/files/docbook-dsssl/>
XMLTO XSLT Frontend XMLTO XSLT Frontend
------------------- -------------------
o <http://cyberelk.net/tim/xmlto/>
- <http://cyberelk.net/tim/xmlto/>
Intel P6 microcode Intel P6 microcode
------------------ ------------------
o <https://downloadcenter.intel.com/>
- <https://downloadcenter.intel.com/>
udev udev
---- ----
o <http://www.freedesktop.org/software/systemd/man/udev.html>
- <http://www.freedesktop.org/software/systemd/man/udev.html>
FUSE FUSE
---- ----
o <http://sourceforge.net/projects/fuse>
- <http://sourceforge.net/projects/fuse>
mcelog mcelog
------ ------
o <http://www.mcelog.org/>
- <http://www.mcelog.org/>
Networking Networking
********** **********
PPP PPP
--- ---
o <ftp://ftp.samba.org/pub/ppp/>
- <ftp://ftp.samba.org/pub/ppp/>
Isdn4k-utils Isdn4k-utils
------------ ------------
o <ftp://ftp.isdn4linux.de/pub/isdn4linux/utils/>
- <ftp://ftp.isdn4linux.de/pub/isdn4linux/utils/>
NFS-utils NFS-utils
--------- ---------
o <http://sourceforge.net/project/showfiles.php?group_id=14>
- <http://sourceforge.net/project/showfiles.php?group_id=14>
Iptables Iptables
-------- --------
o <http://www.iptables.org/downloads.html>
- <http://www.iptables.org/downloads.html>
Ip-route2 Ip-route2
--------- ---------
o <https://www.kernel.org/pub/linux/utils/net/iproute2/>
- <https://www.kernel.org/pub/linux/utils/net/iproute2/>
OProfile OProfile
-------- --------
o <http://oprofile.sf.net/download/>
- <http://oprofile.sf.net/download/>
NFS-Utils NFS-Utils
--------- ---------
o <http://nfs.sourceforge.net/>
- <http://nfs.sourceforge.net/>
Kernel documentation
********************
Sphinx
------
- <http://www.sphinx-doc.org/>
...@@ -19,7 +19,7 @@ please contact the Linux Foundation's Technical Advisory Board at ...@@ -19,7 +19,7 @@ please contact the Linux Foundation's Technical Advisory Board at
will work to resolve the issue to the best of their ability. For more will work to resolve the issue to the best of their ability. For more
information on who is on the Technical Advisory Board and what their information on who is on the Technical Advisory Board and what their
role is, please see: role is, please see:
http://www.linuxfoundation.org/programs/advisory-councils/tab http://www.linuxfoundation.org/projects/linux/tab
As a reviewer of code, please strive to keep things civil and focused on As a reviewer of code, please strive to keep things civil and focused on
the technical issues involved. We are all humans, and frustrations can the technical issues involved. We are all humans, and frustrations can
......
此差异已折叠。
...@@ -699,7 +699,7 @@ to use the dma_sync_*() interfaces. ...@@ -699,7 +699,7 @@ to use the dma_sync_*() interfaces.
dma_addr_t mapping; dma_addr_t mapping;
mapping = dma_map_single(cp->dev, buffer, len, DMA_FROM_DEVICE); mapping = dma_map_single(cp->dev, buffer, len, DMA_FROM_DEVICE);
if (dma_mapping_error(cp->dev, dma_handle)) { if (dma_mapping_error(cp->dev, mapping)) {
/* /*
* reduce current DMA mapping usage, * reduce current DMA mapping usage,
* delay and try again later or * delay and try again later or
...@@ -931,10 +931,8 @@ to "Closing". ...@@ -931,10 +931,8 @@ to "Closing".
1) Struct scatterlist requirements. 1) Struct scatterlist requirements.
Don't invent the architecture specific struct scatterlist; just use You need to enable CONFIG_NEED_SG_DMA_LENGTH if the architecture
<asm-generic/scatterlist.h>. You need to enable supports IOMMUs (including software IOMMU).
CONFIG_NEED_SG_DMA_LENGTH if the architecture supports IOMMUs
(including software IOMMU).
2) ARCH_DMA_MINALIGN 2) ARCH_DMA_MINALIGN
......
...@@ -277,14 +277,26 @@ and <size> parameters are provided to do partial page mapping, it is ...@@ -277,14 +277,26 @@ and <size> parameters are provided to do partial page mapping, it is
recommended that you never use these unless you really know what the recommended that you never use these unless you really know what the
cache width is. cache width is.
dma_addr_t
dma_map_resource(struct device *dev, phys_addr_t phys_addr, size_t size,
enum dma_data_direction dir, unsigned long attrs)
void
dma_unmap_resource(struct device *dev, dma_addr_t addr, size_t size,
enum dma_data_direction dir, unsigned long attrs)
API for mapping and unmapping for MMIO resources. All the notes and
warnings for the other mapping APIs apply here. The API should only be
used to map device MMIO resources, mapping of RAM is not permitted.
int int
dma_mapping_error(struct device *dev, dma_addr_t dma_addr) dma_mapping_error(struct device *dev, dma_addr_t dma_addr)
In some circumstances dma_map_single() and dma_map_page() will fail to create In some circumstances dma_map_single(), dma_map_page() and dma_map_resource()
a mapping. A driver can check for these errors by testing the returned will fail to create a mapping. A driver can check for these errors by testing
DMA address with dma_mapping_error(). A non-zero return value means the mapping the returned DMA address with dma_mapping_error(). A non-zero return value
could not be created and the driver should take appropriate action (e.g. means the mapping could not be created and the driver should take appropriate
reduce current DMA mapping usage or delay and try again later). action (e.g. reduce current DMA mapping usage or delay and try again later).
int int
dma_map_sg(struct device *dev, struct scatterlist *sg, dma_map_sg(struct device *dev, struct scatterlist *sg,
......
...@@ -126,3 +126,20 @@ means that we won't try quite as hard to get them. ...@@ -126,3 +126,20 @@ means that we won't try quite as hard to get them.
NOTE: At the moment DMA_ATTR_ALLOC_SINGLE_PAGES is only implemented on ARM, NOTE: At the moment DMA_ATTR_ALLOC_SINGLE_PAGES is only implemented on ARM,
though ARM64 patches will likely be posted soon. though ARM64 patches will likely be posted soon.
DMA_ATTR_NO_WARN
----------------
This tells the DMA-mapping subsystem to suppress allocation failure reports
(similarly to __GFP_NOWARN).
On some architectures allocation failures are reported with error messages
to the system logs. Although this can help to identify and debug problems,
drivers which handle failures (eg, retry later) have no problems with them,
and can actually flood the system logs with error messages that aren't any
problem at all, depending on the implementation of the retry mechanism.
So, this provides a way for drivers to avoid those error messages on calls
where allocation failures are not a problem, and shouldn't bother the logs.
NOTE: At the moment DMA_ATTR_NO_WARN is only implemented on PowerPC.
此差异已折叠。
...@@ -6,13 +6,13 @@ ...@@ -6,13 +6,13 @@
# To add a new book the only step required is to add the book to the # To add a new book the only step required is to add the book to the
# list of DOCBOOKS. # list of DOCBOOKS.
DOCBOOKS := z8530book.xml device-drivers.xml \ DOCBOOKS := z8530book.xml \
kernel-hacking.xml kernel-locking.xml deviceiobook.xml \ kernel-hacking.xml kernel-locking.xml deviceiobook.xml \
writing_usb_driver.xml networking.xml \ writing_usb_driver.xml networking.xml \
kernel-api.xml filesystems.xml lsm.xml usb.xml kgdb.xml \ kernel-api.xml filesystems.xml lsm.xml usb.xml kgdb.xml \
gadget.xml libata.xml mtdnand.xml librs.xml rapidio.xml \ gadget.xml libata.xml mtdnand.xml librs.xml rapidio.xml \
genericirq.xml s390-drivers.xml uio-howto.xml scsi.xml \ genericirq.xml s390-drivers.xml uio-howto.xml scsi.xml \
80211.xml debugobjects.xml sh.xml regulator.xml \ debugobjects.xml sh.xml regulator.xml \
alsa-driver-api.xml writing-an-alsa-driver.xml \ alsa-driver-api.xml writing-an-alsa-driver.xml \
tracepoint.xml w1.xml \ tracepoint.xml w1.xml \
writing_musb_glue_layer.xml crypto-API.xml iio.xml writing_musb_glue_layer.xml crypto-API.xml iio.xml
...@@ -22,9 +22,15 @@ ifeq ($(DOCBOOKS),) ...@@ -22,9 +22,15 @@ ifeq ($(DOCBOOKS),)
# Skip DocBook build if the user explicitly requested no DOCBOOKS. # Skip DocBook build if the user explicitly requested no DOCBOOKS.
.DEFAULT: .DEFAULT:
@echo " SKIP DocBook $@ target (DOCBOOKS=\"\" specified)." @echo " SKIP DocBook $@ target (DOCBOOKS=\"\" specified)."
else
ifneq ($(SPHINXDIRS),)
# Skip DocBook build if the user explicitly requested a sphinx dir
.DEFAULT:
@echo " SKIP DocBook $@ target (SPHINXDIRS specified)."
else else
### ###
# The build process is as follows (targets): # The build process is as follows (targets):
# (xmldocs) [by docproc] # (xmldocs) [by docproc]
...@@ -66,6 +72,7 @@ installmandocs: mandocs ...@@ -66,6 +72,7 @@ installmandocs: mandocs
# no-op for the DocBook toolchain # no-op for the DocBook toolchain
epubdocs: epubdocs:
latexdocs:
### ###
#External programs used #External programs used
...@@ -221,6 +228,7 @@ silent_gen_xml = : ...@@ -221,6 +228,7 @@ silent_gen_xml = :
echo "</programlisting>") > $@ echo "</programlisting>") > $@
endif # DOCBOOKS="" endif # DOCBOOKS=""
endif # SPHINDIR=...
### ###
# Help targets as used by the top-level makefile # Help targets as used by the top-level makefile
......
...@@ -797,7 +797,8 @@ kernel crypto API | Caller ...@@ -797,7 +797,8 @@ kernel crypto API | Caller
include/linux/crypto.h and their definition can be seen below. include/linux/crypto.h and their definition can be seen below.
The former function registers a single transformation, while The former function registers a single transformation, while
the latter works on an array of transformation descriptions. the latter works on an array of transformation descriptions.
The latter is useful when registering transformations in bulk. The latter is useful when registering transformations in bulk,
for example when a driver implements multiple transformations.
</para> </para>
<programlisting> <programlisting>
...@@ -822,18 +823,31 @@ kernel crypto API | Caller ...@@ -822,18 +823,31 @@ kernel crypto API | Caller
</para> </para>
<para> <para>
The bulk registration / unregistration functions require The bulk registration/unregistration functions
that struct crypto_alg is an array of count size. These register/unregister each transformation in the given array of
functions simply loop over that array and register / length count. They handle errors as follows:
unregister each individual algorithm. If an error occurs,
the loop is terminated at the offending algorithm definition.
That means, the algorithms prior to the offending algorithm
are successfully registered. Note, the caller has no way of
knowing which cipher implementations have successfully
registered. If this is important to know, the caller should
loop through the different implementations using the single
instance *_alg functions for each individual implementation.
</para> </para>
<itemizedlist>
<listitem>
<para>
crypto_register_algs() succeeds if and only if it
successfully registers all the given transformations. If an
error occurs partway through, then it rolls back successful
registrations before returning the error code. Note that if
a driver needs to handle registration errors for individual
transformations, then it will need to use the non-bulk
function crypto_register_alg() instead.
</para>
</listitem>
<listitem>
<para>
crypto_unregister_algs() tries to unregister all the given
transformations, continuing on error. It logs errors and
always returns zero.
</para>
</listitem>
</itemizedlist>
</sect1> </sect1>
<sect1><title>Single-Block Symmetric Ciphers [CIPHER]</title> <sect1><title>Single-Block Symmetric Ciphers [CIPHER]</title>
......
<?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="LinuxDriversAPI">
<bookinfo>
<title>Linux Device Drivers</title>
<legalnotice>
<para>
This documentation is free software; you can redistribute
it and/or modify it under the terms of the GNU General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later
version.
</para>
<para>
This program is distributed in the hope that it will be
useful, but WITHOUT ANY WARRANTY; without even the implied
warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
</para>
<para>
You should have received a copy of the GNU General Public
License along with this program; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,
MA 02111-1307 USA
</para>
<para>
For more details see the file COPYING in the source
distribution of Linux.
</para>
</legalnotice>
</bookinfo>
<toc></toc>
<chapter id="Basics">
<title>Driver Basics</title>
<sect1><title>Driver Entry and Exit points</title>
!Iinclude/linux/init.h
</sect1>
<sect1><title>Atomic and pointer manipulation</title>
!Iarch/x86/include/asm/atomic.h
</sect1>
<sect1><title>Delaying, scheduling, and timer routines</title>
!Iinclude/linux/sched.h
!Ekernel/sched/core.c
!Ikernel/sched/cpupri.c
!Ikernel/sched/fair.c
!Iinclude/linux/completion.h
!Ekernel/time/timer.c
</sect1>
<sect1><title>Wait queues and Wake events</title>
!Iinclude/linux/wait.h
!Ekernel/sched/wait.c
</sect1>
<sect1><title>High-resolution timers</title>
!Iinclude/linux/ktime.h
!Iinclude/linux/hrtimer.h
!Ekernel/time/hrtimer.c
</sect1>
<sect1><title>Workqueues and Kevents</title>
!Iinclude/linux/workqueue.h
!Ekernel/workqueue.c
</sect1>
<sect1><title>Internal Functions</title>
!Ikernel/exit.c
!Ikernel/signal.c
!Iinclude/linux/kthread.h
!Ekernel/kthread.c
</sect1>
<sect1><title>Kernel objects manipulation</title>
<!--
X!Iinclude/linux/kobject.h
-->
!Elib/kobject.c
</sect1>
<sect1><title>Kernel utility functions</title>
!Iinclude/linux/kernel.h
!Ekernel/printk/printk.c
!Ekernel/panic.c
!Ekernel/sys.c
!Ekernel/rcu/srcu.c
!Ekernel/rcu/tree.c
!Ekernel/rcu/tree_plugin.h
!Ekernel/rcu/update.c
</sect1>
<sect1><title>Device Resource Management</title>
!Edrivers/base/devres.c
</sect1>
</chapter>
<chapter id="devdrivers">
<title>Device drivers infrastructure</title>
<sect1><title>The Basic Device Driver-Model Structures </title>
!Iinclude/linux/device.h
</sect1>
<sect1><title>Device Drivers Base</title>
!Idrivers/base/init.c
!Edrivers/base/driver.c
!Edrivers/base/core.c
!Edrivers/base/syscore.c
!Edrivers/base/class.c
!Idrivers/base/node.c
!Edrivers/base/firmware_class.c
!Edrivers/base/transport_class.c
<!-- Cannot be included, because
attribute_container_add_class_device_adapter
and attribute_container_classdev_to_container
exceed allowed 44 characters maximum
X!Edrivers/base/attribute_container.c
-->
!Edrivers/base/dd.c
<!--
X!Edrivers/base/interface.c
-->
!Iinclude/linux/platform_device.h
!Edrivers/base/platform.c
!Edrivers/base/bus.c
</sect1>
<sect1>
<title>Buffer Sharing and Synchronization</title>
<para>
The dma-buf subsystem provides the framework for sharing buffers
for hardware (DMA) access across multiple device drivers and
subsystems, and for synchronizing asynchronous hardware access.
</para>
<para>
This is used, for example, by drm "prime" multi-GPU support, but
is of course not limited to GPU use cases.
</para>
<para>
The three main components of this are: (1) dma-buf, representing
a sg_table and exposed to userspace as a file descriptor to allow
passing between devices, (2) fence, which provides a mechanism
to signal when one device as finished access, and (3) reservation,
which manages the shared or exclusive fence(s) associated with
the buffer.
</para>
<sect2><title>dma-buf</title>
!Edrivers/dma-buf/dma-buf.c
!Iinclude/linux/dma-buf.h
</sect2>
<sect2><title>reservation</title>
!Pdrivers/dma-buf/reservation.c Reservation Object Overview
!Edrivers/dma-buf/reservation.c
!Iinclude/linux/reservation.h
</sect2>
<sect2><title>fence</title>
!Edrivers/dma-buf/fence.c
!Iinclude/linux/fence.h
!Edrivers/dma-buf/seqno-fence.c
!Iinclude/linux/seqno-fence.h
!Edrivers/dma-buf/fence-array.c
!Iinclude/linux/fence-array.h
!Edrivers/dma-buf/reservation.c
!Iinclude/linux/reservation.h
!Edrivers/dma-buf/sync_file.c
!Iinclude/linux/sync_file.h
</sect2>
</sect1>
<sect1><title>Device Drivers DMA Management</title>
!Edrivers/base/dma-coherent.c
!Edrivers/base/dma-mapping.c
</sect1>
<sect1><title>Device Drivers Power Management</title>
!Edrivers/base/power/main.c
</sect1>
<sect1><title>Device Drivers ACPI Support</title>
<!-- Internal functions only
X!Edrivers/acpi/sleep/main.c
X!Edrivers/acpi/sleep/wakeup.c
X!Edrivers/acpi/motherboard.c
X!Edrivers/acpi/bus.c
-->
!Edrivers/acpi/scan.c
!Idrivers/acpi/scan.c
<!-- No correct structured comments
X!Edrivers/acpi/pci_bind.c
-->
</sect1>
<sect1><title>Device drivers PnP support</title>
!Idrivers/pnp/core.c
<!-- No correct structured comments
X!Edrivers/pnp/system.c
-->
!Edrivers/pnp/card.c
!Idrivers/pnp/driver.c
!Edrivers/pnp/manager.c
!Edrivers/pnp/support.c
</sect1>
<sect1><title>Userspace IO devices</title>
!Edrivers/uio/uio.c
!Iinclude/linux/uio_driver.h
</sect1>
</chapter>
<chapter id="parportdev">
<title>Parallel Port Devices</title>
!Iinclude/linux/parport.h
!Edrivers/parport/ieee1284.c
!Edrivers/parport/share.c
!Idrivers/parport/daisy.c
</chapter>
<chapter id="message_devices">
<title>Message-based devices</title>
<sect1><title>Fusion message devices</title>
!Edrivers/message/fusion/mptbase.c
!Idrivers/message/fusion/mptbase.c
!Edrivers/message/fusion/mptscsih.c
!Idrivers/message/fusion/mptscsih.c
!Idrivers/message/fusion/mptctl.c
!Idrivers/message/fusion/mptspi.c
!Idrivers/message/fusion/mptfc.c
!Idrivers/message/fusion/mptlan.c
</sect1>
</chapter>
<chapter id="snddev">
<title>Sound Devices</title>
!Iinclude/sound/core.h
!Esound/sound_core.c
!Iinclude/sound/pcm.h
!Esound/core/pcm.c
!Esound/core/device.c
!Esound/core/info.c
!Esound/core/rawmidi.c
!Esound/core/sound.c
!Esound/core/memory.c
!Esound/core/pcm_memory.c
!Esound/core/init.c
!Esound/core/isadma.c
!Esound/core/control.c
!Esound/core/pcm_lib.c
!Esound/core/hwdep.c
!Esound/core/pcm_native.c
!Esound/core/memalloc.c
<!-- FIXME: Removed for now since no structured comments in source
X!Isound/sound_firmware.c
-->
</chapter>
<chapter id="uart16x50">
<title>16x50 UART Driver</title>
!Edrivers/tty/serial/serial_core.c
!Edrivers/tty/serial/8250/8250_core.c
</chapter>
<chapter id="fbdev">
<title>Frame Buffer Library</title>
<para>
The frame buffer drivers depend heavily on four data structures.
These structures are declared in include/linux/fb.h. They are
fb_info, fb_var_screeninfo, fb_fix_screeninfo and fb_monospecs.
The last three can be made available to and from userland.
</para>
<para>
fb_info defines the current state of a particular video card.
Inside fb_info, there exists a fb_ops structure which is a
collection of needed functions to make fbdev and fbcon work.
fb_info is only visible to the kernel.
</para>
<para>
fb_var_screeninfo is used to describe the features of a video card
that are user defined. With fb_var_screeninfo, things such as
depth and the resolution may be defined.
</para>
<para>
The next structure is fb_fix_screeninfo. This defines the
properties of a card that are created when a mode is set and can't
be changed otherwise. A good example of this is the start of the
frame buffer memory. This "locks" the address of the frame buffer
memory, so that it cannot be changed or moved.
</para>
<para>
The last structure is fb_monospecs. In the old API, there was
little importance for fb_monospecs. This allowed for forbidden things
such as setting a mode of 800x600 on a fix frequency monitor. With
the new API, fb_monospecs prevents such things, and if used
correctly, can prevent a monitor from being cooked. fb_monospecs
will not be useful until kernels 2.5.x.
</para>
<sect1><title>Frame Buffer Memory</title>
!Edrivers/video/fbdev/core/fbmem.c
</sect1>
<!--
<sect1><title>Frame Buffer Console</title>
X!Edrivers/video/console/fbcon.c
</sect1>
-->
<sect1><title>Frame Buffer Colormap</title>
!Edrivers/video/fbdev/core/fbcmap.c
</sect1>
<!-- FIXME:
drivers/video/fbgen.c has no docs, which stuffs up the sgml. Comment
out until somebody adds docs. KAO
<sect1><title>Frame Buffer Generic Functions</title>
X!Idrivers/video/fbgen.c
</sect1>
KAO -->
<sect1><title>Frame Buffer Video Mode Database</title>
!Idrivers/video/fbdev/core/modedb.c
!Edrivers/video/fbdev/core/modedb.c
</sect1>
<sect1><title>Frame Buffer Macintosh Video Mode Database</title>
!Edrivers/video/fbdev/macmodes.c
</sect1>
<sect1><title>Frame Buffer Fonts</title>
<para>
Refer to the file lib/fonts/fonts.c for more information.
</para>
<!-- FIXME: Removed for now since no structured comments in source
X!Ilib/fonts/fonts.c
-->
</sect1>
</chapter>
<chapter id="input_subsystem">
<title>Input Subsystem</title>
<sect1><title>Input core</title>
!Iinclude/linux/input.h
!Edrivers/input/input.c
!Edrivers/input/ff-core.c
!Edrivers/input/ff-memless.c
</sect1>
<sect1><title>Multitouch Library</title>
!Iinclude/linux/input/mt.h
!Edrivers/input/input-mt.c
</sect1>
<sect1><title>Polled input devices</title>
!Iinclude/linux/input-polldev.h
!Edrivers/input/input-polldev.c
</sect1>
<sect1><title>Matrix keyboards/keypads</title>
!Iinclude/linux/input/matrix_keypad.h
</sect1>
<sect1><title>Sparse keymap support</title>
!Iinclude/linux/input/sparse-keymap.h
!Edrivers/input/sparse-keymap.c
</sect1>
</chapter>
<chapter id="spi">
<title>Serial Peripheral Interface (SPI)</title>
<para>
SPI is the "Serial Peripheral Interface", widely used with
embedded systems because it is a simple and efficient
interface: basically a multiplexed shift register.
Its three signal wires hold a clock (SCK, often in the range
of 1-20 MHz), a "Master Out, Slave In" (MOSI) data line, and
a "Master In, Slave Out" (MISO) data line.
SPI is a full duplex protocol; for each bit shifted out the
MOSI line (one per clock) another is shifted in on the MISO line.
Those bits are assembled into words of various sizes on the
way to and from system memory.
An additional chipselect line is usually active-low (nCS);
four signals are normally used for each peripheral, plus
sometimes an interrupt.
</para>
<para>
The SPI bus facilities listed here provide a generalized
interface to declare SPI busses and devices, manage them
according to the standard Linux driver model, and perform
input/output operations.
At this time, only "master" side interfaces are supported,
where Linux talks to SPI peripherals and does not implement
such a peripheral itself.
(Interfaces to support implementing SPI slaves would
necessarily look different.)
</para>
<para>
The programming interface is structured around two kinds of driver,
and two kinds of device.
A "Controller Driver" abstracts the controller hardware, which may
be as simple as a set of GPIO pins or as complex as a pair of FIFOs
connected to dual DMA engines on the other side of the SPI shift
register (maximizing throughput). Such drivers bridge between
whatever bus they sit on (often the platform bus) and SPI, and
expose the SPI side of their device as a
<structname>struct spi_master</structname>.
SPI devices are children of that master, represented as a
<structname>struct spi_device</structname> and manufactured from
<structname>struct spi_board_info</structname> descriptors which
are usually provided by board-specific initialization code.
A <structname>struct spi_driver</structname> is called a
"Protocol Driver", and is bound to a spi_device using normal
driver model calls.
</para>
<para>
The I/O model is a set of queued messages. Protocol drivers
submit one or more <structname>struct spi_message</structname>
objects, which are processed and completed asynchronously.
(There are synchronous wrappers, however.) Messages are
built from one or more <structname>struct spi_transfer</structname>
objects, each of which wraps a full duplex SPI transfer.
A variety of protocol tweaking options are needed, because
different chips adopt very different policies for how they
use the bits transferred with SPI.
</para>
!Iinclude/linux/spi/spi.h
!Fdrivers/spi/spi.c spi_register_board_info
!Edrivers/spi/spi.c
</chapter>
<chapter id="i2c">
<title>I<superscript>2</superscript>C and SMBus Subsystem</title>
<para>
I<superscript>2</superscript>C (or without fancy typography, "I2C")
is an acronym for the "Inter-IC" bus, a simple bus protocol which is
widely used where low data rate communications suffice.
Since it's also a licensed trademark, some vendors use another
name (such as "Two-Wire Interface", TWI) for the same bus.
I2C only needs two signals (SCL for clock, SDA for data), conserving
board real estate and minimizing signal quality issues.
Most I2C devices use seven bit addresses, and bus speeds of up
to 400 kHz; there's a high speed extension (3.4 MHz) that's not yet
found wide use.
I2C is a multi-master bus; open drain signaling is used to
arbitrate between masters, as well as to handshake and to
synchronize clocks from slower clients.
</para>
<para>
The Linux I2C programming interfaces support only the master
side of bus interactions, not the slave side.
The programming interface is structured around two kinds of driver,
and two kinds of device.
An I2C "Adapter Driver" abstracts the controller hardware; it binds
to a physical device (perhaps a PCI device or platform_device) and
exposes a <structname>struct i2c_adapter</structname> representing
each I2C bus segment it manages.
On each I2C bus segment will be I2C devices represented by a
<structname>struct i2c_client</structname>. Those devices will
be bound to a <structname>struct i2c_driver</structname>,
which should follow the standard Linux driver model.
(At this writing, a legacy model is more widely used.)
There are functions to perform various I2C protocol operations; at
this writing all such functions are usable only from task context.
</para>
<para>
The System Management Bus (SMBus) is a sibling protocol. Most SMBus
systems are also I2C conformant. The electrical constraints are
tighter for SMBus, and it standardizes particular protocol messages
and idioms. Controllers that support I2C can also support most
SMBus operations, but SMBus controllers don't support all the protocol
options that an I2C controller will.
There are functions to perform various SMBus protocol operations,
either using I2C primitives or by issuing SMBus commands to
i2c_adapter devices which don't support those I2C operations.
</para>
!Iinclude/linux/i2c.h
!Fdrivers/i2c/i2c-boardinfo.c i2c_register_board_info
!Edrivers/i2c/i2c-core.c
</chapter>
<chapter id="hsi">
<title>High Speed Synchronous Serial Interface (HSI)</title>
<para>
High Speed Synchronous Serial Interface (HSI) is a
serial interface mainly used for connecting application
engines (APE) with cellular modem engines (CMT) in cellular
handsets.
HSI provides multiplexing for up to 16 logical channels,
low-latency and full duplex communication.
</para>
!Iinclude/linux/hsi/hsi.h
!Edrivers/hsi/hsi_core.c
</chapter>
<chapter id="pwm">
<title>Pulse-Width Modulation (PWM)</title>
<para>
Pulse-width modulation is a modulation technique primarily used to
control power supplied to electrical devices.
</para>
<para>
The PWM framework provides an abstraction for providers and consumers
of PWM signals. A controller that provides one or more PWM signals is
registered as <structname>struct pwm_chip</structname>. Providers are
expected to embed this structure in a driver-specific structure. This
structure contains fields that describe a particular chip.
</para>
<para>
A chip exposes one or more PWM signal sources, each of which exposed
as a <structname>struct pwm_device</structname>. Operations can be
performed on PWM devices to control the period, duty cycle, polarity
and active state of the signal.
</para>
<para>
Note that PWM devices are exclusive resources: they can always only be
used by one consumer at a time.
</para>
!Iinclude/linux/pwm.h
!Edrivers/pwm/core.c
</chapter>
</book>
...@@ -483,7 +483,7 @@ printk(KERN_INFO "my ip: %pI4\n", &amp;ipaddress); ...@@ -483,7 +483,7 @@ printk(KERN_INFO "my ip: %pI4\n", &amp;ipaddress);
<function>get_user()</function> <function>get_user()</function>
/ /
<function>put_user()</function> <function>put_user()</function>
<filename class="headerfile">include/asm/uaccess.h</filename> <filename class="headerfile">include/linux/uaccess.h</filename>
</title> </title>
<para> <para>
......
HOWTO do Linux kernel development HOWTO do Linux kernel development
--------------------------------- =================================
This is the be-all, end-all document on this topic. It contains This is the be-all, end-all document on this topic. It contains
instructions on how to become a Linux kernel developer and how to learn instructions on how to become a Linux kernel developer and how to learn
...@@ -28,6 +28,7 @@ kernel development. Assembly (any architecture) is not required unless ...@@ -28,6 +28,7 @@ kernel development. Assembly (any architecture) is not required unless
you plan to do low-level development for that architecture. Though they you plan to do low-level development for that architecture. Though they
are not a good substitute for a solid C education and/or years of are not a good substitute for a solid C education and/or years of
experience, the following books are good for, if anything, reference: experience, the following books are good for, if anything, reference:
- "The C Programming Language" by Kernighan and Ritchie [Prentice Hall] - "The C Programming Language" by Kernighan and Ritchie [Prentice Hall]
- "Practical C Programming" by Steve Oualline [O'Reilly] - "Practical C Programming" by Steve Oualline [O'Reilly]
- "C: A Reference Manual" by Harbison and Steele [Prentice Hall] - "C: A Reference Manual" by Harbison and Steele [Prentice Hall]
...@@ -64,7 +65,8 @@ people on the mailing lists are not lawyers, and you should not rely on ...@@ -64,7 +65,8 @@ people on the mailing lists are not lawyers, and you should not rely on
their statements on legal matters. their statements on legal matters.
For common questions and answers about the GPL, please see: For common questions and answers about the GPL, please see:
http://www.gnu.org/licenses/gpl-faq.html
https://www.gnu.org/licenses/gpl-faq.html
Documentation Documentation
...@@ -82,96 +84,118 @@ linux-api@vger.kernel.org. ...@@ -82,96 +84,118 @@ linux-api@vger.kernel.org.
Here is a list of files that are in the kernel source tree that are Here is a list of files that are in the kernel source tree that are
required reading: required reading:
README README
This file gives a short background on the Linux kernel and describes This file gives a short background on the Linux kernel and describes
what is necessary to do to configure and build the kernel. People what is necessary to do to configure and build the kernel. People
who are new to the kernel should start here. who are new to the kernel should start here.
Documentation/Changes :ref:`Documentation/Changes <changes>`
This file gives a list of the minimum levels of various software This file gives a list of the minimum levels of various software
packages that are necessary to build and run the kernel packages that are necessary to build and run the kernel
successfully. successfully.
Documentation/CodingStyle :ref:`Documentation/CodingStyle <codingstyle>`
This describes the Linux kernel coding style, and some of the This describes the Linux kernel coding style, and some of the
rationale behind it. All new code is expected to follow the rationale behind it. All new code is expected to follow the
guidelines in this document. Most maintainers will only accept guidelines in this document. Most maintainers will only accept
patches if these rules are followed, and many people will only patches if these rules are followed, and many people will only
review code if it is in the proper style. review code if it is in the proper style.
Documentation/SubmittingPatches :ref:`Documentation/SubmittingPatches <submittingpatches>` and :ref:`Documentation/SubmittingDrivers <submittingdrivers>`
Documentation/SubmittingDrivers
These files describe in explicit detail how to successfully create These files describe in explicit detail how to successfully create
and send a patch, including (but not limited to): and send a patch, including (but not limited to):
- Email contents - Email contents
- Email format - Email format
- Who to send it to - Who to send it to
Following these rules will not guarantee success (as all patches are Following these rules will not guarantee success (as all patches are
subject to scrutiny for content and style), but not following them subject to scrutiny for content and style), but not following them
will almost always prevent it. will almost always prevent it.
Other excellent descriptions of how to create patches properly are: Other excellent descriptions of how to create patches properly are:
"The Perfect Patch" "The Perfect Patch"
http://www.ozlabs.org/~akpm/stuff/tpp.txt https://www.ozlabs.org/~akpm/stuff/tpp.txt
"Linux kernel patch submission format" "Linux kernel patch submission format"
http://linux.yyz.us/patch-format.html http://linux.yyz.us/patch-format.html
Documentation/stable_api_nonsense.txt :ref:`Documentation/stable_api_nonsense.txt <stable_api_nonsense>`
This file describes the rationale behind the conscious decision to This file describes the rationale behind the conscious decision to
not have a stable API within the kernel, including things like: not have a stable API within the kernel, including things like:
- Subsystem shim-layers (for compatibility?) - Subsystem shim-layers (for compatibility?)
- Driver portability between Operating Systems. - Driver portability between Operating Systems.
- Mitigating rapid change within the kernel source tree (or - Mitigating rapid change within the kernel source tree (or
preventing rapid change) preventing rapid change)
This document is crucial for understanding the Linux development This document is crucial for understanding the Linux development
philosophy and is very important for people moving to Linux from philosophy and is very important for people moving to Linux from
development on other Operating Systems. development on other Operating Systems.
Documentation/SecurityBugs :ref:`Documentation/SecurityBugs <securitybugs>`
If you feel you have found a security problem in the Linux kernel, If you feel you have found a security problem in the Linux kernel,
please follow the steps in this document to help notify the kernel please follow the steps in this document to help notify the kernel
developers, and help solve the issue. developers, and help solve the issue.
Documentation/ManagementStyle :ref:`Documentation/ManagementStyle <managementstyle>`
This document describes how Linux kernel maintainers operate and the This document describes how Linux kernel maintainers operate and the
shared ethos behind their methodologies. This is important reading shared ethos behind their methodologies. This is important reading
for anyone new to kernel development (or anyone simply curious about for anyone new to kernel development (or anyone simply curious about
it), as it resolves a lot of common misconceptions and confusion it), as it resolves a lot of common misconceptions and confusion
about the unique behavior of kernel maintainers. about the unique behavior of kernel maintainers.
Documentation/stable_kernel_rules.txt :ref:`Documentation/stable_kernel_rules.txt <stable_kernel_rules>`
This file describes the rules on how the stable kernel releases This file describes the rules on how the stable kernel releases
happen, and what to do if you want to get a change into one of these happen, and what to do if you want to get a change into one of these
releases. releases.
Documentation/kernel-docs.txt :ref:`Documentation/kernel-docs.txt <kernel_docs>`
A list of external documentation that pertains to kernel A list of external documentation that pertains to kernel
development. Please consult this list if you do not find what you development. Please consult this list if you do not find what you
are looking for within the in-kernel documentation. are looking for within the in-kernel documentation.
Documentation/applying-patches.txt :ref:`Documentation/applying-patches.txt <applying_patches>`
A good introduction describing exactly what a patch is and how to A good introduction describing exactly what a patch is and how to
apply it to the different development branches of the kernel. apply it to the different development branches of the kernel.
The kernel also has a large number of documents that can be The kernel also has a large number of documents that can be
automatically generated from the source code itself. This includes a automatically generated from the source code itself or from
ReStructuredText markups (ReST), like this one. This includes a
full description of the in-kernel API, and rules on how to handle full description of the in-kernel API, and rules on how to handle
locking properly. The documents will be created in the locking properly.
Documentation/DocBook/ directory and can be generated as PDF,
Postscript, HTML, and man pages by running: All such documents can be generated as PDF or HTML by running::
make pdfdocs make pdfdocs
make psdocs
make htmldocs make htmldocs
make mandocs
respectively from the main kernel source directory. respectively from the main kernel source directory.
The documents that uses ReST markup will be generated at Documentation/output.
They can also be generated on LaTeX and ePub formats with::
make latexdocs
make epubdocs
Currently, there are some documents written on DocBook that are in
the process of conversion to ReST. Such documents will be created in the
Documentation/DocBook/ directory and can be generated also as
Postscript or man pages by running::
make psdocs
make mandocs
Becoming A Kernel Developer Becoming A Kernel Developer
--------------------------- ---------------------------
If you do not know anything about Linux kernel development, you should If you do not know anything about Linux kernel development, you should
look at the Linux KernelNewbies project: look at the Linux KernelNewbies project:
http://kernelnewbies.org
https://kernelnewbies.org
It consists of a helpful mailing list where you can ask almost any type It consists of a helpful mailing list where you can ask almost any type
of basic kernel development question (make sure to search the archives of basic kernel development question (make sure to search the archives
first, before asking something that has already been answered in the first, before asking something that has already been answered in the
...@@ -187,7 +211,9 @@ apply a patch. ...@@ -187,7 +211,9 @@ apply a patch.
If you do not know where you want to start, but you want to look for If you do not know where you want to start, but you want to look for
some task to start doing to join into the kernel development community, some task to start doing to join into the kernel development community,
go to the Linux Kernel Janitor's project: go to the Linux Kernel Janitor's project:
http://kernelnewbies.org/KernelJanitors
https://kernelnewbies.org/KernelJanitors
It is a great place to start. It describes a list of relatively simple It is a great place to start. It describes a list of relatively simple
problems that need to be cleaned up and fixed within the Linux kernel problems that need to be cleaned up and fixed within the Linux kernel
source tree. Working with the developers in charge of this project, you source tree. Working with the developers in charge of this project, you
...@@ -199,7 +225,8 @@ If you already have a chunk of code that you want to put into the kernel ...@@ -199,7 +225,8 @@ If you already have a chunk of code that you want to put into the kernel
tree, but need some help getting it in the proper form, the tree, but need some help getting it in the proper form, the
kernel-mentors project was created to help you out with this. It is a kernel-mentors project was created to help you out with this. It is a
mailing list, and can be found at: mailing list, and can be found at:
http://selenic.com/mailman/listinfo/kernel-mentors
https://selenic.com/mailman/listinfo/kernel-mentors
Before making any actual modifications to the Linux kernel code, it is Before making any actual modifications to the Linux kernel code, it is
imperative to understand how the code in question works. For this imperative to understand how the code in question works. For this
...@@ -209,6 +236,7 @@ tools. One such tool that is particularly recommended is the Linux ...@@ -209,6 +236,7 @@ tools. One such tool that is particularly recommended is the Linux
Cross-Reference project, which is able to present source code in a Cross-Reference project, which is able to present source code in a
self-referential, indexed webpage format. An excellent up-to-date self-referential, indexed webpage format. An excellent up-to-date
repository of the kernel code may be found at: repository of the kernel code may be found at:
http://lxr.free-electrons.com/ http://lxr.free-electrons.com/
...@@ -218,6 +246,7 @@ The development process ...@@ -218,6 +246,7 @@ The development process
Linux kernel development process currently consists of a few different Linux kernel development process currently consists of a few different
main kernel "branches" and lots of different subsystem-specific kernel main kernel "branches" and lots of different subsystem-specific kernel
branches. These different branches are: branches. These different branches are:
- main 4.x kernel tree - main 4.x kernel tree
- 4.x.y -stable kernel tree - 4.x.y -stable kernel tree
- 4.x -git kernel patches - 4.x -git kernel patches
...@@ -227,14 +256,15 @@ branches. These different branches are: ...@@ -227,14 +256,15 @@ branches. These different branches are:
4.x kernel tree 4.x kernel tree
----------------- -----------------
4.x kernels are maintained by Linus Torvalds, and can be found on 4.x kernels are maintained by Linus Torvalds, and can be found on
kernel.org in the pub/linux/kernel/v4.x/ directory. Its development https://kernel.org in the pub/linux/kernel/v4.x/ directory. Its development
process is as follows: process is as follows:
- As soon as a new kernel is released a two weeks window is open, - As soon as a new kernel is released a two weeks window is open,
during this period of time maintainers can submit big diffs to during this period of time maintainers can submit big diffs to
Linus, usually the patches that have already been included in the Linus, usually the patches that have already been included in the
-next kernel for a few weeks. The preferred way to submit big changes -next kernel for a few weeks. The preferred way to submit big changes
is using git (the kernel's source management tool, more information is using git (the kernel's source management tool, more information
can be found at http://git-scm.com/) but plain patches are also just can be found at https://git-scm.com/) but plain patches are also just
fine. fine.
- After two weeks a -rc1 kernel is released it is now possible to push - After two weeks a -rc1 kernel is released it is now possible to push
only patches that do not include new features that could affect the only patches that do not include new features that could affect the
...@@ -253,9 +283,10 @@ process is as follows: ...@@ -253,9 +283,10 @@ process is as follows:
It is worth mentioning what Andrew Morton wrote on the linux-kernel It is worth mentioning what Andrew Morton wrote on the linux-kernel
mailing list about kernel releases: mailing list about kernel releases:
"Nobody knows when a kernel will be released, because it's
*"Nobody knows when a kernel will be released, because it's
released according to perceived bug status, not according to a released according to perceived bug status, not according to a
preconceived timeline." preconceived timeline."*
4.x.y -stable kernel tree 4.x.y -stable kernel tree
------------------------- -------------------------
...@@ -301,7 +332,7 @@ submission and other already ongoing work are avoided. ...@@ -301,7 +332,7 @@ submission and other already ongoing work are avoided.
Most of these repositories are git trees, but there are also other SCMs Most of these repositories are git trees, but there are also other SCMs
in use, or patch queues being published as quilt series. Addresses of in use, or patch queues being published as quilt series. Addresses of
these subsystem repositories are listed in the MAINTAINERS file. Many these subsystem repositories are listed in the MAINTAINERS file. Many
of them can be browsed at http://git.kernel.org/. of them can be browsed at https://git.kernel.org/.
Before a proposed patch is committed to such a subsystem tree, it is Before a proposed patch is committed to such a subsystem tree, it is
subject to review which primarily happens on mailing lists (see the subject to review which primarily happens on mailing lists (see the
...@@ -310,7 +341,7 @@ process is tracked with the tool patchwork. Patchwork offers a web ...@@ -310,7 +341,7 @@ process is tracked with the tool patchwork. Patchwork offers a web
interface which shows patch postings, any comments on a patch or interface which shows patch postings, any comments on a patch or
revisions to it, and maintainers can mark patches as under review, revisions to it, and maintainers can mark patches as under review,
accepted, or rejected. Most of these patchwork sites are listed at accepted, or rejected. Most of these patchwork sites are listed at
http://patchwork.kernel.org/. https://patchwork.kernel.org/.
4.x -next kernel tree for integration tests 4.x -next kernel tree for integration tests
------------------------------------------- -------------------------------------------
...@@ -318,7 +349,8 @@ Before updates from subsystem trees are merged into the mainline 4.x ...@@ -318,7 +349,8 @@ Before updates from subsystem trees are merged into the mainline 4.x
tree, they need to be integration-tested. For this purpose, a special tree, they need to be integration-tested. For this purpose, a special
testing repository exists into which virtually all subsystem trees are testing repository exists into which virtually all subsystem trees are
pulled on an almost daily basis: pulled on an almost daily basis:
http://git.kernel.org/?p=linux/kernel/git/next/linux-next.git
https://git.kernel.org/?p=linux/kernel/git/next/linux-next.git
This way, the -next kernel gives a summary outlook onto what will be This way, the -next kernel gives a summary outlook onto what will be
expected to go into the mainline kernel at the next merge period. expected to go into the mainline kernel at the next merge period.
...@@ -328,10 +360,11 @@ Adventurous testers are very welcome to runtime-test the -next kernel. ...@@ -328,10 +360,11 @@ Adventurous testers are very welcome to runtime-test the -next kernel.
Bug Reporting Bug Reporting
------------- -------------
bugzilla.kernel.org is where the Linux kernel developers track kernel https://bugzilla.kernel.org is where the Linux kernel developers track kernel
bugs. Users are encouraged to report all bugs that they find in this bugs. Users are encouraged to report all bugs that they find in this
tool. For details on how to use the kernel bugzilla, please see: tool. For details on how to use the kernel bugzilla, please see:
http://bugzilla.kernel.org/page.cgi?id=faq.html
https://bugzilla.kernel.org/page.cgi?id=faq.html
The file REPORTING-BUGS in the main kernel source directory has a good The file REPORTING-BUGS in the main kernel source directory has a good
template for how to report a possible kernel bug, and details what kind template for how to report a possible kernel bug, and details what kind
...@@ -349,13 +382,14 @@ your skills, and other developers will be aware of your presence. Fixing ...@@ -349,13 +382,14 @@ your skills, and other developers will be aware of your presence. Fixing
bugs is one of the best ways to get merits among other developers, because bugs is one of the best ways to get merits among other developers, because
not many people like wasting time fixing other people's bugs. not many people like wasting time fixing other people's bugs.
To work in the already reported bug reports, go to http://bugzilla.kernel.org. To work in the already reported bug reports, go to https://bugzilla.kernel.org.
If you want to be advised of the future bug reports, you can subscribe to the If you want to be advised of the future bug reports, you can subscribe to the
bugme-new mailing list (only new bug reports are mailed here) or to the bugme-new mailing list (only new bug reports are mailed here) or to the
bugme-janitor mailing list (every change in the bugzilla is mailed here) bugme-janitor mailing list (every change in the bugzilla is mailed here)
http://lists.linux-foundation.org/mailman/listinfo/bugme-new https://lists.linux-foundation.org/mailman/listinfo/bugme-new
http://lists.linux-foundation.org/mailman/listinfo/bugme-janitors
https://lists.linux-foundation.org/mailman/listinfo/bugme-janitors
...@@ -365,10 +399,14 @@ Mailing lists ...@@ -365,10 +399,14 @@ Mailing lists
As some of the above documents describe, the majority of the core kernel As some of the above documents describe, the majority of the core kernel
developers participate on the Linux Kernel Mailing list. Details on how developers participate on the Linux Kernel Mailing list. Details on how
to subscribe and unsubscribe from the list can be found at: to subscribe and unsubscribe from the list can be found at:
http://vger.kernel.org/vger-lists.html#linux-kernel http://vger.kernel.org/vger-lists.html#linux-kernel
There are archives of the mailing list on the web in many different There are archives of the mailing list on the web in many different
places. Use a search engine to find these archives. For example: places. Use a search engine to find these archives. For example:
http://dir.gmane.org/gmane.linux.kernel http://dir.gmane.org/gmane.linux.kernel
It is highly recommended that you search the archives about the topic It is highly recommended that you search the archives about the topic
you want to bring up, before you post it to the list. A lot of things you want to bring up, before you post it to the list. A lot of things
already discussed in detail are only recorded at the mailing list already discussed in detail are only recorded at the mailing list
...@@ -381,11 +419,13 @@ groups. ...@@ -381,11 +419,13 @@ groups.
Many of the lists are hosted on kernel.org. Information on them can be Many of the lists are hosted on kernel.org. Information on them can be
found at: found at:
http://vger.kernel.org/vger-lists.html http://vger.kernel.org/vger-lists.html
Please remember to follow good behavioral habits when using the lists. Please remember to follow good behavioral habits when using the lists.
Though a bit cheesy, the following URL has some simple guidelines for Though a bit cheesy, the following URL has some simple guidelines for
interacting with the list (or any list): interacting with the list (or any list):
http://www.albion.com/netiquette/ http://www.albion.com/netiquette/
If multiple people respond to your mail, the CC: list of recipients may If multiple people respond to your mail, the CC: list of recipients may
...@@ -400,13 +440,14 @@ add your statements between the individual quoted sections instead of ...@@ -400,13 +440,14 @@ add your statements between the individual quoted sections instead of
writing at the top of the mail. writing at the top of the mail.
If you add patches to your mail, make sure they are plain readable text If you add patches to your mail, make sure they are plain readable text
as stated in Documentation/SubmittingPatches. Kernel developers don't as stated in Documentation/SubmittingPatches.
want to deal with attachments or compressed patches; they may want Kernel developers don't want to deal with
to comment on individual lines of your patch, which works only that way. attachments or compressed patches; they may want to comment on
Make sure you use a mail program that does not mangle spaces and tab individual lines of your patch, which works only that way. Make sure you
characters. A good first test is to send the mail to yourself and try use a mail program that does not mangle spaces and tab characters. A
to apply your own patch by yourself. If that doesn't work, get your good first test is to send the mail to yourself and try to apply your
mail program fixed or change it until it works. own patch by yourself. If that doesn't work, get your mail program fixed
or change it until it works.
Above all, please remember to show respect to other subscribers. Above all, please remember to show respect to other subscribers.
...@@ -418,6 +459,7 @@ The goal of the kernel community is to provide the best possible kernel ...@@ -418,6 +459,7 @@ The goal of the kernel community is to provide the best possible kernel
there is. When you submit a patch for acceptance, it will be reviewed there is. When you submit a patch for acceptance, it will be reviewed
on its technical merits and those alone. So, what should you be on its technical merits and those alone. So, what should you be
expecting? expecting?
- criticism - criticism
- comments - comments
- requests for change - requests for change
...@@ -432,6 +474,7 @@ If there are no responses to your posting, wait a few days and try ...@@ -432,6 +474,7 @@ If there are no responses to your posting, wait a few days and try
again, sometimes things get lost in the huge volume. again, sometimes things get lost in the huge volume.
What should you not do? What should you not do?
- expect your patch to be accepted without question - expect your patch to be accepted without question
- become defensive - become defensive
- ignore comments - ignore comments
...@@ -445,8 +488,8 @@ Remember, being wrong is acceptable as long as you are willing to work ...@@ -445,8 +488,8 @@ Remember, being wrong is acceptable as long as you are willing to work
toward a solution that is right. toward a solution that is right.
It is normal that the answers to your first patch might simply be a list It is normal that the answers to your first patch might simply be a list
of a dozen things you should correct. This does _not_ imply that your of a dozen things you should correct. This does **not** imply that your
patch will not be accepted, and it is _not_ meant against you patch will not be accepted, and it is **not** meant against you
personally. Simply correct all issues raised against your patch and personally. Simply correct all issues raised against your patch and
resend it. resend it.
...@@ -457,7 +500,9 @@ Differences between the kernel community and corporate structures ...@@ -457,7 +500,9 @@ Differences between the kernel community and corporate structures
The kernel community works differently than most traditional corporate The kernel community works differently than most traditional corporate
development environments. Here are a list of things that you can try to development environments. Here are a list of things that you can try to
do to avoid problems: do to avoid problems:
Good things to say regarding your proposed changes: Good things to say regarding your proposed changes:
- "This solves multiple problems." - "This solves multiple problems."
- "This deletes 2000 lines of code." - "This deletes 2000 lines of code."
- "Here is a patch that explains what I am trying to describe." - "Here is a patch that explains what I am trying to describe."
...@@ -466,6 +511,7 @@ do to avoid problems: ...@@ -466,6 +511,7 @@ do to avoid problems:
- "This increases performance on typical machines..." - "This increases performance on typical machines..."
Bad things you should avoid saying: Bad things you should avoid saying:
- "We did it this way in AIX/ptx/Solaris, so therefore it must be - "We did it this way in AIX/ptx/Solaris, so therefore it must be
good..." good..."
- "I've being doing this for 20 years, so..." - "I've being doing this for 20 years, so..."
...@@ -527,17 +573,18 @@ The reasons for breaking things up are the following: ...@@ -527,17 +573,18 @@ The reasons for breaking things up are the following:
and simplify (or simply re-order) patches before submitting them. and simplify (or simply re-order) patches before submitting them.
Here is an analogy from kernel developer Al Viro: Here is an analogy from kernel developer Al Viro:
"Think of a teacher grading homework from a math student. The
*"Think of a teacher grading homework from a math student. The
teacher does not want to see the student's trials and errors teacher does not want to see the student's trials and errors
before they came up with the solution. They want to see the before they came up with the solution. They want to see the
cleanest, most elegant answer. A good student knows this, and cleanest, most elegant answer. A good student knows this, and
would never submit her intermediate work before the final would never submit her intermediate work before the final
solution." solution.*
The same is true of kernel development. The maintainers and *The same is true of kernel development. The maintainers and
reviewers do not want to see the thought process behind the reviewers do not want to see the thought process behind the
solution to the problem one is solving. They want to see a solution to the problem one is solving. They want to see a
simple and elegant solution." simple and elegant solution."*
It may be challenging to keep the balance between presenting an elegant It may be challenging to keep the balance between presenting an elegant
solution and working together with the community and discussing your solution and working together with the community and discussing your
...@@ -565,6 +612,7 @@ When sending in your patches, pay special attention to what you say in ...@@ -565,6 +612,7 @@ When sending in your patches, pay special attention to what you say in
the text in your email. This information will become the ChangeLog the text in your email. This information will become the ChangeLog
information for the patch, and will be preserved for everyone to see for information for the patch, and will be preserved for everyone to see for
all time. It should describe the patch completely, containing: all time. It should describe the patch completely, containing:
- why the change is necessary - why the change is necessary
- the overall design approach in the patch - the overall design approach in the patch
- implementation details - implementation details
...@@ -572,12 +620,11 @@ all time. It should describe the patch completely, containing: ...@@ -572,12 +620,11 @@ all time. It should describe the patch completely, containing:
For more details on what this should all look like, please see the For more details on what this should all look like, please see the
ChangeLog section of the document: ChangeLog section of the document:
"The Perfect Patch" "The Perfect Patch"
http://www.ozlabs.org/~akpm/stuff/tpp.txt http://www.ozlabs.org/~akpm/stuff/tpp.txt
All of these things are sometimes very hard to do. It can take years to All of these things are sometimes very hard to do. It can take years to
perfect these practices (if at all). It's a continuous process of perfect these practices (if at all). It's a continuous process of
improvement that requires a lot of patience and determination. But improvement that requires a lot of patience and determination. But
...@@ -588,8 +635,9 @@ start exactly where you are now. ...@@ -588,8 +635,9 @@ start exactly where you are now.
---------- ----------
Thanks to Paolo Ciarrocchi who allowed the "Development Process" Thanks to Paolo Ciarrocchi who allowed the "Development Process"
(http://lwn.net/Articles/94386/) section (https://lwn.net/Articles/94386/) section
to be based on text he had written, and to Randy Dunlap and Gerrit to be based on text he had written, and to Randy Dunlap and Gerrit
Huizenga for some of the list of things you should and should not say. Huizenga for some of the list of things you should and should not say.
Also thanks to Pat Mochel, Hanna Linder, Randy Dunlap, Kay Sievers, Also thanks to Pat Mochel, Hanna Linder, Randy Dunlap, Kay Sievers,
......
subdir-y := accounting auxdisplay blackfin \ subdir-y :=
filesystems filesystems ia64 laptops mic misc-devices \
networking pcmcia prctl ptp timers vDSO watchdog
...@@ -5,6 +5,9 @@ ...@@ -5,6 +5,9 @@
# You can set these variables from the command line. # You can set these variables from the command line.
SPHINXBUILD = sphinx-build SPHINXBUILD = sphinx-build
SPHINXOPTS = SPHINXOPTS =
SPHINXDIRS = .
_SPHINXDIRS = $(patsubst $(srctree)/Documentation/%/conf.py,%,$(wildcard $(srctree)/Documentation/*/conf.py))
SPHINX_CONF = conf.py
PAPER = PAPER =
BUILDDIR = $(obj)/output BUILDDIR = $(obj)/output
...@@ -25,38 +28,62 @@ else ifneq ($(DOCBOOKS),) ...@@ -25,38 +28,62 @@ else ifneq ($(DOCBOOKS),)
else # HAVE_SPHINX else # HAVE_SPHINX
# User-friendly check for rst2pdf # User-friendly check for pdflatex
HAVE_RST2PDF := $(shell if python -c "import rst2pdf" >/dev/null 2>&1; then echo 1; else echo 0; fi) HAVE_PDFLATEX := $(shell if which xelatex >/dev/null 2>&1; then echo 1; else echo 0; fi)
# Internal variables. # Internal variables.
PAPEROPT_a4 = -D latex_paper_size=a4 PAPEROPT_a4 = -D latex_paper_size=a4
PAPEROPT_letter = -D latex_paper_size=letter PAPEROPT_letter = -D latex_paper_size=letter
KERNELDOC = $(srctree)/scripts/kernel-doc KERNELDOC = $(srctree)/scripts/kernel-doc
KERNELDOC_CONF = -D kerneldoc_srctree=$(srctree) -D kerneldoc_bin=$(KERNELDOC) KERNELDOC_CONF = -D kerneldoc_srctree=$(srctree) -D kerneldoc_bin=$(KERNELDOC)
ALLSPHINXOPTS = -D version=$(KERNELVERSION) -D release=$(KERNELRELEASE) -d $(BUILDDIR)/.doctrees $(KERNELDOC_CONF) $(PAPEROPT_$(PAPER)) -c $(srctree)/$(src) $(SPHINXOPTS) $(srctree)/$(src) ALLSPHINXOPTS = $(KERNELDOC_CONF) $(PAPEROPT_$(PAPER)) $(SPHINXOPTS)
# the i18n builder cannot share the environment and doctrees with the others # the i18n builder cannot share the environment and doctrees with the others
I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
quiet_cmd_sphinx = SPHINX $@ # commands; the 'cmd' from scripts/Kbuild.include is not *loopable*
cmd_sphinx = BUILDDIR=$(BUILDDIR) $(SPHINXBUILD) -b $2 $(ALLSPHINXOPTS) $(BUILDDIR)/$2 loop_cmd = $(echo-cmd) $(cmd_$(1))
# $2 sphinx builder e.g. "html"
# $3 name of the build subfolder / e.g. "media", used as:
# * dest folder relative to $(BUILDDIR) and
# * cache folder relative to $(BUILDDIR)/.doctrees
# $4 dest subfolder e.g. "man" for man pages at media/man
# $5 reST source folder relative to $(srctree)/$(src),
# e.g. "media" for the linux-tv book-set at ./Documentation/media
quiet_cmd_sphinx = SPHINX $@ --> file://$(abspath $(BUILDDIR)/$3/$4);
cmd_sphinx = $(MAKE) BUILDDIR=$(abspath $(BUILDDIR)) $(build)=Documentation/media all;\
BUILDDIR=$(abspath $(BUILDDIR)) SPHINX_CONF=$(abspath $(srctree)/$(src)/$5/$(SPHINX_CONF)) \
$(SPHINXBUILD) \
-b $2 \
-c $(abspath $(srctree)/$(src)) \
-d $(abspath $(BUILDDIR)/.doctrees/$3) \
-D version=$(KERNELVERSION) -D release=$(KERNELRELEASE) \
$(ALLSPHINXOPTS) \
$(abspath $(srctree)/$(src)/$5) \
$(abspath $(BUILDDIR)/$3/$4);
htmldocs: htmldocs:
$(MAKE) BUILDDIR=$(BUILDDIR) -f $(srctree)/Documentation/media/Makefile $@ @$(foreach var,$(SPHINXDIRS),$(call loop_cmd,sphinx,html,$(var),,$(var)))
$(call cmd,sphinx,html)
pdfdocs: latexdocs:
ifeq ($(HAVE_RST2PDF),0) ifeq ($(HAVE_PDFLATEX),0)
$(warning The Python 'rst2pdf' module was not found. Make sure you have the module installed to produce PDF output.) $(warning The 'xelatex' command was not found. Make sure you have it installed and in PATH to produce PDF output.)
@echo " SKIP Sphinx $@ target." @echo " SKIP Sphinx $@ target."
else # HAVE_RST2PDF else # HAVE_PDFLATEX
$(call cmd,sphinx,pdf) @$(foreach var,$(SPHINXDIRS),$(call loop_cmd,sphinx,latex,$(var),latex,$(var)))
endif # HAVE_RST2PDF endif # HAVE_PDFLATEX
pdfdocs: latexdocs
ifneq ($(HAVE_PDFLATEX),0)
$(foreach var,$(SPHINXDIRS), $(MAKE) PDFLATEX=xelatex LATEXOPTS="-interaction=nonstopmode" -C $(BUILDDIR)/$(var)/latex)
endif # HAVE_PDFLATEX
epubdocs: epubdocs:
$(call cmd,sphinx,epub) @$(foreach var,$(SPHINXDIRS),$(call loop_cmd,sphinx,epub,$(var),epub,$(var)))
xmldocs: xmldocs:
$(call cmd,sphinx,xml) @$(foreach var,$(SPHINXDIRS),$(call loop_cmd,sphinx,xml,$(var),xml,$(var)))
# no-ops for the Sphinx toolchain # no-ops for the Sphinx toolchain
sgmldocs: sgmldocs:
...@@ -72,7 +99,14 @@ endif # HAVE_SPHINX ...@@ -72,7 +99,14 @@ endif # HAVE_SPHINX
dochelp: dochelp:
@echo ' Linux kernel internal documentation in different formats (Sphinx):' @echo ' Linux kernel internal documentation in different formats (Sphinx):'
@echo ' htmldocs - HTML' @echo ' htmldocs - HTML'
@echo ' latexdocs - LaTeX'
@echo ' pdfdocs - PDF' @echo ' pdfdocs - PDF'
@echo ' epubdocs - EPUB' @echo ' epubdocs - EPUB'
@echo ' xmldocs - XML' @echo ' xmldocs - XML'
@echo ' cleandocs - clean all generated files' @echo ' cleandocs - clean all generated files'
@echo
@echo ' make SPHINXDIRS="s1 s2" [target] Generate only docs of folder s1, s2'
@echo ' valid values for SPHINXDIRS are: $(_SPHINXDIRS)'
@echo
@echo ' make SPHINX_CONF={conf-file} [target] use *additional* sphinx-build'
@echo ' configuration. This is e.g. useful to build with nit-picking config.'
.. _managementstyle:
Linux kernel management style Linux kernel management style
=============================
This is a short document describing the preferred (or made up, depending This is a short document describing the preferred (or made up, depending
on who you ask) management style for the linux kernel. It's meant to on who you ask) management style for the linux kernel. It's meant to
mirror the CodingStyle document to some degree, and mainly written to mirror the CodingStyle document to some degree, and mainly written to
avoid answering (*) the same (or similar) questions over and over again. avoid answering [#f1]_ the same (or similar) questions over and over again.
Management style is very personal and much harder to quantify than Management style is very personal and much harder to quantify than
simple coding style rules, so this document may or may not have anything simple coding style rules, so this document may or may not have anything
...@@ -14,50 +16,52 @@ might not actually be true. You'll have to decide for yourself. ...@@ -14,50 +16,52 @@ might not actually be true. You'll have to decide for yourself.
Btw, when talking about "kernel manager", it's all about the technical Btw, when talking about "kernel manager", it's all about the technical
lead persons, not the people who do traditional management inside lead persons, not the people who do traditional management inside
companies. If you sign purchase orders or you have any clue about the companies. If you sign purchase orders or you have any clue about the
budget of your group, you're almost certainly not a kernel manager. budget of your group, you're almost certainly not a kernel manager.
These suggestions may or may not apply to you. These suggestions may or may not apply to you.
First off, I'd suggest buying "Seven Habits of Highly Effective First off, I'd suggest buying "Seven Habits of Highly Effective
People", and NOT read it. Burn it, it's a great symbolic gesture. People", and NOT read it. Burn it, it's a great symbolic gesture.
(*) This document does so not so much by answering the question, but by .. [#f1] This document does so not so much by answering the question, but by
making it painfully obvious to the questioner that we don't have a clue making it painfully obvious to the questioner that we don't have a clue
to what the answer is. to what the answer is.
Anyway, here goes: Anyway, here goes:
.. _decisions:
Chapter 1: Decisions 1) Decisions
------------
Everybody thinks managers make decisions, and that decision-making is Everybody thinks managers make decisions, and that decision-making is
important. The bigger and more painful the decision, the bigger the important. The bigger and more painful the decision, the bigger the
manager must be to make it. That's very deep and obvious, but it's not manager must be to make it. That's very deep and obvious, but it's not
actually true. actually true.
The name of the game is to _avoid_ having to make a decision. In The name of the game is to **avoid** having to make a decision. In
particular, if somebody tells you "choose (a) or (b), we really need you particular, if somebody tells you "choose (a) or (b), we really need you
to decide on this", you're in trouble as a manager. The people you to decide on this", you're in trouble as a manager. The people you
manage had better know the details better than you, so if they come to manage had better know the details better than you, so if they come to
you for a technical decision, you're screwed. You're clearly not you for a technical decision, you're screwed. You're clearly not
competent to make that decision for them. competent to make that decision for them.
(Corollary:if the people you manage don't know the details better than (Corollary:if the people you manage don't know the details better than
you, you're also screwed, although for a totally different reason. you, you're also screwed, although for a totally different reason.
Namely that you are in the wrong job, and that _they_ should be managing Namely that you are in the wrong job, and that **they** should be managing
your brilliance instead). your brilliance instead).
So the name of the game is to _avoid_ decisions, at least the big and So the name of the game is to **avoid** decisions, at least the big and
painful ones. Making small and non-consequential decisions is fine, and painful ones. Making small and non-consequential decisions is fine, and
makes you look like you know what you're doing, so what a kernel manager makes you look like you know what you're doing, so what a kernel manager
needs to do is to turn the big and painful ones into small things where needs to do is to turn the big and painful ones into small things where
nobody really cares. nobody really cares.
It helps to realize that the key difference between a big decision and a It helps to realize that the key difference between a big decision and a
small one is whether you can fix your decision afterwards. Any decision small one is whether you can fix your decision afterwards. Any decision
can be made small by just always making sure that if you were wrong (and can be made small by just always making sure that if you were wrong (and
you _will_ be wrong), you can always undo the damage later by you **will** be wrong), you can always undo the damage later by
backtracking. Suddenly, you get to be doubly managerial for making backtracking. Suddenly, you get to be doubly managerial for making
_two_ inconsequential decisions - the wrong one _and_ the right one. **two** inconsequential decisions - the wrong one **and** the right one.
And people will even see that as true leadership (*cough* bullshit And people will even see that as true leadership (*cough* bullshit
*cough*). *cough*).
...@@ -65,10 +69,10 @@ And people will even see that as true leadership (*cough* bullshit ...@@ -65,10 +69,10 @@ And people will even see that as true leadership (*cough* bullshit
Thus the key to avoiding big decisions becomes to just avoiding to do Thus the key to avoiding big decisions becomes to just avoiding to do
things that can't be undone. Don't get ushered into a corner from which things that can't be undone. Don't get ushered into a corner from which
you cannot escape. A cornered rat may be dangerous - a cornered manager you cannot escape. A cornered rat may be dangerous - a cornered manager
is just pitiful. is just pitiful.
It turns out that since nobody would be stupid enough to ever really let It turns out that since nobody would be stupid enough to ever really let
a kernel manager have huge fiscal responsibility _anyway_, it's usually a kernel manager have huge fiscal responsibility **anyway**, it's usually
fairly easy to backtrack. Since you're not going to be able to waste fairly easy to backtrack. Since you're not going to be able to waste
huge amounts of money that you might not be able to repay, the only huge amounts of money that you might not be able to repay, the only
thing you can backtrack on is a technical decision, and there thing you can backtrack on is a technical decision, and there
...@@ -76,113 +80,118 @@ back-tracking is very easy: just tell everybody that you were an ...@@ -76,113 +80,118 @@ back-tracking is very easy: just tell everybody that you were an
incompetent nincompoop, say you're sorry, and undo all the worthless incompetent nincompoop, say you're sorry, and undo all the worthless
work you had people work on for the last year. Suddenly the decision work you had people work on for the last year. Suddenly the decision
you made a year ago wasn't a big decision after all, since it could be you made a year ago wasn't a big decision after all, since it could be
easily undone. easily undone.
It turns out that some people have trouble with this approach, for two It turns out that some people have trouble with this approach, for two
reasons: reasons:
- admitting you were an idiot is harder than it looks. We all like to - admitting you were an idiot is harder than it looks. We all like to
maintain appearances, and coming out in public to say that you were maintain appearances, and coming out in public to say that you were
wrong is sometimes very hard indeed. wrong is sometimes very hard indeed.
- having somebody tell you that what you worked on for the last year - having somebody tell you that what you worked on for the last year
wasn't worthwhile after all can be hard on the poor lowly engineers wasn't worthwhile after all can be hard on the poor lowly engineers
too, and while the actual _work_ was easy enough to undo by just too, and while the actual **work** was easy enough to undo by just
deleting it, you may have irrevocably lost the trust of that deleting it, you may have irrevocably lost the trust of that
engineer. And remember: "irrevocable" was what we tried to avoid in engineer. And remember: "irrevocable" was what we tried to avoid in
the first place, and your decision ended up being a big one after the first place, and your decision ended up being a big one after
all. all.
Happily, both of these reasons can be mitigated effectively by just Happily, both of these reasons can be mitigated effectively by just
admitting up-front that you don't have a friggin' clue, and telling admitting up-front that you don't have a friggin' clue, and telling
people ahead of the fact that your decision is purely preliminary, and people ahead of the fact that your decision is purely preliminary, and
might be the wrong thing. You should always reserve the right to change might be the wrong thing. You should always reserve the right to change
your mind, and make people very _aware_ of that. And it's much easier your mind, and make people very **aware** of that. And it's much easier
to admit that you are stupid when you haven't _yet_ done the really to admit that you are stupid when you haven't **yet** done the really
stupid thing. stupid thing.
Then, when it really does turn out to be stupid, people just roll their Then, when it really does turn out to be stupid, people just roll their
eyes and say "Oops, he did it again". eyes and say "Oops, he did it again".
This preemptive admission of incompetence might also make the people who This preemptive admission of incompetence might also make the people who
actually do the work also think twice about whether it's worth doing or actually do the work also think twice about whether it's worth doing or
not. After all, if _they_ aren't certain whether it's a good idea, you not. After all, if **they** aren't certain whether it's a good idea, you
sure as hell shouldn't encourage them by promising them that what they sure as hell shouldn't encourage them by promising them that what they
work on will be included. Make them at least think twice before they work on will be included. Make them at least think twice before they
embark on a big endeavor. embark on a big endeavor.
Remember: they'd better know more about the details than you do, and Remember: they'd better know more about the details than you do, and
they usually already think they have the answer to everything. The best they usually already think they have the answer to everything. The best
thing you can do as a manager is not to instill confidence, but rather a thing you can do as a manager is not to instill confidence, but rather a
healthy dose of critical thinking on what they do. healthy dose of critical thinking on what they do.
Btw, another way to avoid a decision is to plaintively just whine "can't Btw, another way to avoid a decision is to plaintively just whine "can't
we just do both?" and look pitiful. Trust me, it works. If it's not we just do both?" and look pitiful. Trust me, it works. If it's not
clear which approach is better, they'll eventually figure it out. The clear which approach is better, they'll eventually figure it out. The
answer may end up being that both teams get so frustrated by the answer may end up being that both teams get so frustrated by the
situation that they just give up. situation that they just give up.
That may sound like a failure, but it's usually a sign that there was That may sound like a failure, but it's usually a sign that there was
something wrong with both projects, and the reason the people involved something wrong with both projects, and the reason the people involved
couldn't decide was that they were both wrong. You end up coming up couldn't decide was that they were both wrong. You end up coming up
smelling like roses, and you avoided yet another decision that you could smelling like roses, and you avoided yet another decision that you could
have screwed up on. have screwed up on.
Chapter 2: People 2) People
---------
Most people are idiots, and being a manager means you'll have to deal Most people are idiots, and being a manager means you'll have to deal
with it, and perhaps more importantly, that _they_ have to deal with with it, and perhaps more importantly, that **they** have to deal with
_you_. **you**.
It turns out that while it's easy to undo technical mistakes, it's not It turns out that while it's easy to undo technical mistakes, it's not
as easy to undo personality disorders. You just have to live with as easy to undo personality disorders. You just have to live with
theirs - and yours. theirs - and yours.
However, in order to prepare yourself as a kernel manager, it's best to However, in order to prepare yourself as a kernel manager, it's best to
remember not to burn any bridges, bomb any innocent villagers, or remember not to burn any bridges, bomb any innocent villagers, or
alienate too many kernel developers. It turns out that alienating people alienate too many kernel developers. It turns out that alienating people
is fairly easy, and un-alienating them is hard. Thus "alienating" is fairly easy, and un-alienating them is hard. Thus "alienating"
immediately falls under the heading of "not reversible", and becomes a immediately falls under the heading of "not reversible", and becomes a
no-no according to Chapter 1. no-no according to :ref:`decisions`.
There's just a few simple rules here: There's just a few simple rules here:
(1) don't call people d*ckheads (at least not in public) (1) don't call people d*ckheads (at least not in public)
(2) learn how to apologize when you forgot rule (1) (2) learn how to apologize when you forgot rule (1)
The problem with #1 is that it's very easy to do, since you can say The problem with #1 is that it's very easy to do, since you can say
"you're a d*ckhead" in millions of different ways (*), sometimes without "you're a d*ckhead" in millions of different ways [#f2]_, sometimes without
even realizing it, and almost always with a white-hot conviction that even realizing it, and almost always with a white-hot conviction that
you are right. you are right.
And the more convinced you are that you are right (and let's face it, And the more convinced you are that you are right (and let's face it,
you can call just about _anybody_ a d*ckhead, and you often _will_ be you can call just about **anybody** a d*ckhead, and you often **will** be
right), the harder it ends up being to apologize afterwards. right), the harder it ends up being to apologize afterwards.
To solve this problem, you really only have two options: To solve this problem, you really only have two options:
- get really good at apologies - get really good at apologies
- spread the "love" out so evenly that nobody really ends up feeling - spread the "love" out so evenly that nobody really ends up feeling
like they get unfairly targeted. Make it inventive enough, and they like they get unfairly targeted. Make it inventive enough, and they
might even be amused. might even be amused.
The option of being unfailingly polite really doesn't exist. Nobody will The option of being unfailingly polite really doesn't exist. Nobody will
trust somebody who is so clearly hiding his true character. trust somebody who is so clearly hiding his true character.
(*) Paul Simon sang "Fifty Ways to Leave Your Lover", because quite .. [#f2] Paul Simon sang "Fifty Ways to Leave Your Lover", because quite
frankly, "A Million Ways to Tell a Developer He Is a D*ckhead" doesn't frankly, "A Million Ways to Tell a Developer He Is a D*ckhead" doesn't
scan nearly as well. But I'm sure he thought about it. scan nearly as well. But I'm sure he thought about it.
Chapter 3: People II - the Good Kind 3) People II - the Good Kind
----------------------------
While it turns out that most people are idiots, the corollary to that is While it turns out that most people are idiots, the corollary to that is
sadly that you are one too, and that while we can all bask in the secure sadly that you are one too, and that while we can all bask in the secure
knowledge that we're better than the average person (let's face it, knowledge that we're better than the average person (let's face it,
nobody ever believes that they're average or below-average), we should nobody ever believes that they're average or below-average), we should
also admit that we're not the sharpest knife around, and there will be also admit that we're not the sharpest knife around, and there will be
other people that are less of an idiot than you are. other people that are less of an idiot than you are.
Some people react badly to smart people. Others take advantage of them. Some people react badly to smart people. Others take advantage of them.
Make sure that you, as a kernel maintainer, are in the second group. Make sure that you, as a kernel maintainer, are in the second group.
Suck up to them, because they are the people who will make your job Suck up to them, because they are the people who will make your job
easier. In particular, they'll be able to make your decisions for you, easier. In particular, they'll be able to make your decisions for you,
which is what the game is all about. which is what the game is all about.
...@@ -191,7 +200,7 @@ So when you find somebody smarter than you are, just coast along. Your ...@@ -191,7 +200,7 @@ So when you find somebody smarter than you are, just coast along. Your
management responsibilities largely become ones of saying "Sounds like a management responsibilities largely become ones of saying "Sounds like a
good idea - go wild", or "That sounds good, but what about xxx?". The good idea - go wild", or "That sounds good, but what about xxx?". The
second version in particular is a great way to either learn something second version in particular is a great way to either learn something
new about "xxx" or seem _extra_ managerial by pointing out something the new about "xxx" or seem **extra** managerial by pointing out something the
smarter person hadn't thought about. In either case, you win. smarter person hadn't thought about. In either case, you win.
One thing to look out for is to realize that greatness in one area does One thing to look out for is to realize that greatness in one area does
...@@ -199,47 +208,49 @@ not necessarily translate to other areas. So you might prod people in ...@@ -199,47 +208,49 @@ not necessarily translate to other areas. So you might prod people in
specific directions, but let's face it, they might be good at what they specific directions, but let's face it, they might be good at what they
do, and suck at everything else. The good news is that people tend to do, and suck at everything else. The good news is that people tend to
naturally gravitate back to what they are good at, so it's not like you naturally gravitate back to what they are good at, so it's not like you
are doing something irreversible when you _do_ prod them in some are doing something irreversible when you **do** prod them in some
direction, just don't push too hard. direction, just don't push too hard.
Chapter 4: Placing blame 4) Placing blame
----------------
Things will go wrong, and people want somebody to blame. Tag, you're it. Things will go wrong, and people want somebody to blame. Tag, you're it.
It's not actually that hard to accept the blame, especially if people It's not actually that hard to accept the blame, especially if people
kind of realize that it wasn't _all_ your fault. Which brings us to the kind of realize that it wasn't **all** your fault. Which brings us to the
best way of taking the blame: do it for another guy. You'll feel good best way of taking the blame: do it for another guy. You'll feel good
for taking the fall, he'll feel good about not getting blamed, and the for taking the fall, he'll feel good about not getting blamed, and the
guy who lost his whole 36GB porn-collection because of your incompetence guy who lost his whole 36GB porn-collection because of your incompetence
will grudgingly admit that you at least didn't try to weasel out of it. will grudgingly admit that you at least didn't try to weasel out of it.
Then make the developer who really screwed up (if you can find him) know Then make the developer who really screwed up (if you can find him) know
_in_private_ that he screwed up. Not just so he can avoid it in the **in_private** that he screwed up. Not just so he can avoid it in the
future, but so that he knows he owes you one. And, perhaps even more future, but so that he knows he owes you one. And, perhaps even more
importantly, he's also likely the person who can fix it. Because, let's importantly, he's also likely the person who can fix it. Because, let's
face it, it sure ain't you. face it, it sure ain't you.
Taking the blame is also why you get to be manager in the first place. Taking the blame is also why you get to be manager in the first place.
It's part of what makes people trust you, and allow you the potential It's part of what makes people trust you, and allow you the potential
glory, because you're the one who gets to say "I screwed up". And if glory, because you're the one who gets to say "I screwed up". And if
you've followed the previous rules, you'll be pretty good at saying that you've followed the previous rules, you'll be pretty good at saying that
by now. by now.
Chapter 5: Things to avoid 5) Things to avoid
------------------
There's one thing people hate even more than being called "d*ckhead", There's one thing people hate even more than being called "d*ckhead",
and that is being called a "d*ckhead" in a sanctimonious voice. The and that is being called a "d*ckhead" in a sanctimonious voice. The
first you can apologize for, the second one you won't really get the first you can apologize for, the second one you won't really get the
chance. They likely will no longer be listening even if you otherwise chance. They likely will no longer be listening even if you otherwise
do a good job. do a good job.
We all think we're better than anybody else, which means that when We all think we're better than anybody else, which means that when
somebody else puts on airs, it _really_ rubs us the wrong way. You may somebody else puts on airs, it **really** rubs us the wrong way. You may
be morally and intellectually superior to everybody around you, but be morally and intellectually superior to everybody around you, but
don't try to make it too obvious unless you really _intend_ to irritate don't try to make it too obvious unless you really **intend** to irritate
somebody (*). somebody [#f3]_.
Similarly, don't be too polite or subtle about things. Politeness easily Similarly, don't be too polite or subtle about things. Politeness easily
ends up going overboard and hiding the problem, and as they say, "On the ends up going overboard and hiding the problem, and as they say, "On the
...@@ -251,15 +262,16 @@ Some humor can help pad both the bluntness and the moralizing. Going ...@@ -251,15 +262,16 @@ Some humor can help pad both the bluntness and the moralizing. Going
overboard to the point of being ridiculous can drive a point home overboard to the point of being ridiculous can drive a point home
without making it painful to the recipient, who just thinks you're being without making it painful to the recipient, who just thinks you're being
silly. It can thus help get through the personal mental block we all silly. It can thus help get through the personal mental block we all
have about criticism. have about criticism.
(*) Hint: internet newsgroups that are not directly related to your work .. [#f3] Hint: internet newsgroups that are not directly related to your work
are great ways to take out your frustrations at other people. Write are great ways to take out your frustrations at other people. Write
insulting posts with a sneer just to get into a good flame every once in insulting posts with a sneer just to get into a good flame every once in
a while, and you'll feel cleansed. Just don't crap too close to home. a while, and you'll feel cleansed. Just don't crap too close to home.
Chapter 6: Why me? 6) Why me?
----------
Since your main responsibility seems to be to take the blame for other Since your main responsibility seems to be to take the blame for other
peoples mistakes, and make it painfully obvious to everybody else that peoples mistakes, and make it painfully obvious to everybody else that
...@@ -268,9 +280,9 @@ first place? ...@@ -268,9 +280,9 @@ first place?
First off, while you may or may not get screaming teenage girls (or First off, while you may or may not get screaming teenage girls (or
boys, let's not be judgmental or sexist here) knocking on your dressing boys, let's not be judgmental or sexist here) knocking on your dressing
room door, you _will_ get an immense feeling of personal accomplishment room door, you **will** get an immense feeling of personal accomplishment
for being "in charge". Never mind the fact that you're really leading for being "in charge". Never mind the fact that you're really leading
by trying to keep up with everybody else and running after them as fast by trying to keep up with everybody else and running after them as fast
as you can. Everybody will still think you're the person in charge. as you can. Everybody will still think you're the person in charge.
It's a great job if you can hack it. It's a great job if you can hack it.
...@@ -49,25 +49,17 @@ depends on CONFIG_PCIEPORTBUS, so pls. set CONFIG_PCIEPORTBUS=y and ...@@ -49,25 +49,17 @@ depends on CONFIG_PCIEPORTBUS, so pls. set CONFIG_PCIEPORTBUS=y and
CONFIG_PCIEAER = y. CONFIG_PCIEAER = y.
2.2 Load PCI Express AER Root Driver 2.2 Load PCI Express AER Root Driver
There is a case where a system has AER support in BIOS. Enabling the AER
Root driver and having AER support in BIOS may result unpredictable Some systems have AER support in firmware. Enabling Linux AER support at
behavior. To avoid this conflict, a successful load of the AER Root driver the same time the firmware handles AER may result in unpredictable
requires ACPI _OSC support in the BIOS to allow the AER Root driver to behavior. Therefore, Linux does not handle AER events unless the firmware
request for native control of AER. See the PCI FW 3.0 Specification for grants AER control to the OS via the ACPI _OSC method. See the PCI FW 3.0
details regarding OSC usage. Currently, lots of firmwares don't provide Specification for details regarding _OSC usage.
_OSC support while they use PCI Express. To support such firmwares,
forceload, a parameter of type bool, could enable AER to continue to
be initiated although firmwares have no _OSC support. To enable the
walkaround, pls. add aerdriver.forceload=y to kernel boot parameter line
when booting kernel. Note that forceload=n by default.
nosourceid, another parameter of type bool, can be used when broken
hardware (mostly chipsets) has root ports that cannot obtain the reporting
source ID. nosourceid=n by default.
2.3 AER error output 2.3 AER error output
When a PCI-E AER error is captured, an error message will be outputted to
console. If it's a correctable error, it is outputted as a warning. When a PCIe AER error is captured, an error message will be output to
console. If it's a correctable error, it is output as a warning.
Otherwise, it is printed as an error. So users could choose different Otherwise, it is printed as an error. So users could choose different
log level to filter out correctable error messages. log level to filter out correctable error messages.
......
...@@ -2493,6 +2493,28 @@ or some future &ldquo;lazy&rdquo; ...@@ -2493,6 +2493,28 @@ or some future &ldquo;lazy&rdquo;
variant of <tt>call_rcu()</tt> that might one day be created for variant of <tt>call_rcu()</tt> that might one day be created for
energy-efficiency purposes. energy-efficiency purposes.
<p>
That said, there are limits.
RCU requires that the <tt>rcu_head</tt> structure be aligned to a
two-byte boundary, and passing a misaligned <tt>rcu_head</tt>
structure to one of the <tt>call_rcu()</tt> family of functions
will result in a splat.
It is therefore necessary to exercise caution when packing
structures containing fields of type <tt>rcu_head</tt>.
Why not a four-byte or even eight-byte alignment requirement?
Because the m68k architecture provides only two-byte alignment,
and thus acts as alignment's least common denominator.
<p>
The reason for reserving the bottom bit of pointers to
<tt>rcu_head</tt> structures is to leave the door open to
&ldquo;lazy&rdquo; callbacks whose invocations can safely be deferred.
Deferring invocation could potentially have energy-efficiency
benefits, but only if the rate of non-lazy callbacks decreases
significantly for some important workload.
In the meantime, reserving the bottom bit keeps this option open
in case it one day becomes useful.
<h3><a name="Performance, Scalability, Response Time, and Reliability"> <h3><a name="Performance, Scalability, Response Time, and Reliability">
Performance, Scalability, Response Time, and Reliability</a></h3> Performance, Scalability, Response Time, and Reliability</a></h3>
......
...@@ -57,7 +57,7 @@ Call Trace: ...@@ -57,7 +57,7 @@ Call Trace:
[<ffffffff817db154>] kernel_thread_helper+0x4/0x10 [<ffffffff817db154>] kernel_thread_helper+0x4/0x10
[<ffffffff81066430>] ? finish_task_switch+0x80/0x110 [<ffffffff81066430>] ? finish_task_switch+0x80/0x110
[<ffffffff817d9c04>] ? retint_restore_args+0xe/0xe [<ffffffff817d9c04>] ? retint_restore_args+0xe/0xe
[<ffffffff81097510>] ? __init_kthread_worker+0x70/0x70 [<ffffffff81097510>] ? __kthread_init_worker+0x70/0x70
[<ffffffff817db150>] ? gs_change+0xb/0xb [<ffffffff817db150>] ? gs_change+0xb/0xb
Line 2776 of block/cfq-iosched.c in v3.0-rc5 is as follows: Line 2776 of block/cfq-iosched.c in v3.0-rc5 is as follows:
......
...@@ -10,21 +10,6 @@ status messages via printk(), which can be examined via the dmesg ...@@ -10,21 +10,6 @@ status messages via printk(), which can be examined via the dmesg
command (perhaps grepping for "torture"). The test is started command (perhaps grepping for "torture"). The test is started
when the module is loaded, and stops when the module is unloaded. when the module is loaded, and stops when the module is unloaded.
CONFIG_RCU_TORTURE_TEST_RUNNABLE
It is also possible to specify CONFIG_RCU_TORTURE_TEST=y, which will
result in the tests being loaded into the base kernel. In this case,
the CONFIG_RCU_TORTURE_TEST_RUNNABLE config option is used to specify
whether the RCU torture tests are to be started immediately during
boot or whether the /proc/sys/kernel/rcutorture_runnable file is used
to enable them. This /proc file can be used to repeatedly pause and
restart the tests, regardless of the initial state specified by the
CONFIG_RCU_TORTURE_TEST_RUNNABLE config option.
You will normally -not- want to start the RCU torture tests during boot
(and thus the default is CONFIG_RCU_TORTURE_TEST_RUNNABLE=n), but doing
this can sometimes be useful in finding boot-time bugs.
MODULE PARAMETERS MODULE PARAMETERS
......
.. _securitybugs:
Security bugs
=============
Linux kernel developers take security very seriously. As such, we'd Linux kernel developers take security very seriously. As such, we'd
like to know when a security bug is found so that it can be fixed and like to know when a security bug is found so that it can be fixed and
disclosed as quickly as possible. Please report security bugs to the disclosed as quickly as possible. Please report security bugs to the
Linux kernel security team. Linux kernel security team.
1) Contact 1) Contact
----------
The Linux kernel security team can be contacted by email at The Linux kernel security team can be contacted by email at
<security@kernel.org>. This is a private list of security officers <security@kernel.org>. This is a private list of security officers
...@@ -18,6 +24,7 @@ Any exploit code is very helpful and will not be released without ...@@ -18,6 +24,7 @@ Any exploit code is very helpful and will not be released without
consent from the reporter unless it has already been made public. consent from the reporter unless it has already been made public.
2) Disclosure 2) Disclosure
-------------
The goal of the Linux kernel security team is to work with the The goal of the Linux kernel security team is to work with the
bug submitter to bug resolution as well as disclosure. We prefer bug submitter to bug resolution as well as disclosure. We prefer
...@@ -33,6 +40,7 @@ to a few weeks. As a basic default policy, we expect report date to ...@@ -33,6 +40,7 @@ to a few weeks. As a basic default policy, we expect report date to
disclosure date to be on the order of 7 days. disclosure date to be on the order of 7 days.
3) Non-disclosure agreements 3) Non-disclosure agreements
----------------------------
The Linux kernel security team is not a formal body and therefore unable The Linux kernel security team is not a formal body and therefore unable
to enter any non-disclosure agreements. to enter any non-disclosure agreements.
此差异已折叠。
此差异已折叠。
此差异已折叠。
# 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
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册