18dabf473e
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>
35 lines
930 B
C
35 lines
930 B
C
#ifndef _ASM_IA64_SCATTERLIST_H
|
|
#define _ASM_IA64_SCATTERLIST_H
|
|
|
|
/*
|
|
* Modified 1998-1999, 2001-2002, 2004
|
|
* David Mosberger-Tang <davidm@hpl.hp.com>, Hewlett-Packard Co
|
|
*/
|
|
|
|
#include <asm/types.h>
|
|
|
|
struct scatterlist {
|
|
unsigned long page_link;
|
|
unsigned int offset;
|
|
unsigned int length; /* buffer length */
|
|
|
|
dma_addr_t dma_address;
|
|
unsigned int dma_length;
|
|
};
|
|
|
|
/*
|
|
* It used to be that ISA_DMA_THRESHOLD had something to do with the
|
|
* DMA-limits of ISA-devices. Nowadays, its only remaining use (apart
|
|
* from the aha1542.c driver, which isn't 64-bit clean anyhow) is to
|
|
* tell the block-layer (via BLK_BOUNCE_ISA) what the max. physical
|
|
* address of a page is that is allocated with GFP_DMA. On IA-64,
|
|
* that's 4GB - 1.
|
|
*/
|
|
#define ISA_DMA_THRESHOLD 0xffffffff
|
|
|
|
#define sg_dma_len(sg) ((sg)->dma_length)
|
|
#define sg_dma_address(sg) ((sg)->dma_address)
|
|
|
|
#define ARCH_HAS_SG_CHAIN
|
|
|
|
#endif /* _ASM_IA64_SCATTERLIST_H */
|