Skip to content
  1. Dec 16, 2016
    • Ravi Bangoria's avatar
      perf annotate: Fix jump target outside of function address range · e216874c
      Ravi Bangoria authored
      
      
      If jump target is outside of function range, perf is not handling it
      correctly. Especially when target address is lesser than function start
      address, target offset will be negative. But, target address declared to
      be unsigned, converts negative number into 2's complement. See below
      example. Here target of 'jumpq' instruction at 34cf8 is 34ac0 which is
      lesser than function start address(34cf0).
      
              34ac0 - 34cf0 = -0x230 = 0xfffffffffffffdd0
      
      Objdump output:
      
        0000000000034cf0 <__sigaction>:
        __GI___sigaction():
          34cf0: lea    -0x20(%rdi),%eax
          34cf3: cmp    -bashx1,%eax
          34cf6: jbe    34d00 <__sigaction+0x10>
          34cf8: jmpq   34ac0 <__GI___libc_sigaction>
          34cfd: nopl   (%rax)
          34d00: mov    0x386161(%rip),%rax        # 3bae68 <_DYNAMIC+0x2e8>
          34d07: movl   -bashx16,%fs:(%rax)
          34d0e: mov    -bashxffffffff,%eax
          34d13: retq
      
      perf annotate before applying patch:
      
        __GI___sigaction  /usr/lib64/libc-2.22.so
                 lea    -0x20(%rdi),%eax
                 cmp    -bashx1,%eax
              v  jbe    10
              v  jmpq   fffffffffffffdd0
                 nop
          10:    mov    _DYNAMIC+0x2e8,%rax
                 movl   -bashx16,%fs:(%rax)
                 mov    -bashxffffffff,%eax
                 retq
      
      perf annotate after applying patch:
      
        __GI___sigaction  /usr/lib64/libc-2.22.so
                 lea    -0x20(%rdi),%eax
                 cmp    -bashx1,%eax
              v  jbe    10
              ^  jmpq   34ac0 <__GI___libc_sigaction>
                 nop
          10:    mov    _DYNAMIC+0x2e8,%rax
                 movl   -bashx16,%fs:(%rax)
                 mov    -bashxffffffff,%eax
                 retq
      
      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: Kim Phillips <kim.phillips@arm.com>
      Cc: Markus Trippelsdorf <markus@trippelsdorf.de>
      Cc: Masami Hiramatsu <mhiramat@kernel.org>
      Cc: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Taeung Song <treeze.taeung@gmail.com>
      Cc: linuxppc-dev@lists.ozlabs.org
      Link: http://lkml.kernel.org/r/1480953407-7605-3-git-send-email-ravi.bangoria@linux.vnet.ibm.com
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      e216874c
    • Ravi Bangoria's avatar
      perf annotate: Support jump instruction with target as second operand · 3ee2eb6d
      Ravi Bangoria authored
      
      
      Architectures like PowerPC have jump instructions that includes a target
      address as a second operand. For example, 'bne cr7,0xc0000000000f6154'.
      Add support for such instruction in perf annotate.
      
      objdump o/p:
        c0000000000f6140:   ld     r9,1032(r31)
        c0000000000f6144:   cmpdi  cr7,r9,0
        c0000000000f6148:   bne    cr7,0xc0000000000f6154
        c0000000000f614c:   ld     r9,2312(r30)
        c0000000000f6150:   std    r9,1032(r31)
        c0000000000f6154:   ld     r9,88(r31)
      
      Corresponding perf annotate o/p:
      
      Before patch:
               ld     r9,1032(r31)
               cmpdi  cr7,r9,0
            v  bne    3ffffffffff09f2c
               ld     r9,2312(r30)
               std    r9,1032(r31)
        74:    ld     r9,88(r31)
      
      After patch:
               ld     r9,1032(r31)
               cmpdi  cr7,r9,0
            v  bne    74
               ld     r9,2312(r30)
               std    r9,1032(r31)
        74:    ld     r9,88(r31)
      
      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: Kim Phillips <kim.phillips@arm.com>
      Cc: Markus Trippelsdorf <markus@trippelsdorf.de>
      Cc: Masami Hiramatsu <mhiramat@kernel.org>
      Cc: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Taeung Song <treeze.taeung@gmail.com>
      Cc: linuxppc-dev@lists.ozlabs.org
      Link: http://lkml.kernel.org/r/1480953407-7605-2-git-send-email-ravi.bangoria@linux.vnet.ibm.com
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      3ee2eb6d
    • Jiri Olsa's avatar
      perf record: Force ignore_missing_thread for uid option · 23dc4f15
      Jiri Olsa authored
      
      
      Enable perf_evsel::ignore_missing_thread for -u option to ignore
      complete failure if any of the user's processes die between its
      enumeration and time we open the event.
      
      Committer notes:
      
      While doing a 'make -j4 allmodconfig' we sometimes get into the race:
      
      Before:
      
        # perf record -u acme
        Error:
        The sys_perf_event_open() syscall returned with 3 (No such process) for event (cycles:ppp).
        /bin/dmesg may provide additional information.
        No CONFIG_PERF_EVENTS=y kernel support configured?
        #
      
      After:
      
        [root@jouet ~]# perf record -u acme
        WARNING: Ignored open failure for pid 9888
        WARNING: Ignored open failure for pid 18059
        [root@jouet ~]#
      
      Which is an improvement, with the races not preventing the remaining threads
      for the specified user from being monitored, but the message probably needs
      further clarification.
      
      Signed-off-by: default avatarJiri Olsa <jolsa@kernel.org>
      Tested-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Link: http://lkml.kernel.org/r/1481538943-21874-6-git-send-email-jolsa@kernel.org
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      23dc4f15
    • Jiri Olsa's avatar
      perf evsel: Allow to ignore missing pid · a359c17a
      Jiri Olsa authored
      
      
      Adding perf_evsel::ignore_missing_cpu_thread bool.
      
      When set true, it allows perf to ignore error of missing pid of perf
      event syscall.
      
      We remove missing thread id from the thread_map, so the rest of the
      processing like ioctl and mmap won't get disturbed with -1 fd.
      
      The reason for supporting this is to ease up monitoring group of pids,
      that 'disappear' before perf opens their event. This currently leads
      perf to report error and exit and makes perf record's -u option unusable
      under certain setup.
      
      With this change we will allow this race and ignore such failure with
      following warning:
      
        WARNING: Ignored open failure for pid 8605
      
      Signed-off-by: default avatarJiri Olsa <jolsa@kernel.org>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Link: http://lkml.kernel.org/r/20161213074622.GA3084@krava
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      a359c17a
    • Jiri Olsa's avatar
      perf thread_map: Add thread_map__remove function · 38af91f0
      Jiri Olsa authored
      
      
      Add thread_map__remove function to remove thread from thread map.
      
      Add automated test also.
      
      Committer notes:
      
      Testing it:
      
        # perf test "Remove thread map"
        39: Remove thread map                          : Ok
        # perf test -v "Remove thread map"
        39: Remove thread map                          :
        --- start ---
        test child forked, pid 4483
        2 threads: 4482, 4483
        1 thread: 4483
        0 thread:
        test child finished with 0
        ---- end ----
        Remove thread map: Ok
        #
      
      Signed-off-by: default avatarJiri Olsa <jolsa@kernel.org>
      Tested-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Link: http://lkml.kernel.org/r/1481538943-21874-4-git-send-email-jolsa@kernel.org
      [ Added stdlib.h, to get the free() declaration ]
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      38af91f0
    • Jiri Olsa's avatar
      perf evsel: Use variable instead of repeating lengthy FD macro · 83c2e4f3
      Jiri Olsa authored
      
      
      It's more readable and will ease up following patches.
      
      Signed-off-by: default avatarJiri Olsa <jolsa@kernel.org>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Link: http://lkml.kernel.org/r/1481538943-21874-3-git-send-email-jolsa@kernel.org
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      83c2e4f3
    • Jiri Olsa's avatar
      perf mem: Fix --all-user/--all-kernel options · 631ac41b
      Jiri Olsa authored
      
      
      Removing extra '--' prefix.
      
      Signed-off-by: default avatarJiri Olsa <jolsa@kernel.org>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Fixes: ad16511b
      
       ("perf mem: Add -U/-K (--all-user/--all-kernel) options")
      Link: http://lkml.kernel.org/r/1481538943-21874-2-git-send-email-jolsa@kernel.org
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      631ac41b
    • Arnaldo Carvalho de Melo's avatar
      perf tools: Remove some needless __maybe_unused · 7e6a7998
      Arnaldo Carvalho de Melo authored
      
      
      I.e. those parameters/functions _are_ used, so ditch that misleading attribute.
      
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Wang Nan <wangnan0@huawei.com>
      Link: http://lkml.kernel.org/n/tip-13cqtjh0yojg5gzvpq1zzpl0@git.kernel.org
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      7e6a7998
    • Namhyung Kim's avatar
      perf sched timehist: Show callchains for idle stat · ba957ebb
      Namhyung Kim authored
      
      
      When --idle-hist option is used with --summary, it now shows idle stats
      with callchains like below:
      
        Idle stats by callchain:
        CPU  0:   902.195 msec
        Idle time (msec)    Count Callchains
        ----------------  ------- --------------------------------------------------
                 370.589       69 futex_wait_queue_me <- futex_wait <- do_futex <- sys_futex <- entry_SYSCALL_64_fastpath
                 178.799       17 worker_thread <- kthread <- ret_from_fork
                 128.352       17 schedule_timeout <- rcu_gp_kthread <- kthread <- ret_from_fork
                 125.111       19 schedule_hrtimeout_range_clock <- schedule_hrtimeout_range <- poll_schedule_timeout <- do_select <- core_sys_select
                  71.599       50 schedule_hrtimeout_range_clock <- schedule_hrtimeout_range <- poll_schedule_timeout <- do_sys_poll <- sys_poll
                  23.146        1 rcu_gp_kthread <- kthread <- ret_from_fork
                   4.510        1 schedule_hrtimeout_range_clock <- schedule_hrtimeout_range <- ep_poll <- sys_epoll_wait <- do_syscall_64
                   0.085        1 schedule_hrtimeout_range_clock <- schedule_hrtimeout_range <- poll_schedule_timeout <- do_sys_poll <- do_restart_poll
        ...
      
      Committer notes:
      
      Extra testing:
      
        # uname -a
        Linux jouet 4.8.8-300.fc25.x86_64 #1 SMP Tue Nov 15 18:10:06 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
      
      1) Run 'perf sched record -g'
      
      2) Run 'perf sched timehist --idle --summary'
      
      <SNIP>
        Idle stats by callchain:
        CPU  0: 13456.840 msec
        Idle time (msec) Count Callchains
        ---------------- ----- --------------------------------------------------
                5386.637  3283 schedule_hrtimeout_range_clock <- schedule_hrtimeout_range <- poll_schedule_timeout <- do_sys_poll <- sys_poll
                2750.238  2299 futex_wait_queue_me <- futex_wait <- do_futex <- sys_futex <- do_syscall_64
                1275.672  1287 schedule_hrtimeout_range_clock <- schedule_hrtimeout_range <- ep_poll <- sys_epoll_wait <- entry_SYSCALL_64_fastpath
                 936.322   452 worker_thread <- kthread <- ret_from_fork
                 741.311   385 rcu_nocb_kthread <- kthread <- ret_from_fork
                 729.385   248 schedule_hrtimeout_range_clock <- schedule_hrtimeout_range <- poll_schedule_timeout <- do_sys_poll <- sys_ppoll
                 365.386   229 irq_thread <- kthread <- ret_from_fork
                 338.934   265 futex_wait_queue_me <- futex_wait <- do_futex <- sys_futex <- entry_SYSCALL_64_fastpath
                 219.488   201 schedule_timeout <- rcu_gp_kthread <- kthread <- ret_from_fork
                 186.839   410 schedule_hrtimeout_range_clock <- schedule_hrtimeout_range <- ep_poll <- sys_epoll_wait <- do_syscall_64
                 142.541    59 kvm_vcpu_block <- kvm_arch_vcpu_ioctl_run <- kvm_vcpu_ioctl <- do_vfs_ioctl <- sys_ioctl
                  83.887    92 smpboot_thread_fn <- kthread <- ret_from_fork
                  62.722    96 do_exit <- do_group_exit <- 0x2a5594 <- entry_SYSCALL_64_fastpath
                  47.894    83 pipe_wait <- pipe_read <- __vfs_read <- vfs_read <- sys_read
                  46.554    61 rcu_gp_kthread <- kthread <- ret_from_fork
                  34.337    21 schedule_timeout <- intel_fbc_work_fn <- process_one_work <- worker_thread <- kthread
                  29.521    14 schedule_hrtimeout_range_clock <- schedule_hrtimeout_range <- poll_schedule_timeout <- do_select <- core_sys_select
                  20.274    10 schedule_timeout <- io_schedule_timeout <- bit_wait_io <- __wait_on_bit <- out_of_line_wait_on_bit
                  15.085    55 schedule_timeout <- unix_stream_read_generic <- unix_stream_recvmsg <- sock_recvmsg <- SYSC_recvfrom
      <SNIP>
      
      Signed-off-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Tested-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      Acked-by: default avatarDavid Ahern <dsahern@gmail.com>
      Cc: Andi Kleen <andi@firstfloor.org>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Minchan Kim <minchan@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Link: http://lkml.kernel.org/r/20161208144755.16673-7-namhyung@kernel.org
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      ba957ebb
    • Namhyung Kim's avatar
      perf sched timehist: Add -I/--idle-hist option · 07235f84
      Namhyung Kim authored
      
      
      The --idle-hist option is to analyze system idle state so which process
      makes cpu to go idle.  If this option is specified, non-idle events will
      be skipped and processes switching to/from idle will be shown.
      
      This option is mostly useful when used with --summary(-only) option.  In
      the idle-time summary view, idle time is accounted to previous thread
      which is run before idle task.
      
      The example output looks like following:
      
        Idle-time summary
                        comm parent sched-out idle-time min-idle avg-idle max-idle stddev migrations
                                      (count)    (msec)   (msec)   (msec)   (msec)      %
        --------------------------------------------------------------------------------------------
              rcu_preempt[7]      2        95   550.872    0.011    5.798   23.146   7.63      0
             migration/1[16]      2         1    15.558   15.558   15.558   15.558   0.00      0
              khugepaged[39]      2         1     3.062    3.062    3.062    3.062   0.00      0
           kworker/0:1H[124]      2         2     4.728    0.611    2.364    4.116  74.12      0
        systemd-journal[167]      1         1     4.510    4.510    4.510    4.510   0.00      0
          kworker/u16:3[558]      2        13    74.737    0.080    5.749   12.960  21.96      0
         irq/34-iwlwifi[628]      2        21   118.403    0.032    5.638   23.990  24.00      0
          kworker/u17:0[673]      2         1     3.523    3.523    3.523    3.523   0.00      0
            dbus-daemon[722]      1         1     6.743    6.743    6.743    6.743   0.00      0
                ifplugd[741]      1         1    58.826   58.826   58.826   58.826   0.00      0
        wpa_supplicant[1490]      1         1    13.302   13.302   13.302   13.302   0.00      0
           wpa_actiond[1492]      1         2     4.064    0.168    2.032    3.896  91.72      0
               dockerd[1500]      1         1     0.055    0.055    0.055    0.055   0.00      0
        ...
      
      Signed-off-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Tested-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      Acked-by: default avatarDavid Ahern <dsahern@gmail.com>
      Cc: Andi Kleen <andi@firstfloor.org>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Minchan Kim <minchan@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Link: http://lkml.kernel.org/r/20161208144755.16673-6-namhyung@kernel.org
      Link: http://lkml.kernel.org/r/20161213080632.19099-2-namhyung@kernel.org
      [ Merged fix sent by Namhyumg, as posted in the second Link: tag ]
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      07235f84
    • Namhyung Kim's avatar
      perf sched timehist: Skip non-idle events when necessary · a4b2b6f5
      Namhyung Kim authored
      
      
      Sometimes it only focuses on idle-related events like upcoming idle-hist
      feature.  In this case we don't want to see other event to reduce noise.
      
      Signed-off-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Acked-by: default avatarDavid Ahern <dsahern@gmail.com>
      Cc: Andi Kleen <andi@firstfloor.org>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Minchan Kim <minchan@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Link: http://lkml.kernel.org/r/20161208144755.16673-5-namhyung@kernel.org
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      a4b2b6f5
    • Namhyung Kim's avatar
      perf sched timehist: Save callchain when entering idle · 699b5b92
      Namhyung Kim authored
      
      
      In order to investigate the idleness reason, it is necessary to keep the
      callchains when entering idle.  This can be identified by the
      sched:sched_switch event having the next_pid field as 0.
      
      Signed-off-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Acked-by: default avatarDavid Ahern <dsahern@gmail.com>
      Cc: Andi Kleen <andi@firstfloor.org>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Minchan Kim <minchan@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Link: http://lkml.kernel.org/r/20161208144755.16673-4-namhyung@kernel.org
      Link: http://lkml.kernel.org/r/20161213080632.19099-1-namhyung@kernel.org
      [ Merged fix from Namhyung, see second Link: tag ]
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      699b5b92
    • Namhyung Kim's avatar
      perf sched timehist: Introduce struct idle_time_data · 3bc2fa9c
      Namhyung Kim authored
      
      
      The struct idle_time_data is to keep idle stats with callchains entering
      to the idle task.  The normal thread_runtime calculation is done
      transparently since it extends the struct thread_runtime.
      
      Signed-off-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Acked-by: default avatarDavid Ahern <dsahern@gmail.com>
      Cc: Andi Kleen <andi@firstfloor.org>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Minchan Kim <minchan@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Link: http://lkml.kernel.org/r/20161208144755.16673-3-namhyung@kernel.org
      [ Align struct field names ]
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      3bc2fa9c
    • Namhyung Kim's avatar
      perf sched timehist: Split is_idle_sample() · 96039c7c
      Namhyung Kim authored
      
      
      The is_idle_sample() function actually does more than determining
      whether sample come from idle task.  Split the callchain part into
      save_task_callchain() to make it clearer.
      
      Also checking prev_pid from trace data looks preferred than just
      checking sample->pid since it's possible, although rare, to have invalid
      0 pid/tid on scheduling an exiting task.
      
      Signed-off-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Acked-by: default avatarDavid Ahern <dsahern@gmail.com>
      Cc: Andi Kleen <andi@firstfloor.org>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Minchan Kim <minchan@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Link: http://lkml.kernel.org/r/20161208144755.16673-2-namhyung@kernel.org
      [ Remove some needless () in some return statements ]
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      96039c7c
    • Jiri Olsa's avatar
      perf tools: Move headers check into bash script · aeafd623
      Jiri Olsa authored
      
      
      To make it nicer and easily maintainable.
      
      Also moving the check into fixdep sub make, so its output is not
      scattered around the build output.
      
      Removing extra $$ from mman*.h checks.
      
      Signed-off-by: default avatarJiri Olsa <jolsa@kernel.org>
      Tested-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Link: http://lkml.kernel.org/r/1481030331-31944-5-git-send-email-jolsa@kernel.org
      [ Use /bin/sh, and 'function check() {' -> 'check () {' to make it work with busybox, in Alpine Linux, for instance ]
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      aeafd623
  2. Dec 13, 2016
    • Linus Torvalds's avatar
      Merge tag 'docs-4.10' of git://git.lwn.net/linux · e7aa8c2e
      Linus Torvalds authored
      Pull documentation update from Jonathan Corbet:
       "These are the documentation changes for 4.10.
      
        It's another busy cycle for the docs tree, as the sphinx conversion
        continues. Highlights include:
      
         - Further work on PDF output, which remains a bit of a pain but
           should be more solid now.
      
         - Five more DocBook template files converted to Sphinx. Only 27 to
           go... Lots of plain-text files have also been converted and
           integrated.
      
         - Images in binary formats have been replaced with more
           source-friendly versions.
      
         - Various bits of organizational work, including the renaming of
           various files discussed at the kernel summit.
      
         - New documentation for the device_link mechanism.
      
        ... and, of course, lots of typo fixes and small updates"
      
      * tag 'docs-4.10' of git://git.lwn.net/linux: (193 commits)
        dma-buf: Extract dma-buf.rst
        Update Documentation/00-INDEX
        docs: 00-INDEX: document directories/files with no docs
        docs: 00-INDEX: remove non-existing entries
        docs: 00-INDEX: add missing entries for documentation files/dirs
        docs: 00-INDEX: consolidate process/ and admin-guide/ description
        scripts: add a script to check if Documentation/00-INDEX is sane
        Docs: change sh -> awk in REPORTING-BUGS
        Documentation/core-api/device_link: Add initial documentation
        core-api: remove an unexpected unident
        ppc/idle: Add documentation for powersave=off
        Doc: Correct typo, "Introdution" => "Introduction"
        Documentation/atomic_ops.txt: convert to ReST markup
        Documentation/local_ops.txt: convert to ReST markup
        Documentation/assoc_array.txt: convert to ReST markup
        docs-rst: parse-headers.pl: cleanup the documentation
        docs-rst: fix media cleandocs target
        docs-rst: media/Makefile: reorganize the rules
        docs-rst: media: build SVG from graphviz files
        docs-rst: replace bayer.png by a SVG image
        ...
      e7aa8c2e
    • Linus Torvalds's avatar
      Merge branch 'akpm' (patches from Andrew) · e34bac72
      Linus Torvalds authored
      Merge updates from Andrew Morton:
      
       - various misc bits
      
       - most of MM (quite a lot of MM material is awaiting the merge of
         linux-next dependencies)
      
       - kasan
      
       - printk updates
      
       - procfs updates
      
       - MAINTAINERS
      
       - /lib updates
      
       - checkpatch updates
      
      * emailed patches from Andrew Morton <akpm@linux-foundation.org>: (123 commits)
        init: reduce rootwait polling interval time to 5ms
        binfmt_elf: use vmalloc() for allocation of vma_filesz
        checkpatch: don't emit unified-diff error for rename-only patches
        checkpatch: don't check c99 types like uint8_t under tools
        checkpatch: avoid multiple line dereferences
        checkpatch: don't check .pl files, improve absolute path commit log test
        scripts/checkpatch.pl: fix spelling
        checkpatch: don't try to get maintained status when --no-tree is given
        lib/ida: document locking requirements a bit better
        lib/rbtree.c: fix typo in comment of ____rb_erase_color
        lib/Kconfig.debug: make CONFIG_STRICT_DEVMEM depend on CONFIG_DEVMEM
        MAINTAINERS: add drm and drm/i915 irc channels
        MAINTAINERS: add "C:" for URI for chat where developers hang out
        MAINTAINERS: add drm and drm/i915 bug filing info
        MAINTAINERS: add "B:" for URI where to file bugs
        get_maintainer: look for arbitrary letter prefixes in sections
        printk: add Kconfig option to set default console loglevel
        printk/sound: handle more message headers
        printk/btrfs: handle more message headers
        printk/kdb: handle more message headers
        ...
      e34bac72
    • Joe Perches's avatar
      treewide: Make remaining source files non-executable · fe6bce8d
      Joe Perches authored
      
      
      .c and .h source files should not be executable, change
      the permissions to 0644.
      
      [ This would normally go through Andrew Morton, but his ancient
        patch-based toolchain doesn't do permission changes ]
      
      Signed-off-by: default avatarJoe Perches <joe@perches.com>
      Acked-by: default avatarDavid Howells <dhowells@redhat.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      fe6bce8d
    • Linus Torvalds's avatar
      Merge branch 'irq-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · f082f02c
      Linus Torvalds authored
      Pull irq updates from Thomas Gleixner:
       "The irq department provides:
      
         - a major update to the auto affinity management code, which is used
           by multi-queue devices
      
         - move of the microblaze irq chip driver into the common driver code
           so it can be shared between microblaze, powerpc and MIPS
      
         - a series of updates to the ARM GICV3 interrupt controller
      
         - the usual pile of fixes and small improvements all over the place"
      
      * 'irq-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (25 commits)
        powerpc/virtex: Use generic xilinx irqchip driver
        irqchip/xilinx: Try to fall back if xlnx,kind-of-intr not provided
        irqchip/xilinx: Add support for parent intc
        irqchip/xilinx: Rename get_irq to xintc_get_irq
        irqchip/xilinx: Restructure and use jump label api
        irqchip/xilinx: Clean up print messages
        microblaze/irqchip: Move intc driver to irqchip
        ARM: virt: Select ARM_GIC_V3_ITS
        ARM: gic-v3-its: Add 32bit support to GICv3 ITS
        irqchip/gic-v3-its: Specialise readq and writeq accesses
        irqchip/gic-v3-its: Specialise flush_dcache operation
        irqchip/gic-v3-its: Narrow down Entry Size when used as a divider
        irqchip/gic-v3-its: Change unsigned types for AArch32 compatibility
        irqchip/gic-v3: Use nops macro for Cavium ThunderX erratum 23154
        irqchip/gic-v3: Convert arm64 GIC accessors to {read,write}_sysreg_s
        genirq/msi: Drop artificial PCI dependency
        irqchip/bcm7038-l1: Implement irq_cpu_offline() callback
        genirq/affinity: Use default affinity mask for reserved vectors
        genirq/affinity: Take reserved vectors into account when spreading irqs
        PCI: Remove the irq_affinity mask from struct pci_dev
        ...
      f082f02c
    • Linus Torvalds's avatar
      Merge branch 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 9465d9cc
      Linus Torvalds authored
      Pull timer updates from Thomas Gleixner:
       "The time/timekeeping/timer folks deliver with this update:
      
         - Fix a reintroduced signed/unsigned issue and cleanup the whole
           signed/unsigned mess in the timekeeping core so this wont happen
           accidentaly again.
      
         - Add a new trace clock based on boot time
      
         - Prevent injection of random sleep times when PM tracing abuses the
           RTC for storage
      
         - Make posix timers configurable for real tiny systems
      
         - Add tracepoints for the alarm timer subsystem so timer based
           suspend wakeups can be instrumented
      
         - The usual pile of fixes and updates to core and drivers"
      
      * 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (23 commits)
        timekeeping: Use mul_u64_u32_shr() instead of open coding it
        timekeeping: Get rid of pointless typecasts
        timekeeping: Make the conversion call chain consistently unsigned
        timekeeping_Force_unsigned_clocksource_to_nanoseconds_conversion
        alarmtimer: Add tracepoints for alarm timers
        trace: Update documentation for mono, mono_raw and boot clock
        trace: Add an option for boot clock as trace clock
        timekeeping: Add a fast and NMI safe boot clock
        timekeeping/clocksource_cyc2ns: Document intended range limitation
        timekeeping: Ignore the bogus sleep time if pm_trace is enabled
        selftests/timers: Fix spelling mistake "Asyncrhonous" -> "Asynchronous"
        clocksource/drivers/bcm2835_timer: Unmap region obtained by of_iomap
        clocksource/drivers/arm_arch_timer: Map frame with of_io_request_and_map()
        arm64: dts: rockchip: Arch counter doesn't tick in system suspend
        clocksource/drivers/arm_arch_timer: Don't assume clock runs in suspend
        posix-timers: Make them configurable
        posix_cpu_timers: Move the add_device_randomness() call to a proper place
        timer: Move sys_alarm from timer.c to itimer.c
        ptp_clock: Allow for it to be optional
        Kconfig: Regenerate *.c_shipped files after previous changes
        ...
      9465d9cc
    • Linus Torvalds's avatar
      Merge branch 'smp-hotplug-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · e71c3978
      Linus Torvalds authored
      Pull smp hotplug updates from Thomas Gleixner:
       "This is the final round of converting the notifier mess to the state
        machine. The removal of the notifiers and the related infrastructure
        will happen around rc1, as there are conversions outstanding in other
        trees.
      
        The whole exercise removed about 2000 lines of code in total and in
        course of the conversion several dozen bugs got fixed. The new
        mechanism allows to test almost every hotplug step standalone, so
        usage sites can exercise all transitions extensively.
      
        There is more room for improvement, like integrating all the
        pointlessly different architecture mechanisms of synchronizing,
        setting cpus online etc into the core code"
      
      * 'smp-hotplug-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (60 commits)
        tracing/rb: Init the CPU mask on allocation
        soc/fsl/qbman: Convert to hotplug state machine
        soc/fsl/qbman: Convert to hotplug state machine
        zram: Convert to hotplug state machine
        KVM/PPC/Book3S HV: Convert to hotplug state machine
        arm64/cpuinfo: Convert to hotplug state machine
        arm64/cpuinfo: Make hotplug notifier symmetric
        mm/compaction: Convert to hotplug state machine
        iommu/vt-d: Convert to hotplug state machine
        mm/zswap: Convert pool to hotplug state machine
        mm/zswap: Convert dst-mem to hotplug state machine
        mm/zsmalloc: Convert to hotplug state machine
        mm/vmstat: Convert to hotplug state machine
        mm/vmstat: Avoid on each online CPU loops
        mm/vmstat: Drop get_online_cpus() from init_cpu_node_state/vmstat_cpu_dead()
        tracing/rb: Convert to hotplug state machine
        oprofile/nmi timer: Convert to hotplug state machine
        net/iucv: Use explicit clean up labels in iucv_init()
        x86/pci/amd-bus: Convert to hotplug state machine
        x86/oprofile/nmi: Convert to hotplug state machine
        ...
      e71c3978
    • Jungseung Lee's avatar
      init: reduce rootwait polling interval time to 5ms · 39a0e975
      Jungseung Lee authored
      
      
      For several devices, the rootwait time is sensitive because it directly
      affects booting time.  The polling interval of rootwait is currently
      100ms.  To save unnessesary waiting time, reduce the polling interval to
      5 ms.
      
      [akpm@linux-foundation.org: remove used-once #define]
      Link: http://lkml.kernel.org/r/20161207060743.1728-1-js07.lee@samsung.com
      Signed-off-by: default avatarJungseung Lee <js07.lee@samsung.com>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Cc: Christoph Hellwig <hch@lst.de>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      39a0e975
    • Jason Baron's avatar
      binfmt_elf: use vmalloc() for allocation of vma_filesz · 30f74aa0
      Jason Baron authored
      
      
      We have observed page allocations failures of order 4 during core dump
      while trying to allocate vma_filesz.  This results in a useless core
      file of size 0.  To improve reliability use vmalloc().
      
      Note that the vmalloc() allocation is bounded by sysctl_max_map_count,
      which is 65,530 by default.  So with a 4k page size, and 8 bytes per
      seg, this is a max of 128 pages or an order 7 allocation.  Other parts
      of the core dump path, such as fill_files_note() are already using
      vmalloc() for presumably similar reasons.
      
      Link: http://lkml.kernel.org/r/1479745791-17611-1-git-send-email-jbaron@akamai.com
      Signed-off-by: default avatarJason Baron <jbaron@akamai.com>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      30f74aa0
    • Andrew Jeffery's avatar
      checkpatch: don't emit unified-diff error for rename-only patches · a82603a8
      Andrew Jeffery authored
      
      
      I generated a patch with `git format-patch` which checkpatch thinks is
      invalid:
      
          $ ./scripts/checkpatch.pl lpc-dt/0006-mfd-dt-Move-syscon-bindings-to-syscon-subdirectory.patch
          WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
           Documentation/devicetree/bindings/mfd/{ => syscon}/aspeed-scu.txt         | 0
      
          ERROR: Does not appear to be a unified-diff format patch
      
          total: 1 errors, 1 warnings, 0 lines checked
      
          NOTE: For some of the reported defects, checkpatch may be able to
                mechanically convert to the typical style using --fix or --fix-inplace.
      
          lpc-dt/0006-mfd-dt-Move-syscon-bindings-to-syscon-subdirectory.patch has style problems, please review.
      
          NOTE: If any of the errors are false positives, please report
                them to the maintainer, see CHECKPATCH in MAINTAINERS.
      
      The patch in question was all renames with no edits, giving 100%
      similarity and thus no diff markers.
      
      Set '$is_patch = 1;' in the add/remove/rename detection to avoid
      generating spurious warnings.
      
      Link: http://lkml.kernel.org/r/20161205232224.22685-1-andrew@aj.id.au
      Signed-off-by: default avatarAndrew Jeffery <andrew@aj.id.au>
      Acked-by: default avatarJoe Perches <joe@perches.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      a82603a8
    • Tomas Winkler's avatar
      checkpatch: don't check c99 types like uint8_t under tools · fd39f904
      Tomas Winkler authored
      
      
      Tools contains user space code so uintX_t types are just fine.
      
      Link: http://lkml.kernel.org/r/1479286379-853-1-git-send-email-tomas.winkler@intel.com
      Signed-off-by: default avatarTomas Winkler <tomas.winkler@intel.com>
      Acked-by: default avatarJoe Perches <joe@perches.com>
      Cc: Andy Whitcroft <apw@canonical.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      fd39f904
    • Joe Perches's avatar
      checkpatch: avoid multiple line dereferences · 11ca40a0
      Joe Perches authored
      
      
      Code that puts a single dereferencing identifier on multiple lines like:
      
           struct_identifier->member[index].
      	member = <foo>;
      
      is generally hard to follow.
      
      Prefer that dereferencing identifiers be single line.
      
      Link: http://lkml.kernel.org/r/e9c191ae3f41bedc8ffd5c0fbcc5a1cec1d1d2df.1478120869.git.joe@perches.com
      Signed-off-by: default avatarJoe Perches <joe@perches.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      11ca40a0
    • Joe Perches's avatar
      checkpatch: don't check .pl files, improve absolute path commit log test · d6430f71
      Joe Perches authored
      
      
      perl files (*.pl) are mostly inappropriate to check coding styles so
      exempt them from long line checks and various .[ch] file type tests.
      
      And as well, only scan absolute paths in the commit log, not in the
      patch.
      
      Link: http://lkml.kernel.org/r/85b101d50acafe6c0261d9f7df283c827da52c4a.1477340110.git.joe@perches.com
      Signed-off-by: default avatarJoe Perches <joe@perches.com>
      Cc: Andy Whitcroft <apw@canonical.com>
      Cc: Heinrich Schuchardt <xypron.glpk@gmx.de>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      d6430f71
    • Andrew Morton's avatar
      scripts/checkpatch.pl: fix spelling · 224236d9
      Andrew Morton authored
      
      
      s/preceeded/preceded/
      
      Cc: Joe Perches <joe@perches.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      224236d9
    • Jerome Forissier's avatar
      checkpatch: don't try to get maintained status when --no-tree is given · f2c19c2f
      Jerome Forissier authored
      
      
      Fixes the following warning:
      
        Use of uninitialized value $root in concatenation (.) or string at /path/to/checkpatch.pl line 764.
      
      Link: http://lkml.kernel.org/r/1476719709-16668-1-git-send-email-jerome.forissier@linaro.org
      Signed-off-by: default avatarJerome Forissier <jerome.forissier@linaro.org>
      Reviewed-by: default avatarBrian Norris <computersforpeace@gmail.com>
      Acked-by: default avatarJoe Perches <joe@perches.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      f2c19c2f
    • Daniel Vetter's avatar
      lib/ida: document locking requirements a bit better · a2ef9471
      Daniel Vetter authored
      
      
      I wanted to wrap a bunch of ida_simple_get calls into their own locking,
      until I dug around and read the original commit message.  Stuff like
      this should imo be added to the kernel doc, let's do that.
      
      Link: http://lkml.kernel.org/r/20161027072216.20411-1-daniel.vetter@ffwll.ch
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@intel.com>
      Acked-by: default avatarTejun Heo <tj@kernel.org>
      Cc: Mel Gorman <mgorman@techsingularity.net>
      Cc: Michal Hocko <mhocko@suse.com>
      Cc: Vlastimil Babka <vbabka@suse.cz>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      a2ef9471
    • Jie Chen's avatar
      lib/rbtree.c: fix typo in comment of ____rb_erase_color · ce093a04
      Jie Chen authored
      
      
      In Case 3 of `sibling == parent->rb_right':
      
      Right rotation will not change color of sl and S in the diagram
      (i.e. should not change "sl" to "Sl", "S" to "s")
      
      In Case 3 of `sibling == parent->rb_left':
      
           (p)           (p)
           / \           / \
          S   N    -->  sr  N
         / \           /
        Sl  sr        S
                     /
                    Sl
      
        This is actually left rotation at "S", not right rotation.
      
      In Case 4 of `sibling == parent->rb_left':
      
           (p)             (s)
           / \             / \
          S   N     -->   Sl  P
         / \                 / \
        sl (sr)            (sr) N
      
        This is actually right rotation at "(p)" + color flips, not left
        rotation + color flips.
      
      Link: http://lkml.kernel.org/r/1472391115-3702-1-git-send-email-fykcee1@gmail.com
      Signed-off-by: default avatarJie Chen <fykcee1@gmail.com>
      Cc: Wei Yang <weiyang@linux.vnet.ibm.com>
      Cc: Xiao Guangrong <guangrong.xiao@linux.intel.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      ce093a04
    • Dave Young's avatar
      lib/Kconfig.debug: make CONFIG_STRICT_DEVMEM depend on CONFIG_DEVMEM · 6b2a65c7
      Dave Young authored
      
      
      With CONFIG_DEVMEM not set, CONFIG_STRICT_DEVMEM will be useless even if
      it is set =y, thus let's update the dependency in Kconfig.
      
      Link: http://lkml.kernel.org/r/20161006051217.GA31027@dhcp-128-65.nay.redhat.com
      Signed-off-by: default avatarDave Young <dyoung@redhat.com>
      Acked-by: default avatarKees Cook <keescook@chromium.org>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Dan Williams <dan.j.williams@intel.com>
      Cc: Josh Poimboeuf <jpoimboe@redhat.com>
      Cc: Tejun Heo <tj@kernel.org>
      Cc: Andrey Ryabinin <aryabinin@virtuozzo.com>
      Cc: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
      Cc: Dmitry Vyukov <dvyukov@google.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      6b2a65c7
    • Jani Nikula's avatar
      MAINTAINERS: add drm and drm/i915 irc channels · 5fc41a70
      Jani Nikula authored
      
      
      Link: http://lkml.kernel.org/r/1476966135-26943-4-git-send-email-jani.nikula@intel.com
      Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
      Reviewed-by: default avatarAndrew Donnellan <andrew.donnellan@au1.ibm.com>
      Cc: Daniel Vetter <daniel@ffwll.ch>
      Cc: Dave Airlie <airlied@gmail.com>
      Cc: Joe Perches <joe@perches.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      5fc41a70
    • Jani Nikula's avatar
      MAINTAINERS: add "C:" for URI for chat where developers hang out · 57599f9b
      Jani Nikula authored
      
      
      Make it easier to find the developer chat for the subsystem or driver.
      
      Link: http://lkml.kernel.org/r/1476966135-26943-3-git-send-email-jani.nikula@intel.com
      Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
      Reviewed-by: default avatarAndrew Donnellan <andrew.donnellan@au1.ibm.com>
      Cc: Daniel Vetter <daniel@ffwll.ch>
      Cc: Dave Airlie <airlied@gmail.com>
      Cc: Joe Perches <joe@perches.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      57599f9b
    • Jani Nikula's avatar
      MAINTAINERS: add drm and drm/i915 bug filing info · 51b06f9f
      Jani Nikula authored
      
      
      Link: http://lkml.kernel.org/r/1476966135-26943-2-git-send-email-jani.nikula@intel.com
      Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
      Reviewed-by: default avatarAndrew Donnellan <andrew.donnellan@au1.ibm.com>
      Cc: Daniel Vetter <daniel@ffwll.ch>
      Cc: Dave Airlie <airlied@gmail.com>
      Cc: Joe Perches <joe@perches.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      51b06f9f
    • Jani Nikula's avatar
      MAINTAINERS: add "B:" for URI where to file bugs · 2de2bd95
      Jani Nikula authored
      
      
      Different subsystems and drivers have different preferences for where to
      file bugs and what information to include.  Add "B:" entry for
      specifying the URI for the bug tracker directly, a web page for detailed
      info on filing bugs, or a mailto: URI.
      
      Link: http://lkml.kernel.org/r/1476966135-26943-1-git-send-email-jani.nikula@intel.com
      Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
      Reviewed-by: default avatarAndrew Donnellan <andrew.donnellan@au1.ibm.com>
      Acked-by: default avatarDaniel Vetter <daniel@ffwll.ch>
      Cc: Joe Perches <joe@perches.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      2de2bd95
    • Joe Perches's avatar
      get_maintainer: look for arbitrary letter prefixes in sections · 03aed214
      Joe Perches authored
      
      
      Jani Nikula proposes patches to add a few new letter prefixes for "B:"
      bug reporting and "C:" maintainer chatting to the various sections of
      MAINTAINERS.
      
      Add a generic mechanism to get_maintainer.pl to find sections that have
      any combination of "[A-Z]" letter prefix types in a section.
      
      Link: http://lkml.kernel.org/r/1477332323.1984.8.camel@perches.com
      Signed-off-by: default avatarJoe Perches <joe@perches.com>
      Cc: Jani Nikula <jani.nikula@intel.com>
      Cc: Daniel Vetter <daniel@ffwll.ch>
      Cc: Dave Airlie <airlied@gmail.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      03aed214
    • Olof Johansson's avatar
      printk: add Kconfig option to set default console loglevel · a8cfdc68
      Olof Johansson authored
      
      
      Add a configuration option to set the default console loglevel.  This
      is, as before, still possible to override at runtime through bootargs
      (loglevel=<x>), sysrq and /proc/printk.
      
      There are cases where adding additional arguments on the commandline is
      impractical, and changing the default for the kernel when being built
      makes more sense.  Provide such a method here, for those who choose to
      do so.
      
      Also, while touching this code, clarify the difference between
      MESSAGE_LOGLEVEL_DEFAULT and CONSOLE_LOGLEVEL_DEFAULT.
      
      Link: http://lkml.kernel.org/r/1479676829-30031-1-git-send-email-olof@lixom.net
      Signed-off-by: default avatarOlof Johansson <olof@lixom.net>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      a8cfdc68
    • Petr Mladek's avatar
      printk/sound: handle more message headers · 0a4824bf
      Petr Mladek authored
      Commit 4bcc595c
      
       ("printk: reinstate KERN_CONT for printing
      continuation lines") allows to define more message headers for a single
      message.  The motivation is that continuous lines might get mixed.
      Therefore it make sense to define the right log level for every piece of
      a cont line.
      
      This patch allows to copy only the real message level.  We should ignore
      KERN_CONT because <filename:line> is added for each message.  By other
      words, we want to know where each piece of the line comes from.
      
      [pmladek@suse.com: fix a check of the valid message level]
        Link: http://lkml.kernel.org/r/20161111183444.GE2145@dhcp128.suse.cz
      Link: http://lkml.kernel.org/r/1478695291-12169-5-git-send-email-pmladek@suse.com
      Signed-off-by: default avatarPetr Mladek <pmladek@suse.com>
      Cc: Joe Perches <joe@perches.com>
      Cc: Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Jason Wessel <jason.wessel@windriver.com>
      Cc: Jaroslav Kysela <perex@perex.cz>
      Cc: Takashi Iwai <tiwai@suse.com>
      Cc: Chris Mason <clm@fb.com>
      Cc: Josef Bacik <jbacik@fb.com>
      Cc: David Sterba <dsterba@suse.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      0a4824bf
    • Petr Mladek's avatar
      printk/btrfs: handle more message headers · 262c5e86
      Petr Mladek authored
      Commit 4bcc595c ("printk: reinstate KERN_CONT for printing
      continuation lines") allows to define more message headers for a single
      message.  The motivation is that continuous lines might get mixed.
      Therefore it make sense to define the right log level for every piece of
      a cont line.
      
      The current btrfs_printk() macros do not support continuous lines at the
      moment.  But better be prepared for a custom messages and avoid
      potential "lvl" buffer overflow.
      
      This patch iterates over the entire message header.  It is interested
      only into the message level like the original code.
      
      This patch also introduces PRINTK_MAX_SINGLE_HEADER_LEN.  Three bytes
      are enough for the message level header at the moment.  But it used to
      be three, see the commit 04d2c8c8
      
       ("printk: convert the format for
      KERN_<LEVEL> to a 2 byte pattern").
      
      Also I fixed the default ratelimit level.  It looked very strange when it
      was different from the default log level.
      
      [pmladek@suse.com: Fix a check of the valid message level]
        Link: http://lkml.kernel.org/r/20161111183236.GD2145@dhcp128.suse.cz
      Link: http://lkml.kernel.org/r/1478695291-12169-4-git-send-email-pmladek@suse.com
      Signed-off-by: default avatarPetr Mladek <pmladek@suse.com>
      Acked-by: default avatarDavid Sterba <dsterba@suse.com>
      Cc: Joe Perches <joe@perches.com>
      Cc: Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Jason Wessel <jason.wessel@windriver.com>
      Cc: Jaroslav Kysela <perex@perex.cz>
      Cc: Takashi Iwai <tiwai@suse.com>
      Cc: Chris Mason <clm@fb.com>
      Cc: Josef Bacik <jbacik@fb.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      262c5e86