linux_dsm_epyc7002/arch
Nathan Chancellor cc1c1fe795 MIPS: Compare __SYNC_loongson3_war against 0
[ Upstream commit 8790ccf8daf1a8c53b6cb8ce0c9a109274bd3fa8 ]

When building with clang when CONFIG_CPU_LOONGSON3_WORKAROUNDS is
enabled:

 In file included from lib/errseq.c:4:
 In file included from ./include/linux/atomic.h:7:
 ./arch/mips/include/asm/atomic.h:52:1: warning: converting the result of
 '<<' to a boolean always evaluates to true
 [-Wtautological-constant-compare]
 ATOMIC_OPS(atomic64, s64)
 ^
 ./arch/mips/include/asm/atomic.h:40:9: note: expanded from macro
 'ATOMIC_OPS'
         return cmpxchg(&v->counter, o, n);
                ^
 ./arch/mips/include/asm/cmpxchg.h:194:7: note: expanded from macro
 'cmpxchg'
         if (!__SYNC_loongson3_war)
              ^
 ./arch/mips/include/asm/sync.h:147:34: note: expanded from macro
 '__SYNC_loongson3_war'
 # define __SYNC_loongson3_war   (1 << 31)
                                    ^

While it is not wrong that the result of this shift is always true in a
boolean context, it is not a problem here. Regardless, the warning is
really noisy so rather than making the shift a boolean implicitly, use
it in an equality comparison so the shift is used as an integer value.

Fixes: 4d1dbfe6cb ("MIPS: atomic: Emit Loongson3 sync workarounds within asm")
Fixes: a91f2a1dba ("MIPS: cmpxchg: Omit redundant barriers for Loongson3")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Acked-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-03-04 11:37:41 +01:00
..
alpha local64.h: make <asm/local64.h> mandatory 2021-01-12 20:18:16 +01:00
arc arch/arc: add copy_user_page() to <asm/page.h> to fix build error on ARC 2021-01-19 18:27:26 +01:00
arm ARM: at91: use proper asm syntax in pm_suspend 2021-03-04 11:37:28 +01:00
arm64 crypto: arm64/aes-ce - really hide slower algos when faster ones are enabled 2021-03-04 11:37:37 +01:00
c6x arch-cleanup-2020-10-22 2020-10-23 10:06:38 -07:00
csky local64.h: make <asm/local64.h> mandatory 2021-01-12 20:18:16 +01:00
h8300 h8300: fix PREEMPTION build, TI_PRE_COUNT undefined 2021-02-17 11:02:28 +01:00
hexagon local64.h: make <asm/local64.h> mandatory 2021-01-12 20:18:16 +01:00
ia64 local64.h: make <asm/local64.h> mandatory 2021-01-12 20:18:16 +01:00
m68k local64.h: make <asm/local64.h> mandatory 2021-01-12 20:18:16 +01:00
microblaze local64.h: make <asm/local64.h> mandatory 2021-01-12 20:18:16 +01:00
mips MIPS: Compare __SYNC_loongson3_war against 0 2021-03-04 11:37:41 +01:00
nds32 local64.h: make <asm/local64.h> mandatory 2021-01-12 20:18:16 +01:00
nios2 sched/idle: Fix arch_cpu_idle() vs tracing 2020-11-24 16:47:35 +01:00
openrisc sched/idle: Fix arch_cpu_idle() vs tracing 2020-11-24 16:47:35 +01:00
parisc parisc: Enable -mlong-calls gcc option by default when !CONFIG_MODULES 2021-02-03 23:28:37 +01:00
powerpc powerpc/64/signal: Fix regression in __kernel_sigtramp_rt64() semantics 2021-02-13 13:55:02 +01:00
riscv riscv: virt_addr_valid must check the address belongs to linear mapping 2021-02-17 11:02:23 +01:00
s390 s390: uv: Fix sysfs max number of VCPUs reporting 2021-02-03 23:28:39 +01:00
sh sh: Remove unused HAVE_COPY_THREAD_TLS macro 2021-01-27 11:55:20 +01:00
sparc local64.h: make <asm/local64.h> mandatory 2021-01-12 20:18:16 +01:00
um um: virtio: free vu_dev only with the contained struct device 2021-02-10 09:29:12 +01:00
x86 x86/MSR: Filter MSR writes through X86_IOC_WRMSR_REGS ioctl too 2021-03-04 11:37:26 +01:00
xtensa local64.h: make <asm/local64.h> mandatory 2021-01-12 20:18:16 +01:00
.gitignore
Kconfig fanotify: Fix sys_fanotify_mark() on native x86-32 2021-01-17 14:16:59 +01:00