lkml.org 
[lkml]   [2021]   [Nov]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 2/2] irqchip: Add Qualcomm MPM controller driver
On Tue, 30 Nov 2021 07:49:48 +0000,
Maulik Shah <quic_mkshah@quicinc.com> wrote:
>
> [1 <text/plain; UTF-8 (7bit)>]
> Hi Shawn,
>
> On 11/30/2021 8:01 AM, Shawn Guo wrote:
> >>>>> + do {
> >>>>> + r_val = readl(priv->base + offset);
> >>>>> + udelay(5);
> >>>>> + } while (r_val != val);
> >>>> What? Is this waiting for a bit to clear? Why isn't this one of the
> >>>> read*_poll_timeout*() function instead? Surely you can't wait forever
> >>>> here.
> >>> This is taken from downstream, and it seems to double check the written
> >>> value by reading it back. But to be honest, I'm not really this is
> >>> necessary. I will do some testing with the read-back check dropped.
> >> How about asking for specs instead? There are QC people on Cc, and
> >> many more reading the list. Hopefully they can explain what this is
> >> all about.
> > Maulik,
> >
> > If you have some information about this, that would be great.
>
> This can be converted to read poll_timeout(). This was introduced in
> place of wmb() to make sure writes are completed.

A string of reads isn't equivalent to a dsb(st). If there is a
requirement for the write to complete, then use the required barrier.

M.

--
Without deviation from the norm, progress is not possible.

\
 
 \ /
  Last update: 2021-11-30 09:48    [W:0.099 / U:1.032 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site