Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 32805EB64DA for ; Wed, 14 Jun 2023 09:46:10 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id EF6DF84727; Wed, 14 Jun 2023 11:46:06 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=ti.com header.i=@ti.com header.b="qG/vRfjh"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id E4FC1847A0; Wed, 14 Jun 2023 11:46:04 +0200 (CEST) Received: from lelv0142.ext.ti.com (lelv0142.ext.ti.com [198.47.23.249]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 9051580EB1 for ; Wed, 14 Jun 2023 11:46:01 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=devarsht@ti.com Received: from lelv0265.itg.ti.com ([10.180.67.224]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id 35E9jxMv122467; Wed, 14 Jun 2023 04:45:59 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1686735959; bh=P9tXdHy9USm+xIn/w1UwWxew05OaQp7/Qv23W0IfbGg=; h=Date:Subject:To:CC:References:From:In-Reply-To; b=qG/vRfjh/o9iupdBhW3WK610TyzIV9K46AgBwyETAZflyJJeQpcRSzLsEmD1fXAxO YMNanRNm1nn9T+9/F3YWMIZWhCiEcA4uaERcWHpsMDDPAkBnuQJ0+DdUnXK0mjRRrv eFuO7vnMhbMitJ+ip7chAMm69ERpJVWUyxEFHSMw= Received: from DFLE109.ent.ti.com (dfle109.ent.ti.com [10.64.6.30]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 35E9jxo7017020 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 14 Jun 2023 04:45:59 -0500 Received: from DFLE107.ent.ti.com (10.64.6.28) by DFLE109.ent.ti.com (10.64.6.30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Wed, 14 Jun 2023 04:45:58 -0500 Received: from lelv0327.itg.ti.com (10.180.67.183) by DFLE107.ent.ti.com (10.64.6.28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23 via Frontend Transport; Wed, 14 Jun 2023 04:45:58 -0500 Received: from [172.24.145.199] (ileaxei01-snat2.itg.ti.com [10.180.69.6]) by lelv0327.itg.ti.com (8.15.2/8.15.2) with ESMTP id 35E9jucX075396; Wed, 14 Jun 2023 04:45:57 -0500 Message-ID: Date: Wed, 14 Jun 2023 15:15:55 +0530 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 Subject: Re: [PATCH V3 2/8] arch: arm: mach-k3: common: Return a pointer after setting page table Content-Language: en-US To: Nikhil M Jain , CC: , , , References: <20230614093440.52797-1-n-jain1@ti.com> <20230614093440.52797-3-n-jain1@ti.com> From: Devarsh Thakkar In-Reply-To: <20230614093440.52797-3-n-jain1@ti.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean On 14/06/23 15:04, Nikhil M Jain wrote: > In spl_dcache_enable after setting up page table, set gd->relocaddr > pointer to tlb_addr, to get next location to reserve memory. Align > tlb_addr with 64KB address. > > Signed-off-by: Nikhil M Jain Reviewed-by: Devarsh Thakkar > --- > V3: > - No change. > > V2: > - Perform 64KB alignment on tlb_addr. > > arch/arm/mach-k3/common.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/arch/arm/mach-k3/common.c b/arch/arm/mach-k3/common.c > index 0e045919dd..9cd912c523 100644 > --- a/arch/arm/mach-k3/common.c > +++ b/arch/arm/mach-k3/common.c > @@ -624,8 +624,10 @@ void spl_enable_dcache(void) > ram_top = (phys_addr_t) 0x100000000; > > gd->arch.tlb_addr = ram_top - gd->arch.tlb_size; > + gd->arch.tlb_addr &= ~(0x10000 - 1); > debug("TLB table from %08lx to %08lx\n", gd->arch.tlb_addr, > gd->arch.tlb_addr + gd->arch.tlb_size); > + gd->relocaddr = gd->arch.tlb_addr; > > dcache_enable(); > #endif