On 8 September 2015 at 00:07, Maciej W. Rozycki <macro@xxxxxxxxxxxxxx> wrote: > On Mon, 7 Sep 2015, Yousong Zhou wrote: > >> diff --git a/arch/mips/include/uapi/asm/swab.h b/arch/mips/include/uapi/asm/swab.h >> index 8f2d184..8b9a390 100644 >> --- a/arch/mips/include/uapi/asm/swab.h >> +++ b/arch/mips/include/uapi/asm/swab.h >> @@ -8,6 +8,11 @@ >> #ifndef _ASM_SWAB_H >> #define _ASM_SWAB_H >> >> +/* >> + * Enable the optimized version only when compiling without MIPS16. >> + */ >> +#ifndef __mips16 >> + >> #include <linux/compiler.h> >> #include <linux/types.h> >> >> @@ -66,4 +71,5 @@ static inline __attribute_const__ __u64 __arch_swab64(__u64 x) >> #define __arch_swab64 __arch_swab64 >> #endif /* __mips64 */ >> #endif /* MIPS R2 or newer or Loongson 3A */ >> +#endif /* ifndef __mips16 */ >> #endif /* _ASM_SWAB_H */ > > I think it will best go with the main #if which checks the conditions > that have to be met for this optimisation to be possible; there is no gain > from nesting the conditions here. > Yes, you are right, and I should not wrap that __SWAB_64_THRU_32__ inside the #if check. > Also you need a second patch paired with this to undo your previous > `nomips16' change which will be no longer needed (and in the case of the > `.set' part not wanted either). Wow, I did not know that my previous patch was merged, also into all those stable branches, and some with kind minor modifications... Is it the case that I only need to firstly revert that commit in mips-upstream-sfr/mips-for-linux-next, then followed by refreshed version of this one? Regards, yousong