summaryrefslogtreecommitdiffstats
path: root/drivers/remoteproc
Commit message (Collapse)AuthorAgeFilesLines
* remoteproc: don't use PTR_RET().Rusty Russell2013-07-151-1/+1
| | | | | | | | We've already tested that it's an error. Cc: Robert Tivy <rtivy@ti.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Acked-by: Ohad Ben-Cohen <ohad@wizery.com>
* Merge tag 'remoteproc-3.11-fixes' of ↵Linus Torvalds2013-07-113-16/+15
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/ohad/remoteproc Pull remoteproc fixes from Ohad Ben-Cohen: "Trivial remoteproc fixes by Suman Anna, Wei Yongjun and Thomas Meyer" * tag 'remoteproc-3.11-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/ohad/remoteproc: remoteproc: Cocci spatch "memdup.spatch" remoteproc: free carveout memories only after unmapping them remoteproc/omap: fix a sparse warning remoteproc: fix checkpatch errors in remoteproc code remoteproc: fix error return code in rproc_fw_boot()
| * remoteproc: Cocci spatch "memdup.spatch"Thomas Meyer2013-07-011-2/+1
| | | | | | | | | | | | | | Use kmemdup instead of kmalloc + memcpy. Signed-off-by: Thomas Meyer <thomas@m3y3r.de> Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com>
| * remoteproc: free carveout memories only after unmapping themSuman Anna2013-07-011-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | It is not preferable to have the allocated pages for carveout memories freed before they are unmapped. The code that deals with the cleanup of carveout memories is therefore moved after the corresponding mapping entries were cleaned up. This is mostly a no-op since the remote processors are already stopped when the cleanup function is called, but this will make the cleanup code follow the exact reverse path of allocation. Signed-off-by: Suman Anna <s-anna@ti.com> Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com>
| * remoteproc: fix checkpatch errors in remoteproc codeSuman Anna2013-06-302-4/+3
| | | | | | | | | | | | | | | | | | This patch fixes relevant checkpatch errors and warnings in the remoteproc source files. Signed-off-by: Suman Anna <s-anna@ti.com> [drop 80-char-lines checkpatch fixes and update commit log accordingly] Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com>
| * remoteproc: fix error return code in rproc_fw_boot()Wei Yongjun2013-06-301-3/+4
| | | | | | | | | | | | | | | | | | Set 'ret' to -EINVAL when needed, so a sensible return value is returned on errors. Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> [fix additional instances of this bug as well, update commit log] Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com>
* | mailbox/omap: move the OMAP mailbox framework to driversSuman Anna2013-06-112-2/+3
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | The mailbox hardware (in OMAP) uses a queued mailbox interrupt mechanism that provides a communication channel between processors through a set of registers and their associated interrupt signals by sending and receiving messages. The OMAP mailbox framework/driver code is moved to be under drivers/mailbox, in preparation for adapting to a common mailbox driver framework. This allows the build for OMAP mailbox to be enabled (it was disabled during the multi-platform support). As part of the migration from plat and mach code: - Kconfig symbols have been renamed to build OMAP1 or OMAP2+ drivers. - mailbox.h under plat-omap/plat/include has been split into a public and private header files. The public header has only the API related functions and types. - The module name mailbox.ko from plat-omap is changed to omap-mailbox.ko - The module name mailbox_mach.ko from mach-omapX is changed as mailbox_omap1.ko for OMAP1 mailbox_omap2.ko for OMAP2+ Cc: Tony Lindgren <tony@atomide.com> [gregkh@linuxfoundation.org: ack for staging part] Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Omar Ramirez Luna <omar.ramirez@copitl.com> Signed-off-by: Suman Anna <s-anna@ti.com>
* Merge tag 'remoteproc-3.10' of ↵Linus Torvalds2013-05-078-134/+668
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/ohad/remoteproc Pull remoteproc update from Ohad Ben-Cohen: - Some refactoring, cleanups and small improvements from Sjur Brændeland. The improvements are mainly about better supporting varios virtio properties (such as virtio's config space, status and features). I now see that I messed up while commiting one of Sjur's patches and erroneously put myself as the author, as well as letting a nasty typo sneak in. I will not fix this in order to avoid rebasing the patches. Sjur - sorry! - A new remoteproc driver for OMAP-L13x (technically a DaVinci platform) from Robert Tivy. - Extend OMAP support to OMAP5 as well, from Vincent Stehlé. - Fix Kconfig VIRTUALIZATION dependency, from Suman Anna (a non-critical fix which arrived late during the rc cycle). * tag 'remoteproc-3.10' of git://git.kernel.org/pub/scm/linux/kernel/git/ohad/remoteproc: remoteproc: fix kconfig dependencies for VIRTIO remoteproc/davinci: add a remoteproc driver for OMAP-L13x DSP remoteproc: support default firmware name in rproc_alloc() remoteproc/omap: support OMAP5 too remoteproc: set vring addresses in resource table remoteproc: support virtio config space. remoteproc: perserve resource table data remoteproc: calculate max_notifyid by counting vrings remoteproc: code cleanup of resource parsing remoteproc: parse STE-firmware and find resource table address remoteproc: add find_loaded_rsc_table firmware ops remoteproc: refactor rproc_elf_find_rsc_table()
| * remoteproc: fix kconfig dependencies for VIRTIOSuman Anna2013-04-211-0/+1
| | | | | | | | | | | | | | | | | | | | | | Fix this: warning: (VIRTIO_PCI && VIRTIO_MMIO && REMOTEPROC && RPMSG) selects VIRTIO which has unmet direct dependencies (VIRTUALIZATION) Cc: stable@vger.kernel.org Signed-off-by: Suman Anna <s-anna@ti.com> [edit commit log] Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com>
| * remoteproc/davinci: add a remoteproc driver for OMAP-L13x DSPRobert Tivy2013-04-153-0/+348
| | | | | | | | | | | | | | | | Adding a new remoteproc driver for OMAP-L13x DSP Signed-off-by: Robert Tivy <rtivy@ti.com> [removed 'EXPERIMENTAL' and fixed some indentation issues] Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com>
| * remoteproc: support default firmware name in rproc_alloc()Robert Tivy2013-04-071-4/+24
| | | | | | | | | | | | | | | | | | If rproc_alloc isn't given a firmware name, look for a default one using the "rproc-%s-fw" template. Signed-off-by: Robert Tivy <rtivy@ti.com> [add commit log, document change, use snprintf, minor style change] Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com>
| * remoteproc/omap: support OMAP5 tooVincent Stehlé2013-04-071-1/+1
| | | | | | | | | | | | | | | | This allows building remoteproc on OMAP5 too. Signed-off-by: Vincent Stehlé <v-stehle@ti.com> [edit commit log] Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com>
| * remoteproc: set vring addresses in resource tableSjur Brændeland2013-04-071-2/+17
| | | | | | | | | | | | | | | | | | | | Set the vring addresses in the resource table so that the remote device can read the actual addresses used. Signed-off-by: Sjur Brændeland <sjur.brandeland@stericsson.com> Acked-by: Ido Yariv <ido@wizery.com> [rebase] Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com>
| * remoteproc: support virtio config space.Sjur Brændeland2013-04-072-18/+64
| | | | | | | | | | | | | | | | | | | | Support virtio configuration space and device status. The virtio device can now access the resource table in shared memory. Signed-off-by: Sjur Brændeland <sjur.brandeland@stericsson.com> Acked-by: Ido Yariv <ido@wizery.com> [rebase and style changes] Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com>
| * remoteproc: perserve resource table dataOhad Ben-Cohen2013-04-072-20/+79
| | | | | | | | | | | | | | | | | | | | | | Copy resource table from first to second firmware loading. After firmware is loaded to memory, update the vdevs resource pointer to the resource table kept in device memory. Signed-off-by: Sjur Brændeland <sjur.brandeland@stericsson.com> Acked-by: Ido Yariv <ido@wizery.com> [rebase, terminology and style changes] Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com>
| * remoteproc: calculate max_notifyid by counting vringsSjur Brændeland2013-04-072-16/+19
| | | | | | | | | | | | | | | | | | | | Simplify handling of max_notifyid by simply counting the number of vrings. Signed-off-by: Sjur Brændeland <sjur.brandeland@stericsson.com> Acked-by: Ido Yariv <ido@wizery.com> [small terminology changes] Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com>
| * remoteproc: code cleanup of resource parsingSjur Brændeland2013-04-051-40/+12
| | | | | | | | | | | | | | | | | | | | Combine the almost identical functions rproc_handle_virtio_rsc and rproc_handle_boot_rsc. Signed-off-by: Sjur Brændeland <sjur.brandeland@stericsson.com> Acked-by: Ido Yariv <ido@wizery.com> [small terminology and style changes] Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com>
| * remoteproc: parse STE-firmware and find resource table addressSjur Brændeland2013-04-051-14/+29
| | | | | | | | | | | | | | | | | | Parse the STE firmware and scan the TOC-table to find the address of the loaded resource table. Signed-off-by: Sjur Brændeland <sjur.brandeland@stericsson.com> [rebase patch; update terminology] Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com>
| * remoteproc: add find_loaded_rsc_table firmware opsSjur Brændeland2013-04-052-1/+39
| | | | | | | | | | | | | | | | | | | | | | | | Add function find_loaded_rsc_table to firmware ops. This function returns the location of the resource table in shared memory after loading. Signed-off-by: Sjur Brændeland <sjur.brandeland@stericsson.com> Acked-by: Ido Yariv <ido@wizery.com> [align function name with existing terminology, update commit log] [document new function, rebase patch, small cleanups] Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com>
| * remoteproc: refactor rproc_elf_find_rsc_table()Sjur Brændeland2013-04-051-29/+46
| | | | | | | | | | | | | | | | | | | | | | Refactor rproc_elf_find_rsc_table() and split out the scanning for the section header named resource table. This is done to prepare for loading firmware once. Signed-off-by: Sjur Brændeland <sjur.brandeland@stericsson.com> Acked-by: Ido Yariv <ido@wizery.com> [small function name change to make the code easier to read] Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com>
* | Merge branch 'for-linus' of ↵Linus Torvalds2013-04-301-1/+1
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial Pull trivial tree updates from Jiri Kosina: "Usual stuff, mostly comment fixes, typo fixes, printk fixes and small code cleanups" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (45 commits) mm: Convert print_symbol to %pSR gfs2: Convert print_symbol to %pSR m32r: Convert print_symbol to %pSR iostats.txt: add easy-to-find description for field 6 x86 cmpxchg.h: fix wrong comment treewide: Fix typo in printk and comments doc: devicetree: Fix various typos docbook: fix 8250 naming in device-drivers pata_pdc2027x: Fix compiler warning treewide: Fix typo in printks mei: Fix comments in drivers/misc/mei treewide: Fix typos in kernel messages pm44xx: Fix comment for "CONFIG_CPU_IDLE" doc: Fix typo "CONFIG_CGROUP_CGROUP_MEMCG_SWAP" mmzone: correct "pags" to "pages" in comment. kernel-parameters: remove outdated 'noresidual' parameter Remove spurious _H suffixes from ifdef comments sound: Remove stray pluses from Kconfig file radio-shark: Fix printk "CONFIG_LED_CLASS" doc: put proper reference to CONFIG_MODULE_SIG_ENFORCE ...
| * | treewide: Fix typo in printk and commentsMasanari Iida2013-04-241-1/+1
| |/ | | | | | | | | | | | | Fix typo in printk and comments within various drivers. Signed-off-by: Masanari Iida <standby24x7@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
* | remoteproc: fix FW_CONFIG typoRobert Tivy2013-04-071-1/+1
| | | | | | | | | | | | | | | | | | | | Fix obvious typo introduced in commit e121aefa7d9f10eee5cf26ed47129237a05d940b ("remoteproc: fix missing CONFIG_FW_LOADER configurations"). Cc: stable@vger.kernel.org Signed-off-by: Robert Tivy <rtivy@ti.com> [cc stable, slight subject change] Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com>
* | remoteproc: fix error path of handle_vdevSjur Brændeland2013-04-051-1/+3
| | | | | | | | | | | | | | | | | | | | | | 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 <sjur.brandeland@stericsson.com> Acked-by: Ido Yariv <ido@wizery.com> [edit subject, minor commit log edit, cc stable] Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com>
* | remoteproc/ste: fix memory leak on shutdownDmitry Tarnyagin2013-04-051-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | Fixes coherent memory leakage, caused by non-deallocated firmware image chunk. Cc: stable@vger.kernel.org Signed-off-by: Dmitry Tarnyagin <dmitry.tarnyagin@stericsson.com> Signed-off-by: Sjur Brændeland <sjur.brandeland@stericsson.com> Acked-by: Ido Yariv <ido@wizery.com> [slightly edit subject and commit log] Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com>
* | remoteproc: fix the error check for idr_allocSuman Anna2013-04-051-1/+1
|/ | | | | | | | | | | 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 <s-anna@ti.com> Acked-by: Tejun Heo <tj@kernel.org> Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com>
* remoteproc: convert to idr_alloc()Tejun Heo2013-02-271-7/+3
| | | | | | | | | Convert to the much saner new idr interface. Signed-off-by: Tejun Heo <tj@kernel.org> Cc: Ohad Ben-Cohen <ohad@wizery.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* remoteproc: don't use idr_remove_all()Tejun Heo2013-02-271-1/+0
| | | | | | | | | | idr_destroy() can destroy idr by itself and idr_remove_all() is being deprecated. Drop its usage. Signed-off-by: Tejun Heo <tj@kernel.org> Cc: Ohad Ben-Cohen <ohad@wizery.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* Merge tag 'virtio-next-for-linus' of ↵Linus Torvalds2013-02-261-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux 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.
| * virtio: make config_ops constStephen Hemminger2013-02-111-1/+1
| | | | | | | | | | | | | | | | It is just a table of function pointers, make it const for cleanliness and security reasons. Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* | Merge tag 'multiplatform' of ↵Linus Torvalds2013-02-211-1/+1
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc 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
| * | remoteproc: omap: depend on OMAP_MBOX_FWKArnd Bergmann2013-02-151-1/+1
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 <arnd@arndb.de> Acked-by: Tony Lindgren <tony@atomide.com> Acked-by: Ohad Ben-Cohen <ohad@wizery.com>
* | drivers/remoteproc: remove depends on CONFIG_EXPERIMENTALKees Cook2013-01-211-4/+1
|/ | | | | | | | | | 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 <ohad@wizery.com> Signed-off-by: Kees Cook <keescook@chromium.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Drivers: misc: remove __dev* attributes.Greg Kroah-Hartman2013-01-031-3/+3
| | | | | | | | | | | | | | 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 <wfp5p@virginia.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Merge branch 'for-linus' of ↵Linus Torvalds2012-12-131-2/+2
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 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 ...
| * treewide: Fix typos in various driversMasanari Iida2012-12-031-2/+2
| | | | | | | | | | | | | | Fix typos in printk within various drivers. Signed-off-by: Masanari Iida <standby24x7@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
* | remoteproc: fix error path of ->find_vqsOhad Ben-Cohen2012-11-291-6/+12
|/ | | | | | | | Eliminate an erroneous invocation of rproc_shutdown inside the error path of rproc_virtio_find_vqs. Reported-by: Ido Yariv <ido@wizery.com> Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com>
* Merge branch 'virtio-next' of ↵Linus Torvalds2012-10-071-1/+4
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux 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 ...
| * virtio: support reserved vqsMichael S. Tsirkin2012-09-281-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 <mst@redhat.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
| * virtio-ring: move queue_index to vring_virtqueueJason Wang2012-09-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | 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 <jasowang@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* | Merge tag 'remoteproc-for-3.7' of ↵Linus Torvalds2012-10-047-42/+593
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/ohad/remoteproc 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
| * | remoteproc: Fix use of format specifyerEmil Goode2012-10-021-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 <emilgoode@gmail.com> [fix commit log typos] Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com>
| * | remoteproc: fix a potential NULL-dereference on cleanupDan Carpenter2012-10-021-11/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 <dan.carpenter@oracle.com> [ohad: revise commit log] Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com>
| * | remoteproc: select VIRTIO to avoid build breakageOhad Ben-Cohen2012-10-021-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 <rdunlap@xenotime.net> Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com>
| * | remoteproc: return -EFAULT on copy_from_user failureDan Carpenter2012-09-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | copy_from_user() returns the number of bytes remaining to be copied, but we want to return an error code here. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com>
| * | remoteproc: snprintf() can return more than was printedDan Carpenter2012-09-301-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | snprintf() returns the number of characters which would have been printed if there were enough space. For example, on the first print if we fill up the 28 character string then it would return a number more than 30. Use scnprintf() instead because that returns the actual number of characters printed. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com>
| * | remoteproc: Add STE modem driverSjur Brændeland2012-09-223-0/+334
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 <sjur.brandeland@stericsson.com> cc: Linus Walleij <linus.walleij@linaro.org> cc: Alan Cox <alan@lxorguk.ukuu.org.uk> [ohad: validate mdev->ops, move setup() to probe/remove, trivial style changes] Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com>
| * | remtoteproc: maintain max notifyidSjur Brændeland2012-09-181-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 <sjur.brandeland@stericsson.com> [ohad: rebase, slightly edit commit log] Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com>
| * | remoteproc: create a 'recovery' debugfs entryFernando Guzman Lugo2012-09-182-1/+83
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 > <debugfs>/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 > <debugfs>/remoteproc/remoteproc0/recovery - enabling recovery: $ echo enabled > <debugfs>/remoteproc/remoteproc0/recovery Signed-off-by: Fernando Guzman Lugo <fernando.lugo@ti.com> [ohad: some white space, commentary and commit log changes] Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com>
| * | remoteproc: add actual recovery implementationFernando Guzman Lugo2012-09-182-22/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 <fernando.lugo@ti.com> [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 <ohad@wizery.com>
OpenPOWER on IntegriCloud