diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-12-11 15:20:31 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-12-11 15:20:31 -0500 |
commit | 6b9e2cea428cf7af93a84bcb865e478d8bf1c165 (patch) | |
tree | 11be387e37129fce0c4c111803df1a2e56637b60 /drivers/remoteproc | |
parent | 14ba9a2e4bacc6f5a0dbe0de5390daedd544508f (diff) | |
parent | f01a2a811ae04124fc9382925038fcbbd2f0b7c8 (diff) |
Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost
Pull virtio updates from Michael Tsirkin:
"virtio: virtio 1.0 support, misc patches
This adds a lot of infrastructure for virtio 1.0 support. Notable
missing pieces: virtio pci, virtio balloon (needs spec extension),
vhost scsi.
Plus, there are some minor fixes in a couple of places.
Note: some net drivers are affected by these patches. David said he's
fine with merging these patches through my tree.
Rusty's on vacation, he acked using my tree for these, too"
* tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost: (70 commits)
virtio_ccw: finalize_features error handling
virtio_ccw: future-proof finalize_features
virtio_pci: rename virtio_pci -> virtio_pci_common
virtio_pci: update file descriptions and copyright
virtio_pci: split out legacy device support
virtio_pci: setup config vector indirectly
virtio_pci: setup vqs indirectly
virtio_pci: delete vqs indirectly
virtio_pci: use priv for vq notification
virtio_pci: free up vq->priv
virtio_pci: fix coding style for structs
virtio_pci: add isr field
virtio: drop legacy_only driver flag
virtio_balloon: drop legacy_only driver flag
virtio_ccw: rev 1 devices set VIRTIO_F_VERSION_1
virtio: allow finalize_features to fail
virtio_ccw: legacy: don't negotiate rev 1/features
virtio: add API to detect legacy devices
virtio_console: fix sparse warnings
vhost: remove unnecessary forward declarations in vhost.h
...
Diffstat (limited to 'drivers/remoteproc')
-rw-r--r-- | drivers/remoteproc/remoteproc_virtio.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/drivers/remoteproc/remoteproc_virtio.c b/drivers/remoteproc/remoteproc_virtio.c index a34b50690b4e..e1a10232a943 100644 --- a/drivers/remoteproc/remoteproc_virtio.c +++ b/drivers/remoteproc/remoteproc_virtio.c | |||
@@ -207,7 +207,7 @@ static void rproc_virtio_reset(struct virtio_device *vdev) | |||
207 | } | 207 | } |
208 | 208 | ||
209 | /* provide the vdev features as retrieved from the firmware */ | 209 | /* provide the vdev features as retrieved from the firmware */ |
210 | static u32 rproc_virtio_get_features(struct virtio_device *vdev) | 210 | static u64 rproc_virtio_get_features(struct virtio_device *vdev) |
211 | { | 211 | { |
212 | struct rproc_vdev *rvdev = vdev_to_rvdev(vdev); | 212 | struct rproc_vdev *rvdev = vdev_to_rvdev(vdev); |
213 | struct fw_rsc_vdev *rsc; | 213 | struct fw_rsc_vdev *rsc; |
@@ -217,7 +217,7 @@ static u32 rproc_virtio_get_features(struct virtio_device *vdev) | |||
217 | return rsc->dfeatures; | 217 | return rsc->dfeatures; |
218 | } | 218 | } |
219 | 219 | ||
220 | static void rproc_virtio_finalize_features(struct virtio_device *vdev) | 220 | static int rproc_virtio_finalize_features(struct virtio_device *vdev) |
221 | { | 221 | { |
222 | struct rproc_vdev *rvdev = vdev_to_rvdev(vdev); | 222 | struct rproc_vdev *rvdev = vdev_to_rvdev(vdev); |
223 | struct fw_rsc_vdev *rsc; | 223 | struct fw_rsc_vdev *rsc; |
@@ -227,11 +227,16 @@ static void rproc_virtio_finalize_features(struct virtio_device *vdev) | |||
227 | /* Give virtio_ring a chance to accept features */ | 227 | /* Give virtio_ring a chance to accept features */ |
228 | vring_transport_features(vdev); | 228 | vring_transport_features(vdev); |
229 | 229 | ||
230 | /* Make sure we don't have any features > 32 bits! */ | ||
231 | BUG_ON((u32)vdev->features != vdev->features); | ||
232 | |||
230 | /* | 233 | /* |
231 | * Remember the finalized features of our vdev, and provide it | 234 | * Remember the finalized features of our vdev, and provide it |
232 | * to the remote processor once it is powered on. | 235 | * to the remote processor once it is powered on. |
233 | */ | 236 | */ |
234 | rsc->gfeatures = vdev->features[0]; | 237 | rsc->gfeatures = vdev->features; |
238 | |||
239 | return 0; | ||
235 | } | 240 | } |
236 | 241 | ||
237 | static void rproc_virtio_get(struct virtio_device *vdev, unsigned offset, | 242 | static void rproc_virtio_get(struct virtio_device *vdev, unsigned offset, |