search for: iowrite32

Displaying 20 results from an estimated 269 matches for "iowrite32".

2014 Aug 27
2
[PATCH 3/3] virtio_pci: Use the DMA API for virtqueues
...size(num, VIRTIO_PCI_VRING_ALIGN); > + info->queue = dma_zalloc_coherent(vdev->dev.parent, size, > + &info->queue_dma_addr, GFP_KERNEL); > if (info->queue == NULL) { > err = -ENOMEM; > goto out_info; > } > > /* activate the queue */ > - iowrite32(virt_to_phys(info->queue) >> VIRTIO_PCI_QUEUE_ADDR_SHIFT, > + iowrite32(info->queue_dma_addr >> VIRTIO_PCI_QUEUE_ADDR_SHIFT, > vp_dev->ioaddr + VIRTIO_PCI_QUEUE_PFN); > > /* create the vring */ > @@ -462,7 +464,8 @@ out_assign: > vring_del_virtqueue...
2014 Aug 27
2
[PATCH 3/3] virtio_pci: Use the DMA API for virtqueues
...size(num, VIRTIO_PCI_VRING_ALIGN); > + info->queue = dma_zalloc_coherent(vdev->dev.parent, size, > + &info->queue_dma_addr, GFP_KERNEL); > if (info->queue == NULL) { > err = -ENOMEM; > goto out_info; > } > > /* activate the queue */ > - iowrite32(virt_to_phys(info->queue) >> VIRTIO_PCI_QUEUE_ADDR_SHIFT, > + iowrite32(info->queue_dma_addr >> VIRTIO_PCI_QUEUE_ADDR_SHIFT, > vp_dev->ioaddr + VIRTIO_PCI_QUEUE_PFN); > > /* create the vring */ > @@ -462,7 +464,8 @@ out_assign: > vring_del_virtqueue...
2016 Nov 09
1
[Bug 98654] New: kernel paging request at iowrite32
https://bugs.freedesktop.org/show_bug.cgi?id=98654 Bug ID: 98654 Summary: kernel paging request at iowrite32 Product: xorg Version: unspecified Hardware: Other OS: All Status: NEW Severity: normal Priority: medium Component: Driver/nouveau Assignee: nouveau at lists.freedesktop.org Reporter: german...
2015 Nov 22
0
nouveau: iowrite32 oops & warning at drivers/gpu/drm/nouveau/nouveau_fence.c:198
...timer+0x420/0x420 > [<ffffffff81334684>] SyS_ioctl+0x74/0x80 > [<ffffffff82f34ed7>] entry_SYSCALL_64_fastpath+0x12/0x6f > ---[ end trace 780046761495600a ]--- > > > > BUG: unable to handle kernel paging request at ffffc90001880000 > IP: [<ffffffff818d20be>] iowrite32+0x2e/0x40 > PGD 174f36067 PUD 174f37067 PMD 16a13b067 PTE 0 > Oops: 0002 [#1] SMP KASAN > CPU: 3 PID: 4638 Comm: trinity-c19 Tainted: G B W 4.4.0-rc1+ #1 > Hardware name: Dell Inc. OptiPlex 990/0D6H9T, BIOS A06 07/25/2011 > task: ffff8800ab8e1a00 ti: ffff8800ab6c0000 task....
2013 May 28
2
[RFC 7/11] virtio_pci: new, capability-aware driver.
...t;mst at redhat.com> wrote: > > > On Thu, Dec 08, 2011 at 09:09:33PM +1030, Rusty Russell wrote: > > > > +/* There is no iowrite64. We use two 32-bit ops. */ > > > > +static void iowrite64(u64 val, const __le64 *addr) > > > > +{ > > > > + iowrite32((u32)val, (__le32 *)addr); > > > > + iowrite32(val >> 32, (__le32 *)addr + 1); > > > > +} > > > > + > > > > > > Let's put addr_lo/addr_hi in the structure then, > > > to make the fact this field is not atomic explicit? > &...
2015 Nov 22
2
nouveau: iowrite32 oops & warning at drivers/gpu/drm/nouveau/nouveau_fence.c:198
...[<ffffffff811dbf60>] ? do_setitimer+0x420/0x420 [<ffffffff81334684>] SyS_ioctl+0x74/0x80 [<ffffffff82f34ed7>] entry_SYSCALL_64_fastpath+0x12/0x6f ---[ end trace 780046761495600a ]--- BUG: unable to handle kernel paging request at ffffc90001880000 IP: [<ffffffff818d20be>] iowrite32+0x2e/0x40 PGD 174f36067 PUD 174f37067 PMD 16a13b067 PTE 0 Oops: 0002 [#1] SMP KASAN CPU: 3 PID: 4638 Comm: trinity-c19 Tainted: G B W 4.4.0-rc1+ #1 Hardware name: Dell Inc. OptiPlex 990/0D6H9T, BIOS A06 07/25/2011 task: ffff8800ab8e1a00 ti: ffff8800ab6c0000 task.ti: ffff8800ab6c0000 RIP:...
2015 Feb 11
2
[RFC 0/2] virtio_pci: patches never to apply.
This should allow testing when QEMU gets VIRTIO_PCI_CAP_PCI_CFG support, but I'm pretty sure we should never allow these patches upstream. Tested with lguest (in virtio-next), which supports VIRTIO_PCI_CAP_PCI_CFG. Rusty Russell (2): virtio_pci: abstract all MMIO accesses. virtio: Introducing virtio_pci.no_mmio, the worst boot option in history. drivers/virtio/virtio_pci_common.c |
2015 Feb 11
2
[RFC 0/2] virtio_pci: patches never to apply.
This should allow testing when QEMU gets VIRTIO_PCI_CAP_PCI_CFG support, but I'm pretty sure we should never allow these patches upstream. Tested with lguest (in virtio-next), which supports VIRTIO_PCI_CAP_PCI_CFG. Rusty Russell (2): virtio_pci: abstract all MMIO accesses. virtio: Introducing virtio_pci.no_mmio, the worst boot option in history. drivers/virtio/virtio_pci_common.c |
2013 May 29
1
[RFC 7/11] virtio_pci: new, capability-aware driver.
...> > On Thu, Dec 08, 2011 at 09:09:33PM +1030, Rusty Russell wrote: > >> > > > +/* There is no iowrite64. We use two 32-bit ops. */ > >> > > > +static void iowrite64(u64 val, const __le64 *addr) > >> > > > +{ > >> > > > + iowrite32((u32)val, (__le32 *)addr); > >> > > > + iowrite32(val >> 32, (__le32 *)addr + 1); > >> > > > +} > >> > > > + > >> > > > >> > > Let's put addr_lo/addr_hi in the structure then, > >> > > to m...
2017 Feb 25
2
[Bug 99966] New: Crash of nouveau - cache related?
...xb209bfff], which spans more than PCI Bus 0000:01 [mem 0xa0000000-0xb1ffffff 64bit pref] [252778.055507] caller nv50_instobj_boot+0xac/0x120 [nouveau] mapping multiple BARs [252778.055567] BUG: unable to handle kernel paging request at ffffc90000cb0000 [252778.055591] IP: [<ffffffff8132026e>] iowrite32+0x2e/0x40 [252778.055605] PGD 153498067 [252778.055609] PUD 153499067 [252778.055615] PMD 1517b5067 [252778.055617] PTE 0 [252778.055626] Oops: 0002 [#1] PREEMPT SMP [252778.055636] Modules linked in: fuse ctr ccm snd_hda_codec_hdmi arc4 mousedev joydev nouveau iTCO_wdt iTCO_vendor_support snd_...
2007 Nov 10
1
[PATCH] virtio_pci updates
...{ + uint8_t *ptr = buf; + int i; + + for (i = 0; i < len; i++) + ptr[i] = ioread8(ioaddr + i); break; } + } } /* the config->set() implementation. it's symmetric to the config->get() @@ -169,10 +188,15 @@ static void vp_set(struct virtio_device *vdev, unsigned offset, iowrite32(val, ioaddr + 4); break; } - default: - iowrite8_rep(ioaddr, buf, len); + default: { + const uint8_t *ptr = buf; + int i; + + for (i = 0; i < len; i++) + iowrite8(ptr[i], ioaddr + i); break; } + } } /* config->{get,set}_status() implementations */ @@ -237,8 +261,8 @@ stati...
2007 Nov 10
1
[PATCH] virtio_pci updates
...{ + uint8_t *ptr = buf; + int i; + + for (i = 0; i < len; i++) + ptr[i] = ioread8(ioaddr + i); break; } + } } /* the config->set() implementation. it's symmetric to the config->get() @@ -169,10 +188,15 @@ static void vp_set(struct virtio_device *vdev, unsigned offset, iowrite32(val, ioaddr + 4); break; } - default: - iowrite8_rep(ioaddr, buf, len); + default: { + const uint8_t *ptr = buf; + int i; + + for (i = 0; i < len; i++) + iowrite8(ptr[i], ioaddr + i); break; } + } } /* config->{get,set}_status() implementations */ @@ -237,8 +261,8 @@ stati...
2015 Feb 15
3
[PATCH 1/2] virtio_pci_modern: type-safe io accessors
...} + +static inline u32 vp_ioread32(u32 __iomem *addr) +{ + return ioread32(addr); +} + +static inline void vp_iowrite8(u8 value, u8 __iomem *addr) +{ + iowrite8(value, addr); +} + +static inline void vp_iowrite16(u16 value, u16 __iomem *addr) +{ + iowrite16(value, addr); +} + +static inline void vp_iowrite32(u32 value, u32 __iomem *addr) +{ + iowrite16(value, addr); +} + static void __iomem *map_capability(struct pci_dev *dev, int off, size_t minlen, u32 align, -- MST
2015 Feb 15
3
[PATCH 1/2] virtio_pci_modern: type-safe io accessors
...} + +static inline u32 vp_ioread32(u32 __iomem *addr) +{ + return ioread32(addr); +} + +static inline void vp_iowrite8(u8 value, u8 __iomem *addr) +{ + iowrite8(value, addr); +} + +static inline void vp_iowrite16(u16 value, u16 __iomem *addr) +{ + iowrite16(value, addr); +} + +static inline void vp_iowrite32(u32 value, u32 __iomem *addr) +{ + iowrite16(value, addr); +} + static void __iomem *map_capability(struct pci_dev *dev, int off, size_t minlen, u32 align, -- MST
2014 Sep 17
4
[PATCH v5 2/3] virtio_pci: Use the DMA API for virtqueues when possible
...info->queue = alloc_pages_exact(PAGE_ALIGN(size), > + GFP_KERNEL|__GFP_ZERO); > + info->queue_dma_addr = virt_to_phys(info->queue); > + } > if (info->queue == NULL) { > err = -ENOMEM; > goto out_info; > } > > /* activate the queue */ > - iowrite32(virt_to_phys(info->queue) >> VIRTIO_PCI_QUEUE_ADDR_SHIFT, > + iowrite32(info->queue_dma_addr >> VIRTIO_PCI_QUEUE_ADDR_SHIFT, > vp_dev->ioaddr + VIRTIO_PCI_QUEUE_PFN); > > /* create the vring */ > vq = vring_new_virtqueue(index, info->num, VIRTIO_PCI...
2014 Sep 17
4
[PATCH v5 2/3] virtio_pci: Use the DMA API for virtqueues when possible
...info->queue = alloc_pages_exact(PAGE_ALIGN(size), > + GFP_KERNEL|__GFP_ZERO); > + info->queue_dma_addr = virt_to_phys(info->queue); > + } > if (info->queue == NULL) { > err = -ENOMEM; > goto out_info; > } > > /* activate the queue */ > - iowrite32(virt_to_phys(info->queue) >> VIRTIO_PCI_QUEUE_ADDR_SHIFT, > + iowrite32(info->queue_dma_addr >> VIRTIO_PCI_QUEUE_ADDR_SHIFT, > vp_dev->ioaddr + VIRTIO_PCI_QUEUE_PFN); > > /* create the vring */ > vq = vring_new_virtqueue(index, info->num, VIRTIO_PCI...
2014 Sep 17
1
[PATCH v5 2/3] virtio_pci: Use the DMA API for virtqueues when possible
...info->queue = alloc_pages_exact(PAGE_ALIGN(size), > + GFP_KERNEL|__GFP_ZERO); > + info->queue_dma_addr = virt_to_phys(info->queue); > + } > if (info->queue == NULL) { > err = -ENOMEM; > goto out_info; > } > > /* activate the queue */ > - iowrite32(virt_to_phys(info->queue) >> VIRTIO_PCI_QUEUE_ADDR_SHIFT, > + iowrite32(info->queue_dma_addr >> VIRTIO_PCI_QUEUE_ADDR_SHIFT, > vp_dev->ioaddr + VIRTIO_PCI_QUEUE_PFN); > > /* create the vring */ > vq = vring_new_virtqueue(index, info->num, VIRTIO_PCI...
2014 Sep 17
1
[PATCH v5 2/3] virtio_pci: Use the DMA API for virtqueues when possible
...info->queue = alloc_pages_exact(PAGE_ALIGN(size), > + GFP_KERNEL|__GFP_ZERO); > + info->queue_dma_addr = virt_to_phys(info->queue); > + } > if (info->queue == NULL) { > err = -ENOMEM; > goto out_info; > } > > /* activate the queue */ > - iowrite32(virt_to_phys(info->queue) >> VIRTIO_PCI_QUEUE_ADDR_SHIFT, > + iowrite32(info->queue_dma_addr >> VIRTIO_PCI_QUEUE_ADDR_SHIFT, > vp_dev->ioaddr + VIRTIO_PCI_QUEUE_PFN); > > /* create the vring */ > vq = vring_new_virtqueue(index, info->num, VIRTIO_PCI...
2014 Dec 30
0
[PATCH RFC v2 5/7] virtio_pci: modern driver
...urn NULL; + } + + p = pci_iomap_range(dev, bar, offset, length); + if (!p) + dev_err(&dev->dev, + "virtio_pci: unable to map virtio %u@%u on bar %i\n", + length, offset, bar); + return p; +} + +static void iowrite64_twopart(u64 val, __le32 __iomem *lo, __le32 __iomem *hi) +{ + iowrite32((u32)val, lo); + iowrite32(val >> 32, hi); +} + +/* virtio config->get_features() implementation */ +static u64 vp_get_features(struct virtio_device *vdev) +{ + struct virtio_pci_device *vp_dev = to_vp_device(vdev); + u64 features; + + iowrite32(0, &vp_dev->common->device_feature...
2014 Dec 30
0
[PATCH RFC v2 5/7] virtio_pci: modern driver
...urn NULL; + } + + p = pci_iomap_range(dev, bar, offset, length); + if (!p) + dev_err(&dev->dev, + "virtio_pci: unable to map virtio %u@%u on bar %i\n", + length, offset, bar); + return p; +} + +static void iowrite64_twopart(u64 val, __le32 __iomem *lo, __le32 __iomem *hi) +{ + iowrite32((u32)val, lo); + iowrite32(val >> 32, hi); +} + +/* virtio config->get_features() implementation */ +static u64 vp_get_features(struct virtio_device *vdev) +{ + struct virtio_pci_device *vp_dev = to_vp_device(vdev); + u64 features; + + iowrite32(0, &vp_dev->common->device_feature...