From mboxrd@z Thu Jan 1 00:00:00 1970 From: Prabhakar Kushwaha Date: Wed, 19 Jun 2019 11:43:29 +0000 Subject: [U-Boot] [PATCH v3] armv8/fsl-layerscape: Add loop to check L3 dcache status In-Reply-To: <1559059678-32131-1-git-send-email-meenakshi.aggarwal@nxp.com> References: <1558603119-582-1-git-send-email-meenakshi.aggarwal@nxp.com> <1559059678-32131-1-git-send-email-meenakshi.aggarwal@nxp.com> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de > -----Original Message----- > From: Meenakshi Aggarwal > Sent: Tuesday, May 28, 2019 9:38 PM > To: u-boot at lists.denx.de; Prabhakar Kushwaha > > Cc: Meenakshi Aggarwal ; Udit Kumar > > Subject: [PATCH v3] armv8/fsl-layerscape: Add loop to check L3 dcache status > > Flushing L3 cache may need variable time depending upon cache line allocation. > > Coming up with a proper timeout value would be best handled by simulations > under multiple scenarios in your actual system. > From the purely HN-F point of view, the flush would take ~15 cycles for a clean > line, and ~22 cycles for a dirty line. For the dirty line case, there are many > variables outside the HN-F that will increase the duration per line. For example, > a *DBIDResp from the SN-F/SBSX, memory controller latency, SN-F/SBSX > RetryAck responses, CCN ring congestion, CCN ring hops, etc, etc. The worst- > case timeout would have to factor in all of these variables plus the HN-F cycles > for every line in the L3, and assuming all lines are dirty > > In case if L3 is not flushed properly, system behaviour will be erratic, so remove > timeout and add loop to check status of L3 cache. > > System will stuck in while loop if there is some issue in L3 cache flushing. > > Signed-off-by: Udit Kumar > Signed-off-by: Meenakshi Aggarwal > > --- > changed for v2: > - An increase in timeout doesn't ensure completion of > L3 cache flushing operation. So checking the L3 cache > status till it succedd. > > changed for v3: > - Updated Copyright > - add loop to poll for l3 dcache status in hnf_pstate_poll > function > - removed timeout related code as it is not needed > --- This patch has been applied to fsl-qoriq master, awaiting upstream. --pk