From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752357AbdBFUJH (ORCPT ); Mon, 6 Feb 2017 15:09:07 -0500 Received: from mail-vk0-f47.google.com ([209.85.213.47]:35651 "EHLO mail-vk0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752033AbdBFUJF (ORCPT ); Mon, 6 Feb 2017 15:09:05 -0500 MIME-Version: 1.0 In-Reply-To: <20170206182523.GB24988@kernel.org> References: <20170202063804.94027-1-davidcc@google.com> <20170202063804.94027-5-davidcc@google.com> <20170206182523.GB24988@kernel.org> From: David Carrillo-Cisneros Date: Mon, 6 Feb 2017 12:09:03 -0800 Message-ID: Subject: Re: [PATCH 4/4] tools include: Fix include path for uapi/asm-generic/mman.h To: Arnaldo Carvalho de Melo Cc: linux-kernel , Ingo Molnar , Peter Zijlstra , Jiri Olsa , Alexander Shishkin , Wang Nan , He Kuang , Michal Marek , =?UTF-8?Q?Uwe_Kleine=2DK=C3=B6nig?= , Stephane Eranian , Paul Turner Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > What problem is this fixing? > > I.e. one is supposed to include , get the > tools/include/uapi/linux/mman.h and it in turn will include the per-arch > mman.h, say tools/arch/sparc/include/uapi/asm/mman.h, that in turn will > include uapi/asm-generic/mman-common.h after defining its diverging > bits. > > Some, like the ones for the Alpha and MIPS architectures, will not even > include mman-common.h, so diverging they are. > > Lots of arches, like s390, will just include uapi/asm-generic/mman.h > from its mman.h file (tools/arch/s390/include/uapi/asm/mman.h), just > like you'd do for _all_ arches in your patch below. > > tools/perf/Makefile.config is the one doing: > > INC_FLAGS += -I$(srctree)/tools/arch/$(ARCH)/include/ > > and: > > [acme@jouet linux]$ ls tools/arch/*/include/uapi/asm/mman.h > tools/arch/alpha/include/uapi/asm/mman.h tools/arch/ia64/include/uapi/asm/mman.h tools/arch/s390/include/uapi/asm/mman.h > tools/arch/arc/include/uapi/asm/mman.h tools/arch/m32r/include/uapi/asm/mman.h tools/arch/score/include/uapi/asm/mman.h > tools/arch/arm64/include/uapi/asm/mman.h tools/arch/microblaze/include/uapi/asm/mman.h tools/arch/sh/include/uapi/asm/mman.h > tools/arch/arm/include/uapi/asm/mman.h tools/arch/mips/include/uapi/asm/mman.h tools/arch/sparc/include/uapi/asm/mman.h > tools/arch/frv/include/uapi/asm/mman.h tools/arch/mn10300/include/uapi/asm/mman.h tools/arch/tile/include/uapi/asm/mman.h > tools/arch/h8300/include/uapi/asm/mman.h tools/arch/parisc/include/uapi/asm/mman.h tools/arch/x86/include/uapi/asm/mman.h > tools/arch/hexagon/include/uapi/asm/mman.h tools/arch/powerpc/include/uapi/asm/mman.h tools/arch/xtensa/include/uapi/asm/mman.h > [acme@jouet linux]$ > > Am I missing something? > The original error is: In file included from util/event.c:2:0: ...tools/include/uapi/linux/mman.h:4:27: fatal error: uapi/asm/mman.h: No such file or directory #include ^ compilation terminated. After reading your explanation, seems like the problem is caused by util/event.c directly including uapi/linux/mman.h : Line 2: #include /* To get things like MAP_HUGETLB even on older libc headers */ introduced in commit fbef103fad ("perf tools: Do hugetlb handling in more systems"). Doing: --- a/tools/include/uapi/linux/mman.h +++ b/tools/include/uapi/linux/mman.h @@ -1,7 +1,7 @@ #ifndef _UAPI_LINUX_MMAN_H #define _UAPI_LINUX_MMAN_H -#include +#include fixes by build. I don't know if it breaks something with HugeTLB, though. Thanks, David