drm/ttm: remove nonsense AGP handling
[linux-2.6-microblaze.git] / include / drm / ttm / ttm_set_memory.h
1 /**************************************************************************
2  *
3  * Copyright (c) 2018 Advanced Micro Devices, Inc.
4  * All Rights Reserved.
5  *
6  * Permission is hereby granted, free of charge, to any person obtaining a
7  * copy of this software and associated documentation files (the
8  * "Software"), to deal in the Software without restriction, including
9  * without limitation the rights to use, copy, modify, merge, publish,
10  * distribute, sub license, and/or sell copies of the Software, and to
11  * permit persons to whom the Software is furnished to do so, subject to
12  * the following conditions:
13  *
14  * The above copyright notice and this permission notice (including the
15  * next paragraph) shall be included in all copies or substantial portions
16  * of the Software.
17  *
18  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20  * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
21  * THE COPYRIGHT HOLDERS, AUTHORS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM,
22  * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
23  * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
24  * USE OR OTHER DEALINGS IN THE SOFTWARE.
25  *
26  **************************************************************************/
27 /*
28  * Authors: Huang Rui <ray.huang@amd.com>
29  */
30
31 #ifndef TTM_SET_MEMORY
32 #define TTM_SET_MEMORY
33
34 #include <linux/mm.h>
35
36 #ifdef CONFIG_X86
37
38 #include <asm/set_memory.h>
39
40 static inline int ttm_set_pages_array_wb(struct page **pages, int addrinarray)
41 {
42         return set_pages_array_wb(pages, addrinarray);
43 }
44
45 static inline int ttm_set_pages_array_wc(struct page **pages, int addrinarray)
46 {
47         return set_pages_array_wc(pages, addrinarray);
48 }
49
50 static inline int ttm_set_pages_array_uc(struct page **pages, int addrinarray)
51 {
52         return set_pages_array_uc(pages, addrinarray);
53 }
54
55 static inline int ttm_set_pages_wb(struct page *page, int numpages)
56 {
57         return set_pages_wb(page, numpages);
58 }
59
60 static inline int ttm_set_pages_wc(struct page *page, int numpages)
61 {
62         unsigned long addr = (unsigned long)page_address(page);
63
64         return set_memory_wc(addr, numpages);
65 }
66
67 static inline int ttm_set_pages_uc(struct page *page, int numpages)
68 {
69         return set_pages_uc(page, numpages);
70 }
71
72 #else /* for CONFIG_X86 */
73
74 static inline int ttm_set_pages_array_wb(struct page **pages, int addrinarray)
75 {
76         return 0;
77 }
78
79 static inline int ttm_set_pages_array_wc(struct page **pages, int addrinarray)
80 {
81         return 0;
82 }
83
84 static inline int ttm_set_pages_array_uc(struct page **pages, int addrinarray)
85 {
86         return 0;
87 }
88
89 static inline int ttm_set_pages_wb(struct page *page, int numpages)
90 {
91         return 0;
92 }
93
94 static inline int ttm_set_pages_wc(struct page *page, int numpages)
95 {
96         return 0;
97 }
98
99 static inline int ttm_set_pages_uc(struct page *page, int numpages)
100 {
101         return 0;
102 }
103
104 #endif /* for CONFIG_X86 */
105
106 #endif