From: jy0922.shim@samsung.com (Joonyoung Shim)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2] PL330: Add PL330 DMA controller driver
Date: Thu, 25 Mar 2010 18:01:00 +0900 [thread overview]
Message-ID: <4BAB264C.2090502@samsung.com> (raw)
In-Reply-To: <20100325054430.165311fa@taxman.wild-wind.fr.eu.org>
On 3/25/2010 2:44 PM, Marc Zyngier wrote:
> On Thu, 25 Mar 2010 12:17:15 +0900
> Joonyoung Shim <jy0922.shim@samsung.com> wrote:
>
>> +/* instruction set functions */
>> +static inline int pl330_dmaaddh(u8 *desc_pool_virt, u16 imm, bool ra)
>> +{
>> + u8 opcode = DMAADDH | (ra << 1);
>> +
>> + writeb(opcode, desc_pool_virt++);
>
> desc_pool_virt is a virtual address (from dma_alloc_coherent). In such
> case, write[bwl] seems to be the wrong interface. I suggest the
> following code:
>
> *desc_pool_virt++ = opcode;
>
>> + writew(imm, desc_pool_virt);
>
Right. The write[bwl] is api for address ioremapped of io device. I will
change these.
> Does anything ensure that this won't generate an unaligned access?
>
PL330 DMA controller fetches variable length instructions that consist of
one to six bytes, so i think unaligned access is no problem.
>> + return 3;
>> +}
>
> M.
WARNING: multiple messages have this Message-ID (diff)
From: Joonyoung Shim <jy0922.shim@samsung.com>
To: Marc Zyngier <maz@misterjones.org>
Cc: dan.j.williams@intel.com, linus.ml.walleij@gmail.com,
kyungmin.park@samsung.com, linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v2] PL330: Add PL330 DMA controller driver
Date: Thu, 25 Mar 2010 18:01:00 +0900 [thread overview]
Message-ID: <4BAB264C.2090502@samsung.com> (raw)
In-Reply-To: <20100325054430.165311fa@taxman.wild-wind.fr.eu.org>
On 3/25/2010 2:44 PM, Marc Zyngier wrote:
> On Thu, 25 Mar 2010 12:17:15 +0900
> Joonyoung Shim <jy0922.shim@samsung.com> wrote:
>
>> +/* instruction set functions */
>> +static inline int pl330_dmaaddh(u8 *desc_pool_virt, u16 imm, bool ra)
>> +{
>> + u8 opcode = DMAADDH | (ra << 1);
>> +
>> + writeb(opcode, desc_pool_virt++);
>
> desc_pool_virt is a virtual address (from dma_alloc_coherent). In such
> case, write[bwl] seems to be the wrong interface. I suggest the
> following code:
>
> *desc_pool_virt++ = opcode;
>
>> + writew(imm, desc_pool_virt);
>
Right. The write[bwl] is api for address ioremapped of io device. I will
change these.
> Does anything ensure that this won't generate an unaligned access?
>
PL330 DMA controller fetches variable length instructions that consist of
one to six bytes, so i think unaligned access is no problem.
>> + return 3;
>> +}
>
> M.
next prev parent reply other threads:[~2010-03-25 9:01 UTC|newest]
Thread overview: 58+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-25 3:17 [PATCH v2] PL330: Add PL330 DMA controller driver Joonyoung Shim
2010-03-25 3:17 ` Joonyoung Shim
2010-03-25 5:34 ` jassi brar
2010-03-25 5:34 ` jassi brar
2010-03-25 8:30 ` Linus Walleij
2010-03-25 8:30 ` Linus Walleij
2010-03-25 12:17 ` jassi brar
2010-03-25 12:17 ` jassi brar
2010-03-25 15:13 ` Dan Williams
2010-03-25 15:13 ` Dan Williams
2010-03-25 22:27 ` jassi brar
2010-03-25 22:27 ` jassi brar
2010-03-25 23:12 ` Dan Williams
2010-03-25 23:12 ` Dan Williams
2010-03-25 23:59 ` jassi brar
2010-03-25 23:59 ` jassi brar
2010-03-26 0:29 ` Kyungmin Park
2010-03-26 0:29 ` Kyungmin Park
2010-03-26 0:48 ` jassi brar
2010-03-26 0:48 ` jassi brar
2010-03-26 0:54 ` Joonyoung Shim
2010-03-26 0:54 ` Joonyoung Shim
2010-03-26 1:01 ` jassi brar
2010-03-26 1:01 ` jassi brar
2010-03-25 15:20 ` Linus Walleij
2010-03-25 15:20 ` Linus Walleij
2010-03-25 22:36 ` jassi brar
2010-03-25 22:36 ` jassi brar
2010-04-01 5:34 ` jassi brar
2010-04-01 5:34 ` jassi brar
2010-04-01 23:23 ` Linus Walleij
2010-04-01 23:23 ` Linus Walleij
2010-04-02 1:38 ` jassi brar
2010-04-02 1:38 ` jassi brar
2010-04-17 7:06 ` Kyungmin Park
2010-04-17 7:06 ` Kyungmin Park
2010-04-19 1:14 ` jassi brar
2010-04-19 1:14 ` jassi brar
2010-03-25 5:44 ` Marc Zyngier
2010-03-25 5:44 ` Marc Zyngier
2010-03-25 9:01 ` Joonyoung Shim [this message]
2010-03-25 9:01 ` Joonyoung Shim
2010-03-25 9:32 ` Marc Zyngier
2010-03-25 9:32 ` Marc Zyngier
2010-03-25 10:05 ` Joonyoung Shim
2010-03-25 10:05 ` Joonyoung Shim
2010-03-25 10:32 ` Marc Zyngier
2010-03-25 10:32 ` Marc Zyngier
2010-03-25 11:48 ` Joonyoung Shim
2010-03-25 11:48 ` Joonyoung Shim
2010-03-25 8:26 ` Linus Walleij
2010-03-25 8:26 ` Linus Walleij
2010-03-26 2:08 ` jassi brar
2010-03-26 2:08 ` jassi brar
2010-03-31 1:07 ` Ben Dooks
2010-03-31 1:07 ` Ben Dooks
2010-03-31 1:40 ` jassi brar
2010-03-31 1:40 ` jassi brar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4BAB264C.2090502@samsung.com \
--to=jy0922.shim@samsung.com \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.