From mboxrd@z Thu Jan 1 00:00:00 1970 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=-17.2 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=unavailable 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 95852C5519F for ; Tue, 17 Nov 2020 19:23:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3C41A221FC for ; Tue, 17 Nov 2020 19:23:20 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="iC49Y/Wp" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728982AbgKQTW4 (ORCPT ); Tue, 17 Nov 2020 14:22:56 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59260 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726466AbgKQTWy (ORCPT ); Tue, 17 Nov 2020 14:22:54 -0500 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 69244C0613CF for ; Tue, 17 Nov 2020 11:22:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:Content-Type: In-Reply-To:MIME-Version:Date:Message-ID:From:References:Cc:To:Subject:Sender :Reply-To:Content-ID:Content-Description; bh=t0Ko6hqbyKkoaE2Zp9g1QeIuYu7rk/KOlj3Y3oin9Ng=; b=iC49Y/Wp4zg3nKkl05NMMRZEvi 6gzzOVa5WqsNW4zLHwFvmzgnmoCfT5eHf/5lSf6lk5pubJcTlNyqrmRJg9RpiBkIQORATm4jGAzTj fucR6rBiyeVFh8OgH9MbfxbobcXd0VEXJZaKVjh4tk7pJ/VQac40WBkZ9Jmhm/JGxeqrAn+erwCAc /fJwaJQn1pUhhBejXUeMaQ0RfPzlUoR+Rkw38IrUp7K3JgVJNrdAqBnYC9ezxDqkx6H5dVHxXWa68 pU/MBGvqPcFumvEsIn8TxNi5L21Ul/O7ZKGRZwnp1+3n/txC+WDhLMaYClilVlgNwdG+7WA9SvBuz DP7eEcaw==; Received: from [2601:1c0:6280:3f0::bcc4] by casper.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1kf6Yt-0005HV-Qs; Tue, 17 Nov 2020 19:22:44 +0000 Subject: Re: [PATCH] RISC-V: fix barrier() use in To: Nick Desaulniers Cc: LKML , Andreas Schwab , Andrew Morton , Stephen Rothwell , Arvind Sankar , linux-riscv@lists.infradead.org, clang-built-linux , Nathan Chancellor , Paul Walmsley , Palmer Dabbelt , Albert Ou References: <20201117013951.7827-1-rdunlap@infradead.org> From: Randy Dunlap Message-ID: <9ab43756-6c48-c5e8-3a5d-e44bba070a97@infradead.org> Date: Tue, 17 Nov 2020 11:22:39 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.12.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11/17/20 11:00 AM, Nick Desaulniers wrote: > On Mon, Nov 16, 2020 at 5:40 PM Randy Dunlap wrote: >> >> riscv's uses barrier() so it should >> #include to prevent build errors. >> >> Fixes this build error: >> CC [M] drivers/net/ethernet/emulex/benet/be_main.o >> In file included from ./include/vdso/processor.h:10, >> from ./arch/riscv/include/asm/processor.h:11, >> from ./include/linux/prefetch.h:15, >> from drivers/net/ethernet/emulex/benet/be_main.c:14: >> ./arch/riscv/include/asm/vdso/processor.h: In function 'cpu_relax': >> ./arch/riscv/include/asm/vdso/processor.h:14:2: error: implicit declaration of function 'barrier' [-Werror=implicit-function-declaration] >> 14 | barrier(); >> >> This happens with a total of 5 networking drivers -- they all use >> . >> >> rv64 allmodconfig now builds cleanly after this patch. >> >> Fixes fallout from: >> 815f0ddb346c ("include/linux/compiler*.h: make compiler-*.h mutually exclusive") >> >> Fixes: ad5d1122b82f ("riscv: use vDSO common flow to reduce the latency of the time-related functions") > > Hi Randy, > Thanks for the patch, it looks good to me. I only had a question on > the commit message. > > Is this also related to: > commit 3347acc6fcd4 ("compiler.h: fix barrier_data() on clang") Hi Nick, Yes, it looks like I tagged the wrong commit in Fixes: Thanks for noticing that. > I plan to backport 3347acc6fcd4, so it would be good if all of the > follow ups are all tagged accordingly with fixes tags, so that I don't > break anything backporting 3347acc6fcd4 because I forgot or missed any > follow ups that also needed to be backported. > >> Reported-by: Andreas Schwab >> Signed-off-by: Randy Dunlap >> Cc: Andrew Morton >> Cc: Stephen Rothwell >> Cc: Arvind Sankar >> Cc: linux-riscv@lists.infradead.org >> Cc: clang-built-linux@googlegroups.com >> Cc: Nick Desaulniers >> Cc: Nathan Chancellor >> Cc: Paul Walmsley >> Cc: Palmer Dabbelt >> Cc: Albert Ou >> --- >> arch/riscv/include/asm/vdso/processor.h | 2 ++ >> 1 file changed, 2 insertions(+) >> >> --- lnx-510-rc4.orig/arch/riscv/include/asm/vdso/processor.h >> +++ lnx-510-rc4/arch/riscv/include/asm/vdso/processor.h >> @@ -4,6 +4,8 @@ >> >> #ifndef __ASSEMBLY__ >> >> +#include >> + >> static inline void cpu_relax(void) >> { >> #ifdef __riscv_muldiv > > > -- ~Randy