12 Oct, 2016

8 commits

  • Daniel Walker reported problems which happens when
    crash_kexec_post_notifiers kernel option is enabled
    (https://lkml.org/lkml/2015/6/24/44).

    In that case, smp_send_stop() is called before entering kdump routines
    which assume other CPUs are still online. As the result, kdump
    routines fail to save other CPUs' registers. Additionally for MIPS
    OCTEON, it misses to stop the watchdog timer.

    To fix this problem, call a new kdump friendly function,
    crash_smp_send_stop(), instead of the smp_send_stop() when
    crash_kexec_post_notifiers is enabled. crash_smp_send_stop() is a
    weak function, and it just call smp_send_stop(). Architecture
    codes should override it so that kdump can work appropriately.
    This patch provides MIPS version.

    Fixes: f06e5153f4ae (kernel/panic.c: add "crash_kexec_post_notifiers" option)
    Link: http://lkml.kernel.org/r/20160810080950.11028.28000.stgit@sysi4-13.yrl.intra.hitachi.co.jp
    Signed-off-by: Hidehiro Kawai
    Reported-by: Daniel Walker
    Cc: Dave Young
    Cc: Baoquan He
    Cc: Vivek Goyal
    Cc: Eric Biederman
    Cc: Masami Hiramatsu
    Cc: Daniel Walker
    Cc: Xunlei Pang
    Cc: Thomas Gleixner
    Cc: Ingo Molnar
    Cc: "H. Peter Anvin"
    Cc: Borislav Petkov
    Cc: David Vrabel
    Cc: Toshi Kani
    Cc: Ralf Baechle
    Cc: David Daney
    Cc: Aaro Koskinen
    Cc: "Steven J. Hill"
    Cc: Corey Minyard
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Hidehiro Kawai
     
  • Daniel Walker reported problems which happens when
    crash_kexec_post_notifiers kernel option is enabled
    (https://lkml.org/lkml/2015/6/24/44).

    In that case, smp_send_stop() is called before entering kdump routines
    which assume other CPUs are still online. As the result, for x86, kdump
    routines fail to save other CPUs' registers and disable virtualization
    extensions.

    To fix this problem, call a new kdump friendly function,
    crash_smp_send_stop(), instead of the smp_send_stop() when
    crash_kexec_post_notifiers is enabled. crash_smp_send_stop() is a weak
    function, and it just call smp_send_stop(). Architecture codes should
    override it so that kdump can work appropriately. This patch only
    provides x86-specific version.

    For Xen's PV kernel, just keep the current behavior.

    NOTES:

    - Right solution would be to place crash_smp_send_stop() before
    __crash_kexec() invocation in all cases and remove smp_send_stop(), but
    we can't do that until all architectures implement own
    crash_smp_send_stop()

    - crash_smp_send_stop()-like work is still needed by
    machine_crash_shutdown() because crash_kexec() can be called without
    entering panic()

    Fixes: f06e5153f4ae (kernel/panic.c: add "crash_kexec_post_notifiers" option)
    Link: http://lkml.kernel.org/r/20160810080948.11028.15344.stgit@sysi4-13.yrl.intra.hitachi.co.jp
    Signed-off-by: Hidehiro Kawai
    Reported-by: Daniel Walker
    Cc: Dave Young
    Cc: Baoquan He
    Cc: Vivek Goyal
    Cc: Eric Biederman
    Cc: Masami Hiramatsu
    Cc: Daniel Walker
    Cc: Xunlei Pang
    Cc: Thomas Gleixner
    Cc: Ingo Molnar
    Cc: "H. Peter Anvin"
    Cc: Borislav Petkov
    Cc: David Vrabel
    Cc: Toshi Kani
    Cc: Ralf Baechle
    Cc: David Daney
    Cc: Aaro Koskinen
    Cc: "Steven J. Hill"
    Cc: Corey Minyard
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Hidehiro Kawai
     
  • Add support for the DMA_ATTR_NO_WARN attribute on powerpc iommu code.

    Link: http://lkml.kernel.org/r/1470092390-25451-3-git-send-email-mauricfo@linux.vnet.ibm.com
    Signed-off-by: Mauricio Faria de Oliveira
    Acked-by: Michael Ellerman
    Cc: Keith Busch
    Cc: Jens Axboe
    Cc: Benjamin Herrenschmidt
    Cc: Krzysztof Kozlowski
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Mauricio Faria de Oliveira
     
  • Currently, all callers to randomize_range() set the length to 0 and
    calculate end by adding a constant to the start address. We can simplify
    the API to remove a bunch of needless checks and variables.

    Use the new randomize_addr(start, range) call to set the requested
    address.

    Link: http://lkml.kernel.org/r/20160803233913.32511-7-jason@lakedaemon.net
    Signed-off-by: Jason Cooper
    Acked-by: Kees Cook
    Cc: "Theodore Ts'o"
    Cc: Guan Xuetao
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jason Cooper
     
  • Currently, all callers to randomize_range() set the length to 0 and
    calculate end by adding a constant to the start address. We can simplify
    the API to remove a bunch of needless checks and variables.

    Use the new randomize_addr(start, range) call to set the requested
    address.

    Link: http://lkml.kernel.org/r/20160803233913.32511-6-jason@lakedaemon.net
    Signed-off-by: Jason Cooper
    Acked-by: Kees Cook
    Cc: "Theodore Ts'o"
    Cc: Chris Metcalf
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jason Cooper
     
  • Currently, all callers to randomize_range() set the length to 0 and
    calculate end by adding a constant to the start address. We can simplify
    the API to remove a bunch of needless checks and variables.

    Use the new randomize_addr(start, range) call to set the requested
    address.

    Link: http://lkml.kernel.org/r/20160803233913.32511-5-jason@lakedaemon.net
    Signed-off-by: Jason Cooper
    Acked-by: Will Deacon
    Acked-by: Kees Cook
    Cc: "Russell King - ARM Linux"
    Cc: Catalin Marinas
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jason Cooper
     
  • Currently, all callers to randomize_range() set the length to 0 and
    calculate end by adding a constant to the start address. We can simplify
    the API to remove a bunch of needless checks and variables.

    Use the new randomize_addr(start, range) call to set the requested
    address.

    Link: http://lkml.kernel.org/r/20160803233913.32511-4-jason@lakedaemon.net
    Signed-off-by: Jason Cooper
    Acked-by: Kees Cook
    Cc: "Russell King - ARM Linux"
    Cc: "Theodore Ts'o"
    Cc: Catalin Marinas
    Cc: Will Deacon
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jason Cooper
     
  • Currently, all callers to randomize_range() set the length to 0 and
    calculate end by adding a constant to the start address. We can simplify
    the API to remove a bunch of needless checks and variables.

    Use the new randomize_addr(start, range) call to set the requested
    address.

    Link: http://lkml.kernel.org/r/20160803233913.32511-3-jason@lakedaemon.net
    Signed-off-by: Jason Cooper
    Acked-by: Kees Cook
    Cc: "Theodore Ts'o"
    Cc: Thomas Gleixner
    Cc: Ingo Molnar
    Cc: "H . Peter Anvin"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jason Cooper
     

11 Oct, 2016

8 commits

  • Pull more vfs updates from Al Viro:
    ">rename2() work from Miklos + current_time() from Deepa"

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
    fs: Replace current_fs_time() with current_time()
    fs: Replace CURRENT_TIME_SEC with current_time() for inode timestamps
    fs: Replace CURRENT_TIME with current_time() for inode timestamps
    fs: proc: Delete inode time initializations in proc_alloc_inode()
    vfs: Add current_time() api
    vfs: add note about i_op->rename changes to porting
    fs: rename "rename2" i_op to "rename"
    vfs: remove unused i_op->rename
    fs: make remaining filesystems use .rename2
    libfs: support RENAME_NOREPLACE in simple_rename()
    fs: support RENAME_NOREPLACE for local filesystems
    ncpfs: fix unused variable warning

    Linus Torvalds
     
  • Al Viro
     
  • Pull crypto updates from Herbert Xu:
    "Here is the crypto update for 4.9:

    API:
    - The crypto engine code now supports hashes.

    Algorithms:
    - Allow keys >= 2048 bits in FIPS mode for RSA.

    Drivers:
    - Memory overwrite fix for vmx ghash.
    - Add support for building ARM sha1-neon in Thumb2 mode.
    - Reenable ARM ghash-ce code by adding import/export.
    - Reenable img-hash by adding import/export.
    - Add support for multiple cores in omap-aes.
    - Add little-endian support for sha1-powerpc.
    - Add Cavium HWRNG driver for ThunderX SoC"

    * 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: (137 commits)
    crypto: caam - treat SGT address pointer as u64
    crypto: ccp - Make syslog errors human-readable
    crypto: ccp - clean up data structure
    crypto: vmx - Ensure ghash-generic is enabled
    crypto: testmgr - add guard to dst buffer for ahash_export
    crypto: caam - Unmap region obtained by of_iomap
    crypto: sha1-powerpc - little-endian support
    crypto: gcm - Fix IV buffer size in crypto_gcm_setkey
    crypto: vmx - Fix memory corruption caused by p8_ghash
    crypto: ghash-generic - move common definitions to a new header file
    crypto: caam - fix sg dump
    hwrng: omap - Only fail if pm_runtime_get_sync returns < 0
    crypto: omap-sham - shrink the internal buffer size
    crypto: omap-sham - add support for export/import
    crypto: omap-sham - convert driver logic to use sgs for data xmit
    crypto: omap-sham - change the DMA threshold value to a define
    crypto: omap-sham - add support functions for sg based data handling
    crypto: omap-sham - rename sgl to sgl_tmp for deprecation
    crypto: omap-sham - align algorithms on word offset
    crypto: omap-sham - add context export/import stubs
    ...

    Linus Torvalds
     
  • Pull misc vfs updates from Al Viro:
    "Assorted misc bits and pieces.

    There are several single-topic branches left after this (rename2
    series from Miklos, current_time series from Deepa Dinamani, xattr
    series from Andreas, uaccess stuff from from me) and I'd prefer to
    send those separately"

    * 'work.misc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (39 commits)
    proc: switch auxv to use of __mem_open()
    hpfs: support FIEMAP
    cifs: get rid of unused arguments of CIFSSMBWrite()
    posix_acl: uapi header split
    posix_acl: xattr representation cleanups
    fs/aio.c: eliminate redundant loads in put_aio_ring_file
    fs/internal.h: add const to ns_dentry_operations declaration
    compat: remove compat_printk()
    fs/buffer.c: make __getblk_slow() static
    proc: unsigned file descriptors
    fs/file: more unsigned file descriptors
    fs: compat: remove redundant check of nr_segs
    cachefiles: Fix attempt to read i_blocks after deleting file [ver #2]
    cifs: don't use memcpy() to copy struct iov_iter
    get rid of separate multipage fault-in primitives
    fs: Avoid premature clearing of capabilities
    fs: Give dentry to inode_change_ok() instead of inode
    fuse: Propagate dentry down to inode_change_ok()
    ceph: Propagate dentry down to inode_change_ok()
    xfs: Propagate dentry down to inode_change_ok()
    ...

    Linus Torvalds
     
  • Pull nios2 update from Ley Foon Tan:
    "Use of_property_read_bool() instead of open-coding it"

    * tag 'nios2-v4.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/lftan/nios2:
    nios2: use of_property_read_bool

    Linus Torvalds
     
  • Pull CRIS updates from Jesper Nilsson.

    * tag 'cris-for-4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/jesper/cris:
    cris: return of class_create should be considered
    CRIS: defconfig: remove MTDRAM_ABS_POS
    CRIS v32: remove some double unlocks
    Fix typos
    cris: migrate exception table users off module.h and onto extable.h
    cris: v10: axisflashmap: remove unused ifdefs
    cris: use generic io.h
    cris: fix Kconfig mismatch when building with CONFIG_PCI
    cris: cardbus: fix header include path
    cris: add dev88_defconfig
    cris: irq: stop loop from accessing array out of bounds
    cris: fasttimer: fix mixed declarations and code compile warning
    cris: intmem: fix pointer comparison compile warning
    cris: intmem: fix device_initcall compile warning

    Linus Torvalds
     
  • Pull protection keys syscall interface from Thomas Gleixner:
    "This is the final step of Protection Keys support which adds the
    syscalls so user space can actually allocate keys and protect memory
    areas with them. Details and usage examples can be found in the
    documentation.

    The mm side of this has been acked by Mel"

    * 'mm-pkeys-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    x86/pkeys: Update documentation
    x86/mm/pkeys: Do not skip PKRU register if debug registers are not used
    x86/pkeys: Fix pkeys build breakage for some non-x86 arches
    x86/pkeys: Add self-tests
    x86/pkeys: Allow configuration of init_pkru
    x86/pkeys: Default to a restrictive init PKRU
    pkeys: Add details of system call use to Documentation/
    generic syscalls: Wire up memory protection keys syscalls
    x86: Wire up protection keys system calls
    x86/pkeys: Allocation/free syscalls
    x86/pkeys: Make mprotect_key() mask off additional vm_flags
    mm: Implement new pkey_mprotect() system call
    x86/pkeys: Add fault handling for PF_PK page fault bit

    Linus Torvalds
     
  • Pull x86 updates from Thomas Gleixner:
    "A pile of regression fixes and updates:

    - address the fallout of the patches which made the cpuid - nodeid
    relation permanent: Handling of invalid APIC ids and preventing
    pointless warning messages.

    - force eager FPU when protection keys are enabled. Protection keys
    are not generating FPU exceptions so they cannot work with the lazy
    FPU mechanism.

    - prevent force migration of interrupts which are not part of the CPU
    vector domain.

    - handle the fact that APIC ids are not updated in the ACPI/MADT
    tables on physical CPU hotplug

    - remove bash-isms from syscall table generator script

    - use the hypervisor supplied APIC frequency when running on VMware"

    * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    x86/pkeys: Make protection keys an "eager" feature
    x86/apic: Prevent pointless warning messages
    x86/acpi: Prevent LAPIC id 0xff from being accounted
    arch/x86: Handle non enumerated CPU after physical hotplug
    x86/unwind: Fix oprofile module link error
    x86/vmware: Skip lapic calibration on VMware
    x86/syscalls: Remove bash-isms in syscall table generator
    x86/irq: Prevent force migration of irqs which are not in the vector domain

    Linus Torvalds
     

10 Oct, 2016

1 commit


08 Oct, 2016

23 commits

  • Al Viro
     
  • Our XSAVE features are divided into two categories: those that
    generate FPU exceptions, and those that do not. MPX and pkeys do
    not generate FPU exceptions and thus can not be used lazily. We
    disable them when lazy mode is forced on.

    We have a pair of masks to collect these two sets of features, but
    XFEATURE_MASK_PKRU was added to the wrong mask: XFEATURE_MASK_LAZY.
    Fix it by moving the feature to XFEATURE_MASK_EAGER.

    Note: this only causes problem if you boot with lazy FPU mode
    (eagerfpu=off) which is *not* the default. It also only affects
    hardware which is not currently publicly available. It looks like
    eager mode is going away, but we still need this patch applied
    to any kernel that has protection keys and lazy mode, which is 4.6
    through 4.8 at this point, and 4.9 if the lazy removal isn't sent
    to Linus for 4.9.

    Fixes: c8df40098451 ("x86/fpu, x86/mm/pkeys: Add PKRU xsave fields and data structures")
    Signed-off-by: Dave Hansen
    Cc: Dave Hansen
    Cc: stable@vger.kernel.org
    Link: http://lkml.kernel.org/r/20161007162342.28A49813@viggo.jf.intel.com
    Signed-off-by: Thomas Gleixner

    Dave Hansen
     
  • Markus reported that he sees new warnings:

    APIC: NR_CPUS/possible_cpus limit of 4 reached. Processor 4/0x84 ignored.
    APIC: NR_CPUS/possible_cpus limit of 4 reached. Processor 5/0x85 ignored.

    This comes from the recent persistant cpuid - nodeid changes. The code
    which emits the warning has been called prior to these changes only for
    enabled processors. Now it's called for disabled processors as well to get
    the possible cpu accounting correct. So if the kernel is compiled for the
    number of actual available/enabled CPUs and the BIOS reports disabled CPUs
    as well then the above warnings are printed.

    That's a pointless exercise as it only makes sense if there are more CPUs
    enabled than the kernel supports.

    Nake the warning conditional on enabled processors so we are back to the
    state before these changes.

    Fixes: 8f54969dc8d6 ("x86/acpi: Introduce persistent storage for cpuid apicid mapping")
    Reported-and-tested-by: Markus Trippelsdorf
    Cc: One Thousand Gnomes
    Cc: Dou Liyang
    Cc: linux-acpi@vger.kernel.org
    Cc: Gu Zheng
    Link: http://lkml.kernel.org/r/alpine.DEB.2.20.1610071549330.19804@nanos
    Signed-off-by: Thomas Gleixner

    Thomas Gleixner
     
  • Yinghai reported that the recent changes to make the cpuid - nodeid
    relationship permanent causes a cpuid ordering regression on a system which
    has 2apic enabled..

    The reason is that the ACPI local APIC parser has no sanity check for
    apicid 0xff, which is an invalid id. So a CPU id for this invalid local
    APIC id is allocated and therefor breaks the cpuid ordering.

    Add a sanity check to acpi_parse_lapic() which ignores the invalid id.

    Fixes: 8f54969dc8d6 ("x86/acpi: Introduce persistent storage for cpuid apicid mapping")
    Reported-by: Yinghai Lu
    Signed-off-by: Thomas Gleixner
    Cc: Gu Zheng ,
    Cc: Tang Chen
    Cc: douly.fnst@cn.fujitsu.com,
    Cc: zhugh.fnst@cn.fujitsu.com
    Cc: Tony Luck
    Cc: Rafael J. Wysocki
    Cc: Len Brown
    Cc: Lv Zheng ,
    Cc: robert.moore@intel.com
    Cc: linux-acpi@vger.kernel.org
    Link: https://lkml.kernel.org/r/CAE9FiQVQx6FRXT-RdR7Crz4dg5LeUWHcUSy1KacjR+JgU_vGJg@mail.gmail.com

    Thomas Gleixner
     
  • Merge updates from Andrew Morton:

    - fsnotify updates

    - ocfs2 updates

    - all of MM

    * emailed patches from Andrew Morton : (127 commits)
    console: don't prefer first registered if DT specifies stdout-path
    cred: simpler, 1D supplementary groups
    CREDITS: update Pavel's information, add GPG key, remove snail mail address
    mailmap: add Johan Hovold
    .gitattributes: set git diff driver for C source code files
    uprobes: remove function declarations from arch/{mips,s390}
    spelling.txt: "modeled" is spelt correctly
    nmi_backtrace: generate one-line reports for idle cpus
    arch/tile: adopt the new nmi_backtrace framework
    nmi_backtrace: do a local dump_stack() instead of a self-NMI
    nmi_backtrace: add more trigger_*_cpu_backtrace() methods
    min/max: remove sparse warnings when they're nested
    Documentation/filesystems/proc.txt: add more description for maps/smaps
    mm, proc: fix region lost in /proc/self/smaps
    proc: fix timerslack_ns CAP_SYS_NICE check when adjusting self
    proc: add LSM hook checks to /proc//timerslack_ns
    proc: relax /proc//timerslack_ns capability requirements
    meminfo: break apart a very long seq_printf with #ifdefs
    seq/proc: modify seq_put_decimal_[u]ll to take a const char *, not char
    proc: faster /proc/*/status
    ...

    Linus Torvalds
     
  • Pull ARM SoC late DT updates from Arnd Bergmann:
    "These updates have been kept in a separate branch mostly because they
    rely on updates to the respective clk drivers to keep the shared
    header files in sync.

    - The Renesas r8a7796 (R-Car M3-W) platform gets added, this is an
    automotive SoC similar to the ⅹ8a7795 chip we already support, but
    the dts changes rely on a clock driver change that has been merged
    for v4.9 through the clk tree.

    - The Amlogic meson-gxbb (S905) platform gains support for a few
    drivers merged through our tree, in particular the network and usb
    driver changes are required and included here, and also the clk
    tree changes.

    - The Allwinner platforms have seen a large-scale change to their clk
    drivers and the dts file updates must come after that. This
    includes the newly added Nextthing GR8 platform, which is derived
    from sun5i/A13.

    - Some integrator (arm32) changes rely on clk driver changes.

    - A single patch for lpc32xx has no such dependency but wasn't added
    until just before the merge window"

    * tag 'armsoc-late' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (99 commits)
    ARM: dts: lpc32xx: add device node for IRAM on-chip memory
    ARM: dts: sun8i: Add accelerometer to polaroid-mid2407pxe03
    ARM: dts: sun8i: enable UART1 for iNet D978 Rev2 board
    ARM: dts: sun8i: add pinmux for UART1 at PG
    dts: sun8i-h3: add I2C0-2 peripherals to H3 SOC
    dts: sun8i-h3: add pinmux definitions for I2C0-2
    dts: sun8i-h3: associate exposed UARTs on Orange Pi Boards
    dts: sun8i-h3: split off RTS/CTS for UART1 in seperate pinmux
    dts: sun8i-h3: add pinmux definitions for UART2-3
    ARM: dts: sun9i: a80-optimus: Disable EHCI1
    ARM: dts: sun9i: cubieboard4: Add AXP806 PMIC device node and regulators
    ARM: dts: sun9i: a80-optimus: Add AXP806 PMIC device node and regulators
    ARM: dts: sun9i: cubieboard4: Declare AXP809 SW regulator as unused
    ARM: dts: sun9i: a80-optimus: Declare AXP809 SW regulator as unused
    ARM: dts: sun8i: Add touchscreen node for sun8i-a33-ga10h
    ARM: dts: sun8i: Add touchscreen node for sun8i-a23-polaroid-mid2809pxe04
    ARM: dts: sun8i: Add touchscreen node for sun8i-a23-polaroid-mid2407pxe03
    ARM: dts: sun8i: Add touchscreen node for sun8i-a23-inet86dz
    ARM: dts: sun8i: Add touchscreen node for sun8i-a23-gt90h
    ARM64: dts: meson-gxbb-vega-s95: Enable USB Nodes
    ...

    Linus Torvalds
     
  • Pull ARM 64-bit DT updates from Arnd Bergmann:
    "The 64-bit DT changes are surprisingly small this time, we only add
    two SoC platforms: the ZTE ZX296718 Set-top-box SoC and the SocioNext
    UniPhier LD11 TV SoC, each with their reference boards.

    There are three new machines added for existing SoC platforms:

    - The Marvell Armada 8040 development board is an impressive
    quad-core Cortex-A72 machine with three 10gbit ethernet interfaces

    - Qualcomms DragonBoard 820c single-board computer is their current
    high-end phone platform in the 96boards form factor

    - Rockchip: Tronsmart Orion r86 set-top-box is a popular mid-range
    Android box based on the 8-core rk3368 SoC"

    * tag 'armsoc-dt64' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (91 commits)
    arm64: dts: berlin4ct: Add L2 cache topology
    arm64: dts: berlin4ct: enable all wdt nodes unconditionally
    arm64: dts: berlin4ct: switch to Cortex-A53 specific pmu nodes
    arm64: dts: Add ZTE ZX296718 SoC dts and Makefile
    arm64: dts: apm: Add DT node for APM X-Gene 2 CPU clocks
    arm64: dts: apm: Add X-Gene SoC hwmon to device tree
    arm64: dts: apm: Fix interrupt polarity for X-Gene PCIe legacy interrupts
    arm64: dts: apm: Add APM X-Gene v2 SoC PMU DTS entries
    arm64: dts: apm: Add APM X-Gene SoC PMU DTS entries
    arm64: dts: marvell: enable MSI for PCIe on Armada 7K/8K
    arm64: dts: ls2080a: Add 'dma-coherent' for ls2080a PCI nodes
    arm64: dts: rockchip: add Type-C phy for RK3399
    arm64: dts: rockchip: enable the gmac for rk3399 evb board
    arm64: dts: rockchip: add the gmac needed node for rk3399
    arm64: dts: rockchip: support the pmu node for rk3399
    arm64: dts: rockchip: change all interrupts cells to 4 on rk3399 SoCs
    arm64: dts: rockchip: add the tcpc for rk3399 power domain
    arm64: dts: rockchip: add efuse0 device node for rk3399
    arm64: dts: rockchip: configure PCIe support for rk3399-evb
    arm64: dts: rockchip: add the PCIe controller support for RK3399
    ...

    Linus Torvalds
     
  • Pull ARM DT updates from Arnd Bergmann:
    "These are as usual a very large number of mostly boring updates to
    enable devices in existing machines, or to fix minor bugs. Notably, an
    ongoing treewide effort to fix warnings caused by an update to the
    device tree compiler. These are enabled with "make W=1" at the moment
    but can hopefully become the default once all issues have been
    addressed.

    No new SoC platform is added this time around (Armada 395 and Orion
    mv88f5181 are slight variations of existing ones), but a significant
    number of new dts files are added, which I list by platform:

    - Allwinner: Empire Electronix M712 and iNet d978 Rev2 tablets,
    Orange Pi PC Plus, Orange Pi 2, Orange Pi Plus 2E, Orange Pi Lite,
    Olimex A33-Olinuxino, and Nano Pi Neo single-board computers

    - ARM Realview: all supported machines (ported from board files)

    - Broadcom: BCM958525er, BCM958522er, BCM988312hr, BCM958623hr and
    BCM958622hr reference boards for Northstar platform, Raspberry Pi
    Zero single-board computer

    - Marvell EBU: Netgear WNR854T router (ported from board file),
    Armada 395 SoC platform and GP board Armada 390 DB development
    board

    - NXP i.MX: imx7s Warp7 reference board, Gateworks Ventana GW553x
    single-board computer, Technologic Systems TS-4900 and Engicam
    IMX6UL GEA M6UL computer-on-module, Inverse Path USB armory board

    - Qualcomm: LG Nexus 5 Phone

    - Renesas: r8a7792/wheat and r7s72100/rskrza1 development boards

    - Rockchip: Rockchip RK3288 Fennec reference board, Firefly RK3288
    Reload platform

    - ST Microelectronics STi: B2260 (96boards) single-board computer

    - TI Davinci: OMAP-L138 LCDK Development kit

    - TI OMAP: beagleboard-x15 rev B1 single-board computer"

    * tag 'armsoc-dt' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (390 commits)
    ARM: dts: sony-nsz-gs7: add missing unit name to /memory node
    ARM: dts: chromecast: add missing unit name to /memory node
    ARM: dts: berlin2q-marvell-dmp: add missing unit name to /memory node
    ARM: dts: berlin2: Add missing unit name to /soc node
    ARM: dts: berlin2cd: Add missing unit name to /soc node
    ARM: dts: berlin2q: Add missing unit name to /soc node
    ARM: dts: berlin2: Remove skeleton.dtsi inclusion
    ARM: dts: berlin2cd: Remove skeleton.dtsi inclusion
    ARM: dts: berlin2q: Remove skeleton.dtsi inclusion
    arm: dts: berlin2q: enable all wdt nodes unconditionally
    arm: dts: berlin2: enable all wdt nodes unconditionally
    ARM: dts: omap5-igep0050.dts: Use tabs for indentation
    ARM: dts: Fix igepv5 power button GPIO direction
    ARM: dts: am335x-evmsk: Add blue-and-red-wiring -property to lcdc node
    ARM: dts: am335x-evmsk: Whitespace cleanup of lcdc related nodes
    ARM: dts: am335x-evm: Add blue-and-red-wiring -property to lcdc node
    ARM: dts: s3c64xx: Use macros for pinctrl configuration
    ARM: dts: s3c2416: Use macros for pinctrl configuration
    ARM: dts: s5pv210: Use macros for pinctrl configuration
    ARM: dts: s3c64xx: Use common macros for pinctrl configuration
    ...

    Linus Torvalds
     
  • Pull ARM SoC driver updates from Arnd Bergmann:
    "Driver updates for ARM SoCs, including a couple of newly added
    drivers:

    - The Qualcomm external bus interface 2 (EBI2), used in some of their
    mobile phone chips for connecting flash memory, LCD displays or
    other peripherals

    - Secure monitor firmware for Amlogic SoCs, and an NVMEM driver for
    the EFUSE based on that firmware interface.

    - Perf support for the AppliedMicro X-Gene performance monitor unit

    - Reset driver for STMicroelectronics STM32

    - Reset driver for SocioNext UniPhier SoCs

    Aside from these, there are minor updates to SoC-specific bus,
    clocksource, firmware, pinctrl, reset, rtc and pmic drivers"

    * tag 'armsoc-drivers' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (50 commits)
    bus: qcom-ebi2: depend on HAS_IOMEM
    pinctrl: mvebu: orion5x: Generalise mv88f5181l support for 88f5181
    clk: mvebu: Add clk support for the orion5x SoC mv88f5181
    dt-bindings: EXYNOS: Add Exynos5433 PMU compatible
    clocksource: exynos_mct: Add the support for ARM64
    perf: xgene: Add APM X-Gene SoC Performance Monitoring Unit driver
    Documentation: Add documentation for APM X-Gene SoC PMU DTS binding
    MAINTAINERS: Add entry for APM X-Gene SoC PMU driver
    bus: qcom: add EBI2 driver
    bus: qcom: add EBI2 device tree bindings
    rtc: rtc-pm8xxx: Add support for pm8018 rtc
    nvmem: amlogic: Add Amlogic Meson EFUSE driver
    firmware: Amlogic: Add secure monitor driver
    soc: qcom: smd: Reset rx tail rather than tx
    memory: atmel-sdramc: fix a possible NULL dereference
    reset: hi6220: allow to compile test driver on other architectures
    reset: zynq: add driver Kconfig option
    reset: sunxi: add driver Kconfig option
    reset: stm32: add driver Kconfig option
    reset: socfpga: add driver Kconfig option
    ...

    Linus Torvalds
     
  • Pull ARM SoC 64-bit updates from Arnd Bergmann:
    "Changes to platform code for 64-bit ARM platforms.

    Nearly all of these are defconfig updates to enable new drivers or old
    drivers still used on these 64-bit platforms.

    Aside from that, we gain initial support for two set-top-box
    platforms, both of which already have 32-bit support in arch/arm:

    - Broadcom adds abstract support for the bcm7xxx/brcmstb platform,
    presumably the respective dts files and more information will
    follow at a later point.

    - The ZTE ZX296718 SoC for set-top-boxes, a relative of the 32-bit
    ZX296702 SoC that we already support"

    * tag 'armsoc-arm64' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc:
    arm64: add ZTE ZX SoC family
    arm64: defconfig: enable ZTE ZX related config
    arm64: defconfig: enable common modules for power management
    arm64: defconfig: enable meson I2C
    arm64: defconfig: enable meson SPI as module
    arm64: defconfig: enable meson WDT as modules
    arm64: defconfig: enable HW random as module
    arm64: defconfig: Enable SDHI and GPIO_REGULATOR
    arm64: configs: enable PCIe driver for Aardvark
    Kconfig: ARCH_HISI: Add PINCTRL to HISI platform
    arm64: defconfig: enable bluetooth supports as modules
    arm64: defconfig: enable CONFIG_INPUT_HISI_POWERKEY for HiKey
    arm64: defconfig: Enable HiSilicon kirin drm, adv7533 for HiKey
    arm64: defconfig: Enable Hisi SAS and HNS
    arm64: defconfig: Enable QDF2432 config options
    arm64: sunxi: Kconfig: add essential pinctrl driver
    arm64: defconfig: Add Renesas R-Car HSUSB driver support as module
    arm64: Add Broadcom Set Top Box Kconfig entry point
    arm64: defconfig: enable xhci-platform

    Linus Torvalds
     
  • Pull ARM SoC defconfig updates from Arnd Bergmann:
    "Defconfig additions, removals, etc. Most of these are small changes
    adding the options for newly upstreamed drivers, or drivers needed for
    new board support. Nothing specifically sticks out this time"

    * tag 'armsoc-defconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (25 commits)
    ARM: multi_v7_defconfig: enable CONFIG_EFI
    ARM: multi_v7_defconfig: Build Atmel maXTouch driver as a module
    ARM: defconfig: update the Integrator defconfig
    ARM: keystone: defconfig: Fix USB configuration
    ARM: imx_v6_v7_defconfig: Select the wm8960 codec driver
    ARM: omap2plus_defconfig: switch to the IIO BMP085 driver
    ARM: mvebu_v5_defconfig: use MV88E6XXX
    ARM: davinci_all_defconfig: Enable some UBI modules
    ARM: davinci_all_defconfig: Enable AEMIF as a module
    ARM: multi_v7_defconfig: Enable SECCOMP
    ARM: exynos_defconfig: Enable SECCOMP
    ARM: imx_v6_v7_defconfig: Add CONFIG_MPL3115
    ARM: imx_v6_v7_defconfig: Enable GPU support
    ARM: s3c2410_defconfig: Remove CONFIG_IPV6_PRIVACY
    ARM: exynos_defconfig: Enable PM_DEBUG
    ARM: exynos_defconfig: Enable bus frequency scaling with devfreq
    ARM: imx_v6_v7_defconfig: enable more USB configurations
    ARM: davinci_all_defconfig: enable SMSC ethernet PHY
    ARM: davinci_all_defconfig: enable RTC driver as module
    ARM: multi_v7_defconfig: Enable ARM_IMX6Q_CPUFREQ
    ...

    Linus Torvalds
     
  • Pull ARM SoC platform updates from Arnd Bergmann:
    "These are updates for platform specific code on 32-bit ARM machines,
    essentially anything that can not (yet) be expressed using DT files.

    Noteworthy changes include:

    - We get support for running in big-endian mode on two platforms:
    sunxi (Allwinner) and s3c24xx (old Samsung).

    - The recently added Uniphier platform now uses standard PSCI methods
    for SMP booting and we remove support for old bootloader versions
    that did not support it yet.

    - In sunxi, we gain support for the "Nextthing GR8" SoC, which is a
    close relative of the Allwinner A13 and R8 chips.

    - PXA completes its move over to the generic dmaengine framework and
    removes its old private API

    - mach-bcm gains support for BCM47189/BCM53573, their first ARM SoC
    with integrated 802.11ac wireless networking"

    * tag 'armsoc-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (54 commits)
    ARM: imx legacy: pca100: move peripheral initialization to .init_late
    ARM: imx legacy: mx27ads: move peripheral initialization to .init_late
    ARM: imx legacy: mx21ads: move peripheral initialization to .init_late
    ARM: imx legacy: pcm043: move peripheral initialization to .init_late
    ARM: imx legacy: mx35-3ds: move peripheral initialization to .init_late
    ARM: imx legacy: mx27-3ds: move peripheral initialization to .init_late
    ARM: imx legacy: imx27-visstrim-m10: move peripheral initialization to .init_late
    ARM: imx legacy: vpr200: move peripheral initialization to .init_late
    ARM: imx legacy: mx31moboard: move peripheral initialization to .init_late
    ARM: imx legacy: armadillo5x0: move peripheral initialization to .init_late
    ARM: imx legacy: qong: move peripheral initialization to .init_late
    ARM: imx legacy: mx31-3ds: move peripheral initialization to .init_late
    ARM: imx legacy: pcm037: move peripheral initialization to .init_late
    ARM: imx legacy: mx31lilly: move peripheral initialization to .init_late
    ARM: imx legacy: mx31ads: move peripheral initialization to .init_late
    ARM: imx legacy: mx31lite: move peripheral initialization to .init_late
    ARM: imx legacy: kzm: move peripheral initialization to .init_late
    MAINTAINERS: update list of Oxnas maintainers
    ARM: orion5x: remove extraneous NO_IRQ
    ARM: orion: simplify orion_ge00_switch_init
    ...

    Linus Torvalds
     
  • Pull ARM SoC cleanups from Arnd Bergmann:
    "The cleanups for v4.9 are a little larger that usual, but thankfully
    that is almost exclusively due to removing a significant number of
    files that have become obsolete after the still ongoing conversion of
    old board files to devicetree.

    - for mach-omap2, which is still the largest platform in arch/arm/,
    the conversion to DT is finally complete after the Nokia N900 is
    now fully supported there, along with the omap3 LDP, and we can
    remove those two board files. If no regressions are found, another
    large cleanup for the platform will happen as a follow-up, removing
    dead code and restructuring the platform based on being DT-only.

    - In mach-imx, similar work is ongoing, but has not come that far.
    This time, we remove the obsolete board file for the i.MX1
    generation, which like i.MX25, i.MX5, i.MX6, and i.MX7 is now
    DT-only. The remaining board files are for i.MX2 and i.MX3 machines
    based on old ARM926 or ARM1136 cores that should work with DT in
    principle.

    - realview has just been converted from board files to DT, and a lot
    of code gets removed in the process. This is the last
    ARM/Keil/Versatile derived platform that was still using board
    files, the other ones being integrator, versatile and vexpress. We
    can probably merge the remaining code into a single directory in
    the near future.

    - clps711x had completed the conversion in v4.8, but we accidentally
    left the files in place that should have been deleted then"

    * tag 'armsoc-cleanup' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (21 commits)
    ARM: select PCI_DOMAINS config from ARCH_MULTIPLATFORM
    ARM: stop *MIGHT_HAVE_PCI* config from being selected redundantly
    ARM: imx: (trivial) fix typo and grammar
    ARM: clps711x: remove extraneous files
    ARM: imx: use IS_ENABLED() instead of checking for built-in or module
    ARM: OMAP2+: use IS_ENABLED() instead of checking for built-in or module
    ARM: OMAP1: use IS_ENABLED() instead of checking for built-in or module
    ARM: imx: remove platform-mxc_rnga
    ARM: realview: imply device tree boot
    ARM: realview: no need to select SMP_ON_UP explicitly
    ARM: realview: delete the RealView board files
    ARM: imx: no need to select SMP_ON_UP explicitly
    ARM: i.MX: Move SOC_IMX1 into 'Device tree only'
    ARM: i.MX: Remove i.MX1 non-DT support
    ARM: i.MX: Remove i.MX1 Synertronixx SCB9328 board support
    ARM: i.MX: Remove i.MX1 Armadeus APF9328 board support
    ARM: mxs: remove obsolete startup code for TX28
    ARM: i.MX31 iomux: remove duplicates with alternate name
    ARM: i.MX31 iomux: remove plain duplicates
    ARM: OMAP2+: Drop legacy board file for LDP
    ...

    Linus Torvalds
     
  • Pull parisc updates from Helge Deller:
    "Changes include:

    - Fix boot of 32bit SMP kernel (initial kernel mapping was too small)

    - Added hardened usercopy checks

    - Drop bootmem and switch to memblock and NO_BOOTMEM implementation

    - Drop the BROKEN_RODATA config option (and thus remove the relevant
    code from the generic headers and files because parisc was the last
    architecture which used this config option)

    - Improve segfault reporting by printing human readable error strings

    - Various smaller changes, e.g. dwarf debug support for assembly
    code, update comments regarding copy_user_page_asm, switch to
    kmalloc_array()"

    * 'parisc-4.9-1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux:
    parisc: Increase KERNEL_INITIAL_SIZE for 32-bit SMP kernels
    parisc: Drop bootmem and switch to memblock
    parisc: Add hardened usercopy feature
    parisc: Add cfi_startproc and cfi_endproc to assembly code
    parisc: Move hpmc stack into page aligned bss section
    parisc: Fix self-detected CPU stall warnings on Mako machines
    parisc: Report trap type as human readable string
    parisc: Update comment regarding implementation of copy_user_page_asm
    parisc: Use kmalloc_array() in add_system_map_addresses()
    parisc: Check return value of smp_boot_one_cpu()
    parisc: Drop BROKEN_RODATA config option

    Linus Torvalds
     
  • Pull avr32 update from Hans-Christian Noren Egtvedt.

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/egtvedt/linux-avr32:
    avr32: migrate exception table users off module.h and onto extable.h

    Linus Torvalds
     
  • Pull powerpc updates from Michael Ellerman:
    "Highlights:
    - Major rework of Book3S 64-bit exception vectors (Nicholas Piggin)
    - Use gas sections for arranging exception vectors et. al.
    - Large set of TM cleanups and selftests (Cyril Bur)
    - Enable transactional memory (TM) lazily for userspace (Cyril Bur)
    - Support for XZ compression in the zImage wrapper (Oliver
    O'Halloran)
    - Add support for bpf constant blinding (Naveen N. Rao)
    - Beginnings of upstream support for PA Semi Nemo motherboards
    (Darren Stevens)

    Fixes:
    - Ensure .mem(init|exit).text are within _stext/_etext (Michael
    Ellerman)
    - xmon: Don't use ld on 32-bit (Michael Ellerman)
    - vdso64: Use double word compare on pointers (Anton Blanchard)
    - powerpc/nvram: Fix an incorrect partition merge (Pan Xinhui)
    - powerpc: Fix usage of _PAGE_RO in hugepage (Christophe Leroy)
    - powerpc/mm: Update FORCE_MAX_ZONEORDER range to allow hugetlb w/4K
    (Aneesh Kumar K.V)
    - Fix memory leak in queue_hotplug_event() error path (Andrew
    Donnellan)
    - Replay hypervisor maintenance interrupt first (Nicholas Piggin)

    Various performance optimisations (Anton Blanchard):
    - Align hot loops of memset() and backwards_memcpy()
    - During context switch, check before setting mm_cpumask
    - Remove static branch prediction in atomic{, 64}_add_unless
    - Only disable HAVE_EFFICIENT_UNALIGNED_ACCESS on POWER7 little
    endian
    - Set default CPU type to POWER8 for little endian builds

    Cleanups & features:
    - Sparse fixes/cleanups (Daniel Axtens)
    - Preserve CFAR value on SLB miss caused by access to bogus address
    (Paul Mackerras)
    - Radix MMU fixups for POWER9 (Aneesh Kumar K.V)
    - Support for setting used_(vsr|vr|spe) in sigreturn path (for CRIU)
    (Simon Guo)
    - Optimise syscall entry for virtual, relocatable case (Nicholas
    Piggin)
    - Optimise MSR handling in exception handling (Nicholas Piggin)
    - Support for kexec with Radix MMU (Benjamin Herrenschmidt)
    - powernv EEH fixes (Russell Currey)
    - Suprise PCI hotplug support for powernv (Gavin Shan)
    - Endian/sparse fixes for powernv PCI (Gavin Shan)
    - Defconfig updates (Anton Blanchard)
    - KVM: PPC: Book3S HV: Migrate pinned pages out of CMA (Balbir Singh)
    - cxl: Flush PSL cache before resetting the adapter (Frederic Barrat)
    - cxl: replace loop with for_each_child_of_node(), remove unneeded
    of_node_put() (Andrew Donnellan)
    - Fix HV facility unavailable to use correct handler (Nicholas
    Piggin)
    - Remove unnecessary syscall trampoline (Nicholas Piggin)
    - fadump: Fix build break when CONFIG_PROC_VMCORE=n (Michael
    Ellerman)
    - Quieten EEH message when no adapters are found (Anton Blanchard)
    - powernv: Add PHB register dump debugfs handle (Russell Currey)
    - Use kprobe blacklist for exception handlers & asm functions
    (Nicholas Piggin)
    - Document the syscall ABI (Nicholas Piggin)
    - MAINTAINERS: Update cxl maintainers (Michael Neuling)
    - powerpc: Remove all usages of NO_IRQ (Michael Ellerman)

    Minor cleanups:
    - Andrew Donnellan, Christophe Leroy, Colin Ian King, Cyril Bur,
    Frederic Barrat, Pan Xinhui, PrasannaKumar Muralidharan, Rui Teng,
    Simon Guo"

    * tag 'powerpc-4.9-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: (156 commits)
    powerpc/bpf: Add support for bpf constant blinding
    powerpc/bpf: Implement support for tail calls
    powerpc/bpf: Introduce accessors for using the tmp local stack space
    powerpc/fadump: Fix build break when CONFIG_PROC_VMCORE=n
    powerpc: tm: Enable transactional memory (TM) lazily for userspace
    powerpc/tm: Add TM Unavailable Exception
    powerpc: Remove do_load_up_transact_{fpu,altivec}
    powerpc: tm: Rename transct_(*) to ck(\1)_state
    powerpc: tm: Always use fp_state and vr_state to store live registers
    selftests/powerpc: Add checks for transactional VSXs in signal contexts
    selftests/powerpc: Add checks for transactional VMXs in signal contexts
    selftests/powerpc: Add checks for transactional FPUs in signal contexts
    selftests/powerpc: Add checks for transactional GPRs in signal contexts
    selftests/powerpc: Check that signals always get delivered
    selftests/powerpc: Add TM tcheck helpers in C
    selftests/powerpc: Allow tests to extend their kill timeout
    selftests/powerpc: Introduce GPR asm helper header file
    selftests/powerpc: Move VMX stack frame macros to header file
    selftests/powerpc: Rework FPU stack placement macros and move to header file
    selftests/powerpc: Check for VSX preservation across userspace preemption
    ...

    Linus Torvalds
     
  • Current supplementary groups code can massively overallocate memory and
    is implemented in a way so that access to individual gid is done via 2D
    array.

    If number of gids is
    Cc: Vasily Kulikov
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexey Dobriyan
     
  • The declarations of arch-specific functions have been moved to a common
    header in commit 3820b4d2789f ('uprobes: Move function declarations out
    of arch'), but MIPS and S390 has added them to their own trees later.
    Remove the unnecessary duplicates.

    Link: http://lkml.kernel.org/r/1472804384-17830-1-git-send-email-marcin.nowakowski@imgtec.com
    Signed-off-by: Marcin Nowakowski
    Acked-by: Heiko Carstens
    Cc: Martin Schwidefsky
    Cc: Ralf Baechle
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Marcin Nowakowski
     
  • When doing an nmi backtrace of many cores, most of which are idle, the
    output is a little overwhelming and very uninformative. Suppress
    messages for cpus that are idling when they are interrupted and just
    emit one line, "NMI backtrace for N skipped: idling at pc 0xNNN".

    We do this by grouping all the cpuidle code together into a new
    .cpuidle.text section, and then checking the address of the interrupted
    PC to see if it lies within that section.

    This commit suitably tags x86 and tile idle routines, and only adds in
    the minimal framework for other architectures.

    Link: http://lkml.kernel.org/r/1472487169-14923-5-git-send-email-cmetcalf@mellanox.com
    Signed-off-by: Chris Metcalf
    Acked-by: Peter Zijlstra (Intel)
    Tested-by: Peter Zijlstra (Intel)
    Tested-by: Daniel Thompson [arm]
    Tested-by: Petr Mladek
    Cc: Aaron Tomlin
    Cc: Peter Zijlstra (Intel)
    Cc: "Rafael J. Wysocki"
    Cc: Russell King
    Cc: Thomas Gleixner
    Cc: Ingo Molnar
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Chris Metcalf
     
  • Previously tile was rolling its own method of capturing backtrace data
    in the NMI handlers, but it was relying on running printk() from the NMI
    handler, which is not always safe. So adopt the nmi_backtrace model
    (with the new cpumask extension) instead.

    So we can call the nmi_backtrace code directly from the nmi handler,
    move the nmi_enter()/exit() into the top-level tile NMI handler.

    The semantics of the routine change slightly since it is now synchronous
    with the remote cores completing the backtraces. Previously it was
    asynchronous, but with protection to avoid starting a new remote
    backtrace if the old one was still in progress.

    Link: http://lkml.kernel.org/r/1472487169-14923-4-git-send-email-cmetcalf@mellanox.com
    Signed-off-by: Chris Metcalf
    Cc: Daniel Thompson [arm]
    Cc: Petr Mladek
    Cc: Aaron Tomlin
    Cc: Peter Zijlstra (Intel)
    Cc: "Rafael J. Wysocki"
    Cc: Russell King
    Cc: Thomas Gleixner
    Cc: Ingo Molnar
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Chris Metcalf
     
  • Currently on arm there is code that checks whether it should call
    dump_stack() explicitly, to avoid trying to raise an NMI when the
    current context is not preemptible by the backtrace IPI. Similarly, the
    forthcoming arch/tile support uses an IPI mechanism that does not
    support generating an NMI to self.

    Accordingly, move the code that guards this case into the generic
    mechanism, and invoke it unconditionally whenever we want a backtrace of
    the current cpu. It seems plausible that in all cases, dump_stack()
    will generate better information than generating a stack from the NMI
    handler. The register state will be missing, but that state is likely
    not particularly helpful in any case.

    Or, if we think it is helpful, we should be capturing and emitting the
    current register state in all cases when regs == NULL is passed to
    nmi_cpu_backtrace().

    Link: http://lkml.kernel.org/r/1472487169-14923-3-git-send-email-cmetcalf@mellanox.com
    Signed-off-by: Chris Metcalf
    Tested-by: Daniel Thompson [arm]
    Reviewed-by: Petr Mladek
    Acked-by: Aaron Tomlin
    Cc: "Rafael J. Wysocki"
    Cc: Russell King
    Cc: Thomas Gleixner
    Cc: Ingo Molnar
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Chris Metcalf
     
  • Patch series "improvements to the nmi_backtrace code" v9.

    This patch series modifies the trigger_xxx_backtrace() NMI-based remote
    backtracing code to make it more flexible, and makes a few small
    improvements along the way.

    The motivation comes from the task isolation code, where there are
    scenarios where we want to be able to diagnose a case where some cpu is
    about to interrupt a task-isolated cpu. It can be helpful to see both
    where the interrupting cpu is, and also an approximation of where the
    cpu that is being interrupted is. The nmi_backtrace framework allows us
    to discover the stack of the interrupted cpu.

    I've tested that the change works as desired on tile, and build-tested
    x86, arm, mips, and sparc64. For x86 I confirmed that the generic
    cpuidle stuff as well as the architecture-specific routines are in the
    new cpuidle section. For arm, mips, and sparc I just build-tested it
    and made sure the generic cpuidle routines were in the new cpuidle
    section, but I didn't attempt to figure out which the platform-specific
    idle routines might be. That might be more usefully done by someone
    with platform experience in follow-up patches.

    This patch (of 4):

    Currently you can only request a backtrace of either all cpus, or all
    cpus but yourself. It can also be helpful to request a remote backtrace
    of a single cpu, and since we want that, the logical extension is to
    support a cpumask as the underlying primitive.

    This change modifies the existing lib/nmi_backtrace.c code to take a
    cpumask as its basic primitive, and modifies the linux/nmi.h code to use
    the new "cpumask" method instead.

    The existing clients of nmi_backtrace (arm and x86) are converted to
    using the new cpumask approach in this change.

    The other users of the backtracing API (sparc64 and mips) are converted
    to use the cpumask approach rather than the all/allbutself approach.
    The mips code ignored the "include_self" boolean but with this change it
    will now also dump a local backtrace if requested.

    Link: http://lkml.kernel.org/r/1472487169-14923-2-git-send-email-cmetcalf@mellanox.com
    Signed-off-by: Chris Metcalf
    Tested-by: Daniel Thompson [arm]
    Reviewed-by: Aaron Tomlin
    Reviewed-by: Petr Mladek
    Cc: "Rafael J. Wysocki"
    Cc: Russell King
    Cc: Thomas Gleixner
    Cc: Ingo Molnar
    Cc: Ralf Baechle
    Cc: David Miller
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Chris Metcalf
     
  • This came to light when implementing native 64-bit atomics for ARCv2.

    The atomic64 self-test code uses CONFIG_ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE
    to check whether atomic64_dec_if_positive() is available. It seems it
    was needed when not every arch defined it. However as of current code
    the Kconfig option seems needless

    - for CONFIG_GENERIC_ATOMIC64 it is auto-enabled in lib/Kconfig and a
    generic definition of API is present lib/atomic64.c
    - arches with native 64-bit atomics select it in arch/*/Kconfig and
    define the API in their headers

    So I see no point in keeping the Kconfig option

    Compile tested for:
    - blackfin (CONFIG_GENERIC_ATOMIC64)
    - x86 (!CONFIG_GENERIC_ATOMIC64)
    - ia64

    Link: http://lkml.kernel.org/r/1473703083-8625-3-git-send-email-vgupta@synopsys.com
    Signed-off-by: Vineet Gupta
    Cc: Richard Henderson
    Cc: Ivan Kokshaysky
    Cc: Matt Turner
    Cc: Russell King
    Cc: Catalin Marinas
    Cc: Will Deacon
    Cc: Ralf Baechle
    Cc: "James E.J. Bottomley"
    Cc: Helge Deller
    Cc: Benjamin Herrenschmidt
    Cc: Paul Mackerras
    Cc: Michael Ellerman
    Cc: Martin Schwidefsky
    Cc: Heiko Carstens
    Cc: "David S. Miller"
    Cc: Chris Metcalf
    Cc: Thomas Gleixner
    Cc: Ingo Molnar
    Cc: "H. Peter Anvin"
    Cc: Vineet Gupta
    Cc: Zhaoxiu Zeng
    Cc: Linus Walleij
    Cc: Alexander Potapenko
    Cc: Andrey Ryabinin
    Cc: Herbert Xu
    Cc: Ming Lin
    Cc: Arnd Bergmann
    Cc: Geert Uytterhoeven
    Cc: Peter Zijlstra
    Cc: Borislav Petkov
    Cc: Andi Kleen
    Cc: Boqun Feng
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Vineet Gupta