summaryrefslogtreecommitdiffstats
path: root/drivers/remoteproc
AgeCommit message (Collapse)AuthorFilesLines
2014-06-17remoteproc: da8xx: don't select CMA on no-MMUArnd Bergmann1-1/+1
We can only use CMA on systems that have an MMU, because of the requirement to use memory migration. NOMMU systems are rather constrained to start with, but it seems reasonable to assume that DMA allocations can still succeed in the constrained case for remoteproc on NOMMU, so this patch changes the da8xx implementation to not rely on CMA when the MMU is disabled. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Cc: Ohad Ben-Cohen <ohad@wizery.com> Cc: Robert Tivy <rtivy@ti.com>
2014-02-24remoteproc/ste_modem: staticize local symbolsJingoo Han1-2/+2
These local symbols are used only in this file. Fix the following sparse warnings: drivers/remoteproc/ste_modem_rproc.c:167:27: warning: symbol 'sproc_fw_ops' was not declared. Should it be static? drivers/remoteproc/ste_modem_rproc.c:196:25: warning: symbol 'sproc_dev_cb' was not declared. Should it be static? Signed-off-by: Jingoo Han <jg1.han@samsung.com> [standartize patch title] Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com>
2014-02-24remoteproc/davinci: simplify use of devm_ioremap_resourceJulia Lawall1-13/+1
Remove unneeded error handling on the result of a call to platform_get_resource when the value is passed to devm_ioremap_resource. Move the call to platform_get_resource adjacent to the call to devm_ioremap_resource to make the connection between them more clear. A simplified version of the semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ expression pdev,res,n,e,e1; expression ret != 0; identifier l; @@ - res = platform_get_resource(pdev, IORESOURCE_MEM, n); ... when != res - if (res == NULL) { ... \(goto l;\|return ret;\) } ... when != res + res = platform_get_resource(pdev, IORESOURCE_MEM, n); e = devm_ioremap_resource(e1, res); // </smpl> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> [simplify patch title] Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com>
2014-02-24remoteproc/davinci: drop needless devm_clk_putUwe Kleine-König1-2/+0
The comment above disable_irq says that it is needed to ensure that the "devm subsystem might end up releasing things before freeing the irq, thus allowing an interrupt to sneak in while the device is being removed." disable_irq is enough for this purpose and there is no need to manually free the reference to the clock. Cc: Robert Tivy <rtivy@ti.com> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> [moved the Cc line into the commit message] Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com>
2013-10-29virtio_ring: change host notification APIHeinz Graalfs1-1/+2
Currently a host kick error is silently ignored and not reflected in the virtqueue of a particular virtio device. Changing the notify API for guest->host notification seems to be one prerequisite in order to be able to handle such errors in the context where the kick is triggered. This patch changes the notify API. The notify function must return a bool return value. It returns false if the host notification failed. Signed-off-by: Heinz Graalfs <graalfs@linux.vnet.ibm.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2013-07-15remoteproc: don't use PTR_RET().Rusty Russell1-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>
2013-07-11Merge tag 'remoteproc-3.11-fixes' of ↵Linus Torvalds3-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()
2013-07-01remoteproc: Cocci spatch "memdup.spatch"Thomas Meyer1-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>
2013-07-01remoteproc: free carveout memories only after unmapping themSuman Anna1-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>
2013-06-30remoteproc: fix checkpatch errors in remoteproc codeSuman Anna2-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>
2013-06-30remoteproc: fix error return code in rproc_fw_boot()Wei Yongjun1-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>
2013-06-11mailbox/omap: move the OMAP mailbox framework to driversSuman Anna2-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>
2013-05-07Merge tag 'remoteproc-3.10' of ↵Linus Torvalds8-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()
2013-04-30Merge branch 'for-linus' of ↵Linus Torvalds1-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 ...
2013-04-24treewide: Fix typo in printk and commentsMasanari Iida1-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>
2013-04-21remoteproc: fix kconfig dependencies for VIRTIOSuman Anna1-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>
2013-04-15remoteproc/davinci: add a remoteproc driver for OMAP-L13x DSPRobert Tivy3-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>
2013-04-07remoteproc: support default firmware name in rproc_alloc()Robert Tivy1-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>
2013-04-07remoteproc: fix FW_CONFIG typoRobert Tivy1-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>
2013-04-07remoteproc/omap: support OMAP5 tooVincent Stehlé1-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>
2013-04-07remoteproc: set vring addresses in resource tableSjur Brændeland1-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>
2013-04-07remoteproc: support virtio config space.Sjur Brændeland2-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>
2013-04-07remoteproc: perserve resource table dataOhad Ben-Cohen2-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>
2013-04-07remoteproc: calculate max_notifyid by counting vringsSjur Brændeland2-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>
2013-04-05remoteproc: code cleanup of resource parsingSjur Brændeland1-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>
2013-04-05remoteproc: parse STE-firmware and find resource table addressSjur Brændeland1-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>
2013-04-05remoteproc: add find_loaded_rsc_table firmware opsSjur Brændeland2-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>
2013-04-05remoteproc: refactor rproc_elf_find_rsc_table()Sjur Brændeland1-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>
2013-04-05remoteproc: fix error path of handle_vdevSjur Brændeland1-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>
2013-04-05remoteproc/ste: fix memory leak on shutdownDmitry Tarnyagin1-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>
2013-04-05remoteproc: fix the error check for idr_allocSuman Anna1-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>
2013-02-27remoteproc: convert to idr_alloc()Tejun Heo1-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>
2013-02-27remoteproc: don't use idr_remove_all()Tejun Heo1-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>
2013-02-26Merge tag 'virtio-next-for-linus' of ↵Linus Torvalds1-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.
2013-02-21Merge tag 'multiplatform' of ↵Linus Torvalds1-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
2013-02-15remoteproc: omap: depend on OMAP_MBOX_FWKArnd Bergmann1-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>
2013-02-11virtio: make config_ops constStephen Hemminger1-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>
2013-01-21drivers/remoteproc: remove depends on CONFIG_EXPERIMENTALKees Cook1-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>
2013-01-03Drivers: misc: remove __dev* attributes.Greg Kroah-Hartman1-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>
2012-12-13Merge branch 'for-linus' of ↵Linus Torvalds1-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 ...
2012-12-03treewide: Fix typos in various driversMasanari Iida1-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>
2012-11-29remoteproc: fix error path of ->find_vqsOhad Ben-Cohen1-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>
2012-10-07Merge branch 'virtio-next' of ↵Linus Torvalds1-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 ...
2012-10-04Merge tag 'remoteproc-for-3.7' of ↵Linus Torvalds7-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
2012-10-02remoteproc: Fix use of format specifyerEmil Goode1-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>
2012-10-02remoteproc: fix a potential NULL-dereference on cleanupDan Carpenter1-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>
2012-10-02remoteproc: select VIRTIO to avoid build breakageOhad Ben-Cohen1-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>
2012-09-30remoteproc: return -EFAULT on copy_from_user failureDan Carpenter1-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>
2012-09-30remoteproc: snprintf() can return more than was printedDan Carpenter1-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>
2012-09-28virtio: support reserved vqsMichael S. Tsirkin1-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>