From patchwork Sat Jan 13 10:38:03 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Palmer Dabbelt X-Patchwork-Id: 25374 Received: (qmail 97908 invoked by alias); 13 Jan 2018 10:38:50 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 97817 invoked by uid 89); 13 Jan 2018 10:38:50 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-25.9 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.2 spammy=Facilities, Cache, flushing, management X-HELO: mail-pf0-f169.google.com X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:date:message-id:in-reply-to:references :cc:from:to; bh=lKF+wHCXgG1z0jdgu+cqInf6DdB27n/uVZn48p9sdaI=; b=LRwpeOd1fb8l/MAL63enP3rF9pi1v2V9QNp8mogB6CzwrTkO332hJNfiQTMayQh6lF Za+MEI8MzViT1aYrAWBh5udmHEQK7ehaUPs1jMGpb1uC9fdwxkTssASXLxgJUqX9zGeZ KyQPrZEPJpqXwZPDcrqe9Wo+GtRWQhjG+lT7uYD/S2D926bE6l9ytmb/qedf1H/DHNWs kZpc9EjYA5+seSiezO6haAa3jd/qzHggvNgjNz13recNod6soRFA5oIeUQtbMyjJ0m0g 8OkW8krBUvQ0KsNSt8580OzvX2xp3O1i/SIcPYPaiTIPFvI328/8KCAbEcOrQlsjmYJD BJwg== X-Gm-Message-State: AKGB3mKsYOVUsQV4vJ0rqs27sddx1PojPgIiDN12mvUBR0pn4rqdF4T1 NnSaLjDMXvTIs0aSJhmTjYwWPRtV4rM= X-Google-Smtp-Source: ACJfBou77vpdmiYaV6i6fquK2bqBx0rm5K54a7teQmeFUBwgP1DUoxEmnxV2Kliq7cPeXo7sVzHr+w== X-Received: by 10.101.68.78 with SMTP id e14mr22572066pgq.76.1515839926693; Sat, 13 Jan 2018 02:38:46 -0800 (PST) Subject: [PATCH v4 04/17] Add documentation for __riscv_flush_icache Date: Sat, 13 Jan 2018 02:38:03 -0800 Message-Id: <20180113103816.4861-5-palmer@dabbelt.com> In-Reply-To: <20180113103816.4861-1-palmer@dabbelt.com> References: <20180113103816.4861-1-palmer@dabbelt.com> Cc: patches@groups.riscv.org, Palmer Dabbelt From: Palmer Dabbelt To: libc-alpha@sourceware.org I don't know if this is actually the right place to put this: it's a Linux-specific function, and while users can call it we'd really prefer they use rely on GCC to emit it when necessary from via its cache flushing intrinsics. 2018-01-13 Palmer Dabbelt * manual/platform.texi: Add RISC-V documenation for __riscv_flush_icache. --- manual/platform.texi | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/manual/platform.texi b/manual/platform.texi index cb166641fb71..f6ca97ebf9d8 100644 --- a/manual/platform.texi +++ b/manual/platform.texi @@ -6,6 +6,7 @@ @menu * PowerPC:: Facilities Specific to the PowerPC Architecture +* RISC-V:: Facilities Specific to the RISC-V Architecture @end menu @node PowerPC @@ -115,3 +116,16 @@ problem-state programs. If the program priority is medium high when the time interval expires or if an attempt is made to set the priority to medium high when it is not allowed, the priority is set to medium. @end deftypefun + +@node RISC-V +@appendixsec RISC-V-specific Facilities + +Cache management facilities specific to RISC-V systems that implement the Linux +ABI are declared in @file{sysdeps/unix/sysv/linux/riscv/sys/cachectl.h}. + +@deftypefun {void} __riscv_flush_icache(void *start, void *end, unsigned long int flags) +@safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}} +Enforce ordering between stores and instruction cache fetches. The flags +variable is used to determine if this applies just to the local thread or to +all threads in the system. +@end deftypefun