08 May, 2013

1 commit

  • Pull rpmsg changes from Ohad Ben-Cohen:
    "A small pull request consisting of:

    - Make rpmsg process all pending messages instead of just one, from
    Robert Tivy

    - Fix Kconfig dependency on VIRTUALIZATION, from Suman.

    Note: this was submitted late during the 3.9 rc cycle and it seemed
    appropriate to wait with it for the merge window.

    - Belated addition of an rpmsg entry to the MAINTAINERS file. People
    seem to look for this"

    * tag 'rpmsg-3.10' of git://git.kernel.org/pub/scm/linux/kernel/git/ohad/rpmsg:
    rpmsg: fix kconfig dependencies for VIRTIO
    MAINTAINERS: add rpmsg entry
    rpmsg: process _all_ pending messages in rpmsg_recv_done

    Linus Torvalds
     

03 May, 2013

1 commit

  • Pull virtio & lguest updates from Rusty Russell:
    "Lots of virtio work which wasn't quite ready for last merge window.

    Plus I dived into lguest again, reworking the pagetable code so we can
    move the switcher page: our fixmaps sometimes take more than 2MB now..."

    Ugh. Annoying conflicts with the tcm_vhost -> vhost_scsi rename.
    Hopefully correctly resolved.

    * tag 'virtio-next-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux: (57 commits)
    caif_virtio: Remove bouncing email addresses
    lguest: improve code readability in lg_cpu_start.
    virtio-net: fill only rx queues which are being used
    lguest: map Switcher below fixmap.
    lguest: cache last cpu we ran on.
    lguest: map Switcher text whenever we allocate a new pagetable.
    lguest: don't share Switcher PTE pages between guests.
    lguest: expost switcher_pages array (as lg_switcher_pages).
    lguest: extract shadow PTE walking / allocating.
    lguest: make check_gpte et. al return bool.
    lguest: assume Switcher text is a single page.
    lguest: rename switcher_page to switcher_pages.
    lguest: remove RESERVE_MEM constant.
    lguest: check vaddr not pgd for Switcher protection.
    lguest: prepare to make SWITCHER_ADDR a variable.
    virtio: console: replace EMFILE with EBUSY for already-open port
    virtio-scsi: reset virtqueue affinity when doing cpu hotplug
    virtio-scsi: introduce multiqueue support
    virtio-scsi: push vq lock/unlock into virtscsi_vq_done
    virtio-scsi: pass struct virtio_scsi to virtqueue completion function
    ...

    Linus Torvalds
     

30 Apr, 2013

1 commit


21 Apr, 2013

1 commit


15 Apr, 2013

1 commit


20 Mar, 2013

1 commit


28 Feb, 2013

2 commits


22 Feb, 2013

1 commit

  • Pull trivial tree from Jiri Kosina:
    "Assorted tiny fixes queued in trivial tree"

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (22 commits)
    DocBook: update EXPORT_SYMBOL entry to point at export.h
    Documentation: update top level 00-INDEX file with new additions
    ARM: at91/ide: remove unsused at91-ide Kconfig entry
    percpu_counter.h: comment code for better readability
    x86, efi: fix comment typo in head_32.S
    IB: cxgb3: delay freeing mem untill entirely done with it
    net: mvneta: remove unneeded version.h include
    time: x86: report_lost_ticks doesn't exist any more
    pcmcia: avoid static analysis complaint about use-after-free
    fs/jfs: Fix typo in comment : 'how may' -> 'how many'
    of: add missing documentation for of_platform_populate()
    btrfs: remove unnecessary cur_trans set before goto loop in join_transaction
    sound: soc: Fix typo in sound/codecs
    treewide: Fix typo in various drivers
    btrfs: fix comment typos
    Update ibmvscsi module name in Kconfig.
    powerpc: fix typo (utilties -> utilities)
    of: fix spelling mistake in comment
    h8300: Fix home page URL in h8300/README
    xtensa: Fix home page URL in Kconfig
    ...

    Linus Torvalds
     

29 Jan, 2013

1 commit


12 Jan, 2013

1 commit

  • The CONFIG_EXPERIMENTAL config item has not carried much meaning for a
    while now and is almost always enabled by default. As agreed during the
    Linux kernel summit, remove it from any "depends on" lines in Kconfigs.

    CC: Ohad Ben-Cohen
    CC: Rusty Russell
    Signed-off-by: Kees Cook
    Acked-by: Rusty Russell

    Kees Cook
     

09 Jan, 2013

1 commit


04 Jan, 2013

1 commit

  • CONFIG_HOTPLUG is going away as an option. As a result, the __dev*
    markings need to be removed.

    This change removes the use of __devinit, __devexit_p, __devinitdata,
    __devinitconst, and __devexit from these drivers.

    Based on patches originally written by Bill Pemberton, but redone by me
    in order to handle some of the coding style issues better, by hand.

    Cc: Bill Pemberton
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     

18 Dec, 2012

1 commit


07 Oct, 2012

1 commit

  • Pull virtio changes from Rusty Russell:
    "New workflow: same git trees pulled by linux-next get sent straight to
    Linus. Git is awkward at shuffling patches compared with quilt or mq,
    but that doesn't happen often once things get into my -next branch."

    * 'virtio-next' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux: (24 commits)
    lguest: fix occasional crash in example launcher.
    virtio-blk: Disable callback in virtblk_done()
    virtio_mmio: Don't attempt to create empty virtqueues
    virtio_mmio: fix off by one error allocating queue
    drivers/virtio/virtio_pci.c: fix error return code
    virtio: don't crash when device is buggy
    virtio: remove CONFIG_VIRTIO_RING
    virtio: add help to CONFIG_VIRTIO option.
    virtio: support reserved vqs
    virtio: introduce an API to set affinity for a virtqueue
    virtio-ring: move queue_index to vring_virtqueue
    virtio_balloon: not EXPERIMENTAL any more.
    virtio-balloon: dependency fix
    virtio-blk: fix NULL checking in virtblk_alloc_req()
    virtio-blk: Add REQ_FLUSH and REQ_FUA support to bio path
    virtio-blk: Add bio-based IO path for virtio-blk
    virtio: console: fix error handling in init() function
    tools: Fix pthread flag for Makefile of trace-agent used by virtio-trace
    tools: Add guest trace agent as a user tool
    virtio/console: Allocate scatterlist according to the current pipe size
    ...

    Linus Torvalds
     

28 Sep, 2012

1 commit


12 Sep, 2012

1 commit

  • dma_alloc/free_coherent APIs requires the platform specific remoteproc
    device as the device parameter. We are passing vdev->dev.parent to the
    dma_free_coherent function which is the generic rproc device and it is
    wrong, it has to be vdev->dev.parent->parent instead, same as when we
    call dma_alloc_coherent function.

    Signed-off-by: Fernando Guzman Lugo
    Signed-off-by: Ohad Ben-Cohen

    Fernando Guzman Lugo
     

27 Jul, 2012

1 commit

  • Pull remoteproc update from Ohad Ben-Cohen:
    - custom binary format support from Sjur Brændeland
    - groundwork for recovery and runtime pm support
    - some cleanups and API simplifications

    Fix up conflicts in drivers/remoteproc/remoteproc_core.c due to clashes
    with earlier cleanups by Sjur Brændeland (with part of the cleanups
    moved into the new remoteproc_elf_loader.c file).

    * tag 'remoteproc-for-3.6' of git://git.kernel.org/pub/scm/linux/kernel/git/ohad/remoteproc:
    MAINTAINERS: add remoteproc's git
    remoteproc: Support custom firmware handlers
    remoteproc: Move Elf related functions to separate file
    remoteproc: Add function rproc_get_boot_addr
    remoteproc: Pass struct fw to load_segments and find_rsc_table.
    remoteproc: adopt the driver core's alloc/add/del/put naming
    remoteproc: remove the get_by_name/put API
    remoteproc: support non-iommu carveout assignment
    remoteproc: simplify unregister/free interfaces
    remoteproc: remove the now-redundant kref
    remoteproc: maintain a generic child device for each rproc
    remoteproc: allocate vrings on demand, free when not needed

    Linus Torvalds
     

17 Jul, 2012

1 commit

  • When rpmsg drivers are built into the kernel, they must not initialize
    before the rpmsg bus does, otherwise they'd trigger a BUG() in
    drivers/base/driver.c line 169 (driver_register()).

    To fix that, and to stop depending on arbitrary linkage ordering of
    those built-in rpmsg drivers, we make the rpmsg bus initialize at
    subsys_initcall.

    Cc: stable
    Signed-off-by: Federico Fuga
    [ohad: rewrite the commit log]
    Signed-off-by: Ohad Ben-Cohen

    Federico Fuga
     

06 Jul, 2012

1 commit

  • For each registered rproc, maintain a generic remoteproc device whose
    parent is the low level platform-specific device (commonly a pdev, but
    it may certainly be any other type of device too).

    With this in hand, the resulting device hierarchy might then look like:

    omap-rproc.0
    |
    - remoteproc0 for suggesting and
    discussing these ideas in one of the remoteproc review threads and
    to Fernando Guzman Lugo for trying them out
    with the (upcoming) runtime PM support for remoteproc.

    Cc: Fernando Guzman Lugo
    Reviewed-by: Stephen Boyd
    Signed-off-by: Ohad Ben-Cohen

    Ohad Ben-Cohen
     

04 Jul, 2012

2 commits

  • When inbound messages arrive, rpmsg core looks up their associated
    endpoint (by destination address) and then invokes their callback.

    We've made sure that endpoints will never be de-allocated after they
    were found by rpmsg core, but we also need to protect against the
    (rare) scenario where the rpmsg driver was just removed, and its
    callback function isn't available anymore.

    This is achieved by introducing a callback mutex, which must be taken
    before the callback is invoked, and, obviously, before it is removed.

    Cc: stable
    Reported-by: Fernando Guzman Lugo
    Signed-off-by: Ohad Ben-Cohen

    Ohad Ben-Cohen
     
  • When an inbound message arrives, the rpmsg core looks up its
    associated endpoint and invokes the registered callback.

    If a message arrives while its endpoint is being removed (because
    the rpmsg driver was removed, or a recovery of a remote processor
    has kicked in) we must ensure atomicity, i.e.:

    - Either the ept is removed before it is found

    or

    - The ept is found but will not be freed until the callback returns

    This is achieved by maintaining a per-ept reference count, which,
    when drops to zero, will trigger deallocation of the ept.

    With this in hand, it is now forbidden to directly deallocate
    epts once they have been added to the endpoints idr.

    Cc: stable
    Reported-by: Fernando Guzman Lugo
    Signed-off-by: Ohad Ben-Cohen

    Ohad Ben-Cohen
     

04 Mar, 2012

1 commit

  • dev_dbg() in rpmsg_probe() made use of the %x formatting that
    expects an 'unsigned int' which dma_addr_t is not in cases where
    dma_addr_t is 64-bit (CONFIG_ARCH_DMA_ADDR_T_64BIT). Casting to
    a 'unsigned long long' and using %llx will avoid this.

    Signed-off-by: Mark Asselstine
    CC: Ohad Ben-Cohen
    CC: Arnd Bergmann
    Signed-off-by: Ohad Ben-Cohen

    Mark Asselstine
     

29 Feb, 2012

3 commits

  • After processing an incoming message, always publish the real size
    of its containing buffer when putting it back on the available rx ring.

    Using any different value might erroneously limit the remote processor
    (leading it to think the buffer is smaller than it really is).

    Signed-off-by: Ohad Ben-Cohen
    Cc: Grant Likely
    Cc: Arnd Bergmann
    Cc: Mark Grosen
    Cc: Suman Anna
    Cc: Fernando Guzman Lugo
    Cc: Rob Clark
    Cc: Ludovic BARRE
    Cc: Loic PALLARDY
    Cc: Omar Ramirez Luna

    Ohad Ben-Cohen
     
  • When an inbound message arrives, validate its reported length before
    propagating it, otherwise buggy (or malicious) remote processors might
    trick us into accessing memory which we really shouldn't.

    Signed-off-by: Ohad Ben-Cohen
    Cc: Grant Likely
    Cc: Arnd Bergmann
    Cc: Mark Grosen
    Cc: Suman Anna
    Cc: Fernando Guzman Lugo
    Cc: Rob Clark
    Cc: Ludovic BARRE
    Cc: Loic PALLARDY
    Cc: Omar Ramirez Luna

    Ohad Ben-Cohen
     
  • The name service endpoint wasn't destroyed, so fix it.

    This is achieved by introducing an internal __rpmsg_destroy_ept
    function which doesn't assume the given ept is bound to an rpmsg
    channel (much like the existing __rpmsg_create_ept).

    This is needed because the name service ept belongs to the rpmsg bus,
    and is never bound with a specific rpdev.

    Reported-by: Omar Ramirez Luna
    Signed-off-by: Ohad Ben-Cohen
    Cc: Grant Likely
    Cc: Arnd Bergmann
    Cc: Mark Grosen
    Cc: Suman Anna
    Cc: Fernando Guzman Lugo
    Cc: Rob Clark
    Cc: Ludovic BARRE
    Cc: Loic PALLARDY
    Cc: Omar Ramirez Luna

    Ohad Ben-Cohen
     

23 Feb, 2012

2 commits

  • Since commit 7bb7aef2 "virtio: rename virtqueue_add_buf_gfp to virtqueue_add_buf",
    virtqueue_add_buf_gfp is already rename to virtqueue_add_buf now.

    This patch fixes below build error:
    CC [M] drivers/rpmsg/virtio_rpmsg_bus.o
    drivers/rpmsg/virtio_rpmsg_bus.c: In function 'rpmsg_send_offchannel_raw':
    drivers/rpmsg/virtio_rpmsg_bus.c:723: error: implicit declaration of function 'virtqueue_add_buf_gfp'
    make[2]: *** [drivers/rpmsg/virtio_rpmsg_bus.o] Error 1
    make[1]: *** [drivers/rpmsg] Error 2
    make: *** [drivers] Error 2

    Signed-off-by: Axel Lin
    Signed-off-by: Ohad Ben-Cohen

    Axel Lin
     
  • There isn't any binary change in sight or evidence of any stability
    issue, but as we just begin to get traction we can't rule them out
    completely.

    To be on the safe side, let's mark rpmsg as EXPERIMENTAL, and remove
    it later on after we have several happy users.

    Signed-off-by: Ohad Ben-Cohen
    Cc: Stephen Boyd
    Cc: Rob Clark
    Cc: Mark Grosen
    Cc: Ludovic BARRE

    Ohad Ben-Cohen
     

09 Feb, 2012

2 commits

  • Add a dedicated Kconfig menu for the rpmsg drivers, so they
    don't show up in the main driver menu.

    Signed-off-by: Ohad Ben-Cohen

    Ohad Ben-Cohen
     
  • Add a virtio-based inter-processor communication bus, which enables
    kernel drivers to communicate with entities, running on remote
    processors, over shared memory using a simple messaging protocol.

    Every pair of AMP processors share two vrings, which are used to send
    and receive the messages over shared memory.

    The header of every message sent on the rpmsg bus contains src and dst
    addresses, which make it possible to multiplex several rpmsg channels on
    the same vring.

    Every rpmsg channel is a device on this bus. When a channel is added,
    and an appropriate rpmsg driver is found and probed, it is also assigned
    a local rpmsg address, which is then bound to the driver's callback.

    When inbound messages carry the local address of a bound driver,
    its callback is invoked by the bus.

    This patch provides a kernel interface only; user space interfaces
    will be later exposed by kernel users of this rpmsg bus.

    Designed with Brian Swetland .

    Signed-off-by: Ohad Ben-Cohen
    Acked-by: Rusty Russell (virtio_ids.h)
    Cc: Brian Swetland
    Cc: Arnd Bergmann
    Cc: Grant Likely
    Cc: Tony Lindgren
    Cc: Russell King
    Cc: Andrew Morton
    Cc: Greg KH
    Cc: Stephen Boyd

    Ohad Ben-Cohen