1. 08 May, 2017 2 commits
    • Xunlei Pang's avatar
      x86/kexec/64: Use gbpages for identity mappings if available · 8638100c
      Xunlei Pang authored
      Kexec sets up all identity mappings before booting into the new
      kernel, and this will cause extra memory consumption for paging
      structures which is quite considerable on modern machines with
      huge memory sizes.
      
      E.g. on a 32TB machine that is kdumping, it could waste around
      128MB (around 4MB/TB) from the reserved memory after kexec sets
      all the identity mappings using the current 2MB page.
      
      Add to that the memory needed for the loaded kdump kernel, initramfs,
      etc., and it causes a kexec syscall -NOMEM failure.
      
      As a result, we had to enlarge reserved memory via "crashkernel=X"
      to work around this problem.
      
      This causes some trouble for distributions that use policies
      to evaluate the proper "crashkernel=X" value for users.
      
      So enable gbpages for kexec mappings.
      Signed-off-by: default avatarXunlei Pang <xlpang@redhat.com>
      Cc: Andy Lutomirski <luto@kernel.org>
      Cc: Borislav Petkov <bp@alien8.de>
      Cc: Brian Gerst <brgerst@gmail.com>
      Cc: Dave Young <dyoung@redhat.com>
      Cc: Denys Vlasenko <dvlasenk@redhat.com>
      Cc: Eric Biederman <ebiederm@xmission.com>
      Cc: H. Peter Anvin <hpa@zytor.com>
      Cc: Josh Poimboeuf <jpoimboe@redhat.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Yinghai Lu <yinghai@kernel.org>
      Cc: akpm@linux-foundation.org
      Cc: kexec@lists.infradead.org
      Link: http://lkml.kernel.org/r/1493862171-8799-2-git-send-email-xlpang@redhat.comSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
      8638100c
    • Xunlei Pang's avatar
      x86/mm: Add support for gbpages to kernel_ident_mapping_init() · 66aad4fd
      Xunlei Pang authored
      Kernel identity mappings on x86-64 kernels are created in two
      ways: by the early x86 boot code, or by kernel_ident_mapping_init().
      
      Native kernels (which is the dominant usecase) use the former,
      but the kexec and the hibernation code uses kernel_ident_mapping_init().
      
      There's a subtle difference between these two ways of how identity
      mappings are created, the current kernel_ident_mapping_init() code
      creates identity mappings always using 2MB page(PMD level) - while
      the native kernel boot path also utilizes gbpages where available.
      
      This difference is suboptimal both for performance and for memory
      usage: kernel_ident_mapping_init() needs to allocate pages for the
      page tables when creating the new identity mappings.
      
      This patch adds 1GB page(PUD level) support to kernel_ident_mapping_init()
      to address these concerns.
      
      The primary advantage would be better TLB coverage/performance,
      because we'd utilize 1GB TLBs instead of 2MB ones.
      
      It is also useful for machines with large number of memory to
      save paging structure allocations(around 4MB/TB using 2MB page)
      when setting identity mappings for all the memory, after using
      1GB page it will consume only 8KB/TB.
      
      ( Note that this change alone does not activate gbpages in kexec,
        we are doing that in a separate patch. )
      Signed-off-by: default avatarXunlei Pang <xlpang@redhat.com>
      Cc: Andy Lutomirski <luto@kernel.org>
      Cc: Borislav Petkov <bp@alien8.de>
      Cc: Brian Gerst <brgerst@gmail.com>
      Cc: Dave Young <dyoung@redhat.com>
      Cc: Denys Vlasenko <dvlasenk@redhat.com>
      Cc: Eric Biederman <ebiederm@xmission.com>
      Cc: H. Peter Anvin <hpa@zytor.com>
      Cc: Josh Poimboeuf <jpoimboe@redhat.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Yinghai Lu <yinghai@kernel.org>
      Cc: akpm@linux-foundation.org
      Cc: kexec@lists.infradead.org
      Link: http://lkml.kernel.org/r/1493862171-8799-1-git-send-email-xlpang@redhat.comSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
      66aad4fd
  2. 07 May, 2017 1 commit
    • Kees Cook's avatar
      x86/boot: Declare error() as noreturn · 60854a12
      Kees Cook authored
      The compressed boot function error() is used to halt execution, but it
      wasn't marked with "noreturn". This fixes that in preparation for
      supporting kernel FORTIFY_SOURCE, which uses the noreturn annotation
      on panic, and calls error(). GCC would warn about a noreturn function
      calling a non-noreturn function:
      
        arch/x86/boot/compressed/misc.c: In function ‘fortify_panic’:
        arch/x86/boot/compressed/misc.c:416:1: warning: ‘noreturn’ function does return
         }
       ^
      Signed-off-by: default avatarKees Cook <keescook@chromium.org>
      Cc: Daniel Micay <danielmicay@gmail.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: H. Peter Anvin <hpa@zytor.com>
      Link: http://lkml.kernel.org/r/20170506045116.GA2879@beastSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
      60854a12
  3. 05 May, 2017 4 commits
    • Matthias Kaehlcke's avatar
      x86/mm/kaslr: Use the _ASM_MUL macro for multiplication to work around Clang incompatibility · 121843eb
      Matthias Kaehlcke authored
      The constraint "rm" allows the compiler to put mix_const into memory.
      When the input operand is a memory location then MUL needs an operand
      size suffix, since Clang can't infer the multiplication width from the
      operand.
      
      Add and use the _ASM_MUL macro which determines the operand size and
      resolves to the NUL instruction with the corresponding suffix.
      
      This fixes the following error when building with clang:
      
        CC      arch/x86/lib/kaslr.o
        /tmp/kaslr-dfe1ad.s: Assembler messages:
        /tmp/kaslr-dfe1ad.s:182: Error: no instruction mnemonic suffix given and no register operands; can't size instruction
      Signed-off-by: default avatarMatthias Kaehlcke <mka@chromium.org>
      Cc: Grant Grundler <grundler@chromium.org>
      Cc: Greg Hackmann <ghackmann@google.com>
      Cc: Kees Cook <keescook@chromium.org>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Michael Davidson <md@google.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Link: http://lkml.kernel.org/r/20170501224741.133938-1-mka@chromium.orgSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
      121843eb
    • Baoquan He's avatar
      x86/mm: Fix boot crash caused by incorrect loop count calculation in sync_global_pgds() · fc5f9d5f
      Baoquan He authored
      Jeff Moyer reported that on his system with two memory regions 0~64G and
      1T~1T+192G, and kernel option "memmap=192G!1024G" added, enabling KASLR
      will make the system hang intermittently during boot. While adding 'nokaslr'
      won't.
      
      The back trace is:
      
       Oops: 0000 [#1] SMP
      
       RIP: memcpy_erms()
       [ .... ]
       Call Trace:
        pmem_rw_page()
        bdev_read_page()
        do_mpage_readpage()
        mpage_readpages()
        blkdev_readpages()
        __do_page_cache_readahead()
        force_page_cache_readahead()
        page_cache_sync_readahead()
        generic_file_read_iter()
        blkdev_read_iter()
        __vfs_read()
        vfs_read()
        SyS_read()
        entry_SYSCALL_64_fastpath()
      
      This crash happens because the for loop count calculation in sync_global_pgds()
      is not correct. When a mapping area crosses PGD entries, we should
      calculate the starting address of region which next PGD covers and assign
      it to next for loop count, but not add PGDIR_SIZE directly. The old
      code works right only if the mapping area is an exact multiple of PGDIR_SIZE,
      otherwize the end region could be skipped so that it can't be synchronized
      to all other processes from kernel PGD init_mm.pgd.
      
      In Jeff's system, emulated pmem area [1024G, 1216G) is smaller than
      PGDIR_SIZE. While 'nokaslr' works because PAGE_OFFSET is 1T aligned, it
      makes this area be mapped inside one PGD entry. With KASLR enabled,
      this area could cross two PGD entries, then the next PGD entry won't
      be synced to all other processes. That is why we saw empty PGD.
      
      Fix it.
      Reported-by: default avatarJeff Moyer <jmoyer@redhat.com>
      Signed-off-by: default avatarBaoquan He <bhe@redhat.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Andy Lutomirski <luto@kernel.org>
      Cc: Borislav Petkov <bp@alien8.de>
      Cc: Brian Gerst <brgerst@gmail.com>
      Cc: Dan Williams <dan.j.williams@intel.com>
      Cc: Dave Hansen <dave.hansen@linux.intel.com>
      Cc: Dave Young <dyoung@redhat.com>
      Cc: Denys Vlasenko <dvlasenk@redhat.com>
      Cc: H. Peter Anvin <hpa@zytor.com>
      Cc: Jinbum Park <jinb.park7@gmail.com>
      Cc: Josh Poimboeuf <jpoimboe@redhat.com>
      Cc: Kees Cook <keescook@chromium.org>
      Cc: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Garnier <thgarnie@google.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Yasuaki Ishimatsu <yasu.isimatu@gmail.com>
      Cc: Yinghai Lu <yinghai@kernel.org>
      Link: http://lkml.kernel.org/r/1493864747-8506-1-git-send-email-bhe@redhat.comSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
      fc5f9d5f
    • Ingo Molnar's avatar
      Merge branch 'linus' into x86/urgent, to pick up dependent commits · 415812f2
      Ingo Molnar authored
      We are going to fix a bug introduced by a more recent commit, so
      refresh the tree.
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      415812f2
    • Josh Poimboeuf's avatar
      x86/asm: Don't use RBP as a temporary register in csum_partial_copy_generic() · 42fc6c6c
      Josh Poimboeuf authored
      Andrey Konovalov reported the following warning while fuzzing the kernel
      with syzkaller:
      
        WARNING: kernel stack regs at ffff8800686869f8 in a.out:4933 has bad 'bp' value c3fc855a10167ec0
      
      The unwinder dump revealed that RBP had a bad value when an interrupt
      occurred in csum_partial_copy_generic().
      
      That function saves RBP on the stack and then overwrites it, using it as
      a scratch register.  That's problematic because it breaks stack traces
      if an interrupt occurs in the middle of the function.
      
      Replace the usage of RBP with another callee-saved register (R15) so
      stack traces are no longer affected.
      Reported-by: default avatarAndrey Konovalov <andreyknvl@google.com>
      Tested-by: default avatarAndrey Konovalov <andreyknvl@google.com>
      Signed-off-by: default avatarJosh Poimboeuf <jpoimboe@redhat.com>
      Cc: Cong Wang <xiyou.wangcong@gmail.com>
      Cc: David S . Miller <davem@davemloft.net>
      Cc: Dmitry Vyukov <dvyukov@google.com>
      Cc: Eric Dumazet <edumazet@google.com>
      Cc: Kostya Serebryany <kcc@google.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
      Cc: Neil Horman <nhorman@tuxdriver.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Vlad Yasevich <vyasevich@gmail.com>
      Cc: linux-sctp@vger.kernel.org
      Cc: netdev <netdev@vger.kernel.org>
      Cc: syzkaller <syzkaller@googlegroups.com>
      Link: http://lkml.kernel.org/r/4b03a961efda5ec9bfe46b7b9c9ad72d1efad343.1493909486.git.jpoimboe@redhat.comSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
      42fc6c6c
  4. 02 May, 2017 17 commits
    • Linus Torvalds's avatar
      Merge branch 'x86-mm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · d3b5d352
      Linus Torvalds authored
      Pull x86 mm updates from Ingo Molnar:
       "The main x86 MM changes in this cycle were:
      
         - continued native kernel PCID support preparation patches to the TLB
           flushing code (Andy Lutomirski)
      
         - various fixes related to 32-bit compat syscall returning address
           over 4Gb in applications, launched from 64-bit binaries - motivated
           by C/R frameworks such as Virtuozzo. (Dmitry Safonov)
      
         - continued Intel 5-level paging enablement: in particular the
           conversion of x86 GUP to the generic GUP code. (Kirill A. Shutemov)
      
         - x86/mpx ABI corner case fixes/enhancements (Joerg Roedel)
      
         - ... plus misc updates, fixes and cleanups"
      
      * 'x86-mm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (62 commits)
        mm, zone_device: Replace {get, put}_zone_device_page() with a single reference to fix pmem crash
        x86/mm: Fix flush_tlb_page() on Xen
        x86/mm: Make flush_tlb_mm_range() more predictable
        x86/mm: Remove flush_tlb() and flush_tlb_current_task()
        x86/vm86/32: Switch to flush_tlb_mm_range() in mark_screen_rdonly()
        x86/mm/64: Fix crash in remove_pagetable()
        Revert "x86/mm/gup: Switch GUP to the generic get_user_page_fast() implementation"
        x86/boot/e820: Remove a redundant self assignment
        x86/mm: Fix dump pagetables for 4 levels of page tables
        x86/mpx, selftests: Only check bounds-vs-shadow when we keep shadow
        x86/mpx: Correctly report do_mpx_bt_fault() failures to user-space
        Revert "x86/mm/numa: Remove numa_nodemask_from_meminfo()"
        x86/espfix: Add support for 5-level paging
        x86/kasan: Extend KASAN to support 5-level paging
        x86/mm: Add basic defines/helpers for CONFIG_X86_5LEVEL=y
        x86/paravirt: Add 5-level support to the paravirt code
        x86/mm: Define virtual memory map for 5-level paging
        x86/asm: Remove __VIRTUAL_MASK_SHIFT==47 assert
        x86/boot: Detect 5-level paging support
        x86/mm/numa: Remove numa_nodemask_from_meminfo()
        ...
      d3b5d352
    • Linus Torvalds's avatar
      Merge branch 'x86-vdso-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · aa2a4b65
      Linus Torvalds authored
      Pull x86 vdso updates from Ingo Molnar:
       "Add support for vDSO acceleration of the "Hyper-V TSC page", to speed
        up clock reading on Hyper-V guests"
      
      * 'x86-vdso-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/vdso: Add VCLOCK_HVCLOCK vDSO clock read method
        x86/hyperv: Move TSC reading method to asm/mshyperv.h
        x86/hyperv: Implement hv_get_tsc_page()
      aa2a4b65
    • Linus Torvalds's avatar
      Merge branch 'x86-platform-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · d19458a4
      Linus Torvalds authored
      Pull x86 platform updates from Ingo Molnar:
       "Most of the commits are continued SGI UV4 hardware-enablement changes,
        plus there's also new Bluetooth support for the Intel Edison platform"
      
      * 'x86-platform-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/platform/intel-mid: Enable Bluetooth support on Intel Edison
        x86/platform/uv/BAU: Implement uv4_wait_completion with read_status
        x86/platform/uv/BAU: Add wait_completion to bau_operations
        x86/platform/uv/BAU: Add status mmr location fields to bau_control
        x86/platform/uv/BAU: Cleanup bau_operations declaration and instances
        x86/platform/uv/BAU: Add payload descriptor qualifier
        x86/platform/uv/BAU: Add uv_bau_version enumerated constants
      d19458a4
    • Linus Torvalds's avatar
      Merge branch 'x86-irq-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 888411be
      Linus Torvalds authored
      Pull x86 irq update from Ingo Molnar:
       "A single commit that micro-optimizes an IRQ vectors code path in the
        CPU offlining code"
      
      * 'x86-irq-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/irq: Optimize free vector check in the CPU offline path
      888411be
    • Linus Torvalds's avatar
      Merge branch 'x86-debug-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 7d6a31c3
      Linus Torvalds authored
      Pull x86 debug updates from Ingo Molnar:
       "The biggest update is the addition of USB3 debug port based
        early-console.
      
        Greg was fine with the USB changes and with the routing of these
        patches:
      
          https://www.spinics.net/lists/linux-usb/msg155093.html"
      
      * 'x86-debug-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        usb/doc: Add document for USB3 debug port usage
        usb/serial: Add DBC debug device support to usb_debug
        x86/earlyprintk: Add support for earlyprintk via USB3 debug port
        usb/early: Add driver for xhci debug capability
        x86/timers: Add simple udelay calibration
      7d6a31c3
    • Linus Torvalds's avatar
      Merge branch 'x86-cleanups-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 2cc12e2e
      Linus Torvalds authored
      Pull x86 cleanups from Ingo Molnar:
       "A handful of small cleanups"
      
      * 'x86-cleanups-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/irq: Remove a redundant #ifdef directive
        x86/smp: Remove the redundant #ifdef CONFIG_SMP directive
        x86/smp: Reduce code duplication
        x86/pci-calgary: Use setup_timer() instead of open coding it.
      2cc12e2e
    • Linus Torvalds's avatar
      Merge branch 'x86-build-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 66acd7fc
      Linus Torvalds authored
      Pull x86 build update from Ingo Molnar:
       "A single CLang support related fix"
      
      * 'x86-build-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/kbuild: Use cc-option to enable -falign-{jumps/loops}
      66acd7fc
    • Linus Torvalds's avatar
      Merge branch 'x86-asm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 3fb9268e
      Linus Torvalds authored
      Pull x86 asm updates from Ingo Molnar:
       "The main changes in this cycle were:
      
         - unwinder fixes and enhancements
      
         - improve ftrace interaction with the unwinder
      
         - optimize the code footprint of WARN() and related debugging
           constructs
      
         - ... plus misc updates, cleanups and fixes"
      
      * 'x86-asm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (24 commits)
        x86/unwind: Dump all stacks in unwind_dump()
        x86/unwind: Silence more entry-code related warnings
        x86/ftrace: Fix ebp in ftrace_regs_caller that screws up unwinder
        x86/unwind: Remove unused 'sp' parameter in unwind_dump()
        x86/unwind: Prepend hex mask value with '0x' in unwind_dump()
        x86/unwind: Properly zero-pad 32-bit values in unwind_dump()
        x86/unwind: Ensure stack pointer is aligned
        debug: Avoid setting BUGFLAG_WARNING twice
        x86/unwind: Silence entry-related warnings
        x86/unwind: Read stack return address in update_stack_state()
        x86/unwind: Move common code into update_stack_state()
        debug: Fix __bug_table[] in arch linker scripts
        debug: Add _ONCE() logic to report_bug()
        x86/debug: Define BUG() again for !CONFIG_BUG
        x86/debug: Implement __WARN() using UD0
        x86/ftrace: Use Makefile logic instead of #ifdef for compiling ftrace_*.o
        x86/ftrace: Add -mfentry support to x86_32 with DYNAMIC_FTRACE set
        x86/ftrace: Clean up ftrace_regs_caller
        x86/ftrace: Add stack frame pointer to ftrace_caller
        x86/ftrace: Move the ftrace specific code out of entry_32.S
        ...
      3fb9268e
    • Linus Torvalds's avatar
      Merge branch 'x86-apic-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 12ca7c8d
      Linus Torvalds authored
      Pull x86 apic updates from Ingo Molnar:
       "Two small cleanups"
      
      * 'x86-apic-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/apic: Fix a comment in init_apic_mappings()
        x86/apic: Remove the SET_APIC_ID(x) macro
      12ca7c8d
    • Linus Torvalds's avatar
      Merge branch 'x86-cpu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · a52bbaf4
      Linus Torvalds authored
      Pull x86 cpu updates from Ingo Molnar:
       "The biggest changes are an extension of the Intel RDT code to extend
        it with Intel Memory Bandwidth Allocation CPU support: MBA allows
        bandwidth allocation between cores, while CBM (already upstream)
        allows CPU cache partitioning.
      
        There's also misc smaller fixes and updates"
      
      * 'x86-cpu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (23 commits)
        x86/intel_rdt: Return error for incorrect resource names in schemata
        x86/intel_rdt: Trim whitespace while parsing schemata input
        x86/intel_rdt: Fix padding when resource is enabled via mount
        x86/intel_rdt: Get rid of anon union
        x86/cpu: Keep model defines sorted by model number
        x86/intel_rdt/mba: Add schemata file support for MBA
        x86/intel_rdt: Make schemata file parsers resource specific
        x86/intel_rdt/mba: Add info directory files for Memory Bandwidth Allocation
        x86/intel_rdt: Make information files resource specific
        x86/intel_rdt/mba: Add primary support for Memory Bandwidth Allocation (MBA)
        x86/intel_rdt/mba: Memory bandwith allocation feature detect
        x86/intel_rdt: Add resource specific msr update function
        x86/intel_rdt: Move CBM specific data into a struct
        x86/intel_rdt: Cleanup namespace to support multiple resource types
        Documentation, x86: Intel Memory bandwidth allocation
        x86/intel_rdt: Organize code properly
        x86/intel_rdt: Init padding only if a device exists
        x86/intel_rdt: Add cpus_list rdtgroup file
        x86/intel_rdt: Cleanup kernel-doc
        x86/intel_rdt: Update schemata read to show data in tabular format
        ...
      a52bbaf4
    • Linus Torvalds's avatar
      Merge branch 'x86-boot-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 16b76293
      Linus Torvalds authored
      Pull x86 boot updates from Ingo Molnar:
       "The biggest changes in this cycle were:
      
         - reworking of the e820 code: separate in-kernel and boot-ABI data
           structures and apply a whole range of cleanups to the kernel side.
      
           No change in functionality.
      
         - enable KASLR by default: it's used by all major distros and it's
           out of the experimental stage as well.
      
         - ... misc fixes and cleanups"
      
      * 'x86-boot-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (63 commits)
        x86/KASLR: Fix kexec kernel boot crash when KASLR randomization fails
        x86/reboot: Turn off KVM when halting a CPU
        x86/boot: Fix BSS corruption/overwrite bug in early x86 kernel startup
        x86: Enable KASLR by default
        boot/param: Move next_arg() function to lib/cmdline.c for later reuse
        x86/boot: Fix Sparse warning by including required header file
        x86/boot/64: Rename start_cpu()
        x86/xen: Update e820 table handling to the new core x86 E820 code
        x86/boot: Fix pr_debug() API braindamage
        xen, x86/headers: Add <linux/device.h> dependency to <asm/xen/page.h>
        x86/boot/e820: Simplify e820__update_table()
        x86/boot/e820: Separate the E820 ABI structures from the in-kernel structures
        x86/boot/e820: Fix and clean up e820_type switch() statements
        x86/boot/e820: Rename the remaining E820 APIs to the e820__*() prefix
        x86/boot/e820: Remove unnecessary #include's
        x86/boot/e820: Rename e820_mark_nosave_regions() to e820__register_nosave_regions()
        x86/boot/e820: Rename e820_reserve_resources*() to e820__reserve_resources*()
        x86/boot/e820: Use bool in query APIs
        x86/boot/e820: Document e820__reserve_setup_data()
        x86/boot/e820: Clean up __e820__update_table() et al
        ...
      16b76293
    • Linus Torvalds's avatar
      Merge branch 'ras-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 3dee9fb2
      Linus Torvalds authored
      Pull RAS updates from Ingo Molnar:
       "The main changes in this cycle were:
      
         - add the 'Corrected Errors Collector' kernel feature which collect
           and monitor correctable errors statistics and will preemptively
           (soft-)offline physical pages that have a suspiciously high error
           count.
      
         - handle MCE errors during kexec() more gracefully
      
         - factor out and deprecate the /dev/mcelog driver
      
         - ... plus misc fixes and cleanpus"
      
      * 'ras-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/mce: Check MCi_STATUS[MISCV] for usable addr on Intel only
        ACPI/APEI: Use setup_deferrable_timer()
        x86/mce: Update notifier priority check
        x86/mce: Enable PPIN for Knights Landing/Mill
        x86/mce: Do not register notifiers with invalid prio
        x86/mce: Factor out and deprecate the /dev/mcelog driver
        RAS: Add a Corrected Errors Collector
        x86/mce: Rename mce_log to mce_log_buffer
        x86/mce: Rename mce_log()'s argument
        x86/mce: Init some CPU features early
        x86/mce: Handle broadcasted MCE gracefully with kexec
      3dee9fb2
    • Linus Torvalds's avatar
      Merge branch 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 7c8c03bf
      Linus Torvalds authored
      Pull perf updates from Ingo Molnar:
       "The main changes in this cycle were:
      
        Kernel side changes:
      
         - Kprobes and uprobes changes:
            - Make their trampolines read-only while they are used
            - Make UPROBES_EVENTS default-y which is the distro practice
            - Apply misc fixes and robustization to probe point insertion.
      
         - add support for AMD IOMMU events
      
         - extend hw events on Intel Goldmont CPUs
      
         - ... plus misc fixes and updates.
      
        Tooling side changes:
      
         - support s390 jump instructions in perf annotate (Christian
           Borntraeger)
      
         - vendor hardware events updates (Andi Kleen)
      
         - add argument support for SDT events in powerpc (Ravi Bangoria)
      
         - beautify the statx syscall arguments in 'perf trace' (Arnaldo
           Carvalho de Melo)
      
         - handle inline functions in callchains (Jin Yao)
      
         - enable sorting by srcline as key (Milian Wolff)
      
         - add 'brstackinsn' field in 'perf script' to reuse the x86
           instruction decoder used in the Intel PT code to study hot paths to
           samples (Andi Kleen)
      
         - add PERF_RECORD_NAMESPACES so that the kernel can record
           information required to associate samples to namespaces, helping in
           container problem characterization. (Hari Bathini)
      
         - allow sorting by symbol_size in 'perf report' and 'perf top'
           (Charles Baylis)
      
         - in perf stat, make system wide (-a) the default option if no target
           was specified and one of following conditions is met:
            - no workload specified (current behaviour)
            - a workload is specified but all requested events are system wide
              ones, like uncore ones. (Jiri Olsa)
      
         - ... plus lots of other updates, enhancements, cleanups and fixes"
      
      * 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (235 commits)
        perf tools: Fix the code to strip command name
        tools arch x86: Sync cpufeatures.h
        tools arch: Sync arch/x86/lib/memcpy_64.S with the kernel
        tools: Update asm-generic/mman-common.h copy from the kernel
        perf tools: Use just forward declarations for struct thread where possible
        perf tools: Add the right header to obtain PERF_ALIGN()
        perf tools: Remove poll.h and wait.h from util.h
        perf tools: Remove string.h, unistd.h and sys/stat.h from util.h
        perf tools: Remove stale prototypes from builtin.h
        perf tools: Remove string.h from util.h
        perf tools: Remove sys/ioctl.h from util.h
        perf tools: Remove a few more needless includes from util.h
        perf tools: Include sys/param.h where needed
        perf callchain: Move callchain specific routines from util.[ch]
        perf tools: Add compress.h for the *_decompress_to_file() headers
        perf mem: Fix display of data source snoop indication
        perf debug: Move dump_stack() and sighandler_dump_stack() to debug.h
        perf kvm: Make function only used by 'perf kvm' static
        perf tools: Move timestamp routines from util.h to time-utils.h
        perf tools: Move units conversion/formatting routines to separate object
        ...
      7c8c03bf
    • Linus Torvalds's avatar
      Merge branch 'x86-process-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 6dc2cce9
      Linus Torvalds authored
      Pul x86/process updates from Ingo Molnar:
       "The main change in this cycle was to add the ARCH_[GET|SET]_CPUID
        prctl() ABI extension to control the availability of the CPUID
        instruction, analogously to the existing PR_GET|SET_TSC ABI that
        controls RDTSC.
      
        Motivation: the 'rr' user-space record-and-replay execution debugger
        would like to trap and emulate the CPUID instruction - which
        instruction is normally unprivileged.
      
        Trapping CPUID is possible on IvyBridge and later Intel CPUs - expose
        this hardware capability"
      
      * 'x86-process-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/syscalls/32: Ignore arch_prctl for other architectures
        um/arch_prctl: Fix fallout from x86 arch_prctl() rework
        x86/arch_prctl: Add ARCH_[GET|SET]_CPUID
        x86/cpufeature: Detect CPUID faulting support
        x86/syscalls/32: Wire up arch_prctl on x86-32
        x86/arch_prctl: Add do_arch_prctl_common()
        x86/arch_prctl/64: Rename do_arch_prctl() to do_arch_prctl_64()
        x86/arch_prctl/64: Use SYSCALL_DEFINE2 to define sys_arch_prctl()
        x86/arch_prctl: Rename 'code' argument to 'option'
        x86/msr: Rename MISC_FEATURE_ENABLES to MISC_FEATURES_ENABLES
        x86/process: Optimize TIF_NOTSC switch
        x86/process: Correct and optimize TIF_BLOCKSTEP switch
        x86/process: Optimize TIF checks in __switch_to_xtra()
      6dc2cce9
    • Linus Torvalds's avatar
      Merge branch 'locking-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 207fb8c3
      Linus Torvalds authored
      Pull locking updates from Ingo Molnar:
       "The main changes in this cycle were:
      
         - a big round of FUTEX_UNLOCK_PI improvements, fixes, cleanups and
           general restructuring
      
         - lockdep updates such as new checks for lock_downgrade()
      
         - introduce the new atomic_try_cmpxchg() locking API and use it to
           optimize refcount code generation
      
         - ... plus misc fixes, updates and cleanups"
      
      * 'locking-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (38 commits)
        MAINTAINERS: Add FUTEX SUBSYSTEM
        futex: Clarify mark_wake_futex memory barrier usage
        futex: Fix small (and harmless looking) inconsistencies
        futex: Avoid freeing an active timer
        rtmutex: Plug preempt count leak in rt_mutex_futex_unlock()
        rtmutex: Fix more prio comparisons
        rtmutex: Fix PI chain order integrity
        sched,tracing: Update trace_sched_pi_setprio()
        sched/rtmutex: Refactor rt_mutex_setprio()
        rtmutex: Clean up
        sched/deadline/rtmutex: Dont miss the dl_runtime/dl_period update
        sched/rtmutex/deadline: Fix a PI crash for deadline tasks
        rtmutex: Deboost before waking up the top waiter
        locking/ww-mutex: Limit stress test to 2 seconds
        locking/atomic: Fix atomic_try_cmpxchg() semantics
        lockdep: Fix per-cpu static objects
        futex: Drop hb->lock before enqueueing on the rtmutex
        futex: Futex_unlock_pi() determinism
        futex: Rework futex_lock_pi() to use rt_mutex_*_proxy_lock()
        futex,rt_mutex: Restructure rt_mutex_finish_proxy_lock()
        ...
      207fb8c3
    • Linus Torvalds's avatar
      Merge branch 'sched-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 3527d3e9
      Linus Torvalds authored
      Pull scheduler updates from Ingo Molnar:
       "The main changes in this cycle were:
      
         - another round of rq-clock handling debugging, robustization and
           fixes
      
         - PELT accounting improvements
      
         - CPU hotplug related ->cpus_allowed affinity handling fixes all
           around the tree
      
         - ... plus misc fixes, cleanups and updates"
      
      * 'sched-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (35 commits)
        sched/x86: Update reschedule warning text
        crypto: N2 - Replace racy task affinity logic
        cpufreq/sparc-us2e: Replace racy task affinity logic
        cpufreq/sparc-us3: Replace racy task affinity logic
        cpufreq/sh: Replace racy task affinity logic
        cpufreq/ia64: Replace racy task affinity logic
        ACPI/processor: Replace racy task affinity logic
        ACPI/processor: Fix error handling in __acpi_processor_start()
        sparc/sysfs: Replace racy task affinity logic
        powerpc/smp: Replace open coded task affinity logic
        ia64/sn/hwperf: Replace racy task affinity logic
        ia64/salinfo: Replace racy task affinity logic
        workqueue: Provide work_on_cpu_safe()
        ia64/topology: Remove cpus_allowed manipulation
        sched/fair: Move the PELT constants into a generated header
        sched/fair: Increase PELT accuracy for small tasks
        sched/fair: Fix comments
        sched/Documentation: Add 'sched-pelt' tool
        sched/fair: Fix corner case in __accumulate_sum()
        sched/core: Remove 'task' parameter and rename tsk_restore_flags() to current_restore_flags()
        ...
      3527d3e9
    • Linus Torvalds's avatar
      Merge branch 'efi-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 3711c94f
      Linus Torvalds authored
      Pull EFI updates from Ingo Molnar:
       "The main changes in this cycle were:
      
         - move BGRT handling to drivers/acpi so it can be shared between x86
           and ARM
      
         - bring the EFI stub's initrd and FDT allocation logic in line with
           the latest changes to the arm64 boot protocol
      
         - improvements and fixes to the EFI stub's command line parsing
           routines
      
         - randomize the virtual mapping of the UEFI runtime services on
           ARM/arm64
      
         - ... and other misc enhancements, cleanups and fixes"
      
      * 'efi-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        efi/libstub/arm: Don't use TASK_SIZE when randomizing the RT space
        ef/libstub/arm/arm64: Randomize the base of the UEFI rt services region
        efi/libstub/arm/arm64: Disable debug prints on 'quiet' cmdline arg
        efi/libstub: Unify command line param parsing
        efi/libstub: Fix harmless command line parsing bug
        efi/arm32-stub: Allow boot-time allocations in the vmlinux region
        x86/efi: Clean up a minor mistake in comment
        efi/pstore: Return error code (if any) from efi_pstore_write()
        efi/bgrt: Enable ACPI BGRT handling on arm64
        x86/efi/bgrt: Move efi-bgrt handling out of arch/x86
        efi/arm-stub: Round up FDT allocation to mapping size
        efi/arm-stub: Correct FDT and initrd allocation rules for arm64
      3711c94f
  5. 01 May, 2017 16 commits
    • Linus Torvalds's avatar
      Merge branch 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 174ddfd5
      Linus Torvalds authored
      Pull timer updates from Thomas Gleixner:
       "The timer departement delivers:
      
         - more year 2038 rework
      
         - a massive rework of the arm achitected timer
      
         - preparatory patches to allow NTP correction of clock event devices
           to avoid early expiry
      
         - the usual pile of fixes and enhancements all over the place"
      
      * 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (91 commits)
        timer/sysclt: Restrict timer migration sysctl values to 0 and 1
        arm64/arch_timer: Mark errata handlers as __maybe_unused
        Clocksource/mips-gic: Remove redundant non devicetree init
        MIPS/Malta: Probe gic-timer via devicetree
        clocksource: Use GENMASK_ULL in definition of CLOCKSOURCE_MASK
        acpi/arm64: Add SBSA Generic Watchdog support in GTDT driver
        clocksource: arm_arch_timer: add GTDT support for memory-mapped timer
        acpi/arm64: Add memory-mapped timer support in GTDT driver
        clocksource: arm_arch_timer: simplify ACPI support code.
        acpi/arm64: Add GTDT table parse driver
        clocksource: arm_arch_timer: split MMIO timer probing.
        clocksource: arm_arch_timer: add structs to describe MMIO timer
        clocksource: arm_arch_timer: move arch_timer_needs_of_probing into DT init call
        clocksource: arm_arch_timer: refactor arch_timer_needs_probing
        clocksource: arm_arch_timer: split dt-only rate handling
        x86/uv/time: Set ->min_delta_ticks and ->max_delta_ticks
        unicore32/time: Set ->min_delta_ticks and ->max_delta_ticks
        um/time: Set ->min_delta_ticks and ->max_delta_ticks
        tile/time: Set ->min_delta_ticks and ->max_delta_ticks
        score/time: Set ->min_delta_ticks and ->max_delta_ticks
        ...
      174ddfd5
    • Linus Torvalds's avatar
      Merge branch 'irq-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 3cb66535
      Linus Torvalds authored
      Pull irq updates from Thomas Gleixner:
       "Nothing exciting from the irq side for this merge window:
      
         - a new driver for a Mediatek SoC
      
         - ACPI support for ARM GICV3
      
         - support for shared nested interrupts
      
         - the usual pile of fixes and updates all over te place"
      
      * 'irq-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (28 commits)
        irqchip/mbigen: Fix return value check in mbigen_device_probe()
        irqchip/mips-gic: Replace static map with dynamic
        irqchip/mips-gic: Remove device IRQ domain
        irqchip/mips-gic: Separate IPI reservation & usage tracking
        genirq: Use irqd_get_trigger_type to compare the trigger type for shared IRQs
        genirq: Use cpumask_available() for check of cpumask variable
        cpumask: Add helper cpumask_available()
        irqchip/irq-imx-gpcv2: Clear OF_POPULATED flag
        irqchip/atmel-aic5: Handle suspend to RAM
        irqchip: Add Mediatek mtk-cirq driver
        dt-bindings: mtk-cirq: Add binding document
        irqchip/gic-v3-its: Add IORT hook for platform MSI support
        irqchip/mbigen: Add ACPI support
        irqchip/mbigen: Introduce mbigen_of_create_domain()
        irqchip/mbigen: Drop module owner
        platform-msi: Make platform_msi_create_device_domain() ACPI aware
        irqchip/gicv3-its: platform-msi: Scan MADT to create platform msi domain
        irqchip/gicv3-its: platform-msi: Refactor its_pmsi_init() to prepare for ACPI
        irqchip/gicv3-its: platform-msi: Refactor its_pmsi_prepare()
        irqchip/gic-v3-its: Keep the include header files in alphabetic order
        ...
      3cb66535
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/egtvedt/linux-avr32 · 2dbf3d5c
      Linus Torvalds authored
      Pull AVR32 removal from Hans-Christian Noren Egtvedt:
       "This will remove support for AVR32 architecture from the kernel and
        clean away the most obvious architecture related parts. Removing dead
        code in drivers is the next step"
      
      Notes from previous discussion about this:
       "The AVR32 architecture is not keeping up with the development of the
        kernel, and since it shares so much of the drivers with Atmel ARM SoC,
        it is starting to hinder these drivers to develop swiftly.
      
        Also, all AVR32 AP7 SoC processors are end of lifed from Atmel (now
        Microchip).
      
        Finally, the GCC toolchain is stuck at version 4.2.x, and has not
        received any patches since the last release from Atmel;
        4.2.4-atmel.1.1.3.avr32linux.1.
      
        When building kernel v4.10, this toolchain is no longer able to
        properly link the network stack.
      
        Haavard and I have came to the conclusion that we feel keeping AVR32
        on life support offers more obstacles for Atmel ARMs, than it gives
        joy to AVR32 users. I also suspect there are very few AVR32 users left
        today, if anybody at all"
      
      That discussion was acked by Andy Shevchenko, Boris Brezillon, Nicolas
      Ferre, and Haavard Skinnemoen.
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/egtvedt/linux-avr32:
        mm: remove AVR32 arch special handling in mm/Kconfig
        lib: remove check for AVR32 arch in test_user_copy
        lib: remove AVR32 entry in Kconfig.debug compile with frame pointers
        scripts: remove AVR32 support from checkstack.pl
        docs: remove all references to AVR32 architecture
        avr32: remove support for AVR32 architecture
      2dbf3d5c
    • Sergei Trofimovich's avatar
      ia64: fix module loading for gcc-5.4 · a25fb850
      Sergei Trofimovich authored
      Starting from gcc-5.4+ gcc generates MLX instructions in more cases to
      refer local symbols:
      
          https://gcc.gnu.org/PR60465
      
      That caused ia64 module loader to choke on such instructions:
      
          fuse: invalid slot number 1 for IMM64
      
      The Linux kernel used to handle only case where relocation pointed to
      slot=2 instruction in the bundle.  That limitation was fixed in linux by
      commit 9c184a07 ("[IA64] Fix 2.6 kernel for the new ia64 assembler")
      See
      
          http://sources.redhat.com/bugzilla/show_bug.cgi?id=1433
      
      This change lifts the slot=2 restriction from the kernel module loader.
      
      Tested on 'fuse' and 'btrfs' kernel modules.
      
      Cc: Markus Elfring <elfring@users.sourceforge.net>
      Cc: H J Lu <hjl.tools@gmail.com>
      Cc: Fenghua Yu <fenghua.yu@intel.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Bug: https://bugs.gentoo.org/601014Tested-by: default avatarÉmeric MASCHINO <emeric.maschino@gmail.com>
      Signed-off-by: default avatarSergei Trofimovich <slyfox@gentoo.org>
      Signed-off-by: default avatarTony Luck <tony.luck@intel.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      a25fb850
    • Linus Torvalds's avatar
      Merge branch 'work.uaccess' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs · 5db6db0d
      Linus Torvalds authored
      Pull uaccess unification updates from Al Viro:
       "This is the uaccess unification pile. It's _not_ the end of uaccess
        work, but the next batch of that will go into the next cycle. This one
        mostly takes copy_from_user() and friends out of arch/* and gets the
        zero-padding behaviour in sync for all architectures.
      
        Dealing with the nocache/writethrough mess is for the next cycle;
        fortunately, that's x86-only. Same for cleanups in iov_iter.c (I am
        sold on access_ok() in there, BTW; just not in this pile), same for
        reducing __copy_... callsites, strn*... stuff, etc. - there will be a
        pile about as large as this one in the next merge window.
      
        This one sat in -next for weeks. -3KLoC"
      
      * 'work.uaccess' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (96 commits)
        HAVE_ARCH_HARDENED_USERCOPY is unconditional now
        CONFIG_ARCH_HAS_RAW_COPY_USER is unconditional now
        m32r: switch to RAW_COPY_USER
        hexagon: switch to RAW_COPY_USER
        microblaze: switch to RAW_COPY_USER
        get rid of padding, switch to RAW_COPY_USER
        ia64: get rid of copy_in_user()
        ia64: sanitize __access_ok()
        ia64: get rid of 'segment' argument of __do_{get,put}_user()
        ia64: get rid of 'segment' argument of __{get,put}_user_check()
        ia64: add extable.h
        powerpc: get rid of zeroing, switch to RAW_COPY_USER
        esas2r: don't open-code memdup_user()
        alpha: fix stack smashing in old_adjtimex(2)
        don't open-code kernel_setsockopt()
        mips: switch to RAW_COPY_USER
        mips: get rid of tail-zeroing in primitives
        mips: make copy_from_user() zero tail explicitly
        mips: clean and reorder the forest of macros...
        mips: consolidate __invoke_... wrappers
        ...
      5db6db0d
    • Linus Torvalds's avatar
      Merge tag 'devprop-4.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm · 5fab1004
      Linus Torvalds authored
      Pull generic device properties framework updates from Rafael Wysocki:
       "These add support for the ports and endpoints concepts, based on the
        existing DT support for them, to the generic device properties
        framework and update the ACPI _DSD properties code to recognize ports
        and endpoints accordingly.
      
        Specifics:
      
         - Extend the ACPI _DSD properties code and the generic device
           properties framework to support the concept of remote endponts
           (Mika Westerberg, Sakari Ailus).
      
         - Document the support for ports and endpoints in _DSD properties and
           extend the generic device properties framework to make it more
           suitable for the handling of ports and endpoints (Sakari Ailus)"
      
      * tag 'devprop-4.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
        device property: Read strings using string array reading functions
        device property: fwnode_property_read_string_array() returns nr of strings
        device property: Fix reading pset strings using array access functions
        device property: fwnode_property_read_string_array() may return -EILSEQ
        ACPI / DSD: Document references, ports and endpoints
        device property: Add fwnode_get_next_parent()
        device property: Add support for fwnode endpoints
        device property: Make dev_fwnode() public
        of: Add of_fwnode_handle() to convert device nodes to fwnode_handle
        device property: Add fwnode_handle_get()
        device property: Add support for remote endpoints
        ACPI / property: Add support for remote endpoints
        device property: Add fwnode_get_named_child_node()
        ACPI / property: Add fwnode_get_next_child_node()
        device property: Add fwnode_get_parent()
        ACPI / property: Add possiblity to retrieve parent firmware node
      5fab1004
    • Linus Torvalds's avatar
      Merge tag 'acpi-4.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm · 08be8810
      Linus Torvalds authored
      Pull ACPI updates from Rafael Wysocki:
       "These are some device enumeration code changes, updates of the AC and
        battery drivers to help them avoid attaching to devices that cannot be
        handled by them, new operation region driver for the Intel CHT Whiskey
        Cove PMIC, new sysfs entries for CPPC performance capabilities, a new
        _REV quirk blacklist entry and a couple of assorted minor fixes and
        cleanups.
      
        Specifics:
      
         - Update the core device enumeration code to make it more internally
           consistent and robust and drop the force_remove sysfs attribute
           that could be used to tell it to ignore errors on device
           hot-removal which was dangerous in general and no real and still
           relevant use cases for it could be found (Rafael Wysocki, Michal
           Hocko).
      
         - Make the core device enumeration code use _PXM to associate
           platform devices created by it with specific NUMA nodes (Shanker
           Donthineni).
      
         - Extend the CPPC library by adding more sysfs entries for
           performance capabilities to it and making it use the lowest
           nonlinear performance parameter (Prashanth Prakash).
      
         - Make the CPU online more consistent with CPU initialization in the
           ACPI processor driver (Prashanth Prakash).
      
         - Update the AC and battery drivers to help them avoid attaching to
           devices that cannot be handled by them and update the
           axp288_charger power supply driver to work correctly on ACPI
           systems without the INT3496 device (Hans de Goede).
      
         - Add an ACPI operation region driver for the Intel CHT Whiskey Cove
           PMIC and update the xpower operation region driver to work without
           IIO which isn't really necessary for it to work (Hans de Goede).
      
         - Add a new entry for Dell Inspiron 7537 to the _REV quirk blacklist
           (Kai Heng Feng).
      
         - Make the code in the ACPI video driver easier to follow by adding
           symbols and comments to it (Dmitry Frank).
      
         - Update ACPI documentation and drop a function that has no users
           from the tables-handling code (Cao jin, Baoquan He)"
      
      * tag 'acpi-4.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
        ACPI / PMIC: Stop xpower OPRegion handler relying on IIO
        ACPI / PMIC: Add opregion driver for Intel CHT Whiskey Cove PMIC
        ACPI / scan: Avoid enumerating devices more than once
        ACPI / scan: Apply default enumeration to devices with ACPI drivers
        power: supply: axp288_charger: Only wait for INT3496 device if present
        ACPI / AC: Add a blacklist with PMIC ACPI HIDs with a native charger driver
        ACPI / battery: Add a blacklist with PMIC ACPI HIDs with a native battery driver
        ACPI / battery: Fix acpi_battery_exit on acpi_battery_init_async errors
        ACPI / utils: Add new acpi_dev_present helper
        ACPI / video: add comments about subtle cases
        ACPI / video: get rid of magic numbers and use enum instead
        ACPI / doc: linuxized-acpica.txt: fix typos
        ACPI / blacklist: add _REV quirk for Dell Inspiron 7537
        ACPI / tables: Drop acpi_parse_entries() which is not used
        ACPI / CPPC: add sysfs entries for CPPC perf capabilities
        ACPI / CPPC: Read lowest nonlinear perf in cppc_get_perf_caps()
        ACPI / platform: Update platform device NUMA node based on _PXM method
        ACPI / Processor: Drop setup_max_cpus check from acpi_processor_add()
        ACPI / scan: Drop support for force_remove
      08be8810
    • Linus Torvalds's avatar
      Merge tag 'pm-4.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm · 0e285e90
      Linus Torvalds authored
      Pull power management updates from Rafael Wysocki:
       "This time the majority of changes go to the cpufreq subsystem (and to
        the intel_pstate driver in particular) and there are some updates in
        the generic power domains framework, cpuidle, tools and a couple of
        other places.
      
        One thing worth mentioning is that the intel_pstate's sysfs interface
        has been reworked to be more consistent with the general expectations
        of the cpufreq core and less confusing, hopefully for the better.
        Also, we have a new cpufreq driver for Tegra186 and new hardware
        support in intel_pstata and the Mediatek cpufreq driver.
      
        Apart from that, the AnalyzeSuspend utility for system suspend
        profiling gets a companion called AnalyzeBoot for the analogous
        profiling of system boot and they both go into one place under
        tools/power/pm-graph/.
      
        The rest is mostly fixes, cleanups and code reorganization.
      
        Specifics:
      
         - Rework the intel_pstate driver's sysfs interface to make it more
           straightforward and more intuitive (Rafael Wysocki).
      
         - Make intel_pstate support all processors which advertise HWP
           (hardware-managed P-states) to the kernel in all operation modes
           and make it use the load-based P-state selection algorithm on a
           wider range of systems in the active mode (Rafael Wysocki).
      
         - Add cpufreq driver for Tegra186 (Mikko Perttunen).
      
         - Add support for Gemini Lake SoCs to intel_pstate (David Box).
      
         - Add support for MT8176 and MT817x to the Mediatek cpufreq driver
           and clean up that driver a bit (Daniel Kurtz).
      
         - Clean up intel_pstate and optimize it slightly (Rafael Wysocki).
      
         - Update the schedutil cpufreq governor, mostly to fix a couple of
           issues with it related to specific workloads, and rework its sysfs
           tunable and initialization a bit (Rafael Wysocki, Viresh Kumar).
      
         - Fix minor issues in the imx6q, dbx500 and qoriq cpufreq drivers
           (Christophe Jaillet, Irina Tirdea, Leonard Crestez, Viresh Kumar,
           YuanTian Tang).
      
         - Add file patterns for cpufreq DT bindings to MAINTAINERS (Geert
           Uytterhoeven).
      
         - Add support for "always on" power domains to the genpd (generic
           power domains) framework and clean up that code somewhat (Ulf
           Hansson, Lina Iyer, Viresh Kumar).
      
         - Fix minor issues in the powernv cpuidle driver and clean it up
           (Anton Blanchard, Gautham Shenoy).
      
         - Move the AnalyzeSuspend utility under tools/power/pm-graph/ and add
           an analogous boot-profiling utility called AnalyzeBoot to it (Todd
           Brandt).
      
         - Add rk3328 support to the rockchip-io AVS (Adaptive Voltage
           Scaling) driver (David Wu).
      
         - Fix minor issues in the cpuidle core, the intel_pstate_tracer
           utility, the devfreq framework and the PM core documentation
           (Chanwoo Choi, Doug Smythies, Johan Hovold, Marcin Nowakowski)"
      
      * tag 'pm-4.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (56 commits)
        PM / runtime: Document autosuspend-helper side effects
        PM / runtime: Fix autosuspend documentation
        tools: power: pm-graph: Package makefile and man pages
        tools: power: pm-graph: AnalyzeBoot v2.0
        tools: power: pm-graph: AnalyzeSuspend v4.6
        cpufreq: Add Tegra186 cpufreq driver
        cpufreq: imx6q: Fix error handling code
        cpufreq: imx6q: Set max suspend_freq to avoid changes during suspend
        cpufreq: imx6q: Fix handling EPROBE_DEFER from regulator
        cpuidle: powernv: Avoid a branch in the core snooze_loop() loop
        cpuidle: powernv: Don't continually set thread priority in snooze_loop()
        cpuidle: powernv: Don't bounce between low and very low thread priority
        cpuidle: cpuidle-cps: remove unused variable
        tools/power/x86/intel_pstate_tracer: Adjust directory ownership
        cpufreq: schedutil: Use policy-dependent transition delays
        cpufreq: schedutil: Reduce frequencies slower
        PM / devfreq: Move struct devfreq_governor to devfreq directory
        PM / Domains: Ignore domain-idle-states that are not compatible
        cpufreq: intel_pstate: Add support for Gemini Lake
        powernv-cpuidle: Validate DT property array size
        ...
      0e285e90
    • Linus Torvalds's avatar
      Merge branch 'for-4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup · 9410091d
      Linus Torvalds authored
      Pull cgroup updates from Tejun Heo:
       "Nothing major. Two notable fixes are Li's second stab at fixing the
        long-standing race condition in the mount path and suppression of
        spurious warning from cgroup_get(). All other changes are trivial"
      
      * 'for-4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup:
        cgroup: mark cgroup_get() with __maybe_unused
        cgroup: avoid attaching a cgroup root to two different superblocks, take 2
        cgroup: fix spurious warnings on cgroup_is_dead() from cgroup_sk_alloc()
        cgroup: move cgroup_subsys_state parent field for cache locality
        cpuset: Remove cpuset_update_active_cpus()'s parameter.
        cgroup: switch to BUG_ON()
        cgroup: drop duplicate header nsproxy.h
        kernel: convert css_set.refcount from atomic_t to refcount_t
        kernel: convert cgroup_namespace.count from atomic_t to refcount_t
      9410091d
    • Linus Torvalds's avatar
      Merge branch 'for-4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq · ad1490bc
      Linus Torvalds authored
      Pull workqueue update from Tejun Heo:
       "One trivial patch to use setup_deferrable_timer() instead of
        open-coding the initialization"
      
      * 'for-4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq:
        workqueue: use setup_deferrable_timer
      ad1490bc
    • Linus Torvalds's avatar
      Merge branch 'for-4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata · e69bbe75
      Linus Torvalds authored
      Pull libata updates from Tejun Heo:
       "The biggest core change is removal of SCT WRITE SAME support, which
        never worked properly.
      
        Other than that, trivial updates in core code and specific embedded
        driver updates"
      
      * 'for-4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata:
        libata: remove SCT WRITE SAME support
        libata: reject passthrough WRITE SAME requests
        dt-bindings: ata: add DT bindings for ahci-dm816 SATA controller
        ata: ahci: add support for DaVinci DM816 SATA controller
        pata: remove the at91 driver
        libata: make ata_sg_clean static over again
        libata: use setup_deferrable_timer
        ata: allow subsystem to be used on m32r and s390 archs
        Delete redundant return value check of platform_get_resource()
        ata: constify of_device_id structures
      e69bbe75
    • Linus Torvalds's avatar
      Merge tag 'leds_for_4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/j.anaszewski/linux-leds · 85724ede
      Linus Torvalds authored
      Pull LED updates from Jacek Anaszewski:
       "New drivers:
      
         - add LED support for MT6323 PMIC
      
         - add LED support for Motorola CPCAP PMIC
      
        New features and improvements:
      
         - add LED trigger for all CPUs aggregated which is useful on tiny
           boards with more CPU cores than LED pins
      
         - add OF variants of LED registering functions as a preparation for
           adding generic support for Device Tree parsing
      
         - dell-led improvements and cleanups, followed by moving it to the
           x86 platform driver subsystem which is a more appropriate place for
           it
      
         - extend pca9532 Device Tree support by adding the LEDs
           'default-state' property
      
         - extend pca963x Device Tree support by adding nxp,inverted-out
           property for inverting the polarity of the output
      
         - remove ACPI support for lp3952 since it relied on a non-official
           ACPI IDs"
      
      * tag 'leds_for_4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/j.anaszewski/linux-leds:
        leds: pca9532: Extend pca9532 device tree support
        leds: cpcap: new driver
        mfd: cpcap: Add missing include dependencies
        leds: lp3952: Use 'if (ret)' pattern
        leds: lp3952: Remove ACPI support for lp3952
        leds: mt6323: Fix an off by one bug in probe
        dt-bindings: leds: Add document bindings for leds-mt6323
        leds: Add LED support for MT6323 PMIC
        leds: gpio: use OF variant of LED registering function
        leds: core: add OF variants of LED registering functions
        platform/x86: dell-wmi-led: fix coding style issues
        dell-led: move driver to drivers/platform/x86/dell-wmi-led.c
        dell-led: remove code related to mic mute LED
        platform/x86: dell-laptop: import dell_micmute_led_set() from drivers/leds/dell-led.c
        ALSA: hda - rename dell_led_set_func to dell_micmute_led_set_func
        ALSA: hda - use dell_micmute_led_set() instead of dell_app_wmi_led_set()
        dell-led: remove GUID check from dell_micmute_led_set()
        leds/trigger/cpu: Add LED trigger for all CPUs aggregated
      85724ede
    • Linus Torvalds's avatar
      Merge branch 'mailbox-for-next' of git://git.linaro.org/landing-teams/working/fujitsu/integration · 477d7cae
      Linus Torvalds authored
      Pull mailbox updates from Jassi Brar:
      
       - new driver for Broadcom FlexRM controller
      
       - constify data structures of callback functions in some drivers
      
       - a few bug fixes uncovered by multi-threaded use of mailbox channels
         in blocking mode
      
      * 'mailbox-for-next' of git://git.linaro.org/landing-teams/working/fujitsu/integration:
        mailbox: handle empty message in tx_tick
        mailbox: skip complete wait event if timer expired
        mailbox: always wait in mbox_send_message for blocking Tx mode
        mailbox: Remove depends on COMPILE_TEST for BCM_FLEXRM_MBOX
        mailbox: check ->last_tx_done for NULL in case of timer-based polling
        dt-bindings: Add DT bindings info for FlexRM ring manager
        mailbox: Add driver for Broadcom FlexRM ring manager
        dt-bindings: mailbox: Update doc with NSP PDC/mailbox support
        mailbox: bcm-pdc: Add Northstar Plus support to PDC driver
        mailbox: constify mbox_chan_ops structures
      477d7cae
    • Linus Torvalds's avatar
      Merge tag 'for-linux-4.12' of git://github.com/cminyard/linux-ipmi · 6fb41cbd
      Linus Torvalds authored
      Pull IPMI updates from Corey Minyard:
       "A few fixes of things in the IPMI area, the watchdog would have issues
        at panic time cause by a recently introduced change, a problem with
        device numbering, one possible panic in the I2C driver (destined for
        stable).
      
        Nothing earth-shattering, but some things that need to go in"
      
      * tag 'for-linux-4.12' of git://github.com/cminyard/linux-ipmi:
        ipmi/watchdog: fix wdog hang on panic waiting for ipmi response
        ipmi_si: use smi_num for init_name
        ipmi: bt-bmc: Add ast2500 compatible string
        ACPI / IPMI: change warning to debug on timeout
        ACPI / IPMI: allow ACPI_IPMI with IPMI_SSIF
        ipmi_ssif: use setup_timer
        ipmi: Fix kernel panic at ipmi_ssif_thread()
      6fb41cbd
    • Linus Torvalds's avatar
      Merge tag 'hsi-for-4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-hsi · 5c6ba7d5
      Linus Torvalds authored
      Pull HSI fix from Sebastian Reichel:
       "Fix double free fix in ssi-protocol"
      
      * tag 'hsi-for-4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-hsi:
        HSI: ssi_protocol: double free in ssip_pn_xmit()
      5c6ba7d5
    • Linus Torvalds's avatar
      Merge tag 'for-v4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply · 7f2ebde7
      Linus Torvalds authored
      Pull power supply and reset updates from Sebastian Reichel:
       "New drivers:
         - gemini-poweroff
         - cpcap-charger (for Motorola Droid 4)
         - battery-lego-ev3 (for LEGO Mindstorms EV3)
      
        New chip/feature support:
         - bq24190-charger: add runtime PM support
         - bq24190-charger: add bq24192i support
         - register masking for syscon-poweroff
      
        ... and misc small fixes & cleanups
      
      * tag 'for-v4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply: (29 commits)
        power: supply: bq24190_charger: Use new extcon_register_notifier_all()
        power: supply: bq24190_charger: Longer delay while polling reset flag
        power: supply: bq24190_charger: Uniform pm_runtime_get() failure handling
        power: supply: bq24190_charger: Clean up extcon code
        power: supply: bq24190_charger: Limit over/under voltage fault logging
        power: supply: New driver for LEGO MINDSTORMS EV3 battery
        dt-bindings: power: supply: New bindings for LEGO MINDSTORMS EV3 battery
        power: supply: tps65217: remove debug messages for function calls
        power: supply: ltc2941-battery-gauge: Add OF device ID table
        power: supply: ltc2941-battery-gauge: Add vendor to compatibles in binding
        power: supply: charger-manager: simplify return statements
        power: supply: lp8788: prevent out of bounds array access
        power: supply: cpcap-charger: Add minimal CPCAP PMIC battery charger
        power: supply: bq24190_charger: Use extcon to determine ilimit, 5v boost
        power: supply: bq24190_charger: Add support for bq24192i
        power: supply: bq24190_charger: Use i2c-core irq-mapping code
        power: bq24190_charger: mark PM functions as __maybe_unused
        power: supply: sbs-charger: simplified bool function
        power: supply: ab8500: Replaced spaces with tabs in indent
        power: supply: bq25890: Use gpiod_get()
        ...
      7f2ebde7