linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: linux@arm.linux.org.uk (Russell King - ARM Linux)
To: linux-arm-kernel@lists.infradead.org
Subject: [RFC PATCH] Consolidate SRAM support
Date: Fri, 15 Apr 2011 16:37:23 +0100	[thread overview]
Message-ID: <20110415153723.GD4423@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <4DA85B49.60209@vollmann.ch>

On Fri, Apr 15, 2011 at 04:50:49PM +0200, Detlef Vollmann wrote:
> I'd love to have the mapping inside the create pool, but that might
> not be possible in general.

No, think about it.  What if you need to map the RAM area with some
special attributes - eg, where ioremap() doesn't work.  Eg, OMAP you
need SRAM mapped as normal memory, except for OMAP34xx where it must
be mapped normal memory non-cacheable.

It's best to leave the mapping to the architecture.

>> Another question is whether we should allow multiple SRAM pools or not -
>> this code does allow multiple pools, but so far we only have one pool
>> per SoC.  Overdesign?  Maybe, but it prevents SoCs wanting to duplicate
>> it if they want to partition the SRAM, or have peripheral-local SRAMs.
> Having the option to partition the SRAM is probably useful.
> What I'm missing is sram_pool_add: on AT91SAM9G20 you have two banks
> of SRAM, and you might want to combine them into a single pool.

Do you already combine them into a single pool, or is this a wishlist?
I'm really not interested in sorting out peoples wishlist items in
the process of consolidation.

Second point is that you'll notice that the code converts to a phys
address using this: phys = phys_base + (virt - virt_base).  As soon as
we start allowing multiple regions of SRAM, it becomes impossible to
provide the phys address without a lot more complexity.

>>   arch/arm/common/sram-pool.c                 |   69 +++++++++++++++++++++++++++
>>   arch/arm/include/asm/sram-pool.h            |   20 ++++++++
> Waht is ARM specific about this code?
> Why not put it into lib/ and include/linux, respectively?

Nothing, but this is the first stage of consolidation of this code.
I'm not trying to consolidate the universe down to one implementation
here - that's going to take _far_ too much effort in one go, and from
my previous experiences interacting with other arch maintainers, that's
the way to get precisely nothing done.

In my experience, arch maintainers tend to object to each others patches,
and the net result is no forward progress.  See dma_mmap API as a
brilliant example of that - the lack of which contines to cause problems
for drivers many years after I initially tried (and gave up) trying to
get agreement on that.

So, let's do what we can to consolidate our stuff and if we get some
agreement from other arch maintainers, look towards moving it out.
Moving stuff out once its properly modularized is trivial.

  reply	other threads:[~2011-04-15 15:37 UTC|newest]

Thread overview: 83+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-15 13:06 [RFC PATCH] Consolidate SRAM support Russell King - ARM Linux
2011-04-15 13:39 ` Rob Herring
2011-04-15 14:02   ` Ithamar R. Adema
2011-04-15 14:40   ` Arnd Bergmann
2011-04-15 15:26     ` Russell King - ARM Linux
2011-04-15 15:32       ` Grant Likely
2011-04-15 15:41         ` Russell King - ARM Linux
2011-04-16  4:11           ` Magnus Damm
2011-04-17 17:47           ` Arnd Bergmann
2011-04-15 16:03   ` Russell King - ARM Linux
2011-04-15 16:18     ` Nguyen Dinh-R00091
2011-04-15 16:20       ` Russell King - ARM Linux
2011-04-15 16:58         ` Russell King - ARM Linux
2011-04-15 19:20           ` Nguyen Dinh-R00091
2011-04-15 19:40             ` Russell King - ARM Linux
2011-04-15 20:06               ` Nguyen Dinh-R00091
2011-04-15 13:52 ` Eduardo Valentin
2011-04-15 15:24   ` Russell King - ARM Linux
2011-04-15 14:50 ` Detlef Vollmann
2011-04-15 15:37   ` Russell King - ARM Linux [this message]
2011-04-15 18:12     ` Detlef Vollmann
2011-04-15 18:21       ` Russell King - ARM Linux
2011-04-15 16:04   ` Nicolas Ferre
2011-04-15 18:14     ` Detlef Vollmann
2011-04-16 11:27       ` Detlef Vollmann
2011-04-15 18:31 ` Jean-Christophe PLAGNIOL-VILLARD
2011-04-15 18:38   ` [PATCH 1/2] at91: 9260 and 9g20 add support of join SRAM Memory Mapping Jean-Christophe PLAGNIOL-VILLARD
2011-04-15 18:39   ` [PATCH 2/2] at91: add generic allocator support for sram Jean-Christophe PLAGNIOL-VILLARD
2011-04-15 20:11 ` [RFC PATCH] Consolidate SRAM support Uwe Kleine-König
2011-04-15 20:19   ` Russell King - ARM Linux
2011-04-15 20:22     ` Uwe Kleine-König
2011-04-16 13:01 ` Haojian Zhuang
2011-04-16 13:09   ` Russell King - ARM Linux
2011-04-18  6:48     ` Tony Lindgren
2011-04-18  7:00       ` Tomi Valkeinen
2011-04-18  8:17         ` Tony Lindgren
2011-04-19 14:16           ` Tomi Valkeinen
2011-04-20  5:27             ` Tony Lindgren
2011-04-18  8:52 ` [RFC PATCH v2] " Russell King - ARM Linux
2011-04-18  9:31   ` Haojian Zhuang
2011-04-18 11:33   ` Tony Lindgren
2011-04-18 13:50   ` Detlef Vollmann
2011-04-18 16:12   ` Nori, Sekhar
2011-04-18 16:18     ` Russell King - ARM Linux
2011-04-19 16:01   ` Jean-Christophe PLAGNIOL-VILLARD
2011-04-19 16:18     ` Russell King - ARM Linux
2011-04-19 19:05       ` Jean-Christophe PLAGNIOL-VILLARD
2011-04-19 23:20         ` Russell King - ARM Linux
2011-04-20  4:06           ` Jean-Christophe PLAGNIOL-VILLARD
2011-04-19  1:23 ` [RFC PATCH] " Linus Walleij
2011-05-12 17:45 ` [RFC PATCH v3] " Russell King - ARM Linux
2011-05-12 18:35   ` Jean-Christophe PLAGNIOL-VILLARD
2011-05-13  7:30   ` Jean Pihet
2011-05-13  9:11     ` Russell King - ARM Linux
2011-05-13  9:25       ` Jean Pihet
2011-05-13  9:19   ` Santosh Shilimkar
2011-05-17 13:06   ` Nori, Sekhar
2011-05-17 21:41     ` [PATCH 0/9] Ben Gardiner
2011-05-17 21:41       ` [PATCH 1/9] davinci: pm: fix compiler errors and kernel panics from sram consolidation Ben Gardiner
2011-05-17 21:41       ` [PATCH 2/9] davinci: sram: ioremap the davinci_soc_info specified sram regions Ben Gardiner
2011-05-18  4:51         ` Jean-Christophe PLAGNIOL-VILLARD
2011-05-18 12:11           ` Nori, Sekhar
2011-05-18 12:14             ` Russell King - ARM Linux
2011-05-18 15:58               ` Jean-Christophe PLAGNIOL-VILLARD
2011-05-25 23:16                 ` Jean-Christophe PLAGNIOL-VILLARD
2011-05-18 13:18         ` Nori, Sekhar
2011-05-18 13:36           ` Ben Gardiner
2011-05-17 21:41       ` [PATCH 3/9] davinci: da850: remove the SRAM_VIRT iotable entry Ben Gardiner
2011-05-17 21:42       ` [PATCH 4/9] davinci: dm355: " Ben Gardiner
2011-05-17 21:42       ` [PATCH 5/9] davinci: dm365: " Ben Gardiner
2011-05-17 21:42       ` [PATCH 6/9] davinci: dm644x: " Ben Gardiner
2011-05-17 21:42       ` [PATCH 7/9] davinci: dm646x: " Ben Gardiner
2011-05-17 21:42       ` [PATCH 8/9] davinci: remove definition of SRAM_VIRT Ben Gardiner
2011-05-18 10:40         ` Sergei Shtylyov
2011-05-17 21:42       ` [PATCH 9/9] davinci: da850: changed SRAM allocator to shared ram Ben Gardiner
2011-05-18 10:29         ` Sergei Shtylyov
2011-05-18 12:33           ` Ben Gardiner
2011-05-26  1:02   ` [RFC PATCH v4] Consolidate SRAM support Jean-Christophe PLAGNIOL-VILLARD
2011-05-31 17:09     ` Nori, Sekhar
2011-05-31 21:21       ` Russell King - ARM Linux
2011-06-29 13:12     ` Nori, Sekhar
2011-07-08 16:51     ` Nori, Sekhar
2011-07-08 16:58       ` Nori, Sekhar

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=20110415153723.GD4423@n2100.arm.linux.org.uk \
    --to=linux@arm.linux.org.uk \
    --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 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).