direct-io.hg

view xen/include/asm-powerpc/grant_table.h @ 11102:920784588848

[POWERPC] need a real definition for gnttab_log_dirty()

Signed-off-by: Jimi Xenidis <jimix@watson.ibm.com>
Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>
author Jimi Xenidis <jimix@watson.ibm.com>
date Sun Aug 13 14:43:50 2006 -0400 (2006-08-13)
parents 050de6b53961
children 79bb96e0ba73
line source
1 /*
2 * This program is free software; you can redistribute it and/or modify
3 * it under the terms of the GNU General Public License as published by
4 * the Free Software Foundation; either version 2 of the License, or
5 * (at your option) any later version.
6 *
7 * This program is distributed in the hope that it will be useful,
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 * GNU General Public License for more details.
11 *
12 * You should have received a copy of the GNU General Public License
13 * along with this program; if not, write to the Free Software
14 * Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
15 *
16 * Copyright (C) IBM Corp. 2005
17 *
18 * Authors: Jimi Xenidis <jimix@watson.ibm.com>
19 */
21 #ifndef __ASM_PPC_GRANT_TABLE_H__
22 #define __ASM_PPC_GRANT_TABLE_H__
24 #include <asm/mm.h>
26 #define ORDER_GRANT_FRAMES 2
28 /*
29 * Caller must own caller's BIGLOCK, is responsible for flushing the TLB, and
30 * must hold a reference to the page.
31 */
32 int create_grant_host_mapping(
33 unsigned long addr, unsigned long frame, unsigned int flags);
34 int destroy_grant_host_mapping(
35 unsigned long addr, unsigned long frame, unsigned int flags);
37 #define gnttab_create_shared_page(d, t, i) \
38 do { \
39 share_xen_page_with_guest( \
40 virt_to_page((char *)(t)->shared + ((i) * PAGE_SIZE)), \
41 (d), XENSHARE_writable); \
42 } while ( 0 )
44 #define gnttab_shared_mfn(d, t, i) \
45 ((virt_to_maddr((t)->shared) >> PAGE_SHIFT) + (i))
47 #define gnttab_shared_gmfn(d, t, i) \
48 (mfn_to_gmfn(d, gnttab_shared_mfn(d, t, i)))
50 #define gnttab_log_dirty(d, f) mark_dirty((d), (f))
52 static inline void gnttab_clear_flag(unsigned long nr, uint16_t *addr)
53 {
54 unsigned long *laddr;
55 unsigned long lnr;
57 BUG_ON((ulong)addr % sizeof(ulong));
59 lnr = (BITS_PER_LONG - (sizeof(*addr) * 8)) + nr;
60 laddr = (unsigned long *)addr;
61 clear_bit(lnr, laddr);
62 }
64 #endif /* __ASM_PPC_GRANT_TABLE_H__ */