sched: make early bootup sched_clock() use safer
[wrt350n-kernel.git] / include / asm-mn10300 / scatterlist.h
blobe29d91dbcf2b99fb82fc6b3ebdf8cbd52324f78c
1 /* MN10300 Scatterlist definitions
3 * Copyright (C) 2007 Matsushita Electric Industrial Co., Ltd.
4 * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public Licence
8 * as published by the Free Software Foundation; either version
9 * 2 of the Licence, or (at your option) any later version.
11 #ifndef _ASM_SCATTERLIST_H
12 #define _ASM_SCATTERLIST_H
14 #include <asm/types.h>
17 * Drivers must set either ->address or (preferred) page and ->offset
18 * to indicate where data must be transferred to/from.
20 * Using page is recommended since it handles highmem data as well as
21 * low mem. ->address is restricted to data which has a virtual mapping, and
22 * it will go away in the future. Updating to page can be automated very
23 * easily -- something like
25 * sg->address = some_ptr;
27 * can be rewritten as
29 * sg_set_page(virt_to_page(some_ptr));
30 * sg->offset = (unsigned long) some_ptr & ~PAGE_MASK;
32 * and that's it. There's no excuse for not highmem enabling YOUR driver. /jens
34 struct scatterlist {
35 #ifdef CONFIG_DEBUG_SG
36 unsigned long sg_magic;
37 #endif
38 unsigned long page_link;
39 unsigned int offset; /* for highmem, page offset */
40 dma_addr_t dma_address;
41 unsigned int length;
44 #define ISA_DMA_THRESHOLD (0x00ffffff)
46 #endif /* _ASM_SCATTERLIST_H */