search for: cio_gp_dma_create

Displaying 20 results from an estimated 33 matches for "cio_gp_dma_create".

2019 May 27
3
[PATCH v2 2/8] s390/cio: introduce DMA pools to cio
...; > +/* Currently cio supports only a single css */ This comment looks misplaced. > +#define CIO_DMA_GFP (GFP_KERNEL | __GFP_ZERO) > + > + > +struct device *cio_get_dma_css_dev(void) > +{ > + return &channel_subsystems[0]->device; > +} > + > +struct gen_pool *cio_gp_dma_create(struct device *dma_dev, int nr_pages) > +{ > + struct gen_pool *gp_dma; > + void *cpu_addr; > + dma_addr_t dma_addr; > + int i; > + > + gp_dma = gen_pool_create(3, -1); > + if (!gp_dma) > + return NULL; > + for (i = 0; i < nr_pages; ++i) { > + cpu_addr = dma_al...
2019 May 27
3
[PATCH v2 2/8] s390/cio: introduce DMA pools to cio
...; > +/* Currently cio supports only a single css */ This comment looks misplaced. > +#define CIO_DMA_GFP (GFP_KERNEL | __GFP_ZERO) > + > + > +struct device *cio_get_dma_css_dev(void) > +{ > + return &channel_subsystems[0]->device; > +} > + > +struct gen_pool *cio_gp_dma_create(struct device *dma_dev, int nr_pages) > +{ > + struct gen_pool *gp_dma; > + void *cpu_addr; > + dma_addr_t dma_addr; > + int i; > + > + gp_dma = gen_pool_create(3, -1); > + if (!gp_dma) > + return NULL; > + for (i = 0; i < nr_pages; ++i) { > + cpu_addr = dma_al...
2019 May 23
0
[PATCH v2 2/8] s390/cio: introduce DMA pools to cio
...ma_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(struct gen_pool *gp_dma, struct device *dma_dev); +struct gen_pool *cio_gp_dma_create(struct device *dma_dev, int nr_pages); + /* 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 index aea502922646..78...
2019 Apr 26
0
[PATCH 05/10] s390/cio: introduce DMA pools to cio
...ma_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(struct gen_pool *gp_dma, struct device *dma_dev); +struct gen_pool *cio_gp_dma_create(struct device *dma_dev, int nr_pages); + /* 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/cio.h b/drivers/s390/cio/cio.h index 92eabbb5f18d..f2...
2019 May 29
0
[PATCH v3 2/8] s390/cio: introduce DMA pools to cio
...ma_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(struct gen_pool *gp_dma, struct device *dma_dev); +struct gen_pool *cio_gp_dma_create(struct device *dma_dev, int nr_pages); + /* 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 index aea502922646..b9...
2019 Jun 06
0
[PATCH v4 2/8] s390/cio: introduce DMA pools to cio
...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, struct device *dma_dev); +struct gen_pool *cio_gp_dma_create(struct device *dma_dev, int nr_pages); + /* 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 index aea502922646..6f...
2019 Jun 12
0
[PATCH v5 2/8] s390/cio: introduce DMA pools to cio
...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, struct device *dma_dev); +struct gen_pool *cio_gp_dma_create(struct device *dma_dev, int nr_pages); + /* 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 index aea502922646..e0...
2019 May 25
1
[PATCH v2 2/8] s390/cio: introduce DMA pools to cio
On Thu, 23 May 2019, Michael Mueller wrote: > +static void __init cio_dma_pool_init(void) > +{ > + /* No need to free up the resources: compiled in */ > + cio_dma_pool = cio_gp_dma_create(cio_get_dma_css_dev(), 1); This can return NULL. > +/** > + * Allocate dma memory from the css global pool. Intended for memory not > + * specific to any single device within the css. The allocated memory > + * is not guaranteed to be 31-bit addressable. > + * > + * Caution: Not...
2019 May 25
1
[PATCH v2 3/8] s390/cio: add basic protected virtualization support
...>private = kzalloc(sizeof(struct ccw_device_private), > + GFP_KERNEL | GFP_DMA); > + if (!cdev->private) > + goto err_priv; > + cdev->dev.coherent_dma_mask = sch->dev.coherent_dma_mask; > + cdev->dev.dma_mask = &cdev->dev.coherent_dma_mask; > + dma_pool = cio_gp_dma_create(&cdev->dev, 1); This can return NULL. gen_pool_alloc will panic in this case. [...] > +err_dma_area: > + kfree(io_priv); Indentation. > +err_priv: > + put_device(&sch->dev); > + return ERR_PTR(-ENOMEM); > } [...] > void ccw_device_update_sense_data(struct c...
2019 May 27
0
[PATCH v2 2/8] s390/cio: introduce DMA pools to cio
...d. Right! Move to ... > > > +#define CIO_DMA_GFP (GFP_KERNEL | __GFP_ZERO) > > + > > + ... here? > > +struct device *cio_get_dma_css_dev(void) > > +{ > > + return &channel_subsystems[0]->device; > > +} > > + > > +struct gen_pool *cio_gp_dma_create(struct device *dma_dev, int nr_pages) > > +{ > > + struct gen_pool *gp_dma; > > + void *cpu_addr; > > + dma_addr_t dma_addr; > > + int i; > > + > > + gp_dma = gen_pool_create(3, -1); > > + if (!gp_dma) > > + return NULL; > > + for (i = 0;...
2019 Jun 13
1
[PATCH v5 0/8] s390: virtio: support protected virtualization
...rid of the *vc_dma* wrappers (Connie) > > * added some Reviewed-bys > > * rebased on top of current master, no changes were necessary > > > > v2 --> v3: > > * patch 2/8 > > potential cio_dma_pool_init() returning NULL issue fixed > > potential cio_gp_dma_create() returning NULL issue fixed > > warning issues with doc type comments fixed > > unused define statement removed > > * patch 3/8 > > potential cio_gp_dma_create() returning NULL issue fixed > > whitespace issue fixed > > warning issues wi...
2019 Jun 13
0
[PATCH v5 0/8] s390: virtio: support protected virtualization
...tio_ccw_init() (Connie) > * got rid of the *vc_dma* wrappers (Connie) > * added some Reviewed-bys > * rebased on top of current master, no changes were necessary > > v2 --> v3: > * patch 2/8 > potential cio_dma_pool_init() returning NULL issue fixed > potential cio_gp_dma_create() returning NULL issue fixed > warning issues with doc type comments fixed > unused define statement removed > * patch 3/8 > potential cio_gp_dma_create() returning NULL issue fixed > whitespace issue fixed > warning issues with doc type comments fixed &gt...
2019 Jun 03
5
[PATCH v3 2/8] s390/cio: introduce DMA pools to cio
...clude hell? > +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, struct device *dma_dev); > +struct gen_pool *cio_gp_dma_create(struct device *dma_dev, int nr_pages); > + > /* 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...
2019 Jun 03
5
[PATCH v3 2/8] s390/cio: introduce DMA pools to cio
...clude hell? > +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, struct device *dma_dev); > +struct gen_pool *cio_gp_dma_create(struct device *dma_dev, int nr_pages); > + > /* 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...
2019 Jun 03
0
[PATCH v3 2/8] s390/cio: introduce DMA pools to cio
...; +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, struct device *dma_dev); >> +struct gen_pool *cio_gp_dma_create(struct device *dma_dev, int nr_pages); >> + >> /* 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...
2019 May 23
18
[PATCH v2 0/8] s390: virtio: support protected virtualization
Enhanced virtualization protection technology may require the use of bounce buffers for I/O. While support for this was built into the virtio core, virtio-ccw wasn't changed accordingly. Some background on technology (not part of this series) and the terminology used. * Protected Virtualization (PV): Protected Virtualization guarantees, that non-shared memory of a guest that operates in PV
2019 Jun 12
21
[PATCH v5 0/8] s390: virtio: support protected virtualization
...ues (Connie) * fixed error handling in virtio_ccw_init() (Connie) * got rid of the *vc_dma* wrappers (Connie) * added some Reviewed-bys * rebased on top of current master, no changes were necessary v2 --> v3: * patch 2/8 potential cio_dma_pool_init() returning NULL issue fixed potential cio_gp_dma_create() returning NULL issue fixed warning issues with doc type comments fixed unused define statement removed * patch 3/8 potential cio_gp_dma_create() returning NULL issue fixed whitespace issue fixed warning issues with doc type comments fixed * patch 8/8 potential cio_dma_zal...
2019 Jun 12
21
[PATCH v5 0/8] s390: virtio: support protected virtualization
...ues (Connie) * fixed error handling in virtio_ccw_init() (Connie) * got rid of the *vc_dma* wrappers (Connie) * added some Reviewed-bys * rebased on top of current master, no changes were necessary v2 --> v3: * patch 2/8 potential cio_dma_pool_init() returning NULL issue fixed potential cio_gp_dma_create() returning NULL issue fixed warning issues with doc type comments fixed unused define statement removed * patch 3/8 potential cio_gp_dma_create() returning NULL issue fixed whitespace issue fixed warning issues with doc type comments fixed * patch 8/8 potential cio_dma_zal...
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