Re: [PATCH 13/19] LoongArch: Add some library functions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi, Arnd,

On Tue, Jul 6, 2021 at 6:17 PM Arnd Bergmann <arnd@xxxxxxxx> wrote:
>
> On Tue, Jul 6, 2021 at 6:18 AM Huacai Chen <chenhuacai@xxxxxxxxxxx> wrote:
> >
> > +/*
> > + * long __strncpy_from_user(char *to, const char *from, long len)
> > + *
> > + * a0: to
> > + * a1: from
> > + * a2: len
> > + */
> > +SYM_FUNC_START(__strncpy_from_user)
> > +       move    a3, zero
> > +
>
> I doubt this is better than the C version in lib/strncpy_from_user.c
OK, they will be replaced with the C version.

Huacai
>
> > diff --git a/arch/loongarch/lib/strnlen_user.S b/arch/loongarch/lib/strnlen_user.S
> > new file mode 100644
> > index 000000000000..9288a5ad294e
> > --- /dev/null
> > +++ b/arch/loongarch/lib/strnlen_user.S
> > @@ -0,0 +1,47 @@
> > +/* SPDX-License-Identifier: GPL-2.0 */
> > +/*
> > + * Copyright (C) 2020-2021 Loongson Technology Corporation Limited
> > + */
>
> Same here.
>
> Have you done any measurement to show that the asm version actually helps
> here? If not, just use the generic version.
>
>
>        Arnd



[Index of Archives]     [Linux Kernel]     [Kernel Newbies]     [x86 Platform Driver]     [Netdev]     [Linux Wireless]     [Netfilter]     [Bugtraq]     [Linux Filesystems]     [Yosemite Discussion]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]

  Powered by Linux