提交 03e075b3 编写于 作者: I Ingo Molnar

Merge branch 'linus' into efi/core, to refresh the branch and to pick up recent fixes

Signed-off-by: NIngo Molnar <mingo@kernel.org>

要显示的变更太多。

To preserve performance only 1000 of 1000+ files are displayed.
...@@ -21,6 +21,7 @@ Andrey Ryabinin <ryabinin.a.a@gmail.com> <a.ryabinin@samsung.com> ...@@ -21,6 +21,7 @@ Andrey Ryabinin <ryabinin.a.a@gmail.com> <a.ryabinin@samsung.com>
Andrew Morton <akpm@linux-foundation.org> Andrew Morton <akpm@linux-foundation.org>
Andrew Vasquez <andrew.vasquez@qlogic.com> Andrew Vasquez <andrew.vasquez@qlogic.com>
Andy Adamson <andros@citi.umich.edu> Andy Adamson <andros@citi.umich.edu>
Antonio Ospite <ao2@ao2.it> <ao2@amarulasolutions.com>
Archit Taneja <archit@ti.com> Archit Taneja <archit@ti.com>
Arnaud Patard <arnaud.patard@rtp-net.org> Arnaud Patard <arnaud.patard@rtp-net.org>
Arnd Bergmann <arnd@arndb.de> Arnd Bergmann <arnd@arndb.de>
......
...@@ -534,6 +534,7 @@ N: NeilBrown ...@@ -534,6 +534,7 @@ N: NeilBrown
E: neil@brown.name E: neil@brown.name
P: 4096R/566281B9 1BC6 29EB D390 D870 7B5F 497A 39EC 9EDD 5662 81B9 P: 4096R/566281B9 1BC6 29EB D390 D870 7B5F 497A 39EC 9EDD 5662 81B9
D: NFSD Maintainer 2000-2007 D: NFSD Maintainer 2000-2007
D: MD Maintainer 2001-2016
N: Zach Brown N: Zach Brown
E: zab@zabbo.net E: zab@zabbo.net
...@@ -1507,6 +1508,14 @@ S: 312/107 Canberra Avenue ...@@ -1507,6 +1508,14 @@ S: 312/107 Canberra Avenue
S: Griffith, ACT 2603 S: Griffith, ACT 2603
S: Australia S: Australia
N: Andreas Herrmann
E: herrmann.der.user@gmail.com
E: herrmann.der.user@googlemail.com
D: Key developer of x86/AMD64
D: Author of AMD family 15h processor power monitoring driver
D: Maintainer of AMD Athlon 64 and Opteron processor frequency driver
S: Germany
N: Sebastian Hetze N: Sebastian Hetze
E: she@lunetix.de E: she@lunetix.de
D: German Linux Documentation, D: German Linux Documentation,
...@@ -1847,6 +1856,16 @@ S: Korte Heul 95 ...@@ -1847,6 +1856,16 @@ S: Korte Heul 95
S: 1403 ND BUSSUM S: 1403 ND BUSSUM
S: The Netherlands S: The Netherlands
N: Martin Kepplinger
E: martink@posteo.de
E: martin.kepplinger@theobroma-systems.com
W: http://www.martinkepplinger.com
D: mma8452 accelerators iio driver
D: Kernel cleanups
S: Garnisonstraße 26
S: 4020 Linz
S: Austria
N: Karl Keyte N: Karl Keyte
E: karl@koft.com E: karl@koft.com
D: Disk usage statistics and modifications to line printer driver D: Disk usage statistics and modifications to line printer driver
......
What: /config/iio
Date: October 2015
KernelVersion: 4.4
Contact: linux-iio@vger.kernel.org
Description:
This represents Industrial IO configuration entry point
directory. It contains sub-groups corresponding to IIO
objects.
What: /config/iio/triggers
Date: October 2015
KernelVersion: 4.4
Description:
Industrial IO software triggers directory.
What: /config/iio/triggers/hrtimers
Date: October 2015
KernelVersion: 4.4
Description:
High resolution timers directory. Creating a directory here
will result in creating a hrtimer trigger in the IIO subsystem.
What: /config/rdma_cm
Date: November 29, 2015
KernelVersion: 4.4.0
Description: Interface is used to configure RDMA-cable HCAs in respect to
RDMA-CM attributes.
Attributes are visible only when configfs is mounted. To mount
configfs in /config directory use:
# mount -t configfs none /config/
In order to set parameters related to a specific HCA, a directory
for this HCA has to be created:
mkdir -p /config/rdma_cm/<hca>
What: /config/rdma_cm/<hca>/ports/<port-num>/default_roce_mode
Date: November 29, 2015
KernelVersion: 4.4.0
Description: RDMA-CM based connections from HCA <hca> at port <port-num>
will be initiated with this RoCE type as default.
The possible RoCE types are either "IB/RoCE v1" or "RoCE v2".
This parameter has RW access.
...@@ -10,3 +10,5 @@ Description: ...@@ -10,3 +10,5 @@ Description:
isoc_mult - 0..2 (hs/ss only) isoc_mult - 0..2 (hs/ss only)
isoc_maxburst - 0..15 (ss only) isoc_maxburst - 0..15 (ss only)
buflen - buffer length buflen - buffer length
bulk_qlen - depth of queue for bulk
iso_qlen - depth of queue for iso
What: /config/usb-gadget/gadget/functions/tcm.name
Date: Dec 2015
KernelVersion: 4.5
Description:
There are no attributes because all the configuration
is performed in the "target" subsystem of configfs.
What: /sys/bus/iio/devices/iio:deviceX/in_allow_async_readout
Date: December 2015
KernelVersion: 4.4
Contact: linux-iio@vger.kernel.org
Description:
By default (value '0'), the capture thread checks for the Conversion
Ready Flag to being set prior to committing a new value to the sample
buffer. This synchronizes the in-chip conversion rate with the
in-driver readout rate at the cost of an additional register read.
Writing '1' will remove the polling for the Conversion Ready Flags to
save the additional i2c transaction, which will improve the bandwidth
available for reading data. However, samples can be occasionally skipped
or repeated, depending on the beat between the capture and conversion
rates.
What: /sys/bus/iio/devices/iio:deviceX/in_shunt_resistor
Date: December 2015
KernelVersion: 4.4
Contact: linux-iio@vger.kernel.org
Description:
The value of the shunt resistor may be known only at runtime fom an
eeprom content read by a client application. This attribute allows to
set its value in ohms.
...@@ -134,19 +134,21 @@ Description: ...@@ -134,19 +134,21 @@ Description:
enabled for the device. Developer can write y/Y/1 or n/N/0 to enabled for the device. Developer can write y/Y/1 or n/N/0 to
the file to enable/disable the feature. the file to enable/disable the feature.
What: /sys/bus/usb/devices/.../power/usb3_hardware_lpm What: /sys/bus/usb/devices/.../power/usb3_hardware_lpm_u1
Date: June 2015 /sys/bus/usb/devices/.../power/usb3_hardware_lpm_u2
Date: November 2015
Contact: Kevin Strasser <kevin.strasser@linux.intel.com> Contact: Kevin Strasser <kevin.strasser@linux.intel.com>
Lu Baolu <baolu.lu@linux.intel.com>
Description: Description:
If CONFIG_PM is set and a USB 3.0 lpm-capable device is plugged If CONFIG_PM is set and a USB 3.0 lpm-capable device is plugged
in to a xHCI host which supports link PM, it will check if U1 in to a xHCI host which supports link PM, it will check if U1
and U2 exit latencies have been set in the BOS descriptor; if and U2 exit latencies have been set in the BOS descriptor; if
the check is is passed and the host supports USB3 hardware LPM, the check is passed and the host supports USB3 hardware LPM,
USB3 hardware LPM will be enabled for the device and the USB USB3 hardware LPM will be enabled for the device and the USB
device directory will contain a file named device directory will contain two files named
power/usb3_hardware_lpm. The file holds a string value (enable power/usb3_hardware_lpm_u1 and power/usb3_hardware_lpm_u2. These
or disable) indicating whether or not USB3 hardware LPM is files hold a string value (enable or disable) indicating whether
enabled for the device. or not USB3 hardware LPM U1 or U2 is enabled for the device.
What: /sys/bus/usb/devices/.../removable What: /sys/bus/usb/devices/.../removable
Date: February 2012 Date: February 2012
...@@ -187,6 +189,17 @@ Description: ...@@ -187,6 +189,17 @@ Description:
The file will read "hotplug", "wired" and "not used" if the The file will read "hotplug", "wired" and "not used" if the
information is available, and "unknown" otherwise. information is available, and "unknown" otherwise.
What: /sys/bus/usb/devices/.../(hub interface)/portX/usb3_lpm_permit
Date: November 2015
Contact: Lu Baolu <baolu.lu@linux.intel.com>
Description:
Some USB3.0 devices are not friendly to USB3 LPM. usb3_lpm_permit
attribute allows enabling/disabling usb3 lpm of a port. It takes
effect both before and after a usb device is enumerated. Supported
values are "0" if both u1 and u2 are NOT permitted, "u1" if only u1
is permitted, "u2" if only u2 is permitted, "u1_u2" if both u1 and
u2 are permitted.
What: /sys/bus/usb/devices/.../power/usb2_lpm_l1_timeout What: /sys/bus/usb/devices/.../power/usb2_lpm_l1_timeout
Date: May 2013 Date: May 2013
Contact: Mathias Nyman <mathias.nyman@linux.intel.com> Contact: Mathias Nyman <mathias.nyman@linux.intel.com>
......
What: /sys/class/infiniband/<hca>/ports/<port-number>/gid_attrs/ndevs/<gid-index>
Date: November 29, 2015
KernelVersion: 4.4.0
Contact: linux-rdma@vger.kernel.org
Description: The net-device's name associated with the GID resides
at index <gid-index>.
What: /sys/class/infiniband/<hca>/ports/<port-number>/gid_attrs/types/<gid-index>
Date: November 29, 2015
KernelVersion: 4.4.0
Contact: linux-rdma@vger.kernel.org
Description: The RoCE type of the associated GID resides at index <gid-index>.
This could either be "IB/RoCE v1" for IB and RoCE v1 based GODs
or "RoCE v2" for RoCE v2 based GIDs.
...@@ -19,6 +19,25 @@ Description: ...@@ -19,6 +19,25 @@ Description:
Set to 0 to pad all frames. Set greater than tx_max to Set to 0 to pad all frames. Set greater than tx_max to
disable all padding. disable all padding.
What: /sys/class/net/<iface>/cdc_ncm/ndp_to_end
Date: Dec 2015
KernelVersion: 4.5
Contact: Bjørn Mork <bjorn@mork.no>
Description:
Boolean attribute showing the status of the "NDP to
end" quirk. Defaults to 'N', except for devices
already known to need it enabled.
The "NDP to end" quirk makes the driver place the NDP
(the packet index table) after the payload. The NCM
specification does not mandate this, but some devices
are known to be more restrictive. Write 'Y' to this
attribute for temporary testing of a suspect device
failing to work with the default driver settings.
A device entry should be added to the driver if this
quirk is found to be required.
What: /sys/class/net/<iface>/cdc_ncm/rx_max What: /sys/class/net/<iface>/cdc_ncm/rx_max
Date: May 2014 Date: May 2014
KernelVersion: 3.16 KernelVersion: 3.16
......
...@@ -8,7 +8,7 @@ Description: ...@@ -8,7 +8,7 @@ Description:
What: /sys/class/net/<mesh_iface>/mesh/<vlan_subdir>/ap_isolation What: /sys/class/net/<mesh_iface>/mesh/<vlan_subdir>/ap_isolation
Date: May 2011 Date: May 2011
Contact: Antonio Quartulli <antonio@meshcoding.com> Contact: Antonio Quartulli <a@unstable.cc>
Description: Description:
Indicates whether the data traffic going from a Indicates whether the data traffic going from a
wireless client to another wireless client will be wireless client to another wireless client will be
...@@ -70,7 +70,7 @@ Description: ...@@ -70,7 +70,7 @@ Description:
What: /sys/class/net/<mesh_iface>/mesh/isolation_mark What: /sys/class/net/<mesh_iface>/mesh/isolation_mark
Date: Nov 2013 Date: Nov 2013
Contact: Antonio Quartulli <antonio@meshcoding.com> Contact: Antonio Quartulli <a@unstable.cc>
Description: Description:
Defines the isolation mark (and its bitmask) which Defines the isolation mark (and its bitmask) which
is used to classify clients as "isolated" by the is used to classify clients as "isolated" by the
......
What: /sys/class/net/<iface>/qmi/raw_ip
Date: Dec 2015
KernelVersion: 4.4
Contact: Bjørn Mork <bjorn@mork.no>
Description:
Boolean. Default: 'N'
Set this to 'Y' to change the network device link
framing from '802.3' to 'raw-ip'.
The netdev will change to reflect the link framing
mode. The netdev is an ordinary ethernet device in
'802.3' mode, and the driver expects to exchange
frames with an ethernet header over the USB link. The
netdev is a headerless p-t-p device in 'raw-ip' mode,
and the driver expects to echange IPv4 or IPv6 packets
without any L2 header over the USB link.
Userspace is in full control of firmware configuration
through the delegation of the QMI protocol. Userspace
is responsible for coordination of driver and firmware
link framing mode, changing this setting to 'Y' if the
firmware is configured for 'raw-ip' mode.
What: /sys/class/watchdog/watchdogn/bootstatus
Date: August 2015
Contact: Wim Van Sebroeck <wim@iguana.be>
Description:
It is a read only file. It contains status of the watchdog
device at boot. It is equivalent to WDIOC_GETBOOTSTATUS of
ioctl interface.
What: /sys/class/watchdog/watchdogn/identity
Date: August 2015
Contact: Wim Van Sebroeck <wim@iguana.be>
Description:
It is a read only file. It contains identity string of
watchdog device.
What: /sys/class/watchdog/watchdogn/nowayout
Date: August 2015
Contact: Wim Van Sebroeck <wim@iguana.be>
Description:
It is a read only file. While reading, it gives '1' if that
device supports nowayout feature else, it gives '0'.
What: /sys/class/watchdog/watchdogn/state
Date: August 2015
Contact: Wim Van Sebroeck <wim@iguana.be>
Description:
It is a read only file. It gives active/inactive status of
watchdog device.
What: /sys/class/watchdog/watchdogn/status
Date: August 2015
Contact: Wim Van Sebroeck <wim@iguana.be>
Description:
It is a read only file. It contains watchdog device's
internal status bits. It is equivalent to WDIOC_GETSTATUS
of ioctl interface.
What: /sys/class/watchdog/watchdogn/timeleft
Date: August 2015
Contact: Wim Van Sebroeck <wim@iguana.be>
Description:
It is a read only file. It contains value of time left for
reset generation. It is equivalent to WDIOC_GETTIMELEFT of
ioctl interface.
What: /sys/class/watchdog/watchdogn/timeout
Date: August 2015
Contact: Wim Van Sebroeck <wim@iguana.be>
Description:
It is a read only file. It is read to know about current
value of timeout programmed.
...@@ -87,6 +87,12 @@ Contact: "Jaegeuk Kim" <jaegeuk@kernel.org> ...@@ -87,6 +87,12 @@ Contact: "Jaegeuk Kim" <jaegeuk@kernel.org>
Description: Description:
Controls the checkpoint timing. Controls the checkpoint timing.
What: /sys/fs/f2fs/<disk>/idle_interval
Date: January 2016
Contact: "Jaegeuk Kim" <jaegeuk@kernel.org>
Description:
Controls the idle timing.
What: /sys/fs/f2fs/<disk>/ra_nid_pages What: /sys/fs/f2fs/<disk>/ra_nid_pages
Date: October 2015 Date: October 2015
Contact: "Chao Yu" <chao2.yu@samsung.com> Contact: "Chao Yu" <chao2.yu@samsung.com>
......
...@@ -33,7 +33,7 @@ Description: ...@@ -33,7 +33,7 @@ Description:
The object directory contains subdirectories for each function The object directory contains subdirectories for each function
that is patched within the object. that is patched within the object.
What: /sys/kernel/livepatch/<patch>/<object>/<function> What: /sys/kernel/livepatch/<patch>/<object>/<function,sympos>
Date: Nov 2014 Date: Nov 2014
KernelVersion: 3.19.0 KernelVersion: 3.19.0
Contact: live-patching@vger.kernel.org Contact: live-patching@vger.kernel.org
...@@ -41,4 +41,8 @@ Description: ...@@ -41,4 +41,8 @@ Description:
The function directory contains attributes regarding the The function directory contains attributes regarding the
properties and state of the patched function. properties and state of the patched function.
The directory name contains the patched function name and a
sympos number corresponding to the nth occurrence of the symbol
name in kallsyms for the patched object.
There are currently no such attributes. There are currently no such attributes.
...@@ -74,7 +74,7 @@ Description: ...@@ -74,7 +74,7 @@ Description:
assignment may be changed by two writing numbers into assignment may be changed by two writing numbers into
the file. the file.
What: /sys/class/ptp/ptpN/pps_avaiable What: /sys/class/ptp/ptpN/pps_available
Date: September 2010 Date: September 2010
Contact: Richard Cochran <richardcochran@gmail.com> Contact: Richard Cochran <richardcochran@gmail.com>
Description: Description:
......
...@@ -430,7 +430,7 @@ The rationale for using gotos is: ...@@ -430,7 +430,7 @@ The rationale for using gotos is:
return result; return result;
} }
A common type of bug to be aware of it "one err bugs" which look like this: A common type of bug to be aware of is "one err bugs" which look like this:
err: err:
kfree(foo->bar); kfree(foo->bar);
......
...@@ -951,16 +951,6 @@ to "Closing". ...@@ -951,16 +951,6 @@ to "Closing".
alignment constraints (e.g. the alignment constraints about 64-bit alignment constraints (e.g. the alignment constraints about 64-bit
objects). objects).
3) Supporting multiple types of IOMMUs
If your architecture needs to support multiple types of IOMMUs, you
can use include/linux/asm-generic/dma-mapping-common.h. It's a
library to support the DMA API with multiple types of IOMMUs. Lots
of architectures (x86, powerpc, sh, alpha, ia64, microblaze and
sparc) use it. Choose one to see how it can be used. If you need to
support multiple types of IOMMUs in a single system, the example of
x86 or powerpc helps.
Closing Closing
This document, and the API itself, would not be in its current This document, and the API itself, would not be in its current
......
...@@ -236,7 +236,7 @@ are guaranteed also to be cache line boundaries). ...@@ -236,7 +236,7 @@ are guaranteed also to be cache line boundaries).
DMA_TO_DEVICE synchronisation must be done after the last modification DMA_TO_DEVICE synchronisation must be done after the last modification
of the memory region by the software and before it is handed off to of the memory region by the software and before it is handed off to
the driver. Once this primitive is used, memory covered by this the device. Once this primitive is used, memory covered by this
primitive should be treated as read-only by the device. If the device primitive should be treated as read-only by the device. If the device
may write to it at any point, it should be DMA_BIDIRECTIONAL (see may write to it at any point, it should be DMA_BIDIRECTIONAL (see
below). below).
......
...@@ -50,8 +50,7 @@ pdfdocs: $(PDF) ...@@ -50,8 +50,7 @@ pdfdocs: $(PDF)
HTML := $(sort $(patsubst %.xml, %.html, $(BOOKS))) HTML := $(sort $(patsubst %.xml, %.html, $(BOOKS)))
htmldocs: $(HTML) htmldocs: $(HTML)
$(call build_main_index) $(call cmd,build_main_index)
$(call build_images)
$(call install_media_images) $(call install_media_images)
MAN := $(patsubst %.xml, %.9, $(BOOKS)) MAN := $(patsubst %.xml, %.9, $(BOOKS))
...@@ -139,7 +138,8 @@ quiet_cmd_db2pdf = PDF $@ ...@@ -139,7 +138,8 @@ quiet_cmd_db2pdf = PDF $@
index = index.html index = index.html
main_idx = $(obj)/$(index) main_idx = $(obj)/$(index)
build_main_index = rm -rf $(main_idx); \ quiet_cmd_build_main_index = HTML $(main_idx)
cmd_build_main_index = rm -rf $(main_idx); \
echo '<h1>Linux Kernel HTML Documentation</h1>' >> $(main_idx) && \ echo '<h1>Linux Kernel HTML Documentation</h1>' >> $(main_idx) && \
echo '<h2>Kernel Version: $(KERNELVERSION)</h2>' >> $(main_idx) && \ echo '<h2>Kernel Version: $(KERNELVERSION)</h2>' >> $(main_idx) && \
cat $(HTML) >> $(main_idx) cat $(HTML) >> $(main_idx)
...@@ -227,6 +227,10 @@ dochelp: ...@@ -227,6 +227,10 @@ dochelp:
@echo ' mandocs - man pages' @echo ' mandocs - man pages'
@echo ' installmandocs - install man pages generated by mandocs' @echo ' installmandocs - install man pages generated by mandocs'
@echo ' cleandocs - clean all generated DocBook files' @echo ' cleandocs - clean all generated DocBook files'
@echo
@echo 'make DOCBOOKS="s1.xml s2.xml" [target] Generate only docs s1.xml s2.xml'
@echo ' valid values for DOCBOOKS are: $(DOCBOOKS)'
### ###
# Temporary files left by various tools # Temporary files left by various tools
......
...@@ -238,83 +238,32 @@ X!Isound/sound_firmware.c ...@@ -238,83 +238,32 @@ X!Isound/sound_firmware.c
!Iinclude/media/videobuf2-memops.h !Iinclude/media/videobuf2-memops.h
</sect1> </sect1>
<sect1><title>Digital TV (DVB) devices</title> <sect1><title>Digital TV (DVB) devices</title>
!Idrivers/media/dvb-core/dvb_ca_en50221.h <sect1><title>Digital TV Common functions</title>
!Idrivers/media/dvb-core/dvb_frontend.h
!Idrivers/media/dvb-core/dvb_math.h !Idrivers/media/dvb-core/dvb_math.h
!Idrivers/media/dvb-core/dvb_ringbuffer.h !Idrivers/media/dvb-core/dvb_ringbuffer.h
!Idrivers/media/dvb-core/dvbdev.h !Idrivers/media/dvb-core/dvbdev.h
<sect1><title>Digital TV Demux API</title> </sect1>
<para>The kernel demux API defines a driver-internal interface for <sect1><title>Digital TV Frontend kABI</title>
registering low-level, hardware specific driver to a hardware !Pdrivers/media/dvb-core/dvb_frontend.h Digital TV Frontend
independent demux layer. It is only of interest for Digital TV !Idrivers/media/dvb-core/dvb_frontend.h
device driver writers. The header file for this API is named </sect1>
<constant>demux.h</constant> and located in <sect1><title>Digital TV Demux kABI</title>
<constant>drivers/media/dvb-core</constant>.</para> !Pdrivers/media/dvb-core/demux.h Digital TV Demux
<sect1><title>Demux Callback API</title>
<para>The demux API should be implemented for each demux in the !Pdrivers/media/dvb-core/demux.h Demux Callback
system. It is used to select the TS source of a demux and to manage </sect1>
the demux resources. When the demux client allocates a resource via
the demux API, it receives a pointer to the API of that
resource.</para>
<para>Each demux receives its TS input from a DVB front-end or from
memory, as set via this demux API. In a system with more than one
front-end, the API can be used to select one of the DVB front-ends
as a TS source for a demux, unless this is fixed in the HW platform.
The demux API only controls front-ends regarding to their connections
with demuxes; the APIs used to set the other front-end parameters,
such as tuning, are not defined in this document.</para>
<para>The functions that implement the abstract interface demux should
be defined static or module private and registered to the Demux
core for external access. It is not necessary to implement every
function in the struct <constant>dmx_demux</constant>. For example,
a demux interface might support Section filtering, but not PES
filtering. The API client is expected to check the value of any
function pointer before calling the function: the value of NULL means
that the &#8220;function is not available&#8221;.</para>
<para>Whenever the functions of the demux API modify shared data,
the possibilities of lost update and race condition problems should
be addressed, e.g. by protecting parts of code with mutexes.</para>
<para>Note that functions called from a bottom half context must not
sleep. Even a simple memory allocation without using GFP_ATOMIC can
result in a kernel thread being put to sleep if swapping is needed.
For example, the Linux kernel calls the functions of a network device
interface from a bottom half context. Thus, if a demux API function
is called from network device code, the function must not sleep.
</para>
</sect1>
<section id="demux_callback_api">
<title>Demux Callback API</title>
<para>This kernel-space API comprises the callback functions that
deliver filtered data to the demux client. Unlike the other DVB
kABIs, these functions are provided by the client and called from
the demux code.</para>
<para>The function pointers of this abstract interface are not
packed into a structure as in the other demux APIs, because the
callback functions are registered and used independent of each
other. As an example, it is possible for the API client to provide
several callback functions for receiving TS packets and no
callbacks for PES packets or sections.</para>
<para>The functions that implement the callback API need not be
re-entrant: when a demux driver calls one of these functions,
the driver is not allowed to call the function again before
the original call returns. If a callback is triggered by a
hardware interrupt, it is recommended to use the Linux
&#8220;bottom half&#8221; mechanism or start a tasklet instead of
making the callback function call directly from a hardware
interrupt.</para>
<para>This mechanism is implemented by
<link linkend='API-dmx-ts-cb'>dmx_ts_cb()</link> and
<link linkend='API-dmx-section-cb'>dmx_section_cb()</link>.</para>
</section>
!Idrivers/media/dvb-core/demux.h !Idrivers/media/dvb-core/demux.h
</sect1> </sect1>
<sect1><title>Digital TV Conditional Access kABI</title>
!Idrivers/media/dvb-core/dvb_ca_en50221.h
</sect1>
</sect1>
<sect1><title>Remote Controller devices</title> <sect1><title>Remote Controller devices</title>
!Iinclude/media/rc-core.h !Iinclude/media/rc-core.h
!Iinclude/media/lirc_dev.h !Iinclude/media/lirc_dev.h
</sect1> </sect1>
<sect1><title>Media Controller devices</title> <sect1><title>Media Controller devices</title>
!Pinclude/media/media-device.h Media Controller
!Iinclude/media/media-device.h !Iinclude/media/media-device.h
!Iinclude/media/media-devnode.h !Iinclude/media/media-devnode.h
!Iinclude/media/media-entity.h !Iinclude/media/media-entity.h
......
此差异已折叠。
...@@ -458,7 +458,7 @@ ...@@ -458,7 +458,7 @@
.scan_type = { .scan_type = {
.sign = 's', .sign = 's',
.realbits = 12, .realbits = 12,
.storgebits = 16, .storagebits = 16,
.shift = 4, .shift = 4,
.endianness = IIO_LE, .endianness = IIO_LE,
}, },
......
...@@ -199,8 +199,10 @@ DVB_DOCUMENTED = \ ...@@ -199,8 +199,10 @@ DVB_DOCUMENTED = \
# #
install_media_images = \ install_media_images = \
$(Q)-mkdir $(MEDIA_OBJ_DIR)/media_api; \ $(Q)if [ "x$(findstring media_api.xml,$(DOCBOOKS))" != "x" ]; then \
cp $(OBJIMGFILES) $(MEDIA_SRC_DIR)/*.svg $(MEDIA_SRC_DIR)/v4l/*.svg $(MEDIA_OBJ_DIR)/media_api mkdir -p $(MEDIA_OBJ_DIR)/media_api; \
cp $(OBJIMGFILES) $(MEDIA_SRC_DIR)/*.svg $(MEDIA_SRC_DIR)/v4l/*.svg $(MEDIA_OBJ_DIR)/media_api; \
fi
$(MEDIA_OBJ_DIR)/%: $(MEDIA_SRC_DIR)/%.b64 $(MEDIA_OBJ_DIR)/%: $(MEDIA_SRC_DIR)/%.b64
$(Q)base64 -d $< >$@ $(Q)base64 -d $< >$@
......
...@@ -76,7 +76,7 @@ int main(void) ...@@ -76,7 +76,7 @@ int main(void)
<para>NOTE: While it is possible to directly call the Kernel code like the <para>NOTE: While it is possible to directly call the Kernel code like the
above example, it is strongly recommended to use above example, it is strongly recommended to use
<ulink url="http://linuxtv.org/docs/libdvbv5/index.html">libdvbv5</ulink>, <ulink url="https://linuxtv.org/docs/libdvbv5/index.html">libdvbv5</ulink>,
as it provides abstraction to work with the supported digital TV standards as it provides abstraction to work with the supported digital TV standards
and provides methods for usual operations like program scanning and to and provides methods for usual operations like program scanning and to
read/write channel descriptor files.</para> read/write channel descriptor files.</para>
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
</para> </para>
<para>NOTE: This section is out of date, and the code below won't even <para>NOTE: This section is out of date, and the code below won't even
compile. Please refer to the compile. Please refer to the
<ulink url="http://linuxtv.org/docs/libdvbv5/index.html">libdvbv5</ulink> <ulink url="https://linuxtv.org/docs/libdvbv5/index.html">libdvbv5</ulink>
for updated/recommended examples. for updated/recommended examples.
</para> </para>
......
...@@ -32,7 +32,7 @@ and filtering several section and PES data streams at the same time. ...@@ -32,7 +32,7 @@ and filtering several section and PES data streams at the same time.
new standard Linux DVB API. As a commitment to the development of new standard Linux DVB API. As a commitment to the development of
terminals based on open standards, Nokia and Convergence made it terminals based on open standards, Nokia and Convergence made it
available to all Linux developers and published it on available to all Linux developers and published it on
<ulink url="http://www.linuxtv.org/" /> in September 2000. <ulink url="https://linuxtv.org" /> in September 2000.
Convergence is the maintainer of the Linux DVB API. Together with the Convergence is the maintainer of the Linux DVB API. Together with the
LinuxTV community (i.e. you, the reader of this document), the Linux DVB LinuxTV community (i.e. you, the reader of this document), the Linux DVB
API will be constantly reviewed and improved. With the Linux driver for API will be constantly reviewed and improved. With the Linux driver for
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
* This program can be used and distributed without restrictions. * This program can be used and distributed without restrictions.
* *
* This program is provided with the V4L2 API * This program is provided with the V4L2 API
* see http://linuxtv.org/docs.php for more information * see https://linuxtv.org/docs.php for more information
*/ */
#include &lt;stdio.h&gt; #include &lt;stdio.h&gt;
......
...@@ -2666,7 +2666,7 @@ is useful to display images captured with V4L2 devices.</para> ...@@ -2666,7 +2666,7 @@ is useful to display images captured with V4L2 devices.</para>
<para>V4L2 does not support digital terrestrial, cable or <para>V4L2 does not support digital terrestrial, cable or
satellite broadcast. A separate project aiming at digital receivers satellite broadcast. A separate project aiming at digital receivers
exists. You can find its homepage at <ulink exists. You can find its homepage at <ulink
url="http://linuxtv.org">http://linuxtv.org</ulink>. The Linux DVB API url="https://linuxtv.org">https://linuxtv.org</ulink>. The Linux DVB API
has no connection to the V4L2 API except that drivers for hybrid has no connection to the V4L2 API except that drivers for hybrid
hardware may support both.</para> hardware may support both.</para>
</section> </section>
......
...@@ -699,7 +699,7 @@ linkend="v4l2-buf-type" /></entry> ...@@ -699,7 +699,7 @@ linkend="v4l2-buf-type" /></entry>
buffer. It depends on the negotiated data format and may change with buffer. It depends on the negotiated data format and may change with
each buffer for compressed variable size data like JPEG images. each buffer for compressed variable size data like JPEG images.
Drivers must set this field when <structfield>type</structfield> Drivers must set this field when <structfield>type</structfield>
refers to an input stream, applications when it refers to an output stream. refers to a capture stream, applications when it refers to an output stream.
If the application sets this to 0 for an output stream, then If the application sets this to 0 for an output stream, then
<structfield>bytesused</structfield> will be set to the size of the <structfield>bytesused</structfield> will be set to the size of the
buffer (see the <structfield>length</structfield> field of this struct) by buffer (see the <structfield>length</structfield> field of this struct) by
...@@ -720,14 +720,14 @@ linkend="buffer-flags" />.</entry> ...@@ -720,14 +720,14 @@ linkend="buffer-flags" />.</entry>
<entry>Indicates the field order of the image in the <entry>Indicates the field order of the image in the
buffer, see <xref linkend="v4l2-field" />. This field is not used when buffer, see <xref linkend="v4l2-field" />. This field is not used when
the buffer contains VBI data. Drivers must set it when the buffer contains VBI data. Drivers must set it when
<structfield>type</structfield> refers to an input stream, <structfield>type</structfield> refers to a capture stream,
applications when it refers to an output stream.</entry> applications when it refers to an output stream.</entry>
</row> </row>
<row> <row>
<entry>struct timeval</entry> <entry>struct timeval</entry>
<entry><structfield>timestamp</structfield></entry> <entry><structfield>timestamp</structfield></entry>
<entry></entry> <entry></entry>
<entry><para>For input streams this is time when the first data <entry><para>For capture streams this is time when the first data
byte was captured, as returned by the byte was captured, as returned by the
<function>clock_gettime()</function> function for the relevant <function>clock_gettime()</function> function for the relevant
clock id; see <constant>V4L2_BUF_FLAG_TIMESTAMP_*</constant> in clock id; see <constant>V4L2_BUF_FLAG_TIMESTAMP_*</constant> in
...@@ -866,7 +866,7 @@ must set this to 0.</entry> ...@@ -866,7 +866,7 @@ must set this to 0.</entry>
<entry></entry> <entry></entry>
<entry>The number of bytes occupied by data in the plane <entry>The number of bytes occupied by data in the plane
(its payload). Drivers must set this field when <structfield>type</structfield> (its payload). Drivers must set this field when <structfield>type</structfield>
refers to an input stream, applications when it refers to an output stream. refers to a capture stream, applications when it refers to an output stream.
If the application sets this to 0 for an output stream, then If the application sets this to 0 for an output stream, then
<structfield>bytesused</structfield> will be set to the size of the <structfield>bytesused</structfield> will be set to the size of the
plane (see the <structfield>length</structfield> field of this struct) plane (see the <structfield>length</structfield> field of this struct)
...@@ -919,7 +919,7 @@ must set this to 0.</entry> ...@@ -919,7 +919,7 @@ must set this to 0.</entry>
<entry></entry> <entry></entry>
<entry>Offset in bytes to video data in the plane. <entry>Offset in bytes to video data in the plane.
Drivers must set this field when <structfield>type</structfield> Drivers must set this field when <structfield>type</structfield>
refers to an input stream, applications when it refers to an output stream. refers to a capture stream, applications when it refers to an output stream.
Note that data_offset is included in <structfield>bytesused</structfield>. Note that data_offset is included in <structfield>bytesused</structfield>.
So the size of the image in the plane is So the size of the image in the plane is
<structfield>bytesused</structfield>-<structfield>data_offset</structfield> at <structfield>bytesused</structfield>-<structfield>data_offset</structfield> at
......
...@@ -58,21 +58,36 @@ ...@@ -58,21 +58,36 @@
<title>Media device model</title> <title>Media device model</title>
<para>Discovering a device internal topology, and configuring it at runtime, <para>Discovering a device internal topology, and configuring it at runtime,
is one of the goals of the media controller API. To achieve this, hardware is one of the goals of the media controller API. To achieve this, hardware
devices are modelled as an oriented graph of building blocks called entities devices and Linux Kernel interfaces are modelled as graph objects on
connected through pads.</para> an oriented graph. The object types that constitute the graph are:</para>
<para>An entity is a basic media hardware or software building block. It can <itemizedlist>
correspond to a large variety of logical blocks such as physical hardware <listitem><para>An <emphasis role="bold">entity</emphasis>
devices (CMOS sensor for instance), logical hardware devices (a building is a basic media hardware or software building block. It can correspond to
block in a System-on-Chip image processing pipeline), DMA channels or a large variety of logical blocks such as physical hardware devices
physical connectors.</para> (CMOS sensor for instance), logical hardware devices (a building block in
<para>A pad is a connection endpoint through which an entity can interact a System-on-Chip image processing pipeline), DMA channels or physical
with other entities. Data (not restricted to video) produced by an entity connectors.</para></listitem>
flows from the entity's output to one or more entity inputs. Pads should not <listitem><para>An <emphasis role="bold">interface</emphasis>
be confused with physical pins at chip boundaries.</para> is a graph representation of a Linux Kernel userspace API interface,
<para>A link is a point-to-point oriented connection between two pads, like a device node or a sysfs file that controls one or more entities
either on the same entity or on different entities. Data flows from a source in the graph.</para></listitem>
pad to a sink pad.</para> <listitem><para>A <emphasis role="bold">pad</emphasis>
is a data connection endpoint through which an entity can interact with
other entities. Data (not restricted to video) produced by an entity
flows from the entity's output to one or more entity inputs. Pads should
not be confused with physical pins at chip boundaries.</para></listitem>
<listitem><para>A <emphasis role="bold">data link</emphasis>
is a point-to-point oriented connection between two pads, either on the
same entity or on different entities. Data flows from a source pad to a
sink pad.</para></listitem>
<listitem><para>An <emphasis role="bold">interface link</emphasis>
is a point-to-point bidirectional control connection between a Linux
Kernel interface and an entity.m</para></listitem>
</itemizedlist>
</section> </section>
<!-- All non-ioctl specific data types go here. -->
&sub-media-types;
</chapter> </chapter>
<appendix id="media-user-func"> <appendix id="media-user-func">
...@@ -83,6 +98,7 @@ ...@@ -83,6 +98,7 @@
&sub-media-func-ioctl; &sub-media-func-ioctl;
<!-- All ioctls go here. --> <!-- All ioctls go here. -->
&sub-media-ioc-device-info; &sub-media-ioc-device-info;
&sub-media-ioc-g-topology;
&sub-media-ioc-enum-entities; &sub-media-ioc-enum-entities;
&sub-media-ioc-enum-links; &sub-media-ioc-enum-links;
&sub-media-ioc-setup-link; &sub-media-ioc-setup-link;
......
...@@ -59,15 +59,6 @@ ...@@ -59,15 +59,6 @@
<para>Entity IDs can be non-contiguous. Applications must <para>Entity IDs can be non-contiguous. Applications must
<emphasis>not</emphasis> try to enumerate entities by calling <emphasis>not</emphasis> try to enumerate entities by calling
MEDIA_IOC_ENUM_ENTITIES with increasing id's until they get an error.</para> MEDIA_IOC_ENUM_ENTITIES with increasing id's until they get an error.</para>
<para>Two or more entities that share a common non-zero
<structfield>group_id</structfield> value are considered as logically
grouped. Groups are used to report
<itemizedlist>
<listitem><para>ALSA, VBI and video nodes that carry the same media
stream</para></listitem>
<listitem><para>lens and flash controllers associated with a sensor</para></listitem>
</itemizedlist>
</para>
<table pgwide="1" frame="none" id="media-entity-desc"> <table pgwide="1" frame="none" id="media-entity-desc">
<title>struct <structname>media_entity_desc</structname></title> <title>struct <structname>media_entity_desc</structname></title>
...@@ -106,7 +97,7 @@ ...@@ -106,7 +97,7 @@
<entry><structfield>revision</structfield></entry> <entry><structfield>revision</structfield></entry>
<entry></entry> <entry></entry>
<entry></entry> <entry></entry>
<entry>Entity revision in a driver/hardware specific format.</entry> <entry>Entity revision. Always zero (obsolete)</entry>
</row> </row>
<row> <row>
<entry>__u32</entry> <entry>__u32</entry>
...@@ -120,7 +111,7 @@ ...@@ -120,7 +111,7 @@
<entry><structfield>group_id</structfield></entry> <entry><structfield>group_id</structfield></entry>
<entry></entry> <entry></entry>
<entry></entry> <entry></entry>
<entry>Entity group ID</entry> <entry>Entity group ID. Always zero (obsolete)</entry>
</row> </row>
<row> <row>
<entry>__u16</entry> <entry>__u16</entry>
...@@ -171,97 +162,6 @@ ...@@ -171,97 +162,6 @@
</tbody> </tbody>
</tgroup> </tgroup>
</table> </table>
<table frame="none" pgwide="1" id="media-entity-type">
<title>Media entity types</title>
<tgroup cols="2">
<colspec colname="c1"/>
<colspec colname="c2"/>
<tbody valign="top">
<row>
<entry><constant>MEDIA_ENT_T_DEVNODE</constant></entry>
<entry>Unknown device node</entry>
</row>
<row>
<entry><constant>MEDIA_ENT_T_DEVNODE_V4L</constant></entry>
<entry>V4L video, radio or vbi device node</entry>
</row>
<row>
<entry><constant>MEDIA_ENT_T_DEVNODE_FB</constant></entry>
<entry>Frame buffer device node</entry>
</row>
<row>
<entry><constant>MEDIA_ENT_T_DEVNODE_ALSA</constant></entry>
<entry>ALSA card</entry>
</row>
<row>
<entry><constant>MEDIA_ENT_T_DEVNODE_DVB_FE</constant></entry>
<entry>DVB frontend devnode</entry>
</row>
<row>
<entry><constant>MEDIA_ENT_T_DEVNODE_DVB_DEMUX</constant></entry>
<entry>DVB demux devnode</entry>
</row>
<row>
<entry><constant>MEDIA_ENT_T_DEVNODE_DVB_DVR</constant></entry>
<entry>DVB DVR devnode</entry>
</row>
<row>
<entry><constant>MEDIA_ENT_T_DEVNODE_DVB_CA</constant></entry>
<entry>DVB CAM devnode</entry>
</row>
<row>
<entry><constant>MEDIA_ENT_T_DEVNODE_DVB_NET</constant></entry>
<entry>DVB network devnode</entry>
</row>
<row>
<entry><constant>MEDIA_ENT_T_V4L2_SUBDEV</constant></entry>
<entry>Unknown V4L sub-device</entry>
</row>
<row>
<entry><constant>MEDIA_ENT_T_V4L2_SUBDEV_SENSOR</constant></entry>
<entry>Video sensor</entry>
</row>
<row>
<entry><constant>MEDIA_ENT_T_V4L2_SUBDEV_FLASH</constant></entry>
<entry>Flash controller</entry>
</row>
<row>
<entry><constant>MEDIA_ENT_T_V4L2_SUBDEV_LENS</constant></entry>
<entry>Lens controller</entry>
</row>
<row>
<entry><constant>MEDIA_ENT_T_V4L2_SUBDEV_DECODER</constant></entry>
<entry>Video decoder, the basic function of the video decoder is to
accept analogue video from a wide variety of sources such as
broadcast, DVD players, cameras and video cassette recorders, in
either NTSC, PAL or HD format and still occasionally SECAM, separate
it into its component parts, luminance and chrominance, and output
it in some digital video standard, with appropriate embedded timing
signals.</entry>
</row>
<row>
<entry><constant>MEDIA_ENT_T_V4L2_SUBDEV_TUNER</constant></entry>
<entry>TV and/or radio tuner</entry>
</row>
</tbody>
</tgroup>
</table>
<table frame="none" pgwide="1" id="media-entity-flag">
<title>Media entity flags</title>
<tgroup cols="2">
<colspec colname="c1"/>
<colspec colname="c2"/>
<tbody valign="top">
<row>
<entry><constant>MEDIA_ENT_FL_DEFAULT</constant></entry>
<entry>Default entity for its type. Used to discover the default
audio, VBI and video devices, the default camera sensor, ...</entry>
</row>
</tbody>
</tgroup>
</table>
</refsect1> </refsect1>
<refsect1> <refsect1>
......
...@@ -118,35 +118,6 @@ ...@@ -118,35 +118,6 @@
</tgroup> </tgroup>
</table> </table>
<table frame="none" pgwide="1" id="media-pad-flag">
<title>Media pad flags</title>
<tgroup cols="2">
<colspec colname="c1"/>
<colspec colname="c2"/>
<tbody valign="top">
<row>
<entry><constant>MEDIA_PAD_FL_SINK</constant></entry>
<entry>Input pad, relative to the entity. Input pads sink data and
are targets of links.</entry>
</row>
<row>
<entry><constant>MEDIA_PAD_FL_SOURCE</constant></entry>
<entry>Output pad, relative to the entity. Output pads source data
and are origins of links.</entry>
</row>
<row>
<entry><constant>MEDIA_PAD_FL_MUST_CONNECT</constant></entry>
<entry>If this flag is set and the pad is linked to any other
pad, then at least one of those links must be enabled for the
entity to be able to stream. There could be temporary reasons
(e.g. device configuration dependent) for the pad to need
enabled links even when this flag isn't set; the absence of the
flag doesn't imply there is none.</entry>
</row>
</tbody>
</tgroup>
</table>
<table pgwide="1" frame="none" id="media-link-desc"> <table pgwide="1" frame="none" id="media-link-desc">
<title>struct <structname>media_link_desc</structname></title> <title>struct <structname>media_link_desc</structname></title>
<tgroup cols="3"> <tgroup cols="3">
...@@ -171,33 +142,6 @@ ...@@ -171,33 +142,6 @@
</tgroup> </tgroup>
</table> </table>
<table frame="none" pgwide="1" id="media-link-flag">
<title>Media link flags</title>
<tgroup cols="2">
<colspec colname="c1"/>
<colspec colname="c2"/>
<tbody valign="top">
<row>
<entry><constant>MEDIA_LNK_FL_ENABLED</constant></entry>
<entry>The link is enabled and can be used to transfer media data.
When two or more links target a sink pad, only one of them can be
enabled at a time.</entry>
</row>
<row>
<entry><constant>MEDIA_LNK_FL_IMMUTABLE</constant></entry>
<entry>The link enabled state can't be modified at runtime. An
immutable link is always enabled.</entry>
</row>
<row>
<entry><constant>MEDIA_LNK_FL_DYNAMIC</constant></entry>
<entry>The link enabled state can be modified during streaming. This
flag is set by drivers and is read-only for applications.</entry>
</row>
</tbody>
</tgroup>
</table>
<para>One and only one of <constant>MEDIA_PAD_FL_SINK</constant> and
<constant>MEDIA_PAD_FL_SOURCE</constant> must be set for every pad.</para>
</refsect1> </refsect1>
<refsect1> <refsect1>
......
<refentry id="media-g-topology">
<refmeta>
<refentrytitle>ioctl MEDIA_IOC_G_TOPOLOGY</refentrytitle>
&manvol;
</refmeta>
<refnamediv>
<refname>MEDIA_IOC_G_TOPOLOGY</refname>
<refpurpose>Enumerate the graph topology and graph element properties</refpurpose>
</refnamediv>
<refsynopsisdiv>
<funcsynopsis>
<funcprototype>
<funcdef>int <function>ioctl</function></funcdef>
<paramdef>int <parameter>fd</parameter></paramdef>
<paramdef>int <parameter>request</parameter></paramdef>
<paramdef>struct media_v2_topology *<parameter>argp</parameter></paramdef>
</funcprototype>
</funcsynopsis>
</refsynopsisdiv>
<refsect1>
<title>Arguments</title>
<variablelist>
<varlistentry>
<term><parameter>fd</parameter></term>
<listitem>
<para>File descriptor returned by
<link linkend='media-func-open'><function>open()</function></link>.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>request</parameter></term>
<listitem>
<para>MEDIA_IOC_G_TOPOLOGY</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>argp</parameter></term>
<listitem>
<para></para>
</listitem>
</varlistentry>
</variablelist>
</refsect1>
<refsect1>
<title>Description</title>
<para><emphasis role="bold">NOTE:</emphasis> This new ioctl is programmed to be added on Kernel 4.6. Its definition/arguments may change until its final version.</para>
<para>The typical usage of this ioctl is to call it twice.
On the first call, the structure defined at &media-v2-topology; should
be zeroed. At return, if no errors happen, this ioctl will return the
<constant>topology_version</constant> and the total number of entities,
interfaces, pads and links.</para>
<para>Before the second call, the userspace should allocate arrays to
store the graph elements that are desired, putting the pointers to them
at the ptr_entities, ptr_interfaces, ptr_links and/or ptr_pads, keeping
the other values untouched.</para>
<para>If the <constant>topology_version</constant> remains the same, the
ioctl should fill the desired arrays with the media graph elements.</para>
<table pgwide="1" frame="none" id="media-v2-topology">
<title>struct <structname>media_v2_topology</structname></title>
<tgroup cols="5">
<colspec colname="c1" />
<colspec colname="c2" />
<colspec colname="c3" />
<colspec colname="c4" />
<colspec colname="c5" />
<tbody valign="top">
<row>
<entry>__u64</entry>
<entry><structfield>topology_version</structfield></entry>
<entry></entry>
<entry></entry>
<entry>Version of the media graph topology. When the graph is
created, this field starts with zero. Every time a graph
element is added or removed, this field is
incremented.</entry>
</row>
<row>
<entry>__u64</entry>
<entry><structfield>num_entities</structfield></entry>
<entry></entry>
<entry></entry>
<entry>Number of entities in the graph</entry>
</row>
<row>
<entry>__u64</entry>
<entry><structfield>ptr_entities</structfield></entry>
<entry></entry>
<entry></entry>
<entry>A pointer to a memory area where the entities array
will be stored, converted to a 64-bits integer.
It can be zero. if zero, the ioctl won't store the
entities. It will just update
<constant>num_entities</constant></entry>
</row>
<row>
<entry>__u64</entry>
<entry><structfield>num_interfaces</structfield></entry>
<entry></entry>
<entry></entry>
<entry>Number of interfaces in the graph</entry>
</row>
<row>
<entry>__u64</entry>
<entry><structfield>ptr_interfaces</structfield></entry>
<entry></entry>
<entry></entry>
<entry>A pointer to a memory area where the interfaces array
will be stored, converted to a 64-bits integer.
It can be zero. if zero, the ioctl won't store the
interfaces. It will just update
<constant>num_interfaces</constant></entry>
</row>
<row>
<entry>__u64</entry>
<entry><structfield>num_pads</structfield></entry>
<entry></entry>
<entry></entry>
<entry>Total number of pads in the graph</entry>
</row>
<row>
<entry>__u64</entry>
<entry><structfield>ptr_pads</structfield></entry>
<entry></entry>
<entry></entry>
<entry>A pointer to a memory area where the pads array
will be stored, converted to a 64-bits integer.
It can be zero. if zero, the ioctl won't store the
pads. It will just update
<constant>num_pads</constant></entry>
</row>
<row>
<entry>__u64</entry>
<entry><structfield>num_links</structfield></entry>
<entry></entry>
<entry></entry>
<entry>Total number of data and interface links in the graph</entry>
</row>
<row>
<entry>__u64</entry>
<entry><structfield>ptr_links</structfield></entry>
<entry></entry>
<entry></entry>
<entry>A pointer to a memory area where the links array
will be stored, converted to a 64-bits integer.
It can be zero. if zero, the ioctl won't store the
links. It will just update
<constant>num_links</constant></entry>
</row>
</tbody>
</tgroup>
</table>
<table pgwide="1" frame="none" id="media-v2-entity">
<title>struct <structname>media_v2_entity</structname></title>
<tgroup cols="5">
<colspec colname="c1" />
<colspec colname="c2" />
<colspec colname="c3" />
<colspec colname="c4" />
<colspec colname="c5" />
<tbody valign="top">
<row>
<entry>__u32</entry>
<entry><structfield>id</structfield></entry>
<entry></entry>
<entry></entry>
<entry>Unique ID for the entity.</entry>
</row>
<row>
<entry>char</entry>
<entry><structfield>name</structfield>[64]</entry>
<entry></entry>
<entry></entry>
<entry>Entity name as an UTF-8 NULL-terminated string.</entry>
</row>
<row>
<entry>__u32</entry>
<entry><structfield>function</structfield></entry>
<entry></entry>
<entry></entry>
<entry>Entity main function, see <xref linkend="media-entity-type" /> for details.</entry>
</row>
<row>
<entry>__u32</entry>
<entry><structfield>reserved</structfield>[12]</entry>
<entry>Reserved for future extensions. Drivers and applications must
set this array to zero.</entry>
</row>
</tbody>
</tgroup>
</table>
<table pgwide="1" frame="none" id="media-v2-interface">
<title>struct <structname>media_v2_interface</structname></title>
<tgroup cols="5">
<colspec colname="c1" />
<colspec colname="c2" />
<colspec colname="c3" />
<colspec colname="c4" />
<colspec colname="c5" />
<tbody valign="top">
<row>
<entry>__u32</entry>
<entry><structfield>id</structfield></entry>
<entry></entry>
<entry></entry>
<entry>Unique ID for the interface.</entry>
</row>
<row>
<entry>__u32</entry>
<entry><structfield>intf_type</structfield></entry>
<entry></entry>
<entry></entry>
<entry>Interface type, see <xref linkend="media-intf-type" /> for details.</entry>
</row>
<row>
<entry>__u32</entry>
<entry><structfield>flags</structfield></entry>
<entry></entry>
<entry></entry>
<entry>Interface flags. Currently unused.</entry>
</row>
<row>
<entry>__u32</entry>
<entry><structfield>reserved</structfield>[9]</entry>
<entry></entry>
<entry></entry>
<entry>Reserved for future extensions. Drivers and applications must
set this array to zero.</entry>
</row>
<row>
<entry>struct media_v2_intf_devnode</entry>
<entry><structfield>devnode</structfield></entry>
<entry></entry>
<entry></entry>
<entry>Used only for device node interfaces. See <xref linkend="media-v2-intf-devnode" /> for details..</entry>
</row>
</tbody>
</tgroup>
</table>
<table pgwide="1" frame="none" id="media-v2-intf-devnode">
<title>struct <structname>media_v2_interface</structname></title>
<tgroup cols="5">
<colspec colname="c1" />
<colspec colname="c2" />
<colspec colname="c3" />
<colspec colname="c4" />
<colspec colname="c5" />
<tbody valign="top">
<row>
<entry>__u32</entry>
<entry><structfield>major</structfield></entry>
<entry></entry>
<entry></entry>
<entry>Device node major number.</entry>
</row>
<row>
<entry>__u32</entry>
<entry><structfield>minor</structfield></entry>
<entry></entry>
<entry></entry>
<entry>Device node minor number.</entry>
</row>
</tbody>
</tgroup>
</table>
<table pgwide="1" frame="none" id="media-v2-pad">
<title>struct <structname>media_v2_pad</structname></title>
<tgroup cols="5">
<colspec colname="c1" />
<colspec colname="c2" />
<colspec colname="c3" />
<colspec colname="c4" />
<colspec colname="c5" />
<tbody valign="top">
<row>
<entry>__u32</entry>
<entry><structfield>id</structfield></entry>
<entry></entry>
<entry></entry>
<entry>Unique ID for the pad.</entry>
</row>
<row>
<entry>__u32</entry>
<entry><structfield>entity_id</structfield></entry>
<entry></entry>
<entry></entry>
<entry>Unique ID for the entity where this pad belongs.</entry>
</row>
<row>
<entry>__u32</entry>
<entry><structfield>flags</structfield></entry>
<entry></entry>
<entry></entry>
<entry>Pad flags, see <xref linkend="media-pad-flag" /> for more details.</entry>
</row>
<row>
<entry>__u32</entry>
<entry><structfield>reserved</structfield>[9]</entry>
<entry></entry>
<entry></entry>
<entry>Reserved for future extensions. Drivers and applications must
set this array to zero.</entry>
</row>
</tbody>
</tgroup>
</table>
<table pgwide="1" frame="none" id="media-v2-link">
<title>struct <structname>media_v2_pad</structname></title>
<tgroup cols="5">
<colspec colname="c1" />
<colspec colname="c2" />
<colspec colname="c3" />
<colspec colname="c4" />
<colspec colname="c5" />
<tbody valign="top">
<row>
<entry>__u32</entry>
<entry><structfield>id</structfield></entry>
<entry></entry>
<entry></entry>
<entry>Unique ID for the pad.</entry>
</row>
<row>
<entry>__u32</entry>
<entry><structfield>source_id</structfield></entry>
<entry></entry>
<entry></entry>
<entry>
<para>On pad to pad links: unique ID for the source pad.</para>
<para>On interface to entity links: unique ID for the interface.</para>
</entry>
</row>
<row>
<entry>__u32</entry>
<entry><structfield>sink_id</structfield></entry>
<entry></entry>
<entry></entry>
<entry>
<para>On pad to pad links: unique ID for the sink pad.</para>
<para>On interface to entity links: unique ID for the entity.</para>
</entry>
</row>
<row>
<entry>__u32</entry>
<entry><structfield>flags</structfield></entry>
<entry></entry>
<entry></entry>
<entry>Link flags, see <xref linkend="media-link-flag" /> for more details.</entry>
</row>
<row>
<entry>__u32</entry>
<entry><structfield>reserved</structfield>[5]</entry>
<entry></entry>
<entry></entry>
<entry>Reserved for future extensions. Drivers and applications must
set this array to zero.</entry>
</row>
</tbody>
</tgroup>
</table>
</refsect1>
<refsect1>
&return-value;
<variablelist>
<varlistentry>
<term><errorcode>ENOSPC</errorcode></term>
<listitem>
<para>This is returned when either one or more of the num_entities,
num_interfaces, num_links or num_pads are non-zero and are smaller
than the actual number of elements inside the graph. This may happen
if the <constant>topology_version</constant> changed when compared
to the last time this ioctl was called. Userspace should usually
free the area for the pointers, zero the struct elements and call
this ioctl again.</para>
</listitem>
</varlistentry>
</variablelist>
</refsect1>
</refentry>
<section id="media-controller-types">
<title>Types and flags used to represent the media graph elements</title>
<table frame="none" pgwide="1" id="media-entity-type">
<title>Media entity types</title>
<tgroup cols="2">
<colspec colname="c1"/>
<colspec colname="c2"/>
<tbody valign="top">
<row>
<entry><constant>MEDIA_ENT_F_UNKNOWN</constant> and <constant>MEDIA_ENT_F_V4L2_SUBDEV_UNKNOWN</constant></entry>
<entry>Unknown entity. That generally indicates that
a driver didn't initialize properly the entity, with is a Kernel bug</entry>
</row>
<row>
<entry><constant>MEDIA_ENT_F_IO_V4L</constant></entry>
<entry>Data streaming input and/or output entity.</entry>
</row>
<row>
<entry><constant>MEDIA_ENT_F_IO_VBI</constant></entry>
<entry>V4L VBI streaming input or output entity</entry>
</row>
<row>
<entry><constant>MEDIA_ENT_F_IO_SWRADIO</constant></entry>
<entry>V4L Software Digital Radio (SDR) streaming input or output entity</entry>
</row>
<row>
<entry><constant>MEDIA_ENT_F_IO_DTV</constant></entry>
<entry>DVB Digital TV streaming input or output entity</entry>
</row>
<row>
<entry><constant>MEDIA_ENT_F_DTV_DEMOD</constant></entry>
<entry>Digital TV demodulator entity.</entry>
</row>
<row>
<entry><constant>MEDIA_ENT_F_TS_DEMUX</constant></entry>
<entry>MPEG Transport stream demux entity. Could be implemented on hardware or in Kernelspace by the Linux DVB subsystem.</entry>
</row>
<row>
<entry><constant>MEDIA_ENT_F_DTV_CA</constant></entry>
<entry>Digital TV Conditional Access module (CAM) entity</entry>
</row>
<row>
<entry><constant>MEDIA_ENT_F_DTV_NET_DECAP</constant></entry>
<entry>Digital TV network ULE/MLE desencapsulation entity. Could be implemented on hardware or in Kernelspace</entry>
</row>
<row>
<entry><constant>MEDIA_ENT_F_CONN_RF</constant></entry>
<entry>Connector for a Radio Frequency (RF) signal.</entry>
</row>
<row>
<entry><constant>MEDIA_ENT_F_CONN_SVIDEO</constant></entry>
<entry>Connector for a S-Video signal.</entry>
</row>
<row>
<entry><constant>MEDIA_ENT_F_CONN_COMPOSITE</constant></entry>
<entry>Connector for a RGB composite signal.</entry>
</row>
<row>
<entry><constant>MEDIA_ENT_F_CONN_TEST</constant></entry>
<entry>Connector for a test generator.</entry>
</row>
<row>
<entry><constant>MEDIA_ENT_F_CAM_SENSOR</constant></entry>
<entry>Camera video sensor entity.</entry>
</row>
<row>
<entry><constant>MEDIA_ENT_F_FLASH</constant></entry>
<entry>Flash controller entity.</entry>
</row>
<row>
<entry><constant>MEDIA_ENT_F_LENS</constant></entry>
<entry>Lens controller entity.</entry>
</row>
<row>
<entry><constant>MEDIA_ENT_F_ATV_DECODER</constant></entry>
<entry>Analog video decoder, the basic function of the video decoder
is to accept analogue video from a wide variety of sources such as
broadcast, DVD players, cameras and video cassette recorders, in
either NTSC, PAL, SECAM or HD format, separating the stream
into its component parts, luminance and chrominance, and output
it in some digital video standard, with appropriate timing
signals.</entry>
</row>
<row>
<entry><constant>MEDIA_ENT_F_TUNER</constant></entry>
<entry>Digital TV, analog TV, radio and/or software radio tuner.</entry>
</row>
</tbody>
</tgroup>
</table>
<table frame="none" pgwide="1" id="media-entity-flag">
<title>Media entity flags</title>
<tgroup cols="2">
<colspec colname="c1"/>
<colspec colname="c2"/>
<tbody valign="top">
<row>
<entry><constant>MEDIA_ENT_FL_DEFAULT</constant></entry>
<entry>Default entity for its type. Used to discover the default
audio, VBI and video devices, the default camera sensor, ...</entry>
</row>
<row>
<entry><constant>MEDIA_ENT_FL_CONNECTOR</constant></entry>
<entry>The entity represents a data conector</entry>
</row>
</tbody>
</tgroup>
</table>
<table frame="none" pgwide="1" id="media-intf-type">
<title>Media interface types</title>
<tgroup cols="3">
<colspec colname="c1"/>
<colspec colname="c2"/>
<colspec colname="c3"/>
<tbody valign="top">
<row>
<entry><constant>MEDIA_INTF_T_DVB_FE</constant></entry>
<entry>Device node interface for the Digital TV frontend</entry>
<entry>typically, /dev/dvb/adapter?/frontend?</entry>
</row>
<row>
<entry><constant>MEDIA_INTF_T_DVB_DEMUX</constant></entry>
<entry>Device node interface for the Digital TV demux</entry>
<entry>typically, /dev/dvb/adapter?/demux?</entry>
</row>
<row>
<entry><constant>MEDIA_INTF_T_DVB_DVR</constant></entry>
<entry>Device node interface for the Digital TV DVR</entry>
<entry>typically, /dev/dvb/adapter?/dvr?</entry>
</row>
<row>
<entry><constant>MEDIA_INTF_T_DVB_CA</constant></entry>
<entry>Device node interface for the Digital TV Conditional Access</entry>
<entry>typically, /dev/dvb/adapter?/ca?</entry>
</row>
<row>
<entry><constant>MEDIA_INTF_T_DVB_FE</constant></entry>
<entry>Device node interface for the Digital TV network control</entry>
<entry>typically, /dev/dvb/adapter?/net?</entry>
</row>
<row>
<entry><constant>MEDIA_INTF_T_V4L_VIDEO</constant></entry>
<entry>Device node interface for video (V4L)</entry>
<entry>typically, /dev/video?</entry>
</row>
<row>
<entry><constant>MEDIA_INTF_T_V4L_VBI</constant></entry>
<entry>Device node interface for VBI (V4L)</entry>
<entry>typically, /dev/vbi?</entry>
</row>
<row>
<entry><constant>MEDIA_INTF_T_V4L_RADIO</constant></entry>
<entry>Device node interface for radio (V4L)</entry>
<entry>typically, /dev/vbi?</entry>
</row>
<row>
<entry><constant>MEDIA_INTF_T_V4L_SUBDEV</constant></entry>
<entry>Device node interface for a V4L subdevice</entry>
<entry>typically, /dev/v4l-subdev?</entry>
</row>
<row>
<entry><constant>MEDIA_INTF_T_V4L_SWRADIO</constant></entry>
<entry>Device node interface for Software Defined Radio (V4L)</entry>
<entry>typically, /dev/swradio?</entry>
</row>
</tbody>
</tgroup>
</table>
<table frame="none" pgwide="1" id="media-pad-flag">
<title>Media pad flags</title>
<tgroup cols="2">
<colspec colname="c1"/>
<colspec colname="c2"/>
<tbody valign="top">
<row>
<entry><constant>MEDIA_PAD_FL_SINK</constant></entry>
<entry>Input pad, relative to the entity. Input pads sink data and
are targets of links.</entry>
</row>
<row>
<entry><constant>MEDIA_PAD_FL_SOURCE</constant></entry>
<entry>Output pad, relative to the entity. Output pads source data
and are origins of links.</entry>
</row>
<row>
<entry><constant>MEDIA_PAD_FL_MUST_CONNECT</constant></entry>
<entry>If this flag is set and the pad is linked to any other
pad, then at least one of those links must be enabled for the
entity to be able to stream. There could be temporary reasons
(e.g. device configuration dependent) for the pad to need
enabled links even when this flag isn't set; the absence of the
flag doesn't imply there is none.</entry>
</row>
</tbody>
</tgroup>
</table>
<para>One and only one of <constant>MEDIA_PAD_FL_SINK</constant> and
<constant>MEDIA_PAD_FL_SOURCE</constant> must be set for every pad.</para>
<table frame="none" pgwide="1" id="media-link-flag">
<title>Media link flags</title>
<tgroup cols="2">
<colspec colname="c1"/>
<colspec colname="c2"/>
<tbody valign="top">
<row>
<entry><constant>MEDIA_LNK_FL_ENABLED</constant></entry>
<entry>The link is enabled and can be used to transfer media data.
When two or more links target a sink pad, only one of them can be
enabled at a time.</entry>
</row>
<row>
<entry><constant>MEDIA_LNK_FL_IMMUTABLE</constant></entry>
<entry>The link enabled state can't be modified at runtime. An
immutable link is always enabled.</entry>
</row>
<row>
<entry><constant>MEDIA_LNK_FL_DYNAMIC</constant></entry>
<entry>The link enabled state can be modified during streaming. This
flag is set by drivers and is read-only for applications.</entry>
</row>
<row>
<entry><constant>MEDIA_LNK_FL_LINK_TYPE</constant></entry>
<entry><para>This is a bitmask that defines the type of the link.
Currently, two types of links are supported:</para>
<para><constant>MEDIA_LNK_FL_DATA_LINK</constant>
if the link is between two pads</para>
<para><constant>MEDIA_LNK_FL_INTERFACE_LINK</constant>
if the link is between an interface and an entity</para></entry>
</row>
</tbody>
</tgroup>
</table>
</section>
...@@ -151,6 +151,16 @@ Rubli, Andy Walls, Muralidharan Karicheri, Mauro Carvalho Chehab, ...@@ -151,6 +151,16 @@ Rubli, Andy Walls, Muralidharan Karicheri, Mauro Carvalho Chehab,
structs, ioctls) must be noted in more detail in the history chapter structs, ioctls) must be noted in more detail in the history chapter
(compat.xml), along with the possible impact on existing drivers and (compat.xml), along with the possible impact on existing drivers and
applications. --> applications. -->
<revision>
<revnumber>4.5</revnumber>
<date>2015-10-29</date>
<authorinitials>rr</authorinitials>
<revremark>Extend vidioc-g-ext-ctrls;. Replace ctrl_class with a new
union with ctrl_class and which. Which is used to select the current value of
the control or the default value.
</revremark>
</revision>
<revision> <revision>
<revnumber>4.4</revnumber> <revnumber>4.4</revnumber>
<date>2015-05-26</date> <date>2015-05-26</date>
......
...@@ -58,7 +58,7 @@ ...@@ -58,7 +58,7 @@
<para>This ioctl is used to create buffers for <link linkend="mmap">memory <para>This ioctl is used to create buffers for <link linkend="mmap">memory
mapped</link> or <link linkend="userp">user pointer</link> or <link mapped</link> or <link linkend="userp">user pointer</link> or <link
linkend="dmabuf">DMA buffer</link> I/O. It can be used as an alternative or in linkend="dmabuf">DMA buffer</link> I/O. It can be used as an alternative or in
addition to the <constant>VIDIOC_REQBUFS</constant> ioctl, when a tighter addition to the &VIDIOC-REQBUFS; ioctl, when a tighter
control over buffers is required. This ioctl can be called multiple times to control over buffers is required. This ioctl can be called multiple times to
create buffers of different sizes.</para> create buffers of different sizes.</para>
...@@ -71,30 +71,28 @@ zeroed.</para> ...@@ -71,30 +71,28 @@ zeroed.</para>
<para>The <structfield>format</structfield> field specifies the image format <para>The <structfield>format</structfield> field specifies the image format
that the buffers must be able to handle. The application has to fill in this that the buffers must be able to handle. The application has to fill in this
&v4l2-format;. Usually this will be done using the &v4l2-format;. Usually this will be done using the &VIDIOC-TRY-FMT; or &VIDIOC-G-FMT; ioctls
<constant>VIDIOC_TRY_FMT</constant> or <constant>VIDIOC_G_FMT</constant> ioctl() to ensure that the requested format is supported by the driver.
to ensure that the requested format is supported by the driver. Unsupported Based on the format's <structfield>type</structfield> field the requested buffer
formats will result in an error.</para> size (for single-planar) or plane sizes (for multi-planar formats) will be
used for the allocated buffers. The driver may return an error if the size(s)
are not supported by the hardware (usually because they are too small).</para>
<para>The buffers created by this ioctl will have as minimum size the size <para>The buffers created by this ioctl will have as minimum size the size
defined by the <structfield>format.pix.sizeimage</structfield> field. If the defined by the <structfield>format.pix.sizeimage</structfield> field (or the
corresponding fields for other format types). Usually if the
<structfield>format.pix.sizeimage</structfield> field is less than the minimum <structfield>format.pix.sizeimage</structfield> field is less than the minimum
required for the given format, then <structfield>sizeimage</structfield> will be required for the given format, then an error will be returned since drivers will
increased by the driver to that minimum to allocate the buffers. If it is typically not allow this. If it is larger, then the value will be used as-is.
larger, then the value will be used as-is. The same applies to the In other words, the driver may reject the requested size, but if it is accepted
<structfield>sizeimage</structfield> field of the the driver will use it unchanged.</para>
<structname>v4l2_plane_pix_format</structname> structure in the case of
multiplanar formats.</para>
<para>When the ioctl is called with a pointer to this structure the driver <para>When the ioctl is called with a pointer to this structure the driver
will attempt to allocate up to the requested number of buffers and store the will attempt to allocate up to the requested number of buffers and store the
actual number allocated and the starting index in the actual number allocated and the starting index in the
<structfield>count</structfield> and the <structfield>index</structfield> fields <structfield>count</structfield> and the <structfield>index</structfield> fields
respectively. On return <structfield>count</structfield> can be smaller than respectively. On return <structfield>count</structfield> can be smaller than
the number requested. The driver may also increase buffer sizes if required, the number requested.</para>
however, it will not update <structfield>sizeimage</structfield> field values.
The user has to use <constant>VIDIOC_QUERYBUF</constant> to retrieve that
information.</para>
<table pgwide="1" frame="none" id="v4l2-create-buffers"> <table pgwide="1" frame="none" id="v4l2-create-buffers">
<title>struct <structname>v4l2_create_buffers</structname></title> <title>struct <structname>v4l2_create_buffers</structname></title>
......
...@@ -99,7 +99,7 @@ if the driver supports writing registers to the device.</para> ...@@ -99,7 +99,7 @@ if the driver supports writing registers to the device.</para>
<para>We recommended the <application>v4l2-dbg</application> <para>We recommended the <application>v4l2-dbg</application>
utility over calling this ioctl directly. It is available from the utility over calling this ioctl directly. It is available from the
LinuxTV v4l-dvb repository; see <ulink LinuxTV v4l-dvb repository; see <ulink
url="http://linuxtv.org/repo/">http://linuxtv.org/repo/</ulink> for url="https://linuxtv.org/repo/">https://linuxtv.org/repo/</ulink> for
access instructions.</para> access instructions.</para>
<!-- Note for convenience vidioc-dbg-g-register.sgml <!-- Note for convenience vidioc-dbg-g-register.sgml
......
...@@ -117,7 +117,7 @@ However when a driver supports these ioctls it must also support ...@@ -117,7 +117,7 @@ However when a driver supports these ioctls it must also support
<para>We recommended the <application>v4l2-dbg</application> <para>We recommended the <application>v4l2-dbg</application>
utility over calling these ioctls directly. It is available from the utility over calling these ioctls directly. It is available from the
LinuxTV v4l-dvb repository; see <ulink LinuxTV v4l-dvb repository; see <ulink
url="http://linuxtv.org/repo/">http://linuxtv.org/repo/</ulink> for url="https://linuxtv.org/repo/">https://linuxtv.org/repo/</ulink> for
access instructions.</para> access instructions.</para>
<!-- Note for convenience vidioc-dbg-g-chip-info.sgml <!-- Note for convenience vidioc-dbg-g-chip-info.sgml
......
...@@ -198,7 +198,7 @@ video4linux-list@redhat.com on 17 Oct 2002 ...@@ -198,7 +198,7 @@ video4linux-list@redhat.com on 17 Oct 2002
<constant>V4L2_STD_ATSC_16_VSB</constant> are U.S. terrestrial digital <constant>V4L2_STD_ATSC_16_VSB</constant> are U.S. terrestrial digital
TV standards. Presently the V4L2 API does not support digital TV. See TV standards. Presently the V4L2 API does not support digital TV. See
also the Linux DVB API at <ulink also the Linux DVB API at <ulink
url="http://linuxtv.org">http://linuxtv.org</ulink>.</para> url="https://linuxtv.org">https://linuxtv.org</ulink>.</para>
<para><programlisting> <para><programlisting>
#define V4L2_STD_PAL_BG (V4L2_STD_PAL_B |\ #define V4L2_STD_PAL_BG (V4L2_STD_PAL_B |\
V4L2_STD_PAL_B1 |\ V4L2_STD_PAL_B1 |\
......
...@@ -61,7 +61,7 @@ must belong to the same control class.</para> ...@@ -61,7 +61,7 @@ must belong to the same control class.</para>
<para>Applications must always fill in the <para>Applications must always fill in the
<structfield>count</structfield>, <structfield>count</structfield>,
<structfield>ctrl_class</structfield>, <structfield>which</structfield>,
<structfield>controls</structfield> and <structfield>controls</structfield> and
<structfield>reserved</structfield> fields of &v4l2-ext-controls;, and <structfield>reserved</structfield> fields of &v4l2-ext-controls;, and
initialize the &v4l2-ext-control; array pointed to by the initialize the &v4l2-ext-control; array pointed to by the
...@@ -109,7 +109,7 @@ the driver whether wrong values are automatically adjusted to a valid ...@@ -109,7 +109,7 @@ the driver whether wrong values are automatically adjusted to a valid
value or if an error is returned.</para> value or if an error is returned.</para>
<para>When the <structfield>id</structfield> or <para>When the <structfield>id</structfield> or
<structfield>ctrl_class</structfield> is invalid drivers return an <structfield>which</structfield> is invalid drivers return an
&EINVAL;. When the value is out of bounds drivers can choose to take &EINVAL;. When the value is out of bounds drivers can choose to take
the closest valid value or return an &ERANGE;, whatever seems more the closest valid value or return an &ERANGE;, whatever seems more
appropriate. In the first case the new value is set in appropriate. In the first case the new value is set in
...@@ -223,7 +223,12 @@ Valid if <constant>V4L2_CTRL_FLAG_HAS_PAYLOAD</constant> is set for this control ...@@ -223,7 +223,12 @@ Valid if <constant>V4L2_CTRL_FLAG_HAS_PAYLOAD</constant> is set for this control
<tgroup cols="3"> <tgroup cols="3">
&cs-str; &cs-str;
<tbody valign="top"> <tbody valign="top">
<row>
<entry>union</entry>
<entry>(anonymous)</entry>
</row>
<row> <row>
<entry></entry>
<entry>__u32</entry> <entry>__u32</entry>
<entry><structfield>ctrl_class</structfield></entry> <entry><structfield>ctrl_class</structfield></entry>
<entry>The control class to which all controls belong, see <entry>The control class to which all controls belong, see
...@@ -233,6 +238,23 @@ belong to any control class. Whether drivers support this can be tested by setti ...@@ -233,6 +238,23 @@ belong to any control class. Whether drivers support this can be tested by setti
<structfield>ctrl_class</structfield> to 0 and calling <constant>VIDIOC_TRY_EXT_CTRLS</constant> <structfield>ctrl_class</structfield> to 0 and calling <constant>VIDIOC_TRY_EXT_CTRLS</constant>
with a <structfield>count</structfield> of 0. If that succeeds, then the driver with a <structfield>count</structfield> of 0. If that succeeds, then the driver
supports this feature.</entry> supports this feature.</entry>
</row>
<row>
<entry></entry>
<entry>__u32</entry>
<entry><structfield>which</structfield></entry>
<entry><para>Which value of the control to get/set/try. <constant>V4L2_CTRL_WHICH_CUR_VAL</constant>
will return the current value of the control and <constant>V4L2_CTRL_WHICH_DEF_VAL</constant> will
return the default value of the control. Please note that you can only get the default value of the
control, you cannot set or try it.</para>
<para>For backwards compatibility you can also use a control class here (see
<xref linkend="ctrl-class" />). In that case all controls have to belong to that
control class. This usage is deprecated, instead just use <constant>V4L2_CTRL_WHICH_CUR_VAL</constant>.
There are some very old drivers that do not yet support <constant>V4L2_CTRL_WHICH_CUR_VAL</constant>
and that require a control class here. You can test for such drivers by setting ctrl_class to
<constant>V4L2_CTRL_WHICH_CUR_VAL</constant> and calling VIDIOC_TRY_EXT_CTRLS with a count of 0.
If that fails, then the driver does not support <constant>V4L2_CTRL_WHICH_CUR_VAL</constant>.</para>
</entry>
</row> </row>
<row> <row>
<entry>__u32</entry> <entry>__u32</entry>
...@@ -390,7 +412,7 @@ These controls are described in <xref linkend="rf-tuner-controls" />.</entry> ...@@ -390,7 +412,7 @@ These controls are described in <xref linkend="rf-tuner-controls" />.</entry>
<listitem> <listitem>
<para>The &v4l2-ext-control; <structfield>id</structfield> <para>The &v4l2-ext-control; <structfield>id</structfield>
is invalid, the &v4l2-ext-controls; is invalid, the &v4l2-ext-controls;
<structfield>ctrl_class</structfield> is invalid, or the &v4l2-ext-control; <structfield>which</structfield> is invalid, or the &v4l2-ext-control;
<structfield>value</structfield> was inappropriate (e.g. the given menu <structfield>value</structfield> was inappropriate (e.g. the given menu
index is not supported by the driver). This error code is index is not supported by the driver). This error code is
also returned by the <constant>VIDIOC_S_EXT_CTRLS</constant> and also returned by the <constant>VIDIOC_S_EXT_CTRLS</constant> and
......
...@@ -19,10 +19,10 @@ ...@@ -19,10 +19,10 @@
<!ENTITY cs-def "<colspec colname='c1' colwidth='3*' /><colspec colname='c2' colwidth='1*' /><colspec colname='c3' colwidth='4*' /><spanspec spanname='hspan' namest='c1' nameend='c3' />"> <!ENTITY cs-def "<colspec colname='c1' colwidth='3*' /><colspec colname='c2' colwidth='1*' /><colspec colname='c3' colwidth='4*' /><spanspec spanname='hspan' namest='c1' nameend='c3' />">
<!-- Video for Linux mailing list address. --> <!-- Video for Linux mailing list address. -->
<!ENTITY v4l-ml "<ulink url='http://www.linuxtv.org/lists.php'>http://www.linuxtv.org/lists.php</ulink>"> <!ENTITY v4l-ml "<ulink url='https://linuxtv.org/lists.php'>https://linuxtv.org/lists.php</ulink>">
<!-- LinuxTV v4l-dvb repository. --> <!-- LinuxTV v4l-dvb repository. -->
<!ENTITY v4l-dvb "<ulink url='http://linuxtv.org/repo/'>http://linuxtv.org/repo/</ulink>"> <!ENTITY v4l-dvb "<ulink url='https://linuxtv.org/repo/'>https://linuxtv.org/repo/</ulink>">
<!ENTITY dash-ent-8 "<entry>-</entry><entry>-</entry><entry>-</entry><entry>-</entry><entry>-</entry><entry>-</entry><entry>-</entry><entry>-</entry>"> <!ENTITY dash-ent-8 "<entry>-</entry><entry>-</entry><entry>-</entry><entry>-</entry><entry>-</entry><entry>-</entry><entry>-</entry><entry>-</entry>">
<!ENTITY dash-ent-10 "<entry>-</entry><entry>-</entry><entry>-</entry><entry>-</entry><entry>-</entry><entry>-</entry><entry>-</entry><entry>-</entry><entry>-</entry><entry>-</entry>"> <!ENTITY dash-ent-10 "<entry>-</entry><entry>-</entry><entry>-</entry><entry>-</entry><entry>-</entry><entry>-</entry><entry>-</entry><entry>-</entry><entry>-</entry><entry>-</entry>">
<!ENTITY dash-ent-12 "<entry>-</entry><entry>-</entry><entry>-</entry><entry>-</entry><entry>-</entry><entry>-</entry><entry>-</entry><entry>-</entry><entry>-</entry><entry>-</entry><entry>-</entry><entry>-</entry>"> <!ENTITY dash-ent-12 "<entry>-</entry><entry>-</entry><entry>-</entry><entry>-</entry><entry>-</entry><entry>-</entry><entry>-</entry><entry>-</entry><entry>-</entry><entry>-</entry><entry>-</entry><entry>-</entry>">
...@@ -91,7 +91,7 @@ ...@@ -91,7 +91,7 @@
components, like mixers, PCM capture, PCM playback, etc, which components, like mixers, PCM capture, PCM playback, etc, which
are controlled via ALSA API.</para> are controlled via ALSA API.</para>
<para>For additional information and for the latest development code, <para>For additional information and for the latest development code,
see: <ulink url="http://linuxtv.org">http://linuxtv.org</ulink>.</para> see: <ulink url="https://linuxtv.org">https://linuxtv.org</ulink>.</para>
<para>For discussing improvements, reporting troubles, sending new drivers, etc, please mail to: <ulink url="http://vger.kernel.org/vger-lists.html#linux-media">Linux Media Mailing List (LMML).</ulink>.</para> <para>For discussing improvements, reporting troubles, sending new drivers, etc, please mail to: <ulink url="http://vger.kernel.org/vger-lists.html#linux-media">Linux Media Mailing List (LMML).</ulink>.</para>
</preface> </preface>
......
...@@ -162,12 +162,15 @@ ...@@ -162,12 +162,15 @@
<sect1 id="Basic_defines"> <sect1 id="Basic_defines">
<title>Basic defines</title> <title>Basic defines</title>
<para> <para>
At least you have to provide a mtd structure and At least you have to provide a nand_chip structure
a storage for the ioremap'ed chip address. and a storage for the ioremap'ed chip address.
You can allocate the mtd structure using kmalloc You can allocate the nand_chip structure using
or you can allocate it statically. kmalloc or you can allocate it statically.
In case of static allocation you have to allocate The NAND chip structure embeds an mtd structure
a nand_chip structure too. which will be registered to the MTD subsystem.
You can extract a pointer to the mtd structure
from a nand_chip pointer using the nand_to_mtd()
helper.
</para> </para>
<para> <para>
Kmalloc based example Kmalloc based example
...@@ -180,7 +183,6 @@ static void __iomem *baseaddr; ...@@ -180,7 +183,6 @@ static void __iomem *baseaddr;
Static example Static example
</para> </para>
<programlisting> <programlisting>
static struct mtd_info board_mtd;
static struct nand_chip board_chip; static struct nand_chip board_chip;
static void __iomem *baseaddr; static void __iomem *baseaddr;
</programlisting> </programlisting>
...@@ -235,7 +237,7 @@ static void board_hwcontrol(struct mtd_info *mtd, int cmd) ...@@ -235,7 +237,7 @@ static void board_hwcontrol(struct mtd_info *mtd, int cmd)
<programlisting> <programlisting>
static void board_hwcontrol(struct mtd_info *mtd, int cmd) static void board_hwcontrol(struct mtd_info *mtd, int cmd)
{ {
struct nand_chip *this = (struct nand_chip *) mtd->priv; struct nand_chip *this = mtd_to_nand(mtd);
switch(cmd){ switch(cmd){
case NAND_CTL_SETCLE: this->IO_ADDR_W |= CLE_ADRR_BIT; break; case NAND_CTL_SETCLE: this->IO_ADDR_W |= CLE_ADRR_BIT; break;
case NAND_CTL_CLRCLE: this->IO_ADDR_W &amp;= ~CLE_ADRR_BIT; break; case NAND_CTL_CLRCLE: this->IO_ADDR_W &amp;= ~CLE_ADRR_BIT; break;
...@@ -274,13 +276,15 @@ static int __init board_init (void) ...@@ -274,13 +276,15 @@ static int __init board_init (void)
int err = 0; int err = 0;
/* Allocate memory for MTD device structure and private data */ /* Allocate memory for MTD device structure and private data */
board_mtd = kzalloc(sizeof(struct mtd_info) + sizeof(struct nand_chip), GFP_KERNEL); this = kzalloc(sizeof(struct nand_chip), GFP_KERNEL);
if (!board_mtd) { if (!this) {
printk ("Unable to allocate NAND MTD device structure.\n"); printk ("Unable to allocate NAND MTD device structure.\n");
err = -ENOMEM; err = -ENOMEM;
goto out; goto out;
} }
board_mtd = nand_to_mtd(this);
/* map physical address */ /* map physical address */
baseaddr = ioremap(CHIP_PHYSICAL_ADDRESS, 1024); baseaddr = ioremap(CHIP_PHYSICAL_ADDRESS, 1024);
if (!baseaddr) { if (!baseaddr) {
...@@ -289,11 +293,6 @@ static int __init board_init (void) ...@@ -289,11 +293,6 @@ static int __init board_init (void)
goto out_mtd; goto out_mtd;
} }
/* Get pointer to private data */
this = (struct nand_chip *) ();
/* Link the private data with the MTD structure */
board_mtd->priv = this;
/* Set address of NAND IO lines */ /* Set address of NAND IO lines */
this->IO_ADDR_R = baseaddr; this->IO_ADDR_R = baseaddr;
this->IO_ADDR_W = baseaddr; this->IO_ADDR_W = baseaddr;
...@@ -317,7 +316,7 @@ static int __init board_init (void) ...@@ -317,7 +316,7 @@ static int __init board_init (void)
out_ior: out_ior:
iounmap(baseaddr); iounmap(baseaddr);
out_mtd: out_mtd:
kfree (board_mtd); kfree (this);
out: out:
return err; return err;
} }
...@@ -343,7 +342,7 @@ static void __exit board_cleanup (void) ...@@ -343,7 +342,7 @@ static void __exit board_cleanup (void)
iounmap(baseaddr); iounmap(baseaddr);
/* Free the MTD device structure */ /* Free the MTD device structure */
kfree (board_mtd); kfree (mtd_to_nand(board_mtd));
} }
module_exit(board_cleanup); module_exit(board_cleanup);
#endif #endif
...@@ -399,7 +398,7 @@ static void board_select_chip (struct mtd_info *mtd, int chip) ...@@ -399,7 +398,7 @@ static void board_select_chip (struct mtd_info *mtd, int chip)
<programlisting> <programlisting>
static void board_select_chip (struct mtd_info *mtd, int chip) static void board_select_chip (struct mtd_info *mtd, int chip)
{ {
struct nand_chip *this = (struct nand_chip *) mtd->priv; struct nand_chip *this = mtd_to_nand(mtd);
/* Deselect all chips */ /* Deselect all chips */
this->IO_ADDR_R &amp;= ~BOARD_NAND_ADDR_MASK; this->IO_ADDR_R &amp;= ~BOARD_NAND_ADDR_MASK;
......
...@@ -209,7 +209,7 @@ tools. One such tool that is particularly recommended is the Linux ...@@ -209,7 +209,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.linux.no/+trees http://lxr.free-electrons.com/
The development process The development process
......
...@@ -3,7 +3,7 @@ Linux IOMMU Support ...@@ -3,7 +3,7 @@ Linux IOMMU Support
The architecture spec can be obtained from the below location. The architecture spec can be obtained from the below location.
http://www.intel.com/technology/virtualization/ http://www.intel.com/content/dam/www/public/us/en/documents/product-specifications/vt-directed-io-spec.pdf
This guide gives a quick cheat sheet for some basic understanding. This guide gives a quick cheat sheet for some basic understanding.
......
subdir-y := accounting auxdisplay blackfin connector \ subdir-y := accounting auxdisplay blackfin connector \
filesystems filesystems ia64 laptops mic misc-devices \ filesystems filesystems ia64 laptops mic misc-devices \
networking pcmcia prctl ptp spi timers vDSO video4linux \ networking pcmcia prctl ptp timers vDSO video4linux \
watchdog watchdog
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="447.99197"
height="428.19299"
id="svg2"
version="1.1"
inkscape:version="0.48.3.1 r9886"
sodipodi:docname="GPpartitionReaders1.svg">
<defs
id="defs4">
<marker
inkscape:stockid="Arrow2Lend"
orient="auto"
refY="0"
refX="0"
id="Arrow2Lend"
style="overflow:visible">
<path
id="path3792"
style="fill-rule:evenodd;stroke-width:0.625;stroke-linejoin:round"
d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z"
transform="matrix(-1.1,0,0,-1.1,-1.1,0)"
inkscape:connector-curvature="0" />
</marker>
<marker
inkscape:stockid="Arrow2Lstart"
orient="auto"
refY="0"
refX="0"
id="Arrow2Lstart"
style="overflow:visible">
<path
id="path3789"
style="fill-rule:evenodd;stroke-width:0.625;stroke-linejoin:round"
d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z"
transform="matrix(1.1,0,0,1.1,1.1,0)"
inkscape:connector-curvature="0" />
</marker>
</defs>
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="1.6184291"
inkscape:cx="223.99599"
inkscape:cy="214.0965"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="false"
inkscape:window-width="979"
inkscape:window-height="836"
inkscape:window-x="571"
inkscape:window-y="335"
inkscape:window-maximized="0"
fit-margin-top="5"
fit-margin-left="5"
fit-margin-right="5"
fit-margin-bottom="5" />
<metadata
id="metadata7">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(-28.441125,-185.60612)">
<flowRoot
xml:space="preserve"
id="flowRoot2985"
style="font-size:10px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;font-family:Symbol;-inkscape-font-specification:Symbol"><flowRegion
id="flowRegion2987"><rect
id="rect2989"
width="82.85714"
height="11.428572"
x="240"
y="492.36218" /></flowRegion><flowPara
id="flowPara2991"></flowPara></flowRoot> <g
id="g4433"
transform="translate(2,0)">
<text
sodipodi:linespacing="125%"
id="text2993"
y="-261.66608"
x="412.12299"
style="font-size:10px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;font-family:Symbol;-inkscape-font-specification:Symbol"
xml:space="preserve"
transform="matrix(0,1,-1,0,0,0)"><tspan
y="-261.66608"
x="412.12299"
id="tspan2995"
sodipodi:role="line">synchronize_rcu()</tspan></text>
<g
id="g4417"
transform="matrix(0,1,-1,0,730.90257,222.4928)">
<path
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-start:url(#Arrow2Lstart);marker-end:url(#Arrow2Lend)"
d="m 97.580736,477.4048 183.140664,0"
id="path2997"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cc" />
<path
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 96.752718,465.38398 0,22.62742"
id="path4397"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cc" />
<path
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 281.54942,465.38397 0,22.62742"
id="path4397-5"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cc" />
</g>
</g>
<text
xml:space="preserve"
style="font-size:10px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;font-family:Symbol;-inkscape-font-specification:Symbol"
x="112.04738"
y="268.18076"
id="text4429"
sodipodi:linespacing="125%"><tspan
sodipodi:role="line"
id="tspan4431"
x="112.04738"
y="268.18076">WRITE_ONCE(a, 1);</tspan></text>
<text
xml:space="preserve"
style="font-size:10px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;font-family:Symbol;-inkscape-font-specification:Symbol"
x="112.04738"
y="439.13766"
id="text4441"
sodipodi:linespacing="125%"><tspan
sodipodi:role="line"
id="tspan4443"
x="112.04738"
y="439.13766">WRITE_ONCE(b, 1);</tspan></text>
<text
xml:space="preserve"
style="font-size:10px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;font-family:Symbol;-inkscape-font-specification:Symbol"
x="255.60869"
y="309.29346"
id="text4445"
sodipodi:linespacing="125%"><tspan
sodipodi:role="line"
id="tspan4447"
x="255.60869"
y="309.29346">r1 = READ_ONCE(a);</tspan></text>
<text
xml:space="preserve"
style="font-size:10px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;font-family:Symbol;-inkscape-font-specification:Symbol"
x="255.14423"
y="520.61786"
id="text4449"
sodipodi:linespacing="125%"><tspan
sodipodi:role="line"
id="tspan4451"
x="255.14423"
y="520.61786">WRITE_ONCE(c, 1);</tspan></text>
<text
xml:space="preserve"
style="font-size:10px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;font-family:Symbol;-inkscape-font-specification:Symbol"
x="396.10254"
y="384.71124"
id="text4453"
sodipodi:linespacing="125%"><tspan
sodipodi:role="line"
id="tspan4455"
x="396.10254"
y="384.71124">r2 = READ_ONCE(b);</tspan></text>
<text
xml:space="preserve"
style="font-size:10px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;font-family:Symbol;-inkscape-font-specification:Symbol"
x="396.10254"
y="582.13617"
id="text4457"
sodipodi:linespacing="125%"><tspan
sodipodi:role="line"
id="tspan4459"
x="396.10254"
y="582.13617">r3 = READ_ONCE(c);</tspan></text>
<text
xml:space="preserve"
style="font-size:10px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;font-family:Symbol;-inkscape-font-specification:Symbol"
x="112.08231"
y="213.91006"
id="text4461"
sodipodi:linespacing="125%"><tspan
sodipodi:role="line"
id="tspan4463"
x="112.08231"
y="213.91006">thread0()</tspan></text>
<text
xml:space="preserve"
style="font-size:10px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;font-family:Symbol;-inkscape-font-specification:Symbol"
x="252.34512"
y="213.91006"
id="text4461-6"
sodipodi:linespacing="125%"><tspan
sodipodi:role="line"
id="tspan4463-0"
x="252.34512"
y="213.91006">thread1()</tspan></text>
<text
xml:space="preserve"
style="font-size:10px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;font-family:Symbol;-inkscape-font-specification:Symbol"
x="396.42557"
y="213.91006"
id="text4461-2"
sodipodi:linespacing="125%"><tspan
sodipodi:role="line"
id="tspan4463-2"
x="396.42557"
y="213.91006">thread2()</tspan></text>
<rect
style="fill:none;stroke:#000000;stroke-width:1;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
id="rect4495"
width="436.28488"
height="416.4859"
x="34.648232"
y="191.10612" />
<path
style="fill:none;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
d="m 183.14066,191.10612 0,417.193 -0.70711,0"
id="path4497"
inkscape:connector-curvature="0" />
<path
style="fill:none;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
d="m 325.13867,191.10612 0,417.193 -0.70711,0"
id="path4497-5"
inkscape:connector-curvature="0" />
<text
xml:space="preserve"
style="font-size:10px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;font-family:Symbol;-inkscape-font-specification:Symbol"
x="111.75929"
y="251.53981"
id="text4429-8"
sodipodi:linespacing="125%"><tspan
sodipodi:role="line"
id="tspan4431-9"
x="111.75929"
y="251.53981">rcu_read_lock();</tspan></text>
<text
xml:space="preserve"
style="font-size:10px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;font-family:Symbol;-inkscape-font-specification:Symbol"
x="396.10254"
y="367.91556"
id="text4429-8-9"
sodipodi:linespacing="125%"><tspan
sodipodi:role="line"
id="tspan4431-9-4"
x="396.10254"
y="367.91556">rcu_read_lock();</tspan></text>
<text
xml:space="preserve"
style="font-size:10px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;font-family:Symbol;-inkscape-font-specification:Symbol"
x="396.10254"
y="597.40289"
id="text4429-8-9-3"
sodipodi:linespacing="125%"><tspan
sodipodi:role="line"
id="tspan4431-9-4-4"
x="396.10254"
y="597.40289">rcu_read_unlock();</tspan></text>
<text
xml:space="preserve"
style="font-size:10px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;font-family:Symbol;-inkscape-font-specification:Symbol"
x="111.75929"
y="453.15311"
id="text4429-8-9-3-1"
sodipodi:linespacing="125%"><tspan
sodipodi:role="line"
id="tspan4431-9-4-4-6"
x="111.75929"
y="453.15311">rcu_read_unlock();</tspan></text>
<path
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 33.941125,227.87568 436.284885,0 0,0.7071"
id="path4608"
inkscape:connector-curvature="0" />
<text
xml:space="preserve"
style="font-size:10px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;font-family:Symbol;-inkscape-font-specification:Symbol"
x="394.94427"
y="345.66351"
id="text4648"
sodipodi:linespacing="125%"><tspan
sodipodi:role="line"
id="tspan4650"
x="394.94427"
y="345.66351">QS</tspan></text>
<path
sodipodi:type="arc"
style="fill:none;stroke:#000000;stroke-width:1;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
id="path4652"
sodipodi:cx="358.85669"
sodipodi:cy="142.87541"
sodipodi:rx="10.960155"
sodipodi:ry="10.253048"
d="m 358.86939,132.62237 a 10.960155,10.253048 0 1 1 -0.0228,0"
transform="translate(36.441125,199.60612)"
sodipodi:start="4.7135481"
sodipodi:end="10.994651"
sodipodi:open="true" />
<text
xml:space="preserve"
style="font-size:10px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;font-family:Symbol;-inkscape-font-specification:Symbol"
x="112.11968"
y="475.77856"
id="text4648-4"
sodipodi:linespacing="125%"><tspan
sodipodi:role="line"
id="tspan4650-4"
x="112.11968"
y="475.77856">QS</tspan></text>
<path
sodipodi:type="arc"
style="fill:none;stroke:#000000;stroke-width:1;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
id="path4652-7"
sodipodi:cx="358.85669"
sodipodi:cy="142.87541"
sodipodi:rx="10.960155"
sodipodi:ry="10.253048"
d="m 358.86939,132.62237 a 10.960155,10.253048 0 1 1 -0.0228,0"
transform="translate(-246.38346,329.72117)"
sodipodi:start="4.7135481"
sodipodi:end="10.994651"
sodipodi:open="true" />
<path
sodipodi:type="arc"
style="fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:1;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
id="path4652-7-7"
sodipodi:cx="358.85669"
sodipodi:cy="142.87541"
sodipodi:rx="10.960155"
sodipodi:ry="10.253048"
d="m 358.86939,132.62237 a 10.960155,10.253048 0 1 1 -0.0228,0"
transform="translate(-103.65246,202.90878)"
sodipodi:start="4.7135481"
sodipodi:end="10.994651"
sodipodi:open="true" />
<text
xml:space="preserve"
style="font-size:10px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;font-family:Symbol;-inkscape-font-specification:Symbol"
x="254.85066"
y="348.96619"
id="text4648-4-3"
sodipodi:linespacing="125%"><tspan
sodipodi:role="line"
id="tspan4650-4-5"
x="254.85066"
y="348.96619">QS</tspan></text>
</g>
</svg>
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Creator: fig2dev Version 3.2 Patchlevel 5d -->
<!-- CreationDate: Tue Mar 4 18:34:25 2014 -->
<!-- Magnification: 3.000 -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="1089.1382"
height="668.21368"
viewBox="-2121 -36 14554.634 8876.4061"
id="svg2"
version="1.1"
inkscape:version="0.48.3.1 r9886"
sodipodi:docname="RCUApplicability.svg">
<metadata
id="metadata40">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title />
</cc:Work>
</rdf:RDF>
</metadata>
<defs
id="defs38" />
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="849"
inkscape:window-height="639"
id="namedview36"
showgrid="false"
inkscape:zoom="0.51326165"
inkscape:cx="544.56912"
inkscape:cy="334.10686"
inkscape:window-x="149"
inkscape:window-y="448"
inkscape:window-maximized="0"
inkscape:current-layer="g4"
fit-margin-top="5"
fit-margin-left="5"
fit-margin-right="5"
fit-margin-bottom="5" />
<g
style="fill:none;stroke-width:0.025in"
id="g4"
transform="translate(-2043.6828,14.791398)">
<!-- Line: box -->
<rect
x="0"
y="0"
width="14400"
height="8775"
rx="0"
style="fill:#ffa1a1;stroke:#000000;stroke-width:21;stroke-linecap:butt;stroke-linejoin:miter"
id="rect6" />
<!-- Line: box -->
<rect
x="1350"
y="0"
width="11700"
height="6075"
rx="0"
style="fill:#ffff00;stroke:#000000;stroke-width:21;stroke-linecap:butt;stroke-linejoin:miter"
id="rect8" />
<!-- Line: box -->
<rect
x="2700"
y="0"
width="9000"
height="4275"
rx="0"
style="fill:#00ff00;stroke:#000000;stroke-width:21;stroke-linecap:butt;stroke-linejoin:miter"
id="rect10" />
<!-- Line: box -->
<rect
x="4050"
y="0"
width="6300"
height="2475"
rx="0"
style="fill:#87cfff;stroke:#000000;stroke-width:21;stroke-linecap:butt;stroke-linejoin:miter"
id="rect12" />
<!-- Text -->
<text
xml:space="preserve"
x="7200"
y="900"
font-style="normal"
font-weight="normal"
font-size="324"
id="text14"
sodipodi:linespacing="125%"
style="font-size:427.63009644px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:center;line-height:125%;writing-mode:lr-tb;text-anchor:middle;fill:#000000;font-family:Nimbus Sans L;-inkscape-font-specification:Nimbus Sans L"><tspan
style="font-size:427.63009644px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:center;line-height:125%;writing-mode:lr-tb;text-anchor:middle;font-family:Nimbus Sans L;-inkscape-font-specification:Nimbus Sans L"
id="tspan3017">Read-Mostly, Stale &amp;</tspan></text>
<!-- Text -->
<text
xml:space="preserve"
x="7200"
y="1350"
font-style="normal"
font-weight="normal"
font-size="324"
id="text16"
sodipodi:linespacing="125%"
style="font-size:427.63009644px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:center;line-height:125%;writing-mode:lr-tb;text-anchor:middle;fill:#000000;font-family:Nimbus Sans L;-inkscape-font-specification:Nimbus Sans L"><tspan
style="font-size:427.63009644px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:center;line-height:125%;writing-mode:lr-tb;text-anchor:middle;font-family:Nimbus Sans L;-inkscape-font-specification:Nimbus Sans L"
id="tspan3019">Inconsistent Data OK</tspan></text>
<!-- Text -->
<text
xml:space="preserve"
x="7200"
y="1800"
font-style="normal"
font-weight="normal"
font-size="324"
id="text18"
sodipodi:linespacing="125%"
style="font-size:427.63009644px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:center;line-height:125%;writing-mode:lr-tb;text-anchor:middle;fill:#000000;font-family:Nimbus Sans L;-inkscape-font-specification:Nimbus Sans L"><tspan
style="font-size:427.63009644px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:center;line-height:125%;writing-mode:lr-tb;text-anchor:middle;font-family:Nimbus Sans L;-inkscape-font-specification:Nimbus Sans L"
id="tspan3021">(RCU Works Great!!!)</tspan></text>
<!-- Text -->
<text
xml:space="preserve"
x="7200"
y="3825"
font-style="normal"
font-weight="normal"
font-size="324"
id="text20"
sodipodi:linespacing="125%"
style="font-size:427.63009644px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:center;line-height:125%;writing-mode:lr-tb;text-anchor:middle;fill:#000000;font-family:Nimbus Sans L;-inkscape-font-specification:Nimbus Sans L"><tspan
style="font-size:427.63009644px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:center;line-height:125%;writing-mode:lr-tb;text-anchor:middle;font-family:Nimbus Sans L;-inkscape-font-specification:Nimbus Sans L"
id="tspan3023">(RCU Works Well)</tspan></text>
<!-- Text -->
<text
xml:space="preserve"
x="7200"
y="3375"
font-style="normal"
font-weight="normal"
font-size="324"
id="text22"
sodipodi:linespacing="125%"
style="font-size:427.63009644px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:center;line-height:125%;writing-mode:lr-tb;text-anchor:middle;fill:#000000;font-family:Nimbus Sans L;-inkscape-font-specification:Nimbus Sans L"><tspan
style="font-size:427.63009644px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:center;line-height:125%;writing-mode:lr-tb;text-anchor:middle;font-family:Nimbus Sans L;-inkscape-font-specification:Nimbus Sans L"
id="tspan3025">Read-Mostly, Need Consistent Data</tspan></text>
<!-- Text -->
<text
xml:space="preserve"
x="7200"
y="5175"
font-style="normal"
font-weight="normal"
font-size="324"
id="text24"
sodipodi:linespacing="125%"
style="font-size:427.63009644px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:center;line-height:125%;writing-mode:lr-tb;text-anchor:middle;fill:#000000;font-family:Nimbus Sans L;-inkscape-font-specification:Nimbus Sans L"><tspan
style="font-size:427.63009644px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:center;line-height:125%;writing-mode:lr-tb;text-anchor:middle;font-family:Nimbus Sans L;-inkscape-font-specification:Nimbus Sans L"
id="tspan3027">Read-Write, Need Consistent Data</tspan></text>
<!-- Text -->
<text
xml:space="preserve"
x="7200"
y="6975"
font-style="normal"
font-weight="normal"
font-size="324"
id="text26"
style="font-size:427.63009644px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:center;line-height:125%;writing-mode:lr-tb;text-anchor:middle;fill:#000000;font-family:Nimbus Sans L;-inkscape-font-specification:Nimbus Sans L"
sodipodi:linespacing="125%">Update-Mostly, Need Consistent Data</text>
<!-- Text -->
<text
xml:space="preserve"
x="7200"
y="5625"
font-style="normal"
font-weight="normal"
font-size="324"
id="text28"
sodipodi:linespacing="125%"
style="font-size:427.63009644px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:center;line-height:125%;writing-mode:lr-tb;text-anchor:middle;fill:#000000;font-family:Nimbus Sans L;-inkscape-font-specification:Nimbus Sans L"><tspan
style="font-size:427.63009644px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:center;line-height:125%;writing-mode:lr-tb;text-anchor:middle;font-family:Nimbus Sans L;-inkscape-font-specification:Nimbus Sans L"
id="tspan3029">(RCU Might Be OK...)</tspan></text>
<!-- Text -->
<text
xml:space="preserve"
x="7200"
y="7875"
font-style="normal"
font-weight="normal"
font-size="324"
id="text30"
style="font-size:427.63009644px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:center;line-height:125%;writing-mode:lr-tb;text-anchor:middle;fill:#000000;font-family:Nimbus Sans L;-inkscape-font-specification:Nimbus Sans L"
sodipodi:linespacing="125%">(1) Provide Existence Guarantees For Update-Friendly Mechanisms</text>
<!-- Text -->
<text
xml:space="preserve"
x="7200"
y="8325"
font-style="normal"
font-weight="normal"
font-size="324"
id="text32"
style="font-size:427.63009644px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:center;line-height:125%;writing-mode:lr-tb;text-anchor:middle;fill:#000000;font-family:Nimbus Sans L;-inkscape-font-specification:Nimbus Sans L"
sodipodi:linespacing="125%">(2) Provide Wait-Free Read-Side Primitives for Real-Time Use)</text>
<!-- Text -->
<text
xml:space="preserve"
x="7200"
y="7425"
font-style="normal"
font-weight="normal"
font-size="324"
id="text34"
style="font-size:427.63009644px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:center;line-height:125%;writing-mode:lr-tb;text-anchor:middle;fill:#000000;font-family:Nimbus Sans L;-inkscape-font-specification:Nimbus Sans L"
sodipodi:linespacing="125%">(RCU is Very Unlikely to be the Right Tool For The Job, But it Can:</text>
</g>
</svg>
此差异已折叠。
#!/bin/sh
#
# Usage: sh htmlqqz.sh file
#
# Extracts and converts quick quizzes in a proto-HTML document file.htmlx.
# Commands, all of which must be on a line by themselves:
#
# "<p>@@QQ@@": Start of a quick quiz.
# "<p>@@QQA@@": Start of a quick-quiz answer.
# "<p>@@QQE@@": End of a quick-quiz answer, and thus of the quick quiz.
# "<p>@@QQAL@@": Place to put quick-quiz answer list.
#
# Places the result in file.html.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, you can access it online at
# http://www.gnu.org/licenses/gpl-2.0.html.
#
# Copyright (c) 2013 Paul E. McKenney, IBM Corporation.
fn=$1
if test ! -r $fn.htmlx
then
echo "Error: $fn.htmlx unreadable."
exit 1
fi
echo "<!-- DO NOT HAND EDIT. -->" > $fn.html
echo "<!-- Instead, edit $fn.htmlx and run 'sh htmlqqz.sh $fn' -->" >> $fn.html
awk < $fn.htmlx >> $fn.html '
state == "" && $1 != "<p>@@QQ@@" && $1 != "<p>@@QQAL@@" {
print $0;
if ($0 ~ /^<p>@@QQ/)
print "Bad Quick Quiz command: " NR " (expected <p>@@QQ@@ or <p>@@QQAL@@)." > "/dev/stderr"
next;
}
state == "" && $1 == "<p>@@QQ@@" {
qqn++;
qqlineno = NR;
haveqq = 1;
state = "qq";
print "<p><a name=\"Quick Quiz " qqn "\"><b>Quick Quiz " qqn "</b>:</a>"
next;
}
state == "qq" && $1 != "<p>@@QQA@@" {
qq[qqn] = qq[qqn] $0 "\n";
print $0
if ($0 ~ /^<p>@@QQ/)
print "Bad Quick Quiz command: " NR ". (expected <p>@@QQA@@)" > "/dev/stderr"
next;
}
state == "qq" && $1 == "<p>@@QQA@@" {
state = "qqa";
print "<br><a href=\"#qq" qqn "answer\">Answer</a>"
next;
}
state == "qqa" && $1 != "<p>@@QQE@@" {
qqa[qqn] = qqa[qqn] $0 "\n";
if ($0 ~ /^<p>@@QQ/)
print "Bad Quick Quiz command: " NR " (expected <p>@@QQE@@)." > "/dev/stderr"
next;
}
state == "qqa" && $1 == "<p>@@QQE@@" {
state = "";
next;
}
state == "" && $1 == "<p>@@QQAL@@" {
haveqq = "";
print "<h3><a name=\"Answers to Quick Quizzes\">"
print "Answers to Quick Quizzes</a></h3>"
print "";
for (i = 1; i <= qqn; i++) {
print "<a name=\"qq" i "answer\"></a>"
print "<p><b>Quick Quiz " i "</b>:"
print qq[i];
print "";
print "</p><p><b>Answer</b>:"
print qqa[i];
print "";
print "</p><p><a href=\"#Quick%20Quiz%20" i "\"><b>Back to Quick Quiz " i "</b>.</a>"
print "";
}
next;
}
END {
if (state != "")
print "Unterminated Quick Quiz: " qqlineno "." > "/dev/stderr"
else if (haveqq)
print "Missing \"<p>@@QQAL@@\", no Quick Quiz." > "/dev/stderr"
}'
...@@ -375,7 +375,8 @@ int main(int argc, char *argv[]) ...@@ -375,7 +375,8 @@ int main(int argc, char *argv[])
} }
} }
if ((nl_sd = create_nl_socket(NETLINK_GENERIC)) < 0) nl_sd = create_nl_socket(NETLINK_GENERIC);
if (nl_sd < 0)
err(1, "error creating Netlink socket\n"); err(1, "error creating Netlink socket\n");
......
...@@ -233,29 +233,30 @@ MMP/MMP2 family (communication processor) ...@@ -233,29 +233,30 @@ MMP/MMP2 family (communication processor)
Linux kernel mach directory: arch/arm/mach-mmp Linux kernel mach directory: arch/arm/mach-mmp
Linux kernel plat directory: arch/arm/plat-pxa Linux kernel plat directory: arch/arm/plat-pxa
Berlin family (Digital Entertainment) Berlin family (Multimedia Solutions)
------------------------------------- -------------------------------------
Flavors: Flavors:
88DE3005, Armada 1500-mini 88DE3005, Armada 1500 Mini
Design name: BG2CD Design name: BG2CD
Core: ARM Cortex-A9, PL310 L2CC Core: ARM Cortex-A9, PL310 L2CC
Homepage: http://www.marvell.com/digital-entertainment/armada-1500-mini/ Homepage: http://www.marvell.com/multimedia-solutions/armada-1500-mini/
88DE3006, Armada 1500 Mini Plus
Design name: BG2CDP
Core: Dual Core ARM Cortex-A7
Homepage: http://www.marvell.com/multimedia-solutions/armada-1500-mini-plus/
88DE3100, Armada 1500 88DE3100, Armada 1500
Design name: BG2 Design name: BG2
Core: Marvell PJ4B (ARMv7), Tauros3 L2CC Core: Marvell PJ4B (ARMv7), Tauros3 L2CC
Homepage: http://www.marvell.com/digital-entertainment/armada-1500/ Product Brief: http://www.marvell.com/multimedia-solutions/armada-1500/assets/Marvell-ARMADA-1500-Product-Brief.pdf
Product Brief: http://www.marvell.com/digital-entertainment/armada-1500/assets/Marvell-ARMADA-1500-Product-Brief.pdf
88DE3114, Armada 1500 Pro 88DE3114, Armada 1500 Pro
Design name: BG2-Q Design name: BG2Q
Core: Quad Core ARM Cortex-A9, PL310 L2CC Core: Quad Core ARM Cortex-A9, PL310 L2CC
Homepage: http://www.marvell.com/digital-entertainment/armada-1500-pro/
Product Brief: http://www.marvell.com/digital-entertainment/armada-1500-pro/assets/Marvell_ARMADA_1500_PRO-01_product_brief.pdf
88DE???? 88DE????
Design name: BG3 Design name: BG3
Core: ARM Cortex-A15, CA15 integrated L2CC Core: ARM Cortex-A15, CA15 integrated L2CC
Homepage: http://www.marvell.com/digital-entertainment/ Homepage: http://www.marvell.com/multimedia-solutions/
Directory: arch/arm/mach-berlin Directory: arch/arm/mach-berlin
Comments: Comments:
......
...@@ -49,24 +49,6 @@ specified through DTS. Following are the DTS used:- ...@@ -49,24 +49,6 @@ specified through DTS. Following are the DTS used:-
The device tree documentation for the keystone machines are located at The device tree documentation for the keystone machines are located at
Documentation/devicetree/bindings/arm/keystone/keystone.txt Documentation/devicetree/bindings/arm/keystone/keystone.txt
Known issues & workaround
-------------------------
Some of the device drivers used on keystone are re-used from that from
DaVinci and other TI SoCs. These device drivers may use clock APIs directly.
Some of the keystone specific drivers such as netcp uses run time power
management API instead to enable clock. As this API has limitations on
keystone, following workaround is needed to boot Linux.
Add 'clk_ignore_unused' to the bootargs env variable in u-boot. Otherwise
clock frameworks will try to disable clocks that are unused and disable
the hardware. This is because netcp related power domain and clock
domains are enabled in u-boot as run time power management API currently
doesn't enable clocks for netcp due to a limitation. This workaround is
expected to be removed in the future when proper API support becomes
available. Until then, this work around is needed.
Document Author Document Author
--------------- ---------------
Murali Karicheri <m-karicheri2@ti.com> Murali Karicheri <m-karicheri2@ti.com>
......
...@@ -49,7 +49,7 @@ to this new MFP mechanism, here are several key points: ...@@ -49,7 +49,7 @@ to this new MFP mechanism, here are several key points:
internal controllers like PWM, SSP and UART, with 128 internal signals internal controllers like PWM, SSP and UART, with 128 internal signals
which can be routed to external through one or more MFPs (e.g. GPIO<0> which can be routed to external through one or more MFPs (e.g. GPIO<0>
can be routed through either MFP_PIN_GPIO0 as well as MFP_PIN_GPIO0_2, can be routed through either MFP_PIN_GPIO0 as well as MFP_PIN_GPIO0_2,
see arch/arm/mach-pxa/mach/include/mfp-pxa300.h) see arch/arm/mach-pxa/mfp-pxa300.h)
2. Alternate function configuration is removed from this GPIO controller, 2. Alternate function configuration is removed from this GPIO controller,
the remaining functions are pure GPIO-specific, i.e. the remaining functions are pure GPIO-specific, i.e.
...@@ -76,11 +76,11 @@ For board code writers, here are some guidelines: ...@@ -76,11 +76,11 @@ For board code writers, here are some guidelines:
1. include ONE of the following header files in your <board>.c: 1. include ONE of the following header files in your <board>.c:
- #include <mach/mfp-pxa25x.h> - #include "mfp-pxa25x.h"
- #include <mach/mfp-pxa27x.h> - #include "mfp-pxa27x.h"
- #include <mach/mfp-pxa300.h> - #include "mfp-pxa300.h"
- #include <mach/mfp-pxa320.h> - #include "mfp-pxa320.h"
- #include <mach/mfp-pxa930.h> - #include "mfp-pxa930.h"
NOTE: only one file in your <board>.c, depending on the processors used, NOTE: only one file in your <board>.c, depending on the processors used,
because pin configuration definitions may conflict in these file (i.e. because pin configuration definitions may conflict in these file (i.e.
...@@ -203,20 +203,20 @@ make them effective there-after. ...@@ -203,20 +203,20 @@ make them effective there-after.
1. Unified pin definitions - enum constants for all configurable pins 1. Unified pin definitions - enum constants for all configurable pins
2. processor-neutral bit definitions for a possible MFP configuration 2. processor-neutral bit definitions for a possible MFP configuration
- arch/arm/mach-pxa/include/mach/mfp-pxa3xx.h - arch/arm/mach-pxa/mfp-pxa3xx.h
for PXA3xx specific MFPR register bit definitions and PXA3xx common pin for PXA3xx specific MFPR register bit definitions and PXA3xx common pin
configurations configurations
- arch/arm/mach-pxa/include/mach/mfp-pxa2xx.h - arch/arm/mach-pxa/mfp-pxa2xx.h
for PXA2xx specific definitions and PXA25x/PXA27x common pin configurations for PXA2xx specific definitions and PXA25x/PXA27x common pin configurations
- arch/arm/mach-pxa/include/mach/mfp-pxa25x.h - arch/arm/mach-pxa/mfp-pxa25x.h
arch/arm/mach-pxa/include/mach/mfp-pxa27x.h arch/arm/mach-pxa/mfp-pxa27x.h
arch/arm/mach-pxa/include/mach/mfp-pxa300.h arch/arm/mach-pxa/mfp-pxa300.h
arch/arm/mach-pxa/include/mach/mfp-pxa320.h arch/arm/mach-pxa/mfp-pxa320.h
arch/arm/mach-pxa/include/mach/mfp-pxa930.h arch/arm/mach-pxa/mfp-pxa930.h
for processor specific definitions for processor specific definitions
......
Silicon Errata and Software Workarounds
=======================================
Author: Will Deacon <will.deacon@arm.com>
Date : 27 November 2015
It is an unfortunate fact of life that hardware is often produced with
so-called "errata", which can cause it to deviate from the architecture
under specific circumstances. For hardware produced by ARM, these
errata are broadly classified into the following categories:
Category A: A critical error without a viable workaround.
Category B: A significant or critical error with an acceptable
workaround.
Category C: A minor error that is not expected to occur under normal
operation.
For more information, consult one of the "Software Developers Errata
Notice" documents available on infocenter.arm.com (registration
required).
As far as Linux is concerned, Category B errata may require some special
treatment in the operating system. For example, avoiding a particular
sequence of code, or configuring the processor in a particular way. A
less common situation may require similar actions in order to declassify
a Category A erratum into a Category C erratum. These are collectively
known as "software workarounds" and are only required in the minority of
cases (e.g. those cases that both require a non-secure workaround *and*
can be triggered by Linux).
For software workarounds that may adversely impact systems unaffected by
the erratum in question, a Kconfig entry is added under "Kernel
Features" -> "ARM errata workarounds via the alternatives framework".
These are enabled by default and patched in at runtime when an affected
CPU is detected. For less-intrusive workarounds, a Kconfig option is not
available and the code is structured (preferably with a comment) in such
a way that the erratum will not be hit.
This approach can make it slightly onerous to determine exactly which
errata are worked around in an arbitrary kernel source tree, so this
file acts as a registry of software workarounds in the Linux Kernel and
will be updated when new workarounds are committed and backported to
stable kernels.
| Implementor | Component | Erratum ID | Kconfig |
+----------------+-----------------+-----------------+-------------------------+
| ARM | Cortex-A53 | #826319 | ARM64_ERRATUM_826319 |
| ARM | Cortex-A53 | #827319 | ARM64_ERRATUM_827319 |
| ARM | Cortex-A53 | #824069 | ARM64_ERRATUM_824069 |
| ARM | Cortex-A53 | #819472 | ARM64_ERRATUM_819472 |
| ARM | Cortex-A53 | #845719 | ARM64_ERRATUM_845719 |
| ARM | Cortex-A53 | #843419 | ARM64_ERRATUM_843419 |
| ARM | Cortex-A57 | #832075 | ARM64_ERRATUM_832075 |
| ARM | Cortex-A57 | #852523 | N/A |
| ARM | Cortex-A57 | #834220 | ARM64_ERRATUM_834220 |
| | | | |
| Cavium | ThunderX ITS | #22375, #24313 | CAVIUM_ERRATUM_22375 |
| Cavium | ThunderX GICv3 | #23154 | CAVIUM_ERRATUM_23154 |
...@@ -81,14 +81,13 @@ on higher end storage. ...@@ -81,14 +81,13 @@ on higher end storage.
Default value for this parameter is 8ms. Default value for this parameter is 8ms.
latency low_latency
------- -----------
This parameter is used to enable/disable the latency mode of the CFQ This parameter is used to enable/disable the low latency mode of the CFQ
scheduler. If latency mode (called low_latency) is enabled, CFQ tries scheduler. If enabled, CFQ tries to recompute the slice time for each process
to recompute the slice time for each process based on the target_latency set based on the target_latency set for the system. This favors fairness over
for the system. This favors fairness over throughput. Disabling low throughput. Disabling low latency (setting it to 0) ignores target latency,
latency (setting it to 0) ignores target latency, allowing each process in the allowing each process in the system to get a full time slice.
system to get a full time slice.
By default low latency mode is enabled. By default low latency mode is enabled.
......
00-INDEX
- this file
blkio-controller.txt
- Description for Block IO Controller, implementation and usage details.
cgroups.txt
- Control Groups definition, implementation details, examples and API.
cpuacct.txt
- CPU Accounting Controller; account CPU usage for groups of tasks.
cpusets.txt
- documents the cpusets feature; assign CPUs and Mem to a set of tasks.
devices.txt
- Device Whitelist Controller; description, interface and security.
freezer-subsystem.txt
- checkpointing; rationale to not use signals, interface.
hugetlb.txt
- HugeTLB Controller implementation and usage details.
memcg_test.txt
- Memory Resource Controller; implementation details.
memory.txt
- Memory Resource Controller; design, accounting, interface, testing.
net_cls.txt
- Network classifier cgroups details and usages.
net_prio.txt
- Network priority cgroups details and usages.
pids.txt
- Process number cgroups details and usages.
unified-hierarchy.txt
- Description the new/next cgroup interface.
Block IO Controller
===================
Overview
========
cgroup subsys "blkio" implements the block io controller. There seems to be
a need of various kinds of IO control policies (like proportional BW, max BW)
both at leaf nodes as well as at intermediate nodes in a storage hierarchy.
Plan is to use the same cgroup based management interface for blkio controller
and based on user options switch IO policies in the background.
Currently two IO control policies are implemented. First one is proportional
weight time based division of disk policy. It is implemented in CFQ. Hence
this policy takes effect only on leaf nodes when CFQ is being used. The second
one is throttling policy which can be used to specify upper IO rate limits
on devices. This policy is implemented in generic block layer and can be
used on leaf nodes as well as higher level logical devices like device mapper.
HOWTO
=====
Proportional Weight division of bandwidth
-----------------------------------------
You can do a very simple testing of running two dd threads in two different
cgroups. Here is what you can do.
- Enable Block IO controller
CONFIG_BLK_CGROUP=y
- Enable group scheduling in CFQ
CONFIG_CFQ_GROUP_IOSCHED=y
- Compile and boot into kernel and mount IO controller (blkio); see
cgroups.txt, Why are cgroups needed?.
mount -t tmpfs cgroup_root /sys/fs/cgroup
mkdir /sys/fs/cgroup/blkio
mount -t cgroup -o blkio none /sys/fs/cgroup/blkio
- Create two cgroups
mkdir -p /sys/fs/cgroup/blkio/test1/ /sys/fs/cgroup/blkio/test2
- Set weights of group test1 and test2
echo 1000 > /sys/fs/cgroup/blkio/test1/blkio.weight
echo 500 > /sys/fs/cgroup/blkio/test2/blkio.weight
- Create two same size files (say 512MB each) on same disk (file1, file2) and
launch two dd threads in different cgroup to read those files.
sync
echo 3 > /proc/sys/vm/drop_caches
dd if=/mnt/sdb/zerofile1 of=/dev/null &
echo $! > /sys/fs/cgroup/blkio/test1/tasks
cat /sys/fs/cgroup/blkio/test1/tasks
dd if=/mnt/sdb/zerofile2 of=/dev/null &
echo $! > /sys/fs/cgroup/blkio/test2/tasks
cat /sys/fs/cgroup/blkio/test2/tasks
- At macro level, first dd should finish first. To get more precise data, keep
on looking at (with the help of script), at blkio.disk_time and
blkio.disk_sectors files of both test1 and test2 groups. This will tell how
much disk time (in milliseconds), each group got and how many sectors each
group dispatched to the disk. We provide fairness in terms of disk time, so
ideally io.disk_time of cgroups should be in proportion to the weight.
Throttling/Upper Limit policy
-----------------------------
- Enable Block IO controller
CONFIG_BLK_CGROUP=y
- Enable throttling in block layer
CONFIG_BLK_DEV_THROTTLING=y
- Mount blkio controller (see cgroups.txt, Why are cgroups needed?)
mount -t cgroup -o blkio none /sys/fs/cgroup/blkio
- Specify a bandwidth rate on particular device for root group. The format
for policy is "<major>:<minor> <bytes_per_second>".
echo "8:16 1048576" > /sys/fs/cgroup/blkio/blkio.throttle.read_bps_device
Above will put a limit of 1MB/second on reads happening for root group
on device having major/minor number 8:16.
- Run dd to read a file and see if rate is throttled to 1MB/s or not.
# dd iflag=direct if=/mnt/common/zerofile of=/dev/null bs=4K count=1024
1024+0 records in
1024+0 records out
4194304 bytes (4.2 MB) copied, 4.0001 s, 1.0 MB/s
Limits for writes can be put using blkio.throttle.write_bps_device file.
Hierarchical Cgroups
====================
Both CFQ and throttling implement hierarchy support; however,
throttling's hierarchy support is enabled iff "sane_behavior" is
enabled from cgroup side, which currently is a development option and
not publicly available.
If somebody created a hierarchy like as follows.
root
/ \
test1 test2
|
test3
CFQ by default and throttling with "sane_behavior" will handle the
hierarchy correctly. For details on CFQ hierarchy support, refer to
Documentation/block/cfq-iosched.txt. For throttling, all limits apply
to the whole subtree while all statistics are local to the IOs
directly generated by tasks in that cgroup.
Throttling without "sane_behavior" enabled from cgroup side will
practically treat all groups at same level as if it looks like the
following.
pivot
/ / \ \
root test1 test2 test3
Various user visible config options
===================================
CONFIG_BLK_CGROUP
- Block IO controller.
CONFIG_DEBUG_BLK_CGROUP
- Debug help. Right now some additional stats file show up in cgroup
if this option is enabled.
CONFIG_CFQ_GROUP_IOSCHED
- Enables group scheduling in CFQ. Currently only 1 level of group
creation is allowed.
CONFIG_BLK_DEV_THROTTLING
- Enable block device throttling support in block layer.
Details of cgroup files
=======================
Proportional weight policy files
--------------------------------
- blkio.weight
- Specifies per cgroup weight. This is default weight of the group
on all the devices until and unless overridden by per device rule.
(See blkio.weight_device).
Currently allowed range of weights is from 10 to 1000.
- blkio.weight_device
- One can specify per cgroup per device rules using this interface.
These rules override the default value of group weight as specified
by blkio.weight.
Following is the format.
# echo dev_maj:dev_minor weight > blkio.weight_device
Configure weight=300 on /dev/sdb (8:16) in this cgroup
# echo 8:16 300 > blkio.weight_device
# cat blkio.weight_device
dev weight
8:16 300
Configure weight=500 on /dev/sda (8:0) in this cgroup
# echo 8:0 500 > blkio.weight_device
# cat blkio.weight_device
dev weight
8:0 500
8:16 300
Remove specific weight for /dev/sda in this cgroup
# echo 8:0 0 > blkio.weight_device
# cat blkio.weight_device
dev weight
8:16 300
- blkio.leaf_weight[_device]
- Equivalents of blkio.weight[_device] for the purpose of
deciding how much weight tasks in the given cgroup has while
competing with the cgroup's child cgroups. For details,
please refer to Documentation/block/cfq-iosched.txt.
- blkio.time
- disk time allocated to cgroup per device in milliseconds. First
two fields specify the major and minor number of the device and
third field specifies the disk time allocated to group in
milliseconds.
- blkio.sectors
- number of sectors transferred to/from disk by the group. First
two fields specify the major and minor number of the device and
third field specifies the number of sectors transferred by the
group to/from the device.
- blkio.io_service_bytes
- Number of bytes transferred to/from the disk by the group. These
are further divided by the type of operation - read or write, sync
or async. First two fields specify the major and minor number of the
device, third field specifies the operation type and the fourth field
specifies the number of bytes.
- blkio.io_serviced
- Number of IOs (bio) issued to the disk by the group. These
are further divided by the type of operation - read or write, sync
or async. First two fields specify the major and minor number of the
device, third field specifies the operation type and the fourth field
specifies the number of IOs.
- blkio.io_service_time
- Total amount of time between request dispatch and request completion
for the IOs done by this cgroup. This is in nanoseconds to make it
meaningful for flash devices too. For devices with queue depth of 1,
this time represents the actual service time. When queue_depth > 1,
that is no longer true as requests may be served out of order. This
may cause the service time for a given IO to include the service time
of multiple IOs when served out of order which may result in total
io_service_time > actual time elapsed. This time is further divided by
the type of operation - read or write, sync or async. First two fields
specify the major and minor number of the device, third field
specifies the operation type and the fourth field specifies the
io_service_time in ns.
- blkio.io_wait_time
- Total amount of time the IOs for this cgroup spent waiting in the
scheduler queues for service. This can be greater than the total time
elapsed since it is cumulative io_wait_time for all IOs. It is not a
measure of total time the cgroup spent waiting but rather a measure of
the wait_time for its individual IOs. For devices with queue_depth > 1
this metric does not include the time spent waiting for service once
the IO is dispatched to the device but till it actually gets serviced
(there might be a time lag here due to re-ordering of requests by the
device). This is in nanoseconds to make it meaningful for flash
devices too. This time is further divided by the type of operation -
read or write, sync or async. First two fields specify the major and
minor number of the device, third field specifies the operation type
and the fourth field specifies the io_wait_time in ns.
- blkio.io_merged
- Total number of bios/requests merged into requests belonging to this
cgroup. This is further divided by the type of operation - read or
write, sync or async.
- blkio.io_queued
- Total number of requests queued up at any given instant for this
cgroup. This is further divided by the type of operation - read or
write, sync or async.
- blkio.avg_queue_size
- Debugging aid only enabled if CONFIG_DEBUG_BLK_CGROUP=y.
The average queue size for this cgroup over the entire time of this
cgroup's existence. Queue size samples are taken each time one of the
queues of this cgroup gets a timeslice.
- blkio.group_wait_time
- Debugging aid only enabled if CONFIG_DEBUG_BLK_CGROUP=y.
This is the amount of time the cgroup had to wait since it became busy
(i.e., went from 0 to 1 request queued) to get a timeslice for one of
its queues. This is different from the io_wait_time which is the
cumulative total of the amount of time spent by each IO in that cgroup
waiting in the scheduler queue. This is in nanoseconds. If this is
read when the cgroup is in a waiting (for timeslice) state, the stat
will only report the group_wait_time accumulated till the last time it
got a timeslice and will not include the current delta.
- blkio.empty_time
- Debugging aid only enabled if CONFIG_DEBUG_BLK_CGROUP=y.
This is the amount of time a cgroup spends without any pending
requests when not being served, i.e., it does not include any time
spent idling for one of the queues of the cgroup. This is in
nanoseconds. If this is read when the cgroup is in an empty state,
the stat will only report the empty_time accumulated till the last
time it had a pending request and will not include the current delta.
- blkio.idle_time
- Debugging aid only enabled if CONFIG_DEBUG_BLK_CGROUP=y.
This is the amount of time spent by the IO scheduler idling for a
given cgroup in anticipation of a better request than the existing ones
from other queues/cgroups. This is in nanoseconds. If this is read
when the cgroup is in an idling state, the stat will only report the
idle_time accumulated till the last idle period and will not include
the current delta.
- blkio.dequeue
- Debugging aid only enabled if CONFIG_DEBUG_BLK_CGROUP=y. This
gives the statistics about how many a times a group was dequeued
from service tree of the device. First two fields specify the major
and minor number of the device and third field specifies the number
of times a group was dequeued from a particular device.
- blkio.*_recursive
- Recursive version of various stats. These files show the
same information as their non-recursive counterparts but
include stats from all the descendant cgroups.
Throttling/Upper limit policy files
-----------------------------------
- blkio.throttle.read_bps_device
- Specifies upper limit on READ rate from the device. IO rate is
specified in bytes per second. Rules are per device. Following is
the format.
echo "<major>:<minor> <rate_bytes_per_second>" > /cgrp/blkio.throttle.read_bps_device
- blkio.throttle.write_bps_device
- Specifies upper limit on WRITE rate to the device. IO rate is
specified in bytes per second. Rules are per device. Following is
the format.
echo "<major>:<minor> <rate_bytes_per_second>" > /cgrp/blkio.throttle.write_bps_device
- blkio.throttle.read_iops_device
- Specifies upper limit on READ rate from the device. IO rate is
specified in IO per second. Rules are per device. Following is
the format.
echo "<major>:<minor> <rate_io_per_second>" > /cgrp/blkio.throttle.read_iops_device
- blkio.throttle.write_iops_device
- Specifies upper limit on WRITE rate to the device. IO rate is
specified in io per second. Rules are per device. Following is
the format.
echo "<major>:<minor> <rate_io_per_second>" > /cgrp/blkio.throttle.write_iops_device
Note: If both BW and IOPS rules are specified for a device, then IO is
subjected to both the constraints.
- blkio.throttle.io_serviced
- Number of IOs (bio) issued to the disk by the group. These
are further divided by the type of operation - read or write, sync
or async. First two fields specify the major and minor number of the
device, third field specifies the operation type and the fourth field
specifies the number of IOs.
- blkio.throttle.io_service_bytes
- Number of bytes transferred to/from the disk by the group. These
are further divided by the type of operation - read or write, sync
or async. First two fields specify the major and minor number of the
device, third field specifies the operation type and the fourth field
specifies the number of bytes.
Common files among various policies
-----------------------------------
- blkio.reset_stats
- Writing an int to this file will result in resetting all the stats
for that cgroup.
CFQ sysfs tunable
=================
/sys/block/<disk>/queue/iosched/slice_idle
------------------------------------------
On a faster hardware CFQ can be slow, especially with sequential workload.
This happens because CFQ idles on a single queue and single queue might not
drive deeper request queue depths to keep the storage busy. In such scenarios
one can try setting slice_idle=0 and that would switch CFQ to IOPS
(IO operations per second) mode on NCQ supporting hardware.
That means CFQ will not idle between cfq queues of a cfq group and hence be
able to driver higher queue depth and achieve better throughput. That also
means that cfq provides fairness among groups in terms of IOPS and not in
terms of disk time.
/sys/block/<disk>/queue/iosched/group_idle
------------------------------------------
If one disables idling on individual cfq queues and cfq service trees by
setting slice_idle=0, group_idle kicks in. That means CFQ will still idle
on the group in an attempt to provide fairness among groups.
By default group_idle is same as slice_idle and does not do anything if
slice_idle is enabled.
One can experience an overall throughput drop if you have created multiple
groups and put applications in that group which are not driving enough
IO to keep disk busy. In that case set group_idle=0, and CFQ will not idle
on individual groups and throughput should improve.
此差异已折叠。
00-INDEX
- this file
blkio-controller.txt
- Description for Block IO Controller, implementation and usage details.
cgroups.txt
- Control Groups definition, implementation details, examples and API.
cpuacct.txt
- CPU Accounting Controller; account CPU usage for groups of tasks.
cpusets.txt
- documents the cpusets feature; assign CPUs and Mem to a set of tasks.
devices.txt
- Device Whitelist Controller; description, interface and security.
freezer-subsystem.txt
- checkpointing; rationale to not use signals, interface.
hugetlb.txt
- HugeTLB Controller implementation and usage details.
memcg_test.txt
- Memory Resource Controller; implementation details.
memory.txt
- Memory Resource Controller; design, accounting, interface, testing.
net_cls.txt
- Network classifier cgroups details and usages.
net_prio.txt
- Network priority cgroups details and usages.
pids.txt
- Process number cgroups details and usages.
resource_counter.txt
- Resource Counter API.
unified-hierarchy.txt
- Description the new/next cgroup interface.
此差异已折叠。
此差异已折叠。
...@@ -159,8 +159,8 @@ to be strictly associated with a P-state. ...@@ -159,8 +159,8 @@ to be strictly associated with a P-state.
2.2 cpuinfo_transition_latency: 2.2 cpuinfo_transition_latency:
------------------------------- -------------------------------
The cpuinfo_transition_latency field is 0. The PCC specification does The cpuinfo_transition_latency field is CPUFREQ_ETERNAL. The PCC specification
not include a field to expose this value currently. does not include a field to expose this value currently.
2.3 cpuinfo_cur_freq: 2.3 cpuinfo_cur_freq:
--------------------- ---------------------
......
...@@ -150,7 +150,7 @@ an entry as shown below in the output. ...@@ -150,7 +150,7 @@ an entry as shown below in the output.
If this is not mounted, do the following. If this is not mounted, do the following.
#mkdir /sysfs #mkdir /sys
#mount -t sysfs sys /sys #mount -t sysfs sys /sys
Now you should see entries for all present cpu, the following is an example Now you should see entries for all present cpu, the following is an example
......
...@@ -18,11 +18,11 @@ Construction Parameters ...@@ -18,11 +18,11 @@ Construction Parameters
0 is the original format used in the Chromium OS. 0 is the original format used in the Chromium OS.
The salt is appended when hashing, digests are stored continuously and The salt is appended when hashing, digests are stored continuously and
the rest of the block is padded with zeros. the rest of the block is padded with zeroes.
1 is the current format that should be used for new devices. 1 is the current format that should be used for new devices.
The salt is prepended when hashing and each digest is The salt is prepended when hashing and each digest is
padded with zeros to the power of two. padded with zeroes to the power of two.
<dev> <dev>
This is the device containing data, the integrity of which needs to be This is the device containing data, the integrity of which needs to be
...@@ -79,6 +79,37 @@ restart_on_corruption ...@@ -79,6 +79,37 @@ restart_on_corruption
not compatible with ignore_corruption and requires user space support to not compatible with ignore_corruption and requires user space support to
avoid restart loops. avoid restart loops.
ignore_zero_blocks
Do not verify blocks that are expected to contain zeroes and always return
zeroes instead. This may be useful if the partition contains unused blocks
that are not guaranteed to contain zeroes.
use_fec_from_device <fec_dev>
Use forward error correction (FEC) to recover from corruption if hash
verification fails. Use encoding data from the specified device. This
may be the same device where data and hash blocks reside, in which case
fec_start must be outside data and hash areas.
If the encoding data covers additional metadata, it must be accessible
on the hash device after the hash blocks.
Note: block sizes for data and hash devices must match. Also, if the
verity <dev> is encrypted the <fec_dev> should be too.
fec_roots <num>
Number of generator roots. This equals to the number of parity bytes in
the encoding data. For example, in RS(M, N) encoding, the number of roots
is M-N.
fec_blocks <num>
The number of encoding data blocks on the FEC device. The block size for
the FEC device is <data_block_size>.
fec_start <offset>
This is the offset, in <data_block_size> blocks, from the start of the
FEC device to the beginning of the encoding data.
Theory of operation Theory of operation
=================== ===================
...@@ -98,6 +129,11 @@ per-block basis. This allows for a lightweight hash computation on first read ...@@ -98,6 +129,11 @@ per-block basis. This allows for a lightweight hash computation on first read
into the page cache. Block hashes are stored linearly, aligned to the nearest into the page cache. Block hashes are stored linearly, aligned to the nearest
block size. block size.
If forward error correction (FEC) support is enabled any recovery of
corrupted data will be verified using the cryptographic hash of the
corresponding data. This is why combining error correction with
integrity checking is essential.
Hash Tree Hash Tree
--------- ---------
......
...@@ -63,7 +63,7 @@ Required properties: ...@@ -63,7 +63,7 @@ Required properties:
- compatible : should be "arm,juno-sram-ns" for Non-secure SRAM on Juno - compatible : should be "arm,juno-sram-ns" for Non-secure SRAM on Juno
The rest of the properties should follow the generic mmio-sram description The rest of the properties should follow the generic mmio-sram description
found in ../../misc/sysram.txt found in ../../sram/sram.txt
Each sub-node represents the reserved area for SCPI. Each sub-node represents the reserved area for SCPI.
......
...@@ -26,6 +26,10 @@ Raspberry Pi Model B+ ...@@ -26,6 +26,10 @@ Raspberry Pi Model B+
Required root node properties: Required root node properties:
compatible = "raspberrypi,model-b-plus", "brcm,bcm2835"; compatible = "raspberrypi,model-b-plus", "brcm,bcm2835";
Raspberry Pi 2 Model B
Required root node properties:
compatible = "raspberrypi,2-model-b", "brcm,bcm2836";
Raspberry Pi Compute Module Raspberry Pi Compute Module
Required root node properties: Required root node properties:
compatible = "raspberrypi,compute-module", "brcm,bcm2835"; compatible = "raspberrypi,compute-module", "brcm,bcm2835";
......
...@@ -131,6 +131,10 @@ Example: ...@@ -131,6 +131,10 @@ Example:
Freescale ARMv8 based Layerscape SoC family Device Tree Bindings Freescale ARMv8 based Layerscape SoC family Device Tree Bindings
---------------------------------------------------------------- ----------------------------------------------------------------
LS1043A ARMv8 based RDB Board
Required root node properties:
- compatible = "fsl,ls1043a-rdb", "fsl,ls1043a";
LS2080A ARMv8 based Simulator model LS2080A ARMv8 based Simulator model
Required root node properties: Required root node properties:
- compatible = "fsl,ls2080a-simu", "fsl,ls2080a"; - compatible = "fsl,ls2080a-simu", "fsl,ls2080a";
......
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册