From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mike Frysinger Date: Thu, 5 Jan 2012 18:15:48 -0500 Subject: [U-Boot] [PATCH v2 3/9] openrisc: Add cpu files In-Reply-To: <20111222113932.GA4189@chokladfabriken.org> References: <1322370297-22892-1-git-send-email-stefan.kristiansson@saunalahti.fi> <4EF2F3CA.9080303@monstr.eu> <20111222113932.GA4189@chokladfabriken.org> Message-ID: <201201051815.49122.vapier@gentoo.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Thursday 22 December 2011 06:39:32 Stefan Kristiansson wrote: > On Thu, Dec 22, 2011 at 10:09:30AM +0100, Michal Simek wrote: > > Stefan Kristiansson wrote: > > >+ > > >+void dcache_enable(void) > > >+{ > > >+ mtspr(SPR_SR, mfspr(SPR_SR) | SPR_SR_DCE); > > >+ asm volatile("l.nop"); > > >+ asm volatile("l.nop"); > > >+ asm volatile("l.nop"); > > >+ asm volatile("l.nop"); > > >+ asm volatile("l.nop"); > > >+ asm volatile("l.nop"); > > >+ asm volatile("l.nop"); > > >+ asm volatile("l.nop"); > > > > This is interesting. Are there 8 nops? > > Is there any reason for that? Is it just any waiting? > > If yes, maybe it will be worth to add any comment. > > Yes, the number of nops are kind of arbitrary, > they are there to add some headroom for the cache > to startup without any load/stores in flight. > > But you are right, a comment about this might be in place. this is usually why the ISA provides some sort of sync or latch mechanism. that way code is deterministic instead of being unsettling arbitrary (like it is here). -mike -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 836 bytes Desc: This is a digitally signed message part. URL: