[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220807172839.12359-1-rdunlap@infradead.org>
Date: Sun, 7 Aug 2022 10:28:39 -0700
From: Randy Dunlap <rdunlap@...radead.org>
To: linux-kernel@...r.kernel.org
Cc: Randy Dunlap <rdunlap@...radead.org>,
Paul Walmsley <paul.walmsley@...ive.com>,
Palmer Dabbelt <palmer@...belt.com>,
Albert Ou <aou@...s.berkeley.edu>,
linux-riscv@...ts.infradead.org, Guo Ren <guoren@...nel.org>,
Arnd Bergmann <arnd@...db.de>
Subject: [PATCH] riscv: compat: make __ARCH_WANT_COMPAT_FADVISE64_64 conditional
When CONFIG_ADVISE_SYSCALLS is not set/enabled and CONFIG_COMPAT is
set/enabled, the riscv compat_syscall_table references
'compat_sys_fadvise64_64', which is not defined:
riscv64-linux-ld: arch/riscv/kernel/compat_syscall_table.o:(.rodata+0x6f8):
undefined reference to `compat_sys_fadvise64_64'
Only set __ARCH_WANT_COMPAT_FADVISE64_64 when CONFIG_ADVISE_SYSCALLS
is set.
Fixes: 59c10c52f573 ("riscv: compat: syscall: Add compat_sys_call_table implementation")
Signed-off-by: Randy Dunlap <rdunlap@...radead.org>
Cc: Paul Walmsley <paul.walmsley@...ive.com>
Cc: Palmer Dabbelt <palmer@...belt.com>
Cc: Albert Ou <aou@...s.berkeley.edu>
Cc: linux-riscv@...ts.infradead.org
Cc: Guo Ren <guoren@...nel.org>
Cc: Arnd Bergmann <arnd@...db.de>
---
arch/riscv/include/asm/unistd.h | 2 ++
1 file changed, 2 insertions(+)
--- a/arch/riscv/include/asm/unistd.h
+++ b/arch/riscv/include/asm/unistd.h
@@ -18,8 +18,10 @@
#define __ARCH_WANT_COMPAT_PWRITE64
#define __ARCH_WANT_COMPAT_SYNC_FILE_RANGE
#define __ARCH_WANT_COMPAT_READAHEAD
+#ifdef CONFIG_ADVISE_SYSCALLS
#define __ARCH_WANT_COMPAT_FADVISE64_64
#endif
+#endif
#include <uapi/asm/unistd.h>
Powered by blists - more mailing lists