diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2016-03-20 16:28:18 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-03-20 16:28:18 -0400 |
commit | f0691533b756931089902464ca15afc218a49d70 (patch) | |
tree | 7d72b43866be5ae5507efb9c2976059d5d5cc0f1 /arch/alpha | |
parent | 2b2f72d8ce59acce95ceb156f0f31b848e32e6d4 (diff) | |
parent | c67f5db82027ba6d2ea4ac9176bc45996a03ae6a (diff) |
Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost
Pull virtio/vhost updates from Michael Tsirkin:
"New features, performance improvements, cleanups:
- basic polling support for vhost
- rework virtio to optionally use DMA API, fixing it on Xen
- balloon stats gained a new entry
- using the new napi_alloc_skb speeds up virtio net
- virtio blk stats can now be read while another VCPU is busy
inflating or deflating the balloon
plus misc cleanups in various places"
* tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost:
virtio_net: replace netdev_alloc_skb_ip_align() with napi_alloc_skb()
vhost_net: basic polling support
vhost: introduce vhost_vq_avail_empty()
vhost: introduce vhost_has_work()
virtio_balloon: Allow to resize and update the balloon stats in parallel
virtio_balloon: Use a workqueue instead of "vballoon" kthread
virtio/s390: size of SET_IND payload
virtio/s390: use dev_to_virtio
vhost: rename vhost_init_used()
vhost: rename cross-endian helpers
virtio_blk: VIRTIO_BLK_F_WCE->VIRTIO_BLK_F_FLUSH
vring: Use the DMA API on Xen
virtio_pci: Use the DMA API if enabled
virtio_mmio: Use the DMA API if enabled
virtio: Add improved queue allocation API
virtio_ring: Support DMA APIs
vring: Introduce vring_use_dma_api()
s390/dma: Allow per device dma ops
alpha/dma: use common noop dma ops
dma: Provide simple noop dma ops
Diffstat (limited to 'arch/alpha')
-rw-r--r-- | arch/alpha/kernel/pci-noop.c | 46 |
1 files changed, 4 insertions, 42 deletions
diff --git a/arch/alpha/kernel/pci-noop.c b/arch/alpha/kernel/pci-noop.c index 2b1f4a1e9272..8e735b5e56bd 100644 --- a/arch/alpha/kernel/pci-noop.c +++ b/arch/alpha/kernel/pci-noop.c | |||
@@ -123,44 +123,6 @@ static void *alpha_noop_alloc_coherent(struct device *dev, size_t size, | |||
123 | return ret; | 123 | return ret; |
124 | } | 124 | } |
125 | 125 | ||
126 | static void alpha_noop_free_coherent(struct device *dev, size_t size, | ||
127 | void *cpu_addr, dma_addr_t dma_addr, | ||
128 | struct dma_attrs *attrs) | ||
129 | { | ||
130 | free_pages((unsigned long)cpu_addr, get_order(size)); | ||
131 | } | ||
132 | |||
133 | static dma_addr_t alpha_noop_map_page(struct device *dev, struct page *page, | ||
134 | unsigned long offset, size_t size, | ||
135 | enum dma_data_direction dir, | ||
136 | struct dma_attrs *attrs) | ||
137 | { | ||
138 | return page_to_pa(page) + offset; | ||
139 | } | ||
140 | |||
141 | static int alpha_noop_map_sg(struct device *dev, struct scatterlist *sgl, int nents, | ||
142 | enum dma_data_direction dir, struct dma_attrs *attrs) | ||
143 | { | ||
144 | int i; | ||
145 | struct scatterlist *sg; | ||
146 | |||
147 | for_each_sg(sgl, sg, nents, i) { | ||
148 | void *va; | ||
149 | |||
150 | BUG_ON(!sg_page(sg)); | ||
151 | va = sg_virt(sg); | ||
152 | sg_dma_address(sg) = (dma_addr_t)virt_to_phys(va); | ||
153 | sg_dma_len(sg) = sg->length; | ||
154 | } | ||
155 | |||
156 | return nents; | ||
157 | } | ||
158 | |||
159 | static int alpha_noop_mapping_error(struct device *dev, dma_addr_t dma_addr) | ||
160 | { | ||
161 | return 0; | ||
162 | } | ||
163 | |||
164 | static int alpha_noop_supported(struct device *dev, u64 mask) | 126 | static int alpha_noop_supported(struct device *dev, u64 mask) |
165 | { | 127 | { |
166 | return mask < 0x00ffffffUL ? 0 : 1; | 128 | return mask < 0x00ffffffUL ? 0 : 1; |
@@ -168,10 +130,10 @@ static int alpha_noop_supported(struct device *dev, u64 mask) | |||
168 | 130 | ||
169 | struct dma_map_ops alpha_noop_ops = { | 131 | struct dma_map_ops alpha_noop_ops = { |
170 | .alloc = alpha_noop_alloc_coherent, | 132 | .alloc = alpha_noop_alloc_coherent, |
171 | .free = alpha_noop_free_coherent, | 133 | .free = dma_noop_free_coherent, |
172 | .map_page = alpha_noop_map_page, | 134 | .map_page = dma_noop_map_page, |
173 | .map_sg = alpha_noop_map_sg, | 135 | .map_sg = dma_noop_map_sg, |
174 | .mapping_error = alpha_noop_mapping_error, | 136 | .mapping_error = dma_noop_mapping_error, |
175 | .dma_supported = alpha_noop_supported, | 137 | .dma_supported = alpha_noop_supported, |
176 | }; | 138 | }; |
177 | 139 | ||