From: Cyril Hrubis <chrubis@suse.cz>
To: Khem Raj <raj.khem@gmail.com>
Cc: Hui Min Mina Chou <minachou@andestech.com>, ltp@lists.linux.it
Subject: Re: [LTP] [PATCH] Add __clear_cache declaration for clang
Date: Tue, 11 Jun 2024 14:04:41 +0200 [thread overview]
Message-ID: <Zmg9WZ1TitB7D_RC@yuki> (raw)
In-Reply-To: <20240611055655.614782-1-raj.khem@gmail.com>
Hi!
> __clear_cache was enabled on RISCV recently with 7352ba02390116f1cd6a9b583860ba28aa0a1b7a
> however it fails to compile with clang19 on RISCV
> With this error
>
> hugemmap15.c:51:2: error: call to undeclared function '__clear_cache'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
> 51 | __clear_cache(p, p + COPY_SIZE);
> | ^
This sounds like a clnag bug. The __clear_cache() is a pre-defined
function and as such the signature should be part of the compiler.
Is the call even supported by clang19 on RISCV?
> Signed-off-by: Khem Raj <raj.khem@gmail.com>
> Cc: Hui Min Mina Chou <minachou@andestech.com>
> ---
> testcases/kernel/mem/hugetlb/hugemmap/hugemmap15.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/testcases/kernel/mem/hugetlb/hugemmap/hugemmap15.c b/testcases/kernel/mem/hugetlb/hugemmap/hugemmap15.c
> index a84ba6476..856e22ff3 100644
> --- a/testcases/kernel/mem/hugetlb/hugemmap/hugemmap15.c
> +++ b/testcases/kernel/mem/hugetlb/hugemmap/hugemmap15.c
> @@ -21,6 +21,7 @@
>
> #if defined(__clang__)
> #pragma clang optimize off
> + void __clear_cache(void *start, void *end);
> #endif
>
> #define _GNU_SOURCE
>
> --
> Mailing list info: https://lists.linux.it/listinfo/ltp
--
Cyril Hrubis
chrubis@suse.cz
--
Mailing list info: https://lists.linux.it/listinfo/ltp
next prev parent reply other threads:[~2024-06-11 12:05 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-11 5:56 [LTP] [PATCH] Add __clear_cache declaration for clang Khem Raj
2024-06-11 12:04 ` Cyril Hrubis [this message]
2025-10-12 19:10 ` Petr Vorel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Zmg9WZ1TitB7D_RC@yuki \
--to=chrubis@suse.cz \
--cc=ltp@lists.linux.it \
--cc=minachou@andestech.com \
--cc=raj.khem@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox