# Re: \[PATCH 16/19\] LoongArch: Add VDSO and VSYSCALL support

- From: Huacai Chen \<hidden\>
- Date: 2021-08-12 11:32:07 
- List: linux-arch
- Page: https://ratatoskr.run/linux-arch/2021/08/13337206
- Thread: https://ratatoskr.run/linux-arch/2021/07/13337006/t/2.md

```text
Hi, Arnd,

On Tue, Jul 6, 2021 at 6:18 PM Arnd Bergmann [ref] wrote:
>
> On Tue, Jul 6, 2021 at 6:18 AM Huacai Chen [ref] wrote:
> >
> > This patch adds VDSO and VSYSCALL support (gettimeofday and its friends)
> > for LoongArch.
> >
> > Signed-off-by: Huacai Chen <redacted>
> > ---
> >  arch/loongarch/include/asm/vdso.h             |  50 +++
> >  arch/loongarch/include/asm/vdso/clocksource.h |   8 +
> >  .../loongarch/include/asm/vdso/gettimeofday.h | 101 ++++++
> >  arch/loongarch/include/asm/vdso/processor.h   |  14 +
> >  arch/loongarch/include/asm/vdso/vdso.h        |  42 +++
> >  arch/loongarch/include/asm/vdso/vsyscall.h    |  27 ++
> >  arch/loongarch/kernel/vdso.c                  | 132 ++++++++
> >  arch/loongarch/vdso/Makefile                  |  97 ++++++
> >  arch/loongarch/vdso/elf.S                     |  15 +
> >  arch/loongarch/vdso/genvdso.c                 | 311 ++++++++++++++++++
> >  arch/loongarch/vdso/genvdso.h                 | 122 +++++++
> >  arch/loongarch/vdso/sigreturn.S               |  24 ++
> >  arch/loongarch/vdso/vdso.lds.S                |  65 ++++
> >  arch/loongarch/vdso/vgettimeofday.c           |  26 ++
>
> I fear you may have copied the wrong one here, the MIPS implementation seems
> more complex than the rv64 or arm64 versions, and you should not need that
> complexity.
>
> Can you try removing the genvdso.c  file completely? To be honest I don't
> see why this is needed here, so I may be missing something, but the other
> ones don't have it either.
OK, VDSO needs to be refactored.

Huacai
>
>
>        Arnd
```
