Displaying 20 results from an estimated 31 matches for "pci_unmap_pag".
Did you mean:
pci_unmap_page
2014 Jul 10
3
[PATCH v4 2/6] drm/nouveau: map pages using DMA API on platform devices
...PAGE_SIZE, DMA_BIDIRECTIONAL);
> + if (dma_mapping_error(&device->platformdev->dev, ret))
> + ret = 0;
> }
>
> return ret;
> @@ -501,6 +504,9 @@ nv_device_unmap_page(struct nouveau_device *device, dma_addr_t addr)
> if (nv_device_is_pci(device))
> pci_unmap_page(device->pdev, addr, PAGE_SIZE,
> PCI_DMA_BIDIRECTIONAL);
pci_map/unmap alias to dma_unmap/map when called on the underlying struct
device embedded in pci_device (like for platform drivers). Dunno whether
it's worth to track a pointer to the struct device directly and always
c...
2014 Jul 31
2
[PATCH v5] drm/nouveau: map pages using DMA API
...ed flags)
{
return 0;
@@ -696,13 +696,13 @@ pci_map_page(struct pci_dev *pdev, struct page *page, int offset,
static inline bool
-pci_dma_mapping_error(struct pci_dev *pdev, dma_addr_t addr)
+dma_mapping_error(struct device *pdev, dma_addr_t addr)
{
return true;
}
static inline void
-pci_unmap_page(struct pci_dev *pdev, dma_addr_t addr, int size, unsigned flags)
+dma_unmap_page(struct device *pdev, dma_addr_t addr, int size, unsigned flags)
{
}
diff --git a/nvkm/engine/device/base.c b/nvkm/engine/device/base.c
index 466dda2f7a3a..6c16dabe13b3 100644
--- a/nvkm/engine/device/base.c
+++ b/...
2009 Jan 27
5
[PATCH 2/2] Add VMDq support to ixgbe
...-
+#ifdef CONFIG_XEN_NETDEV2_BACKEND
+ if(!rx_ring->queue_index || !skb_shinfo(skb)->nr_frags) {
+ prefetch(skb->data - NET_IP_ALIGN);
+ } else {
+ /* for Xen VMDq, packet data goes in first page of
+ * skb, instead of data.
+ */
+ // TODO this is broke for jumbos > 4k
+ pci_unmap_page(pdev, rx_buffer_info->dma,
+ PAGE_SIZE, PCI_DMA_FROMDEVICE);
+ skb->len += len;
+ skb_shinfo(skb)->frags[0].size = len;
+ }
+#else
+ prefetch(skb->data - NET_IP_ALIGN);
+#endif
if (len && !skb_shinfo(skb)->nr_frags) {
pci_unmap_single(pdev, rx_b...
2014 Aug 04
0
[PATCH v5] drm/nouveau: map pages using DMA API
...page(struct pci_dev *pdev, struct page *page, int offset,
>
>
> static inline bool
> -pci_dma_mapping_error(struct pci_dev *pdev, dma_addr_t addr)
> +dma_mapping_error(struct device *pdev, dma_addr_t addr)
> {
> return true;
> }
>
> static inline void
> -pci_unmap_page(struct pci_dev *pdev, dma_addr_t addr, int size, unsigned flags)
> +dma_unmap_page(struct device *pdev, dma_addr_t addr, int size, unsigned flags)
> {
> }
>
> diff --git a/nvkm/engine/device/base.c b/nvkm/engine/device/base.c
> index 466dda2f7a3a..6c16dabe13b3 100644
> ---...
2014 Feb 01
0
[RFC 02/16] drm/nouveau: basic support for platform devices
...ev, page, 0, PAGE_SIZE,
+ PCI_DMA_BIDIRECTIONAL);
+ if (pci_dma_mapping_error(device->pdev, ret))
+ ret = 0;
+ } else {
+ ret = page_to_phys(page);
+ }
+
+ return ret;
+}
+
+void
+nv_device_unmap_page(struct nouveau_device *device, dma_addr_t addr)
+{
+ if (nv_device_is_pci(device))
+ pci_unmap_page(device->pdev, addr, PAGE_SIZE,
+ PCI_DMA_BIDIRECTIONAL);
+}
+
static struct nouveau_oclass
nouveau_device_oclass = {
.handle = NV_ENGINE(DEVICE, 0x00),
diff --git a/drivers/gpu/drm/nouveau/core/include/core/device.h b/drivers/gpu/drm/nouveau/core/include/core/device.h
index 7b8ea22...
2009 Feb 10
1
[PATCH 1/2] Fix ixgbe RSS operation
...etdev);
@@ -2907,7 +2905,8 @@
rx_buffer_info = &rx_ring->rx_buffer_info[i];
if (rx_buffer_info->skb) {
#ifdef CONFIG_XEN_NETDEV2_BACKEND
- if (rx_ring->queue_index) {
+ if ((adapter->flags & IXGBE_FLAG_VMDQ_ENABLED) &&
+ rx_ring->queue_index) {
pci_unmap_page(pdev, rx_buffer_info->dma,
PAGE_SIZE,
PCI_DMA_FROMDEVICE);
diff -r fcc044a90d40 drivers/net/ixgbe/ixgbe_param.c
--- a/drivers/net/ixgbe/ixgbe_param.c Thu Jan 29 10:46:35 2009 +0000
+++ b/drivers/net/ixgbe/ixgbe_param.c Tue Feb 10 10:13:32 2009 -0800
@@ -7...
2013 Aug 23
1
[PATCH] VMXNET3: Add support for virtual IOMMU
...x_buf_info *tbi,
struct pci_dev *pdev)
{
if (tbi->map_type == VMXNET3_MAP_SINGLE)
- pci_unmap_single(pdev, tbi->dma_addr, tbi->len,
+ dma_unmap_single(&pdev->dev, tbi->dma_addr, tbi->len,
PCI_DMA_TODEVICE);
else if (tbi->map_type == VMXNET3_MAP_PAGE)
- pci_unmap_page(pdev, tbi->dma_addr, tbi->len,
+ dma_unmap_page(&pdev->dev, tbi->dma_addr, tbi->len,
PCI_DMA_TODEVICE);
else
BUG_ON(tbi->map_type != VMXNET3_MAP_NONE);
@@ -429,25 +429,29 @@ vmxnet3_tq_destroy(struct vmxnet3_tx_queue *tq,
struct vmxnet3_adapter *adapter...
2013 Aug 23
1
[PATCH] VMXNET3: Add support for virtual IOMMU
...x_buf_info *tbi,
struct pci_dev *pdev)
{
if (tbi->map_type == VMXNET3_MAP_SINGLE)
- pci_unmap_single(pdev, tbi->dma_addr, tbi->len,
+ dma_unmap_single(&pdev->dev, tbi->dma_addr, tbi->len,
PCI_DMA_TODEVICE);
else if (tbi->map_type == VMXNET3_MAP_PAGE)
- pci_unmap_page(pdev, tbi->dma_addr, tbi->len,
+ dma_unmap_page(&pdev->dev, tbi->dma_addr, tbi->len,
PCI_DMA_TODEVICE);
else
BUG_ON(tbi->map_type != VMXNET3_MAP_NONE);
@@ -429,25 +429,29 @@ vmxnet3_tq_destroy(struct vmxnet3_tx_queue *tq,
struct vmxnet3_adapter *adapter...
2014 Jul 11
2
[PATCH v4 2/6] drm/nouveau: map pages using DMA API on platform devices
...t; + ret = 0;
>>> }
>>>
>>> return ret;
>>> @@ -501,6 +504,9 @@ nv_device_unmap_page(struct nouveau_device *device,
>>> dma_addr_t addr)
>>> if (nv_device_is_pci(device))
>>> pci_unmap_page(device->pdev, addr, PAGE_SIZE,
>>> PCI_DMA_BIDIRECTIONAL);
>>
>>
>> pci_map/unmap alias to dma_unmap/map when called on the underlying struct
>> device embedded in pci_device (like for platform drivers). Dunno whether
>> it...
2014 Feb 01
0
[RFC 09/16] drm/nouveau/fb: support platform devices
...core/subdev/fb/nvc0.c
index 45470e1..0670ae3 100644
--- a/drivers/gpu/drm/nouveau/core/subdev/fb/nvc0.c
+++ b/drivers/gpu/drm/nouveau/core/subdev/fb/nvc0.c
@@ -70,8 +70,7 @@ nvc0_fb_dtor(struct nouveau_object *object)
struct nvc0_fb_priv *priv = (void *)object;
if (priv->r100c10_page) {
- pci_unmap_page(device->pdev, priv->r100c10, PAGE_SIZE,
- PCI_DMA_BIDIRECTIONAL);
+ nv_device_unmap_page(device, priv->r100c10);
__free_page(priv->r100c10_page);
}
@@ -94,10 +93,8 @@ nvc0_fb_ctor(struct nouveau_object *parent, struct nouveau_object *engine,
priv->r100c10_page =...
2014 Jul 08
0
[PATCH v4 2/6] drm/nouveau: map pages using DMA API on platform devices
...e->platformdev->dev, page, 0,
+ PAGE_SIZE, DMA_BIDIRECTIONAL);
+ if (dma_mapping_error(&device->platformdev->dev, ret))
+ ret = 0;
}
return ret;
@@ -501,6 +504,9 @@ nv_device_unmap_page(struct nouveau_device *device, dma_addr_t addr)
if (nv_device_is_pci(device))
pci_unmap_page(device->pdev, addr, PAGE_SIZE,
PCI_DMA_BIDIRECTIONAL);
+ else
+ dma_unmap_page(&device->platformdev->dev, addr,
+ PAGE_SIZE, DMA_BIDIRECTIONAL);
}
int
--
2.0.0
2014 Feb 12
0
[PATCH v2] drm/nouveau: support for platform devices
...ev, page, 0, PAGE_SIZE,
+ PCI_DMA_BIDIRECTIONAL);
+ if (pci_dma_mapping_error(device->pdev, ret))
+ ret = 0;
+ } else {
+ ret = page_to_phys(page);
+ }
+
+ return ret;
+}
+
+void
+nv_device_unmap_page(struct nouveau_device *device, dma_addr_t addr)
+{
+ if (nv_device_is_pci(device))
+ pci_unmap_page(device->pdev, addr, PAGE_SIZE,
+ PCI_DMA_BIDIRECTIONAL);
+}
+
+int
+nv_device_get_irq(struct nouveau_device *device, bool stall)
+{
+ if (nv_device_is_pci(device)) {
+ return device->pdev->irq;
+ } else {
+ return platform_get_irq_byname(device->platformdev,
+ sta...
2014 Jul 11
0
[PATCH v4 2/6] drm/nouveau: map pages using DMA API on platform devices
...>> + if (dma_mapping_error(&device->platformdev->dev, ret))
>> + ret = 0;
>> }
>>
>> return ret;
>> @@ -501,6 +504,9 @@ nv_device_unmap_page(struct nouveau_device *device, dma_addr_t addr)
>> if (nv_device_is_pci(device))
>> pci_unmap_page(device->pdev, addr, PAGE_SIZE,
>> PCI_DMA_BIDIRECTIONAL);
>
> pci_map/unmap alias to dma_unmap/map when called on the underlying struct
> device embedded in pci_device (like for platform drivers). Dunno whether
> it's worth to track a pointer to the struct devi...
2009 Feb 10
3
[PATCH 2/2] Use correct config option for ixgbe VMDq
...void ixgbe_clean_rx_ring(struct i
rx_buffer_info = &rx_ring->rx_buffer_info[i];
if (rx_buffer_info->skb) {
-#ifdef CONFIG_XEN_NETDEV2_BACKEND
+#ifdef CONFIG_XEN_NETDEV2_VMQ
if ((adapter->flags & IXGBE_FLAG_VMDQ_ENABLED) &&
rx_ring->queue_index) {
pci_unmap_page(pdev, rx_buffer_info->dma,
@@ -3870,7 +3870,7 @@ int ixgbe_setup_rx_resources(struct ixgb
rx_ring->work_limit = rx_ring->count / 2;
#endif
-#ifdef CONFIG_XEN_NETDEV2_BACKEND
+#ifdef CONFIG_XEN_NETDEV2_VMQ
if ((adapter->flags & IXGBE_FLAG_VMDQ_ENABLED) &&
rx_rin...
2014 Jul 11
0
[PATCH v4 2/6] drm/nouveau: map pages using DMA API on platform devices
...0;
>>>> }
>>>>
>>>> return ret;
>>>> @@ -501,6 +504,9 @@ nv_device_unmap_page(struct nouveau_device *device,
>>>> dma_addr_t addr)
>>>> if (nv_device_is_pci(device))
>>>> pci_unmap_page(device->pdev, addr, PAGE_SIZE,
>>>> PCI_DMA_BIDIRECTIONAL);
>>>
>>>
>>> pci_map/unmap alias to dma_unmap/map when called on the underlying struct
>>> device embedded in pci_device (like for platform drivers). Dunno...
2014 Feb 12
2
[PATCH v2] drm/nouveau: support for platform devices
On 12/02/14 05:38, Alexandre Courbot wrote:
> Upcoming mobile Kepler GPUs (such as GK20A) use the platform bus instead
> of PCI to which Nouveau is tightly dependent. This patch allows Nouveau
> to handle platform devices by:
>
> - abstracting PCI-dependent functions that were typically used for
> resource querying and page mapping,
> - introducing a nv_device_is_pci()
2014 Feb 11
2
[PATCH] drm/nouveau: support for platform devices
On Mon, Feb 10, 2014 at 8:50 PM, Thierry Reding
<thierry.reding at gmail.com> wrote:
> On Mon, Feb 10, 2014 at 02:53:00PM +0900, Alexandre Courbot wrote:
> [...]
>> diff --git a/drivers/gpu/drm/nouveau/core/engine/device/base.c b/drivers/gpu/drm/nouveau/core/engine/device/base.c
> [...]
>> +resource_size_t
>> +nv_device_resource_start(struct nouveau_device *device,
2014 Feb 10
2
[PATCH] drm/nouveau: support for platform devices
...ev, page, 0, PAGE_SIZE,
+ PCI_DMA_BIDIRECTIONAL);
+ if (pci_dma_mapping_error(device->pdev, ret))
+ ret = 0;
+ } else {
+ ret = page_to_phys(page);
+ }
+
+ return ret;
+}
+
+void
+nv_device_unmap_page(struct nouveau_device *device, dma_addr_t addr)
+{
+ if (nv_device_is_pci(device))
+ pci_unmap_page(device->pdev, addr, PAGE_SIZE,
+ PCI_DMA_BIDIRECTIONAL);
+}
+
+int
+nv_device_get_irq(struct nouveau_device *device, bool stall)
+{
+ if (nv_device_is_pci(device)) {
+ return device->pdev->irq;
+ } else {
+ return platform_get_irq_byname(device->platformdev,
+ sta...
2014 Jul 08
8
[PATCH v4 0/6] drm: nouveau: memory coherency on ARM
Another revision of this patchset critical for GK20A to operate.
Previous attempts were exclusively using either TTM's regular page allocator or
the DMA API one. Both have their advantages and drawbacks: the page allocator is
fast but requires explicit synchronization on non-coherent architectures,
whereas the DMA allocator always returns coherent memory, but is also slower,
creates a
2004 Apr 30
2
Can not compile zaptel at SuSE 9.0
...generic/pci-dma-compat.h:42: error: structure has no member
named `dev'
/usr/include/asm-generic/pci-dma-compat.h: In function `pci_map_page':
/usr/include/asm-generic/pci-dma-compat.h:49: error: structure has no member
named `dev'
/usr/include/asm-generic/pci-dma-compat.h: In function `pci_unmap_page':
/usr/include/asm-generic/pci-dma-compat.h:56: error: structure has no member
named `dev'
/usr/include/asm-generic/pci-dma-compat.h: In function `pci_map_sg':
/usr/include/asm-generic/pci-dma-compat.h:63: error: structure has no member
named `dev'
/usr/include/asm-generic/pci-dma-...