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


Groups > linux.kernel > #1483127

Re: [PATCH 1/3] tools include: Add uapi mman.h for each architecture

Path csiph.com!aioe.org!bofh.it!news.nic.it!robomod
From "Wangnan (F)" <wangnan0@huawei.com>
Newsgroups linux.kernel
Subject Re: [PATCH 1/3] tools include: Add uapi mman.h for each architecture
Date Wed, 14 Sep 2016 11:40:01 +0200
Message-ID <shePD-7Az-9@gated-at.bofh.it> (permalink)
References <sgz05-3qM-5@gated-at.bofh.it> <sgz05-3qM-3@gated-at.bofh.it> <sgEMa-7tX-33@gated-at.bofh.it> <sgGNY-yl-5@gated-at.bofh.it> <sheFX-7x3-1@gated-at.bofh.it>
X-Original-To "Naveen N. Rao" <naveen.n.rao@linux.vnet.ibm.com>, "Arnaldo Carvalho de Melo" <acme@kernel.org>
User-Agent Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.5.0
MIME-Version 1.0
Content-Type text/plain; charset="utf-8"; format=flowed
Content-Transfer-Encoding 8bit
X-Originating-IP [10.111.66.109]
X-Cfilter-Loop Reflected
X-Mirapoint-Virus-Rapid-Raw score=unknown(0), refid=str=0001.0A020201.57D91A4D.016C,ss=1,re=0.000,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0, ip=0.0.0.0, so=2013-06-18 04:22:30, dmn=2013-03-21 17:37:32
X-Mirapoint-Loop-ID 3dcbcc4a23e64d5f1bf9047548628197
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 60
Organization linux.* mail to news gateway
X-Original-Cc <linux-kernel@vger.kernel.org>, <lizefan@huawei.com>, <pi3orama@163.com>
X-Original-Date Wed, 14 Sep 2016 17:36:54 +0800
X-Original-Message-ID <57D91A36.5060505@huawei.com>
X-Original-References <1473684871-209320-1-git-send-email-wangnan0@huawei.com> <1473684871-209320-2-git-send-email-wangnan0@huawei.com> <20160912190742.GG4897@kernel.org> <20160912211520.GA10582@kernel.org> <20160914092810.GA21691@naverao1-tp.localdomain>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1483127

Show key headers only | View raw



On 2016/9/14 17:28, Naveen N. Rao wrote:
> On 2016/09/12 06:15PM, Arnaldo Carvalho de Melo wrote:
>> Em Mon, Sep 12, 2016 at 04:07:42PM -0300, Arnaldo Carvalho de Melo escreveu:
>>> Em Mon, Sep 12, 2016 at 12:54:29PM +0000, Wang Nan escreveu:
>>>> Some mmap related macros have different values for different
>>>> architectures. This patch introduces uapi mman.h for each
>>>> architectures.
>>>>
>>>> Three headers are cloned from kernel include to tools/include:
>>>>
>>>>   tools/include/uapi/asm-generic/mman-common.h
>>>>   tools/include/uapi/asm-generic/mman.h
>>>>   tools/include/uapi/linux/mman.h
>>> Cool, the above was done as copies, why not the rest? IIRC you mentioned
>>> some reasoning behind that decision, but we need it spelled out here.
>>>
>>> For instance, I went on and look at arch/xtensa/include/uapi/asm/mman.h,
>>> and couldn't find why we shouldn't copy it just like the three files
>>> above.
>>>
>>> I'm looking now at why the build breaks in so many systems, first hunch
>>> is that bits/ part (the ones without the failure details probably have
>>> the same errors), alpine uses musl libc, but some that broke are glibc
>>> based.
>> So, please take a look at my perf/core branch, I applied 1/3 and 3/3,
>> but took a different path for 2/3, now it builds for all systems I have
>> containers for:
> This still fails for me on ppc64. Perhaps we should guard
> P_MMAP_FLAG(32BIT) and potentially others with a #ifdef, which was
> earlier reverted by commit 256763b0 ("perf trace beauty mmap: Add more
> conditional defines")?

Perhaps we should set all non-exist flag to 0 in each uapi mman.h?

Thank you.

> - Naveen
>
> ---
> In file included from builtin-trace.c:560:0:
> trace/beauty/mmap.c: In function ‘syscall_arg__scnprintf_mmap_flags’:
> trace/beauty/mmap.c:38:14: error: ‘MAP_32BIT’ undeclared (first use in this function)
>    if (flags & MAP_##n) { \
>                ^
> trace/beauty/mmap.c:45:2: note: in expansion of macro ‘P_MMAP_FLAG’
>    P_MMAP_FLAG(32BIT);
>    ^
> trace/beauty/mmap.c:38:14: note: each undeclared identifier is reported only once for each function it appears in
>    if (flags & MAP_##n) { \
>                ^
> trace/beauty/mmap.c:45:2: note: in expansion of macro ‘P_MMAP_FLAG’
>    P_MMAP_FLAG(32BIT);
>    ^
>    CC       bench/mem-functions.o
> mv: cannot stat ‘./.builtin-trace.o.tmp’: No such file or directory
> make[2]: *** [builtin-trace.o] Error 1
> make[2]: *** Waiting for unfinished jobs....
>

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


Thread

[PATCH 1/3] tools include: Add uapi mman.h for each architecture Wang Nan <wangnan0@huawei.com> - 2016-09-12 15:00 +0200
  Re: [PATCH 1/3] tools include: Add uapi mman.h for each architecture Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-09-12 21:10 +0200
    Re: [PATCH 1/3] tools include: Add uapi mman.h for each architecture Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-09-12 23:20 +0200
      Re: [PATCH 1/3] tools include: Add uapi mman.h for each architecture "Wangnan (F)" <wangnan0@huawei.com> - 2016-09-13 08:40 +0200
      Re: [PATCH 1/3] tools include: Add uapi mman.h for each architecture "Naveen N. Rao" <naveen.n.rao@linux.vnet.ibm.com> - 2016-09-14 11:30 +0200
        Re: [PATCH 1/3] tools include: Add uapi mman.h for each architecture "Wangnan (F)" <wangnan0@huawei.com> - 2016-09-14 11:40 +0200
          Re: [PATCH 1/3] tools include: Add uapi mman.h for each architecture "Naveen N. Rao" <naveen.n.rao@linux.vnet.ibm.com> - 2016-09-14 12:10 +0200
            Re: [PATCH 1/3] tools include: Add uapi mman.h for each architecture "Wangnan (F)" <wangnan0@huawei.com> - 2016-09-14 12:30 +0200
              Re: [PATCH 1/3] tools include: Add uapi mman.h for each architecture "Naveen N. Rao" <naveen.n.rao@linux.vnet.ibm.com> - 2016-09-14 12:50 +0200
                Re: [PATCH 1/3] tools include: Add uapi mman.h for each architecture "Wangnan (F)" <wangnan0@huawei.com> - 2016-09-14 13:00 +0200
        Re: [PATCH 1/3] tools include: Add uapi mman.h for each architecture Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-09-14 16:00 +0200
          Re: [PATCH 1/3] tools include: Add uapi mman.h for each architecture "Naveen N. Rao" <naveen.n.rao@linux.vnet.ibm.com> - 2016-09-14 18:40 +0200
            Re: [PATCH 1/3] tools include: Add uapi mman.h for each architecture Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-09-14 19:10 +0200
              Re: [PATCH 1/3] tools include: Add uapi mman.h for each architecture "Naveen N. Rao" <naveen.n.rao@linux.vnet.ibm.com> - 2016-09-15 17:00 +0200
  [tip:perf/core] tools include: Add uapi mman.h for each  architecture tip-bot for Wang Nan <tipbot@zytor.com> - 2016-09-20 23:40 +0200

csiph-web