Merge branch 'master' into queue
* master: (15791 commits) Linux 3.9-rc1 btrfs/raid56: Add missing #include <linux/vmalloc.h> fix compat_sys_rt_sigprocmask() SUNRPC: One line comment fix ext4: enable quotas before orphan cleanup ext4: don't allow quota mount options when quota feature enabled ext4: fix a warning from sparse check for ext4_dir_llseek ext4: convert number of blocks to clusters properly ext4: fix possible memory leak in ext4_remount() jbd2: fix ERR_PTR dereference in jbd2__journal_start metag: Provide dma_get_sgtable() metag: prom.h: remove declaration of metag_dt_memblock_reserve() metag: copy devicetree to non-init memory metag: cleanup metag_ksyms.c includes metag: move mm/init.c exports out of metag_ksyms.c metag: move usercopy.c exports out of metag_ksyms.c metag: move setup.c exports out of metag_ksyms.c metag: move kick.c exports out of metag_ksyms.c metag: move traps.c exports out of metag_ksyms.c metag: move irq enable out of irqflags.h on SMP ... Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com> Conflicts: arch/x86/kernel/kvmclock.c
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -60,7 +60,6 @@ modules.builtin
|
|||||||
# Generated include files
|
# Generated include files
|
||||||
#
|
#
|
||||||
include/config
|
include/config
|
||||||
include/linux/version.h
|
|
||||||
include/generated
|
include/generated
|
||||||
arch/*/include/generated
|
arch/*/include/generated
|
||||||
|
|
||||||
|
|||||||
8
CREDITS
8
CREDITS
@@ -1572,12 +1572,12 @@ S: Wantage, New Jersey 07461
|
|||||||
S: USA
|
S: USA
|
||||||
|
|
||||||
N: Harald Hoyer
|
N: Harald Hoyer
|
||||||
E: harald.hoyer@parzelle.de
|
E: harald@redhat.com
|
||||||
W: http://parzelle.de/
|
W: http://www.harald-hoyer.de
|
||||||
D: ip_masq_quake
|
D: ip_masq_quake
|
||||||
D: md boot support
|
D: md boot support
|
||||||
S: Hohe Strasse 30
|
S: Am Strand 5
|
||||||
S: D-70176 Stuttgart
|
S: D-19063 Schwerin
|
||||||
S: Germany
|
S: Germany
|
||||||
|
|
||||||
N: Jan Hubicka
|
N: Jan Hubicka
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
This is a brief list of all the files in ./linux/Documentation and what
|
This is a brief list of all the files in ./linux/Documentation and what
|
||||||
they contain. If you add a documentation file, please list it here in
|
they contain. If you add a documentation file, please list it here in
|
||||||
alphabetical order as well, or risk being hunted down like a rabid dog.
|
alphabetical order as well, or risk being hunted down like a rabid dog.
|
||||||
Please try and keep the descriptions small enough to fit on one line.
|
Please keep the descriptions small enough to fit on one line.
|
||||||
Thanks -- Paul G.
|
Thanks -- Paul G.
|
||||||
|
|
||||||
Following translations are available on the WWW:
|
Following translations are available on the WWW:
|
||||||
@@ -20,24 +20,33 @@ BUG-HUNTING
|
|||||||
Changes
|
Changes
|
||||||
- list of changes that break older software packages.
|
- list of changes that break older software packages.
|
||||||
CodingStyle
|
CodingStyle
|
||||||
- how the boss likes the C code in the kernel to look.
|
- how the maintainers expect the C code in the kernel to look.
|
||||||
development-process/
|
|
||||||
- An extended tutorial on how to work with the kernel development
|
|
||||||
process.
|
|
||||||
DMA-API.txt
|
DMA-API.txt
|
||||||
- DMA API, pci_ API & extensions for non-consistent memory machines.
|
- DMA API, pci_ API & extensions for non-consistent memory machines.
|
||||||
|
DMA-API-HOWTO.txt
|
||||||
|
- Dynamic DMA mapping Guide
|
||||||
DMA-ISA-LPC.txt
|
DMA-ISA-LPC.txt
|
||||||
- How to do DMA with ISA (and LPC) devices.
|
- How to do DMA with ISA (and LPC) devices.
|
||||||
|
DMA-attributes.txt
|
||||||
|
- listing of the various possible attributes a DMA region can have
|
||||||
DocBook/
|
DocBook/
|
||||||
- directory with DocBook templates etc. for kernel documentation.
|
- directory with DocBook templates etc. for kernel documentation.
|
||||||
|
EDID/
|
||||||
|
- directory with info on customizing EDID for broken gfx/displays.
|
||||||
HOWTO
|
HOWTO
|
||||||
- the process and procedures of how to do Linux kernel development.
|
- the process and procedures of how to do Linux kernel development.
|
||||||
IPMI.txt
|
IPMI.txt
|
||||||
- info on Linux Intelligent Platform Management Interface (IPMI) Driver.
|
- info on Linux Intelligent Platform Management Interface (IPMI) Driver.
|
||||||
IRQ-affinity.txt
|
IRQ-affinity.txt
|
||||||
- how to select which CPU(s) handle which interrupt events on SMP.
|
- how to select which CPU(s) handle which interrupt events on SMP.
|
||||||
|
IRQ-domain.txt
|
||||||
|
- info on inerrupt numbering and setting up IRQ domains.
|
||||||
IRQ.txt
|
IRQ.txt
|
||||||
- description of what an IRQ is.
|
- description of what an IRQ is.
|
||||||
|
Intel-IOMMU.txt
|
||||||
|
- basic info on the Intel IOMMU virtualization support.
|
||||||
|
Makefile
|
||||||
|
- some files in Documentation dir are actually sample code to build
|
||||||
ManagementStyle
|
ManagementStyle
|
||||||
- how to (attempt to) manage kernel hackers.
|
- how to (attempt to) manage kernel hackers.
|
||||||
RCU/
|
RCU/
|
||||||
@@ -66,10 +75,16 @@ applying-patches.txt
|
|||||||
- description of various trees and how to apply their patches.
|
- description of various trees and how to apply their patches.
|
||||||
arm/
|
arm/
|
||||||
- directory with info about Linux on the ARM architecture.
|
- directory with info about Linux on the ARM architecture.
|
||||||
|
arm64/
|
||||||
|
- directory with info about Linux on the 64 bit ARM architecture.
|
||||||
atomic_ops.txt
|
atomic_ops.txt
|
||||||
- semantics and behavior of atomic and bitmask operations.
|
- semantics and behavior of atomic and bitmask operations.
|
||||||
auxdisplay/
|
auxdisplay/
|
||||||
- misc. LCD driver documentation (cfag12864b, ks0108).
|
- misc. LCD driver documentation (cfag12864b, ks0108).
|
||||||
|
backlight/
|
||||||
|
- directory with info on controlling backlights in flat panel displays
|
||||||
|
bad_memory.txt
|
||||||
|
- how to use kernel parameters to exclude bad RAM regions.
|
||||||
basic_profiling.txt
|
basic_profiling.txt
|
||||||
- basic instructions for those who wants to profile Linux kernel.
|
- basic instructions for those who wants to profile Linux kernel.
|
||||||
binfmt_misc.txt
|
binfmt_misc.txt
|
||||||
@@ -80,8 +95,14 @@ block/
|
|||||||
- info on the Block I/O (BIO) layer.
|
- info on the Block I/O (BIO) layer.
|
||||||
blockdev/
|
blockdev/
|
||||||
- info on block devices & drivers
|
- info on block devices & drivers
|
||||||
|
braille-console.txt
|
||||||
|
- info on how to use serial devices for Braille support.
|
||||||
|
bt8xxgpio.txt
|
||||||
|
- info on how to modify a bt8xx video card for GPIO usage.
|
||||||
btmrvl.txt
|
btmrvl.txt
|
||||||
- info on Marvell Bluetooth driver usage.
|
- info on Marvell Bluetooth driver usage.
|
||||||
|
bus-devices/
|
||||||
|
- directory with info on TI GPMC (General Purpose Memory Controller)
|
||||||
bus-virt-phys-mapping.txt
|
bus-virt-phys-mapping.txt
|
||||||
- how to access I/O mapped memory from within device drivers.
|
- how to access I/O mapped memory from within device drivers.
|
||||||
cachetlb.txt
|
cachetlb.txt
|
||||||
@@ -90,6 +111,12 @@ cdrom/
|
|||||||
- directory with information on the CD-ROM drivers that Linux has.
|
- directory with information on the CD-ROM drivers that Linux has.
|
||||||
cgroups/
|
cgroups/
|
||||||
- cgroups features, including cpusets and memory controller.
|
- cgroups features, including cpusets and memory controller.
|
||||||
|
circular-buffers.txt
|
||||||
|
- how to make use of the existing circular buffer infrastructure
|
||||||
|
clk.txt
|
||||||
|
- info on the common clock framework
|
||||||
|
coccinelle.txt
|
||||||
|
- info on how to get and use the Coccinelle code checking tool.
|
||||||
connector/
|
connector/
|
||||||
- docs on the netlink based userspace<->kernel space communication mod.
|
- docs on the netlink based userspace<->kernel space communication mod.
|
||||||
console/
|
console/
|
||||||
@@ -114,40 +141,66 @@ dcdbas.txt
|
|||||||
- information on the Dell Systems Management Base Driver.
|
- information on the Dell Systems Management Base Driver.
|
||||||
debugging-modules.txt
|
debugging-modules.txt
|
||||||
- some notes on debugging modules after Linux 2.6.3.
|
- some notes on debugging modules after Linux 2.6.3.
|
||||||
|
debugging-via-ohci1394.txt
|
||||||
|
- how to use firewire like a hardware debugger memory reader.
|
||||||
dell_rbu.txt
|
dell_rbu.txt
|
||||||
- document demonstrating the use of the Dell Remote BIOS Update driver.
|
- document demonstrating the use of the Dell Remote BIOS Update driver.
|
||||||
|
development-process/
|
||||||
|
- how to work with the mainline kernel development process.
|
||||||
device-mapper/
|
device-mapper/
|
||||||
- directory with info on Device Mapper.
|
- directory with info on Device Mapper.
|
||||||
devices.txt
|
devices.txt
|
||||||
- plain ASCII listing of all the nodes in /dev/ with major minor #'s.
|
- plain ASCII listing of all the nodes in /dev/ with major minor #'s.
|
||||||
|
devicetree/
|
||||||
|
- directory with info on device tree files used by OF/PowerPC/ARM
|
||||||
|
digsig.txt
|
||||||
|
-info on the Digital Signature Verification API
|
||||||
|
dma-buf-sharing.txt
|
||||||
|
- the DMA Buffer Sharing API Guide
|
||||||
|
dmaengine.txt
|
||||||
|
-the DMA Engine API Guide
|
||||||
dontdiff
|
dontdiff
|
||||||
- file containing a list of files that should never be diff'ed.
|
- file containing a list of files that should never be diff'ed.
|
||||||
driver-model/
|
driver-model/
|
||||||
- directory with info about Linux driver model.
|
- directory with info about Linux driver model.
|
||||||
dvb/
|
dvb/
|
||||||
- info on Linux Digital Video Broadcast (DVB) subsystem.
|
- info on Linux Digital Video Broadcast (DVB) subsystem.
|
||||||
|
dynamic-debug-howto.txt
|
||||||
|
- how to use the dynamic debug (dyndbg) feature.
|
||||||
early-userspace/
|
early-userspace/
|
||||||
- info about initramfs, klibc, and userspace early during boot.
|
- info about initramfs, klibc, and userspace early during boot.
|
||||||
edac.txt
|
edac.txt
|
||||||
- information on EDAC - Error Detection And Correction
|
- information on EDAC - Error Detection And Correction
|
||||||
eisa.txt
|
eisa.txt
|
||||||
- info on EISA bus support.
|
- info on EISA bus support.
|
||||||
|
email-clients.txt
|
||||||
|
- info on how to use e-mail to send un-mangled (git) patches.
|
||||||
|
extcon/
|
||||||
|
- directory with porting guide for Android kernel switch driver.
|
||||||
fault-injection/
|
fault-injection/
|
||||||
- dir with docs about the fault injection capabilities infrastructure.
|
- dir with docs about the fault injection capabilities infrastructure.
|
||||||
fb/
|
fb/
|
||||||
- directory with info on the frame buffer graphics abstraction layer.
|
- directory with info on the frame buffer graphics abstraction layer.
|
||||||
feature-removal-schedule.txt
|
|
||||||
- list of files and features that are going to be removed.
|
|
||||||
filesystems/
|
filesystems/
|
||||||
- info on the vfs and the various filesystems that Linux supports.
|
- info on the vfs and the various filesystems that Linux supports.
|
||||||
firmware_class/
|
firmware_class/
|
||||||
- request_firmware() hotplug interface info.
|
- request_firmware() hotplug interface info.
|
||||||
|
flexible-arrays.txt
|
||||||
|
- how to make use of flexible sized arrays in linux
|
||||||
frv/
|
frv/
|
||||||
- Fujitsu FR-V Linux documentation.
|
- Fujitsu FR-V Linux documentation.
|
||||||
|
futex-requeue-pi.txt
|
||||||
|
- info on requeueing of tasks from a non-PI futex to a PI futex
|
||||||
|
gcov.txt
|
||||||
|
- use of GCC's coverage testing tool "gcov" with the Linux kernel
|
||||||
gpio.txt
|
gpio.txt
|
||||||
- overview of GPIO (General Purpose Input/Output) access conventions.
|
- overview of GPIO (General Purpose Input/Output) access conventions.
|
||||||
|
hid/
|
||||||
|
- directory with information on human interface devices
|
||||||
highuid.txt
|
highuid.txt
|
||||||
- notes on the change from 16 bit to 32 bit user/group IDs.
|
- notes on the change from 16 bit to 32 bit user/group IDs.
|
||||||
|
hwspinlock.txt
|
||||||
|
- hardware spinlock provides hardware assistance for synchronization
|
||||||
timers/
|
timers/
|
||||||
- info on the timer related topics
|
- info on the timer related topics
|
||||||
hw_random.txt
|
hw_random.txt
|
||||||
@@ -164,10 +217,14 @@ ia64/
|
|||||||
- directory with info about Linux on Intel 64 bit architecture.
|
- directory with info about Linux on Intel 64 bit architecture.
|
||||||
infiniband/
|
infiniband/
|
||||||
- directory with documents concerning Linux InfiniBand support.
|
- directory with documents concerning Linux InfiniBand support.
|
||||||
|
init.txt
|
||||||
|
- what to do when the kernel can't find the 1st process to run.
|
||||||
initrd.txt
|
initrd.txt
|
||||||
- how to use the RAM disk as an initial/temporary root filesystem.
|
- how to use the RAM disk as an initial/temporary root filesystem.
|
||||||
input/
|
input/
|
||||||
- info on Linux input device support.
|
- info on Linux input device support.
|
||||||
|
intel_txt.txt
|
||||||
|
- info on intel Trusted Execution Technology (intel TXT).
|
||||||
io-mapping.txt
|
io-mapping.txt
|
||||||
- description of io_mapping functions in linux/io-mapping.h
|
- description of io_mapping functions in linux/io-mapping.h
|
||||||
io_ordering.txt
|
io_ordering.txt
|
||||||
@@ -184,6 +241,8 @@ isdn/
|
|||||||
- directory with info on the Linux ISDN support, and supported cards.
|
- directory with info on the Linux ISDN support, and supported cards.
|
||||||
java.txt
|
java.txt
|
||||||
- info on the in-kernel binary support for Java(tm).
|
- info on the in-kernel binary support for Java(tm).
|
||||||
|
ja_JP/
|
||||||
|
- directory with Japanese translations of various documents
|
||||||
kbuild/
|
kbuild/
|
||||||
- directory with info about the kernel build process.
|
- directory with info about the kernel build process.
|
||||||
kdump/
|
kdump/
|
||||||
@@ -194,6 +253,12 @@ kernel-docs.txt
|
|||||||
- listing of various WWW + books that document kernel internals.
|
- listing of various WWW + books that document kernel internals.
|
||||||
kernel-parameters.txt
|
kernel-parameters.txt
|
||||||
- summary listing of command line / boot prompt args for the kernel.
|
- summary listing of command line / boot prompt args for the kernel.
|
||||||
|
kmemcheck.txt
|
||||||
|
- info on dynamic checker that detects uses of uninitialized memory.
|
||||||
|
kmemleak.txt
|
||||||
|
- info on how to make use of the kernel memory leak detection system
|
||||||
|
ko_KR/
|
||||||
|
- directory with Korean translations of various documents
|
||||||
kobject.txt
|
kobject.txt
|
||||||
- info of the kobject infrastructure of the Linux kernel.
|
- info of the kobject infrastructure of the Linux kernel.
|
||||||
kprobes.txt
|
kprobes.txt
|
||||||
@@ -210,6 +275,8 @@ local_ops.txt
|
|||||||
- semantics and behavior of local atomic operations.
|
- semantics and behavior of local atomic operations.
|
||||||
lockdep-design.txt
|
lockdep-design.txt
|
||||||
- documentation on the runtime locking correctness validator.
|
- documentation on the runtime locking correctness validator.
|
||||||
|
lockstat.txt
|
||||||
|
- info on collecting statistics on locks (and contention).
|
||||||
lockup-watchdogs.txt
|
lockup-watchdogs.txt
|
||||||
- info on soft and hard lockup detectors (aka nmi_watchdog).
|
- info on soft and hard lockup detectors (aka nmi_watchdog).
|
||||||
logo.gif
|
logo.gif
|
||||||
@@ -222,16 +289,28 @@ magic-number.txt
|
|||||||
- list of magic numbers used to mark/protect kernel data structures.
|
- list of magic numbers used to mark/protect kernel data structures.
|
||||||
md.txt
|
md.txt
|
||||||
- info on boot arguments for the multiple devices driver.
|
- info on boot arguments for the multiple devices driver.
|
||||||
|
media-framework.txt
|
||||||
|
- info on media framework, its data structures, functions and usage.
|
||||||
memory-barriers.txt
|
memory-barriers.txt
|
||||||
- info on Linux kernel memory barriers.
|
- info on Linux kernel memory barriers.
|
||||||
|
memory-devices/
|
||||||
|
- directory with info on parts like the Texas Instruments EMIF driver
|
||||||
memory-hotplug.txt
|
memory-hotplug.txt
|
||||||
- Hotpluggable memory support, how to use and current status.
|
- Hotpluggable memory support, how to use and current status.
|
||||||
memory.txt
|
memory.txt
|
||||||
- info on typical Linux memory problems.
|
- info on typical Linux memory problems.
|
||||||
|
metag/
|
||||||
|
- directory with info about Linux on Meta architecture.
|
||||||
mips/
|
mips/
|
||||||
- directory with info about Linux on MIPS architecture.
|
- directory with info about Linux on MIPS architecture.
|
||||||
|
misc-devices/
|
||||||
|
- directory with info about devices using the misc dev subsystem
|
||||||
mmc/
|
mmc/
|
||||||
- directory with info about the MMC subsystem
|
- directory with info about the MMC subsystem
|
||||||
|
mn10300/
|
||||||
|
- directory with info about the mn10300 architecture port
|
||||||
|
mtd/
|
||||||
|
- directory with info about memory technology devices (flash)
|
||||||
mono.txt
|
mono.txt
|
||||||
- how to execute Mono-based .NET binaries with the help of BINFMT_MISC.
|
- how to execute Mono-based .NET binaries with the help of BINFMT_MISC.
|
||||||
mutex-design.txt
|
mutex-design.txt
|
||||||
@@ -242,6 +321,8 @@ netlabel/
|
|||||||
- directory with information on the NetLabel subsystem.
|
- directory with information on the NetLabel subsystem.
|
||||||
networking/
|
networking/
|
||||||
- directory with info on various aspects of networking with Linux.
|
- directory with info on various aspects of networking with Linux.
|
||||||
|
nfc/
|
||||||
|
- directory relating info about Near Field Communications support.
|
||||||
nommu-mmap.txt
|
nommu-mmap.txt
|
||||||
- documentation about no-mmu memory mapping support.
|
- documentation about no-mmu memory mapping support.
|
||||||
numastat.txt
|
numastat.txt
|
||||||
@@ -258,26 +339,46 @@ parport-lowlevel.txt
|
|||||||
- description and usage of the low level parallel port functions.
|
- description and usage of the low level parallel port functions.
|
||||||
pcmcia/
|
pcmcia/
|
||||||
- info on the Linux PCMCIA driver.
|
- info on the Linux PCMCIA driver.
|
||||||
|
percpu-rw-semaphore.txt
|
||||||
|
- RCU based read-write semaphore optimized for locking for reading
|
||||||
pi-futex.txt
|
pi-futex.txt
|
||||||
- documentation on lightweight PI-futexes.
|
- documentation on lightweight priority inheritance futexes.
|
||||||
|
pinctrl.txt
|
||||||
|
- info on pinctrl subsystem and the PINMUX/PINCONF and drivers
|
||||||
pnp.txt
|
pnp.txt
|
||||||
- Linux Plug and Play documentation.
|
- Linux Plug and Play documentation.
|
||||||
power/
|
power/
|
||||||
- directory with info on Linux PCI power management.
|
- directory with info on Linux PCI power management.
|
||||||
powerpc/
|
powerpc/
|
||||||
- directory with info on using Linux with the PowerPC.
|
- directory with info on using Linux with the PowerPC.
|
||||||
|
prctl/
|
||||||
|
- directory with info on the priveledge control subsystem
|
||||||
preempt-locking.txt
|
preempt-locking.txt
|
||||||
- info on locking under a preemptive kernel.
|
- info on locking under a preemptive kernel.
|
||||||
printk-formats.txt
|
printk-formats.txt
|
||||||
- how to get printk format specifiers right
|
- how to get printk format specifiers right
|
||||||
|
pps/
|
||||||
|
- directory with information on the pulse-per-second support
|
||||||
|
ptp/
|
||||||
|
- directory with info on support for IEEE 1588 PTP clocks in Linux.
|
||||||
|
pwm.txt
|
||||||
|
- info on the pulse width modulation driver subsystem
|
||||||
ramoops.txt
|
ramoops.txt
|
||||||
- documentation of the ramoops oops/panic logging module.
|
- documentation of the ramoops oops/panic logging module.
|
||||||
|
rapidio/
|
||||||
|
- directory with info on RapidIO packet-based fabric interconnect
|
||||||
rbtree.txt
|
rbtree.txt
|
||||||
- info on what red-black trees are and what they are for.
|
- info on what red-black trees are and what they are for.
|
||||||
|
remoteproc.txt
|
||||||
|
- info on how to handle remote processor (e.g. AMP) offloads/usage.
|
||||||
|
rfkill.txt
|
||||||
|
- info on the radio frequency kill switch subsystem/support.
|
||||||
robust-futex-ABI.txt
|
robust-futex-ABI.txt
|
||||||
- documentation of the robust futex ABI.
|
- documentation of the robust futex ABI.
|
||||||
robust-futexes.txt
|
robust-futexes.txt
|
||||||
- a description of what robust futexes are.
|
- a description of what robust futexes are.
|
||||||
|
rpmsg.txt
|
||||||
|
- info on the Remote Processor Messaging (rpmsg) Framework
|
||||||
rt-mutex-design.txt
|
rt-mutex-design.txt
|
||||||
- description of the RealTime mutex implementation design.
|
- description of the RealTime mutex implementation design.
|
||||||
rt-mutex.txt
|
rt-mutex.txt
|
||||||
@@ -302,10 +403,10 @@ sgi-visws.txt
|
|||||||
- short blurb on the SGI Visual Workstations.
|
- short blurb on the SGI Visual Workstations.
|
||||||
sh/
|
sh/
|
||||||
- directory with info on porting Linux to a new architecture.
|
- directory with info on porting Linux to a new architecture.
|
||||||
|
smsc_ece1099.txt
|
||||||
|
-info on the smsc Keyboard Scan Expansion/GPIO Expansion device.
|
||||||
sound/
|
sound/
|
||||||
- directory with info on sound card support.
|
- directory with info on sound card support.
|
||||||
sparc/
|
|
||||||
- directory with info on using Linux on Sparc architecture.
|
|
||||||
sparse.txt
|
sparse.txt
|
||||||
- info on how to obtain and use the sparse tool for typechecking.
|
- info on how to obtain and use the sparse tool for typechecking.
|
||||||
spi/
|
spi/
|
||||||
@@ -316,6 +417,8 @@ stable_api_nonsense.txt
|
|||||||
- info on why the kernel does not have a stable in-kernel api or abi.
|
- info on why the kernel does not have a stable in-kernel api or abi.
|
||||||
stable_kernel_rules.txt
|
stable_kernel_rules.txt
|
||||||
- rules and procedures for the -stable kernel releases.
|
- rules and procedures for the -stable kernel releases.
|
||||||
|
static-keys.txt
|
||||||
|
- info on how static keys allow debug code in hotpaths via patching
|
||||||
svga.txt
|
svga.txt
|
||||||
- short guide on selecting video modes at boot via VGA BIOS.
|
- short guide on selecting video modes at boot via VGA BIOS.
|
||||||
sysfs-rules.txt
|
sysfs-rules.txt
|
||||||
@@ -324,27 +427,53 @@ sysctl/
|
|||||||
- directory with info on the /proc/sys/* files.
|
- directory with info on the /proc/sys/* files.
|
||||||
sysrq.txt
|
sysrq.txt
|
||||||
- info on the magic SysRq key.
|
- info on the magic SysRq key.
|
||||||
telephony/
|
target/
|
||||||
- directory with info on telephony (e.g. voice over IP) support.
|
- directory with info on generating TCM v4 fabric .ko modules
|
||||||
|
thermal/
|
||||||
|
- directory with information on managing thermal issues (CPU/temp)
|
||||||
|
trace/
|
||||||
|
- directory with info on tracing technologies within linux
|
||||||
|
unaligned-memory-access.txt
|
||||||
|
- info on how to avoid arch breaking unaligned memory access in code.
|
||||||
unicode.txt
|
unicode.txt
|
||||||
- info on the Unicode character/font mapping used in Linux.
|
- info on the Unicode character/font mapping used in Linux.
|
||||||
unshare.txt
|
unshare.txt
|
||||||
- description of the Linux unshare system call.
|
- description of the Linux unshare system call.
|
||||||
usb/
|
usb/
|
||||||
- directory with info regarding the Universal Serial Bus.
|
- directory with info regarding the Universal Serial Bus.
|
||||||
|
vDSO/
|
||||||
|
- directory with info regarding virtual dynamic shared objects
|
||||||
|
vfio.txt
|
||||||
|
- info on Virtual Function I/O used in guest/hypervisor instances.
|
||||||
|
vgaarbiter.txt
|
||||||
|
- info on enable/disable the legacy decoding on different VGA devices
|
||||||
video-output.txt
|
video-output.txt
|
||||||
- sysfs class driver interface to enable/disable a video output device.
|
- sysfs class driver interface to enable/disable a video output device.
|
||||||
video4linux/
|
video4linux/
|
||||||
- directory with info regarding video/TV/radio cards and linux.
|
- directory with info regarding video/TV/radio cards and linux.
|
||||||
|
virtual/
|
||||||
|
- directory with information on the various linux virtualizations.
|
||||||
vm/
|
vm/
|
||||||
- directory with info on the Linux vm code.
|
- directory with info on the Linux vm code.
|
||||||
|
vme_api.txt
|
||||||
|
- file relating info on the VME bus API in linux
|
||||||
volatile-considered-harmful.txt
|
volatile-considered-harmful.txt
|
||||||
- Why the "volatile" type class should not be used
|
- Why the "volatile" type class should not be used
|
||||||
w1/
|
w1/
|
||||||
- directory with documents regarding the 1-wire (w1) subsystem.
|
- directory with documents regarding the 1-wire (w1) subsystem.
|
||||||
watchdog/
|
watchdog/
|
||||||
- how to auto-reboot Linux if it has "fallen and can't get up". ;-)
|
- how to auto-reboot Linux if it has "fallen and can't get up". ;-)
|
||||||
|
wimax/
|
||||||
|
- directory with info about Intel Wireless Wimax Connections
|
||||||
|
workqueue.txt
|
||||||
|
- information on the Concurrency Managed Workqueue implementation
|
||||||
x86/x86_64/
|
x86/x86_64/
|
||||||
- directory with info on Linux support for AMD x86-64 (Hammer) machines.
|
- directory with info on Linux support for AMD x86-64 (Hammer) machines.
|
||||||
|
xtensa/
|
||||||
|
- directory with documents relating to arch/xtensa port/implementation
|
||||||
|
xz.txt
|
||||||
|
- how to make use of the XZ data compression within linux kernel
|
||||||
|
zh_CN/
|
||||||
|
- directory with Chinese translations of various documents
|
||||||
zorro.txt
|
zorro.txt
|
||||||
- info on writing drivers for Zorro bus devices found on Amigas.
|
- info on writing drivers for Zorro bus devices found on Amigas.
|
||||||
|
|||||||
@@ -36,9 +36,6 @@ The different levels of stability are:
|
|||||||
the kernel, but are marked to be removed at some later point in
|
the kernel, but are marked to be removed at some later point in
|
||||||
time. The description of the interface will document the reason
|
time. The description of the interface will document the reason
|
||||||
why it is obsolete and when it can be expected to be removed.
|
why it is obsolete and when it can be expected to be removed.
|
||||||
The file Documentation/feature-removal-schedule.txt may describe
|
|
||||||
some of these interfaces, giving a schedule for when they will
|
|
||||||
be removed.
|
|
||||||
|
|
||||||
removed/
|
removed/
|
||||||
This directory contains a list of the old interfaces that have
|
This directory contains a list of the old interfaces that have
|
||||||
|
|||||||
185
Documentation/ABI/stable/sysfs-class-tpm
Normal file
185
Documentation/ABI/stable/sysfs-class-tpm
Normal file
@@ -0,0 +1,185 @@
|
|||||||
|
What: /sys/class/misc/tpmX/device/
|
||||||
|
Date: April 2005
|
||||||
|
KernelVersion: 2.6.12
|
||||||
|
Contact: tpmdd-devel@lists.sf.net
|
||||||
|
Description: The device/ directory under a specific TPM instance exposes
|
||||||
|
the properties of that TPM chip
|
||||||
|
|
||||||
|
|
||||||
|
What: /sys/class/misc/tpmX/device/active
|
||||||
|
Date: April 2006
|
||||||
|
KernelVersion: 2.6.17
|
||||||
|
Contact: tpmdd-devel@lists.sf.net
|
||||||
|
Description: The "active" property prints a '1' if the TPM chip is accepting
|
||||||
|
commands. An inactive TPM chip still contains all the state of
|
||||||
|
an active chip (Storage Root Key, NVRAM, etc), and can be
|
||||||
|
visible to the OS, but will only accept a restricted set of
|
||||||
|
commands. See the TPM Main Specification part 2, Structures,
|
||||||
|
section 17 for more information on which commands are
|
||||||
|
available.
|
||||||
|
|
||||||
|
What: /sys/class/misc/tpmX/device/cancel
|
||||||
|
Date: June 2005
|
||||||
|
KernelVersion: 2.6.13
|
||||||
|
Contact: tpmdd-devel@lists.sf.net
|
||||||
|
Description: The "cancel" property allows you to cancel the currently
|
||||||
|
pending TPM command. Writing any value to cancel will call the
|
||||||
|
TPM vendor specific cancel operation.
|
||||||
|
|
||||||
|
What: /sys/class/misc/tpmX/device/caps
|
||||||
|
Date: April 2005
|
||||||
|
KernelVersion: 2.6.12
|
||||||
|
Contact: tpmdd-devel@lists.sf.net
|
||||||
|
Description: The "caps" property contains TPM manufacturer and version info.
|
||||||
|
|
||||||
|
Example output:
|
||||||
|
|
||||||
|
Manufacturer: 0x53544d20
|
||||||
|
TCG version: 1.2
|
||||||
|
Firmware version: 8.16
|
||||||
|
|
||||||
|
Manufacturer is a hex dump of the 4 byte manufacturer info
|
||||||
|
space in a TPM. TCG version shows the TCG TPM spec level that
|
||||||
|
the chip supports. Firmware version is that of the chip and
|
||||||
|
is manufacturer specific.
|
||||||
|
|
||||||
|
What: /sys/class/misc/tpmX/device/durations
|
||||||
|
Date: March 2011
|
||||||
|
KernelVersion: 3.1
|
||||||
|
Contact: tpmdd-devel@lists.sf.net
|
||||||
|
Description: The "durations" property shows the 3 vendor-specific values
|
||||||
|
used to wait for a short, medium and long TPM command. All
|
||||||
|
TPM commands are categorized as short, medium or long in
|
||||||
|
execution time, so that the driver doesn't have to wait
|
||||||
|
any longer than necessary before starting to poll for a
|
||||||
|
result.
|
||||||
|
|
||||||
|
Example output:
|
||||||
|
|
||||||
|
3015000 4508000 180995000 [original]
|
||||||
|
|
||||||
|
Here the short, medium and long durations are displayed in
|
||||||
|
usecs. "[original]" indicates that the values are displayed
|
||||||
|
unmodified from when they were queried from the chip.
|
||||||
|
Durations can be modified in the case where a buggy chip
|
||||||
|
reports them in msec instead of usec and they need to be
|
||||||
|
scaled to be displayed in usecs. In this case "[adjusted]"
|
||||||
|
will be displayed in place of "[original]".
|
||||||
|
|
||||||
|
What: /sys/class/misc/tpmX/device/enabled
|
||||||
|
Date: April 2006
|
||||||
|
KernelVersion: 2.6.17
|
||||||
|
Contact: tpmdd-devel@lists.sf.net
|
||||||
|
Description: The "enabled" property prints a '1' if the TPM chip is enabled,
|
||||||
|
meaning that it should be visible to the OS. This property
|
||||||
|
may be visible but produce a '0' after some operation that
|
||||||
|
disables the TPM.
|
||||||
|
|
||||||
|
What: /sys/class/misc/tpmX/device/owned
|
||||||
|
Date: April 2006
|
||||||
|
KernelVersion: 2.6.17
|
||||||
|
Contact: tpmdd-devel@lists.sf.net
|
||||||
|
Description: The "owned" property produces a '1' if the TPM_TakeOwnership
|
||||||
|
ordinal has been executed successfully in the chip. A '0'
|
||||||
|
indicates that ownership hasn't been taken.
|
||||||
|
|
||||||
|
What: /sys/class/misc/tpmX/device/pcrs
|
||||||
|
Date: April 2005
|
||||||
|
KernelVersion: 2.6.12
|
||||||
|
Contact: tpmdd-devel@lists.sf.net
|
||||||
|
Description: The "pcrs" property will dump the current value of all Platform
|
||||||
|
Configuration Registers in the TPM. Note that since these
|
||||||
|
values may be constantly changing, the output is only valid
|
||||||
|
for a snapshot in time.
|
||||||
|
|
||||||
|
Example output:
|
||||||
|
|
||||||
|
PCR-00: 3A 3F 78 0F 11 A4 B4 99 69 FC AA 80 CD 6E 39 57 C3 3B 22 75
|
||||||
|
PCR-01: 3A 3F 78 0F 11 A4 B4 99 69 FC AA 80 CD 6E 39 57 C3 3B 22 75
|
||||||
|
PCR-02: 3A 3F 78 0F 11 A4 B4 99 69 FC AA 80 CD 6E 39 57 C3 3B 22 75
|
||||||
|
PCR-03: 3A 3F 78 0F 11 A4 B4 99 69 FC AA 80 CD 6E 39 57 C3 3B 22 75
|
||||||
|
PCR-04: 3A 3F 78 0F 11 A4 B4 99 69 FC AA 80 CD 6E 39 57 C3 3B 22 75
|
||||||
|
...
|
||||||
|
|
||||||
|
The number of PCRs and hex bytes needed to represent a PCR
|
||||||
|
value will vary depending on TPM chip version. For TPM 1.1 and
|
||||||
|
1.2 chips, PCRs represent SHA-1 hashes, which are 20 bytes
|
||||||
|
long. Use the "caps" property to determine TPM version.
|
||||||
|
|
||||||
|
What: /sys/class/misc/tpmX/device/pubek
|
||||||
|
Date: April 2005
|
||||||
|
KernelVersion: 2.6.12
|
||||||
|
Contact: tpmdd-devel@lists.sf.net
|
||||||
|
Description: The "pubek" property will return the TPM's public endorsement
|
||||||
|
key if possible. If the TPM has had ownership established and
|
||||||
|
is version 1.2, the pubek will not be available without the
|
||||||
|
owner's authorization. Since the TPM driver doesn't store any
|
||||||
|
secrets, it can't authorize its own request for the pubek,
|
||||||
|
making it unaccessible. The public endorsement key is gener-
|
||||||
|
ated at TPM menufacture time and exists for the life of the
|
||||||
|
chip.
|
||||||
|
|
||||||
|
Example output:
|
||||||
|
|
||||||
|
Algorithm: 00 00 00 01
|
||||||
|
Encscheme: 00 03
|
||||||
|
Sigscheme: 00 01
|
||||||
|
Parameters: 00 00 08 00 00 00 00 02 00 00 00 00
|
||||||
|
Modulus length: 256
|
||||||
|
Modulus:
|
||||||
|
B4 76 41 82 C9 20 2C 10 18 40 BC 8B E5 44 4C 6C
|
||||||
|
3A B2 92 0C A4 9B 2A 83 EB 5C 12 85 04 48 A0 B6
|
||||||
|
1E E4 81 84 CE B2 F2 45 1C F0 85 99 61 02 4D EB
|
||||||
|
86 C4 F7 F3 29 60 52 93 6B B2 E5 AB 8B A9 09 E3
|
||||||
|
D7 0E 7D CA 41 BF 43 07 65 86 3C 8C 13 7A D0 8B
|
||||||
|
82 5E 96 0B F8 1F 5F 34 06 DA A2 52 C1 A9 D5 26
|
||||||
|
0F F4 04 4B D9 3F 2D F2 AC 2F 74 64 1F 8B CD 3E
|
||||||
|
1E 30 38 6C 70 63 69 AB E2 50 DF 49 05 2E E1 8D
|
||||||
|
6F 78 44 DA 57 43 69 EE 76 6C 38 8A E9 8E A3 F0
|
||||||
|
A7 1F 3C A8 D0 12 15 3E CA 0E BD FA 24 CD 33 C6
|
||||||
|
47 AE A4 18 83 8E 22 39 75 93 86 E6 FD 66 48 B6
|
||||||
|
10 AD 94 14 65 F9 6A 17 78 BD 16 53 84 30 BF 70
|
||||||
|
E0 DC 65 FD 3C C6 B0 1E BF B9 C1 B5 6C EF B1 3A
|
||||||
|
F8 28 05 83 62 26 11 DC B4 6B 5A 97 FF 32 26 B6
|
||||||
|
F7 02 71 CF 15 AE 16 DD D1 C1 8E A8 CF 9B 50 7B
|
||||||
|
C3 91 FF 44 1E CF 7C 39 FE 17 77 21 20 BD CE 9B
|
||||||
|
|
||||||
|
Possible values:
|
||||||
|
|
||||||
|
Algorithm: TPM_ALG_RSA (1)
|
||||||
|
Encscheme: TPM_ES_RSAESPKCSv15 (2)
|
||||||
|
TPM_ES_RSAESOAEP_SHA1_MGF1 (3)
|
||||||
|
Sigscheme: TPM_SS_NONE (1)
|
||||||
|
Parameters, a byte string of 3 u32 values:
|
||||||
|
Key Length (bits): 00 00 08 00 (2048)
|
||||||
|
Num primes: 00 00 00 02 (2)
|
||||||
|
Exponent Size: 00 00 00 00 (0 means the
|
||||||
|
default exp)
|
||||||
|
Modulus Length: 256 (bytes)
|
||||||
|
Modulus: The 256 byte Endorsement Key modulus
|
||||||
|
|
||||||
|
What: /sys/class/misc/tpmX/device/temp_deactivated
|
||||||
|
Date: April 2006
|
||||||
|
KernelVersion: 2.6.17
|
||||||
|
Contact: tpmdd-devel@lists.sf.net
|
||||||
|
Description: The "temp_deactivated" property returns a '1' if the chip has
|
||||||
|
been temporarily dectivated, usually until the next power
|
||||||
|
cycle. Whether a warm boot (reboot) will clear a TPM chip
|
||||||
|
from a temp_deactivated state is platform specific.
|
||||||
|
|
||||||
|
What: /sys/class/misc/tpmX/device/timeouts
|
||||||
|
Date: March 2011
|
||||||
|
KernelVersion: 3.1
|
||||||
|
Contact: tpmdd-devel@lists.sf.net
|
||||||
|
Description: The "timeouts" property shows the 4 vendor-specific values
|
||||||
|
for the TPM's interface spec timeouts. The use of these
|
||||||
|
timeouts is defined by the TPM interface spec that the chip
|
||||||
|
conforms to.
|
||||||
|
|
||||||
|
Example output:
|
||||||
|
|
||||||
|
750000 750000 750000 750000 [original]
|
||||||
|
|
||||||
|
The four timeout values are shown in usecs, with a trailing
|
||||||
|
"[original]" or "[adjusted]" depending on whether the values
|
||||||
|
were scaled by the driver to be reported in usec from msecs.
|
||||||
@@ -1,7 +1,101 @@
|
|||||||
|
What: /sys/devices/system/node/possible
|
||||||
|
Date: October 2002
|
||||||
|
Contact: Linux Memory Management list <linux-mm@kvack.org>
|
||||||
|
Description:
|
||||||
|
Nodes that could be possibly become online at some point.
|
||||||
|
|
||||||
|
What: /sys/devices/system/node/online
|
||||||
|
Date: October 2002
|
||||||
|
Contact: Linux Memory Management list <linux-mm@kvack.org>
|
||||||
|
Description:
|
||||||
|
Nodes that are online.
|
||||||
|
|
||||||
|
What: /sys/devices/system/node/has_normal_memory
|
||||||
|
Date: October 2002
|
||||||
|
Contact: Linux Memory Management list <linux-mm@kvack.org>
|
||||||
|
Description:
|
||||||
|
Nodes that have regular memory.
|
||||||
|
|
||||||
|
What: /sys/devices/system/node/has_cpu
|
||||||
|
Date: October 2002
|
||||||
|
Contact: Linux Memory Management list <linux-mm@kvack.org>
|
||||||
|
Description:
|
||||||
|
Nodes that have one or more CPUs.
|
||||||
|
|
||||||
|
What: /sys/devices/system/node/has_high_memory
|
||||||
|
Date: October 2002
|
||||||
|
Contact: Linux Memory Management list <linux-mm@kvack.org>
|
||||||
|
Description:
|
||||||
|
Nodes that have regular or high memory.
|
||||||
|
Depends on CONFIG_HIGHMEM.
|
||||||
|
|
||||||
What: /sys/devices/system/node/nodeX
|
What: /sys/devices/system/node/nodeX
|
||||||
Date: October 2002
|
Date: October 2002
|
||||||
Contact: Linux Memory Management list <linux-mm@kvack.org>
|
Contact: Linux Memory Management list <linux-mm@kvack.org>
|
||||||
Description:
|
Description:
|
||||||
When CONFIG_NUMA is enabled, this is a directory containing
|
When CONFIG_NUMA is enabled, this is a directory containing
|
||||||
information on node X such as what CPUs are local to the
|
information on node X such as what CPUs are local to the
|
||||||
node.
|
node. Each file is detailed next.
|
||||||
|
|
||||||
|
What: /sys/devices/system/node/nodeX/cpumap
|
||||||
|
Date: October 2002
|
||||||
|
Contact: Linux Memory Management list <linux-mm@kvack.org>
|
||||||
|
Description:
|
||||||
|
The node's cpumap.
|
||||||
|
|
||||||
|
What: /sys/devices/system/node/nodeX/cpulist
|
||||||
|
Date: October 2002
|
||||||
|
Contact: Linux Memory Management list <linux-mm@kvack.org>
|
||||||
|
Description:
|
||||||
|
The CPUs associated to the node.
|
||||||
|
|
||||||
|
What: /sys/devices/system/node/nodeX/meminfo
|
||||||
|
Date: October 2002
|
||||||
|
Contact: Linux Memory Management list <linux-mm@kvack.org>
|
||||||
|
Description:
|
||||||
|
Provides information about the node's distribution and memory
|
||||||
|
utilization. Similar to /proc/meminfo, see Documentation/filesystems/proc.txt
|
||||||
|
|
||||||
|
What: /sys/devices/system/node/nodeX/numastat
|
||||||
|
Date: October 2002
|
||||||
|
Contact: Linux Memory Management list <linux-mm@kvack.org>
|
||||||
|
Description:
|
||||||
|
The node's hit/miss statistics, in units of pages.
|
||||||
|
See Documentation/numastat.txt
|
||||||
|
|
||||||
|
What: /sys/devices/system/node/nodeX/distance
|
||||||
|
Date: October 2002
|
||||||
|
Contact: Linux Memory Management list <linux-mm@kvack.org>
|
||||||
|
Description:
|
||||||
|
Distance between the node and all the other nodes
|
||||||
|
in the system.
|
||||||
|
|
||||||
|
What: /sys/devices/system/node/nodeX/vmstat
|
||||||
|
Date: October 2002
|
||||||
|
Contact: Linux Memory Management list <linux-mm@kvack.org>
|
||||||
|
Description:
|
||||||
|
The node's zoned virtual memory statistics.
|
||||||
|
This is a superset of numastat.
|
||||||
|
|
||||||
|
What: /sys/devices/system/node/nodeX/compact
|
||||||
|
Date: February 2010
|
||||||
|
Contact: Mel Gorman <mel@csn.ul.ie>
|
||||||
|
Description:
|
||||||
|
When this file is written to, all memory within that node
|
||||||
|
will be compacted. When it completes, memory will be freed
|
||||||
|
into blocks which have as many contiguous pages as possible
|
||||||
|
|
||||||
|
What: /sys/devices/system/node/nodeX/scan_unevictable_pages
|
||||||
|
Date: October 2008
|
||||||
|
Contact: Lee Schermerhorn <lee.schermerhorn@hp.com>
|
||||||
|
Description:
|
||||||
|
When set, it triggers scanning the node's unevictable lists
|
||||||
|
and move any pages that have become evictable onto the respective
|
||||||
|
zone's inactive list. See mm/vmscan.c
|
||||||
|
|
||||||
|
What: /sys/devices/system/node/nodeX/hugepages/hugepages-<size>/
|
||||||
|
Date: December 2009
|
||||||
|
Contact: Lee Schermerhorn <lee.schermerhorn@hp.com>
|
||||||
|
Description:
|
||||||
|
The node's huge page size control/query attributes.
|
||||||
|
See Documentation/vm/hugetlbpage.txt
|
||||||
156
Documentation/ABI/stable/sysfs-driver-ib_srp
Normal file
156
Documentation/ABI/stable/sysfs-driver-ib_srp
Normal file
@@ -0,0 +1,156 @@
|
|||||||
|
What: /sys/class/infiniband_srp/srp-<hca>-<port_number>/add_target
|
||||||
|
Date: January 2, 2006
|
||||||
|
KernelVersion: 2.6.15
|
||||||
|
Contact: linux-rdma@vger.kernel.org
|
||||||
|
Description: Interface for making ib_srp connect to a new target.
|
||||||
|
One can request ib_srp to connect to a new target by writing
|
||||||
|
a comma-separated list of login parameters to this sysfs
|
||||||
|
attribute. The supported parameters are:
|
||||||
|
* id_ext, a 16-digit hexadecimal number specifying the eight
|
||||||
|
byte identifier extension in the 16-byte SRP target port
|
||||||
|
identifier. The target port identifier is sent by ib_srp
|
||||||
|
to the target in the SRP_LOGIN_REQ request.
|
||||||
|
* ioc_guid, a 16-digit hexadecimal number specifying the eight
|
||||||
|
byte I/O controller GUID portion of the 16-byte target port
|
||||||
|
identifier.
|
||||||
|
* dgid, a 32-digit hexadecimal number specifying the
|
||||||
|
destination GID.
|
||||||
|
* pkey, a four-digit hexadecimal number specifying the
|
||||||
|
InfiniBand partition key.
|
||||||
|
* service_id, a 16-digit hexadecimal number specifying the
|
||||||
|
InfiniBand service ID used to establish communication with
|
||||||
|
the SRP target. How to find out the value of the service ID
|
||||||
|
is specified in the documentation of the SRP target.
|
||||||
|
* max_sect, a decimal number specifying the maximum number of
|
||||||
|
512-byte sectors to be transferred via a single SCSI command.
|
||||||
|
* max_cmd_per_lun, a decimal number specifying the maximum
|
||||||
|
number of outstanding commands for a single LUN.
|
||||||
|
* io_class, a hexadecimal number specifying the SRP I/O class.
|
||||||
|
Must be either 0xff00 (rev 10) or 0x0100 (rev 16a). The I/O
|
||||||
|
class defines the format of the SRP initiator and target
|
||||||
|
port identifiers.
|
||||||
|
* initiator_ext, a 16-digit hexadecimal number specifying the
|
||||||
|
identifier extension portion of the SRP initiator port
|
||||||
|
identifier. This data is sent by the initiator to the target
|
||||||
|
in the SRP_LOGIN_REQ request.
|
||||||
|
* cmd_sg_entries, a number in the range 1..255 that specifies
|
||||||
|
the maximum number of data buffer descriptors stored in the
|
||||||
|
SRP_CMD information unit itself. With allow_ext_sg=0 the
|
||||||
|
parameter cmd_sg_entries defines the maximum S/G list length
|
||||||
|
for a single SRP_CMD, and commands whose S/G list length
|
||||||
|
exceeds this limit after S/G list collapsing will fail.
|
||||||
|
* allow_ext_sg, whether ib_srp is allowed to include a partial
|
||||||
|
memory descriptor list in an SRP_CMD instead of the entire
|
||||||
|
list. If a partial memory descriptor list has been included
|
||||||
|
in an SRP_CMD the remaining memory descriptors are
|
||||||
|
communicated from initiator to target via an additional RDMA
|
||||||
|
transfer. Setting allow_ext_sg to 1 increases the maximum
|
||||||
|
amount of data that can be transferred between initiator and
|
||||||
|
target via a single SCSI command. Since not all SRP target
|
||||||
|
implementations support partial memory descriptor lists the
|
||||||
|
default value for this option is 0.
|
||||||
|
* sg_tablesize, a number in the range 1..2048 specifying the
|
||||||
|
maximum S/G list length the SCSI layer is allowed to pass to
|
||||||
|
ib_srp. Specifying a value that exceeds cmd_sg_entries is
|
||||||
|
only safe with partial memory descriptor list support enabled
|
||||||
|
(allow_ext_sg=1).
|
||||||
|
|
||||||
|
What: /sys/class/infiniband_srp/srp-<hca>-<port_number>/ibdev
|
||||||
|
Date: January 2, 2006
|
||||||
|
KernelVersion: 2.6.15
|
||||||
|
Contact: linux-rdma@vger.kernel.org
|
||||||
|
Description: HCA name (<hca>).
|
||||||
|
|
||||||
|
What: /sys/class/infiniband_srp/srp-<hca>-<port_number>/port
|
||||||
|
Date: January 2, 2006
|
||||||
|
KernelVersion: 2.6.15
|
||||||
|
Contact: linux-rdma@vger.kernel.org
|
||||||
|
Description: HCA port number (<port_number>).
|
||||||
|
|
||||||
|
What: /sys/class/scsi_host/host<n>/allow_ext_sg
|
||||||
|
Date: May 19, 2011
|
||||||
|
KernelVersion: 2.6.39
|
||||||
|
Contact: linux-rdma@vger.kernel.org
|
||||||
|
Description: Whether ib_srp is allowed to include a partial memory
|
||||||
|
descriptor list in an SRP_CMD when communicating with an SRP
|
||||||
|
target.
|
||||||
|
|
||||||
|
What: /sys/class/scsi_host/host<n>/cmd_sg_entries
|
||||||
|
Date: May 19, 2011
|
||||||
|
KernelVersion: 2.6.39
|
||||||
|
Contact: linux-rdma@vger.kernel.org
|
||||||
|
Description: Maximum number of data buffer descriptors that may be sent to
|
||||||
|
the target in a single SRP_CMD request.
|
||||||
|
|
||||||
|
What: /sys/class/scsi_host/host<n>/dgid
|
||||||
|
Date: June 17, 2006
|
||||||
|
KernelVersion: 2.6.17
|
||||||
|
Contact: linux-rdma@vger.kernel.org
|
||||||
|
Description: InfiniBand destination GID used for communication with the SRP
|
||||||
|
target. Differs from orig_dgid if port redirection has happened.
|
||||||
|
|
||||||
|
What: /sys/class/scsi_host/host<n>/id_ext
|
||||||
|
Date: June 17, 2006
|
||||||
|
KernelVersion: 2.6.17
|
||||||
|
Contact: linux-rdma@vger.kernel.org
|
||||||
|
Description: Eight-byte identifier extension portion of the 16-byte target
|
||||||
|
port identifier.
|
||||||
|
|
||||||
|
What: /sys/class/scsi_host/host<n>/ioc_guid
|
||||||
|
Date: June 17, 2006
|
||||||
|
KernelVersion: 2.6.17
|
||||||
|
Contact: linux-rdma@vger.kernel.org
|
||||||
|
Description: Eight-byte I/O controller GUID portion of the 16-byte target
|
||||||
|
port identifier.
|
||||||
|
|
||||||
|
What: /sys/class/scsi_host/host<n>/local_ib_device
|
||||||
|
Date: November 29, 2006
|
||||||
|
KernelVersion: 2.6.19
|
||||||
|
Contact: linux-rdma@vger.kernel.org
|
||||||
|
Description: Name of the InfiniBand HCA used for communicating with the
|
||||||
|
SRP target.
|
||||||
|
|
||||||
|
What: /sys/class/scsi_host/host<n>/local_ib_port
|
||||||
|
Date: November 29, 2006
|
||||||
|
KernelVersion: 2.6.19
|
||||||
|
Contact: linux-rdma@vger.kernel.org
|
||||||
|
Description: Number of the HCA port used for communicating with the
|
||||||
|
SRP target.
|
||||||
|
|
||||||
|
What: /sys/class/scsi_host/host<n>/orig_dgid
|
||||||
|
Date: June 17, 2006
|
||||||
|
KernelVersion: 2.6.17
|
||||||
|
Contact: linux-rdma@vger.kernel.org
|
||||||
|
Description: InfiniBand destination GID specified in the parameters
|
||||||
|
written to the add_target sysfs attribute.
|
||||||
|
|
||||||
|
What: /sys/class/scsi_host/host<n>/pkey
|
||||||
|
Date: June 17, 2006
|
||||||
|
KernelVersion: 2.6.17
|
||||||
|
Contact: linux-rdma@vger.kernel.org
|
||||||
|
Description: A 16-bit number representing the InfiniBand partition key used
|
||||||
|
for communication with the SRP target.
|
||||||
|
|
||||||
|
What: /sys/class/scsi_host/host<n>/req_lim
|
||||||
|
Date: October 20, 2010
|
||||||
|
KernelVersion: 2.6.36
|
||||||
|
Contact: linux-rdma@vger.kernel.org
|
||||||
|
Description: Number of requests ib_srp can send to the target before it has
|
||||||
|
to wait for more credits. For more information see also the
|
||||||
|
SRP credit algorithm in the SRP specification.
|
||||||
|
|
||||||
|
What: /sys/class/scsi_host/host<n>/service_id
|
||||||
|
Date: June 17, 2006
|
||||||
|
KernelVersion: 2.6.17
|
||||||
|
Contact: linux-rdma@vger.kernel.org
|
||||||
|
Description: InfiniBand service ID used for establishing communication with
|
||||||
|
the SRP target.
|
||||||
|
|
||||||
|
What: /sys/class/scsi_host/host<n>/zero_req_lim
|
||||||
|
Date: September 20, 2006
|
||||||
|
KernelVersion: 2.6.18
|
||||||
|
Contact: linux-rdma@vger.kernel.org
|
||||||
|
Description: Number of times the initiator had to wait before sending a
|
||||||
|
request to the target because it ran out of credits. For more
|
||||||
|
information see also the SRP credit algorithm in the SRP
|
||||||
|
specification.
|
||||||
19
Documentation/ABI/stable/sysfs-transport-srp
Normal file
19
Documentation/ABI/stable/sysfs-transport-srp
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
What: /sys/class/srp_remote_ports/port-<h>:<n>/delete
|
||||||
|
Date: June 1, 2012
|
||||||
|
KernelVersion: 3.7
|
||||||
|
Contact: linux-scsi@vger.kernel.org, linux-rdma@vger.kernel.org
|
||||||
|
Description: Instructs an SRP initiator to disconnect from a target and to
|
||||||
|
remove all LUNs imported from that target.
|
||||||
|
|
||||||
|
What: /sys/class/srp_remote_ports/port-<h>:<n>/port_id
|
||||||
|
Date: June 27, 2007
|
||||||
|
KernelVersion: 2.6.24
|
||||||
|
Contact: linux-scsi@vger.kernel.org
|
||||||
|
Description: 16-byte local SRP port identifier in hexadecimal format. An
|
||||||
|
example: 4c:49:4e:55:58:20:56:49:4f:00:00:00:00:00:00:00.
|
||||||
|
|
||||||
|
What: /sys/class/srp_remote_ports/port-<h>:<n>/roles
|
||||||
|
Date: June 27, 2007
|
||||||
|
KernelVersion: 2.6.24
|
||||||
|
Contact: linux-scsi@vger.kernel.org
|
||||||
|
Description: Role of the remote port. Either "SRP Initiator" or "SRP Target".
|
||||||
@@ -18,17 +18,21 @@ Description:
|
|||||||
rule format: action [condition ...]
|
rule format: action [condition ...]
|
||||||
|
|
||||||
action: measure | dont_measure | appraise | dont_appraise | audit
|
action: measure | dont_measure | appraise | dont_appraise | audit
|
||||||
condition:= base | lsm
|
condition:= base | lsm [option]
|
||||||
base: [[func=] [mask=] [fsmagic=] [uid=] [fowner]]
|
base: [[func=] [mask=] [fsmagic=] [fsuuid=] [uid=]
|
||||||
|
[fowner]]
|
||||||
lsm: [[subj_user=] [subj_role=] [subj_type=]
|
lsm: [[subj_user=] [subj_role=] [subj_type=]
|
||||||
[obj_user=] [obj_role=] [obj_type=]]
|
[obj_user=] [obj_role=] [obj_type=]]
|
||||||
|
option: [[appraise_type=]]
|
||||||
|
|
||||||
base: func:= [BPRM_CHECK][FILE_MMAP][FILE_CHECK]
|
base: func:= [BPRM_CHECK][MMAP_CHECK][FILE_CHECK][MODULE_CHECK]
|
||||||
mask:= [MAY_READ] [MAY_WRITE] [MAY_APPEND] [MAY_EXEC]
|
mask:= [MAY_READ] [MAY_WRITE] [MAY_APPEND] [MAY_EXEC]
|
||||||
fsmagic:= hex value
|
fsmagic:= hex value
|
||||||
|
fsuuid:= file system UUID (e.g 8bcbe394-4f13-4144-be8e-5aa9ea2ce2f6)
|
||||||
uid:= decimal value
|
uid:= decimal value
|
||||||
fowner:=decimal value
|
fowner:=decimal value
|
||||||
lsm: are LSM specific
|
lsm: are LSM specific
|
||||||
|
option: appraise_type:= [imasig]
|
||||||
|
|
||||||
default policy:
|
default policy:
|
||||||
# PROC_SUPER_MAGIC
|
# PROC_SUPER_MAGIC
|
||||||
@@ -53,6 +57,7 @@ Description:
|
|||||||
measure func=BPRM_CHECK
|
measure func=BPRM_CHECK
|
||||||
measure func=FILE_MMAP mask=MAY_EXEC
|
measure func=FILE_MMAP mask=MAY_EXEC
|
||||||
measure func=FILE_CHECK mask=MAY_READ uid=0
|
measure func=FILE_CHECK mask=MAY_READ uid=0
|
||||||
|
measure func=MODULE_CHECK uid=0
|
||||||
appraise fowner=0
|
appraise fowner=0
|
||||||
|
|
||||||
The default policy measures all executables in bprm_check,
|
The default policy measures all executables in bprm_check,
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
Where: /dev/pstore/...
|
Where: /sys/fs/pstore/... (or /dev/pstore/...)
|
||||||
Date: March 2011
|
Date: March 2011
|
||||||
Kernel Version: 2.6.39
|
Kernel Version: 2.6.39
|
||||||
Contact: tony.luck@intel.com
|
Contact: tony.luck@intel.com
|
||||||
@@ -11,9 +11,9 @@ Description: Generic interface to platform dependent persistent storage.
|
|||||||
of the console log is captured, but other interesting
|
of the console log is captured, but other interesting
|
||||||
data can also be saved.
|
data can also be saved.
|
||||||
|
|
||||||
# mount -t pstore -o kmsg_bytes=8000 - /dev/pstore
|
# mount -t pstore -o kmsg_bytes=8000 - /sys/fs/pstore
|
||||||
|
|
||||||
$ ls -l /dev/pstore
|
$ ls -l /sys/fs/pstore/
|
||||||
total 0
|
total 0
|
||||||
-r--r--r-- 1 root root 7896 Nov 30 15:38 dmesg-erst-1
|
-r--r--r-- 1 root root 7896 Nov 30 15:38 dmesg-erst-1
|
||||||
|
|
||||||
@@ -27,9 +27,9 @@ Description: Generic interface to platform dependent persistent storage.
|
|||||||
the file will signal to the underlying persistent storage
|
the file will signal to the underlying persistent storage
|
||||||
device that it can reclaim the space for later re-use.
|
device that it can reclaim the space for later re-use.
|
||||||
|
|
||||||
$ rm /dev/pstore/dmesg-erst-1
|
$ rm /sys/fs/pstore/dmesg-erst-1
|
||||||
|
|
||||||
The expectation is that all files in /dev/pstore
|
The expectation is that all files in /sys/fs/pstore/
|
||||||
will be saved elsewhere and erased from persistent store
|
will be saved elsewhere and erased from persistent store
|
||||||
soon after boot to free up space ready for the next
|
soon after boot to free up space ready for the next
|
||||||
catastrophe.
|
catastrophe.
|
||||||
|
|||||||
@@ -0,0 +1,62 @@
|
|||||||
|
What: /sys/devices/cpu/events/
|
||||||
|
/sys/devices/cpu/events/branch-misses
|
||||||
|
/sys/devices/cpu/events/cache-references
|
||||||
|
/sys/devices/cpu/events/cache-misses
|
||||||
|
/sys/devices/cpu/events/stalled-cycles-frontend
|
||||||
|
/sys/devices/cpu/events/branch-instructions
|
||||||
|
/sys/devices/cpu/events/stalled-cycles-backend
|
||||||
|
/sys/devices/cpu/events/instructions
|
||||||
|
/sys/devices/cpu/events/cpu-cycles
|
||||||
|
|
||||||
|
Date: 2013/01/08
|
||||||
|
|
||||||
|
Contact: Linux kernel mailing list <linux-kernel@vger.kernel.org>
|
||||||
|
|
||||||
|
Description: Generic performance monitoring events
|
||||||
|
|
||||||
|
A collection of performance monitoring events that may be
|
||||||
|
supported by many/most CPUs. These events can be monitored
|
||||||
|
using the 'perf(1)' tool.
|
||||||
|
|
||||||
|
The contents of each file would look like:
|
||||||
|
|
||||||
|
event=0xNNNN
|
||||||
|
|
||||||
|
where 'N' is a hex digit and the number '0xNNNN' shows the
|
||||||
|
"raw code" for the perf event identified by the file's
|
||||||
|
"basename".
|
||||||
|
|
||||||
|
|
||||||
|
What: /sys/devices/cpu/events/PM_LD_MISS_L1
|
||||||
|
/sys/devices/cpu/events/PM_LD_REF_L1
|
||||||
|
/sys/devices/cpu/events/PM_CYC
|
||||||
|
/sys/devices/cpu/events/PM_BRU_FIN
|
||||||
|
/sys/devices/cpu/events/PM_GCT_NOSLOT_CYC
|
||||||
|
/sys/devices/cpu/events/PM_BRU_MPRED
|
||||||
|
/sys/devices/cpu/events/PM_INST_CMPL
|
||||||
|
/sys/devices/cpu/events/PM_CMPLU_STALL
|
||||||
|
|
||||||
|
Date: 2013/01/08
|
||||||
|
|
||||||
|
Contact: Linux kernel mailing list <linux-kernel@vger.kernel.org>
|
||||||
|
Linux Powerpc mailing list <linuxppc-dev@ozlabs.org>
|
||||||
|
|
||||||
|
Description: POWER-systems specific performance monitoring events
|
||||||
|
|
||||||
|
A collection of performance monitoring events that may be
|
||||||
|
supported by the POWER CPU. These events can be monitored
|
||||||
|
using the 'perf(1)' tool.
|
||||||
|
|
||||||
|
These events may not be supported by other CPUs.
|
||||||
|
|
||||||
|
The contents of each file would look like:
|
||||||
|
|
||||||
|
event=0xNNNN
|
||||||
|
|
||||||
|
where 'N' is a hex digit and the number '0xNNNN' shows the
|
||||||
|
"raw code" for the perf event identified by the file's
|
||||||
|
"basename".
|
||||||
|
|
||||||
|
Further, multiple terms like 'event=0xNNNN' can be specified
|
||||||
|
and separated with comma. All available terms are defined in
|
||||||
|
the /sys/bus/event_source/devices/<dev>/format file.
|
||||||
@@ -1,14 +1,53 @@
|
|||||||
What: /sys/bus/fcoe/ctlr_X
|
What: /sys/bus/fcoe/
|
||||||
|
Date: August 2012
|
||||||
|
KernelVersion: TBD
|
||||||
|
Contact: Robert Love <robert.w.love@intel.com>, devel@open-fcoe.org
|
||||||
|
Description: The FCoE bus. Attributes in this directory are control interfaces.
|
||||||
|
Attributes:
|
||||||
|
|
||||||
|
ctlr_create: 'FCoE Controller' instance creation interface. Writing an
|
||||||
|
<ifname> to this file will allocate and populate sysfs with a
|
||||||
|
fcoe_ctlr_device (ctlr_X). The user can then configure any
|
||||||
|
per-port settings and finally write to the fcoe_ctlr_device's
|
||||||
|
'start' attribute to begin the kernel's discovery and login
|
||||||
|
process.
|
||||||
|
|
||||||
|
ctlr_destroy: 'FCoE Controller' instance removal interface. Writing a
|
||||||
|
fcoe_ctlr_device's sysfs name to this file will log the
|
||||||
|
fcoe_ctlr_device out of the fabric or otherwise connected
|
||||||
|
FCoE devices. It will also free all kernel memory allocated
|
||||||
|
for this fcoe_ctlr_device and any structures associated
|
||||||
|
with it, this includes the scsi_host.
|
||||||
|
|
||||||
|
What: /sys/bus/fcoe/devices/ctlr_X
|
||||||
Date: March 2012
|
Date: March 2012
|
||||||
KernelVersion: TBD
|
KernelVersion: TBD
|
||||||
Contact: Robert Love <robert.w.love@intel.com>, devel@open-fcoe.org
|
Contact: Robert Love <robert.w.love@intel.com>, devel@open-fcoe.org
|
||||||
Description: 'FCoE Controller' instances on the fcoe bus
|
Description: 'FCoE Controller' instances on the fcoe bus.
|
||||||
|
The FCoE Controller now has a three stage creation process.
|
||||||
|
1) Write interface name to ctlr_create 2) Configure the FCoE
|
||||||
|
Controller (ctlr_X) 3) Enable the FCoE Controller to begin
|
||||||
|
discovery and login. The FCoE Controller is destroyed by
|
||||||
|
writing it's name, i.e. ctlr_X to the ctlr_delete file.
|
||||||
|
|
||||||
Attributes:
|
Attributes:
|
||||||
|
|
||||||
fcf_dev_loss_tmo: Device loss timeout peroid (see below). Changing
|
fcf_dev_loss_tmo: Device loss timeout peroid (see below). Changing
|
||||||
this value will change the dev_loss_tmo for all
|
this value will change the dev_loss_tmo for all
|
||||||
FCFs discovered by this controller.
|
FCFs discovered by this controller.
|
||||||
|
|
||||||
|
mode: Display or change the FCoE Controller's mode. Possible
|
||||||
|
modes are 'Fabric' and 'VN2VN'. If a FCoE Controller
|
||||||
|
is started in 'Fabric' mode then FIP FCF discovery is
|
||||||
|
initiated and ultimately a fabric login is attempted.
|
||||||
|
If a FCoE Controller is started in 'VN2VN' mode then
|
||||||
|
FIP VN2VN discovery and login is performed. A FCoE
|
||||||
|
Controller only supports one mode at a time.
|
||||||
|
|
||||||
|
enabled: Whether an FCoE controller is enabled or disabled.
|
||||||
|
0 if disabled, 1 if enabled. Writing either 0 or 1
|
||||||
|
to this file will enable or disable the FCoE controller.
|
||||||
|
|
||||||
lesb/link_fail: Link Error Status Block (LESB) link failure count.
|
lesb/link_fail: Link Error Status Block (LESB) link failure count.
|
||||||
|
|
||||||
lesb/vlink_fail: Link Error Status Block (LESB) virtual link
|
lesb/vlink_fail: Link Error Status Block (LESB) virtual link
|
||||||
@@ -26,7 +65,7 @@ Attributes:
|
|||||||
|
|
||||||
Notes: ctlr_X (global increment starting at 0)
|
Notes: ctlr_X (global increment starting at 0)
|
||||||
|
|
||||||
What: /sys/bus/fcoe/fcf_X
|
What: /sys/bus/fcoe/devices/fcf_X
|
||||||
Date: March 2012
|
Date: March 2012
|
||||||
KernelVersion: TBD
|
KernelVersion: TBD
|
||||||
Contact: Robert Love <robert.w.love@intel.com>, devel@open-fcoe.org
|
Contact: Robert Love <robert.w.love@intel.com>, devel@open-fcoe.org
|
||||||
|
|||||||
13
Documentation/ABI/testing/sysfs-bus-iio-mpu6050
Normal file
13
Documentation/ABI/testing/sysfs-bus-iio-mpu6050
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
What: /sys/bus/iio/devices/iio:deviceX/in_gyro_matrix
|
||||||
|
What: /sys/bus/iio/devices/iio:deviceX/in_accel_matrix
|
||||||
|
What: /sys/bus/iio/devices/iio:deviceX/in_magn_matrix
|
||||||
|
KernelVersion: 3.4.0
|
||||||
|
Contact: linux-iio@vger.kernel.org
|
||||||
|
Description:
|
||||||
|
This is mounting matrix for motion sensors. Mounting matrix
|
||||||
|
is a 3x3 unitary matrix. A typical mounting matrix would look like
|
||||||
|
[0, 1, 0; 1, 0, 0; 0, 0, -1]. Using this information, it would be
|
||||||
|
easy to tell the relative positions among sensors as well as their
|
||||||
|
positions relative to the board that holds these sensors. Identity matrix
|
||||||
|
[1, 0, 0; 0, 1, 0; 0, 0, 1] means sensor chip and device are perfectly
|
||||||
|
aligned with each other. All axes are exactly the same.
|
||||||
@@ -70,6 +70,10 @@ snap_*
|
|||||||
|
|
||||||
A directory per each snapshot
|
A directory per each snapshot
|
||||||
|
|
||||||
|
parent
|
||||||
|
|
||||||
|
Information identifying the pool, image, and snapshot id for
|
||||||
|
the parent image in a layered rbd image (format 2 only).
|
||||||
|
|
||||||
Entries under /sys/bus/rbd/devices/<dev-id>/snap_<snap-name>
|
Entries under /sys/bus/rbd/devices/<dev-id>/snap_<snap-name>
|
||||||
-------------------------------------------------------------
|
-------------------------------------------------------------
|
||||||
|
|||||||
@@ -227,3 +227,12 @@ Contact: Lan Tianyu <tianyu.lan@intel.com>
|
|||||||
Description:
|
Description:
|
||||||
The /sys/bus/usb/devices/.../(hub interface)/portX
|
The /sys/bus/usb/devices/.../(hub interface)/portX
|
||||||
is usb port device's sysfs directory.
|
is usb port device's sysfs directory.
|
||||||
|
|
||||||
|
What: /sys/bus/usb/devices/.../(hub interface)/portX/connect_type
|
||||||
|
Date: January 2013
|
||||||
|
Contact: Lan Tianyu <tianyu.lan@intel.com>
|
||||||
|
Description:
|
||||||
|
Some platforms provide usb port connect types through ACPI.
|
||||||
|
This attribute is to expose these information to user space.
|
||||||
|
The file will read "hotplug", "wired" and "not used" if the
|
||||||
|
information is available, and "unknown" otherwise.
|
||||||
|
|||||||
@@ -48,3 +48,8 @@ max_ratio (read-write)
|
|||||||
most of the write-back cache. For example in case of an NFS
|
most of the write-back cache. For example in case of an NFS
|
||||||
mount that is prone to get stuck, or a FUSE mount which cannot
|
mount that is prone to get stuck, or a FUSE mount which cannot
|
||||||
be trusted to play fair.
|
be trusted to play fair.
|
||||||
|
|
||||||
|
stable_pages_required (read-only)
|
||||||
|
|
||||||
|
If set, the backing device requires that all pages comprising a write
|
||||||
|
request must not be changed until writeout is complete.
|
||||||
|
|||||||
@@ -1,7 +0,0 @@
|
|||||||
What: /sys/devices/system/node/nodeX/compact
|
|
||||||
Date: February 2010
|
|
||||||
Contact: Mel Gorman <mel@csn.ul.ie>
|
|
||||||
Description:
|
|
||||||
When this file is written to, all memory within that node
|
|
||||||
will be compacted. When it completes, memory will be freed
|
|
||||||
into blocks which have as many contiguous pages as possible
|
|
||||||
13
Documentation/ABI/testing/sysfs-devices-power_resources_D0
Normal file
13
Documentation/ABI/testing/sysfs-devices-power_resources_D0
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
What: /sys/devices/.../power_resources_D0/
|
||||||
|
Date: January 2013
|
||||||
|
Contact: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
|
||||||
|
Description:
|
||||||
|
The /sys/devices/.../power_resources_D0/ directory is only
|
||||||
|
present for device objects representing ACPI device nodes that
|
||||||
|
use ACPI power resources for power management.
|
||||||
|
|
||||||
|
If present, it contains symbolic links to device directories
|
||||||
|
representing ACPI power resources that need to be turned on for
|
||||||
|
the given device node to be in ACPI power state D0. The names
|
||||||
|
of the links are the same as the names of the directories they
|
||||||
|
point to.
|
||||||
14
Documentation/ABI/testing/sysfs-devices-power_resources_D1
Normal file
14
Documentation/ABI/testing/sysfs-devices-power_resources_D1
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
What: /sys/devices/.../power_resources_D1/
|
||||||
|
Date: January 2013
|
||||||
|
Contact: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
|
||||||
|
Description:
|
||||||
|
The /sys/devices/.../power_resources_D1/ directory is only
|
||||||
|
present for device objects representing ACPI device nodes that
|
||||||
|
use ACPI power resources for power management and support ACPI
|
||||||
|
power state D1.
|
||||||
|
|
||||||
|
If present, it contains symbolic links to device directories
|
||||||
|
representing ACPI power resources that need to be turned on for
|
||||||
|
the given device node to be in ACPI power state D1. The names
|
||||||
|
of the links are the same as the names of the directories they
|
||||||
|
point to.
|
||||||
14
Documentation/ABI/testing/sysfs-devices-power_resources_D2
Normal file
14
Documentation/ABI/testing/sysfs-devices-power_resources_D2
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
What: /sys/devices/.../power_resources_D2/
|
||||||
|
Date: January 2013
|
||||||
|
Contact: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
|
||||||
|
Description:
|
||||||
|
The /sys/devices/.../power_resources_D2/ directory is only
|
||||||
|
present for device objects representing ACPI device nodes that
|
||||||
|
use ACPI power resources for power management and support ACPI
|
||||||
|
power state D2.
|
||||||
|
|
||||||
|
If present, it contains symbolic links to device directories
|
||||||
|
representing ACPI power resources that need to be turned on for
|
||||||
|
the given device node to be in ACPI power state D2. The names
|
||||||
|
of the links are the same as the names of the directories they
|
||||||
|
point to.
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
What: /sys/devices/.../power_resources_D3hot/
|
||||||
|
Date: January 2013
|
||||||
|
Contact: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
|
||||||
|
Description:
|
||||||
|
The /sys/devices/.../power_resources_D3hot/ directory is only
|
||||||
|
present for device objects representing ACPI device nodes that
|
||||||
|
use ACPI power resources for power management and support ACPI
|
||||||
|
power state D3hot.
|
||||||
|
|
||||||
|
If present, it contains symbolic links to device directories
|
||||||
|
representing ACPI power resources that need to be turned on for
|
||||||
|
the given device node to be in ACPI power state D3hot. The
|
||||||
|
names of the links are the same as the names of the directories
|
||||||
|
they point to.
|
||||||
20
Documentation/ABI/testing/sysfs-devices-power_state
Normal file
20
Documentation/ABI/testing/sysfs-devices-power_state
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
What: /sys/devices/.../power_state
|
||||||
|
Date: January 2013
|
||||||
|
Contact: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
|
||||||
|
Description:
|
||||||
|
The /sys/devices/.../power_state attribute is only present for
|
||||||
|
device objects representing ACPI device nodes that provide power
|
||||||
|
management methods.
|
||||||
|
|
||||||
|
If present, it contains a string representing the current ACPI
|
||||||
|
power state of the given device node. Its possible values,
|
||||||
|
"D0", "D1", "D2", "D3hot", and "D3cold", reflect the power state
|
||||||
|
names defined by the ACPI specification (ACPI 4 and above).
|
||||||
|
|
||||||
|
If the device node uses shared ACPI power resources, this state
|
||||||
|
determines a list of power resources required not to be turned
|
||||||
|
off. However, some power resources needed by the device node in
|
||||||
|
higher-power (lower-number) states may also be ON because of
|
||||||
|
some other devices using them at the moment.
|
||||||
|
|
||||||
|
This attribute is read-only.
|
||||||
23
Documentation/ABI/testing/sysfs-devices-real_power_state
Normal file
23
Documentation/ABI/testing/sysfs-devices-real_power_state
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
What: /sys/devices/.../real_power_state
|
||||||
|
Date: January 2013
|
||||||
|
Contact: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
|
||||||
|
Description:
|
||||||
|
The /sys/devices/.../real_power_state attribute is only present
|
||||||
|
for device objects representing ACPI device nodes that provide
|
||||||
|
power management methods and use ACPI power resources for power
|
||||||
|
management.
|
||||||
|
|
||||||
|
If present, it contains a string representing the real ACPI
|
||||||
|
power state of the given device node as returned by the _PSC
|
||||||
|
control method or inferred from the configuration of power
|
||||||
|
resources. Its possible values, "D0", "D1", "D2", "D3hot", and
|
||||||
|
"D3cold", reflect the power state names defined by the ACPI
|
||||||
|
specification (ACPI 4 and above).
|
||||||
|
|
||||||
|
In some situations the value of this attribute may be different
|
||||||
|
from the value of the /sys/devices/.../power_state attribute for
|
||||||
|
the same device object. If that happens, some shared power
|
||||||
|
resources used by the device node are only ON because of some
|
||||||
|
other devices using them at the moment.
|
||||||
|
|
||||||
|
This attribute is read-only.
|
||||||
12
Documentation/ABI/testing/sysfs-devices-resource_in_use
Normal file
12
Documentation/ABI/testing/sysfs-devices-resource_in_use
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
What: /sys/devices/.../resource_in_use
|
||||||
|
Date: January 2013
|
||||||
|
Contact: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
|
||||||
|
Description:
|
||||||
|
The /sys/devices/.../resource_in_use attribute is only present
|
||||||
|
for device objects representing ACPI power resources.
|
||||||
|
|
||||||
|
If present, it contains a number (0 or 1) representing the
|
||||||
|
current status of the given power resource (0 means that the
|
||||||
|
resource is not in use and therefore it has been turned off).
|
||||||
|
|
||||||
|
This attribute is read-only.
|
||||||
@@ -67,20 +67,6 @@ Description: Discover NUMA node a CPU belongs to
|
|||||||
/sys/devices/system/cpu/cpu42/node2 -> ../../node/node2
|
/sys/devices/system/cpu/cpu42/node2 -> ../../node/node2
|
||||||
|
|
||||||
|
|
||||||
What: /sys/devices/system/cpu/cpu#/node
|
|
||||||
Date: October 2009
|
|
||||||
Contact: Linux memory management mailing list <linux-mm@kvack.org>
|
|
||||||
Description: Discover NUMA node a CPU belongs to
|
|
||||||
|
|
||||||
When CONFIG_NUMA is enabled, a symbolic link that points
|
|
||||||
to the corresponding NUMA node directory.
|
|
||||||
|
|
||||||
For example, the following symlink is created for cpu42
|
|
||||||
in NUMA node 2:
|
|
||||||
|
|
||||||
/sys/devices/system/cpu/cpu42/node2 -> ../../node/node2
|
|
||||||
|
|
||||||
|
|
||||||
What: /sys/devices/system/cpu/cpu#/topology/core_id
|
What: /sys/devices/system/cpu/cpu#/topology/core_id
|
||||||
/sys/devices/system/cpu/cpu#/topology/core_siblings
|
/sys/devices/system/cpu/cpu#/topology/core_siblings
|
||||||
/sys/devices/system/cpu/cpu#/topology/core_siblings_list
|
/sys/devices/system/cpu/cpu#/topology/core_siblings_list
|
||||||
|
|||||||
21
Documentation/ABI/testing/sysfs-driver-hid-srws1
Normal file
21
Documentation/ABI/testing/sysfs-driver-hid-srws1
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
What: /sys/class/leds/SRWS1::<serial>::RPM1
|
||||||
|
What: /sys/class/leds/SRWS1::<serial>::RPM2
|
||||||
|
What: /sys/class/leds/SRWS1::<serial>::RPM3
|
||||||
|
What: /sys/class/leds/SRWS1::<serial>::RPM4
|
||||||
|
What: /sys/class/leds/SRWS1::<serial>::RPM5
|
||||||
|
What: /sys/class/leds/SRWS1::<serial>::RPM6
|
||||||
|
What: /sys/class/leds/SRWS1::<serial>::RPM7
|
||||||
|
What: /sys/class/leds/SRWS1::<serial>::RPM8
|
||||||
|
What: /sys/class/leds/SRWS1::<serial>::RPM9
|
||||||
|
What: /sys/class/leds/SRWS1::<serial>::RPM10
|
||||||
|
What: /sys/class/leds/SRWS1::<serial>::RPM11
|
||||||
|
What: /sys/class/leds/SRWS1::<serial>::RPM12
|
||||||
|
What: /sys/class/leds/SRWS1::<serial>::RPM13
|
||||||
|
What: /sys/class/leds/SRWS1::<serial>::RPM14
|
||||||
|
What: /sys/class/leds/SRWS1::<serial>::RPM15
|
||||||
|
What: /sys/class/leds/SRWS1::<serial>::RPMALL
|
||||||
|
Date: Jan 2013
|
||||||
|
KernelVersion: 3.9
|
||||||
|
Contact: Simon Wood <simon@mungewell.org>
|
||||||
|
Description: Provides a control for turning on/off the LEDs which form
|
||||||
|
an RPM meter on the front of the controller
|
||||||
23
Documentation/ABI/testing/sysfs-driver-hid-thingm
Normal file
23
Documentation/ABI/testing/sysfs-driver-hid-thingm
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
What: /sys/class/leds/blink1::<serial>/rgb
|
||||||
|
Date: January 2013
|
||||||
|
Contact: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
|
||||||
|
Description: The ThingM blink1 is an USB RGB LED. The color notation is
|
||||||
|
3-byte hexadecimal. Read this attribute to get the last set
|
||||||
|
color. Write the 24-bit hexadecimal color to change the current
|
||||||
|
LED color. The default color is full white (0xFFFFFF).
|
||||||
|
For instance, set the color to green with: echo 00FF00 > rgb
|
||||||
|
|
||||||
|
What: /sys/class/leds/blink1::<serial>/fade
|
||||||
|
Date: January 2013
|
||||||
|
Contact: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
|
||||||
|
Description: This attribute allows to set a fade time in milliseconds for
|
||||||
|
the next color change. Read the attribute to know the current
|
||||||
|
fade time. The default value is set to 0 (no fade time). For
|
||||||
|
instance, set a fade time of 2 seconds with: echo 2000 > fade
|
||||||
|
|
||||||
|
What: /sys/class/leds/blink1::<serial>/play
|
||||||
|
Date: January 2013
|
||||||
|
Contact: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
|
||||||
|
Description: This attribute is used to play/pause the light patterns. Write 1
|
||||||
|
to start playing, 0 to stop. Reading this attribute returns the
|
||||||
|
current playing status.
|
||||||
52
Documentation/ABI/testing/sysfs-kernel-mm-ksm
Normal file
52
Documentation/ABI/testing/sysfs-kernel-mm-ksm
Normal file
@@ -0,0 +1,52 @@
|
|||||||
|
What: /sys/kernel/mm/ksm
|
||||||
|
Date: September 2009
|
||||||
|
KernelVersion: 2.6.32
|
||||||
|
Contact: Linux memory management mailing list <linux-mm@kvack.org>
|
||||||
|
Description: Interface for Kernel Samepage Merging (KSM)
|
||||||
|
|
||||||
|
What: /sys/kernel/mm/ksm/full_scans
|
||||||
|
What: /sys/kernel/mm/ksm/pages_shared
|
||||||
|
What: /sys/kernel/mm/ksm/pages_sharing
|
||||||
|
What: /sys/kernel/mm/ksm/pages_to_scan
|
||||||
|
What: /sys/kernel/mm/ksm/pages_unshared
|
||||||
|
What: /sys/kernel/mm/ksm/pages_volatile
|
||||||
|
What: /sys/kernel/mm/ksm/run
|
||||||
|
What: /sys/kernel/mm/ksm/sleep_millisecs
|
||||||
|
Date: September 2009
|
||||||
|
Contact: Linux memory management mailing list <linux-mm@kvack.org>
|
||||||
|
Description: Kernel Samepage Merging daemon sysfs interface
|
||||||
|
|
||||||
|
full_scans: how many times all mergeable areas have been
|
||||||
|
scanned.
|
||||||
|
|
||||||
|
pages_shared: how many shared pages are being used.
|
||||||
|
|
||||||
|
pages_sharing: how many more sites are sharing them i.e. how
|
||||||
|
much saved.
|
||||||
|
|
||||||
|
pages_to_scan: how many present pages to scan before ksmd goes
|
||||||
|
to sleep.
|
||||||
|
|
||||||
|
pages_unshared: how many pages unique but repeatedly checked
|
||||||
|
for merging.
|
||||||
|
|
||||||
|
pages_volatile: how many pages changing too fast to be placed
|
||||||
|
in a tree.
|
||||||
|
|
||||||
|
run: write 0 to disable ksm, read 0 while ksm is disabled.
|
||||||
|
write 1 to run ksm, read 1 while ksm is running.
|
||||||
|
write 2 to disable ksm and unmerge all its pages.
|
||||||
|
|
||||||
|
sleep_millisecs: how many milliseconds ksm should sleep between
|
||||||
|
scans.
|
||||||
|
|
||||||
|
See Documentation/vm/ksm.txt for more information.
|
||||||
|
|
||||||
|
What: /sys/kernel/mm/ksm/merge_across_nodes
|
||||||
|
Date: January 2013
|
||||||
|
KernelVersion: 3.9
|
||||||
|
Contact: Linux memory management mailing list <linux-mm@kvack.org>
|
||||||
|
Description: Control merging pages across different NUMA nodes.
|
||||||
|
|
||||||
|
When it is set to 0 only pages from the same node are merged,
|
||||||
|
otherwise pages from all nodes can be merged together (default).
|
||||||
83
Documentation/ABI/testing/sysfs-platform-msi-laptop
Normal file
83
Documentation/ABI/testing/sysfs-platform-msi-laptop
Normal file
@@ -0,0 +1,83 @@
|
|||||||
|
What: /sys/devices/platform/msi-laptop-pf/lcd_level
|
||||||
|
Date: Oct 2006
|
||||||
|
KernelVersion: 2.6.19
|
||||||
|
Contact: "Lennart Poettering <mzxreary@0pointer.de>"
|
||||||
|
Description:
|
||||||
|
Screen brightness: contains a single integer in the range 0..8.
|
||||||
|
|
||||||
|
What: /sys/devices/platform/msi-laptop-pf/auto_brightness
|
||||||
|
Date: Oct 2006
|
||||||
|
KernelVersion: 2.6.19
|
||||||
|
Contact: "Lennart Poettering <mzxreary@0pointer.de>"
|
||||||
|
Description:
|
||||||
|
Enable automatic brightness control: contains either 0 or 1. If
|
||||||
|
set to 1 the hardware adjusts the screen brightness
|
||||||
|
automatically when the power cord is plugged/unplugged.
|
||||||
|
|
||||||
|
What: /sys/devices/platform/msi-laptop-pf/wlan
|
||||||
|
Date: Oct 2006
|
||||||
|
KernelVersion: 2.6.19
|
||||||
|
Contact: "Lennart Poettering <mzxreary@0pointer.de>"
|
||||||
|
Description:
|
||||||
|
WLAN subsystem enabled: contains either 0 or 1.
|
||||||
|
|
||||||
|
What: /sys/devices/platform/msi-laptop-pf/bluetooth
|
||||||
|
Date: Oct 2006
|
||||||
|
KernelVersion: 2.6.19
|
||||||
|
Contact: "Lennart Poettering <mzxreary@0pointer.de>"
|
||||||
|
Description:
|
||||||
|
Bluetooth subsystem enabled: contains either 0 or 1. Please
|
||||||
|
note that this file is constantly 0 if no Bluetooth hardware is
|
||||||
|
available.
|
||||||
|
|
||||||
|
What: /sys/devices/platform/msi-laptop-pf/touchpad
|
||||||
|
Date: Nov 2012
|
||||||
|
KernelVersion: 3.8
|
||||||
|
Contact: "Maxim Mikityanskiy <maxtram95@gmail.com>"
|
||||||
|
Description:
|
||||||
|
Contains either 0 or 1 and indicates if touchpad is turned on.
|
||||||
|
Touchpad state can only be toggled by pressing Fn+F3.
|
||||||
|
|
||||||
|
What: /sys/devices/platform/msi-laptop-pf/turbo_mode
|
||||||
|
Date: Nov 2012
|
||||||
|
KernelVersion: 3.8
|
||||||
|
Contact: "Maxim Mikityanskiy <maxtram95@gmail.com>"
|
||||||
|
Description:
|
||||||
|
Contains either 0 or 1 and indicates if turbo mode is turned
|
||||||
|
on. In turbo mode power LED is orange and processor is
|
||||||
|
overclocked. Turbo mode is available only if charging. It is
|
||||||
|
only possible to toggle turbo mode state by pressing Fn+F10,
|
||||||
|
and there is a few seconds cooldown between subsequent toggles.
|
||||||
|
If user presses Fn+F10 too frequent, turbo mode state is not
|
||||||
|
changed.
|
||||||
|
|
||||||
|
What: /sys/devices/platform/msi-laptop-pf/eco_mode
|
||||||
|
Date: Nov 2012
|
||||||
|
KernelVersion: 3.8
|
||||||
|
Contact: "Maxim Mikityanskiy <maxtram95@gmail.com>"
|
||||||
|
Description:
|
||||||
|
Contains either 0 or 1 and indicates if ECO mode is turned on.
|
||||||
|
In ECO mode power LED is green and userspace should do some
|
||||||
|
powersaving actions. ECO mode is available only on battery
|
||||||
|
power. ECO mode can only be toggled by pressing Fn+F10.
|
||||||
|
|
||||||
|
What: /sys/devices/platform/msi-laptop-pf/turbo_cooldown
|
||||||
|
Date: Nov 2012
|
||||||
|
KernelVersion: 3.8
|
||||||
|
Contact: "Maxim Mikityanskiy <maxtram95@gmail.com>"
|
||||||
|
Description:
|
||||||
|
Contains value in range 0..3:
|
||||||
|
* 0 -> Turbo mode is off
|
||||||
|
* 1 -> Turbo mode is on, cannot be turned off yet
|
||||||
|
* 2 -> Turbo mode is off, cannot be turned on yet
|
||||||
|
* 3 -> Turbo mode is on
|
||||||
|
|
||||||
|
What: /sys/devices/platform/msi-laptop-pf/auto_fan
|
||||||
|
Date: Nov 2012
|
||||||
|
KernelVersion: 3.8
|
||||||
|
Contact: "Maxim Mikityanskiy <maxtram95@gmail.com>"
|
||||||
|
Description:
|
||||||
|
Contains either 0 or 1 and indicates if fan speed is controlled
|
||||||
|
automatically (1) or fan runs at maximal speed (0). Can be
|
||||||
|
toggled in software.
|
||||||
|
|
||||||
47
Documentation/ABI/testing/sysfs-platform-ts5500
Normal file
47
Documentation/ABI/testing/sysfs-platform-ts5500
Normal file
@@ -0,0 +1,47 @@
|
|||||||
|
What: /sys/devices/platform/ts5500/adc
|
||||||
|
Date: January 2013
|
||||||
|
KernelVersion: 3.7
|
||||||
|
Contact: "Savoir-faire Linux Inc." <kernel@savoirfairelinux.com>
|
||||||
|
Description:
|
||||||
|
Indicates the presence of an A/D Converter. If it is present,
|
||||||
|
it will display "1", otherwise "0".
|
||||||
|
|
||||||
|
What: /sys/devices/platform/ts5500/ereset
|
||||||
|
Date: January 2013
|
||||||
|
KernelVersion: 3.7
|
||||||
|
Contact: "Savoir-faire Linux Inc." <kernel@savoirfairelinux.com>
|
||||||
|
Description:
|
||||||
|
Indicates the presence of an external reset. If it is present,
|
||||||
|
it will display "1", otherwise "0".
|
||||||
|
|
||||||
|
What: /sys/devices/platform/ts5500/id
|
||||||
|
Date: January 2013
|
||||||
|
KernelVersion: 3.7
|
||||||
|
Contact: "Savoir-faire Linux Inc." <kernel@savoirfairelinux.com>
|
||||||
|
Description:
|
||||||
|
Product ID of the TS board. TS-5500 ID is 0x60.
|
||||||
|
|
||||||
|
What: /sys/devices/platform/ts5500/jumpers
|
||||||
|
Date: January 2013
|
||||||
|
KernelVersion: 3.7
|
||||||
|
Contact: "Savoir-faire Linux Inc." <kernel@savoirfairelinux.com>
|
||||||
|
Description:
|
||||||
|
Bitfield showing the jumpers' state. If a jumper is present,
|
||||||
|
the corresponding bit is set. For instance, 0x0e means jumpers
|
||||||
|
2, 3 and 4 are set.
|
||||||
|
|
||||||
|
What: /sys/devices/platform/ts5500/rs485
|
||||||
|
Date: January 2013
|
||||||
|
KernelVersion: 3.7
|
||||||
|
Contact: "Savoir-faire Linux Inc." <kernel@savoirfairelinux.com>
|
||||||
|
Description:
|
||||||
|
Indicates the presence of the RS485 option. If it is present,
|
||||||
|
it will display "1", otherwise "0".
|
||||||
|
|
||||||
|
What: /sys/devices/platform/ts5500/sram
|
||||||
|
Date: January 2013
|
||||||
|
KernelVersion: 3.7
|
||||||
|
Contact: "Savoir-faire Linux Inc." <kernel@savoirfairelinux.com>
|
||||||
|
Description:
|
||||||
|
Indicates the presence of the SRAM option. If it is present,
|
||||||
|
it will display "1", otherwise "0".
|
||||||
@@ -546,15 +546,7 @@ config AUDIT
|
|||||||
logging of avc messages output). Does not do system-call
|
logging of avc messages output). Does not do system-call
|
||||||
auditing without CONFIG_AUDITSYSCALL.
|
auditing without CONFIG_AUDITSYSCALL.
|
||||||
|
|
||||||
Features that might still be considered unstable should be defined as
|
Seriously dangerous features (such as write support for certain
|
||||||
dependent on "EXPERIMENTAL":
|
|
||||||
|
|
||||||
config SLUB
|
|
||||||
depends on EXPERIMENTAL && !ARCH_USES_SLAB_PAGE_STRUCT
|
|
||||||
bool "SLUB (Unqueued Allocator)"
|
|
||||||
...
|
|
||||||
|
|
||||||
while seriously dangerous features (such as write support for certain
|
|
||||||
filesystems) should advertise this prominently in their prompt string:
|
filesystems) should advertise this prominently in their prompt string:
|
||||||
|
|
||||||
config ADFS_FS_RW
|
config ADFS_FS_RW
|
||||||
|
|||||||
@@ -468,11 +468,47 @@ To map a single region, you do:
|
|||||||
size_t size = buffer->len;
|
size_t size = buffer->len;
|
||||||
|
|
||||||
dma_handle = dma_map_single(dev, addr, size, direction);
|
dma_handle = dma_map_single(dev, addr, size, direction);
|
||||||
|
if (dma_mapping_error(dma_handle)) {
|
||||||
|
/*
|
||||||
|
* reduce current DMA mapping usage,
|
||||||
|
* delay and try again later or
|
||||||
|
* reset driver.
|
||||||
|
*/
|
||||||
|
goto map_error_handling;
|
||||||
|
}
|
||||||
|
|
||||||
and to unmap it:
|
and to unmap it:
|
||||||
|
|
||||||
dma_unmap_single(dev, dma_handle, size, direction);
|
dma_unmap_single(dev, dma_handle, size, direction);
|
||||||
|
|
||||||
|
You should call dma_mapping_error() as dma_map_single() could fail and return
|
||||||
|
error. Not all dma implementations support dma_mapping_error() interface.
|
||||||
|
However, it is a good practice to call dma_mapping_error() interface, which
|
||||||
|
will invoke the generic mapping error check interface. Doing so will ensure
|
||||||
|
that the mapping code will work correctly on all dma implementations without
|
||||||
|
any dependency on the specifics of the underlying implementation. Using the
|
||||||
|
returned address without checking for errors could result in failures ranging
|
||||||
|
from panics to silent data corruption. A couple of examples of incorrect ways
|
||||||
|
to check for errors that make assumptions about the underlying dma
|
||||||
|
implementation are as follows and these are applicable to dma_map_page() as
|
||||||
|
well.
|
||||||
|
|
||||||
|
Incorrect example 1:
|
||||||
|
dma_addr_t dma_handle;
|
||||||
|
|
||||||
|
dma_handle = dma_map_single(dev, addr, size, direction);
|
||||||
|
if ((dma_handle & 0xffff != 0) || (dma_handle >= 0x1000000)) {
|
||||||
|
goto map_error;
|
||||||
|
}
|
||||||
|
|
||||||
|
Incorrect example 2:
|
||||||
|
dma_addr_t dma_handle;
|
||||||
|
|
||||||
|
dma_handle = dma_map_single(dev, addr, size, direction);
|
||||||
|
if (dma_handle == DMA_ERROR_CODE) {
|
||||||
|
goto map_error;
|
||||||
|
}
|
||||||
|
|
||||||
You should call dma_unmap_single when the DMA activity is finished, e.g.
|
You should call dma_unmap_single when the DMA activity is finished, e.g.
|
||||||
from the interrupt which told you that the DMA transfer is done.
|
from the interrupt which told you that the DMA transfer is done.
|
||||||
|
|
||||||
@@ -489,6 +525,14 @@ Specifically:
|
|||||||
size_t size = buffer->len;
|
size_t size = buffer->len;
|
||||||
|
|
||||||
dma_handle = dma_map_page(dev, page, offset, size, direction);
|
dma_handle = dma_map_page(dev, page, offset, size, direction);
|
||||||
|
if (dma_mapping_error(dma_handle)) {
|
||||||
|
/*
|
||||||
|
* reduce current DMA mapping usage,
|
||||||
|
* delay and try again later or
|
||||||
|
* reset driver.
|
||||||
|
*/
|
||||||
|
goto map_error_handling;
|
||||||
|
}
|
||||||
|
|
||||||
...
|
...
|
||||||
|
|
||||||
@@ -496,6 +540,12 @@ Specifically:
|
|||||||
|
|
||||||
Here, "offset" means byte offset within the given page.
|
Here, "offset" means byte offset within the given page.
|
||||||
|
|
||||||
|
You should call dma_mapping_error() as dma_map_page() could fail and return
|
||||||
|
error as outlined under the dma_map_single() discussion.
|
||||||
|
|
||||||
|
You should call dma_unmap_page when the DMA activity is finished, e.g.
|
||||||
|
from the interrupt which told you that the DMA transfer is done.
|
||||||
|
|
||||||
With scatterlists, you map a region gathered from several regions by:
|
With scatterlists, you map a region gathered from several regions by:
|
||||||
|
|
||||||
int i, count = dma_map_sg(dev, sglist, nents, direction);
|
int i, count = dma_map_sg(dev, sglist, nents, direction);
|
||||||
@@ -578,6 +628,14 @@ to use the dma_sync_*() interfaces.
|
|||||||
dma_addr_t mapping;
|
dma_addr_t mapping;
|
||||||
|
|
||||||
mapping = dma_map_single(cp->dev, buffer, len, DMA_FROM_DEVICE);
|
mapping = dma_map_single(cp->dev, buffer, len, DMA_FROM_DEVICE);
|
||||||
|
if (dma_mapping_error(dma_handle)) {
|
||||||
|
/*
|
||||||
|
* reduce current DMA mapping usage,
|
||||||
|
* delay and try again later or
|
||||||
|
* reset driver.
|
||||||
|
*/
|
||||||
|
goto map_error_handling;
|
||||||
|
}
|
||||||
|
|
||||||
cp->rx_buf = buffer;
|
cp->rx_buf = buffer;
|
||||||
cp->rx_len = len;
|
cp->rx_len = len;
|
||||||
@@ -658,6 +716,75 @@ failure can be determined by:
|
|||||||
* delay and try again later or
|
* delay and try again later or
|
||||||
* reset driver.
|
* reset driver.
|
||||||
*/
|
*/
|
||||||
|
goto map_error_handling;
|
||||||
|
}
|
||||||
|
|
||||||
|
- unmap pages that are already mapped, when mapping error occurs in the middle
|
||||||
|
of a multiple page mapping attempt. These example are applicable to
|
||||||
|
dma_map_page() as well.
|
||||||
|
|
||||||
|
Example 1:
|
||||||
|
dma_addr_t dma_handle1;
|
||||||
|
dma_addr_t dma_handle2;
|
||||||
|
|
||||||
|
dma_handle1 = dma_map_single(dev, addr, size, direction);
|
||||||
|
if (dma_mapping_error(dev, dma_handle1)) {
|
||||||
|
/*
|
||||||
|
* reduce current DMA mapping usage,
|
||||||
|
* delay and try again later or
|
||||||
|
* reset driver.
|
||||||
|
*/
|
||||||
|
goto map_error_handling1;
|
||||||
|
}
|
||||||
|
dma_handle2 = dma_map_single(dev, addr, size, direction);
|
||||||
|
if (dma_mapping_error(dev, dma_handle2)) {
|
||||||
|
/*
|
||||||
|
* reduce current DMA mapping usage,
|
||||||
|
* delay and try again later or
|
||||||
|
* reset driver.
|
||||||
|
*/
|
||||||
|
goto map_error_handling2;
|
||||||
|
}
|
||||||
|
|
||||||
|
...
|
||||||
|
|
||||||
|
map_error_handling2:
|
||||||
|
dma_unmap_single(dma_handle1);
|
||||||
|
map_error_handling1:
|
||||||
|
|
||||||
|
Example 2: (if buffers are allocated in a loop, unmap all mapped buffers when
|
||||||
|
mapping error is detected in the middle)
|
||||||
|
|
||||||
|
dma_addr_t dma_addr;
|
||||||
|
dma_addr_t array[DMA_BUFFERS];
|
||||||
|
int save_index = 0;
|
||||||
|
|
||||||
|
for (i = 0; i < DMA_BUFFERS; i++) {
|
||||||
|
|
||||||
|
...
|
||||||
|
|
||||||
|
dma_addr = dma_map_single(dev, addr, size, direction);
|
||||||
|
if (dma_mapping_error(dev, dma_addr)) {
|
||||||
|
/*
|
||||||
|
* reduce current DMA mapping usage,
|
||||||
|
* delay and try again later or
|
||||||
|
* reset driver.
|
||||||
|
*/
|
||||||
|
goto map_error_handling;
|
||||||
|
}
|
||||||
|
array[i].dma_addr = dma_addr;
|
||||||
|
save_index++;
|
||||||
|
}
|
||||||
|
|
||||||
|
...
|
||||||
|
|
||||||
|
map_error_handling:
|
||||||
|
|
||||||
|
for (i = 0; i < save_index; i++) {
|
||||||
|
|
||||||
|
...
|
||||||
|
|
||||||
|
dma_unmap_single(array[i].dma_addr);
|
||||||
}
|
}
|
||||||
|
|
||||||
Networking drivers must call dev_kfree_skb to free the socket buffer
|
Networking drivers must call dev_kfree_skb to free the socket buffer
|
||||||
|
|||||||
@@ -678,3 +678,15 @@ out of dma_debug_entries. These entries are preallocated at boot. The number
|
|||||||
of preallocated entries is defined per architecture. If it is too low for you
|
of preallocated entries is defined per architecture. If it is too low for you
|
||||||
boot with 'dma_debug_entries=<your_desired_number>' to overwrite the
|
boot with 'dma_debug_entries=<your_desired_number>' to overwrite the
|
||||||
architectural default.
|
architectural default.
|
||||||
|
|
||||||
|
void debug_dmap_mapping_error(struct device *dev, dma_addr_t dma_addr);
|
||||||
|
|
||||||
|
dma-debug interface debug_dma_mapping_error() to debug drivers that fail
|
||||||
|
to check dma mapping errors on addresses returned by dma_map_single() and
|
||||||
|
dma_map_page() interfaces. This interface clears a flag set by
|
||||||
|
debug_dma_map_page() to indicate that dma_mapping_error() has been called by
|
||||||
|
the driver. When driver does unmap, debug_dma_unmap() checks the flag and if
|
||||||
|
this flag is still set, prints warning message that includes call trace that
|
||||||
|
leads up to the unmap. This interface can be called from dma_mapping_error()
|
||||||
|
routines to enable dma mapping error check debugging.
|
||||||
|
|
||||||
|
|||||||
@@ -91,3 +91,12 @@ transferred to 'device' domain. This attribute can be also used for
|
|||||||
dma_unmap_{single,page,sg} functions family to force buffer to stay in
|
dma_unmap_{single,page,sg} functions family to force buffer to stay in
|
||||||
device domain after releasing a mapping for it. Use this attribute with
|
device domain after releasing a mapping for it. Use this attribute with
|
||||||
care!
|
care!
|
||||||
|
|
||||||
|
DMA_ATTR_FORCE_CONTIGUOUS
|
||||||
|
-------------------------
|
||||||
|
|
||||||
|
By default DMA-mapping subsystem is allowed to assemble the buffer
|
||||||
|
allocated by dma_alloc_attrs() function from individual pages if it can
|
||||||
|
be mapped as contiguous chunk into device dma address space. By
|
||||||
|
specifing this attribute the allocated buffer is forced to be contiguous
|
||||||
|
also in physical memory.
|
||||||
|
|||||||
@@ -107,8 +107,8 @@
|
|||||||
!Finclude/net/cfg80211.h key_params
|
!Finclude/net/cfg80211.h key_params
|
||||||
!Finclude/net/cfg80211.h survey_info_flags
|
!Finclude/net/cfg80211.h survey_info_flags
|
||||||
!Finclude/net/cfg80211.h survey_info
|
!Finclude/net/cfg80211.h survey_info
|
||||||
!Finclude/net/cfg80211.h beacon_parameters
|
!Finclude/net/cfg80211.h cfg80211_beacon_data
|
||||||
!Finclude/net/cfg80211.h plink_actions
|
!Finclude/net/cfg80211.h cfg80211_ap_settings
|
||||||
!Finclude/net/cfg80211.h station_parameters
|
!Finclude/net/cfg80211.h station_parameters
|
||||||
!Finclude/net/cfg80211.h station_info_flags
|
!Finclude/net/cfg80211.h station_info_flags
|
||||||
!Finclude/net/cfg80211.h rate_info_flags
|
!Finclude/net/cfg80211.h rate_info_flags
|
||||||
|
|||||||
@@ -743,6 +743,10 @@ char *date;</synopsis>
|
|||||||
These two operations are mandatory for GEM drivers that support DRM
|
These two operations are mandatory for GEM drivers that support DRM
|
||||||
PRIME.
|
PRIME.
|
||||||
</para>
|
</para>
|
||||||
|
<sect4>
|
||||||
|
<title>DRM PRIME Helper Functions Reference</title>
|
||||||
|
!Pdrivers/gpu/drm/drm_prime.c PRIME Helpers
|
||||||
|
</sect4>
|
||||||
</sect3>
|
</sect3>
|
||||||
<sect3 id="drm-gem-objects-mapping">
|
<sect3 id="drm-gem-objects-mapping">
|
||||||
<title>GEM Objects Mapping</title>
|
<title>GEM Objects Mapping</title>
|
||||||
@@ -978,10 +982,25 @@ int max_width, max_height;</synopsis>
|
|||||||
If the parameters are deemed valid, drivers then create, initialize and
|
If the parameters are deemed valid, drivers then create, initialize and
|
||||||
return an instance of struct <structname>drm_framebuffer</structname>.
|
return an instance of struct <structname>drm_framebuffer</structname>.
|
||||||
If desired the instance can be embedded in a larger driver-specific
|
If desired the instance can be embedded in a larger driver-specific
|
||||||
structure. The new instance is initialized with a call to
|
structure. Drivers must fill its <structfield>width</structfield>,
|
||||||
<function>drm_framebuffer_init</function> which takes a pointer to DRM
|
<structfield>height</structfield>, <structfield>pitches</structfield>,
|
||||||
frame buffer operations (struct
|
<structfield>offsets</structfield>, <structfield>depth</structfield>,
|
||||||
<structname>drm_framebuffer_funcs</structname>). Frame buffer operations are
|
<structfield>bits_per_pixel</structfield> and
|
||||||
|
<structfield>pixel_format</structfield> fields from the values passed
|
||||||
|
through the <parameter>drm_mode_fb_cmd2</parameter> argument. They
|
||||||
|
should call the <function>drm_helper_mode_fill_fb_struct</function>
|
||||||
|
helper function to do so.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
The initailization of the new framebuffer instance is finalized with a
|
||||||
|
call to <function>drm_framebuffer_init</function> which takes a pointer
|
||||||
|
to DRM frame buffer operations (struct
|
||||||
|
<structname>drm_framebuffer_funcs</structname>). Note that this function
|
||||||
|
publishes the framebuffer and so from this point on it can be accessed
|
||||||
|
concurrently from other threads. Hence it must be the last step in the
|
||||||
|
driver's framebuffer initialization sequence. Frame buffer operations
|
||||||
|
are
|
||||||
<itemizedlist>
|
<itemizedlist>
|
||||||
<listitem>
|
<listitem>
|
||||||
<synopsis>int (*create_handle)(struct drm_framebuffer *fb,
|
<synopsis>int (*create_handle)(struct drm_framebuffer *fb,
|
||||||
@@ -1022,16 +1041,16 @@ int max_width, max_height;</synopsis>
|
|||||||
</itemizedlist>
|
</itemizedlist>
|
||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
After initializing the <structname>drm_framebuffer</structname>
|
The lifetime of a drm framebuffer is controlled with a reference count,
|
||||||
instance drivers must fill its <structfield>width</structfield>,
|
drivers can grab additional references with
|
||||||
<structfield>height</structfield>, <structfield>pitches</structfield>,
|
<function>drm_framebuffer_reference</function> </para> and drop them
|
||||||
<structfield>offsets</structfield>, <structfield>depth</structfield>,
|
again with <function>drm_framebuffer_unreference</function>. For
|
||||||
<structfield>bits_per_pixel</structfield> and
|
driver-private framebuffers for which the last reference is never
|
||||||
<structfield>pixel_format</structfield> fields from the values passed
|
dropped (e.g. for the fbdev framebuffer when the struct
|
||||||
through the <parameter>drm_mode_fb_cmd2</parameter> argument. They
|
<structname>drm_framebuffer</structname> is embedded into the fbdev
|
||||||
should call the <function>drm_helper_mode_fill_fb_struct</function>
|
helper struct) drivers can manually clean up a framebuffer at module
|
||||||
helper function to do so.
|
unload time with
|
||||||
</para>
|
<function>drm_framebuffer_unregister_private</function>.
|
||||||
</sect2>
|
</sect2>
|
||||||
<sect2>
|
<sect2>
|
||||||
<title>Output Polling</title>
|
<title>Output Polling</title>
|
||||||
@@ -1043,6 +1062,22 @@ int max_width, max_height;</synopsis>
|
|||||||
operation.
|
operation.
|
||||||
</para>
|
</para>
|
||||||
</sect2>
|
</sect2>
|
||||||
|
<sect2>
|
||||||
|
<title>Locking</title>
|
||||||
|
<para>
|
||||||
|
Beside some lookup structures with their own locking (which is hidden
|
||||||
|
behind the interface functions) most of the modeset state is protected
|
||||||
|
by the <code>dev-<mode_config.lock</code> mutex and additionally
|
||||||
|
per-crtc locks to allow cursor updates, pageflips and similar operations
|
||||||
|
to occur concurrently with background tasks like output detection.
|
||||||
|
Operations which cross domains like a full modeset always grab all
|
||||||
|
locks. Drivers there need to protect resources shared between crtcs with
|
||||||
|
additional locking. They also need to be careful to always grab the
|
||||||
|
relevant crtc locks if a modset functions touches crtc state, e.g. for
|
||||||
|
load detection (which does only grab the <code>mode_config.lock</code>
|
||||||
|
to allow concurrent screen updates on live crtcs).
|
||||||
|
</para>
|
||||||
|
</sect2>
|
||||||
</sect1>
|
</sect1>
|
||||||
|
|
||||||
<!-- Internals: kms initialization and cleanup -->
|
<!-- Internals: kms initialization and cleanup -->
|
||||||
@@ -1125,6 +1160,12 @@ int max_width, max_height;</synopsis>
|
|||||||
without waiting for rendering or page flip to complete and must block
|
without waiting for rendering or page flip to complete and must block
|
||||||
any new rendering to the frame buffer until the page flip completes.
|
any new rendering to the frame buffer until the page flip completes.
|
||||||
</para>
|
</para>
|
||||||
|
<para>
|
||||||
|
If a page flip can be successfully scheduled the driver must set the
|
||||||
|
<code>drm_crtc-<fb</code> field to the new framebuffer pointed to
|
||||||
|
by <code>fb</code>. This is important so that the reference counting
|
||||||
|
on framebuffers stays balanced.
|
||||||
|
</para>
|
||||||
<para>
|
<para>
|
||||||
If a page flip is already pending, the
|
If a page flip is already pending, the
|
||||||
<methodname>page_flip</methodname> operation must return
|
<methodname>page_flip</methodname> operation must return
|
||||||
@@ -1141,23 +1182,13 @@ int max_width, max_height;</synopsis>
|
|||||||
the <methodname>page_flip</methodname> operation will be called with a
|
the <methodname>page_flip</methodname> operation will be called with a
|
||||||
non-NULL <parameter>event</parameter> argument pointing to a
|
non-NULL <parameter>event</parameter> argument pointing to a
|
||||||
<structname>drm_pending_vblank_event</structname> instance. Upon page
|
<structname>drm_pending_vblank_event</structname> instance. Upon page
|
||||||
flip completion the driver must fill the
|
flip completion the driver must call <methodname>drm_send_vblank_event</methodname>
|
||||||
<parameter>event</parameter>::<structfield>event</structfield>
|
to fill in the event and send to wake up any waiting processes.
|
||||||
<structfield>sequence</structfield>, <structfield>tv_sec</structfield>
|
This can be performed with
|
||||||
and <structfield>tv_usec</structfield> fields with the associated
|
|
||||||
vertical blanking count and timestamp, add the event to the
|
|
||||||
<parameter>drm_file</parameter> list of events to be signaled, and wake
|
|
||||||
up any waiting process. This can be performed with
|
|
||||||
<programlisting><![CDATA[
|
<programlisting><![CDATA[
|
||||||
struct timeval now;
|
|
||||||
|
|
||||||
event->event.sequence = drm_vblank_count_and_time(..., &now);
|
|
||||||
event->event.tv_sec = now.tv_sec;
|
|
||||||
event->event.tv_usec = now.tv_usec;
|
|
||||||
|
|
||||||
spin_lock_irqsave(&dev->event_lock, flags);
|
spin_lock_irqsave(&dev->event_lock, flags);
|
||||||
list_add_tail(&event->base.link, &event->base.file_priv->event_list);
|
...
|
||||||
wake_up_interruptible(&event->base.file_priv->event_wait);
|
drm_send_vblank_event(dev, pipe, event);
|
||||||
spin_unlock_irqrestore(&dev->event_lock, flags);
|
spin_unlock_irqrestore(&dev->event_lock, flags);
|
||||||
]]></programlisting>
|
]]></programlisting>
|
||||||
</para>
|
</para>
|
||||||
@@ -1619,12 +1650,16 @@ void intel_crt_init(struct drm_device *dev)
|
|||||||
make its properties available to applications.
|
make its properties available to applications.
|
||||||
</para>
|
</para>
|
||||||
</sect2>
|
</sect2>
|
||||||
|
<sect2>
|
||||||
|
<title>KMS API Functions</title>
|
||||||
|
!Edrivers/gpu/drm/drm_crtc.c
|
||||||
|
</sect2>
|
||||||
</sect1>
|
</sect1>
|
||||||
|
|
||||||
<!-- Internals: mid-layer helper functions -->
|
<!-- Internals: kms helper functions -->
|
||||||
|
|
||||||
<sect1>
|
<sect1>
|
||||||
<title>Mid-layer Helper Functions</title>
|
<title>Mode Setting Helper Functions</title>
|
||||||
<para>
|
<para>
|
||||||
The CRTC, encoder and connector functions provided by the drivers
|
The CRTC, encoder and connector functions provided by the drivers
|
||||||
implement the DRM API. They're called by the DRM core and ioctl handlers
|
implement the DRM API. They're called by the DRM core and ioctl handlers
|
||||||
@@ -2106,6 +2141,26 @@ void intel_crt_init(struct drm_device *dev)
|
|||||||
</listitem>
|
</listitem>
|
||||||
</itemizedlist>
|
</itemizedlist>
|
||||||
</sect2>
|
</sect2>
|
||||||
|
<sect2>
|
||||||
|
<title>Modeset Helper Functions Reference</title>
|
||||||
|
!Edrivers/gpu/drm/drm_crtc_helper.c
|
||||||
|
</sect2>
|
||||||
|
<sect2>
|
||||||
|
<title>fbdev Helper Functions Reference</title>
|
||||||
|
!Pdrivers/gpu/drm/drm_fb_helper.c fbdev helpers
|
||||||
|
!Edrivers/gpu/drm/drm_fb_helper.c
|
||||||
|
!Iinclude/drm/drm_fb_helper.h
|
||||||
|
</sect2>
|
||||||
|
<sect2>
|
||||||
|
<title>Display Port Helper Functions Reference</title>
|
||||||
|
!Pdrivers/gpu/drm/drm_dp_helper.c dp helpers
|
||||||
|
!Iinclude/drm/drm_dp_helper.h
|
||||||
|
!Edrivers/gpu/drm/drm_dp_helper.c
|
||||||
|
</sect2>
|
||||||
|
<sect2>
|
||||||
|
<title>EDID Helper Functions Reference</title>
|
||||||
|
!Edrivers/gpu/drm/drm_edid.c
|
||||||
|
</sect2>
|
||||||
</sect1>
|
</sect1>
|
||||||
|
|
||||||
<!-- Internals: vertical blanking -->
|
<!-- Internals: vertical blanking -->
|
||||||
|
|||||||
@@ -58,6 +58,9 @@
|
|||||||
|
|
||||||
<sect1><title>String Conversions</title>
|
<sect1><title>String Conversions</title>
|
||||||
!Elib/vsprintf.c
|
!Elib/vsprintf.c
|
||||||
|
!Finclude/linux/kernel.h kstrtol
|
||||||
|
!Finclude/linux/kernel.h kstrtoul
|
||||||
|
!Elib/kstrtox.c
|
||||||
</sect1>
|
</sect1>
|
||||||
<sect1><title>String Manipulation</title>
|
<sect1><title>String Manipulation</title>
|
||||||
<!-- All functions are exported at now
|
<!-- All functions are exported at now
|
||||||
|
|||||||
@@ -945,7 +945,7 @@ printk(KERN_INFO "my ip: %pI4\n", &ipaddress);
|
|||||||
|
|
||||||
<sect1 id="sym-exportsymbols">
|
<sect1 id="sym-exportsymbols">
|
||||||
<title><function>EXPORT_SYMBOL()</function>
|
<title><function>EXPORT_SYMBOL()</function>
|
||||||
<filename class="headerfile">include/linux/module.h</filename></title>
|
<filename class="headerfile">include/linux/export.h</filename></title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
This is the classic method of exporting a symbol: dynamically
|
This is the classic method of exporting a symbol: dynamically
|
||||||
@@ -955,7 +955,7 @@ printk(KERN_INFO "my ip: %pI4\n", &ipaddress);
|
|||||||
|
|
||||||
<sect1 id="sym-exportsymbols-gpl">
|
<sect1 id="sym-exportsymbols-gpl">
|
||||||
<title><function>EXPORT_SYMBOL_GPL()</function>
|
<title><function>EXPORT_SYMBOL_GPL()</function>
|
||||||
<filename class="headerfile">include/linux/module.h</filename></title>
|
<filename class="headerfile">include/linux/export.h</filename></title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Similar to <function>EXPORT_SYMBOL()</function> except that the
|
Similar to <function>EXPORT_SYMBOL()</function> except that the
|
||||||
@@ -1184,13 +1184,6 @@ static struct block_device_operations opt_fops = {
|
|||||||
<filename>Documentation/kbuild/kconfig-language.txt</filename>.
|
<filename>Documentation/kbuild/kconfig-language.txt</filename>.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
|
||||||
You may well want to make your CONFIG option only visible if
|
|
||||||
<symbol>CONFIG_EXPERIMENTAL</symbol> is enabled: this serves as a
|
|
||||||
warning to users. There many other fancy things you can do: see
|
|
||||||
the various <filename>Kconfig</filename> files for ideas.
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
In your description of the option, make sure you address both the
|
In your description of the option, make sure you address both the
|
||||||
expert user and the user who knows nothing about your feature. Mention
|
expert user and the user who knows nothing about your feature. Mention
|
||||||
|
|||||||
@@ -94,10 +94,8 @@
|
|||||||
<sect1 id="CompileKGDB">
|
<sect1 id="CompileKGDB">
|
||||||
<title>Kernel config options for kgdb</title>
|
<title>Kernel config options for kgdb</title>
|
||||||
<para>
|
<para>
|
||||||
To enable <symbol>CONFIG_KGDB</symbol> you should first turn on
|
To enable <symbol>CONFIG_KGDB</symbol> you should look under
|
||||||
"Prompt for development and/or incomplete code/drivers"
|
"Kernel debugging" and select "KGDB: kernel debugger".
|
||||||
(CONFIG_EXPERIMENTAL) in "General setup", then under the
|
|
||||||
"Kernel debugging" select "KGDB: kernel debugger".
|
|
||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
While it is not a hard requirement that you have symbols in your
|
While it is not a hard requirement that you have symbols in your
|
||||||
|
|||||||
@@ -84,7 +84,7 @@ Added ISDB-T test originally written by Patrick Boettcher
|
|||||||
|
|
||||||
|
|
||||||
<title>LINUX DVB API</title>
|
<title>LINUX DVB API</title>
|
||||||
<subtitle>Version 5.8</subtitle>
|
<subtitle>Version 5.10</subtitle>
|
||||||
<!-- ADD THE CHAPTERS HERE -->
|
<!-- ADD THE CHAPTERS HERE -->
|
||||||
<chapter id="dvb_introdution">
|
<chapter id="dvb_introdution">
|
||||||
&sub-intro;
|
&sub-intro;
|
||||||
|
|||||||
@@ -7,14 +7,41 @@ the capability ioctls weren't implemented yet via the new way.</para>
|
|||||||
<para>The typical usage for the <constant>FE_GET_PROPERTY/FE_SET_PROPERTY</constant>
|
<para>The typical usage for the <constant>FE_GET_PROPERTY/FE_SET_PROPERTY</constant>
|
||||||
API is to replace the ioctl's were the <link linkend="dvb-frontend-parameters">
|
API is to replace the ioctl's were the <link linkend="dvb-frontend-parameters">
|
||||||
struct <constant>dvb_frontend_parameters</constant></link> were used.</para>
|
struct <constant>dvb_frontend_parameters</constant></link> were used.</para>
|
||||||
|
<section id="dtv-stats">
|
||||||
|
<title>DTV stats type</title>
|
||||||
|
<programlisting>
|
||||||
|
struct dtv_stats {
|
||||||
|
__u8 scale; /* enum fecap_scale_params type */
|
||||||
|
union {
|
||||||
|
__u64 uvalue; /* for counters and relative scales */
|
||||||
|
__s64 svalue; /* for 1/1000 dB measures */
|
||||||
|
};
|
||||||
|
} __packed;
|
||||||
|
</programlisting>
|
||||||
|
</section>
|
||||||
|
<section id="dtv-fe-stats">
|
||||||
|
<title>DTV stats type</title>
|
||||||
|
<programlisting>
|
||||||
|
#define MAX_DTV_STATS 4
|
||||||
|
|
||||||
|
struct dtv_fe_stats {
|
||||||
|
__u8 len;
|
||||||
|
struct dtv_stats stat[MAX_DTV_STATS];
|
||||||
|
} __packed;
|
||||||
|
</programlisting>
|
||||||
|
</section>
|
||||||
|
|
||||||
<section id="dtv-property">
|
<section id="dtv-property">
|
||||||
<title>DTV property type</title>
|
<title>DTV property type</title>
|
||||||
<programlisting>
|
<programlisting>
|
||||||
/* Reserved fields should be set to 0 */
|
/* Reserved fields should be set to 0 */
|
||||||
|
|
||||||
struct dtv_property {
|
struct dtv_property {
|
||||||
__u32 cmd;
|
__u32 cmd;
|
||||||
|
__u32 reserved[3];
|
||||||
union {
|
union {
|
||||||
__u32 data;
|
__u32 data;
|
||||||
|
struct dtv_fe_stats st;
|
||||||
struct {
|
struct {
|
||||||
__u8 data[32];
|
__u8 data[32];
|
||||||
__u32 len;
|
__u32 len;
|
||||||
@@ -440,7 +467,7 @@ typedef enum fe_delivery_system {
|
|||||||
<title><constant>DTV-ISDBT-LAYER*</constant> parameters</title>
|
<title><constant>DTV-ISDBT-LAYER*</constant> parameters</title>
|
||||||
<para>ISDB-T channels can be coded hierarchically. As opposed to DVB-T in
|
<para>ISDB-T channels can be coded hierarchically. As opposed to DVB-T in
|
||||||
ISDB-T hierarchical layers can be decoded simultaneously. For that
|
ISDB-T hierarchical layers can be decoded simultaneously. For that
|
||||||
reason a ISDB-T demodulator has 3 viterbi and 3 reed-solomon-decoders.</para>
|
reason a ISDB-T demodulator has 3 Viterbi and 3 Reed-Solomon decoders.</para>
|
||||||
<para>ISDB-T has 3 hierarchical layers which each can use a part of the
|
<para>ISDB-T has 3 hierarchical layers which each can use a part of the
|
||||||
available segments. The total number of segments over all layers has
|
available segments. The total number of segments over all layers has
|
||||||
to 13 in ISDB-T.</para>
|
to 13 in ISDB-T.</para>
|
||||||
@@ -850,6 +877,147 @@ enum fe_interleaving {
|
|||||||
<para>use the special macro LNA_AUTO to set LNA auto</para>
|
<para>use the special macro LNA_AUTO to set LNA auto</para>
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
<section id="frontend-stat-properties">
|
||||||
|
<title>Frontend statistics indicators</title>
|
||||||
|
<para>The values are returned via <constant>dtv_property.stat</constant>.
|
||||||
|
If the property is supported, <constant>dtv_property.stat.len</constant> is bigger than zero.</para>
|
||||||
|
<para>For most delivery systems, <constant>dtv_property.stat.len</constant>
|
||||||
|
will be 1 if the stats is supported, and the properties will
|
||||||
|
return a single value for each parameter.</para>
|
||||||
|
<para>It should be noticed, however, that new OFDM delivery systems
|
||||||
|
like ISDB can use different modulation types for each group of
|
||||||
|
carriers. On such standards, up to 3 groups of statistics can be
|
||||||
|
provided, and <constant>dtv_property.stat.len</constant> is updated
|
||||||
|
to reflect the "global" metrics, plus one metric per each carrier
|
||||||
|
group (called "layer" on ISDB).</para>
|
||||||
|
<para>So, in order to be consistent with other delivery systems, the first
|
||||||
|
value at <link linkend="dtv-stats"><constant>dtv_property.stat.dtv_stats</constant></link>
|
||||||
|
array refers to the global metric. The other elements of the array
|
||||||
|
represent each layer, starting from layer A(index 1),
|
||||||
|
layer B (index 2) and so on.</para>
|
||||||
|
<para>The number of filled elements are stored at <constant>dtv_property.stat.len</constant>.</para>
|
||||||
|
<para>Each element of the <constant>dtv_property.stat.dtv_stats</constant> array consists on two elements:</para>
|
||||||
|
<itemizedlist mark='opencircle'>
|
||||||
|
<listitem><para><constant>svalue</constant> or <constant>uvalue</constant>, where
|
||||||
|
<constant>svalue</constant> is for signed values of the measure (dB measures)
|
||||||
|
and <constant>uvalue</constant> is for unsigned values (counters, relative scale)</para></listitem>
|
||||||
|
<listitem><para><constant>scale</constant> - Scale for the value. It can be:</para>
|
||||||
|
<section id = "fecap-scale-params">
|
||||||
|
<itemizedlist mark='bullet'>
|
||||||
|
<listitem><para><constant>FE_SCALE_NOT_AVAILABLE</constant> - The parameter is supported by the frontend, but it was not possible to collect it (could be a transitory or permanent condition)</para></listitem>
|
||||||
|
<listitem><para><constant>FE_SCALE_DECIBEL</constant> - parameter is a signed value, measured in 1/1000 dB</para></listitem>
|
||||||
|
<listitem><para><constant>FE_SCALE_RELATIVE</constant> - parameter is a unsigned value, where 0 means 0% and 65535 means 100%.</para></listitem>
|
||||||
|
<listitem><para><constant>FE_SCALE_COUNTER</constant> - parameter is a unsigned value that counts the occurrence of an event, like bit error, block error, or lapsed time.</para></listitem>
|
||||||
|
</itemizedlist>
|
||||||
|
</section>
|
||||||
|
</listitem>
|
||||||
|
</itemizedlist>
|
||||||
|
<section id="DTV-STAT-SIGNAL-STRENGTH">
|
||||||
|
<title><constant>DTV_STAT_SIGNAL_STRENGTH</constant></title>
|
||||||
|
<para>Indicates the signal strength level at the analog part of the tuner or of the demod.</para>
|
||||||
|
<para>Possible scales for this metric are:</para>
|
||||||
|
<itemizedlist mark='bullet'>
|
||||||
|
<listitem><constant>FE_SCALE_NOT_AVAILABLE</constant> - it failed to measure it, or the measurement was not complete yet.</listitem>
|
||||||
|
<listitem><constant>FE_SCALE_DECIBEL</constant> - signal strength is in 0.0001 dBm units, power measured in miliwatts. This value is generally negative.</listitem>
|
||||||
|
<listitem><constant>FE_SCALE_RELATIVE</constant> - The frontend provides a 0% to 100% measurement for power (actually, 0 to 65535).</listitem>
|
||||||
|
</itemizedlist>
|
||||||
|
</section>
|
||||||
|
<section id="DTV-STAT-CNR">
|
||||||
|
<title><constant>DTV_STAT_CNR</constant></title>
|
||||||
|
<para>Indicates the Signal to Noise ratio for the main carrier.</para>
|
||||||
|
<para>Possible scales for this metric are:</para>
|
||||||
|
<itemizedlist mark='bullet'>
|
||||||
|
<listitem><constant>FE_SCALE_NOT_AVAILABLE</constant> - it failed to measure it, or the measurement was not complete yet.</listitem>
|
||||||
|
<listitem><constant>FE_SCALE_DECIBEL</constant> - Signal/Noise ratio is in 0.0001 dB units.</listitem>
|
||||||
|
<listitem><constant>FE_SCALE_RELATIVE</constant> - The frontend provides a 0% to 100% measurement for Signal/Noise (actually, 0 to 65535).</listitem>
|
||||||
|
</itemizedlist>
|
||||||
|
</section>
|
||||||
|
<section id="DTV-STAT-PRE-ERROR-BIT-COUNT">
|
||||||
|
<title><constant>DTV_STAT_PRE_ERROR_BIT_COUNT</constant></title>
|
||||||
|
<para>Measures the number of bit errors before the forward error correction (FEC) on the inner coding block (before Viterbi, LDPC or other inner code).</para>
|
||||||
|
<para>This measure is taken during the same interval as <constant>DTV_STAT_PRE_TOTAL_BIT_COUNT</constant>.</para>
|
||||||
|
<para>In order to get the BER (Bit Error Rate) measurement, it should be divided by
|
||||||
|
<link linkend="DTV-STAT-PRE-TOTAL-BIT-COUNT"><constant>DTV_STAT_PRE_TOTAL_BIT_COUNT</constant></link>.</para>
|
||||||
|
<para>This measurement is monotonically increased, as the frontend gets more bit count measurements.
|
||||||
|
The frontend may reset it when a channel/transponder is tuned.</para>
|
||||||
|
<para>Possible scales for this metric are:</para>
|
||||||
|
<itemizedlist mark='bullet'>
|
||||||
|
<listitem><constant>FE_SCALE_NOT_AVAILABLE</constant> - it failed to measure it, or the measurement was not complete yet.</listitem>
|
||||||
|
<listitem><constant>FE_SCALE_COUNTER</constant> - Number of error bits counted before the inner coding.</listitem>
|
||||||
|
</itemizedlist>
|
||||||
|
</section>
|
||||||
|
<section id="DTV-STAT-PRE-TOTAL-BIT-COUNT">
|
||||||
|
<title><constant>DTV_STAT_PRE_TOTAL_BIT_COUNT</constant></title>
|
||||||
|
<para>Measures the amount of bits received before the inner code block, during the same period as
|
||||||
|
<link linkend="DTV-STAT-PRE-ERROR-BIT-COUNT"><constant>DTV_STAT_PRE_ERROR_BIT_COUNT</constant></link> measurement was taken.</para>
|
||||||
|
<para>It should be noticed that this measurement can be smaller than the total amount of bits on the transport stream,
|
||||||
|
as the frontend may need to manually restart the measurement, loosing some data between each measurement interval.</para>
|
||||||
|
<para>This measurement is monotonically increased, as the frontend gets more bit count measurements.
|
||||||
|
The frontend may reset it when a channel/transponder is tuned.</para>
|
||||||
|
<para>Possible scales for this metric are:</para>
|
||||||
|
<itemizedlist mark='bullet'>
|
||||||
|
<listitem><constant>FE_SCALE_NOT_AVAILABLE</constant> - it failed to measure it, or the measurement was not complete yet.</listitem>
|
||||||
|
<listitem><constant>FE_SCALE_COUNTER</constant> - Number of bits counted while measuring
|
||||||
|
<link linkend="DTV-STAT-PRE-ERROR-BIT-COUNT"><constant>DTV_STAT_PRE_ERROR_BIT_COUNT</constant></link>.</listitem>
|
||||||
|
</itemizedlist>
|
||||||
|
</section>
|
||||||
|
<section id="DTV-STAT-POST-ERROR-BIT-COUNT">
|
||||||
|
<title><constant>DTV_STAT_POST_ERROR_BIT_COUNT</constant></title>
|
||||||
|
<para>Measures the number of bit errors after the forward error correction (FEC) done by inner code block (after Viterbi, LDPC or other inner code).</para>
|
||||||
|
<para>This measure is taken during the same interval as <constant>DTV_STAT_POST_TOTAL_BIT_COUNT</constant>.</para>
|
||||||
|
<para>In order to get the BER (Bit Error Rate) measurement, it should be divided by
|
||||||
|
<link linkend="DTV-STAT-POST-TOTAL-BIT-COUNT"><constant>DTV_STAT_POST_TOTAL_BIT_COUNT</constant></link>.</para>
|
||||||
|
<para>This measurement is monotonically increased, as the frontend gets more bit count measurements.
|
||||||
|
The frontend may reset it when a channel/transponder is tuned.</para>
|
||||||
|
<para>Possible scales for this metric are:</para>
|
||||||
|
<itemizedlist mark='bullet'>
|
||||||
|
<listitem><constant>FE_SCALE_NOT_AVAILABLE</constant> - it failed to measure it, or the measurement was not complete yet.</listitem>
|
||||||
|
<listitem><constant>FE_SCALE_COUNTER</constant> - Number of error bits counted after the inner coding.</listitem>
|
||||||
|
</itemizedlist>
|
||||||
|
</section>
|
||||||
|
<section id="DTV-STAT-POST-TOTAL-BIT-COUNT">
|
||||||
|
<title><constant>DTV_STAT_POST_TOTAL_BIT_COUNT</constant></title>
|
||||||
|
<para>Measures the amount of bits received after the inner coding, during the same period as
|
||||||
|
<link linkend="DTV-STAT-POST-ERROR-BIT-COUNT"><constant>DTV_STAT_POST_ERROR_BIT_COUNT</constant></link> measurement was taken.</para>
|
||||||
|
<para>It should be noticed that this measurement can be smaller than the total amount of bits on the transport stream,
|
||||||
|
as the frontend may need to manually restart the measurement, loosing some data between each measurement interval.</para>
|
||||||
|
<para>This measurement is monotonically increased, as the frontend gets more bit count measurements.
|
||||||
|
The frontend may reset it when a channel/transponder is tuned.</para>
|
||||||
|
<para>Possible scales for this metric are:</para>
|
||||||
|
<itemizedlist mark='bullet'>
|
||||||
|
<listitem><constant>FE_SCALE_NOT_AVAILABLE</constant> - it failed to measure it, or the measurement was not complete yet.</listitem>
|
||||||
|
<listitem><constant>FE_SCALE_COUNTER</constant> - Number of bits counted while measuring
|
||||||
|
<link linkend="DTV-STAT-POST-ERROR-BIT-COUNT"><constant>DTV_STAT_POST_ERROR_BIT_COUNT</constant></link>.</listitem>
|
||||||
|
</itemizedlist>
|
||||||
|
</section>
|
||||||
|
<section id="DTV-STAT-ERROR-BLOCK-COUNT">
|
||||||
|
<title><constant>DTV_STAT_ERROR_BLOCK_COUNT</constant></title>
|
||||||
|
<para>Measures the number of block errors after the outer forward error correction coding (after Reed-Solomon or other outer code).</para>
|
||||||
|
<para>This measurement is monotonically increased, as the frontend gets more bit count measurements.
|
||||||
|
The frontend may reset it when a channel/transponder is tuned.</para>
|
||||||
|
<para>Possible scales for this metric are:</para>
|
||||||
|
<itemizedlist mark='bullet'>
|
||||||
|
<listitem><constant>FE_SCALE_NOT_AVAILABLE</constant> - it failed to measure it, or the measurement was not complete yet.</listitem>
|
||||||
|
<listitem><constant>FE_SCALE_COUNTER</constant> - Number of error blocks counted after the outer coding.</listitem>
|
||||||
|
</itemizedlist>
|
||||||
|
</section>
|
||||||
|
<section id="DTV-STAT-TOTAL-BLOCK-COUNT">
|
||||||
|
<title><constant>DTV-STAT_TOTAL_BLOCK_COUNT</constant></title>
|
||||||
|
<para>Measures the total number of blocks received during the same period as
|
||||||
|
<link linkend="DTV-STAT-ERROR-BLOCK-COUNT"><constant>DTV_STAT_ERROR_BLOCK_COUNT</constant></link> measurement was taken.</para>
|
||||||
|
<para>It can be used to calculate the PER indicator, by dividing
|
||||||
|
<link linkend="DTV-STAT-ERROR-BLOCK-COUNT"><constant>DTV_STAT_ERROR_BLOCK_COUNT</constant></link>
|
||||||
|
by <link linkend="DTV-STAT-TOTAL-BLOCK-COUNT"><constant>DTV-STAT-TOTAL-BLOCK-COUNT</constant></link>.</para>
|
||||||
|
<para>Possible scales for this metric are:</para>
|
||||||
|
<itemizedlist mark='bullet'>
|
||||||
|
<listitem><constant>FE_SCALE_NOT_AVAILABLE</constant> - it failed to measure it, or the measurement was not complete yet.</listitem>
|
||||||
|
<listitem><constant>FE_SCALE_COUNTER</constant> - Number of blocks counted while measuring
|
||||||
|
<link linkend="DTV-STAT-ERROR-BLOCK-COUNT"><constant>DTV_STAT_ERROR_BLOCK_COUNT</constant></link>.</listitem>
|
||||||
|
</itemizedlist>
|
||||||
|
</section>
|
||||||
|
</section>
|
||||||
|
|
||||||
<section id="frontend-property-terrestrial-systems">
|
<section id="frontend-property-terrestrial-systems">
|
||||||
<title>Properties used on terrestrial delivery systems</title>
|
<title>Properties used on terrestrial delivery systems</title>
|
||||||
<section id="dvbt-params">
|
<section id="dvbt-params">
|
||||||
@@ -871,6 +1039,7 @@ enum fe_interleaving {
|
|||||||
<listitem><para><link linkend="DTV-HIERARCHY"><constant>DTV_HIERARCHY</constant></link></para></listitem>
|
<listitem><para><link linkend="DTV-HIERARCHY"><constant>DTV_HIERARCHY</constant></link></para></listitem>
|
||||||
<listitem><para><link linkend="DTV-LNA"><constant>DTV_LNA</constant></link></para></listitem>
|
<listitem><para><link linkend="DTV-LNA"><constant>DTV_LNA</constant></link></para></listitem>
|
||||||
</itemizedlist>
|
</itemizedlist>
|
||||||
|
<para>In addition, the <link linkend="frontend-stat-properties">DTV QoS statistics</link> are also valid.</para>
|
||||||
</section>
|
</section>
|
||||||
<section id="dvbt2-params">
|
<section id="dvbt2-params">
|
||||||
<title>DVB-T2 delivery system</title>
|
<title>DVB-T2 delivery system</title>
|
||||||
@@ -895,6 +1064,7 @@ enum fe_interleaving {
|
|||||||
<listitem><para><link linkend="DTV-STREAM-ID"><constant>DTV_STREAM_ID</constant></link></para></listitem>
|
<listitem><para><link linkend="DTV-STREAM-ID"><constant>DTV_STREAM_ID</constant></link></para></listitem>
|
||||||
<listitem><para><link linkend="DTV-LNA"><constant>DTV_LNA</constant></link></para></listitem>
|
<listitem><para><link linkend="DTV-LNA"><constant>DTV_LNA</constant></link></para></listitem>
|
||||||
</itemizedlist>
|
</itemizedlist>
|
||||||
|
<para>In addition, the <link linkend="frontend-stat-properties">DTV QoS statistics</link> are also valid.</para>
|
||||||
</section>
|
</section>
|
||||||
<section id="isdbt">
|
<section id="isdbt">
|
||||||
<title>ISDB-T delivery system</title>
|
<title>ISDB-T delivery system</title>
|
||||||
@@ -948,6 +1118,7 @@ enum fe_interleaving {
|
|||||||
<listitem><para><link linkend="DTV-ISDBT-LAYER-SEGMENT-COUNT"><constant>DTV_ISDBT_LAYERC_SEGMENT_COUNT</constant></link></para></listitem>
|
<listitem><para><link linkend="DTV-ISDBT-LAYER-SEGMENT-COUNT"><constant>DTV_ISDBT_LAYERC_SEGMENT_COUNT</constant></link></para></listitem>
|
||||||
<listitem><para><link linkend="DTV-ISDBT-LAYER-TIME-INTERLEAVING"><constant>DTV_ISDBT_LAYERC_TIME_INTERLEAVING</constant></link></para></listitem>
|
<listitem><para><link linkend="DTV-ISDBT-LAYER-TIME-INTERLEAVING"><constant>DTV_ISDBT_LAYERC_TIME_INTERLEAVING</constant></link></para></listitem>
|
||||||
</itemizedlist>
|
</itemizedlist>
|
||||||
|
<para>In addition, the <link linkend="frontend-stat-properties">DTV QoS statistics</link> are also valid.</para>
|
||||||
</section>
|
</section>
|
||||||
<section id="atsc-params">
|
<section id="atsc-params">
|
||||||
<title>ATSC delivery system</title>
|
<title>ATSC delivery system</title>
|
||||||
@@ -961,6 +1132,7 @@ enum fe_interleaving {
|
|||||||
<listitem><para><link linkend="DTV-MODULATION"><constant>DTV_MODULATION</constant></link></para></listitem>
|
<listitem><para><link linkend="DTV-MODULATION"><constant>DTV_MODULATION</constant></link></para></listitem>
|
||||||
<listitem><para><link linkend="DTV-BANDWIDTH-HZ"><constant>DTV_BANDWIDTH_HZ</constant></link></para></listitem>
|
<listitem><para><link linkend="DTV-BANDWIDTH-HZ"><constant>DTV_BANDWIDTH_HZ</constant></link></para></listitem>
|
||||||
</itemizedlist>
|
</itemizedlist>
|
||||||
|
<para>In addition, the <link linkend="frontend-stat-properties">DTV QoS statistics</link> are also valid.</para>
|
||||||
</section>
|
</section>
|
||||||
<section id="atscmh-params">
|
<section id="atscmh-params">
|
||||||
<title>ATSC-MH delivery system</title>
|
<title>ATSC-MH delivery system</title>
|
||||||
@@ -988,6 +1160,7 @@ enum fe_interleaving {
|
|||||||
<listitem><para><link linkend="DTV-ATSCMH-SCCC-CODE-MODE-C"><constant>DTV_ATSCMH_SCCC_CODE_MODE_C</constant></link></para></listitem>
|
<listitem><para><link linkend="DTV-ATSCMH-SCCC-CODE-MODE-C"><constant>DTV_ATSCMH_SCCC_CODE_MODE_C</constant></link></para></listitem>
|
||||||
<listitem><para><link linkend="DTV-ATSCMH-SCCC-CODE-MODE-D"><constant>DTV_ATSCMH_SCCC_CODE_MODE_D</constant></link></para></listitem>
|
<listitem><para><link linkend="DTV-ATSCMH-SCCC-CODE-MODE-D"><constant>DTV_ATSCMH_SCCC_CODE_MODE_D</constant></link></para></listitem>
|
||||||
</itemizedlist>
|
</itemizedlist>
|
||||||
|
<para>In addition, the <link linkend="frontend-stat-properties">DTV QoS statistics</link> are also valid.</para>
|
||||||
</section>
|
</section>
|
||||||
<section id="dtmb-params">
|
<section id="dtmb-params">
|
||||||
<title>DTMB delivery system</title>
|
<title>DTMB delivery system</title>
|
||||||
@@ -1007,6 +1180,7 @@ enum fe_interleaving {
|
|||||||
<listitem><para><link linkend="DTV-INTERLEAVING"><constant>DTV_INTERLEAVING</constant></link></para></listitem>
|
<listitem><para><link linkend="DTV-INTERLEAVING"><constant>DTV_INTERLEAVING</constant></link></para></listitem>
|
||||||
<listitem><para><link linkend="DTV-LNA"><constant>DTV_LNA</constant></link></para></listitem>
|
<listitem><para><link linkend="DTV-LNA"><constant>DTV_LNA</constant></link></para></listitem>
|
||||||
</itemizedlist>
|
</itemizedlist>
|
||||||
|
<para>In addition, the <link linkend="frontend-stat-properties">DTV QoS statistics</link> are also valid.</para>
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
<section id="frontend-property-cable-systems">
|
<section id="frontend-property-cable-systems">
|
||||||
@@ -1028,6 +1202,7 @@ enum fe_interleaving {
|
|||||||
<listitem><para><link linkend="DTV-INNER-FEC"><constant>DTV_INNER_FEC</constant></link></para></listitem>
|
<listitem><para><link linkend="DTV-INNER-FEC"><constant>DTV_INNER_FEC</constant></link></para></listitem>
|
||||||
<listitem><para><link linkend="DTV-LNA"><constant>DTV_LNA</constant></link></para></listitem>
|
<listitem><para><link linkend="DTV-LNA"><constant>DTV_LNA</constant></link></para></listitem>
|
||||||
</itemizedlist>
|
</itemizedlist>
|
||||||
|
<para>In addition, the <link linkend="frontend-stat-properties">DTV QoS statistics</link> are also valid.</para>
|
||||||
</section>
|
</section>
|
||||||
<section id="dvbc-annex-b-params">
|
<section id="dvbc-annex-b-params">
|
||||||
<title>DVB-C Annex B delivery system</title>
|
<title>DVB-C Annex B delivery system</title>
|
||||||
@@ -1043,6 +1218,7 @@ enum fe_interleaving {
|
|||||||
<listitem><para><link linkend="DTV-INVERSION"><constant>DTV_INVERSION</constant></link></para></listitem>
|
<listitem><para><link linkend="DTV-INVERSION"><constant>DTV_INVERSION</constant></link></para></listitem>
|
||||||
<listitem><para><link linkend="DTV-LNA"><constant>DTV_LNA</constant></link></para></listitem>
|
<listitem><para><link linkend="DTV-LNA"><constant>DTV_LNA</constant></link></para></listitem>
|
||||||
</itemizedlist>
|
</itemizedlist>
|
||||||
|
<para>In addition, the <link linkend="frontend-stat-properties">DTV QoS statistics</link> are also valid.</para>
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
<section id="frontend-property-satellital-systems">
|
<section id="frontend-property-satellital-systems">
|
||||||
@@ -1062,6 +1238,7 @@ enum fe_interleaving {
|
|||||||
<listitem><para><link linkend="DTV-VOLTAGE"><constant>DTV_VOLTAGE</constant></link></para></listitem>
|
<listitem><para><link linkend="DTV-VOLTAGE"><constant>DTV_VOLTAGE</constant></link></para></listitem>
|
||||||
<listitem><para><link linkend="DTV-TONE"><constant>DTV_TONE</constant></link></para></listitem>
|
<listitem><para><link linkend="DTV-TONE"><constant>DTV_TONE</constant></link></para></listitem>
|
||||||
</itemizedlist>
|
</itemizedlist>
|
||||||
|
<para>In addition, the <link linkend="frontend-stat-properties">DTV QoS statistics</link> are also valid.</para>
|
||||||
<para>Future implementations might add those two missing parameters:</para>
|
<para>Future implementations might add those two missing parameters:</para>
|
||||||
<itemizedlist mark='opencircle'>
|
<itemizedlist mark='opencircle'>
|
||||||
<listitem><para><link linkend="DTV-DISEQC-MASTER"><constant>DTV_DISEQC_MASTER</constant></link></para></listitem>
|
<listitem><para><link linkend="DTV-DISEQC-MASTER"><constant>DTV_DISEQC_MASTER</constant></link></para></listitem>
|
||||||
@@ -1077,6 +1254,7 @@ enum fe_interleaving {
|
|||||||
<listitem><para><link linkend="DTV-ROLLOFF"><constant>DTV_ROLLOFF</constant></link></para></listitem>
|
<listitem><para><link linkend="DTV-ROLLOFF"><constant>DTV_ROLLOFF</constant></link></para></listitem>
|
||||||
<listitem><para><link linkend="DTV-STREAM-ID"><constant>DTV_STREAM_ID</constant></link></para></listitem>
|
<listitem><para><link linkend="DTV-STREAM-ID"><constant>DTV_STREAM_ID</constant></link></para></listitem>
|
||||||
</itemizedlist>
|
</itemizedlist>
|
||||||
|
<para>In addition, the <link linkend="frontend-stat-properties">DTV QoS statistics</link> are also valid.</para>
|
||||||
</section>
|
</section>
|
||||||
<section id="turbo-params">
|
<section id="turbo-params">
|
||||||
<title>Turbo code delivery system</title>
|
<title>Turbo code delivery system</title>
|
||||||
|
|||||||
@@ -230,7 +230,7 @@ typedef enum fe_status {
|
|||||||
<entry align="char">The frontend has found a DVB signal</entry>
|
<entry align="char">The frontend has found a DVB signal</entry>
|
||||||
</row><row>
|
</row><row>
|
||||||
<entry align="char">FE_HAS_VITERBI</entry>
|
<entry align="char">FE_HAS_VITERBI</entry>
|
||||||
<entry align="char">The frontend FEC code is stable</entry>
|
<entry align="char">The frontend FEC inner coding (Viterbi, LDPC or other inner code) is stable</entry>
|
||||||
</row><row>
|
</row><row>
|
||||||
<entry align="char">FE_HAS_SYNC</entry>
|
<entry align="char">FE_HAS_SYNC</entry>
|
||||||
<entry align="char">Syncronization bytes was found</entry>
|
<entry align="char">Syncronization bytes was found</entry>
|
||||||
|
|||||||
@@ -609,7 +609,7 @@ to zero and the <constant>VIDIOC_G_STD</constant>,
|
|||||||
<para>Applications can make use of the <xref linkend="input-capabilities" /> and
|
<para>Applications can make use of the <xref linkend="input-capabilities" /> and
|
||||||
<xref linkend="output-capabilities"/> flags to determine whether the video standard ioctls
|
<xref linkend="output-capabilities"/> flags to determine whether the video standard ioctls
|
||||||
are available for the device.</para>
|
are available for the device.</para>
|
||||||
&ENOTTY;.
|
|
||||||
<para>See <xref linkend="buffer" /> for a rationale. Probably
|
<para>See <xref linkend="buffer" /> for a rationale. Probably
|
||||||
even USB cameras follow some well known video standard. It might have
|
even USB cameras follow some well known video standard. It might have
|
||||||
been better to explicitly indicate elsewhere if a device cannot live
|
been better to explicitly indicate elsewhere if a device cannot live
|
||||||
|
|||||||
@@ -2477,6 +2477,22 @@ that used it. It was originally scheduled for removal in 2.6.35.
|
|||||||
</orderedlist>
|
</orderedlist>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
<section>
|
||||||
|
<title>V4L2 in Linux 3.9</title>
|
||||||
|
<orderedlist>
|
||||||
|
<listitem>
|
||||||
|
<para>Added timestamp types to
|
||||||
|
<structfield>flags</structfield> field in
|
||||||
|
<structname>v4l2_buffer</structname>. See <xref
|
||||||
|
linkend="buffer-flags" />.</para>
|
||||||
|
</listitem>
|
||||||
|
<listitem>
|
||||||
|
<para>Added <constant>V4L2_EVENT_CTRL_CH_RANGE</constant> control event
|
||||||
|
changes flag. See <xref linkend="changes-flags"/>.</para>
|
||||||
|
</listitem>
|
||||||
|
</orderedlist>
|
||||||
|
</section>
|
||||||
|
|
||||||
<section id="other">
|
<section id="other">
|
||||||
<title>Relation of V4L2 to other Linux multimedia APIs</title>
|
<title>Relation of V4L2 to other Linux multimedia APIs</title>
|
||||||
|
|
||||||
@@ -2586,6 +2602,13 @@ ioctls.</para>
|
|||||||
<para>Vendor and device specific media bus pixel formats.
|
<para>Vendor and device specific media bus pixel formats.
|
||||||
<xref linkend="v4l2-mbus-vendor-spec-fmts" />.</para>
|
<xref linkend="v4l2-mbus-vendor-spec-fmts" />.</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
|
<listitem>
|
||||||
|
<para>Importing DMABUF file descriptors as a new IO method described
|
||||||
|
in <xref linkend="dmabuf" />.</para>
|
||||||
|
</listitem>
|
||||||
|
<listitem>
|
||||||
|
<para>Exporting DMABUF files using &VIDIOC-EXPBUF; ioctl.</para>
|
||||||
|
</listitem>
|
||||||
</itemizedlist>
|
</itemizedlist>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
|||||||
@@ -203,29 +203,6 @@ and should not be used in new drivers and applications.</entry>
|
|||||||
<entry>boolean</entry>
|
<entry>boolean</entry>
|
||||||
<entry>Mirror the picture vertically.</entry>
|
<entry>Mirror the picture vertically.</entry>
|
||||||
</row>
|
</row>
|
||||||
<row>
|
|
||||||
<entry><constant>V4L2_CID_HCENTER_DEPRECATED</constant> (formerly <constant>V4L2_CID_HCENTER</constant>)</entry>
|
|
||||||
<entry>integer</entry>
|
|
||||||
<entry>Horizontal image centering. This control is
|
|
||||||
deprecated. New drivers and applications should use the <link
|
|
||||||
linkend="camera-controls">Camera class controls</link>
|
|
||||||
<constant>V4L2_CID_PAN_ABSOLUTE</constant>,
|
|
||||||
<constant>V4L2_CID_PAN_RELATIVE</constant> and
|
|
||||||
<constant>V4L2_CID_PAN_RESET</constant> instead.</entry>
|
|
||||||
</row>
|
|
||||||
<row>
|
|
||||||
<entry><constant>V4L2_CID_VCENTER_DEPRECATED</constant>
|
|
||||||
(formerly <constant>V4L2_CID_VCENTER</constant>)</entry>
|
|
||||||
<entry>integer</entry>
|
|
||||||
<entry>Vertical image centering. Centering is intended to
|
|
||||||
<emphasis>physically</emphasis> adjust cameras. For image cropping see
|
|
||||||
<xref linkend="crop" />, for clipping <xref linkend="overlay" />. This
|
|
||||||
control is deprecated. New drivers and applications should use the
|
|
||||||
<link linkend="camera-controls">Camera class controls</link>
|
|
||||||
<constant>V4L2_CID_TILT_ABSOLUTE</constant>,
|
|
||||||
<constant>V4L2_CID_TILT_RELATIVE</constant> and
|
|
||||||
<constant>V4L2_CID_TILT_RESET</constant> instead.</entry>
|
|
||||||
</row>
|
|
||||||
<row id="v4l2-power-line-frequency">
|
<row id="v4l2-power-line-frequency">
|
||||||
<entry><constant>V4L2_CID_POWER_LINE_FREQUENCY</constant></entry>
|
<entry><constant>V4L2_CID_POWER_LINE_FREQUENCY</constant></entry>
|
||||||
<entry>enum</entry>
|
<entry>enum</entry>
|
||||||
|
|||||||
@@ -116,7 +116,7 @@ my_suspend (struct pci_dev * pci_dev,
|
|||||||
return 0; /* a negative value on error, 0 on success. */
|
return 0; /* a negative value on error, 0 on success. */
|
||||||
}
|
}
|
||||||
|
|
||||||
static void __devexit
|
static void
|
||||||
my_remove (struct pci_dev * pci_dev)
|
my_remove (struct pci_dev * pci_dev)
|
||||||
{
|
{
|
||||||
my_device *my = pci_get_drvdata (pci_dev);
|
my_device *my = pci_get_drvdata (pci_dev);
|
||||||
@@ -124,7 +124,7 @@ my_remove (struct pci_dev * pci_dev)
|
|||||||
/* Describe me. */
|
/* Describe me. */
|
||||||
}
|
}
|
||||||
|
|
||||||
static int __devinit
|
static int
|
||||||
my_probe (struct pci_dev * pci_dev,
|
my_probe (struct pci_dev * pci_dev,
|
||||||
const struct pci_device_id * pci_id)
|
const struct pci_device_id * pci_id)
|
||||||
{
|
{
|
||||||
@@ -157,7 +157,7 @@ my_pci_driver = {
|
|||||||
.id_table = my_pci_device_ids,
|
.id_table = my_pci_device_ids,
|
||||||
|
|
||||||
.probe = my_probe,
|
.probe = my_probe,
|
||||||
.remove = __devexit_p (my_remove),
|
.remove = my_remove,
|
||||||
|
|
||||||
/* Power management functions. */
|
/* Power management functions. */
|
||||||
.suspend = my_suspend,
|
.suspend = my_suspend,
|
||||||
|
|||||||
@@ -331,7 +331,7 @@ application until one or more buffers can be dequeued. By default
|
|||||||
outgoing queue. When the <constant>O_NONBLOCK</constant> flag was
|
outgoing queue. When the <constant>O_NONBLOCK</constant> flag was
|
||||||
given to the &func-open; function, <constant>VIDIOC_DQBUF</constant>
|
given to the &func-open; function, <constant>VIDIOC_DQBUF</constant>
|
||||||
returns immediately with an &EAGAIN; when no buffer is available. The
|
returns immediately with an &EAGAIN; when no buffer is available. The
|
||||||
&func-select; or &func-poll; function are always available.</para>
|
&func-select; or &func-poll; functions are always available.</para>
|
||||||
|
|
||||||
<para>To start and stop capturing or output applications call the
|
<para>To start and stop capturing or output applications call the
|
||||||
&VIDIOC-STREAMON; and &VIDIOC-STREAMOFF; ioctl. Note
|
&VIDIOC-STREAMON; and &VIDIOC-STREAMOFF; ioctl. Note
|
||||||
@@ -472,6 +472,165 @@ rest should be evident.</para>
|
|||||||
</footnote></para>
|
</footnote></para>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
<section id="dmabuf">
|
||||||
|
<title>Streaming I/O (DMA buffer importing)</title>
|
||||||
|
|
||||||
|
<note>
|
||||||
|
<title>Experimental</title>
|
||||||
|
<para>This is an <link linkend="experimental">experimental</link>
|
||||||
|
interface and may change in the future.</para>
|
||||||
|
</note>
|
||||||
|
|
||||||
|
<para>The DMABUF framework provides a generic method for sharing buffers
|
||||||
|
between multiple devices. Device drivers that support DMABUF can export a DMA
|
||||||
|
buffer to userspace as a file descriptor (known as the exporter role), import a
|
||||||
|
DMA buffer from userspace using a file descriptor previously exported for a
|
||||||
|
different or the same device (known as the importer role), or both. This
|
||||||
|
section describes the DMABUF importer role API in V4L2.</para>
|
||||||
|
|
||||||
|
<para>Refer to <link linkend="vidioc-expbuf">DMABUF exporting</link> for
|
||||||
|
details about exporting V4L2 buffers as DMABUF file descriptors.</para>
|
||||||
|
|
||||||
|
<para>Input and output devices support the streaming I/O method when the
|
||||||
|
<constant>V4L2_CAP_STREAMING</constant> flag in the
|
||||||
|
<structfield>capabilities</structfield> field of &v4l2-capability; returned by
|
||||||
|
the &VIDIOC-QUERYCAP; ioctl is set. Whether importing DMA buffers through
|
||||||
|
DMABUF file descriptors is supported is determined by calling the
|
||||||
|
&VIDIOC-REQBUFS; ioctl with the memory type set to
|
||||||
|
<constant>V4L2_MEMORY_DMABUF</constant>.</para>
|
||||||
|
|
||||||
|
<para>This I/O method is dedicated to sharing DMA buffers between different
|
||||||
|
devices, which may be V4L devices or other video-related devices (e.g. DRM).
|
||||||
|
Buffers (planes) are allocated by a driver on behalf of an application. Next,
|
||||||
|
these buffers are exported to the application as file descriptors using an API
|
||||||
|
which is specific for an allocator driver. Only such file descriptor are
|
||||||
|
exchanged. The descriptors and meta-information are passed in &v4l2-buffer; (or
|
||||||
|
in &v4l2-plane; in the multi-planar API case). The driver must be switched
|
||||||
|
into DMABUF I/O mode by calling the &VIDIOC-REQBUFS; with the desired buffer
|
||||||
|
type.</para>
|
||||||
|
|
||||||
|
<example>
|
||||||
|
<title>Initiating streaming I/O with DMABUF file descriptors</title>
|
||||||
|
|
||||||
|
<programlisting>
|
||||||
|
&v4l2-requestbuffers; reqbuf;
|
||||||
|
|
||||||
|
memset(&reqbuf, 0, sizeof (reqbuf));
|
||||||
|
reqbuf.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
|
||||||
|
reqbuf.memory = V4L2_MEMORY_DMABUF;
|
||||||
|
reqbuf.count = 1;
|
||||||
|
|
||||||
|
if (ioctl(fd, &VIDIOC-REQBUFS;, &reqbuf) == -1) {
|
||||||
|
if (errno == EINVAL)
|
||||||
|
printf("Video capturing or DMABUF streaming is not supported\n");
|
||||||
|
else
|
||||||
|
perror("VIDIOC_REQBUFS");
|
||||||
|
|
||||||
|
exit(EXIT_FAILURE);
|
||||||
|
}
|
||||||
|
</programlisting>
|
||||||
|
</example>
|
||||||
|
|
||||||
|
<para>The buffer (plane) file descriptor is passed on the fly with the
|
||||||
|
&VIDIOC-QBUF; ioctl. In case of multiplanar buffers, every plane can be
|
||||||
|
associated with a different DMABUF descriptor. Although buffers are commonly
|
||||||
|
cycled, applications can pass a different DMABUF descriptor at each
|
||||||
|
<constant>VIDIOC_QBUF</constant> call.</para>
|
||||||
|
|
||||||
|
<example>
|
||||||
|
<title>Queueing DMABUF using single plane API</title>
|
||||||
|
|
||||||
|
<programlisting>
|
||||||
|
int buffer_queue(int v4lfd, int index, int dmafd)
|
||||||
|
{
|
||||||
|
&v4l2-buffer; buf;
|
||||||
|
|
||||||
|
memset(&buf, 0, sizeof buf);
|
||||||
|
buf.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
|
||||||
|
buf.memory = V4L2_MEMORY_DMABUF;
|
||||||
|
buf.index = index;
|
||||||
|
buf.m.fd = dmafd;
|
||||||
|
|
||||||
|
if (ioctl(v4lfd, &VIDIOC-QBUF;, &buf) == -1) {
|
||||||
|
perror("VIDIOC_QBUF");
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
</programlisting>
|
||||||
|
</example>
|
||||||
|
|
||||||
|
<example>
|
||||||
|
<title>Queueing DMABUF using multi plane API</title>
|
||||||
|
|
||||||
|
<programlisting>
|
||||||
|
int buffer_queue_mp(int v4lfd, int index, int dmafd[], int n_planes)
|
||||||
|
{
|
||||||
|
&v4l2-buffer; buf;
|
||||||
|
&v4l2-plane; planes[VIDEO_MAX_PLANES];
|
||||||
|
int i;
|
||||||
|
|
||||||
|
memset(&buf, 0, sizeof buf);
|
||||||
|
buf.type = V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE;
|
||||||
|
buf.memory = V4L2_MEMORY_DMABUF;
|
||||||
|
buf.index = index;
|
||||||
|
buf.m.planes = planes;
|
||||||
|
buf.length = n_planes;
|
||||||
|
|
||||||
|
memset(&planes, 0, sizeof planes);
|
||||||
|
|
||||||
|
for (i = 0; i < n_planes; ++i)
|
||||||
|
buf.m.planes[i].m.fd = dmafd[i];
|
||||||
|
|
||||||
|
if (ioctl(v4lfd, &VIDIOC-QBUF;, &buf) == -1) {
|
||||||
|
perror("VIDIOC_QBUF");
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
</programlisting>
|
||||||
|
</example>
|
||||||
|
|
||||||
|
<para>Captured or displayed buffers are dequeued with the
|
||||||
|
&VIDIOC-DQBUF; ioctl. The driver can unlock the buffer at any
|
||||||
|
time between the completion of the DMA and this ioctl. The memory is
|
||||||
|
also unlocked when &VIDIOC-STREAMOFF; is called, &VIDIOC-REQBUFS;, or
|
||||||
|
when the device is closed.</para>
|
||||||
|
|
||||||
|
<para>For capturing applications it is customary to enqueue a
|
||||||
|
number of empty buffers, to start capturing and enter the read loop.
|
||||||
|
Here the application waits until a filled buffer can be dequeued, and
|
||||||
|
re-enqueues the buffer when the data is no longer needed. Output
|
||||||
|
applications fill and enqueue buffers, when enough buffers are stacked
|
||||||
|
up output is started. In the write loop, when the application
|
||||||
|
runs out of free buffers it must wait until an empty buffer can be
|
||||||
|
dequeued and reused. Two methods exist to suspend execution of the
|
||||||
|
application until one or more buffers can be dequeued. By default
|
||||||
|
<constant>VIDIOC_DQBUF</constant> blocks when no buffer is in the
|
||||||
|
outgoing queue. When the <constant>O_NONBLOCK</constant> flag was
|
||||||
|
given to the &func-open; function, <constant>VIDIOC_DQBUF</constant>
|
||||||
|
returns immediately with an &EAGAIN; when no buffer is available. The
|
||||||
|
&func-select; and &func-poll; functions are always available.</para>
|
||||||
|
|
||||||
|
<para>To start and stop capturing or displaying applications call the
|
||||||
|
&VIDIOC-STREAMON; and &VIDIOC-STREAMOFF; ioctls. Note that
|
||||||
|
<constant>VIDIOC_STREAMOFF</constant> removes all buffers from both queues and
|
||||||
|
unlocks all buffers as a side effect. Since there is no notion of doing
|
||||||
|
anything "now" on a multitasking system, if an application needs to synchronize
|
||||||
|
with another event it should examine the &v4l2-buffer;
|
||||||
|
<structfield>timestamp</structfield> of captured buffers, or set the field
|
||||||
|
before enqueuing buffers for output.</para>
|
||||||
|
|
||||||
|
<para>Drivers implementing DMABUF importing I/O must support the
|
||||||
|
<constant>VIDIOC_REQBUFS</constant>, <constant>VIDIOC_QBUF</constant>,
|
||||||
|
<constant>VIDIOC_DQBUF</constant>, <constant>VIDIOC_STREAMON</constant> and
|
||||||
|
<constant>VIDIOC_STREAMOFF</constant> ioctls, and the
|
||||||
|
<function>select()</function> and <function>poll()</function> functions.</para>
|
||||||
|
|
||||||
|
</section>
|
||||||
|
|
||||||
<section id="async">
|
<section id="async">
|
||||||
<title>Asynchronous I/O</title>
|
<title>Asynchronous I/O</title>
|
||||||
|
|
||||||
@@ -582,17 +741,19 @@ applications when an output stream.</entry>
|
|||||||
<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 the
|
<entry><para>For input streams this is time when the first data
|
||||||
system time (as returned by the <function>gettimeofday()</function>
|
byte was captured, as returned by the
|
||||||
function) when the first data byte was captured. For output streams
|
<function>clock_gettime()</function> function for the relevant
|
||||||
the data will not be displayed before this time, secondary to the
|
clock id; see <constant>V4L2_BUF_FLAG_TIMESTAMP_*</constant> in
|
||||||
nominal frame rate determined by the current video standard in
|
<xref linkend="buffer-flags" />. For output streams the data
|
||||||
enqueued order. Applications can for example zero this field to
|
will not be displayed before this time, secondary to the nominal
|
||||||
display frames as soon as possible. The driver stores the time at
|
frame rate determined by the current video standard in enqueued
|
||||||
which the first data byte was actually sent out in the
|
order. Applications can for example zero this field to display
|
||||||
<structfield>timestamp</structfield> field. This permits
|
frames as soon as possible. The driver stores the time at which
|
||||||
applications to monitor the drift between the video and system
|
the first data byte was actually sent out in the
|
||||||
clock.</para></entry>
|
<structfield>timestamp</structfield> field. This permits
|
||||||
|
applications to monitor the drift between the video and system
|
||||||
|
clock.</para></entry>
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<entry>&v4l2-timecode;</entry>
|
<entry>&v4l2-timecode;</entry>
|
||||||
@@ -672,6 +833,14 @@ memory, set by the application. See <xref linkend="userp" /> for details.
|
|||||||
in the <structfield>length</structfield> field of this
|
in the <structfield>length</structfield> field of this
|
||||||
<structname>v4l2_buffer</structname> structure.</entry>
|
<structname>v4l2_buffer</structname> structure.</entry>
|
||||||
</row>
|
</row>
|
||||||
|
<row>
|
||||||
|
<entry></entry>
|
||||||
|
<entry>int</entry>
|
||||||
|
<entry><structfield>fd</structfield></entry>
|
||||||
|
<entry>For the single-plane API and when
|
||||||
|
<structfield>memory</structfield> is <constant>V4L2_MEMORY_DMABUF</constant> this
|
||||||
|
is the file descriptor associated with a DMABUF buffer.</entry>
|
||||||
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<entry>__u32</entry>
|
<entry>__u32</entry>
|
||||||
<entry><structfield>length</structfield></entry>
|
<entry><structfield>length</structfield></entry>
|
||||||
@@ -736,13 +905,22 @@ should set this to 0.</entry>
|
|||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<entry></entry>
|
<entry></entry>
|
||||||
<entry>__unsigned long</entry>
|
<entry>unsigned long</entry>
|
||||||
<entry><structfield>userptr</structfield></entry>
|
<entry><structfield>userptr</structfield></entry>
|
||||||
<entry>When the memory type in the containing &v4l2-buffer; is
|
<entry>When the memory type in the containing &v4l2-buffer; is
|
||||||
<constant>V4L2_MEMORY_USERPTR</constant>, this is a userspace
|
<constant>V4L2_MEMORY_USERPTR</constant>, this is a userspace
|
||||||
pointer to the memory allocated for this plane by an application.
|
pointer to the memory allocated for this plane by an application.
|
||||||
</entry>
|
</entry>
|
||||||
</row>
|
</row>
|
||||||
|
<row>
|
||||||
|
<entry></entry>
|
||||||
|
<entry>int</entry>
|
||||||
|
<entry><structfield>fd</structfield></entry>
|
||||||
|
<entry>When the memory type in the containing &v4l2-buffer; is
|
||||||
|
<constant>V4L2_MEMORY_DMABUF</constant>, this is a file
|
||||||
|
descriptor associated with a DMABUF buffer, similar to the
|
||||||
|
<structfield>fd</structfield> field in &v4l2-buffer;.</entry>
|
||||||
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<entry>__u32</entry>
|
<entry>__u32</entry>
|
||||||
<entry><structfield>data_offset</structfield></entry>
|
<entry><structfield>data_offset</structfield></entry>
|
||||||
@@ -923,7 +1101,7 @@ application. Drivers set or clear this flag when the
|
|||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<entry><constant>V4L2_BUF_FLAG_NO_CACHE_INVALIDATE</constant></entry>
|
<entry><constant>V4L2_BUF_FLAG_NO_CACHE_INVALIDATE</constant></entry>
|
||||||
<entry>0x0400</entry>
|
<entry>0x0800</entry>
|
||||||
<entry>Caches do not have to be invalidated for this buffer.
|
<entry>Caches do not have to be invalidated for this buffer.
|
||||||
Typically applications shall use this flag if the data captured in the buffer
|
Typically applications shall use this flag if the data captured in the buffer
|
||||||
is not going to be touched by the CPU, instead the buffer will, probably, be
|
is not going to be touched by the CPU, instead the buffer will, probably, be
|
||||||
@@ -932,12 +1110,41 @@ passed on to a DMA-capable hardware unit for further processing or output.
|
|||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<entry><constant>V4L2_BUF_FLAG_NO_CACHE_CLEAN</constant></entry>
|
<entry><constant>V4L2_BUF_FLAG_NO_CACHE_CLEAN</constant></entry>
|
||||||
<entry>0x0800</entry>
|
<entry>0x1000</entry>
|
||||||
<entry>Caches do not have to be cleaned for this buffer.
|
<entry>Caches do not have to be cleaned for this buffer.
|
||||||
Typically applications shall use this flag for output buffers if the data
|
Typically applications shall use this flag for output buffers if the data
|
||||||
in this buffer has not been created by the CPU but by some DMA-capable unit,
|
in this buffer has not been created by the CPU but by some DMA-capable unit,
|
||||||
in which case caches have not been used.</entry>
|
in which case caches have not been used.</entry>
|
||||||
</row>
|
</row>
|
||||||
|
<row>
|
||||||
|
<entry><constant>V4L2_BUF_FLAG_TIMESTAMP_MASK</constant></entry>
|
||||||
|
<entry>0xe000</entry>
|
||||||
|
<entry>Mask for timestamp types below. To test the
|
||||||
|
timestamp type, mask out bits not belonging to timestamp
|
||||||
|
type by performing a logical and operation with buffer
|
||||||
|
flags and timestamp mask.</entry>
|
||||||
|
</row>
|
||||||
|
<row>
|
||||||
|
<entry><constant>V4L2_BUF_FLAG_TIMESTAMP_UNKNOWN</constant></entry>
|
||||||
|
<entry>0x0000</entry>
|
||||||
|
<entry>Unknown timestamp type. This type is used by
|
||||||
|
drivers before Linux 3.9 and may be either monotonic (see
|
||||||
|
below) or realtime (wall clock). Monotonic clock has been
|
||||||
|
favoured in embedded systems whereas most of the drivers
|
||||||
|
use the realtime clock. Either kinds of timestamps are
|
||||||
|
available in user space via
|
||||||
|
<function>clock_gettime(2)</function> using clock IDs
|
||||||
|
<constant>CLOCK_MONOTONIC</constant> and
|
||||||
|
<constant>CLOCK_REALTIME</constant>, respectively.</entry>
|
||||||
|
</row>
|
||||||
|
<row>
|
||||||
|
<entry><constant>V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC</constant></entry>
|
||||||
|
<entry>0x2000</entry>
|
||||||
|
<entry>The buffer timestamp has been taken from the
|
||||||
|
<constant>CLOCK_MONOTONIC</constant> clock. To access the
|
||||||
|
same clock outside V4L2, use
|
||||||
|
<function>clock_gettime(2)</function> .</entry>
|
||||||
|
</row>
|
||||||
</tbody>
|
</tbody>
|
||||||
</tgroup>
|
</tgroup>
|
||||||
</table>
|
</table>
|
||||||
@@ -964,6 +1171,12 @@ pointer</link> I/O.</entry>
|
|||||||
<entry>3</entry>
|
<entry>3</entry>
|
||||||
<entry>[to do]</entry>
|
<entry>[to do]</entry>
|
||||||
</row>
|
</row>
|
||||||
|
<row>
|
||||||
|
<entry><constant>V4L2_MEMORY_DMABUF</constant></entry>
|
||||||
|
<entry>4</entry>
|
||||||
|
<entry>The buffer is used for <link linkend="dmabuf">DMA shared
|
||||||
|
buffer</link> I/O.</entry>
|
||||||
|
</row>
|
||||||
</tbody>
|
</tbody>
|
||||||
</tgroup>
|
</tgroup>
|
||||||
</table>
|
</table>
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
<refnamediv>
|
<refnamediv>
|
||||||
<refname id="V4L2-PIX-FMT-NV12M"><constant>V4L2_PIX_FMT_NV12M</constant></refname>
|
<refname id="V4L2-PIX-FMT-NV12M"><constant>V4L2_PIX_FMT_NV12M</constant></refname>
|
||||||
<refname id="V4L2-PIX-FMT-NV21M"><constant>V4L2_PIX_FMT_NV21M</constant></refname>
|
<refname id="V4L2-PIX-FMT-NV21M"><constant>V4L2_PIX_FMT_NV21M</constant></refname>
|
||||||
<refname id="V4L2-PIX-FMT-NV12MT_16X16"><constant>V4L2_PIX_FMT_NV12MT_16X16</constant></refname>
|
<refname id="V4L2-PIX-FMT-NV12MT-16X16"><constant>V4L2_PIX_FMT_NV12MT_16X16</constant></refname>
|
||||||
<refpurpose>Variation of <constant>V4L2_PIX_FMT_NV12</constant> and <constant>V4L2_PIX_FMT_NV21</constant> with planes
|
<refpurpose>Variation of <constant>V4L2_PIX_FMT_NV12</constant> and <constant>V4L2_PIX_FMT_NV21</constant> with planes
|
||||||
non contiguous in memory. </refpurpose>
|
non contiguous in memory. </refpurpose>
|
||||||
</refnamediv>
|
</refnamediv>
|
||||||
|
|||||||
34
Documentation/DocBook/media/v4l/pixfmt-srggb10alaw8.xml
Normal file
34
Documentation/DocBook/media/v4l/pixfmt-srggb10alaw8.xml
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
<refentry>
|
||||||
|
<refmeta>
|
||||||
|
<refentrytitle>
|
||||||
|
V4L2_PIX_FMT_SBGGR10ALAW8 ('aBA8'),
|
||||||
|
V4L2_PIX_FMT_SGBRG10ALAW8 ('aGA8'),
|
||||||
|
V4L2_PIX_FMT_SGRBG10ALAW8 ('agA8'),
|
||||||
|
V4L2_PIX_FMT_SRGGB10ALAW8 ('aRA8'),
|
||||||
|
</refentrytitle>
|
||||||
|
&manvol;
|
||||||
|
</refmeta>
|
||||||
|
<refnamediv>
|
||||||
|
<refname id="V4L2-PIX-FMT-SBGGR10ALAW8">
|
||||||
|
<constant>V4L2_PIX_FMT_SBGGR10ALAW8</constant>
|
||||||
|
</refname>
|
||||||
|
<refname id="V4L2-PIX-FMT-SGBRG10ALAW8">
|
||||||
|
<constant>V4L2_PIX_FMT_SGBRG10ALAW8</constant>
|
||||||
|
</refname>
|
||||||
|
<refname id="V4L2-PIX-FMT-SGRBG10ALAW8">
|
||||||
|
<constant>V4L2_PIX_FMT_SGRBG10ALAW8</constant>
|
||||||
|
</refname>
|
||||||
|
<refname id="V4L2-PIX-FMT-SRGGB10ALAW8">
|
||||||
|
<constant>V4L2_PIX_FMT_SRGGB10ALAW8</constant>
|
||||||
|
</refname>
|
||||||
|
<refpurpose>10-bit Bayer formats compressed to 8 bits</refpurpose>
|
||||||
|
</refnamediv>
|
||||||
|
<refsect1>
|
||||||
|
<title>Description</title>
|
||||||
|
<para>The following four pixel formats are raw sRGB / Bayer
|
||||||
|
formats with 10 bits per color compressed to 8 bits each,
|
||||||
|
using the A-LAW algorithm. Each color component consumes 8
|
||||||
|
bits of memory. In other respects this format is similar to
|
||||||
|
<xref linkend="V4L2-PIX-FMT-SRGGB8"></xref>.</para>
|
||||||
|
</refsect1>
|
||||||
|
</refentry>
|
||||||
62
Documentation/DocBook/media/v4l/pixfmt-uv8.xml
Normal file
62
Documentation/DocBook/media/v4l/pixfmt-uv8.xml
Normal file
@@ -0,0 +1,62 @@
|
|||||||
|
<refentry id="V4L2-PIX-FMT-UV8">
|
||||||
|
<refmeta>
|
||||||
|
<refentrytitle>V4L2_PIX_FMT_UV8 ('UV8')</refentrytitle>
|
||||||
|
&manvol;
|
||||||
|
</refmeta>
|
||||||
|
<refnamediv>
|
||||||
|
<refname><constant>V4L2_PIX_FMT_UV8</constant></refname>
|
||||||
|
<refpurpose>UV plane interleaved</refpurpose>
|
||||||
|
</refnamediv>
|
||||||
|
<refsect1>
|
||||||
|
<title>Description</title>
|
||||||
|
<para>In this format there is no Y plane, Only CbCr plane. ie
|
||||||
|
(UV interleaved)</para>
|
||||||
|
<example>
|
||||||
|
<title>
|
||||||
|
<constant>V4L2_PIX_FMT_UV8</constant>
|
||||||
|
pixel image
|
||||||
|
</title>
|
||||||
|
|
||||||
|
<formalpara>
|
||||||
|
<title>Byte Order.</title>
|
||||||
|
<para>Each cell is one byte.
|
||||||
|
<informaltable frame="none">
|
||||||
|
<tgroup cols="5" align="center">
|
||||||
|
<colspec align="left" colwidth="2*" />
|
||||||
|
<tbody valign="top">
|
||||||
|
<row>
|
||||||
|
<entry>start + 0:</entry>
|
||||||
|
<entry>Cb<subscript>00</subscript></entry>
|
||||||
|
<entry>Cr<subscript>00</subscript></entry>
|
||||||
|
<entry>Cb<subscript>01</subscript></entry>
|
||||||
|
<entry>Cr<subscript>01</subscript></entry>
|
||||||
|
</row>
|
||||||
|
<row>
|
||||||
|
<entry>start + 4:</entry>
|
||||||
|
<entry>Cb<subscript>10</subscript></entry>
|
||||||
|
<entry>Cr<subscript>10</subscript></entry>
|
||||||
|
<entry>Cb<subscript>11</subscript></entry>
|
||||||
|
<entry>Cr<subscript>11</subscript></entry>
|
||||||
|
</row>
|
||||||
|
<row>
|
||||||
|
<entry>start + 8:</entry>
|
||||||
|
<entry>Cb<subscript>20</subscript></entry>
|
||||||
|
<entry>Cr<subscript>20</subscript></entry>
|
||||||
|
<entry>Cb<subscript>21</subscript></entry>
|
||||||
|
<entry>Cr<subscript>21</subscript></entry>
|
||||||
|
</row>
|
||||||
|
<row>
|
||||||
|
<entry>start + 12:</entry>
|
||||||
|
<entry>Cb<subscript>30</subscript></entry>
|
||||||
|
<entry>Cr<subscript>30</subscript></entry>
|
||||||
|
<entry>Cb<subscript>31</subscript></entry>
|
||||||
|
<entry>Cr<subscript>31</subscript></entry>
|
||||||
|
</row>
|
||||||
|
</tbody>
|
||||||
|
</tgroup>
|
||||||
|
</informaltable>
|
||||||
|
</para>
|
||||||
|
</formalpara>
|
||||||
|
</example>
|
||||||
|
</refsect1>
|
||||||
|
</refentry>
|
||||||
@@ -673,6 +673,7 @@ access the palette, this must be done with ioctls of the Linux framebuffer API.<
|
|||||||
&sub-srggb8;
|
&sub-srggb8;
|
||||||
&sub-sbggr16;
|
&sub-sbggr16;
|
||||||
&sub-srggb10;
|
&sub-srggb10;
|
||||||
|
&sub-srggb10alaw8;
|
||||||
&sub-srggb10dpcm8;
|
&sub-srggb10dpcm8;
|
||||||
&sub-srggb12;
|
&sub-srggb12;
|
||||||
</section>
|
</section>
|
||||||
@@ -701,6 +702,7 @@ information.</para>
|
|||||||
&sub-y12;
|
&sub-y12;
|
||||||
&sub-y10b;
|
&sub-y10b;
|
||||||
&sub-y16;
|
&sub-y16;
|
||||||
|
&sub-uv8;
|
||||||
&sub-yuyv;
|
&sub-yuyv;
|
||||||
&sub-uyvy;
|
&sub-uyvy;
|
||||||
&sub-yvyu;
|
&sub-yvyu;
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -139,6 +139,16 @@ 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>3.9</revnumber>
|
||||||
|
<date>2012-12-03</date>
|
||||||
|
<authorinitials>sa, sn</authorinitials>
|
||||||
|
<revremark>Added timestamp types to v4l2_buffer.
|
||||||
|
Added <constant>V4L2_EVENT_CTRL_CH_RANGE</constant> control
|
||||||
|
event changes flag, see <xref linkend="changes-flags"/>.
|
||||||
|
</revremark>
|
||||||
|
</revision>
|
||||||
|
|
||||||
<revision>
|
<revision>
|
||||||
<revnumber>3.6</revnumber>
|
<revnumber>3.6</revnumber>
|
||||||
<date>2012-07-02</date>
|
<date>2012-07-02</date>
|
||||||
@@ -472,7 +482,7 @@ and discussions on the V4L mailing list.</revremark>
|
|||||||
</partinfo>
|
</partinfo>
|
||||||
|
|
||||||
<title>Video for Linux Two API Specification</title>
|
<title>Video for Linux Two API Specification</title>
|
||||||
<subtitle>Revision 3.6</subtitle>
|
<subtitle>Revision 3.9</subtitle>
|
||||||
|
|
||||||
<chapter id="common">
|
<chapter id="common">
|
||||||
&sub-common;
|
&sub-common;
|
||||||
@@ -543,6 +553,7 @@ and discussions on the V4L mailing list.</revremark>
|
|||||||
&sub-enuminput;
|
&sub-enuminput;
|
||||||
&sub-enumoutput;
|
&sub-enumoutput;
|
||||||
&sub-enumstd;
|
&sub-enumstd;
|
||||||
|
&sub-expbuf;
|
||||||
&sub-g-audio;
|
&sub-g-audio;
|
||||||
&sub-g-audioout;
|
&sub-g-audioout;
|
||||||
&sub-g-crop;
|
&sub-g-crop;
|
||||||
|
|||||||
@@ -6,7 +6,8 @@
|
|||||||
|
|
||||||
<refnamediv>
|
<refnamediv>
|
||||||
<refname>VIDIOC_CREATE_BUFS</refname>
|
<refname>VIDIOC_CREATE_BUFS</refname>
|
||||||
<refpurpose>Create buffers for Memory Mapped or User Pointer I/O</refpurpose>
|
<refpurpose>Create buffers for Memory Mapped or User Pointer or DMA Buffer
|
||||||
|
I/O</refpurpose>
|
||||||
</refnamediv>
|
</refnamediv>
|
||||||
|
|
||||||
<refsynopsisdiv>
|
<refsynopsisdiv>
|
||||||
@@ -55,11 +56,11 @@
|
|||||||
</note>
|
</note>
|
||||||
|
|
||||||
<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>
|
mapped</link> or <link linkend="userp">user pointer</link> or <link
|
||||||
I/O. It can be used as an alternative or in addition to the
|
linkend="dmabuf">DMA buffer</link> I/O. It can be used as an alternative or in
|
||||||
<constant>VIDIOC_REQBUFS</constant> ioctl, when a tighter control over buffers
|
addition to the <constant>VIDIOC_REQBUFS</constant> ioctl, when a tighter
|
||||||
is required. This ioctl can be called multiple times to create buffers of
|
control over buffers is required. This ioctl can be called multiple times to
|
||||||
different sizes.</para>
|
create buffers of different sizes.</para>
|
||||||
|
|
||||||
<para>To allocate device buffers applications initialize relevant fields of
|
<para>To allocate device buffers applications initialize relevant fields of
|
||||||
the <structname>v4l2_create_buffers</structname> structure. They set the
|
the <structname>v4l2_create_buffers</structname> structure. They set the
|
||||||
@@ -109,7 +110,8 @@ information.</para>
|
|||||||
<entry>__u32</entry>
|
<entry>__u32</entry>
|
||||||
<entry><structfield>memory</structfield></entry>
|
<entry><structfield>memory</structfield></entry>
|
||||||
<entry>Applications set this field to
|
<entry>Applications set this field to
|
||||||
<constant>V4L2_MEMORY_MMAP</constant> or
|
<constant>V4L2_MEMORY_MMAP</constant>,
|
||||||
|
<constant>V4L2_MEMORY_DMABUF</constant> or
|
||||||
<constant>V4L2_MEMORY_USERPTR</constant>. See <xref linkend="v4l2-memory"
|
<constant>V4L2_MEMORY_USERPTR</constant>. See <xref linkend="v4l2-memory"
|
||||||
/></entry>
|
/></entry>
|
||||||
</row>
|
</row>
|
||||||
|
|||||||
@@ -261,6 +261,12 @@
|
|||||||
<entry>This control event was triggered because the control flags
|
<entry>This control event was triggered because the control flags
|
||||||
changed.</entry>
|
changed.</entry>
|
||||||
</row>
|
</row>
|
||||||
|
<row>
|
||||||
|
<entry><constant>V4L2_EVENT_CTRL_CH_RANGE</constant></entry>
|
||||||
|
<entry>0x0004</entry>
|
||||||
|
<entry>This control event was triggered because the minimum,
|
||||||
|
maximum, step or the default value of the control changed.</entry>
|
||||||
|
</row>
|
||||||
</tbody>
|
</tbody>
|
||||||
</tgroup>
|
</tgroup>
|
||||||
</table>
|
</table>
|
||||||
|
|||||||
208
Documentation/DocBook/media/v4l/vidioc-expbuf.xml
Normal file
208
Documentation/DocBook/media/v4l/vidioc-expbuf.xml
Normal file
@@ -0,0 +1,208 @@
|
|||||||
|
<refentry id="vidioc-expbuf">
|
||||||
|
|
||||||
|
<refmeta>
|
||||||
|
<refentrytitle>ioctl VIDIOC_EXPBUF</refentrytitle>
|
||||||
|
&manvol;
|
||||||
|
</refmeta>
|
||||||
|
|
||||||
|
<refnamediv>
|
||||||
|
<refname>VIDIOC_EXPBUF</refname>
|
||||||
|
<refpurpose>Export a buffer as a DMABUF file descriptor.</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 v4l2_exportbuffer *<parameter>argp</parameter></paramdef>
|
||||||
|
</funcprototype>
|
||||||
|
</funcsynopsis>
|
||||||
|
</refsynopsisdiv>
|
||||||
|
|
||||||
|
<refsect1>
|
||||||
|
<title>Arguments</title>
|
||||||
|
|
||||||
|
<variablelist>
|
||||||
|
<varlistentry>
|
||||||
|
<term><parameter>fd</parameter></term>
|
||||||
|
<listitem>
|
||||||
|
<para>&fd;</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
<varlistentry>
|
||||||
|
<term><parameter>request</parameter></term>
|
||||||
|
<listitem>
|
||||||
|
<para>VIDIOC_EXPBUF</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
<varlistentry>
|
||||||
|
<term><parameter>argp</parameter></term>
|
||||||
|
<listitem>
|
||||||
|
<para></para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
</variablelist>
|
||||||
|
</refsect1>
|
||||||
|
|
||||||
|
<refsect1>
|
||||||
|
<title>Description</title>
|
||||||
|
|
||||||
|
<note>
|
||||||
|
<title>Experimental</title>
|
||||||
|
<para>This is an <link linkend="experimental"> experimental </link>
|
||||||
|
interface and may change in the future.</para>
|
||||||
|
</note>
|
||||||
|
|
||||||
|
<para>This ioctl is an extension to the <link linkend="mmap">memory
|
||||||
|
mapping</link> I/O method, therefore it is available only for
|
||||||
|
<constant>V4L2_MEMORY_MMAP</constant> buffers. It can be used to export a
|
||||||
|
buffer as a DMABUF file at any time after buffers have been allocated with the
|
||||||
|
&VIDIOC-REQBUFS; ioctl.</para>
|
||||||
|
|
||||||
|
<para> To export a buffer, applications fill &v4l2-exportbuffer;. The
|
||||||
|
<structfield> type </structfield> field is set to the same buffer type as was
|
||||||
|
previously used with &v4l2-requestbuffers;<structfield> type </structfield>.
|
||||||
|
Applications must also set the <structfield> index </structfield> field. Valid
|
||||||
|
index numbers range from zero to the number of buffers allocated with
|
||||||
|
&VIDIOC-REQBUFS; (&v4l2-requestbuffers;<structfield> count </structfield>)
|
||||||
|
minus one. For the multi-planar API, applications set the <structfield> plane
|
||||||
|
</structfield> field to the index of the plane to be exported. Valid planes
|
||||||
|
range from zero to the maximal number of valid planes for the currently active
|
||||||
|
format. For the single-planar API, applications must set <structfield> plane
|
||||||
|
</structfield> to zero. Additional flags may be posted in the <structfield>
|
||||||
|
flags </structfield> field. Refer to a manual for open() for details.
|
||||||
|
Currently only O_CLOEXEC is supported. All other fields must be set to zero.
|
||||||
|
In the case of multi-planar API, every plane is exported separately using
|
||||||
|
multiple <constant> VIDIOC_EXPBUF </constant> calls. </para>
|
||||||
|
|
||||||
|
<para> After calling <constant>VIDIOC_EXPBUF</constant> the <structfield> fd
|
||||||
|
</structfield> field will be set by a driver. This is a DMABUF file
|
||||||
|
descriptor. The application may pass it to other DMABUF-aware devices. Refer to
|
||||||
|
<link linkend="dmabuf">DMABUF importing</link> for details about importing
|
||||||
|
DMABUF files into V4L2 nodes. It is recommended to close a DMABUF file when it
|
||||||
|
is no longer used to allow the associated memory to be reclaimed. </para>
|
||||||
|
</refsect1>
|
||||||
|
|
||||||
|
<refsect1>
|
||||||
|
<title>Examples</title>
|
||||||
|
|
||||||
|
<example>
|
||||||
|
<title>Exporting a buffer.</title>
|
||||||
|
<programlisting>
|
||||||
|
int buffer_export(int v4lfd, &v4l2-buf-type; bt, int index, int *dmafd)
|
||||||
|
{
|
||||||
|
&v4l2-exportbuffer; expbuf;
|
||||||
|
|
||||||
|
memset(&expbuf, 0, sizeof(expbuf));
|
||||||
|
expbuf.type = bt;
|
||||||
|
expbuf.index = index;
|
||||||
|
if (ioctl(v4lfd, &VIDIOC-EXPBUF;, &expbuf) == -1) {
|
||||||
|
perror("VIDIOC_EXPBUF");
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
*dmafd = expbuf.fd;
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
</programlisting>
|
||||||
|
</example>
|
||||||
|
|
||||||
|
<example>
|
||||||
|
<title>Exporting a buffer using the multi-planar API.</title>
|
||||||
|
<programlisting>
|
||||||
|
int buffer_export_mp(int v4lfd, &v4l2-buf-type; bt, int index,
|
||||||
|
int dmafd[], int n_planes)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
|
||||||
|
for (i = 0; i < n_planes; ++i) {
|
||||||
|
&v4l2-exportbuffer; expbuf;
|
||||||
|
|
||||||
|
memset(&expbuf, 0, sizeof(expbuf));
|
||||||
|
expbuf.type = bt;
|
||||||
|
expbuf.index = index;
|
||||||
|
expbuf.plane = i;
|
||||||
|
if (ioctl(v4lfd, &VIDIOC-EXPBUF;, &expbuf) == -1) {
|
||||||
|
perror("VIDIOC_EXPBUF");
|
||||||
|
while (i)
|
||||||
|
close(dmafd[--i]);
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
dmafd[i] = expbuf.fd;
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
</programlisting>
|
||||||
|
</example>
|
||||||
|
|
||||||
|
<table pgwide="1" frame="none" id="v4l2-exportbuffer">
|
||||||
|
<title>struct <structname>v4l2_exportbuffer</structname></title>
|
||||||
|
<tgroup cols="3">
|
||||||
|
&cs-str;
|
||||||
|
<tbody valign="top">
|
||||||
|
<row>
|
||||||
|
<entry>__u32</entry>
|
||||||
|
<entry><structfield>type</structfield></entry>
|
||||||
|
<entry>Type of the buffer, same as &v4l2-format;
|
||||||
|
<structfield>type</structfield> or &v4l2-requestbuffers;
|
||||||
|
<structfield>type</structfield>, set by the application. See <xref
|
||||||
|
linkend="v4l2-buf-type" /></entry>
|
||||||
|
</row>
|
||||||
|
<row>
|
||||||
|
<entry>__u32</entry>
|
||||||
|
<entry><structfield>index</structfield></entry>
|
||||||
|
<entry>Number of the buffer, set by the application. This field is
|
||||||
|
only used for <link linkend="mmap">memory mapping</link> I/O and can range from
|
||||||
|
zero to the number of buffers allocated with the &VIDIOC-REQBUFS; and/or
|
||||||
|
&VIDIOC-CREATE-BUFS; ioctls. </entry>
|
||||||
|
</row>
|
||||||
|
<row>
|
||||||
|
<entry>__u32</entry>
|
||||||
|
<entry><structfield>plane</structfield></entry>
|
||||||
|
<entry>Index of the plane to be exported when using the
|
||||||
|
multi-planar API. Otherwise this value must be set to zero. </entry>
|
||||||
|
</row>
|
||||||
|
<row>
|
||||||
|
<entry>__u32</entry>
|
||||||
|
<entry><structfield>flags</structfield></entry>
|
||||||
|
<entry>Flags for the newly created file, currently only <constant>
|
||||||
|
O_CLOEXEC </constant> is supported, refer to the manual of open() for more
|
||||||
|
details.</entry>
|
||||||
|
</row>
|
||||||
|
<row>
|
||||||
|
<entry>__s32</entry>
|
||||||
|
<entry><structfield>fd</structfield></entry>
|
||||||
|
<entry>The DMABUF file descriptor associated with a buffer. Set by
|
||||||
|
the driver.</entry>
|
||||||
|
</row>
|
||||||
|
<row>
|
||||||
|
<entry>__u32</entry>
|
||||||
|
<entry><structfield>reserved[11]</structfield></entry>
|
||||||
|
<entry>Reserved field for future use. Must be set to zero.</entry>
|
||||||
|
</row>
|
||||||
|
</tbody>
|
||||||
|
</tgroup>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
</refsect1>
|
||||||
|
|
||||||
|
<refsect1>
|
||||||
|
&return-value;
|
||||||
|
<variablelist>
|
||||||
|
<varlistentry>
|
||||||
|
<term><errorcode>EINVAL</errorcode></term>
|
||||||
|
<listitem>
|
||||||
|
<para>A queue is not in MMAP mode or DMABUF exporting is not
|
||||||
|
supported or <structfield> flags </structfield> or <structfield> type
|
||||||
|
</structfield> or <structfield> index </structfield> or <structfield> plane
|
||||||
|
</structfield> fields are invalid.</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
</variablelist>
|
||||||
|
</refsect1>
|
||||||
|
|
||||||
|
</refentry>
|
||||||
@@ -64,7 +64,9 @@ return an &EINVAL;. When the <structfield>value</structfield> is out
|
|||||||
of bounds drivers can choose to take the closest valid value or return
|
of bounds drivers can choose to take the closest valid value or return
|
||||||
an &ERANGE;, whatever seems more appropriate. However,
|
an &ERANGE;, whatever seems more appropriate. However,
|
||||||
<constant>VIDIOC_S_CTRL</constant> is a write-only ioctl, it does not
|
<constant>VIDIOC_S_CTRL</constant> is a write-only ioctl, it does not
|
||||||
return the actual new value.</para>
|
return the actual new value. If the <structfield>value</structfield>
|
||||||
|
is inappropriate for the control (e.g. if it refers to an unsupported
|
||||||
|
menu index of a menu control), then &EINVAL; is returned as well.</para>
|
||||||
|
|
||||||
<para>These ioctls work only with user controls. For other
|
<para>These ioctls work only with user controls. For other
|
||||||
control classes the &VIDIOC-G-EXT-CTRLS;, &VIDIOC-S-EXT-CTRLS; or
|
control classes the &VIDIOC-G-EXT-CTRLS;, &VIDIOC-S-EXT-CTRLS; or
|
||||||
@@ -99,7 +101,9 @@ application.</entry>
|
|||||||
<term><errorcode>EINVAL</errorcode></term>
|
<term><errorcode>EINVAL</errorcode></term>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>The &v4l2-control; <structfield>id</structfield> is
|
<para>The &v4l2-control; <structfield>id</structfield> is
|
||||||
invalid.</para>
|
invalid or the <structfield>value</structfield> is inappropriate for
|
||||||
|
the given control (i.e. if a menu item is selected that is not supported
|
||||||
|
by the driver according to &VIDIOC-QUERYMENU;).</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
|
|||||||
@@ -106,7 +106,9 @@ value or if an error is returned.</para>
|
|||||||
&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
|
||||||
&v4l2-ext-control;.</para>
|
&v4l2-ext-control;. If the new control value is inappropriate (e.g. the
|
||||||
|
given menu index is not supported by the menu control), then this will
|
||||||
|
also result in an &EINVAL; error.</para>
|
||||||
|
|
||||||
<para>The driver will only set/get these controls if all control
|
<para>The driver will only set/get these controls if all control
|
||||||
values are correct. This prevents the situation where only some of the
|
values are correct. This prevents the situation where only some of the
|
||||||
@@ -199,13 +201,46 @@ also be zero.</entry>
|
|||||||
<row>
|
<row>
|
||||||
<entry>__u32</entry>
|
<entry>__u32</entry>
|
||||||
<entry><structfield>error_idx</structfield></entry>
|
<entry><structfield>error_idx</structfield></entry>
|
||||||
<entry>Set by the driver in case of an error. If it is equal
|
<entry><para>Set by the driver in case of an error. If the error is
|
||||||
to <structfield>count</structfield>, then no actual changes were made to
|
associated with a particular control, then <structfield>error_idx</structfield>
|
||||||
controls. In other words, the error was not associated with setting a particular
|
is set to the index of that control. If the error is not related to a specific
|
||||||
control. If it is another value, then only the controls up to <structfield>error_idx-1</structfield>
|
control, or the validation step failed (see below), then
|
||||||
were modified and control <structfield>error_idx</structfield> is the one that
|
<structfield>error_idx</structfield> is set to <structfield>count</structfield>.
|
||||||
caused the error. The <structfield>error_idx</structfield> value is undefined
|
The value is undefined if the ioctl returned 0 (success).</para>
|
||||||
if the ioctl returned 0 (success).</entry>
|
|
||||||
|
<para>Before controls are read from/written to hardware a validation step
|
||||||
|
takes place: this checks if all controls in the list are valid controls,
|
||||||
|
if no attempt is made to write to a read-only control or read from a write-only
|
||||||
|
control, and any other up-front checks that can be done without accessing the
|
||||||
|
hardware. The exact validations done during this step are driver dependent
|
||||||
|
since some checks might require hardware access for some devices, thus making
|
||||||
|
it impossible to do those checks up-front. However, drivers should make a
|
||||||
|
best-effort to do as many up-front checks as possible.</para>
|
||||||
|
|
||||||
|
<para>This check is done to avoid leaving the hardware in an inconsistent state due
|
||||||
|
to easy-to-avoid problems. But it leads to another problem: the application needs to
|
||||||
|
know whether an error came from the validation step (meaning that the hardware
|
||||||
|
was not touched) or from an error during the actual reading from/writing to hardware.</para>
|
||||||
|
|
||||||
|
<para>The, in hindsight quite poor, solution for that is to set <structfield>error_idx</structfield>
|
||||||
|
to <structfield>count</structfield> if the validation failed. This has the
|
||||||
|
unfortunate side-effect that it is not possible to see which control failed the
|
||||||
|
validation. If the validation was successful and the error happened while
|
||||||
|
accessing the hardware, then <structfield>error_idx</structfield> is less than
|
||||||
|
<structfield>count</structfield> and only the controls up to
|
||||||
|
<structfield>error_idx-1</structfield> were read or written correctly, and the
|
||||||
|
state of the remaining controls is undefined.</para>
|
||||||
|
|
||||||
|
<para>Since <constant>VIDIOC_TRY_EXT_CTRLS</constant> does not access hardware
|
||||||
|
there is also no need to handle the validation step in this special way,
|
||||||
|
so <structfield>error_idx</structfield> will just be set to the control that
|
||||||
|
failed the validation step instead of to <structfield>count</structfield>.
|
||||||
|
This means that if <constant>VIDIOC_S_EXT_CTRLS</constant> fails with
|
||||||
|
<structfield>error_idx</structfield> set to <structfield>count</structfield>,
|
||||||
|
then you can call <constant>VIDIOC_TRY_EXT_CTRLS</constant> to try to discover
|
||||||
|
the actual control that failed the validation step. Unfortunately, there
|
||||||
|
is no <constant>TRY</constant> equivalent for <constant>VIDIOC_G_EXT_CTRLS</constant>.
|
||||||
|
</para></entry>
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<entry>__u32</entry>
|
<entry>__u32</entry>
|
||||||
@@ -298,8 +333,10 @@ These controls are described in <xref
|
|||||||
<term><errorcode>EINVAL</errorcode></term>
|
<term><errorcode>EINVAL</errorcode></term>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>The &v4l2-ext-control; <structfield>id</structfield>
|
<para>The &v4l2-ext-control; <structfield>id</structfield>
|
||||||
is invalid or the &v4l2-ext-controls;
|
is invalid, the &v4l2-ext-controls;
|
||||||
<structfield>ctrl_class</structfield> is invalid. This error code is
|
<structfield>ctrl_class</structfield> is invalid, or the &v4l2-ext-control;
|
||||||
|
<structfield>value</structfield> was inappropriate (e.g. the given menu
|
||||||
|
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
|
||||||
<constant>VIDIOC_TRY_EXT_CTRLS</constant> ioctls if two or more
|
<constant>VIDIOC_TRY_EXT_CTRLS</constant> ioctls if two or more
|
||||||
control values are in conflict.</para>
|
control values are in conflict.</para>
|
||||||
|
|||||||
@@ -109,6 +109,23 @@ they cannot be swapped out to disk. Buffers remain locked until
|
|||||||
dequeued, until the &VIDIOC-STREAMOFF; or &VIDIOC-REQBUFS; ioctl is
|
dequeued, until the &VIDIOC-STREAMOFF; or &VIDIOC-REQBUFS; ioctl is
|
||||||
called, or until the device is closed.</para>
|
called, or until the device is closed.</para>
|
||||||
|
|
||||||
|
<para>To enqueue a <link linkend="dmabuf">DMABUF</link> buffer applications
|
||||||
|
set the <structfield>memory</structfield> field to
|
||||||
|
<constant>V4L2_MEMORY_DMABUF</constant> and the <structfield>m.fd</structfield>
|
||||||
|
field to a file descriptor associated with a DMABUF buffer. When the
|
||||||
|
multi-planar API is used the <structfield>m.fd</structfield> fields of the
|
||||||
|
passed array of &v4l2-plane; have to be used instead. When
|
||||||
|
<constant>VIDIOC_QBUF</constant> is called with a pointer to this structure the
|
||||||
|
driver sets the <constant>V4L2_BUF_FLAG_QUEUED</constant> flag and clears the
|
||||||
|
<constant>V4L2_BUF_FLAG_MAPPED</constant> and
|
||||||
|
<constant>V4L2_BUF_FLAG_DONE</constant> flags in the
|
||||||
|
<structfield>flags</structfield> field, or it returns an error code. This
|
||||||
|
ioctl locks the buffer. Locking a buffer means passing it to a driver for a
|
||||||
|
hardware access (usually DMA). If an application accesses (reads/writes) a
|
||||||
|
locked buffer then the result is undefined. Buffers remain locked until
|
||||||
|
dequeued, until the &VIDIOC-STREAMOFF; or &VIDIOC-REQBUFS; ioctl is called, or
|
||||||
|
until the device is closed.</para>
|
||||||
|
|
||||||
<para>Applications call the <constant>VIDIOC_DQBUF</constant>
|
<para>Applications call the <constant>VIDIOC_DQBUF</constant>
|
||||||
ioctl to dequeue a filled (capturing) or displayed (output) buffer
|
ioctl to dequeue a filled (capturing) or displayed (output) buffer
|
||||||
from the driver's outgoing queue. They just set the
|
from the driver's outgoing queue. They just set the
|
||||||
|
|||||||
@@ -76,7 +76,7 @@ make sure the strings are properly NUL-terminated.</para></entry>
|
|||||||
<row>
|
<row>
|
||||||
<entry>__u8</entry>
|
<entry>__u8</entry>
|
||||||
<entry><structfield>card</structfield>[32]</entry>
|
<entry><structfield>card</structfield>[32]</entry>
|
||||||
<entry>Name of the device, a NUL-terminated ASCII string.
|
<entry>Name of the device, a NUL-terminated UTF-8 string.
|
||||||
For example: "Yoyodyne TV/FM". One driver may support different brands
|
For example: "Yoyodyne TV/FM". One driver may support different brands
|
||||||
or models of video hardware. This information is intended for users,
|
or models of video hardware. This information is intended for users,
|
||||||
for example in a menu of available devices. Since multiple TV cards of
|
for example in a menu of available devices. Since multiple TV cards of
|
||||||
|
|||||||
@@ -48,28 +48,30 @@
|
|||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Description</title>
|
<title>Description</title>
|
||||||
|
|
||||||
<para>This ioctl is used to initiate <link linkend="mmap">memory
|
<para>This ioctl is used to initiate <link linkend="mmap">memory mapped</link>,
|
||||||
mapped</link> or <link linkend="userp">user pointer</link>
|
<link linkend="userp">user pointer</link> or <link
|
||||||
I/O. Memory mapped buffers are located in device memory and must be
|
linkend="dmabuf">DMABUF</link> based I/O. Memory mapped buffers are located in
|
||||||
allocated with this ioctl before they can be mapped into the
|
device memory and must be allocated with this ioctl before they can be mapped
|
||||||
application's address space. User buffers are allocated by
|
into the application's address space. User buffers are allocated by
|
||||||
applications themselves, and this ioctl is merely used to switch the
|
applications themselves, and this ioctl is merely used to switch the driver
|
||||||
driver into user pointer I/O mode and to setup some internal structures.</para>
|
into user pointer I/O mode and to setup some internal structures.
|
||||||
|
Similarly, DMABUF buffers are allocated by applications through a device
|
||||||
|
driver, and this ioctl only configures the driver into DMABUF I/O mode without
|
||||||
|
performing any direct allocation.</para>
|
||||||
|
|
||||||
<para>To allocate device buffers applications initialize all
|
<para>To allocate device buffers applications initialize all fields of the
|
||||||
fields of the <structname>v4l2_requestbuffers</structname> structure.
|
<structname>v4l2_requestbuffers</structname> structure. They set the
|
||||||
They set the <structfield>type</structfield> field to the respective
|
<structfield>type</structfield> field to the respective stream or buffer type,
|
||||||
stream or buffer type, the <structfield>count</structfield> field to
|
the <structfield>count</structfield> field to the desired number of buffers,
|
||||||
the desired number of buffers, <structfield>memory</structfield>
|
<structfield>memory</structfield> must be set to the requested I/O method and
|
||||||
must be set to the requested I/O method and the <structfield>reserved</structfield> array
|
the <structfield>reserved</structfield> array must be zeroed. When the ioctl is
|
||||||
must be zeroed. When the ioctl
|
called with a pointer to this structure the driver will attempt to allocate the
|
||||||
is called with a pointer to this structure the driver will attempt to allocate
|
requested number of buffers and it stores the actual number allocated in the
|
||||||
the requested number of buffers and it stores the actual number
|
<structfield>count</structfield> field. It can be smaller than the number
|
||||||
allocated in the <structfield>count</structfield> field. It can be
|
requested, even zero, when the driver runs out of free memory. A larger number
|
||||||
smaller than the number requested, even zero, when the driver runs out
|
is also possible when the driver requires more buffers to function correctly.
|
||||||
of free memory. A larger number is also possible when the driver requires
|
For example video output requires at least two buffers, one displayed and one
|
||||||
more buffers to function correctly. For example video output requires at least two buffers,
|
filled by the application.</para>
|
||||||
one displayed and one filled by the application.</para>
|
|
||||||
<para>When the I/O method is not supported the ioctl
|
<para>When the I/O method is not supported the ioctl
|
||||||
returns an &EINVAL;.</para>
|
returns an &EINVAL;.</para>
|
||||||
|
|
||||||
@@ -102,7 +104,8 @@ as the &v4l2-format; <structfield>type</structfield> field. See <xref
|
|||||||
<entry>__u32</entry>
|
<entry>__u32</entry>
|
||||||
<entry><structfield>memory</structfield></entry>
|
<entry><structfield>memory</structfield></entry>
|
||||||
<entry>Applications set this field to
|
<entry>Applications set this field to
|
||||||
<constant>V4L2_MEMORY_MMAP</constant> or
|
<constant>V4L2_MEMORY_MMAP</constant>,
|
||||||
|
<constant>V4L2_MEMORY_DMABUF</constant> or
|
||||||
<constant>V4L2_MEMORY_USERPTR</constant>. See <xref linkend="v4l2-memory"
|
<constant>V4L2_MEMORY_USERPTR</constant>. See <xref linkend="v4l2-memory"
|
||||||
/>.</entry>
|
/>.</entry>
|
||||||
</row>
|
</row>
|
||||||
|
|||||||
@@ -22,6 +22,7 @@
|
|||||||
|
|
||||||
<!-- 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='http://linuxtv.org/repo/'>http://linuxtv.org/repo/</ulink>">
|
||||||
|
<!ENTITY dash-ent-10 "<entry>-</entry><entry>-</entry><entry>-</entry><entry>-</entry><entry>-</entry><entry>-</entry><entry>-</entry><entry>-</entry><entry>-</entry><entry>-</entry>">
|
||||||
]>
|
]>
|
||||||
|
|
||||||
<book id="media_api">
|
<book id="media_api">
|
||||||
|
|||||||
@@ -984,7 +984,7 @@ int main()
|
|||||||
return errno;
|
return errno;
|
||||||
}
|
}
|
||||||
configfd = open("/sys/class/uio/uio0/device/config", O_RDWR);
|
configfd = open("/sys/class/uio/uio0/device/config", O_RDWR);
|
||||||
if (uiofd < 0) {
|
if (configfd < 0) {
|
||||||
perror("config open:");
|
perror("config open:");
|
||||||
return errno;
|
return errno;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -871,9 +871,8 @@
|
|||||||
<para>
|
<para>
|
||||||
This function itself doesn't allocate the data space. The data
|
This function itself doesn't allocate the data space. The data
|
||||||
must be allocated manually beforehand, and its pointer is passed
|
must be allocated manually beforehand, and its pointer is passed
|
||||||
as the argument. This pointer is used as the
|
as the argument. This pointer (<parameter>chip</parameter> in the
|
||||||
(<parameter>chip</parameter> identifier in the above example)
|
above example) is used as the identifier for the instance.
|
||||||
for the instance.
|
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
@@ -2304,7 +2303,7 @@ struct _snd_pcm_runtime {
|
|||||||
<constant>SNDRV_PCM_INFO_XXX</constant>. Here, at least, you
|
<constant>SNDRV_PCM_INFO_XXX</constant>. Here, at least, you
|
||||||
have to specify whether the mmap is supported and which
|
have to specify whether the mmap is supported and which
|
||||||
interleaved format is supported.
|
interleaved format is supported.
|
||||||
When the is supported, add the
|
When the hardware supports mmap, add the
|
||||||
<constant>SNDRV_PCM_INFO_MMAP</constant> flag here. When the
|
<constant>SNDRV_PCM_INFO_MMAP</constant> flag here. When the
|
||||||
hardware supports the interleaved or the non-interleaved
|
hardware supports the interleaved or the non-interleaved
|
||||||
formats, <constant>SNDRV_PCM_INFO_INTERLEAVED</constant> or
|
formats, <constant>SNDRV_PCM_INFO_INTERLEAVED</constant> or
|
||||||
@@ -2898,7 +2897,7 @@ struct _snd_pcm_runtime {
|
|||||||
|
|
||||||
<para>
|
<para>
|
||||||
When the pcm supports the pause operation (given in the info
|
When the pcm supports the pause operation (given in the info
|
||||||
field of the hardware table), the <constant>PAUSE_PUSE</constant>
|
field of the hardware table), the <constant>PAUSE_PUSH</constant>
|
||||||
and <constant>PAUSE_RELEASE</constant> commands must be
|
and <constant>PAUSE_RELEASE</constant> commands must be
|
||||||
handled here, too. The former is the command to pause the pcm,
|
handled here, too. The former is the command to pause the pcm,
|
||||||
and the latter to restart the pcm again.
|
and the latter to restart the pcm again.
|
||||||
@@ -3085,7 +3084,7 @@ struct _snd_pcm_runtime {
|
|||||||
<section id="pcm-interface-interrupt-handler-timer">
|
<section id="pcm-interface-interrupt-handler-timer">
|
||||||
<title>High frequency timer interrupts</title>
|
<title>High frequency timer interrupts</title>
|
||||||
<para>
|
<para>
|
||||||
This happense when the hardware doesn't generate interrupts
|
This happens when the hardware doesn't generate interrupts
|
||||||
at the period boundary but issues timer interrupts at a fixed
|
at the period boundary but issues timer interrupts at a fixed
|
||||||
timer rate (e.g. es1968 or ymfpci drivers).
|
timer rate (e.g. es1968 or ymfpci drivers).
|
||||||
In this case, you need to check the current hardware
|
In this case, you need to check the current hardware
|
||||||
@@ -3250,49 +3249,6 @@ struct _snd_pcm_runtime {
|
|||||||
<example>
|
<example>
|
||||||
<title>Example of Hardware Constraints for Channels</title>
|
<title>Example of Hardware Constraints for Channels</title>
|
||||||
<programlisting>
|
<programlisting>
|
||||||
<![CDATA[
|
|
||||||
static int hw_rule_format_by_channels(struct snd_pcm_hw_params *params,
|
|
||||||
struct snd_pcm_hw_rule *rule)
|
|
||||||
{
|
|
||||||
struct snd_interval *c = hw_param_interval(params,
|
|
||||||
SNDRV_PCM_HW_PARAM_CHANNELS);
|
|
||||||
struct snd_mask *f = hw_param_mask(params, SNDRV_PCM_HW_PARAM_FORMAT);
|
|
||||||
struct snd_mask fmt;
|
|
||||||
|
|
||||||
snd_mask_any(&fmt); /* Init the struct */
|
|
||||||
if (c->min < 2) {
|
|
||||||
fmt.bits[0] &= SNDRV_PCM_FMTBIT_S16_LE;
|
|
||||||
return snd_mask_refine(f, &fmt);
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
]]>
|
|
||||||
</programlisting>
|
|
||||||
</example>
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
Then you need to call this function to add your rule:
|
|
||||||
|
|
||||||
<informalexample>
|
|
||||||
<programlisting>
|
|
||||||
<![CDATA[
|
|
||||||
snd_pcm_hw_rule_add(substream->runtime, 0, SNDRV_PCM_HW_PARAM_CHANNELS,
|
|
||||||
hw_rule_channels_by_format, 0, SNDRV_PCM_HW_PARAM_FORMAT,
|
|
||||||
-1);
|
|
||||||
]]>
|
|
||||||
</programlisting>
|
|
||||||
</informalexample>
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
The rule function is called when an application sets the number of
|
|
||||||
channels. But an application can set the format before the number of
|
|
||||||
channels. Thus you also need to define the inverse rule:
|
|
||||||
|
|
||||||
<example>
|
|
||||||
<title>Example of Hardware Constraints for Channels</title>
|
|
||||||
<programlisting>
|
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
static int hw_rule_channels_by_format(struct snd_pcm_hw_params *params,
|
static int hw_rule_channels_by_format(struct snd_pcm_hw_params *params,
|
||||||
struct snd_pcm_hw_rule *rule)
|
struct snd_pcm_hw_rule *rule)
|
||||||
@@ -3315,14 +3271,58 @@ struct _snd_pcm_runtime {
|
|||||||
</example>
|
</example>
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
Then you need to call this function to add your rule:
|
||||||
|
|
||||||
|
<informalexample>
|
||||||
|
<programlisting>
|
||||||
|
<![CDATA[
|
||||||
|
snd_pcm_hw_rule_add(substream->runtime, 0, SNDRV_PCM_HW_PARAM_CHANNELS,
|
||||||
|
hw_rule_channels_by_format, NULL,
|
||||||
|
SNDRV_PCM_HW_PARAM_FORMAT, -1);
|
||||||
|
]]>
|
||||||
|
</programlisting>
|
||||||
|
</informalexample>
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
The rule function is called when an application sets the PCM
|
||||||
|
format, and it refines the number of channels accordingly.
|
||||||
|
But an application may set the number of channels before
|
||||||
|
setting the format. Thus you also need to define the inverse rule:
|
||||||
|
|
||||||
|
<example>
|
||||||
|
<title>Example of Hardware Constraints for Formats</title>
|
||||||
|
<programlisting>
|
||||||
|
<![CDATA[
|
||||||
|
static int hw_rule_format_by_channels(struct snd_pcm_hw_params *params,
|
||||||
|
struct snd_pcm_hw_rule *rule)
|
||||||
|
{
|
||||||
|
struct snd_interval *c = hw_param_interval(params,
|
||||||
|
SNDRV_PCM_HW_PARAM_CHANNELS);
|
||||||
|
struct snd_mask *f = hw_param_mask(params, SNDRV_PCM_HW_PARAM_FORMAT);
|
||||||
|
struct snd_mask fmt;
|
||||||
|
|
||||||
|
snd_mask_any(&fmt); /* Init the struct */
|
||||||
|
if (c->min < 2) {
|
||||||
|
fmt.bits[0] &= SNDRV_PCM_FMTBIT_S16_LE;
|
||||||
|
return snd_mask_refine(f, &fmt);
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
]]>
|
||||||
|
</programlisting>
|
||||||
|
</example>
|
||||||
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
...and in the open callback:
|
...and in the open callback:
|
||||||
<informalexample>
|
<informalexample>
|
||||||
<programlisting>
|
<programlisting>
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
snd_pcm_hw_rule_add(substream->runtime, 0, SNDRV_PCM_HW_PARAM_FORMAT,
|
snd_pcm_hw_rule_add(substream->runtime, 0, SNDRV_PCM_HW_PARAM_FORMAT,
|
||||||
hw_rule_format_by_channels, 0, SNDRV_PCM_HW_PARAM_CHANNELS,
|
hw_rule_format_by_channels, NULL,
|
||||||
-1);
|
SNDRV_PCM_HW_PARAM_CHANNELS, -1);
|
||||||
]]>
|
]]>
|
||||||
</programlisting>
|
</programlisting>
|
||||||
</informalexample>
|
</informalexample>
|
||||||
|
|||||||
@@ -28,11 +28,30 @@ Makefile environment are given here.
|
|||||||
To create binary EDID and C source code files from the existing data
|
To create binary EDID and C source code files from the existing data
|
||||||
material, simply type "make".
|
material, simply type "make".
|
||||||
|
|
||||||
If you want to create your own EDID file, copy the file 1024x768.S and
|
If you want to create your own EDID file, copy the file 1024x768.S,
|
||||||
replace the settings with your own data. The CRC value in the last line
|
replace the settings with your own data and add a new target to the
|
||||||
|
Makefile. Please note that the EDID data structure expects the timing
|
||||||
|
values in a different way as compared to the standard X11 format.
|
||||||
|
|
||||||
|
X11:
|
||||||
|
HTimings: hdisp hsyncstart hsyncend htotal
|
||||||
|
VTimings: vdisp vsyncstart vsyncend vtotal
|
||||||
|
|
||||||
|
EDID:
|
||||||
|
#define XPIX hdisp
|
||||||
|
#define XBLANK htotal-hdisp
|
||||||
|
#define XOFFSET hsyncstart-hdisp
|
||||||
|
#define XPULSE hsyncend-hsyncstart
|
||||||
|
|
||||||
|
#define YPIX vdisp
|
||||||
|
#define YBLANK vtotal-vdisp
|
||||||
|
#define YOFFSET (63+(vsyncstart-vdisp))
|
||||||
|
#define YPULSE (63+(vsyncend-vsyncstart))
|
||||||
|
|
||||||
|
The CRC value in the last line
|
||||||
#define CRC 0x55
|
#define CRC 0x55
|
||||||
is a bit tricky. After a first version of the binary data set is
|
also is a bit tricky. After a first version of the binary data set is
|
||||||
created, it must be be checked with the "edid-decode" utility which will
|
created, it must be checked with the "edid-decode" utility which will
|
||||||
most probably complain about a wrong CRC. Fortunately, the utility also
|
most probably complain about a wrong CRC. Fortunately, the utility also
|
||||||
displays the correct CRC which must then be inserted into the source
|
displays the correct CRC which must then be inserted into the source
|
||||||
file. After the make procedure is repeated, the EDID data set is ready
|
file. After the make procedure is repeated, the EDID data set is ready
|
||||||
|
|||||||
@@ -348,34 +348,40 @@ You can change this at module load time (for a module) with:
|
|||||||
|
|
||||||
modprobe ipmi_si.o type=<type1>,<type2>....
|
modprobe ipmi_si.o type=<type1>,<type2>....
|
||||||
ports=<port1>,<port2>... addrs=<addr1>,<addr2>...
|
ports=<port1>,<port2>... addrs=<addr1>,<addr2>...
|
||||||
irqs=<irq1>,<irq2>... trydefaults=[0|1]
|
irqs=<irq1>,<irq2>...
|
||||||
regspacings=<sp1>,<sp2>,... regsizes=<size1>,<size2>,...
|
regspacings=<sp1>,<sp2>,... regsizes=<size1>,<size2>,...
|
||||||
regshifts=<shift1>,<shift2>,...
|
regshifts=<shift1>,<shift2>,...
|
||||||
slave_addrs=<addr1>,<addr2>,...
|
slave_addrs=<addr1>,<addr2>,...
|
||||||
force_kipmid=<enable1>,<enable2>,...
|
force_kipmid=<enable1>,<enable2>,...
|
||||||
kipmid_max_busy_us=<ustime1>,<ustime2>,...
|
kipmid_max_busy_us=<ustime1>,<ustime2>,...
|
||||||
unload_when_empty=[0|1]
|
unload_when_empty=[0|1]
|
||||||
|
trydefaults=[0|1] trydmi=[0|1] tryacpi=[0|1]
|
||||||
|
tryplatform=[0|1] trypci=[0|1]
|
||||||
|
|
||||||
Each of these except si_trydefaults is a list, the first item for the
|
Each of these except try... items is a list, the first item for the
|
||||||
first interface, second item for the second interface, etc.
|
first interface, second item for the second interface, etc.
|
||||||
|
|
||||||
The si_type may be either "kcs", "smic", or "bt". If you leave it blank, it
|
The si_type may be either "kcs", "smic", or "bt". If you leave it blank, it
|
||||||
defaults to "kcs".
|
defaults to "kcs".
|
||||||
|
|
||||||
If you specify si_addrs as non-zero for an interface, the driver will
|
If you specify addrs as non-zero for an interface, the driver will
|
||||||
use the memory address given as the address of the device. This
|
use the memory address given as the address of the device. This
|
||||||
overrides si_ports.
|
overrides si_ports.
|
||||||
|
|
||||||
If you specify si_ports as non-zero for an interface, the driver will
|
If you specify ports as non-zero for an interface, the driver will
|
||||||
use the I/O port given as the device address.
|
use the I/O port given as the device address.
|
||||||
|
|
||||||
If you specify si_irqs as non-zero for an interface, the driver will
|
If you specify irqs as non-zero for an interface, the driver will
|
||||||
attempt to use the given interrupt for the device.
|
attempt to use the given interrupt for the device.
|
||||||
|
|
||||||
si_trydefaults sets whether the standard IPMI interface at 0xca2 and
|
trydefaults sets whether the standard IPMI interface at 0xca2 and
|
||||||
any interfaces specified by ACPE are tried. By default, the driver
|
any interfaces specified by ACPE are tried. By default, the driver
|
||||||
tries it, set this value to zero to turn this off.
|
tries it, set this value to zero to turn this off.
|
||||||
|
|
||||||
|
The other try... items disable discovery by their corresponding
|
||||||
|
names. These are all enabled by default, set them to zero to disable
|
||||||
|
them. The tryplatform disables openfirmware.
|
||||||
|
|
||||||
The next three parameters have to do with register layout. The
|
The next three parameters have to do with register layout. The
|
||||||
registers used by the interfaces may not appear at successive
|
registers used by the interfaces may not appear at successive
|
||||||
locations and they may not be in 8-bit registers. These parameters
|
locations and they may not be in 8-bit registers. These parameters
|
||||||
|
|||||||
@@ -127,15 +127,42 @@ on the number of vectors that can be allocated; pci_enable_msi_block()
|
|||||||
returns as soon as it finds any constraint that doesn't allow the
|
returns as soon as it finds any constraint that doesn't allow the
|
||||||
call to succeed.
|
call to succeed.
|
||||||
|
|
||||||
4.2.3 pci_disable_msi
|
4.2.3 pci_enable_msi_block_auto
|
||||||
|
|
||||||
|
int pci_enable_msi_block_auto(struct pci_dev *dev, unsigned int *count)
|
||||||
|
|
||||||
|
This variation on pci_enable_msi() call allows a device driver to request
|
||||||
|
the maximum possible number of MSIs. The MSI specification only allows
|
||||||
|
interrupts to be allocated in powers of two, up to a maximum of 2^5 (32).
|
||||||
|
|
||||||
|
If this function returns a positive number, it indicates that it has
|
||||||
|
succeeded and the returned value is the number of allocated interrupts. In
|
||||||
|
this case, the function enables MSI on this device and updates dev->irq to
|
||||||
|
be the lowest of the new interrupts assigned to it. The other interrupts
|
||||||
|
assigned to the device are in the range dev->irq to dev->irq + returned
|
||||||
|
value - 1.
|
||||||
|
|
||||||
|
If this function returns a negative number, it indicates an error and
|
||||||
|
the driver should not attempt to request any more MSI interrupts for
|
||||||
|
this device.
|
||||||
|
|
||||||
|
If the device driver needs to know the number of interrupts the device
|
||||||
|
supports it can pass the pointer count where that number is stored. The
|
||||||
|
device driver must decide what action to take if pci_enable_msi_block_auto()
|
||||||
|
succeeds, but returns a value less than the number of interrupts supported.
|
||||||
|
If the device driver does not need to know the number of interrupts
|
||||||
|
supported, it can set the pointer count to NULL.
|
||||||
|
|
||||||
|
4.2.4 pci_disable_msi
|
||||||
|
|
||||||
void pci_disable_msi(struct pci_dev *dev)
|
void pci_disable_msi(struct pci_dev *dev)
|
||||||
|
|
||||||
This function should be used to undo the effect of pci_enable_msi() or
|
This function should be used to undo the effect of pci_enable_msi() or
|
||||||
pci_enable_msi_block(). Calling it restores dev->irq to the pin-based
|
pci_enable_msi_block() or pci_enable_msi_block_auto(). Calling it restores
|
||||||
interrupt number and frees the previously allocated message signaled
|
dev->irq to the pin-based interrupt number and frees the previously
|
||||||
interrupt(s). The interrupt may subsequently be assigned to another
|
allocated message signaled interrupt(s). The interrupt may subsequently be
|
||||||
device, so drivers should not cache the value of dev->irq.
|
assigned to another device, so drivers should not cache the value of
|
||||||
|
dev->irq.
|
||||||
|
|
||||||
Before calling this function, a device driver must always call free_irq()
|
Before calling this function, a device driver must always call free_irq()
|
||||||
on any interrupt for which it previously called request_irq().
|
on any interrupt for which it previously called request_irq().
|
||||||
|
|||||||
@@ -76,7 +76,7 @@ To notify SR-IOV core of Virtual Function Migration:
|
|||||||
|
|
||||||
Following piece of code illustrates the usage of the SR-IOV API.
|
Following piece of code illustrates the usage of the SR-IOV API.
|
||||||
|
|
||||||
static int __devinit dev_probe(struct pci_dev *dev, const struct pci_device_id *id)
|
static int dev_probe(struct pci_dev *dev, const struct pci_device_id *id)
|
||||||
{
|
{
|
||||||
pci_enable_sriov(dev, NR_VIRTFN);
|
pci_enable_sriov(dev, NR_VIRTFN);
|
||||||
|
|
||||||
@@ -85,7 +85,7 @@ static int __devinit dev_probe(struct pci_dev *dev, const struct pci_device_id *
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void __devexit dev_remove(struct pci_dev *dev)
|
static void dev_remove(struct pci_dev *dev)
|
||||||
{
|
{
|
||||||
pci_disable_sriov(dev);
|
pci_disable_sriov(dev);
|
||||||
|
|
||||||
@@ -131,7 +131,7 @@ static struct pci_driver dev_driver = {
|
|||||||
.name = "SR-IOV Physical Function driver",
|
.name = "SR-IOV Physical Function driver",
|
||||||
.id_table = dev_id_table,
|
.id_table = dev_id_table,
|
||||||
.probe = dev_probe,
|
.probe = dev_probe,
|
||||||
.remove = __devexit_p(dev_remove),
|
.remove = dev_remove,
|
||||||
.suspend = dev_suspend,
|
.suspend = dev_suspend,
|
||||||
.resume = dev_resume,
|
.resume = dev_resume,
|
||||||
.shutdown = dev_shutdown,
|
.shutdown = dev_shutdown,
|
||||||
|
|||||||
@@ -183,12 +183,6 @@ Please mark the initialization and cleanup functions where appropriate
|
|||||||
initializes.
|
initializes.
|
||||||
__exit Exit code. Ignored for non-modular drivers.
|
__exit Exit code. Ignored for non-modular drivers.
|
||||||
|
|
||||||
|
|
||||||
__devinit Device initialization code.
|
|
||||||
Identical to __init if the kernel is not compiled
|
|
||||||
with CONFIG_HOTPLUG, normal function otherwise.
|
|
||||||
__devexit The same for __exit.
|
|
||||||
|
|
||||||
Tips on when/where to use the above attributes:
|
Tips on when/where to use the above attributes:
|
||||||
o The module_init()/module_exit() functions (and all
|
o The module_init()/module_exit() functions (and all
|
||||||
initialization functions called _only_ from these)
|
initialization functions called _only_ from these)
|
||||||
@@ -196,20 +190,6 @@ Tips on when/where to use the above attributes:
|
|||||||
|
|
||||||
o Do not mark the struct pci_driver.
|
o Do not mark the struct pci_driver.
|
||||||
|
|
||||||
o The ID table array should be marked __devinitconst; this is done
|
|
||||||
automatically if the table is declared with DEFINE_PCI_DEVICE_TABLE().
|
|
||||||
|
|
||||||
o The probe() and remove() functions should be marked __devinit
|
|
||||||
and __devexit respectively. All initialization functions
|
|
||||||
exclusively called by the probe() routine, can be marked __devinit.
|
|
||||||
Ditto for remove() and __devexit.
|
|
||||||
|
|
||||||
o If mydriver_remove() is marked with __devexit(), then all address
|
|
||||||
references to mydriver_remove must use __devexit_p(mydriver_remove)
|
|
||||||
(in the struct pci_driver declaration for example).
|
|
||||||
__devexit_p() will generate the function name _or_ NULL if the
|
|
||||||
function will be discarded. For an example, see drivers/net/tg3.c.
|
|
||||||
|
|
||||||
o Do NOT mark a function if you are not sure which mark to use.
|
o Do NOT mark a function if you are not sure which mark to use.
|
||||||
Better to not mark the function than mark the function wrong.
|
Better to not mark the function than mark the function wrong.
|
||||||
|
|
||||||
|
|||||||
@@ -63,8 +63,8 @@ from ACPI tables.
|
|||||||
Currently the kernel is not able to automatically determine from which ACPI
|
Currently the kernel is not able to automatically determine from which ACPI
|
||||||
device it should make the corresponding platform device so we need to add
|
device it should make the corresponding platform device so we need to add
|
||||||
the ACPI device explicitly to acpi_platform_device_ids list defined in
|
the ACPI device explicitly to acpi_platform_device_ids list defined in
|
||||||
drivers/acpi/scan.c. This limitation is only for the platform devices, SPI
|
drivers/acpi/acpi_platform.c. This limitation is only for the platform
|
||||||
and I2C devices are created automatically as described below.
|
devices, SPI and I2C devices are created automatically as described below.
|
||||||
|
|
||||||
SPI serial bus support
|
SPI serial bus support
|
||||||
~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~
|
||||||
@@ -185,7 +185,7 @@ input driver:
|
|||||||
.acpi_match_table ACPI_PTR(mpu3050_acpi_match),
|
.acpi_match_table ACPI_PTR(mpu3050_acpi_match),
|
||||||
},
|
},
|
||||||
.probe = mpu3050_probe,
|
.probe = mpu3050_probe,
|
||||||
.remove = __devexit_p(mpu3050_remove),
|
.remove = mpu3050_remove,
|
||||||
.id_table = mpu3050_ids,
|
.id_table = mpu3050_ids,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
94
Documentation/acpi/initrd_table_override.txt
Normal file
94
Documentation/acpi/initrd_table_override.txt
Normal file
@@ -0,0 +1,94 @@
|
|||||||
|
Overriding ACPI tables via initrd
|
||||||
|
=================================
|
||||||
|
|
||||||
|
1) Introduction (What is this about)
|
||||||
|
2) What is this for
|
||||||
|
3) How does it work
|
||||||
|
4) References (Where to retrieve userspace tools)
|
||||||
|
|
||||||
|
1) What is this about
|
||||||
|
---------------------
|
||||||
|
|
||||||
|
If the ACPI_INITRD_TABLE_OVERRIDE compile option is true, it is possible to
|
||||||
|
override nearly any ACPI table provided by the BIOS with an instrumented,
|
||||||
|
modified one.
|
||||||
|
|
||||||
|
For a full list of ACPI tables that can be overridden, take a look at
|
||||||
|
the char *table_sigs[MAX_ACPI_SIGNATURE]; definition in drivers/acpi/osl.c
|
||||||
|
All ACPI tables iasl (Intel's ACPI compiler and disassembler) knows should
|
||||||
|
be overridable, except:
|
||||||
|
- ACPI_SIG_RSDP (has a signature of 6 bytes)
|
||||||
|
- ACPI_SIG_FACS (does not have an ordinary ACPI table header)
|
||||||
|
Both could get implemented as well.
|
||||||
|
|
||||||
|
|
||||||
|
2) What is this for
|
||||||
|
-------------------
|
||||||
|
|
||||||
|
Please keep in mind that this is a debug option.
|
||||||
|
ACPI tables should not get overridden for productive use.
|
||||||
|
If BIOS ACPI tables are overridden the kernel will get tainted with the
|
||||||
|
TAINT_OVERRIDDEN_ACPI_TABLE flag.
|
||||||
|
Complain to your platform/BIOS vendor if you find a bug which is so sever
|
||||||
|
that a workaround is not accepted in the Linux kernel.
|
||||||
|
|
||||||
|
Still, it can and should be enabled in any kernel, because:
|
||||||
|
- There is no functional change with not instrumented initrds
|
||||||
|
- It provides a powerful feature to easily debug and test ACPI BIOS table
|
||||||
|
compatibility with the Linux kernel.
|
||||||
|
|
||||||
|
|
||||||
|
3) How does it work
|
||||||
|
-------------------
|
||||||
|
|
||||||
|
# Extract the machine's ACPI tables:
|
||||||
|
cd /tmp
|
||||||
|
acpidump >acpidump
|
||||||
|
acpixtract -a acpidump
|
||||||
|
# Disassemble, modify and recompile them:
|
||||||
|
iasl -d *.dat
|
||||||
|
# For example add this statement into a _PRT (PCI Routing Table) function
|
||||||
|
# of the DSDT:
|
||||||
|
Store("HELLO WORLD", debug)
|
||||||
|
iasl -sa dsdt.dsl
|
||||||
|
# Add the raw ACPI tables to an uncompressed cpio archive.
|
||||||
|
# They must be put into a /kernel/firmware/acpi directory inside the
|
||||||
|
# cpio archive.
|
||||||
|
# The uncompressed cpio archive must be the first.
|
||||||
|
# Other, typically compressed cpio archives, must be
|
||||||
|
# concatenated on top of the uncompressed one.
|
||||||
|
mkdir -p kernel/firmware/acpi
|
||||||
|
cp dsdt.aml kernel/firmware/acpi
|
||||||
|
# A maximum of: #define ACPI_OVERRIDE_TABLES 10
|
||||||
|
# tables are currently allowed (see osl.c):
|
||||||
|
iasl -sa facp.dsl
|
||||||
|
iasl -sa ssdt1.dsl
|
||||||
|
cp facp.aml kernel/firmware/acpi
|
||||||
|
cp ssdt1.aml kernel/firmware/acpi
|
||||||
|
# Create the uncompressed cpio archive and concatenate the original initrd
|
||||||
|
# on top:
|
||||||
|
find kernel | cpio -H newc --create > /boot/instrumented_initrd
|
||||||
|
cat /boot/initrd >>/boot/instrumented_initrd
|
||||||
|
# reboot with increased acpi debug level, e.g. boot params:
|
||||||
|
acpi.debug_level=0x2 acpi.debug_layer=0xFFFFFFFF
|
||||||
|
# and check your syslog:
|
||||||
|
[ 1.268089] ACPI: PCI Interrupt Routing Table [\_SB_.PCI0._PRT]
|
||||||
|
[ 1.272091] [ACPI Debug] String [0x0B] "HELLO WORLD"
|
||||||
|
|
||||||
|
iasl is able to disassemble and recompile quite a lot different,
|
||||||
|
also static ACPI tables.
|
||||||
|
|
||||||
|
|
||||||
|
4) Where to retrieve userspace tools
|
||||||
|
------------------------------------
|
||||||
|
|
||||||
|
iasl and acpixtract are part of Intel's ACPICA project:
|
||||||
|
http://acpica.org/
|
||||||
|
and should be packaged by distributions (for example in the acpica package
|
||||||
|
on SUSE).
|
||||||
|
|
||||||
|
acpidump can be found in Len Browns pmtools:
|
||||||
|
ftp://kernel.org/pub/linux/kernel/people/lenb/acpi/utils/pmtools/acpidump
|
||||||
|
This tool is also part of the acpica package on SUSE.
|
||||||
|
Alternatively, used ACPI tables can be retrieved via sysfs in latest kernels:
|
||||||
|
/sys/firmware/acpi/tables
|
||||||
77
Documentation/acpi/scan_handlers.txt
Normal file
77
Documentation/acpi/scan_handlers.txt
Normal file
@@ -0,0 +1,77 @@
|
|||||||
|
ACPI Scan Handlers
|
||||||
|
|
||||||
|
Copyright (C) 2012, Intel Corporation
|
||||||
|
Author: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
|
||||||
|
|
||||||
|
During system initialization and ACPI-based device hot-add, the ACPI namespace
|
||||||
|
is scanned in search of device objects that generally represent various pieces
|
||||||
|
of hardware. This causes a struct acpi_device object to be created and
|
||||||
|
registered with the driver core for every device object in the ACPI namespace
|
||||||
|
and the hierarchy of those struct acpi_device objects reflects the namespace
|
||||||
|
layout (i.e. parent device objects in the namespace are represented by parent
|
||||||
|
struct acpi_device objects and analogously for their children). Those struct
|
||||||
|
acpi_device objects are referred to as "device nodes" in what follows, but they
|
||||||
|
should not be confused with struct device_node objects used by the Device Trees
|
||||||
|
parsing code (although their role is analogous to the role of those objects).
|
||||||
|
|
||||||
|
During ACPI-based device hot-remove device nodes representing pieces of hardware
|
||||||
|
being removed are unregistered and deleted.
|
||||||
|
|
||||||
|
The core ACPI namespace scanning code in drivers/acpi/scan.c carries out basic
|
||||||
|
initialization of device nodes, such as retrieving common configuration
|
||||||
|
information from the device objects represented by them and populating them with
|
||||||
|
appropriate data, but some of them require additional handling after they have
|
||||||
|
been registered. For example, if the given device node represents a PCI host
|
||||||
|
bridge, its registration should cause the PCI bus under that bridge to be
|
||||||
|
enumerated and PCI devices on that bus to be registered with the driver core.
|
||||||
|
Similarly, if the device node represents a PCI interrupt link, it is necessary
|
||||||
|
to configure that link so that the kernel can use it.
|
||||||
|
|
||||||
|
Those additional configuration tasks usually depend on the type of the hardware
|
||||||
|
component represented by the given device node which can be determined on the
|
||||||
|
basis of the device node's hardware ID (HID). They are performed by objects
|
||||||
|
called ACPI scan handlers represented by the following structure:
|
||||||
|
|
||||||
|
struct acpi_scan_handler {
|
||||||
|
const struct acpi_device_id *ids;
|
||||||
|
struct list_head list_node;
|
||||||
|
int (*attach)(struct acpi_device *dev, const struct acpi_device_id *id);
|
||||||
|
void (*detach)(struct acpi_device *dev);
|
||||||
|
};
|
||||||
|
|
||||||
|
where ids is the list of IDs of device nodes the given handler is supposed to
|
||||||
|
take care of, list_node is the hook to the global list of ACPI scan handlers
|
||||||
|
maintained by the ACPI core and the .attach() and .detach() callbacks are
|
||||||
|
executed, respectively, after registration of new device nodes and before
|
||||||
|
unregistration of device nodes the handler attached to previously.
|
||||||
|
|
||||||
|
The namespace scanning function, acpi_bus_scan(), first registers all of the
|
||||||
|
device nodes in the given namespace scope with the driver core. Then, it tries
|
||||||
|
to match a scan handler against each of them using the ids arrays of the
|
||||||
|
available scan handlers. If a matching scan handler is found, its .attach()
|
||||||
|
callback is executed for the given device node. If that callback returns 1,
|
||||||
|
that means that the handler has claimed the device node and is now responsible
|
||||||
|
for carrying out any additional configuration tasks related to it. It also will
|
||||||
|
be responsible for preparing the device node for unregistration in that case.
|
||||||
|
The device node's handler field is then populated with the address of the scan
|
||||||
|
handler that has claimed it.
|
||||||
|
|
||||||
|
If the .attach() callback returns 0, it means that the device node is not
|
||||||
|
interesting to the given scan handler and may be matched against the next scan
|
||||||
|
handler in the list. If it returns a (negative) error code, that means that
|
||||||
|
the namespace scan should be terminated due to a serious error. The error code
|
||||||
|
returned should then reflect the type of the error.
|
||||||
|
|
||||||
|
The namespace trimming function, acpi_bus_trim(), first executes .detach()
|
||||||
|
callbacks from the scan handlers of all device nodes in the given namespace
|
||||||
|
scope (if they have scan handlers). Next, it unregisters all of the device
|
||||||
|
nodes in that scope.
|
||||||
|
|
||||||
|
ACPI scan handlers can be added to the list maintained by the ACPI core with the
|
||||||
|
help of the acpi_scan_add_handler() function taking a pointer to the new scan
|
||||||
|
handler as an argument. The order in which scan handlers are added to the list
|
||||||
|
is the order in which they are matched against device nodes during namespace
|
||||||
|
scans.
|
||||||
|
|
||||||
|
All scan handles must be added to the list before acpi_bus_scan() is run for the
|
||||||
|
first time and they cannot be removed from it.
|
||||||
@@ -125,7 +125,9 @@ DRIVER OPTIONS
|
|||||||
The aoe_deadsecs module parameter determines the maximum number of
|
The aoe_deadsecs module parameter determines the maximum number of
|
||||||
seconds that the driver will wait for an AoE device to provide a
|
seconds that the driver will wait for an AoE device to provide a
|
||||||
response to an AoE command. After aoe_deadsecs seconds have
|
response to an AoE command. After aoe_deadsecs seconds have
|
||||||
elapsed, the AoE device will be marked as "down".
|
elapsed, the AoE device will be marked as "down". A value of zero
|
||||||
|
is supported for testing purposes and makes the aoe driver keep
|
||||||
|
trying AoE commands forever.
|
||||||
|
|
||||||
The aoe_maxout module parameter has a default of 128. This is the
|
The aoe_maxout module parameter has a default of 128. This is the
|
||||||
maximum number of unresponded packets that will be sent to an AoE
|
maximum number of unresponded packets that will be sent to an AoE
|
||||||
|
|||||||
@@ -285,7 +285,10 @@ FB0 +-- GFX ---- LCD ---- LCD
|
|||||||
Misc notes
|
Misc notes
|
||||||
----------
|
----------
|
||||||
|
|
||||||
OMAP FB allocates the framebuffer memory using the OMAP VRAM allocator.
|
OMAP FB allocates the framebuffer memory using the standard dma allocator. You
|
||||||
|
can enable Contiguous Memory Allocator (CONFIG_CMA) to improve the dma
|
||||||
|
allocator, and if CMA is enabled, you use "cma=" kernel parameter to increase
|
||||||
|
the global memory area for CMA.
|
||||||
|
|
||||||
Using DSI DPLL to generate pixel clock it is possible produce the pixel clock
|
Using DSI DPLL to generate pixel clock it is possible produce the pixel clock
|
||||||
of 86.5MHz (max possible), and with that you get 1280x1024@57 output from DVI.
|
of 86.5MHz (max possible), and with that you get 1280x1024@57 output from DVI.
|
||||||
@@ -301,11 +304,6 @@ framebuffer parameters.
|
|||||||
Kernel boot arguments
|
Kernel boot arguments
|
||||||
---------------------
|
---------------------
|
||||||
|
|
||||||
vram=<size>[,<physaddr>]
|
|
||||||
- Amount of total VRAM to preallocate and optionally a physical start
|
|
||||||
memory address. For example, "10M". omapfb allocates memory for
|
|
||||||
framebuffers from VRAM.
|
|
||||||
|
|
||||||
omapfb.mode=<display>:<mode>[,...]
|
omapfb.mode=<display>:<mode>[,...]
|
||||||
- Default video mode for specified displays. For example,
|
- Default video mode for specified displays. For example,
|
||||||
"dvi:800x400MR-24@60". See drivers/video/modedb.c.
|
"dvi:800x400MR-24@60". See drivers/video/modedb.c.
|
||||||
|
|||||||
@@ -35,6 +35,8 @@ ffffffbc00000000 ffffffbdffffffff 8GB vmemmap
|
|||||||
|
|
||||||
ffffffbe00000000 ffffffbffbbfffff ~8GB [guard, future vmmemap]
|
ffffffbe00000000 ffffffbffbbfffff ~8GB [guard, future vmmemap]
|
||||||
|
|
||||||
|
ffffffbffbc00000 ffffffbffbdfffff 2MB earlyprintk device
|
||||||
|
|
||||||
ffffffbffbe00000 ffffffbffbe0ffff 64KB PCI I/O space
|
ffffffbffbe00000 ffffffbffbe0ffff 64KB PCI I/O space
|
||||||
|
|
||||||
ffffffbbffff0000 ffffffbcffffffff ~2MB [guard]
|
ffffffbbffff0000 ffffffbcffffffff ~2MB [guard]
|
||||||
|
|||||||
@@ -253,6 +253,8 @@ This performs an atomic exchange operation on the atomic variable v, setting
|
|||||||
the given new value. It returns the old value that the atomic variable v had
|
the given new value. It returns the old value that the atomic variable v had
|
||||||
just before the operation.
|
just before the operation.
|
||||||
|
|
||||||
|
atomic_xchg requires explicit memory barriers around the operation.
|
||||||
|
|
||||||
int atomic_cmpxchg(atomic_t *v, int old, int new);
|
int atomic_cmpxchg(atomic_t *v, int old, int new);
|
||||||
|
|
||||||
This performs an atomic compare exchange operation on the atomic value v,
|
This performs an atomic compare exchange operation on the atomic value v,
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ Kernel driver lp855x
|
|||||||
Backlight driver for LP855x ICs
|
Backlight driver for LP855x ICs
|
||||||
|
|
||||||
Supported chips:
|
Supported chips:
|
||||||
Texas Instruments LP8550, LP8551, LP8552, LP8553 and LP8556
|
Texas Instruments LP8550, LP8551, LP8552, LP8553, LP8556 and LP8557
|
||||||
|
|
||||||
Author: Milo(Woogyom) Kim <milo.kim@ti.com>
|
Author: Milo(Woogyom) Kim <milo.kim@ti.com>
|
||||||
|
|
||||||
@@ -24,7 +24,7 @@ Value : pwm based or register based
|
|||||||
|
|
||||||
2) chip_id
|
2) chip_id
|
||||||
The lp855x chip id.
|
The lp855x chip id.
|
||||||
Value : lp8550/lp8551/lp8552/lp8553/lp8556
|
Value : lp8550/lp8551/lp8552/lp8553/lp8556/lp8557
|
||||||
|
|
||||||
Platform data for lp855x
|
Platform data for lp855x
|
||||||
------------------------
|
------------------------
|
||||||
@@ -35,11 +35,8 @@ For supporting platform specific data, the lp855x platform data can be used.
|
|||||||
* mode : Brightness control mode. PWM or register based.
|
* mode : Brightness control mode. PWM or register based.
|
||||||
* device_control : Value of DEVICE CONTROL register.
|
* device_control : Value of DEVICE CONTROL register.
|
||||||
* initial_brightness : Initial value of backlight brightness.
|
* initial_brightness : Initial value of backlight brightness.
|
||||||
* pwm_data : Platform specific pwm generation functions.
|
* period_ns : Platform specific PWM period value. unit is nano.
|
||||||
Only valid when brightness is pwm input mode.
|
Only valid when brightness is pwm input mode.
|
||||||
Functions should be implemented by PWM driver.
|
|
||||||
- pwm_set_intensity() : set duty of PWM
|
|
||||||
- pwm_get_intensity() : get current duty of PWM
|
|
||||||
* load_new_rom_data :
|
* load_new_rom_data :
|
||||||
0 : use default configuration data
|
0 : use default configuration data
|
||||||
1 : update values of eeprom or eprom registers on loading driver
|
1 : update values of eeprom or eprom registers on loading driver
|
||||||
@@ -71,8 +68,5 @@ static struct lp855x_platform_data lp8556_pdata = {
|
|||||||
.mode = PWM_BASED,
|
.mode = PWM_BASED,
|
||||||
.device_control = PWM_CONFIG(LP8556),
|
.device_control = PWM_CONFIG(LP8556),
|
||||||
.initial_brightness = INITIAL_BRT,
|
.initial_brightness = INITIAL_BRT,
|
||||||
.pwm_data = {
|
.period_ns = 1000000,
|
||||||
.pwm_set_intensity = platform_pwm_set_intensity,
|
|
||||||
.pwm_get_intensity = platform_pwm_get_intensity,
|
|
||||||
},
|
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -102,6 +102,64 @@ processing of request. Therefore, increasing the value can imporve the
|
|||||||
performace although this can cause the latency of some I/O to increase due
|
performace although this can cause the latency of some I/O to increase due
|
||||||
to more number of requests.
|
to more number of requests.
|
||||||
|
|
||||||
|
CFQ Group scheduling
|
||||||
|
====================
|
||||||
|
|
||||||
|
CFQ supports blkio cgroup and has "blkio." prefixed files in each
|
||||||
|
blkio cgroup directory. It is weight-based and there are four knobs
|
||||||
|
for configuration - weight[_device] and leaf_weight[_device].
|
||||||
|
Internal cgroup nodes (the ones with children) can also have tasks in
|
||||||
|
them, so the former two configure how much proportion the cgroup as a
|
||||||
|
whole is entitled to at its parent's level while the latter two
|
||||||
|
configure how much proportion the tasks in the cgroup have compared to
|
||||||
|
its direct children.
|
||||||
|
|
||||||
|
Another way to think about it is assuming that each internal node has
|
||||||
|
an implicit leaf child node which hosts all the tasks whose weight is
|
||||||
|
configured by leaf_weight[_device]. Let's assume a blkio hierarchy
|
||||||
|
composed of five cgroups - root, A, B, AA and AB - with the following
|
||||||
|
weights where the names represent the hierarchy.
|
||||||
|
|
||||||
|
weight leaf_weight
|
||||||
|
root : 125 125
|
||||||
|
A : 500 750
|
||||||
|
B : 250 500
|
||||||
|
AA : 500 500
|
||||||
|
AB : 1000 500
|
||||||
|
|
||||||
|
root never has a parent making its weight is meaningless. For backward
|
||||||
|
compatibility, weight is always kept in sync with leaf_weight. B, AA
|
||||||
|
and AB have no child and thus its tasks have no children cgroup to
|
||||||
|
compete with. They always get 100% of what the cgroup won at the
|
||||||
|
parent level. Considering only the weights which matter, the hierarchy
|
||||||
|
looks like the following.
|
||||||
|
|
||||||
|
root
|
||||||
|
/ | \
|
||||||
|
A B leaf
|
||||||
|
500 250 125
|
||||||
|
/ | \
|
||||||
|
AA AB leaf
|
||||||
|
500 1000 750
|
||||||
|
|
||||||
|
If all cgroups have active IOs and competing with each other, disk
|
||||||
|
time will be distributed like the following.
|
||||||
|
|
||||||
|
Distribution below root. The total active weight at this level is
|
||||||
|
A:500 + B:250 + C:125 = 875.
|
||||||
|
|
||||||
|
root-leaf : 125 / 875 =~ 14%
|
||||||
|
A : 500 / 875 =~ 57%
|
||||||
|
B(-leaf) : 250 / 875 =~ 28%
|
||||||
|
|
||||||
|
A has children and further distributes its 57% among the children and
|
||||||
|
the implicit leaf node. The total active weight at this level is
|
||||||
|
AA:500 + AB:1000 + A-leaf:750 = 2250.
|
||||||
|
|
||||||
|
A-leaf : ( 750 / 2250) * A =~ 19%
|
||||||
|
AA(-leaf) : ( 500 / 2250) * A =~ 12%
|
||||||
|
AB(-leaf) : (1000 / 2250) * A =~ 25%
|
||||||
|
|
||||||
CFQ IOPS Mode for group scheduling
|
CFQ IOPS Mode for group scheduling
|
||||||
===================================
|
===================================
|
||||||
Basic CFQ design is to provide priority based time slices. Higher priority
|
Basic CFQ design is to provide priority based time slices. Higher priority
|
||||||
|
|||||||
@@ -4,43 +4,13 @@
|
|||||||
can use a remote server as one of its block devices. So every time
|
can use a remote server as one of its block devices. So every time
|
||||||
the client computer wants to read, e.g., /dev/nb0, it sends a
|
the client computer wants to read, e.g., /dev/nb0, it sends a
|
||||||
request over TCP to the server, which will reply with the data read.
|
request over TCP to the server, which will reply with the data read.
|
||||||
This can be used for stations with low disk space (or even diskless -
|
This can be used for stations with low disk space (or even diskless)
|
||||||
if you boot from floppy) to borrow disk space from another computer.
|
to borrow disk space from another computer.
|
||||||
Unlike NFS, it is possible to put any filesystem on it, etc. It should
|
Unlike NFS, it is possible to put any filesystem on it, etc.
|
||||||
even be possible to use NBD as a root filesystem (I've never tried),
|
|
||||||
but it requires a user-level program to be in the initrd to start.
|
|
||||||
It also allows you to run block-device in user land (making server
|
|
||||||
and client physically the same computer, communicating using loopback).
|
|
||||||
|
|
||||||
Current state: It currently works. Network block device is stable.
|
|
||||||
I originally thought that it was impossible to swap over TCP. It
|
|
||||||
turned out not to be true - swapping over TCP now works and seems
|
|
||||||
to be deadlock-free, but it requires heavy patches into Linux's
|
|
||||||
network layer.
|
|
||||||
|
|
||||||
For more information, or to download the nbd-client and nbd-server
|
For more information, or to download the nbd-client and nbd-server
|
||||||
tools, go to http://nbd.sf.net/.
|
tools, go to http://nbd.sf.net/.
|
||||||
|
|
||||||
Howto: To setup nbd, you can simply do the following:
|
|
||||||
|
|
||||||
First, serve a device or file from a remote server:
|
|
||||||
|
|
||||||
nbd-server <port-number> <device-or-file-to-serve-to-client>
|
|
||||||
|
|
||||||
e.g.,
|
|
||||||
root@server1 # nbd-server 1234 /dev/sdb1
|
|
||||||
|
|
||||||
(serves sdb1 partition on TCP port 1234)
|
|
||||||
|
|
||||||
Then, on the local (client) system:
|
|
||||||
|
|
||||||
nbd-client <server-name-or-IP> <server-port-number> /dev/nb[0-n]
|
|
||||||
|
|
||||||
e.g.,
|
|
||||||
root@client1 # nbd-client server1 1234 /dev/nb0
|
|
||||||
|
|
||||||
(creates the nb0 device on client1)
|
|
||||||
|
|
||||||
The nbd kernel module need only be installed on the client
|
The nbd kernel module need only be installed on the client
|
||||||
system, as the nbd-server is completely in userspace. In fact,
|
system, as the nbd-server is completely in userspace. In fact,
|
||||||
the nbd-server has been successfully ported to other operating
|
the nbd-server has been successfully ported to other operating
|
||||||
|
|||||||
@@ -4,8 +4,6 @@ blkio-controller.txt
|
|||||||
- Description for Block IO Controller, implementation and usage details.
|
- Description for Block IO Controller, implementation and usage details.
|
||||||
cgroups.txt
|
cgroups.txt
|
||||||
- Control Groups definition, implementation details, examples and API.
|
- Control Groups definition, implementation details, examples and API.
|
||||||
cgroup_event_listener.c
|
|
||||||
- A user program for cgroup listener.
|
|
||||||
cpuacct.txt
|
cpuacct.txt
|
||||||
- CPU Accounting Controller; account CPU usage for groups of tasks.
|
- CPU Accounting Controller; account CPU usage for groups of tasks.
|
||||||
cpusets.txt
|
cpusets.txt
|
||||||
|
|||||||
@@ -75,7 +75,7 @@ Throttling/Upper Limit policy
|
|||||||
mount -t cgroup -o blkio none /sys/fs/cgroup/blkio
|
mount -t cgroup -o blkio none /sys/fs/cgroup/blkio
|
||||||
|
|
||||||
- Specify a bandwidth rate on particular device for root group. The format
|
- Specify a bandwidth rate on particular device for root group. The format
|
||||||
for policy is "<major>:<minor> <byes_per_second>".
|
for policy is "<major>:<minor> <bytes_per_second>".
|
||||||
|
|
||||||
echo "8:16 1048576" > /sys/fs/cgroup/blkio/blkio.throttle.read_bps_device
|
echo "8:16 1048576" > /sys/fs/cgroup/blkio/blkio.throttle.read_bps_device
|
||||||
|
|
||||||
@@ -94,13 +94,11 @@ Throttling/Upper Limit policy
|
|||||||
|
|
||||||
Hierarchical Cgroups
|
Hierarchical Cgroups
|
||||||
====================
|
====================
|
||||||
- Currently none of the IO control policy supports hierarchical groups. But
|
- Currently only CFQ supports hierarchical groups. For throttling,
|
||||||
cgroup interface does allow creation of hierarchical cgroups and internally
|
cgroup interface does allow creation of hierarchical cgroups and
|
||||||
IO policies treat them as flat hierarchy.
|
internally it treats them as flat hierarchy.
|
||||||
|
|
||||||
So this patch will allow creation of cgroup hierarchcy but at the backend
|
If somebody created a hierarchy like as follows.
|
||||||
everything will be treated as flat. So if somebody created a hierarchy like
|
|
||||||
as follows.
|
|
||||||
|
|
||||||
root
|
root
|
||||||
/ \
|
/ \
|
||||||
@@ -108,16 +106,20 @@ Hierarchical Cgroups
|
|||||||
|
|
|
|
||||||
test3
|
test3
|
||||||
|
|
||||||
CFQ and throttling will practically treat all groups at same level.
|
CFQ will handle the hierarchy correctly but and throttling will
|
||||||
|
practically treat all groups at same level. For details on CFQ
|
||||||
|
hierarchy support, refer to Documentation/block/cfq-iosched.txt.
|
||||||
|
Throttling will treat the hierarchy as if it looks like the
|
||||||
|
following.
|
||||||
|
|
||||||
pivot
|
pivot
|
||||||
/ / \ \
|
/ / \ \
|
||||||
root test1 test2 test3
|
root test1 test2 test3
|
||||||
|
|
||||||
Down the line we can implement hierarchical accounting/control support
|
Nesting cgroups, while allowed, isn't officially supported and blkio
|
||||||
and also introduce a new cgroup file "use_hierarchy" which will control
|
genereates warning when cgroups nest. Once throttling implements
|
||||||
whether cgroup hierarchy is viewed as flat or hierarchical by the policy..
|
hierarchy support, hierarchy will be supported and the warning will
|
||||||
This is how memory controller also has implemented the things.
|
be removed.
|
||||||
|
|
||||||
Various user visible config options
|
Various user visible config options
|
||||||
===================================
|
===================================
|
||||||
@@ -172,6 +174,12 @@ Proportional weight policy files
|
|||||||
dev weight
|
dev weight
|
||||||
8:16 300
|
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
|
- blkio.time
|
||||||
- disk time allocated to cgroup per device in milliseconds. First
|
- disk time allocated to cgroup per device in milliseconds. First
|
||||||
two fields specify the major and minor number of the device and
|
two fields specify the major and minor number of the device and
|
||||||
@@ -279,6 +287,11 @@ Proportional weight policy files
|
|||||||
and minor number of the device and third field specifies the number
|
and minor number of the device and third field specifies the number
|
||||||
of times a group was dequeued from a particular device.
|
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
|
Throttling/Upper limit policy files
|
||||||
-----------------------------------
|
-----------------------------------
|
||||||
- blkio.throttle.read_bps_device
|
- blkio.throttle.read_bps_device
|
||||||
|
|||||||
@@ -1,110 +0,0 @@
|
|||||||
/*
|
|
||||||
* cgroup_event_listener.c - Simple listener of cgroup events
|
|
||||||
*
|
|
||||||
* Copyright (C) Kirill A. Shutemov <kirill@shutemov.name>
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <assert.h>
|
|
||||||
#include <errno.h>
|
|
||||||
#include <fcntl.h>
|
|
||||||
#include <libgen.h>
|
|
||||||
#include <limits.h>
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include <unistd.h>
|
|
||||||
|
|
||||||
#include <sys/eventfd.h>
|
|
||||||
|
|
||||||
#define USAGE_STR "Usage: cgroup_event_listener <path-to-control-file> <args>\n"
|
|
||||||
|
|
||||||
int main(int argc, char **argv)
|
|
||||||
{
|
|
||||||
int efd = -1;
|
|
||||||
int cfd = -1;
|
|
||||||
int event_control = -1;
|
|
||||||
char event_control_path[PATH_MAX];
|
|
||||||
char line[LINE_MAX];
|
|
||||||
int ret;
|
|
||||||
|
|
||||||
if (argc != 3) {
|
|
||||||
fputs(USAGE_STR, stderr);
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
cfd = open(argv[1], O_RDONLY);
|
|
||||||
if (cfd == -1) {
|
|
||||||
fprintf(stderr, "Cannot open %s: %s\n", argv[1],
|
|
||||||
strerror(errno));
|
|
||||||
goto out;
|
|
||||||
}
|
|
||||||
|
|
||||||
ret = snprintf(event_control_path, PATH_MAX, "%s/cgroup.event_control",
|
|
||||||
dirname(argv[1]));
|
|
||||||
if (ret >= PATH_MAX) {
|
|
||||||
fputs("Path to cgroup.event_control is too long\n", stderr);
|
|
||||||
goto out;
|
|
||||||
}
|
|
||||||
|
|
||||||
event_control = open(event_control_path, O_WRONLY);
|
|
||||||
if (event_control == -1) {
|
|
||||||
fprintf(stderr, "Cannot open %s: %s\n", event_control_path,
|
|
||||||
strerror(errno));
|
|
||||||
goto out;
|
|
||||||
}
|
|
||||||
|
|
||||||
efd = eventfd(0, 0);
|
|
||||||
if (efd == -1) {
|
|
||||||
perror("eventfd() failed");
|
|
||||||
goto out;
|
|
||||||
}
|
|
||||||
|
|
||||||
ret = snprintf(line, LINE_MAX, "%d %d %s", efd, cfd, argv[2]);
|
|
||||||
if (ret >= LINE_MAX) {
|
|
||||||
fputs("Arguments string is too long\n", stderr);
|
|
||||||
goto out;
|
|
||||||
}
|
|
||||||
|
|
||||||
ret = write(event_control, line, strlen(line) + 1);
|
|
||||||
if (ret == -1) {
|
|
||||||
perror("Cannot write to cgroup.event_control");
|
|
||||||
goto out;
|
|
||||||
}
|
|
||||||
|
|
||||||
while (1) {
|
|
||||||
uint64_t result;
|
|
||||||
|
|
||||||
ret = read(efd, &result, sizeof(result));
|
|
||||||
if (ret == -1) {
|
|
||||||
if (errno == EINTR)
|
|
||||||
continue;
|
|
||||||
perror("Cannot read from eventfd");
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
assert(ret == sizeof(result));
|
|
||||||
|
|
||||||
ret = access(event_control_path, W_OK);
|
|
||||||
if ((ret == -1) && (errno == ENOENT)) {
|
|
||||||
puts("The cgroup seems to have removed.");
|
|
||||||
ret = 0;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (ret == -1) {
|
|
||||||
perror("cgroup.event_control "
|
|
||||||
"is not accessible any more");
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
printf("%s %s: crossed\n", argv[1], argv[2]);
|
|
||||||
}
|
|
||||||
|
|
||||||
out:
|
|
||||||
if (efd >= 0)
|
|
||||||
close(efd);
|
|
||||||
if (event_control >= 0)
|
|
||||||
close(event_control);
|
|
||||||
if (cfd >= 0)
|
|
||||||
close(cfd);
|
|
||||||
|
|
||||||
return (ret != 0);
|
|
||||||
}
|
|
||||||
@@ -399,8 +399,7 @@ Under below explanation, we assume CONFIG_MEM_RES_CTRL_SWAP=y.
|
|||||||
|
|
||||||
9.10 Memory thresholds
|
9.10 Memory thresholds
|
||||||
Memory controller implements memory thresholds using cgroups notification
|
Memory controller implements memory thresholds using cgroups notification
|
||||||
API. You can use Documentation/cgroups/cgroup_event_listener.c to test
|
API. You can use tools/cgroup/cgroup_event_listener.c to test it.
|
||||||
it.
|
|
||||||
|
|
||||||
(Shell-A) Create cgroup and run event listener
|
(Shell-A) Create cgroup and run event listener
|
||||||
# mkdir /cgroup/A
|
# mkdir /cgroup/A
|
||||||
|
|||||||
@@ -71,6 +71,11 @@ Brief summary of control files.
|
|||||||
memory.oom_control # set/show oom controls.
|
memory.oom_control # set/show oom controls.
|
||||||
memory.numa_stat # show the number of memory usage per numa node
|
memory.numa_stat # show the number of memory usage per numa node
|
||||||
|
|
||||||
|
memory.kmem.limit_in_bytes # set/show hard limit for kernel memory
|
||||||
|
memory.kmem.usage_in_bytes # show current kernel memory allocation
|
||||||
|
memory.kmem.failcnt # show the number of kernel memory usage hits limits
|
||||||
|
memory.kmem.max_usage_in_bytes # show max kernel memory usage recorded
|
||||||
|
|
||||||
memory.kmem.tcp.limit_in_bytes # set/show hard limit for tcp buf memory
|
memory.kmem.tcp.limit_in_bytes # set/show hard limit for tcp buf memory
|
||||||
memory.kmem.tcp.usage_in_bytes # show current tcp buf memory allocation
|
memory.kmem.tcp.usage_in_bytes # show current tcp buf memory allocation
|
||||||
memory.kmem.tcp.failcnt # show the number of tcp buf memory usage hits limits
|
memory.kmem.tcp.failcnt # show the number of tcp buf memory usage hits limits
|
||||||
@@ -268,20 +273,73 @@ the amount of kernel memory used by the system. Kernel memory is fundamentally
|
|||||||
different than user memory, since it can't be swapped out, which makes it
|
different than user memory, since it can't be swapped out, which makes it
|
||||||
possible to DoS the system by consuming too much of this precious resource.
|
possible to DoS the system by consuming too much of this precious resource.
|
||||||
|
|
||||||
|
Kernel memory won't be accounted at all until limit on a group is set. This
|
||||||
|
allows for existing setups to continue working without disruption. The limit
|
||||||
|
cannot be set if the cgroup have children, or if there are already tasks in the
|
||||||
|
cgroup. Attempting to set the limit under those conditions will return -EBUSY.
|
||||||
|
When use_hierarchy == 1 and a group is accounted, its children will
|
||||||
|
automatically be accounted regardless of their limit value.
|
||||||
|
|
||||||
|
After a group is first limited, it will be kept being accounted until it
|
||||||
|
is removed. The memory limitation itself, can of course be removed by writing
|
||||||
|
-1 to memory.kmem.limit_in_bytes. In this case, kmem will be accounted, but not
|
||||||
|
limited.
|
||||||
|
|
||||||
Kernel memory limits are not imposed for the root cgroup. Usage for the root
|
Kernel memory limits are not imposed for the root cgroup. Usage for the root
|
||||||
cgroup may or may not be accounted.
|
cgroup may or may not be accounted. The memory used is accumulated into
|
||||||
|
memory.kmem.usage_in_bytes, or in a separate counter when it makes sense.
|
||||||
|
(currently only for tcp).
|
||||||
|
The main "kmem" counter is fed into the main counter, so kmem charges will
|
||||||
|
also be visible from the user counter.
|
||||||
|
|
||||||
Currently no soft limit is implemented for kernel memory. It is future work
|
Currently no soft limit is implemented for kernel memory. It is future work
|
||||||
to trigger slab reclaim when those limits are reached.
|
to trigger slab reclaim when those limits are reached.
|
||||||
|
|
||||||
2.7.1 Current Kernel Memory resources accounted
|
2.7.1 Current Kernel Memory resources accounted
|
||||||
|
|
||||||
|
* stack pages: every process consumes some stack pages. By accounting into
|
||||||
|
kernel memory, we prevent new processes from being created when the kernel
|
||||||
|
memory usage is too high.
|
||||||
|
|
||||||
|
* slab pages: pages allocated by the SLAB or SLUB allocator are tracked. A copy
|
||||||
|
of each kmem_cache is created everytime the cache is touched by the first time
|
||||||
|
from inside the memcg. The creation is done lazily, so some objects can still be
|
||||||
|
skipped while the cache is being created. All objects in a slab page should
|
||||||
|
belong to the same memcg. This only fails to hold when a task is migrated to a
|
||||||
|
different memcg during the page allocation by the cache.
|
||||||
|
|
||||||
* sockets memory pressure: some sockets protocols have memory pressure
|
* sockets memory pressure: some sockets protocols have memory pressure
|
||||||
thresholds. The Memory Controller allows them to be controlled individually
|
thresholds. The Memory Controller allows them to be controlled individually
|
||||||
per cgroup, instead of globally.
|
per cgroup, instead of globally.
|
||||||
|
|
||||||
* tcp memory pressure: sockets memory pressure for the tcp protocol.
|
* tcp memory pressure: sockets memory pressure for the tcp protocol.
|
||||||
|
|
||||||
|
2.7.3 Common use cases
|
||||||
|
|
||||||
|
Because the "kmem" counter is fed to the main user counter, kernel memory can
|
||||||
|
never be limited completely independently of user memory. Say "U" is the user
|
||||||
|
limit, and "K" the kernel limit. There are three possible ways limits can be
|
||||||
|
set:
|
||||||
|
|
||||||
|
U != 0, K = unlimited:
|
||||||
|
This is the standard memcg limitation mechanism already present before kmem
|
||||||
|
accounting. Kernel memory is completely ignored.
|
||||||
|
|
||||||
|
U != 0, K < U:
|
||||||
|
Kernel memory is a subset of the user memory. This setup is useful in
|
||||||
|
deployments where the total amount of memory per-cgroup is overcommited.
|
||||||
|
Overcommiting kernel memory limits is definitely not recommended, since the
|
||||||
|
box can still run out of non-reclaimable memory.
|
||||||
|
In this case, the admin could set up K so that the sum of all groups is
|
||||||
|
never greater than the total memory, and freely set U at the cost of his
|
||||||
|
QoS.
|
||||||
|
|
||||||
|
U != 0, K >= U:
|
||||||
|
Since kmem charges will also be fed to the user counter and reclaim will be
|
||||||
|
triggered for the cgroup for both kinds of memory. This setup gives the
|
||||||
|
admin a unified view of memory, and it is also useful for people who just
|
||||||
|
want to track kernel memory usage.
|
||||||
|
|
||||||
3. User Interface
|
3. User Interface
|
||||||
|
|
||||||
0. Configuration
|
0. Configuration
|
||||||
@@ -290,6 +348,7 @@ a. Enable CONFIG_CGROUPS
|
|||||||
b. Enable CONFIG_RESOURCE_COUNTERS
|
b. Enable CONFIG_RESOURCE_COUNTERS
|
||||||
c. Enable CONFIG_MEMCG
|
c. Enable CONFIG_MEMCG
|
||||||
d. Enable CONFIG_MEMCG_SWAP (to use swap extension)
|
d. Enable CONFIG_MEMCG_SWAP (to use swap extension)
|
||||||
|
d. Enable CONFIG_MEMCG_KMEM (to use kmem extension)
|
||||||
|
|
||||||
1. Prepare the cgroups (see cgroups.txt, Why are cgroups needed?)
|
1. Prepare the cgroups (see cgroups.txt, Why are cgroups needed?)
|
||||||
# mount -t tmpfs none /sys/fs/cgroup
|
# mount -t tmpfs none /sys/fs/cgroup
|
||||||
@@ -406,6 +465,11 @@ About use_hierarchy, see Section 6.
|
|||||||
Because rmdir() moves all pages to parent, some out-of-use page caches can be
|
Because rmdir() moves all pages to parent, some out-of-use page caches can be
|
||||||
moved to the parent. If you want to avoid that, force_empty will be useful.
|
moved to the parent. If you want to avoid that, force_empty will be useful.
|
||||||
|
|
||||||
|
Also, note that when memory.kmem.limit_in_bytes is set the charges due to
|
||||||
|
kernel pages will still be seen. This is not considered a failure and the
|
||||||
|
write will still return success. In this case, it is expected that
|
||||||
|
memory.kmem.usage_in_bytes == memory.usage_in_bytes.
|
||||||
|
|
||||||
About use_hierarchy, see Section 6.
|
About use_hierarchy, see Section 6.
|
||||||
|
|
||||||
5.2 stat file
|
5.2 stat file
|
||||||
|
|||||||
@@ -83,16 +83,17 @@ to work with it.
|
|||||||
res_counter->lock internally (it must be called with res_counter->lock
|
res_counter->lock internally (it must be called with res_counter->lock
|
||||||
held). The force parameter indicates whether we can bypass the limit.
|
held). The force parameter indicates whether we can bypass the limit.
|
||||||
|
|
||||||
e. void res_counter_uncharge[_locked]
|
e. u64 res_counter_uncharge[_locked]
|
||||||
(struct res_counter *rc, unsigned long val)
|
(struct res_counter *rc, unsigned long val)
|
||||||
|
|
||||||
When a resource is released (freed) it should be de-accounted
|
When a resource is released (freed) it should be de-accounted
|
||||||
from the resource counter it was accounted to. This is called
|
from the resource counter it was accounted to. This is called
|
||||||
"uncharging".
|
"uncharging". The return value of this function indicate the amount
|
||||||
|
of charges still present in the counter.
|
||||||
|
|
||||||
The _locked routines imply that the res_counter->lock is taken.
|
The _locked routines imply that the res_counter->lock is taken.
|
||||||
|
|
||||||
f. void res_counter_uncharge_until
|
f. u64 res_counter_uncharge_until
|
||||||
(struct res_counter *rc, struct res_counter *top,
|
(struct res_counter *rc, struct res_counter *top,
|
||||||
unsinged long val)
|
unsinged long val)
|
||||||
|
|
||||||
|
|||||||
@@ -87,6 +87,10 @@ As any static code analyzer, Coccinelle produces false
|
|||||||
positives. Thus, reports must be carefully checked, and patches
|
positives. Thus, reports must be carefully checked, and patches
|
||||||
reviewed.
|
reviewed.
|
||||||
|
|
||||||
|
To enable verbose messages set the V= variable, for example:
|
||||||
|
|
||||||
|
make coccicheck MODE=report V=1
|
||||||
|
|
||||||
|
|
||||||
Using Coccinelle with a single semantic patch
|
Using Coccinelle with a single semantic patch
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|||||||
@@ -111,6 +111,12 @@ policy->governor must contain the "default policy" for
|
|||||||
For setting some of these values, the frequency table helpers might be
|
For setting some of these values, the frequency table helpers might be
|
||||||
helpful. See the section 2 for more information on them.
|
helpful. See the section 2 for more information on them.
|
||||||
|
|
||||||
|
SMP systems normally have same clock source for a group of cpus. For these the
|
||||||
|
.init() would be called only once for the first online cpu. Here the .init()
|
||||||
|
routine must initialize policy->cpus with mask of all possible cpus (Online +
|
||||||
|
Offline) that share the clock. Then the core would copy this mask onto
|
||||||
|
policy->related_cpus and will reset policy->cpus to carry only online cpus.
|
||||||
|
|
||||||
|
|
||||||
1.3 verify
|
1.3 verify
|
||||||
------------
|
------------
|
||||||
|
|||||||
@@ -190,11 +190,11 @@ scaling_max_freq show the current "policy limits" (in
|
|||||||
first set scaling_max_freq, then
|
first set scaling_max_freq, then
|
||||||
scaling_min_freq.
|
scaling_min_freq.
|
||||||
|
|
||||||
affected_cpus : List of CPUs that require software coordination
|
affected_cpus : List of Online CPUs that require software
|
||||||
of frequency.
|
coordination of frequency.
|
||||||
|
|
||||||
related_cpus : List of CPUs that need some sort of frequency
|
related_cpus : List of Online + Offline CPUs that need software
|
||||||
coordination, whether software or hardware.
|
coordination of frequency.
|
||||||
|
|
||||||
scaling_driver : Hardware driver for cpufreq.
|
scaling_driver : Hardware driver for cpufreq.
|
||||||
|
|
||||||
|
|||||||
77
Documentation/device-mapper/cache-policies.txt
Normal file
77
Documentation/device-mapper/cache-policies.txt
Normal file
@@ -0,0 +1,77 @@
|
|||||||
|
Guidance for writing policies
|
||||||
|
=============================
|
||||||
|
|
||||||
|
Try to keep transactionality out of it. The core is careful to
|
||||||
|
avoid asking about anything that is migrating. This is a pain, but
|
||||||
|
makes it easier to write the policies.
|
||||||
|
|
||||||
|
Mappings are loaded into the policy at construction time.
|
||||||
|
|
||||||
|
Every bio that is mapped by the target is referred to the policy.
|
||||||
|
The policy can return a simple HIT or MISS or issue a migration.
|
||||||
|
|
||||||
|
Currently there's no way for the policy to issue background work,
|
||||||
|
e.g. to start writing back dirty blocks that are going to be evicte
|
||||||
|
soon.
|
||||||
|
|
||||||
|
Because we map bios, rather than requests it's easy for the policy
|
||||||
|
to get fooled by many small bios. For this reason the core target
|
||||||
|
issues periodic ticks to the policy. It's suggested that the policy
|
||||||
|
doesn't update states (eg, hit counts) for a block more than once
|
||||||
|
for each tick. The core ticks by watching bios complete, and so
|
||||||
|
trying to see when the io scheduler has let the ios run.
|
||||||
|
|
||||||
|
|
||||||
|
Overview of supplied cache replacement policies
|
||||||
|
===============================================
|
||||||
|
|
||||||
|
multiqueue
|
||||||
|
----------
|
||||||
|
|
||||||
|
This policy is the default.
|
||||||
|
|
||||||
|
The multiqueue policy has two sets of 16 queues: one set for entries
|
||||||
|
waiting for the cache and another one for those in the cache.
|
||||||
|
Cache entries in the queues are aged based on logical time. Entry into
|
||||||
|
the cache is based on variable thresholds and queue selection is based
|
||||||
|
on hit count on entry. The policy aims to take different cache miss
|
||||||
|
costs into account and to adjust to varying load patterns automatically.
|
||||||
|
|
||||||
|
Message and constructor argument pairs are:
|
||||||
|
'sequential_threshold <#nr_sequential_ios>' and
|
||||||
|
'random_threshold <#nr_random_ios>'.
|
||||||
|
|
||||||
|
The sequential threshold indicates the number of contiguous I/Os
|
||||||
|
required before a stream is treated as sequential. The random threshold
|
||||||
|
is the number of intervening non-contiguous I/Os that must be seen
|
||||||
|
before the stream is treated as random again.
|
||||||
|
|
||||||
|
The sequential and random thresholds default to 512 and 4 respectively.
|
||||||
|
|
||||||
|
Large, sequential ios are probably better left on the origin device
|
||||||
|
since spindles tend to have good bandwidth. The io_tracker counts
|
||||||
|
contiguous I/Os to try to spot when the io is in one of these sequential
|
||||||
|
modes.
|
||||||
|
|
||||||
|
cleaner
|
||||||
|
-------
|
||||||
|
|
||||||
|
The cleaner writes back all dirty blocks in a cache to decommission it.
|
||||||
|
|
||||||
|
Examples
|
||||||
|
========
|
||||||
|
|
||||||
|
The syntax for a table is:
|
||||||
|
cache <metadata dev> <cache dev> <origin dev> <block size>
|
||||||
|
<#feature_args> [<feature arg>]*
|
||||||
|
<policy> <#policy_args> [<policy arg>]*
|
||||||
|
|
||||||
|
The syntax to send a message using the dmsetup command is:
|
||||||
|
dmsetup message <mapped device> 0 sequential_threshold 1024
|
||||||
|
dmsetup message <mapped device> 0 random_threshold 8
|
||||||
|
|
||||||
|
Using dmsetup:
|
||||||
|
dmsetup create blah --table "0 268435456 cache /dev/sdb /dev/sdc \
|
||||||
|
/dev/sdd 512 0 mq 4 sequential_threshold 1024 random_threshold 8"
|
||||||
|
creates a 128GB large mapped device named 'blah' with the
|
||||||
|
sequential threshold set to 1024 and the random_threshold set to 8.
|
||||||
243
Documentation/device-mapper/cache.txt
Normal file
243
Documentation/device-mapper/cache.txt
Normal file
@@ -0,0 +1,243 @@
|
|||||||
|
Introduction
|
||||||
|
============
|
||||||
|
|
||||||
|
dm-cache is a device mapper target written by Joe Thornber, Heinz
|
||||||
|
Mauelshagen, and Mike Snitzer.
|
||||||
|
|
||||||
|
It aims to improve performance of a block device (eg, a spindle) by
|
||||||
|
dynamically migrating some of its data to a faster, smaller device
|
||||||
|
(eg, an SSD).
|
||||||
|
|
||||||
|
This device-mapper solution allows us to insert this caching at
|
||||||
|
different levels of the dm stack, for instance above the data device for
|
||||||
|
a thin-provisioning pool. Caching solutions that are integrated more
|
||||||
|
closely with the virtual memory system should give better performance.
|
||||||
|
|
||||||
|
The target reuses the metadata library used in the thin-provisioning
|
||||||
|
library.
|
||||||
|
|
||||||
|
The decision as to what data to migrate and when is left to a plug-in
|
||||||
|
policy module. Several of these have been written as we experiment,
|
||||||
|
and we hope other people will contribute others for specific io
|
||||||
|
scenarios (eg. a vm image server).
|
||||||
|
|
||||||
|
Glossary
|
||||||
|
========
|
||||||
|
|
||||||
|
Migration - Movement of the primary copy of a logical block from one
|
||||||
|
device to the other.
|
||||||
|
Promotion - Migration from slow device to fast device.
|
||||||
|
Demotion - Migration from fast device to slow device.
|
||||||
|
|
||||||
|
The origin device always contains a copy of the logical block, which
|
||||||
|
may be out of date or kept in sync with the copy on the cache device
|
||||||
|
(depending on policy).
|
||||||
|
|
||||||
|
Design
|
||||||
|
======
|
||||||
|
|
||||||
|
Sub-devices
|
||||||
|
-----------
|
||||||
|
|
||||||
|
The target is constructed by passing three devices to it (along with
|
||||||
|
other parameters detailed later):
|
||||||
|
|
||||||
|
1. An origin device - the big, slow one.
|
||||||
|
|
||||||
|
2. A cache device - the small, fast one.
|
||||||
|
|
||||||
|
3. A small metadata device - records which blocks are in the cache,
|
||||||
|
which are dirty, and extra hints for use by the policy object.
|
||||||
|
This information could be put on the cache device, but having it
|
||||||
|
separate allows the volume manager to configure it differently,
|
||||||
|
e.g. as a mirror for extra robustness.
|
||||||
|
|
||||||
|
Fixed block size
|
||||||
|
----------------
|
||||||
|
|
||||||
|
The origin is divided up into blocks of a fixed size. This block size
|
||||||
|
is configurable when you first create the cache. Typically we've been
|
||||||
|
using block sizes of 256k - 1024k.
|
||||||
|
|
||||||
|
Having a fixed block size simplifies the target a lot. But it is
|
||||||
|
something of a compromise. For instance, a small part of a block may be
|
||||||
|
getting hit a lot, yet the whole block will be promoted to the cache.
|
||||||
|
So large block sizes are bad because they waste cache space. And small
|
||||||
|
block sizes are bad because they increase the amount of metadata (both
|
||||||
|
in core and on disk).
|
||||||
|
|
||||||
|
Writeback/writethrough
|
||||||
|
----------------------
|
||||||
|
|
||||||
|
The cache has two modes, writeback and writethrough.
|
||||||
|
|
||||||
|
If writeback, the default, is selected then a write to a block that is
|
||||||
|
cached will go only to the cache and the block will be marked dirty in
|
||||||
|
the metadata.
|
||||||
|
|
||||||
|
If writethrough is selected then a write to a cached block will not
|
||||||
|
complete until it has hit both the origin and cache devices. Clean
|
||||||
|
blocks should remain clean.
|
||||||
|
|
||||||
|
A simple cleaner policy is provided, which will clean (write back) all
|
||||||
|
dirty blocks in a cache. Useful for decommissioning a cache.
|
||||||
|
|
||||||
|
Migration throttling
|
||||||
|
--------------------
|
||||||
|
|
||||||
|
Migrating data between the origin and cache device uses bandwidth.
|
||||||
|
The user can set a throttle to prevent more than a certain amount of
|
||||||
|
migration occuring at any one time. Currently we're not taking any
|
||||||
|
account of normal io traffic going to the devices. More work needs
|
||||||
|
doing here to avoid migrating during those peak io moments.
|
||||||
|
|
||||||
|
For the time being, a message "migration_threshold <#sectors>"
|
||||||
|
can be used to set the maximum number of sectors being migrated,
|
||||||
|
the default being 204800 sectors (or 100MB).
|
||||||
|
|
||||||
|
Updating on-disk metadata
|
||||||
|
-------------------------
|
||||||
|
|
||||||
|
On-disk metadata is committed every time a REQ_SYNC or REQ_FUA bio is
|
||||||
|
written. If no such requests are made then commits will occur every
|
||||||
|
second. This means the cache behaves like a physical disk that has a
|
||||||
|
write cache (the same is true of the thin-provisioning target). If
|
||||||
|
power is lost you may lose some recent writes. The metadata should
|
||||||
|
always be consistent in spite of any crash.
|
||||||
|
|
||||||
|
The 'dirty' state for a cache block changes far too frequently for us
|
||||||
|
to keep updating it on the fly. So we treat it as a hint. In normal
|
||||||
|
operation it will be written when the dm device is suspended. If the
|
||||||
|
system crashes all cache blocks will be assumed dirty when restarted.
|
||||||
|
|
||||||
|
Per-block policy hints
|
||||||
|
----------------------
|
||||||
|
|
||||||
|
Policy plug-ins can store a chunk of data per cache block. It's up to
|
||||||
|
the policy how big this chunk is, but it should be kept small. Like the
|
||||||
|
dirty flags this data is lost if there's a crash so a safe fallback
|
||||||
|
value should always be possible.
|
||||||
|
|
||||||
|
For instance, the 'mq' policy, which is currently the default policy,
|
||||||
|
uses this facility to store the hit count of the cache blocks. If
|
||||||
|
there's a crash this information will be lost, which means the cache
|
||||||
|
may be less efficient until those hit counts are regenerated.
|
||||||
|
|
||||||
|
Policy hints affect performance, not correctness.
|
||||||
|
|
||||||
|
Policy messaging
|
||||||
|
----------------
|
||||||
|
|
||||||
|
Policies will have different tunables, specific to each one, so we
|
||||||
|
need a generic way of getting and setting these. Device-mapper
|
||||||
|
messages are used. Refer to cache-policies.txt.
|
||||||
|
|
||||||
|
Discard bitset resolution
|
||||||
|
-------------------------
|
||||||
|
|
||||||
|
We can avoid copying data during migration if we know the block has
|
||||||
|
been discarded. A prime example of this is when mkfs discards the
|
||||||
|
whole block device. We store a bitset tracking the discard state of
|
||||||
|
blocks. However, we allow this bitset to have a different block size
|
||||||
|
from the cache blocks. This is because we need to track the discard
|
||||||
|
state for all of the origin device (compare with the dirty bitset
|
||||||
|
which is just for the smaller cache device).
|
||||||
|
|
||||||
|
Target interface
|
||||||
|
================
|
||||||
|
|
||||||
|
Constructor
|
||||||
|
-----------
|
||||||
|
|
||||||
|
cache <metadata dev> <cache dev> <origin dev> <block size>
|
||||||
|
<#feature args> [<feature arg>]*
|
||||||
|
<policy> <#policy args> [policy args]*
|
||||||
|
|
||||||
|
metadata dev : fast device holding the persistent metadata
|
||||||
|
cache dev : fast device holding cached data blocks
|
||||||
|
origin dev : slow device holding original data blocks
|
||||||
|
block size : cache unit size in sectors
|
||||||
|
|
||||||
|
#feature args : number of feature arguments passed
|
||||||
|
feature args : writethrough. (The default is writeback.)
|
||||||
|
|
||||||
|
policy : the replacement policy to use
|
||||||
|
#policy args : an even number of arguments corresponding to
|
||||||
|
key/value pairs passed to the policy
|
||||||
|
policy args : key/value pairs passed to the policy
|
||||||
|
E.g. 'sequential_threshold 1024'
|
||||||
|
See cache-policies.txt for details.
|
||||||
|
|
||||||
|
Optional feature arguments are:
|
||||||
|
writethrough : write through caching that prohibits cache block
|
||||||
|
content from being different from origin block content.
|
||||||
|
Without this argument, the default behaviour is to write
|
||||||
|
back cache block contents later for performance reasons,
|
||||||
|
so they may differ from the corresponding origin blocks.
|
||||||
|
|
||||||
|
A policy called 'default' is always registered. This is an alias for
|
||||||
|
the policy we currently think is giving best all round performance.
|
||||||
|
|
||||||
|
As the default policy could vary between kernels, if you are relying on
|
||||||
|
the characteristics of a specific policy, always request it by name.
|
||||||
|
|
||||||
|
Status
|
||||||
|
------
|
||||||
|
|
||||||
|
<#used metadata blocks>/<#total metadata blocks> <#read hits> <#read misses>
|
||||||
|
<#write hits> <#write misses> <#demotions> <#promotions> <#blocks in cache>
|
||||||
|
<#dirty> <#features> <features>* <#core args> <core args>* <#policy args>
|
||||||
|
<policy args>*
|
||||||
|
|
||||||
|
#used metadata blocks : Number of metadata blocks used
|
||||||
|
#total metadata blocks : Total number of metadata blocks
|
||||||
|
#read hits : Number of times a READ bio has been mapped
|
||||||
|
to the cache
|
||||||
|
#read misses : Number of times a READ bio has been mapped
|
||||||
|
to the origin
|
||||||
|
#write hits : Number of times a WRITE bio has been mapped
|
||||||
|
to the cache
|
||||||
|
#write misses : Number of times a WRITE bio has been
|
||||||
|
mapped to the origin
|
||||||
|
#demotions : Number of times a block has been removed
|
||||||
|
from the cache
|
||||||
|
#promotions : Number of times a block has been moved to
|
||||||
|
the cache
|
||||||
|
#blocks in cache : Number of blocks resident in the cache
|
||||||
|
#dirty : Number of blocks in the cache that differ
|
||||||
|
from the origin
|
||||||
|
#feature args : Number of feature args to follow
|
||||||
|
feature args : 'writethrough' (optional)
|
||||||
|
#core args : Number of core arguments (must be even)
|
||||||
|
core args : Key/value pairs for tuning the core
|
||||||
|
e.g. migration_threshold
|
||||||
|
#policy args : Number of policy arguments to follow (must be even)
|
||||||
|
policy args : Key/value pairs
|
||||||
|
e.g. 'sequential_threshold 1024
|
||||||
|
|
||||||
|
Messages
|
||||||
|
--------
|
||||||
|
|
||||||
|
Policies will have different tunables, specific to each one, so we
|
||||||
|
need a generic way of getting and setting these. Device-mapper
|
||||||
|
messages are used. (A sysfs interface would also be possible.)
|
||||||
|
|
||||||
|
The message format is:
|
||||||
|
|
||||||
|
<key> <value>
|
||||||
|
|
||||||
|
E.g.
|
||||||
|
dmsetup message my_cache 0 sequential_threshold 1024
|
||||||
|
|
||||||
|
Examples
|
||||||
|
========
|
||||||
|
|
||||||
|
The test suite can be found here:
|
||||||
|
|
||||||
|
https://github.com/jthornber/thinp-test-suite
|
||||||
|
|
||||||
|
dmsetup create my_cache --table '0 41943040 cache /dev/mapper/metadata \
|
||||||
|
/dev/mapper/ssd /dev/mapper/origin 512 1 writeback default 0'
|
||||||
|
dmsetup create my_cache --table '0 41943040 cache /dev/mapper/metadata \
|
||||||
|
/dev/mapper/ssd /dev/mapper/origin 1024 1 writeback \
|
||||||
|
mq 4 sequential_threshold 1024 random_threshold 8'
|
||||||
@@ -141,3 +141,4 @@ Version History
|
|||||||
1.2.0 Handle creation of arrays that contain failed devices.
|
1.2.0 Handle creation of arrays that contain failed devices.
|
||||||
1.3.0 Added support for RAID 10
|
1.3.0 Added support for RAID 10
|
||||||
1.3.1 Allow device replacement/rebuild for RAID 10
|
1.3.1 Allow device replacement/rebuild for RAID 10
|
||||||
|
1.3.2 Fix/improve redundancy checking for RAID10
|
||||||
|
|||||||
24
Documentation/devicetree/bindings/arc/interrupts.txt
Normal file
24
Documentation/devicetree/bindings/arc/interrupts.txt
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
* ARC700 incore Interrupt Controller
|
||||||
|
|
||||||
|
The core interrupt controller provides 32 prioritised interrupts (2 levels)
|
||||||
|
to ARC700 core.
|
||||||
|
|
||||||
|
Properties:
|
||||||
|
|
||||||
|
- compatible: "snps,arc700-intc"
|
||||||
|
- interrupt-controller: This is an interrupt controller.
|
||||||
|
- #interrupt-cells: Must be <1>.
|
||||||
|
|
||||||
|
Single Cell "interrupts" property of a device specifies the IRQ number
|
||||||
|
between 0 to 31
|
||||||
|
|
||||||
|
intc accessed via the special ARC AUX register interface, hence "reg" property
|
||||||
|
is not specified.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
intc: interrupt-controller {
|
||||||
|
compatible = "snps,arc700-intc";
|
||||||
|
interrupt-controller;
|
||||||
|
#interrupt-cells = <1>;
|
||||||
|
};
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
Altera SOCFPGA Reset Manager
|
||||||
|
|
||||||
|
Required properties:
|
||||||
|
- compatible : "altr,rst-mgr"
|
||||||
|
- reg : Should contain 1 register ranges(address and length)
|
||||||
|
|
||||||
|
Example:
|
||||||
|
rstmgr@ffd05000 {
|
||||||
|
compatible = "altr,rst-mgr";
|
||||||
|
reg = <0xffd05000 0x1000>;
|
||||||
|
};
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
Altera SOCFPGA System Manager
|
||||||
|
|
||||||
|
Required properties:
|
||||||
|
- compatible : "altr,sys-mgr"
|
||||||
|
- reg : Should contain 1 register ranges(address and length)
|
||||||
|
- cpu1-start-addr : CPU1 start address in hex.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
sysmgr@ffd08000 {
|
||||||
|
compatible = "altr,sys-mgr";
|
||||||
|
reg = <0xffd08000 0x1000>;
|
||||||
|
cpu1-start-addr = <0xffd080c4>;
|
||||||
|
};
|
||||||
@@ -1,13 +1,14 @@
|
|||||||
* ARM architected timer
|
* ARM architected timer
|
||||||
|
|
||||||
ARM Cortex-A7 and Cortex-A15 have a per-core architected timer, which
|
ARM cores may have a per-core architected timer, which provides per-cpu timers.
|
||||||
provides per-cpu timers.
|
|
||||||
|
|
||||||
The timer is attached to a GIC to deliver its per-processor interrupts.
|
The timer is attached to a GIC to deliver its per-processor interrupts.
|
||||||
|
|
||||||
** Timer node properties:
|
** Timer node properties:
|
||||||
|
|
||||||
- compatible : Should at least contain "arm,armv7-timer".
|
- compatible : Should at least contain one of
|
||||||
|
"arm,armv7-timer"
|
||||||
|
"arm,armv8-timer"
|
||||||
|
|
||||||
- interrupts : Interrupt list for secure, non-secure, virtual and
|
- interrupts : Interrupt list for secure, non-secure, virtual and
|
||||||
hypervisor timers, in that order.
|
hypervisor timers, in that order.
|
||||||
|
|||||||
@@ -6,9 +6,15 @@ Required properties:
|
|||||||
- interrupt-controller: Identifies the node as an interrupt controller.
|
- interrupt-controller: Identifies the node as an interrupt controller.
|
||||||
- #interrupt-cells: The number of cells to define the interrupts. Should be 1.
|
- #interrupt-cells: The number of cells to define the interrupts. Should be 1.
|
||||||
The cell is the IRQ number
|
The cell is the IRQ number
|
||||||
|
|
||||||
- reg: Should contain PMIC registers location and length. First pair
|
- reg: Should contain PMIC registers location and length. First pair
|
||||||
for the main interrupt registers, second pair for the per-CPU
|
for the main interrupt registers, second pair for the per-CPU
|
||||||
interrupt registers
|
interrupt registers. For this last pair, to be compliant with SMP
|
||||||
|
support, the "virtual" must be use (For the record, these registers
|
||||||
|
automatically map to the interrupt controller registers of the
|
||||||
|
current CPU)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
|
|
||||||
@@ -18,6 +24,6 @@ Example:
|
|||||||
#address-cells = <1>;
|
#address-cells = <1>;
|
||||||
#size-cells = <1>;
|
#size-cells = <1>;
|
||||||
interrupt-controller;
|
interrupt-controller;
|
||||||
reg = <0xd0020000 0x1000>,
|
reg = <0xd0020a00 0x1d0>,
|
||||||
<0xd0021000 0x1000>;
|
<0xd0021070 0x58>;
|
||||||
};
|
};
|
||||||
|
|||||||
20
Documentation/devicetree/bindings/arm/armada-370-xp-pmsu.txt
Normal file
20
Documentation/devicetree/bindings/arm/armada-370-xp-pmsu.txt
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
Power Management Service Unit(PMSU)
|
||||||
|
-----------------------------------
|
||||||
|
Available on Marvell SOCs: Armada 370 and Armada XP
|
||||||
|
|
||||||
|
Required properties:
|
||||||
|
|
||||||
|
- compatible: "marvell,armada-370-xp-pmsu"
|
||||||
|
|
||||||
|
- reg: Should contain PMSU registers location and length. First pair
|
||||||
|
for the per-CPU SW Reset Control registers, second pair for the
|
||||||
|
Power Management Service Unit.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
armada-370-xp-pmsu@d0022000 {
|
||||||
|
compatible = "marvell,armada-370-xp-pmsu";
|
||||||
|
reg = <0xd0022100 0x430>,
|
||||||
|
<0xd0020800 0x20>;
|
||||||
|
};
|
||||||
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
Marvell Armada 370 and Armada XP Global Timers
|
|
||||||
----------------------------------------------
|
|
||||||
|
|
||||||
Required properties:
|
|
||||||
- compatible: Should be "marvell,armada-370-xp-timer"
|
|
||||||
- interrupts: Should contain the list of Global Timer interrupts
|
|
||||||
- reg: Should contain the base address of the Global Timer registers
|
|
||||||
|
|
||||||
Optional properties:
|
|
||||||
- marvell,timer-25Mhz: Tells whether the Global timer supports the 25
|
|
||||||
Mhz fixed mode (available on Armada XP and not on Armada 370)
|
|
||||||
6
Documentation/devicetree/bindings/arm/armadeus.txt
Normal file
6
Documentation/devicetree/bindings/arm/armadeus.txt
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
Armadeus i.MX Platforms Device Tree Bindings
|
||||||
|
-----------------------------------------------
|
||||||
|
|
||||||
|
APF51: i.MX51 based module.
|
||||||
|
Required root node properties:
|
||||||
|
- compatible = "armadeus,imx51-apf51", "fsl,imx51";
|
||||||
@@ -4,7 +4,7 @@ Required properties:
|
|||||||
- compatible: Should be "atmel,<chip>-aic"
|
- compatible: Should be "atmel,<chip>-aic"
|
||||||
- interrupt-controller: Identifies the node as an interrupt controller.
|
- interrupt-controller: Identifies the node as an interrupt controller.
|
||||||
- interrupt-parent: For single AIC system, it is an empty property.
|
- interrupt-parent: For single AIC system, it is an empty property.
|
||||||
- #interrupt-cells: The number of cells to define the interrupts. It sould be 3.
|
- #interrupt-cells: The number of cells to define the interrupts. It should be 3.
|
||||||
The first cell is the IRQ number (aka "Peripheral IDentifier" on datasheet).
|
The first cell is the IRQ number (aka "Peripheral IDentifier" on datasheet).
|
||||||
The second cell is used to specify flags:
|
The second cell is used to specify flags:
|
||||||
bits[3:0] trigger type and level flags:
|
bits[3:0] trigger type and level flags:
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user