From: Jisheng Zhang <jszhang@kernel.org>
To: Heiko Stuebner <heiko@sntech.de>
Cc: linux-riscv@lists.infradead.org, palmer@dabbelt.com,
christoph.muellner@vrull.eu, conor@kernel.org,
philipp.tomsich@vrull.eu, ajones@ventanamicro.com,
Heiko Stuebner <heiko.stuebner@vrull.eu>
Subject: Re: [PATCH v4 0/5] Zbb string optimizations and call support in alternatives
Date: Wed, 11 Jan 2023 21:24:26 +0800 [thread overview]
Message-ID: <Y764isfC6LsSpWus@xhacker> (raw)
In-Reply-To: <20230109181755.2383085-1-heiko@sntech.de>
On Mon, Jan 09, 2023 at 07:17:50PM +0100, Heiko Stuebner wrote:
> From: Heiko Stuebner <heiko.stuebner@vrull.eu>
>
> This series still tries to allow optimized string functions for specific
> extensions. The last approach of using an inline base function to hold
> the alternative calls did cause some issues in a number of places
>
> So instead of that we're now just using an alternative j at the beginning
> of the generic function to jump to a separate place inside the function
> itself.
>
> This of course needs a fixup for "j" instructions in alternative blocks,
> so that is provided here as well.
>
> Technically patch4 got a review from Andrew, but that was still with
> the inline approach, so I didn't bring it over to v4.
>
>
> changes since v3:
> - rebase on top of 6.2-rc1 + the applied alternative-call series
> - add alternative fixup for jal instructions
> - drop the inline functions and instead just jump
Hi Heiko,
I think I have sent out the jal fixup a month ago. And similar as V3, Zbb
series need to be split from the general alternative improvement.
Thanks
>
> changes since v2:
> - add patch fixing the c.jalr funct4 value
> - reword some commit messages
> - fix position of auipc addition patch (earlier)
> - fix compile errors from patch-reordering gone wrong
> (worked at the end of v2, but compiling individual patches
> caused issues) - patches are now tested individually
> - limit Zbb variants for GNU as for now
> (LLVM support for .option arch is still under review)
> - prevent str-functions from getting optimized to builtin-variants
>
> changes since v1:
> - a number of generalizations/cleanups for instruction parsing
> - use accessor function to access instructions (Emil)
> - actually patch the correct location when having more than one
> instruction in an alternative block
> - string function cleanups (comments etc) (Conor)
> - move zbb extension above s* extensions in cpu.c lists
>
> changes since rfc:
> - make Zbb code actually work
> - drop some unneeded patches
> - a lot of cleanups
>
> Heiko Stuebner (5):
> RISC-V: move some stray __RISCV_INSN_FUNCS definitions from kprobes
> RISC-V: add helpers for J-type immediate handling
> RISC-V: fix jal addresses in patched alternatives
> RISC-V: add infrastructure to allow different str* implementations
> RISC-V: add zbb support to string functions
>
> arch/riscv/Kconfig | 24 ++++
> arch/riscv/include/asm/errata_list.h | 3 +-
> arch/riscv/include/asm/hwcap.h | 1 +
> arch/riscv/include/asm/insn.h | 36 ++++++
> arch/riscv/include/asm/string.h | 12 ++
> arch/riscv/kernel/alternative.c | 27 ++++
> arch/riscv/kernel/cpu.c | 1 +
> arch/riscv/kernel/cpufeature.c | 18 +++
> arch/riscv/kernel/probes/simulate-insn.h | 3 -
> arch/riscv/kernel/riscv_ksyms.c | 3 +
> arch/riscv/lib/Makefile | 3 +
> arch/riscv/lib/strcmp.S | 131 ++++++++++++++++++++
> arch/riscv/lib/strlen.S | 142 +++++++++++++++++++++
> arch/riscv/lib/strncmp.S | 151 +++++++++++++++++++++++
> arch/riscv/purgatory/Makefile | 13 ++
> 15 files changed, 564 insertions(+), 4 deletions(-)
> create mode 100644 arch/riscv/lib/strcmp.S
> create mode 100644 arch/riscv/lib/strlen.S
> create mode 100644 arch/riscv/lib/strncmp.S
>
> --
> 2.35.1
>
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
prev parent reply other threads:[~2023-01-11 13:34 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-09 18:17 [PATCH v4 0/5] Zbb string optimizations and call support in alternatives Heiko Stuebner
2023-01-09 18:17 ` [PATCH v4 1/5] RISC-V: move some stray __RISCV_INSN_FUNCS definitions from kprobes Heiko Stuebner
2023-01-09 20:53 ` Conor Dooley
2023-01-11 15:14 ` Heiko Stübner
2023-01-10 8:32 ` Andrew Jones
2023-01-09 18:17 ` [PATCH v4 2/5] RISC-V: add helpers for J-type immediate handling Heiko Stuebner
2023-01-09 22:22 ` Conor Dooley
2023-01-10 8:44 ` Andrew Jones
2023-01-10 8:54 ` Conor Dooley
2023-01-11 14:43 ` Jisheng Zhang
2023-01-09 18:17 ` [PATCH v4 3/5] RISC-V: fix jal addresses in patched alternatives Heiko Stuebner
2023-01-10 9:28 ` Andrew Jones
2023-01-11 17:15 ` Jisheng Zhang
2023-01-11 13:18 ` Jisheng Zhang
2023-01-11 13:53 ` Heiko Stübner
2023-01-11 14:15 ` Andrew Jones
2023-01-11 14:44 ` Jisheng Zhang
2023-01-09 18:17 ` [PATCH v4 4/5] RISC-V: add infrastructure to allow different str* implementations Heiko Stuebner
2023-01-09 22:37 ` Conor Dooley
2023-01-09 23:31 ` Heiko Stübner
2023-01-10 9:39 ` Andrew Jones
2023-01-10 10:46 ` Heiko Stübner
2023-01-10 11:16 ` Andrew Jones
2023-01-11 12:34 ` Andrew Jones
[not found] ` <CAEg0e7gJgpoiGjfLeedba0-r=dCE1Z_qkU53w_+-cVjsuqaC3A@mail.gmail.com>
2023-01-11 13:42 ` Philipp Tomsich
2023-01-11 13:47 ` Andrew Jones
2023-01-10 12:13 ` Andrew Jones
2023-01-11 12:30 ` Andrew Jones
2023-01-12 16:05 ` Heiko Stübner
2023-01-09 18:17 ` [PATCH v4 5/5] RISC-V: add zbb support to string functions Heiko Stuebner
2023-01-09 20:39 ` Conor Dooley
2023-01-10 9:57 ` Andrew Jones
2023-01-10 10:14 ` Conor Dooley
2023-01-12 11:21 ` Heiko Stübner
2023-01-12 12:06 ` Conor Dooley
2023-01-12 12:28 ` Heiko Stübner
2023-01-11 12:24 ` Andrew Jones
2023-01-11 14:27 ` Christoph Müllner
2023-01-11 15:16 ` Andrew Jones
2023-01-11 15:22 ` Jeff Law
2023-01-12 22:05 ` Heiko Stübner
2023-01-11 13:24 ` Jisheng Zhang [this message]
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=Y764isfC6LsSpWus@xhacker \
--to=jszhang@kernel.org \
--cc=ajones@ventanamicro.com \
--cc=christoph.muellner@vrull.eu \
--cc=conor@kernel.org \
--cc=heiko.stuebner@vrull.eu \
--cc=heiko@sntech.de \
--cc=linux-riscv@lists.infradead.org \
--cc=palmer@dabbelt.com \
--cc=philipp.tomsich@vrull.eu \
/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.