[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAFiDJ5-OJzWWR0hSZDsuAmxzxTE7cRR9Bsetpfh5vvrTxzkKPw@mail.gmail.com>
Date: Thu, 25 Nov 2021 18:56:41 +0800
From: Ley Foon Tan <lftan.linux@...il.com>
To: Matteo Croce <mcroce@...ux.microsoft.com>
Cc: linux-riscv@...ts.infradead.org, linux-kernel@...r.kernel.org,
linux-arch@...r.kernel.org,
Paul Walmsley <paul.walmsley@...ive.com>,
Palmer Dabbelt <palmer@...belt.com>,
Albert Ou <aou@...s.berkeley.edu>,
Atish Patra <atish.patra@....com>,
Emil Renner Berthing <kernel@...il.dk>,
Akira Tsukamoto <akira.tsukamoto@...il.com>,
Drew Fustini <drew@...gleboard.org>,
Bin Meng <bmeng.cn@...il.com>,
David Laight <David.Laight@...lab.com>,
Guo Ren <guoren@...nel.org>, Christoph Hellwig <hch@....de>
Subject: Re: [PATCH v5 3/3] riscv: optimized memset
On Thu, Sep 30, 2021 at 1:56 AM Matteo Croce <mcroce@...ux.microsoft.com> wrote:
>
> From: Matteo Croce <mcroce@...rosoft.com>
>
> The generic memset is defined as a byte at time write. This is always
> safe, but it's slower than a 4 byte or even 8 byte write.
>
> Write a generic memset which fills the data one byte at time until the
> destination is aligned, then fills using the largest size allowed,
> and finally fills the remaining data one byte at time.
>
> Signed-off-by: Matteo Croce <mcroce@...rosoft.com>
> ---
> arch/riscv/include/asm/string.h | 10 +--
> arch/riscv/kernel/Makefile | 1 -
> arch/riscv/kernel/riscv_ksyms.c | 13 ----
> arch/riscv/lib/Makefile | 1 -
> arch/riscv/lib/memset.S | 113 --------------------------------
> arch/riscv/lib/string.c | 41 ++++++++++++
> 6 files changed, 44 insertions(+), 135 deletions(-)
> delete mode 100644 arch/riscv/kernel/riscv_ksyms.c
> delete mode 100644 arch/riscv/lib/memset.S
This patch causes the Linux kernel to hang if compile with LLVM/Clang.
Tested on Qemu.
Steps to compile with Clang:
make CC=clang defconfig
make CC=clang -j
Boot log:
[ 0.000000] Linux version 5.15.4-01003-g23eeaac40da8 (xxxxx@...ntu)
(clang version 14.0.0 (https://github.com/llvm/llvm-project
6b715e9c4d9cc00f59906d48cd57f4c767229093), GNU ld (GNU Binutils)
2.36.1) #151 SMP Thu Nov 25 18:41:47 +08 2021
[ 0.000000] OF: fdt: Ignoring memory range 0x80000000 - 0x80200000
[ 0.000000] Machine model: riscv-virtio,qemu
[ 0.000000] earlycon: sbi0 at I/O port 0x0 (options '')
[ 0.000000] printk: bootconsole [sbi0] enabled
[ 0.000000] efi: UEFI not found.
Regards
Ley Foon
Powered by blists - more mailing lists