Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b4ca7615 authored by Jens Axboe's avatar Jens Axboe
Browse files

Merge branch 'master' into for-linus



Conflicts:
	fs/pipe.c

Signed-off-by: default avatarJens Axboe <jaxboe@fusionio.com>
parents 28f4197e 67a3e12b
Loading
Loading
Loading
Loading
+20 −0
Original line number Diff line number Diff line
What:		/sys/class/power/ds2760-battery.*/charge_now
Date:		May 2010
KernelVersion:	2.6.35
Contact:	Daniel Mack <daniel@caiaq.de>
Description:
		This file is writeable and can be used to set the current
		coloumb counter value inside the battery monitor chip. This
		is needed for unavoidable corrections of aging batteries.
		A userspace daemon can monitor the battery charging logic
		and once the counter drops out of considerable bounds, take
		appropriate action.

What:		/sys/class/power/ds2760-battery.*/charge_full
Date:		May 2010
KernelVersion:	2.6.35
Contact:	Daniel Mack <daniel@caiaq.de>
Description:
		This file is writeable and can be used to set the assumed
		battery 'full level'. As batteries age, this value has to be
		amended over time.
+7 −0
Original line number Diff line number Diff line
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
+15 −0
Original line number Diff line number Diff line
What:		/sys/firmware/sfi/tables/
Date:		May 2010
Contact:	Len Brown <lenb@kernel.org>
Description:
		SFI defines a number of small static memory tables
		so the kernel can get platform information from firmware.

		The tables are defined in the latest SFI specification:
		http://simplefirmware.org/documentation

		While the tables are used by the kernel, user-space
		can observe them this way:

		# cd /sys/firmware/sfi/tables
		# cat $TABLENAME > $TABLENAME.bin
+49 −36
Original line number Diff line number Diff line
@@ -639,6 +639,36 @@ 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.
@@ -703,42 +733,25 @@ to "Closing".

1) Struct scatterlist requirements.

   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.
		 */
	}
   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).

			   Closing

+1 −1
Original line number Diff line number Diff line
@@ -269,7 +269,7 @@ static void board_hwcontrol(struct mtd_info *mtd, int cmd)
			information about the device.
		</para>
		<programlisting>
int __init board_init (void)
static int __init board_init (void)
{
	struct nand_chip *this;
	int err = 0;
Loading