search for: cio_dma_gfp

Displaying 20 results from an estimated 24 matches for "cio_dma_gfp".

2019 May 27
3
[PATCH v2 2/8] s390/cio: introduce DMA pools to cio
...6 +1024,109 @@ static struct notifier_block css_power_notifier = { > .notifier_call = css_power_event, > }; > > +#define POOL_INIT_PAGES 1 > +static struct gen_pool *cio_dma_pool; > +/* 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_...
2019 May 27
3
[PATCH v2 2/8] s390/cio: introduce DMA pools to cio
...6 +1024,109 @@ static struct notifier_block css_power_notifier = { > .notifier_call = css_power_event, > }; > > +#define POOL_INIT_PAGES 1 > +static struct gen_pool *cio_dma_pool; > +/* 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_...
2019 May 27
0
[PATCH v2 2/8] s390/cio: introduce DMA pools to cio
...> .notifier_call = css_power_event, > > }; > > > > +#define POOL_INIT_PAGES 1 > > +static struct gen_pool *cio_dma_pool; > > +/* Currently cio supports only a single css */ > > This comment looks misplaced. 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) >...
2019 May 23
0
[PATCH v2 2/8] s390/cio: introduce DMA pools to cio
...amp;css->mutex); css->cssid = chsc_get_cssid(nr); @@ -1018,6 +1024,109 @@ static struct notifier_block css_power_notifier = { .notifier_call = css_power_event, }; +#define POOL_INIT_PAGES 1 +static struct gen_pool *cio_dma_pool; +/* Currently cio supports only a single css */ +#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_...
2019 Apr 26
0
[PATCH 05/10] s390/cio: introduce DMA pools to cio
...&css->mutex); css->cssid = chsc_get_cssid(nr); @@ -1018,6 +1028,96 @@ static struct notifier_block css_power_notifier = { .notifier_call = css_power_event, }; +#define POOL_INIT_PAGES 1 +static struct gen_pool *cio_dma_pool; +/* Currently cio supports only a single css */ +#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_...
2019 May 29
0
[PATCH v3 2/8] s390/cio: introduce DMA pools to cio
...t_dma_mask = DMA_BIT_MASK(64); + css->device.dma_mask = &css->device.coherent_dma_mask; mutex_init(&css->mutex); css->cssid = chsc_get_cssid(nr); @@ -1018,6 +1024,109 @@ static struct notifier_block css_power_notifier = { .notifier_call = css_power_event, }; +#define CIO_DMA_GFP (GFP_KERNEL | __GFP_ZERO) +static struct gen_pool *cio_dma_pool; + +/* Currently cio supports only a single css */ +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...
2019 Jun 06
0
[PATCH v4 2/8] s390/cio: introduce DMA pools to cio
...t_dma_mask = DMA_BIT_MASK(64); + css->device.dma_mask = &css->device.coherent_dma_mask; mutex_init(&css->mutex); css->cssid = chsc_get_cssid(nr); @@ -1018,6 +1033,109 @@ static struct notifier_block css_power_notifier = { .notifier_call = css_power_event, }; +#define CIO_DMA_GFP (GFP_KERNEL | __GFP_ZERO) +static struct gen_pool *cio_dma_pool; + +/* Currently cio supports only a single css */ +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...
2019 Jun 12
0
[PATCH v5 2/8] s390/cio: introduce DMA pools to cio
...t_dma_mask = DMA_BIT_MASK(64); + css->device.dma_mask = &css->device.coherent_dma_mask; mutex_init(&css->mutex); css->cssid = chsc_get_cssid(nr); @@ -1018,6 +1033,111 @@ static struct notifier_block css_power_notifier = { .notifier_call = css_power_event, }; +#define CIO_DMA_GFP (GFP_KERNEL | __GFP_ZERO) +static struct gen_pool *cio_dma_pool; + +/* Currently cio supports only a single css */ +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...
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 13
2
[PATCH 05/10] s390/cio: introduce DMA pools to cio
...hunk_size; > > if (!addr) { > + chunk_size = round_up(size, PAGE_SIZE); Doesn't that mean that we still go up to chunks of at least PAGE_SIZE? Or can vectors now share the same chunk? > addr = (unsigned long) dma_alloc_coherent(dma_dev, > - PAGE_SIZE, &dma_addr, CIO_DMA_GFP); > + chunk_size, &dma_addr, CIO_DMA_GFP); > if (!addr) > return NULL; > - gen_pool_add_virt(gp_dma, addr, dma_addr, PAGE_SIZE, -1); > + gen_pool_add_virt(gp_dma, addr, dma_addr, chunk_size, -1); > addr = gen_pool_alloc(gp_dma, size); > } > return (v...
2019 May 13
2
[PATCH 05/10] s390/cio: introduce DMA pools to cio
...hunk_size; > > if (!addr) { > + chunk_size = round_up(size, PAGE_SIZE); Doesn't that mean that we still go up to chunks of at least PAGE_SIZE? Or can vectors now share the same chunk? > addr = (unsigned long) dma_alloc_coherent(dma_dev, > - PAGE_SIZE, &dma_addr, CIO_DMA_GFP); > + chunk_size, &dma_addr, CIO_DMA_GFP); > if (!addr) > return NULL; > - gen_pool_add_virt(gp_dma, addr, dma_addr, PAGE_SIZE, -1); > + gen_pool_add_virt(gp_dma, addr, dma_addr, chunk_size, -1); > addr = gen_pool_alloc(gp_dma, size); > } > return (v...
2019 May 12
0
[PATCH 05/10] s390/cio: introduce DMA pools to cio
...lloc(struct gen_pool *gp_dma, struct device *dma_dev, { dma_addr_t dma_addr; unsigned long addr = gen_pool_alloc(gp_dma, size); + size_t chunk_size; if (!addr) { + chunk_size = round_up(size, PAGE_SIZE); addr = (unsigned long) dma_alloc_coherent(dma_dev, - PAGE_SIZE, &dma_addr, CIO_DMA_GFP); + chunk_size, &dma_addr, CIO_DMA_GFP); if (!addr) return NULL; - gen_pool_add_virt(gp_dma, addr, dma_addr, PAGE_SIZE, -1); + gen_pool_add_virt(gp_dma, addr, dma_addr, chunk_size, -1); addr = gen_pool_alloc(gp_dma, size); } return (void *) addr; @@ -1108,6 +1113,13 @@ void...
2019 May 15
0
[PATCH 05/10] s390/cio: introduce DMA pools to cio
...We put the allocated dma mem into the genpool. So if the next request can be served from what is already in the genpool we don't end up in this fallback path where we grow the pool. > > > addr = (unsigned long) dma_alloc_coherent(dma_dev, > > - PAGE_SIZE, &dma_addr, CIO_DMA_GFP); > > + chunk_size, &dma_addr, CIO_DMA_GFP); > > if (!addr) > > return NULL; > > - gen_pool_add_virt(gp_dma, addr, dma_addr, PAGE_SIZE, -1); > > + gen_pool_add_virt(gp_dma, addr, dma_addr, chunk_size, -1); > > addr = gen_pool_alloc(gp_dma, si...
2019 May 08
4
[PATCH 05/10] s390/cio: introduce DMA pools to cio
...ma_mask = sch->dma_mask; Could we do: sch->dev.dma_mask = &sch->dev.coherent_dma_mask; sch->dev.coherent_dma_mask = css_dev_dma_mask; ? > +#define POOL_INIT_PAGES 1 > +static struct gen_pool *cio_dma_pool; > +/* Currently cio supports only a single css */ > +#define CIO_DMA_GFP (GFP_KERNEL | __GFP_ZERO) __GFP_ZERO has no meaning with the dma api (since all implementations do an implicit zero initialization) but let's keep it for the sake of documentation. We need GFP_DMA here (which will return addresses < 2G on s390)! > +void cio_gp_dma_free(struct gen_pool...
2019 May 08
4
[PATCH 05/10] s390/cio: introduce DMA pools to cio
...ma_mask = sch->dma_mask; Could we do: sch->dev.dma_mask = &sch->dev.coherent_dma_mask; sch->dev.coherent_dma_mask = css_dev_dma_mask; ? > +#define POOL_INIT_PAGES 1 > +static struct gen_pool *cio_dma_pool; > +/* Currently cio supports only a single css */ > +#define CIO_DMA_GFP (GFP_KERNEL | __GFP_ZERO) __GFP_ZERO has no meaning with the dma api (since all implementations do an implicit zero initialization) but let's keep it for the sake of documentation. We need GFP_DMA here (which will return addresses < 2G on s390)! > +void cio_gp_dma_free(struct gen_pool...
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 06
15
[PATCH v4 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 06
15
[PATCH v4 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
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