From patchwork Fri Aug 11 05:42:28 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bhupesh Sharma X-Patchwork-Id: 712596 Delivered-To: patch@linaro.org Received: by 2002:a05:6359:baf:b0:129:c516:61db with SMTP id gf47csp1071996rwb; Thu, 10 Aug 2023 22:42:45 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGwEBCkPc2FKHnEfZV6WPC7PbeC88+IhFWc+QYswbO60EHJBlv1WQhN9ZcYLSWmoSnoPIWy X-Received: by 2002:a5d:5105:0:b0:317:6b16:497e with SMTP id s5-20020a5d5105000000b003176b16497emr535236wrt.42.1691732565508; Thu, 10 Aug 2023 22:42:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691732565; cv=none; d=google.com; s=arc-20160816; b=yxUQyjbI64EKLgGjpoZQ5P5nSHHVt8UI2dK6BZz4zfqv7fNh1/a4ypwlVC8OfP+f9y FGzkP7Le+pXYckqKhRf3X9MU7hwffa5B8zahsB65Ius92bdo1mm8jiNmJo5tCLiSFy5c S7w8VDRHQSicfrYL6n8BQaKnak+mH6ecxB76CHlJ9MmYbsoOMt2/8g4Zhayg7gAizkjk f5BFNeXQY+AYMkygHzXdqTvqnCAjts0Kbmo8HMrtMQT/Kg+PUdmkATxyt08a0904x/0s 9wytvT4O9WURXibZiHWdbyTt3hgNfJA1IMr0ddy3X0Ys25JVIBABghTXQlRm+7ob3nyg 3/Ww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:cc:to:from:dkim-signature; bh=/55hmvEjHXUAIxqd5OaJCT0udHRL8BvO4EJwrgnzYtM=; fh=MDTzgJKs4XQnK6ph6dGI2SesfHHY3ZXriAcZ2DzNDDU=; b=Z2DR2jADcRsX7VJmN3YNHOYa8rgco0ie7dehUWjpzd9SRvoX1yTfTiJ9zg3eDbLjrZ BMJZtI29DrvxDLBF1Q5AttOSmn0hnqPTmTki0KP3o0v+DZyB/EBl0Sv3/Xm63du1J6l0 On1w1BJC2Jgb1wyuG+OuPbmPjCKK2TBx8PvrVW5kWDIAEFcrH12F82/8XPHpDRMl45W/ Re/gkDZtD4WJmYt30Z9dLiNOozRhisohUVbITTiio1jPVzg+1qZHLlfNUiw78mHwQswc Oj7xtGj9+Q2cpBqzzELAh4OoZZuIsmn0LToe5SHOS3HcQWXUqWxm/aS56jD9nT+Iij// UcFQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=cXeCFlST; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from phobos.denx.de (phobos.denx.de. [85.214.62.61]) by mx.google.com with ESMTPS id f21-20020a1c6a15000000b003fe5a3d70e2si3220499wmc.93.2023.08.10.22.42.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Aug 2023 22:42:45 -0700 (PDT) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) client-ip=85.214.62.61; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=cXeCFlST; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 38FE1868DB; Fri, 11 Aug 2023 07:42:44 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="cXeCFlST"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 9936F868DE; Fri, 11 Aug 2023 07:42:43 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-pl1-x62e.google.com (mail-pl1-x62e.google.com [IPv6:2607:f8b0:4864:20::62e]) (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 6669C861E6 for ; Fri, 11 Aug 2023 07:42:41 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=bhupesh.sharma@linaro.org Received: by mail-pl1-x62e.google.com with SMTP id d9443c01a7336-1bc83a96067so12199665ad.0 for ; Thu, 10 Aug 2023 22:42:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1691732559; x=1692337359; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=/55hmvEjHXUAIxqd5OaJCT0udHRL8BvO4EJwrgnzYtM=; b=cXeCFlSTCKkTBI33zmHtoF+2CH25gAsuZy047PTbn6cBPRqSHOjviVHd3wwjPr3g1q rVLsBVC6KQMQqI4XvYUavneA1rakcbI13OM6VAY9/JAyARzfnl5IDkT6dao1BtJeGhtf r6LJw1+B7iQpWELjcUWg8JlrHA5epgQhhPtoKBHqPbevVBRn7MexfNoUhc44RZxKSWyS 6rAOcy1xLHgVMLYyI3xq2P7uL42zV1wJYCqlhKwlRfTkBdHbjd2skTUfaDJ6wTLUJmFO erxt+mN6+eYzo7KDr3YXhD+GJdT++auGkVMAje2o7JM3J1Y9H6FeL3PWXdiRFSj52B9o D2MQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691732559; x=1692337359; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=/55hmvEjHXUAIxqd5OaJCT0udHRL8BvO4EJwrgnzYtM=; b=N6qCNF2B5+5Hj6w4u21esmzQ85IlvILmC62wo39Gyshs9U2Ylu/3ZXajEie9WY1hlg 4P8mJAmX3q+s7fTgFT/oNuW3qsJhIWohtdkBjf2EwpmIvE/sXofpkTJdmHPog+2Vz2IR 5uQN0Jytv7uY6pYRcDm0k9ortGsBT2hD7Dz7d8WeChXeX+3KKUrI4LcveThJWqhGKwns LOd7Yjbb86i6ohlL+sepgbkM+8M/f2kQbbax0o1+wh6uHnVPqJaqUYT4lRo0u05wWb+4 YGxNU2Uhgnze6Zh6ShgcoYQz624Opi6FRLxSElHKt9HzGSp8w14fz4Ri7iXkrcLVXOI1 ScDA== X-Gm-Message-State: AOJu0YxhKGzFAFBUErF0nSz4oqRIH/mGPlk8/74jP1kX/vDzF/wa2pE1 gnZQK0r1bkgxNPQX0zvS/LMOgUELotnbpJKoWMA= X-Received: by 2002:a17:902:f549:b0:1bb:d59d:8c57 with SMTP id h9-20020a170902f54900b001bbd59d8c57mr885327plf.18.1691732559336; Thu, 10 Aug 2023 22:42:39 -0700 (PDT) Received: from localhost.localdomain ([2401:4900:1f3a:6b7:d1e4:c7c3:b9d9:7754]) by smtp.gmail.com with ESMTPSA id r12-20020a1709028bcc00b001b8052d58a0sm2824275plo.305.2023.08.10.22.42.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Aug 2023 22:42:38 -0700 (PDT) From: Bhupesh Sharma To: u-boot@lists.denx.de Cc: sjg@chromium.org, trini@konsulko.com, bhupesh.sharma@linaro.org, bhupesh.linux@gmail.com, Peng Fan Subject: [PATCH 1/1] armv8: Fix compilation error with SYS_DCACHE_OFF Date: Fri, 11 Aug 2023 11:12:28 +0530 Message-Id: <20230811054228.3721455-1-bhupesh.sharma@linaro.org> X-Mailer: git-send-email 2.38.1 MIME-Version: 1.0 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 If CONFIG_SYS_ICACHE_OFF and CONFIG_SYS_DCACHE_OFF are set, we see the following errors while compiling u-boot: 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 reference to `dcache_disable' aarch64-linux-gnu-ld.bfd: arch/arm/cpu/armv8/cpu.c:69: undefined reference to `invalidate_dcache_all' aarch64-linux-gnu-ld.bfd: arch/arm/cpu/armv8/exception_level.o: in function `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 function `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 `relocate_done': arch/arm/lib/relocate_64.S:92: undefined reference to `__asm_flush_dcache_range' aarch64-linux-gnu-ld.bfd: arch/arm/lib/relocate_64.S:93: undefined reference 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' 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 enable dcache. the rest of the compilation errors should be fixed. 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(-) diff --git a/arch/arm/cpu/armv8/Makefile b/arch/arm/cpu/armv8/Makefile index bba4f570db..6168032ffb 100644 --- a/arch/arm/cpu/armv8/Makefile +++ b/arch/arm/cpu/armv8/Makefile @@ -5,14 +5,12 @@ extra-y := start.o +obj-y += cache_v8.o +obj-y += cache.o obj-y += cpu.o ifndef CONFIG_$(SPL_TPL_)TIMER obj-$(CONFIG_SYS_ARCH_TIMER) += generic_timer.o endif -ifndef CONFIG_$(SPL_)SYS_DCACHE_OFF -obj-y += cache_v8.o -obj-y += cache.o -endif ifdef CONFIG_SPL_BUILD obj-$(CONFIG_ARMV8_SPL_EXCEPTION_VECTORS) += exceptions.o else