From owner-cvs-all Mon Feb 24 19:21:29 2003 Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D0C1837B401; Mon, 24 Feb 2003 19:21:23 -0800 (PST) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 615D643FA3; Mon, 24 Feb 2003 19:21:23 -0800 (PST) (envelope-from mux@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h1P3LN0U039841; Mon, 24 Feb 2003 19:21:23 -0800 (PST) (envelope-from mux@repoman.freebsd.org) Received: (from mux@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h1P3LN8b039840; Mon, 24 Feb 2003 19:21:23 -0800 (PST) Message-Id: <200302250321.h1P3LN8b039840@repoman.freebsd.org> From: Maxime Henrion Date: Mon, 24 Feb 2003 19:21:23 -0800 (PST) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/sys/alpha/alpha mem.c pmap.c src/sys/dev/bktr bktr_os.c src/sys/dev/drm drm_vm.h src/sys/dev/fb fb.c fbreg.h gfb.c s3_pci.c vga.c vgareg.h src/sys/dev/firewire fwdev.c fwmem.c src/sys/dev/gfb gfb_pci.c src/sys/dev/sound/pcm dsp.c ... X-FreeBSD-CVS-Branch: HEAD Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG mux 2003/02/24 19:21:23 PST Modified files: sys/alpha/alpha mem.c pmap.c sys/dev/bktr bktr_os.c sys/dev/drm drm_vm.h sys/dev/fb fb.c fbreg.h gfb.c s3_pci.c vga.c vgareg.h sys/dev/firewire fwdev.c fwmem.c sys/dev/gfb gfb_pci.c sys/dev/sound/pcm dsp.c sys/dev/syscons syscons.c sys/dev/tdfx tdfx_pci.c sys/geom geom_stats.c sys/i386/i386 elan-mmcr.c mem.c pmap.c sys/i386/isa spigot.c vesa.c sys/i386/isa/pcvt pcvt_drv.c sys/ia64/ia64 mem.c pmap.c sys/isa vga_isa.c sys/kern subr_xxx.c sys/pc98/pc98 pc98gdc.c syscons.c sys/pci agp.c meteor.c xrpu.c sys/powerpc/powerpc pmap.c sys/sparc64/sparc64 pmap.c sys/sys conf.h sys/vm device_pager.c pmap.h Log: Cleanup of the d_mmap_t interface. - Get rid of the useless atop() / pmap_phys_address() detour. The device mmap handlers must now give back the physical address without atop()'ing it. - Don't borrow the physical address of the mapping in the returned int. Now we properly pass a vm_offset_t * and expect it to be filled by the mmap handler when the mapping was successful. The mmap handler must now return 0 when successful, any other value is considered as an error. Previously, returning -1 was the only way to fail. This change thus accidentally fixes some devices which were bogusly returning errno constants which would have been considered as addresses by the device pager. - Garbage collect the poorly named pmap_phys_address() now that it's no longer used. - Convert all the d_mmap_t consumers to the new API. I'm still not sure wheter we need a __FreeBSD_version bump for this, since and we didn't guarantee API/ABI stability until 5.1-RELEASE. Discussed with: alc, phk, jake Reviewed by: peter Compile-tested on: LINT (i386), GENERIC (alpha and sparc64) Runtime-tested on: i386 Revision Changes Path 1.42 +3 -2 src/sys/alpha/alpha/mem.c 1.121 +0 -7 src/sys/alpha/alpha/pmap.c 1.32 +3 -2 src/sys/dev/bktr/bktr_os.c 1.3 +10 -6 src/sys/dev/drm/drm_vm.h 1.23 +4 -4 src/sys/dev/fb/fb.c 1.12 +3 -2 src/sys/dev/fb/fbreg.h 1.3 +5 -11 src/sys/dev/fb/gfb.c 1.4 +3 -2 src/sys/dev/fb/s3_pci.c 1.22 +7 -12 src/sys/dev/fb/vga.c 1.6 +2 -2 src/sys/dev/fb/vgareg.h 1.20 +2 -2 src/sys/dev/firewire/fwdev.c 1.14 +1 -1 src/sys/dev/firewire/fwmem.c 1.5 +2 -2 src/sys/dev/gfb/gfb_pci.c 1.60 +3 -4 src/sys/dev/sound/pcm/dsp.c 1.395 +2 -2 src/sys/dev/syscons/syscons.c 1.23 +6 -3 src/sys/dev/tdfx/tdfx_pci.c 1.5 +5 -3 src/sys/geom/geom_stats.c 1.11 +3 -2 src/sys/i386/i386/elan-mmcr.c 1.103 +6 -3 src/sys/i386/i386/mem.c 1.394 +0 -7 src/sys/i386/i386/pmap.c 1.74 +3 -2 src/sys/i386/isa/pcvt/pcvt_drv.c 1.56 +3 -2 src/sys/i386/isa/spigot.c 1.41 +5 -8 src/sys/i386/isa/vesa.c 1.11 +3 -2 src/sys/ia64/ia64/mem.c 1.95 +0 -6 src/sys/ia64/ia64/pmap.c 1.21 +3 -3 src/sys/isa/vga_isa.c 1.21 +2 -1 src/sys/kern/subr_xxx.c 1.33 +2 -2 src/sys/pc98/pc98/pc98gdc.c 1.183 +2 -2 src/sys/pc98/pc98/syscons.c 1.27 +3 -2 src/sys/pci/agp.c 1.58 +3 -2 src/sys/pci/meteor.c 1.28 +3 -2 src/sys/pci/xrpu.c 1.54 +0 -7 src/sys/powerpc/powerpc/pmap.c 1.101 +0 -7 src/sys/sparc64/sparc64/pmap.c 1.163 +2 -1 src/sys/sys/conf.h 1.62 +7 -7 src/sys/vm/device_pager.c 1.54 +0 -1 src/sys/vm/pmap.h To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message