summaryrefslogtreecommitdiff
path: root/linux-core
diff options
context:
space:
mode:
authorRik Faith <faith@alephnull.com>2000-08-08 16:04:21 +0000
committerRik Faith <faith@alephnull.com>2000-08-08 16:04:21 +0000
commit8b9363d1b1f7bc40fb68261f7659dea5124f2821 (patch)
tree5292870b287ab2ad5ca0ea71487115b158c6d507 /linux-core
parent9199075a6a975ebcc44aff53fe0f77080c01a30b (diff)
Sync with Linux 2.4.0-test6-pre8
Diffstat (limited to 'linux-core')
-rw-r--r--linux-core/README.drm11
-rw-r--r--linux-core/drmP.h5
-rw-r--r--linux-core/i810_dma.c10
-rw-r--r--linux-core/i810_drv.c4
-rw-r--r--linux-core/mga_drv.c4
-rw-r--r--linux-core/r128_drv.c4
-rw-r--r--linux-core/tdfx_drv.c4
7 files changed, 26 insertions, 16 deletions
diff --git a/linux-core/README.drm b/linux-core/README.drm
index 1cc4c277..6441e01e 100644
--- a/linux-core/README.drm
+++ b/linux-core/README.drm
@@ -1,3 +1,7 @@
+************************************************************
+* For the very latest on DRI development, please see: *
+* http://dri.sourceforge.net/ *
+************************************************************
The Direct Rendering Manager (drm) is a device-independent kernel-level
device driver that provides support for the XFree86 Direct Rendering
@@ -36,6 +40,7 @@ For specific information about kernel-level support, see:
A Security Analysis of the Direct Rendering Infrastructure
http://precisioninsight.com/dr/security.html
-
-
-$XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/README.drm,v 1.2 1999/09/27 14:59:24 dawes Exp $
+************************************************************
+* For the very latest on DRI development, please see: *
+* http://dri.sourceforge.net/ *
+************************************************************
diff --git a/linux-core/drmP.h b/linux-core/drmP.h
index 516e9b22..4f85d07c 100644
--- a/linux-core/drmP.h
+++ b/linux-core/drmP.h
@@ -139,6 +139,11 @@ typedef struct wait_queue *wait_queue_head_t;
#define module_exit(x) void cleanup_module(void) { x(); }
#endif
+ /* virt_to_page added in 2.4.0-test6 */
+#ifndef virt_to_page
+#define virt_to_page(kaddr) (mem_map + MAP_NR(kaddr))
+#endif
+
/* Generic cmpxchg added in 2.3.x */
#ifndef __HAVE_ARCH_CMPXCHG
/* Include this here so that driver can be
diff --git a/linux-core/i810_dma.c b/linux-core/i810_dma.c
index f3d9db43..19b7bd92 100644
--- a/linux-core/i810_dma.c
+++ b/linux-core/i810_dma.c
@@ -282,8 +282,8 @@ static unsigned long i810_alloc_page(drm_device_t *dev)
if(address == 0UL)
return 0;
- atomic_inc(&mem_map[MAP_NR((void *) address)].count);
- set_bit(PG_locked, &mem_map[MAP_NR((void *) address)].flags);
+ atomic_inc(&virt_to_page(address)->count);
+ set_bit(PG_locked, &virt_to_page(address)->flags);
return address;
}
@@ -293,9 +293,9 @@ static void i810_free_page(drm_device_t *dev, unsigned long page)
if(page == 0UL)
return;
- atomic_dec(&mem_map[MAP_NR((void *) page)].count);
- clear_bit(PG_locked, &mem_map[MAP_NR((void *) page)].flags);
- wake_up(&mem_map[MAP_NR((void *) page)].wait);
+ atomic_dec(&virt_to_page(page)->count);
+ clear_bit(PG_locked, &virt_to_page(page)->flags);
+ wake_up(&virt_to_page(page)->wait);
free_page(page);
return;
}
diff --git a/linux-core/i810_drv.c b/linux-core/i810_drv.c
index 5cab071e..275663a1 100644
--- a/linux-core/i810_drv.c
+++ b/linux-core/i810_drv.c
@@ -44,8 +44,8 @@ static drm_device_t i810_device;
drm_ctx_t i810_res_ctx;
static struct file_operations i810_fops = {
-#if LINUX_VERSION_CODE >= 0x020322
- /* This started being used approx. 2.3.34 */
+#if LINUX_VERSION_CODE >= 0x020400
+ /* This started being used during 2.4.0-test */
owner: THIS_MODULE,
#endif
open: i810_open,
diff --git a/linux-core/mga_drv.c b/linux-core/mga_drv.c
index 7aae6f3e..acc42b83 100644
--- a/linux-core/mga_drv.c
+++ b/linux-core/mga_drv.c
@@ -45,8 +45,8 @@ static drm_device_t mga_device;
drm_ctx_t mga_res_ctx;
static struct file_operations mga_fops = {
-#if LINUX_VERSION_CODE >= 0x020322
- /* This started being used approx. 2.3.34 */
+#if LINUX_VERSION_CODE >= 0x020400
+ /* This started being used during 2.4.0-test */
owner: THIS_MODULE,
#endif
open: mga_open,
diff --git a/linux-core/r128_drv.c b/linux-core/r128_drv.c
index 6b1b19d5..fac88247 100644
--- a/linux-core/r128_drv.c
+++ b/linux-core/r128_drv.c
@@ -44,8 +44,8 @@ static drm_device_t r128_device;
drm_ctx_t r128_res_ctx;
static struct file_operations r128_fops = {
-#if LINUX_VERSION_CODE >= 0x020322
- /* This started being used approx. 2.3.34 */
+#if LINUX_VERSION_CODE >= 0x020400
+ /* This started being used during 2.4.0-test */
owner: THIS_MODULE,
#endif
open: r128_open,
diff --git a/linux-core/tdfx_drv.c b/linux-core/tdfx_drv.c
index ba8c40ce..59f10197 100644
--- a/linux-core/tdfx_drv.c
+++ b/linux-core/tdfx_drv.c
@@ -45,8 +45,8 @@ static drm_device_t tdfx_device;
drm_ctx_t tdfx_res_ctx;
static struct file_operations tdfx_fops = {
-#if LINUX_VERSION_CODE >= 0x020322
- /* This started being used approx. 2.3.34 */
+#if LINUX_VERSION_CODE >= 0x020400
+ /* This started being used during 2.4.0-test */
owner: THIS_MODULE,
#endif
open: tdfx_open,