search for: cio_dma_free

Displaying 20 results from an estimated 35 matches for "cio_dma_free".

2019 Jun 03
5
[PATCH v3 2/8] s390/cio: introduce DMA pools to cio
...a/arch/s390/include/asm/cio.h > +++ b/arch/s390/include/asm/cio.h > @@ -328,6 +328,17 @@ static inline u8 pathmask_to_pos(u8 mask) > void channel_subsystem_reinit(void); > extern void css_schedule_reprobe(void); > > +extern void *cio_dma_zalloc(size_t size); > +extern void cio_dma_free(void *cpu_addr, size_t size); > +extern struct device *cio_get_dma_css_dev(void); > + > +struct gen_pool; That forward declaration is a bit ugly... I guess the alternative was include hell? > +void *cio_gp_dma_zalloc(struct gen_pool *gp_dma, struct device *dma_dev, > + size_t siz...
2019 Jun 03
5
[PATCH v3 2/8] s390/cio: introduce DMA pools to cio
...a/arch/s390/include/asm/cio.h > +++ b/arch/s390/include/asm/cio.h > @@ -328,6 +328,17 @@ static inline u8 pathmask_to_pos(u8 mask) > void channel_subsystem_reinit(void); > extern void css_schedule_reprobe(void); > > +extern void *cio_dma_zalloc(size_t size); > +extern void cio_dma_free(void *cpu_addr, size_t size); > +extern struct device *cio_get_dma_css_dev(void); > + > +struct gen_pool; That forward declaration is a bit ugly... I guess the alternative was include hell? > +void *cio_gp_dma_zalloc(struct gen_pool *gp_dma, struct device *dma_dev, > + size_t siz...
2019 May 10
3
[PATCH 05/10] s390/cio: introduce DMA pools to cio
On Fri, 10 May 2019 00:11:12 +0200 Halil Pasic <pasic at linux.ibm.com> wrote: > On Thu, 9 May 2019 12:11:06 +0200 > Cornelia Huck <cohuck at redhat.com> wrote: > > > On Wed, 8 May 2019 23:22:10 +0200 > > Halil Pasic <pasic at linux.ibm.com> wrote: > > > > > On Wed, 8 May 2019 15:18:10 +0200 (CEST) > > > Sebastian Ott <sebott
2019 May 10
3
[PATCH 05/10] s390/cio: introduce DMA pools to cio
On Fri, 10 May 2019 00:11:12 +0200 Halil Pasic <pasic at linux.ibm.com> wrote: > On Thu, 9 May 2019 12:11:06 +0200 > Cornelia Huck <cohuck at redhat.com> wrote: > > > On Wed, 8 May 2019 23:22:10 +0200 > > Halil Pasic <pasic at linux.ibm.com> wrote: > > > > > On Wed, 8 May 2019 15:18:10 +0200 (CEST) > > > Sebastian Ott <sebott
2019 May 23
0
[PATCH v2 4/8] s390/airq: use DMA memory for adapter interrupts
...airq_iv_create(unsigned long bits, unsigned long flags) kfree(iv->bitlock); kfree(iv->avail); if (iv->flags & AIRQ_IV_CACHELINE) - kmem_cache_free(airq_iv_cache, iv->vector); + dma_pool_free(airq_iv_cache, iv->vector, iv->vector_dma); else - kfree(iv->vector); + cio_dma_free(iv->vector, size); kfree(iv); out: return NULL; @@ -198,9 +206,9 @@ void airq_iv_release(struct airq_iv *iv) kfree(iv->ptr); kfree(iv->bitlock); if (iv->flags & AIRQ_IV_CACHELINE) - kmem_cache_free(airq_iv_cache, iv->vector); + dma_pool_free(airq_iv_cache, iv->vec...
2019 May 13
2
[PATCH 05/10] s390/cio: introduce DMA pools to cio
...IV_ALLOC) { > @@ -172,8 +171,7 @@ struct airq_iv *airq_iv_create(unsigned long bits, unsigned long flags) > kfree(iv->ptr); > kfree(iv->bitlock); > kfree(iv->avail); > - dma_free_coherent(cio_get_dma_css_dev(), size, iv->vector, > - iv->vector_dma); > + cio_dma_free(iv->vector, size); > kfree(iv); > out: > return NULL; > @@ -189,9 +187,7 @@ void airq_iv_release(struct airq_iv *iv) > kfree(iv->data); > kfree(iv->ptr); > kfree(iv->bitlock); > - kfree(iv->vector); > - dma_free_coherent(cio_get_dma_css_dev(), iv...
2019 May 13
2
[PATCH 05/10] s390/cio: introduce DMA pools to cio
...IV_ALLOC) { > @@ -172,8 +171,7 @@ struct airq_iv *airq_iv_create(unsigned long bits, unsigned long flags) > kfree(iv->ptr); > kfree(iv->bitlock); > kfree(iv->avail); > - dma_free_coherent(cio_get_dma_css_dev(), size, iv->vector, > - iv->vector_dma); > + cio_dma_free(iv->vector, size); > kfree(iv); > out: > return NULL; > @@ -189,9 +187,7 @@ void airq_iv_release(struct airq_iv *iv) > kfree(iv->data); > kfree(iv->ptr); > kfree(iv->bitlock); > - kfree(iv->vector); > - dma_free_coherent(cio_get_dma_css_dev(), iv...
2019 Jun 06
0
[PATCH v4 4/8] s390/airq: use DMA memory for adapter interrupts
...airq_iv_create(unsigned long bits, unsigned long flags) kfree(iv->bitlock); kfree(iv->avail); if (iv->flags & AIRQ_IV_CACHELINE) - kmem_cache_free(airq_iv_cache, iv->vector); + dma_pool_free(airq_iv_cache, iv->vector, iv->vector_dma); else - kfree(iv->vector); + cio_dma_free(iv->vector, size); kfree(iv); out: return NULL; @@ -198,9 +206,9 @@ void airq_iv_release(struct airq_iv *iv) kfree(iv->ptr); kfree(iv->bitlock); if (iv->flags & AIRQ_IV_CACHELINE) - kmem_cache_free(airq_iv_cache, iv->vector); + dma_pool_free(airq_iv_cache, iv->vec...
2019 Apr 09
0
[RFC PATCH 04/12] s390/cio: introduce cio DMA pool
...- a/arch/s390/include/asm/cio.h > +++ b/arch/s390/include/asm/cio.h > @@ -328,6 +328,9 @@ static inline u8 pathmask_to_pos(u8 mask) > void channel_subsystem_reinit(void); > extern void css_schedule_reprobe(void); > > +extern void *cio_dma_zalloc(size_t size); > +extern void cio_dma_free(void *cpu_addr, size_t size); > + > /* Function from drivers/s390/cio/chsc.c */ > int chsc_sstpc(void *page, unsigned int op, u16 ctrl, u64 *clock_delta); > int chsc_sstpi(void *page, void *result, size_t size); > diff --git a/drivers/s390/cio/css.c b/drivers/s390/cio/css.c > i...
2019 Jun 12
0
[PATCH v5 4/8] s390/airq: use DMA memory for adapter interrupts
...t;bitlock); kfree(iv->avail); - if (iv->flags & AIRQ_IV_CACHELINE) - kmem_cache_free(airq_iv_cache, iv->vector); + if (iv->flags & AIRQ_IV_CACHELINE && iv->vector) + dma_pool_free(airq_iv_cache, iv->vector, iv->vector_dma); else - kfree(iv->vector); + cio_dma_free(iv->vector, size); kfree(iv); out: return NULL; @@ -198,9 +207,9 @@ void airq_iv_release(struct airq_iv *iv) kfree(iv->ptr); kfree(iv->bitlock); if (iv->flags & AIRQ_IV_CACHELINE) - kmem_cache_free(airq_iv_cache, iv->vector); + dma_pool_free(airq_iv_cache, iv->vec...
2019 May 29
0
[PATCH v3 4/8] s390/airq: use DMA memory for adapter interrupts
...airq_iv_create(unsigned long bits, unsigned long flags) kfree(iv->bitlock); kfree(iv->avail); if (iv->flags & AIRQ_IV_CACHELINE) - kmem_cache_free(airq_iv_cache, iv->vector); + dma_pool_free(airq_iv_cache, iv->vector, iv->vector_dma); else - kfree(iv->vector); + cio_dma_free(iv->vector, size); kfree(iv); out: return NULL; @@ -198,9 +206,9 @@ void airq_iv_release(struct airq_iv *iv) kfree(iv->ptr); kfree(iv->bitlock); if (iv->flags & AIRQ_IV_CACHELINE) - kmem_cache_free(airq_iv_cache, iv->vector); + dma_pool_free(airq_iv_cache, iv->vec...
2019 May 23
0
[PATCH v2 2/8] s390/cio: introduce DMA pools to cio
...27180e8ca1..43c007d2775a 100644 --- a/arch/s390/include/asm/cio.h +++ b/arch/s390/include/asm/cio.h @@ -328,6 +328,17 @@ static inline u8 pathmask_to_pos(u8 mask) void channel_subsystem_reinit(void); extern void css_schedule_reprobe(void); +extern void *cio_dma_zalloc(size_t size); +extern void cio_dma_free(void *cpu_addr, size_t size); +extern struct device *cio_get_dma_css_dev(void); + +struct gen_pool; +void *cio_gp_dma_zalloc(struct gen_pool *gp_dma, struct device *dma_dev, + size_t size); +void cio_gp_dma_free(struct gen_pool *gp_dma, void *cpu_addr, size_t size); +void cio_gp_dma_destroy(struc...
2019 Apr 26
0
[PATCH 05/10] s390/cio: introduce DMA pools to cio
...27180e8ca1..43c007d2775a 100644 --- a/arch/s390/include/asm/cio.h +++ b/arch/s390/include/asm/cio.h @@ -328,6 +328,17 @@ static inline u8 pathmask_to_pos(u8 mask) void channel_subsystem_reinit(void); extern void css_schedule_reprobe(void); +extern void *cio_dma_zalloc(size_t size); +extern void cio_dma_free(void *cpu_addr, size_t size); +extern struct device *cio_get_dma_css_dev(void); + +struct gen_pool; +void *cio_gp_dma_zalloc(struct gen_pool *gp_dma, struct device *dma_dev, + size_t size); +void cio_gp_dma_free(struct gen_pool *gp_dma, void *cpu_addr, size_t size); +void cio_gp_dma_destroy(struc...
2019 May 29
0
[PATCH v3 2/8] s390/cio: introduce DMA pools to cio
...27180e8ca1..43c007d2775a 100644 --- a/arch/s390/include/asm/cio.h +++ b/arch/s390/include/asm/cio.h @@ -328,6 +328,17 @@ static inline u8 pathmask_to_pos(u8 mask) void channel_subsystem_reinit(void); extern void css_schedule_reprobe(void); +extern void *cio_dma_zalloc(size_t size); +extern void cio_dma_free(void *cpu_addr, size_t size); +extern struct device *cio_get_dma_css_dev(void); + +struct gen_pool; +void *cio_gp_dma_zalloc(struct gen_pool *gp_dma, struct device *dma_dev, + size_t size); +void cio_gp_dma_free(struct gen_pool *gp_dma, void *cpu_addr, size_t size); +void cio_gp_dma_destroy(struc...
2019 May 12
0
[PATCH 05/10] s390/cio: introduce DMA pools to cio
...o out_free; if (flags & AIRQ_IV_ALLOC) { @@ -172,8 +171,7 @@ struct airq_iv *airq_iv_create(unsigned long bits, unsigned long flags) kfree(iv->ptr); kfree(iv->bitlock); kfree(iv->avail); - dma_free_coherent(cio_get_dma_css_dev(), size, iv->vector, - iv->vector_dma); + cio_dma_free(iv->vector, size); kfree(iv); out: return NULL; @@ -189,9 +187,7 @@ void airq_iv_release(struct airq_iv *iv) kfree(iv->data); kfree(iv->ptr); kfree(iv->bitlock); - kfree(iv->vector); - dma_free_coherent(cio_get_dma_css_dev(), iv_size(iv->bits), - iv->vector, iv-&...
2019 Jun 06
0
[PATCH v4 2/8] s390/cio: introduce DMA pools to cio
....h> +#include <linux/genalloc.h> #include <asm/types.h> #define LPM_ANYPATH 0xff @@ -328,6 +329,16 @@ static inline u8 pathmask_to_pos(u8 mask) void channel_subsystem_reinit(void); extern void css_schedule_reprobe(void); +extern void *cio_dma_zalloc(size_t size); +extern void cio_dma_free(void *cpu_addr, size_t size); +extern struct device *cio_get_dma_css_dev(void); + +void *cio_gp_dma_zalloc(struct gen_pool *gp_dma, struct device *dma_dev, + size_t size); +void cio_gp_dma_free(struct gen_pool *gp_dma, void *cpu_addr, size_t size); +void cio_gp_dma_destroy(struct gen_pool *gp_dma...
2019 Jun 12
0
[PATCH v5 2/8] s390/cio: introduce DMA pools to cio
....h> +#include <linux/genalloc.h> #include <asm/types.h> #define LPM_ANYPATH 0xff @@ -328,6 +329,16 @@ static inline u8 pathmask_to_pos(u8 mask) void channel_subsystem_reinit(void); extern void css_schedule_reprobe(void); +extern void *cio_dma_zalloc(size_t size); +extern void cio_dma_free(void *cpu_addr, size_t size); +extern struct device *cio_get_dma_css_dev(void); + +void *cio_gp_dma_zalloc(struct gen_pool *gp_dma, struct device *dma_dev, + size_t size); +void cio_gp_dma_free(struct gen_pool *gp_dma, void *cpu_addr, size_t size); +void cio_gp_dma_destroy(struct gen_pool *gp_dma...
2019 May 15
0
[PATCH 05/10] s390/cio: introduce DMA pools to cio
...1,7 @@ struct airq_iv *airq_iv_create(unsigned long bits, unsigned long flags) > > kfree(iv->ptr); > > kfree(iv->bitlock); > > kfree(iv->avail); > > - dma_free_coherent(cio_get_dma_css_dev(), size, iv->vector, > > - iv->vector_dma); > > + cio_dma_free(iv->vector, size); > > kfree(iv); > > out: > > return NULL; > > @@ -189,9 +187,7 @@ void airq_iv_release(struct airq_iv *iv) > > kfree(iv->data); > > kfree(iv->ptr); > > kfree(iv->bitlock); > > - kfree(iv->vector); > >...
2019 Jun 03
0
[PATCH v3 2/8] s390/cio: introduce DMA pools to cio
...> +++ b/arch/s390/include/asm/cio.h > > @@ -328,6 +328,17 @@ static inline u8 pathmask_to_pos(u8 mask) > > void channel_subsystem_reinit(void); > > extern void css_schedule_reprobe(void); > > > > +extern void *cio_dma_zalloc(size_t size); > > +extern void cio_dma_free(void *cpu_addr, size_t size); > > +extern struct device *cio_get_dma_css_dev(void); > > + > > +struct gen_pool; > > That forward declaration is a bit ugly... Can you explain to me what is ugly about it so I can avoid similar mistakes in the future? >I guess the altern...
2019 Jun 06
0
[PATCH v4 8/8] virtio/s390: make airq summary indicators DMA
.../* parse no_auto string before we do anything further */ no_auto_parse(); - return ccw_driver_register(&virtio_ccw_driver); + + summary_indicators = cio_dma_zalloc(MAX_AIRQ_AREAS); + if (!summary_indicators) + return -ENOMEM; + rc = ccw_driver_register(&virtio_ccw_driver); + if (rc) + cio_dma_free(summary_indicators, MAX_AIRQ_AREAS); + return rc; } device_initcall(virtio_ccw_init); -- 2.17.1