All of lore.kernel.org
 help / color / mirror / Atom feed
From: Petr Vorel <petr.vorel@gmail.com>
To: ltp@lists.linux.it
Cc: Hui Min Mina Chou <minachou@andestech.com>,
	Khem Raj <raj.khem@gmail.com>
Subject: [LTP] [PATCH v2 2/2] hugemmap15: Check for __clear_cache()
Date: Sun, 12 Oct 2025 21:49:46 +0200	[thread overview]
Message-ID: <20251012194946.370905-3-petr.vorel@gmail.com> (raw)
In-Reply-To: <20251012194946.370905-1-petr.vorel@gmail.com>

It fails to compile at least on riscv64 with older compiler.
It looks like it requires clang >= 20.1.0.

Reported-by: Khem Raj <raj.khem@gmail.com>
Cc: Hui Min Mina Chou <minachou@andestech.com>
Signed-off-by: Petr Vorel <petr.vorel@gmail.com>
---
Changes v1->v2:
* Add missing #endif

 testcases/kernel/mem/hugetlb/hugemmap/hugemmap15.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/testcases/kernel/mem/hugetlb/hugemmap/hugemmap15.c b/testcases/kernel/mem/hugetlb/hugemmap/hugemmap15.c
index 1dde9e87ba..f2984e2dc0 100644
--- a/testcases/kernel/mem/hugetlb/hugemmap/hugemmap15.c
+++ b/testcases/kernel/mem/hugetlb/hugemmap/hugemmap15.c
@@ -46,7 +46,11 @@ static void cacheflush(void *p)
 #if defined(__powerpc__)
 	asm volatile("dcbst 0,%0; sync; icbi 0,%0; isync" : : "r"(p));
 #elif defined(__arm__) || defined(__aarch64__) || defined(__riscv) || defined(__loongarch__)
+# ifdef HAVE_CLEAR_CACHE
 	__clear_cache(p, p + COPY_SIZE);
+# else
+	tst_brk(TCONF, "compiler doesn't have __clear_cache()");
+# endif
 #else
 	(void)p;
 #endif
-- 
2.51.0


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

  parent reply	other threads:[~2025-10-12 19:50 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-12 19:49 [LTP] [PATCH v2 0/2] __builtin___clear_cache() => __clear_cache() Petr Vorel
2025-10-12 19:49 ` [LTP] [PATCH v2 1/2] m4: mprotect04: Replace __builtin___clear_cache with __clear_cache Petr Vorel
2025-12-18 12:22   ` Andrea Cervesato via ltp
2026-01-22 10:23   ` Jan Stancek via ltp
2025-10-12 19:49 ` Petr Vorel [this message]
2026-03-26 10:31   ` [LTP] [PATCH v2 2/2] hugemmap15: Check for __clear_cache() Andrea Cervesato via ltp
2026-03-26 11:05     ` 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=20251012194946.370905-3-petr.vorel@gmail.com \
    --to=petr.vorel@gmail.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.