24 Aug, 2018

1 commit

  • [ Upstream commit ecd60532e060e45c63c57ecf1c8549b1d656d34d ]

    Booting a ColdFire m68k core with MMU enabled causes a "bad page state"
    oops since commit 1d40a5ea01d5 ("mm: mark pages in use for page tables"):

    BUG: Bad page state in process sh pfn:01ce2
    page:004fefc8 count:0 mapcount:-1024 mapping:00000000 index:0x0
    flags: 0x0()
    raw: 00000000 00000000 00000000 fffffbff 00000000 00000100 00000200 00000000
    raw: 039c4000
    page dumped because: nonzero mapcount
    Modules linked in:
    CPU: 0 PID: 22 Comm: sh Not tainted 4.17.0-07461-g1d40a5ea01d5 #13

    Fix by calling pgtable_page_dtor() in our __pte_free_tlb() code path,
    so that the PG_table flag is cleared before we free the pte page.

    Note that I had to change the type of pte_free() to be static from
    extern. Otherwise you get a lot of warnings like this:

    ./arch/m68k/include/asm/mcf_pgalloc.h:80:2: warning: ‘pgtable_page_dtor’ is static but used in inline function ‘pte_free’ which is not static
    pgtable_page_dtor(page);
    ^

    And making it static is consistent with our use of this in the other
    m68k pgalloc definitions of pte_free().

    Signed-off-by: Greg Ungerer
    CC: Matthew Wilcox
    Reviewed-by: Geert Uytterhoeven
    Signed-off-by: Sasha Levin
    Signed-off-by: Greg Kroah-Hartman

    Greg Ungerer
     

03 Jul, 2018

2 commits

  • commit 3e2816c1078eb2b5a3276eb83d4da156b3e2d04f upstream.

    The resource size is 0x2000 == end - start + 1.
    Therefore end == start + 0x2000 - 1.

    Cc: Laurent Vivier
    Cc: stable@vger.kernel.org # v4.14+
    Tested-by: Stan Johnson
    Signed-off-by: Finn Thain
    Acked-by: Laurent Vivier
    Signed-off-by: Geert Uytterhoeven
    Signed-off-by: Greg Kroah-Hartman

    Finn Thain
     
  • commit 3f90f9ef2dda316d64e420d5d51ba369587ccc55 upstream.

    If 020/030 support is enabled, get_io_area() leaves an IO_SIZE gap
    between mappings which is added to the vm_struct representing the
    mapping. __ioremap() uses the actual requested size (after alignment),
    while __iounmap() is passed the size from the vm_struct.

    On 020/030, early termination descriptors are used to set up mappings of
    extent 'size', which are validated on unmapping. The unmapped gap of
    size IO_SIZE defeats the sanity check of the pmd tables, causing
    __iounmap() to loop forever on 030.

    On 040/060, unmapping of page table entries does not check for a valid
    mapping, so the umapping loop always completes there.

    Adjust size to be unmapped by the gap that had been added in the
    vm_struct prior.

    This fixes the hang in atari_platform_init() reported a long time ago,
    and a similar one reported by Finn recently (addressed by removing
    ioremap() use from the SWIM driver.

    Tested on my Falcon in 030 mode - untested but should work the same on
    040/060 (the extra page tables cleared there would never have been set
    up anyway).

    Signed-off-by: Michael Schmitz
    [geert: Minor commit description improvements]
    [geert: This was fixed in 2.4.23, but not in 2.5.x]
    Signed-off-by: Geert Uytterhoeven
    Cc: stable@vger.kernel.org
    Signed-off-by: Greg Kroah-Hartman

    Michael Schmitz
     

30 May, 2018

2 commits

  • [ Upstream commit f61e64310b75733d782e930d1fb404b84699eed6 ]

    As of commit 205e1b7f51e4 ("dma-mapping: warn when there is no
    coherent_dma_mask") the Freescale FEC driver is issuing the following
    warning on driver initialization on ColdFire systems:

    WARNING: CPU: 0 PID: 1 at ./include/linux/dma-mapping.h:516 0x40159e20
    Modules linked in:
    CPU: 0 PID: 1 Comm: swapper Not tainted 4.16.0-rc7-dirty #4
    Stack from 41833dd8:
    41833dd8 40259c53 40025534 40279e26 00000003 00000000 4004e514 41827000
    400255de 40244e42 00000204 40159e20 00000009 00000000 00000000 4024531d
    40159e20 40244e42 00000204 00000000 00000000 00000000 00000007 00000000
    00000000 40279e26 4028d040 40226576 4003ae88 40279e26 418273f6 41833ef8
    7fffffff 418273f2 41867028 4003c9a2 4180ac6c 00000004 41833f8c 4013e71c
    40279e1c 40279e26 40226c16 4013ced2 40279e26 40279e58 4028d040 00000000
    Call Trace:
    [] 0x40025534
    [] 0x4004e514
    [] 0x400255de
    [] 0x40159e20
    [] 0x40159e20

    It is not fatal, the driver and the system continue to function normally.

    As per the warning the coherent_dma_mask is not set on this device.
    There is nothing special about the DMA memory coherency on this hardware
    so we can just set the mask to 32bits in the platform data for the FEC
    ethernet devices.

    Signed-off-by: Sasha Levin
    Signed-off-by: Greg Kroah-Hartman

    Greg Ungerer
     
  • [ Upstream commit 173a3efd3edb2ef6ef07471397c5f542a360e9c1 ]

    Looking at functions with large stack frames across all architectures
    led me discovering that BUG() suffers from the same problem as
    fortify_panic(), which I've added a workaround for already.

    In short, variables that go out of scope by calling a noreturn function
    or __builtin_unreachable() keep using stack space in functions
    afterwards.

    A workaround that was identified is to insert an empty assembler
    statement just before calling the function that doesn't return. I'm
    adding a macro "barrier_before_unreachable()" to document this, and
    insert calls to that in all instances of BUG() that currently suffer
    from this problem.

    The files that saw the largest change from this had these frame sizes
    before, and much less with my patch:

    fs/ext4/inode.c:82:1: warning: the frame size of 1672 bytes is larger than 800 bytes [-Wframe-larger-than=]
    fs/ext4/namei.c:434:1: warning: the frame size of 904 bytes is larger than 800 bytes [-Wframe-larger-than=]
    fs/ext4/super.c:2279:1: warning: the frame size of 1160 bytes is larger than 800 bytes [-Wframe-larger-than=]
    fs/ext4/xattr.c:146:1: warning: the frame size of 1168 bytes is larger than 800 bytes [-Wframe-larger-than=]
    fs/f2fs/inode.c:152:1: warning: the frame size of 1424 bytes is larger than 800 bytes [-Wframe-larger-than=]
    net/netfilter/ipvs/ip_vs_core.c:1195:1: warning: the frame size of 1068 bytes is larger than 800 bytes [-Wframe-larger-than=]
    net/netfilter/ipvs/ip_vs_core.c:395:1: warning: the frame size of 1084 bytes is larger than 800 bytes [-Wframe-larger-than=]
    net/netfilter/ipvs/ip_vs_ftp.c:298:1: warning: the frame size of 928 bytes is larger than 800 bytes [-Wframe-larger-than=]
    net/netfilter/ipvs/ip_vs_ftp.c:418:1: warning: the frame size of 908 bytes is larger than 800 bytes [-Wframe-larger-than=]
    net/netfilter/ipvs/ip_vs_lblcr.c:718:1: warning: the frame size of 960 bytes is larger than 800 bytes [-Wframe-larger-than=]
    drivers/net/xen-netback/netback.c:1500:1: warning: the frame size of 1088 bytes is larger than 800 bytes [-Wframe-larger-than=]

    In case of ARC and CRIS, it turns out that the BUG() implementation
    actually does return (or at least the compiler thinks it does),
    resulting in lots of warnings about uninitialized variable use and
    leaving noreturn functions, such as:

    block/cfq-iosched.c: In function 'cfq_async_queue_prio':
    block/cfq-iosched.c:3804:1: error: control reaches end of non-void function [-Werror=return-type]
    include/linux/dmaengine.h: In function 'dma_maxpq':
    include/linux/dmaengine.h:1123:1: error: control reaches end of non-void function [-Werror=return-type]

    This makes them call __builtin_trap() instead, which should normally
    dump the stack and kill the current process, like some of the other
    architectures already do.

    I tried adding barrier_before_unreachable() to panic() and
    fortify_panic() as well, but that had very little effect, so I'm not
    submitting that patch.

    Vineet said:

    : For ARC, it is double win.
    :
    : 1. Fixes 3 -Wreturn-type warnings
    :
    : | ../net/core/ethtool.c:311:1: warning: control reaches end of non-void function
    : [-Wreturn-type]
    : | ../kernel/sched/core.c:3246:1: warning: control reaches end of non-void function
    : [-Wreturn-type]
    : | ../include/linux/sunrpc/svc_xprt.h:180:1: warning: control reaches end of
    : non-void function [-Wreturn-type]
    :
    : 2. bloat-o-meter reports code size improvements as gcc elides the
    : generated code for stack return.

    Link: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82365
    Link: http://lkml.kernel.org/r/20171219114112.939391-1-arnd@arndb.de
    Signed-off-by: Arnd Bergmann
    Acked-by: Vineet Gupta [arch/arc]
    Tested-by: Vineet Gupta [arch/arc]
    Cc: Mikael Starvik
    Cc: Jesper Nilsson
    Cc: Tony Luck
    Cc: Fenghua Yu
    Cc: Geert Uytterhoeven
    Cc: "David S. Miller"
    Cc: Christopher Li
    Cc: Thomas Gleixner
    Cc: Peter Zijlstra
    Cc: Kees Cook
    Cc: Ingo Molnar
    Cc: Josh Poimboeuf
    Cc: Will Deacon
    Cc: "Steven Rostedt (VMware)"
    Cc: Mark Rutland
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds
    Signed-off-by: Sasha Levin
    Signed-off-by: Greg Kroah-Hartman

    Arnd Bergmann
     

25 Feb, 2018

1 commit

  • [ Upstream commit 969de0988b77e5a57aac2f7270191a3c50540c52 ]

    Commit be7635e7287e ("arch, ftrace: for KASAN put hard/soft IRQ entries
    into separate sections") added a new linker section, SOFTIRQENTRY_TEXT,
    to the linker scripts for most architectures. It didn't add it to any of
    the linker scripts for the m68k architecture. This was not really a problem
    because it is only defined if either of CONFIG_FUNCTION_GRAPH_TRACER or
    CONFIG_KASAN are enabled - which can never be true for m68k.

    However commit 229a71860547 ("irq: Make the irqentry text section
    unconditional") means that SOFTIRQENTRY_TEXT is now always defined. So on
    m68k we now end up with a separate ELF section for .softirqentry.text
    instead of it being part of the .text section. On some m68k targets in some
    configurations this can also cause a fatal link error:

    LD vmlinux
    /usr/local/bin/../m68k-uclinux/bin/ld.real: section .softirqentry.text loaded at [0000000010de10c0,0000000010de12dd] overlaps section .rodata loaded at [0000000010de10c0,0000000010e0fd67]

    To fix add in the missing SOFTIRQENTRY_TEXT section into the m68k linker
    scripts. I noticed that m68k is also missing the IRQENTRY_TEXT section,
    so this patch also adds an entry for that too.

    Signed-off-by: Greg Ungerer
    Signed-off-by: Sasha Levin
    Signed-off-by: Greg Kroah-Hartman

    Greg Ungerer
     

10 Dec, 2017

1 commit

  • [ Upstream commit f55ab8f27548ff3431a6567d400c6757c49fd520 ]

    The m68k pg_data_table is a fix size array defined in arch/m68k/mm/init.c.
    Index numbers within it are defined based on memory size. But for Coldfire
    these don't take into account a non-zero physical RAM base address, and this
    causes us to access past the end of this array at system start time.

    Change the node shift calculation so that we keep the index inside its range.

    Reported-by: Angelo Dureghello
    Tested-by: Angelo Dureghello
    Signed-off-by: Greg Ungerer
    Signed-off-by: Sasha Levin
    Signed-off-by: Greg Kroah-Hartman

    Greg Ungerer
     

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
     

11 Sep, 2017

2 commits

  • Pull m68knommu updates from Greg Ungerer:
    "Only two changes. One removes unused code, the other makes local clock
    code arguments consistent with generic clock code"

    * 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu:
    m68knommu: remove dead code
    m68k: allow NULL clock for clk_get_rate

    Linus Torvalds
     
  • With gcc 4.1.2:

    include/linux/swapops.h: In function ‘swp_entry_to_pmd’:
    include/linux/swapops.h:294: warning: missing braces around initializer
    include/linux/swapops.h:294: warning: (near initialization for ‘(anonymous).pmd’)

    Due to a GCC zero initializer bug (#53119), the standard "(pmd_t){ 0 }"
    initializer is not accepted by all GCC versions.
    In addition, on m68k pmd_t is an array instead of a single value, so we
    need "(pmd_t){ { 0 }, }" instead of "(pmd_t){ 0 }".

    Based on commit 9157259d16a8 ("mm: add pmd_t initializer __pmd() to
    work around a GCC bug.") for sparc32.

    Fixes: 616b8371539a ("mm: thp: enable thp migration in generic path")
    Signed-off-by: Geert Uytterhoeven
    Signed-off-by: Linus Torvalds

    Geert Uytterhoeven
     

10 Sep, 2017

1 commit

  • Merge more updates from Andrew Morton:

    - most of the rest of MM

    - a small number of misc things

    - lib/ updates

    - checkpatch

    - autofs updates

    - ipc/ updates

    * emailed patches from Andrew Morton : (126 commits)
    ipc: optimize semget/shmget/msgget for lots of keys
    ipc/sem: play nicer with large nsops allocations
    ipc/sem: drop sem_checkid helper
    ipc: convert kern_ipc_perm.refcount from atomic_t to refcount_t
    ipc: convert sem_undo_list.refcnt from atomic_t to refcount_t
    ipc: convert ipc_namespace.count from atomic_t to refcount_t
    kcov: support compat processes
    sh: defconfig: cleanup from old Kconfig options
    mn10300: defconfig: cleanup from old Kconfig options
    m32r: defconfig: cleanup from old Kconfig options
    drivers/pps: use surrounding "if PPS" to remove numerous dependency checks
    drivers/pps: aesthetic tweaks to PPS-related content
    cpumask: make cpumask_next() out-of-line
    kmod: move #ifdef CONFIG_MODULES wrapper to Makefile
    kmod: split off umh headers into its own file
    MAINTAINERS: clarify kmod is just a kernel module loader
    kmod: split out umh code into its own file
    test_kmod: flip INT checks to be consistent
    test_kmod: remove paranoid UINT_MAX check on uint range processing
    vfat: deduplicate hex2bin()
    ...

    Linus Torvalds
     

09 Sep, 2017

2 commits

  • Patch series "Define CPU_BIG_ENDIAN or warn for inconsistencies", v3.

    While working on enabling queued rwlock on SPARC, found this following
    code in include/asm-generic/qrwlock.h which uses CONFIG_CPU_BIG_ENDIAN to
    clear a byte.

    static inline u8 *__qrwlock_write_byte(struct qrwlock *lock)
    {
    return (u8 *)lock + 3 * IS_BUILTIN(CONFIG_CPU_BIG_ENDIAN);
    }

    Problem is many of the fixed big endian architectures don't define
    CPU_BIG_ENDIAN and clears the wrong byte.

    Define CPU_BIG_ENDIAN for all the fixed big endian architecture to fix it.

    Also found few more references of this config parameter in
    drivers/of/base.c
    drivers/of/fdt.c
    drivers/tty/serial/earlycon.c
    drivers/tty/serial/serial_core.c
    Be aware that this may cause regressions if someone has worked-around
    problems in the above code already. Remove the work-around.

    Here is our original discussion
    https://lkml.org/lkml/2017/5/24/620

    Link: http://lkml.kernel.org/r/1499358861-179979-2-git-send-email-babu.moger@oracle.com
    Signed-off-by: Babu Moger
    Suggested-by: Arnd Bergmann
    Acked-by: Geert Uytterhoeven
    Acked-by: David S. Miller
    Acked-by: Stafford Horne
    Cc: Yoshinori Sato
    Cc: Jonas Bonn
    Cc: Stefan Kristiansson
    Cc: "James E.J. Bottomley"
    Cc: Helge Deller
    Cc: Alexander Viro
    Cc: Michal Simek
    Cc: Michael Ellerman (powerpc)
    Cc: Peter Zijlstra
    Cc: Ingo Molnar
    Cc: Max Filippov
    Cc: Greg KH
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Babu Moger
     
  • Pull PCI updates from Bjorn Helgaas:

    - add enhanced Downstream Port Containment support, which prints more
    details about Root Port Programmed I/O errors (Dongdong Liu)

    - add Layerscape ls1088a and ls2088a support (Hou Zhiqiang)

    - add MediaTek MT2712 and MT7622 support (Ryder Lee)

    - add MediaTek MT2712 and MT7622 MSI support (Honghui Zhang)

    - add Qualcom IPQ8074 support (Varadarajan Narayanan)

    - add R-Car r8a7743/5 device tree support (Biju Das)

    - add Rockchip per-lane PHY support for better power management (Shawn
    Lin)

    - fix IRQ mapping for hot-added devices by replacing the
    pci_fixup_irqs() boot-time design with a host bridge hook called at
    probe-time (Lorenzo Pieralisi, Matthew Minter)

    - fix race when enabling two devices that results in upstream bridge
    not being enabled correctly (Srinath Mannam)

    - fix pciehp power fault infinite loop (Keith Busch)

    - fix SHPC bridge MSI hotplug events by enabling bus mastering
    (Aleksandr Bezzubikov)

    - fix a VFIO issue by correcting PCIe capability sizes (Alex
    Williamson)

    - fix an INTD issue on Xilinx and possibly other drivers by unifying
    INTx IRQ domain support (Paul Burton)

    - avoid IOMMU stalls by marking AMD Stoney GPU ATS as broken (Joerg
    Roedel)

    - allow APM X-Gene device assignment to guests by adding an ACS quirk
    (Feng Kan)

    - fix driver crashes by disabling Extended Tags on Broadcom HT2100
    (Extended Tags support is required for PCIe Receivers but not
    Requesters, and we now enable them by default when Requesters support
    them) (Sinan Kaya)

    - fix MSIs for devices that use phantom RIDs for DMA by assuming MSIs
    use the real Requester ID (not a phantom RID) (Robin Murphy)

    - prevent assignment of Intel VMD children to guests (which may be
    supported eventually, but isn't yet) by not associating an IOMMU with
    them (Jon Derrick)

    - fix Intel VMD suspend/resume by releasing IRQs on suspend (Scott
    Bauer)

    - fix a Function-Level Reset issue with Intel 750 NVMe by waiting
    longer (up to 60sec instead of 1sec) for device to become ready
    (Sinan Kaya)

    - fix a Function-Level Reset issue on iProc Stingray by working around
    hardware defects in the CRS implementation (Oza Pawandeep)

    - fix an issue with Intel NVMe P3700 after an iProc reset by adding a
    delay during shutdown (Oza Pawandeep)

    - fix a Microsoft Hyper-V lockdep issue by polling instead of blocking
    in compose_msi_msg() (Stephen Hemminger)

    - fix a wireless LAN driver timeout by clearing DesignWare MSI
    interrupt status after it is handled, not before (Faiz Abbas)

    - fix DesignWare ATU enable checking (Jisheng Zhang)

    - reduce Layerscape dependencies on the bootloader by doing more
    initialization in the driver (Hou Zhiqiang)

    - improve Intel VMD performance allowing allocation of more IRQ vectors
    than present CPUs (Keith Busch)

    - improve endpoint framework support for initial DMA mask, different
    BAR sizes, configurable page sizes, MSI, test driver, etc (Kishon
    Vijay Abraham I, Stan Drozd)

    - rework CRS support to add periodic messages while we poll during
    enumeration and after Function-Level Reset and prepare for possible
    other uses of CRS (Sinan Kaya)

    - clean up Root Port AER handling by removing unnecessary code and
    moving error handler methods to struct pcie_port_service_driver
    (Christoph Hellwig)

    - clean up error handling paths in various drivers (Bjorn Andersson,
    Fabio Estevam, Gustavo A. R. Silva, Harunobu Kurokawa, Jeffy Chen,
    Lorenzo Pieralisi, Sergei Shtylyov)

    - clean up SR-IOV resource handling by disabling VF decoding before
    updating the corresponding resource structs (Gavin Shan)

    - clean up DesignWare-based drivers by unifying quirks to update Class
    Code and Interrupt Pin and related handling of write-protected
    registers (Hou Zhiqiang)

    - clean up by adding empty generic pcibios_align_resource() and
    pcibios_fixup_bus() and removing empty arch-specific implementations
    (Palmer Dabbelt)

    - request exclusive reset control for several drivers to allow cleanup
    elsewhere (Philipp Zabel)

    - constify various structures (Arvind Yadav, Bhumika Goyal)

    - convert from full_name() to %pOF (Rob Herring)

    - remove unused variables from iProc, HiSi, Altera, Keystone (Shawn
    Lin)

    * tag 'pci-v4.14-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci: (170 commits)
    PCI: xgene: Clean up whitespace
    PCI: xgene: Define XGENE_PCI_EXP_CAP and use generic PCI_EXP_RTCTL offset
    PCI: xgene: Fix platform_get_irq() error handling
    PCI: xilinx-nwl: Fix platform_get_irq() error handling
    PCI: rockchip: Fix platform_get_irq() error handling
    PCI: altera: Fix platform_get_irq() error handling
    PCI: spear13xx: Fix platform_get_irq() error handling
    PCI: artpec6: Fix platform_get_irq() error handling
    PCI: armada8k: Fix platform_get_irq() error handling
    PCI: dra7xx: Fix platform_get_irq() error handling
    PCI: exynos: Fix platform_get_irq() error handling
    PCI: iproc: Clean up whitespace
    PCI: iproc: Rename PCI_EXP_CAP to IPROC_PCI_EXP_CAP
    PCI: iproc: Add 500ms delay during device shutdown
    PCI: Fix typos and whitespace errors
    PCI: Remove unused "res" variable from pci_resource_io()
    PCI: Correct kernel-doc of pci_vpd_srdt_size(), pci_vpd_srdt_tag()
    PCI/AER: Reformat AER register definitions
    iommu/vt-d: Prevent VMD child devices from being remapping targets
    x86/PCI: Use is_vmd() rather than relying on the domain number
    ...

    Linus Torvalds
     

06 Sep, 2017

1 commit


28 Aug, 2017

2 commits

  • As CONFIG_RTC_DRV_M5441x doesn't exist because the driver never made it
    upstream, there is no device to register. Remove code that is never
    compiled and init_BSP() as it doesn't do anything.

    Signed-off-by: Alexandre Belloni
    Signed-off-by: Greg Ungerer

    Alexandre Belloni
     
  • Make the behaviour of clk_get_rate consistent with common clk's
    clk_get_rate by accepting NULL clocks as parameter. Some device
    drivers rely on this, and will cause an OOPS otherwise.

    Fixes: facdf0ed4f59 ("m68knommu: introduce basic clk infrastructure")
    Cc: Greg Ungerer
    Cc: Geert Uytterhoeven
    Cc: linux-m68k@lists.linux-m68k.org
    Cc: linux-kernel@vger.kernel.org
    Reported-by: Mathias Kresin
    Signed-off-by: Jonas Gorski
    Signed-off-by: Greg Ungerer

    Jonas Gorski
     

21 Aug, 2017

4 commits

  • Disable interrupts for power-off, like other platforms do. This prevents
    meaningless warnings from the soft-lockup detector on models with a power
    supply unit not under software control.

    Reported-by: Stan Johnson
    Tested-by: Stan Johnson
    Signed-off-by: Finn Thain
    Signed-off-by: Geert Uytterhoeven

    Finn Thain
     
  • Testing shows that the CUDA_POWERDOWN command never completes (for a
    Centris 660av or LC 475, at least). So, don't wait for command completion
    on those Cuda-based models that do not support soft power. Just proceed to
    log the usual message, "It is now safe to turn off your Macintosh."

    Reported-by: Stan Johnson
    Tested-by: Stan Johnson
    Signed-off-by: Finn Thain
    Signed-off-by: Geert Uytterhoeven

    Finn Thain
     
  • WARNING: EXPORT symbol "__divsi3" [vmlinux] version generation failed, symbol will not be versioned.
    WARNING: EXPORT symbol "__umodsi3" [vmlinux] version generation failed, symbol will not be versioned.
    WARNING: EXPORT symbol "__mulsi3" [vmlinux] version generation failed, symbol will not be versioned.
    WARNING: EXPORT symbol "__modsi3" [vmlinux] version generation failed, symbol will not be versioned.
    WARNING: EXPORT symbol "__udivsi3" [vmlinux] version generation failed, symbol will not be versioned.

    Add so that genksyms knows the types of these
    symbols and can generate CRCs for them.

    Fixes: d13ffb563044 ("m68k: move exports to definitions"
    Signed-off-by: Ben Hutchings
    [geert: Add warning messages, match actual prototypes in gccint.info]
    Signed-off-by: Geert Uytterhoeven

    Ben Hutchings
     
  • Signed-off-by: Geert Uytterhoeven

    Geert Uytterhoeven
     

04 Aug, 2017

1 commit

  • The pci_fixup_irqs() function allocates IRQs for all PCI devices present in
    a system; those PCI devices possibly belong to different PCI bus trees (and
    possibly rooted at different host bridges) and may well be enabled (ie
    probed and bound to a driver) by the time pci_fixup_irqs() is called when
    probing a given host bridge driver.

    Furthermore, current kernel code relying on pci_fixup_irqs() to assign
    legacy PCI IRQs to devices does not work at all for hotplugged devices in
    that the code carrying out the IRQ fixup is called at host bridge driver
    probe time, which just cannot take into account devices hotplugged after
    the system has booted.

    The introduction of map/swizzle function hooks in struct pci_host_bridge
    allows us to define per-bridge map/swizzle functions that can be used at
    device probe time in PCI core code to allocate IRQs for a given device
    (through pci_assign_irq()).

    Convert PCI host bridge initialization code to the
    pci_scan_root_bus_bridge() API (that allows to pass a struct
    pci_host_bridge with initialized map/swizzle pointers) and remove the
    pci_fixup_irqs() call from arch code.

    Signed-off-by: Lorenzo Pieralisi
    Signed-off-by: Bjorn Helgaas
    Cc: Geert Uytterhoeven

    Lorenzo Pieralisi
     

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

  • Make the code like the rest of the kernel.

    Link: http://lkml.kernel.org/r/14db9c166d5b68efa77e337cfe49bb9b29bca3f7.1499284835.git.joe@perches.com
    Signed-off-by: Joe Perches
    Acked-by: Greg Ungerer
    Cc: Geert Uytterhoeven
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joe Perches
     

12 Jul, 2017

1 commit


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.

    For m68k, "generic-y += termios.h" is doubled in asm/Kbuild and
    uapi/asm/Kbuild. So, the one in the former can be simply removed.

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

    Signed-off-by: Masahiro Yamada
    Acked-by: Geert Uytterhoeven

    Masahiro Yamada
     

07 Jul, 2017

2 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
     

04 Jul, 2017

4 commits

  • Pull timer updates from Thomas Gleixner:
    "A rather large update for timers/timekeeping:

    - compat syscall consolidation (Al Viro)

    - Posix timer consolidation (Christoph Helwig / Thomas Gleixner)

    - Cleanup of the device tree based initialization for clockevents and
    clocksources (Daniel Lezcano)

    - Consolidation of the FTTMR010 clocksource/event driver (Linus
    Walleij)

    - The usual set of small fixes and updates all over the place"

    * 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (93 commits)
    timers: Make the cpu base lock raw
    clocksource/drivers/mips-gic-timer: Fix an error code in 'gic_clocksource_of_init()'
    clocksource/drivers/fsl_ftm_timer: Unmap region obtained by of_iomap
    clocksource/drivers/tcb_clksrc: Make IO endian agnostic
    clocksource/drivers/sun4i: Switch to the timer-of common init
    clocksource/drivers/timer-of: Fix invalid iomap check
    Revert "ktime: Simplify ktime_compare implementation"
    clocksource/drivers: Fix uninitialized variable use in timer_of_init
    kselftests: timers: Add test for frequency step
    kselftests: timers: Fix inconsistency-check to not ignore first timestamp
    time: Add warning about imminent deprecation of CONFIG_GENERIC_TIME_VSYSCALL_OLD
    time: Clean up CLOCK_MONOTONIC_RAW time handling
    posix-cpu-timers: Make timespec to nsec conversion safe
    itimer: Make timeval to nsec conversion range limited
    timers: Fix parameter description of try_to_del_timer_sync()
    ktime: Simplify ktime_compare implementation
    clocksource/drivers/fttmr010: Factor out clock read code
    clocksource/drivers/fttmr010: Implement delay timer
    clocksource/drivers: Add timer-of common init routine
    clocksource/drivers/tcb_clksrc: Save timer context on suspend/resume
    ...

    Linus Torvalds
     
  • no users left

    Signed-off-by: Al Viro

    Al Viro
     
  • on MMU targets EFAULT is possible here. Make both return 0 or error,
    passing what used to be the return value of flat_get_addr_from_rp()
    by reference.

    Signed-off-by: Al Viro

    Al Viro
     
  • Pull m68k updates from Geert Uytterhoeven:

    - NuBus improvements and cleanups

    - defconfig updates

    - Fix debugger syscall restart interactions, leading to the global
    removal of ptrace_signal_deliver()

    * tag 'm68k-for-v4.13-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k:
    m68k: Remove ptrace_signal_deliver
    m68k/defconfig: Update defconfigs for v4.12-rc1
    nubus: Fix pointer validation
    nubus: Remove slot zero probe

    Linus Torvalds
     

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
     

26 Jun, 2017

1 commit


20 Jun, 2017

1 commit

  • This fixes debugger syscall restart interactions. A debugger that
    modifies the tracee's program counter is expected to set the orig_d0
    pseudo register to -1, to disable a possible syscall restart.

    This removes the last user of the ptrace_signal_deliver hook in the ptrace
    signal handling, so remove that as well.

    Signed-off-by: Andreas Schwab
    Signed-off-by: Geert Uytterhoeven

    Andreas Schwab
     

04 Jun, 2017

1 commit

  • By moving the kernel side __SI_* defintions right next to the userspace
    ones we can kill the non-uapi versions of include
    include/asm-generic/siginfo.h and untangle the unholy mess of includes.

    [ tglx: Removed uapi/asm/siginfo.h from m32r, microblaze, mn10300 and score ]

    Signed-off-by: Christoph Hellwig
    Signed-off-by: Thomas Gleixner
    Cc: linux-arch@vger.kernel.org
    Cc: Fenghua Yu
    Cc: Tony Luck
    Cc: linux-ia64@vger.kernel.org
    Cc: Arnd Bergmann
    Cc: sparclinux@vger.kernel.org
    Cc: "David S. Miller"
    Link: http://lkml.kernel.org/r/20170603190102.28866-6-hch@lst.de

    Christoph Hellwig