]> git.pld-linux.org Git - packages/xorg-driver-video-nvidia-legacy-304xx.git/blob - conftest.h
- rebuild for kernel-3.10.10-1
[packages/xorg-driver-video-nvidia-legacy-304xx.git] / conftest.h
1 /* synchronized with conftest.sh from 325.15, 319.32, 313.30, 310.51, 304.108, 295.75, 173.14.37, 96.43.23, 71.86.15 */
2
3 #ifndef LINUX_VERSION_CODE
4 #include <linux/version.h>
5 #endif
6
7 #if !defined(IS_ENABLED) && LINUX_VERSION_CODE < KERNEL_VERSION(3,1,0)
8 #define __ARG_PLACEHOLDER_1 0,
9 #define config_enabled(cfg) _config_enabled(cfg)
10 #define _config_enabled(value) __config_enabled(__ARG_PLACEHOLDER_##value)
11 #define __config_enabled(arg1_or_junk) ___config_enabled(arg1_or_junk 1, 0)
12 #define ___config_enabled(__ignored, val, ...) val
13 #define IS_ENABLED(option) (config_enabled(option) || config_enabled(option##_MODULE))
14 #endif
15
16 /* Implement conftest.sh function nvidiafb_sanity_check */
17 #if IS_ENABLED(CONFIG_FB_NVIDIA)
18 #warning "The nvidia module is incompatible with nvidiafb!"
19 #endif
20
21 /* Implement conftest.sh function xen_sanity_check */
22 #if IS_ENABLED(CONFIG_XEN) && ! IS_ENABLED(CONFIG_PARAVIRT)
23 #warning "Xen kernels are not supported!"
24 #endif
25
26 /* Implement conftest.sh function preempt_rt_sanity_check */
27 #if IS_ENABLED(CONFIG_PREEMPT_RT) || IS_ENABLED(CONFIG_PREEMPT_RT_FULL)
28 #warning "PREEMPT_RT kernels are not supported!"
29 #endif
30
31 /* Implement conftest.sh function remap_page_range */
32 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,11)
33  #if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
34   #define NV_REMAP_PAGE_RANGE_PRESENT
35   #define NV_REMAP_PAGE_RANGE_ARGUMENT_COUNT 4
36  #else
37   #define NV_REMAP_PAGE_RANGE_PRESENT
38   #define NV_REMAP_PAGE_RANGE_ARGUMENT_COUNT 5
39  #endif
40 #else
41  #undef NV_REMAP_PAGE_RANGE_PRESENT
42 #endif
43
44 /* Implement conftest.sh function set_memory_uc */
45 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,25) && IS_ENABLED(CONFIG_X86)
46  #define NV_SET_MEMORY_UC_PRESENT
47 #else
48  #undef NV_SET_MEMORY_UC_PRESENT
49 #endif
50
51 /* Implement conftest.sh function set_memory_array_uc */
52 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,28) && IS_ENABLED(CONFIG_X86)
53  #define NV_SET_MEMORY_ARRAY_UC_PRESENT
54 #else
55  #undef NV_SET_MEMORY_ARRAY_UC_PRESENT
56 #endif
57
58 /* Implement conftest.sh function set_pages_uc */
59 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,25) && IS_ENABLED(CONFIG_X86)
60  #define NV_SET_PAGES_UC_PRESENT
61 #else
62  #undef NV_SET_PAGES_UC_PRESENT
63 #endif
64
65 /* Implement conftest.sh function outer_flush_all */
66 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,34) && IS_ENABLED(CONFIG_ARM)
67  #define NV_OUTER_FLUSH_ALL_PRESENT
68 #else
69  #undef NV_OUTER_FLUSH_ALL_PRESENT
70 #endif
71
72 /* Implement conftest.sh function change_page_attr */
73 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,20) && \
74                LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,25)
75  #define NV_CHANGE_PAGE_ATTR_PRESENT
76 #else
77  #undef NV_CHANGE_PAGE_ATTR_PRESENT
78 #endif
79
80 /* Implement conftest.sh function pci_get_class */
81 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,10)
82  #define NV_PCI_GET_CLASS_PRESENT
83 #else
84  #undef NV_PCI_GET_CLASS_PRESENT
85 #endif
86
87 /* Implement conftest.sh function pci_get_domain_bus_and_slot */
88 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33)
89  #define NV_PCI_GET_DOMAIN_BUS_AND_SLOT_PRESENT
90 #else
91  #undef NV_PCI_GET_DOMAIN_BUS_AND_SLOT_PRESENT
92 #endif
93
94 /* Implement conftest.sh function remap_pfn_range */
95 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,10)
96  #define NV_REMAP_PFN_RANGE_PRESENT
97 #else
98  #undef NV_REMAP_PFN_RANGE_PRESENT
99 #endif
100
101 /* Implement conftest.sh function agp_backend_acquire */
102 /* Only kernels sometime before 2.4.0 don't have this function, and who */
103 /* cares anymore */
104 #define NV_AGP_BACKEND_ACQUIRE_PRESENT
105 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,12)
106  #define NV_AGP_BACKEND_ACQUIRE_ARGUMENT_COUNT 1
107 #else
108  #define NV_AGP_BACKEND_ACQUIRE_ARGUMENT_COUNT 0
109 #endif
110
111 /* Implement conftest.sh function vmap */
112 /* I can not find any released kernel that uses the 2 argument variant */
113 /* of vmap */
114 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,22)
115  #define NV_VMAP_PRESENT
116  #define NV_VMAP_ARGUMENT_COUNT 4
117 #else
118  #undef NV_VMAP_PRESENT
119 #endif
120
121 /* Implement conftest.sh function i2c_adapter */
122 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
123  #define NV_I2C_ADAPTER_HAS_INC_USE
124  #define NV_I2C_ADAPTER_HAS_DEC_USE
125  #define NV_I2C_ADAPTER_HAS_CLIENT_REGISTER
126 #else
127  #undef NV_I2C_ADAPTER_HAS_INC_USE
128  #undef NV_I2C_ADAPTER_HAS_DEC_USE
129  #undef NV_I2C_ADAPTER_HAS_CLIENT_REGISTER
130 #endif
131
132 /* Implement conftest.sh function pm_message_t */
133 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,11)
134  #define NV_PM_MESSAGE_T_PRESENT
135  #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,14)
136   #define NV_PM_MESSAGE_T_HAS_EVENT
137  #else
138   #undef NV_PM_MESSAGE_T_HAS_EVENT
139  #endif
140 #else
141  #undef NV_PM_MESSAGE_T_PRESENT
142  #undef NV_PM_MESSAGE_T_HAS_EVENT
143 #endif
144
145 /* Implement conftest.sh function pci_choose_state */
146 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,11)
147  #define NV_PCI_CHOOSE_STATE_PRESENT
148 #else
149  #undef NV_PCI_CHOOSE_STATE_PRESENT
150 #endif
151
152 /* Implement conftest.sh function vm_insert_page */
153 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,15)
154  #define NV_VM_INSERT_PAGE_PRESENT
155 #else
156  #undef NV_VM_INSERT_PAGE_PRESENT
157 #endif
158
159 /* Implement conftest.sh function irq_handler_t */
160 /* I can not find any released kernel that uses the 3 argument variant */
161 /* of irq_handler_t */
162 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,19)
163  #define NV_IRQ_HANDLER_T_PRESENT
164  #define NV_IRQ_HANDLER_T_ARGUMENT_COUNT 2
165 #else
166  #undef NV_IRQ_HANDLER_T_PRESENT
167 #endif
168
169 /* Implement conftest.sh function acpi_device_ops */
170 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,10) && \
171                LINUX_VERSION_CODE < KERNEL_VERSION(2,6,21)
172  #define NV_ACPI_DEVICE_OPS_HAS_MATCH
173 #else
174  #undef NV_ACPI_DEVICE_OPS_HAS_MATCH
175 #endif
176
177 /* Implement conftest.sh function acpi_device_id */
178 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,23)
179  #define NV_ACPI_DEVICE_ID_HAS_DRIVER_DATA
180 #else
181  #undef NV_ACPI_DEVICE_ID_HAS_DRIVER_DATA
182 #endif
183
184 /* Implement conftest.sh function acquire_console_sem */
185 // 2.6.38 renamed {acquire,release}_console_sem() to console_{,un}lock()
186 // but NVIDIA neither checks for these new names nor uses them
187 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,10) && \
188     LINUX_VERSION_CODE < KERNEL_VERSION(2,6,38)
189  #define NV_ACQUIRE_CONSOLE_SEM_PRESENT
190 #else
191  #undef NV_ACQUIRE_CONSOLE_SEM_PRESENT
192 #endif
193
194 /* Implement conftest.sh function kmem_cache_create */
195 /* Only kernels sometime before 2.4.0 don't have this function, and who */
196 /* cares anymore */
197 #define NV_KMEM_CACHE_CREATE_PRESENT
198 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,23)
199  #define NV_KMEM_CACHE_CREATE_ARGUMENT_COUNT 5
200 #else
201  #define NV_KMEM_CACHE_CREATE_ARGUMENT_COUNT 6
202 #endif
203
204 /* Implement conftest.sh function smp_call_function */
205 /* Only kernels sometime before 2.4.0 don't have this function, and who */
206 /* cares anymore */
207 #define NV_SMP_CALL_FUNCTION_PRESENT
208 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,27)
209  #define NV_SMP_CALL_FUNCTION_ARGUMENT_COUNT 3
210 #else
211  #define NV_SMP_CALL_FUNCTION_ARGUMENT_COUNT 4
212 #endif
213
214 /* Implement conftest.sh function on_each_cpu */
215 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
216  #define NV_ON_EACH_CPU_PRESENT
217  #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,27)
218   #define NV_ON_EACH_CPU_ARGUMENT_COUNT 3
219  #else
220   #define NV_ON_EACH_CPU_ARGUMENT_COUNT 4
221  #endif
222 #else
223  #undef NV_ON_EACH_CPU_PRESENT
224 #endif
225
226 /* Implement conftest.sh function vmm_support */
227 /* nv-xen.h does not exist */
228 #undef HAVE_NV_XEN
229
230 /* Implement conftest.sh function nvmap_support */
231 /* nv-android.h does not exist */
232 #undef HAVE_NV_ANDROID
233
234 /* Implement conftest.sh function acpi_evaluate_integer */
235 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,19)
236  #define NV_ACPI_EVALUATE_INTEGER_PRESENT
237  #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,28)
238   typedef unsigned long long nv_acpi_integer_t;
239  #else
240   typedef unsigned long nv_acpi_integer_t;
241  #endif
242 #else
243  #undef NV_ACPI_EVALUATE_INTEGER_PRESENT
244  typedef unsigned long nv_acpi_integer_t;
245 #endif
246
247 /* Implement conftest.sh function acpi_walk_namespace */
248 /* Only kernels sometime before 2.4.0 don't have this function, and who */
249 /* cares anymore */
250 #define NV_ACPI_WALK_NAMESPACE_PRESENT
251 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33)
252  #define NV_ACPI_WALK_NAMESPACE_ARGUMENT_COUNT 7
253 #else
254  #define NV_ACPI_WALK_NAMESPACE_ARGUMENT_COUNT 6
255 #endif
256
257 /* Implement conftest.sh function acpi_os_wait_events_complete */
258 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,7)
259  #define NV_ACPI_OS_WAIT_EVENTS_COMPLETE_PRESENT
260  #if LINUX_VERSION_CODE >= KERNEL_VERSION(3,6,0)
261   #define NV_ACPI_OS_WAIT_EVENTS_COMPLETE_ARGUMENT_COUNT 0
262  #else
263   #define NV_ACPI_OS_WAIT_EVENTS_COMPLETE_ARGUMENT_COUNT 1
264  #endif
265 #else
266  #undef NV_ACPI_OS_WAIT_EVENTS_COMPLETE_PRESENT
267 #endif
268
269 /* Implement conftest.sh function ioremap_cache */
270 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,25) && IS_ENABLED(CONFIG_X86)
271  #define NV_IOREMAP_CACHE_PRESENT
272 #else
273  #undef NV_IOREMAP_CACHE_PRESENT
274 #endif
275
276 /* Implement conftest.sh function ioremap_wc */
277 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,26)
278  #define NV_IOREMAP_WC_PRESENT
279 #else
280  #undef NV_IOREMAP_WC_PRESENT
281 #endif
282
283 /* Implement conftest.sh function proc_dir_entry */
284 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,30)
285  #define NV_PROC_DIR_ENTRY_HAS_OWNER
286 #else
287  #undef NV_PROC_DIR_ENTRY_HAS_OWNER
288 #endif
289
290 /* Implement conftest.sh function INIT_WORK */
291 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,41)
292  #define NV_INIT_WORK_PRESENT
293  #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,20)
294   #define NV_INIT_WORK_ARGUMENT_COUNT 2
295  #else
296   #define NV_INIT_WORK_ARGUMENT_COUNT 3
297  #endif
298 #else
299  #undef NV_INIT_WORK_PRESENT
300 #endif
301
302 /* Implement conftest.sh function pci_dma_mapping_error */
303 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,5)
304  #define NV_PCI_DMA_MAPPING_ERROR_PRESENT
305  #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,27)
306   #define NV_PCI_DMA_MAPPING_ERROR_ARGUMENT_COUNT 2
307  #else
308   #define NV_PCI_DMA_MAPPING_ERROR_ARGUMENT_COUNT 1
309  #endif
310 #else
311  #undef NV_PCI_DMA_MAPPING_ERROR_PRESENT
312 #endif
313
314 /* Implement conftest.sh function agp_memory */
315 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,31)
316  #define NV_AGP_MEMORY_HAS_PAGES
317 #else
318  #undef NV_AGP_MEMORY_HAS_PAGES
319 #endif
320
321 /* Implement conftest.sh function scatterlist */
322 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,24)
323  #define NV_SCATTERLIST_HAS_PAGE
324 #else
325  #undef NV_SCATTERLIST_HAS_PAGE
326 #endif
327
328 /* Implement conftest.sh function pci_domain_nr */
329 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,71)
330  #define NV_PCI_DOMAIN_NR_PRESENT
331 #else
332  #undef NV_PCI_DOMAIN_NR_PRESENT
333 #endif
334
335 /* Implement conftest.sh function file_operations */
336 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,36)
337  #define NV_FILE_OPERATIONS_HAS_IOCTL
338 #else
339  #undef NV_FILE_OPERATIONS_HAS_IOCTL
340 #endif
341 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,11)
342  #define NV_FILE_OPERATIONS_HAS_UNLOCKED_IOCTL
343  #define NV_FILE_OPERATIONS_HAS_COMPAT_IOCTL
344 #else
345  #undef NV_FILE_OPERATIONS_HAS_UNLOCKED_IOCTL
346  #undef NV_FILE_OPERATIONS_HAS_COMPAT_IOCTL
347 #endif
348
349 /* Implement conftest.sh function efi_enabled */
350 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,1)
351  #define NV_EFI_ENABLED_PRESENT
352 #else
353  #undef NV_EFI_ENABLED_PRESENT
354 #endif
355
356 /* Implement conftest.sh function dom0_kernel_present */
357 #if 0
358  #define NV_DOM0_KERNEL_PRESENT
359 #else
360  #undef NV_DOM0_KERNEL_PRESENT
361 #endif
362
363 /* Implement conftest.sh function drm_available */
364 #if 0
365  #define NV_DRM_AVAILABLE
366 #else
367  #undef NV_DRM_AVAILABLE
368 #endif
369
370 /* Implement conftest.sh function proc_create_data */
371 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,26)
372  #define NV_PROC_CREATE_DATA_PRESENT
373 #else
374  #undef NV_PROC_CREATE_DATA_PRESENT
375 #endif
376
377 /* Implement conftest.sh function pde_data */
378 #if LINUX_VERSION_CODE >= KERNEL_VERSION(3,10,0)
379  #define NV_PDE_DATA_PRESENT
380 #else
381  #undef NV_PDE_DATA_PRESENT
382 #endif
383
384 /* Implement conftest.sh function proc_remove */
385 #if LINUX_VERSION_CODE >= KERNEL_VERSION(3,10,0)
386  #define NV_PROC_REMOVE_PRESENT
387 #else
388  #undef NV_PROC_REMOVE_PRESENT
389 #endif
390
391 /* Implement conftest.sh function sg_init_table */
392 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,24)
393  #define NV_SG_INIT_TABLE_PRESENT
394 #else
395  #undef NV_SG_INIT_TABLE_PRESENT
396 #endif
397
398 /* Check for linux/semaphore.h */
399 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,26)
400  #define NV_LINUX_SEMAPHORE_H_PRESENT
401 #else
402  #undef NV_LINUX_SEMAPHORE_H_PRESENT
403 #endif
404
405 /* Check for linux/cred.h */
406 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,27)
407  #define NV_LINUX_CRED_H_PRESENT
408 #else
409  #undef NV_LINUX_CRED_H_PRESENT
410 #endif
411
412 /* Check for drm/drmP.h */
413 #if 1
414  #define NV_DRM_DRMP_H_PRESENT
415 #else
416  #undef NV_DRM_DRMP_H_PRESENT
417 #endif
418
419 /* Check for generated/autoconf.h */
420 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33)
421  #define NV_GENERATED_AUTOCONF_H_PRESENT
422 #else
423  #undef NV_GENERATED_AUTOCONF_H_PRESENT
424 #endif
425
426 /* Check for generated/compile.h */
427 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33)
428  #define NV_GENERATED_COMPILE_H_PRESENT
429 #else
430  #undef NV_GENERATED_COMPILE_H_PRESENT
431 #endif
432
433 /* Check for generated/utsrelease.h */
434 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33)
435  #define NV_GENERATED_UTSRELEASE_H_PRESENT
436 #else
437  #undef NV_GENERATED_UTSRELEASE_H_PRESENT
438 #endif
439
440 /* Check for asm/system.h */
441 #if LINUX_VERSION_CODE < KERNEL_VERSION(3,4,0)
442  #define NV_ASM_SYSTEM_H_PRESENT
443 #else
444  #undef NV_ASM_SYSTEM_H_PRESENT
445 #endif
446
447 /* Check for linux/efi.h */
448 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,33)
449  #define NV_LINUX_EFI_H_PRESENT
450 #else
451  #undef NV_LINUX_EFI_H_PRESENT
452 #endif
453
454 /* Check for linux/kconfig.h */
455 #if LINUX_VERSION_CODE >= KERNEL_VERSION(3,1,0)
456  #define NV_LINUX_KCONFIG_H_PRESENT
457 #else
458  #undef NV_LINUX_KCONFIG_H_PRESENT
459 #endif
460
461 /* Check for linux/screen_info.h */
462 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,16)
463  #define NV_LINUX_SCREEN_INFO_H_PRESENT
464 #else
465  #undef NV_LINUX_SCREEN_INFO_H_PRESENT
466 #endif
467
468 /* Check for linux/nvmap.h */
469 // does not (yet) exist in kernel source
470  #undef NV_LINUX_NVMAP_H_PRESENT
This page took 0.13246 seconds and 3 git commands to generate.