All of lore.kernel.org
 help / color / mirror / Atom feed
From: m.szyprowski@samsung.com (Marek Szyprowski)
To: linux-arm-kernel@lists.infradead.org
Subject: [RFC/PATCH v2 2/2] drivers: dma-contiguous: add initialization from device tree
Date: Tue, 30 Apr 2013 10:53:55 +0200	[thread overview]
Message-ID: <517F86A3.6040104@samsung.com> (raw)
In-Reply-To: <CAO1A-8DiZoMVGcjOqK6VYP5Qito55i=gsKApQM=LGbQVx3iCwg@mail.gmail.com>

Hello,

On 4/29/2013 11:21 PM, Marc C wrote:
> >  /**
> >   * dma_contiguous_reserve() - reserve area(s) for contiguous memory handling
> >   * @limit: End address of the reserved memory (optional, 0 for any).
> > @@ -149,6 +200,10 @@ void __init dma_contiguous_reserve(phys_addr_t limit)
> >
> >         pr_debug("%s(limit %08lx)\n", __func__, (unsigned long)limit);
> >
> > +#ifdef CONFIG_OF
> > +       of_scan_flat_dt(cma_fdt_scan, NULL);
> > +#endif
> > +
>
> What is your expectation with the contention between default region
> setup via the kernel config (CONFIG_CMA_SIZE_SEL_*) and via the DT?
> Could the call to 'of_scan_flat_dt()' be done before the setup of the
> kernel config early regions, followed by a return code check
> 'fail-over' scheme, or were you intending for the default region
> setups to be mutually-exclusive?

In the proposed patch the default/global cma region setup from device tree
had higher priority than kernel command line parameter and .config saved 
values,
but now as I think of this, it looks that it would make more sense to 
have the
following priority for setting up the default cma region:

1. kernel cmd line - if not available, then use:
2. device tree - if not available, then use:
3. kernel compiled .config

I will update this in the next version of the CMA DT patches.

Best regards
-- 
Marek Szyprowski
Samsung Poland R&D Center

WARNING: multiple messages have this Message-ID (diff)
From: Marek Szyprowski <m.szyprowski-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
To: Marc C <marc.ceeeee-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: Sascha Hauer <s.hauer-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>,
	devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org,
	Nishanth Peethambaran
	<nishanth.p-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	Michal Nazarewicz
	<mina86-deATy8a+UHjQT0dZR+AlfA@public.gmane.org>,
	linaro-mm-sig-cunTk1MwBs8s++Sfvej+rw@public.gmane.org,
	Kyungmin Park
	<kyungmin.park-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>,
	Sylwester Nawrocki
	<s.nawrocki-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
Subject: Re: [RFC/PATCH v2 2/2] drivers: dma-contiguous: add initialization from device tree
Date: Tue, 30 Apr 2013 10:53:55 +0200	[thread overview]
Message-ID: <517F86A3.6040104@samsung.com> (raw)
In-Reply-To: <CAO1A-8DiZoMVGcjOqK6VYP5Qito55i=gsKApQM=LGbQVx3iCwg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>

Hello,

On 4/29/2013 11:21 PM, Marc C wrote:
> >  /**
> >   * dma_contiguous_reserve() - reserve area(s) for contiguous memory handling
> >   * @limit: End address of the reserved memory (optional, 0 for any).
> > @@ -149,6 +200,10 @@ void __init dma_contiguous_reserve(phys_addr_t limit)
> >
> >         pr_debug("%s(limit %08lx)\n", __func__, (unsigned long)limit);
> >
> > +#ifdef CONFIG_OF
> > +       of_scan_flat_dt(cma_fdt_scan, NULL);
> > +#endif
> > +
>
> What is your expectation with the contention between default region
> setup via the kernel config (CONFIG_CMA_SIZE_SEL_*) and via the DT?
> Could the call to 'of_scan_flat_dt()' be done before the setup of the
> kernel config early regions, followed by a return code check
> 'fail-over' scheme, or were you intending for the default region
> setups to be mutually-exclusive?

In the proposed patch the default/global cma region setup from device tree
had higher priority than kernel command line parameter and .config saved 
values,
but now as I think of this, it looks that it would make more sense to 
have the
following priority for setting up the default cma region:

1. kernel cmd line - if not available, then use:
2. device tree - if not available, then use:
3. kernel compiled .config

I will update this in the next version of the CMA DT patches.

Best regards
-- 
Marek Szyprowski
Samsung Poland R&D Center

  reply	other threads:[~2013-04-30  8:53 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-11 11:22 [RFC/PATCH v2 0/2] Device Tree support for CMA (Contiguous Memory Allocator) Marek Szyprowski
2013-04-11 11:22 ` Marek Szyprowski
2013-04-11 11:22 ` [RFC/PATCH v2 1/2] drivers: dma-contiguous: clean source code and prepare for device tree Marek Szyprowski
2013-04-11 11:22   ` Marek Szyprowski
2013-04-11 11:22 ` [RFC/PATCH v2 2/2] drivers: dma-contiguous: add initialization from " Marek Szyprowski
2013-04-11 11:22   ` Marek Szyprowski
2013-04-11 17:56   ` Laura Abbott
2013-04-11 17:56     ` Laura Abbott
2013-04-12 12:28     ` Marek Szyprowski
2013-04-12 12:28       ` Marek Szyprowski
2013-04-24 10:30   ` [Linaro-mm-sig] " Francesco Lavra
2013-04-24 10:30     ` Francesco Lavra
2013-04-29 21:21   ` Marc C
2013-04-29 21:21     ` Marc C
2013-04-30  8:53     ` Marek Szyprowski [this message]
2013-04-30  8:53       ` Marek Szyprowski

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=517F86A3.6040104@samsung.com \
    --to=m.szyprowski@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.