01 Nov, 2016

1 commit


19 Oct, 2016

1 commit

  • AVX512_4VNNIW - Vector instructions for deep learning enhanced word
    variable precision.
    AVX512_4FMAPS - Vector instructions for deep learning floating-point
    single precision.

    These new instructions are to be used in future Intel Xeon & Xeon Phi
    processors. The bits 2&3 of CPUID[level:0x07, EDX] inform that new
    instructions are supported by a processor.

    The spec can be found in the Intel Software Developer Manual (SDM) or in
    the Instruction Set Extensions Programming Reference (ISE).

    Define new feature flags to enumerate the new instructions in /proc/cpuinfo
    accordingly to CPUID bits and add the required xsave extensions which are
    required for proper operation.

    Signed-off-by: Piotr Luc
    Cc: Denys Vlasenko
    Cc: Peter Zijlstra
    Cc: Brian Gerst
    Cc: Dave Hansen
    Cc: Borislav Petkov
    Cc: Andy Lutomirski
    Cc: Josh Poimboeuf
    Cc: Linus Torvalds
    Link: http://lkml.kernel.org/r/20161018150111.29926-1-piotr.luc@intel.com
    Signed-off-by: Thomas Gleixner

    Piotr Luc
     

18 Oct, 2016

1 commit

  • Now that eagerfpu= is gone, remove it from the docs and some
    comments. Also sync the changes to tools/.

    Signed-off-by: Andy Lutomirski
    Cc: Borislav Petkov
    Cc: Brian Gerst
    Cc: Dave Hansen
    Cc: Denys Vlasenko
    Cc: Fenghua Yu
    Cc: H. Peter Anvin
    Cc: Josh Poimboeuf
    Cc: Linus Torvalds
    Cc: Oleg Nesterov
    Cc: Peter Zijlstra
    Cc: Quentin Casasnovas
    Cc: Rik van Riel
    Cc: Thomas Gleixner
    Link: http://lkml.kernel.org/r/cf430dd4481d41280e93ac6cf0def1007a67fc8e.1476740397.git.luto@kernel.org
    Signed-off-by: Ingo Molnar

    Andy Lutomirski
     

06 Oct, 2016

2 commits

  • Due to ffb173e657fa ("x86/mce: Drop X86_FEATURE_MCE_RECOVERY and the
    related model string test"), no changes needed in any other place as no
    tool uses X86_FEATURE_MCE_RECOVERY.

    Silences this detected drift when building tools/perf:

    Warning: tools/arch/x86/include/asm/cpufeatures.h differs from kernel

    Cc: Adrian Hunter
    Cc: David Ahern
    Cc: Jiri Olsa
    Cc: Namhyung Kim
    Cc: Thomas Gleixner
    Cc: Tony Luck
    Cc: Wang Nan
    Link: http://lkml.kernel.org/n/tip-f3sfimg58t3cycbbl8f5cwxf@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     
  • Commit 9a6fb28a355d ("x86/mce: Improve memcpy_mcsafe()") renames
    memcpy_mcsafe() to memcpy_mcsafe_unrolled(), making
    tools/arch/x86/lib/memcpy_64.S drift from the its kernel counterpart,
    triggering this warning in the perf build:

    Warning: tools/arch/x86/lib/memcpy_64.S differs from kernel

    Sync that copy to acknowledge that, no changes to 'perf bench' are
    needed, as this function is not used there.

    Cc: Adrian Hunter
    Cc: David Ahern
    Cc: Jiri Olsa
    Cc: Namhyung Kim
    Cc: Thomas Gleixner
    Cc: Tony Luck
    Cc: Wang Nan
    Link: http://lkml.kernel.org/n/tip-xfwc1raw8obyrctxerwt1bbb@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     

19 Sep, 2016

1 commit

  • Some macros required by tools/perf/trace/beauty/mmap.c is not support
    for all architectures. For example, MAP_32BIT is defined on x86 only,
    alpha doesn't define MADV_HWPOISON and MADV_SOFT_OFFLINE.

    This patch regenerates mman.h for each arch, defines these missing
    macros for perf. For missing MADV_*, fall back to asm-generic/mman-common
    because they are in a 'case ...' statement. For flags, define it to 0.

    Following is the script to generate this patch:

    macros=`cat $0 | awk 'V==1 {print}; /^# start macro list/ {V=1}'`
    rm `find ./tools/arch/ -name mman.h`
    for arch in `ls tools/arch`
    do
    [ -d tools/arch/$arch/include/uapi/asm ] || mkdir -p tools/arch/$arch/include/uapi/asm
    src=arch/$arch/include/uapi/asm/mman.h
    target=tools/arch/$arch/include/uapi/asm/mman.h.tmp
    real_target=tools/arch/$arch/include/uapi/asm/mman.h
    guard="TOOLS_ARCH_"`echo $arch | awk '{print toupper($0)}'`_UAPI_ASM_MMAN_FIX_H
    rm -f $target

    [ -f $src ] &&
    for m in $macros
    do
    if grep '#define[ \t]*'$m $src > /dev/null 2>&1
    then
    grep -h '#define[ \t]*'$m $src | sed 's/[ \t]*\/\*.*$//g' >> $target
    fi
    done

    if [ -f $src ]
    then
    grep '#include > $real_target
    rm $target
    echo "$real_target"
    done

    exit 0
    # Following macros are extracted from:
    # tools/perf/trace/beauty/mmap.c
    #
    # start macro list
    MADV_DODUMP
    MADV_DOFORK
    MADV_DONTDUMP
    MADV_DONTFORK
    MADV_DONTNEED
    MADV_FREE
    MADV_HUGEPAGE
    MADV_HWPOISON
    MADV_MERGEABLE
    MADV_NOHUGEPAGE
    MADV_NORMAL
    MADV_RANDOM
    MADV_REMOVE
    MADV_SEQUENTIAL
    MADV_SOFT_OFFLINE
    MADV_UNMERGEABLE
    MADV_WILLNEED
    MAP_32BIT
    MAP_ANONYMOUS
    MAP_DENYWRITE
    MAP_EXECUTABLE
    MAP_FILE
    MAP_FIXED
    MAP_GROWSDOWN
    MAP_HUGETLB
    MAP_LOCKED
    MAP_NONBLOCK
    MAP_NORESERVE
    MAP_POPULATE
    MAP_PRIVATE
    MAP_SHARED
    MAP_STACK
    MAP_UNINITIALIZED
    MREMAP_FIXED
    MREMAP_MAYMOVE
    PROT_EXEC
    PROT_GROWSDOWN
    PROT_GROWSUP
    PROT_NONE
    PROT_READ
    PROT_SEM
    PROT_WRITE

    Signed-off-by: Wang Nan
    Tested-by: Kim Phillips
    Tested-by: Naveen N. Rao
    Cc: Ravi Bangoria
    Cc: Zefan Li
    Cc: pi3orama@163.com
    Fixes: 277cf08f3feb ("perf trace beauty mmap: Fix defines for non !x86_64")
    Link: http://lkml.kernel.org/r/1473850649-83389-3-git-send-email-wangnan0@huawei.com
    Signed-off-by: Arnaldo Carvalho de Melo

    Wang Nan
     

14 Sep, 2016

1 commit

  • 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

    The main part of this patch is generated by following script:

    macros=`cat $0 | awk 'V==1 {print}; /^# start macro list/ {V=1}'`
    for arch in `ls tools/arch`
    do
    [ -d tools/arch/$arch/include/uapi/asm ] || mkdir -p tools/arch/$arch/include/uapi/asm
    src=arch/$arch/include/uapi/asm/mman.h
    target=tools/arch/$arch/include/uapi/asm/mman.h
    guard="TOOLS_ARCH_"`echo $arch | awk '{print toupper($0)}'`_UAPI_ASM_MMAN_FIX_H
    echo '#ifndef '$guard > $target
    echo '#define '$guard >> $target

    [ -f $src ] &&
    for m in $macros
    do
    if grep '#define[ \t]*'$m $src > /dev/null 2>&1
    then
    grep -h '#define[ \t]*'$m $src | sed 's/[ \t]*\/\*.*$//g' >> $target
    fi
    done

    if [ -f $src ]
    then
    grep '#include > $target
    echo "$target"
    done

    exit 0
    # Following macros are extracted from:
    # tools/perf/trace/beauty/mmap.c
    #
    # start macro list
    MADV_DODUMP
    MADV_DOFORK
    MADV_DONTDUMP
    MADV_DONTFORK
    MADV_DONTNEED
    MADV_HUGEPAGE
    MADV_HWPOISON
    MADV_MERGEABLE
    MADV_NOHUGEPAGE
    MADV_NORMAL
    MADV_RANDOM
    MADV_REMOVE
    MADV_SEQUENTIAL
    MADV_SOFT_OFFLINE
    MADV_UNMERGEABLE
    MADV_WILLNEED
    MAP_32BIT
    MAP_ANONYMOUS
    MAP_DENYWRITE
    MAP_EXECUTABLE
    MAP_FILE
    MAP_FIXED
    MAP_GROWSDOWN
    MAP_HUGETLB
    MAP_LOCKED
    MAP_NONBLOCK
    MAP_NORESERVE
    MAP_POPULATE
    MAP_PRIVATE
    MAP_SHARED
    MAP_STACK
    MAP_UNINITIALIZED
    MREMAP_FIXED
    MREMAP_MAYMOVE
    PROT_EXEC
    PROT_GROWSDOWN
    PROT_GROWSUP
    PROT_NONE
    PROT_READ
    PROT_SEM
    PROT_WRITE

    Signed-off-by: Wang Nan
    Cc: Zefan Li
    Cc: pi3orama@163.com
    Link: http://lkml.kernel.org/r/1473684871-209320-2-git-send-email-wangnan0@huawei.com
    [ Added new files to tools/perf/MANIFEST to fix the detached tarball build, add mman.h for ARC ]
    Signed-off-by: Arnaldo Carvalho de Melo

    Wang Nan
     

16 Aug, 2016

1 commit

  • From a quick look nothing stands out as requiring changes to kvm tools
    such as tools/perf/arch/s390/util/kvm-stat.c.

    Silences these header checking warnings:

    $ make -C tools/perf
    make: Entering directory '/home/acme/git/linux/tools/perf'
    BUILD: Doing 'make -j4' parallel build
    Warning: tools/arch/s390/include/uapi/asm/kvm.h differs from kernel
    Warning: tools/arch/s390/include/uapi/asm/sie.h differs from kernel
    Warning: tools/arch/arm64/include/uapi/asm/kvm.h differs from kernel

    Cc: Adrian Hunter
    Cc: Alexander Yarygin
    Cc: David Ahern
    Cc: Hemant Kumar
    Cc: Jiri Olsa
    Cc: Michael Ellerman
    Cc: Namhyung Kim
    Cc: Naveen N. Rao
    Cc: Scott Wood
    Cc: Srikar Dronamraju
    Cc: Wang Nan
    Link: http://lkml.kernel.org/n/tip-btutge414g516qmh6r5ienlj@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     

09 Aug, 2016

2 commits

  • Due to:

    1e61f78baf89 ("x86/cpufeature: Make sure DISABLED/REQUIRED macros are updated")

    No changes to tools using those headers (tools/arch/x86/lib/mem{set,cpu}_64.S)
    seems necessary.

    Detected by the tools build header drift checker:

    $ make -C tools/perf O=/tmp/build/perf
    make: Entering directory '/home/acme/git/linux/tools/perf'
    BUILD: Doing 'make -j4' parallel build
    GEN /tmp/build/perf/common-cmds.h
    Warning: tools/arch/x86/include/asm/disabled-features.h differs from kernel
    Warning: tools/arch/x86/include/asm/required-features.h differs from kernel
    Warning: tools/arch/x86/include/asm/cpufeatures.h differs from kernel
    CC /tmp/build/perf/util/probe-finder.o
    CC /tmp/build/perf/builtin-help.o

    ^C$

    Cc: Adrian Hunter
    Cc: Dave Hansen
    Cc: David Ahern
    Cc: Jiri Olsa
    Cc: Namhyung Kim
    Cc: Wang Nan
    Link: http://lkml.kernel.org/n/tip-ja75m7zk8j0jkzmrv16i5ehw@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     
  • There were changes related to the deprecation of the "pcommit"
    instruction:

    fd1d961dd681 ("x86/insn: remove pcommit")
    dfa169bbee00 ("Revert "KVM: x86: add pcommit support"")

    No need to update anything in the tools, as "pcommit" wasn't being
    listed on the VMX_EXIT_REASONS in the tools/perf/arch/x86/util/kvm-stat.c
    file.

    Just grab fresh copies of these files to silence the file cache
    coherency detector:

    $ make -C tools/perf O=/tmp/build/perf install-bin
    make: Entering directory '/home/acme/git/linux/tools/perf'
    BUILD: Doing 'make -j4' parallel build
    Warning: tools/arch/x86/include/asm/cpufeatures.h differs from kernel
    Warning: tools/arch/x86/include/uapi/asm/vmx.h differs from kernel
    INSTALL GTK UI

    #

    Cc: Adrian Hunter
    Cc: Dan Williams
    Cc: David Ahern
    Cc: Jiri Olsa
    Cc: Namhyung Kim
    Cc: Paolo Bonzini
    Cc: Ross Zwisler
    Cc: Wang Nan
    Cc: Xiao Guangrong
    Link: http://lkml.kernel.org/n/tip-07pmcc1ysydhyyxbmp1vt0l4@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     

13 Jul, 2016

6 commits

  • We use it in bitops/__ffs.h and bitops/atomic.h, that we also got from
    the kernel, but were getting it from either newer systems that carry it
    in /usr/include, or from the kernel sources, that we decided not to
    touch from tools/ code. Fix it.

    Cc: Adrian Hunter
    Cc: David Ahern
    Cc: Jiri Olsa
    Cc: Namhyung Kim
    Cc: Wang Nan
    Link: http://lkml.kernel.org/n/tip-lwqvgbuitjmrdpjmjp6zqnyx@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     
  • Those kernel files were being directly accessed, which we're not
    allowing anymore to avoid that changes in the kernel side break tooling.

    Warn if these copies drift from the original files.

    Cc: Adrian Hunter
    Cc: Alexander Yarygin
    Cc: Christoffer Dall
    Cc: David Ahern
    Cc: Eric Auger
    Cc: Hemant Kumar
    Cc: Jiri Olsa
    Cc: Marc Zyngier
    Cc: Namhyung Kim
    Cc: Naveen N. Rao
    Cc: Srikar Dronamraju
    Cc: Wang Nan
    Cc: Yunlong Song
    Link: http://lkml.kernel.org/n/tip-mnopguymhnwzjhw3mowllvsy@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     
  • Which is just a wrapper for sys_getcpu and is not present in at least
    musl libc.

    Cc: Adrian Hunter
    Cc: David Ahern
    Cc: Jiri Olsa
    Cc: Namhyung Kim
    Cc: Wang Nan
    Link: http://lkml.kernel.org/n/tip-kblef7svmhr0g93kkx78envg@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     
  • To allow the build to complete on older systems, where those files are
    either not uptodate, lacking some recent additions or not present at
    all.

    And check if the copy drifts from the kernel.

    Cc: Adrian Hunter
    Cc: David Ahern
    Cc: Jiri Olsa
    Cc: Namhyung Kim
    Cc: Wang Nan
    Link: http://lkml.kernel.org/n/tip-sxf7rpow2blsno5f7t6n0sqz@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     
  • We can't access kernel files directly from tools/, so copy the required
    bits, and make sure that we detect when the original files, in the
    kernel, gets modified.

    Cc: Adrian Hunter
    Cc: David Ahern
    Cc: Jiri Olsa
    Cc: Namhyung Kim
    Cc: Wang Nan
    Link: http://lkml.kernel.org/n/tip-z7e76274ch5j4nugv048qacb@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     
  • And remove the empty tools/arch/x86/include/asm/unistd_{32,64}.h files
    introduced by eae7a755ee81 ("perf tools, x86: Build perf on older
    user-space as well").

    This way we get closer to mirroring the kernel for cases where __NR_
    can't be found for some include path/_GNU_SOURCE/whatever scenario.

    Cc: Adrian Hunter
    Cc: David Ahern
    Cc: Jiri Olsa
    Cc: Namhyung Kim
    Cc: Wang Nan
    Link: http://lkml.kernel.org/n/tip-kpj6m3mbjw82kg6krk2z529e@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     

09 May, 2015

12 commits