From owner-cvs-src-old@FreeBSD.ORG Wed Dec 30 18:16:21 2009 Return-Path: Delivered-To: cvs-src-old@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B8309106568F for ; Wed, 30 Dec 2009 18:16:21 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 8B2A48FC2A for ; Wed, 30 Dec 2009 18:16:21 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id nBUIGLNT016648 for ; Wed, 30 Dec 2009 18:16:21 GMT (envelope-from marcel@repoman.freebsd.org) Received: (from svn2cvs@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id nBUIGLb1016647 for cvs-src-old@freebsd.org; Wed, 30 Dec 2009 18:16:21 GMT (envelope-from marcel@repoman.freebsd.org) Message-Id: <200912301816.nBUIGLb1016647@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: svn2cvs set sender to marcel@repoman.freebsd.org using -f From: Marcel Moolenaar Date: Wed, 30 Dec 2009 18:15:25 +0000 (UTC) To: cvs-src-old@freebsd.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/sys/conf files.ia64 src/sys/ia64/ia64 bus_machdep.c machdep.c mp_machdep.c nexus.c sys_machdep.c src/sys/ia64/include bus.h cpufunc.h X-BeenThere: cvs-src-old@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: **OBSOLETE** CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Dec 2009 18:16:21 -0000 marcel 2009-12-30 18:15:25 UTC FreeBSD src repository Modified files: sys/conf files.ia64 sys/ia64/ia64 machdep.c mp_machdep.c nexus.c sys_machdep.c sys/ia64/include bus.h cpufunc.h Added files: sys/ia64/ia64 bus_machdep.c Log: SVN rev 201269 on 2009-12-30 18:15:25Z by marcel Revamp bus_space access functions: o Optimize for memory mapped I/O by making all I/O port acceses function calls and marking the test for the IA64_BUS_SPACE_IO tag with __predict_false(). Implement the I/O port access functions in a new file, called bus_machdep.c. o Change the bus_space_handle_t for memory mapped I/O to the virtual address rather than the physical address. This eliminates the PA->VA translation for every I/O access. The handle for I/O port access is still the port number. o Move inb(), outb(), inw(), outw(), inl(), outl(), and their string variants from cpufunc.h and define them in bus.h. On ia64 these are not CPU functions at all. In bus.h they are merely aliases for the new I/O port access functions defined in bus_machdep.h. o Handle the ACPI resource bug in nexus_set_resource(). There we can do it once so that we don't have to worry about it whenever we need to write to an I/O port that is really a memory mapped address. The upshot of this change is that the KBI is better defined and that I/O port access always involves a function call, allowing us to change the actual implementation without breaking the KBI. For memory mapped I/O the virtual address is abstracted, so that we can change the VA->PA mapping in the kernel without causing an KBI breakage. The exception at this time is for bus_space_map() and bus_space_unmap(). MFC after: 1 week. Revision Changes Path 1.103 +1 -0 src/sys/conf/files.ia64 1.1 +356 -0 src/sys/ia64/ia64/bus_machdep.c (new) 1.253 +0 -10 src/sys/ia64/ia64/machdep.c 1.78 +1 -1 src/sys/ia64/ia64/mp_machdep.c 1.22 +25 -12 src/sys/ia64/ia64/nexus.c 1.9 +1 -0 src/sys/ia64/ia64/sys_machdep.c 1.24 +399 -388 src/sys/ia64/include/bus.h 1.26 +0 -120 src/sys/ia64/include/cpufunc.h