From owner-svn-src-stable-8@FreeBSD.ORG Tue Mar 30 19:36:01 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 524491065670; Tue, 30 Mar 2010 19:36:01 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 40F0D8FC1C; Tue, 30 Mar 2010 19:36:01 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2UJa18H074048; Tue, 30 Mar 2010 19:36:01 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2UJa1ER074045; Tue, 30 Mar 2010 19:36:01 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201003301936.o2UJa1ER074045@svn.freebsd.org> From: Marius Strobl Date: Tue, 30 Mar 2010 19:36:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205911 - in stable/8/sys/sun4v: include sun4v X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Mar 2010 19:36:01 -0000 Author: marius Date: Tue Mar 30 19:36:00 2010 New Revision: 205911 URL: http://svn.freebsd.org/changeset/base/205911 Log: MFC: r203335 - Const'ify the bus_stream_asi and bus_type_asi arrays. - Replace hard-coded functions names missed in bus_machdep.c with __func__. - Break some long lines. Modified: stable/8/sys/sun4v/include/bus.h stable/8/sys/sun4v/sun4v/bus_machdep.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/sun4v/include/bus.h ============================================================================== --- stable/8/sys/sun4v/include/bus.h Tue Mar 30 19:33:09 2010 (r205910) +++ stable/8/sys/sun4v/include/bus.h Tue Mar 30 19:36:00 2010 (r205911) @@ -96,8 +96,8 @@ #define PCI_MEMORY_BUS_SPACE 4 #define LAST_BUS_SPACE 5 -extern int bus_type_asi[]; -extern int bus_stream_asi[]; +extern const int bus_type_asi[]; +extern const int bus_stream_asi[]; #define __BUS_SPACE_HAS_STREAM_METHODS 1 Modified: stable/8/sys/sun4v/sun4v/bus_machdep.c ============================================================================== --- stable/8/sys/sun4v/sun4v/bus_machdep.c Tue Mar 30 19:33:09 2010 (r205910) +++ stable/8/sys/sun4v/sun4v/bus_machdep.c Tue Mar 30 19:36:00 2010 (r205911) @@ -95,7 +95,7 @@ * from: @(#)machdep.c 8.6 (Berkeley) 1/14/94 * from: NetBSD: machdep.c,v 1.111 2001/09/15 07:13:40 eeh Exp * and - * from: FreeBSD: src/sys/i386/i386/busdma_machdep.c,v 1.24 2001/08/15 + * from: FreeBSD: src/sys/i386/i386/busdma_machdep.c,v 1.24 2001/08/15 */ #include @@ -129,8 +129,8 @@ __FBSDID("$FreeBSD$"); static void nexus_bus_barrier(bus_space_tag_t, bus_space_handle_t, bus_size_t, bus_size_t, int); -/* ASI's for bus access. */ -int bus_type_asi[] = { +/* ASIs for bus access */ +const int bus_type_asi[] = { ASI_REAL_IO, /* nexus */ ASI_REAL_IO, /* SBus */ ASI_REAL_IO_L, /* PCI configuration space */ @@ -139,7 +139,7 @@ int bus_type_asi[] = { 0 }; -int bus_stream_asi[] = { +const int bus_stream_asi[] = { ASI_REAL_IO, /* nexus */ ASI_REAL_IO, /* SBus */ ASI_REAL_IO, /* PCI configuration space */ @@ -249,7 +249,7 @@ bus_dma_tag_create(bus_dma_tag_t parent, newtag->dt_segments = NULL; - /* Take into account any restrictions imposed by our parent tag */ + /* Take into account any restrictions imposed by our parent tag. */ if (parent != NULL) { newtag->dt_lowaddr = ulmin(parent->dt_lowaddr, newtag->dt_lowaddr); @@ -551,8 +551,7 @@ nexus_dmamap_load_uio(bus_dma_tag_t dmat if (uio->uio_segflg == UIO_USERSPACE) { td = uio->uio_td; - KASSERT(td != NULL, - ("nexus_dmamap_load_uio: USERSPACE but no proc")); + KASSERT(td != NULL, ("%s: USERSPACE but no proc", __func__)); } nsegs = 0; @@ -652,9 +651,9 @@ nexus_dmamem_alloc(bus_dma_tag_t dmat, v *vaddr = malloc(dmat->dt_maxsize, M_DEVBUF, mflags); } else { /* - * XXX: Use contigmalloc until it is merged into this facility - * and handles multi-seg allocations. Nobody is doing multi-seg - * allocations yet though. + * XXX use contigmalloc until it is merged into this + * facility and handles multi-seg allocations. Nobody + * is doing multi-seg allocations yet though. */ *vaddr = contigmalloc(dmat->dt_maxsize, M_DEVBUF, mflags, 0ul, dmat->dt_lowaddr, @@ -795,8 +794,8 @@ sparc64_bus_mem_unmap(void *bh, bus_size } /* - * Fake up a bus tag, for use by console drivers in early boot when the regular - * means to allocate resources are not yet available. + * Fake up a bus tag, for use by console drivers in early boot when the + * regular means to allocate resources are not yet available. * Addr is the physical address of the desired start of the handle. */ bus_space_handle_t