You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
Merge with /pub/scm/linux/kernel/git/torvalds/linux-2.6.git
This commit is contained in:
@@ -3642,11 +3642,9 @@ S: Beaverton, OR 97005
|
|||||||
S: USA
|
S: USA
|
||||||
|
|
||||||
N: Michal Wronski
|
N: Michal Wronski
|
||||||
E: wrona@mat.uni.torun.pl
|
E: Michal.Wronski@motorola.com
|
||||||
W: http://www.mat.uni.torun.pl/~wrona
|
|
||||||
D: POSIX message queues fs (with K. Benedyczak)
|
D: POSIX message queues fs (with K. Benedyczak)
|
||||||
S: ul. Teczowa 23/12
|
S: Krakow
|
||||||
S: 80-680 Gdansk-Sobieszewo
|
|
||||||
S: Poland
|
S: Poland
|
||||||
|
|
||||||
N: Frank Xia
|
N: Frank Xia
|
||||||
|
|||||||
@@ -139,9 +139,14 @@ You'll probably want to upgrade.
|
|||||||
Ksymoops
|
Ksymoops
|
||||||
--------
|
--------
|
||||||
|
|
||||||
If the unthinkable happens and your kernel oopses, you'll need a 2.4
|
If the unthinkable happens and your kernel oopses, you may need the
|
||||||
version of ksymoops to decode the report; see REPORTING-BUGS in the
|
ksymoops tool to decode it, but in most cases you don't.
|
||||||
root of the Linux source for more information.
|
In the 2.6 kernel it is generally preferred to build the kernel with
|
||||||
|
CONFIG_KALLSYMS so that it produces readable dumps that can be used as-is
|
||||||
|
(this also produces better output than ksymoops).
|
||||||
|
If for some reason your kernel is not build with CONFIG_KALLSYMS and
|
||||||
|
you have no way to rebuild and reproduce the Oops with that option, then
|
||||||
|
you can still decode that Oops with ksymoops.
|
||||||
|
|
||||||
Module-Init-Tools
|
Module-Init-Tools
|
||||||
-----------------
|
-----------------
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ DOCBOOKS := wanbook.xml z8530book.xml mcabook.xml videobook.xml \
|
|||||||
kernel-hacking.xml kernel-locking.xml deviceiobook.xml \
|
kernel-hacking.xml kernel-locking.xml deviceiobook.xml \
|
||||||
procfs-guide.xml writing_usb_driver.xml \
|
procfs-guide.xml writing_usb_driver.xml \
|
||||||
sis900.xml kernel-api.xml journal-api.xml lsm.xml usb.xml \
|
sis900.xml kernel-api.xml journal-api.xml lsm.xml usb.xml \
|
||||||
gadget.xml libata.xml mtdnand.xml librs.xml
|
gadget.xml libata.xml mtdnand.xml librs.xml rapidio.xml
|
||||||
|
|
||||||
###
|
###
|
||||||
# The build process is as follows (targets):
|
# The build process is as follows (targets):
|
||||||
|
|||||||
@@ -306,7 +306,7 @@ an example.
|
|||||||
</para>
|
</para>
|
||||||
<sect1><title>Journal Level</title>
|
<sect1><title>Journal Level</title>
|
||||||
!Efs/jbd/journal.c
|
!Efs/jbd/journal.c
|
||||||
!Efs/jbd/recovery.c
|
!Ifs/jbd/recovery.c
|
||||||
</sect1>
|
</sect1>
|
||||||
<sect1><title>Transasction Level</title>
|
<sect1><title>Transasction Level</title>
|
||||||
!Efs/jbd/transaction.c
|
!Efs/jbd/transaction.c
|
||||||
|
|||||||
@@ -118,7 +118,7 @@ X!Ilib/string.c
|
|||||||
</sect1>
|
</sect1>
|
||||||
<sect1><title>User Space Memory Access</title>
|
<sect1><title>User Space Memory Access</title>
|
||||||
!Iinclude/asm-i386/uaccess.h
|
!Iinclude/asm-i386/uaccess.h
|
||||||
!Iarch/i386/lib/usercopy.c
|
!Earch/i386/lib/usercopy.c
|
||||||
</sect1>
|
</sect1>
|
||||||
<sect1><title>More Memory Management Functions</title>
|
<sect1><title>More Memory Management Functions</title>
|
||||||
!Iinclude/linux/rmap.h
|
!Iinclude/linux/rmap.h
|
||||||
@@ -174,7 +174,6 @@ X!Ilib/string.c
|
|||||||
<title>The Linux VFS</title>
|
<title>The Linux VFS</title>
|
||||||
<sect1><title>The Filesystem types</title>
|
<sect1><title>The Filesystem types</title>
|
||||||
!Iinclude/linux/fs.h
|
!Iinclude/linux/fs.h
|
||||||
!Einclude/linux/fs.h
|
|
||||||
</sect1>
|
</sect1>
|
||||||
<sect1><title>The Directory Cache</title>
|
<sect1><title>The Directory Cache</title>
|
||||||
!Efs/dcache.c
|
!Efs/dcache.c
|
||||||
@@ -239,9 +238,9 @@ X!Ilib/string.c
|
|||||||
<title>Network device support</title>
|
<title>Network device support</title>
|
||||||
<sect1><title>Driver Support</title>
|
<sect1><title>Driver Support</title>
|
||||||
!Enet/core/dev.c
|
!Enet/core/dev.c
|
||||||
</sect1>
|
!Enet/ethernet/eth.c
|
||||||
<sect1><title>8390 Based Network Cards</title>
|
!Einclude/linux/etherdevice.h
|
||||||
!Edrivers/net/8390.c
|
!Enet/core/wireless.c
|
||||||
</sect1>
|
</sect1>
|
||||||
<sect1><title>Synchronous PPP</title>
|
<sect1><title>Synchronous PPP</title>
|
||||||
!Edrivers/net/wan/syncppp.c
|
!Edrivers/net/wan/syncppp.c
|
||||||
@@ -266,7 +265,7 @@ X!Ekernel/module.c
|
|||||||
<chapter id="hardware">
|
<chapter id="hardware">
|
||||||
<title>Hardware Interfaces</title>
|
<title>Hardware Interfaces</title>
|
||||||
<sect1><title>Interrupt Handling</title>
|
<sect1><title>Interrupt Handling</title>
|
||||||
!Ikernel/irq/manage.c
|
!Ekernel/irq/manage.c
|
||||||
</sect1>
|
</sect1>
|
||||||
|
|
||||||
<sect1><title>Resources Management</title>
|
<sect1><title>Resources Management</title>
|
||||||
@@ -501,7 +500,7 @@ KAO -->
|
|||||||
!Edrivers/video/modedb.c
|
!Edrivers/video/modedb.c
|
||||||
</sect1>
|
</sect1>
|
||||||
<sect1><title>Frame Buffer Macintosh Video Mode Database</title>
|
<sect1><title>Frame Buffer Macintosh Video Mode Database</title>
|
||||||
!Idrivers/video/macmodes.c
|
!Edrivers/video/macmodes.c
|
||||||
</sect1>
|
</sect1>
|
||||||
<sect1><title>Frame Buffer Fonts</title>
|
<sect1><title>Frame Buffer Fonts</title>
|
||||||
<para>
|
<para>
|
||||||
|
|||||||
@@ -0,0 +1,160 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
|
||||||
|
"http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" [
|
||||||
|
<!ENTITY rapidio SYSTEM "rapidio.xml">
|
||||||
|
]>
|
||||||
|
|
||||||
|
<book id="RapidIO-Guide">
|
||||||
|
<bookinfo>
|
||||||
|
<title>RapidIO Subsystem Guide</title>
|
||||||
|
|
||||||
|
<authorgroup>
|
||||||
|
<author>
|
||||||
|
<firstname>Matt</firstname>
|
||||||
|
<surname>Porter</surname>
|
||||||
|
<affiliation>
|
||||||
|
<address>
|
||||||
|
<email>mporter@kernel.crashing.org</email>
|
||||||
|
<email>mporter@mvista.com</email>
|
||||||
|
</address>
|
||||||
|
</affiliation>
|
||||||
|
</author>
|
||||||
|
</authorgroup>
|
||||||
|
|
||||||
|
<copyright>
|
||||||
|
<year>2005</year>
|
||||||
|
<holder>MontaVista Software, Inc.</holder>
|
||||||
|
</copyright>
|
||||||
|
|
||||||
|
<legalnotice>
|
||||||
|
<para>
|
||||||
|
This documentation is free software; you can redistribute
|
||||||
|
it and/or modify it under the terms of the GNU General Public
|
||||||
|
License version 2 as published by the Free Software Foundation.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
This program is distributed in the hope that it will be
|
||||||
|
useful, but WITHOUT ANY WARRANTY; without even the implied
|
||||||
|
warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
See the GNU General Public License for more details.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
You should have received a copy of the GNU General Public
|
||||||
|
License along with this program; if not, write to the Free
|
||||||
|
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,
|
||||||
|
MA 02111-1307 USA
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
For more details see the file COPYING in the source
|
||||||
|
distribution of Linux.
|
||||||
|
</para>
|
||||||
|
</legalnotice>
|
||||||
|
</bookinfo>
|
||||||
|
|
||||||
|
<toc></toc>
|
||||||
|
|
||||||
|
<chapter id="intro">
|
||||||
|
<title>Introduction</title>
|
||||||
|
<para>
|
||||||
|
RapidIO is a high speed switched fabric interconnect with
|
||||||
|
features aimed at the embedded market. RapidIO provides
|
||||||
|
support for memory-mapped I/O as well as message-based
|
||||||
|
transactions over the switched fabric network. RapidIO has
|
||||||
|
a standardized discovery mechanism not unlike the PCI bus
|
||||||
|
standard that allows simple detection of devices in a
|
||||||
|
network.
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
This documentation is provided for developers intending
|
||||||
|
to support RapidIO on new architectures, write new drivers,
|
||||||
|
or to understand the subsystem internals.
|
||||||
|
</para>
|
||||||
|
</chapter>
|
||||||
|
|
||||||
|
<chapter id="bugs">
|
||||||
|
<title>Known Bugs and Limitations</title>
|
||||||
|
|
||||||
|
<sect1>
|
||||||
|
<title>Bugs</title>
|
||||||
|
<para>None. ;)</para>
|
||||||
|
</sect1>
|
||||||
|
<sect1>
|
||||||
|
<title>Limitations</title>
|
||||||
|
<para>
|
||||||
|
<orderedlist>
|
||||||
|
<listitem><para>Access/management of RapidIO memory regions is not supported</para></listitem>
|
||||||
|
<listitem><para>Multiple host enumeration is not supported</para></listitem>
|
||||||
|
</orderedlist>
|
||||||
|
</para>
|
||||||
|
</sect1>
|
||||||
|
</chapter>
|
||||||
|
|
||||||
|
<chapter id="drivers">
|
||||||
|
<title>RapidIO driver interface</title>
|
||||||
|
<para>
|
||||||
|
Drivers are provided a set of calls in order
|
||||||
|
to interface with the subsystem to gather info
|
||||||
|
on devices, request/map memory region resources,
|
||||||
|
and manage mailboxes/doorbells.
|
||||||
|
</para>
|
||||||
|
<sect1>
|
||||||
|
<title>Functions</title>
|
||||||
|
!Iinclude/linux/rio_drv.h
|
||||||
|
!Edrivers/rapidio/rio-driver.c
|
||||||
|
!Edrivers/rapidio/rio.c
|
||||||
|
</sect1>
|
||||||
|
</chapter>
|
||||||
|
|
||||||
|
<chapter id="internals">
|
||||||
|
<title>Internals</title>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
This chapter contains the autogenerated documentation of the RapidIO
|
||||||
|
subsystem.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<sect1><title>Structures</title>
|
||||||
|
!Iinclude/linux/rio.h
|
||||||
|
</sect1>
|
||||||
|
<sect1><title>Enumeration and Discovery</title>
|
||||||
|
!Idrivers/rapidio/rio-scan.c
|
||||||
|
</sect1>
|
||||||
|
<sect1><title>Driver functionality</title>
|
||||||
|
!Idrivers/rapidio/rio.c
|
||||||
|
!Idrivers/rapidio/rio-access.c
|
||||||
|
</sect1>
|
||||||
|
<sect1><title>Device model support</title>
|
||||||
|
!Idrivers/rapidio/rio-driver.c
|
||||||
|
</sect1>
|
||||||
|
<sect1><title>Sysfs support</title>
|
||||||
|
!Idrivers/rapidio/rio-sysfs.c
|
||||||
|
</sect1>
|
||||||
|
<sect1><title>PPC32 support</title>
|
||||||
|
!Iarch/ppc/kernel/rio.c
|
||||||
|
!Earch/ppc/syslib/ppc85xx_rio.c
|
||||||
|
!Iarch/ppc/syslib/ppc85xx_rio.c
|
||||||
|
</sect1>
|
||||||
|
</chapter>
|
||||||
|
|
||||||
|
<chapter id="credits">
|
||||||
|
<title>Credits</title>
|
||||||
|
<para>
|
||||||
|
The following people have contributed to the RapidIO
|
||||||
|
subsystem directly or indirectly:
|
||||||
|
<orderedlist>
|
||||||
|
<listitem><para>Matt Porter<email>mporter@kernel.crashing.org</email></para></listitem>
|
||||||
|
<listitem><para>Randy Vinson<email>rvinson@mvista.com</email></para></listitem>
|
||||||
|
<listitem><para>Dan Malek<email>dan@embeddedalley.com</email></para></listitem>
|
||||||
|
</orderedlist>
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
The following people have contributed to this document:
|
||||||
|
<orderedlist>
|
||||||
|
<listitem><para>Matt Porter<email>mporter@kernel.crashing.org</email></para></listitem>
|
||||||
|
</orderedlist>
|
||||||
|
</para>
|
||||||
|
</chapter>
|
||||||
|
</book>
|
||||||
+91
-83
@@ -10,14 +10,22 @@
|
|||||||
This guide describes the basics of Message Signaled Interrupts (MSI),
|
This guide describes the basics of Message Signaled Interrupts (MSI),
|
||||||
the advantages of using MSI over traditional interrupt mechanisms,
|
the advantages of using MSI over traditional interrupt mechanisms,
|
||||||
and how to enable your driver to use MSI or MSI-X. Also included is
|
and how to enable your driver to use MSI or MSI-X. Also included is
|
||||||
a Frequently Asked Questions.
|
a Frequently Asked Questions (FAQ) section.
|
||||||
|
|
||||||
|
1.1 Terminology
|
||||||
|
|
||||||
|
PCI devices can be single-function or multi-function. In either case,
|
||||||
|
when this text talks about enabling or disabling MSI on a "device
|
||||||
|
function," it is referring to one specific PCI device and function and
|
||||||
|
not to all functions on a PCI device (unless the PCI device has only
|
||||||
|
one function).
|
||||||
|
|
||||||
2. Copyright 2003 Intel Corporation
|
2. Copyright 2003 Intel Corporation
|
||||||
|
|
||||||
3. What is MSI/MSI-X?
|
3. What is MSI/MSI-X?
|
||||||
|
|
||||||
Message Signaled Interrupt (MSI), as described in the PCI Local Bus
|
Message Signaled Interrupt (MSI), as described in the PCI Local Bus
|
||||||
Specification Revision 2.3 or latest, is an optional feature, and a
|
Specification Revision 2.3 or later, is an optional feature, and a
|
||||||
required feature for PCI Express devices. MSI enables a device function
|
required feature for PCI Express devices. MSI enables a device function
|
||||||
to request service by sending an Inbound Memory Write on its PCI bus to
|
to request service by sending an Inbound Memory Write on its PCI bus to
|
||||||
the FSB as a Message Signal Interrupt transaction. Because MSI is
|
the FSB as a Message Signal Interrupt transaction. Because MSI is
|
||||||
@@ -27,7 +35,7 @@ supported.
|
|||||||
|
|
||||||
A PCI device that supports MSI must also support pin IRQ assertion
|
A PCI device that supports MSI must also support pin IRQ assertion
|
||||||
interrupt mechanism to provide backward compatibility for systems that
|
interrupt mechanism to provide backward compatibility for systems that
|
||||||
do not support MSI. In Systems, which support MSI, the bus driver is
|
do not support MSI. In systems which support MSI, the bus driver is
|
||||||
responsible for initializing the message address and message data of
|
responsible for initializing the message address and message data of
|
||||||
the device function's MSI/MSI-X capability structure during device
|
the device function's MSI/MSI-X capability structure during device
|
||||||
initial configuration.
|
initial configuration.
|
||||||
@@ -61,17 +69,17 @@ over the MSI capability structure as described below.
|
|||||||
|
|
||||||
- MSI and MSI-X both support per-vector masking. Per-vector
|
- MSI and MSI-X both support per-vector masking. Per-vector
|
||||||
masking is an optional extension of MSI but a required
|
masking is an optional extension of MSI but a required
|
||||||
feature for MSI-X. Per-vector masking provides the kernel
|
feature for MSI-X. Per-vector masking provides the kernel the
|
||||||
the ability to mask/unmask MSI when servicing its software
|
ability to mask/unmask a single MSI while running its
|
||||||
interrupt service routing handler. If per-vector masking is
|
interrupt service routine. If per-vector masking is
|
||||||
not supported, then the device driver should provide the
|
not supported, then the device driver should provide the
|
||||||
hardware/software synchronization to ensure that the device
|
hardware/software synchronization to ensure that the device
|
||||||
generates MSI when the driver wants it to do so.
|
generates MSI when the driver wants it to do so.
|
||||||
|
|
||||||
4. Why use MSI?
|
4. Why use MSI?
|
||||||
|
|
||||||
As a benefit the simplification of board design, MSI allows board
|
As a benefit to the simplification of board design, MSI allows board
|
||||||
designers to remove out of band interrupt routing. MSI is another
|
designers to remove out-of-band interrupt routing. MSI is another
|
||||||
step towards a legacy-free environment.
|
step towards a legacy-free environment.
|
||||||
|
|
||||||
Due to increasing pressure on chipset and processor packages to
|
Due to increasing pressure on chipset and processor packages to
|
||||||
@@ -87,7 +95,7 @@ support. As a result, the PCI Express technology requires MSI
|
|||||||
support for better interrupt performance.
|
support for better interrupt performance.
|
||||||
|
|
||||||
Using MSI enables the device functions to support two or more
|
Using MSI enables the device functions to support two or more
|
||||||
vectors, which can be configured to target different CPU's to
|
vectors, which can be configured to target different CPUs to
|
||||||
increase scalability.
|
increase scalability.
|
||||||
|
|
||||||
5. Configuring a driver to use MSI/MSI-X
|
5. Configuring a driver to use MSI/MSI-X
|
||||||
@@ -119,13 +127,13 @@ pci_enable_msi() explicitly.
|
|||||||
|
|
||||||
int pci_enable_msi(struct pci_dev *dev)
|
int pci_enable_msi(struct pci_dev *dev)
|
||||||
|
|
||||||
With this new API, any existing device driver, which like to have
|
With this new API, a device driver that wants to have MSI
|
||||||
MSI enabled on its device function, must call this API to enable MSI
|
enabled on its device function must call this API to enable MSI.
|
||||||
A successful call will initialize the MSI capability structure
|
A successful call will initialize the MSI capability structure
|
||||||
with ONE vector, regardless of whether a device function is
|
with ONE vector, regardless of whether a device function is
|
||||||
capable of supporting multiple messages. This vector replaces the
|
capable of supporting multiple messages. This vector replaces the
|
||||||
pre-assigned dev->irq with a new MSI vector. To avoid the conflict
|
pre-assigned dev->irq with a new MSI vector. To avoid a conflict
|
||||||
of new assigned vector with existing pre-assigned vector requires
|
of the new assigned vector with existing pre-assigned vector requires
|
||||||
a device driver to call this API before calling request_irq().
|
a device driver to call this API before calling request_irq().
|
||||||
|
|
||||||
5.2.2 API pci_disable_msi
|
5.2.2 API pci_disable_msi
|
||||||
@@ -137,14 +145,14 @@ when a device driver is unloading. This API restores dev->irq with
|
|||||||
the pre-assigned IOAPIC vector and switches a device's interrupt
|
the pre-assigned IOAPIC vector and switches a device's interrupt
|
||||||
mode to PCI pin-irq assertion/INTx emulation mode.
|
mode to PCI pin-irq assertion/INTx emulation mode.
|
||||||
|
|
||||||
Note that a device driver should always call free_irq() on MSI vector
|
Note that a device driver should always call free_irq() on the MSI vector
|
||||||
it has done request_irq() on before calling this API. Failure to do
|
that it has done request_irq() on before calling this API. Failure to do
|
||||||
so results a BUG_ON() and a device will be left with MSI enabled and
|
so results in a BUG_ON() and a device will be left with MSI enabled and
|
||||||
leaks its vector.
|
leaks its vector.
|
||||||
|
|
||||||
5.2.3 MSI mode vs. legacy mode diagram
|
5.2.3 MSI mode vs. legacy mode diagram
|
||||||
|
|
||||||
The below diagram shows the events, which switches the interrupt
|
The below diagram shows the events which switch the interrupt
|
||||||
mode on the MSI-capable device function between MSI mode and
|
mode on the MSI-capable device function between MSI mode and
|
||||||
PIN-IRQ assertion mode.
|
PIN-IRQ assertion mode.
|
||||||
|
|
||||||
@@ -155,9 +163,9 @@ PIN-IRQ assertion mode.
|
|||||||
------------ pci_disable_msi ------------------------
|
------------ pci_disable_msi ------------------------
|
||||||
|
|
||||||
|
|
||||||
Figure 1.0 MSI Mode vs. Legacy Mode
|
Figure 1. MSI Mode vs. Legacy Mode
|
||||||
|
|
||||||
In Figure 1.0, a device operates by default in legacy mode. Legacy
|
In Figure 1, a device operates by default in legacy mode. Legacy
|
||||||
in this context means PCI pin-irq assertion or PCI-Express INTx
|
in this context means PCI pin-irq assertion or PCI-Express INTx
|
||||||
emulation. A successful MSI request (using pci_enable_msi()) switches
|
emulation. A successful MSI request (using pci_enable_msi()) switches
|
||||||
a device's interrupt mode to MSI mode. A pre-assigned IOAPIC vector
|
a device's interrupt mode to MSI mode. A pre-assigned IOAPIC vector
|
||||||
@@ -166,11 +174,11 @@ assigned MSI vector will replace dev->irq.
|
|||||||
|
|
||||||
To return back to its default mode, a device driver should always call
|
To return back to its default mode, a device driver should always call
|
||||||
pci_disable_msi() to undo the effect of pci_enable_msi(). Note that a
|
pci_disable_msi() to undo the effect of pci_enable_msi(). Note that a
|
||||||
device driver should always call free_irq() on MSI vector it has done
|
device driver should always call free_irq() on the MSI vector it has
|
||||||
request_irq() on before calling pci_disable_msi(). Failure to do so
|
done request_irq() on before calling pci_disable_msi(). Failure to do
|
||||||
results a BUG_ON() and a device will be left with MSI enabled and
|
so results in a BUG_ON() and a device will be left with MSI enabled and
|
||||||
leaks its vector. Otherwise, the PCI subsystem restores a device's
|
leaks its vector. Otherwise, the PCI subsystem restores a device's
|
||||||
dev->irq with a pre-assigned IOAPIC vector and marks released
|
dev->irq with a pre-assigned IOAPIC vector and marks the released
|
||||||
MSI vector as unused.
|
MSI vector as unused.
|
||||||
|
|
||||||
Once being marked as unused, there is no guarantee that the PCI
|
Once being marked as unused, there is no guarantee that the PCI
|
||||||
@@ -178,8 +186,8 @@ subsystem will reserve this MSI vector for a device. Depending on
|
|||||||
the availability of current PCI vector resources and the number of
|
the availability of current PCI vector resources and the number of
|
||||||
MSI/MSI-X requests from other drivers, this MSI may be re-assigned.
|
MSI/MSI-X requests from other drivers, this MSI may be re-assigned.
|
||||||
|
|
||||||
For the case where the PCI subsystem re-assigned this MSI vector
|
For the case where the PCI subsystem re-assigns this MSI vector to
|
||||||
another driver, a request to switching back to MSI mode may result
|
another driver, a request to switch back to MSI mode may result
|
||||||
in being assigned a different MSI vector or a failure if no more
|
in being assigned a different MSI vector or a failure if no more
|
||||||
vectors are available.
|
vectors are available.
|
||||||
|
|
||||||
@@ -208,12 +216,12 @@ Unlike the function pci_enable_msi(), the function pci_enable_msix()
|
|||||||
does not replace the pre-assigned IOAPIC dev->irq with a new MSI
|
does not replace the pre-assigned IOAPIC dev->irq with a new MSI
|
||||||
vector because the PCI subsystem writes the 1:1 vector-to-entry mapping
|
vector because the PCI subsystem writes the 1:1 vector-to-entry mapping
|
||||||
into the field vector of each element contained in a second argument.
|
into the field vector of each element contained in a second argument.
|
||||||
Note that the pre-assigned IO-APIC dev->irq is valid only if the device
|
Note that the pre-assigned IOAPIC dev->irq is valid only if the device
|
||||||
operates in PIN-IRQ assertion mode. In MSI-X mode, any attempt of
|
operates in PIN-IRQ assertion mode. In MSI-X mode, any attempt at
|
||||||
using dev->irq by the device driver to request for interrupt service
|
using dev->irq by the device driver to request for interrupt service
|
||||||
may result unpredictabe behavior.
|
may result unpredictabe behavior.
|
||||||
|
|
||||||
For each MSI-X vector granted, a device driver is responsible to call
|
For each MSI-X vector granted, a device driver is responsible for calling
|
||||||
other functions like request_irq(), enable_irq(), etc. to enable
|
other functions like request_irq(), enable_irq(), etc. to enable
|
||||||
this vector with its corresponding interrupt service handler. It is
|
this vector with its corresponding interrupt service handler. It is
|
||||||
a device driver's choice to assign all vectors with the same
|
a device driver's choice to assign all vectors with the same
|
||||||
@@ -224,13 +232,13 @@ service handler.
|
|||||||
|
|
||||||
The PCI 3.0 specification has implementation notes that MMIO address
|
The PCI 3.0 specification has implementation notes that MMIO address
|
||||||
space for a device's MSI-X structure should be isolated so that the
|
space for a device's MSI-X structure should be isolated so that the
|
||||||
software system can set different page for controlling accesses to
|
software system can set different pages for controlling accesses to the
|
||||||
the MSI-X structure. The implementation of MSI patch requires the PCI
|
MSI-X structure. The implementation of MSI support requires the PCI
|
||||||
subsystem, not a device driver, to maintain full control of the MSI-X
|
subsystem, not a device driver, to maintain full control of the MSI-X
|
||||||
table/MSI-X PBA and MMIO address space of the MSI-X table/MSI-X PBA.
|
table/MSI-X PBA (Pending Bit Array) and MMIO address space of the MSI-X
|
||||||
A device driver is prohibited from requesting the MMIO address space
|
table/MSI-X PBA. A device driver is prohibited from requesting the MMIO
|
||||||
of the MSI-X table/MSI-X PBA. Otherwise, the PCI subsystem will fail
|
address space of the MSI-X table/MSI-X PBA. Otherwise, the PCI subsystem
|
||||||
enabling MSI-X on its hardware device when it calls the function
|
will fail enabling MSI-X on its hardware device when it calls the function
|
||||||
pci_enable_msix().
|
pci_enable_msix().
|
||||||
|
|
||||||
5.3.2 Handling MSI-X allocation
|
5.3.2 Handling MSI-X allocation
|
||||||
@@ -274,9 +282,9 @@ For the case where fewer MSI-X vectors are allocated to a function
|
|||||||
than requested, the function pci_enable_msix() will return the
|
than requested, the function pci_enable_msix() will return the
|
||||||
maximum number of MSI-X vectors available to the caller. A device
|
maximum number of MSI-X vectors available to the caller. A device
|
||||||
driver may re-send its request with fewer or equal vectors indicated
|
driver may re-send its request with fewer or equal vectors indicated
|
||||||
in a return. For example, if a device driver requests 5 vectors, but
|
in the return. For example, if a device driver requests 5 vectors, but
|
||||||
the number of available vectors is 3 vectors, a value of 3 will be a
|
the number of available vectors is 3 vectors, a value of 3 will be
|
||||||
return as a result of pci_enable_msix() call. A function could be
|
returned as a result of pci_enable_msix() call. A function could be
|
||||||
designed for its driver to use only 3 MSI-X table entries as
|
designed for its driver to use only 3 MSI-X table entries as
|
||||||
different combinations as ABC--, A-B-C, A--CB, etc. Note that this
|
different combinations as ABC--, A-B-C, A--CB, etc. Note that this
|
||||||
patch does not support multiple entries with the same vector. Such
|
patch does not support multiple entries with the same vector. Such
|
||||||
@@ -285,49 +293,46 @@ as ABBCC, AABCC, BCCBA, etc will result as a failure by the function
|
|||||||
pci_enable_msix(). Below are the reasons why supporting multiple
|
pci_enable_msix(). Below are the reasons why supporting multiple
|
||||||
entries with the same vector is an undesirable solution.
|
entries with the same vector is an undesirable solution.
|
||||||
|
|
||||||
- The PCI subsystem can not determine which entry, which
|
- The PCI subsystem cannot determine the entry that
|
||||||
generated the message, to mask/unmask MSI while handling
|
generated the message to mask/unmask MSI while handling
|
||||||
software driver ISR. Attempting to walk through all MSI-X
|
software driver ISR. Attempting to walk through all MSI-X
|
||||||
table entries (2048 max) to mask/unmask any match vector
|
table entries (2048 max) to mask/unmask any match vector
|
||||||
is an undesirable solution.
|
is an undesirable solution.
|
||||||
|
|
||||||
- Walk through all MSI-X table entries (2048 max) to handle
|
- Walking through all MSI-X table entries (2048 max) to handle
|
||||||
SMP affinity of any match vector is an undesirable solution.
|
SMP affinity of any match vector is an undesirable solution.
|
||||||
|
|
||||||
5.3.4 API pci_enable_msix
|
5.3.4 API pci_enable_msix
|
||||||
|
|
||||||
int pci_enable_msix(struct pci_dev *dev, u32 *entries, int nvec)
|
int pci_enable_msix(struct pci_dev *dev, struct msix_entry *entries, int nvec)
|
||||||
|
|
||||||
This API enables a device driver to request the PCI subsystem
|
This API enables a device driver to request the PCI subsystem
|
||||||
for enabling MSI-X messages on its hardware device. Depending on
|
to enable MSI-X messages on its hardware device. Depending on
|
||||||
the availability of PCI vectors resources, the PCI subsystem enables
|
the availability of PCI vectors resources, the PCI subsystem enables
|
||||||
either all or nothing.
|
either all or none of the requested vectors.
|
||||||
|
|
||||||
Argument dev points to the device (pci_dev) structure.
|
Argument 'dev' points to the device (pci_dev) structure.
|
||||||
|
|
||||||
Argument entries is a pointer of unsigned integer type. The number of
|
Argument 'entries' is a pointer to an array of msix_entry structs.
|
||||||
elements is indicated in argument nvec. The content of each element
|
The number of entries is indicated in argument 'nvec'.
|
||||||
will be mapped to the following struct defined in /driver/pci/msi.h.
|
struct msix_entry is defined in /driver/pci/msi.h:
|
||||||
|
|
||||||
struct msix_entry {
|
struct msix_entry {
|
||||||
u16 vector; /* kernel uses to write alloc vector */
|
u16 vector; /* kernel uses to write alloc vector */
|
||||||
u16 entry; /* driver uses to specify entry */
|
u16 entry; /* driver uses to specify entry */
|
||||||
};
|
};
|
||||||
|
|
||||||
A device driver is responsible for initializing the field entry of
|
A device driver is responsible for initializing the field 'entry' of
|
||||||
each element with unique entry supported by MSI-X table. Otherwise,
|
each element with a unique entry supported by MSI-X table. Otherwise,
|
||||||
-EINVAL will be returned as a result. A successful return of zero
|
-EINVAL will be returned as a result. A successful return of zero
|
||||||
indicates the PCI subsystem completes initializing each of requested
|
indicates the PCI subsystem completed initializing each of the requested
|
||||||
entries of the MSI-X table with message address and message data.
|
entries of the MSI-X table with message address and message data.
|
||||||
Last but not least, the PCI subsystem will write the 1:1
|
Last but not least, the PCI subsystem will write the 1:1
|
||||||
vector-to-entry mapping into the field vector of each element. A
|
vector-to-entry mapping into the field 'vector' of each element. A
|
||||||
device driver is responsible of keeping track of allocated MSI-X
|
device driver is responsible for keeping track of allocated MSI-X
|
||||||
vectors in its internal data structure.
|
vectors in its internal data structure.
|
||||||
|
|
||||||
Argument nvec is an integer indicating the number of messages
|
A return of zero indicates that the number of MSI-X vectors was
|
||||||
requested.
|
|
||||||
|
|
||||||
A return of zero indicates that the number of MSI-X vectors is
|
|
||||||
successfully allocated. A return of greater than zero indicates
|
successfully allocated. A return of greater than zero indicates
|
||||||
MSI-X vector shortage. Or a return of less than zero indicates
|
MSI-X vector shortage. Or a return of less than zero indicates
|
||||||
a failure. This failure may be a result of duplicate entries
|
a failure. This failure may be a result of duplicate entries
|
||||||
@@ -341,12 +346,12 @@ void pci_disable_msix(struct pci_dev *dev)
|
|||||||
This API should always be used to undo the effect of pci_enable_msix()
|
This API should always be used to undo the effect of pci_enable_msix()
|
||||||
when a device driver is unloading. Note that a device driver should
|
when a device driver is unloading. Note that a device driver should
|
||||||
always call free_irq() on all MSI-X vectors it has done request_irq()
|
always call free_irq() on all MSI-X vectors it has done request_irq()
|
||||||
on before calling this API. Failure to do so results a BUG_ON() and
|
on before calling this API. Failure to do so results in a BUG_ON() and
|
||||||
a device will be left with MSI-X enabled and leaks its vectors.
|
a device will be left with MSI-X enabled and leaks its vectors.
|
||||||
|
|
||||||
5.3.6 MSI-X mode vs. legacy mode diagram
|
5.3.6 MSI-X mode vs. legacy mode diagram
|
||||||
|
|
||||||
The below diagram shows the events, which switches the interrupt
|
The below diagram shows the events which switch the interrupt
|
||||||
mode on the MSI-X capable device function between MSI-X mode and
|
mode on the MSI-X capable device function between MSI-X mode and
|
||||||
PIN-IRQ assertion mode (legacy).
|
PIN-IRQ assertion mode (legacy).
|
||||||
|
|
||||||
@@ -356,22 +361,22 @@ PIN-IRQ assertion mode (legacy).
|
|||||||
| | ===============> | |
|
| | ===============> | |
|
||||||
------------ pci_disable_msix ------------------------
|
------------ pci_disable_msix ------------------------
|
||||||
|
|
||||||
Figure 2.0 MSI-X Mode vs. Legacy Mode
|
Figure 2. MSI-X Mode vs. Legacy Mode
|
||||||
|
|
||||||
In Figure 2.0, a device operates by default in legacy mode. A
|
In Figure 2, a device operates by default in legacy mode. A
|
||||||
successful MSI-X request (using pci_enable_msix()) switches a
|
successful MSI-X request (using pci_enable_msix()) switches a
|
||||||
device's interrupt mode to MSI-X mode. A pre-assigned IOAPIC vector
|
device's interrupt mode to MSI-X mode. A pre-assigned IOAPIC vector
|
||||||
stored in dev->irq will be saved by the PCI subsystem; however,
|
stored in dev->irq will be saved by the PCI subsystem; however,
|
||||||
unlike MSI mode, the PCI subsystem will not replace dev->irq with
|
unlike MSI mode, the PCI subsystem will not replace dev->irq with
|
||||||
assigned MSI-X vector because the PCI subsystem already writes the 1:1
|
assigned MSI-X vector because the PCI subsystem already writes the 1:1
|
||||||
vector-to-entry mapping into the field vector of each element
|
vector-to-entry mapping into the field 'vector' of each element
|
||||||
specified in second argument.
|
specified in second argument.
|
||||||
|
|
||||||
To return back to its default mode, a device driver should always call
|
To return back to its default mode, a device driver should always call
|
||||||
pci_disable_msix() to undo the effect of pci_enable_msix(). Note that
|
pci_disable_msix() to undo the effect of pci_enable_msix(). Note that
|
||||||
a device driver should always call free_irq() on all MSI-X vectors it
|
a device driver should always call free_irq() on all MSI-X vectors it
|
||||||
has done request_irq() on before calling pci_disable_msix(). Failure
|
has done request_irq() on before calling pci_disable_msix(). Failure
|
||||||
to do so results a BUG_ON() and a device will be left with MSI-X
|
to do so results in a BUG_ON() and a device will be left with MSI-X
|
||||||
enabled and leaks its vectors. Otherwise, the PCI subsystem switches a
|
enabled and leaks its vectors. Otherwise, the PCI subsystem switches a
|
||||||
device function's interrupt mode from MSI-X mode to legacy mode and
|
device function's interrupt mode from MSI-X mode to legacy mode and
|
||||||
marks all allocated MSI-X vectors as unused.
|
marks all allocated MSI-X vectors as unused.
|
||||||
@@ -383,53 +388,56 @@ MSI/MSI-X requests from other drivers, these MSI-X vectors may be
|
|||||||
re-assigned.
|
re-assigned.
|
||||||
|
|
||||||
For the case where the PCI subsystem re-assigned these MSI-X vectors
|
For the case where the PCI subsystem re-assigned these MSI-X vectors
|
||||||
to other driver, a request to switching back to MSI-X mode may result
|
to other drivers, a request to switch back to MSI-X mode may result
|
||||||
being assigned with another set of MSI-X vectors or a failure if no
|
being assigned with another set of MSI-X vectors or a failure if no
|
||||||
more vectors are available.
|
more vectors are available.
|
||||||
|
|
||||||
5.4 Handling function implementng both MSI and MSI-X capabilities
|
5.4 Handling function implementing both MSI and MSI-X capabilities
|
||||||
|
|
||||||
For the case where a function implements both MSI and MSI-X
|
For the case where a function implements both MSI and MSI-X
|
||||||
capabilities, the PCI subsystem enables a device to run either in MSI
|
capabilities, the PCI subsystem enables a device to run either in MSI
|
||||||
mode or MSI-X mode but not both. A device driver determines whether it
|
mode or MSI-X mode but not both. A device driver determines whether it
|
||||||
wants MSI or MSI-X enabled on its hardware device. Once a device
|
wants MSI or MSI-X enabled on its hardware device. Once a device
|
||||||
driver requests for MSI, for example, it is prohibited to request for
|
driver requests for MSI, for example, it is prohibited from requesting
|
||||||
MSI-X; in other words, a device driver is not permitted to ping-pong
|
MSI-X; in other words, a device driver is not permitted to ping-pong
|
||||||
between MSI mod MSI-X mode during a run-time.
|
between MSI mod MSI-X mode during a run-time.
|
||||||
|
|
||||||
5.5 Hardware requirements for MSI/MSI-X support
|
5.5 Hardware requirements for MSI/MSI-X support
|
||||||
|
|
||||||
MSI/MSI-X support requires support from both system hardware and
|
MSI/MSI-X support requires support from both system hardware and
|
||||||
individual hardware device functions.
|
individual hardware device functions.
|
||||||
|
|
||||||
5.5.1 System hardware support
|
5.5.1 System hardware support
|
||||||
|
|
||||||
Since the target of MSI address is the local APIC CPU, enabling
|
Since the target of MSI address is the local APIC CPU, enabling
|
||||||
MSI/MSI-X support in Linux kernel is dependent on whether existing
|
MSI/MSI-X support in the Linux kernel is dependent on whether existing
|
||||||
system hardware supports local APIC. Users should verify their
|
system hardware supports local APIC. Users should verify that their
|
||||||
system whether it runs when CONFIG_X86_LOCAL_APIC=y.
|
system supports local APIC operation by testing that it runs when
|
||||||
|
CONFIG_X86_LOCAL_APIC=y.
|
||||||
|
|
||||||
In SMP environment, CONFIG_X86_LOCAL_APIC is automatically set;
|
In SMP environment, CONFIG_X86_LOCAL_APIC is automatically set;
|
||||||
however, in UP environment, users must manually set
|
however, in UP environment, users must manually set
|
||||||
CONFIG_X86_LOCAL_APIC. Once CONFIG_X86_LOCAL_APIC=y, setting
|
CONFIG_X86_LOCAL_APIC. Once CONFIG_X86_LOCAL_APIC=y, setting
|
||||||
CONFIG_PCI_MSI enables the VECTOR based scheme and
|
CONFIG_PCI_MSI enables the VECTOR based scheme and the option for
|
||||||
the option for MSI-capable device drivers to selectively enable
|
MSI-capable device drivers to selectively enable MSI/MSI-X.
|
||||||
MSI/MSI-X.
|
|
||||||
|
|
||||||
Note that CONFIG_X86_IO_APIC setting is irrelevant because MSI/MSI-X
|
Note that CONFIG_X86_IO_APIC setting is irrelevant because MSI/MSI-X
|
||||||
vector is allocated new during runtime and MSI/MSI-X support does not
|
vector is allocated new during runtime and MSI/MSI-X support does not
|
||||||
depend on BIOS support. This key independency enables MSI/MSI-X
|
depend on BIOS support. This key independency enables MSI/MSI-X
|
||||||
support on future IOxAPIC free platform.
|
support on future IOxAPIC free platforms.
|
||||||
|
|
||||||
5.5.2 Device hardware support
|
5.5.2 Device hardware support
|
||||||
|
|
||||||
The hardware device function supports MSI by indicating the
|
The hardware device function supports MSI by indicating the
|
||||||
MSI/MSI-X capability structure on its PCI capability list. By
|
MSI/MSI-X capability structure on its PCI capability list. By
|
||||||
default, this capability structure will not be initialized by
|
default, this capability structure will not be initialized by
|
||||||
the kernel to enable MSI during the system boot. In other words,
|
the kernel to enable MSI during the system boot. In other words,
|
||||||
the device function is running on its default pin assertion mode.
|
the device function is running on its default pin assertion mode.
|
||||||
Note that in many cases the hardware supporting MSI have bugs,
|
Note that in many cases the hardware supporting MSI have bugs,
|
||||||
which may result in system hang. The software driver of specific
|
which may result in system hangs. The software driver of specific
|
||||||
MSI-capable hardware is responsible for whether calling
|
MSI-capable hardware is responsible for deciding whether to call
|
||||||
pci_enable_msi or not. A return of zero indicates the kernel
|
pci_enable_msi or not. A return of zero indicates the kernel
|
||||||
successfully initializes the MSI/MSI-X capability structure of the
|
successfully initialized the MSI/MSI-X capability structure of the
|
||||||
device function. The device function is now running on MSI/MSI-X mode.
|
device function. The device function is now running on MSI/MSI-X mode.
|
||||||
|
|
||||||
5.6 How to tell whether MSI/MSI-X is enabled on device function
|
5.6 How to tell whether MSI/MSI-X is enabled on device function
|
||||||
@@ -439,10 +447,10 @@ pci_enable_msi()/pci_enable_msix() indicates to a device driver that
|
|||||||
its device function is initialized successfully and ready to run in
|
its device function is initialized successfully and ready to run in
|
||||||
MSI/MSI-X mode.
|
MSI/MSI-X mode.
|
||||||
|
|
||||||
At the user level, users can use command 'cat /proc/interrupts'
|
At the user level, users can use the command 'cat /proc/interrupts'
|
||||||
to display the vector allocated for a device and its interrupt
|
to display the vectors allocated for devices and their interrupt
|
||||||
MSI/MSI-X mode ("PCI MSI"/"PCI MSIX"). Below shows below MSI mode is
|
MSI/MSI-X modes ("PCI-MSI"/"PCI-MSI-X"). Below shows MSI mode is
|
||||||
enabled on a SCSI Adaptec 39320D Ultra320.
|
enabled on a SCSI Adaptec 39320D Ultra320 controller.
|
||||||
|
|
||||||
CPU0 CPU1
|
CPU0 CPU1
|
||||||
0: 324639 0 IO-APIC-edge timer
|
0: 324639 0 IO-APIC-edge timer
|
||||||
@@ -453,8 +461,8 @@ enabled on a SCSI Adaptec 39320D Ultra320.
|
|||||||
15: 1 0 IO-APIC-edge ide1
|
15: 1 0 IO-APIC-edge ide1
|
||||||
169: 0 0 IO-APIC-level uhci-hcd
|
169: 0 0 IO-APIC-level uhci-hcd
|
||||||
185: 0 0 IO-APIC-level uhci-hcd
|
185: 0 0 IO-APIC-level uhci-hcd
|
||||||
193: 138 10 PCI MSI aic79xx
|
193: 138 10 PCI-MSI aic79xx
|
||||||
201: 30 0 PCI MSI aic79xx
|
201: 30 0 PCI-MSI aic79xx
|
||||||
225: 30 0 IO-APIC-level aic7xxx
|
225: 30 0 IO-APIC-level aic7xxx
|
||||||
233: 30 0 IO-APIC-level aic7xxx
|
233: 30 0 IO-APIC-level aic7xxx
|
||||||
NMI: 0 0
|
NMI: 0 0
|
||||||
@@ -490,8 +498,8 @@ target address set as 0xfeexxxxx, as conformed to PCI
|
|||||||
specification 2.3 or latest, then it should work.
|
specification 2.3 or latest, then it should work.
|
||||||
|
|
||||||
Q4. From the driver point of view, if the MSI is lost because
|
Q4. From the driver point of view, if the MSI is lost because
|
||||||
of the errors occur during inbound memory write, then it may
|
of errors occurring during inbound memory write, then it may
|
||||||
wait for ever. Is there a mechanism for it to recover?
|
wait forever. Is there a mechanism for it to recover?
|
||||||
|
|
||||||
A4. Since the target of the transaction is an inbound memory
|
A4. Since the target of the transaction is an inbound memory
|
||||||
write, all transaction termination conditions (Retry,
|
write, all transaction termination conditions (Retry,
|
||||||
|
|||||||
@@ -772,8 +772,6 @@ RCU pointer/list traversal:
|
|||||||
list_for_each_entry_rcu
|
list_for_each_entry_rcu
|
||||||
list_for_each_continue_rcu (to be deprecated in favor of new
|
list_for_each_continue_rcu (to be deprecated in favor of new
|
||||||
list_for_each_entry_continue_rcu)
|
list_for_each_entry_continue_rcu)
|
||||||
hlist_for_each_rcu (to be deprecated in favor of
|
|
||||||
hlist_for_each_entry_rcu)
|
|
||||||
hlist_for_each_entry_rcu
|
hlist_for_each_entry_rcu
|
||||||
|
|
||||||
RCU pointer update:
|
RCU pointer update:
|
||||||
|
|||||||
@@ -8,10 +8,9 @@ Compilation of kernel
|
|||||||
---------------------
|
---------------------
|
||||||
|
|
||||||
In order to compile ARM Linux, you will need a compiler capable of
|
In order to compile ARM Linux, you will need a compiler capable of
|
||||||
generating ARM ELF code with GNU extensions. GCC 2.95.1, EGCS
|
generating ARM ELF code with GNU extensions. GCC 3.3 is known to be
|
||||||
1.1.2, and GCC 3.3 are known to be good compilers. Fortunately, you
|
a good compiler. Fortunately, you needn't guess. The kernel will report
|
||||||
needn't guess. The kernel will report an error if your compiler is
|
an error if your compiler is a recognized offender.
|
||||||
a recognized offender.
|
|
||||||
|
|
||||||
To build ARM Linux natively, you shouldn't have to alter the ARCH = line
|
To build ARM Linux natively, you shouldn't have to alter the ARCH = line
|
||||||
in the top level Makefile. However, if you don't have the ARM Linux ELF
|
in the top level Makefile. However, if you don't have the ARM Linux ELF
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
#include <linux/skbuff.h>
|
#include <linux/skbuff.h>
|
||||||
#include <linux/timer.h>
|
#include <linux/timer.h>
|
||||||
|
|
||||||
#include "connector.h"
|
#include <linux/connector.h>
|
||||||
|
|
||||||
static struct cb_id cn_test_id = { 0x123, 0x456 };
|
static struct cb_id cn_test_id = { 0x123, 0x456 };
|
||||||
static char cn_test_name[] = "cn_test";
|
static char cn_test_name[] = "cn_test";
|
||||||
@@ -104,7 +104,7 @@ static int cn_test_want_notify(void)
|
|||||||
req->first = cn_test_id.val + 20;
|
req->first = cn_test_id.val + 20;
|
||||||
req->range = 10;
|
req->range = 10;
|
||||||
|
|
||||||
NETLINK_CB(skb).dst_groups = ctl->group;
|
NETLINK_CB(skb).dst_group = ctl->group;
|
||||||
//netlink_broadcast(nls, skb, 0, ctl->group, GFP_ATOMIC);
|
//netlink_broadcast(nls, skb, 0, ctl->group, GFP_ATOMIC);
|
||||||
netlink_unicast(nls, skb, 0, 0);
|
netlink_unicast(nls, skb, 0, 0);
|
||||||
|
|
||||||
|
|||||||
@@ -19,7 +19,6 @@ There are two dm targets available: snapshot and snapshot-origin.
|
|||||||
*) snapshot-origin <origin>
|
*) snapshot-origin <origin>
|
||||||
|
|
||||||
which will normally have one or more snapshots based on it.
|
which will normally have one or more snapshots based on it.
|
||||||
You must create the snapshot-origin device before you can create snapshots.
|
|
||||||
Reads will be mapped directly to the backing device. For each write, the
|
Reads will be mapped directly to the backing device. For each write, the
|
||||||
original data will be saved in the <COW device> of each snapshot to keep
|
original data will be saved in the <COW device> of each snapshot to keep
|
||||||
its visible content unchanged, at least until the <COW device> fills up.
|
its visible content unchanged, at least until the <COW device> fills up.
|
||||||
@@ -27,7 +26,7 @@ its visible content unchanged, at least until the <COW device> fills up.
|
|||||||
|
|
||||||
*) snapshot <origin> <COW device> <persistent?> <chunksize>
|
*) snapshot <origin> <COW device> <persistent?> <chunksize>
|
||||||
|
|
||||||
A snapshot is created of the <origin> block device. Changed chunks of
|
A snapshot of the <origin> block device is created. Changed chunks of
|
||||||
<chunksize> sectors will be stored on the <COW device>. Writes will
|
<chunksize> sectors will be stored on the <COW device>. Writes will
|
||||||
only go to the <COW device>. Reads will come from the <COW device> or
|
only go to the <COW device>. Reads will come from the <COW device> or
|
||||||
from <origin> for unchanged data. <COW device> will often be
|
from <origin> for unchanged data. <COW device> will often be
|
||||||
@@ -37,6 +36,8 @@ the amount of free space and expand the <COW device> before it fills up.
|
|||||||
|
|
||||||
<persistent?> is P (Persistent) or N (Not persistent - will not survive
|
<persistent?> is P (Persistent) or N (Not persistent - will not survive
|
||||||
after reboot).
|
after reboot).
|
||||||
|
The difference is that for transient snapshots less metadata must be
|
||||||
|
saved on disk - they can be kept in memory by the kernel.
|
||||||
|
|
||||||
|
|
||||||
How this is used by LVM2
|
How this is used by LVM2
|
||||||
|
|||||||
+52
-12
@@ -1,5 +1,5 @@
|
|||||||
How to get the Nebula, PCTV and Twinhan DST cards working
|
How to get the Nebula, PCTV, FusionHDTV Lite and Twinhan DST cards working
|
||||||
=========================================================
|
==========================================================================
|
||||||
|
|
||||||
This class of cards has a bt878a as the PCI interface, and
|
This class of cards has a bt878a as the PCI interface, and
|
||||||
require the bttv driver.
|
require the bttv driver.
|
||||||
@@ -26,27 +26,31 @@ Furthermore you need to enable
|
|||||||
|
|
||||||
In general you need to load the bttv driver, which will handle the gpio and
|
In general you need to load the bttv driver, which will handle the gpio and
|
||||||
i2c communication for us, plus the common dvb-bt8xx device driver.
|
i2c communication for us, plus the common dvb-bt8xx device driver.
|
||||||
The frontends for Nebula (nxt6000), Pinnacle PCTV (cx24110) and
|
The frontends for Nebula (nxt6000), Pinnacle PCTV (cx24110), TwinHan (dst),
|
||||||
TwinHan (dst) are loaded automatically by the dvb-bt8xx device driver.
|
FusionHDTV DVB-T Lite (mt352) and FusionHDTV5 Lite (lgdt330x) are loaded
|
||||||
|
automatically by the dvb-bt8xx device driver.
|
||||||
|
|
||||||
3a) Nebula / Pinnacle PCTV
|
3a) Nebula / Pinnacle PCTV / FusionHDTV Lite
|
||||||
--------------------------
|
---------------------------------------------
|
||||||
|
|
||||||
$ modprobe bttv (normally bttv is being loaded automatically by kmod)
|
$ modprobe bttv (normally bttv is being loaded automatically by kmod)
|
||||||
$ modprobe dvb-bt8xx (or just place dvb-bt8xx in /etc/modules for automatic loading)
|
$ modprobe dvb-bt8xx
|
||||||
|
|
||||||
|
(or just place dvb-bt8xx in /etc/modules for automatic loading)
|
||||||
|
|
||||||
|
|
||||||
3b) TwinHan and Clones
|
3b) TwinHan and Clones
|
||||||
--------------------------
|
--------------------------
|
||||||
|
|
||||||
$ modprobe bttv i2c_hw=1 card=0x71
|
$ modprobe bttv card=0x71
|
||||||
$ modprobe dvb-bt8xx
|
$ modprobe dvb-bt8xx
|
||||||
$ modprobe dst
|
$ modprobe dst
|
||||||
|
|
||||||
The value 0x71 will override the PCI type detection for dvb-bt8xx,
|
The value 0x71 will override the PCI type detection for dvb-bt8xx,
|
||||||
which is necessary for TwinHan cards.
|
which is necessary for TwinHan cards. Omission of this parameter might result
|
||||||
|
in a system lockup.
|
||||||
|
|
||||||
If you're having an older card (blue color circuit) and card=0x71 locks
|
If you're having an older card (blue color PCB) and card=0x71 locks up
|
||||||
your machine, try using 0x68, too. If that does not work, ask on the
|
your machine, try using 0x68, too. If that does not work, ask on the
|
||||||
mailing list.
|
mailing list.
|
||||||
|
|
||||||
@@ -64,11 +68,47 @@ verbose=0 means complete disabling of messages
|
|||||||
dst_addons takes values 0 and 0x20. A value of 0 means it is a FTA card.
|
dst_addons takes values 0 and 0x20. A value of 0 means it is a FTA card.
|
||||||
0x20 means it has a Conditional Access slot.
|
0x20 means it has a Conditional Access slot.
|
||||||
|
|
||||||
The autodected values are determined bythe cards 'response
|
The autodetected values are determined by the cards 'response string'
|
||||||
string' which you can see in your logs e.g.
|
which you can see in your logs e.g.
|
||||||
|
|
||||||
dst_get_device_id: Recognise [DSTMCI]
|
dst_get_device_id: Recognise [DSTMCI]
|
||||||
|
|
||||||
|
If you need to sent in bug reports on the dst, please do send in a complete
|
||||||
|
log with the verbose=4 module parameter. For general usage, the default setting
|
||||||
|
of verbose=1 is ideal.
|
||||||
|
|
||||||
|
|
||||||
|
4) Multiple cards
|
||||||
|
--------------------------
|
||||||
|
|
||||||
|
If you happen to be running multiple cards, it would be advisable to load
|
||||||
|
the bttv module with the card id. This would help to solve any module loading
|
||||||
|
problems that you might face.
|
||||||
|
|
||||||
|
For example, if you have a Twinhan and Clones card along with a FusionHDTV5 Lite
|
||||||
|
|
||||||
|
$ modprobe bttv card=0x71 card=0x87
|
||||||
|
|
||||||
|
Here the order of the card id is important and should be the same as that of the
|
||||||
|
physical order of the cards. Here card=0x71 represents the Twinhan and clones
|
||||||
|
and card=0x87 represents Fusion HDTV5 Lite. These arguments can also be
|
||||||
|
specified in decimal, rather than hex:
|
||||||
|
|
||||||
|
$ modprobe bttv card=113 card=135
|
||||||
|
|
||||||
|
Some examples of card-id's
|
||||||
|
|
||||||
|
Pinnacle Sat 0x5e (94)
|
||||||
|
Nebula Digi TV 0x68 (104)
|
||||||
|
PC HDTV 0x70 (112)
|
||||||
|
Twinhan 0x71 (113)
|
||||||
|
FusionHDTV DVB-T Lite 0x80 (128)
|
||||||
|
FusionHDTV5 Lite 0x87 (135)
|
||||||
|
|
||||||
|
For a full list of card-id's, see the V4L Documentation within the kernel
|
||||||
|
source: linux/Documentation/video4linux/CARDLIST.bttv
|
||||||
|
|
||||||
|
If you have problems with this please do ask on the mailing list.
|
||||||
|
|
||||||
--
|
--
|
||||||
Authors: Richard Walker, Jamie Honan, Michael Hunold, Manu Abraham
|
Authors: Richard Walker, Jamie Honan, Michael Hunold, Manu Abraham
|
||||||
|
|||||||
@@ -41,6 +41,12 @@ o Frontends drivers:
|
|||||||
- dib3000mb : DiBcom 3000-MB demodulator
|
- dib3000mb : DiBcom 3000-MB demodulator
|
||||||
DVB-S/C/T:
|
DVB-S/C/T:
|
||||||
- dst : TwinHan DST Frontend
|
- dst : TwinHan DST Frontend
|
||||||
|
ATSC:
|
||||||
|
- nxt200x : Nxtwave NXT2002 & NXT2004
|
||||||
|
- or51211 : or51211 based (pcHDTV HD2000 card)
|
||||||
|
- or51132 : or51132 based (pcHDTV HD3000 card)
|
||||||
|
- bcm3510 : Broadcom BCM3510
|
||||||
|
- lgdt330x : LG Electronics DT3302 & DT3303
|
||||||
|
|
||||||
|
|
||||||
o Cards based on the Phillips saa7146 multimedia PCI bridge chip:
|
o Cards based on the Phillips saa7146 multimedia PCI bridge chip:
|
||||||
@@ -62,6 +68,10 @@ o Cards based on the Conexant Bt8xx PCI bridge:
|
|||||||
- Nebula Electronics DigiTV
|
- Nebula Electronics DigiTV
|
||||||
- TwinHan DST
|
- TwinHan DST
|
||||||
- Avermedia DVB-T
|
- Avermedia DVB-T
|
||||||
|
- ChainTech digitop DST-1000 DVB-S
|
||||||
|
- pcHDTV HD-2000 TV
|
||||||
|
- DViCO FusionHDTV DVB-T Lite
|
||||||
|
- DViCO FusionHDTV5 Lite
|
||||||
|
|
||||||
o Technotrend / Hauppauge DVB USB devices:
|
o Technotrend / Hauppauge DVB USB devices:
|
||||||
- Nova USB
|
- Nova USB
|
||||||
@@ -83,3 +93,30 @@ o DiBcom DVB-T USB based devices:
|
|||||||
- DiBcom USB2.0 DVB-T reference device (non-public)
|
- DiBcom USB2.0 DVB-T reference device (non-public)
|
||||||
|
|
||||||
o Experimental support for the analog module of the Siemens DVB-C PCI card
|
o Experimental support for the analog module of the Siemens DVB-C PCI card
|
||||||
|
|
||||||
|
o Cards based on the Conexant cx2388x PCI bridge:
|
||||||
|
- ADS Tech Instant TV DVB-T PCI
|
||||||
|
- ATI HDTV Wonder
|
||||||
|
- digitalnow DNTV Live! DVB-T
|
||||||
|
- DViCO FusionHDTV DVB-T1
|
||||||
|
- DViCO FusionHDTV DVB-T Plus
|
||||||
|
- DViCO FusionHDTV3 Gold-Q
|
||||||
|
- DViCO FusionHDTV3 Gold-T
|
||||||
|
- DViCO FusionHDTV5 Gold
|
||||||
|
- Hauppauge Nova-T DVB-T
|
||||||
|
- KWorld/VStream XPert DVB-T
|
||||||
|
- pcHDTV HD3000 HDTV
|
||||||
|
- TerraTec Cinergy 1400 DVB-T
|
||||||
|
- WinFast DTV1000-T
|
||||||
|
|
||||||
|
o Cards based on the Phillips saa7134 PCI bridge:
|
||||||
|
- Medion 7134
|
||||||
|
- Pinnacle PCTV 300i DVB-T + PAL
|
||||||
|
- LifeView FlyDVB-T DUO
|
||||||
|
- Typhoon DVB-T Duo Digital/Analog Cardbus
|
||||||
|
- Philips TOUGH DVB-T reference design
|
||||||
|
- Philips EUROPA V3 reference design
|
||||||
|
- Compro Videomate DVB-T300
|
||||||
|
- Compro Videomate DVB-T200
|
||||||
|
- AVerMedia AVerTVHD MCE A180
|
||||||
|
|
||||||
|
|||||||
@@ -75,5 +75,22 @@ Ernst Peinlich <e.peinlich@inode.at>
|
|||||||
Peter Beutner <p.beutner@gmx.net>
|
Peter Beutner <p.beutner@gmx.net>
|
||||||
for the IR code for the ttusb-dec driver
|
for the IR code for the ttusb-dec driver
|
||||||
|
|
||||||
|
Wilson Michaels <wilsonmichaels@earthlink.net>
|
||||||
|
for the lgdt330x frontend driver, and various bugfixes
|
||||||
|
|
||||||
|
Michael Krufky <mkrufky@m1k.net>
|
||||||
|
for maintaining v4l/dvb inter-tree dependencies
|
||||||
|
|
||||||
|
Taylor Jacob <rtjacob@earthlink.net>
|
||||||
|
for the nxt2002 frontend driver
|
||||||
|
|
||||||
|
Jean-Francois Thibert <jeanfrancois@sagetv.com>
|
||||||
|
for the nxt2004 frontend driver
|
||||||
|
|
||||||
|
Kirk Lapray <kirk.lapray@gmail.com>
|
||||||
|
for the or51211 and or51132 frontend drivers, and
|
||||||
|
for merging the nxt2002 and nxt2004 modules into a
|
||||||
|
single nxt200x frontend driver.
|
||||||
|
|
||||||
(If you think you should be in this list, but you are not, drop a
|
(If you think you should be in this list, but you are not, drop a
|
||||||
line to the DVB mailing list)
|
line to the DVB mailing list)
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ use File::Temp qw/ tempdir /;
|
|||||||
use IO::Handle;
|
use IO::Handle;
|
||||||
|
|
||||||
@components = ( "sp8870", "sp887x", "tda10045", "tda10046", "av7110", "dec2000t",
|
@components = ( "sp8870", "sp887x", "tda10045", "tda10046", "av7110", "dec2000t",
|
||||||
"dec2540t", "dec3000s", "vp7041", "dibusb", "nxt2002",
|
"dec2540t", "dec3000s", "vp7041", "dibusb", "nxt2002", "nxt2004",
|
||||||
"or51211", "or51132_qam", "or51132_vsb");
|
"or51211", "or51132_qam", "or51132_vsb");
|
||||||
|
|
||||||
# Check args
|
# Check args
|
||||||
@@ -252,6 +252,23 @@ sub nxt2002 {
|
|||||||
$outfile;
|
$outfile;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sub nxt2004 {
|
||||||
|
my $sourcefile = "AVerTVHD_MCE_A180_Drv_v1.2.2.16.zip";
|
||||||
|
my $url = "http://www.aver.com/support/Drivers/$sourcefile";
|
||||||
|
my $hash = "111cb885b1e009188346d72acfed024c";
|
||||||
|
my $outfile = "dvb-fe-nxt2004.fw";
|
||||||
|
my $tmpdir = tempdir(DIR => "/tmp", CLEANUP => 1);
|
||||||
|
|
||||||
|
checkstandard();
|
||||||
|
|
||||||
|
wgetfile($sourcefile, $url);
|
||||||
|
unzip($sourcefile, $tmpdir);
|
||||||
|
verify("$tmpdir/3xHybrid.sys", $hash);
|
||||||
|
extract("$tmpdir/3xHybrid.sys", 465304, 9584, $outfile);
|
||||||
|
|
||||||
|
$outfile;
|
||||||
|
}
|
||||||
|
|
||||||
sub or51211 {
|
sub or51211 {
|
||||||
my $fwfile = "dvb-fe-or51211.fw";
|
my $fwfile = "dvb-fe-or51211.fw";
|
||||||
my $url = "http://linuxtv.org/downloads/firmware/$fwfile";
|
my $url = "http://linuxtv.org/downloads/firmware/$fwfile";
|
||||||
|
|||||||
@@ -0,0 +1,152 @@
|
|||||||
|
The Framebuffer Console
|
||||||
|
=======================
|
||||||
|
|
||||||
|
The framebuffer console (fbcon), as its name implies, is a text
|
||||||
|
console running on top of the framebuffer device. It has the functionality of
|
||||||
|
any standard text console driver, such as the VGA console, with the added
|
||||||
|
features that can be attributed to the graphical nature of the framebuffer.
|
||||||
|
|
||||||
|
In the x86 architecture, the framebuffer console is optional, and
|
||||||
|
some even treat it as a toy. For other architectures, it is the only available
|
||||||
|
display device, text or graphical.
|
||||||
|
|
||||||
|
What are the features of fbcon? The framebuffer console supports
|
||||||
|
high resolutions, varying font types, display rotation, primitive multihead,
|
||||||
|
etc. Theoretically, multi-colored fonts, blending, aliasing, and any feature
|
||||||
|
made available by the underlying graphics card are also possible.
|
||||||
|
|
||||||
|
A. Configuration
|
||||||
|
|
||||||
|
The framebuffer console can be enabled by using your favorite kernel
|
||||||
|
configuration tool. It is under Device Drivers->Graphics Support->Support for
|
||||||
|
framebuffer devices->Framebuffer Console Support. Select 'y' to compile
|
||||||
|
support statically, or 'm' for module support. The module will be fbcon.
|
||||||
|
|
||||||
|
In order for fbcon to activate, at least one framebuffer driver is
|
||||||
|
required, so choose from any of the numerous drivers available. For x86
|
||||||
|
systems, they almost universally have VGA cards, so vga16fb and vesafb will
|
||||||
|
always be available. However, using a chipset-specific driver will give you
|
||||||
|
more speed and features, such as the ability to change the video mode
|
||||||
|
dynamically.
|
||||||
|
|
||||||
|
To display the penguin logo, choose any logo available in Logo
|
||||||
|
Configuration->Boot up logo.
|
||||||
|
|
||||||
|
Also, you will need to select at least one compiled-in fonts, but if
|
||||||
|
you don't do anything, the kernel configuration tool will select one for you,
|
||||||
|
usually an 8x16 font.
|
||||||
|
|
||||||
|
GOTCHA: A common bug report is enabling the framebuffer without enabling the
|
||||||
|
framebuffer console. Depending on the driver, you may get a blanked or
|
||||||
|
garbled display, but the system still boots to completion. If you are
|
||||||
|
fortunate to have a driver that does not alter the graphics chip, then you
|
||||||
|
will still get a VGA console.
|
||||||
|
|
||||||
|
B. Loading
|
||||||
|
|
||||||
|
Possible scenarios:
|
||||||
|
|
||||||
|
1. Driver and fbcon are compiled statically
|
||||||
|
|
||||||
|
Usually, fbcon will automatically take over your console. The notable
|
||||||
|
exception is vesafb. It needs to be explicitly activated with the
|
||||||
|
vga= boot option parameter.
|
||||||
|
|
||||||
|
2. Driver is compiled statically, fbcon is compiled as a module
|
||||||
|
|
||||||
|
Depending on the driver, you either get a standard console, or a
|
||||||
|
garbled display, as mentioned above. To get a framebuffer console,
|
||||||
|
do a 'modprobe fbcon'.
|
||||||
|
|
||||||
|
3. Driver is compiled as a module, fbcon is compiled statically
|
||||||
|
|
||||||
|
You get your standard console. Once the driver is loaded with
|
||||||
|
'modprobe xxxfb', fbcon automatically takes over the console with
|
||||||
|
the possible exception of using the fbcon=map:n option. See below.
|
||||||
|
|
||||||
|
4. Driver and fbcon are compiled as a module.
|
||||||
|
|
||||||
|
You can load them in any order. Once both are loaded, fbcon will take
|
||||||
|
over the console.
|
||||||
|
|
||||||
|
C. Boot options
|
||||||
|
|
||||||
|
The framebuffer console has several, largely unknown, boot options
|
||||||
|
that can change its behavior.
|
||||||
|
|
||||||
|
1. fbcon=font:<name>
|
||||||
|
|
||||||
|
Select the initial font to use. The value 'name' can be any of the
|
||||||
|
compiled-in fonts: VGA8x16, 7x14, 10x18, VGA8x8, MINI4x6, RomanLarge,
|
||||||
|
SUN8x16, SUN12x22, ProFont6x11, Acorn8x8, PEARL8x8.
|
||||||
|
|
||||||
|
Note, not all drivers can handle font with widths not divisible by 8,
|
||||||
|
such as vga16fb.
|
||||||
|
|
||||||
|
2. fbcon=scrollback:<value>[k]
|
||||||
|
|
||||||
|
The scrollback buffer is memory that is used to preserve display
|
||||||
|
contents that has already scrolled past your view. This is accessed
|
||||||
|
by using the Shift-PageUp key combination. The value 'value' is any
|
||||||
|
integer. It defaults to 32KB. The 'k' suffix is optional, and will
|
||||||
|
multiply the 'value' by 1024.
|
||||||
|
|
||||||
|
3. fbcon=map:<0123>
|
||||||
|
|
||||||
|
This is an interesting option. It tells which driver gets mapped to
|
||||||
|
which console. The value '0123' is a sequence that gets repeated until
|
||||||
|
the total length is 64 which is the number of consoles available. In
|
||||||
|
the above example, it is expanded to 012301230123... and the mapping
|
||||||
|
will be:
|
||||||
|
|
||||||
|
tty | 1 2 3 4 5 6 7 8 9 ...
|
||||||
|
fb | 0 1 2 3 0 1 2 3 0 ...
|
||||||
|
|
||||||
|
('cat /proc/fb' should tell you what the fb numbers are)
|
||||||
|
|
||||||
|
One side effect that may be useful is using a map value that exceeds
|
||||||
|
the number of loaded fb drivers. For example, if only one driver is
|
||||||
|
available, fb0, adding fbcon=map:1 tells fbcon not to take over the
|
||||||
|
console.
|
||||||
|
|
||||||
|
Later on, when you want to map the console the to the framebuffer
|
||||||
|
device, you can use the con2fbmap utility.
|
||||||
|
|
||||||
|
4. fbcon=vc:<n1>-<n2>
|
||||||
|
|
||||||
|
This option tells fbcon to take over only a range of consoles as
|
||||||
|
specified by the values 'n1' and 'n2'. The rest of the consoles
|
||||||
|
outside the given range will still be controlled by the standard
|
||||||
|
console driver.
|
||||||
|
|
||||||
|
NOTE: For x86 machines, the standard console is the VGA console which
|
||||||
|
is typically located on the same video card. Thus, the consoles that
|
||||||
|
are controlled by the VGA console will be garbled.
|
||||||
|
|
||||||
|
4. fbcon=rotate:<n>
|
||||||
|
|
||||||
|
This option changes the orientation angle of the console display. The
|
||||||
|
value 'n' accepts the following:
|
||||||
|
|
||||||
|
0 - normal orientation (0 degree)
|
||||||
|
1 - clockwise orientation (90 degrees)
|
||||||
|
2 - upside down orientation (180 degrees)
|
||||||
|
3 - counterclockwise orientation (270 degrees)
|
||||||
|
|
||||||
|
The angle can be changed anytime afterwards by 'echoing' the same
|
||||||
|
numbers to any one of the 2 attributes found in
|
||||||
|
/sys/class/graphics/fb{x}
|
||||||
|
|
||||||
|
con_rotate - rotate the display of the active console
|
||||||
|
con_rotate_all - rotate the display of all consoles
|
||||||
|
|
||||||
|
Console rotation will only become available if Console Rotation
|
||||||
|
Support is compiled in your kernel.
|
||||||
|
|
||||||
|
NOTE: This is purely console rotation. Any other applications that
|
||||||
|
use the framebuffer will remain at their 'normal'orientation.
|
||||||
|
Actually, the underlying fb driver is totally ignorant of console
|
||||||
|
rotation.
|
||||||
|
|
||||||
|
---
|
||||||
|
Antonino Daplas <adaplas@pol.net>
|
||||||
@@ -146,10 +146,10 @@ pmipal Use the protected mode interface for palette changes.
|
|||||||
|
|
||||||
mtrr:n setup memory type range registers for the vesafb framebuffer
|
mtrr:n setup memory type range registers for the vesafb framebuffer
|
||||||
where n:
|
where n:
|
||||||
0 - disabled (equivalent to nomtrr)
|
0 - disabled (equivalent to nomtrr) (default)
|
||||||
1 - uncachable
|
1 - uncachable
|
||||||
2 - write-back
|
2 - write-back
|
||||||
3 - write-combining (default)
|
3 - write-combining
|
||||||
4 - write-through
|
4 - write-through
|
||||||
|
|
||||||
If you see the following in dmesg, choose the type that matches the
|
If you see the following in dmesg, choose the type that matches the
|
||||||
|
|||||||
@@ -25,6 +25,13 @@ Who: Adrian Bunk <bunk@stusta.de>
|
|||||||
|
|
||||||
---------------------------
|
---------------------------
|
||||||
|
|
||||||
|
What: drivers depending on OBSOLETE_OSS_DRIVER
|
||||||
|
When: January 2006
|
||||||
|
Why: OSS drivers with ALSA replacements
|
||||||
|
Who: Adrian Bunk <bunk@stusta.de>
|
||||||
|
|
||||||
|
---------------------------
|
||||||
|
|
||||||
What: RCU API moves to EXPORT_SYMBOL_GPL
|
What: RCU API moves to EXPORT_SYMBOL_GPL
|
||||||
When: April 2006
|
When: April 2006
|
||||||
Files: include/linux/rcupdate.h, kernel/rcupdate.c
|
Files: include/linux/rcupdate.h, kernel/rcupdate.c
|
||||||
@@ -60,6 +67,21 @@ Who: Jody McIntyre <scjody@steamballoon.com>
|
|||||||
|
|
||||||
---------------------------
|
---------------------------
|
||||||
|
|
||||||
|
What: Video4Linux API 1 ioctls and video_decoder.h from Video devices.
|
||||||
|
When: July 2006
|
||||||
|
Why: V4L1 AP1 was replaced by V4L2 API. during migration from 2.4 to 2.6
|
||||||
|
series. The old API have lots of drawbacks and don't provide enough
|
||||||
|
means to work with all video and audio standards. The newer API is
|
||||||
|
already available on the main drivers and should be used instead.
|
||||||
|
Newer drivers should use v4l_compat_translate_ioctl function to handle
|
||||||
|
old calls, replacing to newer ones.
|
||||||
|
Decoder iocts are using internally to allow video drivers to
|
||||||
|
communicate with video decoders. This should also be improved to allow
|
||||||
|
V4L2 calls being translated into compatible internal ioctls.
|
||||||
|
Who: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
|
||||||
|
|
||||||
|
---------------------------
|
||||||
|
|
||||||
What: i2c sysfs name change: in1_ref, vid deprecated in favour of cpu0_vid
|
What: i2c sysfs name change: in1_ref, vid deprecated in favour of cpu0_vid
|
||||||
When: November 2005
|
When: November 2005
|
||||||
Files: drivers/i2c/chips/adm1025.c, drivers/i2c/chips/adm1026.c
|
Files: drivers/i2c/chips/adm1025.c, drivers/i2c/chips/adm1026.c
|
||||||
@@ -69,6 +91,22 @@ Who: Grant Coady <gcoady@gmail.com>
|
|||||||
|
|
||||||
---------------------------
|
---------------------------
|
||||||
|
|
||||||
|
What: remove EXPORT_SYMBOL(panic_timeout)
|
||||||
|
When: April 2006
|
||||||
|
Files: kernel/panic.c
|
||||||
|
Why: No modular usage in the kernel.
|
||||||
|
Who: Adrian Bunk <bunk@stusta.de>
|
||||||
|
|
||||||
|
---------------------------
|
||||||
|
|
||||||
|
What: remove EXPORT_SYMBOL(insert_resource)
|
||||||
|
When: April 2006
|
||||||
|
Files: kernel/resource.c
|
||||||
|
Why: No modular usage in the kernel.
|
||||||
|
Who: Adrian Bunk <bunk@stusta.de>
|
||||||
|
|
||||||
|
---------------------------
|
||||||
|
|
||||||
What: PCMCIA control ioctl (needed for pcmcia-cs [cardmgr, cardctl])
|
What: PCMCIA control ioctl (needed for pcmcia-cs [cardmgr, cardctl])
|
||||||
When: November 2005
|
When: November 2005
|
||||||
Files: drivers/pcmcia/: pcmcia_ioctl.c
|
Files: drivers/pcmcia/: pcmcia_ioctl.c
|
||||||
@@ -95,3 +133,10 @@ Why: This interface has been obsoleted by the new layer3-independent
|
|||||||
to link against API-compatible library on top of libnfnetlink_queue
|
to link against API-compatible library on top of libnfnetlink_queue
|
||||||
instead of the current 'libipq'.
|
instead of the current 'libipq'.
|
||||||
Who: Harald Welte <laforge@netfilter.org>
|
Who: Harald Welte <laforge@netfilter.org>
|
||||||
|
|
||||||
|
---------------------------
|
||||||
|
|
||||||
|
What: EXPORT_SYMBOL(lookup_hash)
|
||||||
|
When: January 2006
|
||||||
|
Why: Too low-level interface. Use lookup_one_len or lookup_create instead.
|
||||||
|
Who: Christoph Hellwig <hch@lst.de>
|
||||||
|
|||||||
@@ -0,0 +1,173 @@
|
|||||||
|
RCU-based dcache locking model
|
||||||
|
==============================
|
||||||
|
|
||||||
|
On many workloads, the most common operation on dcache is to look up a
|
||||||
|
dentry, given a parent dentry and the name of the child. Typically,
|
||||||
|
for every open(), stat() etc., the dentry corresponding to the
|
||||||
|
pathname will be looked up by walking the tree starting with the first
|
||||||
|
component of the pathname and using that dentry along with the next
|
||||||
|
component to look up the next level and so on. Since it is a frequent
|
||||||
|
operation for workloads like multiuser environments and web servers,
|
||||||
|
it is important to optimize this path.
|
||||||
|
|
||||||
|
Prior to 2.5.10, dcache_lock was acquired in d_lookup and thus in
|
||||||
|
every component during path look-up. Since 2.5.10 onwards, fast-walk
|
||||||
|
algorithm changed this by holding the dcache_lock at the beginning and
|
||||||
|
walking as many cached path component dentries as possible. This
|
||||||
|
significantly decreases the number of acquisition of
|
||||||
|
dcache_lock. However it also increases the lock hold time
|
||||||
|
significantly and affects performance in large SMP machines. Since
|
||||||
|
2.5.62 kernel, dcache has been using a new locking model that uses RCU
|
||||||
|
to make dcache look-up lock-free.
|
||||||
|
|
||||||
|
The current dcache locking model is not very different from the
|
||||||
|
existing dcache locking model. Prior to 2.5.62 kernel, dcache_lock
|
||||||
|
protected the hash chain, d_child, d_alias, d_lru lists as well as
|
||||||
|
d_inode and several other things like mount look-up. RCU-based changes
|
||||||
|
affect only the way the hash chain is protected. For everything else
|
||||||
|
the dcache_lock must be taken for both traversing as well as
|
||||||
|
updating. The hash chain updates too take the dcache_lock. The
|
||||||
|
significant change is the way d_lookup traverses the hash chain, it
|
||||||
|
doesn't acquire the dcache_lock for this and rely on RCU to ensure
|
||||||
|
that the dentry has not been *freed*.
|
||||||
|
|
||||||
|
|
||||||
|
Dcache locking details
|
||||||
|
======================
|
||||||
|
|
||||||
|
For many multi-user workloads, open() and stat() on files are very
|
||||||
|
frequently occurring operations. Both involve walking of path names to
|
||||||
|
find the dentry corresponding to the concerned file. In 2.4 kernel,
|
||||||
|
dcache_lock was held during look-up of each path component. Contention
|
||||||
|
and cache-line bouncing of this global lock caused significant
|
||||||
|
scalability problems. With the introduction of RCU in Linux kernel,
|
||||||
|
this was worked around by making the look-up of path components during
|
||||||
|
path walking lock-free.
|
||||||
|
|
||||||
|
|
||||||
|
Safe lock-free look-up of dcache hash table
|
||||||
|
===========================================
|
||||||
|
|
||||||
|
Dcache is a complex data structure with the hash table entries also
|
||||||
|
linked together in other lists. In 2.4 kernel, dcache_lock protected
|
||||||
|
all the lists. We applied RCU only on hash chain walking. The rest of
|
||||||
|
the lists are still protected by dcache_lock. Some of the important
|
||||||
|
changes are :
|
||||||
|
|
||||||
|
1. The deletion from hash chain is done using hlist_del_rcu() macro
|
||||||
|
which doesn't initialize next pointer of the deleted dentry and
|
||||||
|
this allows us to walk safely lock-free while a deletion is
|
||||||
|
happening.
|
||||||
|
|
||||||
|
2. Insertion of a dentry into the hash table is done using
|
||||||
|
hlist_add_head_rcu() which take care of ordering the writes - the
|
||||||
|
writes to the dentry must be visible before the dentry is
|
||||||
|
inserted. This works in conjunction with hlist_for_each_rcu() while
|
||||||
|
walking the hash chain. The only requirement is that all
|
||||||
|
initialization to the dentry must be done before
|
||||||
|
hlist_add_head_rcu() since we don't have dcache_lock protection
|
||||||
|
while traversing the hash chain. This isn't different from the
|
||||||
|
existing code.
|
||||||
|
|
||||||
|
3. The dentry looked up without holding dcache_lock by cannot be
|
||||||
|
returned for walking if it is unhashed. It then may have a NULL
|
||||||
|
d_inode or other bogosity since RCU doesn't protect the other
|
||||||
|
fields in the dentry. We therefore use a flag DCACHE_UNHASHED to
|
||||||
|
indicate unhashed dentries and use this in conjunction with a
|
||||||
|
per-dentry lock (d_lock). Once looked up without the dcache_lock,
|
||||||
|
we acquire the per-dentry lock (d_lock) and check if the dentry is
|
||||||
|
unhashed. If so, the look-up is failed. If not, the reference count
|
||||||
|
of the dentry is increased and the dentry is returned.
|
||||||
|
|
||||||
|
4. Once a dentry is looked up, it must be ensured during the path walk
|
||||||
|
for that component it doesn't go away. In pre-2.5.10 code, this was
|
||||||
|
done holding a reference to the dentry. dcache_rcu does the same.
|
||||||
|
In some sense, dcache_rcu path walking looks like the pre-2.5.10
|
||||||
|
version.
|
||||||
|
|
||||||
|
5. All dentry hash chain updates must take the dcache_lock as well as
|
||||||
|
the per-dentry lock in that order. dput() does this to ensure that
|
||||||
|
a dentry that has just been looked up in another CPU doesn't get
|
||||||
|
deleted before dget() can be done on it.
|
||||||
|
|
||||||
|
6. There are several ways to do reference counting of RCU protected
|
||||||
|
objects. One such example is in ipv4 route cache where deferred
|
||||||
|
freeing (using call_rcu()) is done as soon as the reference count
|
||||||
|
goes to zero. This cannot be done in the case of dentries because
|
||||||
|
tearing down of dentries require blocking (dentry_iput()) which
|
||||||
|
isn't supported from RCU callbacks. Instead, tearing down of
|
||||||
|
dentries happen synchronously in dput(), but actual freeing happens
|
||||||
|
later when RCU grace period is over. This allows safe lock-free
|
||||||
|
walking of the hash chains, but a matched dentry may have been
|
||||||
|
partially torn down. The checking of DCACHE_UNHASHED flag with
|
||||||
|
d_lock held detects such dentries and prevents them from being
|
||||||
|
returned from look-up.
|
||||||
|
|
||||||
|
|
||||||
|
Maintaining POSIX rename semantics
|
||||||
|
==================================
|
||||||
|
|
||||||
|
Since look-up of dentries is lock-free, it can race against a
|
||||||
|
concurrent rename operation. For example, during rename of file A to
|
||||||
|
B, look-up of either A or B must succeed. So, if look-up of B happens
|
||||||
|
after A has been removed from the hash chain but not added to the new
|
||||||
|
hash chain, it may fail. Also, a comparison while the name is being
|
||||||
|
written concurrently by a rename may result in false positive matches
|
||||||
|
violating rename semantics. Issues related to race with rename are
|
||||||
|
handled as described below :
|
||||||
|
|
||||||
|
1. Look-up can be done in two ways - d_lookup() which is safe from
|
||||||
|
simultaneous renames and __d_lookup() which is not. If
|
||||||
|
__d_lookup() fails, it must be followed up by a d_lookup() to
|
||||||
|
correctly determine whether a dentry is in the hash table or
|
||||||
|
not. d_lookup() protects look-ups using a sequence lock
|
||||||
|
(rename_lock).
|
||||||
|
|
||||||
|
2. The name associated with a dentry (d_name) may be changed if a
|
||||||
|
rename is allowed to happen simultaneously. To avoid memcmp() in
|
||||||
|
__d_lookup() go out of bounds due to a rename and false positive
|
||||||
|
comparison, the name comparison is done while holding the
|
||||||
|
per-dentry lock. This prevents concurrent renames during this
|
||||||
|
operation.
|
||||||
|
|
||||||
|
3. Hash table walking during look-up may move to a different bucket as
|
||||||
|
the current dentry is moved to a different bucket due to rename.
|
||||||
|
But we use hlists in dcache hash table and they are
|
||||||
|
null-terminated. So, even if a dentry moves to a different bucket,
|
||||||
|
hash chain walk will terminate. [with a list_head list, it may not
|
||||||
|
since termination is when the list_head in the original bucket is
|
||||||
|
reached]. Since we redo the d_parent check and compare name while
|
||||||
|
holding d_lock, lock-free look-up will not race against d_move().
|
||||||
|
|
||||||
|
4. There can be a theoretical race when a dentry keeps coming back to
|
||||||
|
original bucket due to double moves. Due to this look-up may
|
||||||
|
consider that it has never moved and can end up in a infinite loop.
|
||||||
|
But this is not any worse that theoretical livelocks we already
|
||||||
|
have in the kernel.
|
||||||
|
|
||||||
|
|
||||||
|
Important guidelines for filesystem developers related to dcache_rcu
|
||||||
|
====================================================================
|
||||||
|
|
||||||
|
1. Existing dcache interfaces (pre-2.5.62) exported to filesystem
|
||||||
|
don't change. Only dcache internal implementation changes. However
|
||||||
|
filesystems *must not* delete from the dentry hash chains directly
|
||||||
|
using the list macros like allowed earlier. They must use dcache
|
||||||
|
APIs like d_drop() or __d_drop() depending on the situation.
|
||||||
|
|
||||||
|
2. d_flags is now protected by a per-dentry lock (d_lock). All access
|
||||||
|
to d_flags must be protected by it.
|
||||||
|
|
||||||
|
3. For a hashed dentry, checking of d_count needs to be protected by
|
||||||
|
d_lock.
|
||||||
|
|
||||||
|
|
||||||
|
Papers and other documentation on dcache locking
|
||||||
|
================================================
|
||||||
|
|
||||||
|
1. Scaling dcache with RCU (http://linuxjournal.com/article.php?sid=7124).
|
||||||
|
|
||||||
|
2. http://lse.sourceforge.net/locking/dcache/dcache.html
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -1812,11 +1812,6 @@ it may overflow the messages buffer, but try to get as much of it as
|
|||||||
you can
|
you can
|
||||||
|
|
||||||
|
|
||||||
if you get an Oops, run ksymoops to decode it so that the
|
|
||||||
names of the offending functions are provided. A non-decoded Oops is
|
|
||||||
pretty useless
|
|
||||||
|
|
||||||
|
|
||||||
send a copy of your devfsd configuration file(s)
|
send a copy of your devfsd configuration file(s)
|
||||||
|
|
||||||
send the bug report to me first.
|
send the bug report to me first.
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user