summaryrefslogtreecommitdiff
path: root/linux-core
diff options
context:
space:
mode:
Diffstat (limited to 'linux-core')
-rw-r--r--linux-core/xgi_linux.h22
1 files changed, 6 insertions, 16 deletions
diff --git a/linux-core/xgi_linux.h b/linux-core/xgi_linux.h
index 28349470..8cf304c7 100644
--- a/linux-core/xgi_linux.h
+++ b/linux-core/xgi_linux.h
@@ -37,6 +37,12 @@
# error "This driver does not support pre-2.6 kernels!"
#endif
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 10)
+# define XGI_REMAP_PFN_RANGE_PRESENT
+#else
+# define XGI_REMAP_PAGE_RANGE_5
+#endif
+
#if defined (CONFIG_SMP) && !defined (__SMP__)
#define __SMP__
#endif
@@ -170,12 +176,7 @@ EXPORT_NO_SYMBOLS;
#define XGI_MODULE_PARAMETER(x) module_param(x, int, 0)
-/* Earlier 2.4.x kernels don't have pci_disable_device() */
-#ifdef XGI_PCI_DISABLE_DEVICE_PRESENT
#define XGI_PCI_DISABLE_DEVICE(dev) pci_disable_device(dev)
-#else
-#define XGI_PCI_DISABLE_DEVICE(dev)
-#endif
/* common defines */
#define GET_MODULE_SYMBOL(mod,sym) (const void *) inter_module_get(sym)
@@ -195,15 +196,9 @@ EXPORT_NO_SYMBOLS;
#define XGI_PCI_SLOT_NUMBER(dev) PCI_SLOT((dev)->devfn)
#ifdef XGI_PCI_GET_CLASS_PRESENT
-#define XGI_PCI_DEV_PUT(dev) pci_dev_put(dev)
#define XGI_PCI_GET_DEVICE(vendor,device,from) pci_get_device(vendor,device,from)
-#define XGI_PCI_GET_SLOT(bus,devfn) pci_get_slot(pci_find_bus(0,bus),devfn)
-#define XGI_PCI_GET_CLASS(class,from) pci_get_class(class,from)
#else
-#define XGI_PCI_DEV_PUT(dev)
#define XGI_PCI_GET_DEVICE(vendor,device,from) pci_find_device(vendor,device,from)
-#define XGI_PCI_GET_SLOT(bus,devfn) pci_find_slot(bus,devfn)
-#define XGI_PCI_GET_CLASS(class,from) pci_find_class(class,from)
#endif
/*
@@ -429,7 +424,6 @@ typedef struct xgi_pte_s {
* 2.4.20 is the first kernel to address it properly. The
* page_attr API provides the means to solve the problem.
*/
-#if defined(XGI_CHANGE_PAGE_ATTR_PRESENT)
static inline void XGI_SET_PAGE_ATTRIB_UNCACHED(xgi_pte_t * page_ptr)
{
struct page *page = virt_to_page(__va(page_ptr->phys_addr));
@@ -440,10 +434,6 @@ static inline void XGI_SET_PAGE_ATTRIB_CACHED(xgi_pte_t * page_ptr)
struct page *page = virt_to_page(__va(page_ptr->phys_addr));
change_page_attr(page, 1, PAGE_KERNEL);
}
-#else
-#define XGI_SET_PAGE_ATTRIB_UNCACHED(page_list)
-#define XGI_SET_PAGE_ATTRIB_CACHED(page_list)
-#endif
/* add for SUSE 9, Jill*/
#if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 4)
8 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271
/**
 * \file drm_compat.h
 * Backward compatability definitions for Direct Rendering Manager
 *
 * \author Rickard E. (Rik) Faith <faith@valinux.com>
 * \author Gareth Hughes <gareth@valinux.com>
 */

/*
 * Copyright 1999 Precision Insight, Inc., Cedar Park, Texas.
 * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California.
 * All rights reserved.
 *
 * Permission is hereby granted, free of charge, to any person obtaining a
 * copy of this software and associated documentation files (the "Software"),
 * to deal in the Software without restriction, including without limitation
 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
 * and/or sell copies of the Software, and to permit persons to whom the
 * Software is furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice (including the next
 * paragraph) shall be included in all copies or substantial portions of the
 * Software.
 *