From owner-svn-src-all@FreeBSD.ORG Thu Jan 13 00:52:57 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 68DD0106566B; Thu, 13 Jan 2011 00:52:57 +0000 (UTC) (envelope-from mdf@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 588418FC0C; Thu, 13 Jan 2011 00:52:57 +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 p0D0qv0B032598; Thu, 13 Jan 2011 00:52:57 GMT (envelope-from mdf@svn.freebsd.org) Received: (from mdf@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p0D0qvDL032596; Thu, 13 Jan 2011 00:52:57 GMT (envelope-from mdf@svn.freebsd.org) Message-Id: <201101130052.p0D0qvDL032596@svn.freebsd.org> From: Matthew D Fleming Date: Thu, 13 Jan 2011 00:52:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r217337 - head/sys/x86/x86 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Jan 2011 00:52:57 -0000 Author: mdf Date: Thu Jan 13 00:52:57 2011 New Revision: 217337 URL: http://svn.freebsd.org/changeset/base/217337 Log: Revert to using bus_size_t for the bounce_zone's alignment member. Reuqested by: jhb Modified: head/sys/x86/x86/busdma_machdep.c Modified: head/sys/x86/x86/busdma_machdep.c ============================================================================== --- head/sys/x86/x86/busdma_machdep.c Wed Jan 12 23:46:12 2011 (r217336) +++ head/sys/x86/x86/busdma_machdep.c Thu Jan 13 00:52:57 2011 (r217337) @@ -100,7 +100,7 @@ struct bounce_zone { int total_bounced; int total_deferred; int map_count; - uint32_t alignment; + bus_size_t alignment; bus_addr_t lowaddr; char zoneid[8]; char lowaddrid[20]; @@ -993,6 +993,13 @@ busdma_sysctl_tree_top(struct bounce_zon return (bz->sysctl_tree_top); } +#if defined(__amd64__) || defined(PAE) +#define SYSCTL_ADD_BUS_SIZE_T SYSCTL_ADD_UQUAD +#else +#define SYSCTL_ADD_BUS_SIZE_T(ctx, parent, nbr, name, flag, ptr, desc) \ + SYSCTL_ADD_UINT(ctx, parent, nbr, name, flag, ptr, 0, desc) +#endif + static int alloc_bounce_zone(bus_dma_tag_t dmat) { @@ -1060,9 +1067,9 @@ alloc_bounce_zone(bus_dma_tag_t dmat) SYSCTL_ADD_STRING(busdma_sysctl_tree(bz), SYSCTL_CHILDREN(busdma_sysctl_tree_top(bz)), OID_AUTO, "lowaddr", CTLFLAG_RD, bz->lowaddrid, 0, ""); - SYSCTL_ADD_UINT(busdma_sysctl_tree(bz), + SYSCTL_ADD_BUS_SIZE_T(busdma_sysctl_tree(bz), SYSCTL_CHILDREN(busdma_sysctl_tree_top(bz)), OID_AUTO, - "alignment", CTLFLAG_RD, &bz->alignment, 0, ""); + "alignment", CTLFLAG_RD, &bz->alignment, ""); return (0); }