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: 56478 Delivered-To: patch@linaro.org Received: by 10.112.155.196 with SMTP id vy4csp684180lbb; Thu, 12 Nov 2015 14:26:26 -0800 (PST) X-Received: by 10.66.101.40 with SMTP id fd8mr18910236pab.91.1447367186163; Thu, 12 Nov 2015 14:26:26 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ya6si22554053pab.83.2015.11.12.14.26.25; Thu, 12 Nov 2015 14:26:26 -0800 (PST) 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; 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; dkim=neutral (body hash did not verify) header.i=@linaro_org.20150623.gappssmtp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754404AbbKLW0Y (ORCPT + 28 others); Thu, 12 Nov 2015 17:26:24 -0500 Received: from mail-pa0-f51.google.com ([209.85.220.51]:33590 "EHLO mail-pa0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753877AbbKLW0W (ORCPT ); Thu, 12 Nov 2015 17:26:22 -0500 Received: by pabfh17 with SMTP id fh17so77995679pab.0 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=gSsqN613/cv70TwUXQJWDNJe0UfxDC0sUkjj3HM2T4o+t33JOjuxme41mScU0rpQsJ WtPGIP6aeDoV4mkVU8OuUNAVUB8xOEjuC7PMCteCOP+HtriN0YFiNBPT6mWFVJPe3sqH IoJfQ47mmgDrLT2MKOrtd99+/WZHwKyEq3XOuOEOxvRC30ZmIHVH5dP6iAetdRKOyJq1 JDHqa9b0bkFwIp/u8PBl/BL39c2t3Pqwa9yOG1hUV8CqdHB0Emx2UCDUeJXUBLDBbJzZ dpa184MWUiRN1+hb1WPtsJyxqBUxY5130jkBRsElHS9C1VAE5oeRmQor2O1JOHSCYKWD 72YQ== X-Gm-Message-State: ALoCoQkVzBuM8zFllsLYEN8vv4MmH+Ztwriw8QqsyusVIXJ6kzNZFPV8Zzpa3VvS6/j5bxFAhL+c 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: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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 --- samples/bpf/Makefile | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) -- 2.0.2 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ 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