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 563B3C433F5 for ; Mon, 21 Feb 2022 10:24:45 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 0F6B68388F; Mon, 21 Feb 2022 11:24:43 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=walle.cc 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; secure) header.d=walle.cc header.i=@walle.cc header.b="q/Me1MNM"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 10AC08386D; Mon, 21 Feb 2022 11:24:41 +0100 (CET) Received: from ssl.serverraum.org (ssl.serverraum.org [176.9.125.105]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id AFC798386D for ; Mon, 21 Feb 2022 11:24:37 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=walle.cc Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=michael@walle.cc Received: from ssl.serverraum.org (web.serverraum.org [172.16.0.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ssl.serverraum.org (Postfix) with ESMTPSA id EAAFE2223E; Mon, 21 Feb 2022 11:24:36 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=walle.cc; s=mail2016061301; t=1645439077; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=XdhXlHXdh/4+esszxFeMmOMUu1QLooz9Q99LH3rbQ7A=; b=q/Me1MNMQQr2qqLRPM61R7LQJKs7szy05EGRZ8MQTViv/hUugVuRswJtvZu6ZKfQhgXMmD PCWjZfZdAZKJVyAlLmg0mQlEy0oP470w07gW6fueKZkyfnDcJwZbGMr1hWPvEjh+O9YPLB dQwzbBFOQdSlLVXJFDh1kML5JWjXKLo= MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Mon, 21 Feb 2022 11:24:36 +0100 From: Michael Walle To: Wasim Khan , Marc Zyngier Cc: sjg@chromium.org, priyanka.jain@nxp.com, treding@nvidia.com, twarren@nvidia.com, V.Sethi@nxp.com, u-boot@lists.denx.de, Wasim Khan Subject: Re: [PATCH] armv8: fsl-layerscape: use previous aligned address for gic_lpi_base In-Reply-To: <20220221101616.1195186-1-wasim.khan@oss.nxp.com> References: <20220221101616.1195186-1-wasim.khan@oss.nxp.com> User-Agent: Roundcube Webmail/1.4.12 Message-ID: <25ff6150a612a113449f9f2068ca1060@walle.cc> X-Sender: michael@walle.cc 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.5 at phobos.denx.de X-Virus-Status: Clean Hi, Am 2022-02-21 11:16, schrieb Wasim Khan: > From: Wasim Khan > > Memory after gd->arch.resv_ram is reserved for MC block. > Use ALIGN_DOWN to avoid updating MC block for unaligned > address. I cannot really tell what you are trying to do here. But I know Marc has offered to also take a look at the GIC/LPI stuff. So I've put him on CC. -michael > > Signed-off-by: Wasim Khan > --- > arch/arm/cpu/armv8/fsl-layerscape/soc.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/arch/arm/cpu/armv8/fsl-layerscape/soc.c > b/arch/arm/cpu/armv8/fsl-layerscape/soc.c > index d3a5cfaac1..746c93cf51 100644 > --- a/arch/arm/cpu/armv8/fsl-layerscape/soc.c > +++ b/arch/arm/cpu/armv8/fsl-layerscape/soc.c > @@ -65,7 +65,7 @@ int ls_gic_rd_tables_init(void *blob) > u64 gic_lpi_base; > int ret; > > - gic_lpi_base = ALIGN(gd->arch.resv_ram - GIC_LPI_SIZE, SZ_64K); > + gic_lpi_base = ALIGN_DOWN(gd->arch.resv_ram - GIC_LPI_SIZE, SZ_64K); > ret = fdt_add_resv_mem_gic_rd_tables(blob, gic_lpi_base, > GIC_LPI_SIZE); > if (ret) > return ret;