Sat Oct 17 21:09:49 2015 UTC ()
only define __OS_HAS_AGP if x86 and NAGP > 0


(jmcneill)
diff -r1.4 -r1.5 src/sys/external/bsd/drm2/include/drm/drm_agp_netbsd.h

cvs diff -r1.4 -r1.5 src/sys/external/bsd/drm2/include/drm/drm_agp_netbsd.h (expand / switch to unified diff)

--- src/sys/external/bsd/drm2/include/drm/drm_agp_netbsd.h 2014/08/23 08:03:33 1.4
+++ src/sys/external/bsd/drm2/include/drm/drm_agp_netbsd.h 2015/10/17 21:09:49 1.5
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: drm_agp_netbsd.h,v 1.4 2014/08/23 08:03:33 riastradh Exp $ */ 1/* $NetBSD: drm_agp_netbsd.h,v 1.5 2015/10/17 21:09:49 jmcneill Exp $ */
2 2
3/*- 3/*-
4 * Copyright (c) 2013 The NetBSD Foundation, Inc. 4 * Copyright (c) 2013 The NetBSD Foundation, Inc.
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * This code is derived from software contributed to The NetBSD Foundation 7 * This code is derived from software contributed to The NetBSD Foundation
8 * by Taylor R. Campbell. 8 * by Taylor R. Campbell.
9 * 9 *
10 * Redistribution and use in source and binary forms, with or without 10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions 11 * modification, are permitted provided that the following conditions
12 * are met: 12 * are met:
13 * 1. Redistributions of source code must retain the above copyright 13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer. 14 * notice, this list of conditions and the following disclaimer.
@@ -37,32 +37,36 @@ @@ -37,32 +37,36 @@
37 * that are ruthlessly exploited for their value as happy accidents! 37 * that are ruthlessly exploited for their value as happy accidents!
38 * You have been warned! 38 * You have been warned!
39 */ 39 */
40 40
41#include <sys/agpio.h> 41#include <sys/agpio.h>
42 42
43#include <dev/pci/pcivar.h> /* XXX include order botch */ 43#include <dev/pci/pcivar.h> /* XXX include order botch */
44#include <dev/pci/agpreg.h> 44#include <dev/pci/agpreg.h>
45#include <dev/pci/agpvar.h> 45#include <dev/pci/agpvar.h>
46 46
47#include <linux/kernel.h> 47#include <linux/kernel.h>
48#include <linux/pci.h> 48#include <linux/pci.h>
49 49
50#define __OS_HAS_AGP 1 
51 
52#define PCI_AGP_COMMAND_FW AGPCMD_FWEN 50#define PCI_AGP_COMMAND_FW AGPCMD_FWEN
53 51
 52#if defined(__i386__) || defined(__x86_64__)
 53#include "agp.h"
 54#if NAGP > 0
 55#define __OS_HAS_AGP 1
 56#endif
54__CTASSERT(PAGE_SIZE == AGP_PAGE_SIZE); 57__CTASSERT(PAGE_SIZE == AGP_PAGE_SIZE);
55__CTASSERT(PAGE_SHIFT == AGP_PAGE_SHIFT); 58__CTASSERT(PAGE_SHIFT == AGP_PAGE_SHIFT);
 59#endif
56 60
57struct agp_kern_info { 61struct agp_kern_info {
58 struct agp_info aki_info; 62 struct agp_info aki_info;
59}; 63};
60 64
61struct agp_bridge_data { 65struct agp_bridge_data {
62 struct agp_softc abd_sc; /* XXX Abstraction violation! */ 66 struct agp_softc abd_sc; /* XXX Abstraction violation! */
63}; 67};
64 68
65/* 69/*
66 * We already have a struct agp_memory, but fortunately it looks like 70 * We already have a struct agp_memory, but fortunately it looks like
67 * it may accidentally work out. 71 * it may accidentally work out.
68 */ 72 */