summaryrefslogtreecommitdiffstats
path: root/include/linux/scatterlist.h
Commit message (Collapse)AuthorAgeFilesLines
* fix sg_phys to use dma_addr_tHugh Dickins2007-10-251-1/+2
| | | | | | | | | | | | | x86_32 CONFIG_HIGHMEM64G with 5GB RAM hung when booting, after issuing some "request_module: runaway loop modprobe binfmt-0000" messages in trying to exec /sbin/init. The binprm buf doesn't see the right ".ELF" header because sg_phys() is providing the wrong physical addresses for high pages: a 32-bit unsigned long is too small in this case, we need to use dma_addr_t. Signed-off-by: Hugh Dickins <hugh@veritas.com> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
* SG: Change sg_set_page() to take length and offset argumentJens Axboe2007-10-241-11/+29
| | | | | | | | | | Most drivers need to set length and offset as well, so may as well fold those three lines into one. Add sg_assign_page() for those two locations that only needed to set the page, where the offset/length is set outside of the function context. Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
* [SG] Add debug check for page alignmentJens Axboe2007-10-231-0/+5
| | | | | | Suggested by Boaz Harrosh <bharrosh@panasas.com> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
* Add CONFIG_DEBUG_SG sg validationJens Axboe2007-10-221-0/+22
| | | | | | | Add a Kconfig entry which will toggle some sanity checks on the sg entry and tables. Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
* Change table chaining layoutJens Axboe2007-10-221-24/+54
| | | | | | | | | | | | | | | | | Change the page member of the scatterlist structure to be an unsigned long, and encode more stuff in the lower bits: - Bits 0 and 1 zero: this is a normal sg entry. Next sg entry is located at sg + 1. - Bit 0 set: this is a chain entry, the next real entry is at ->page_link with the two low bits masked off. - Bit 1 set: this is the final entry in the sg entry. sg_next() will return NULL when passed such an entry. It's thus important that sg table users use the proper accessors to get and set the page member. Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
* [SG] Add helpers for manipulating SG entriesJens Axboe2007-10-221-8/+104
| | | | | | We can then transition drivers without changing the generated code. Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
* Add chained sg support to linux/scatterlist.hJens Axboe2007-10-161-2/+77
| | | | | | | | | | | | The core of the patch - allow the last sg element in a scatterlist table to point to the start of a new table. We overload the LSB of the page pointer to indicate whether this is a valid sg entry, or merely a link to the next list. Includes a fix from Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> correcting the ifdef ARCH_HAS_SG_CHAIN guarding sg_last(). Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
* Add sg helpers for iterating over a scatterlist tableJens Axboe2007-10-161-0/+9
| | | | | | | First step to being able to change the scatterlist setup without having to modify drivers (a lot :-) Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
* [PATCH] scatterlist: Add const to sg_set_buf/sg_init_one pointer argumentHerbert Xu2006-09-211-2/+2
| | | | | | | This patch adds a const modifier to the buf argument of sg_set_buf and sg_init_one. This lets people call it with pointers that are const. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
* [PATCH] Introduce sg_set_bufHerbert Xu2005-10-301-4/+13
| | | | | | | | | | | | sg_init_one is a nice tool for the block layer. However, users of struct scatterlist in other subsystems don't usually need the DMA attributes. For them it's a waste of time and space to initialise the whole struct scatterlist structure. Therefore this patch adds a new function sg_set_buf to initialise a scatterlist without zeroing the DMA attributes. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
* Linux-2.6.12-rc2Linus Torvalds2005-04-171-0/+14
Initial git repository build. I'm not bothering with the full history, even though we have it. We can create a separate "historical" git archive of that later if we want to, and in the meantime it's about 3.2GB when imported into git - space that would just make the early git days unnecessarily complicated, when we don't have a lot of good infrastructure for it. Let it rip!