[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <t2r1b68c6791003301840n8b3f94b7xdbf8ddc1fe0165ff@mail.gmail.com>
Date: Wed, 31 Mar 2010 10:40:57 +0900
From: jassi brar <jassisinghbrar@...il.com>
To: Ben Dooks <ben-linux@...ff.org>
Cc: Joonyoung Shim <jy0922.shim@...sung.com>,
linus.ml.walleij@...il.com, dan.j.williams@...el.com,
kyungmin.park@...sung.com, linux-arm-kernel@...ts.infradead.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] PL330: Add PL330 DMA controller driver
On Wed, Mar 31, 2010 at 10:07 AM, Ben Dooks <ben-linux@...ff.org> wrote:
> On Fri, Mar 26, 2010 at 11:08:06AM +0900, jassi brar wrote:
>> On Thu, Mar 25, 2010 at 12:17 PM, Joonyoung Shim
>> <jy0922.shim@...sung.com> wrote:
>> > +static struct pl330_desc *
>> > +pl330_alloc_descriptor(struct pl330_chan *pl330_ch, gfp_t flags)
>> > +{
>> > + struct device *dev = pl330_ch->pl330_dev->common.dev;
>> > + struct pl330_desc *desc;
>> > + dma_addr_t phys;
>> > +
>> > + desc = kzalloc(sizeof(*desc), flags);
>> > + if (!desc)
>> > + return NULL;
>> > +
>> > + desc->desc_pool_virt = dma_alloc_coherent(dev, PL330_POOL_SIZE, &phys,
>> > + flags);
>> These allocations are inefficient and don't need to be done so often.
>> My implementation allocates a pool of such buffers(size specified by
>> DMA API driver)
>> and manage them by simple pointer manipulation.
>> Though the xfer requests for DMA API has to be managed in the DMA API driver.
>
> There's a dma pool implementation too in the kernel.
I meant during 'probe' of the DMAC a chunk of dma consistent memory is allocated
for MicroCode for each channel.
We use the same chunk during xfers, since we can generate MC in a way that 256
bytes are enough to do xfer of 2.5MB at burst size of 1 byte and for
bulkier requests
the DMA API driver can either break the bigger request or allocate
bigger chunk for
the channels.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists