From nobody Sat Apr 11 19:37:54 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D4FCBC19F2A for ; Sun, 7 Aug 2022 17:28:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233754AbiHGR2x (ORCPT ); Sun, 7 Aug 2022 13:28:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59426 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229501AbiHGR2u (ORCPT ); Sun, 7 Aug 2022 13:28:50 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BB634635A for ; Sun, 7 Aug 2022 10:28:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:MIME-Version: Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:In-Reply-To:References; bh=OQ6HIEzvGhUBHIBVK/MMVvqDNtQvuWyey2ZBasDPQw8=; b=qWiaI30ZKgT7wPXCto/BonchEx ImXG1XAqUDBZ/9lA+h2rUk1iTg4dbXp/b5PwQwoHKZiKhLm66BuWm2pbiYi5ToBrxSsmNVLgfKWmd KdMY+X7jnjPqVyzAIrFvR+UVDE5+o9LskBdVDdoRwmMXt/TFw9NW4hsEs804QqdYNrCKTaYbhPnyn SZuwHVzM6dylK2g/TfOYdOBvQDXZlbrAbh9Hn8ohLn5kReIOL174+qFzZPf1WBXi5MBM4P0nUyrr6 REYLVqUayELkiW0Kc15JSydrvWFE0Ef1yNu/UsJ/nQMGbBVhBT4Ek3mgK75z84CvczxOMi2Ka30Km yIInvvuQ==; Received: from [2601:1c0:6280:3f0::a6b3] (helo=casper.infradead.org) by casper.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1oKk4y-00DB4C-Gb; Sun, 07 Aug 2022 17:28:45 +0000 From: Randy Dunlap To: linux-kernel@vger.kernel.org Cc: Randy Dunlap , Paul Walmsley , Palmer Dabbelt , Albert Ou , linux-riscv@lists.infradead.org, Guo Ren , Arnd Bergmann Subject: [PATCH] riscv: compat: make __ARCH_WANT_COMPAT_FADVISE64_64 conditional Date: Sun, 7 Aug 2022 10:28:39 -0700 Message-Id: <20220807172839.12359-1-rdunlap@infradead.org> X-Mailer: git-send-email 2.37.1 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" 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 imp= lementation") Signed-off-by: Randy Dunlap Cc: Paul Walmsley Cc: Palmer Dabbelt Cc: Albert Ou Cc: linux-riscv@lists.infradead.org Cc: Guo Ren Cc: Arnd Bergmann --- 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 =20 #include