[PATCH 4/6] drm/radeon: Add a rmb() in IH processing

2011-07-15 Thread Benjamin Herrenschmidt
On Fri, 2011-07-15 at 04:19 +, Matt Turner wrote: > On Wed, Jul 13, 2011 at 6:28 AM, Benjamin Herrenschmidt > wrote: > > We should have a read memory barrier between reading the WPTR from > > memory and reading ring entries based on that value (ie, we need to > > ensure both loads are done in

[PATCH 4/6] drm/radeon: Add a rmb() in IH processing

2011-07-15 Thread Matt Turner
On Wed, Jul 13, 2011 at 6:28 AM, Benjamin Herrenschmidt wrote: > We should have a read memory barrier between reading the WPTR from > memory and reading ring entries based on that value (ie, we need to > ensure both loads are done in order by the CPU). > > It could be argued that the MMIO reads in

Re: [PATCH 4/6] drm/radeon: Add a rmb() in IH processing

2011-07-14 Thread Benjamin Herrenschmidt
On Fri, 2011-07-15 at 04:19 +, Matt Turner wrote: > On Wed, Jul 13, 2011 at 6:28 AM, Benjamin Herrenschmidt > wrote: > > We should have a read memory barrier between reading the WPTR from > > memory and reading ring entries based on that value (ie, we need to > > ensure both loads are done in

Re: [PATCH 4/6] drm/radeon: Add a rmb() in IH processing

2011-07-14 Thread Matt Turner
On Wed, Jul 13, 2011 at 6:28 AM, Benjamin Herrenschmidt wrote: > We should have a read memory barrier between reading the WPTR from > memory and reading ring entries based on that value (ie, we need to > ensure both loads are done in order by the CPU). > > It could be argued that the MMIO reads in

[PATCH 4/6] drm/radeon: Add a rmb() in IH processing

2011-07-14 Thread Benjamin Herrenschmidt
On Wed, 2011-07-13 at 10:48 -0400, Alex Deucher wrote: > On Wed, Jul 13, 2011 at 10:43 AM, Alex Deucher > wrote: > > On Wed, Jul 13, 2011 at 2:28 AM, Benjamin Herrenschmidt > > wrote: > >> We should have a read memory barrier between reading the WPTR from > >> memory and reading ring entries bas

[PATCH 4/6] drm/radeon: Add a rmb() in IH processing

2011-07-13 Thread Alex Deucher
On Wed, Jul 13, 2011 at 5:42 PM, Benjamin Herrenschmidt wrote: > On Wed, 2011-07-13 at 10:48 -0400, Alex Deucher wrote: >> On Wed, Jul 13, 2011 at 10:43 AM, Alex Deucher >> wrote: >> > On Wed, Jul 13, 2011 at 2:28 AM, Benjamin Herrenschmidt >> > wrote: >> >> We should have a read memory barrier

Re: [PATCH 4/6] drm/radeon: Add a rmb() in IH processing

2011-07-13 Thread Alex Deucher
On Wed, Jul 13, 2011 at 5:42 PM, Benjamin Herrenschmidt wrote: > On Wed, 2011-07-13 at 10:48 -0400, Alex Deucher wrote: >> On Wed, Jul 13, 2011 at 10:43 AM, Alex Deucher wrote: >> > On Wed, Jul 13, 2011 at 2:28 AM, Benjamin Herrenschmidt >> > wrote: >> >> We should have a read memory barrier bet

[PATCH 4/6] drm/radeon: Add a rmb() in IH processing

2011-07-13 Thread Benjamin Herrenschmidt
We should have a read memory barrier between reading the WPTR from memory and reading ring entries based on that value (ie, we need to ensure both loads are done in order by the CPU). It could be argued that the MMIO reads in r600_ack_irq() might be enough to get that barrier but I prefer keeping

Re: [PATCH 4/6] drm/radeon: Add a rmb() in IH processing

2011-07-13 Thread Benjamin Herrenschmidt
On Wed, 2011-07-13 at 10:48 -0400, Alex Deucher wrote: > On Wed, Jul 13, 2011 at 10:43 AM, Alex Deucher wrote: > > On Wed, Jul 13, 2011 at 2:28 AM, Benjamin Herrenschmidt > > wrote: > >> We should have a read memory barrier between reading the WPTR from > >> memory and reading ring entries based

[PATCH 4/6] drm/radeon: Add a rmb() in IH processing

2011-07-13 Thread Benjamin Herrenschmidt
We should have a read memory barrier between reading the WPTR from memory and reading ring entries based on that value (ie, we need to ensure both loads are done in order by the CPU). It could be argued that the MMIO reads in r600_ack_irq() might be enough to get that barrier but I prefer keeping

[PATCH 4/6] drm/radeon: Add a rmb() in IH processing

2011-07-13 Thread Alex Deucher
On Wed, Jul 13, 2011 at 10:43 AM, Alex Deucher wrote: > On Wed, Jul 13, 2011 at 2:28 AM, Benjamin Herrenschmidt > wrote: >> We should have a read memory barrier between reading the WPTR from >> memory and reading ring entries based on that value (ie, we need to >> ensure both loads are done in or

[PATCH 4/6] drm/radeon: Add a rmb() in IH processing

2011-07-13 Thread Alex Deucher
On Wed, Jul 13, 2011 at 2:28 AM, Benjamin Herrenschmidt wrote: > We should have a read memory barrier between reading the WPTR from > memory and reading ring entries based on that value (ie, we need to > ensure both loads are done in order by the CPU). > > It could be argued that the MMIO reads in

Re: [PATCH 4/6] drm/radeon: Add a rmb() in IH processing

2011-07-13 Thread Alex Deucher
On Wed, Jul 13, 2011 at 10:43 AM, Alex Deucher wrote: > On Wed, Jul 13, 2011 at 2:28 AM, Benjamin Herrenschmidt > wrote: >> We should have a read memory barrier between reading the WPTR from >> memory and reading ring entries based on that value (ie, we need to >> ensure both loads are done in or

Re: [PATCH 4/6] drm/radeon: Add a rmb() in IH processing

2011-07-13 Thread Alex Deucher
On Wed, Jul 13, 2011 at 2:28 AM, Benjamin Herrenschmidt wrote: > We should have a read memory barrier between reading the WPTR from > memory and reading ring entries based on that value (ie, we need to > ensure both loads are done in order by the CPU). > > It could be argued that the MMIO reads in