svn commit: r217330 - head/sys/x86/x86

John Baldwin jhb at freebsd.org
Wed Jan 12 22:20:52 UTC 2011


On Wednesday, January 12, 2011 4:27:40 pm mdf at freebsd.org wrote:
> On Wed, Jan 12, 2011 at 1:21 PM, John Baldwin <jhb at freebsd.org> wrote:
> > On Wednesday, January 12, 2011 4:08:50 pm Matthew D Fleming wrote:
> >> Author: mdf
> >> Date: Wed Jan 12 21:08:49 2011
> >> New Revision: 217330
> >> URL: http://svn.freebsd.org/changeset/base/217330
> >>
> >> Log:
> >>   Fix a brain fart.  Since this file is shared between i386 and amd64, a
> >>   bus_size_t may be 32 or 64 bits.  Change the bounce_zone alignment field
> >>   to explicitly be 32 bits, as I can't really imagine a DMA device that
> >>   needs anything close to 2GB alignment of data.
> >
> > Hmm, we do have devices with 4GB boundaries though.  I think I'd prefer it if
> > you instead if you did this:
> >
> > #if defined(amd64) || defined(PAE)
> > #define SYSCTL_ADD_BUS_SIZE_T           SYSCTL_ADD_UQUAD
> > #else
> > #define SYSCTL_ADD_BUS_SIZE_T           SYSCTL_ADD_UINT
> > #endif
> >
> > and then just used SYSCTL_ADD_BUS_SIZE_T() in the code so we could let the
> > members in the bounce zone retain the same types passed to
> > bus_dma_tag_create().
> 
> But would there be a device that can't start DMA except on a 4GB
> boundary?  I thought that's what this member was for.

Probably not today, but I'd still prefer the types to be the real types. :)

If this wasn't in x86 I'd imagine we'd be leaving the types as the real types
and that other platforms that use bounce zones probably use the real types here
as well.

-- 
John Baldwin


More information about the svn-src-all mailing list