agp.c (108236) | agp.c (109623) |
---|---|
1/*- 2 * Copyright (c) 2000 Doug Rabson 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 9 unchanged lines hidden (view full) --- 18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 * | 1/*- 2 * Copyright (c) 2000 Doug Rabson 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 9 unchanged lines hidden (view full) --- 18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 * |
26 * $FreeBSD: head/sys/dev/agp/agp.c 108236 2002-12-23 21:47:46Z alc $ | 26 * $FreeBSD: head/sys/dev/agp/agp.c 109623 2003-01-21 08:56:16Z alfred $ |
27 */ 28 29#include "opt_bus.h" 30 31#include <sys/param.h> 32#include <sys/systm.h> 33#include <sys/malloc.h> 34#include <sys/kernel.h> --- 311 unchanged lines hidden (view full) --- 346 return 0; 347 348 if (type != 0) { 349 printf("agp_generic_alloc_memory: unsupported type %d\n", 350 type); 351 return 0; 352 } 353 | 27 */ 28 29#include "opt_bus.h" 30 31#include <sys/param.h> 32#include <sys/systm.h> 33#include <sys/malloc.h> 34#include <sys/kernel.h> --- 311 unchanged lines hidden (view full) --- 346 return 0; 347 348 if (type != 0) { 349 printf("agp_generic_alloc_memory: unsupported type %d\n", 350 type); 351 return 0; 352 } 353 |
354 mem = malloc(sizeof *mem, M_AGP, M_WAITOK); | 354 mem = malloc(sizeof *mem, M_AGP, 0); |
355 mem->am_id = sc->as_nextid++; 356 mem->am_size = size; 357 mem->am_type = 0; 358 mem->am_obj = vm_object_allocate(OBJT_DEFAULT, atop(round_page(size))); 359 mem->am_physical = 0; 360 mem->am_offset = 0; 361 mem->am_is_bound = 0; 362 TAILQ_INSERT_TAIL(&sc->as_memory, mem, am_link); --- 448 unchanged lines hidden --- | 355 mem->am_id = sc->as_nextid++; 356 mem->am_size = size; 357 mem->am_type = 0; 358 mem->am_obj = vm_object_allocate(OBJT_DEFAULT, atop(round_page(size))); 359 mem->am_physical = 0; 360 mem->am_offset = 0; 361 mem->am_is_bound = 0; 362 TAILQ_INSERT_TAIL(&sc->as_memory, mem, am_link); --- 448 unchanged lines hidden --- |