10 Jan, 2019

1 commit

  • commit edefae94b7b9f10d5efe32dece5a36e9d9ecc29e upstream.

    Commit 885872b722b7 ("MIPS: Octeon: Add Octeon III CN7xxx
    interface detection") added RGMII interface detection for OCTEON III,
    but it results in the following logs:

    [ 7.165984] ERROR: Unsupported Octeon model in __cvmx_helper_rgmii_probe
    [ 7.173017] ERROR: Unsupported Octeon model in __cvmx_helper_rgmii_probe

    The current RGMII routines are valid only for older OCTEONS that
    use GMX/ASX hardware blocks. On later chips AGL should be used,
    but support for that is missing in the mainline. Until that is added,
    mark the interface as disabled.

    Fixes: 885872b722b7 ("MIPS: Octeon: Add Octeon III CN7xxx interface detection")
    Signed-off-by: Aaro Koskinen
    Signed-off-by: Paul Burton
    Cc: Ralf Baechle
    Cc: James Hogan
    Cc: linux-mips@vger.kernel.org
    Cc: stable@vger.kernel.org # 4.7+
    Signed-off-by: Greg Kroah-Hartman

    Aaro Koskinen
     

14 Nov, 2018

1 commit

  • commit c0fae7e2452b90c31edd2d25eb3baf0c76b400ca upstream.

    The maximum number of interfaces is returned by
    cvmx_helper_get_number_of_interfaces(), and the value is used to access
    interface_port_count[]. When CN68XX support was added, we forgot
    to increase the array size. Fix that.

    Fixes: 2c8c3f0201333 ("MIPS: Octeon: Support additional interfaces on CN68XX")
    Signed-off-by: Aaro Koskinen
    Signed-off-by: Paul Burton
    Patchwork: https://patchwork.linux-mips.org/patch/20949/
    Cc: Ralf Baechle
    Cc: linux-mips@linux-mips.org
    Cc: linux-kernel@vger.kernel.org
    Cc: stable@vger.kernel.org # v4.3+
    Signed-off-by: Greg Kroah-Hartman

    Aaro Koskinen
     

20 Sep, 2018

1 commit

  • [ Upstream commit b1259519e618d479ede8a0db5474b3aff99f5056 ]

    The call to of_find_node_by_name returns a node pointer with refcount
    incremented thus it must be explicitly decremented here after the last
    usage.

    Signed-off-by: Nicholas Mc Guire
    Signed-off-by: Paul Burton
    Patchwork: https://patchwork.linux-mips.org/patch/19558/
    Cc: Ralf Baechle
    Cc: James Hogan
    Cc: linux-mips@linux-mips.org
    Cc: linux-kernel@vger.kernel.org
    Signed-off-by: Sasha Levin
    Signed-off-by: Greg Kroah-Hartman

    Nicholas Mc Guire
     

30 May, 2018

1 commit

  • [ Upstream commit db6775ca6e0353d2618ca7d5e210fc36ad43bbd4 ]

    Using a period after a newline causes bad output.

    Fixes: 64b139f97c01 ("MIPS: OCTEON: irq: add CIB and other fixes")
    Signed-off-by: Joe Perches
    Cc: Ralf Baechle
    Cc: linux-mips@linux-mips.org
    Patchwork: https://patchwork.linux-mips.org/patch/17886/
    Signed-off-by: James Hogan
    Signed-off-by: Sasha Levin
    Signed-off-by: Greg Kroah-Hartman

    Joe Perches
     

15 Mar, 2018

1 commit

  • commit 902f4d067a50ccf645a58dd5fb1d113b6e0f9b5b upstream.

    The allocation of host_data is not null checked, leading to a null
    pointer dereference if the allocation fails. Fix this by adding a null
    check and return with -ENOMEM.

    Fixes: 64b139f97c01 ("MIPS: OCTEON: irq: add CIB and other fixes")
    Signed-off-by: Colin Ian King
    Acked-by: David Daney
    Cc: Ralf Baechle
    Cc: "Steven J. Hill"
    Cc: linux-mips@linux-mips.org
    Cc: # 4.0+
    Patchwork: https://patchwork.linux-mips.org/patch/18658/
    Signed-off-by: James Hogan
    Signed-off-by: Greg Kroah-Hartman

    Colin Ian King
     

02 Nov, 2017

1 commit

  • 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
     

05 Sep, 2017

2 commits


30 Aug, 2017

1 commit

  • Allow the boot_secondary SMP op to return an error to __cpu_up(), which
    will in turn return it to its caller.

    This will allow SMP implementations to return errors quickly in cases
    they they know have failed, rather than relying upon __cpu_up()
    eventually timing out waiting for the cpu_running completion.

    Signed-off-by: Paul Burton
    Cc: linux-mips@linux-mips.org
    Patchwork: https://patchwork.linux-mips.org/patch/17014/
    Signed-off-by: Ralf Baechle

    Paul Burton
     

29 Aug, 2017

1 commit

  • smp_ops providers do not modify their ops structures, so they should be
    made const for robustness. Since currently the MIPS kernel is not mapped
    with memory protection, this does not in itself provide any security
    benefit, but it still makes sense to make this change.

    There are also slight code size efficincies from the structure being
    made read-only, saving 128 bytes of kernel text on a
    pistachio_defconfig.
    Before:
    text data bss dec hex filename
    7187239 1772752 470224 9430215 8fe4c7 vmlinux
    After:
    text data bss dec hex filename
    7187111 1772752 470224 9430087 8fe447 vmlinux

    Signed-off-by: Matt Redfearn
    Cc: Sebastian Andrzej Siewior
    Cc: Arnd Bergmann
    Cc: Marcin Nowakowski
    Cc: Bart Van Assche
    Cc: Masahiro Yamada
    Cc: Huacai Chen
    Cc: Paul Gortmaker
    Cc: Kevin Cernekee
    Cc: Thomas Gleixner
    Cc: Doug Ledford
    Cc: James Hogan
    Cc: Joe Perches
    Cc: Florian Fainelli
    Cc: Ingo Molnar
    Cc: Paul Burton
    Cc: Andrew Morton
    Cc: Steven J. Hill
    Cc: linux-mips@linux-mips.org
    Cc: linux-kernel@vger.kernel.org
    Patchwork: https://patchwork.linux-mips.org/patch/16784/
    Signed-off-by: Ralf Baechle

    Matt Redfearn
     

07 Aug, 2017

1 commit

  • Fix build error when CONFIG_SMP is turned off:

    CC [M] arch/mips/cavium-octeon/octeon-usb.o
    arch/mips/cavium-octeon/octeon-usb.c: In function
    ‘dwc3_octeon_device_init’:
    arch/mips/cavium-octeon/octeon-usb.c:540:4: error: implicit declaration
    of function ‘devm_iounmap’ [-Werror=implicit-function-declaration]
    devm_iounmap(&pdev->dev, base);

    Signed-off-by: Steven J. Hill
    Reviewed-by: James Hogan
    Tested-by: Matt Redfearn
    Cc: linux-mips@linux-mips.org
    Patchwork: https://patchwork.linux-mips.org/patch/16907/
    Signed-off-by: Ralf Baechle

    Steven J. Hill
     

13 May, 2017

1 commit

  • Pull MIPS updates from James Hogan:
    "math-emu:
    - Add missing clearing of BLTZALL and BGEZALL emulation counters
    - Fix BC1EQZ and BC1NEZ condition handling
    - Fix BLEZL and BGTZL identification

    BPF:
    - Add JIT support for SKF_AD_HATYPE
    - Use unsigned access for unsigned SKB fields
    - Quit clobbering callee saved registers in JIT code
    - Fix multiple problems in JIT skb access helpers

    Loongson 3:
    - Select MIPS_L1_CACHE_SHIFT_6

    Octeon:
    - Remove vestiges of CONFIG_CAVIUM_OCTEON_2ND_KERNEL
    - Remove unused L2C types and macros.
    - Remove unused SLI types and macros.
    - Fix compile error when USB is not enabled.
    - Octeon: Remove unused PCIERCX types and macros.
    - Octeon: Clean up platform code.

    SNI:
    - Remove recursive include of cpu-feature-overrides.h

    Sibyte:
    - Export symbol periph_rev to sb1250-mac network driver.
    - Fix Kconfig warning.

    Generic platform:
    - Enable Root FS on NFS in generic_defconfig

    SMP-MT:
    - Use CPU interrupt controller IPI IRQ domain support

    UASM:
    - Add support for LHU for uasm.
    - Remove needless ISA abstraction

    mm:
    - Add 48-bit VA space and 4-level page tables for 4K pages.

    PCI:
    - Add controllers before the specified head

    irqchip driver for MIPS CPU:
    - Replace magic 0x100 with IE_SW0
    - Prepare for non-legacy IRQ domains
    - Introduce IPI IRQ domain support

    MAINTAINERS:
    - Update email-id of Rahul Bedarkar

    NET:
    - sb1250-mac: Add missing MODULE_LICENSE()

    CPUFREQ:
    - Loongson2: drop set_cpus_allowed_ptr()

    Misc:
    - Disable Werror when W= is set
    - Opt into HAVE_COPY_THREAD_TLS
    - Enable GENERIC_CPU_AUTOPROBE
    - Use common outgoing-CPU-notification code
    - Remove dead define of ST_OFF
    - Remove CONFIG_ARCH_HAS_ILOG2_U{32,64}
    - Stengthen IPI IRQ domain sanity check
    - Remove confusing else statement in __do_page_fault()
    - Don't unnecessarily include kmalloc.h into .
    - Delete unused definition of SMP_CACHE_SHIFT.
    - Delete redundant definition of SMP_CACHE_BYTES"

    * 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus: (39 commits)
    MIPS: Sibyte: Fix Kconfig warning.
    MIPS: Sibyte: Export symbol periph_rev to sb1250-mac network driver.
    NET: sb1250-mac: Add missing MODULE_LICENSE()
    MAINTAINERS: Update email-id of Rahul Bedarkar
    MIPS: Remove confusing else statement in __do_page_fault()
    MIPS: Stengthen IPI IRQ domain sanity check
    MIPS: smp-mt: Use CPU interrupt controller IPI IRQ domain support
    irqchip: mips-cpu: Introduce IPI IRQ domain support
    irqchip: mips-cpu: Prepare for non-legacy IRQ domains
    irqchip: mips-cpu: Replace magic 0x100 with IE_SW0
    MIPS: Remove CONFIG_ARCH_HAS_ILOG2_U{32,64}
    MIPS: generic: Enable Root FS on NFS in generic_defconfig
    MIPS: mach-rm: Remove recursive include of cpu-feature-overrides.h
    MIPS: Opt into HAVE_COPY_THREAD_TLS
    CPUFREQ: Loongson2: drop set_cpus_allowed_ptr()
    MIPS: uasm: Remove needless ISA abstraction
    MIPS: Remove dead define of ST_OFF
    MIPS: Use common outgoing-CPU-notification code
    MIPS: math-emu: Fix BC1EQZ and BC1NEZ condition handling
    MIPS: r2-on-r6-emu: Clear BLTZALL and BGEZALL debugfs counters
    ...

    Linus Torvalds
     

09 May, 2017

1 commit


10 Apr, 2017

4 commits


06 Apr, 2017

1 commit


08 Mar, 2017

1 commit

  • After the split of linux/sched.h, several platforms in arch/mips stopped building.

    Add the respective additional #include statements to fix the problem I first
    tried adding these into asm/processor.h, but ran into circular header
    dependencies with that which I could not figure out.

    The commit I listed as causing the problem is the branch merge, as there is
    likely a combination of multiple patches in that branch.

    Signed-off-by: Arnd Bergmann
    Cc: Linus Torvalds
    Cc: Peter Zijlstra
    Cc: Thomas Gleixner
    Cc: linux-mips@linux-mips.org
    Cc: ralf@linux-mips.org
    Fixes: 1827adb11ad2 ("Merge branch 'WIP.sched-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip")
    Link: http://lkml.kernel.org/r/20170308072931.3836696-1-arnd@arndb.de
    Signed-off-by: Ingo Molnar

    Arnd Bergmann
     

02 Mar, 2017

1 commit


26 Feb, 2017

1 commit

  • Pull rdma DMA mapping updates from Doug Ledford:
    "Drop IB DMA mapping code and use core DMA code instead.

    Bart Van Assche noted that the ib DMA mapping code was significantly
    similar enough to the core DMA mapping code that with a few changes it
    was possible to remove the IB DMA mapping code entirely and switch the
    RDMA stack to use the core DMA mapping code.

    This resulted in a nice set of cleanups, but touched the entire tree
    and has been kept separate for that reason."

    * tag 'for-next-dma_ops' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma: (37 commits)
    IB/rxe, IB/rdmavt: Use dma_virt_ops instead of duplicating it
    IB/core: Remove ib_device.dma_device
    nvme-rdma: Switch from dma_device to dev.parent
    RDS: net: Switch from dma_device to dev.parent
    IB/srpt: Modify a debug statement
    IB/srp: Switch from dma_device to dev.parent
    IB/iser: Switch from dma_device to dev.parent
    IB/IPoIB: Switch from dma_device to dev.parent
    IB/rxe: Switch from dma_device to dev.parent
    IB/vmw_pvrdma: Switch from dma_device to dev.parent
    IB/usnic: Switch from dma_device to dev.parent
    IB/qib: Switch from dma_device to dev.parent
    IB/qedr: Switch from dma_device to dev.parent
    IB/ocrdma: Switch from dma_device to dev.parent
    IB/nes: Remove a superfluous assignment statement
    IB/mthca: Switch from dma_device to dev.parent
    IB/mlx5: Switch from dma_device to dev.parent
    IB/mlx4: Switch from dma_device to dev.parent
    IB/i40iw: Remove a superfluous assignment statement
    IB/hns: Switch from dma_device to dev.parent
    ...

    Linus Torvalds
     

23 Feb, 2017

1 commit

  • Pull networking updates from David Miller:
    "Highlights:

    1) Support TX_RING in AF_PACKET TPACKET_V3 mode, from Sowmini
    Varadhan.

    2) Simplify classifier state on sk_buff in order to shrink it a bit.
    From Willem de Bruijn.

    3) Introduce SIPHASH and it's usage for secure sequence numbers and
    syncookies. From Jason A. Donenfeld.

    4) Reduce CPU usage for ICMP replies we are going to limit or
    suppress, from Jesper Dangaard Brouer.

    5) Introduce Shared Memory Communications socket layer, from Ursula
    Braun.

    6) Add RACK loss detection and allow it to actually trigger fast
    recovery instead of just assisting after other algorithms have
    triggered it. From Yuchung Cheng.

    7) Add xmit_more and BQL support to mvneta driver, from Simon Guinot.

    8) skb_cow_data avoidance in esp4 and esp6, from Steffen Klassert.

    9) Export MPLS packet stats via netlink, from Robert Shearman.

    10) Significantly improve inet port bind conflict handling, especially
    when an application is restarted and changes it's setting of
    reuseport. From Josef Bacik.

    11) Implement TX batching in vhost_net, from Jason Wang.

    12) Extend the dummy device so that VF (virtual function) features,
    such as configuration, can be more easily tested. From Phil
    Sutter.

    13) Avoid two atomic ops per page on x86 in bnx2x driver, from Eric
    Dumazet.

    14) Add new bpf MAP, implementing a longest prefix match trie. From
    Daniel Mack.

    15) Packet sample offloading support in mlxsw driver, from Yotam Gigi.

    16) Add new aquantia driver, from David VomLehn.

    17) Add bpf tracepoints, from Daniel Borkmann.

    18) Add support for port mirroring to b53 and bcm_sf2 drivers, from
    Florian Fainelli.

    19) Remove custom busy polling in many drivers, it is done in the core
    networking since 4.5 times. From Eric Dumazet.

    20) Support XDP adjust_head in virtio_net, from John Fastabend.

    21) Fix several major holes in neighbour entry confirmation, from
    Julian Anastasov.

    22) Add XDP support to bnxt_en driver, from Michael Chan.

    23) VXLAN offloads for enic driver, from Govindarajulu Varadarajan.

    24) Add IPVTAP driver (IP-VLAN based tap driver) from Sainath Grandhi.

    25) Support GRO in IPSEC protocols, from Steffen Klassert"

    * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next: (1764 commits)
    Revert "ath10k: Search SMBIOS for OEM board file extension"
    net: socket: fix recvmmsg not returning error from sock_error
    bnxt_en: use eth_hw_addr_random()
    bpf: fix unlocking of jited image when module ronx not set
    arch: add ARCH_HAS_SET_MEMORY config
    net: napi_watchdog() can use napi_schedule_irqoff()
    tcp: Revert "tcp: tcp_probe: use spin_lock_bh()"
    net/hsr: use eth_hw_addr_random()
    net: mvpp2: enable building on 64-bit platforms
    net: mvpp2: switch to build_skb() in the RX path
    net: mvpp2: simplify MVPP2_PRS_RI_* definitions
    net: mvpp2: fix indentation of MVPP2_EXT_GLOBAL_CTRL_DEFAULT
    net: mvpp2: remove unused register definitions
    net: mvpp2: simplify mvpp2_bm_bufs_add()
    net: mvpp2: drop useless fields in mvpp2_bm_pool and related code
    net: mvpp2: remove unused 'tx_skb' field of 'struct mvpp2_tx_queue'
    net: mvpp2: release reference to txq_cpu[] entry after unmapping
    net: mvpp2: handle too large value in mvpp2_rx_time_coal_set()
    net: mvpp2: handle too large value handling in mvpp2_rx_pkts_coal_set()
    net: mvpp2: remove useless arguments in mvpp2_rx_{pkts, time}_coal_set
    ...

    Linus Torvalds
     

17 Feb, 2017

1 commit

  • If copy_from_user is called with a large buffer (>= 128 bytes) and the
    userspace buffer refers partially to unreadable memory, then it is
    possible for Octeon's copy_from_user to report the wrong number of bytes
    have been copied. In the case where the buffer size is an exact multiple
    of 128 and the fault occurs in the last 64 bytes, copy_from_user will
    report that all the bytes were copied successfully but leave some
    garbage in the destination buffer.

    The bug is in the main __copy_user_common loop in octeon-memcpy.S where
    in the middle of the loop, src and dst are incremented by 128 bytes. The
    l_exc_copy fault handler is used after this but that assumes that
    "src < THREAD_BUADDR($28)". This is not the case if src has already been
    incremented.

    Fix by adding an extra fault handler which rewinds the src and dst
    pointers 128 bytes before falling though to l_exc_copy.

    Thanks to the pwritev test from the strace test suite for originally
    highlighting this bug!

    Fixes: 5b3b16880f40 ("MIPS: Add Cavium OCTEON processor support ...")
    Signed-off-by: James Cowgill
    Acked-by: David Daney
    Reviewed-by: James Hogan
    Cc: Ralf Baechle
    Cc: linux-mips@linux-mips.org
    Cc: stable@vger.kernel.org
    Patchwork: https://patchwork.linux-mips.org/patch/14978/
    Signed-off-by: James Hogan

    James Cowgill
     

14 Feb, 2017

2 commits

  • Historically a lot of these existed because we did not have
    a distinction between what was modular code and what was providing
    support to modules via EXPORT_SYMBOL and friends. That changed
    when we forked out support for the latter into the export.h file.

    This means we should be able to reduce the usage of module.h
    in code that is obj-y Makefile or bool Kconfig. In the case of
    some code where it is modular, we can extend that to also include
    files that are building basic support functionality but not related
    to loading or registering the final module; such files also have
    no need whatsoever for module.h

    The advantage in removing such instances is that module.h itself
    sources about 15 other headers; adding significantly to what we feed
    cpp, and it can obscure what headers we are effectively using.

    Since module.h might have been the implicit source for init.h
    (for __init) and for export.h (for EXPORT_SYMBOL) we consider each
    instance for the presence of either and replace/add as needed.

    Also note that MODULE_DEVICE_TABLE is a no-op for non-modular code.

    Build coverage of all the mips defconfigs revealed the module.h
    header was masking a couple of implicit include instances, so
    we add the appropriate headers there.

    Signed-off-by: Paul Gortmaker
    Cc: David Daney
    Cc: John Crispin
    Cc: Ralf Baechle
    Cc: "Steven J. Hill"
    Cc: linux-mips@linux-mips.org
    Patchwork: https://patchwork.linux-mips.org/patch/15131/
    [james.hogan@imgtec.com: Preserve sort order where it already exists]
    Signed-off-by: James Hogan

    Paul Gortmaker
     
  • Add all the necessary platform code to initialize the dwc3
    USB host controller. This code initializes the clocks and
    performs a reset on the USB core and PHYs. The driver code
    in 'drivers/usb/dwc3' is where the real driver lives.

    Signed-off-by: Steven J. Hill
    Acked-by: David Daney
    Cc: Ralf Baechle
    Cc: linux-mips@linux-mips.org
    Patchwork: https://patchwork.linux-mips.org/patch/15108/
    Signed-off-by: James Hogan

    Steven J. Hill
     

11 Feb, 2017

1 commit

  • octeon-platform.c can not be built as a module for two reasons:

    (a) the Makefile doesn't allow it:
    obj-y := cpu.o setup.o octeon-platform.o octeon-irq.o csrc-octeon.o

    (b) the multiple *_initcall() statements, each of which are translated
    to a module_init() call when attempting a module build, become
    aliases to init_module(). Having more than one alias will cause a
    build error.

    Hence, rather than adding a linux/module.h include, remove the redundant
    MODULE_*() from this file.

    Acked-by: David Daney
    Signed-off-by: Russell King
    Signed-off-by: David S. Miller

    Russell King
     

25 Jan, 2017

2 commits

  • gcc-6 reports a harmless build warning:

    arch/mips/cavium-octeon/dma-octeon.c: In function 'octeon_dma_alloc_coherent':
    arch/mips/cavium-octeon/dma-octeon.c:179:3: error: suggest braces around empty body in an 'else' statement [-Werror=empty-body]

    We can fix this by rearranging the code slightly using the
    IS_ENABLED() macro.

    Signed-off-by: Arnd Bergmann
    Cc: Hans-Christian Noren Egtvedt
    Cc: Vineet Gupta
    Cc: linux-mips@linux-mips.org
    Cc: linux-kernel@vger.kernel.org
    Patchwork: https://patchwork.linux-mips.org/patch/15048
    Signed-off-by: Ralf Baechle

    Arnd Bergmann
     
  • Most dma_map_ops structures are never modified. Constify these
    structures such that these can be write-protected. This patch
    has been generated as follows:

    git grep -l 'struct dma_map_ops' |
    xargs -d\\n sed -i \
    -e 's/struct dma_map_ops/const struct dma_map_ops/g' \
    -e 's/const struct dma_map_ops {/struct dma_map_ops {/g' \
    -e 's/^const struct dma_map_ops;$/struct dma_map_ops;/' \
    -e 's/const const struct dma_map_ops /const struct dma_map_ops /g';
    sed -i -e 's/const \(struct dma_map_ops intel_dma_ops\)/\1/' \
    $(git grep -l 'struct dma_map_ops intel_dma_ops');
    sed -i -e 's/const \(struct dma_map_ops dma_iommu_ops\)/\1/' \
    $(git grep -l 'struct dma_map_ops' | grep ^arch/powerpc);
    sed -i -e '/^struct vmd_dev {$/,/^};$/ s/const \(struct dma_map_ops[[:blank:]]dma_ops;\)/\1/' \
    -e '/^static void vmd_setup_dma_ops/,/^}$/ s/const \(struct dma_map_ops \*dest\)/\1/' \
    -e 's/const \(struct dma_map_ops \*dest = \&vmd->dma_ops\)/\1/' \
    drivers/pci/host/*.c
    sed -i -e '/^void __init pci_iommu_alloc(void)$/,/^}$/ s/dma_ops->/intel_dma_ops./' arch/ia64/kernel/pci-dma.c
    sed -i -e 's/static const struct dma_map_ops sn_dma_ops/static struct dma_map_ops sn_dma_ops/' arch/ia64/sn/pci/pci_dma.c
    sed -i -e 's/(const struct dma_map_ops \*)//' drivers/misc/mic/bus/vop_bus.c

    Signed-off-by: Bart Van Assche
    Reviewed-by: Christoph Hellwig
    Cc: Benjamin Herrenschmidt
    Cc: Boris Ostrovsky
    Cc: David Woodhouse
    Cc: Juergen Gross
    Cc: H. Peter Anvin
    Cc: Ingo Molnar
    Cc: linux-arch@vger.kernel.org
    Cc: linux-kernel@vger.kernel.org
    Cc: Russell King
    Cc: x86@kernel.org
    Signed-off-by: Doug Ledford

    Bart Van Assche
     

03 Jan, 2017

6 commits

  • Now that EXPORT_SYMBOL can be used from assembly source, move the
    EXPORT_SYMBOL invocations for the memcpy & memset functions & variants
    thereof to be alongside their definitions.

    Signed-off-by: Paul Burton
    Cc: linux-mips@linux-mips.org
    Patchwork: https://patchwork.linux-mips.org/patch/14514/
    Signed-off-by: Ralf Baechle

    Paul Burton
     
  • The previous commit made cpu_callin_map redundant, since it is no longer
    used to signal secondary CPUs starting, or going offline. Remove it now.

    Signed-off-by: Matt Redfearn
    Cc: Sebastian Andrzej Siewior
    Cc: Qais Yousef
    Cc: Masahiro Yamada
    Cc: Huacai Chen
    Cc: Kevin Cernekee
    Cc: Thomas Gleixner
    Cc: Andrew Morton
    Cc: James Hogan
    Cc: Paul Burton
    Cc: Florian Fainelli
    Cc: Anna-Maria Gleixner
    Cc: Adam Buchbinder
    Cc: Yang Shi
    Cc: David Daney
    Cc: linux-mips@linux-mips.org
    Cc: linux-kernel@vger.kernel.org
    Patchwork: https://patchwork.linux-mips.org/patch/14503/
    Signed-off-by: Ralf Baechle

    Matt Redfearn
     
  • This patch enables KASLR for Octeon systems. The SMP startup code is
    such that the secondaries monitor the volatile variable
    'octeon_processor_relocated_kernel_entry' for any non-zero value.
    The 'plat_post_relocation hook' is used to set that value to the
    kernel entry point of the relocated kernel. The secondary CPUs will
    then jusmp to the new kernel, perform their initialization again
    and begin waiting for the boot CPU to start them via the relocated
    loop 'octeon_spin_wait_boot'. Inspired by Steven's code from Cavium.

    Signed-off-by: Matt Redfearn
    Signed-off-by: Steven J. Hill
    Acked-by: David Daney
    Cc: linux-mips@linux-mips.org
    Patchwork: https://patchwork.linux-mips.org/patch/14669/
    Signed-off-by: Ralf Baechle

    Steven J. Hill
     
  • Add in the function needed for Octeon platforms to support KASLR.

    Signed-off-by: Steven J. Hill
    Signed-off-by: Ralf Baechle

    Steven J. Hill
     
  • Add platform-specific kernel command line processing for Octeon.

    Signed-off-by: Steven J. Hill
    Cc: linux-mips@linux-mips.org
    Patchwork: https://patchwork.linux-mips.org/patch/14599/
    Signed-off-by: Ralf Baechle

    Steven J. Hill
     
  • Kill cvmx_helper_link_autoconf(). Nobody uses this function.

    Signed-off-by: Aaro Koskinen
    Cc: David Daney
    Cc: linux-mips@linux-mips.org
    Patchwork: https://patchwork.linux-mips.org/patch/14626/
    Signed-off-by: Ralf Baechle

    Aaro Koskinen
     

25 Dec, 2016

1 commit


16 Oct, 2016

1 commit

  • Pull MIPS updates from Ralf Baechle:
    "This is the main MIPS pull request for 4.9:

    MIPS core arch code:
    - traps: 64bit kernels should read CP0_EBase 64bit
    - traps: Convert ebase to KSEG0
    - c-r4k: Drop bc_wback_inv() from icache flush
    - c-r4k: Split user/kernel flush_icache_range()
    - cacheflush: Use __flush_icache_user_range()
    - uprobes: Flush icache via kernel address
    - KVM: Use __local_flush_icache_user_range()
    - c-r4k: Fix flush_icache_range() for EVA
    - Fix -mabi=64 build of vdso.lds
    - VDSO: Drop duplicated -I*/-E* aflags
    - tracing: move insn_has_delay_slot to a shared header
    - tracing: disable uprobe/kprobe on compact branch instructions
    - ptrace: Fix regs_return_value for kernel context
    - Squash lines for simple wrapper functions
    - Move identification of VP(E) into proc.c from smp-mt.c
    - Add definitions of SYNC barrierstype values
    - traps: Ensure full EBase is written
    - tlb-r4k: If there are wired entries, don't use TLBINVF
    - Sanitise coherentio semantics
    - dma-default: Don't check hw_coherentio if device is non-coherent
    - Support per-device DMA coherence
    - Adjust MIPS64 CAC_BASE to reflect Config.K0
    - Support generating Flattened Image Trees (.itb)
    - generic: Introduce generic DT-based board support
    - generic: Convert SEAD-3 to a generic board
    - Enable hardened usercopy
    - Don't specify STACKPROTECTOR in defconfigs

    Octeon:
    - Delete dead code and files across the platform.
    - Change to use all memory into use by default.
    - Rename upper case variables in setup code to lowercase.
    - Delete legacy hack for broken bootloaders.
    - Leave maintaining the link state to the actual ethernet/PHY drivers.
    - Add DTS for D-Link DSR-500N.
    - Fix PCI interrupt routing on D-Link DSR-500N.

    Pistachio:
    - Remove ANDROID_TIMED_OUTPUT from defconfig

    TX39xx:
    - Move GPIO setup from .mem_setup() to .arch_init()
    - Convert to Common Clock Framework

    TX49xx:
    - Move GPIO setup from .mem_setup() to .arch_init()
    - Convert to Common Clock Framework

    txx9wdt:
    - Add missing clock (un)prepare calls for CCF

    BMIPS:
    - Add PW, GPIO SDHCI and NAND device node names
    - Support APPENDED_DTB
    - Add missing bcm97435svmb to DT_NONE
    - Rename bcm96358nb4ser to bcm6358-neufbox4-sercom
    - Add DT examples for BCM63268, BCM3368 and BCM6362
    - Add support for BCM3368 and BCM6362

    PCI
    - Reduce stack frame usage
    - Use struct list_head lists
    - Support for CONFIG_PCI_DOMAINS_GENERIC
    - Make pcibios_set_cache_line_size an initcall
    - Inline pcibios_assign_all_busses
    - Split pci.c into pci.c & pci-legacy.c
    - Introduce CONFIG_PCI_DRIVERS_LEGACY
    - Support generic drivers

    CPC
    - Convert bare 'unsigned' to 'unsigned int'
    - Avoid lock when MIPS CM >= 3 is present

    GIC:
    - Delete unused file smp-gic.c

    mt7620:
    - Delete unnecessary assignment for the field "owner" from PCI

    BCM63xx:
    - Let clk_disable() return immediately if clk is NULL

    pm-cps:
    - Change FSB workaround to CPU blacklist
    - Update comments on barrier instructions
    - Use MIPS standard lightweight ordering barrier
    - Use MIPS standard completion barrier
    - Remove selection of sync types
    - Add MIPSr6 CPU support
    - Support CM3 changes to Coherence Enable Register

    SMP:
    - Wrap call to mips_cpc_lock_other in mips_cm_lock_other
    - Introduce mechanism for freeing and allocating IPIs

    cpuidle:
    - cpuidle-cps: Enable use with MIPSr6 CPUs.

    SEAD3:
    - Rewrite to use DT and generic kernel feature.

    USB:
    - host: ehci-sead3: Remove SEAD-3 EHCI code

    FBDEV:
    - cobalt_lcdfb: Drop SEAD3 support

    dt-bindings:
    - Document a binding for simple ASCII LCDs

    auxdisplay:
    - img-ascii-lcd: driver for simple ASCII LCD displays

    irqchip i8259:
    - i8259: Add domain before mapping parent irq
    - i8259: Allow platforms to override poll function
    - i8259: Remove unused i8259A_irq_pending

    Malta:
    - Rewrite to use DT

    of/platform:
    - Probe "isa" busses by default

    CM:
    - Print CM error reports upon bus errors

    Module:
    - Migrate exception table users off module.h and onto extable.h
    - Make various drivers explicitly non-modular:
    - Audit and remove any unnecessary uses of module.h

    mailmap:
    - Canonicalize to Qais' current email address.

    Documentation:
    - MIPS supports HAVE_REGS_AND_STACK_ACCESS_API

    Loongson1C:
    - Add CPU support for Loongson1C
    - Add board support
    - Add defconfig
    - Add RTC support for Loongson1C board

    All this except one Documentation fix has sat in linux-next and has
    survived Imagination's automated build test system"

    * 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus: (127 commits)
    Documentation: MIPS supports HAVE_REGS_AND_STACK_ACCESS_API
    MIPS: ptrace: Fix regs_return_value for kernel context
    MIPS: VDSO: Drop duplicated -I*/-E* aflags
    MIPS: Fix -mabi=64 build of vdso.lds
    MIPS: Enable hardened usercopy
    MIPS: generic: Convert SEAD-3 to a generic board
    MIPS: generic: Introduce generic DT-based board support
    MIPS: Support generating Flattened Image Trees (.itb)
    MIPS: Adjust MIPS64 CAC_BASE to reflect Config.K0
    MIPS: Print CM error reports upon bus errors
    MIPS: Support per-device DMA coherence
    MIPS: dma-default: Don't check hw_coherentio if device is non-coherent
    MIPS: Sanitise coherentio semantics
    MIPS: PCI: Support generic drivers
    MIPS: PCI: Introduce CONFIG_PCI_DRIVERS_LEGACY
    MIPS: PCI: Split pci.c into pci.c & pci-legacy.c
    MIPS: PCI: Inline pcibios_assign_all_busses
    MIPS: PCI: Make pcibios_set_cache_line_size an initcall
    MIPS: PCI: Support for CONFIG_PCI_DOMAINS_GENERIC
    MIPS: PCI: Use struct list_head lists
    ...

    Linus Torvalds
     

12 Oct, 2016

1 commit

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

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

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

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

    Hidehiro Kawai
     

04 Oct, 2016

3 commits