On Sat, 1 Aug 2020, Romain Naour wrote: > v3 Avoid duplicate code (Maciej W. Rozycki) > v2 use MIPS_ISA_REV instead of __mips_isa_rev (Alexander Lobakin) > --- > arch/mips/include/asm/vdso/gettimeofday.h | 30 +++++++++++++++++++---- > 1 file changed, 25 insertions(+), 5 deletions(-) > > diff --git a/arch/mips/include/asm/vdso/gettimeofday.h b/arch/mips/include/asm/vdso/gettimeofday.h > index c63ddcaea54c..93008551282e 100644 > --- a/arch/mips/include/asm/vdso/gettimeofday.h > +++ b/arch/mips/include/asm/vdso/gettimeofday.h > @@ -35,7 +35,11 @@ static __always_inline long gettimeofday_fallback( > : "=r" (ret), "=r" (error) > : "r" (tv), "r" (tz), "r" (nr) > : "$1", "$3", "$8", "$9", "$10", "$11", "$12", "$13", > - "$14", "$15", "$24", "$25", "hi", "lo", "memory"); > + "$14", "$15", "$24", "$25", > +#if MIPS_ISA_REV < 6 > + "hi", "lo", > +#endif > + "memory"); Can you please use a helper macro, say GCC_REGS_HI_LO, moving the details into a separate header, just as I suggested with examples given? My very point was to avoid `#if MIPS_ISA_REV < 6' sprinkled throughout code. Also I note all the clobbers are the same across all the syscalls used here, so another possibility is to have a macro like VDSO_SYSCALL_CLOBBERS defined in a single place according to the architecture level, and then just use it throughout avoiding code duplication. Maciej