Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1575101

Re: [PATCH 4/4] tools include: Fix include path for uapi/asm-generic/mman.h

From David Carrillo-Cisneros <davidcc@google.com>
Newsgroups linux.kernel
Subject Re: [PATCH 4/4] tools include: Fix include path for uapi/asm-generic/mman.h
Date 2017-02-06 21:10 +0100
Message-ID <t7XLP-1eL-1@gated-at.bofh.it> (permalink)
References <t6jdL-fC-1@gated-at.bofh.it> <t6jdM-fC-9@gated-at.bofh.it> <t7Wd3-9Q-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


> What problem is this fixing?
>
> I.e. one is supposed to include <linux/mman.h>, 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 <uapi/asm/mman.h>
                           ^
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 <uapi/linux/mman.h> /* 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 <uapi/asm-generic/mman.h>
+#include <uapi/asm/mman.h>

fixes by build. I don't know if it breaks something with HugeTLB, though.

Thanks,
David

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 0/4] Fixes for perf build and feature detection David Carrillo-Cisneros <davidcc@google.com> - 2017-02-02 07:40 +0100
  [PATCH 2/4] tools lib traceevent: Robustify do_generate_dynamic_list_file David Carrillo-Cisneros <davidcc@google.com> - 2017-02-02 07:40 +0100
    Re: [PATCH 2/4] tools lib traceevent: Robustify  do_generate_dynamic_list_file Arnaldo Carvalho de Melo <acme@kernel.org> - 2017-02-06 18:50 +0100
  [PATCH 4/4] tools include: Fix include path for uapi/asm-generic/mman.h David Carrillo-Cisneros <davidcc@google.com> - 2017-02-02 07:40 +0100
    Re: [PATCH 4/4] tools include: Fix include path for  uapi/asm-generic/mman.h Jiri Olsa <jolsa@redhat.com> - 2017-02-02 14:00 +0100
    Re: [PATCH 4/4] tools include: Fix include path for  uapi/asm-generic/mman.h Arnaldo Carvalho de Melo <acme@kernel.org> - 2017-02-06 19:30 +0100
      Re: [PATCH 4/4] tools include: Fix include path for uapi/asm-generic/mman.h David Carrillo-Cisneros <davidcc@google.com> - 2017-02-06 21:10 +0100
  [PATCH 1/4] perf tools: pass PYTHON config to feature detection David Carrillo-Cisneros <davidcc@google.com> - 2017-02-02 07:40 +0100
    Re: [PATCH 1/4] perf tools: pass PYTHON config to feature detection Arnaldo Carvalho de Melo <acme@kernel.org> - 2017-02-06 14:20 +0100
      Re: [PATCH 1/4] perf tools: pass PYTHON config to feature detection Namhyung Kim <namhyung@kernel.org> - 2017-02-06 16:30 +0100
    Re: [PATCH 1/4] perf tools: pass PYTHON config to feature detection Arnaldo Carvalho de Melo <acme@kernel.org> - 2017-02-07 20:50 +0100
      Re: [PATCH 1/4] perf tools: pass PYTHON config to feature detection David Carrillo-Cisneros <davidcc@google.com> - 2017-02-08 04:20 +0100
        [PATCH v2] tools lib traceevent: Robustify do_generate_dynamic_list_file David Carrillo-Cisneros <davidcc@google.com> - 2017-02-08 06:30 +0100
          Re: [PATCH v2] tools lib traceevent: Robustify  do_generate_dynamic_list_file Arnaldo Carvalho de Melo <acme@kernel.org> - 2017-02-08 13:50 +0100
            Re: [PATCH v2] tools lib traceevent: Robustify  do_generate_dynamic_list_file Arnaldo Carvalho de Melo <acme@kernel.org> - 2017-02-08 14:30 +0100
              Re: [PATCH v2] tools lib traceevent: Robustify do_generate_dynamic_list_file David Carrillo-Cisneros <davidcc@google.com> - 2017-02-09 06:20 +0100
          [tip:perf/core] tools lib traceevent: Robustify  do_generate_dynamic_list_file tip-bot for David Carrillo-Cisneros <tipbot@zytor.com> - 2017-02-10 09:50 +0100
  Re: [PATCH 0/4] Fixes for perf build and feature detection Jiri Olsa <jolsa@redhat.com> - 2017-02-02 14:00 +0100

csiph-web