Displaying 20 results from an estimated 197 matches for "cpu_addr".
2019 May 27
3
[PATCH v2 2/8] s390/cio: introduce DMA pools to cio
..._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_alloc_coherent(dma_dev, PAGE_SIZE, &dma_addr,
> + CIO_DMA_GFP);
> + if (!cpu_addr...
2019 May 27
3
[PATCH v2 2/8] s390/cio: introduce DMA pools to cio
..._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_alloc_coherent(dma_dev, PAGE_SIZE, &dma_addr,
> + CIO_DMA_GFP);
> + if (!cpu_addr...
2008 Mar 20
0
[RFC/PATCH 09/15] kvm-s390: interprocessor communication via sigp
...ne SIGP_STAT_OPERATOR_INTERV 0x00000020UL
+#define SIGP_STAT_CHECK_STOP 0x00000010UL
+#define SIGP_STAT_INOPERATIVE 0x00000004UL
+#define SIGP_STAT_INVALID_ORDER 0x00000002UL
+#define SIGP_STAT_RECEIVER_CHECK 0x00000001UL
+
+
+static int __sigp_sense(struct kvm_vcpu *vcpu, u16 cpu_addr, u64 *reg)
+{
+ struct float_interrupt *fi = &vcpu->kvm->arch.float_int;
+ int rc;
+
+ if (cpu_addr >= KVM_MAX_VCPUS)
+ return 3; /* not operational */
+
+ spin_lock_bh(&fi->lock);
+ if (fi->local_int[cpu_addr] == NULL)
+ rc = 3; /* not operational */
+ else if (atomic_read...
2016 Jun 02
0
[RFC v3 02/45] dma-mapping: Use unsigned long for dma_attrs
.../linux/dma-attrs.h
diff --git a/Documentation/DMA-API.txt b/Documentation/DMA-API.txt
index 45ef3f279c3b..24f9688bb98a 100644
--- a/Documentation/DMA-API.txt
+++ b/Documentation/DMA-API.txt
@@ -369,35 +369,32 @@ See also dma_map_single().
dma_addr_t
dma_map_single_attrs(struct device *dev, void *cpu_addr, size_t size,
enum dma_data_direction dir,
- struct dma_attrs *attrs)
+ unsigned long attrs)
void
dma_unmap_single_attrs(struct device *dev, dma_addr_t dma_addr,
size_t size, enum dma_data_direction dir,
- struct dma_attrs *attrs)
+ unsigned long at...
2019 May 23
0
[PATCH v2 2/8] s390/cio: introduce DMA pools to cio
...2775a 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(struct gen_pool *gp_...
2019 Apr 26
0
[PATCH 05/10] s390/cio: introduce DMA pools to cio
...2775a 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(struct gen_pool *gp_...
2019 May 29
0
[PATCH v3 2/8] s390/cio: introduce DMA pools to cio
...2775a 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(struct gen_pool *gp_...
2019 Jun 06
0
[PATCH v4 2/8] s390/cio: introduce DMA pools to cio
...t;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, struct device...
2019 Jun 12
0
[PATCH v5 2/8] s390/cio: introduce DMA pools to cio
...t;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, struct device...
2019 May 27
0
[PATCH v2 2/8] s390/cio: introduce DMA pools to cio
...> > +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_alloc_coherent(dma_dev, PAGE_SIZE, &dma_addr,
> > +...
2019 Apr 09
0
[RFC PATCH 04/12] s390/cio: introduce cio DMA pool
...de/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
> index aea5029226...
2015 May 06
2
[RFC 4/4] rpmsg: DMA map sgs passed to virtio
...add_inbuf(vrp->rvq, &sg, 1, msg, GFP_KERNEL);
> if (err < 0) {
> dev_err(dev, "failed to add a virtqueue buffer: %d\n", err);
> return err;
> @@ -1007,9 +1023,9 @@ static int rpmsg_probe(struct virtio_device *vdev)
> struct scatterlist sg;
> void *cpu_addr = vrp->rbufs + i * RPMSG_BUF_SIZE;
>
> - sg_init_one(&sg, cpu_addr, RPMSG_BUF_SIZE);
> + rpmsg_msg_sg_init(vrp, &sg, cpu_addr, RPMSG_BUF_SIZE);
>
> - err = virtqueue_add_inbuf(vrp->rvq, &sg, 1, cpu_addr,
> + err = dma_virtqueue_add_inbuf(vrp->rvq, &...
2015 May 06
2
[RFC 4/4] rpmsg: DMA map sgs passed to virtio
...add_inbuf(vrp->rvq, &sg, 1, msg, GFP_KERNEL);
> if (err < 0) {
> dev_err(dev, "failed to add a virtqueue buffer: %d\n", err);
> return err;
> @@ -1007,9 +1023,9 @@ static int rpmsg_probe(struct virtio_device *vdev)
> struct scatterlist sg;
> void *cpu_addr = vrp->rbufs + i * RPMSG_BUF_SIZE;
>
> - sg_init_one(&sg, cpu_addr, RPMSG_BUF_SIZE);
> + rpmsg_msg_sg_init(vrp, &sg, cpu_addr, RPMSG_BUF_SIZE);
>
> - err = virtqueue_add_inbuf(vrp->rvq, &sg, 1, cpu_addr,
> + err = dma_virtqueue_add_inbuf(vrp->rvq, &...
2015 May 01
0
[RFC 4/4] rpmsg: DMA map sgs passed to virtio
...ERNEL);
+ err = dma_virtqueue_add_inbuf(vrp->rvq, &sg, 1, msg, GFP_KERNEL);
if (err < 0) {
dev_err(dev, "failed to add a virtqueue buffer: %d\n", err);
return err;
@@ -1007,9 +1023,9 @@ static int rpmsg_probe(struct virtio_device *vdev)
struct scatterlist sg;
void *cpu_addr = vrp->rbufs + i * RPMSG_BUF_SIZE;
- sg_init_one(&sg, cpu_addr, RPMSG_BUF_SIZE);
+ rpmsg_msg_sg_init(vrp, &sg, cpu_addr, RPMSG_BUF_SIZE);
- err = virtqueue_add_inbuf(vrp->rvq, &sg, 1, cpu_addr,
+ err = dma_virtqueue_add_inbuf(vrp->rvq, &sg, 1, cpu_addr,
GFP...
2016 Jun 02
0
[RFC v3 44/45] dma-mapping: Remove dma_get_attr
...= gfp,
.prot = prot,
.caller = caller,
- .want_vaddr = !dma_get_attr(DMA_ATTR_NO_KERNEL_MAPPING, attrs),
+ .want_vaddr = ((attrs & DMA_ATTR_NO_KERNEL_MAPPING) == 0),
};
#ifdef CONFIG_DMA_API_DEBUG
@@ -887,7 +887,7 @@ static void __arm_dma_free(struct device *dev, size_t size, void *cpu_addr,
.size = PAGE_ALIGN(size),
.cpu_addr = cpu_addr,
.page = page,
- .want_vaddr = !dma_get_attr(DMA_ATTR_NO_KERNEL_MAPPING, attrs),
+ .want_vaddr = ((attrs & DMA_ATTR_NO_KERNEL_MAPPING) == 0),
};
buf = arm_dma_buffer_find(cpu_addr);
@@ -1267,7 +1267,7 @@ static struct page **__iom...
2019 May 08
4
[PATCH 05/10] s390/cio: introduce DMA pools to cio
...__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 *gp_dma, void *cpu_addr, size_t size)
> +{
> + if (!cpu_addr)
> + return;
> + memset(cpu_addr, 0, size);
Hm, normally I'd do the memset during alloc not during free - but maybe
this makes more sense here with your usecase in mind.
> @@ -1063,6 +1163,7 @@ static int __init css_bus_init(void)
> u...
2019 May 08
4
[PATCH 05/10] s390/cio: introduce DMA pools to cio
...__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 *gp_dma, void *cpu_addr, size_t size)
> +{
> + if (!cpu_addr)
> + return;
> + memset(cpu_addr, 0, size);
Hm, normally I'd do the memset during alloc not during free - but maybe
this makes more sense here with your usecase in mind.
> @@ -1063,6 +1163,7 @@ static int __init css_bus_init(void)
> u...
2015 May 01
5
[RFC 0/4] rpmsg: Fix init of DMA:able virtqueues
From: "Edgar E. Iglesias" <edgar.iglesias at xilinx.com>
I'm trying to run rpmsg and remoteproc on the ZynqMP (arm64) but I'm hitting
a DMA/mm error. The issue was discussed here:
http://lists.infradead.org/pipermail/linux-arm-kernel/2015-March/333050.html
Russel King pointed out that the arm64 is not doing anything wrong by
returning vmapped memory (which is incompatible
2015 May 01
5
[RFC 0/4] rpmsg: Fix init of DMA:able virtqueues
From: "Edgar E. Iglesias" <edgar.iglesias at xilinx.com>
I'm trying to run rpmsg and remoteproc on the ZynqMP (arm64) but I'm hitting
a DMA/mm error. The issue was discussed here:
http://lists.infradead.org/pipermail/linux-arm-kernel/2015-March/333050.html
Russel King pointed out that the arm64 is not doing anything wrong by
returning vmapped memory (which is incompatible
2015 May 07
0
[RFC 4/4] rpmsg: DMA map sgs passed to virtio
..., 1, msg, GFP_KERNEL);
> > if (err < 0) {
> > dev_err(dev, "failed to add a virtqueue buffer: %d\n", err);
> > return err;
> > @@ -1007,9 +1023,9 @@ static int rpmsg_probe(struct virtio_device *vdev)
> > struct scatterlist sg;
> > void *cpu_addr = vrp->rbufs + i * RPMSG_BUF_SIZE;
> >
> > - sg_init_one(&sg, cpu_addr, RPMSG_BUF_SIZE);
> > + rpmsg_msg_sg_init(vrp, &sg, cpu_addr, RPMSG_BUF_SIZE);
> >
> > - err = virtqueue_add_inbuf(vrp->rvq, &sg, 1, cpu_addr,
> > + err = dma_virtque...