From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?utf-8?Q?Beno=C3=AEt_Th=C3=A9baudeau?= Date: Tue, 14 May 2013 20:49:11 +0200 (CEST) Subject: [U-Boot] [PATCH v2 4/4] arm: factorize relocate_code routine In-Reply-To: <20130514205158.5f321534@lilith> References: <1368223012-17609-1-git-send-email-albert.u.boot@aribaud.net> <1368525030-5162-3-git-send-email-albert.u.boot@aribaud.net> <1368525030-5162-4-git-send-email-albert.u.boot@aribaud.net> <1368525030-5162-5-git-send-email-albert.u.boot@aribaud.net> <1489195069.818131.1368547310358.JavaMail.root@advansee.com> <20130514183208.7075bd24@lilith> <790034962.819628.1368551866364.JavaMail.root@advansee.com> <20130514205158.5f321534@lilith> Message-ID: <582404602.821126.1368557351096.JavaMail.root@advansee.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Albert, On Tuesday, May 14, 2013 8:51:58 PM, Albert ARIBAUD wrote: > Hi Beno?t, > > On Tue, 14 May 2013 19:17:46 +0200 (CEST), Beno?t Th?baudeau > wrote: > > > Hi Albert, > > > > On Tuesday, May 14, 2013 6:32:08 PM, Albert ARIBAUD wrote: > > > Hi Beno?t, > > > > > > On Tue, 14 May 2013 18:01:50 +0200 (CEST), Beno?t Th?baudeau > > > wrote: > > > > > > > Hi Albert, > > > > > > > > .globl c_runtime_cpu_setup > > > > > c_runtime_cpu_setup: > > > > > > > > > > - bx lr > > > > > + /* > > > > > + * Unlock (actually, disable) the cache now that board_init_f > > > > > + * is done. We could do this earlier but we would need to add > > > > > + * a new C runtime hook, whereas c_runtime_cpu_setup already > > > > > + * exists. > > > > > + * As this routine is just a call to cpu_init_crit, let us > > > > > + * tail-optimize and do a simple branch here. > > > > > + */ > > > > > + b cpu_init_crit > > > > > > > > Shouldn't the "#ifdef CONFIG_CPU_PXA25X" from the original code be kept > > > > here? > > > > > > Yes, it should indeed. Thanks for spotting this! > > > > Have you seen the end of my notes for relocate.S? After all, keeping for > > later > > your patches moving to compiler-generated symbols seems to complicate > > things and > > to be more error-prone. > > (that's unrelated to the PXA25X stuff above, right?) Yes. > I don't think deferring the compiler-generated symbols patches > complicates things, as anyway, they would only apply after this > patch (so as to apply only on a single instance of relocate_code) so > there's no way they could simplify things occurring before them. > > OTOH, they do simplify the code of relocate_code. That's why I put them > in a separate series dealing with optimizing relocate_code. I'll post > this second series right away, and let people decide whether both > series should be merged in a single one. Yes, this is what I meant. Best regards, Beno?t