From mboxrd@z Thu Jan 1 00:00:00 1970 From: Albert ARIBAUD Date: Tue, 9 Sep 2014 13:48:43 +0200 Subject: [U-Boot] [PATCH] arch/arm: Add individual TLB size support. In-Reply-To: <1404710351-37250-1-git-send-email-Li.Xiubo@freescale.com> References: <1404710351-37250-1-git-send-email-Li.Xiubo@freescale.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 Hi Xiubo, On Mon, 7 Jul 2014 13:19:11 +0800, Xiubo Li wrote: > This adds CONFIG_TLB_SIZE for individual board, whose TLB size maybe > larger than PGTABLE_SIZE. > > Signed-off-by: Xiubo Li > --- > arch/arm/lib/board.c | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/arch/arm/lib/board.c b/arch/arm/lib/board.c > index dc34190..b7327ce 100644 > --- a/arch/arm/lib/board.c > +++ b/arch/arm/lib/board.c > @@ -353,7 +353,11 @@ void board_init_f(ulong bootflag) > > #if !(defined(CONFIG_SYS_ICACHE_OFF) && defined(CONFIG_SYS_DCACHE_OFF)) > /* reserve TLB table */ > +#ifdef CONFIG_TLB_SIZE > + gd->arch.tlb_size = CONFIG_TLB_SIZE; > +#else > gd->arch.tlb_size = PGTABLE_SIZE; > +#endif > addr -= gd->arch.tlb_size; > > /* round down to next 64 kB limit */ There is no code in current mainline which defines CONFIG_TLB_SIZE; that makes the patch a dead code addition. Besides, what's the point of this as opposed to, e.g., just defining the right PGTABLE_SIZE, or renaming PGTABLE_SIZE as CONFIG_TLB_SIZE? Amicalement, -- Albert.