From mboxrd@z Thu Jan 1 00:00:00 1970 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 77D0BC0015E for ; Fri, 11 Aug 2023 14:01:45 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id CF7E886927; Fri, 11 Aug 2023 16:01:43 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=konsulko.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=konsulko.com header.i=@konsulko.com header.b="NpsPlLx6"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 9149386928; Fri, 11 Aug 2023 16:01:42 +0200 (CEST) Received: from mail-qk1-x72c.google.com (mail-qk1-x72c.google.com [IPv6:2607:f8b0:4864:20::72c]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 7B9C686922 for ; Fri, 11 Aug 2023 16:01:40 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=trini@konsulko.com Received: by mail-qk1-x72c.google.com with SMTP id af79cd13be357-76c9334baedso138010185a.2 for ; Fri, 11 Aug 2023 07:01:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; t=1691762499; x=1692367299; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=XE6PglxzBl1klVbM/9kYyFeCAwVHc2dN6zvHrtE7n9w=; b=NpsPlLx6UiWXze7hOVYjRPEHkxipB+ItBjenM6bWczB6qgHNcdMnYdanmCNTL5fr0Z 586v5Zt/Ccb2cRtUWc621fq7rVNPeAE0fsipv/N97SC4tuYd4aHVwV7F9J5X0Te8VQ6y FWMWMF/s6/JAAl4VaM8gePsCfhcB/Jv+6+hCM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691762499; x=1692367299; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=XE6PglxzBl1klVbM/9kYyFeCAwVHc2dN6zvHrtE7n9w=; b=HgKoiCUGHpgku8YCksIBCNSInmLvHOXP4Md3UM5ceUvpqtFobKHC50xQHRq2tycs4o UzisJV19IvBBKwnKlx3DJTwJ4UwCA/kBKi0MH3sTdnvIcI0BRtWSgUtszV8hcknCwT6C 7rCNMy5fZ8na76yRC8A9lG6m4Rt0TrXgYn7wD28Nbl3Ud+Q445yvTAk9VbtM2cWV1xbo llhnTncnobExAFHgLNPCeWJ9D+HvUlT+DiU3x7sYjhJ+Hc0grg+Tp39S5OaqzzpcqfSI eZlg4ORwHL0Xgg0KRe/9VOiS1HowkLrXrzhGjPgtfd+RWpBMG4oiAEyojQo5Nwf9dmkf ddhg== X-Gm-Message-State: AOJu0Yx2ubbmqKgSazc588p1wYI+EE+7mBzq9ldWdn8xQT1iJ88u8ox0 RFNr0YSRwhUDxcx7IAIUfEbEcw== X-Google-Smtp-Source: AGHT+IExqXMPOLksAYRUpN8KgWqfZWOh9Up0UQYSvlwp/8GuUNzS4iDh/6qylQQPzWU+GRl/T6NB4A== X-Received: by 2002:a05:620a:2590:b0:76c:c055:aa32 with SMTP id x16-20020a05620a259000b0076cc055aa32mr2069032qko.24.1691762499147; Fri, 11 Aug 2023 07:01:39 -0700 (PDT) Received: from bill-the-cat (2603-6081-7b00-6400-b133-f454-a438-5224.res6.spectrum.com. [2603:6081:7b00:6400:b133:f454:a438:5224]) by smtp.gmail.com with ESMTPSA id s22-20020a05620a16b600b0076ca401d8c7sm1202576qkj.111.2023.08.11.07.01.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 11 Aug 2023 07:01:38 -0700 (PDT) Date: Fri, 11 Aug 2023 10:01:36 -0400 From: Tom Rini To: Bhupesh Sharma Cc: u-boot@lists.denx.de, sjg@chromium.org, bhupesh.linux@gmail.com, Peng Fan Subject: Re: [PATCH 1/1] armv8: Fix compilation error with SYS_DCACHE_OFF Message-ID: <20230811140136.GD3630934@bill-the-cat> References: <20230811054228.3721455-1-bhupesh.sharma@linaro.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="BsZuHRg5AOtjlqt0" Content-Disposition: inline In-Reply-To: <20230811054228.3721455-1-bhupesh.sharma@linaro.org> X-Clacks-Overhead: GNU Terry Pratchett 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 --BsZuHRg5AOtjlqt0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Aug 11, 2023 at 11:12:28AM +0530, Bhupesh Sharma wrote: > If CONFIG_SYS_ICACHE_OFF and CONFIG_SYS_DCACHE_OFF are set, we see the > following errors while compiling u-boot: >=20 > arch/arm/cpu/armv8/cpu.c:60: undefined reference to `icache_disable' > aarch64-linux-gnu-ld.bfd: arch/arm/cpu/armv8/cpu.c:68: undefined refere= nce to `dcache_disable' > aarch64-linux-gnu-ld.bfd: arch/arm/cpu/armv8/cpu.c:69: undefined refere= nce to `invalidate_dcache_all' > aarch64-linux-gnu-ld.bfd: arch/arm/cpu/armv8/exception_level.o: in func= tion `entry_non_secure': > arch/arm/cpu/armv8/exception_level.c:29: undefined reference to `dcache= _enable' > aarch64-linux-gnu-ld.bfd: arch/arm/cpu/armv8/exception_level.o: in func= tion `switch_to_non_secure_mode': > arch/arm/cpu/armv8/exception_level.c:52: undefined reference to `dcache= _disable' > aarch64-linux-gnu-ld.bfd: arch/arm/lib/relocate_64.o: in function `relo= cate_done': > arch/arm/lib/relocate_64.S:92: undefined reference to `__asm_flush_dcac= he_range' > aarch64-linux-gnu-ld.bfd: arch/arm/lib/relocate_64.S:93: undefined refe= rence to `__asm_flush_l3_dcache' > aarch64-linux-gnu-ld.bfd: arch/arm/lib/bootm.o: in function `do_nonsec_= virt_switch': > arch/arm/lib/bootm.c:191: undefined reference to `dcache_disable' > aarch64-linux-gnu-ld.bfd: boot/bootm_os.o: in function `do_bootm_qnxelf= ': > boot/bootm_os.c:392: undefined reference to `dcache_status' > aarch64-linux-gnu-ld.bfd: boot/bootm_os.c:394: undefined reference to `= dcache_disable' > aarch64-linux-gnu-ld.bfd: boot/bootm_os.c:399: undefined reference to `= dcache_enable' > aarch64-linux-gnu-ld.bfd: cmd/elf.o: in function `do_bootvx': > cmd/elf.c:280: undefined reference to `dcache_disable' >=20 > While the following error message is expected when SYS_DCACHE_OFF is > set: > arch/arm/cpu/armv8/cache_v8.c:697:2: error: > #error Please describe your MMU layout in CONFIG_SYS_MEM_MAP and en= able dcache. >=20 > the rest of the compilation errors should be fixed. >=20 > Cc: Tom Rini > Cc: Simon Glass > Cc: Peng Fan > Signed-off-by: Bhupesh Sharma > --- > arch/arm/cpu/armv8/Makefile | 6 ++---- > 1 file changed, 2 insertions(+), 4 deletions(-) We should disable SYS_DCACHE_OFF (and SYS_ICACHE_OFF?) for ARMv8, and then rework the Makefiles too. --=20 Tom --BsZuHRg5AOtjlqt0 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmTWP0AACgkQFHw5/5Y0 tyx3jgv/WZJH+tQU4uLeWmb6gScXVb8D0iFCXEeTQwuXG0hYnvv512DeoUqQUTz3 THqB5ZGFMTBQ6hs3Fq48j/L5vC4D4EOTgEvRzj3UwMH+NEleCfyr869sBXABKUw3 ElIujMwcfNZjiV4Q5jZmB+gNS7+htkZD3MKyna3JPA2huK8kjx3hbgm88NQQT607 uVThCo805tAyUw5CpCAJI0moYbW0dq+5rBBmQMJfMExPIkcF3r/vK7WAq5YVQ6c/ tq6h1FXzHk4PqyQdtgLAvkGAub/Or0nzXQG14U+MXtr2sFtsVDUVCmJGlQGRq8sD ZAtaa0PdoDu20nWvC6nrR5pEunpiwtgc/9MQesZd8ykF8Ofdv2xOBr2IlZKWHElR 8eaSVzAXy2aYk80xdG9Egd4AY5MNh72V5hrJ+Sm5Vp5/bbMN0SFM6GAp/QEG8xoH fL3o9h5P5lwP9gY4b+LATs+GVeTTIygzFdoslY5oYpBzdv6NBf39Oj1aoRUeiJSP saW3Ppgw =Xqr9 -----END PGP SIGNATURE----- --BsZuHRg5AOtjlqt0--