15 Oct, 2016

2 commits

  • Pull kbuild updates from Michal Marek:

    - EXPORT_SYMBOL for asm source by Al Viro.

    This does bring a regression, because genksyms no longer generates
    checksums for these symbols (CONFIG_MODVERSIONS). Nick Piggin is
    working on a patch to fix this.

    Plus, we are talking about functions like strcpy(), which rarely
    change prototypes.

    - Fixes for PPC fallout of the above by Stephen Rothwell and Nick
    Piggin

    - fixdep speedup by Alexey Dobriyan.

    - preparatory work by Nick Piggin to allow architectures to build with
    -ffunction-sections, -fdata-sections and --gc-sections

    - CONFIG_THIN_ARCHIVES support by Stephen Rothwell

    - fix for filenames with colons in the initramfs source by me.

    * 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild: (22 commits)
    initramfs: Escape colons in depfile
    ppc: there is no clear_pages to export
    powerpc/64: whitelist unresolved modversions CRCs
    kbuild: -ffunction-sections fix for archs with conflicting sections
    kbuild: add arch specific post-link Makefile
    kbuild: allow archs to select link dead code/data elimination
    kbuild: allow architectures to use thin archives instead of ld -r
    kbuild: Regenerate genksyms lexer
    kbuild: genksyms fix for typeof handling
    fixdep: faster CONFIG_ search
    ia64: move exports to definitions
    sparc32: debride memcpy.S a bit
    [sparc] unify 32bit and 64bit string.h
    sparc: move exports to definitions
    ppc: move exports to definitions
    arm: move exports to definitions
    s390: move exports to definitions
    m68k: move exports to definitions
    alpha: move exports to actual definitions
    x86: move exports to actual definitions
    ...

    Linus Torvalds
     
  • Pull libata updates from Tejun Heo:
    - Write same support added
    - Minor ahci MSIX irq handling updates
    - Non-critical SCSI command translation fixes
    - Controller specific changes

    * 'for-4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata:
    ahci: qoriq: Revert "ahci: qoriq: Disable NCQ on ls2080a SoC"
    libata: remove
    libata: remove unused definitions from
    pata_at91: Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR
    ata: Replace BUG() with BUG_ON().
    ata: sata_mv: Replacing dma_pool_alloc and memset with a single call dma_pool_zalloc.
    libata: Some drives failing on SCT Write Same
    ahci: use pci_alloc_irq_vectors
    libata: SCT Write Same handle ATA_DFLAG_PIO
    libata: SCT Write Same / DSM Trim
    libata: Add support for SCT Write Same
    libata: Safely overwrite attached page in WRITE SAME xlat
    ahci: also use a per-port lock for the multi-MSIX case
    ARM: dts: STiH407-family: Add ports-implemented property in sata nodes
    ahci: st: Add ports-implemented property in support
    ahci: qoriq: enable snoopable sata read and write
    ahci: qoriq: adjust sata parameter
    libata-scsi: fix MODE SELECT translation for Control mode page
    libata-scsi: use u8 array to store mode page copy

    Linus Torvalds
     

08 Oct, 2016

1 commit

  • This is based on s390 version and needed to get rid of
    CONFIG_ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE

    Link: http://lkml.kernel.org/r/1473703083-8625-2-git-send-email-vgupta@synopsys.com
    Signed-off-by: Vineet Gupta
    Reported-by: kbuild test robot
    Cc: Tony Luck
    Cc: Fenghua Yu
    Cc: Ingo Molnar
    Cc: Peter Zijlstra
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Vineet Gupta
     

22 Sep, 2016

1 commit


15 Sep, 2016

2 commits

  • Signed-off-by: Ingo Molnar

    Ingo Molnar
     
  • Pull uaccess fixes from Al Viro:
    "Fixes for broken uaccess primitives - mostly lack of proper zeroing
    in copy_from_user()/get_user()/__get_user(), but for several
    architectures there's more (broken clear_user() on frv and
    strncpy_from_user() on hexagon)"

    * 'uaccess-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (28 commits)
    avr32: fix copy_from_user()
    microblaze: fix __get_user()
    microblaze: fix copy_from_user()
    m32r: fix __get_user()
    blackfin: fix copy_from_user()
    sparc32: fix copy_from_user()
    sh: fix copy_from_user()
    sh64: failing __get_user() should zero
    score: fix copy_from_user() and friends
    score: fix __get_user/get_user
    s390: get_user() should zero on failure
    ppc32: fix copy_from_user()
    parisc: fix copy_from_user()
    openrisc: fix copy_from_user()
    nios2: fix __get_user()
    nios2: copy_from_user() should zero the tail of destination
    mn10300: copy_from_user() should zero on access_ok() failure...
    mn10300: failing __get_user() and get_user() should zero
    mips: copy_from_user() must zero the destination on access_ok() failure
    ARC: uaccess: get_user to zero out dest in cause of fault
    ...

    Linus Torvalds
     

14 Sep, 2016

1 commit


07 Sep, 2016

1 commit

  • Instead of having each caller of check_object_size() need to remember to
    check for a const size parameter, move the check into check_object_size()
    itself. This actually matches the original implementation in PaX, though
    this commit cleans up the now-redundant builtin_const() calls in the
    various architectures.

    Signed-off-by: Kees Cook

    Kees Cook
     

24 Aug, 2016

1 commit

  • If CONFIG_VMAP_STACK=y is selected, kernel stacks are allocated with
    __vmalloc_node_range().

    Grsecurity has had a similar feature (called GRKERNSEC_KSTACKOVERFLOW=y)
    for a long time.

    Signed-off-by: Andy Lutomirski
    Acked-by: Michal Hocko
    Cc: Alexander Potapenko
    Cc: Andrey Ryabinin
    Cc: Borislav Petkov
    Cc: Brian Gerst
    Cc: Denys Vlasenko
    Cc: Dmitry Vyukov
    Cc: H. Peter Anvin
    Cc: Josh Poimboeuf
    Cc: Linus Torvalds
    Cc: Oleg Nesterov
    Cc: Peter Zijlstra
    Cc: Thomas Gleixner
    Link: http://lkml.kernel.org/r/14c07d4fd173a5b117f51e8b939f9f4323e39899.1470907718.git.luto@kernel.org
    [ Minor edits. ]
    Signed-off-by: Ingo Molnar

    Andy Lutomirski
     

09 Aug, 2016

1 commit

  • Pull usercopy protection from Kees Cook:
    "Tbhis implements HARDENED_USERCOPY verification of copy_to_user and
    copy_from_user bounds checking for most architectures on SLAB and
    SLUB"

    * tag 'usercopy-v4.8' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux:
    mm: SLUB hardened usercopy support
    mm: SLAB hardened usercopy support
    s390/uaccess: Enable hardened usercopy
    sparc/uaccess: Enable hardened usercopy
    powerpc/uaccess: Enable hardened usercopy
    ia64/uaccess: Enable hardened usercopy
    arm64/uaccess: Enable hardened usercopy
    ARM: uaccess: Enable hardened usercopy
    x86/uaccess: Enable hardened usercopy
    mm: Hardened usercopy
    mm: Implement stack frame object validation
    mm: Add is_migrate_cma_page

    Linus Torvalds
     

08 Aug, 2016

1 commit

  • Here we have another kind of deviation from the default case -
    a difference between exporting functions and non-functions.
    EXPORT_DATA_SYMBOL... is really different from EXPORT_SYMBOL...
    on ia64, and we need to use the right one when moving exports
    from *.c where C compiler has the required information to
    *.S, where we need to supply it manually.

    parisc64 will be another one like that.

    Tested-by: Tony Luck
    Signed-off-by: Al Viro

    Al Viro
     

05 Aug, 2016

1 commit

  • 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
     

04 Aug, 2016

1 commit

  • 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
     

03 Aug, 2016

1 commit

  • In general, there's no need for the "restore sigmask" flag to live in
    ti->flags. alpha, ia64, microblaze, powerpc, sh, sparc (64-bit only),
    tile, and x86 use essentially identical alternative implementations,
    placing the flag in ti->status.

    Replace those optimized implementations with an equally good common
    implementation that stores it in a bitfield in struct task_struct and
    drop the custom implementations.

    Additional architectures can opt in by removing their
    TIF_RESTORE_SIGMASK defines.

    Link: http://lkml.kernel.org/r/8a14321d64a28e40adfddc90e18a96c086a6d6f9.1468522723.git.luto@kernel.org
    Signed-off-by: Andy Lutomirski
    Tested-by: Michael Ellerman [powerpc]
    Cc: Richard Henderson
    Cc: Ivan Kokshaysky
    Cc: Matt Turner
    Cc: Tony Luck
    Cc: Fenghua Yu
    Cc: Michal Simek
    Cc: Benjamin Herrenschmidt
    Cc: Paul Mackerras
    Cc: Yoshinori Sato
    Cc: Rich Felker
    Cc: "David S. Miller"
    Cc: Chris Metcalf
    Cc: Peter Zijlstra
    Cc: Borislav Petkov
    Cc: Brian Gerst
    Cc: Dmitry Safonov
    Cc: Oleg Nesterov
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andy Lutomirski
     

27 Jul, 2016

5 commits

  • Merge updates from Andrew Morton:

    - a few misc bits

    - ocfs2

    - most(?) of MM

    * emailed patches from Andrew Morton : (125 commits)
    thp: fix comments of __pmd_trans_huge_lock()
    cgroup: remove unnecessary 0 check from css_from_id()
    cgroup: fix idr leak for the first cgroup root
    mm: memcontrol: fix documentation for compound parameter
    mm: memcontrol: remove BUG_ON in uncharge_list
    mm: fix build warnings in
    mm, thp: convert from optimistic swapin collapsing to conservative
    mm, thp: fix comment inconsistency for swapin readahead functions
    thp: update Documentation/{vm/transhuge,filesystems/proc}.txt
    shmem: split huge pages beyond i_size under memory pressure
    thp: introduce CONFIG_TRANSPARENT_HUGE_PAGECACHE
    khugepaged: add support of collapse for tmpfs/shmem pages
    shmem: make shmem_inode_info::lock irq-safe
    khugepaged: move up_read(mmap_sem) out of khugepaged_alloc_page()
    thp: extract khugepaged from mm/huge_memory.c
    shmem, thp: respect MADV_{NO,}HUGEPAGE for file mappings
    shmem: add huge pages support
    shmem: get_unmapped_area align huge page
    shmem: prepare huge= mount option and sysfs knob
    mm, rmap: account shmem thp pages
    ...

    Linus Torvalds
     
  • Pull ACPI updates from Rafael Wysocki:
    "The new feaures here are the support for ACPI overlays (allowing ACPI
    tables to be loaded at any time from EFI variables or via configfs)
    and the LPI (Low-Power Idle) support. Also notable is the ACPI-based
    NUMA support for ARM64.

    Apart from that we have two new drivers, for the DPTF (Dynamic Power
    and Thermal Framework) power participant device and for the Intel
    Broxton WhiskeyCove PMIC, some more PMIC-related changes, support for
    the Boot Error Record Table (BERT) in APEI and support for
    platform-initiated graceful shutdown.

    Plus two new pieces of documentation and usual assorted fixes and
    cleanups in quite a few places.

    Specifics:

    - Support for ACPI SSDT overlays allowing Secondary System
    Description Tables (SSDTs) to be loaded at any time from EFI
    variables or via configfs (Octavian Purdila, Mika Westerberg).

    - Support for the ACPI LPI (Low-Power Idle) feature introduced in
    ACPI 6.0 and allowing processor idle states to be represented in
    ACPI tables in a hierarchical way (with the help of Processor
    Container objects) and support for ACPI idle states management on
    ARM64, based on LPI (Sudeep Holla).

    - General improvements of ACPI support for NUMA and ARM64 support for
    ACPI-based NUMA (Hanjun Guo, David Daney, Robert Richter).

    - General improvements of the ACPI table upgrade mechanism and ARM64
    support for that feature (Aleksey Makarov, Jon Masters).

    - Support for the Boot Error Record Table (BERT) in APEI and
    improvements of kernel messages printed by the error injection code
    (Huang Ying, Borislav Petkov).

    - New driver for the Intel Broxton WhiskeyCove PMIC operation region
    and support for the REGS operation region on Broxton, PMIC code
    cleanups (Bin Gao, Felipe Balbi, Paul Gortmaker).

    - New driver for the power participant device which is part of the
    Dynamic Power and Thermal Framework (DPTF) and DPTF-related code
    reorganization (Srinivas Pandruvada).

    - Support for the platform-initiated graceful shutdown feature
    introduced in ACPI 6.1 (Prashanth Prakash).

    - ACPI button driver update related to lid input events generated
    automatically on initialization and system resume that have been
    problematic for some time (Lv Zheng).

    - ACPI EC driver cleanups (Lv Zheng).

    - Documentation of the ACPICA release automation process and the
    in-kernel ACPI AML debugger (Lv Zheng).

    - New blacklist entry and two fixes for the ACPI backlight driver
    (Alex Hung, Arvind Yadav, Ralf Gerbig).

    - Cleanups of the ACPI pci_slot driver (Joe Perches, Paul Gortmaker).

    - ACPI CPPC code changes to make it more robust against possible
    defects in ACPI tables and new symbol definitions for PCC (Hoan
    Tran).

    - System reboot code modification to execute the ACPI _PTS (Prepare
    To Sleep) method in addition to _TTS (Ocean He).

    - ACPICA-related change to carry out lock ordering checks in ACPICA
    if ACPICA debug is enabled in the kernel (Lv Zheng).

    - Assorted minor fixes and cleanups (Andy Shevchenko, Baoquan He,
    Bhaktipriya Shridhar, Paul Gortmaker, Rafael Wysocki)"

    * tag 'acpi-4.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (71 commits)
    ACPI: enable ACPI_PROCESSOR_IDLE on ARM64
    arm64: add support for ACPI Low Power Idle(LPI)
    drivers: firmware: psci: initialise idle states using ACPI LPI
    cpuidle: introduce CPU_PM_CPU_IDLE_ENTER macro for ARM{32, 64}
    arm64: cpuidle: drop __init section marker to arm_cpuidle_init
    ACPI / processor_idle: Add support for Low Power Idle(LPI) states
    ACPI / processor_idle: introduce ACPI_PROCESSOR_CSTATE
    ACPI / DPTF: move int340x_thermal.c to the DPTF folder
    ACPI / DPTF: Add DPTF power participant driver
    ACPI / lpat: make it explicitly non-modular
    ACPI / dock: make dock explicitly non-modular
    ACPI / PCI: make pci_slot explicitly non-modular
    ACPI / PMIC: remove modular references from non-modular code
    ACPICA: Linux: Enable ACPI_MUTEX_DEBUG for Linux kernel
    ACPI: Rename configfs.c to acpi_configfs.c to prevent link error
    ACPI / debugger: Add AML debugger documentation
    ACPI: Add documentation describing ACPICA release automation
    ACPI: add support for loading SSDTs via configfs
    ACPI: add support for configfs
    efi / ACPI: load SSTDs from EFI variables
    ...

    Linus Torvalds
     
  • This allows an arch which needs to do special handing with respect to
    different page size when flushing tlb to implement the same in mmu
    gather.

    Link: http://lkml.kernel.org/r/1465049193-22197-3-git-send-email-aneesh.kumar@linux.vnet.ibm.com
    Signed-off-by: Aneesh Kumar K.V
    Cc: Benjamin Herrenschmidt
    Cc: Michael Ellerman
    Cc: Hugh Dickins
    Cc: "Kirill A. Shutemov"
    Cc: Andrea Arcangeli
    Cc: Joonsoo Kim
    Cc: Mel Gorman
    Cc: David Rientjes
    Cc: Vlastimil Babka
    Cc: Minchan Kim
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Aneesh Kumar K.V
     
  • This updates the generic and arch specific implementation to return true
    if we need to do a tlb flush. That means if a __tlb_remove_page
    indicate a flush is needed, the page we try to remove need to be tracked
    and added again after the flush. We need to track it because we have
    already update the pte to none and we can't just loop back.

    This change is done to enable us to do a tlb_flush when we try to flush
    a range that consists of different page sizes. For architectures like
    ppc64, we can do a range based tlb flush and we need to track page size
    for that. When we try to remove a huge page, we will force a tlb flush
    and starts a new mmu gather.

    [aneesh.kumar@linux.vnet.ibm.com: mm-change-the-interface-for-__tlb_remove_page-v3]
    Link: http://lkml.kernel.org/r/1465049193-22197-2-git-send-email-aneesh.kumar@linux.vnet.ibm.com
    Link: http://lkml.kernel.org/r/1464860389-29019-2-git-send-email-aneesh.kumar@linux.vnet.ibm.com
    Signed-off-by: Aneesh Kumar K.V
    Cc: Benjamin Herrenschmidt
    Cc: Michael Ellerman
    Cc: Hugh Dickins
    Cc: "Kirill A. Shutemov"
    Cc: Andrea Arcangeli
    Cc: Joonsoo Kim
    Cc: Mel Gorman
    Cc: David Rientjes
    Cc: Vlastimil Babka
    Cc: Minchan Kim
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Aneesh Kumar K.V
     
  • Enables CONFIG_HARDENED_USERCOPY checks on ia64.

    Based on code from PaX and grsecurity.

    Signed-off-by: Kees Cook

    Kees Cook
     

26 Jul, 2016

1 commit

  • Pull locking updates from Ingo Molnar:
    "The locking tree was busier in this cycle than the usual pattern - a
    couple of major projects happened to coincide.

    The main changes are:

    - implement the atomic_fetch_{add,sub,and,or,xor}() API natively
    across all SMP architectures (Peter Zijlstra)

    - add atomic_fetch_{inc/dec}() as well, using the generic primitives
    (Davidlohr Bueso)

    - optimize various aspects of rwsems (Jason Low, Davidlohr Bueso,
    Waiman Long)

    - optimize smp_cond_load_acquire() on arm64 and implement LSE based
    atomic{,64}_fetch_{add,sub,and,andnot,or,xor}{,_relaxed,_acquire,_release}()
    on arm64 (Will Deacon)

    - introduce smp_acquire__after_ctrl_dep() and fix various barrier
    mis-uses and bugs (Peter Zijlstra)

    - after discovering ancient spin_unlock_wait() barrier bugs in its
    implementation and usage, strengthen its semantics and update/fix
    usage sites (Peter Zijlstra)

    - optimize mutex_trylock() fastpath (Peter Zijlstra)

    - ... misc fixes and cleanups"

    * 'locking-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (67 commits)
    locking/atomic: Introduce inc/dec variants for the atomic_fetch_$op() API
    locking/barriers, arch/arm64: Implement LDXR+WFE based smp_cond_load_acquire()
    locking/static_keys: Fix non static symbol Sparse warning
    locking/qspinlock: Use __this_cpu_dec() instead of full-blown this_cpu_dec()
    locking/atomic, arch/tile: Fix tilepro build
    locking/atomic, arch/m68k: Remove comment
    locking/atomic, arch/arc: Fix build
    locking/Documentation: Clarify limited control-dependency scope
    locking/atomic, arch/rwsem: Employ atomic_long_fetch_add()
    locking/atomic, arch/qrwlock: Employ atomic_fetch_add_acquire()
    locking/atomic, arch/mips: Convert to _relaxed atomics
    locking/atomic, arch/alpha: Convert to _relaxed atomics
    locking/atomic: Remove the deprecated atomic_{set,clear}_mask() functions
    locking/atomic: Remove linux/atomic.h:atomic_fetch_or()
    locking/atomic: Implement atomic{,64,_long}_fetch_{add,sub,and,andnot,or,xor}{,_relaxed,_acquire,_release}()
    locking/atomic: Fix atomic64_relaxed() bits
    locking/atomic, arch/xtensa: Implement atomic_fetch_{add,sub,and,or,xor}()
    locking/atomic, arch/x86: Implement atomic{,64}_fetch_{add,sub,and,or,xor}()
    locking/atomic, arch/tile: Implement atomic{,64}_fetch_{add,sub,and,or,xor}()
    locking/atomic, arch/sparc: Implement atomic{,64}_fetch_{add,sub,and,or,xor}()
    ...

    Linus Torvalds
     

25 Jul, 2016

1 commit

  • * acpi-numa:
    ACPI / NUMA: Enable ACPI based NUMA on ARM64
    arm64, ACPI, NUMA: NUMA support based on SRAT and SLIT
    ACPI / processor: Add acpi_map_madt_entry()
    ACPI / NUMA: Improve SRAT error detection and add messages
    ACPI / NUMA: Move acpi_numa_memory_affinity_init() to drivers/acpi/numa.c
    ACPI / NUMA: remove unneeded acpi_numa=1
    ACPI / NUMA: move bad_srat() and srat_disabled() to drivers/acpi/numa.c
    x86 / ACPI / NUMA: cleanup acpi_numa_processor_affinity_init()
    arm64, NUMA: Cleanup NUMA disabled messages
    arm64, NUMA: rework numa_add_memblk()
    ACPI / NUMA: move acpi_numa_slit_init() to drivers/acpi/numa.c
    ACPI / NUMA: Move acpi_numa_arch_fixup() to ia64 only
    ACPI / NUMA: remove duplicate NULL check
    ACPI / NUMA: Replace ACPI_DEBUG_PRINT() with pr_debug()
    ACPI / NUMA: Use pr_fmt() instead of printk

    Rafael J. Wysocki
     

25 Jun, 2016

1 commit

  • We've had the thread info allocated together with the thread stack for
    most architectures for a long time (since the thread_info was split off
    from the task struct), but that is about to change.

    But the patches that move the thread info to be off-stack (and a part of
    the task struct instead) made it clear how confused the allocator and
    freeing functions are.

    Because the common case was that we share an allocation with the thread
    stack and the thread_info, the two pointers were identical. That
    identity then meant that we would have things like

    ti = alloc_thread_info_node(tsk, node);
    ...
    tsk->stack = ti;

    which certainly _worked_ (since stack and thread_info have the same
    value), but is rather confusing: why are we assigning a thread_info to
    the stack? And if we move the thread_info away, the "confusing" code
    just gets to be entirely bogus.

    So remove all this confusion, and make it clear that we are doing the
    stack allocation by renaming and clarifying the function names to be
    about the stack. The fact that the thread_info then shares the
    allocation is an implementation detail, and not really about the
    allocation itself.

    This is a pure renaming and type fix: we pass in the same pointer, it's
    just that we clarify what the pointer means.

    The ia64 code that actually only has one single allocation (for all of
    task_struct, thread_info and kernel thread stack) now looks a bit odd,
    but since "tsk->stack" is actually not even used there, that oddity
    doesn't matter. It would be a separate thing to clean that up, I
    intentionally left the ia64 changes as a pure brute-force renaming and
    type change.

    Acked-by: Andy Lutomirski
    Signed-off-by: Linus Torvalds

    Linus Torvalds
     

16 Jun, 2016

1 commit

  • Implement FETCH-OP atomic primitives, these are very similar to the
    existing OP-RETURN primitives we already have, except they return the
    value of the atomic variable _before_ modification.

    This is especially useful for irreversible operations -- such as
    bitops (because it becomes impossible to reconstruct the state prior
    to modification).

    Signed-off-by: Peter Zijlstra (Intel)
    Cc: Andrew Morton
    Cc: Fenghua Yu
    Cc: Linus Torvalds
    Cc: Paul E. McKenney
    Cc: Peter Zijlstra
    Cc: Thomas Gleixner
    Cc: Tony Luck
    Cc: linux-arch@vger.kernel.org
    Cc: linux-ia64@vger.kernel.org
    Cc: linux-kernel@vger.kernel.org
    Signed-off-by: Ingo Molnar

    Peter Zijlstra
     

14 Jun, 2016

1 commit

  • This patch updates/fixes all spin_unlock_wait() implementations.

    The update is in semantics; where it previously was only a control
    dependency, we now upgrade to a full load-acquire to match the
    store-release from the spin_unlock() we waited on. This ensures that
    when spin_unlock_wait() returns, we're guaranteed to observe the full
    critical section we waited on.

    This fixes a number of spin_unlock_wait() users that (not
    unreasonably) rely on this.

    I also fixed a number of ticket lock versions to only wait on the
    current lock holder, instead of for a full unlock, as this is
    sufficient.

    Furthermore; again for ticket locks; I added an smp_rmb() in between
    the initial ticket load and the spin loop testing the current value
    because I could not convince myself the address dependency is
    sufficient, esp. if the loads are of different sizes.

    I'm more than happy to remove this smp_rmb() again if people are
    certain the address dependency does indeed work as expected.

    Note: PPC32 will be fixed independently

    Signed-off-by: Peter Zijlstra (Intel)
    Cc: Andrew Morton
    Cc: Linus Torvalds
    Cc: Paul E. McKenney
    Cc: Peter Zijlstra
    Cc: Thomas Gleixner
    Cc: chris@zankel.net
    Cc: cmetcalf@mellanox.com
    Cc: davem@davemloft.net
    Cc: dhowells@redhat.com
    Cc: james.hogan@imgtec.com
    Cc: jejb@parisc-linux.org
    Cc: linux@armlinux.org.uk
    Cc: mpe@ellerman.id.au
    Cc: ralf@linux-mips.org
    Cc: realmz6@gmail.com
    Cc: rkuo@codeaurora.org
    Cc: rth@twiddle.net
    Cc: schwidefsky@de.ibm.com
    Cc: tony.luck@intel.com
    Cc: vgupta@synopsys.com
    Cc: ysato@users.sourceforge.jp
    Cc: linux-kernel@vger.kernel.org
    Signed-off-by: Ingo Molnar

    Peter Zijlstra
     

08 Jun, 2016

3 commits

  • A while back Viro posted a number of 'interesting' mutex_is_locked()
    users on IRC, one of those was RCU.

    RCU seems to use mutex_is_locked() to avoid doing mutex_trylock(), the
    regular load before modify pattern.

    While the use isn't wrong per se, its curious in that its needed at all,
    mutex_trylock() should be good enough on its own to avoid the pointless
    cacheline bounces.

    So fix those and remove the mutex_is_locked() (ab)use from RCU.

    Reported-by: Al Viro
    Signed-off-by: Peter Zijlstra (Intel)
    Acked-by: Paul McKenney
    Acked-by: Davidlohr Bueso
    Cc: Andrew Morton
    Cc: Linus Torvalds
    Cc: Paul E. McKenney
    Cc: Peter Zijlstra
    Cc: Thomas Gleixner
    Cc: Waiman Long
    Link: http://lkml.kernel.org/r/20160601185815.GW3190@twins.programming.kicks-ass.net
    Signed-off-by: Ingo Molnar

    Peter Zijlstra
     
  • The rwsem-xadd count has been converted to an atomic variable and the
    rwsem code now directly uses atomic_long_add() and
    atomic_long_add_return(), so we can remove the arch implementations of
    rwsem_atomic_add() and rwsem_atomic_update().

    Signed-off-by: Jason Low
    Signed-off-by: Peter Zijlstra (Intel)
    Cc: Andrew Morton
    Cc: Arnd Bergmann
    Cc: Christoph Lameter
    Cc: Davidlohr Bueso
    Cc: Fenghua Yu
    Cc: Heiko Carstens
    Cc: Ivan Kokshaysky
    Cc: Jason Low
    Cc: Linus Torvalds
    Cc: Martin Schwidefsky
    Cc: Matt Turner
    Cc: Paul E. McKenney
    Cc: Peter Hurley
    Cc: Peter Zijlstra
    Cc: Richard Henderson
    Cc: Terry Rudd
    Cc: Thomas Gleixner
    Cc: Tim Chen
    Cc: Tony Luck
    Cc: Waiman Long
    Cc: linux-kernel@vger.kernel.org
    Signed-off-by: Ingo Molnar

    Jason Low
     
  • Convert the rwsem count variable to an atomic_long_t since we use it
    as an atomic variable. This also allows us to remove the
    rwsem_atomic_{add,update}() "abstraction" which would now be an unnecesary
    level of indirection. In follow up patches, we also remove the
    rwsem_atomic_{add,update}() definitions across the various architectures.

    Suggested-by: Peter Zijlstra
    Signed-off-by: Jason Low
    [ Build warning fixes on various architectures. ]
    Signed-off-by: Peter Zijlstra (Intel)
    Cc: Andrew Morton
    Cc: Davidlohr Bueso
    Cc: Fenghua Yu
    Cc: Heiko Carstens
    Cc: Jason Low
    Cc: Linus Torvalds
    Cc: Martin Schwidefsky
    Cc: Paul E. McKenney
    Cc: Peter Hurley
    Cc: Terry Rudd
    Cc: Thomas Gleixner
    Cc: Tim Chen
    Cc: Tony Luck
    Cc: Waiman Long
    Link: http://lkml.kernel.org/r/1465017963-4839-2-git-send-email-jason.low2@hpe.com
    Signed-off-by: Ingo Molnar

    Jason Low
     

04 Jun, 2016

1 commit

  • Nothing on these architectures ever includes the asm/mc146818rtc.h
    file, the drivers that used to do this have been fixed long ago,
    and the remaining users are all PC-specific.

    This removes the files for good.

    Signed-off-by: Arnd Bergmann
    Acked-by: Geert Uytterhoeven
    Signed-off-by: Alexandre Belloni

    Arnd Bergmann
     

30 May, 2016

1 commit

  • Since acpi_numa_arch_fixup() is only used in arch ia64, move it there
    to make a generic interface easier. This avoids empty function stubs
    or some complex kconfig options for x86 and arm64.

    Signed-off-by: Robert Richter
    Reviewed-by: Hanjun Guo
    Signed-off-by: David Daney
    Signed-off-by: Rafael J. Wysocki

    Robert Richter
     

18 May, 2016

1 commit

  • Pull trivial tree updates from Jiri Kosina.

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (21 commits)
    gitignore: fix wording
    mfd: ab8500-debugfs: fix "between" in printk
    memstick: trivial fix of spelling mistake on management
    cpupowerutils: bench: fix "average"
    treewide: Fix typos in printk
    IB/mlx4: printk fix
    pinctrl: sirf/atlas7: fix printk spelling
    serial: mctrl_gpio: Grammar s/lines GPIOs/line GPIOs/, /sets/set/
    w1: comment spelling s/minmum/minimum/
    Blackfin: comment spelling s/divsor/divisor/
    metag: Fix misspellings in comments.
    ia64: Fix misspellings in comments.
    hexagon: Fix misspellings in comments.
    tools/perf: Fix misspellings in comments.
    cris: Fix misspellings in comments.
    c6x: Fix misspellings in comments.
    blackfin: Fix misspelling of 'register' in comment.
    avr32: Fix misspelling of 'definitions' in comment.
    treewide: Fix typos in printk
    Doc: treewide : Fix typos in DocBook/filesystem.xml
    ...

    Linus Torvalds
     

17 May, 2016

1 commit

  • Pull x86 asm updates from Ingo Molnar:
    "The main changes in this cycle were:

    - MSR access API fixes and enhancements (Andy Lutomirski)

    - early exception handling improvements (Andy Lutomirski)

    - user-space FS/GS prctl usage fixes and improvements (Andy
    Lutomirski)

    - Remove the cpu_has_*() APIs and replace them with equivalents
    (Borislav Petkov)

    - task switch micro-optimization (Brian Gerst)

    - 32-bit entry code simplification (Denys Vlasenko)

    - enhance PAT handling in enumated CPUs (Toshi Kani)

    ... and lots of other cleanups/fixlets"

    * 'x86-asm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (70 commits)
    x86/arch_prctl/64: Restore accidentally removed put_cpu() in ARCH_SET_GS
    x86/entry/32: Remove asmlinkage_protect()
    x86/entry/32: Remove GET_THREAD_INFO() from entry code
    x86/entry, sched/x86: Don't save/restore EFLAGS on task switch
    x86/asm/entry/32: Simplify pushes of zeroed pt_regs->REGs
    selftests/x86/ldt_gdt: Test set_thread_area() deletion of an active segment
    x86/tls: Synchronize segment registers in set_thread_area()
    x86/asm/64: Rename thread_struct's fs and gs to fsbase and gsbase
    x86/arch_prctl/64: Remove FSBASE/GSBASE < 4G optimization
    x86/segments/64: When load_gs_index fails, clear the base
    x86/segments/64: When loadsegment(fs, ...) fails, clear the base
    x86/asm: Make asm/alternative.h safe from assembly
    x86/asm: Stop depending on ptrace.h in alternative.h
    x86/entry: Rename is_{ia32,x32}_task() to in_{ia32,x32}_syscall()
    x86/asm: Make sure verify_cpu() has a good stack
    x86/extable: Add a comment about early exception handlers
    x86/msr: Set the return value to zero when native_rdmsr_safe() fails
    x86/paravirt: Make "unsafe" MSR accesses unsafe even if PARAVIRT=y
    x86/paravirt: Add paravirt_{read,write}_msr()
    x86/msr: Carry on after a non-"safe" MSR access fails
    ...

    Linus Torvalds
     

18 Apr, 2016

1 commit


13 Apr, 2016

1 commit

  • Introduce ___down_write() for the fast path and reuse it for __down_write()
    resp. __down_write_killable() each using the respective generic slow path
    (rwsem_down_write_failed() resp. rwsem_down_write_failed_killable()).

    Signed-off-by: Michal Hocko
    Cc: Andrew Morton
    Cc: Chris Zankel
    Cc: David S. Miller
    Cc: Linus Torvalds
    Cc: Max Filippov
    Cc: Paul E. McKenney
    Cc: Peter Zijlstra
    Cc: Signed-off-by: Davidlohr Bueso
    Cc: Signed-off-by: Jason Low
    Cc: Thomas Gleixner
    Cc: Tony Luck
    Cc: linux-alpha@vger.kernel.org
    Cc: linux-arch@vger.kernel.org
    Cc: linux-ia64@vger.kernel.org
    Cc: linux-s390@vger.kernel.org
    Cc: linux-sh@vger.kernel.org
    Cc: linux-xtensa@linux-xtensa.org
    Cc: sparclinux@vger.kernel.org
    Link: http://lkml.kernel.org/r/1460041951-22347-9-git-send-email-mhocko@kernel.org
    Signed-off-by: Ingo Molnar

    Michal Hocko
     

31 Mar, 2016

1 commit


26 Mar, 2016

1 commit


23 Mar, 2016

1 commit


21 Mar, 2016

1 commit

  • Pull x86 protection key support from Ingo Molnar:
    "This tree adds support for a new memory protection hardware feature
    that is available in upcoming Intel CPUs: 'protection keys' (pkeys).

    There's a background article at LWN.net:

    https://lwn.net/Articles/643797/

    The gist is that protection keys allow the encoding of
    user-controllable permission masks in the pte. So instead of having a
    fixed protection mask in the pte (which needs a system call to change
    and works on a per page basis), the user can map a (handful of)
    protection mask variants and can change the masks runtime relatively
    cheaply, without having to change every single page in the affected
    virtual memory range.

    This allows the dynamic switching of the protection bits of large
    amounts of virtual memory, via user-space instructions. It also
    allows more precise control of MMU permission bits: for example the
    executable bit is separate from the read bit (see more about that
    below).

    This tree adds the MM infrastructure and low level x86 glue needed for
    that, plus it adds a high level API to make use of protection keys -
    if a user-space application calls:

    mmap(..., PROT_EXEC);

    or

    mprotect(ptr, sz, PROT_EXEC);

    (note PROT_EXEC-only, without PROT_READ/WRITE), the kernel will notice
    this special case, and will set a special protection key on this
    memory range. It also sets the appropriate bits in the Protection
    Keys User Rights (PKRU) register so that the memory becomes unreadable
    and unwritable.

    So using protection keys the kernel is able to implement 'true'
    PROT_EXEC on x86 CPUs: without protection keys PROT_EXEC implies
    PROT_READ as well. Unreadable executable mappings have security
    advantages: they cannot be read via information leaks to figure out
    ASLR details, nor can they be scanned for ROP gadgets - and they
    cannot be used by exploits for data purposes either.

    We know about no user-space code that relies on pure PROT_EXEC
    mappings today, but binary loaders could start making use of this new
    feature to map binaries and libraries in a more secure fashion.

    There is other pending pkeys work that offers more high level system
    call APIs to manage protection keys - but those are not part of this
    pull request.

    Right now there's a Kconfig that controls this feature
    (CONFIG_X86_INTEL_MEMORY_PROTECTION_KEYS) that is default enabled
    (like most x86 CPU feature enablement code that has no runtime
    overhead), but it's not user-configurable at the moment. If there's
    any serious problem with this then we can make it configurable and/or
    flip the default"

    * 'mm-pkeys-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (38 commits)
    x86/mm/pkeys: Fix mismerge of protection keys CPUID bits
    mm/pkeys: Fix siginfo ABI breakage caused by new u64 field
    x86/mm/pkeys: Fix access_error() denial of writes to write-only VMA
    mm/core, x86/mm/pkeys: Add execute-only protection keys support
    x86/mm/pkeys: Create an x86 arch_calc_vm_prot_bits() for VMA flags
    x86/mm/pkeys: Allow kernel to modify user pkey rights register
    x86/fpu: Allow setting of XSAVE state
    x86/mm: Factor out LDT init from context init
    mm/core, x86/mm/pkeys: Add arch_validate_pkey()
    mm/core, arch, powerpc: Pass a protection key in to calc_vm_flag_bits()
    x86/mm/pkeys: Actually enable Memory Protection Keys in the CPU
    x86/mm/pkeys: Add Kconfig prompt to existing config option
    x86/mm/pkeys: Dump pkey from VMA in /proc/pid/smaps
    x86/mm/pkeys: Dump PKRU with other kernel registers
    mm/core, x86/mm/pkeys: Differentiate instruction fetches
    x86/mm/pkeys: Optimize fault handling in access_error()
    mm/core: Do not enforce PKEY permissions on remote mm access
    um, pkeys: Add UML arch_*_access_permitted() methods
    mm/gup, x86/mm/pkeys: Check VMAs and PTEs for protection keys
    x86/mm/gup: Simplify get_user_pages() PTE bit handling
    ...

    Linus Torvalds
     

20 Mar, 2016

1 commit

  • Pull networking updates from David Miller:
    "Highlights:

    1) Support more Realtek wireless chips, from Jes Sorenson.

    2) New BPF types for per-cpu hash and arrap maps, from Alexei
    Starovoitov.

    3) Make several TCP sysctls per-namespace, from Nikolay Borisov.

    4) Allow the use of SO_REUSEPORT in order to do per-thread processing
    of incoming TCP/UDP connections. The muxing can be done using a
    BPF program which hashes the incoming packet. From Craig Gallek.

    5) Add a multiplexer for TCP streams, to provide a messaged based
    interface. BPF programs can be used to determine the message
    boundaries. From Tom Herbert.

    6) Add 802.1AE MACSEC support, from Sabrina Dubroca.

    7) Avoid factorial complexity when taking down an inetdev interface
    with lots of configured addresses. We were doing things like
    traversing the entire address less for each address removed, and
    flushing the entire netfilter conntrack table for every address as
    well.

    8) Add and use SKB bulk free infrastructure, from Jesper Brouer.

    9) Allow offloading u32 classifiers to hardware, and implement for
    ixgbe, from John Fastabend.

    10) Allow configuring IRQ coalescing parameters on a per-queue basis,
    from Kan Liang.

    11) Extend ethtool so that larger link mode masks can be supported.
    From David Decotigny.

    12) Introduce devlink, which can be used to configure port link types
    (ethernet vs Infiniband, etc.), port splitting, and switch device
    level attributes as a whole. From Jiri Pirko.

    13) Hardware offload support for flower classifiers, from Amir Vadai.

    14) Add "Local Checksum Offload". Basically, for a tunneled packet
    the checksum of the outer header is 'constant' (because with the
    checksum field filled into the inner protocol header, the payload
    of the outer frame checksums to 'zero'), and we can take advantage
    of that in various ways. From Edward Cree"

    * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next: (1548 commits)
    bonding: fix bond_get_stats()
    net: bcmgenet: fix dma api length mismatch
    net/mlx4_core: Fix backward compatibility on VFs
    phy: mdio-thunder: Fix some Kconfig typos
    lan78xx: add ndo_get_stats64
    lan78xx: handle statistics counter rollover
    RDS: TCP: Remove unused constant
    RDS: TCP: Add sysctl tunables for sndbuf/rcvbuf on rds-tcp socket
    net: smc911x: convert pxa dma to dmaengine
    team: remove duplicate set of flag IFF_MULTICAST
    bonding: remove duplicate set of flag IFF_MULTICAST
    net: fix a comment typo
    ethernet: micrel: fix some error codes
    ip_tunnels, bpf: define IP_TUNNEL_OPTS_MAX and use it
    bpf, dst: add and use dst_tclassid helper
    bpf: make skb->tc_classid also readable
    net: mvneta: bm: clarify dependencies
    cls_bpf: reset class and reuse major in da
    ldmvsw: Checkpatch sunvnet.c and sunvnet_common.c
    ldmvsw: Add ldmvsw.c driver code
    ...

    Linus Torvalds
     

19 Mar, 2016

1 commit

  • Merge second patch-bomb from Andrew Morton:

    - a couple of hotfixes

    - the rest of MM

    - a new timer slack control in procfs

    - a couple of procfs fixes

    - a few misc things

    - some printk tweaks

    - lib/ updates, notably to radix-tree.

    - add my and Nick Piggin's old userspace radix-tree test harness to
    tools/testing/radix-tree/. Matthew said it was a godsend during the
    radix-tree work he did.

    - a few code-size improvements, switching to __always_inline where gcc
    screwed up.

    - partially implement character sets in sscanf

    * emailed patches from Andrew Morton : (118 commits)
    sscanf: implement basic character sets
    lib/bug.c: use common WARN helper
    param: convert some "on"/"off" users to strtobool
    lib: add "on"/"off" support to kstrtobool
    lib: update single-char callers of strtobool()
    lib: move strtobool() to kstrtobool()
    include/linux/unaligned: force inlining of byteswap operations
    include/uapi/linux/byteorder, swab: force inlining of some byteswap operations
    include/asm-generic/atomic-long.h: force inlining of some atomic_long operations
    usb: common: convert to use match_string() helper
    ide: hpt366: convert to use match_string() helper
    ata: hpt366: convert to use match_string() helper
    power: ab8500: convert to use match_string() helper
    power: charger_manager: convert to use match_string() helper
    drm/edid: convert to use match_string() helper
    pinctrl: convert to use match_string() helper
    device property: convert to use match_string() helper
    lib/string: introduce match_string() helper
    radix-tree tests: add test for radix_tree_iter_next
    radix-tree tests: add regression3 test
    ...

    Linus Torvalds
     

18 Mar, 2016

1 commit

  • Pull GPIO updates from Linus Walleij:
    "This is the bulk of GPIO changes for kernel v4.6. There is quite a
    lot of interesting stuff going on.

    The patches to other subsystems and arch-wide are ACKed as far as
    possible, though I consider things like per-arch as
    essentially a part of the GPIO subsystem so it should not be needed.

    Core changes:

    - The gpio_chip is now a *real device*. Until now the gpio chips
    were just piggybacking the parent device or (gasp) floating in
    space outside of the device model.

    We now finally make GPIO chips devices. The gpio_chip will create
    a gpio_device which contains a struct device, and this gpio_device
    struct is kept private. Anything that needs to be kept private
    from the rest of the kernel will gradually be moved over to the
    gpio_device.

    - As a result of making the gpio_device a real device, we have added
    resource management, so devm_gpiochip_add_data() will cut down on
    overhead and reduce code lines. A huge slew of patches convert
    almost all drivers in the subsystem to use this.

    - Building on making the GPIO a real device, we add the first step of
    a new userspace ABI: the GPIO character device. We take small
    steps here, so we first add a pure *information* ABI and the tool
    "lsgpio" that will list all GPIO devices on the system and all
    lines on these devices.

    We can now discover GPIOs properly from userspace. We still have
    not come up with a way to actually *use* GPIOs from userspace.

    - To encourage people to use the character device for the future, we
    have it always-enabled when using GPIO. The old sysfs ABI is still
    opt-in (and can be used in parallel), but is marked as deprecated.

    We will keep it around for the foreseeable future, but it will not
    be extended to cover ever more use cases.

    Cleanup:

    - Bjorn Helgaas removed a whole slew of per-architecture
    includes.

    This dates back to when GPIO was an opt-in feature and no shared
    library even existed: just a header file with proper prototypes was
    provided and all semantics were up to the arch to implement. These
    patches make the GPIO chip even more a proper device and cleans out
    leftovers of the old in-kernel API here and there.

    Still some cruft is left but it's very little now.

    - There is still some clamping of return values for .get() going on,
    but we now return sane values in the vast majority of drivers and
    the errorpath is sanitized. Some patches for powerpc, blackfin and
    unicore still drop in.

    - We continue to switch the ARM, MIPS, blackfin, m68k local GPIO
    implementations to use gpiochip_add_data() and cut down on code
    lines.

    - MPC8xxx is converted to use the generic GPIO helpers.

    - ATH79 is converted to use the generic GPIO helpers.

    New drivers:

    - WinSystems WS16C48

    - Acces 104-DIO-48E

    - F81866 (a F7188x variant)

    - Qoric (a MPC8xxx variant)

    - TS-4800

    - SPI serializers (pisosr): simple 74xx shift registers connected to
    SPI to obtain a dirt-cheap output-only GPIO expander.

    - Texas Instruments TPIC2810

    - Texas Instruments TPS65218

    - Texas Instruments TPS65912

    - X-Gene (ARM64) standby GPIO controller"

    * tag 'gpio-v4.6-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio: (194 commits)
    Revert "Share upstreaming patches"
    gpio: mcp23s08: Fix clearing of interrupt.
    gpiolib: Fix comment referring to gpio_*() in gpiod_*()
    gpio: pca953x: Fix pca953x_gpio_set_multiple() on 64-bit
    gpio: xgene: Fix kconfig for standby GIPO contoller
    gpio: Add generic serializer DT binding
    gpio: uapi: use 0xB4 as ioctl() major
    gpio: tps65912: fix bad merge
    Revert "gpio: lp3943: Drop pin_used and lp3943_gpio_request/lp3943_gpio_free"
    gpio: omap: drop dev field from gpio_bank structure
    gpio: mpc8xxx: Slightly update the code for better readability
    gpio: mpc8xxx: Remove *read_reg and *write_reg from struct mpc8xxx_gpio_chip
    gpio: mpc8xxx: Fixup setting gpio direction output
    gpio: mcp23s08: Add support for mcp23s18
    dt-bindings: gpio: altera: Fix altr,interrupt-type property
    gpio: add driver for MEN 16Z127 GPIO controller
    gpio: lp3943: Drop pin_used and lp3943_gpio_request/lp3943_gpio_free
    gpio: timberdale: Switch to devm_ioremap_resource()
    gpio: ts4800: Add IMX51 dependency
    gpiolib: rewrite gpiodev_add_to_list
    ...

    Linus Torvalds