06 Aug, 2016

7 commits

  • Pull more KVM updates from Paolo Bonzini:
    - ARM bugfix and MSI injection support
    - x86 nested virt tweak and OOPS fix
    - Simplify pvclock code (vdso bits acked by Andy Lutomirski).

    * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm:
    nvmx: mark ept single context invalidation as supported
    nvmx: remove comment about missing nested vpid support
    KVM: lapic: fix access preemption timer stuff even if kernel_irqchip=off
    KVM: documentation: fix KVM_CAP_X2APIC_API information
    x86: vdso: use __pvclock_read_cycles
    pvclock: introduce seqcount-like API
    arm64: KVM: Set cpsr before spsr on fault injection
    KVM: arm: vgic-irqfd: Workaround changing kvm_set_routing_entry prototype
    KVM: arm/arm64: Enable MSI routing
    KVM: arm/arm64: Enable irqchip routing
    KVM: Move kvm_setup_default/empty_irq_routing declaration in arch specific header
    KVM: irqchip: Convey devid to kvm_set_msi
    KVM: Add devid in kvm_kernel_irq_routing_entry
    KVM: api: Pass the devid in the msi routing entry

    Linus Torvalds
     
  • Pull MIPS updates from Ralf Baechle:
    "This is the main pull request for MIPS for 4.8. Also includes is a
    minor SSB cleanup as SSB code traditionally is merged through the MIPS
    tree:

    ATH25:
    - MIPS: Add default configuration for ath25

    Boot:
    - For zboot, copy appended dtb to the end of the kernel
    - store the appended dtb address in a variable

    BPF:
    - Fix off by one error in offset allocation

    Cobalt code:
    - Fix typos

    Core code:
    - debugfs_create_file returns NULL on error, so don't use IS_ERR for
    testing for errors.
    - Fix double locking issue in RM7000 S-cache code. This would only
    affect RM7000 ARC systems on reboot.
    - Fix page table corruption on THP permission changes.
    - Use compat_sys_keyctl for 32 bit userspace on 64 bit kernels.
    David says, there are no compatibility issues raised by this fix.
    - Move some signal code around.
    - Rewrite r4k count/compare clockevent device registration such that
    min_delta_ticks/max_delta_ticks files are guaranteed to be
    initialized.
    - Only register r4k count/compare as clockevent device if we can
    assume the clock to be constant.
    - Fix MSA asm warnings in control reg accessors
    - uasm and tlbex fixes and tweaking.
    - Print segment physical address when EU=1.
    - Define AT_VECTOR_SIZE_ARCH for ARCH_DLINFO.
    - CP: Allow booting by VP other than VP 0
    - Cache handling fixes and optimizations for r4k class caches
    - Add hotplug support for R6 processors
    - Cleanup hotplug bits in kconfig
    - traps: return correct si code for accessing nonmapped addresses
    - Remove cpu_has_safe_index_cacheops

    Lantiq:
    - Register IRQ handler for virtual IRQ number
    - Fix EIU interrupt loading code
    - Use the real EXIN count
    - Fix build error.

    Loongson 3:
    - Increase HPET_MIN_PROG_DELTA and decrease HPET_MIN_CYCLES

    Octeon:
    - Delete built-in DTB pruning code for D-Link DSR-1000N.
    - Clean up GPIO definitions in dlink_dsr-1000n.dts.
    - Add more LEDs to the DSR-100n DTS
    - Fix off by one in octeon_irq_gpio_map()
    - Typo fixes
    - Enable SATA by default in cavium_octeon_defconfig
    - Support readq/writeq()
    - Remove forced mappings of USB interrupts.
    - Ensure DMA descriptors are always in the low 4GB
    - Improve USB reset code for OCTEON II.

    Pistachio:
    - Add maintainers entry for pistachio SoC Support
    - Remove plat_setup_iocoherency

    Ralink:
    - Fix pwm UART in spis group pinmux.

    SSB:
    - Change bare unsigned to unsigned int to suit coding style

    Tools:
    - Fix reloc tool compiler warnings.

    Other:
    - Delete use of ARCH_WANT_OPTIONAL_GPIOLIB"

    * 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus: (61 commits)
    MIPS: mm: Fix definition of R6 cache instruction
    MIPS: tools: Fix relocs tool compiler warnings
    MIPS: Cobalt: Fix typo
    MIPS: Octeon: Fix typo
    MIPS: Lantiq: Fix build failure
    MIPS: Use CPHYSADDR to implement mips32 __pa
    MIPS: Octeon: Dlink_dsr-1000n.dts: add more leds.
    MIPS: Octeon: Clean up GPIO definitions in dlink_dsr-1000n.dts.
    MIPS: Octeon: Delete built-in DTB pruning code for D-Link DSR-1000N.
    MIPS: store the appended dtb address in a variable
    MIPS: ZBOOT: copy appended dtb to the end of the kernel
    MIPS: ralink: fix spis group pinmux
    MIPS: Factor o32 specific code into signal_o32.c
    MIPS: non-exec stack & heap when non-exec PT_GNU_STACK is present
    MIPS: Use per-mm page to execute branch delay slot instructions
    MIPS: Modify error handling
    MIPS: c-r4k: Use SMP calls for CM indexed cache ops
    MIPS: c-r4k: Avoid small flush_icache_range SMP calls
    MIPS: c-r4k: Local flush_icache_range cache op override
    MIPS: c-r4k: Split r4k_flush_kernel_vmap_range()
    ...

    Linus Torvalds
     
  • Pull perf updates from Ingo Molnar:
    "Mostly tooling fixes and some late tooling updates, plus two perf
    related printk message fixes"

    * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    perf tests bpf: Use SyS_epoll_wait alias
    perf tests: objdump output can contain multi byte chunks
    perf record: Add --sample-cpu option
    perf hists: Introduce output_resort_cb method
    perf tools: Move config/Makefile into Makefile.config
    perf tests: Add test for bitmap_scnprintf function
    tools lib: Add bitmap_and function
    tools lib: Add bitmap_scnprintf function
    tools lib: Add bitmap_alloc function
    tools lib traceevent: Ignore generated library files
    perf tools: Fix build failure on perl script context
    perf/core: Change log level for duration warning to KERN_INFO
    perf annotate: Plug filename string leak
    perf annotate: Introduce strerror for handling symbol__disassemble() errors
    perf annotate: Rename symbol__annotate() to symbol__disassemble()
    perf/x86: Modify error message in virtualized environment
    perf target: str_error_r() always returns the buffer it receives
    perf annotate: Use pipe + fork instead of popen
    perf evsel: Introduce constructor for cycles event

    Linus Torvalds
     
  • Pull x86 fixes from Ingo Molnar:
    "Two fixes and a cleanup-fix, to the syscall entry code and to ptrace"

    * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    x86/syscalls/64: Add compat_sys_keyctl for 32-bit userspace
    x86/ptrace: Stop setting TS_COMPAT in ptrace code
    x86/vdso: Error out if the vDSO isn't a valid DSO

    Linus Torvalds
     
  • Pull arch/sh updates from Rich Felker:
    "These changes improve device tree support (including builtin DTB), add
    support for the J-Core J2 processor, an open source synthesizable
    reimplementation of the SH-2 ISA, resolve a longstanding sigcontext
    ABI mismatch issue, and fix various bugs including nommu-specific
    issues and minor regressions introduced in 4.6.

    The J-Core arch support is included here but to be usable it needs
    drivers that are waiting on approval/inclusion from their subsystem
    maintainers"

    * tag 'sh-for-4.8' of git://git.libc.org/linux-sh: (23 commits)
    sh: add device tree source for J2 FPGA on Mimas v2 board
    sh: add defconfig for J-Core J2
    sh: use common clock framework with device tree boards
    sh: system call wire up
    sh: Delete unnecessary checks before the function call "mempool_destroy"
    sh: do not perform IPI-based cache flush except on boards that need it
    sh: add SMP support for J2
    sh: SMP support for SH2 entry.S
    sh: add working futex atomic ops on userspace addresses for smp
    sh: add J2 atomics using the cas.l instruction
    sh: add AT_HWCAP flag for J-Core cas.l instruction
    sh: add support for J-Core J2 processor
    sh: fix build regression with CONFIG_OF && !CONFIG_OF_FLATTREE
    sh: allow clocksource drivers to register sched_clock backends
    sh: make heartbeat driver explicitly non-modular
    sh: make board-secureedge5410 explicitly non-modular
    sh: make mm/asids-debugfs explicitly non-modular
    sh: make time.c explicitly non-modular
    sh: fix futex/robust_list on nommu models
    sh: disable aliased page logic on NOMMU models
    ...

    Linus Torvalds
     
  • Pull arm64 fixes from Will Deacon:

    - fix HugeTLB leak due to CoW and PTE_RDONLY mismatch

    - avoid accessing unmapped FDT fields when checking validity

    - correctly account for vDSO AUX entry in ARCH_DLINFO

    - fix kallsyms with absolute expressions in linker script

    - kill unnecessary symbol-based relocs in vmlinux

    * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux:
    arm64: Fix copy-on-write referencing in HugeTLB
    arm64: mm: avoid fdt_check_header() before the FDT is fully mapped
    arm64: Define AT_VECTOR_SIZE_ARCH for ARCH_DLINFO
    arm64: relocatable: suppress R_AARCH64_ABS64 relocations in vmlinux
    arm64: vmlinux.lds: make __rela_offset and __dynsym_offset ABSOLUTE

    Linus Torvalds
     
  • Pull more power management updates from Rafael Wysocki:
    "A few more fixes and cleanups in the x86-64 low-level hibernation
    code, PM core, cpufreq (Kconfig and intel_pstate), and the operating
    points framework.

    Specifics:

    - Prevent the low-level assembly hibernate code on x86-64 from
    referring to __PAGE_OFFSET directly as a symbol which doesn't work
    when the kernel identity mapping base is randomized, in which case
    __PAGE_OFFSET is a variable (Rafael Wysocki).

    - Avoid selecting CPU_FREQ_STAT by default as the statistics are not
    required for proper cpufreq operation (Borislav Petkov).

    - Add Skylake-X and Broadwell-X IDs to the intel_pstate's list of
    processors where out-of-band (OBB) control of P-states is possible
    and if that is in use, intel_pstate should not attempt to manage
    P-states (Srinivas Pandruvada).

    - Drop some unnecessary checks from the wakeup IRQ handling code in
    the PM core (Markus Elfring).

    - Reduce the number operating performance point (OPP) lookups in one
    of the OPP framework's helper functions (Jisheng Zhang)"

    * tag 'pm-extra-4.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
    x86/power/64: Do not refer to __PAGE_OFFSET from assembly code
    cpufreq: Do not default-yes CPU_FREQ_STAT
    cpufreq: intel_pstate: Add more out-of-band IDs
    PM / OPP: optimize dev_pm_opp_set_rate() performance a bit
    PM-wakeup: Delete unnecessary checks before three function calls

    Linus Torvalds
     

05 Aug, 2016

22 commits

  • Pull RTC updates from Alexandre Belloni:
    "RTC for 4.8

    Cleanups:
    - huge cleanup of rtc-generic and char/genrtc this allowed to cleanup
    rtc-cmos, rtc-sh, rtc-m68k, rtc-powerpc and rtc-parisc
    - move mn10300 to rtc-cmos

    Subsystem:
    - fix wakealarms after hibernate
    - multiples fixes for rctest
    - simplify implementations of .read_alarm

    New drivers:
    - Maxim MAX6916

    Drivers:
    - ds1307: fix weekday
    - m41t80: add wakeup support
    - pcf85063: add support for PCF85063A variant
    - rv8803: extend i2c fix and other fixes
    - s35390a: fix alarm reading, this fixes instant reboot after
    shutdown for QNAP TS-41x
    - s3c: clock fixes"

    * tag 'rtc-4.8' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux: (65 commits)
    rtc: rv8803: Clear V1F when setting the time
    rtc: rv8803: Stop the clock while setting the time
    rtc: rv8803: Always apply the I²C workaround
    rtc: rv8803: Fix read day of week
    rtc: rv8803: Remove the check for valid time
    rtc: rv8803: Kconfig: Indicate rx8900 support
    rtc: asm9260: remove .owner field for driver
    rtc: at91sam9: Fix missing spin_lock_init()
    rtc: m41t80: add suspend handlers for alarm IRQ
    rtc: m41t80: make it a real error message
    rtc: pcf85063: Add support for the PCF85063A device
    rtc: pcf85063: fix year range
    rtc: hym8563: in .read_alarm set .tm_sec to 0 to signal minute accuracy
    rtc: explicitly set tm_sec = 0 for drivers with minute accurancy
    rtc: s3c: Add s3c_rtc_{enable/disable}_clk in s3c_rtc_setfreq()
    rtc: s3c: Remove unnecessary call to disable already disabled clock
    rtc: abx80x: use devm_add_action_or_reset()
    rtc: m41t80: use devm_add_action_or_reset()
    rtc: fix a typo and reduce three empty lines to one
    rtc: s35390a: improve two comments in .set_alarm
    ...

    Linus Torvalds
     
  • * pm-sleep:
    x86/power/64: Do not refer to __PAGE_OFFSET from assembly code

    * pm-cpufreq:
    cpufreq: Do not default-yes CPU_FREQ_STAT
    cpufreq: intel_pstate: Add more out-of-band IDs

    * pm-core:
    PM-wakeup: Delete unnecessary checks before three function calls

    * pm-opp:
    PM / OPP: optimize dev_pm_opp_set_rate() performance a bit

    Rafael J. Wysocki
     
  • Pull more powerpc updates from Michael Ellerman:
    "These were delayed for various reasons, so I let them sit in next a
    bit longer, rather than including them in my first pull request.

    Fixes:
    - Fix early access to cpu_spec relocation from Benjamin Herrenschmidt
    - Fix incorrect event codes in power9-event-list from Madhavan Srinivasan
    - Move register_process_table() out of ppc_md from Michael Ellerman

    Use jump_label use for [cpu|mmu]_has_feature():
    - Add mmu_early_init_devtree() from Michael Ellerman
    - Move disable_radix handling into mmu_early_init_devtree() from Michael Ellerman
    - Do hash device tree scanning earlier from Michael Ellerman
    - Do radix device tree scanning earlier from Michael Ellerman
    - Do feature patching before MMU init from Michael Ellerman
    - Check features don't change after patching from Michael Ellerman
    - Make MMU_FTR_RADIX a MMU family feature from Aneesh Kumar K.V
    - Convert mmu_has_feature() to returning bool from Michael Ellerman
    - Convert cpu_has_feature() to returning bool from Michael Ellerman
    - Define radix_enabled() in one place & use static inline from Michael Ellerman
    - Add early_[cpu|mmu]_has_feature() from Michael Ellerman
    - Convert early cpu/mmu feature check to use the new helpers from Aneesh Kumar K.V
    - jump_label: Make it possible for arches to invoke jump_label_init() earlier from Kevin Hao
    - Call jump_label_init() in apply_feature_fixups() from Aneesh Kumar K.V
    - Remove mfvtb() from Kevin Hao
    - Move cpu_has_feature() to a separate file from Kevin Hao
    - Add kconfig option to use jump labels for cpu/mmu_has_feature() from Michael Ellerman
    - Add option to use jump label for cpu_has_feature() from Kevin Hao
    - Add option to use jump label for mmu_has_feature() from Kevin Hao
    - Catch usage of cpu/mmu_has_feature() before jump label init from Aneesh Kumar K.V
    - Annotate jump label assembly from Michael Ellerman

    TLB flush enhancements from Aneesh Kumar K.V:
    - radix: Implement tlb mmu gather flush efficiently
    - Add helper for finding SLBE LLP encoding
    - Use hugetlb flush functions
    - Drop multiple definition of mm_is_core_local
    - radix: Add tlb flush of THP ptes
    - radix: Rename function and drop unused arg
    - radix/hugetlb: Add helper for finding page size
    - hugetlb: Add flush_hugetlb_tlb_range
    - remove flush_tlb_page_nohash

    Add new ptrace regsets from Anshuman Khandual and Simon Guo:
    - elf: Add powerpc specific core note sections
    - Add the function flush_tmregs_to_thread
    - Enable in transaction NT_PRFPREG ptrace requests
    - Enable in transaction NT_PPC_VMX ptrace requests
    - Enable in transaction NT_PPC_VSX ptrace requests
    - Adapt gpr32_get, gpr32_set functions for transaction
    - Enable support for NT_PPC_CGPR
    - Enable support for NT_PPC_CFPR
    - Enable support for NT_PPC_CVMX
    - Enable support for NT_PPC_CVSX
    - Enable support for TM SPR state
    - Enable NT_PPC_TM_CTAR, NT_PPC_TM_CPPR, NT_PPC_TM_CDSCR
    - Enable support for NT_PPPC_TAR, NT_PPC_PPR, NT_PPC_DSCR
    - Enable support for EBB registers
    - Enable support for Performance Monitor registers"

    * tag 'powerpc-4.8-2' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: (48 commits)
    powerpc/mm: Move register_process_table() out of ppc_md
    powerpc/perf: Fix incorrect event codes in power9-event-list
    powerpc/32: Fix early access to cpu_spec relocation
    powerpc/ptrace: Enable support for Performance Monitor registers
    powerpc/ptrace: Enable support for EBB registers
    powerpc/ptrace: Enable support for NT_PPPC_TAR, NT_PPC_PPR, NT_PPC_DSCR
    powerpc/ptrace: Enable NT_PPC_TM_CTAR, NT_PPC_TM_CPPR, NT_PPC_TM_CDSCR
    powerpc/ptrace: Enable support for TM SPR state
    powerpc/ptrace: Enable support for NT_PPC_CVSX
    powerpc/ptrace: Enable support for NT_PPC_CVMX
    powerpc/ptrace: Enable support for NT_PPC_CFPR
    powerpc/ptrace: Enable support for NT_PPC_CGPR
    powerpc/ptrace: Adapt gpr32_get, gpr32_set functions for transaction
    powerpc/ptrace: Enable in transaction NT_PPC_VSX ptrace requests
    powerpc/ptrace: Enable in transaction NT_PPC_VMX ptrace requests
    powerpc/ptrace: Enable in transaction NT_PRFPREG ptrace requests
    powerpc/process: Add the function flush_tmregs_to_thread
    elf: Add powerpc specific core note sections
    powerpc/mm: remove flush_tlb_page_nohash
    powerpc/mm/hugetlb: Add flush_hugetlb_tlb_range
    ...

    Linus Torvalds
     
  • Pull metag architecture updates from James Hogan:
    "Just a few minor fixes:

    - Fix another incorrect inline asm register constraint, which has
    been lying quietly for 5 and a half years before finally causing
    build breakage during this merge window.

    - Removal of duplicated KERN_INFO from Joe Perches

    - Typo fixes from Andrea Gelmini"

    * tag 'metag-for-v4.8' of git://git.kernel.org/pub/scm/linux/kernel/git/jhogan/metag:
    metag: Fix __cmpxchg_u32 asm constraint for CMP
    metag: Remove duplicate KERN_ prefix
    metag: Fix typos

    Linus Torvalds
     
  • Signed-off-by: Rich Felker

    Rich Felker
     
  • This defconfig is intended not to be specific to a particular board;
    it enables drivers for all currently-supported hardware, and should be
    updated to include additional drivers as they are added.

    Signed-off-by: Rich Felker

    Rich Felker
     
  • Enable common clk framework for DT-based boards and disable code that
    depends on the legacy sh clk framework when common clk is enabled.
    Once legacy drivers are converted over, the old code can be removed
    entirely.

    Signed-off-by: Rich Felker

    Rich Felker
     
  • Signed-off-by: Yoshinori Sato
    Signed-off-by: Rich Felker

    Yoshinori Sato
     
  • The mempool_destroy() function tests whether its argument is NULL
    and then returns immediately. Thus the test around the calls is not needed.

    This issue was detected by using the Coccinelle software.

    Signed-off-by: Markus Elfring
    Signed-off-by: Rich Felker

    Markus Elfring
     
  • Signed-off-by: Rich Felker

    Rich Felker
     
  • Support is hooked up via a cpu start method specified in the device
    tree, and also depends on DT nodes that describe the interfaces for
    performing IPI and identifying which cpu execution is taking place on.
    The currently used method is a form of spin table, where secondary
    cpus are unblocked by writing to a special address.

    Signed-off-by: Rich Felker

    Rich Felker
     
  • The SH2 version of entry.S uses global variables, which need to be
    cpu-local in order to work with SMP. For ease of access from asm,
    simply use arrays indexed by cpu number, and require the availability
    of an address (mmio register or properly setup per-cpu memory) from
    which the current cpu's index can be read.

    Signed-off-by: Rich Felker

    Rich Felker
     
  • The version of futex.h in asm-generic should really be adapted to do
    the same thing so that this hideous code does not have to be
    duplicated per-arch.

    Signed-off-by: Rich Felker

    Rich Felker
     
  • Signed-off-by: Rich Felker

    Rich Felker
     
  • The J-Core cpu has, as an ISA extension, an atomic compare-and-swap
    instruction cas.l which applications need to use (instead the imask or
    gusa atomic models, which are fundamentally limited to UP) for
    synchronization in order to be compatible with SMP systems. Provide a
    hwcap flag so that it's possible to do runtime selection and support
    both.

    Signed-off-by: Rich Felker

    Rich Felker
     
  • At the CPU/ISA level, the J2 is compatible with SH-2, and thus the
    changes to add J2 support build on existing SH-2 support. However, J2
    does not duplicate the memory-mapped SH-2 features like the cache
    interface. Instead, the cache interfaces is described in the device
    tree, and new code is added to be able to access the flat device tree
    at early boot before it is unflattened.

    Support is also added for receiving interrupts on trap numbers in the
    range 16 to 31, since the J-Core aic1 interrupt controller generates
    these traps. This range was unused but nominally for hardware
    exceptions on SH-2, and a few values in this range were used for
    exceptions on SH-2A, but SH-2A has its own version of the relevant
    code.

    No individual cpu subtypes are added for J2 since the intent moving
    forward is to represent SoCs with device tree rather than as
    hard-coded subtypes in the kernel. The CPU_SUBTYPE_J2 Kconfig item
    exists only to fit into the existing cpu selection mechanism until it
    is overhauled.

    Signed-off-by: Rich Felker

    Rich Felker
     
  • Merge misc fixes from Andrew Morton:
    "A few late-breaking fixes"

    * emailed patches from Andrew Morton :
    mm/memblock.c: fix NULL dereference error
    MAINTAINERS: update cgroup's document path
    slub: drop bogus inline for fixup_red_left()
    powerpc/fsl_rio: fix a missing error code
    mm: initialise per_cpu_nodestats for all online pgdats at boot
    mm/memblock: fix a typo in a comment
    mm: disable CONFIG_MEMORY_HOTPLUG when KASAN is enabled

    Linus Torvalds
     
  • We should set the error code here rather than incorrectly returning 0.
    Otherwise static checkers complain.

    Link: http://lkml.kernel.org/r/20160804053525.GM775@mwanda
    Signed-off-by: Dan Carpenter
    Cc: Benjamin Herrenschmidt
    Cc: Paul Mackerras
    Cc: Michael Ellerman
    Cc: Alexandre Bounine
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Dan Carpenter
     
  • Pull UML updates from Richard Weinberger:
    "Beside of various fixes this also contains patches to enable features
    such was Kcov, kmemleak and TRACE_IRQFLAGS_SUPPORT on UML"

    * 'for-linus-4.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml:
    hostfs: Freeing an ERR_PTR in hostfs_fill_sb_common()
    um: Support kcov
    um: Enable TRACE_IRQFLAGS_SUPPORT
    um: Use asm-generic/irqflags.h
    um: Fix possible deadlock in sig_handler_common()
    um: Select HAVE_DEBUG_KMEMLEAK
    um: Setup physical memory in setup_arch()
    um: Eliminate null test after alloc_bootmem

    Linus Torvalds
     
  • Pull parisc updates from Helge Deller:

    - added an optimized hash implementation for parisc (George Spelvin)

    - C99 style cleanups in iomap.c (Amitoj Kaur Chawla)

    - added breaks to switch statement in PDC function (noticed by Dan
    Carpenter)

    * 'parisc-4.8-1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux:
    parisc: Change structure intialisation to C99 style in iomap.c
    parisc: Add break statements to pdc_pat_io_pci_cfg_read()
    parisc: Add

    Linus Torvalds
     
  • Pull m68knommu updates from Greg Ungerer:
    "This series is all about Nicolas flat format support for MMU systems.

    Traditional m68k no-MMU flat format binaries can now be run on m68k
    MMU enabled systems too. The series includes some nice cleanups of
    the binfmt_flat code and converts it to using proper user space
    accessor functions.

    With all this in place you can boot and run a complete no-MMU flat
    format based user space on an MMU enabled system"

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu:
    m68k: enable binfmt_flat on systems with an MMU
    binfmt_flat: allow compressed flat binary format to work on MMU systems
    binfmt_flat: add MMU-specific support
    binfmt_flat: update libraries' data segment pointer with userspace accessors
    binfmt_flat: use clear_user() rather than memset() to clear .bss
    binfmt_flat: use proper user space accessors with old relocs code
    binfmt_flat: use proper user space accessors with relocs processing code
    binfmt_flat: clean up create_flat_tables() and stack accesses
    binfmt_flat: use generic transfer_args_to_stack()
    elf_fdpic_transfer_args_to_stack(): make it generic
    binfmt_flat: prevent kernel dammage from corrupted executable headers
    binfmt_flat: convert printk invocations to their modern form
    binfmt_flat: assorted cleanups
    m68k: use same start_thread() on MMU and no-MMU
    m68k: fix file path comment
    m68k: fix bFLT executable running on MMU enabled systems

    Linus Torvalds
     
  • The LNKGET based atomic sequence in __cmpxchg_u32 has slightly incorrect
    constraints for the return value which under certain circumstances can
    allow an address unit register to be used as the first operand of a CMP
    instruction. This isn't a valid instruction however as the encodings
    only allow a data unit to be specified. This would result in an
    assembler error like the following:

    Error: failed to assemble instruction: "CMP A0.2,D0Ar6"

    Fix by changing the constraint from "=&da" (assigned, early clobbered,
    data or address unit register) to "=&d" (data unit register only).

    The constraint for the second operand, "bd" (an op2 register where op1
    is a data unit register and the instruction supports O2R) is already
    correct assuming the first operand is a data unit register.

    Other cases of CMP in inline asm have had their constraints checked, and
    appear to all be fine.

    Fixes: 6006c0d8ce94 ("metag: Atomics, locks and bitops")
    Signed-off-by: James Hogan
    Cc: linux-metag@vger.kernel.org
    Cc: # 3.9.x-

    James Hogan
     

04 Aug, 2016

11 commits

  • The jump table can reference text found in an __exit section. Thus,
    instead of discarding it at build time, include EXIT_TEXT as part of
    __init and it will be released when the system boots.

    Link: http://lkml.kernel.org/r/60284113bb759121e8ae3e99af1535647e52123f.1467837322.git.jbaron@akamai.com
    Signed-off-by: Jason Baron
    Cc: Arnd Bergmann
    Cc: "David S. Miller"
    Cc: Benjamin Herrenschmidt
    Cc: Chris Metcalf
    Cc: Heiko Carstens
    Cc: Joe Perches
    Cc: Martin Schwidefsky
    Cc: Michael Ellerman
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jason Baron
     
  • Previously, all the __exit sections were just dropped by the link phase.
    However, if there are static_key (jump label) constructs in __exit
    sections that are not modules, the link fails with the message:

    `.exit.text' referenced in section `__jump_table' of xxx.o:
    defined in discarded section `.exit.text' of xxx.o

    Support this usage by keeping the .exit.text sections in the final image
    if JUMP_LABEL is defined, then discarding them once initialization is
    complete.

    Link: http://lkml.kernel.org/r/bfd7c107c610c30e992868ebfe2a5d796a097464.1467837322.git.jbaron@akamai.com
    Signed-off-by: Jason Baron
    Signed-off-by: Chris Metcalf
    Cc: "David S. Miller"
    Cc: Arnd Bergmann
    Cc: Benjamin Herrenschmidt
    Cc: Heiko Carstens
    Cc: Joe Perches
    Cc: Martin Schwidefsky
    Cc: Michael Ellerman
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Chris Metcalf
     
  • The jump table can reference text found in an __exit section. Thus,
    instead of discarding it at build/link time, include EXIT_TEXT as part
    of __init and release it at system boot time.

    Without this patch the link fails with:

    `.exit.text' referenced in section `__jump_table' of xxx.o:
    defined in discarded section `.exit.text' of xxx.o

    Link: http://lkml.kernel.org/r/d822da427ab07a02a394602eca687104ff682f83.1467837322.git.jbaron@akamai.com
    Signed-off-by: Jason Baron
    Cc: "David S. Miller"
    Cc: Arnd Bergmann
    Cc: Benjamin Herrenschmidt
    Cc: Chris Metcalf
    Cc: Heiko Carstens
    Cc: Joe Perches
    Cc: Martin Schwidefsky
    Cc: Michael Ellerman
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jason Baron
     
  • The stringify_in_c() macro may not be included. Make the dependency
    explicit.

    Link: http://lkml.kernel.org/r/564720c5328edd53c9d56db325be7215440eec3e.1467837322.git.jbaron@akamai.com
    Signed-off-by: Jason Baron
    Cc: Benjamin Herrenschmidt
    Cc: Paul Mackerras
    Cc: Michael Ellerman
    Cc: Peter Zijlstra
    Cc: Joe Perches
    Cc: "David S. Miller"
    Cc: Arnd Bergmann
    Cc: Chris Metcalf
    Cc: Heiko Carstens
    Cc: Joe Perches
    Cc: Martin Schwidefsky
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jason Baron
     
  • The dma-mapping core and the implementations do not change the DMA
    attributes passed by pointer. Thus the pointer can point to const data.
    However the attributes do not have to be a bitfield. Instead unsigned
    long will do fine:

    1. This is just simpler. Both in terms of reading the code and setting
    attributes. Instead of initializing local attributes on the stack
    and passing pointer to it to dma_set_attr(), just set the bits.

    2. It brings safeness and checking for const correctness because the
    attributes are passed by value.

    Semantic patches for this change (at least most of them):

    virtual patch
    virtual context

    @r@
    identifier f, attrs;

    @@
    f(...,
    - struct dma_attrs *attrs
    + unsigned long attrs
    , ...)
    {
    ...
    }

    @@
    identifier r.f;
    @@
    f(...,
    - NULL
    + 0
    )

    and

    // Options: --all-includes
    virtual patch
    virtual context

    @r@
    identifier f, attrs;
    type t;

    @@
    t f(..., struct dma_attrs *attrs);

    @@
    identifier r.f;
    @@
    f(...,
    - NULL
    + 0
    )

    Link: http://lkml.kernel.org/r/1468399300-5399-2-git-send-email-k.kozlowski@samsung.com
    Signed-off-by: Krzysztof Kozlowski
    Acked-by: Vineet Gupta
    Acked-by: Robin Murphy
    Acked-by: Hans-Christian Noren Egtvedt
    Acked-by: Mark Salter [c6x]
    Acked-by: Jesper Nilsson [cris]
    Acked-by: Daniel Vetter [drm]
    Reviewed-by: Bart Van Assche
    Acked-by: Joerg Roedel [iommu]
    Acked-by: Fabien Dessenne [bdisp]
    Reviewed-by: Marek Szyprowski [vb2-core]
    Acked-by: David Vrabel [xen]
    Acked-by: Konrad Rzeszutek Wilk [xen swiotlb]
    Acked-by: Joerg Roedel [iommu]
    Acked-by: Richard Kuo [hexagon]
    Acked-by: Geert Uytterhoeven [m68k]
    Acked-by: Gerald Schaefer [s390]
    Acked-by: Bjorn Andersson
    Acked-by: Hans-Christian Noren Egtvedt [avr32]
    Acked-by: Vineet Gupta [arc]
    Acked-by: Robin Murphy [arm64 and dma-iommu]
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Krzysztof Kozlowski
     
  • The use of config_enabled() against config options is ambiguous. In
    practical terms, config_enabled() is equivalent to IS_BUILTIN(), but the
    author might have used it for the meaning of IS_ENABLED(). Using
    IS_ENABLED(), IS_BUILTIN(), IS_MODULE() etc. makes the intention
    clearer.

    This commit replaces config_enabled() with IS_ENABLED() where possible.
    This commit is only touching bool config options.

    I noticed two cases where config_enabled() is used against a tristate
    option:

    - config_enabled(CONFIG_HWMON)
    [ drivers/net/wireless/ath/ath10k/thermal.c ]

    - config_enabled(CONFIG_BACKLIGHT_CLASS_DEVICE)
    [ drivers/gpu/drm/gma500/opregion.c ]

    I did not touch them because they should be converted to IS_BUILTIN()
    in order to keep the logic, but I was not sure it was the authors'
    intention.

    Link: http://lkml.kernel.org/r/1465215656-20569-1-git-send-email-yamada.masahiro@socionext.com
    Signed-off-by: Masahiro Yamada
    Acked-by: Kees Cook
    Cc: Stas Sergeev
    Cc: Matt Redfearn
    Cc: Joshua Kinard
    Cc: Jiri Slaby
    Cc: Bjorn Helgaas
    Cc: Borislav Petkov
    Cc: Markos Chandras
    Cc: "Dmitry V. Levin"
    Cc: yu-cheng yu
    Cc: James Hogan
    Cc: Brian Gerst
    Cc: Johannes Berg
    Cc: Peter Zijlstra
    Cc: Al Viro
    Cc: Will Drewry
    Cc: Nikolay Martynov
    Cc: Huacai Chen
    Cc: "H. Peter Anvin"
    Cc: Thomas Gleixner
    Cc: Daniel Borkmann
    Cc: Leonid Yegoshin
    Cc: Rafal Milecki
    Cc: James Cowgill
    Cc: Greg Kroah-Hartman
    Cc: Ralf Baechle
    Cc: Alex Smith
    Cc: Adam Buchbinder
    Cc: Qais Yousef
    Cc: Jiang Liu
    Cc: Mikko Rapeli
    Cc: Paul Gortmaker
    Cc: Denys Vlasenko
    Cc: Brian Norris
    Cc: Hidehiro Kawai
    Cc: "Luis R. Rodriguez"
    Cc: Andy Lutomirski
    Cc: Ingo Molnar
    Cc: Dave Hansen
    Cc: "Kirill A. Shutemov"
    Cc: Roland McGrath
    Cc: Paul Burton
    Cc: Kalle Valo
    Cc: Viresh Kumar
    Cc: Tony Wu
    Cc: Huaitong Han
    Cc: Sumit Semwal
    Cc: Alexei Starovoitov
    Cc: Juergen Gross
    Cc: Jason Cooper
    Cc: "David S. Miller"
    Cc: Oleg Nesterov
    Cc: Andrea Gelmini
    Cc: David Woodhouse
    Cc: Marc Zyngier
    Cc: Rabin Vincent
    Cc: "Maciej W. Rozycki"
    Cc: David Daney
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Masahiro Yamada
     
  • set_pte_at(.) will set or unset the PTE_RDONLY hardware bit before
    writing the entry to the table.

    This can cause problems with the copy-on-write logic in hugetlb_cow:
    *) hugetlb_cow(.) called to handle a write fault on read only pte,
    *) Before the copy-on-write updates the new page table a call is
    made to pte_same(huge_ptep_get(ptep), pte)), to check for a race,
    *) Because set_pte_at(.) changed the pte, *ptep != pte, and the
    hugetlb_cow(.) code erroneously assumes that it lost the race,
    *) The new page is subsequently freed without being used.

    On arm64 this problem only becomes apparent when we apply:
    67961f9 mm/hugetlb: fix huge page reserve accounting for private
    mappings

    When one runs the libhugetlbfs test suite, there are allocation errors
    and hugetlbfs pages become erroneously locked in memory as reserved.
    (There is a high HugePages_Rsvd: count).

    In this patch we introduce pte_same which ignores the PTE_RDONLY bit,
    allowing for the libhugetlbfs test suite to pass as expected and
    without leaking any reserved HugeTLB pages.

    Reported-by: Huang Shijie
    Signed-off-by: Steve Capper
    Signed-off-by: Will Deacon

    Steve Capper
     
  • Commit 4b855078601f ("KVM: nVMX: Don't advertise single
    context invalidation for invept") removed advertising
    single context invalidation since the spec does not mandate it.
    However, some hypervisors (such as ESX) require it to be present
    before willing to use ept in a nested environment. Advertise it
    and fallback to the global case.

    Signed-off-by: Bandan Das
    Signed-off-by: Paolo Bonzini

    Bandan Das
     
  • Nested vpid is already supported and both single/global
    modes are advertised to the guest

    Signed-off-by: Bandan Das
    Signed-off-by: Paolo Bonzini

    Bandan Das
     
  • BUG: unable to handle kernel NULL pointer dereference at 000000000000008c
    IP: [] kvm_lapic_hv_timer_in_use+0x10/0x20 [kvm]
    PGD 0
    Oops: 0000 [#1] SMP
    Call Trace:
    kvm_arch_vcpu_load+0x86/0x260 [kvm]
    vcpu_load+0x46/0x60 [kvm]
    kvm_vcpu_ioctl+0x79/0x7c0 [kvm]
    ? __lock_is_held+0x54/0x70
    do_vfs_ioctl+0x96/0x6a0
    ? __fget_light+0x2a/0x90
    SyS_ioctl+0x79/0x90
    do_syscall_64+0x7c/0x1e0
    entry_SYSCALL64_slow_path+0x25/0x25
    RIP [] kvm_lapic_hv_timer_in_use+0x10/0x20 [kvm]
    RSP
    CR2: 000000000000008c
    ---[ end trace a55fb79d2b3b4ee8 ]---

    This can be reproduced steadily by kernel_irqchip=off.

    We should not access preemption timer stuff if lapic is emulated in userspace.
    This patch fix it by avoiding access preemption timer stuff when kernel_irqchip=off.

    Cc: Paolo Bonzini
    Cc: Radim Krčmář
    Cc: Yunhong Jiang
    Signed-off-by: Wanpeng Li
    Signed-off-by: Paolo Bonzini

    Wanpeng Li
     
  • …it/kvmarm/kvmarm into HEAD

    KVM/ARM Changes for v4.8 - Take 2

    Includes GSI routing support to go along with the new VGIC and a small fix that
    has been cooking in -next for a while.

    Paolo Bonzini