20 Dec, 2017

1 commit

  • [ Upstream commit 1c363531dd814dc4fe10865722bf6b0f72ce4673 ]

    The build robot is complaining on Blackfin:

    drivers/pinctrl/pinctrl-adi2.c: In function 'port_setup':
    >> drivers/pinctrl/pinctrl-adi2.c:221:21: error: dereferencing
    pointer to incomplete type 'struct gpio_port_t'
    writew(readw(®s->port_fer) & ~BIT(offset),
    ^~
    drivers/pinctrl/pinctrl-adi2.c: In function 'adi_gpio_ack_irq':
    >> drivers/pinctrl/pinctrl-adi2.c:266:18: error: dereferencing
    pointer to incomplete type 'struct bfin_pint_regs'
    if (readl(®s->invert_set) & pintbit)
    ^~
    It seems the driver need to include and
    to compile.

    The Blackfin architecture was re-defining the Kconfig
    PINCTRL symbol which is not OK, so replaced this with
    PINCTRL_BLACKFIN_ADI2 which selects PINCTRL and PINCTRL_ADI2
    just like most arches do.

    Further, the old GPIO driver symbol GPIO_ADI was possible to
    select at the same time as selecting PINCTRL. This was not
    working because the arch-local header contains
    an explicit #ifndef PINCTRL clause making compilation break
    if you combine them. The same is true for DEBUG_MMRS.

    Make sure the ADI2 pinctrl driver is not selected at the same
    time as the old GPIO implementation. (This should be converted
    to use gpiolib or pincontrol and move to drivers/...) Also make
    sure the old GPIO_ADI driver or DEBUG_MMRS is not selected at
    the same time as the new PINCTRL implementation, and only make
    PINCTRL_ADI2 selectable for the Blackfin families that actually
    have it.

    This way it is still possible to add e.g. I2C-based pin
    control expanders on the Blackfin.

    Cc: Steven Miao
    Cc: Huanhuan Feng
    Signed-off-by: Linus Walleij
    Signed-off-by: Sasha Levin
    Signed-off-by: Greg Kroah-Hartman

    Linus Walleij
     

02 Nov, 2017

3 commits

  • Many user space API headers have licensing information, which is either
    incomplete, badly formatted or just a shorthand for referring to the
    license under which the file is supposed to be. This makes it hard for
    compliance tools to determine the correct license.

    Update these files with an SPDX license identifier. The identifier was
    chosen based on the license information in the file.

    GPL/LGPL licensed headers get the matching GPL/LGPL SPDX license
    identifier with the added 'WITH Linux-syscall-note' exception, which is
    the officially assigned exception identifier for the kernel syscall
    exception:

    NOTE! This copyright does *not* cover user programs that use kernel
    services by normal system calls - this is merely considered normal use
    of the kernel, and does *not* fall under the heading of "derived work".

    This exception makes it possible to include GPL headers into non GPL
    code, without confusing license compliance tools.

    Headers which have either explicit dual licensing or are just licensed
    under a non GPL license are updated with the corresponding SPDX
    identifier and the GPLv2 with syscall exception identifier. The format
    is:
    ((GPL-2.0 WITH Linux-syscall-note) OR SPDX-ID-OF-OTHER-LICENSE)

    SPDX license identifiers are a legally binding shorthand, which can be
    used instead of the full boiler plate text. The update does not remove
    existing license information as this has to be done on a case by case
    basis and the copyright holders might have to be consulted. This will
    happen in a separate step.

    This patch is based on work done by Thomas Gleixner and Kate Stewart and
    Philippe Ombredanne. See the previous patch in this series for the
    methodology of how this patch was researched.

    Reviewed-by: Kate Stewart
    Reviewed-by: Philippe Ombredanne
    Reviewed-by: Thomas Gleixner
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     
  • Many user space API headers are missing licensing information, which
    makes it hard for compliance tools to determine the correct license.

    By default are files without license information under the default
    license of the kernel, which is GPLV2. Marking them GPLV2 would exclude
    them from being included in non GPLV2 code, which is obviously not
    intended. The user space API headers fall under the syscall exception
    which is in the kernels COPYING file:

    NOTE! This copyright does *not* cover user programs that use kernel
    services by normal system calls - this is merely considered normal use
    of the kernel, and does *not* fall under the heading of "derived work".

    otherwise syscall usage would not be possible.

    Update the files which contain no license information with an SPDX
    license identifier. The chosen identifier is 'GPL-2.0 WITH
    Linux-syscall-note' which is the officially assigned identifier for the
    Linux syscall exception. SPDX license identifiers are a legally binding
    shorthand, which can be used instead of the full boiler plate text.

    This patch is based on work done by Thomas Gleixner and Kate Stewart and
    Philippe Ombredanne. See the previous patch in this series for the
    methodology of how this patch was researched.

    Reviewed-by: Kate Stewart
    Reviewed-by: Philippe Ombredanne
    Reviewed-by: Thomas Gleixner
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     
  • Many source files in the tree are missing licensing information, which
    makes it harder for compliance tools to determine the correct license.

    By default all files without license information are under the default
    license of the kernel, which is GPL version 2.

    Update the files which contain no license information with the 'GPL-2.0'
    SPDX license identifier. The SPDX identifier is a legally binding
    shorthand, which can be used instead of the full boiler plate text.

    This patch is based on work done by Thomas Gleixner and Kate Stewart and
    Philippe Ombredanne.

    How this work was done:

    Patches were generated and checked against linux-4.14-rc6 for a subset of
    the use cases:
    - file had no licensing information it it.
    - file was a */uapi/* one with no licensing information in it,
    - file was a */uapi/* one with existing licensing information,

    Further patches will be generated in subsequent months to fix up cases
    where non-standard license headers were used, and references to license
    had to be inferred by heuristics based on keywords.

    The analysis to determine which SPDX License Identifier to be applied to
    a file was done in a spreadsheet of side by side results from of the
    output of two independent scanners (ScanCode & Windriver) producing SPDX
    tag:value files created by Philippe Ombredanne. Philippe prepared the
    base worksheet, and did an initial spot review of a few 1000 files.

    The 4.13 kernel was the starting point of the analysis with 60,537 files
    assessed. Kate Stewart did a file by file comparison of the scanner
    results in the spreadsheet to determine which SPDX license identifier(s)
    to be applied to the file. She confirmed any determination that was not
    immediately clear with lawyers working with the Linux Foundation.

    Criteria used to select files for SPDX license identifier tagging was:
    - Files considered eligible had to be source code files.
    - Make and config files were included as candidates if they contained >5
    lines of source
    - File already had some variant of a license header in it (even if
    Reviewed-by: Philippe Ombredanne
    Reviewed-by: Thomas Gleixner
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     

12 Sep, 2017

1 commit

  • Pull namespace updates from Eric Biederman:
    "Life has been busy and I have not gotten half as much done this round
    as I would have liked. I delayed it so that a minor conflict
    resolution with the mips tree could spend a little time in linux-next
    before I sent this pull request.

    This includes two long delayed user namespace changes from Kirill
    Tkhai. It also includes a very useful change from Serge Hallyn that
    allows the security capability attribute to be used inside of user
    namespaces. The practical effect of this is people can now untar
    tarballs and install rpms in user namespaces. It had been suggested to
    generalize this and encode some of the namespace information
    information in the xattr name. Upon close inspection that makes the
    things that should be hard easy and the things that should be easy
    more expensive.

    Then there is my bugfix/cleanup for signal injection that removes the
    magic encoding of the siginfo union member from the kernel internal
    si_code. The mips folks reported the case where I had used FPE_FIXME
    me is impossible so I have remove FPE_FIXME from mips, while at the
    same time including a return statement in that case to keep gcc from
    complaining about unitialized variables.

    I almost finished the work to get make copy_siginfo_to_user a trivial
    copy to user. The code is available at:

    git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace.git neuter-copy_siginfo_to_user-v3

    But I did not have time/energy to get the code posted and reviewed
    before the merge window opened.

    I was able to see that the security excuse for just copying fields
    that we know are initialized doesn't work in practice there are buggy
    initializations that don't initialize the proper fields in siginfo. So
    we still sometimes copy unitialized data to userspace"

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace:
    Introduce v3 namespaced file capabilities
    mips/signal: In force_fcr31_sig return in the impossible case
    signal: Remove kernel interal si_code magic
    fcntl: Don't use ambiguous SIG_POLL si_codes
    prctl: Allow local CAP_SYS_ADMIN changing exe_file
    security: Use user_namespace::level to avoid redundant iterations in cap_capable()
    userns,pidns: Verify the userns for new pid namespaces
    signal/testing: Don't look for __SI_FAULT in userspace
    signal/mips: Document a conflict with SI_USER with SIGFPE
    signal/sparc: Document a conflict with SI_USER with SIGFPE
    signal/ia64: Document a conflict with SI_USER with SIGFPE
    signal/alpha: Document a conflict with SI_USER for SIGTRAP

    Linus Torvalds
     

10 Sep, 2017

2 commits

  • Pull MTD updates from Boris Brezillon:
    "General updates:
    - Constify pci_device_id in various drivers
    - Constify device_type
    - Remove pad control code from the Gemini driver
    - Use %pOF to print OF node full_name
    - Various fixes in the physmap_of driver
    - Remove unused vars in mtdswap
    - Check devm_kzalloc() return value in the spear_smi driver
    - Check clk_prepare_enable() return code in the st_spi_fsm driver
    - Create per MTD device debugfs enties

    NAND updates, from Boris Brezillon:
    - Fix memory leaks in the core
    - Remove unused NAND locking support
    - Rename nand.h into rawnand.h (preparing support for spi NANDs)
    - Use NAND_MAX_ID_LEN where appropriate
    - Fix support for 20nm Hynix chips
    - Fix support for Samsung and Hynix SLC NANDs
    - Various cleanup, improvements and fixes in the qcom driver
    - Fixes for bugs detected by various static code analysis tools
    - Fix mxc ooblayout definition
    - Add a new part_parsers to tmio and sharpsl platform data in order
    to define a custom list of partition parsers
    - Request the reset line in exclusive mode in the sunxi driver
    - Fix a build error in the orion-nand driver when compiled for ARMv4
    - Allow 64-bit mvebu platforms to select the PXA3XX driver

    SPI NOR updates, from Cyrille Pitchen and Marek Vasut:
    - add support to the JEDEC JESD216B specification (SFDP tables).
    - add support to the Intel Denverton SPI flash controller.
    - fix error recovery for Spansion/Cypress SPI NOR memories.
    - fix 4-byte address management for the Aspeed SPI controller.
    - add support to some Microchip SST26 memory parts
    - remove unneeded pinctrl header Write a message for tag:"

    * tag 'for-linus-20170904' of git://git.infradead.org/linux-mtd: (74 commits)
    mtd: nand: complain loudly when chip->bits_per_cell is not correctly initialized
    mtd: nand: make Samsung SLC NAND usable again
    mtd: nand: tmio: Register partitions using the parsers
    mfd: tmio: Add partition parsers platform data
    mtd: nand: sharpsl: Register partitions using the parsers
    mtd: nand: sharpsl: Add partition parsers platform data
    mtd: nand: qcom: Support for IPQ8074 QPIC NAND controller
    mtd: nand: qcom: support for IPQ4019 QPIC NAND controller
    dt-bindings: qcom_nandc: IPQ8074 QPIC NAND documentation
    dt-bindings: qcom_nandc: IPQ4019 QPIC NAND documentation
    dt-bindings: qcom_nandc: fix the ipq806x device tree example
    mtd: nand: qcom: support for different DEV_CMD register offsets
    mtd: nand: qcom: QPIC data descriptors handling
    mtd: nand: qcom: enable BAM or ADM mode
    mtd: nand: qcom: erased codeword detection configuration
    mtd: nand: qcom: support for read location registers
    mtd: nand: qcom: support for passing flags in DMA helper functions
    mtd: nand: qcom: add BAM DMA descriptor handling
    mtd: nand: qcom: allocate BAM transaction
    mtd: nand: qcom: DMA mapping support for register read buffer
    ...

    Linus Torvalds
     
  • Pull i2c updates from Wolfram Sang:

    - new drivers for Spreadtrum I2C, Intel Cherry Trail Whiskey Cove SMBUS

    - quite some driver updates

    - cleanups for the i2c-mux subsystem

    - some subsystem-wide constification

    - further cleanup of include/linux/i2c

    * 'i2c/for-4.14' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: (50 commits)
    i2c: sprd: Fix undefined reference errors
    i2c: nomadik: constify amba_id
    i2c: versatile: Make i2c_algo_bit_data const
    i2c: busses: make i2c_adapter_quirks const
    i2c: busses: make i2c_adapter const
    i2c: busses: make i2c_algorithm const
    i2c: Add Spreadtrum I2C controller driver
    dt-bindings: i2c: Add Spreadtrum I2C controller documentation
    i2c-cht-wc: make cht_wc_i2c_adap_driver static
    MAINTAINERS: Add entry for drivers/i2c/busses/i2c-cht-wc.c
    i2c: aspeed: Retain delay/setup/hold values when configuring bus frequency
    dt-bindings: i2c: eeprom: Document vendor to be used and deprecated ones
    i2c: i801: Restore the presence state of P2SB PCI device after reading BAR
    MAINTAINERS: drop entry for Blackfin I2C and Sonic's email
    blackfin: merge the two TWI header files
    i2c: davinci: Preserve return value of devm_clk_get
    i2c: mediatek: Add i2c compatible for MediaTek MT7622
    dt-bindings: i2c: Add MediaTek MT7622 i2c binding
    dt-bindings: i2c: modify information formats
    i2c: mux: i2c-arb-gpio-challenge: allow compiling w/o OF support
    ...

    Linus Torvalds
     

01 Sep, 2017

1 commit

  • From Boris:
    "
    This pull request contains the following core changes:

    * Fix memory leaks in the core
    * Remove unused NAND locking support
    * Rename nand.h into rawnand.h (preparing support for spi NANDs)
    * Use NAND_MAX_ID_LEN where appropriate
    * Fix support for 20nm Hynix chips
    * Fix support for Samsung and Hynix SLC NANDs

    and the following driver changes:

    * Various cleanup, improvements and fixes in the qcom driver
    * Fixes for bugs detected by various static code analysis tools
    * Fix mxc ooblayout definition
    * Add a new part_parsers to tmio and sharpsl platform data in order to
    define a custom list of partition parsers
    * Request the reset line in exclusive mode in the sunxi driver
    * Fix a build error in the orion-nand driver when compiled for ARMv4
    * Allow 64-bit mvebu platforms to select the PXA3XX driver
    "

    Boris Brezillon
     

27 Aug, 2017

1 commit


17 Aug, 2017

2 commits

  • …isc.2017.08.17a', 'spin_unlock_wait_no.2017.08.17a', 'srcu.2017.07.27c' and 'torture.2017.07.24c' into HEAD

    doc.2017.08.17a: Documentation updates.
    fixes.2017.08.17a: RCU fixes.
    hotplug.2017.07.25b: CPU-hotplug updates.
    misc.2017.08.17a: Miscellaneous fixes outside of RCU (give or take conflicts).
    spin_unlock_wait_no.2017.08.17a: Remove spin_unlock_wait().
    srcu.2017.07.27c: SRCU updates.
    torture.2017.07.24c: Torture-test updates.

    Paul E. McKenney
     
  • There is no agreed-upon definition of spin_unlock_wait()'s semantics,
    and it appears that all callers could do just as well with a lock/unlock
    pair. This commit therefore removes the underlying arch-specific
    arch_spin_unlock_wait() for all architectures providing them.

    Signed-off-by: Paul E. McKenney
    Cc:
    Cc: Peter Zijlstra
    Cc: Alan Stern
    Cc: Andrea Parri
    Cc: Linus Torvalds
    Acked-by: Will Deacon
    Acked-by: Boqun Feng

    Paul E. McKenney
     

13 Aug, 2017

1 commit

  • We are planning to share more code between different NAND based
    devices (SPI NAND, OneNAND and raw NANDs), but before doing that
    we need to move the existing include/linux/mtd/nand.h file into
    include/linux/mtd/rawnand.h so we can later create a nand.h header
    containing all common structure and function prototypes.

    Signed-off-by: Boris Brezillon
    Signed-off-by: Peter Pan
    Acked-by: Vladimir Zapolskiy
    Acked-by: Alexander Sverdlin
    Acked-by: Wenyou Yang
    Acked-by: Krzysztof Kozlowski
    Acked-by: Han Xu
    Acked-by: H Hartley Sweeten
    Acked-by: Shawn Guo
    Acked-by: Gregory CLEMENT
    Acked-by: Neil Armstrong
    Acked-by: Masahiro Yamada
    Acked-By: Harvey Hunt
    Acked-by: Tony Lindgren
    Acked-by: Krzysztof Halasa

    Boris Brezillon
     

25 Jul, 2017

2 commits

  • This commit removes the pr_fmt() macro, replacing it with mod_err() and
    mod_debug() macros to avoid errors when using printk() from header files.

    Signed-off-by: Joe Perches
    Signed-off-by: Paul E. McKenney

    Joe Perches
     
  • struct siginfo is a union and the kernel since 2.4 has been hiding a union
    tag in the high 16bits of si_code using the values:
    __SI_KILL
    __SI_TIMER
    __SI_POLL
    __SI_FAULT
    __SI_CHLD
    __SI_RT
    __SI_MESGQ
    __SI_SYS

    While this looks plausible on the surface, in practice this situation has
    not worked well.

    - Injected positive signals are not copied to user space properly
    unless they have these magic high bits set.

    - Injected positive signals are not reported properly by signalfd
    unless they have these magic high bits set.

    - These kernel internal values leaked to userspace via ptrace_peek_siginfo

    - It was possible to inject these kernel internal values and cause the
    the kernel to misbehave.

    - Kernel developers got confused and expected these kernel internal values
    in userspace in kernel self tests.

    - Kernel developers got confused and set si_code to __SI_FAULT which
    is SI_USER in userspace which causes userspace to think an ordinary user
    sent the signal and that it was not kernel generated.

    - The values make it impossible to reorganize the code to transform
    siginfo_copy_to_user into a plain copy_to_user. As si_code must
    be massaged before being passed to userspace.

    So remove these kernel internal si codes and make the kernel code simpler
    and more maintainable.

    To replace these kernel internal magic si_codes introduce the helper
    function siginfo_layout, that takes a signal number and an si_code and
    computes which union member of siginfo is being used. Have
    siginfo_layout return an enumeration so that gcc will have enough
    information to warn if a switch statement does not handle all of union
    members.

    A couple of architectures have a messed up ABI that defines signal
    specific duplications of SI_USER which causes more special cases in
    siginfo_layout than I would like. The good news is only problem
    architectures pay the cost.

    Update all of the code that used the previous magic __SI_ values to
    use the new SIL_ values and to call siginfo_layout to get those
    values. Escept where not all of the cases are handled remove the
    defaults in the switch statements so that if a new case is missed in
    the future the lack will show up at compile time.

    Modify the code that copies siginfo si_code to userspace to just copy
    the value and not cast si_code to a short first. The high bits are no
    longer used to hold a magic union member.

    Fixup the siginfo header files to stop including the __SI_ values in
    their constants and for the headers that were missing it to properly
    update the number of si_codes for each signal type.

    The fixes to copy_siginfo_from_user32 implementations has the
    interesting property that several of them perviously should never have
    worked as the __SI_ values they depended up where kernel internal.
    With that dependency gone those implementations should work much
    better.

    The idea of not passing the __SI_ values out to userspace and then
    not reinserting them has been tested with criu and criu worked without
    changes.

    Ref: 2.4.0-test1
    Signed-off-by: "Eric W. Biederman"

    Eric W. Biederman
     

22 Jul, 2017

1 commit


20 Jul, 2017

1 commit

  • Mike Galbraith reported a situation where a WARN_ON_ONCE() call in DRM
    code turned into an oops. As it turns out, WARN_ON_ONCE() seems to be
    completely broken when called from a module.

    The bug was introduced with the following commit:

    19d436268dde ("debug: Add _ONCE() logic to report_bug()")

    That commit changed WARN_ON_ONCE() to move its 'once' logic into the bug
    trap handler. It requires a writable bug table so that the BUGFLAG_DONE
    bit can be written to the flags to indicate the first warning has
    occurred.

    The bug table was made writable for vmlinux, which relies on
    vmlinux.lds.S and vmlinux.lds.h for laying out the sections. However,
    it wasn't made writable for modules, which rely on the ELF section
    header flags.

    Reported-by: Mike Galbraith
    Tested-by: Masami Hiramatsu
    Signed-off-by: Josh Poimboeuf
    Acked-by: Peter Zijlstra (Intel)
    Cc: Linus Torvalds
    Cc: Peter Zijlstra
    Cc: Thomas Gleixner
    Fixes: 19d436268dde ("debug: Add _ONCE() logic to report_bug()")
    Link: http://lkml.kernel.org/r/a53b04235a65478dd9afc51f5b329fdc65c84364.1500095401.git.jpoimboe@redhat.com
    Signed-off-by: Ingo Molnar

    Josh Poimboeuf
     

18 Jul, 2017

1 commit

  • Several variables had their types changed from unsigned long to u32,
    but the printk()-style format to print them wasn't updated, leading to:

    arch/blackfin/kernel/flat.c: In function 'bfin_get_addr_from_rp':
    arch/blackfin/kernel/flat.c:35:3: warning: format '%lx' expects argument of type 'long unsigned int', but argument 2 has type 'u32' [-Wformat]
    arch/blackfin/kernel/flat.c: In function 'bfin_put_addr_at_rp':
    arch/blackfin/kernel/flat.c:80:3: warning: format '%lx' expects argument of type 'long unsigned int', but argument 2 has type 'u32' [-Wformat]

    Fixes: 468138d78510688f ("binfmt_flat: flat_{get,put}_addr_from_rp() should be able to fail")
    Signed-off-by: Geert Uytterhoeven
    Signed-off-by: Linus Torvalds

    Geert Uytterhoeven
     

17 Jul, 2017

1 commit

  • Several variables had their types changed from unsigned long to u32, but
    the arch-specific implementations of flat_set_persistent() weren't
    updated, leading to compiler warnings on blackfin and m68k:

    fs/binfmt_flat.c: In function ‘load_flat_file’:
    fs/binfmt_flat.c:799: warning: passing argument 2 of ‘flat_set_persistent’ from incompatible pointer type

    Fixes: 468138d78510688f ("binfmt_flat: flat_{get,put}_addr_from_rp() should be able to fail")
    Signed-off-by: Geert Uytterhoeven
    Signed-off-by: Linus Torvalds

    Geert Uytterhoeven
     

16 Jul, 2017

1 commit


14 Jul, 2017

1 commit

  • Pull more Kbuild updates from Masahiro Yamada:

    - Move generic-y of exported headers to uapi/asm/Kbuild for complete
    de-coupling of UAPI

    - Clean up scripts/Makefile.headersinst

    - Fix host programs for 32 bit machine with XFS file system

    * tag 'kbuild-v4.13-2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: (29 commits)
    kbuild: Enable Large File Support for hostprogs
    kbuild: remove wrapper files handling from Makefile.headersinst
    kbuild: split exported generic header creation into uapi-asm-generic
    kbuild: do not include old-kbuild-file from Makefile.headersinst
    xtensa: move generic-y of exported headers to uapi/asm/Kbuild
    unicore32: move generic-y of exported headers to uapi/asm/Kbuild
    tile: move generic-y of exported headers to uapi/asm/Kbuild
    sparc: move generic-y of exported headers to uapi/asm/Kbuild
    sh: move generic-y of exported headers to uapi/asm/Kbuild
    parisc: move generic-y of exported headers to uapi/asm/Kbuild
    openrisc: move generic-y of exported headers to uapi/asm/Kbuild
    nios2: move generic-y of exported headers to uapi/asm/Kbuild
    nios2: remove unneeded arch/nios2/include/(generated/)asm/signal.h
    microblaze: move generic-y of exported headers to uapi/asm/Kbuild
    metag: move generic-y of exported headers to uapi/asm/Kbuild
    m68k: move generic-y of exported headers to uapi/asm/Kbuild
    m32r: move generic-y of exported headers to uapi/asm/Kbuild
    ia64: remove redundant generic-y += kvm_para.h from asm/Kbuild
    hexagon: move generic-y of exported headers to uapi/asm/Kbuild
    h8300: move generic-y of exported headers to uapi/asm/Kbuild
    ...

    Linus Torvalds
     

13 Jul, 2017

1 commit

  • For architectures that define HAVE_NMI_WATCHDOG, instead of having them
    provide the complete touch_nmi_watchdog() function, just have them
    provide arch_touch_nmi_watchdog().

    This gives the generic code more flexibility in implementing this
    function, and arch implementations don't miss out on touching the
    softlockup watchdog or other generic details.

    Link: http://lkml.kernel.org/r/20170616065715.18390-3-npiggin@gmail.com
    Signed-off-by: Nicholas Piggin
    Reviewed-by: Don Zickus
    Reviewed-by: Babu Moger
    Tested-by: Babu Moger [sparc]
    Cc: Benjamin Herrenschmidt
    Cc: Paul Mackerras
    Cc: Michael Ellerman
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Nicholas Piggin
     

10 Jul, 2017

1 commit

  • Since commit fcc8487d477a ("uapi: export all headers under uapi
    directories"), all (and only) headers under uapi directories are
    exported, but asm-generic wrappers are still exceptions.

    To complete de-coupling the uapi from kernel headers, move generic-y
    of exported headers to uapi/asm/Kbuild.

    With this change, "make headers_install" will just need to parse
    uapi/asm/Kbuild to build up exported headers.

    Also, move "generic-y += kprobes.h" up in order to keep the entries
    sorted.

    Signed-off-by: Masahiro Yamada

    Masahiro Yamada
     

08 Jul, 2017

2 commits

  • Pull backlight updates from Lee Jones:
    "Core Framework:
    - Report correct error status to user

    Fix-ups:
    - Move Backlight headers out of I2C (adp8860, adp8870)"

    * tag 'backlight-next-4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/backlight:
    video: adp8870: move header file out of I2C realm
    backlight: adp8860: Move header file out of I2C realm
    backlight: Report error on failure

    Linus Torvalds
     
  • Pull GPIO updates from Linus Walleij:
    "This is the bulk of GPIO changes for the v4.13 series.

    Some administrativa:

    I have a slew of 8250 serial patches and the new IOT2040 serial+GPIO
    driver coming in through this tree, along with a whole bunch of Exar
    8250 fixes. These are ACKed by Greg and also hit drivers/platform/*
    where they are ACKed by Andy Shevchenko.

    Speaking about drivers/platform/* there is also a bunch of ACPI stuff
    coming through that route, again ACKed by Andy.

    The MCP23S08 changes are coming in here as well. You already have the
    commits in your tree, so this is just a result of sharing an immutable
    branch between pin control and GPIO.

    Core:
    - Export add/remove for lookup tables so that modules can export GPIO
    descriptor tables.
    - Handle GPIO sleep states: it is now possible to flag that a GPIO
    line may loose its state during suspend/resume of the system to
    save power. This is used in the Wolfson Micro Arizona driver.
    - ACPI-based GPIO was tightened up a lot around the edges.
    - Use bitmap_fill() to speed up a loop.

    New drivers:
    - Exar XRA1403 SPI-based GPIO.
    - MVEBU driver now supports Armada 7K and 8K.
    - LP87565 PMIC GPIO.
    - Renesas R-CAR R8A7743 (RZ/G1M).
    - The new IOT2040 8250 serial/GPIO also comes in through this
    changeset.

    Substantial driver changes:
    - Seriously fix the Exar 8250 GPIO portions to work.
    - The MCP23S08 was moved out to a pin control driver.
    - Convert MEVEBU to use regmap for register access.
    - Drop Vulcan support from the Broadcom driver.
    - Serious cleanup and improvement of the mockup driver, giving us a
    better test coverage.

    Misc:
    - Lots of janitorial clean up.
    - A bunch of documentation fixes"

    * tag 'gpio-v4.13-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio: (70 commits)
    serial: exar: Add support for IOT2040 device
    gpio-exar/8250-exar: Make set of exported GPIOs configurable
    platform: Accept const properties
    serial: exar: Factor out platform hooks
    gpio-exar/8250-exar: Rearrange gpiochip parenthood
    gpio: exar: Fix iomap request
    gpio-exar/8250-exar: Do not even instantiate a GPIO device for Commtech cards
    serial: uapi: Add support for bus termination
    gpio: rcar: Add R8A7743 (RZ/G1M) support
    gpio: gpio-wcove: Fix GPIO control register offset calculation
    gpio: lp87565: Add support for GPIO
    gpio: dwapb: fix missing first irq for edgeboth irq type
    MAINTAINERS: Take maintainership for GPIO ACPI support
    gpio: exar: Fix reading of directions and values
    gpio: exar: Allocate resources on behalf of the platform device
    gpio-exar/8250-exar: Fix passing in of parent PCI device
    gpio: mockup: use devm_kcalloc() where applicable
    gpio: mockup: add myself as author
    gpio: mockup: improve the error message
    gpio: mockup: don't return magic numbers from probe()
    ...

    Linus Torvalds
     

07 Jul, 2017

3 commits

  • Pull user access str* updates from Al Viro:
    "uaccess str...() dead code removal"

    * 'uaccess.strlen' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
    s390 keyboard.c: don't open-code strndup_user()
    mips: get rid of unused __strnlen_user()
    get rid of unused __strncpy_from_user() instances
    kill strlen_user()

    Linus Torvalds
     
  • Pull dma-mapping infrastructure from Christoph Hellwig:
    "This is the first pull request for the new dma-mapping subsystem

    In this new subsystem we'll try to properly maintain all the generic
    code related to dma-mapping, and will further consolidate arch code
    into common helpers.

    This pull request contains:

    - removal of the DMA_ERROR_CODE macro, replacing it with calls to
    ->mapping_error so that the dma_map_ops instances are more self
    contained and can be shared across architectures (me)

    - removal of the ->set_dma_mask method, which duplicates the
    ->dma_capable one in terms of functionality, but requires more
    duplicate code.

    - various updates for the coherent dma pool and related arm code
    (Vladimir)

    - various smaller cleanups (me)"

    * tag 'dma-mapping-4.13' of git://git.infradead.org/users/hch/dma-mapping: (56 commits)
    ARM: dma-mapping: Remove traces of NOMMU code
    ARM: NOMMU: Set ARM_DMA_MEM_BUFFERABLE for M-class cpus
    ARM: NOMMU: Introduce dma operations for noMMU
    drivers: dma-mapping: allow dma_common_mmap() for NOMMU
    drivers: dma-coherent: Introduce default DMA pool
    drivers: dma-coherent: Account dma_pfn_offset when used with device tree
    dma: Take into account dma_pfn_offset
    dma-mapping: replace dmam_alloc_noncoherent with dmam_alloc_attrs
    dma-mapping: remove dmam_free_noncoherent
    crypto: qat - avoid an uninitialized variable warning
    au1100fb: remove a bogus dma_free_nonconsistent call
    MAINTAINERS: add entry for dma mapping helpers
    powerpc: merge __dma_set_mask into dma_set_mask
    dma-mapping: remove the set_dma_mask method
    powerpc/cell: use the dma_supported method for ops switching
    powerpc/cell: clean up fixed mapping dma_ops initialization
    tile: remove dma_supported and mapping_error methods
    xen-swiotlb: remove xen_swiotlb_set_dma_mask
    arm: implement ->dma_supported instead of ->set_dma_mask
    mips/loongson64: implement ->dma_supported instead of ->set_dma_mask
    ...

    Linus Torvalds
     
  • Pull pin control updates from Linus Walleij:
    "This is the big bulk of pin control changes for the v4.13 series:

    Core:
    - The documentation is moved over to RST.
    - We now have agreed bindings for enabling input and output buffers
    without actually enabling input and/or output on a pin. We are
    chiseling out some details of pin control electronics.

    New drivers:
    - ZTE ZX
    - Renesas RZA1
    - MIPS Ingenic JZ47xx: also switch over existing drivers in the tree
    to use this pin controller and consolidate earlier spread out code.
    - Microschip MCP23S08: this driver is migrated from the GPIO
    subsystem and totally rewritten to use proper pin control. All
    users are switched over.

    New subdrivers:
    - Renesas R8A7743 and R8A7745.
    - Allwinner Sunxi A83T R_PIO.
    - Marvell MVEBU Armada CP110 and AP806.
    - Intel Cannon Lake PCH.
    - Qualcomm IPQ8074.

    Notable improvements:
    - IRQ support on the Marvell MVEBU Armada 37xx.
    - Meson driver supports HDMI CEC, AO, I2S, SPDIF and PWM.
    - Rockchip driver now supports iomux-route switching for RK3228,
    RK3328 and RK3399.
    - Rockchip A10 and A20 are merged into a single driver.
    - STM32 has improved GPIO support.
    - Samsung Exynos drivers are split per ARMv7 and ARMv8.
    - Marvell MVEBU is converted to use regmap for register access.

    Maintenance:
    - Several Renesas SH-PFC refactorings and updates.
    - Serious code size cut for Mediatek MT7623.
    - Misc janitorial and MAINTAINERS fixes"

    * tag 'pinctrl-v4.13-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl: (137 commits)
    pinctrl: samsung: Remove bogus irq_[un]mask from resource management
    pinctrl: rza1: make structures rza1_gpiochip_template and rza1_pinmux_ops static
    pinctrl: rza1: Remove unneeded wrong check for wrong variable
    pinctrl: qcom: Add ipq8074 pinctrl driver
    pinctrl: freescale: imx7d: make of_device_ids const.
    pinctrl: DT: extend the pinmux property to support integers array
    pinctrl: generic: Add output-enable property
    pinctrl: armada-37xx: Fix number of pin in sdio_sb
    pinctrl: armada-37xx: Fix uart2 group selection register mask
    pinctrl: bcm2835: Avoid warning from __irq_do_set_handler
    pinctrl: sh-pfc: r8a7795: Add PWM support
    MAINTAINERS: Add Qualcomm pinctrl drivers section
    arm: dts: dt-bindings: Add Renesas RZ/A1 pinctrl header
    dt-bindings: pinctrl: Add RZ/A1 bindings doc
    pinctrl: Renesas RZ/A1 pin and gpio controller
    pinctrl: sh-pfc: r8a7792: Add SCIF1 and SCIF2 pin groups
    pinctrl.txt: move it to the driver-api book
    pinctrl: ingenic: checking for NULL instead of IS_ERR()
    pinctrl: uniphier: fix WARN_ON() of pingroups dump on LD20
    pinctrl: uniphier: fix WARN_ON() of pingroups dump on LD11
    ...

    Linus Torvalds
     

06 Jul, 2017

2 commits


04 Jul, 2017

1 commit


01 Jul, 2017

1 commit

  • Currently, internals of dma_common_mmap() is compiled out if build is
    done for either NOMMU or target which explicitly says it does not
    have/want coherent DMA mmap. It turned out that dma_common_mmap() can
    be handy in NOMMU setup (at least for ARM).

    This patch converts exitent NOMMU targets to use ARCH_NO_COHERENT_DMA_MMAP,
    thus when CONFIG_MMU is gone from dma_common_mmap() their behaviour stays
    unchanged.

    ARM is not converted to ARCH_NO_COHERENT_DMA_MMAP because it 1)
    already has mmap callback which can handle (at some extent) NOMMU 2)
    already defines dummy pgprot_noncached() for NOMMU build.

    c6x and frv stay untouched since they already have ARCH_NO_COHERENT_DMA_MMAP.

    Cc: Steven Miao
    Cc: Geert Uytterhoeven
    Cc: Michal Simek
    Cc: Yoshinori Sato
    Cc: Rich Felker
    Cc: Chris Zankel
    Cc: Max Filippov
    Suggested-by: Christoph Hellwig
    Signed-off-by: Vladimir Murzin
    Tested-by: Benjamin Gaignard

    Vladimir Murzin
     

29 Jun, 2017

1 commit

  • The only user of thread_saved_pc() in non-arch-specific code was removed
    in commit 8243d5597793 ("sched/core: Remove pointless printout in
    sched_show_task()"). Remove the implementations as well.

    Some architectures use thread_saved_pc() in their arch-specific code.
    Leave their thread_saved_pc() intact.

    Signed-off-by: Tobias Klauser
    Acked-by: Geert Uytterhoeven
    Cc: Ingo Molnar
    Signed-off-by: Linus Torvalds

    Tobias Klauser
     

29 May, 2017

1 commit


23 May, 2017

2 commits


16 May, 2017

1 commit


10 May, 2017

1 commit

  • Regularly, when a new header is created in include/uapi/, the developer
    forgets to add it in the corresponding Kbuild file. This error is usually
    detected after the release is out.

    In fact, all headers under uapi directories should be exported, thus it's
    useless to have an exhaustive list.

    After this patch, the following files, which were not exported, are now
    exported (with make headers_install_all):
    asm-arc/kvm_para.h
    asm-arc/ucontext.h
    asm-blackfin/shmparam.h
    asm-blackfin/ucontext.h
    asm-c6x/shmparam.h
    asm-c6x/ucontext.h
    asm-cris/kvm_para.h
    asm-h8300/shmparam.h
    asm-h8300/ucontext.h
    asm-hexagon/shmparam.h
    asm-m32r/kvm_para.h
    asm-m68k/kvm_para.h
    asm-m68k/shmparam.h
    asm-metag/kvm_para.h
    asm-metag/shmparam.h
    asm-metag/ucontext.h
    asm-mips/hwcap.h
    asm-mips/reg.h
    asm-mips/ucontext.h
    asm-nios2/kvm_para.h
    asm-nios2/ucontext.h
    asm-openrisc/shmparam.h
    asm-parisc/kvm_para.h
    asm-powerpc/perf_regs.h
    asm-sh/kvm_para.h
    asm-sh/ucontext.h
    asm-tile/shmparam.h
    asm-unicore32/shmparam.h
    asm-unicore32/ucontext.h
    asm-x86/hwcap2.h
    asm-xtensa/kvm_para.h
    drm/armada_drm.h
    drm/etnaviv_drm.h
    drm/vgem_drm.h
    linux/aspeed-lpc-ctrl.h
    linux/auto_dev-ioctl.h
    linux/bcache.h
    linux/btrfs_tree.h
    linux/can/vxcan.h
    linux/cifs/cifs_mount.h
    linux/coresight-stm.h
    linux/cryptouser.h
    linux/fsmap.h
    linux/genwqe/genwqe_card.h
    linux/hash_info.h
    linux/kcm.h
    linux/kcov.h
    linux/kfd_ioctl.h
    linux/lightnvm.h
    linux/module.h
    linux/nbd-netlink.h
    linux/nilfs2_api.h
    linux/nilfs2_ondisk.h
    linux/nsfs.h
    linux/pr.h
    linux/qrtr.h
    linux/rpmsg.h
    linux/sched/types.h
    linux/sed-opal.h
    linux/smc.h
    linux/smc_diag.h
    linux/stm.h
    linux/switchtec_ioctl.h
    linux/vfio_ccw.h
    linux/wil6210_uapi.h
    rdma/bnxt_re-abi.h

    Note that I have removed from this list the files which are generated in every
    exported directories (like .install or .install.cmd).

    Thanks to Julien Floret for the tip to get all
    subdirs with a pure makefile command.

    For the record, note that exported files for asm directories are a mix of
    files listed by:
    - include/uapi/asm-generic/Kbuild.asm;
    - arch//include/uapi/asm/Kbuild;
    - arch//include/asm/Kbuild.

    Signed-off-by: Nicolas Dichtel
    Acked-by: Daniel Vetter
    Acked-by: Russell King
    Acked-by: Mark Salter
    Acked-by: Michael Ellerman (powerpc)
    Signed-off-by: Masahiro Yamada

    Nicolas Dichtel
     

04 May, 2017

1 commit

  • In many of clk_disable() implementations, it is a no-op for a NULL
    pointer input, but this is one of the exceptions.

    Making it treewide consistent will allow clock consumers to call
    clk_disable() without NULL pointer check.

    Link: http://lkml.kernel.org/r/1490692624-11931-4-git-send-email-yamada.masahiro@socionext.com
    Signed-off-by: Masahiro Yamada
    Cc: Stephen Boyd
    Cc: Ralf Baechle
    Cc: Michael Turquette
    Cc: Steven Miao
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Masahiro Yamada
     

02 May, 2017

2 commits

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

    - unwinder fixes and enhancements

    - improve ftrace interaction with the unwinder

    - optimize the code footprint of WARN() and related debugging
    constructs

    - ... plus misc updates, cleanups and fixes"

    * 'x86-asm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (24 commits)
    x86/unwind: Dump all stacks in unwind_dump()
    x86/unwind: Silence more entry-code related warnings
    x86/ftrace: Fix ebp in ftrace_regs_caller that screws up unwinder
    x86/unwind: Remove unused 'sp' parameter in unwind_dump()
    x86/unwind: Prepend hex mask value with '0x' in unwind_dump()
    x86/unwind: Properly zero-pad 32-bit values in unwind_dump()
    x86/unwind: Ensure stack pointer is aligned
    debug: Avoid setting BUGFLAG_WARNING twice
    x86/unwind: Silence entry-related warnings
    x86/unwind: Read stack return address in update_stack_state()
    x86/unwind: Move common code into update_stack_state()
    debug: Fix __bug_table[] in arch linker scripts
    debug: Add _ONCE() logic to report_bug()
    x86/debug: Define BUG() again for !CONFIG_BUG
    x86/debug: Implement __WARN() using UD0
    x86/ftrace: Use Makefile logic instead of #ifdef for compiling ftrace_*.o
    x86/ftrace: Add -mfentry support to x86_32 with DYNAMIC_FTRACE set
    x86/ftrace: Clean up ftrace_regs_caller
    x86/ftrace: Add stack frame pointer to ftrace_caller
    x86/ftrace: Move the ftrace specific code out of entry_32.S
    ...

    Linus Torvalds
     
  • Pull timer updates from Thomas Gleixner:
    "The timer departement delivers:

    - more year 2038 rework

    - a massive rework of the arm achitected timer

    - preparatory patches to allow NTP correction of clock event devices
    to avoid early expiry

    - the usual pile of fixes and enhancements all over the place"

    * 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (91 commits)
    timer/sysclt: Restrict timer migration sysctl values to 0 and 1
    arm64/arch_timer: Mark errata handlers as __maybe_unused
    Clocksource/mips-gic: Remove redundant non devicetree init
    MIPS/Malta: Probe gic-timer via devicetree
    clocksource: Use GENMASK_ULL in definition of CLOCKSOURCE_MASK
    acpi/arm64: Add SBSA Generic Watchdog support in GTDT driver
    clocksource: arm_arch_timer: add GTDT support for memory-mapped timer
    acpi/arm64: Add memory-mapped timer support in GTDT driver
    clocksource: arm_arch_timer: simplify ACPI support code.
    acpi/arm64: Add GTDT table parse driver
    clocksource: arm_arch_timer: split MMIO timer probing.
    clocksource: arm_arch_timer: add structs to describe MMIO timer
    clocksource: arm_arch_timer: move arch_timer_needs_of_probing into DT init call
    clocksource: arm_arch_timer: refactor arch_timer_needs_probing
    clocksource: arm_arch_timer: split dt-only rate handling
    x86/uv/time: Set ->min_delta_ticks and ->max_delta_ticks
    unicore32/time: Set ->min_delta_ticks and ->max_delta_ticks
    um/time: Set ->min_delta_ticks and ->max_delta_ticks
    tile/time: Set ->min_delta_ticks and ->max_delta_ticks
    score/time: Set ->min_delta_ticks and ->max_delta_ticks
    ...

    Linus Torvalds