search for: ioread16

Displaying 20 results from an estimated 126 matches for "ioread16".

2020 Jan 07
21
[RFT 00/13] iomap: Constify ioreadX() iomem argument
...s: some taking address as const, some not. It seems there is nothing really stopping all of them to take pointer to const. Patchset was really tested on all affected architectures. Build testing is in progress - I hope auto-builders will point any issues. Todo ==== Convert also string versions (ioread16_rep() etc) if this aproach looks OK. Merging ======= The first 5 patches - iomap, alpha, sh, parisc and powerpc - should probably go via one tree, or even squashed into one. All other can go separately after these get merged. Best regards, Krzysztof Krzysztof Kozlowski (13): iomap: Constify...
2020 Jan 07
21
[RFT 00/13] iomap: Constify ioreadX() iomem argument
...s: some taking address as const, some not. It seems there is nothing really stopping all of them to take pointer to const. Patchset was really tested on all affected architectures. Build testing is in progress - I hope auto-builders will point any issues. Todo ==== Convert also string versions (ioread16_rep() etc) if this aproach looks OK. Merging ======= The first 5 patches - iomap, alpha, sh, parisc and powerpc - should probably go via one tree, or even squashed into one. All other can go separately after these get merged. Best regards, Krzysztof Krzysztof Kozlowski (13): iomap: Constify...
2020 Jan 07
21
[RFT 00/13] iomap: Constify ioreadX() iomem argument
...s: some taking address as const, some not. It seems there is nothing really stopping all of them to take pointer to const. Patchset was really tested on all affected architectures. Build testing is in progress - I hope auto-builders will point any issues. Todo ==== Convert also string versions (ioread16_rep() etc) if this aproach looks OK. Merging ======= The first 5 patches - iomap, alpha, sh, parisc and powerpc - should probably go via one tree, or even squashed into one. All other can go separately after these get merged. Best regards, Krzysztof Krzysztof Kozlowski (13): iomap: Constify...
2020 Jan 07
0
[RFT 03/13] alpha: Constify ioreadX() iomem argument (as in generic implementation)
...s_ioread8(const void __iomem *xaddr) { unsigned long addr = (unsigned long) xaddr; unsigned long result, base_and_type; @@ -420,7 +420,7 @@ __EXTERN_INLINE void apecs_iowrite8(u8 b, void __iomem *xaddr) *(vuip) ((addr << 5) + base_and_type) = w; } -__EXTERN_INLINE unsigned int apecs_ioread16(void __iomem *xaddr) +__EXTERN_INLINE unsigned int apecs_ioread16(const void __iomem *xaddr) { unsigned long addr = (unsigned long) xaddr; unsigned long result, base_and_type; @@ -456,7 +456,7 @@ __EXTERN_INLINE void apecs_iowrite16(u16 b, void __iomem *xaddr) *(vuip) ((addr << 5) + ba...
2020 Jan 07
0
[RFT 02/13] alpha: Constify ioreadX() iomem argument (as in generic implementation)
...s_ioread8(const void __iomem *xaddr) { unsigned long addr = (unsigned long) xaddr; unsigned long result, base_and_type; @@ -420,7 +420,7 @@ __EXTERN_INLINE void apecs_iowrite8(u8 b, void __iomem *xaddr) *(vuip) ((addr << 5) + base_and_type) = w; } -__EXTERN_INLINE unsigned int apecs_ioread16(void __iomem *xaddr) +__EXTERN_INLINE unsigned int apecs_ioread16(const void __iomem *xaddr) { unsigned long addr = (unsigned long) xaddr; unsigned long result, base_and_type; @@ -456,7 +456,7 @@ __EXTERN_INLINE void apecs_iowrite16(u16 b, void __iomem *xaddr) *(vuip) ((addr << 5) + ba...
2015 Feb 15
3
[PATCH 1/2] virtio_pci_modern: type-safe io accessors
...+ * + * The driver MUST access each field using the ?natural? access + * method, i.e. 32-bit accesses for 32-bit fields, 16-bit accesses + * for 16-bit fields and 8-bit accesses for 8-bit fields. + */ +static inline u8 vp_ioread8(u8 __iomem *addr) +{ + return ioread8(addr); +} +static inline u16 vp_ioread16 (u16 __iomem *addr) +{ + return ioread16(addr); +} + +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) +{ + io...
2015 Feb 15
3
[PATCH 1/2] virtio_pci_modern: type-safe io accessors
...+ * + * The driver MUST access each field using the ?natural? access + * method, i.e. 32-bit accesses for 32-bit fields, 16-bit accesses + * for 16-bit fields and 8-bit accesses for 8-bit fields. + */ +static inline u8 vp_ioread8(u8 __iomem *addr) +{ + return ioread8(addr); +} +static inline u16 vp_ioread16 (u16 __iomem *addr) +{ + return ioread16(addr); +} + +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) +{ + io...
2013 May 29
1
[RFC 7/11] virtio_pci: new, capability-aware driver.
On Wed, May 29, 2013 at 10:47:52AM +0930, Rusty Russell wrote: > "Michael S. Tsirkin" <mst at redhat.com> writes: > > > On Mon, Dec 12, 2011 at 01:49:13PM +0200, Michael S. Tsirkin wrote: > >> On Mon, Dec 12, 2011 at 09:15:03AM +1030, Rusty Russell wrote: > >> > On Sun, 11 Dec 2011 11:42:56 +0200, "Michael S. Tsirkin" <mst at
2020 Jan 08
0
[PATCH v2 1/9] iomap: Constify ioreadX() iomem argument (as in generic implementation)
...s_ioread8(const void __iomem *xaddr) { unsigned long addr = (unsigned long) xaddr; unsigned long result, base_and_type; @@ -420,7 +420,7 @@ __EXTERN_INLINE void apecs_iowrite8(u8 b, void __iomem *xaddr) *(vuip) ((addr << 5) + base_and_type) = w; } -__EXTERN_INLINE unsigned int apecs_ioread16(void __iomem *xaddr) +__EXTERN_INLINE unsigned int apecs_ioread16(const void __iomem *xaddr) { unsigned long addr = (unsigned long) xaddr; unsigned long result, base_and_type; @@ -456,7 +456,7 @@ __EXTERN_INLINE void apecs_iowrite16(u16 b, void __iomem *xaddr) *(vuip) ((addr << 5) + ba...
2020 Feb 19
0
[RESEND PATCH v2 1/9] iomap: Constify ioreadX() iomem argument (as in generic implementation)
...s_ioread8(const void __iomem *xaddr) { unsigned long addr = (unsigned long) xaddr; unsigned long result, base_and_type; @@ -420,7 +420,7 @@ __EXTERN_INLINE void apecs_iowrite8(u8 b, void __iomem *xaddr) *(vuip) ((addr << 5) + base_and_type) = w; } -__EXTERN_INLINE unsigned int apecs_ioread16(void __iomem *xaddr) +__EXTERN_INLINE unsigned int apecs_ioread16(const void __iomem *xaddr) { unsigned long addr = (unsigned long) xaddr; unsigned long result, base_and_type; @@ -456,7 +456,7 @@ __EXTERN_INLINE void apecs_iowrite16(u16 b, void __iomem *xaddr) *(vuip) ((addr << 5) + ba...
2020 Jul 09
0
[PATCH v3 1/4] iomap: Constify ioreadX() iomem argument (as in generic implementation)
...s_ioread8(const void __iomem *xaddr) { unsigned long addr = (unsigned long) xaddr; unsigned long result, base_and_type; @@ -420,7 +420,7 @@ __EXTERN_INLINE void apecs_iowrite8(u8 b, void __iomem *xaddr) *(vuip) ((addr << 5) + base_and_type) = w; } -__EXTERN_INLINE unsigned int apecs_ioread16(void __iomem *xaddr) +__EXTERN_INLINE unsigned int apecs_ioread16(const void __iomem *xaddr) { unsigned long addr = (unsigned long) xaddr; unsigned long result, base_and_type; @@ -456,7 +456,7 @@ __EXTERN_INLINE void apecs_iowrite16(u16 b, void __iomem *xaddr) *(vuip) ((addr << 5) + ba...
2020 Jul 09
5
[PATCH v3 0/4] iomap: Constify ioreadX() iomem argument
Hi, Multiple architectures are affected in the first patch and all further patches depend on the first. Maybe this could go in through Andrew Morton's tree? Changes since v2 ================ 1. Drop all non-essential patches (cleanups), 2. Update also drivers/sh/clk/cpg.c . Changes since v1 ================ https://lore.kernel.org/lkml/1578415992-24054-1-git-send-email-krzk at
2015 Feb 10
1
[PATCH] virtio_pci: use 16-bit accessor for queue_enable.
..._pci_modern.c index f16e462cb4ef..2aa38e59db2e 100644 --- a/drivers/virtio/virtio_pci_modern.c +++ b/drivers/virtio/virtio_pci_modern.c @@ -294,7 +294,7 @@ static struct virtqueue *setup_vq(struct virtio_pci_device *vp_dev, /* Check if queue is either not available or already active. */ num = ioread16(&cfg->queue_size); - if (!num || ioread8(&cfg->queue_enable)) + if (!num || ioread16(&cfg->queue_enable)) return ERR_PTR(-ENOENT); if (num & (num - 1)) { @@ -394,7 +394,7 @@ static int vp_modern_find_vqs(struct virtio_device *vdev, unsigned nvqs, */ list_for_eac...
2015 Feb 10
1
[PATCH] virtio_pci: use 16-bit accessor for queue_enable.
..._pci_modern.c index f16e462cb4ef..2aa38e59db2e 100644 --- a/drivers/virtio/virtio_pci_modern.c +++ b/drivers/virtio/virtio_pci_modern.c @@ -294,7 +294,7 @@ static struct virtqueue *setup_vq(struct virtio_pci_device *vp_dev, /* Check if queue is either not available or already active. */ num = ioread16(&cfg->queue_size); - if (!num || ioread8(&cfg->queue_enable)) + if (!num || ioread16(&cfg->queue_enable)) return ERR_PTR(-ENOENT); if (num & (num - 1)) { @@ -394,7 +394,7 @@ static int vp_modern_find_vqs(struct virtio_device *vdev, unsigned nvqs, */ list_for_eac...
2020 Aug 21
0
[PATCH v3 5/6] iommu/virtio: Support topology description in config space
...c = kzalloc(sizeof(*spec), GFP_KERNEL); + if (!spec) + return ERR_PTR(-ENOMEM); + + switch (ioread8(&cfg->hdr.type)) { + case VIRTIO_IOMMU_TOPO_PCI_RANGE: + if (len < sizeof(cfg->pci)) + goto err_free; + + spec->dev_id.type = VIRT_TOPO_DEV_TYPE_PCI; + spec->dev_id.segment = ioread16(&cfg->pci.segment); + spec->dev_id.bdf_start = ioread16(&cfg->pci.bdf_start); + spec->dev_id.bdf_end = ioread16(&cfg->pci.bdf_end); + spec->endpoint_id = ioread32(&cfg->pci.endpoint_start); + break; + case VIRTIO_IOMMU_TOPO_MMIO: + if (len < sizeof(cfg-&...
2020 Jan 08
1
[RFT 02/13] alpha: Constify ioreadX() iomem argument (as in generic implementation)
...io.h > +++ b/arch/alpha/include/asm/io.h > @@ -151,9 +151,9 @@ static inline void generic_##NAME(TYPE b, QUAL void __iomem *addr) \ > alpha_mv.mv_##NAME(b, addr); \ > } > > -REMAP1(unsigned int, ioread8, /**/) > -REMAP1(unsigned int, ioread16, /**/) > -REMAP1(unsigned int, ioread32, /**/) > +REMAP1(unsigned int, ioread8, const) > +REMAP1(unsigned int, ioread16, const) > +REMAP1(unsigned int, ioread32, const) If these would become "const volatile", there would no longer be a need for the last parameter of the REMAP...
2020 Sep 04
1
[PATCH v3 5/6] iommu/virtio: Support topology description in config space
...(!spec) > + return ERR_PTR(-ENOMEM); > + > + switch (ioread8(&cfg->hdr.type)) { > + case VIRTIO_IOMMU_TOPO_PCI_RANGE: > + if (len < sizeof(cfg->pci)) > + goto err_free; > + > + spec->dev_id.type = VIRT_TOPO_DEV_TYPE_PCI; > + spec->dev_id.segment = ioread16(&cfg->pci.segment); > + spec->dev_id.bdf_start = ioread16(&cfg->pci.bdf_start); > + spec->dev_id.bdf_end = ioread16(&cfg->pci.bdf_end); > + spec->endpoint_id = ioread32(&cfg->pci.endpoint_start); > + break; > + case VIRTIO_IOMMU_TOPO_MMIO: &gt...
2020 Feb 19
14
[RESEND PATCH v2 0/9] iomap: Constify ioreadX() iomem argument
Hi, Changes since v1 ================ https://lore.kernel.org/lkml/1578415992-24054-1-git-send-email-krzk at kernel.org/ 1. Constify also ioreadX_rep() and mmio_insX(), 2. Squash lib+alpha+powerpc+parisc+sh into one patch for bisectability, 3. Add acks and reviews, 4. Re-order patches so all optional driver changes are at the end. Description =========== The ioread8/16/32() and others have
2020 Feb 19
14
[RESEND PATCH v2 0/9] iomap: Constify ioreadX() iomem argument
Hi, Changes since v1 ================ https://lore.kernel.org/lkml/1578415992-24054-1-git-send-email-krzk at kernel.org/ 1. Constify also ioreadX_rep() and mmio_insX(), 2. Squash lib+alpha+powerpc+parisc+sh into one patch for bisectability, 3. Add acks and reviews, 4. Re-order patches so all optional driver changes are at the end. Description =========== The ioread8/16/32() and others have
2020 Feb 19
14
[RESEND PATCH v2 0/9] iomap: Constify ioreadX() iomem argument
Hi, Changes since v1 ================ https://lore.kernel.org/lkml/1578415992-24054-1-git-send-email-krzk at kernel.org/ 1. Constify also ioreadX_rep() and mmio_insX(), 2. Squash lib+alpha+powerpc+parisc+sh into one patch for bisectability, 3. Add acks and reviews, 4. Re-order patches so all optional driver changes are at the end. Description =========== The ioread8/16/32() and others have