From patchwork Thu Nov 12 22:07:46 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yang Shi X-Patchwork-Id: 543721 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id BBBDE141429 for ; Fri, 13 Nov 2015 09:26:43 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=linaro_org.20150623.gappssmtp.com header.i=@linaro_org.20150623.gappssmtp.com header.b=jIpHCoWq; dkim-atps=neutral Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754234AbbKLW0X (ORCPT ); Thu, 12 Nov 2015 17:26:23 -0500 Received: from mail-pa0-f51.google.com ([209.85.220.51]:36798 "EHLO mail-pa0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753347AbbKLW0W (ORCPT ); Thu, 12 Nov 2015 17:26:22 -0500 Received: by pacdm15 with SMTP id dm15so77805180pac.3 for ; Thu, 12 Nov 2015 14:26:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro_org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id; bh=BxsD3iuuxUQYjT2sCeYD6UYzYJbxC6ws5l5iNhPSFC4=; b=jIpHCoWqdVpeMHab+8TnXQpb4VfOR1NAfEnX4xl0/qTEOnZbV7QNXp34+abofkyvOd ChXINPia77zXXkh+SiAIgpyLvUUyyju1ENmbr7LAtnfpZS691PFH72Vm61+Jv7P8Uu/n Uj0ObPrfsS3a87M64uxh5gtWoZQJyTazG3sDeRMigr9CIowCD0x6stbuprzFA0GH/Rvc yYqrWTWMjLrBDkNmEINK0WkDPJ84eAYxQOGwxuvnehrifrKjZmqrD1EJuB/EEQYJ7tli 5ZiImTfdD6nFmWJ3GDP00Kkv4JQpgi/DC/legmdq3xho71spRzMSY1goBwJVKLIWwsqx L5vg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=BxsD3iuuxUQYjT2sCeYD6UYzYJbxC6ws5l5iNhPSFC4=; b=fRSLUTvg6AehqoBX29FlXmCADN88ovqU4bU4AMMDrad7hjLw+dIH5NFaf3wMs1N8a5 6dsuZ7YY4/CF6CVqCvdwYt4BDYLO0U2pqF266/wUQUxwcwJcN+ukWPGFUFmgpQ89tHge ZLyINIJMUdhF8VeqDTx1VO3rsHglSLKjPLa3k4C7kVVpWfAEFYXLKe8elpXcxlET2QxB SDQ55Vk/tSkyy8eeN6c/uhWl/27tc+InQRc7zLEw+Dy6doLUHcOZ65+NYT4JbrM+HgIG PD8CV/JL96W/YQUdzGzGtwp/eY+jPLUR5RFQUGWoOCiY83soEAXMp5+23x+MHFC5j/Mf eQtQ== X-Gm-Message-State: ALoCoQkQm5alXQsS27KmRc/ZNlSTLBshHSSwiSkRxWIqjrKXrVyzgMVZpJE1yW/H21s8et9Ryh49 X-Received: by 10.66.222.68 with SMTP id qk4mr26862522pac.89.1447367181862; Thu, 12 Nov 2015 14:26:21 -0800 (PST) Received: from yshi-Precision-T5600.corp.ad.wrs.com (unknown-216-82.windriver.com. [147.11.216.82]) by smtp.gmail.com with ESMTPSA id nu5sm16545552pbb.65.2015.11.12.14.26.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 12 Nov 2015 14:26:21 -0800 (PST) From: Yang Shi To: ast@kernel.org, daniel@iogearbox.net Cc: linux-kernel@vger.kernel.org, netdev@vger.kernel.org, linaro-kernel@lists.linaro.org, yang.shi@linaro.org Subject: [PATCH] bpf: samples: exclude asm/sysreg.h for arm64 Date: Thu, 12 Nov 2015 14:07:46 -0800 Message-Id: <1447366066-2203-1-git-send-email-yang.shi@linaro.org> X-Mailer: git-send-email 2.0.2 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org commit 338d4f49d6f7114a017d294ccf7374df4f998edc ("arm64: kernel: Add support for Privileged Access Never") includes sysreg.h into futex.h and uaccess.h. But, the inline assembly used by asm/sysreg.h is incompatible with llvm so it will cause BPF samples build failure for ARM64. Since sysreg.h is useless for BPF samples, just exclude it from Makefile via defining __ASM_SYSREG_H. Signed-off-by: Yang Shi Acked-by: Alexei Starovoitov --- samples/bpf/Makefile | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/samples/bpf/Makefile b/samples/bpf/Makefile index 79b4596..edd638b 100644 --- a/samples/bpf/Makefile +++ b/samples/bpf/Makefile @@ -67,10 +67,13 @@ HOSTLOADLIBES_lathist += -lelf # point this to your LLVM backend with bpf support LLC=$(srctree)/tools/bpf/llvm/bld/Debug+Asserts/bin/llc +# asm/sysreg.h inline assmbly used by it is incompatible with llvm. +# But, ehere is not easy way to fix it, so just exclude it since it is +# useless for BPF samples. $(obj)/%.o: $(src)/%.c clang $(NOSTDINC_FLAGS) $(LINUXINCLUDE) $(EXTRA_CFLAGS) \ - -D__KERNEL__ -Wno-unused-value -Wno-pointer-sign \ + -D__KERNEL__ -D__ASM_SYSREG_H -Wno-unused-value -Wno-pointer-sign \ -O2 -emit-llvm -c $< -o -| $(LLC) -march=bpf -filetype=obj -o $@ clang $(NOSTDINC_FLAGS) $(LINUXINCLUDE) $(EXTRA_CFLAGS) \ - -D__KERNEL__ -Wno-unused-value -Wno-pointer-sign \ + -D__KERNEL__ -D__ASM_SYSREG_H -Wno-unused-value -Wno-pointer-sign \ -O2 -emit-llvm -c $< -o -| $(LLC) -march=bpf -filetype=asm -o $@.s