Received: by 2002:a05:6a10:2785:0:0:0:0 with SMTP id ia5csp102942pxb; Thu, 14 Jan 2021 00:43:44 -0800 (PST) X-Google-Smtp-Source: ABdhPJzkGFeJZkiqln3HCO7drkFYywaPBn43JWWLwwibI01B4RSThF0YhXcC/BVdBoXoMVnSiU1v X-Received: by 2002:a05:6402:490:: with SMTP id k16mr4849681edv.71.1610613824057; Thu, 14 Jan 2021 00:43:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610613824; cv=none; d=google.com; s=arc-20160816; b=dLNd2Ba+UJFTf3Fiehzjc0PqOaWlTCnk8QTJomRazTbFTLxqj6IGtZ4/4Ny8G6M91w bHjgU9pLl07NgdZMKiV+yyj/m5hkuonk94ob0cojKJatTB/vyN8ExmTh9OsZiE+RhQ+j D13eW+sViz2mC3pzO9too6esqbSRhj3quOFObkuWrOqAJQKmioypIF4V+thf9m2oB6uh OebqKwsxZz77ahYOYNIXJ0xFdiLRdqkvA6nmhJGwt36BAR6cX7K6I3VM924qsSXG4nZk UlKTGsucs6Q7lbiAWGp0aJOpvnIOtI9NUi8Qg9/WDOrctqL1daMpjea6iySVdvEUu3ir VzuQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:organization :from:references:cc:to:subject:dkim-signature; bh=yZyuwqgUBskABVFLYIWGAD2FMF/t9yzwUC2QTWtpxG8=; b=iZpJYcj0NGk2HcxwPAwkDNc2LMU2tdtIHNB7hM6IbOEJPDvFVzpehtelKsJ3ZOJHCw lzrkzbInZj5O1BnRZWw9Np0Y/d6vlFne4wB9KbELPM2cmgAv8mHM0lhsPhw3rDmUNuYQ LjtOTx1eU2+I/IRX1bwDeEcYClb6eYU5h+uhhxLppzLVfdLjh9Vo/uN9leSfZ/3OfpNd MTvvRRbAN+1aB9dT1Pu56s8sQytOdbTVH/3dkh+7rxPwD/udEY+xDH56lQ6UW0UpIdLZ 9UyxOv816JkQuTdeJNNtKmE4G9FNnvptYexe3AljR0LlgnP4BZC6vzp+wLFz1AKwmhYq 6iCQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=M9TsRLMO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f18si2201011ejb.475.2021.01.14.00.43.20; Thu, 14 Jan 2021 00:43:44 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=M9TsRLMO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727902AbhANIlh (ORCPT + 99 others); Thu, 14 Jan 2021 03:41:37 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46444 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726893AbhANIlg (ORCPT ); Thu, 14 Jan 2021 03:41:36 -0500 Received: from mail-lj1-x233.google.com (mail-lj1-x233.google.com [IPv6:2a00:1450:4864:20::233]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A54EAC061794; Thu, 14 Jan 2021 00:40:55 -0800 (PST) Received: by mail-lj1-x233.google.com with SMTP id f11so5517226ljm.8; Thu, 14 Jan 2021 00:40:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:organization:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=yZyuwqgUBskABVFLYIWGAD2FMF/t9yzwUC2QTWtpxG8=; b=M9TsRLMOYhUEtXeMsks6hjymvFGTAFTtcnSeAioUr1V+e+Ys/w+5+tmqSuQePbJWQN nLX1XzhyCkUuxejX9U0wCBV7ltnfewMSvNOsCBSHvm6lwsiYXfuc7fUQ78au0oc61Jty b86r7TpT/4J5m+IyZw8My3f2eTw/PnR5ILB4rSDdqb7zATPtcCA2ec6OeOPgCj+Lpz3F wDdCpERqEDPy95Q4ktU8XrtwdlPJONjEUnSUHYOPhQYFkg0d3DfV1RUb40UCRj/N8GLN SZG7CNzjeGOBkp4gfx2/FRDLg18C47oM0goFLQC4r41mH/yWXONx4CfJYELM97u6ch54 mztw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:organization :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=yZyuwqgUBskABVFLYIWGAD2FMF/t9yzwUC2QTWtpxG8=; b=ClvHaL9jKNmU54YObMuqaaVlECsovXYBqaVDD4UMk9zyqDp+qr4i0HPbZarb1uIZfR niEbibsq0LMckibcBL22lN7a2YyjeshuxBkvCT13gn2drCYZgAEtnuW9Zgdm0oF5+9a7 yHtQT80UHIIr8R0R4fif7mtcvkO0CLi/425xcvn2WW7sfKuIPFdFE5/3LMauECIltgTC 7ld6yoHWgUh68EhvKmkiFhDa30KHbdAxTxjg0IQWMgL11bNA0I6PETMOTNf89LekyMQK Qq01qIdiOito9wuIF1uKPBsDtwJwMDfVmoHPfUETcnSVF5yre6mTlUv1dtAd8x9e/ZH+ tKzw== X-Gm-Message-State: AOAM533x5ChcCI7G+NwNyX07XPlWKxfW3YTUR2iK+2L8WBqxr1jC1JAq 8GS6jvrnabWS/4Rxyszv53gjt4vI53HYbQ== X-Received: by 2002:a2e:8745:: with SMTP id q5mr2546502ljj.77.1610613654215; Thu, 14 Jan 2021 00:40:54 -0800 (PST) Received: from [192.168.1.100] ([178.176.79.115]) by smtp.gmail.com with ESMTPSA id p5sm476176lfj.295.2021.01.14.00.40.52 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 14 Jan 2021 00:40:53 -0800 (PST) Subject: Re: [PATCH 2/2] compiler.h: Include asm/rwonce.h under ARM64 and ALPHA to fix build errors To: Tiezhu Yang , Luc Van Oostenryck , Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , Martin KaFai Lau , Song Liu , Yonghong Song , John Fastabend , KP Singh , Nathan Chancellor , Nick Desaulniers Cc: linux-sparse@vger.kernel.org, netdev@vger.kernel.org, bpf@vger.kernel.org, clang-built-linux@googlegroups.com, linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org, Xuefeng Li References: <1610535453-2352-1-git-send-email-yangtiezhu@loongson.cn> <1610535453-2352-3-git-send-email-yangtiezhu@loongson.cn> From: Sergei Shtylyov Organization: Brain-dead Software Message-ID: <04749e2c-6e80-5316-a575-e4aaf780bb81@gmail.com> Date: Thu, 14 Jan 2021 11:40:39 +0300 User-Agent: Mozilla/5.0 (Windows NT 6.3; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.6.1 MIME-Version: 1.0 In-Reply-To: <1610535453-2352-3-git-send-email-yangtiezhu@loongson.cn> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello! On 13.01.2021 13:57, Tiezhu Yang wrote: > When make M=samples/bpf on the Loongson 3A3000 platform which > belongs to MIPS arch, there exists many similar build errors > about 'asm/rwonce.h' file not found, so include it only under > CONFIG_ARM64 and CONFIG_ALPHA due to it exists only in arm64 > and alpha arch. > > CLANG-bpf samples/bpf/xdpsock_kern.o > In file included from samples/bpf/xdpsock_kern.c:2: > In file included from ./include/linux/bpf.h:9: > In file included from ./include/linux/workqueue.h:9: > In file included from ./include/linux/timer.h:5: > In file included from ./include/linux/list.h:9: > In file included from ./include/linux/kernel.h:10: > ./include/linux/compiler.h:246:10: fatal error: 'asm/rwonce.h' file not found > ^~~~~~~~~~~~~~ > 1 error generated. > > $ find . -name rwonce.h > ./include/asm-generic/rwonce.h > ./arch/arm64/include/asm/rwonce.h > ./arch/alpha/include/asm/rwonce.h > > Signed-off-by: Tiezhu Yang > --- > include/linux/compiler.h | 6 ++++++ > 1 file changed, 6 insertions(+) > > diff --git a/include/linux/compiler.h b/include/linux/compiler.h > index b8fe0c2..bdbe759 100644 > --- a/include/linux/compiler.h > +++ b/include/linux/compiler.h > @@ -243,6 +243,12 @@ static inline void *offset_to_ptr(const int *off) > */ > #define prevent_tail_call_optimization() mb() > > +#ifdef CONFIG_ARM64 Why not #if defined(CONFIG_ALPHA) || defined(CONFIG_ARM64)? > #include > +#endif > + > +#ifdef CONFIG_ALPHA > +#include > +#endif > > #endif /* __LINUX_COMPILER_H */ > MBR, Sergei