From e5d3c7f260d18168eec755c73f01ac617390d96c Mon Sep 17 00:00:00 2001 From: Michel Daenzer Date: Fri, 16 May 2003 23:41:27 +0000 Subject: Support AGP bridges where the AGP aperture can't be accessed directly by the CPU (David Mosberger, Benjamin Herrenschmidt, myself, Paul Mackerras, Jeff Wiedemeier) --- linux/Makefile.linux | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) (limited to 'linux/Makefile.linux') diff --git a/linux/Makefile.linux b/linux/Makefile.linux index af610c13..c3451399 100644 --- a/linux/Makefile.linux +++ b/linux/Makefile.linux @@ -264,18 +264,36 @@ CC += -I$(DRMSRCDIR) # Check for Red Hat's 4-argument do_munmap(). DOMUNMAP := $(shell grep do_munmap $(LINUXDIR)/include/linux/mm.h | \ grep -c acct) -# Check for 5-argument remap_page_range() in RH9 kernel, and 2.5.x kernels -RPR := $(shell grep remap_page_range $(LINUXDIR)/include/linux/mm.h | \ - grep -c vma) ifneq ($(DOMUNMAP),0) EXTRA_CFLAGS += -DDO_MUNMAP_4_ARGS endif +# Check for 5-argument remap_page_range() in RH9 kernel, and 2.5.x kernels +RPR := $(shell grep remap_page_range $(LINUXDIR)/include/linux/mm.h | \ + grep -c vma) + ifneq ($(RPR),0) EXTRA_CFLAGS += -DREMAP_PAGE_RANGE_5_ARGS endif +# Check for 4-argument vmap() in some 2.5.x and 2.4.x kernels +VMAP := $(shell grep -A1 'vmap.*count,$$' $(LINUXDIR)/include/linux/vmalloc.h | \ + grep -c prot) + +ifneq ($(VMAP),0) +EXTRA_CFLAGS += -DVMAP_4_ARGS +endif + +# Check for PAGE_AGP definition +PAGE_AGP := $(shell cat $(LINUXDIR)/include/asm/agp.h 2>/dev/null | \ + grep -c PAGE_AGP) + +ifneq ($(PAGE_AGP),0) +EXTRA_CFLAGS += -DHAVE_PAGE_AGP +endif + + # Start with all modules turned off. CONFIG_DRM_GAMMA := n CONFIG_DRM_TDFX := n -- cgit v1.2.3