Re: correct use of bus_dmamap_sync

From: Scott Long (scottl_at_samsco.org)
Date: 10/27/05

  • Next message: Scott Long: "Re: locking in a device driver"
    Date: Thu, 27 Oct 2005 07:54:40 -0600
    To: Dinesh Nair <dinesh@alphaque.com>
    
    

    Dinesh Nair wrote:
    >
    > On 10/27/05 04:16 Scott Long said the following:
    >
    >>>> an example would be using
    >>>> (BUS_DMASYNC_POSTREAD|BUS_DMASYNC_PREWRITE) which
    >>>> would be 0x03 in freebsd 4.x and 0x06 in freebsd 5.x. the gotcha is
    >>>> that
    >>>> 0x03 in freebsd 4.x is BUS_DMASYNC_POSTWRITE. so therefore,
    >>>> BUS_DMASYNC_POSTREAD|BUS_DMASYNC_PREWRITE will be
    >>>> BUS_DMASYNC_POSTWRITE in
    >>>> 4.x which in the syscall is actually a no op.
    >>>
    >>>
    >>> Yes, that is fugly. Just don't use the | versions for now I would
    >>> guess.
    >>
    >>
    >> Trying to maintain source compatibility between 4.x and 5.x/6.x will
    >> make you encounter a whole lot more problems than just this.
    >
    >
    > could you elaborate on what busdma related problems there'd be, between
    > 4.x and 5.x/6.x ? do, for example, the inner workings of the bus_dma*
    > syscalls work the same on both ?
    >

    I was speaking about driver code in general. For busdma specifically,
    the only difference is the extra arguments to bus_dma_tag_create().

    Scott
    _______________________________________________
    freebsd-hackers@freebsd.org mailing list
    http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
    To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"


  • Next message: Scott Long: "Re: locking in a device driver"