Deleted Added
full compact
agp.c (191057) agp.c (201223)
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

--- 11 unchanged lines hidden (view full) ---

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
27#include <sys/cdefs.h>
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

--- 11 unchanged lines hidden (view full) ---

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
27#include <sys/cdefs.h>
28__FBSDID("$FreeBSD: head/sys/dev/agp/agp.c 191057 2009-04-14 13:11:34Z ed $");
28__FBSDID("$FreeBSD: head/sys/dev/agp/agp.c 201223 2009-12-29 21:51:28Z rnoland $");
29
30#include "opt_agp.h"
31#include "opt_bus.h"
32
33#include <sys/param.h>
34#include <sys/systm.h>
35#include <sys/malloc.h>
36#include <sys/kernel.h>

--- 826 unchanged lines hidden (view full) ---

863 return agp_unbind_user(dev, (agp_unbind *)data);
864
865 }
866
867 return EINVAL;
868}
869
870static int
29
30#include "opt_agp.h"
31#include "opt_bus.h"
32
33#include <sys/param.h>
34#include <sys/systm.h>
35#include <sys/malloc.h>
36#include <sys/kernel.h>

--- 826 unchanged lines hidden (view full) ---

863 return agp_unbind_user(dev, (agp_unbind *)data);
864
865 }
866
867 return EINVAL;
868}
869
870static int
871agp_mmap(struct cdev *kdev, vm_offset_t offset, vm_paddr_t *paddr, int prot)
871agp_mmap(struct cdev *kdev, vm_ooffset_t offset, vm_paddr_t *paddr,
872 int prot, vm_memattr_t *memattr)
872{
873 device_t dev = kdev->si_drv1;
874 struct agp_softc *sc = device_get_softc(dev);
875
876 if (offset > AGP_GET_APERTURE(dev))
877 return -1;
878 *paddr = rman_get_start(sc->as_aperture) + offset;
879 return 0;

--- 96 unchanged lines hidden ---
873{
874 device_t dev = kdev->si_drv1;
875 struct agp_softc *sc = device_get_softc(dev);
876
877 if (offset > AGP_GET_APERTURE(dev))
878 return -1;
879 *paddr = rman_get_start(sc->as_aperture) + offset;
880 return 0;

--- 96 unchanged lines hidden ---