Unverified Commit 12edfed7 authored by Christoph Müllner's avatar Christoph Müllner Committed by GitHub
Browse files

pk: Fix __clear_cache() compilation issue with recent compilers (#240)



Using recent compilers we get the following error message:

  ../pk/pk.c: In function 'run_loaded_program.constprop':
  ../pk/pk.c:177:3: error: both arguments to '__builtin___clear_cache'
  must be pointers
    177 |   __clear_cache(0, 0);
        |   ^~~~~~~~~~~~~~~~~~~

Let's use the existing function __riscv_flush_icache(),
give it a header with a prototype and use it to
emits the FENCE.I instruction directly.

See #239

Suggested-by: default avatarAndrew Waterman <andrew@sifive.com>
Signed-off-by: default avatarChristoph Muellner <cmuellner@linux.com>
parent ef7bebaf
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment