Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 201093
b: refs/heads/master
c: 0f4da2d
h: refs/heads/master
i:
  201091: 26debc5
v: v3
  • Loading branch information
John W. Linville committed Jul 14, 2010
1 parent 10733f3 commit de21d60
Show file tree
Hide file tree
Showing 4,082 changed files with 122,749 additions and 291,299 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d9a9dc66eb8a8fd85c8546247e7e1d6023d0eb0f
refs/heads/master: 0f4da2d77e1bf424ac36424081afc22cbfc3ff2b
40 changes: 0 additions & 40 deletions trunk/Documentation/ABI/testing/sysfs-bus-pci
Original file line number Diff line number Diff line change
Expand Up @@ -133,46 +133,6 @@ Description:
The symbolic link points to the PCI device sysfs entry of the
Physical Function this device associates with.


What: /sys/bus/pci/slots/...
Date: April 2005 (possibly older)
KernelVersion: 2.6.12 (possibly older)
Contact: linux-pci@vger.kernel.org
Description:
When the appropriate driver is loaded, it will create a
directory per claimed physical PCI slot in
/sys/bus/pci/slots/. The names of these directories are
specific to the driver, which in turn, are specific to the
platform, but in general, should match the label on the
machine's physical chassis.

The drivers that can create slot directories include the
PCI hotplug drivers, and as of 2.6.27, the pci_slot driver.

The slot directories contain, at a minimum, a file named
'address' which contains the PCI bus:device:function tuple.
Other files may appear as well, but are specific to the
driver.

What: /sys/bus/pci/slots/.../function[0-7]
Date: March 2010
KernelVersion: 2.6.35
Contact: linux-pci@vger.kernel.org
Description:
If PCI slot directories (as described above) are created,
and the physical slot is actually populated with a device,
symbolic links in the slot directory pointing to the
device's PCI functions are created as well.

What: /sys/bus/pci/devices/.../slot
Date: March 2010
KernelVersion: 2.6.35
Contact: linux-pci@vger.kernel.org
Description:
If PCI slot directories (as described above) are created,
a symbolic link pointing to the slot directory will be
created as well.

What: /sys/bus/pci/slots/.../module
Date: June 2009
Contact: linux-pci@vger.kernel.org
Expand Down
20 changes: 0 additions & 20 deletions trunk/Documentation/ABI/testing/sysfs-class-power

This file was deleted.

7 changes: 0 additions & 7 deletions trunk/Documentation/ABI/testing/sysfs-devices-node

This file was deleted.

43 changes: 0 additions & 43 deletions trunk/Documentation/ABI/testing/sysfs-driver-hid-picolcd

This file was deleted.

29 changes: 0 additions & 29 deletions trunk/Documentation/ABI/testing/sysfs-driver-hid-prodikeys

This file was deleted.

111 changes: 0 additions & 111 deletions trunk/Documentation/ABI/testing/sysfs-driver-hid-roccat-kone

This file was deleted.

15 changes: 0 additions & 15 deletions trunk/Documentation/ABI/testing/sysfs-firmware-sfi

This file was deleted.

10 changes: 0 additions & 10 deletions trunk/Documentation/ABI/testing/sysfs-wacom

This file was deleted.

85 changes: 36 additions & 49 deletions trunk/Documentation/DMA-API-HOWTO.txt
Original file line number Diff line number Diff line change
Expand Up @@ -639,36 +639,6 @@ is planned to completely remove virt_to_bus() and bus_to_virt() as
they are entirely deprecated. Some ports already do not provide these
as it is impossible to correctly support them.

Handling Errors

DMA address space is limited on some architectures and an allocation
failure can be determined by:

- checking if dma_alloc_coherent returns NULL or dma_map_sg returns 0

- checking the returned dma_addr_t of dma_map_single and dma_map_page
by using dma_mapping_error():

dma_addr_t dma_handle;

dma_handle = dma_map_single(dev, addr, size, direction);
if (dma_mapping_error(dev, dma_handle)) {
/*
* reduce current DMA mapping usage,
* delay and try again later or
* reset driver.
*/
}

Networking drivers must call dev_kfree_skb to free the socket buffer
and return NETDEV_TX_OK if the DMA mapping fails on the transmit hook
(ndo_start_xmit). This means that the socket buffer is just dropped in
the failure case.

SCSI drivers must return SCSI_MLQUEUE_HOST_BUSY if the DMA mapping
fails in the queuecommand hook. This means that the SCSI subsystem
passes the command to the driver again later.

Optimizing Unmap State Space Consumption

On many platforms, dma_unmap_{single,page}() is simply a nop.
Expand Down Expand Up @@ -733,25 +703,42 @@ to "Closing".

1) Struct scatterlist requirements.

Don't invent the architecture specific struct scatterlist; just use
<asm-generic/scatterlist.h>. You need to enable
CONFIG_NEED_SG_DMA_LENGTH if the architecture supports IOMMUs
(including software IOMMU).

2) ARCH_KMALLOC_MINALIGN

Architectures must ensure that kmalloc'ed buffer is
DMA-safe. Drivers and subsystems depend on it. If an architecture
isn't fully DMA-coherent (i.e. hardware doesn't ensure that data in
the CPU cache is identical to data in main memory),
ARCH_KMALLOC_MINALIGN must be set so that the memory allocator
makes sure that kmalloc'ed buffer doesn't share a cache line with
the others. See arch/arm/include/asm/cache.h as an example.

Note that ARCH_KMALLOC_MINALIGN is about DMA memory alignment
constraints. You don't need to worry about the architecture data
alignment constraints (e.g. the alignment constraints about 64-bit
objects).
Struct scatterlist must contain, at a minimum, the following
members:

struct page *page;
unsigned int offset;
unsigned int length;

The base address is specified by a "page+offset" pair.

Previous versions of struct scatterlist contained a "void *address"
field that was sometimes used instead of page+offset. As of Linux
2.5., page+offset is always used, and the "address" field has been
deleted.

2) More to come...

Handling Errors

DMA address space is limited on some architectures and an allocation
failure can be determined by:

- checking if dma_alloc_coherent returns NULL or dma_map_sg returns 0

- checking the returned dma_addr_t of dma_map_single and dma_map_page
by using dma_mapping_error():

dma_addr_t dma_handle;

dma_handle = dma_map_single(dev, addr, size, direction);
if (dma_mapping_error(dev, dma_handle)) {
/*
* reduce current DMA mapping usage,
* delay and try again later or
* reset driver.
*/
}

Closing

Expand Down
Loading

0 comments on commit de21d60

Please sign in to comment.