19 May, 2017

1 commit

  • We use a directory under arch/$ARCH/boot/dts as an include path
    that has links outside of the subtree to find dt-bindings from under
    include/dt-bindings. That's been working well, but new DT architectures
    haven't been adding them by default.

    Recently there's been a desire to share some of the DT material between
    arm and arm64, which originally caused developers to create symlinks or
    relative includes between the subtrees. This isn't ideal -- it breaks
    if the DT files aren't stored in the exact same hierarchy as the kernel
    tree, and generally it's just icky.

    As a somewhat cleaner solution we decided to add a $ARCH/ prefix link
    once, and allow DTS files to reference dtsi (and dts) files in other
    architectures that way.

    Original approach was to create these links under each architecture,
    but it lead to the problem of recursive symlinks.

    As a remedy, move the include link directories out of the architecture
    trees into a common location. At the same time, they can now share one
    directory and one dt-bindings/ link as well.

    Fixes: 4027494ae6e3 ('ARM: dts: add arm/arm64 include symlinks')
    Reported-by: Russell King
    Reported-by: Omar Sandoval
    Reviewed-by: Heiko Stuebner
    Reviewed-by: Masahiro Yamada
    Tested-by: Heiko Stuebner
    Acked-by: Rob Herring
    Cc: Heiko Stuebner
    Cc: Mark Rutland
    Cc: Russell King
    Cc: Catalin Marinas
    Cc: Will Deacon
    Cc: Mikael Starvik
    Cc: Jesper Nilsson
    Cc: James Hogan
    Cc: Ralf Baechle
    Cc: Benjamin Herrenschmidt
    Cc: Paul Mackerras
    Cc: Michael Ellerman
    Cc: Frank Rowand
    Cc: linux-arch
    Signed-off-by: Olof Johansson

    Olof Johansson
     

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
     

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
     

09 May, 2017

6 commits

  • Pull PCI updates from Bjorn Helgaas:

    - add framework for supporting PCIe devices in Endpoint mode (Kishon
    Vijay Abraham I)

    - use non-postable PCI config space mappings when possible (Lorenzo
    Pieralisi)

    - clean up and unify mmap of PCI BARs (David Woodhouse)

    - export and unify Function Level Reset support (Christoph Hellwig)

    - avoid FLR for Intel 82579 NICs (Sasha Neftin)

    - add pci_request_irq() and pci_free_irq() helpers (Christoph Hellwig)

    - short-circuit config access failures for disconnected devices (Keith
    Busch)

    - remove D3 sleep delay when possible (Adrian Hunter)

    - freeze PME scan before suspending devices (Lukas Wunner)

    - stop disabling MSI/MSI-X in pci_device_shutdown() (Prarit Bhargava)

    - disable boot interrupt quirk for ASUS M2N-LR (Stefan Assmann)

    - add arch-specific alignment control to improve device passthrough by
    avoiding multiple BARs in a page (Yongji Xie)

    - add sysfs sriov_drivers_autoprobe to control VF driver binding
    (Bodong Wang)

    - allow slots below PCI-to-PCIe "reverse bridges" (Bjorn Helgaas)

    - fix crashes when unbinding host controllers that don't support
    removal (Brian Norris)

    - add driver for MicroSemi Switchtec management interface (Logan
    Gunthorpe)

    - add driver for Faraday Technology FTPCI100 host bridge (Linus
    Walleij)

    - add i.MX7D support (Andrey Smirnov)

    - use generic MSI support for Aardvark (Thomas Petazzoni)

    - make Rockchip driver modular (Brian Norris)

    - advertise 128-byte Read Completion Boundary support for Rockchip
    (Shawn Lin)

    - advertise PCI_EXP_LNKSTA_SLC for Rockchip root port (Shawn Lin)

    - convert atomic_t to refcount_t in HV driver (Elena Reshetova)

    - add CPU IRQ affinity in HV driver (K. Y. Srinivasan)

    - fix PCI bus removal in HV driver (Long Li)

    - add support for ThunderX2 DMA alias topology (Jayachandran C)

    - add ThunderX pass2.x 2nd node MCFG quirk (Tomasz Nowicki)

    - add ITE 8893 bridge DMA alias quirk (Jarod Wilson)

    - restrict Cavium ACS quirk only to CN81xx/CN83xx/CN88xx devices
    (Manish Jaggi)

    * tag 'pci-v4.12-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci: (146 commits)
    PCI: Don't allow unbinding host controllers that aren't prepared
    ARM: DRA7: clockdomain: Change the CLKTRCTRL of CM_PCIE_CLKSTCTRL to SW_WKUP
    MAINTAINERS: Add PCI Endpoint maintainer
    Documentation: PCI: Add userguide for PCI endpoint test function
    tools: PCI: Add sample test script to invoke pcitest
    tools: PCI: Add a userspace tool to test PCI endpoint
    Documentation: misc-devices: Add Documentation for pci-endpoint-test driver
    misc: Add host side PCI driver for PCI test function device
    PCI: Add device IDs for DRA74x and DRA72x
    dt-bindings: PCI: dra7xx: Add DT bindings to enable unaligned access
    PCI: dwc: dra7xx: Workaround for errata id i870
    dt-bindings: PCI: dra7xx: Add DT bindings for PCI dra7xx EP mode
    PCI: dwc: dra7xx: Add EP mode support
    PCI: dwc: dra7xx: Facilitate wrapper and MSI interrupts to be enabled independently
    dt-bindings: PCI: Add DT bindings for PCI designware EP mode
    PCI: dwc: designware: Add EP mode support
    Documentation: PCI: Add binding documentation for pci-test endpoint function
    ixgbe: Use pcie_flr() instead of duplicating it
    IB/hfi1: Use pcie_flr() instead of duplicating it
    PCI: imx6: Fix spelling mistake: "contol" -> "control"
    ...

    Linus Torvalds
     
  • Merge more updates from Andrew Morton:

    - the rest of MM

    - various misc things

    - procfs updates

    - lib/ updates

    - checkpatch updates

    - kdump/kexec updates

    - add kvmalloc helpers, use them

    - time helper updates for Y2038 issues. We're almost ready to remove
    current_fs_time() but that awaits a btrfs merge.

    - add tracepoints to DAX

    * emailed patches from Andrew Morton : (114 commits)
    drivers/staging/ccree/ssi_hash.c: fix build with gcc-4.4.4
    selftests/vm: add a test for virtual address range mapping
    dax: add tracepoint to dax_insert_mapping()
    dax: add tracepoint to dax_writeback_one()
    dax: add tracepoints to dax_writeback_mapping_range()
    dax: add tracepoints to dax_load_hole()
    dax: add tracepoints to dax_pfn_mkwrite()
    dax: add tracepoints to dax_iomap_pte_fault()
    mtd: nand: nandsim: convert to memalloc_noreclaim_*()
    treewide: convert PF_MEMALLOC manipulations to new helpers
    mm: introduce memalloc_noreclaim_{save,restore}
    mm: prevent potential recursive reclaim due to clearing PF_MEMALLOC
    mm/huge_memory.c: deposit a pgtable for DAX PMD faults when required
    mm/huge_memory.c: use zap_deposited_table() more
    time: delete CURRENT_TIME_SEC and CURRENT_TIME
    gfs2: replace CURRENT_TIME with current_time
    apparmorfs: replace CURRENT_TIME with current_time()
    lustre: replace CURRENT_TIME macro
    fs: ubifs: replace CURRENT_TIME_SEC with current_time
    fs: ufs: use ktime_get_real_ts64() for birthtime
    ...

    Linus Torvalds
     
  • While examining output from trial builds with -Wformat-security enabled,
    many strings were found that should be defined as "const", or as a char
    array instead of char pointer. This makes some static analysis easier,
    by producing fewer false positives.

    As these are all trivial changes, it seemed best to put them all in a
    single patch rather than chopping them up per maintainer.

    Link: http://lkml.kernel.org/r/20170405214711.GA5711@beast
    Signed-off-by: Kees Cook
    Acked-by: Jes Sorensen [runner.c]
    Cc: Tony Lindgren
    Cc: Russell King
    Cc: "Maciej W. Rozycki"
    Cc: Ralf Baechle
    Cc: Arnd Bergmann
    Cc: Greg Kroah-Hartman
    Cc: "Rafael J. Wysocki"
    Cc: Viresh Kumar
    Cc: Daniel Vetter
    Cc: Jani Nikula
    Cc: Sean Paul
    Cc: David Airlie
    Cc: Yisen Zhuang
    Cc: Salil Mehta
    Cc: Thomas Bogendoerfer
    Cc: Jiri Slaby
    Cc: Patrice Chotard
    Cc: "David S. Miller"
    Cc: James Hogan
    Cc: Paul Burton
    Cc: Matt Redfearn
    Cc: Paolo Bonzini
    Cc: Ingo Molnar
    Cc: Rasmus Villemoes
    Cc: Mugunthan V N
    Cc: Felipe Balbi
    Cc: Jarod Wilson
    Cc: Florian Westphal
    Cc: Antonio Quartulli
    Cc: Dmitry Torokhov
    Cc: Kejian Yan
    Cc: Daode Huang
    Cc: Qianqian Xie
    Cc: Philippe Reynes
    Cc: Colin Ian King
    Cc: Eric Dumazet
    Cc: Christian Gromm
    Cc: Andrey Shvetsov
    Cc: Jason Litzinger
    Cc: WANG Cong
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Kees Cook
     
  • This typo is quite common. Fix it and add it to the spelling file so
    that checkpatch catches it earlier.

    Link: http://lkml.kernel.org/r/20170317011131.6881-2-sboyd@codeaurora.org
    Signed-off-by: Stephen Boyd
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Stephen Boyd
     
  • Bit searching functions accept "unsigned long" indices but
    "nr_cpumask_bits" is "int" which is signed, so inevitable sign
    extensions occur on x86_64. Those MOVSX are #1 MOVSX bloat by number of
    uses across whole kernel.

    Change "nr_cpumask_bits" to unsigned, this number can't be negative
    after all. It allows to do implicit zero-extension on x86_64 without
    MOVSX.

    Change signed comparisons into unsigned comparisons where necessary.

    Other uses looks fine because it is either argument passed to a function
    or comparison is already unsigned.

    Net win on allyesconfig type of kernel: ~2.8 KB (!)

    add/remove: 0/0 grow/shrink: 8/725 up/down: 93/-2926 (-2833)
    function old new delta
    xen_exit_mmap 691 735 +44
    qstat_read 426 440 +14
    __cpufreq_cooling_register 1678 1687 +9
    trace_rb_cpu_prepare 447 455 +8
    vermagic 54 60 +6
    nfp_driver_version 54 60 +6
    rcu_torture_stats_print 1147 1151 +4
    find_next_push_cpu 267 269 +2
    xen_irq_resume 961 960 -1
    ...
    init_vp_index 946 906 -40
    od_set_powersave_bias 328 281 -47
    power_cpu_exit 193 139 -54
    arch_show_interrupts 3538 3484 -54
    select_idle_sibling 1558 1471 -87
    Total: Before=158358910, After=158356077, chg -0.00%

    Same arguments apply to "nr_cpu_ids" but I haven't yet found enough
    courage to delve into this issue (and proper fix may require new type
    "cpu_t" which is whole separate story).

    Link: http://lkml.kernel.org/r/20170309205322.GA1728@avx2
    Signed-off-by: Alexey Dobriyan
    Cc: Rusty Russell
    Cc: Heiko Carstens
    Cc: Martin Schwidefsky
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexey Dobriyan
     
  • Pull KVM updates from Paolo Bonzini:
    "ARM:
    - HYP mode stub supports kexec/kdump on 32-bit
    - improved PMU support
    - virtual interrupt controller performance improvements
    - support for userspace virtual interrupt controller (slower, but
    necessary for KVM on the weird Broadcom SoCs used by the Raspberry
    Pi 3)

    MIPS:
    - basic support for hardware virtualization (ImgTec P5600/P6600/I6400
    and Cavium Octeon III)

    PPC:
    - in-kernel acceleration for VFIO

    s390:
    - support for guests without storage keys
    - adapter interruption suppression

    x86:
    - usual range of nVMX improvements, notably nested EPT support for
    accessed and dirty bits
    - emulation of CPL3 CPUID faulting

    generic:
    - first part of VCPU thread request API
    - kvm_stat improvements"

    * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: (227 commits)
    kvm: nVMX: Don't validate disabled secondary controls
    KVM: put back #ifndef CONFIG_S390 around kvm_vcpu_kick
    Revert "KVM: Support vCPU-based gfn->hva cache"
    tools/kvm: fix top level makefile
    KVM: x86: don't hold kvm->lock in KVM_SET_GSI_ROUTING
    KVM: Documentation: remove VM mmap documentation
    kvm: nVMX: Remove superfluous VMX instruction fault checks
    KVM: x86: fix emulation of RSM and IRET instructions
    KVM: mark requests that need synchronization
    KVM: return if kvm_vcpu_wake_up() did wake up the VCPU
    KVM: add explicit barrier to kvm_vcpu_kick
    KVM: perform a wake_up in kvm_make_all_cpus_request
    KVM: mark requests that do not need a wakeup
    KVM: remove #ifndef CONFIG_S390 around kvm_vcpu_wake_up
    KVM: x86: always use kvm_make_request instead of set_bit
    KVM: add kvm_{test,clear}_request to replace {test,clear}_bit
    s390: kvm: Cpu model support for msa6, msa7 and msa8
    KVM: x86: remove irq disablement around KVM_SET_CLOCK/KVM_GET_CLOCK
    kvm: better MWAIT emulation for guests
    KVM: x86: virtualize cpuid faulting
    ...

    Linus Torvalds
     

03 May, 2017

2 commits

  • Pull MMC updates from Ulf Hansson:
    "MMC core:
    - Continue to re-factor code to prepare for eMMC CMDQ and blkmq support
    - Introduce queue semantics to prepare for eMMC CMDQ and blkmq support
    - Add helper functions to manage temporary enable/disable of eMMC CMDQ
    - Improve wait-busy detection for SDIO

    MMC host:
    - cavium: Add driver to support Cavium controllers
    - cavium: Extend Cavium driver to support Octeon and ThunderX SOCs
    - bcm2835: Add new driver for Broadcom BCM2835 controller
    - sdhci-xenon: Add driver to support Marvell Xenon SDHCI controller
    - sdhci-tegra: Add support for the Tegra186 variant
    - sdhci-of-esdhc: Support for UHS-I SD cards
    - sdhci-of-esdhc: Support for eMMC HS200 cards
    - sdhci-cadence: Add eMMC HS400 enhanced strobe support
    - sdhci-esdhc-imx: Reset tuning circuit when needed
    - sdhci-pci: Modernize and clean-up some PM related code
    - sdhci-pci: Avoid re-tuning at runtime PM for some Intel devices
    - sdhci-pci|acpi: Use aggressive PM for some Intel BYT controllers
    - sdhci: Re-factoring and modernizations
    - sdhci: Optimize delay loops
    - sdhci: Improve register dump print format
    - sdhci: Add support for the Command Queue Engine
    - meson-gx: Various improvements and clean-ups
    - meson-gx: Add support for CMD23
    - meson-gx: Basic tuning support to avoid CRC errors
    - s3cmci: Enable probing via DT
    - mediatek: Improve tuning support for eMMC HS200 and HS400 mode
    - tmio: Improve DMA support
    - tmio: Use correct response for CMD12
    - dw_mmc: Minor improvements and clean-ups"

    * tag 'mmc-v4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc: (148 commits)
    mmc: sdhci-of-esdhc: limit SD clock for ls1012a/ls1046a
    mmc: sdhci-of-esdhc: poll ESDHC_CLOCK_STABLE bit with udelay
    mmc: sdhci-xenon: Fix default value of LOGIC_TIMING_ADJUST for eMMC5.0 PHY
    mmc: sdhci-xenon: Fix the work flow in xenon_remove().
    MIPS: Octeon: cavium_octeon_defconfig: Enable Octeon MMC
    mmc: sdhci-xenon: Remove redundant dev_err call in get_dt_pad_ctrl_data()
    mmc: cavium: Use module_pci_driver to simplify the code
    mmc: cavium: Add MMC support for Octeon SOCs.
    mmc: cavium: Fix detection of block or byte addressing.
    mmc: core: Export API to allow hosts to get the card address
    mmc: sdio: Fix sdio wait busy implement limitation
    mmc: sdhci-esdhc-imx: reset tuning circuit when power on mmc card
    clk: apn806: fix spelling mistake: "mising" -> "missing"
    mmc: sdhci-of-esdhc: add delay between tuning cycles
    mmc: sdhci: Control the delay between tuning commands
    mmc: sdhci-of-esdhc: add tuning support
    mmc: sdhci-of-esdhc: add support for signal voltage switch
    mmc: sdhci-of-esdhc: add peripheral clock support
    mmc: sdhci-pci: Allow for 3 bytes from Intel DSM
    mmc: cavium: Fix a shift wrapping bug
    ...

    Linus Torvalds
     
  • Pull networking updates from David Millar:
    "Here are some highlights from the 2065 networking commits that
    happened this development cycle:

    1) XDP support for IXGBE (John Fastabend) and thunderx (Sunil Kowuri)

    2) Add a generic XDP driver, so that anyone can test XDP even if they
    lack a networking device whose driver has explicit XDP support
    (me).

    3) Sparc64 now has an eBPF JIT too (me)

    4) Add a BPF program testing framework via BPF_PROG_TEST_RUN (Alexei
    Starovoitov)

    5) Make netfitler network namespace teardown less expensive (Florian
    Westphal)

    6) Add symmetric hashing support to nft_hash (Laura Garcia Liebana)

    7) Implement NAPI and GRO in netvsc driver (Stephen Hemminger)

    8) Support TC flower offload statistics in mlxsw (Arkadi Sharshevsky)

    9) Multiqueue support in stmmac driver (Joao Pinto)

    10) Remove TCP timewait recycling, it never really could possibly work
    well in the real world and timestamp randomization really zaps any
    hint of usability this feature had (Soheil Hassas Yeganeh)

    11) Support level3 vs level4 ECMP route hashing in ipv4 (Nikolay
    Aleksandrov)

    12) Add socket busy poll support to epoll (Sridhar Samudrala)

    13) Netlink extended ACK support (Johannes Berg, Pablo Neira Ayuso,
    and several others)

    14) IPSEC hw offload infrastructure (Steffen Klassert)"

    * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next: (2065 commits)
    tipc: refactor function tipc_sk_recv_stream()
    tipc: refactor function tipc_sk_recvmsg()
    net: thunderx: Optimize page recycling for XDP
    net: thunderx: Support for XDP header adjustment
    net: thunderx: Add support for XDP_TX
    net: thunderx: Add support for XDP_DROP
    net: thunderx: Add basic XDP support
    net: thunderx: Cleanup receive buffer allocation
    net: thunderx: Optimize CQE_TX handling
    net: thunderx: Optimize RBDR descriptor handling
    net: thunderx: Support for page recycling
    ipx: call ipxitf_put() in ioctl error path
    net: sched: add helpers to handle extended actions
    qed*: Fix issues in the ptp filter config implementation.
    qede: Fix concurrency issue in PTP Tx path processing.
    stmmac: Add support for SIMATIC IOT2000 platform
    net: hns: fix ethtool_get_strings overflow in hns driver
    tcp: fix wraparound issue in tcp_lp
    bpf, arm64: fix jit branch offset related to ldimm64
    bpf, arm64: implement jiting of BPF_XADD
    ...

    Linus Torvalds
     

02 May, 2017

3 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
     
  • Pull uaccess unification updates from Al Viro:
    "This is the uaccess unification pile. It's _not_ the end of uaccess
    work, but the next batch of that will go into the next cycle. This one
    mostly takes copy_from_user() and friends out of arch/* and gets the
    zero-padding behaviour in sync for all architectures.

    Dealing with the nocache/writethrough mess is for the next cycle;
    fortunately, that's x86-only. Same for cleanups in iov_iter.c (I am
    sold on access_ok() in there, BTW; just not in this pile), same for
    reducing __copy_... callsites, strn*... stuff, etc. - there will be a
    pile about as large as this one in the next merge window.

    This one sat in -next for weeks. -3KLoC"

    * 'work.uaccess' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (96 commits)
    HAVE_ARCH_HARDENED_USERCOPY is unconditional now
    CONFIG_ARCH_HAS_RAW_COPY_USER is unconditional now
    m32r: switch to RAW_COPY_USER
    hexagon: switch to RAW_COPY_USER
    microblaze: switch to RAW_COPY_USER
    get rid of padding, switch to RAW_COPY_USER
    ia64: get rid of copy_in_user()
    ia64: sanitize __access_ok()
    ia64: get rid of 'segment' argument of __do_{get,put}_user()
    ia64: get rid of 'segment' argument of __{get,put}_user_check()
    ia64: add extable.h
    powerpc: get rid of zeroing, switch to RAW_COPY_USER
    esas2r: don't open-code memdup_user()
    alpha: fix stack smashing in old_adjtimex(2)
    don't open-code kernel_setsockopt()
    mips: switch to RAW_COPY_USER
    mips: get rid of tail-zeroing in primitives
    mips: make copy_from_user() zero tail explicitly
    mips: clean and reorder the forest of macros...
    mips: consolidate __invoke_... wrappers
    ...

    Linus Torvalds
     

27 Apr, 2017

5 commits


26 Apr, 2017

1 commit


21 Apr, 2017

2 commits


20 Apr, 2017

3 commits

  • Signed-off-by: David Woodhouse
    Signed-off-by: Bjorn Helgaas

    David Woodhouse
     
  • In all cases we know which BAR it is. Passing it in means that arch code
    (or generic code; watch this space) won't have to go looking for it again.

    Signed-off-by: David Woodhouse
    Signed-off-by: Bjorn Helgaas

    David Woodhouse
     
  • The Malta platform is the only platform remaining to probe the GIC
    clocksource via gic_clocksource_init. This route hardcodes an expected
    virq number based on MIPS_GIC_IRQ_BASE, which can be fragile to the
    eventual virq layout. Instread, probe the driver using the preferred and
    more modern devicetree method.

    Before the driver is probed, set the "clock-frequency" property of the
    devicetree node to the value detected by Malta platform code.

    Signed-off-by: Matt Redfearn
    Cc: linux-mips@linux-mips.org
    Cc: James Hogan
    Cc: Daniel Lezcano
    Cc: Ralf Baechle
    Link: http://lkml.kernel.org/r/1492604806-23420-1-git-send-email-matt.redfearn@imgtec.com
    Signed-off-by: Thomas Gleixner

    Matt Redfearn
     

19 Apr, 2017

1 commit


16 Apr, 2017

1 commit


15 Apr, 2017

1 commit

  • In preparation for making the clockevents core NTP correction aware,
    all clockevent device drivers must set ->min_delta_ticks and
    ->max_delta_ticks rather than ->min_delta_ns and ->max_delta_ns: a
    clockevent device's rate is going to change dynamically and thus, the
    ratio of ns to ticks ceases to stay invariant.

    Make the MIPS arch's clockevent drivers initialize these fields properly.

    This patch alone doesn't introduce any change in functionality as the
    clockevents core still looks exclusively at the (untouched) ->min_delta_ns
    and ->max_delta_ns. As soon as this has changed, a followup patch will
    purge the initialization of ->min_delta_ns and ->max_delta_ns from these
    drivers.

    Cc: Ingo Molnar
    Cc: Thomas Gleixner
    Cc: Daniel Lezcano
    Cc: Richard Cochran
    Cc: Prarit Bhargava
    Cc: Stephen Boyd
    Cc: Ralf Baechle
    Cc: Keguang Zhang
    Cc: John Crispin
    Acked-by: Ralf Baechle
    Signed-off-by: Nicolai Stange
    Signed-off-by: John Stultz

    Nicolai Stange
     

13 Apr, 2017

9 commits

  • With commit 23dac14d058f ("MIPS: PCI: Use struct list_head lists") new
    controllers are added after the specified head where they where added
    before the specified head previously.

    Use list_add_tail to restore the former order.

    This patches fixes the following PCI error on lantiq:

    pci 0000:01:00.0: BAR 0: error updating (0x1c000004 != 0x000000)

    Fixes: 23dac14d058f ("MIPS: PCI: Use struct list_head lists")
    Signed-off-by: Mathias Kresin
    Cc: linux-mips@linux-mips.org
    Patchwork: https://patchwork.linux-mips.org/patch/15808/
    Signed-off-by: Ralf Baechle

    Mathias Kresin
     
  • Ralf Baechle
     
  • Commit 41c594ab65fc ("[MIPS] MT: Improved multithreading support.")
    added an else case to an if statement in do_page_fault() (which has
    since gained 2 leading underscores) for some unclear reason. If the
    condition in the if statement evaluates true then we execute a goto &
    branch elsewhere anyway, so the else has no effect. Combined with an #if
    0 block with misleading indentation introduced in the same commit it
    makes the code less clear than it could be.

    Remove the unnecessary else statement & de-indent the printk within
    the #if 0 block in order to make the code easier for humans to parse.

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

    Paul Burton
     
  • Commit fbde2d7d8290 ("MIPS: Add generic SMP IPI support") introduced a
    sanity check that an IPI IRQ domain can be found during boot, in order
    to ensure that IPIs are able to be set up in systems using such domains.
    However it was added at a point where systems may have used an IPI IRQ
    domain in some situations but not others, and we could not know which
    were the case until runtime, so commit 578bffc82ec5 ("MIPS: Don't BUG_ON
    when no IPI domain is found") made that check simply skip IPI init if no
    domain were found in order to fix the boot for systems such as QEMU
    Malta.

    We now use IPI IRQ domains for the MIPS CPU interrupt controller, which
    means systems which make use of IPI IRQ domains will always do so when
    running on multiple CPUs. As a result we now strengthen the sanity check
    to ensure that an IPI IRQ domain is found when multiple CPUs are present
    in the system.

    Signed-off-by: Paul Burton
    Cc: Thomas Gleixner
    Cc: Jason Cooper
    Cc: Marc Zyngier
    Cc: linux-mips@linux-mips.org
    Patchwork: https://patchwork.linux-mips.org/patch/15838/
    Signed-off-by: Ralf Baechle

    Paul Burton
     
  • Remove the smp-mt IPI code that supported single-core multithreaded
    systems and instead make use of the IPI IRQ domain support provided by
    the MIPS CPU interrupt controller driver. This removes some less than
    nice code, the horrible split between arch & board code and the
    duplication that led to within board code.

    The lantiq portion of this patch has only been compile tested. Malta has
    been tested & is functional.

    Signed-off-by: Paul Burton
    Cc: Thomas Gleixner
    Cc: Jason Cooper
    Cc: Marc Zyngier
    Cc: linux-mips@linux-mips.org
    Patchwork: https://patchwork.linux-mips.org/patch/15837/
    Signed-off-by: Ralf Baechle

    Paul Burton
     
  • KGDB is a kernel debug stub and it can't be used to debug userland as it
    can only safely access kernel memory.

    On MIPS however KGDB has always got the register state of sleeping
    processes from the userland register context at the beginning of the
    kernel stack. This is meaningless for kernel threads (which never enter
    userland), and for user threads it prevents the user seeing what it is
    doing while in the kernel:

    (gdb) info threads
    Id Target Id Frame
    ...
    3 Thread 2 (kthreadd) 0x0000000000000000 in ?? ()
    2 Thread 1 (init) 0x000000007705c4b4 in ?? ()
    1 Thread -2 (shadowCPU0) 0xffffffff8012524c in arch_kgdb_breakpoint () at arch/mips/kernel/kgdb.c:201

    Get the register state instead from the (partial) kernel register
    context stored in the task's thread_struct for resume() to restore. All
    threads now correctly appear to be in context_switch():

    (gdb) info threads
    Id Target Id Frame
    ...
    3 Thread 2 (kthreadd) context_switch (rq=, cookie=..., next=, prev=0x0) at kernel/sched/core.c:2903
    2 Thread 1 (init) context_switch (rq=, cookie=..., next=, prev=0x0) at kernel/sched/core.c:2903
    1 Thread -2 (shadowCPU0) 0xffffffff8012524c in arch_kgdb_breakpoint () at arch/mips/kernel/kgdb.c:201

    Call clobbered registers which aren't saved and exception registers
    (BadVAddr & Cause) which can't be easily determined without stack
    unwinding are reported as 0. The PC is taken from the return address,
    such that the state presented matches that found immediately after
    returning from resume().

    Fixes: 8854700115ec ("[MIPS] kgdb: add arch support for the kernel's kgdb core")
    Signed-off-by: James Hogan
    Cc: Jason Wessel
    Cc: linux-mips@linux-mips.org
    Cc: stable@vger.kernel.org
    Patchwork: https://patchwork.linux-mips.org/patch/15829/
    Signed-off-by: Ralf Baechle

    James Hogan
     
  • We declare CONFIG_ARCH_HAS_ILOG2_U32 & CONFIG_ARCH_HAS_ILOG2_U64 in
    Kconfig, but they are always false since nothing ever selects them. The
    generic fls-based implementation is efficient for MIPS anyway. Remove
    the redundant Kconfig entries.

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

    Paul Burton
     
  • Turning on DEBUG in smp-cps.c, or compiling the kernel with
    CONFIG_DYNAMIC_DEBUG enabled results the build error:

    arch/mips/kernel/smp-cps.c: In function 'play_dead':
    ./include/linux/dynamic_debug.h:126:3: error: 'core' may be used
    uninitialized in this function [-Werror=maybe-uninitialized]

    Fix this by always initialising the variable.

    Fixes: 0d2808f338c7 ("MIPS: smp-cps: Add support for CPU hotplug of MIPSr6 processors")
    Signed-off-by: Matt Redfearn
    Cc: James Hogan
    Cc: Masahiro Yamada
    Cc: Paul Burton
    Cc: Ingo Molnar
    Cc: Andrew Morton
    Cc: linux-mips@linux-mips.org
    Cc: linux-kernel@vger.kernel.org
    Patchwork: https://patchwork.linux-mips.org/patch/15848/
    Signed-off-by: Ralf Baechle

    Matt Redfearn
     
  • The generic_defconfig is used for platforms like SEAD3 which do not
    usually have fixed storage available, therefore NFS is the preferred
    location of the RFS.
    When the upstream kernel defconfig is built & tested on platforms such
    as SEAD3 this leads to essentially false failures when the RFS fails to
    mount.

    There is little harm in having this feature enabled by default, so
    enable it in the defconfig. Kernel autoconfiguration & DHCP must also be
    selected to allow RFS on NFS.

    Signed-off-by: Matt Redfearn
    Cc: James Hogan
    Cc: Paul Burton
    Cc: linux-mips@linux-mips.org
    Cc: linux-kernel@vger.kernel.org
    Patchwork: https://patchwork.linux-mips.org/patch/15853/
    Signed-off-by: Ralf Baechle

    Matt Redfearn
     

12 Apr, 2017

3 commits

  • After the split of linux/sched.h, KASLR stopped building.

    Fix this by including the correct header file for init_thread_union

    Signed-off-by: Matt Redfearn
    Cc: James Hogan
    Cc: Marcin Nowakowski
    Cc: Steven J. Hill
    Cc: linux-mips@linux-mips.org
    Cc: linux-kernel@vger.kernel.org
    Patchwork: https://patchwork.linux-mips.org/patch/15849/
    Signed-off-by: Ralf Baechle

    Matt Redfearn
     
  • arch_check_elf contains a usage of current_cpu_data that will call
    smp_processor_id() with preemption enabled and therefore triggers a
    "BUG: using smp_processor_id() in preemptible" warning when an fpxx
    executable is loaded.

    As a follow-up to commit b244614a60ab ("MIPS: Avoid a BUG warning during
    prctl(PR_SET_FP_MODE, ...)"), apply the same fix to arch_check_elf by
    using raw_current_cpu_data instead. The rationale quoted from the previous
    commit:

    "It is assumed throughout the kernel that if any CPU has an FPU, then
    all CPUs would have an FPU as well, so it is safe to perform the check
    with preemption enabled - change the code to use raw_ variant of the
    check to avoid the warning."

    Fixes: 46490b572544 ("MIPS: kernel: elf: Improve the overall ABI and FPU mode checks")
    Signed-off-by: James Cowgill
    CC: # 4.0+
    Cc: linux-mips@linux-mips.org
    Patchwork: https://patchwork.linux-mips.org/patch/15951/
    Signed-off-by: Ralf Baechle

    James Cowgill
     
  • In commit 827456e71036 ("MIPS: Export _mcount alongside its definition")
    the EXPORT_SYMBOL macro exporting _mcount was moved from C code into
    assembly. Unlike C, exported assembly symbols need to have a function
    prototype in asm/asm-prototypes.h for modversions to work properly.
    Without this, modpost prints out this warning:

    WARNING: EXPORT symbol "_mcount" [vmlinux] version generation failed,
    symbol will not be versioned.

    Fix by including asm/ftrace.h (where _mcount is declared) in
    asm/asm-prototypes.h.

    Fixes: 827456e71036 ("MIPS: Export _mcount alongside its definition")
    Signed-off-by: James Cowgill
    Cc: linux-mips@linux-mips.org
    Patchwork: https://patchwork.linux-mips.org/patch/15952/
    Signed-off-by: Ralf Baechle

    James Cowgill