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=-9.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,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 B1099C63798 for ; Tue, 17 Nov 2020 01:40:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2E6042469D for ; Tue, 17 Nov 2020 01:40:14 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="bEW/mOR3" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726338AbgKQBkA (ORCPT ); Mon, 16 Nov 2020 20:40:00 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36246 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725730AbgKQBkA (ORCPT ); Mon, 16 Nov 2020 20:40:00 -0500 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D72BEC0613CF for ; Mon, 16 Nov 2020 17:39:59 -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:MIME-Version: Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:In-Reply-To:References; bh=jvqxGYjFQsaLtu5EXBK7p5m45joX49ZCWSOOd/T3udE=; b=bEW/mOR3h0K8l0u4AaVy1R1+zI ROf2Ll3aPiGI3P2HtNWM1WVjyLD65MQmAbOMqj5jeA9eUqU1MQng0s0KgIxnOw0nvWFaWdKXBu/Y7 j1LKeEo2epEIY1YPuOL2SRQHznhjCJPAIiLA8EIWPtWLD9T5lBJAHl1MtOftYYNd7StE3aGTzGqs3 esw7grI8ENWCUz7Nii9TGCZ9qRkx/MpRjNw3NCSU50bDkc85SVO35KAXw9iTvY/tJxWKvRawmjWw1 qSAQXp3GcOYMphZXOUoMmXYpAUjo2QMqMk0UH/tWUxY2AfWv+zNzkoszX/FSiO0LTSQvc3vj6v5MX T7SuX1hQ==; Received: from [2601:1c0:6280:3f0::f32] (helo=smtpauth.infradead.org) by casper.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1kepyN-00042a-Uc; Tue, 17 Nov 2020 01:39:56 +0000 From: Randy Dunlap To: linux-kernel@vger.kernel.org Cc: Randy Dunlap , Andreas Schwab , Andrew Morton , Stephen Rothwell , Arvind Sankar , linux-riscv@lists.infradead.org, clang-built-linux@googlegroups.com, Nick Desaulniers , Nathan Chancellor , Paul Walmsley , Palmer Dabbelt , Albert Ou Subject: [PATCH] RISC-V: fix barrier() use in Date: Mon, 16 Nov 2020 17:39:51 -0800 Message-Id: <20201117013951.7827-1-rdunlap@infradead.org> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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") 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