ba04f608b45eca1353a429f7e6fd710fc4c84b04
[openwrt/staging/stintel.git] /
1 From aab8e6cf7afbbcef60593c6b1795fa5d8e78e597 Mon Sep 17 00:00:00 2001
2 From: Jonas Jelonek <jelonek.jonas@gmail.com>
3 Date: Tue, 15 Oct 2024 20:02:25 +0200
4 Subject: [PATCH] arm: provide noncached_set_region prototype to fix build
5
6 Due to the removal of weak functions in 7d6cee2cd0 ("cmd: cache: Remove
7 weak function"), uboot fails to compile after updating to v2024.10 for
8 mediatek target in OpenWrt with GCC-14 with error:
9 cmd/cache.c: In function 'do_dcache':
10 cmd/cache.c:57:25: error: implicit declaration of function
11 'noncached_set_region' [-Wimplicit-function-declaration]
12
13 Thus, provide a prototype in arm's include/asm/system.h to fix a build
14 error in cmd/cache.c, since related prototypes are also located there.
15 Also add an include of asm/system.h in cmd/cache.c have the function
16 available there.
17
18 Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
19 ---
20 arch/arm/include/asm/system.h | 1 +
21 cmd/cache.c | 1 +
22 2 files changed, 2 insertions(+)
23
24 --- a/arch/arm/include/asm/system.h
25 +++ b/arch/arm/include/asm/system.h
26 @@ -658,6 +658,7 @@ void mmu_set_region_dcache_behaviour(phy
27 * Return: 0 if OK
28 */
29 int noncached_init(void);
30 +void noncached_set_region(void);
31
32 phys_addr_t noncached_alloc(size_t size, size_t align);
33 #endif /* CONFIG_SYS_NONCACHED_MEMORY */
34 --- a/cmd/cache.c
35 +++ b/cmd/cache.c
36 @@ -10,6 +10,7 @@
37 #include <command.h>
38 #include <cpu_func.h>
39 #include <linux/compiler.h>
40 +#include <asm/system.h>
41
42 static int parse_argv(const char *);
43