From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,HTML_MESSAGE,MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H2 autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 10334 invoked from network); 5 Apr 2023 00:14:33 -0000 Received: from second.openwall.net (193.110.157.125) by inbox.vuxu.org with ESMTPUTF8; 5 Apr 2023 00:14:33 -0000 Received: (qmail 1920 invoked by uid 550); 5 Apr 2023 00:14:29 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Reply-To: musl@lists.openwall.com Received: (qmail 1875 invoked from network); 5 Apr 2023 00:14:28 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; t=1680653656; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=krT3xW34nIdMroYW7VYGbkX9Hyf2gar6DwbjmObX2Ic=; b=jvu716AuB54Sfz0AvokJ4Berg6jlROjRUc0X+thT1Gaxk/2bGMqYHySPFbdGm8fZJB 7HCe8+Su7hp0P+NRJHQseq8Hxh89HWGNuh+n4tQKNfCWYM3QQOoWypRsGS2kFNcr/kOk KZ64vtEXPeRIsAoJ7ekScOeJCsnq3chzeYQpayFeOPGeZABEKWQehR2d2NZ0mCEP7Rcd iOyFuv7Zk4rX4Qo+8BLiThUXEzwXiszBwrs/25WPzFjOdEdWXgGPbrLKJI1Csd1gWFql bfAWXKIURBTijmJ37ne0gA+VDnPIRzY5NZqPtadDq8PUKVniGO+qegInaK7ADShLUvkF FVTg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680653656; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=krT3xW34nIdMroYW7VYGbkX9Hyf2gar6DwbjmObX2Ic=; b=eB9PsHZQFdncrx+KU7g6x+rrn/M3uEseq6cDqpWrZoikOhrraT0Mkrk/HZFCMGFE3j A4diECRVVlXV6SnAwv9f3a8G3w10oyV0gyFfIlqSYXJ89coyN+V5qI/oLJ1z6U3Bcs/K LsDftIT3Iv4ezXWWRTGn22gkVT+JzQffhfQyOi3+KPDRrMdQJNUtRfQh3mlsLUlpQPiT +B2R9Ij/n8OscxIJMiQtRnesZZEg+XtU7uKYmBYaEVvlKFiii7HTPHjyd7LJolIUY9He t00R61F7Ug48tEI/JqqctYPbBidJLjGCN14/n14hYQy5O5ukJ+m/DHInqGS7CkHgvVKD YOvw== X-Gm-Message-State: AAQBX9enzQFAHcWEQtziJODzQqGPvZRs/39wsiprIZ1DiqdMgxienet3 D8CSZ2rvQgz3RytN0nFvA2OiZVn6kG5r+3jcf4RNEw== X-Google-Smtp-Source: AKy350aqPDfXOkhQs53odbl8VOCx9wYjZUeegjk2sIGhzsDTYVQI2RDiCbBy+Hx9MwUgIxgdCpdP9kkKYgUxwf8dkbA= X-Received: by 2002:a05:622a:1892:b0:3d9:556b:10dd with SMTP id v18-20020a05622a189200b003d9556b10ddmr482467qtc.11.1680653656188; Tue, 04 Apr 2023 17:14:16 -0700 (PDT) MIME-Version: 1.0 References: <20230404233434.GF4163@brightrain.aerifal.cx> In-Reply-To: <20230404233434.GF4163@brightrain.aerifal.cx> From: enh Date: Tue, 4 Apr 2023 17:14:04 -0700 Message-ID: To: Rich Felker Cc: musl@lists.openwall.com Content-Type: multipart/alternative; boundary="0000000000002b3b8105f88bac45" Subject: Re: [musl] __riscv_flush_icache() in --0000000000002b3b8105f88bac45 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, Apr 4, 2023 at 4:34=E2=80=AFPM Rich Felker wrote: > On Tue, Apr 04, 2023 at 03:49:05PM -0700, enh wrote: > > i'm still trying to decide whether it makes sense to > > add __riscv_flush_icache() to bionic or not[1] and was looking to see > > whether musl had added it. i notice you've _implemented_ it but not add= ed > > it to the header. was that deliberate or just an > > oversight? > > > > _____ > > 1. see https://github.com/google/android-riscv64/issues/4 for my > ramblings > > on that topic. > > It's rather annoying that they added a new arch-specific header for > this rather than using the existing ... > i don't think this is a new thing --- i think they've always had only on systems like mips that actually need it, and it's different between those systems. (my x86-64 glibc box has no , for example.) > We probably need to do something to clean this up but I'm not sure > what the right action is. I figured it was usable with no header, but > apparently it needs some flags ..? > https://www.gnu.org/software/libc/manual/html_node/RISC_002dV.html refers to a single flag ... but i don't think they actually _define_ that flag? ah, it's in the kernel: ``` ~/linux$ grep -r SYS_RISCV_FLUSH_ICACHE_LOCAL arch/riscv/include/asm/cacheflush.h:#define SYS_RISCV_FLUSH_ICACHE_LOCAL 1U= L arch/riscv/include/asm/cacheflush.h:#define SYS_RISCV_FLUSH_ICACHE_ALL (SYS_RISCV_FLUSH_ICACHE_LOCAL) arch/riscv/kernel/sys_riscv.c: flush_icache_mm(current->mm, flags & SYS_RISCV_FLUSH_ICACHE_LOCAL); ~/linux$ ``` but not in a uapi header :-/ > Rich > --0000000000002b3b8105f88bac45 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Tue, Apr 4, 2023 at 4:34=E2=80=AFP= M Rich Felker <dalias@libc.org>= ; wrote:
On Tue,= Apr 04, 2023 at 03:49:05PM -0700, enh wrote:
> i'm still trying to decide whether it makes sense to
> add __riscv_flush_icache() to bionic or not[1] and was looking to see<= br> > whether musl had added it. i notice you've _implemented_ it but no= t added
> it to the <sys/cacheflush.h> header. was that deliberate or just= an
> oversight?
>
> _____
> 1. see https://github.com/google/android-risc= v64/issues/4 for my ramblings
> on that topic.

It's rather annoying that they added a new arch-specific header for
this rather than using the existing <sys/cachectl.h> ...

i don't think this is a new thing --- i think t= hey've always had <sys/cachectl.h> only on systems like mips that= actually need it, and it's different between those systems. (my x86-64= glibc box has no <sys/cachectl.h>, for example.)
=C2=A0
We probably need to do something to clean this up but I'm not sure
what the right action is. I figured it was usable with no header, but
apparently it needs some flags ..?

= https://www.gnu.org/software/libc/manual/html_node/RISC_002dV.html refe= rs to a single flag ... but i don't think they actually _define_ that f= lag?

ah, it's in the kernel:
```=
~/linux$ grep -r SYS_RISCV_FLUSH_ICACHE_LOCAL
arch/riscv/incl= ude/asm/cacheflush.h:#define SYS_RISCV_FLUSH_ICACHE_LOCAL 1UL
arch/riscv= /include/asm/cacheflush.h:#define SYS_RISCV_FLUSH_ICACHE_ALL =C2=A0 (SYS_RI= SCV_FLUSH_ICACHE_LOCAL)
arch/riscv/kernel/sys_riscv.c: flush_icache_mm(c= urrent->mm, flags & SYS_RISCV_FLUSH_ICACHE_LOCAL);
~/linux$
=
=C2=A0```
but not in a uapi header :-/
=C2=A0<= /div>
Rich
--0000000000002b3b8105f88bac45--