From: Geert Uytterhoeven <geert@linux-m68k.org>
To: linux-sh@vger.kernel.org
Subject: Re: [PATCH 01/02] ARM: shmobile: Add shared R-Car Gen2 CMA reservation code
Date: Tue, 10 Jun 2014 07:19:58 +0000 [thread overview]
Message-ID: <CAMuHMdWoR_PCa6zgRWVCJcxudJwq3HU7CVboELUULxUBwjvevg@mail.gmail.com> (raw)
In-Reply-To: <20140306032824.10814.21953.sendpatchset@w520>
Hi Magnus,
On Mon, Jun 9, 2014 at 2:38 PM, Magnus Damm <magnus.damm@gmail.com> wrote:
> --- 0001/arch/arm/mach-shmobile/setup-rcar-gen2.c
> +++ work/arch/arm/mach-shmobile/setup-rcar-gen2.c 2014-06-09 21:01:33.000000000 +0900
> +static int __init rcar_gen2_scan_mem(unsigned long node, const char *uname,
> + int depth, void *data)
> +{
> + u64 lpae_start = (u64)1 << 32;
Casts are evil:
1ULL << 32
(I hope one day gcc will gain a "-Wcast" option, so we can easily find and
inspect all casts, as C-style casts are much more difficult to grep for than
C++-style casts).
> + /* We are scanning "memory" nodes only */
> + if (type = NULL) {
> + /*
> + * The longtrail doesn't have a device_type on the
> + * /memory node, so look for the node called /memory@0.
> + */
> + if (depth != 1 || strcmp(uname, "memory@0") != 0)
> + return 0;
AFAIK Open Firmware in the LongTrail does not support plugging in ARM CPUs
in its PPC 603e/604e-compatible CPU socket ;-)
> +struct cma *rcar_gen2_dma_contiguous;
> +
> +void __init rcar_gen2_reserve(void)
> +{
> +#ifdef CONFIG_DMA_CMA
> + if (mrc.size)
> + dma_contiguous_reserve_area(mrc.size, mrc.base, 0,
> + &rcar_gen2_dma_contiguous);
> +#endif
I assume one day rcar_gen2_dma_contiguous will become used?
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
next prev parent reply other threads:[~2014-06-10 7:19 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-06 3:28 [PATCH 00/02] ARM: shmobile: Consolidate early delay setup code Magnus Damm
2014-03-06 3:28 ` [PATCH 01/02] ARM: shmobile: Add shared shmobile_init_delay() Magnus Damm
2014-03-07 0:00 ` Simon Horman
2014-03-07 1:48 ` Simon Horman
2014-06-09 12:38 ` [PATCH 01/02] ARM: shmobile: Add shared R-Car Gen2 CMA reservation code Magnus Damm
2014-06-10 7:19 ` Geert Uytterhoeven [this message]
2014-06-10 10:51 ` Magnus Damm
2014-06-10 23:40 ` Simon Horman
2014-03-06 3:28 ` [PATCH 02/02] ARM: shmobile: Use shmobile_init_delay() on r8a7791/Koelsch Magnus Damm
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=CAMuHMdWoR_PCa6zgRWVCJcxudJwq3HU7CVboELUULxUBwjvevg@mail.gmail.com \
--to=geert@linux-m68k.org \
--cc=linux-sh@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).