]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Merge commit 2b0f5df7b4e0 from llvm-project (by Jessica Clarke):
authorDimitry Andric <dim@FreeBSD.org>
Sun, 23 Jul 2023 11:01:42 +0000 (13:01 +0200)
committerDimitry Andric <dim@FreeBSD.org>
Sun, 23 Jul 2023 17:38:13 +0000 (19:38 +0200)
commit3ea609f7d794675ff74194a36125a1201dabc8fb
tree3644e4f0f1b3a9d8b7d87794d392a06b47fb4305
parent784ed70844eb12f3b62dfc9e9f03b9bef97bee54
Merge commit 2b0f5df7b4e0 from llvm-project (by Jessica Clarke):

  [builtins][Mips] Un-break FreeBSD build of __clear_cache

  Commit 674a17e9bbe8 ("MIPS/compiler_rt: use synci to flush icache on
  r6") completely removed the OS-specific guards under the guise of "For
  pre-r6, we can use cacheflush libc function, which is same on Linux and
  FreeBSD." However, the code in question had guards for Linux and
  OpenBSD, not Linux and FreeBSD, and FreeBSD does not have a cacheflush
  libc function as claimed, so this was neither the statement they
  intended to make nor was it sufficient justification for making the code
  completely unconditional. Whilst the upcoming FreeBSD 14 release has
  dropped support for MIPS, FreeBSD 13 has support for it.

  Fix this by only calling cacheflush on the OSes where it was previously
  called, and not on other OSes where it either definitely isn't available
  (FreeBSD) or is unknown (any other OS than the three mentioned in this
  commit).

This is only needed for MFC'ing, as mips has been removed from
14-CURRENT.

PR: 271047
MFC after: immediately

(cherry picked from commit b8f1c9dd9b3dd9b91e6999b28ab941a2af142702)
contrib/llvm-project/compiler-rt/lib/builtins/clear_cache.c