1. 12 Dec, 2016 40 commits
    • Linus Torvalds's avatar
      Merge branch 'x86-boot-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 06cc6b96
      Linus Torvalds authored
      Pull x86 boot updates from Ingo Molnar:
       "Misc cleanups/simplifications by Borislav Petkov, Paul Bolle and Wei
        Yang"
      
      * 'x86-boot-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/boot/64: Optimize fixmap page fixup
        x86/boot: Simplify the GDTR calculation assembly code a bit
        x86/boot/build: Remove always empty $(USERINCLUDE)
      06cc6b96
    • Linus Torvalds's avatar
      Merge branch 'x86-asm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 5645688f
      Linus Torvalds authored
      Pull x86 asm updates from Ingo Molnar:
       "The main changes in this development cycle were:
      
         - a large number of call stack dumping/printing improvements: higher
           robustness, better cross-context dumping, improved output, etc.
           (Josh Poimboeuf)
      
         - vDSO getcpu() performance improvement for future Intel CPUs with
           the RDPID instruction (Andy Lutomirski)
      
         - add two new Intel AVX512 features and the CPUID support
           infrastructure for it: AVX512IFMA and AVX512VBMI. (Gayatri Kammela,
           He Chen)
      
         - more copy-user unification (Borislav Petkov)
      
         - entry code assembly macro simplifications (Alexander Kuleshov)
      
         - vDSO C/R support improvements (Dmitry Safonov)
      
         - misc fixes and cleanups (Borislav Petkov, Paul Bolle)"
      
      * 'x86-asm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (40 commits)
        scripts/decode_stacktrace.sh: Fix address line detection on x86
        x86/boot/64: Use defines for page size
        x86/dumpstack: Make stack name tags more comprehensible
        selftests/x86: Add test_vdso to test getcpu()
        x86/vdso: Use RDPID in preference to LSL when available
        x86/dumpstack: Handle NULL stack pointer in show_trace_log_lvl()
        x86/cpufeatures: Enable new AVX512 cpu features
        x86/cpuid: Provide get_scattered_cpuid_leaf()
        x86/cpuid: Cleanup cpuid_regs definitions
        x86/copy_user: Unify the code by removing the 64-bit asm _copy_*_user() variants
        x86/unwind: Ensure stack grows down
        x86/vdso: Set vDSO pointer only after success
        x86/prctl/uapi: Remove #ifdef for CHECKPOINT_RESTORE
        x86/unwind: Detect bad stack return address
        x86/dumpstack: Warn on stack recursion
        x86/unwind: Warn on bad frame pointer
        x86/decoder: Use stderr if insn sanity test fails
        x86/decoder: Use stdout if insn decoder test is successful
        mm/page_alloc: Remove kernel address exposure in free_reserved_area()
        x86/dumpstack: Remove raw stack dump
        ...
      5645688f
    • Linus Torvalds's avatar
      Merge branch 'x86-apic-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 4ade5b22
      Linus Torvalds authored
      Pull x86 apic updates from Ingo Molnar:
       "Misc changes:
      
         - optimize (reduce) IRQ handler tracing overhead (Wanpeng Li)
      
         - clean up MSR helpers (Borislav Petkov)
      
         - fix build warning on some configs (Sebastian Andrzej Siewior)"
      
      * 'x86-apic-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/msr: Cleanup/streamline MSR helpers
        x86/apic: Prevent tracing on apic_msr_write_eoi()
        x86/msr: Add wrmsr_notrace()
        x86/apic: Get rid of "warning: 'acpi_ioapic_lock' defined but not used"
      4ade5b22
    • Linus Torvalds's avatar
      Merge branch 'ras-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · df5f0f0a
      Linus Torvalds authored
      Pull x86 RAS updates from Ingo Molnar:
       "The main changes in this development cycle were:
      
         - more AMD northbridge support work, mostly in preparation for Fam17h
           CPUs (Yazen Ghannam, Borislav Petkov)
      
         - cleanups/refactorings and fixes (Borislav Petkov, Tony Luck,
           Yinghai Lu)"
      
      * 'ras-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/mce: Include the PPIN in MCE records when available
        x86/mce/AMD: Add system physical address translation for AMD Fam17h
        x86/amd_nb: Add SMN and Indirect Data Fabric access for AMD Fam17h
        x86/amd_nb: Add Fam17h Data Fabric as "Northbridge"
        x86/amd_nb: Make all exports EXPORT_SYMBOL_GPL
        x86/amd_nb: Make amd_northbridges internal to amd_nb.c
        x86/mce/AMD: Reset Threshold Limit after logging error
        x86/mce/AMD: Fix HWID_MCATYPE calculation by grouping arguments
        x86/MCE: Correct TSC timestamping of error records
        x86/RAS: Hide SMCA bank names
        x86/RAS: Rename smca_bank_names to smca_names
        x86/RAS: Simplify SMCA HWID descriptor struct
        x86/RAS: Simplify SMCA bank descriptor struct
        x86/MCE: Dump MCE to dmesg if no consumers
        x86/RAS: Add TSC timestamp to the injected MCE
        x86/MCE: Do not look at panic_on_oops in the severity grading
      df5f0f0a
    • Linus Torvalds's avatar
      Merge branch 'smp-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · cbaa1576
      Linus Torvalds authored
      Pull hotplug API fix from Ingo Molnar:
       "Late breaking fix from the v4.9 cycle: fix a hotplug register/
        unregister notifier API asymmetry bug that can cause kernel warnings
        (and worse) with certain Kconfig combinations"
      
      * 'smp-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        hotplug: Make register and unregister notifier API symmetric
      cbaa1576
    • Linus Torvalds's avatar
      Merge branch 'sched-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 92c020d0
      Linus Torvalds authored
      Pull scheduler updates from Ingo Molnar:
       "The main scheduler changes in this cycle were:
      
         - support Intel Turbo Boost Max Technology 3.0 (TBM3) by introducig a
           notion of 'better cores', which the scheduler will prefer to
           schedule single threaded workloads on. (Tim Chen, Srinivas
           Pandruvada)
      
         - enhance the handling of asymmetric capacity CPUs further (Morten
           Rasmussen)
      
         - improve/fix load handling when moving tasks between task groups
           (Vincent Guittot)
      
         - simplify and clean up the cputime code (Stanislaw Gruszka)
      
         - improve mass fork()ed task spread a.k.a. hackbench speedup (Vincent
           Guittot)
      
         - make struct kthread kmalloc()ed and related fixes (Oleg Nesterov)
      
         - add uaccess atomicity debugging (when using access_ok() in the
           wrong context), under CONFIG_DEBUG_ATOMIC_SLEEP=y (Peter Zijlstra)
      
         - implement various fixes, cleanups and other enhancements (Daniel
           Bristot de Oliveira, Martin Schwidefsky, Rafael J. Wysocki)"
      
      * 'sched-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (41 commits)
        sched/core: Use load_avg for selecting idlest group
        sched/core: Fix find_idlest_group() for fork
        kthread: Don't abuse kthread_create_on_cpu() in __kthread_create_worker()
        kthread: Don't use to_live_kthread() in kthread_[un]park()
        kthread: Don't use to_live_kthread() in kthread_stop()
        Revert "kthread: Pin the stack via try_get_task_stack()/put_task_stack() in to_live_kthread() function"
        kthread: Make struct kthread kmalloc'ed
        x86/uaccess, sched/preempt: Verify access_ok() context
        sched/x86: Make CONFIG_SCHED_MC_PRIO=y easier to enable
        sched/x86: Change CONFIG_SCHED_ITMT to CONFIG_SCHED_MC_PRIO
        x86/sched: Use #include <linux/mutex.h> instead of #include <asm/mutex.h>
        cpufreq/intel_pstate: Use CPPC to get max performance
        acpi/bus: Set _OSC for diverse core support
        acpi/bus: Enable HWP CPPC objects
        x86/sched: Add SD_ASYM_PACKING flags to x86 ITMT CPU
        x86/sysctl: Add sysctl for ITMT scheduling feature
        x86: Enable Intel Turbo Boost Max Technology 3.0
        x86/topology: Define x86's arch_update_cpu_topology
        sched: Extend scheduler's asym packing
        sched/fair: Clean up the tunable parameter definitions
        ...
      92c020d0
    • Linus Torvalds's avatar
      Merge branch 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · bca13ce4
      Linus Torvalds authored
      Pull perf updates from Ingo Molnar:
       "This update is pretty big and almost exclusively includes tooling
        changes, because v4.9's LTS status forced to completion most of the
        pending kernel side hardware enablement work and because we tried to
        freeze core perf work a bit to give a time window for the fuzzing
        efforts.
      
        The diff is large mostly due to the JSON hardware event tables added
        for Intel and Power8 CPUs. This was a popular feature request from
        people working close to hardware and from the HPC community.
      
        Tree size is big because this added the CPU event tables for over a
        decade of Intel CPUs. Future changes for a CPU vendor alrady support
        should be much smaller, as events for new models are added. The new
        events are listed in 'perf list', for the CPU model the tool is
        running on. If you find an interesting event it can be used as-is:
      
            $ perf stat -a -e l2_lines_out.pf_clean sleep 1
      
            Performance counter stats for 'system wide':
      
                  7,860,403      l2_lines_out.pf_clean
      
                 1.000624918 seconds time elapsed
      
        The event lists can be searched the usual 'perf list' fashion for
        (case insensitive) substrings as well:
      
            $ perf list l2_lines_out
      
            List of pre-defined events (to be used in -e):
      
            cache:
              l2_lines_out.demand_clean
                   [Clean L2 cache lines evicted by demand]
              l2_lines_out.demand_dirty
                   [Dirty L2 cache lines evicted by demand]
              l2_lines_out.dirty_all
                   [Dirty L2 cache lines filling the L2]
              l2_lines_out.pf_clean
                   [Clean L2 cache lines evicted by L2 prefetch]
              l2_lines_out.pf_dirty
                   [Dirty L2 cache lines evicted by L2 prefetch]
      
        etc.
      
        There's a few high level categories as well that can be listed:
        'cache', 'floating point', 'frontend', 'memory', 'pipeline', 'virtual
        memory'.
      
        Existing generic events and workflows should work as-is.
      
        The only kernel side change is a late breaking fix for an older
        regression, related to Intel BTS, LBR and PT feature interaction.
      
        On the tooling side there are three new tools / major features:
      
         - The new 'perf c2c' tool provides means for Shared Data C2C/HITM
           analysis.
      
           This allows you to track down cacheline contention. The tool is
           based on x86's load latency and precise store facility events
           provided by Intel CPUs.
      
           It was tested by Joe Mario and has proven to be useful, finding
           some cacheline contentions. Joe also wrote a blog about c2c tool
           with examples:
      
              https://joemario.github.io/blog/2016/09/01/c2c-blog/
      
           excerpt of the content on this site:
      
               At a high level, “perf c2c” will show you:
      
                * The cachelines where false sharing was detected.
                * The readers and writers to those cachelines, and the offsets where those accesses occurred.
                * The pid, tid, instruction addr, function name, binary object name for those readers and writers.
                * The source file and line number for each reader and writer.
                * The average load latency for the loads to those cachelines.
                * Which numa nodes the samples a cacheline came from and which CPUs were involved.
      
               Using perf c2c is similar to using the Linux perf tool today.
               First collect data with “perf c2c record”, then generate a
               report output with “perf c2c report”
      
           There one finds extensive details on using the tool, with tips on
           reducing the volume of samples while still capturing enough to do
           its job. (Dick Fowles, Joe Mario, Don Zickus, Jiri Olsa)
      
         - The new 'perf sched timehist' tool provides tailored analysis of
           scheduling events.
      
           Example usage:
      
                perf sched record -- sleep 1
                perf sched timehist
      
           By default it shows the individual schedule events, including the
           wait time (time between sched-out and next sched-in events for the
           task), the task scheduling delay (time between wakeup and actually
           running) and run time for the task:
      
                  time    cpu  task name         wait time  sch delay  run time
                               [tid/pid]            (msec)     (msec)    (msec)
              -------- ------  ----------------  ---------  ---------  --------
              1.874569 [0011]  gcc[31949]            0.014      0.000     1.148
              1.874591 [0010]  gcc[31951]            0.000      0.000     0.024
              1.874603 [0010]  migration/10[59]      3.350      0.004     0.011
              1.874604 [0011]  <idle>                1.148      0.000     0.035
              1.874723 [0005]  <idle>                0.016      0.000     1.383
              1.874746 [0005]  gcc[31949]            0.153      0.078     0.022
            ...
      
           Times are in msec.usec. (David Ahern, Namhyung Kim)
      
         - Add CPU vendor hardware event tables:
      
           Add JSON files with vendor event naming for Intel and Power8
           processors, allowing users of tools like oprofile to keep using the
           event names they are used to, as well as people reading vendor
           documentation, where such naming is used. (Andi Kleen, Sukadev
           Bhattiprolu)
      
           You should see all the new events with 'perf list' and you should
           be able to search them, for example 'perf list miss' will list all
           the myriads of miss events.
      
        Other tooling features added were:
      
         - Cross-arch annotation support:
      
           o Improve ARM support in the annotation code, affecting 'perf
             annotate', 'perf report' and live annotation in 'perf top' (Kim
             Phillips)
      
           o Initial support for PowerPC in the annotation code (Ravi
             Bangoria)
      
           o Support AArch64 in the 'annotate' code, native/local and
             cross-arch/remote (Kim Phillips)
      
         - Allow considering just events in a given time interval, via the
           '--time start.s.ms,end.s.ms' command line, added to 'perf kmem',
           'perf report', 'perf sched timehist' and 'perf script' (David
           Ahern)
      
         - Add option to stop printing a callchain at one of a given group of
           symbol names (David Ahern)
      
         - Track memory freed in 'perf kmem stat' (David Ahern)
      
         - Allow querying and setting .perfconfig variables (Taeung Song)
      
         - Show branch information in callchains (predicted, TSX aborts, loop
           iteractions, etc) (Jin Yao)
      
         - Dynamicly change verbosity level by pressing 'V' in the 'perf
           top/report' hists TUI browser (Alexis Berlemont)
      
         - Implement 'perf trace --delay' in the same fashion as in 'perf
           record --delay', to skip sampling workload initialization events
           (Alexis Berlemont)
      
         - Make vendor named events case insensitive in 'perf list', i.e.
           'perf list LONGEST_LAT' works just the same as 'perf list
           longest_lat' (Andi Kleen)
      
         - Add unwinding support for jitdump (Stefano Sanfilippo)
      
        Tooling infrastructure changes:
      
         - Support linking perf with clang and LLVM libraries, initially
           statically, but this limitation will be lifted and shared
           libraries, when available, will be preferred to the static build,
           that should, as with other features, be enabled explicitly (Wang
           Nan)
      
         - Add initial support (and perf test entry) for tooling hooks,
           starting with 'record_start' and 'record_end', that will have as
           its initial user the eBPF infrastructure, where perf_ prefixed
           functions will be JITed and run when such hooks are called (Wang
           Nan)
      
         - Implement assorted libbpf improvements (Wang Nan)"
      
        ... and lots of other changes, features, cleanups and refactorings I
        did not list, see the shortlog and the git log for details"
      
      * 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (220 commits)
        perf/x86: Fix exclusion of BTS and LBR for Goldmont
        perf tools: Explicitly document that --children is enabled by default
        perf sched timehist: Cleanup idle_max_cpu handling
        perf sched timehist: Handle zero sample->tid properly
        perf callchain: Introduce callchain_cursor__copy()
        perf sched: Cleanup option processing
        perf sched timehist: Improve error message when analyzing wrong file
        perf tools: Move perf build related variables under non fixdep leg
        perf tools: Force fixdep compilation at the start of the build
        perf tools: Move PERF-VERSION-FILE target into rules area
        perf build: Check LLVM version in feature check
        perf annotate: Show raw form for jump instruction with indirect target
        perf tools: Add non config targets
        perf tools: Cleanup build directory before each test
        perf tools: Move python/perf.so target into rules area
        perf tools: Move install-gtk target into rules area
        tools build: Move tabs to spaces where suitable
        tools build: Make the .cmd file more readable
        perf clang: Compile BPF script using builtin clang support
        perf clang: Support compile IR to BPF object and add testcase
        ...
      bca13ce4
    • Linus Torvalds's avatar
      Merge branch 'mm-pat-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 0719dbf5
      Linus Torvalds authored
      Pull mm/PAT cleanup from Ingo Molnar:
       "A single cleanup for a generic interface that was originally
        introduced for PAT"
      
      * 'mm-pat-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/pat, mm: Make track_pfn_insert() return void
      0719dbf5
    • Linus Torvalds's avatar
      Merge branch 'locking-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 6cdf89b1
      Linus Torvalds authored
      Pull locking updates from Ingo Molnar:
       "The tree got pretty big in this development cycle, but the net effect
        is pretty good:
      
          115 files changed, 673 insertions(+), 1522 deletions(-)
      
        The main changes were:
      
         - Rework and generalize the mutex code to remove per arch mutex
           primitives. (Peter Zijlstra)
      
         - Add vCPU preemption support: add an interface to query the
           preemption status of vCPUs and use it in locking primitives - this
           optimizes paravirt performance. (Pan Xinhui, Juergen Gross,
           Christian Borntraeger)
      
         - Introduce cpu_relax_yield() and remov cpu_relax_lowlatency() to
           clean up and improve the s390 lock yielding machinery and its core
           kernel impact. (Christian Borntraeger)
      
         - Micro-optimize mutexes some more. (Waiman Long)
      
         - Reluctantly add the to-be-deprecated mutex_trylock_recursive()
           interface on a temporary basis, to give the DRM code more time to
           get rid of its locking hacks. Any other users will be NAK-ed on
           sight. (We turned off the deprecation warning for the time being to
           not pollute the build log.) (Peter Zijlstra)
      
         - Improve the rtmutex code a bit, in light of recent long lived
           bugs/races. (Thomas Gleixner)
      
         - Misc fixes, cleanups"
      
      * 'locking-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (36 commits)
        x86/paravirt: Fix bool return type for PVOP_CALL()
        x86/paravirt: Fix native_patch()
        locking/ww_mutex: Use relaxed atomics
        locking/rtmutex: Explain locking rules for rt_mutex_proxy_unlock()/init_proxy_locked()
        locking/rtmutex: Get rid of RT_MUTEX_OWNER_MASKALL
        x86/paravirt: Optimize native pv_lock_ops.vcpu_is_preempted()
        locking/mutex: Break out of expensive busy-loop on {mutex,rwsem}_spin_on_owner() when owner vCPU is preempted
        locking/osq: Break out of spin-wait busy waiting loop for a preempted vCPU in osq_lock()
        Documentation/virtual/kvm: Support the vCPU preemption check
        x86/xen: Support the vCPU preemption check
        x86/kvm: Support the vCPU preemption check
        x86/kvm: Support the vCPU preemption check
        kvm: Introduce kvm_write_guest_offset_cached()
        locking/core, x86/paravirt: Implement vcpu_is_preempted(cpu) for KVM and Xen guests
        locking/spinlocks, s390: Implement vcpu_is_preempted(cpu)
        locking/core, powerpc: Implement vcpu_is_preempted(cpu)
        sched/core: Introduce the vcpu_is_preempted(cpu) interface
        sched/wake_q: Rename WAKE_Q to DEFINE_WAKE_Q
        locking/core: Provide common cpu_relax_yield() definition
        locking/mutex: Don't mark mutex_trylock_recursive() as deprecated, temporarily
        ...
      6cdf89b1
    • Linus Torvalds's avatar
      Merge branch 'efi-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 3940cf0b
      Linus Torvalds authored
      Pull EFI updates from Ingo Molnar:
       "The main changes in this development cycle were:
      
         - Implement EFI dev path parser and other changes to fully support
           thunderbolt devices on Apple Macbooks (Lukas Wunner)
      
         - Add RNG seeding via the EFI stub, on ARM/arm64 (Ard Biesheuvel)
      
         - Expose EFI framebuffer configuration to user-space, to improve
           tooling (Peter Jones)
      
         - Misc fixes and cleanups (Ivan Hu, Wei Yongjun, Yisheng Xie, Dan
           Carpenter, Roy Franz)"
      
      * 'efi-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        efi/libstub: Make efi_random_alloc() allocate below 4 GB on 32-bit
        thunderbolt: Compile on x86 only
        thunderbolt, efi: Fix Kconfig dependencies harder
        thunderbolt, efi: Fix Kconfig dependencies
        thunderbolt: Use Device ROM retrieved from EFI
        x86/efi: Retrieve and assign Apple device properties
        efi: Allow bitness-agnostic protocol calls
        efi: Add device path parser
        efi/arm*/libstub: Invoke EFI_RNG_PROTOCOL to seed the UEFI RNG table
        efi/libstub: Add random.c to ARM build
        efi: Add support for seeding the RNG from a UEFI config table
        MAINTAINERS: Add ARM and arm64 EFI specific files to EFI subsystem
        efi/libstub: Fix allocation size calculations
        efi/efivar_ssdt_load: Don't return success on allocation failure
        efifb: Show framebuffer layout as device attributes
        efi/efi_test: Use memdup_user() as a cleanup
        efi/efi_test: Fix uninitialized variable 'rv'
        efi/efi_test: Fix uninitialized variable 'datasize'
        efi/arm*: Fix efi_init() error handling
        efi: Remove unused include of <linux/version.h>
      3940cf0b
    • Linus Torvalds's avatar
      Merge branch 'core-smp-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 9ad1aeec
      Linus Torvalds authored
      Pull SMP bootup updates from Ingo Molnar:
       "Three changes to unify/standardize some of the bootup message printing
        in kernel/smp.c between architectures"
      
      * 'core-smp-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        kernel/smp: Tell the user we're bringing up secondary CPUs
        kernel/smp: Make the SMP boot message common on all arches
        kernel/smp: Define pr_fmt() for smp.c
      9ad1aeec
    • Linus Torvalds's avatar
      Merge branch 'core-rcu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 718c0ddd
      Linus Torvalds authored
      Pull RCU updates from Ingo Molnar:
       "The main RCU changes in this development cycle were:
      
         - Miscellaneous fixes, including a change to call_rcu()'s rcu_head
           alignment check.
      
         - Security-motivated list consistency checks, which are disabled by
           default behind DEBUG_LIST.
      
         - Torture-test updates.
      
         - Documentation updates, yet again just simple changes"
      
      * 'core-rcu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        torture: Prevent jitter from delaying build-only runs
        torture: Remove obsolete files from rcutorture .gitignore
        rcu: Don't kick unless grace period or request
        rcu: Make expedited grace periods recheck dyntick idle state
        torture: Trace long read-side delays
        rcu: RCU_TRACE enables event tracing as well as debugfs
        rcu: Remove obsolete comment from __call_rcu()
        rcu: Remove obsolete rcu_check_callbacks() header comment
        rcu: Tighten up __call_rcu() rcu_head alignment check
        Documentation/RCU: Fix minor typo
        documentation: Present updated RCU guarantee
        bug: Avoid Kconfig warning for BUG_ON_DATA_CORRUPTION
        lib/Kconfig.debug: Fix typo in select statement
        lkdtm: Add tests for struct list corruption
        bug: Provide toggle for BUG on data corruption
        list: Split list_del() debug checking into separate function
        rculist: Consolidate DEBUG_LIST for list_add_rcu()
        list: Split list_add() debug checking into separate function
      718c0ddd
    • Linus Torvalds's avatar
      Merge tag 'cris-for-4.10' of git://git.kernel.org/pub/scm/linux/kernel/git/jesper/cris · 8fa3b6f9
      Linus Torvalds authored
      Pull CRIS updates from Jesper Nilsson:
       "Three patches for minor issues"
      
      * tag 'cris-for-4.10' of git://git.kernel.org/pub/scm/linux/kernel/git/jesper/cris:
        cris: No need to append -O2 and $(LINUXINCLUDE)
        tty: serial: make crisv10 explicitly non-modular
        cris: Only build flash rescue image if CONFIG_ETRAX_AXISFLASHMAP is selected
      8fa3b6f9
    • Linus Torvalds's avatar
      Merge tag 'openrisc-for-linus' of git://github.com/openrisc/linux · 56e9461a
      Linus Torvalds authored
      Pull Openrisc updates from Stafford Horne:
      
       - changes to MAINTAINER for openrisc
      
       - probably biggest actual change is the move to memblock from bootmem
      
       - ... plus several bug and build fixes
      
      * tag 'openrisc-for-linus' of git://github.com/openrisc/linux:
        openrisc: prevent VGA console, fix builds
        openrisc: include l.swa in check for write data pagefault
        openrisc: Updates after openrisc.net has been lost
        openrisc: Consolidate setup to use memblock instead of bootmem
        openrisc: remove the redundant of_platform_populate
        openrisc: add NR_CPUS Kconfig default value
        openrisc: Support both old (or32) and new (or1k) toolchain
        openrisc: Add thread-local storage (TLS) support
        openrisc: restore all regs on rt_sigreturn
        openrisc: fix PTRS_PER_PGD define
      56e9461a
    • Linus Torvalds's avatar
      Merge tag 'm68k-for-v4.10-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k · 709c12e3
      Linus Torvalds authored
      Pull m68k updates from Geert Uytterhoeven:
       "Use seq_puts() for fixed strings"
      
      * tag 'm68k-for-v4.10-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k:
        m68k/atari: Use seq_puts() in atari_get_hardware_list()
        m68k/amiga: Use seq_puts() in amiga_get_hardware_list()
      709c12e3
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/egtvedt/linux-avr32 · 669bb4c5
      Linus Torvalds authored
      Pull AVR32 updates from Hans-Christian Noren Egtvedt.
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/egtvedt/linux-avr32:
        avr32: wire up pkey syscalls
        AVR32-pio: Replace two seq_printf() calls by seq_puts() in pio_bank_show()
        AVR32-pio: Use seq_putc() in pio_bank_show()
        AVR32-clock: Combine nine seq_printf() calls into one call in clk_show()
        AVR32-clock: Use seq_putc() in two functions
      669bb4c5
    • Linus Torvalds's avatar
      Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu · 0261b5d3
      Linus Torvalds authored
      Pull m68knommu updates from Greg Ungerer:
       "There are two sets of changes in this pull.
      
        The largest is the addition of the ColdFire platform side i2c support
        (the IO addressing, setup and clock definitions). The i2c hardware
        module itself is driven by the kernels existing iMX i2c driver.
      
        The other change is the addition of support for the Amcore board"
      
      * 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu:
        m68knommu: AMCORE board, add iMX i2c support
        m68k: add Sysam AMCORE open board support
        m68knommu: platform support for i2c devices on ColdFire SoC
      0261b5d3
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc · 067d14f0
      Linus Torvalds authored
      Pull sparc updates from David Miller:
       "Just a bunch of small cleanups and fixes here, and support for user
        probes from Allen Pais"
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc:
        sparc: fix a building error reported by kbuild
        sparc64: fix typo in pgd_clear()
        sparc64: restore irq in error paths in iommu
        sparc: leon: Fix a retry loop in leon_init_timers()
        sparc64: make string buffers large enough
        sparc64: move dereference after check for NULL
        sparc: kernel: use builtin_platform_driver
        sparc64:Support User Probes for sparc
      067d14f0
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next · ce38aa9c
      Linus Torvalds authored
      Pull networking updates from David Miller:
      
       1) Platform regulatory domain support for ath10k, from Bartosz
          Markowski.
      
       2) Centralize min/max MTU checking, thus removing tons of duplicated
          code all of the the various drivers. From Jarod Wilson.
      
       3) Support ingress actions in act_mirred, from Shmulik Ladkani.
      
       4) Improve device adjacency tracking, from David Ahern.
      
       5) Add support for LED triggers on PHY link state changes, from Zach
          Brown.
      
       6) Improve UDP socket memory accounting, from Paolo Abeni.
      
       7) Set SK_MEM_QUANTUM to a fixed size of 4096, instead of PAGE_SIZE.
          From Eric Dumazet.
      
       8) Collapse TCP SKBs at retransmit time even if the right side SKB has
          frags. Also from Eric Dumazet.
      
       9) Add IP_RECVFRAGSIZE and IPV6_RECVFRAGSIZE cmsgs, from Willem de
          Bruijn.
      
      10) Support routing by UID, from Lorenzo Colitti.
      
      11) Handle L3 domain binding (ie. VRF) for RAW sockets, from David
          Ahern.
      
      12) tcp_get_info() can run lockless, from Eric Dumazet.
      
      13) 4-tuple UDP hashing in SFC driver, from Edward Cree.
      
      14) Avoid reorders in GRO code, from Eric Dumazet.
      
      15) IPV6 Segment Routing support, from David Lebrun.
      
      16) Support MPLS push and pop for L3 packets in openvswitch, from Jiri
          Benc.
      
      17) Add LRU datastructure support for BPF, Martin KaFai Lau.
      
      18) VF support in liquidio driver, from Raghu Vatsavayi.
      
      19) Multiqueue support in alx driver, from Tobias Regnery.
      
      20) Networking cgroup BPF support, from Daniel Mack.
      
      21) TCP chronograph measurements, from Francis Yan.
      
      22) XDP support for qed driver, from Yuval Mintz.
      
      23) BPF based lwtunnels, from Thomas Graf.
      
      24) Consistent FIB dumping to offloading drivers, from Ido Schimmel.
      
      25) Many optimizations for UDP under high load, from Eric Dumazet.
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next: (1522 commits)
        netfilter: nft_counter: rework atomic dump and reset
        e1000: use disable_hardirq() for e1000_netpoll()
        i40e: don't truncate match_method assignment
        net: ethernet: ti: netcp: add support of cpts
        net: phy: phy drivers should not set SUPPORTED_[Asym_]Pause
        net: l2tp: ppp: change PPPOL2TP_MSG_* => L2TP_MSG_*
        net: l2tp: deprecate PPPOL2TP_MSG_* in favour of L2TP_MSG_*
        net: l2tp: export debug flags to UAPI
        net: ethernet: stmmac: remove private tx queue lock
        net: ethernet: sxgbe: remove private tx queue lock
        net: bridge: shorten ageing time on topology change
        net: bridge: add helper to set topology change
        net: bridge: add helper to offload ageing time
        net: nicvf: use new api ethtool_{get|set}_link_ksettings
        net: ethernet: ti: cpsw: sync rates for channels in dual emac mode
        net: ethernet: ti: cpsw: re-split res only when speed is changed
        net: ethernet: ti: cpsw: combine budget and weight split and check
        net: ethernet: ti: cpsw: don't start queue twice
        net: ethernet: ti: cpsw: use same macros to get active slave
        net: mvneta: select GENERIC_ALLOCATOR
        ...
      ce38aa9c
    • Randy Dunlap's avatar
      openrisc: prevent VGA console, fix builds · 7c7808ce
      Randy Dunlap authored
      OpenRISC does not support VGA console, so prevent that kconfig symbol
      from being enabled for OpenRISC, thus fixing these build errors:
      
         drivers/built-in.o: In function `vgacon_save_screen':
         vgacon.c:(.text+0x20e0): undefined reference to `screen_info'
         vgacon.c:(.text+0x20e8): undefined reference to `screen_info'
         drivers/built-in.o: In function `vgacon_init':
         vgacon.c:(.text+0x284c): undefined reference to `screen_info'
         vgacon.c:(.text+0x2850): undefined reference to `screen_info'
         drivers/built-in.o: In function `vgacon_startup':
         vgacon.c:(.text+0x28d8): undefined reference to `screen_info'
         drivers/built-in.o:vgacon.c:(.text+0x28f0): more undefined references to `screen_info' follow
      Signed-off-by: default avatarRandy Dunlap <rdunlap@infradead.org>
      Reported-by: default avatarkbuild test robot <fengguang.wu@intel.com>
      Cc: Chen Gang <gang.chen@asianux.com>
      Cc: Jonas Bonn <jonas@southpole.se>
      Signed-off-by: default avatarStafford Horne <shorne@gmail.com>
      7c7808ce
    • Stefan Kristiansson's avatar
      openrisc: include l.swa in check for write data pagefault · cdb75442
      Stefan Kristiansson authored
      During page fault handling we check the last instruction to understand
      if the fault was for a read or for a write.  By default we fall back to
      read.  New instructions were added to the openrisc 1.1 spec for an
      atomic load/store pair (l.lwa/l.swa).
      
      This patch adds the opcode for l.swa (0x33) allowing it to be treated as
      a write operation.
      Signed-off-by: default avatarStefan Kristiansson <stefan.kristiansson@saunalahti.fi>
      [shorne@gmail.com: expanded a bit on the comment]
      Signed-off-by: default avatarStafford Horne <shorne@gmail.com>
      cdb75442
    • Stafford Horne's avatar
      openrisc: Updates after openrisc.net has been lost · d01e1f35
      Stafford Horne authored
      The openrisc.net domain expired and was taken over by squatters.
      These updates point documentation to the new domain, mailing lists
      and git repos.
      
      Also, Jonas is not the main maintainer anylonger, he reviews changes
      but does not maintain a repo or sent pull requests.  Updating this to
      add Stafford and Stefan who are the active maintainers.
      Acked-by: default avatarOlof Kindgren <olof.kindgren@gmail.com>
      Signed-off-by: default avatarStafford Horne <shorne@gmail.com>
      d01e1f35
    • Stafford Horne's avatar
      openrisc: Consolidate setup to use memblock instead of bootmem · 266c7fad
      Stafford Horne authored
      Clearing out one todo item. Use the memblock boot time memory
      which is the current standard.
      Tested-by: default avatarGuenter Roeck <linux@roeck-us.net>
      Acked-by: default avatarJonas <jonas@southpole.se>
      Signed-off-by: default avatarStafford Horne <shorne@gmail.com>
      266c7fad
    • Rob Herring's avatar
      openrisc: remove the redundant of_platform_populate · 994894c3
      Rob Herring authored
      The of_platform_populate call in the openrisc arch code is now redundant
      as the DT core provides a default call. Openrisc has a NULL match table
      which means only top level nodes with compatible strings will have
      devices creates. The default version will also descend nodes in the
      match table such as "simple-bus" which should be fine as openrisc
      doesn't have any of these (though it is preferred that memory-mapped
      peripherals be grouped under a bus node(s)).
      Signed-off-by: default avatarRob Herring <robh@kernel.org>
      Cc: Jonas Bonn <jonas@southpole.se>
      Tested-by: default avatarGuenter Roeck <linux@roeck-us.net>
      Signed-off-by: default avatarStafford Horne <shorne@gmail.com>
      994894c3
    • Stafford Horne's avatar
      openrisc: add NR_CPUS Kconfig default value · 34bbdcdc
      Stafford Horne authored
      The build system now expects that NR_CPUS is defined.
      
      Follow 4cbbbb43 ("microblaze: Fix missing NR_CPUS in menuconfig")
      Signed-off-by: default avatarStafford Horne <shorne@gmail.com>
      34bbdcdc
    • Guenter Roeck's avatar
      openrisc: Support both old (or32) and new (or1k) toolchain · 1f43e235
      Guenter Roeck authored
      The output file format for or1k has changed from "elf32-or32"
      to "elf32-or1k". Select the correct output format automatically
      to be able to compile the kernel with both toolchain variants.
      Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
      Tested-by: default avatarGuenter Roeck <linux@roeck-us.net>
      Signed-off-by: default avatarStafford Horne <shorne@gmail.com>
      1f43e235
    • Christian Svensson's avatar
      openrisc: Add thread-local storage (TLS) support · e60aa2fb
      Christian Svensson authored
      Historically OpenRISC GCC has reserved r10 which we now use to hold
      the thread pointer for thread-local storage (TLS).
      Signed-off-by: default avatarChristian Svensson <blue@cmd.nu>
      Signed-off-by: default avatarStefan Kristiansson <stefan.kristiansson@saunalahti.fi>
      Tested-by: default avatarGuenter Roeck <linux@roeck-us.net>
      Signed-off-by: default avatarStafford Horne <shorne@gmail.com>
      e60aa2fb
    • Jonas Bonn's avatar
      openrisc: restore all regs on rt_sigreturn · c7990219
      Jonas Bonn authored
      Fix signal handling for when signals are handled as the result of timers
      or exceptions, previous code assumed syscalls. This was noticeable with X
      crashing where it uses SIGALRM.
      
      This patch restores all regs before returning to userspace via
      _resume_userspace instead of via syscall return path.
      
      The rt_sigreturn syscall is more like a context switch than a function
      call; it entails a return from one context (the signal handler) to another
      (the process in question).  For a context switch like this there are
      effectively no call-saved regs that remain constant across the transition.
      Reported-by: default avatarSebastian Macke <sebastian@macke.de>
      Signed-off-by: default avatarJonas Bonn <jonas@southpole.se>
      Tested-by: default avatarGuenter Roeck <linux@roeck-us.net>
      [shorne@gmail.com: Updated comment better reflect change and issue]
      Signed-off-by: default avatarStafford Horne <shorne@gmail.com>
      c7990219
    • Stefan Kristiansson's avatar
      openrisc: fix PTRS_PER_PGD define · f4770609
      Stefan Kristiansson authored
      On OpenRISC, with its 8k pages, PAGE_SHIFT is defined to be 13.
      That makes the expression (1UL << (PAGE_SHIFT-2)) evaluate
      to 2048.
      The correct value for PTRS_PER_PGD should be 256.
      
      Correcting the PTRS_PER_PGD define unveiled a bug in map_ram(),
      where PTRS_PER_PGD was used when the intent was to iterate
      over a set of page table entries.
      This patch corrects that issue as well.
      Signed-off-by: default avatarStefan Kristiansson <stefan.kristiansson@saunalahti.fi>
      Acked-by: default avatarJonas Bonn <jonas@southpole.se>
      Tested-by: default avatarGuenter Roeck <linux@roeck-us.net>
      Signed-off-by: default avatarStafford Horne <shorne@gmail.com>
      f4770609
    • Hans-Christian Noren Egtvedt's avatar
      avr32: wire up pkey syscalls · 8712a5b8
      Hans-Christian Noren Egtvedt authored
      This patch wires up the new pkey_mprotect, pkey_alloc and pkey_free syscalls on
      AVR32.
      8712a5b8
    • Markus Elfring's avatar
      AVR32-pio: Replace two seq_printf() calls by seq_puts() in pio_bank_show() · 79ba1814
      Markus Elfring authored
      Strings which did not contain data format specifications should be put
      into a sequence. Thus use the corresponding function "seq_puts".
      
      This issue was detected by using the Coccinelle software.
      Signed-off-by: default avatarMarkus Elfring <elfring@users.sourceforge.net>
      79ba1814
    • Markus Elfring's avatar
      AVR32-pio: Use seq_putc() in pio_bank_show() · 78b7c6bf
      Markus Elfring authored
      A single character (line break) should be put into a sequence.
      Thus use the corresponding function "seq_putc".
      
      This issue was detected by using the Coccinelle software.
      Signed-off-by: default avatarMarkus Elfring <elfring@users.sourceforge.net>
      78b7c6bf
    • Markus Elfring's avatar
      AVR32-clock: Combine nine seq_printf() calls into one call in clk_show() · 017e7d02
      Markus Elfring authored
      Some data were printed into a sequence by nine separate function calls.
      Print the same data by a single function call instead.
      Signed-off-by: default avatarMarkus Elfring <elfring@users.sourceforge.net>
      017e7d02
    • Markus Elfring's avatar
      AVR32-clock: Use seq_putc() in two functions · 65c0787c
      Markus Elfring authored
      A single character (line break) should be put into two sequences.
      Thus use the corresponding function "seq_putc".
      
      This issue was detected by using the Coccinelle software.
      Signed-off-by: default avatarMarkus Elfring <elfring@users.sourceforge.net>
      65c0787c
    • Gonglei \(Arei\)'s avatar
      sparc: fix a building error reported by kbuild · 541cc394
      Gonglei \(Arei\) authored
      >> arch/sparc/include/asm/topology_64.h:44:44:
      error: implicit declaration of function 'cpu_data'
      [-Werror=implicit-function-declaration]
      
       #define topology_physical_package_id(cpu) (cpu_data(cpu).proc_id)
                                                     ^
      Let's include cpudata.h in topology_64.h.
      
      Cc: Sam Ravnborg <sam@ravnborg.org>
      Cc: David S. Miller <davem@davemloft.net>
      Cc: sparclinux@vger.kernel.org
      Suggested-by: default avatarSam Ravnborg <sam@ravnborg.org>
      Signed-off-by: default avatarGonglei <arei.gonglei@huawei.com>
      Acked-by: default avatarSam Ravnborg <sam@ravnborg.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      541cc394
    • Kirill A. Shutemov's avatar
      sparc64: fix typo in pgd_clear() · acff7fdb
      Kirill A. Shutemov authored
      It really has to be pgdp, not pgd.
      
      It just happend to work since all callers have 'pgd' as an argument.
      Signed-off-by: default avatarKirill A. Shutemov <kirill.shutemov@linux.intel.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      acff7fdb
    • Dan Carpenter's avatar
      sparc64: restore irq in error paths in iommu · e241cfd3
      Dan Carpenter authored
      There are some error paths where we should restore IRQs but we don't.
      
      Fixes: bb620c3d ("sparc: Make sparc64 use scalable lib/iommu-common.c functions")
      Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e241cfd3
    • Dan Carpenter's avatar
      sparc: leon: Fix a retry loop in leon_init_timers() · 601e6e3c
      Dan Carpenter authored
      The original code causes a static checker warning because it has a
      continue inside a do { } while (0); loop.  In that context, a continue
      and a break are equivalent.  The intent was to go back to the start of
      the loop so the continue was a bug.
      
      I've added a retry label at the start and changed the continue to a goto
      retry.  Then I removed the do { } while (0) loop and pulled the code in
      one indent level.
      
      Fixes: 2791c1a4 ("SPARC/LEON: added support for selecting Timer Core and Timer within core")
      Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      601e6e3c
    • Dan Carpenter's avatar
      sparc64: make string buffers large enough · b5c32061
      Dan Carpenter authored
      My static checker complains that if "lvl" is ULONG_MAX (this is 64 bit)
      then some of the strings will overflow.  I don't know if that's possible
      but it seems simple enough to make the buffers slightly larger.
      Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      b5c32061
    • Dan Carpenter's avatar
      sparc64: move dereference after check for NULL · efca4885
      Dan Carpenter authored
      We shouldn't dereference "iommu" until after we have checked that it is
      non-NULL.
      
      Fixes: f08978b0 ("sparc64: Enable sun4v dma ops to use IOMMU v2 APIs")
      Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      efca4885