1. 23 Sep, 2016 1 commit
  2. 22 Sep, 2016 2 commits
  3. 20 Sep, 2016 9 commits
    • Ingo Molnar's avatar
      Merge tag 'perf-core-for-mingo-20160920' of... · 89f1c2c5
      Ingo Molnar authored
      Merge tag 'perf-core-for-mingo-20160920' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core
      
      Pull perf/core improvements and fixes from Arnaldo Carvalho de Melo:
      
      User visible changes:
      
      - Support event group view with hierarchy mode in 'perf top' and 'perf report'
        (Namhyung Kim)
      
        e.g.:
      
        $ perf record -e '{cycles,instructions}' make
        $ perf report --hierarchy --stdio
        ...
        #               Overhead  Command / Shared Object / Symbol
        # ......................  ..................................
        ...
            25.74%  27.18%        sh
               19.96%  24.14%        libc-2.24.so
                  9.55%  14.64%        [.] __strcmp_sse2
                  1.54%   0.00%        [.] __tfind
                  1.07%   1.13%        [.] _int_malloc
                  0.95%   0.00%        [.] __strchr_sse2
                  0.89%   1.39%        [.] __tsearch
                  0.76%   0.00%        [.] strlen
      
      - Fix the dwarf regs table for x86_64, adding a missing % to the "%di"
        register, noticed with a failing 'perf test bpf' (Arnaldo Carvalho de Melo)
      
      - Fix handling of mmap parameters in the 'perf trace' beautifier in
        architectures that don't have the same mappings as x86_64 (Wang Nan)
      
      - Handle hugetbl mappings in older systems running new kernels (Wang Nan)
      
      - Resolve 'call' operands in 'annotate', that when using /proc/kcore
        were appearing just as hexadecimal addresses, to function names
        (Arnaldo Carvalho de Melo)
      
      - Fix width computation for srcline sort entry (Jiri Olsa)
      
      - Do not ignore call instruction with indirect target in 'annotate'
        (Ravi Bangoria)
      
      - Handle MADV_FREE in the madvise 'trace' beautifier (Wang Nan)
      
      - Fix build of 'perf trace' mman beautifier in !x86_64 (Wang Nan)
      
      Infrastructure changes:
      
      - Add infrastructure for PMU specific configuration, allowing to pass
        config variables directly to the kernel PMU driver, prefixing those
        variables with a '@', part of a larger series to support Coresight (Mathieu Poirier)
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      89f1c2c5
    • Jiri Olsa's avatar
      perf symbols: Do not open device files · 3c028a0c
      Jiri Olsa authored
      The dso__read_binary_type_filename gets the dso's file name to open. We
      need to check it for regular file before trying to open it, otherwise we
      might get stuck with device file.
      Signed-off-by: default avatarJiri Olsa <jolsa@kernel.org>
      Cc: Andi Kleen <andi@firstfloor.org>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Don Zickus <dzickus@redhat.com>
      Cc: Joe Mario <jmario@redhat.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Link: http://lkml.kernel.org/r/20160920161245.GA8995@kravaSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      3c028a0c
    • Namhyung Kim's avatar
      perf hists: Factor out hists__reset_column_width() · e3b60bc9
      Namhyung Kim authored
      The stdio and tui has same code to reset hpp format column width.
      Factor it out as a new function.
      Suggested-and-Acked-by: default avatarJiri Olsa <jolsa@redhat.com>
      Signed-off-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Cc: Andi Kleen <andi@firstfloor.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Link: http://lkml.kernel.org/r/20160920053025.13989-2-namhyung@kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      e3b60bc9
    • Namhyung Kim's avatar
      perf ui/tui: Reset output width for hierarchy · 5ff3e7a2
      Namhyung Kim authored
      When --hierarchy option is used, each entry has its own hpp_list to show
      the result.  But it missed to update width of each column.
      
      Before:
      
        - 46.29% 48.12%        netctl-auto
           + 31.44% 29.25%        [kernel.vmlinux]
           + 8.52% 11.55%        libc-2.22.so
           + 5.19% 6.91%        bash
        + 10.75% 11.83%        wpa_cli
        + 8.25% 2.23%        swapper
        + 6.45% 5.40%        tr
        + 4.81% 8.09%        awk
        + 4.15% 2.85%        firefox
        + 3.86% 2.53%        sh
      
      After:
      
        -  46.29%  48.12%        netctl-auto
            +  31.44%  29.25%        [kernel.vmlinux]
            +   8.52%  11.55%        libc-2.22.so
            +   5.19%   6.91%        bash
        +  10.75%  11.83%        wpa_cli
        +   8.25%   2.23%        swapper
        +   6.45%   5.40%        tr
        +   4.81%   8.09%        awk
        +   4.15%   2.85%        firefox
        +   3.86%   2.53%        sh
      
      Committer note:
      
      Full testing instructions:
      
      1) Record with an event group:
      
        $ perf record -e '{cycles,instructions}' make -j4
      
      2) Use report in hierarchy mode, to get a few expanded trees on
         the same screen, use --percent-limit:
      
        $ perf report --hierarchy --percent-limit 0.5
      
      Samples: 103K of event 'anon group { cycles:u, instructions:u }',
      Event count (approx.): 57317631725
               Overhead        Command / Shared Object / Symbol        ◆
      -  58.89%  55.12%        cc1                                     ▒
         -  50.26%  48.10%        cc1                                  ▒
                3.61%   5.13%        [.] _cpp_lex_token                ▒
                2.58%   0.78%        [.] ht_lookup_with_hash           ▒
                1.31%   1.30%        [.] ggc_internal_alloc            ▒
                1.08%   2.25%        [.] get_combined_adhoc_loc        ▒
                1.01%   1.95%        [.] ira_init                      ▒
                0.96%   1.78%        [.] linemap_position_for_column   ▒
                0.65%   1.01%        [.] cpp_get_token_with_location   ▒
         -   7.52%   6.58%        libc-2.23.so                         ▒
                1.70%   1.78%        [.] _int_malloc                   ▒
                0.69%   0.75%        [.] _int_free                     ▒
                0.67%   0.42%        [.] malloc_consolidate            ▒
         -   0.58%   0.42%        ld-2.23.so                           ▒
                                     no entry >= 0.50%                 ▒
         -   0.52%   0.03%        [kernel.vmlinux]                     ▒
                                     no entry >= 0.50%                 ▒
      Signed-off-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Acked-by: default avatarJiri Olsa <jolsa@kernel.org>
      Cc: Andi Kleen <andi@firstfloor.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Fixes: 1b2dbbf4 ("perf hists: Use own hpp_list for hierarchy mode")
      Link: http://lkml.kernel.org/r/20160920053025.13989-1-namhyung@kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      5ff3e7a2
    • Arnaldo Carvalho de Melo's avatar
      perf annotate: Resolve 'call' operands to function names · 5f62d4fd
      Arnaldo Carvalho de Melo authored
      Before this patch the '_raw_spin_lock_irqsave' and 'update_rq_clock' operands
      were appearing just as hexadecimal numbers:
      
        update_blocked_averages  /proc/kcore
             │       push   %r12
             │       push   %rbx
             │       and    $0xfffffffffffffff0,%rsp
             │       sub    $0x40,%rsp
             │       add    -0x662cac00(,%rdi,8),%rax
             │       mov    %rax,%rbx
             │       mov    %rax,%rdi
             │       mov    %rax,0x38(%rsp)
             │     → callq  _raw_spin_lock_irqsave
             │       mov    %rbx,%rdi
             │       mov    %rax,0x30(%rsp)
             │     → callq  update_rq_clock
             │       mov    0x8d0(%rbx),%rax
             │       lea    0x8d0(%rbx),%r11
      
      To check that all is right one can always use the 'o' hotkey and see
      the original objdump -dS output, that for this case is:
      
        update_blocked_averages  /proc/kcore
             │ffffffff990d5489:   push   %r12
             │ffffffff990d548b:   push   %rbx
             │ffffffff990d548c:   and    $0xfffffffffffffff0,%rsp
             │ffffffff990d5490:   sub    $0x40,%rsp
             │ffffffff990d5494:   add    -0x662cac00(,%rdi,8),%rax
             │ffffffff990d549c:   mov    %rax,%rbx
             │ffffffff990d549f:   mov    %rax,%rdi
             │ffffffff990d54a2:   mov    %rax,0x38(%rsp)
             │ffffffff990d54a7: → callq  0xffffffff997eb7a0
             │ffffffff990d54ac:   mov    %rbx,%rdi
             │ffffffff990d54af:   mov    %rax,0x30(%rsp)
             │ffffffff990d54b4: → callq  0xffffffff990c7720
             │ffffffff990d54b9:   mov    0x8d0(%rbx),%rax
             │ffffffff990d54c0:   lea    0x8d0(%rbx),%r11
      
      Use the 'h' hotkey to see a list of available hotkeys.
      
      More work needed to cover operands for other instructions, such as 'mov',
      that can resolve variable names, etc.
      
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Chris Riyder <chris.ryder@arm.com>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Hemant Kumar <hemant@linux.vnet.ibm.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Markus Trippelsdorf <markus@trippelsdorf.de>
      Cc: Masami Hiramatsu <mhiramat@kernel.org>
      Cc: Michael Ellerman <mpe@ellerman.id.au>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
      Cc: Pawel Moll <pawel.moll@arm.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Ravi Bangoria <ravi.bangoria@linux.vnet.ibm.com>
      Cc: Russell King <rmk+kernel@arm.linux.org.uk>
      Cc: Taeung Song <treeze.taeung@gmail.com>
      Cc: Wang Nan <wangnan0@huawei.com>
      Link: http://lkml.kernel.org/n/tip-xqgtw9mzmzcjgwkis9kiiv1p@git.kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      5f62d4fd
    • Arnaldo Carvalho de Melo's avatar
      perf annotate: Pass the symbol's map/dso to the instruction parsers · bff5c306
      Arnaldo Carvalho de Melo authored
      So that things like:
      
             → callq  0xffffffff993e3230
      
      found while disassembling /proc/kcore can be beautified by later
      patches, that will resolve that address to a function, looking it up in
      /proc/kallsyms.
      
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Chris Riyder <chris.ryder@arm.com>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Hemant Kumar <hemant@linux.vnet.ibm.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Markus Trippelsdorf <markus@trippelsdorf.de>
      Cc: Masami Hiramatsu <mhiramat@kernel.org>
      Cc: Michael Ellerman <mpe@ellerman.id.au>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
      Cc: Pawel Moll <pawel.moll@arm.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Ravi Bangoria <ravi.bangoria@linux.vnet.ibm.com>
      Cc: Russell King <rmk+kernel@arm.linux.org.uk>
      Cc: Taeung Song <treeze.taeung@gmail.com>
      Cc: Wang Nan <wangnan0@huawei.com>
      Link: http://lkml.kernel.org/n/tip-p76myuke4j7gplg54amaklxk@git.kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      bff5c306
    • Ravi Bangoria's avatar
      perf annotate: Do not ignore call instruction with indirect target · 88a7fcf9
      Ravi Bangoria authored
      Do not ignore call instruction with indirect target when its already
      identified as a call. This is an extension of commit e8ea1561 ("perf
      annotate: Use raw form for register indirect call instructions") to
      generalize annotation for all instructions with indirect calls.
      
      This is needed for certain powerpc call instructions that use address in
      a register (such as bctrl, btarl, ...).
      
      Apart from that, when kcore is used to disassemble function, all call
      instructions were ignored. This patch will fix it as a side effect by
      not ignoring them. For example,
      
      Before (with kcore):
             mov    %r13,%rdi
             callq  0xffffffff811a7e70
           ^ jmpq   64
             mov    %gs:0x7ef41a6e(%rip),%al
      
      After (with kcore):
             mov    %r13,%rdi
           > callq  0xffffffff811a7e70
           ^ jmpq   64
             mov    %gs:0x7ef41a6e(%rip),%al
      Suggested-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      [Suggested about 'bctrl' instruction]
      Signed-off-by: default avatarRavi Bangoria <ravi.bangoria@linux.vnet.ibm.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Chris Riyder <chris.ryder@arm.com>
      Cc: Hemant Kumar <hemant@linux.vnet.ibm.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Markus Trippelsdorf <markus@trippelsdorf.de>
      Cc: Masami Hiramatsu <mhiramat@kernel.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
      Cc: Pawel Moll <pawel.moll@arm.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Russell King <rmk+kernel@arm.linux.org.uk>
      Cc: Taeung Song <treeze.taeung@gmail.com>
      Link: http://lkml.kernel.org/r/1471611578-11255-5-git-send-email-ravi.bangoria@linux.vnet.ibm.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      88a7fcf9
    • Jiri Olsa's avatar
      perf hists: Fix width computation for srcline sort entry · f666ac0d
      Jiri Olsa authored
      Adding header size to width computation for srcline sort entry,
      because it's possible to get empty data with ':0' which set width
      of 2 which is lower than width needed to display column header.
      Signed-off-by: default avatarJiri Olsa <jolsa@kernel.org>
      Cc: Andi Kleen <andi@firstfloor.org>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Don Zickus <dzickus@redhat.com>
      Cc: Joe Mario <jmario@redhat.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Link: http://lkml.kernel.org/r/1474290610-23241-62-git-send-email-jolsa@kernel.org
      [ Added declaration to sort.h ]
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      f666ac0d
    • Sebastian Andrzej Siewior's avatar
      perf/x86/intel/bts: Make sure debug store is valid · f1e1c9e5
      Sebastian Andrzej Siewior authored
      Since commit 4d4c4741 ("perf/x86/intel/bts: Fix BTS PMI detection")
      my box goes boom on boot:
      
      | .... node  #0, CPUs:      #1 #2 #3 #4 #5 #6 #7
      | BUG: unable to handle kernel NULL pointer dereference at 0000000000000018
      | IP: [<ffffffff8100c463>] intel_bts_interrupt+0x43/0x130
      | Call Trace:
      |  <NMI> d [<ffffffff8100b341>] intel_pmu_handle_irq+0x51/0x4b0
      |  [<ffffffff81004d47>] perf_event_nmi_handler+0x27/0x40
      
      This happens because the code introduced in this commit dereferences the
      debug store pointer unconditionally. The debug store is not guaranteed to
      be available, so a NULL pointer check as on other places is required.
      
      Fixes: 4d4c4741 ("perf/x86/intel/bts: Fix BTS PMI detection")
      Signed-off-by: default avatarSebastian Andrzej Siewior <bigeasy@linutronix.de>
      Reviewed-by: default avatarAlexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Arnaldo Carvalho de Melo <acme@infradead.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: vince@deater.net
      Cc: eranian@google.com
      Link: http://lkml.kernel.org/r/20160920131220.xg5pbdjtznszuyzb@breakpoint.ccSigned-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      f1e1c9e5
  4. 19 Sep, 2016 4 commits
    • Alexander Shishkin's avatar
      perf/x86/intel/pt: Add support for PTWRITE and power event tracing · 8ee83b2a
      Alexander Shishkin authored
      The Intel PT facility grew some new functionality:
      
        * PTWRITE packet carries the payload of the new PTWRITE instruction
          that can be used to instrument Intel PT traces with user-supplied
          data. Packets of this type are only generated if 'ptwrite' capability
          is set and PTWEn bit is set in the event attribute's config. Flow
          update packets (FUP) can be generated on PTWRITE packets if FUPonPTW
          config bit is set. Setting these bits is not allowed if 'ptwrite'
          capability is not set.
      
        * PWRE, PWRX, MWAIT, EXSTOP packets communicate core power management
          events. These depend on 'power_event_tracing' capability and are
          enabled by setting PwrEvtEn bit in the event attribute.
      
      Extend the driver capabilities and provide the proper sanity checks in the
      event validation function.
      
      [ tglx: Massaged changelog ]
      Signed-off-by: default avatarAlexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Arnaldo Carvalho de Melo <acme@infradead.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: vince@deater.net
      Cc: eranian@google.com
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Link: http://lkml.kernel.org/r/20160916134819.1978-1-alexander.shishkin@linux.intel.comSigned-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      8ee83b2a
    • Wang Nan's avatar
      tools include: Add mman macros needed by perf for all arch · f82b7746
      Wang Nan authored
      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 <asm-generic' $src >> $target
         else
            echo "#include <asm-generic/mman.h>" >> $target
         fi
      
         touch $real_target
         for m in $macros
         do
           if cat << EOF | gcc -Itools/arch/$arch/include -Itools/arch/$arch/include/uapi -Iinclude/ -Iinclude/uapi -E - | grep $m > /dev/null 2>&1
       #include <uapi/asm/mman.h.tmp>
       #include <uapi/linux/mman.h>
       $m
       EOF
         then
           echo "Fixing $m for $arch"
           echo "/* $m is undefined on $arch, fix it for perf */" >> $target
           if echo $m | grep '^MADV_' > /dev/null 2>&1
           then
             grep -h '#define[ \t]*'$m include/uapi/asm-generic/mman-common.h | sed 's/[ \t]*\/\*.*$//g' >> $target
           else
             echo "#define $m	0" >> $target
           fi
         fi
         done
      
         real_target=tools/arch/$arch/include/uapi/asm/mman.h
         echo '#ifndef '$guard > $real_target
         echo '#define '$guard >> $real_target
         cat $target | sed 's|asm-generic|uapi/asm-generic|g' >> $real_target
         echo '#endif' >> $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: default avatarWang Nan <wangnan0@huawei.com>
      Tested-by: default avatarKim Phillips <kim.phillips@arm.com>
      Tested-by: default avatarNaveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
      Cc: Ravi Bangoria <ravi.bangoria@linux.vnet.ibm.com>
      Cc: Zefan Li <lizefan@huawei.com>
      Cc: pi3orama@163.com
      Fixes: 277cf08f ("perf trace beauty mmap: Fix defines for non !x86_64")
      Link: http://lkml.kernel.org/r/1473850649-83389-3-git-send-email-wangnan0@huawei.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      f82b7746
    • Wang Nan's avatar
      perf trace beauty mmap: Add missing MADV_FREE · f752e90e
      Wang Nan authored
      tools/perf/trace/beauty/mmap.c forgets to check MADV_FREE.
      This patch fixes it.
      Signed-off-by: default avatarWang Nan <wangnan0@huawei.com>
      Cc: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
      Cc: Zefan Li <lizefan@huawei.com>
      Cc: pi3orama@163.com
      Link: http://lkml.kernel.org/r/1473850649-83389-2-git-send-email-wangnan0@huawei.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      f752e90e
    • Linus Torvalds's avatar
      Linux 4.8-rc7 · 3be79886
      Linus Torvalds authored
      3be79886
  5. 18 Sep, 2016 7 commits
  6. 17 Sep, 2016 5 commits
  7. 16 Sep, 2016 12 commits
    • Linus Torvalds's avatar
      Merge tag 'drm-fixes-for-4.8-rc6' of git://people.freedesktop.org/~airlied/linux · 5fbf3e32
      Linus Torvalds authored
      Pull drm fixes from Dave Airlie:
       "Two sets of i915 fixes, one set of vc4 crasher fixes, and a couple of
        atmel fixes.
      
        Nothing too out there at this stage, though I think some people are
        holidaying so it's been quiet enough"
      
      * tag 'drm-fixes-for-4.8-rc6' of git://people.freedesktop.org/~airlied/linux:
        drm/i915: Ignore OpRegion panel type except on select machines
        Revert "drm/i915/psr: Make idle_frames sensible again"
        drm/i915: Restore lost "Initialized i915" welcome message
        drm/vc4: mark vc4_bo_cache_purge() static
        drm/i915: Add GEN7_PCODE_MIN_FREQ_TABLE_GT_RATIO_OUT_OF_RANGE to SNB
        drm/i915: disable 48bit full PPGTT when vGPU is active
        drm/i915: enable vGPU detection for all
        drm/atmel-hlcdc: Make ->reset() implementation static
        drm: atmel-hlcdc: Fix vertical scaling
        drm/vc4: Allow some more signals to be packed with uniform resets.
        drm/i915/dvo: Remove dangling call to drm_encoder_cleanup()
      5fbf3e32
    • Linus Torvalds's avatar
      Merge tag 'pm-4.8-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm · 095f5cfa
      Linus Torvalds authored
      Pull power management fix from Rafael Wysocki:
       "More annotations of tracepoints in the runtime PM framework to prevent
        RCU from complaining when that code is invoked from the idle path
        (Paul McKenney)"
      
      * tag 'pm-4.8-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
        PM / runtime: Use _rcuidle for runtime suspend tracepoints
      095f5cfa
    • Dave Airlie's avatar
      Merge tag 'drm-vc4-fixes-2016-09-14' of https://github.com/anholt/linux into drm-fixes · 09cb5b78
      Dave Airlie authored
      This pull request brings in a fix for crashes in X on VC4.
      
      * tag 'drm-vc4-fixes-2016-09-14' of https://github.com/anholt/linux:
        drm/vc4: mark vc4_bo_cache_purge() static
        drm/vc4: Allow some more signals to be packed with uniform resets.
      09cb5b78
    • Dave Airlie's avatar
      Merge tag 'drm-intel-fixes-2016-09-15' of git://anongit.freedesktop.org/drm-intel into drm-fixes · 9929c097
      Dave Airlie authored
      i915 fixes from Jani.
      
      * tag 'drm-intel-fixes-2016-09-15' of git://anongit.freedesktop.org/drm-intel:
        drm/i915: Ignore OpRegion panel type except on select machines
        Revert "drm/i915/psr: Make idle_frames sensible again"
        drm/i915: Restore lost "Initialized i915" welcome message
      9929c097
    • Linus Torvalds's avatar
      Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma · dd5a477c
      Linus Torvalds authored
      Pull rdma fixes from Doug Ledford:
       "Round three of 4.8 rc fixes.
      
        This is likely the last rdma pull request this cycle.  The new rxe
        driver had a few issues (you probably saw the boot bot bug report) and
        they should be addressed now.  There are a couple other fixes here,
        mainly mlx4.  There are still two outstanding issues that need
        resolved but I don't think their fix will make this kernel cycle.
      
        Summary:
      
         - Various fixes to rdmavt, ipoib, mlx5, mlx4, rxe"
      
      * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma:
        IB/rdmavt: Don't vfree a kzalloc'ed memory region
        IB/rxe: Fix kmem_cache leak
        IB/rxe: Fix race condition between requester and completer
        IB/rxe: Fix duplicate atomic request handling
        IB/rxe: Fix kernel panic in udp_setup_tunnel
        IB/mlx5: Set source mac address in FTE
        IB/mlx5: Enable MAD_IFC commands for IB ports only
        IB/mlx4: Diagnostic HW counters are not supported in slave mode
        IB/mlx4: Use correct subnet-prefix in QP1 mads under SR-IOV
        IB/mlx4: Fix code indentation in QP1 MAD flow
        IB/mlx4: Fix incorrect MC join state bit-masking on SR-IOV
        IB/ipoib: Don't allow MC joins during light MC flush
        IB/rxe: fix GFP_KERNEL in spinlock context
      dd5a477c
    • Linus Torvalds's avatar
      Merge tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc · 008f08d6
      Linus Torvalds authored
      Pull ARM SoC fixes from Arnd Bergmann:
       "Here are a couple of bugfixes for v4.8-rc.
      
        Most of them have actually been around for a while this time but for
        some reason didn't get applied early on.  The shmobile regulator fix
        is the only one that isn't completely obvious.
      
        Device tree changes:
         - archtimer interrupts must be level triggered (multiple platforms)
         - fix for USB and MMC clocks on STiH410
         - fix split DT repository in case of raspberry-pi 3
         - a new use of skeleton.dtsi on arm64 has crept in after that was
           removed.
      
        defconfig updates:
         - xilinx vdma has a new Kconfig symbol name
         - keystone requires CONFIG_NOP_USB_XCEIV since v4.8-rc1
      
        Code fixes:
         - fix regulator quirk on shmobile
         - suspend-to-ram regression on EXYNOS
      
        Maintainer updates:
         - Javier Martinez Canillas is now a reviewer for Samsung EXYNOS"
      
      * tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc:
        ARM: keystone: defconfig: Fix USB configuration
        arm64: dts: Fix broken architected timer interrupt trigger
        ARM: multi_v7_defconfig: update XILINX_VDMA
        ARM64: dts: bcm: Use a symlink to R-Pi dtsi files from arch=arm
        ARM: dts: Remove use of skeleton.dtsi from bcm283x.dtsi
        ARM: dts: STiH407-family: Provide interconnect clock for consumption in ST SDHCI
        ARM: dts: STiH410: Handle interconnect clock required by EHCI/OHCI (USB)
        ARM: shmobile: fix regulator quirk for Gen2
        ARM: EXYNOS: Clear OF_POPULATED flag from PMU node in IRQ init callback
        MAINTAINERS: Add myself as reviewer for Samsung Exynos support
      008f08d6
    • Linus Torvalds's avatar
      Merge branch 'fixes' of git://git.armlinux.org.uk/~rmk/linux-arm · cac4662a
      Linus Torvalds authored
      Pull ARM fixes from Russell King:
       "Most of this update are fixes primarily discovered from testing on the
        older StrongARM 1110 and PXA systems, as a result of recent interest
        from several people in these platforms:
      
         - Locomo interrupt handling incorrectly stores the handler data in
           the chip's private data slot: when Locomo is combined with an
           interrupt controller who's chip uses the chip private data, this
           leads to an oops.
      
         - SA1111 was missing a call to clk_disable() to clean up after a
           failed probe.
      
         - SA1111 and PCMCIA suspend/resume was broken:
      
           The PCMCIA "ds" layer was using the legacy bus suspend/resume
           methods, which the core PM code is no longer calling as a result of
           device_pm_check_callbacks() introduced in commit aa8e54b5
           ("PM / sleep: Go direct_complete if driver has no callbacks").
      
           SA1111 was broken due to changes to PCMCIA which makes PCMCIA
           suspend itself later than the SA1111 code expects, and resume
           before the SA1111 code has initialised access to the pcmcia
           sub-device.
      
         - the default SA1111 interrupt mask polarity got messed up when it
           was converted to use a dynamic interrupt base number for its
           interrupts.
      
         - fix platform_get_irq() error code propagation, which was causing
           problems on platforms where the interrupt may not be available at
            probe time in DT setups.
      
         - fix the lack of clock to PCMCIA code on PXA platforms, which was
           omitted in conversions of PXA to CCF.
      
         - fix an oops in the PXA PCMCIA code caused by a previous commit not
           realising that Lubbock is different from the rest of the PXA PCMCIA
           drivers.
      
         - ensure that SA1111 low-level PCMCIA drivers propagate their error
           codes to the main probe function, rather than the driver silently
           accepting a failure.
      
         - fix the sa11xx debugfs reporting of timing information, which
           always indicated zero due to the clock being a factor of 1000 out.
      
         - fix the polarity of the status change signal reported from the
           sockets.
      
        Lastly, one ARM specific commit from Stefan Agner fixing the LPAE
        cache attributes"
      
      * 'fixes' of git://git.armlinux.org.uk/~rmk/linux-arm:
        ARM: pxa/lubbock: add pcmcia clock
        ARM: locomo: fix locomo irq handling
        ARM: 8612/1: LPAE: initialize cache policy correctly
        ARM: sa1111: fix missing clk_disable()
        ARM: sa1111: fix pcmcia suspend/resume
        ARM: sa1111: fix pcmcia interrupt mask polarity
        ARM: sa1111: fix error code propagation in sa1111_probe()
        pcmcia: lubbock: fix sockets configuration
        pcmcia: sa1111: fix propagation of lowlevel board init return code
        pcmcia: soc_common: fix SS_STSCHG polarity
        pcmcia: sa11xx_base: add units to the timing information
        pcmcia: sa11xx_base: fix reporting of timing information
        pcmcia: ds: fix suspend/resume
      cac4662a
    • Colin Ian King's avatar
      IB/rdmavt: Don't vfree a kzalloc'ed memory region · e4618d40
      Colin Ian King authored
      The userspace memory region 'mr' is allocated with kzalloc in
      __rvt_alloc_mr  however it is incorrectly being freed with vfree in
      __rvt_free_mr. Fix this by using kfree to free it.
      Signed-off-by: default avatarColin Ian King <colin.king@canonical.com>
      Reviewed-by: default avatarLeon Romanovsky <leonro@mellanox.com>
      Acked-by: default avatarDennis Dalessandro <dennis.dalessandro@intel.com>
      Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
      e4618d40
    • Yonatan Cohen's avatar
      IB/rxe: Fix kmem_cache leak · c1cc72cb
      Yonatan Cohen authored
      Decrement qp reference when handling error path
      in completer to prevent kmem_cache leak.
      
      Fixes: 8700e3e7 ("Soft RoCE driver")
      Signed-off-by: default avatarYonatan Cohen <yonatanc@mellanox.com>
      Signed-off-by: default avatarLeon Romanovsky <leon@kernel.org>
      Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
      c1cc72cb
    • Yonatan Cohen's avatar
      IB/rxe: Fix race condition between requester and completer · 3050b998
      Yonatan Cohen authored
      rxe_requester() is sending a pkt with rxe_xmit_packet() and
      then calls rxe_update() to update the wqe and qp's psn values.
      But sometimes the response is received before the requester
      had time to update the wqe in which case the completer
      acts on errornous wqe values.
      This fix updates the wqe and qp before actually sending
      the request and rolls back when xmit fails.
      
      Fixes: 8700e3e7 ("Soft RoCE driver")
      Signed-off-by: default avatarYonatan Cohen <yonatanc@mellanox.com>
      Signed-off-by: default avatarLeon Romanovsky <leon@kernel.org>
      Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
      3050b998
    • Yonatan Cohen's avatar
      IB/rxe: Fix duplicate atomic request handling · 90894887
      Yonatan Cohen authored
      When handling ack for atomic opcodes like "fetch&add"
      or "cmp&swp", the method send_atomic_ack() saves the ack
      before sending it, in case it gets lost and never reach the
      requester. In which case the method duplicate_request()
      will need to find it using the duplicated request.psn.
      But send_atomic_ack() used a wrong psn value and thus
      the above ack was never found.
      This fix uses the ack.psn to locate the ack in case
      its needed.
      This fix also copies the ack packet to the skb's control buffer
      since duplicate_request() will need it when calling rxe_xmit_packet()
      
      Fixes: 8700e3e7 ("Soft RoCE driver")
      Signed-off-by: default avatarYonatan Cohen <yonatanc@mellanox.com>
      Signed-off-by: default avatarLeon Romanovsky <leon@kernel.org>
      Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
      90894887
    • Yonatan Cohen's avatar
      IB/rxe: Fix kernel panic in udp_setup_tunnel · dfdd6158
      Yonatan Cohen authored
      Disable creation of a UDP socket for ipv6 when
      CONFIG_IPV6 is not enabeld. Since udp_sock_create6()
      returns 0 when CONFIG_IPV6 is not set
      
      [   46.888632] IP: [<c220705a>] setup_udp_tunnel_sock+0x6/0x4f
      [   46.891355] *pdpt = 0000000000000000 *pde = f000ff53f000ff53
      [   46.893918] Oops: 0002 [#1] PREEMPT
      [   46.896014] CPU: 0 PID: 1 Comm: swapper Not tainted 4.7.0-rc4-00001-g8700e3e7 #1
      [   46.900280] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Debian-1.8.2-1 04/01/2014
      [   46.904905] task: cf06c040 ti: cf05e000 task.ti: cf05e000
      [   46.907854] EIP: 0060:[<c220705a>] EFLAGS: 00210246 CPU: 0
      [   46.911137] EIP is at setup_udp_tunnel_sock+0x6/0x4f
      [   46.914070] EAX: 00000044 EBX: 00000001 ECX: cf05fef0 EDX: ca8142e0
      [   46.917236] ESI: c2c4505b EDI: cf05fef0 EBP: cf05fed0 ESP: cf05fed0
      [   46.919836]  DS: 007b ES: 007b FS: 0000 GS: 00e0 SS: 0068
      [   46.922046] CR0: 80050033 CR2: 000001fc CR3: 02cec000 CR4: 000006b0
      [   46.924550] Stack:
      [   46.926014]  cf05ff10 c1fd4657 ca8142e0 0000000a 00000000 00000000 0000b712 00000008
      [   46.931274]  00000000 6bb5bd01 c1fd48de 00000000 00000000 cf05ff1c 00000000 00000000
      [   46.936122]  cf05ff1c c1fd4bdf 00000000 cf05ff28 c2c4507b ffffffff cf05ff88 c2bf1c74
      [   46.942350] Call Trace:
      [   46.944403]  [<c1fd4657>] rxe_setup_udp_tunnel+0x8f/0x99
      [   46.947689]  [<c1fd48de>] ? net_to_rxe+0x4e/0x4e
      [   46.950567]  [<c1fd4bdf>] rxe_net_init+0xe/0xa4
      [   46.953147]  [<c2c4507b>] rxe_module_init+0x20/0x4c
      [   46.955448]  [<c2bf1c74>] do_one_initcall+0x89/0x113
      [   46.957797]  [<c2bf15eb>] ? set_debug_rodata+0xf/0xf
      [   46.959966]  [<c2bf1dbc>] ? kernel_init_freeable+0xbe/0x15b
      [   46.962262]  [<c2bf1ddc>] kernel_init_freeable+0xde/0x15b
      [   46.964418]  [<c232eb54>] kernel_init+0x8/0xd0
      [   46.966618]  [<c2333122>] ret_from_kernel_thread+0xe/0x24
      [   46.969592]  [<c232eb4c>] ? rest_init+0x6f/0x6f
      
      Fixes: 8700e3e7 ("Soft RoCE driver")
      Signed-off-by: default avatarYonatan Cohen <yonatanc@mellanox.com>
      Signed-off-by: default avatarLeon Romanovsky <leon@kernel.org>
      Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
      dfdd6158