07 Apr, 2013

1 commit

  • Fix obvious typo introduced in commit e121aefa7d9f10eee5cf26ed47129237a05d940b
    ("remoteproc: fix missing CONFIG_FW_LOADER configurations").

    Cc: stable@vger.kernel.org
    Signed-off-by: Robert Tivy
    [cc stable, slight subject change]
    Signed-off-by: Ohad Ben-Cohen

    Robert Tivy
     

05 Apr, 2013

3 commits

  • Remove the vdev entry from the list before freeing it,
    otherwise rproc->vdevs will explode.

    Cc: stable@vger.kernel.org
    Signed-off-by: Sjur Brændeland
    Acked-by: Ido Yariv
    [edit subject, minor commit log edit, cc stable]
    Signed-off-by: Ohad Ben-Cohen

    Sjur Brændeland
     
  • Fixes coherent memory leakage, caused by non-deallocated
    firmware image chunk.

    Cc: stable@vger.kernel.org
    Signed-off-by: Dmitry Tarnyagin
    Signed-off-by: Sjur Brændeland
    Acked-by: Ido Yariv
    [slightly edit subject and commit log]
    Signed-off-by: Ohad Ben-Cohen

    Dmitry Tarnyagin
     
  • The new idr_alloc interface returns the allocated id back
    on success, so fix the error path to check for negative
    values. This was missed out in the newer idr interface
    adoption patch, 15fc611 "remoteproc: convert to idr_alloc()".

    Signed-off-by: Suman Anna
    Acked-by: Tejun Heo
    Signed-off-by: Ohad Ben-Cohen

    Suman Anna
     

28 Feb, 2013

2 commits


27 Feb, 2013

1 commit

  • Pull virtio updates from Rusty Russell:
    "All trivial, thanks to the stuff which didn't quite make it time"

    * tag 'virtio-next-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux:
    virtio_console: Initialize guest_connected=true for rproc_serial
    virtio: use module_virtio_driver.
    virtio: Add module driver macro for virtio drivers.
    virtio_console: Use virtio device index to generate port name
    virtio: make pci_device_id const
    virtio: make config_ops const
    virtio-mmio: fix wrong comment about register offset
    virtio_console: Let unconnected rproc device receive data.

    Linus Torvalds
     

22 Feb, 2013

1 commit

  • Pull ARM SoC multiplatform support from Arnd Bergmann:
    "Converting more ARM platforms to multiplatform support. This time,
    OMAP gets converted, which is a major step since this is by far the
    largest platform in terms of code size. The same thing happens to the
    vt8500 platform."

    * tag 'multiplatform' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc:
    net: cwdavinci_cpdma: export symbols for cpsw
    remoteproc: omap: depend on OMAP_MBOX_FWK
    [media] davinci: do not include mach/hardware.h
    ARM: OMAP2+: Make sure files with omap initcalls include soc.h
    ARM: OMAP2+: Include soc.h to drm.c to fix compiling
    ARM: OMAP2+: Fix warning for hwspinlock omap_postcore_initcall
    ARM: multi_v7_defconfig: add ARCH_ZYNQ
    ARM: multi_v7_defconfig: remove unnecessary CONFIG_GPIOLIB
    arm: vt8500: Remove remaining mach includes
    arm: vt8500: Convert debug-macro.S to be multiplatform friendly
    arm: vt8500: Remove single platform Kconfig options
    ARM: OMAP2+: Remove now obsolete uncompress.h and debug-macro.S
    ARM: OMAP2+: Add minimal support for booting vexpress
    ARM: OMAP2+: Enable ARCH_MULTIPLATFORM support
    ARM: OMAP2+: Disable code that currently does not work with multiplaform
    ARM: OMAP2+: Add multiplatform debug_ll support
    ARM: OMAP: Fix dmaengine init for multiplatform
    ARM: OMAP: Fix i2c cmdline initcall for multiplatform
    ARM: OMAP2+: Use omap initcalls
    ARM: OMAP2+: Limit omap initcalls to omap only on multiplatform kernels

    Linus Torvalds
     

15 Feb, 2013

1 commit

  • Patch a62a6e98 "ARM: OMAP2+: Disable code that currently does not work
    with multiplaform" makes the OMAP_MBOX_FWK option depend on !MULTIPLATFORM,
    which means we cannot simply select that symbol from OMAP_REMOTEPROC.

    Turning the 'select' into 'depends on' ensures that all dependencies
    are correct until OMAP_MBOX_FWK loses its dependency.

    Without this patch, building allmodconfig results in:

    drivers/remoteproc/omap_remoteproc.c:31:26: fatal error: plat/mailbox.h: No such file or directory

    Signed-off-by: Arnd Bergmann
    Acked-by: Tony Lindgren
    Acked-by: Ohad Ben-Cohen

    Arnd Bergmann
     

11 Feb, 2013

1 commit


22 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
     

14 Dec, 2012

1 commit

  • Pull trivial branch from Jiri Kosina:
    "Usual stuff -- comment/printk typo fixes, documentation updates, dead
    code elimination."

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (39 commits)
    HOWTO: fix double words typo
    x86 mtrr: fix comment typo in mtrr_bp_init
    propagate name change to comments in kernel source
    doc: Update the name of profiling based on sysfs
    treewide: Fix typos in various drivers
    treewide: Fix typos in various Kconfig
    wireless: mwifiex: Fix typo in wireless/mwifiex driver
    messages: i2o: Fix typo in messages/i2o
    scripts/kernel-doc: check that non-void fcts describe their return value
    Kernel-doc: Convention: Use a "Return" section to describe return values
    radeon: Fix typo and copy/paste error in comments
    doc: Remove unnecessary declarations from Documentation/accounting/getdelays.c
    various: Fix spelling of "asynchronous" in comments.
    Fix misspellings of "whether" in comments.
    eisa: Fix spelling of "asynchronous".
    various: Fix spelling of "registered" in comments.
    doc: fix quite a few typos within Documentation
    target: iscsi: fix comment typos in target/iscsi drivers
    treewide: fix typo of "suport" in various comments and Kconfig
    treewide: fix typo of "suppport" in various comments
    ...

    Linus Torvalds
     

03 Dec, 2012

1 commit


29 Nov, 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
     

05 Oct, 2012

1 commit

  • Pull remoteproc update from Ohad Ben-Cohen:

    - Remoteproc Recovery - by Fernando Guzman Lugo

    When a remote processor crash is detected, this mechanism will remove
    all virtio children devices, wait until their drivers let go, hard
    reset the remote processor and reload the firmware (resulting in the
    relevant virtio children devices re-added). Essentially the entire
    software stack is reset, together with the relevant hardware, so
    users don't have to reset the entire phone.

    - STE Modem driver is added - by Sjur Brændeland

    - OMAP DSP boot address support is added - by Juan Gutierrez

    - A handful of fixes/cleanups - Sjur Brændeland, Dan Carpenter, Emil
    Goode

    * tag 'remoteproc-for-3.7' of git://git.kernel.org/pub/scm/linux/kernel/git/ohad/remoteproc:
    remoteproc: Fix use of format specifyer
    remoteproc: fix a potential NULL-dereference on cleanup
    remoteproc: select VIRTIO to avoid build breakage
    remoteproc: return -EFAULT on copy_from_user failure
    remoteproc: snprintf() can return more than was printed
    remoteproc: Add STE modem driver
    remtoteproc: maintain max notifyid
    remoteproc: create a 'recovery' debugfs entry
    remoteproc: add actual recovery implementation
    remoteproc: add rproc_report_crash function to notify rproc crashes
    remoteproc: Add dependency to HAS_DMA
    remoteproc/omap: set bootaddr support

    Linus Torvalds
     

02 Oct, 2012

3 commits

  • The dma_addr_t type can be either u32 or u64 depending on
    the configuration. We should use a format specifyer for the
    larger type and explicitly cast to it.

    Sparse warnings:
    drivers/remoteproc/remoteproc_core.c:234:2: warning:
    format ‘%x’ expects argument of type ‘unsigned int’,
    but argument 6 has type ‘dma_addr_t’ [-Wformat]

    drivers/remoteproc/remoteproc_core.c:596:2: warning:
    format ‘%x’ expects argument of type ‘unsigned int’,
    but argument 5 has type ‘dma_addr_t’ [-Wformat]

    drivers/remoteproc/remoteproc_core.c:634:3:
    warning: format ‘%x’ expects argument of type ‘unsigned int’,
    but argument 5 has type ‘dma_addr_t’ [-Wformat]

    Signed-off-by: Emil Goode
    [fix commit log typos]
    Signed-off-by: Ohad Ben-Cohen

    Emil Goode
     
  • We only need to allocate mapping if there is an IOMMU domain.

    Otherwise, when the mappings are released, the assumption that
    an IOMMU domain is there will crash and burn.

    CC: stable@vger.kernel.org
    Signed-off-by: Dan Carpenter
    [ohad: revise commit log]
    Signed-off-by: Ohad Ben-Cohen

    Dan Carpenter
     
  • drivers/built-in.o: In function `rproc_virtio_finalize_features':
    remoteproc_virtio.c:(.text+0x2f9a02): undefined reference to `vring_transport_features'
    drivers/built-in.o: In function `rproc_virtio_del_vqs':
    remoteproc_virtio.c:(.text+0x2f9a74): undefined reference to `vring_del_virtqueue'
    drivers/built-in.o: In function `rproc_virtio_find_vqs':
    remoteproc_virtio.c:(.text+0x2f9c44): undefined reference to `vring_new_virtqueue'
    drivers/built-in.o: In function `rproc_add_virtio_dev':
    (.text+0x2f9e2c): undefined reference to `register_virtio_device'
    drivers/built-in.o: In function `rproc_vq_interrupt':
    (.text+0x2f9db7): undefined reference to `vring_interrupt'
    drivers/built-in.o: In function `rproc_remove_virtio_dev':
    (.text+0x2f9e9f): undefined reference to `unregister_virtio_device'

    Cc: stable@vger.kernel.org
    Reported-by: Randy Dunlap
    Signed-off-by: Ohad Ben-Cohen

    Ohad Ben-Cohen
     

30 Sep, 2012

2 commits


28 Sep, 2012

2 commits

  • virtio network device multiqueue support reserves
    vq 3 for future use (useful both for future extensions and to make it
    pretty - this way receive vqs have even and transmit - odd numbers).
    Make it possible to skip initialization for
    specific vq numbers by specifying NULL for name.
    Document this usage as well as (existing) NULL callback.

    Drivers using this not coded up yet, so I simply tested
    with virtio-pci and verified that this patch does
    not break existing drivers.

    Signed-off-by: Michael S. Tsirkin
    Signed-off-by: Rusty Russell

    Michael S. Tsirkin
     
  • Instead of storing the queue index in transport-specific virtio structs,
    this patch moves them to vring_virtqueue and introduces an helper to get
    the value. This lets drivers simplify their management and tracing of
    virtqueues.

    Signed-off-by: Jason Wang
    Signed-off-by: Paolo Bonzini
    Signed-off-by: Rusty Russell

    Jason Wang
     

22 Sep, 2012

1 commit

  • Add support for the STE modem shared memory driver.
    This driver hooks into the remoteproc framework
    in order to manage configuration and the virtio
    devices.

    This driver adds custom firmware handlers, because
    STE modem uses a custom firmware layout.

    Signed-off-by: Sjur Brændeland
    cc: Linus Walleij
    cc: Alan Cox
    [ohad: validate mdev->ops, move setup() to probe/remove, trivial style changes]
    Signed-off-by: Ohad Ben-Cohen

    Sjur Brændeland
     

19 Sep, 2012

2 commits

  • Platform data for device drivers should be defined in
    include/linux/platform_data/*.h, not in the architecture
    and platform specific directories.

    This moves such data out of the omap include directories

    Signed-off-by: Arnd Bergmann
    Acked-by: Mark Brown
    Acked-by: Greg Kroah-Hartman
    Acked-by: Nicolas Pitre
    Acked-by: Tony Lindgren
    Cc: Kevin Hilman
    Cc: "Benoît Cousson"
    Cc: Dmitry Torokhov
    Cc: David Woodhouse
    Cc: Kyungmin Park
    Cc: Ohad Ben-Cohen
    Cc: Grant Likely
    Cc: Omar Ramirez Luna
    Cc: Tomi Valkeinen
    Cc: Florian Tobias Schandinat
    Cc: Peter Ujfalusi
    Cc: Jarkko Nikula
    Cc: Liam Girdwood
    Cc: Artem Bityutskiy
    Cc: Jean Pihet
    Cc: J Keerthy
    Cc: linux-omap@vger.kernel.org

    Arnd Bergmann
     
  • Some of the rproc drivers (STE modem specifically) needs to know
    the range of the notification IDs used for notifying the device.

    Maintain a variable in struct rproc holding the largest allocated
    notification id, so low-level rproc drivers could access it.

    Signed-off-by: Sjur Brændeland
    [ohad: rebase, slightly edit commit log]
    Signed-off-by: Ohad Ben-Cohen

    Sjur Brændeland
     

18 Sep, 2012

4 commits

  • Add a 'recovery' debugfs entry to dynamically disable/enable recovery
    at runtime. This is useful when one is trying to debug an rproc crash;
    without it, a recovery will immediately take place, making it harder
    to debug the crash.

    Contributions from Subramaniam Chanderashekarapuram.

    Examples:

    - disabling recovery:
    $ echo disabled > /remoteproc/remoteproc0/recovery

    - in case you want to recover a crash, but keep recovery disabled
    (useful in debugging sessions when you expect additional crashes
    you want to debug):
    $ echo recover > /remoteproc/remoteproc0/recovery

    - enabling recovery:
    $ echo enabled > /remoteproc/remoteproc0/recovery

    Signed-off-by: Fernando Guzman Lugo
    [ohad: some white space, commentary and commit log changes]
    Signed-off-by: Ohad Ben-Cohen

    Fernando Guzman Lugo
     
  • Add rproc_trigger_recovery() which takes care of the recovery itself,
    by removing, and re-adding, all of the remoteproc's virtio devices.

    This resets all virtio users of the remote processor, during which
    the remote processor is powered off and on again.

    Signed-off-by: Fernando Guzman Lugo
    [ohad: introduce rproc_add_virtio_devices to avoid 1.copying code 2.anomaly]
    [ohad: some white space, naming and commit log changes]
    Signed-off-by: Ohad Ben-Cohen

    Fernando Guzman Lugo
     
  • Allow low-level remoteproc drivers to report rproc crashes by exporting
    a new rproc_report_crash() function (invoking this from non-rproc drivers
    is probably wrong, and should be carefully scrutinized if ever needed).

    rproc_report_crash() can be called from any context; it offloads the
    tasks of handling the crash to a separate thread.

    Handling the crash from a separate thread is helpful because:
    - Ability to call invoke rproc_report_crash() from atomic context, due to
    the fact that many crashes trigger an interrupt, so this function can be
    called directly from ISR context.
    - Avoiding deadlocks which could happen if rproc_report_crash() is called
    from a function which indirectly holds the rproc lock.

    Handling the crash might involve:
    - Remoteproc register dump
    - Remoteproc stack dump
    - Remoteproc core dump
    - Saving Remoteproc traces so they can be read after the crash
    - Reseting the remoteproc in order to make it functional again (hard recovery)

    Right now, we only print the crash type which was detected, and only the
    mmufault type is supported. Remoteproc low-level drivers can add more types
    when needed.

    Signed-off-by: Fernando Guzman Lugo
    [ohad: some commentary, white space and commit log changes]
    Signed-off-by: Ohad Ben-Cohen

    Fernando Guzman Lugo
     
  • Remoteproc relies on HAS_DMA, add this dependency in Kconfig.

    Cc: Rusty Russell
    Signed-off-by: Sjur Brændeland
    Signed-off-by: Ohad Ben-Cohen

    Sjur Brændeland
     

11 Sep, 2012

1 commit

  • Some remote processors (like OMAP4's DSP) require we explicitly
    set a boot address from which they'd start executing code when
    taken out of reset.

    Support for this is now being added to the omap-specific remoteproc
    driver through a set_bootaddr function in the platform data which,
    if needed, must be set according to the backend remote processor.

    For OMAP4's dsp we can use the following control function:

    .set_bootaddr = omap_ctrl_write_dsp_boot_addr

    Signed-off-by: Juan Gutierrez
    Signed-off-by: Suman Anna
    [ohad: slight changes to the commit log]
    Signed-off-by: Ohad Ben-Cohen

    Juan Gutierrez
     

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
     

15 Jul, 2012

4 commits

  • Firmware handling is made customizable.
    This is done by creating a separate ops structure for the
    firmware functions that depends on a particular firmware
    format (such as ELF). The ELF functions are default used
    unless the HW driver explicitly injects another firmware
    handler by updating rproc->fw_ops.
    The function rproc_da_to_va() is exported, as custom
    firmware handlers may need to use this function.

    Signed-off-by: Sjur Brændeland
    [ohad: namespace fixes, whitespace fixes, style fixes]
    Signed-off-by: Ohad Ben-Cohen

    Sjur Brændeland
     
  • Prepare for introduction of custom firmware loaders by
    moving all ELF related handling into a separate file.

    The functions: rproc_find_rsc_table(), rproc_fw_sanity_check(),
    rproc_find_rsc_table() and rproc_get_boot_addr() are moved
    to the new file remoteproc_elf_loader.c. The function
    rproc_da_to_va() is made non-static and is declared in
    remoteproc_internal.h

    No functional changes are introduced in this patch.

    Signed-off-by: Sjur Brændeland
    [ohad: rebase, fix kerneldoc, put prototypes in remoteproc_internal.h]
    Signed-off-by: Ohad Ben-Cohen

    Sjur Brændeland
     
  • Prepare for introduction of custom firmware loaders by
    moving the function operating on ELF data-structures into
    separate functions. Move lookup of the boot_addr in the
    ELF binary to the function rproc_get_boot_addr().

    Signed-off-by: Sjur Brændeland
    [rproc_get_boot_addr's kerneldoc: add missing @rproc line]
    [rproc_get_boot_addr's kerneldoc: minor style changes]
    Signed-off-by: Ohad Ben-Cohen

    Sjur Brændeland
     
  • Prepare for introduction of custom firmware loaders by changing
    the functions rproc_find_rcs_table() and rproc_load_segments()
    to use struct firmware as parameter.

    When the custom loader framework is introduced all calls into
    the firmware specific function must use struct firmware as
    parameter.

    Signed-off-by: Sjur Brændeland
    Signed-off-by: Ohad Ben-Cohen

    Sjur Brændeland
     

06 Jul, 2012

3 commits

  • To make remoteproc's API more intuitive for developers, we adopt
    the driver core's naming, i.e. alloc -> add -> del -> put. We'll also
    add register/unregister when their first user shows up.

    Otherwise - there's no functional change here.

    Suggested by Russell King .

    Cc: Russell King
    Cc: Fernando Guzman Lugo
    Cc: Sjur Brændeland
    Reviewed-by: Linus Walleij
    Acked-by: Stephen Boyd
    Signed-off-by: Ohad Ben-Cohen

    Ohad Ben-Cohen
     
  • Remove rproc_get_by_name() and rproc_put(), and the associated
    remoteproc infrastructure that supports it (i.e. klist and friends),
    because:

    1. No one uses them
    2. Using them is highly discouraged, and any potential user
    will be deeply scrutinized and encouraged to move.

    If a user, that absolutely can't live with the direct boot/shutdown
    model, does show up one day, then bringing this functionality back
    is going to be trivial.

    At this point though, keeping this functionality around is way too
    much of a maintenance burden.

    Cc: Sjur Brændeland
    Cc: Loic Pallardy
    Cc: Ludovic BARRE
    Cc: Michal Simek
    Cc: Fernando Guzman Lugo
    Cc: Suman Anna
    Cc: Mark Grosen
    Acked-by: Stephen Boyd
    Signed-off-by: Ohad Ben-Cohen

    Ohad Ben-Cohen
     
  • Publish carveout addresses on non-iommu setups too.

    Reported-and-acked-by: Sjur Brændeland
    Signed-off-by: Ohad Ben-Cohen

    Ohad Ben-Cohen