Module Name: src Committed By: christos Date: Mon Sep 27 21:25:39 UTC 2010
Modified Files: src/sys/dev/pci: agp.c src/sys/sys: agpio.h Log Message: backwards compat code for paddr_t being 32 bits. To generate a diff of this commit: cvs rdiff -u -r1.69 -r1.70 src/sys/dev/pci/agp.c cvs rdiff -u -r1.5 -r1.6 src/sys/sys/agpio.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/dev/pci/agp.c diff -u src/sys/dev/pci/agp.c:1.69 src/sys/dev/pci/agp.c:1.70 --- src/sys/dev/pci/agp.c:1.69 Tue Jun 15 23:35:01 2010 +++ src/sys/dev/pci/agp.c Mon Sep 27 17:25:38 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: agp.c,v 1.69 2010/06/16 03:35:01 riz Exp $ */ +/* $NetBSD: agp.c,v 1.70 2010/09/27 21:25:38 christos Exp $ */ /*- * Copyright (c) 2000 Doug Rabson @@ -65,7 +65,7 @@ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: agp.c,v 1.69 2010/06/16 03:35:01 riz Exp $"); +__KERNEL_RCSID(0, "$NetBSD: agp.c,v 1.70 2010/09/27 21:25:38 christos Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -944,6 +944,20 @@ case AGPIOC_SETUP: return agp_setup_user(sc, (agp_setup *)data); +#ifndef __LP64__ /* Wish ifdef knew about sizeof */ + case AGPIOC_OALLOCATE: { + agp_allocate aga; + agp_oallocate *oaga = data; + + aga.key = oaga->key; + aga.pg_count = oaga->pg_count; + aga.type = oaga->type; + aga.physical = oaga->physical; + + return agp_allocate_user(sc, &aga); + } +#endif + case AGPIOC_ALLOCATE: return agp_allocate_user(sc, (agp_allocate *)data); Index: src/sys/sys/agpio.h diff -u src/sys/sys/agpio.h:1.5 src/sys/sys/agpio.h:1.6 --- src/sys/sys/agpio.h:1.5 Mon Dec 26 13:41:36 2005 +++ src/sys/sys/agpio.h Mon Sep 27 17:25:38 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: agpio.h,v 1.5 2005/12/26 18:41:36 perry Exp $ */ +/* $NetBSD: agpio.h,v 1.6 2010/09/27 21:25:38 christos Exp $ */ /*- * Copyright (c) 2000 Doug Rabson @@ -65,6 +65,7 @@ #define AGPIOC_RESERVE _IOW (AGPIOC_BASE, 4, agp_region) #define AGPIOC_PROTECT _IOW (AGPIOC_BASE, 5, agp_region) #endif +#define AGPIOC_OALLOCATE _IOWR(AGPIOC_BASE, 6, agp_oallocate) #define AGPIOC_ALLOCATE _IOWR(AGPIOC_BASE, 6, agp_allocate) #define AGPIOC_DEALLOCATE _IOW (AGPIOC_BASE, 7, int) #define AGPIOC_BIND _IOW (AGPIOC_BASE, 8, agp_bind) @@ -107,6 +108,16 @@ } agp_region; #endif +typedef struct _agp_oallocate { + int key; /* tag of allocation */ + size_t pg_count; /* number of pages */ + uint32_t type; /* 0 == normal, other devspec */ + u_long physical; /* device specific (some devices + * need a phys address of the + * actual page behind the gatt + * table) */ +} agp_oallocate; + typedef struct _agp_allocate { int key; /* tag of allocation */ size_t pg_count; /* number of pages */ @@ -116,7 +127,6 @@ * actual page behind the gatt * table) */ } agp_allocate; - typedef struct _agp_bind { int key; /* tag of allocation */ off_t pg_start; /* starting page to populate */