Re: svn commit: r285270 - head/sys/sys

2015-07-08 Thread Andrew Turner
On Wed, 8 Jul 2015 13:53:00 + (UTC) Zbigniew Bodek z...@freebsd.org wrote: Author: zbb Date: Wed Jul 8 13:52:59 2015 New Revision: 285270 URL: https://svnweb.freebsd.org/changeset/base/285270 Log: Add memory barrier to bus_dmamap_sync() On platforms which are fully

svn commit: r285270 - head/sys/sys

2015-07-08 Thread Zbigniew Bodek
Author: zbb Date: Wed Jul 8 13:52:59 2015 New Revision: 285270 URL: https://svnweb.freebsd.org/changeset/base/285270 Log: Add memory barrier to bus_dmamap_sync() On platforms which are fully IO-coherent, the map might be null. We need to guarantee that all data is observable after the

Re: svn commit: r285270 - head/sys/sys

2015-07-08 Thread Adrian Chadd
Why is this implemented in sys/sys/bus_dma.h, rather than in a machdep header? -a On 8 July 2015 at 06:53, Zbigniew Bodek z...@freebsd.org wrote: Author: zbb Date: Wed Jul 8 13:52:59 2015 New Revision: 285270 URL: https://svnweb.freebsd.org/changeset/base/285270 Log: Add memory

Re: svn commit: r285270 - head/sys/sys

2015-07-08 Thread Zbigniew Bodek
Because machdep header includes this file (not the other way). Best regards zbb 2015-07-08 16:30 GMT+02:00 Adrian Chadd adrian.ch...@gmail.com: Why is this implemented in sys/sys/bus_dma.h, rather than in a machdep header? -a On 8 July 2015 at 06:53, Zbigniew Bodek z...@freebsd.org wrote:

Re: svn commit: r285270 - head/sys/sys

2015-07-08 Thread Ian Lepore
On Wed, 2015-07-08 at 07:30 -0700, Adrian Chadd wrote: Why is this implemented in sys/sys/bus_dma.h, rather than in a machdep header? Indeed, this stuff is a mess that really needs to be cleaned up. The pre-existing assumption that MI functions don't need to be called, just because one of

Re: svn commit: r285270 - head/sys/sys

2015-07-08 Thread Adrian Chadd
On 8 July 2015 at 07:42, Ian Lepore i...@freebsd.org wrote: On Wed, 2015-07-08 at 07:30 -0700, Adrian Chadd wrote: Why is this implemented in sys/sys/bus_dma.h, rather than in a machdep header? Indeed, this stuff is a mess that really needs to be cleaned up. The pre-existing assumption

Re: svn commit: r285270 - head/sys/sys

2015-07-08 Thread Jason Harmening
+2 This has always bugged me. I'll do it if no one else gets to it first. If the new pmap KPI makes it in, I'll be messing with a bunch of the MD busdma code anyway. On Wed, Jul 8, 2015 at 9:47 AM, Adrian Chadd adrian.ch...@gmail.com wrote: On 8 July 2015 at 07:42, Ian Lepore

Re: svn commit: r285270 - head/sys/sys

2015-07-08 Thread Zbigniew Bodek
Hello, You are absolutely right. Especially semicolons... I must have missed this somehow. Thanks. Fixed in r285293. Best regards zbb 2015-07-08 21:47 GMT+02:00 John-Mark Gurney j...@funkthat.com: Zbigniew Bodek wrote this message on Wed, Jul 08, 2015 at 13:53 +: +#if defined(__arm__) +

Re: svn commit: r285270 - head/sys/sys

2015-07-08 Thread John-Mark Gurney
Zbigniew Bodek wrote this message on Wed, Jul 08, 2015 at 13:53 +: +#if defined(__arm__) + #define __BUS_DMAMAP_SYNC_DEFAULT mb(); +#elif defined(__aarch64__) + #define __BUS_DMAMAP_SYNC_DEFAULT dmb(sy); These shouldn't have ; after them... +#else +