11 May, 2017

2 commits

  • …asahiroy/linux-kbuild

    Pull Kbuild UAPI updates from Masahiro Yamada:
    "Improvement of headers_install by Nicolas Dichtel.

    It has been long since the introduction of uapi directories, but the
    de-coupling of exported headers has not been completed. Headers listed
    in header-y are exported whether they exist in uapi directories or
    not. His work fixes this inconsistency.

    All (and only) headers under uapi directories are now exported. The
    asm-generic wrappers are still exceptions, but this is a big step
    forward"

    * tag 'kbuild-uapi-v4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild:
    arch/include: remove empty Kbuild files
    uapi: export all arch specifics directories
    uapi: export all headers under uapi directories
    smc_diag.h: fix include from userland
    btrfs_tree.h: fix include from userland
    uapi: includes linux/types.h before exporting files
    Makefile.headersinst: remove destination-y option
    Makefile.headersinst: cleanup input files
    x86: stop exporting msr-index.h to userland
    nios2: put setup.h in uapi
    h8300: put bitsperlong.h in uapi

    Linus Torvalds
     
  • Pull Kbuild updates from Masahiro Yamada:

    - improve Clang support

    - clean up various Makefiles

    - improve build log visibility (objtool, alpha, ia64)

    - improve compiler flag evaluation for better build performance

    - fix GCC version-dependent warning

    - fix genksyms

    * tag 'kbuild-v4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: (23 commits)
    kbuild: dtbinst: remove unnecessary __dtbs_install_prep target
    ia64: beatify build log for gate.so and gate-syms.o
    alpha: make short build log available for division routines
    alpha: merge build rules of division routines
    alpha: add $(src)/ rather than $(obj)/ to make source file path
    Makefile: evaluate LDFLAGS_BUILD_ID only once
    objtool: make it visible in make V=1 output
    kbuild: clang: add -no-integrated-as to KBUILD_[AC]FLAGS
    kbuild: Add support to generate LLVM assembly files
    kbuild: Add better clang cross build support
    kbuild: drop -Wno-unknown-warning-option from clang options
    kbuild: fix asm-offset generation to work with clang
    kbuild: consolidate redundant sed script ASM offset generation
    frv: Use OFFSET macro in DEF_*REG()
    kbuild: avoid conflict between -ffunction-sections and -pg on gcc-4.7
    kbuild: Consolidate header generation from ASM offset information
    kbuild: use -Oz instead of -Os when using clang
    kbuild, LLVMLinux: Add -Werror to cc-option to support clang
    Kbuild: make designated_init attribute fatal
    kbuild: drop unneeded patterns '.*.orig' and '.*.rej' from distclean
    ...

    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
     

03 May, 2017

1 commit

  • 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

1 commit

  • 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
     

27 Apr, 2017

2 commits


19 Apr, 2017

1 commit


08 Apr, 2017

1 commit

  • Introduce a new getsockopt operation to retrieve the socket cookie
    for a specific socket based on the socket fd. It returns a unique
    non-decreasing cookie for each socket.
    Tested: https://android-review.googlesource.com/#/c/358163/

    Acked-by: Willem de Bruijn
    Signed-off-by: Chenbo Feng
    Signed-off-by: David S. Miller

    Chenbo Feng
     

03 Apr, 2017

1 commit

  • The kbuild test robot reported this build failure on a number
    of architectures:

    > make.cross ARCH=arm
    > lib/lib.a(bug.o): In function `find_bug':
    > >> lib/bug.c:135: undefined reference to `__start___bug_table'
    > >> lib/bug.c:135: undefined reference to `__stop___bug_table'

    Caused by:

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

    Which moved the BUG_TABLE from RO_DATA_SECTION() to RW_DATA_SECTION(),
    but a number of architectures don't use RW_DATA_SECTION(), so they
    ended up with no __bug_table[] ...

    Ideally all those would use RW_DATA_SECTION() in their linker scripts,
    but that's for another day.

    Signed-off-by: Peter Zijlstra
    Cc: Linus Torvalds
    Cc: Thomas Gleixner
    Cc: kbuild test robot
    Cc: kbuild-all@01.org
    Cc: tipbuild@zytor.com
    Link: http://lkml.kernel.org/r/20170330154927.o6qmgfp4bdhrajbm@hirez.programming.kicks-ass.net
    Signed-off-by: Ingo Molnar

    Peter Zijlstra
     

02 Apr, 2017

1 commit


29 Mar, 2017

2 commits


25 Mar, 2017

1 commit

  • This socket option returns the NAPI ID associated with the queue on which
    the last frame is received. This information can be used by the apps to
    split the incoming flows among the threads based on the Rx queue on which
    they are received.

    If the NAPI ID actually represents a sender_cpu then the value is ignored
    and 0 is returned.

    Signed-off-by: Sridhar Samudrala
    Signed-off-by: Alexander Duyck
    Acked-by: Eric Dumazet
    Signed-off-by: David S. Miller

    Sridhar Samudrala
     

23 Mar, 2017

1 commit

  • Allows reading of SK_MEMINFO_VARS via socket option. This way an
    application can get all meminfo related information in single socket
    option call instead of multiple calls.

    Adds helper function, sk_get_meminfo(), and uses that for both
    getsockopt and sock_diag_put_meminfo().

    Suggested by Eric Dumazet.

    Signed-off-by: Josh Hunt
    Reviewed-by: Jason Baron
    Acked-by: Eric Dumazet
    Signed-off-by: David S. Miller

    Josh Hunt
     

10 Mar, 2017

1 commit

  • If an architecture uses 4level-fixup.h we don't need to do anything as
    it includes 5level-fixup.h.

    If an architecture uses pgtable-nop*d.h, define __ARCH_USE_5LEVEL_HACK
    before inclusion of the header. It makes asm-generic code to use
    5level-fixup.h.

    If an architecture has 4-level paging or folds levels on its own,
    include 5level-fixup.h directly.

    Signed-off-by: Kirill A. Shutemov
    Acked-by: Michal Hocko
    Signed-off-by: Linus Torvalds

    Kirill A. Shutemov
     

06 Mar, 2017

2 commits


02 Mar, 2017

7 commits


28 Feb, 2017

2 commits

  • Apart from adding the helper function itself, the rest of the kernel is
    converted mechanically using:

    git grep -l 'atomic_inc.*mm_users' | xargs sed -i 's/atomic_inc(&\(.*\)->mm_users);/mmget\(\1\);/'
    git grep -l 'atomic_inc.*mm_users' | xargs sed -i 's/atomic_inc(&\(.*\)\.mm_users);/mmget\(\&\1\);/'

    This is needed for a later patch that hooks into the helper, but might
    be a worthwhile cleanup on its own.

    (Michal Hocko provided most of the kerneldoc comment.)

    Link: http://lkml.kernel.org/r/20161218123229.22952-2-vegard.nossum@oracle.com
    Signed-off-by: Vegard Nossum
    Acked-by: Michal Hocko
    Acked-by: Peter Zijlstra (Intel)
    Acked-by: David Rientjes
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Vegard Nossum
     
  • Often all is needed is these small helpers, instead of compiler.h or a
    full kprobes.h. This is important for asm helpers, in fact even some
    asm/kprobes.h make use of these helpers... instead just keep a generic
    asm file with helpers useful for asm code with the least amount of
    clutter as possible.

    Likewise we need now to also address what to do about this file for both
    when architectures have CONFIG_HAVE_KPROBES, and when they do not. Then
    for when architectures have CONFIG_HAVE_KPROBES but have disabled
    CONFIG_KPROBES.

    Right now most asm/kprobes.h do not have guards against CONFIG_KPROBES,
    this means most architecture code cannot include asm/kprobes.h safely.
    Correct this and add guards for architectures missing them.
    Additionally provide architectures that not have kprobes support with
    the default asm-generic solution. This lets us force asm/kprobes.h on
    the header include/linux/kprobes.h always, but most importantly we can
    now safely include just asm/kprobes.h on architecture code without
    bringing the full kitchen sink of header files.

    Two architectures already provided a guard against CONFIG_KPROBES on its
    kprobes.h: sh, arch. The rest of the architectures needed gaurds added.
    We avoid including any not-needed headers on asm/kprobes.h unless
    kprobes have been enabled.

    In a subsequent atomic change we can try now to remove compiler.h from
    include/linux/kprobes.h.

    During this sweep I've also identified a few architectures defining a
    common macro needed for both kprobes and ftrace, that of the definition
    of the breakput instruction up. Some refer to this as
    BREAKPOINT_INSTRUCTION. This must be kept outside of the #ifdef
    CONFIG_KPROBES guard.

    [mcgrof@kernel.org: fix arm64 build]
    Link: http://lkml.kernel.org/r/CAB=NE6X1WMByuARS4mZ1g9+W=LuVBnMDnh_5zyN0CLADaVh=Jw@mail.gmail.com
    [sfr@canb.auug.org.au: fixup for kprobes declarations moving]
    Link: http://lkml.kernel.org/r/20170214165933.13ebd4f4@canb.auug.org.au
    Link: http://lkml.kernel.org/r/20170203233139.32682-1-mcgrof@kernel.org
    Signed-off-by: Luis R. Rodriguez
    Signed-off-by: Stephen Rothwell
    Acked-by: Masami Hiramatsu
    Cc: Arnd Bergmann
    Cc: Masami Hiramatsu
    Cc: Ananth N Mavinakayanahalli
    Cc: Anil S Keshavamurthy
    Cc: David S. Miller
    Cc: Ingo Molnar
    Cc: Thomas Gleixner
    Cc: H. Peter Anvin
    Cc: Andy Lutomirski
    Cc: Steven Rostedt
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Luis R. Rodriguez
     

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
     

25 Feb, 2017

1 commit

  • The build of frv defconfig gives warning:

    arch/frv/mb93090-mb00/pci-frv.c:176:5: warning: ignoring return value of 'pci_assign_resource', declared with attribute warn_unused_result

    Just print an error message to silence the warning. We can not do much
    here on error.

    Link: http://lkml.kernel.org/r/1484256471-5379-1-git-send-email-sudipm.mukherjee@gmail.com
    Signed-off-by: Sudip Mukherjee
    Cc: David Howells
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Sudip Mukherjee
     

22 Feb, 2017

1 commit

  • Pull exception table module split from Paul Gortmaker:
    "Final extable.h related changes.

    This completes the separation of exception table content from the
    module.h header file. This is achieved with the final commit that
    removes the one line back compatible change that sourced extable.h
    into the module.h file.

    The commits are unchanged since January, with the exception of a
    couple Acks that came in for the last two commits a bit later. The
    changes have been in linux-next for quite some time[1] and have got
    widespread arch coverage via toolchains I have and also from
    additional ones the kbuild bot has.

    Maintaners of the various arch were Cc'd during the postings to
    lkml[2] and informed that the intention was to take the remaining arch
    specific changes and lump them together with the final two non-arch
    specific changes and submit for this merge window.

    The ia64 diffstat stands out and probably warrants a mention. In an
    earlier review, Al Viro made a valid comment that the original header
    separation of content left something to be desired, and that it get
    fixed as a part of this change, hence the larger diffstat"

    * tag 'extable-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux: (21 commits)
    module.h: remove extable.h include now users have migrated
    core: migrate exception table users off module.h and onto extable.h
    cris: migrate exception table users off module.h and onto extable.h
    hexagon: migrate exception table users off module.h and onto extable.h
    microblaze: migrate exception table users off module.h and onto extable.h
    unicore32: migrate exception table users off module.h and onto extable.h
    score: migrate exception table users off module.h and onto extable.h
    metag: migrate exception table users off module.h and onto extable.h
    arc: migrate exception table users off module.h and onto extable.h
    nios2: migrate exception table users off module.h and onto extable.h
    sparc: migrate exception table users onto extable.h
    openrisc: migrate exception table users off module.h and onto extable.h
    frv: migrate exception table users off module.h and onto extable.h
    sh: migrate exception table users off module.h and onto extable.h
    xtensa: migrate exception table users off module.h and onto extable.h
    mn10300: migrate exception table users off module.h and onto extable.h
    alpha: migrate exception table users off module.h and onto extable.h
    arm: migrate exception table users off module.h and onto extable.h
    m32r: migrate exception table users off module.h and onto extable.h
    ia64: ensure exception table search users include extable.h
    ...

    Linus Torvalds
     

01 Feb, 2017

1 commit

  • cputime_t is now only used by two architectures:

    * powerpc (when CONFIG_VIRT_CPU_ACCOUNTING_NATIVE=y)
    * s390

    And since the core doesn't use it anymore, we don't need any arch support
    from the others. So we can remove their stub implementations.

    A final cleanup would be to provide an efficient pure arch
    implementation of cputime_to_nsec() for s390 and powerpc and finally
    remove include/linux/cputime.h .

    Signed-off-by: Frederic Weisbecker
    Cc: Benjamin Herrenschmidt
    Cc: Fenghua Yu
    Cc: Heiko Carstens
    Cc: Linus Torvalds
    Cc: Martin Schwidefsky
    Cc: Michael Ellerman
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Cc: Rik van Riel
    Cc: Stanislaw Gruszka
    Cc: Thomas Gleixner
    Cc: Tony Luck
    Cc: Wanpeng Li
    Link: http://lkml.kernel.org/r/1485832191-26889-36-git-send-email-fweisbec@gmail.com
    Signed-off-by: Ingo Molnar

    Frederic Weisbecker
     

25 Jan, 2017

5 commits

  • Some more atomic64 operations were missing and as a result frv
    allmodconfig was failing. Add the missing operations.

    Link: http://lkml.kernel.org/r/1485193844-12850-1-git-send-email-sudip.mukherjee@codethink.co.uk
    Signed-off-by: Sudip Mukherjee
    Cc: David Howells
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Sudip Mukherjee
     
  • The build of frv allmodconfig was failing with the error:
    lib/atomic64_test.c:209:9: error:

    implicit declaration of function 'atomic64_add_unless'

    All the atomic64 operations were defined in frv, but
    atomic64_add_unless() was not done.

    Implement atomic64_add_unless() as done in other arches.

    Link: http://lkml.kernel.org/r/1484781236-6698-1-git-send-email-sudipm.mukherjee@gmail.com
    Signed-off-by: Sudip Mukherjee
    Cc: David Howells
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Sudip Mukherjee
     
  • This file was only including module.h for exception table related
    functions. We've now separated that content out into its own file
    "extable.h" so now move over to that and avoid all the extra header
    content in module.h that we don't really need to compile this file.

    Reported-by: kbuild test robot
    Signed-off-by: Paul Gortmaker

    Paul Gortmaker
     
  • Introduce a new architecture-specific get_arch_dma_ops() function
    that takes a struct bus_type * argument. Add get_dma_ops() in
    .

    Signed-off-by: Bart Van Assche
    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
     
  • 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
     

25 Dec, 2016

1 commit


15 Dec, 2016

1 commit

  • The use of DMA_ATTR_SKIP_CPU_SYNC was not consistent across all of the
    DMA APIs in the arch/arm folder. This change is meant to correct that
    so that we get consistent behavior.

    Link: http://lkml.kernel.org/r/20161110113447.76501.93160.stgit@ahduyck-blue-test.jf.intel.com
    Signed-off-by: Alexander Duyck
    Cc: David Howells
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexander Duyck
     

13 Dec, 2016

1 commit

  • Pull locking updates from Ingo Molnar:
    "The tree got pretty big in this development cycle, but the net effect
    is pretty good:

    115 files changed, 673 insertions(+), 1522 deletions(-)

    The main changes were:

    - Rework and generalize the mutex code to remove per arch mutex
    primitives. (Peter Zijlstra)

    - Add vCPU preemption support: add an interface to query the
    preemption status of vCPUs and use it in locking primitives - this
    optimizes paravirt performance. (Pan Xinhui, Juergen Gross,
    Christian Borntraeger)

    - Introduce cpu_relax_yield() and remov cpu_relax_lowlatency() to
    clean up and improve the s390 lock yielding machinery and its core
    kernel impact. (Christian Borntraeger)

    - Micro-optimize mutexes some more. (Waiman Long)

    - Reluctantly add the to-be-deprecated mutex_trylock_recursive()
    interface on a temporary basis, to give the DRM code more time to
    get rid of its locking hacks. Any other users will be NAK-ed on
    sight. (We turned off the deprecation warning for the time being to
    not pollute the build log.) (Peter Zijlstra)

    - Improve the rtmutex code a bit, in light of recent long lived
    bugs/races. (Thomas Gleixner)

    - Misc fixes, cleanups"

    * 'locking-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (36 commits)
    x86/paravirt: Fix bool return type for PVOP_CALL()
    x86/paravirt: Fix native_patch()
    locking/ww_mutex: Use relaxed atomics
    locking/rtmutex: Explain locking rules for rt_mutex_proxy_unlock()/init_proxy_locked()
    locking/rtmutex: Get rid of RT_MUTEX_OWNER_MASKALL
    x86/paravirt: Optimize native pv_lock_ops.vcpu_is_preempted()
    locking/mutex: Break out of expensive busy-loop on {mutex,rwsem}_spin_on_owner() when owner vCPU is preempted
    locking/osq: Break out of spin-wait busy waiting loop for a preempted vCPU in osq_lock()
    Documentation/virtual/kvm: Support the vCPU preemption check
    x86/xen: Support the vCPU preemption check
    x86/kvm: Support the vCPU preemption check
    x86/kvm: Support the vCPU preemption check
    kvm: Introduce kvm_write_guest_offset_cached()
    locking/core, x86/paravirt: Implement vcpu_is_preempted(cpu) for KVM and Xen guests
    locking/spinlocks, s390: Implement vcpu_is_preempted(cpu)
    locking/core, powerpc: Implement vcpu_is_preempted(cpu)
    sched/core: Introduce the vcpu_is_preempted(cpu) interface
    sched/wake_q: Rename WAKE_Q to DEFINE_WAKE_Q
    locking/core: Provide common cpu_relax_yield() definition
    locking/mutex: Don't mark mutex_trylock_recursive() as deprecated, temporarily
    ...

    Linus Torvalds
     

30 Nov, 2016

1 commit

  • This patch exports the sender chronograph stats via the socket
    SO_TIMESTAMPING channel. Currently we can instrument how long a
    particular application unit of data was queued in TCP by tracking
    SOF_TIMESTAMPING_TX_SOFTWARE and SOF_TIMESTAMPING_TX_SCHED. Having
    these sender chronograph stats exported simultaneously along with
    these timestamps allow further breaking down the various sender
    limitation. For example, a video server can tell if a particular
    chunk of video on a connection takes a long time to deliver because
    TCP was experiencing small receive window. It is not possible to
    tell before this patch without packet traces.

    To prepare these stats, the user needs to set
    SOF_TIMESTAMPING_OPT_STATS and SOF_TIMESTAMPING_OPT_TSONLY flags
    while requesting other SOF_TIMESTAMPING TX timestamps. When the
    timestamps are available in the error queue, the stats are returned
    in a separate control message of type SCM_TIMESTAMPING_OPT_STATS,
    in a list of TLVs (struct nlattr) of types: TCP_NLA_BUSY_TIME,
    TCP_NLA_RWND_LIMITED, TCP_NLA_SNDBUF_LIMITED. Unit is microsecond.

    Signed-off-by: Francis Yan
    Signed-off-by: Yuchung Cheng
    Signed-off-by: Soheil Hassas Yeganeh
    Acked-by: Neal Cardwell
    Signed-off-by: David S. Miller

    Francis Yan