Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp21221ybl; Thu, 29 Aug 2019 17:52:52 -0700 (PDT) X-Google-Smtp-Source: APXvYqyc34ZhhoxMTuVUC0vB9rc4BlGTK9nL6o3jIalqO21zyJ7xghRQUjaNY/Ddq9CvIcNnsqKb X-Received: by 2002:aa7:9495:: with SMTP id z21mr14844431pfk.220.1567126372459; Thu, 29 Aug 2019 17:52:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567126372; cv=none; d=google.com; s=arc-20160816; b=qoYGU/oYSdVMMxaKCvz0OzPCEowxT/2B7B5hIpKzOjwJ8GOMVoMdJZjBfQYKDmmfIZ Top/2ffe9PkB9UGoN2Ued2fJ+ajV83wq3MVf75K5HMLN3+2DcalvXF3QSz/gcwafkUr7 eYnNvoMKm0QFu3x5dKM/ETnsH+f6qStGcxapk0z/pfdLO3P7bek9syfr9sUEC6xgXT+i AvhBRKbdCeUZ/Nu2VM1WDBI5tTyw+dYlwR3X4O5nN2GzOcQxgiOLgzwWHjp0Z0Yi+paq KJgv96OqeDFXP9PQfJy9/jvKnsN39FuPDwPNnBWbQujg8ijTeja+Ac0Ih1nWs2eXd9Ho Sgpw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=rseUd9y/GnXjRY8PsudxS8BEzI5o7BH/gE6GzGNAkz0=; b=pjqaZ1YbuWza1ydC06DLjspt3tHKNKK3awmgJoEAswaAsalbWPRdKB9XOwb94EA9iT WZJqpbdrLXDuHOzS08KAQF0LIlEATjnHiN4haAVmbLvHCgadx8MA0WRTeZ7kCak6AQUZ kyfIYZl18g2zj9gsgAVPhBbCDx6hB0L8O1llJzNYYkyMWf6/dLpmfzu+gQ+nOXqfqhWW npIR03/gGBxpXMmhl95KDhnrcHZDxNmMqrUDoE4SAvkAFazQPL9Csn1YDZMpiAKUhN5G FmI6r54rdIcmViFb96D2ARnZn80svdjjEVP6mq+zAFFXJBZeVMHwmwj5KVhUjJaAl1kO Y99w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=p+c78cGO; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r4si3267851pgb.245.2019.08.29.17.52.17; Thu, 29 Aug 2019 17:52:52 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=p+c78cGO; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728006AbfH3AvI (ORCPT + 99 others); Thu, 29 Aug 2019 20:51:08 -0400 Received: from mail-lf1-f67.google.com ([209.85.167.67]:38137 "EHLO mail-lf1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727883AbfH3Auz (ORCPT ); Thu, 29 Aug 2019 20:50:55 -0400 Received: by mail-lf1-f67.google.com with SMTP id c12so3976329lfh.5 for ; Thu, 29 Aug 2019 17:50:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=rseUd9y/GnXjRY8PsudxS8BEzI5o7BH/gE6GzGNAkz0=; b=p+c78cGOyUo6huk/pdHK4LHWxY05E5DmCBl6Y9TnX0wvtYNQzK7/aTvz75AqmlPGvA lX3zJWWhAuFN7kMzRbIe4MIRTgqe2XNObWdcxwvAYdo9v+NHqraV4ztUXFoSctAfudEb 6iWjcDghz5Lkpmgx4rrpBe3K+94vUyybq7SVTJP0KvecAGtDjApjNEeFXlxu6wHYQ2nG Aia65Ra96zxOxrfifKlzHZK+MklKrHz3P1CXW6V1T+wu0gkWFEF3j5zl9WfXVvgh/7Iz tX+fup/gKLffQChanaOEXwwKRLJP/Zl4iC0qpnp9r8NCvX0yAmZFBiQuq5bIQpJinAgf 23aA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=rseUd9y/GnXjRY8PsudxS8BEzI5o7BH/gE6GzGNAkz0=; b=BNoyDJvlAgc74Exz6ywK/h8/6auM3ERw1Lliis7oJG2T05AIo1984XS+hka0PuJk08 sGUZXC91Qr17Guk/wicaxbz8LMIztmCOGTbrwscm5hnvKh4tAPkOjJ5GAqopOWUF8oe2 xf5n+o+9+c8cvEsRI9PeF1A5eHjEAC+mAECGEJi8BSdGHrCgwNWgBPm1dHtW7gy9EQ3j 3TZJtO16bsWCmF0HfniK3gcOx4c1hNnLTHRkB4YVL7dckbik3QJaUHkrDYmJW/Qag25v jtHAz6HXtossTMVxNFitt5foYwP/T3XXTuoTpDl1NXOm+WYvUEpeLWhTPnUrxnCa36EF dwlQ== X-Gm-Message-State: APjAAAWcXZvqhZvCh8PauTMicOrGAWZm3C1KK5lphk2V8ii6Khk9OELQ CNAl3ZygVByqndp08wSmrscxHw== X-Received: by 2002:a19:e04f:: with SMTP id g15mr7384740lfj.46.1567126253185; Thu, 29 Aug 2019 17:50:53 -0700 (PDT) Received: from localhost.localdomain (168-200-94-178.pool.ukrtel.net. [178.94.200.168]) by smtp.gmail.com with ESMTPSA id f19sm628149lfk.43.2019.08.29.17.50.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Aug 2019 17:50:52 -0700 (PDT) From: Ivan Khoronzhuk To: linux@armlinux.org.uk, ast@kernel.org, daniel@iogearbox.net, yhs@fb.com, davem@davemloft.net, jakub.kicinski@netronome.com, hawk@kernel.org, john.fastabend@gmail.com Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, bpf@vger.kernel.org, clang-built-linux@googlegroups.com, Ivan Khoronzhuk Subject: [PATCH RFC bpf-next 09/10] arm: include: asm: swab: mask rev16 instruction for clang Date: Fri, 30 Aug 2019 03:50:36 +0300 Message-Id: <20190830005037.24004-10-ivan.khoronzhuk@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190830005037.24004-1-ivan.khoronzhuk@linaro.org> References: <20190830005037.24004-1-ivan.khoronzhuk@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The samples/bpf with clang -emit-llvm reuses linux headers to build bpf samples, and this w/a only for samples (samples/bpf/Makefile CLANG-bpf). It allows to build samples/bpf for arm bpf using clang. In another way clang -emit-llvm generates errors like: CLANG-bpf samples/bpf/tc_l2_redirect_kern.o :1:2: error: invalid register/token name rev16 r3, r0 This decision is arguable, probably there is another way, but it doesn't have impact on samples/bpf, so it's easier just ignore it for clang, at least for now. Signed-off-by: Ivan Khoronzhuk --- arch/arm/include/asm/swab.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/arm/include/asm/swab.h b/arch/arm/include/asm/swab.h index c6051823048b..a9fd9cd33d5e 100644 --- a/arch/arm/include/asm/swab.h +++ b/arch/arm/include/asm/swab.h @@ -25,8 +25,11 @@ static inline __attribute_const__ __u32 __arch_swahb32(__u32 x) __asm__ ("rev16 %0, %1" : "=r" (x) : "r" (x)); return x; } + +#ifndef __clang__ #define __arch_swahb32 __arch_swahb32 #define __arch_swab16(x) ((__u16)__arch_swahb32(x)) +#endif static inline __attribute_const__ __u32 __arch_swab32(__u32 x) { -- 2.17.1