Hi Arnd,
>> >* On other platforms, polling the register is likely required because
>> > an MMIO write is "posted", meaning that a sync after writel() will
>> > only ensure that it has left the CPU write queue, but it may still be
>> > on the bus fabric and whatever side-effects are triggered by
On Wednesday, May 25, 2016 6:49:18 PM CEST Sricharan wrote:
> Hi Arnd,
>
> >> Ok, so i was doing this from the idea that, other iommu drivers
> >> where polling on a status bit in their sync call to ensure completion
> >> of pending TLB invalidations. But in this case, there is no status bit.
> >
Hi Arnd,
>> Ok, so i was doing this from the idea that, other iommu drivers
>> where polling on a status bit in their sync call to ensure completion
>> of pending TLB invalidations. But in this case, there is no status bit.
>> So added a barrier to have no ordering issues before the client
>> tr
On Wednesday, May 25, 2016 4:15:31 PM CEST Sricharan wrote:
> >
> >Any operation that could trigger a DMA from a device is required
> >to have a barrier preceding it (usually wmb() one implied by writel()),
> >so this is clearly not about a driver that installs a DMA mapping
> >before starting a DM
Hi Arnd,
>> I had measured the numbers only for the full usecase path, not for the
>> reset path alone. I saw improvement of about 5% on full numbers.
>> As you said, the reset path would be called only less often
>> and might not bring a measurable change. I did not see a difference in
>> beha
On Monday, May 23, 2016 11:35:04 AM CEST Sricharan wrote:
> Hi Arnd,
>
> >> @@ -124,6 +124,9 @@ static void msm_iommu_reset(void __iomem *base, int
> >> ncb)
> >>SET_TLBLKCR(base, ctx, 0);
> >>SET_CONTEXTIDR(base, ctx, 0);
> >>}
> >> +
> >> + /* Ensure completion of r
Hi Arnd,
>> @@ -124,6 +124,9 @@ static void msm_iommu_reset(void __iomem *base, int ncb)
>> SET_TLBLKCR(base, ctx, 0);
>> SET_CONTEXTIDR(base, ctx, 0);
>> }
>> +
>> +/* Ensure completion of relaxed writes from the above SET macros */
>> +mb();
>> }
>
>Why do
On Friday 20 May 2016 13:44:10 Arnd Bergmann wrote:
> > #define GET_CTX_REG(reg, base, ctx) \
> > (readl((base) + (reg) + ((ctx) << CTX_SHIFT)))
> >
> > -#define SET_GLOBAL_REG(reg, base, val) writel((val), ((base) +
> > (reg)))
> > +/*
> > + * The writes to
On Friday 20 May 2016 16:24:53 Sricharan R wrote:
> While using the generic pagetable ops the tlb maintenance
> operation gets completed in the sync callback. So use writel_relaxed
> for all register access and add a mb() at appropriate places.
>
> Signed-off-by: Sricharan R
> ---
> drivers/iomm