[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAKixpbiLtuYW4Tt770EEHxJK03Kq=LKtQzXULb2p5E_zh2Oc4w@mail.gmail.com>
Date: Wed, 6 Mar 2013 15:12:03 -0800
From: Vinson Lee <vlee@...tter.com>
To: Ingo Molnar <mingo@...nel.org>
Cc: linux-kernel@...r.kernel.org,
Arnaldo Carvalho de Melo <acme@...stprotocols.net>,
Ingo Molnar <mingo@...hat.com>,
Irina Tirdea <irina.tirdea@...el.com>,
Paul Mackerras <paulus@...ba.org>,
Pekka Enberg <penberg@...nel.org>,
Peter Zijlstra <a.p.zijlstra@...llo.nl>
Subject: Re: [PATCH] perf tools: Fix LIBNUMA build with glibc 2.12 and older.
On Wed, Mar 6, 2013 at 12:52 AM, Ingo Molnar <mingo@...nel.org> wrote:
>
> * Vinson Lee <vlee@...tter.com> wrote:
>
>> The tokens MADV_HUGEPAGE and MADV_NOHUGEPAGE are not available with
>> glibc 2.12 and older. Define these tokens if they are not already
>> defined.
>>
>> This patch fixes these build errors with older versions of glibc.
>>
>> CC bench/numa.o
>> bench/numa.c: In function ???alloc_data???:
>> bench/numa.c:334: error: ???MADV_HUGEPAGE??? undeclared (first use in this function)
>> bench/numa.c:334: error: (Each undeclared identifier is reported only once
>> bench/numa.c:334: error: for each function it appears in.)
>> bench/numa.c:341: error: ???MADV_NOHUGEPAGE??? undeclared (first use in this function)
>> make: *** [bench/numa.o] Error 1
>>
>> Signed-off-by: Vinson Lee <vlee@...tter.com>
>> Cc: Arnaldo Carvalho de Melo <acme@...stprotocols.net>
>> Cc: Ingo Molnar <mingo@...hat.com>
>> Cc: Irina Tirdea <irina.tirdea@...el.com>
>> Cc: Paul Mackerras <paulus@...ba.org>
>> Cc: Pekka Enberg <penberg@...nel.org>
>> Cc: Peter Zijlstra <a.p.zijlstra@...llo.nl>
>>
>> ---
>> tools/perf/bench/bench.h | 7 +++++++
>> 1 files changed, 7 insertions(+), 0 deletions(-)
>>
>> diff --git a/tools/perf/bench/bench.h b/tools/perf/bench/bench.h
>> index a5223e6..6263f38 100644
>> --- a/tools/perf/bench/bench.h
>> +++ b/tools/perf/bench/bench.h
>> @@ -1,6 +1,13 @@
>> #ifndef BENCH_H
>> #define BENCH_H
>>
>> +#ifndef MADV_HUGEPAGE
>> +#define MADV_HUGEPAGE 14
>> +#endif
>> +#ifndef MADV_NOHUGEPAGE
>> +#define MADV_NOHUGEPAGE 15
>> +#endif
>
> Can we ignore Parisc which goes outside the asm-generic values of 14/15 and defines
> these as 67/68?
>
> On Parisc 14 is MADV_16K_PAGES, 15 is unused.
>
> Could we include <uapi/asm/mman.h> instead?
>
> Thanks,
>
> Ingo
Including <uapi/asm/mman.h> in bench/numa.c also fixes the LIBNUMA
build for me only with WERROR=0. It adds many redefined warnings of
symbols from <sys/mman.h> such as MAP_GROWSDOWN, MAP_DENYWRITE,
MAP_EXECUTABLE. The header <sys/mman.h> cannot be removed as it is
needed for mmap.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists