Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 37067C55179 for ; Tue, 27 Oct 2020 08:52:46 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B902C2071A for ; Tue, 27 Oct 2020 08:52:45 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="KVvc9euK" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2895106AbgJ0Iwp (ORCPT ); Tue, 27 Oct 2020 04:52:45 -0400 Received: from casper.infradead.org ([90.155.50.34]:34970 "EHLO casper.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2895105AbgJ0Iwo (ORCPT ); Tue, 27 Oct 2020 04:52:44 -0400 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=Aakq5ONajagRQRWUZGCHnMSkynNLLZQ4DCSJugWWUH0=; b=KVvc9euKLp49L1tVLI9ZMxp2Wz biMq3A2nuCumBvuYlInpMqo5NWa7xCVsMUhrpANCh6VA5CJ0cnJw/WkERnXhDqnefnWKbWuRRUPnl nalwnOxRxJ43N4GEUIuh9mekPijAFin6CBxZUmlYx97sL2Y8g6AJfYS6ifvnjLAQRZNnsX1Yshh+i VU9HassfXOpSVmxOCYd2ERk2Xqu1yK3S1Qud85PsS6FvYCL1/Q3MPE8bkuBbBPfRl3bw9JZM5h1gp JT8mCtLu1uwhWF3gN6PKBn/a4oeWlq9nhs3gKQ7+eCZi+nGWL+ehFT9BNSwnjvqnAApByr2IINZz+ Km8bzm2g==; Received: from 089144193201.atnat0002.highway.a1.net ([89.144.193.201] helo=localhost) by casper.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1kXKiV-0003bR-Hq; Tue, 27 Oct 2020 08:52:35 +0000 From: Christoph Hellwig To: arnd@arndb.de Cc: palmerdabbelt@google.com, linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org, kernel test robot Subject: [PATCH] asm-generic: mark __{get,put}_user_fn as __always_inline Date: Tue, 27 Oct 2020 09:50:17 +0100 Message-Id: <20201027085017.3705228-1-hch@lst.de> X-Mailer: git-send-email 2.28.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SRS-Rewrite: SMTP reverse-path rewritten from by casper.infradead.org. See http://www.infradead.org/rpr.html Precedence: bulk List-ID: X-Mailing-List: linux-arch@vger.kernel.org Without the explicit __always_inline, some RISC-V configs place the functions out of line, triggering the BUILD_BUG_ON checks in the function. Fixes: 11129e8ed4d9 ("riscv: use memcpy based uaccess for nommu again") Reported-by: kernel test robot Signed-off-by: Christoph Hellwig --- include/asm-generic/uaccess.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/include/asm-generic/uaccess.h b/include/asm-generic/uaccess.h index 45f9872fd74759..4973328f3c6e75 100644 --- a/include/asm-generic/uaccess.h +++ b/include/asm-generic/uaccess.h @@ -12,7 +12,8 @@ #ifdef CONFIG_UACCESS_MEMCPY #include -static inline int __get_user_fn(size_t size, const void __user *from, void *to) +static __always_inline int +__get_user_fn(size_t size, const void __user *from, void *to) { BUILD_BUG_ON(!__builtin_constant_p(size)); @@ -37,7 +38,8 @@ static inline int __get_user_fn(size_t size, const void __user *from, void *to) } #define __get_user_fn(sz, u, k) __get_user_fn(sz, u, k) -static inline int __put_user_fn(size_t size, void __user *to, void *from) +static __always_inline int +__put_user_fn(size_t size, void __user *to, void *from) { BUILD_BUG_ON(!__builtin_constant_p(size)); -- 2.28.0