]> Pileus Git - ~andy/linux/blob - arch/powerpc/kvm/book3s_hv_cma.h
Merge tag 'jfs-3.14' of git://github.com/kleikamp/linux-shaggy
[~andy/linux] / arch / powerpc / kvm / book3s_hv_cma.h
1 /*
2  * Contiguous Memory Allocator for ppc KVM hash pagetable  based on CMA
3  * for DMA mapping framework
4  *
5  * Copyright IBM Corporation, 2013
6  * Author Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
7  *
8  * This program is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU General Public License as
10  * published by the Free Software Foundation; either version 2 of the
11  * License or (at your optional) any later version of the license.
12  *
13  */
14
15 #ifndef __POWERPC_KVM_CMA_ALLOC_H__
16 #define __POWERPC_KVM_CMA_ALLOC_H__
17 /*
18  * Both RMA and Hash page allocation will be multiple of 256K.
19  */
20 #define KVM_CMA_CHUNK_ORDER     18
21
22 extern struct page *kvm_alloc_cma(unsigned long nr_pages,
23                                   unsigned long align_pages);
24 extern bool kvm_release_cma(struct page *pages, unsigned long nr_pages);
25 extern long kvm_cma_declare_contiguous(phys_addr_t size,
26                                        phys_addr_t alignment) __init;
27 #endif