23 Mar, 2016

40 commits

  • As indicated by bug#112271, Linux sets the sempid value upon semctl, and
    not only for semop calls. However, within semctl we only do this for
    SETVAL, leaving SETALL without updating the field, and therefore rather
    inconsistent behavior when compared to other Unices.

    There is really no documentation regarding this and therefore users
    should not make assumptions. With this patch, along with updating
    semctl.2 manpages, this scenario should become less ambiguous As such,
    set sempid on SETALL cmd.

    Also update some in-code documentation, specifying where the sempid is
    set.

    Passes ltp and custom testcase where a child (fork) does SETALL to the
    set.

    Signed-off-by: Davidlohr Bueso
    Reported-by: Philip Semanchuk
    Cc: Michael Kerrisk
    Cc: PrasannaKumar Muralidharan
    Cc: Manfred Spraul
    Cc: Herton R. Krzesinski
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Davidlohr Bueso
     
  • -fsanitize=* options makes GCC less smart than usual and increase number
    of 'maybe-uninitialized' false-positives. So this patch does two things:

    * Add -Wno-maybe-uninitialized to CFLAGS_UBSAN which will disable all
    such warnings for instrumented files.

    * Remove CONFIG_UBSAN_SANITIZE_ALL from all[yes|mod]config builds. So
    the all[yes|mod]config build goes without -fsanitize=* and still with
    -Wmaybe-uninitialized.

    Signed-off-by: Andrey Ryabinin
    Reported-by: Fengguang Wu
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrey Ryabinin
     
  • This patch fix complaints by the sparse tool when using kfifo_put() with
    non scalar types like structures (i.e.
    drivers/iio/industrialio-event.c).

    Casting a pointer to the value and read this pointer instead of directly
    casting the value will fix this.

    The generated code is equal.

    Signed-off-by: Stefani Seibold
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Stefani Seibold
     
  • Commit 7523e4dc5057 ("module: use a structure to encapsulate layout.")
    factored out the module_layout structure. Adjust the symbol loader and
    the lsmod command to this.

    Signed-off-by: Jan Kiszka
    Reviewed-by: Kieran Bingham
    Tested-by: Kieran Bingham (qemu-{ARM,x86})
    Cc: Rusty Russell
    Cc: Jiri Kosina
    Cc: Jason Wessel
    Cc: [4.4+]
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jan Kiszka
     
  • lx-cmdline Report the Linux Commandline used in the current kernel

    [jan.kiszka@siemens.com: remove blank line from help output and fix pep8 warning]
    Signed-off-by: Kieran Bingham
    Signed-off-by: Jan Kiszka
    Cc: Jason Wessel
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Kieran Bingham
     
  • lx-version Report the Linux Version of the current kernel.

    Add a command to identify the version specified by the banner in the
    debugged kernel.

    This lets the user identify the kernel of the running kernel, and will
    let later scripts compare the banner of the attached kernel against the
    banner in the vmlinux symbols files to verify that the files are
    correct.

    [jan.kiszka@siemens.com: remove blank line from help output and fix pep8 warning]
    Signed-off-by: Kieran Bingham
    Signed-off-by: Jan Kiszka
    Cc: Jason Wessel
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Kieran Bingham
     
  • kcov provides code coverage collection for coverage-guided fuzzing
    (randomized testing). Coverage-guided fuzzing is a testing technique
    that uses coverage feedback to determine new interesting inputs to a
    system. A notable user-space example is AFL
    (http://lcamtuf.coredump.cx/afl/). However, this technique is not
    widely used for kernel testing due to missing compiler and kernel
    support.

    kcov does not aim to collect as much coverage as possible. It aims to
    collect more or less stable coverage that is function of syscall inputs.
    To achieve this goal it does not collect coverage in soft/hard
    interrupts and instrumentation of some inherently non-deterministic or
    non-interesting parts of kernel is disbled (e.g. scheduler, locking).

    Currently there is a single coverage collection mode (tracing), but the
    API anticipates additional collection modes. Initially I also
    implemented a second mode which exposes coverage in a fixed-size hash
    table of counters (what Quentin used in his original patch). I've
    dropped the second mode for simplicity.

    This patch adds the necessary support on kernel side. The complimentary
    compiler support was added in gcc revision 231296.

    We've used this support to build syzkaller system call fuzzer, which has
    found 90 kernel bugs in just 2 months:

    https://github.com/google/syzkaller/wiki/Found-Bugs

    We've also found 30+ bugs in our internal systems with syzkaller.
    Another (yet unexplored) direction where kcov coverage would greatly
    help is more traditional "blob mutation". For example, mounting a
    random blob as a filesystem, or receiving a random blob over wire.

    Why not gcov. Typical fuzzing loop looks as follows: (1) reset
    coverage, (2) execute a bit of code, (3) collect coverage, repeat. A
    typical coverage can be just a dozen of basic blocks (e.g. an invalid
    input). In such context gcov becomes prohibitively expensive as
    reset/collect coverage steps depend on total number of basic
    blocks/edges in program (in case of kernel it is about 2M). Cost of
    kcov depends only on number of executed basic blocks/edges. On top of
    that, kernel requires per-thread coverage because there are always
    background threads and unrelated processes that also produce coverage.
    With inlined gcov instrumentation per-thread coverage is not possible.

    kcov exposes kernel PCs and control flow to user-space which is
    insecure. But debugfs should not be mapped as user accessible.

    Based on a patch by Quentin Casasnovas.

    [akpm@linux-foundation.org: make task_struct.kcov_mode have type `enum kcov_mode']
    [akpm@linux-foundation.org: unbreak allmodconfig]
    [akpm@linux-foundation.org: follow x86 Makefile layout standards]
    Signed-off-by: Dmitry Vyukov
    Reviewed-by: Kees Cook
    Cc: syzkaller
    Cc: Vegard Nossum
    Cc: Catalin Marinas
    Cc: Tavis Ormandy
    Cc: Will Deacon
    Cc: Quentin Casasnovas
    Cc: Kostya Serebryany
    Cc: Eric Dumazet
    Cc: Alexander Potapenko
    Cc: Kees Cook
    Cc: Bjorn Helgaas
    Cc: Sasha Levin
    Cc: David Drysdale
    Cc: Ard Biesheuvel
    Cc: Andrey Ryabinin
    Cc: Kirill A. Shutemov
    Cc: Jiri Slaby
    Cc: Ingo Molnar
    Cc: Thomas Gleixner
    Cc: "H. Peter Anvin"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Dmitry Vyukov
     
  • A couple of functions and variables in the profile implementation are
    used only on SMP systems by the procfs code, but are unused if either
    procfs is disabled or in uniprocessor kernels. gcc prints a harmless
    warning about the unused symbols:

    kernel/profile.c:243:13: error: 'profile_flip_buffers' defined but not used [-Werror=unused-function]
    static void profile_flip_buffers(void)
    ^
    kernel/profile.c:266:13: error: 'profile_discard_flip_buffers' defined but not used [-Werror=unused-function]
    static void profile_discard_flip_buffers(void)
    ^
    kernel/profile.c:330:12: error: 'profile_cpu_callback' defined but not used [-Werror=unused-function]
    static int profile_cpu_callback(struct notifier_block *info,
    ^

    This adds further #ifdef to the file, to annotate exactly in which cases
    they are used. I have done several thousand ARM randconfig kernels with
    this patch applied and no longer get any warnings in this file.

    Signed-off-by: Arnd Bergmann
    Cc: Vlastimil Babka
    Cc: Robin Holt
    Cc: Johannes Weiner
    Cc: Christoph Lameter
    Cc: Tejun Heo
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Arnd Bergmann
     
  • Commit 1717f2096b54 ("panic, x86: Fix re-entrance problem due to panic
    on NMI") introduced nmi_panic() which prevents concurrent and recursive
    execution of panic(). It also saves registers for the crash dump on x86
    by later commit 58c5661f2144 ("panic, x86: Allow CPUs to save registers
    even if looping in NMI context").

    hpwdt driver can call panic() from NMI handler, so replace it with
    nmi_panic(). Also, do some cleanups.

    Signed-off-by: Hidehiro Kawai
    Acked-by: Guenter Roeck
    Cc: Thomas Mingarelli
    Cc: Wim Van Sebroeck
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Hidehiro Kawai
     
  • Commit 1717f2096b54 ("panic, x86: Fix re-entrance problem due to panic
    on NMI") introduced nmi_panic() which prevents concurrent and recursive
    execution of panic(). It also saves registers for the crash dump on x86
    by later commit 58c5661f2144 ("panic, x86: Allow CPUs to save registers
    even if looping in NMI context").

    ipmi_watchdog driver can call panic() from NMI handler, so replace it
    with nmi_panic().

    Signed-off-by: Hidehiro Kawai
    Acked-by: Corey Minyard
    Acked-by: Guenter Roeck
    Reviewed-by: Michal Hocko
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Hidehiro Kawai
     
  • Commit 1717f2096b54 ("panic, x86: Fix re-entrance problem due to panic
    on NMI") and commit 58c5661f2144 ("panic, x86: Allow CPUs to save
    registers even if looping in NMI context") introduced nmi_panic() which
    prevents concurrent/recursive execution of panic(). It also saves
    registers for the crash dump on x86.

    However, there are some cases where NMI handlers still use panic().
    This patch set partially replaces them with nmi_panic() in those cases.

    Even this patchset is applied, some NMI or similar handlers (e.g. MCE
    handler) continue to use panic(). This is because I can't test them
    well and actual problems won't happen. For example, the possibility
    that normal panic and panic on MCE happen simultaneously is very low.

    This patch (of 3):

    Convert nmi_panic() to a proper function and export it instead of
    exporting internal implementation details to modules, for obvious
    reasons.

    Signed-off-by: Hidehiro Kawai
    Acked-by: Borislav Petkov
    Acked-by: Michal Nazarewicz
    Cc: Michal Hocko
    Cc: Rasmus Villemoes
    Cc: Nicolas Iooss
    Cc: Javi Merino
    Cc: Gobinda Charan Maji
    Cc: "Steven Rostedt (Red Hat)"
    Cc: Thomas Gleixner
    Cc: Vitaly Kuznetsov
    Cc: HATAYAMA Daisuke
    Cc: Tejun Heo
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Hidehiro Kawai
     
  • Since commit e22553e2a25e ("eventfd: don't take the spinlock in
    eventfd_poll", 2015-02-17), eventfd is reading ctx->count outside
    ctx->wqh.lock.

    However, things aren't as simple as the read barrier in eventfd_poll
    would suggest. In fact, the read barrier, besides lacking a comment, is
    not paired in any obvious manner with another read barrier, and it is
    pointless because it is sitting between a write (deep in poll_wait) and
    the read of ctx->count. The read barrier is acting just as a compiler
    barrier, for which we can use READ_ONCE instead. This is what the code
    change in this patch does.

    The documentation change is just as important, however. The question,
    posed by Andrea Arcangeli, is then why the thing is safe on
    architectures where spin_unlock does not imply a store-load memory
    barrier. The answer is that it's safe because writes of ctx->count use
    the same lock as poll_wait, and hence an acquire barrier implicit in
    poll_wait provides the necessary synchronization between eventfd_poll
    and callers of wake_up_locked_poll. This is sort of mentioned in the
    commit message with respect to eventfd_ctx_read ("eventfd_read is
    similar, it will do a single decrement with the lock held") but it
    applies to all other callers too. It's tricky enough that it should be
    documented in the code.

    Signed-off-by: Paolo Bonzini
    Reviewed-by: Andrea Arcangeli
    Cc: Chris Mason
    Cc: Davide Libenzi
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Paolo Bonzini
     
  • The current_user_ns() macro currently returns &init_user_ns when user
    namespaces are disabled, and that causes several warnings when building
    with gcc-6.0 in code that compares the result of the macro to
    &init_user_ns itself:

    fs/xfs/xfs_ioctl.c: In function 'xfs_ioctl_setattr_check_projid':
    fs/xfs/xfs_ioctl.c:1249:22: error: self-comparison always evaluates to true [-Werror=tautological-compare]
    if (current_user_ns() == &init_user_ns)

    This is a legitimate warning in principle, but here it isn't really
    helpful, so I'm reprasing the definition in a way that shuts up the
    warning. Apparently gcc only warns when comparing identical literals,
    but it can figure out that the result of an inline function can be
    identical to a constant expression in order to optimize a condition yet
    not warn about the fact that the condition is known at compile time.
    This is exactly what we want here, and it looks reasonable because we
    generally prefer inline functions over macros anyway.

    Signed-off-by: Arnd Bergmann
    Acked-by: Serge Hallyn
    Cc: David Howells
    Cc: Yaowei Bai
    Cc: James Morris
    Cc: "Paul E. McKenney"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Arnd Bergmann
     
  • Add mport character device driver to provide user space interface to
    basic RapidIO subsystem operations.

    See included Documentation/rapidio/mport_cdev.txt for more details.

    [akpm@linux-foundation.org: fix printk warning on i386]
    [dan.carpenter@oracle.com: mport_cdev: fix some error codes]
    Signed-off-by: Alexandre Bounine
    Signed-off-by: Dan Carpenter
    Tested-by: Barry Wood
    Cc: Matt Porter
    Cc: Aurelien Jacquiot
    Cc: Andre van Herk
    Cc: Barry Wood
    Cc: Randy Dunlap
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexandre Bounine
     
  • Add DMA channel re-initialization after an error to avoid termination of
    all pending transfer requests.

    Signed-off-by: Alexandre Bounine
    Reported-by: Barry Wood
    Tested-by: Barry Wood
    Cc: Matt Porter
    Cc: Aurelien Jacquiot
    Cc: Andre van Herk
    Cc: Barry Wood
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexandre Bounine
     
  • Fix synchronization issues found during testing using multiple DMA
    transfer requests to the same channel:

    - lost MSI-X interrupt notifications
    - non-synchronized attempts to start DMA channel HW resulting in error
    message from the driver
    - cookie tracking/update race conditions resulting in incorrect DMA
    transfer status report

    Signed-off-by: Alexandre Bounine
    Reported-by: Barry Wood
    Tested-by: Barry Wood
    Cc: Matt Porter
    Cc: Aurelien Jacquiot
    Cc: Andre van Herk
    Cc: Barry Wood
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexandre Bounine
     
  • Switch to returning error-valued pointer instead of simple NULL pointer.
    This allows to properly identify situation when request queue is full
    and therefore gives to upper layer an option to retry operation later.

    Signed-off-by: Alexandre Bounine
    Cc: Matt Porter
    Cc: Aurelien Jacquiot
    Cc: Andre van Herk
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexandre Bounine
     
  • Replace "all-or-nothing" debug output with controlled debug output using
    functional block masks. This allows run time control of debug messages
    through 'dbg_level' module parameter.

    Signed-off-by: Alexandre Bounine
    Cc: Matt Porter
    Cc: Aurelien Jacquiot
    Cc: Andre van Herk
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexandre Bounine
     
  • Add device-specific callback functions to support outbound windows
    mapping and release.

    Signed-off-by: Alexandre Bounine
    Cc: Matt Porter
    Cc: Aurelien Jacquiot
    Cc: Andre van Herk
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexandre Bounine
     
  • Add RapidIO controller (mport) outbound window configuration operations.

    This patch is a part of the original patch submitted by Li Yang:

    https://lists.ozlabs.org/pipermail/linuxppc-dev/2009-April/071210.html

    For some reason the original part was not applied to mainline code
    tree. The inbound window mapping part has been applied later during
    tsi721 mport driver submission. Now goes the second part with
    corresponding HW support.

    Signed-off-by: Alexandre Bounine
    Cc: Matt Porter
    Cc: Li Yang
    Cc: Aurelien Jacquiot
    Cc: Andre van Herk
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexandre Bounine
     
  • - Add spinlock protection into outbound message queuing routine.

    - Change outbound message interrupt handler to avoid deadlock when
    calling registered callback routine.

    - Allow infinite retries for outbound messages to avoid retry threshold
    error signaling in systems with nodes that have slow message receive
    queue processing.

    Signed-off-by: Alexandre Bounine
    Cc: Matt Porter
    Cc: Aurelien Jacquiot
    Cc: Andre van Herk
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexandre Bounine
     
  • Add new Port Write handler registration interfaces that attach PW
    handlers to local mport device objects. This is different from old
    interface that attaches PW callback to individual RapidIO device. The
    new interfaces are intended for use for common event handling (e.g.
    hot-plug notifications) while the old interface is available for
    individual device drivers.

    This patch is based on patch proposed by Andre van Herk but preserves
    existing per-device interface and adds lock protection for list
    handling.

    Signed-off-by: Alexandre Bounine
    Cc: Matt Porter
    Cc: Aurelien Jacquiot
    Cc: Andre van Herk
    Cc: Stephen Rothwell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexandre Bounine
     
  • Make rio_pw_enable() routine available to other RapidIO drivers.

    Signed-off-by: Alexandre Bounine
    Cc: Matt Porter
    Cc: Aurelien Jacquiot
    Cc: Andre van Herk
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexandre Bounine
     
  • Make function rio_local_set_device_id() common for all components of
    RapidIO subsystem.

    Signed-off-by: Alexandre Bounine
    Cc: Matt Porter
    Cc: Aurelien Jacquiot
    Cc: Andre van Herk
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexandre Bounine
     
  • Add lock protection around doorbell list handling to prevent list
    corruption on SMP platforms.

    Signed-off-by: Alexandre Bounine
    Cc: Matt Porter
    Cc: Aurelien Jacquiot
    Cc: Andre van Herk
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexandre Bounine
     
  • Add handling of a local mport device removal.

    RIONET driver registers itself as class interface that supports only
    removal notification, 'add_device' callback is not provided because
    RIONET network device can be initialized only after enumeration is
    completed and the existing method (using remote peer addition) satisfies
    this condition.

    Signed-off-by: Alexandre Bounine
    Cc: Matt Porter
    Cc: Aurelien Jacquiot
    Cc: Andre van Herk
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexandre Bounine
     
  • Add spinlock protection when handling list of connected peers and
    ability to handle new peer device addition after the RIONET device was
    open. Before his update RIONET was sending JOIN requests only when it
    have been opened, peer devices added later have been missing from this
    process.

    Signed-off-by: Alexandre Bounine
    Cc: Matt Porter
    Cc: Aurelien Jacquiot
    Cc: Andre van Herk
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexandre Bounine
     
  • Change mport object initialization/registration sequence to match
    reworked version of rio_register_mport() in the core code.

    Signed-off-by: Alexandre Bounine
    Cc: Matt Porter
    Cc: Benjamin Herrenschmidt
    Cc: Aurelien Jacquiot
    Cc: Andre van Herk
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexandre Bounine
     
  • Add hardware-specific device removal support for Tsi721 PCIe-to-RapidIO
    bridge. To avoid excessive data type conversions, parameters passed to
    some internal functions have been revised. Dynamic memory allocations
    of rio_mport and rio_ops have been replaced to reduce references between
    data structures.

    Signed-off-by: Alexandre Bounine
    Cc: Matt Porter
    Cc: Aurelien Jacquiot
    Cc: Andre van Herk
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexandre Bounine
     
  • Add common mport removal support functions into the RapidIO subsystem
    core.

    Changes to the existing mport registration process have been made to
    avoid race conditions with active subsystem interfaces immediately after
    mport device registration: part of initialization code from
    rio_register_mport() have been moved into separate function
    rio_mport_initialize() to allow to perform mport registration as the
    final step of setup process.

    Signed-off-by: Alexandre Bounine
    Cc: Matt Porter
    Cc: Aurelien Jacquiot
    Cc: Andre van Herk
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexandre Bounine
     
  • Make net allocation/release routines available to all components of
    RapidIO subsystem by moving code from rio-scan enumerator.

    Make destination ID allocation method private to existing enumerator
    because other enumeration methods can use their own algorithm.

    Setup net device object as a parent of all RapidIO devices residing in
    it and register net as a child of active mport device.

    Signed-off-by: Alexandre Bounine
    Cc: Matt Porter
    Cc: Aurelien Jacquiot
    Cc: Andre van Herk
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexandre Bounine
     
  • This patch moves per-net device list handling from rio-scan to common
    RapidIO core and adds a matching device deletion routine. This makes
    device object creation/removal available to other implementations of
    enumeration/discovery process.

    Signed-off-by: Alexandre Bounine
    Cc: Matt Porter
    Cc: Aurelien Jacquiot
    Cc: Andre van Herk
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexandre Bounine
     
  • Add shutdown notification handler which terminates active connections
    with remote RapidIO nodes. This prevents remote nodes from sending
    packets to the powered off node and eliminates hardware error events on
    remote nodes.

    Signed-off-by: Alexandre Bounine
    Cc: Matt Porter
    Cc: Aurelien Jacquiot
    Cc: Andre van Herk
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexandre Bounine
     
  • Add device driver specific shutdown notification callback.

    Signed-off-by: Alexandre Bounine
    Cc: Matt Porter
    Cc: Aurelien Jacquiot
    Cc: Andre van Herk
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexandre Bounine
     
  • Add bus-specific callback to stop RapidIO devices during a system
    shutdown.

    Signed-off-by: Alexandre Bounine
    Cc: Matt Porter
    Cc: Aurelien Jacquiot
    Cc: Andre van Herk
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexandre Bounine
     
  • Add device-specific implementation of query_mport callback function.

    Signed-off-by: Alexandre Bounine
    Cc: Matt Porter
    Cc: Aurelien Jacquiot
    Cc: Andre van Herk
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexandre Bounine
     
  • Add mport query operation to report master port RapidIO capabilities and
    run time configuration to upper level drivers.

    Signed-off-by: Alexandre Bounine
    Cc: Matt Porter
    Cc: Aurelien Jacquiot
    Cc: Andre van Herk
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexandre Bounine
     
  • Fix pending DMA request queue handling to avoid broken ordering during
    concurrent request submissions.

    Signed-off-by: Alexandre Bounine
    Cc: Matt Porter
    Cc: Aurelien Jacquiot
    Cc: Andre van Herk
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexandre Bounine
     
  • Add an option to configure mapping of Inbound Window without RIO-to-PCIe
    address translation.

    If a local memory buffer is not properly aligned to meet HW requirements
    for RapidIO address mapping with address translation, caller can request
    an inbound window with matching RapidIO address assigned to it. This
    implementation selects RapidIO base address and size for inbound window
    that are capable to accommodate the local memory buffer.

    Signed-off-by: Alexandre Bounine
    Cc: Matt Porter
    Cc: Aurelien Jacquiot
    Cc: Andre van Herk
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexandre Bounine
     
  • Add check for attempts to request mapping of inbound RapidIO address
    space that overlaps with existing active mapping windows.

    Tsi721 device does not support overlapped inbound windows and SRIO
    address decoding behavior is not defined in such cases.

    This patch is applicable to kernel versions starting from v3.7.

    Signed-off-by: Alexandre Bounine
    Cc: Matt Porter
    Cc: Aurelien Jacquiot
    Cc: Andre van Herk
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexandre Bounine