linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Barry Song <21cnbao@gmail.com>
To: Arnd Bergmann <arnd@arndb.de>
Cc: Ingo Molnar <mingo@elte.hu>,
	david@lang.hm, Russell King - ARM Linux <linux@arm.linux.org.uk>,
	Nicolas Pitre <nico@fluxnic.net>,
	Tony Lindgren <tony@atomide.com>,
	Catalin Marinas <catalin.marinas@arm.com>,
	lkml <linux-kernel@vger.kernel.org>,
	"H. Peter Anvin" <hpa@zytor.com>,
	David Brown <davidb@codeaurora.org>,
	linux-omap@vger.kernel.org,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [GIT PULL] omap changes for v2.6.39 merge window
Date: Tue, 5 Apr 2011 23:11:15 -0700	[thread overview]
Message-ID: <BANLkTimkHZ01LfRoOha79QPyRaaDKo7T-Q@mail.gmail.com> (raw)
In-Reply-To: <201104011554.07924.arnd@arndb.de>

2011/4/1 Arnd Bergmann <arnd@arndb.de>:
> On Friday 01 April 2011, Ingo Molnar wrote:
>> IMO the right answer is what Linus and Thomas outlined:
>>
>>    1) provide a small number of clean examples and clean abstractions
>>    2) to not pull new crap from that point on
>>    3) do this gradually but consistently
>>
>> I.e. make all your requirements technical and actionable - avoid sweeping,
>> impossible to meet requirements. Do not require people to clean up all of the
>> existing mess straight away (they cannot realistically do it), do not summarily
>> block the flow of patches, but be firm about drawing a line in the sand and be
>> firm about not introducing new mess in a gradually growing list of well-chosen
>> areas of focus.
>>
>> Rinse, repeat.
>
> I believe getting to point 1 is the hard part here. There are a lot of things
> that are wrong with the mach-* (and also plat-*) implementations, and I don't
> think we have one today that can really serve as an example. Most decisions
> made in there made a lot of sense when they were introduced, and declaring
> code that was perfectly acceptable yesterday to be unacceptable crap today
> is not going to be met with much understanding by the someone who just
> wants to add support for one more board to 100 already existing ones in the
> same SoC family.
>
> I would actually suggest a different much more radical start: Fork the way
> that platforms are managed today, and start an alternative way of setting
> up boards and devices together with the proven ARM core kernel infrastructure,
> based on these observations (please correct me if some of them they don't make
> sense):
>
> 1. The core arch code is not a problem (Russell does a great job here)
> 2. The platform specific code contains a lot of crap that doesn't belong there
>   (not enough reviewers to push back on crap)
> 3. The amount of crap in platform specfic files is growing exponentially,
>   despite the best efforts of a handful of people to clean it up.
> 4. Having one source file per board does not scale any more.
> 5. Discoverable hardware would solve this, but is not going to happen
>   in practice.
> 6. Board firmware would not solve this and is usually not present.
> 7. Boot loaders can not be trusted to pass valid information
> 8. Device tree blobs can solve a lot of the problems, and nobody has
>   come up with a better solution.

ARM BSP is still blasting! we are planning to merge our new ARM
cortex-a9 SoC into kernel. So I am just wondering whether traditional
ARM BSP way can still be accepted, or we must move to use device tree?
but i have't seen any arm device tree codes enter mainline yet. but we
can get those patches from linaro 2.6.38. So what's the plan for
merging arm device tree?

What i have seen is that the BSP architecture of different ARM SoC
companies is even different.

samsung has three levels:
plat-samsung
            plat-s3c24xx
                     mach-s3c2410
                     mach-s3c2440
            plat-s5p
                     mach-s5pv210
                     mach-s5pv310

TI has two levels:
plat-omap
            mach-omap1
            mach-omap2

Nvidia has one level:
mach-tegra

I didn't find any rule about what codes should be placed in what
directories. Different companies have different ways. It looks like
the only agreement is board files are in mach-xxx. Any suggestions for
that?

BTW, we don't want to "dick around", which Linus has been very angry.
we want to fix more issues this email pointed out before we send
patches.

> 9. All interesting work is going into a handful of platforms, all of which
>   are ARMv7 based.
> 10. We do not want to discontinue support for old boards that work fine.
> 11. Massive changes to existing platforms would cause massive breakage.
> 12. Supporting many different boards with a single kernel binary is a
>    useful goal.
> 13. Infrastructure code should be cross-platform, not duplicated across
>    platforms.
> 14. 32 bit ARM is hitting the wall in the next years (Cortex-A15 is
>    actually adding PAE support, which has failed to solve this on
>    other architectures).
> 15. We need to solve the platform problem before 64 bit support comes
>    and adds another dimension to the complexity.
>
> Based on these assumptions, my preferred strategy would be to a new
> mach-nocrap directory with a documented set of rules (to be adapted when
> necessary):
>
> * Strictly no crap
>  * No board files
>  * No hardcoded memory maps
>  * No lists of interrupts and GPIOs
> * All infrastructure added must be portable to all ARMv7 based SoCs.
>  (ARMv6 can be added later)
> * 64 bit safe code only.
> * SMP safe code only.
> * All board specific information must come from a device tree and
>  be run-time detected.
> * Must use the same device drivers as existing platforms
> * Should share platform drivers (interrupt controller, gpio, timer, ...)
>  with existing platforms where appropriate.
> * Code quality takes priority over stability in mach-nocrap, but must not
>  break other platforms.
>
> Until we have something working there, I think we should still generally
> allow new code to the existing platforms, and even new platforms to be
> added, while trying to keep the quality as high as possible but without
> changing the rules for them or doing any major treewide reworks.
>
> Once the mach-nocrap approach has turned into something usable, we can
> proceed on three fronts:
> 1. delete actively maintained boards from the other platforms once they
>   are no longer needed there
> 2. generalize concepts from mach-nocrap by applying them to all boards,
>   similar to the cleanup work that people have always been doing.
> 3. gradually make the rules for adding new code in other platforms stricter,
>   up to the point where they are bugfix only.
>
>> If companies do not 'bother to push upstream', then management will eventually
>> notice negative economic consequences:
>>
>> ...
>
> Good points, I fully agree with these. I also think that the SoC companies
> are actually understanding this nowadays, and that is exactly the reason
> why we see so much code getting pushed in.
>
>        Arnd
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  parent reply	other threads:[~2011-04-06  6:11 UTC|newest]

Thread overview: 159+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-17 18:30 [GIT PULL] omap changes for v2.6.39 merge window Tony Lindgren
2011-03-18  2:50 ` Linus Torvalds
2011-03-18  7:06   ` Tony Lindgren
2011-03-18 10:15   ` Russell King - ARM Linux
2011-03-18 11:13     ` Uwe Kleine-König
2011-03-30 17:06     ` Arnd Bergmann
2011-03-30 19:21       ` Linus Torvalds
2011-03-30 20:41         ` Nicolas Pitre
2011-03-30 21:02           ` Linus Torvalds
2011-03-30 23:31             ` Nicolas Pitre
2011-03-30 23:59               ` Russell King - ARM Linux
2011-03-31  0:15                 ` Tony Lindgren
2011-03-31  0:31               ` Bill Gatliff
2011-03-31  0:39               ` david
2011-03-31  3:17                 ` Nicolas Pitre
2011-03-31  3:29                   ` Dave Airlie
2011-03-31  4:38                     ` Nicolas Pitre
2011-03-31  9:54                       ` Alan Cox
2011-03-31 10:50                         ` Russell King - ARM Linux
2011-03-31 12:23                           ` Jean-Christophe PLAGNIOL-VILLARD
2011-03-31 12:38                           ` Catalin Marinas
2011-03-31 13:01                             ` Russell King - ARM Linux
2011-03-31 14:55                               ` Bill Gatliff
2011-04-01 12:41                                 ` Arnd Bergmann
2011-03-31 18:12                               ` Sam Ravnborg
2011-03-31 18:17                                 ` Russell King - ARM Linux
2011-03-31 18:34                                   ` Jesse Barnes
2011-03-31 13:54                           ` Thomas Gleixner
2011-03-31 17:22                           ` david
2011-03-31 18:08                             ` Koen Kooi
2011-03-31  5:05                   ` david
2011-03-31  7:15                     ` Nicolas Pitre
2011-03-31  8:06                       ` Ingo Molnar
2011-03-31  8:30                         ` Russell King - ARM Linux
2011-03-31 10:41                           ` Ingo Molnar
2011-03-31 13:25                             ` Russell King - ARM Linux
2011-03-31 12:04                           ` Thomas Gleixner
2011-03-31 14:43                             ` Kevin Hilman
2011-03-31 15:01                               ` Thomas Gleixner
2011-03-31 15:05                                 ` Russell King - ARM Linux
2011-03-31 15:45                                   ` david
2011-03-31 15:23                               ` Arnd Bergmann
2011-03-31 16:58                                 ` Thomas Gleixner
2011-03-31 18:23                                   ` Nicolas Pitre
2011-03-31 18:55                                     ` Thomas Gleixner
2011-04-01 11:32                                   ` Arnd Bergmann
2011-03-31 20:35                                 ` Kevin Hilman
2011-04-01 11:29                                   ` Arnd Bergmann
2011-04-01  7:32                                 ` Tomi Valkeinen
2011-04-01 11:22                                   ` Arnd Bergmann
2011-04-01 11:55                                     ` Tomi Valkeinen
2011-04-01 12:07                                       ` Arnd Bergmann
2011-04-01 12:15                                         ` Tomi Valkeinen
2011-03-31 16:03                           ` david
2011-03-31 16:45                             ` Russell King - ARM Linux
2011-03-31 17:17                               ` Linus Torvalds
2011-03-31 19:25                                 ` Nicolas Pitre
2011-03-31 20:05                                   ` Linus Torvalds
2011-03-31 20:28                                     ` Linus Torvalds
2011-03-31 22:49                                     ` Nicolas Pitre
2011-04-01  0:53                                       ` Mark Brown
2011-04-01  4:50                                       ` David Brown
2011-04-01  7:45                                         ` Ingo Molnar
2011-04-01 13:54                                           ` Arnd Bergmann
     [not found]                                             ` <4D95E112.4020400@vollmann.ch>
2011-04-01 14:59                                               ` Arnd Bergmann
     [not found]                                                 ` <4D95EF8E.9080902@vollmann.ch>
2011-04-01 15:50                                                   ` Arnd Bergmann
2011-04-01 17:44                                                     ` Russell King - ARM Linux
2011-04-01 19:54                                                     ` Nicolas Pitre
2011-04-01 21:00                                                       ` Uwe Kleine-König
2011-04-01 22:08                                                       ` Arnd Bergmann
2011-04-02  2:24                                                         ` Nicolas Pitre
2011-04-03 15:26                                                           ` Arnd Bergmann
2011-04-03 16:03                                                             ` Russell King - ARM Linux
2011-04-04  0:59                                                               ` Arnd Bergmann
2011-04-04  8:26                                                                 ` Marc Zyngier
2011-04-04 11:03                                                                 ` Catalin Marinas
2011-04-04 11:21                                                                   ` Russell King - ARM Linux
2011-04-04 13:24                                                                     ` Marc Zyngier
2011-04-04 13:31                                                                       ` Russell King - ARM Linux
2011-04-04 13:57                                                                         ` Marc Zyngier
2011-04-04 20:08                                                                           ` Linus Walleij
2011-04-05  6:40                                                                             ` Santosh Shilimkar
2011-04-05  7:45                                                                               ` Russell King - ARM Linux
2011-04-05 14:15                                                                                 ` Catalin Marinas
2011-04-05 22:16                                                                               ` Linus Walleij
2011-04-06  6:43                                                                                 ` Santosh Shilimkar
2011-04-05 22:22                                                                               ` Linus Walleij
2011-04-06  6:41                                                                                 ` Santosh Shilimkar
2011-04-05  7:30                                                                             ` Marc Zyngier
2011-05-26 13:38                                                               ` Pavel Machek
2011-04-02  2:59                                                       ` Mark Brown
2011-04-04  5:16                                                   ` Jean-Christophe PLAGNIOL-VILLARD
2011-04-04  9:27                                                   ` Nicolas Ferre
2011-04-01 21:10                                                 ` Kevin Hilman
2011-04-01 21:32                                                   ` Arnd Bergmann
2011-04-01 21:51                                                     ` Catalin Marinas
2011-04-03 22:18                                               ` Benjamin Herrenschmidt
2011-04-04  0:14                                                 ` Arnd Bergmann
2011-04-04  2:49                                                 ` Nicolas Pitre
2011-04-01 15:27                                             ` Will Deacon
2011-04-01 15:55                                               ` Arnd Bergmann
2011-04-01 16:39                                                 ` Linus Torvalds
2011-04-03 22:26                                                   ` Benjamin Herrenschmidt
2011-04-05 23:19                                                   ` Linus Walleij
2011-04-06  8:41                                                     ` Catalin Marinas
2011-04-07  1:44                                                       ` Arnd Bergmann
2011-04-01 20:19                                                 ` Nicolas Pitre
2011-04-02  4:38                                                   ` Richard Cochran
2011-04-02  3:27                                                 ` Mark Brown
2011-04-06  6:11                                             ` Barry Song [this message]
2011-04-06  7:31                                               ` Bryan Wu
2011-03-31 21:40                                   ` Thomas Gleixner
2011-03-31 17:56                             ` Nicolas Pitre
2011-03-31 18:34                               ` Thomas Gleixner
2011-03-31 19:02                               ` Linus Torvalds
2011-03-31  8:09                     ` Russell King - ARM Linux
2011-03-31 10:49                       ` Felipe Balbi
2011-03-31 18:00                       ` Alexander Holler
2011-03-31  5:45               ` Geert Uytterhoeven
2011-03-31  7:21                 ` Nicolas Pitre
2011-03-30 22:08           ` Tony Lindgren
2011-03-30 21:10         ` Thomas Gleixner
2011-03-30 21:54           ` Tony Lindgren
2011-03-30 22:25             ` Thomas Gleixner
2011-03-30 22:45               ` Tony Lindgren
2011-03-30 22:56                 ` Thomas Gleixner
2011-04-01  1:42                   ` Mark Brown
2011-03-30 22:38             ` Paul E. McKenney
2011-03-30 22:47               ` Tony Lindgren
2011-03-30 23:13                 ` Paul E. McKenney
2011-03-30 23:14                 ` Thomas Gleixner
2011-03-30 23:28                   ` Tony Lindgren
2011-03-31 11:00           ` Artem Bityutskiy
2011-03-31 13:54             ` Arnd Bergmann
2011-03-30 21:44         ` Tony Lindgren
2011-03-30 22:20           ` Linus Torvalds
2011-03-30 22:39             ` Tony Lindgren
2011-03-31  0:15         ` Russell King - ARM Linux
2011-03-31  0:55           ` Linus Torvalds
2011-03-31  1:15             ` Bill Gatliff
2011-03-31  1:37               ` Linus Torvalds
2011-03-31  1:44                 ` Bill Gatliff
2011-03-31  1:56                   ` Linus Torvalds
2011-03-31  2:20                     ` Bill Gatliff
2011-03-31  3:24                       ` Linus Torvalds
2011-03-31  6:42                         ` Olof Johansson
2011-03-31  6:56                         ` David Brown
2011-03-31 11:27                         ` Felipe Balbi
2011-03-31 13:39                 ` Thomas Gleixner
2011-03-31  4:09             ` Nicolas Pitre
2011-03-31 10:11               ` Thomas Gleixner
2011-03-30 21:07       ` Russell King - ARM Linux
2011-03-30 22:14         ` Tony Lindgren
2011-04-01  1:17           ` Mark Brown
2011-04-01 14:17         ` Arnd Bergmann
2011-03-18  3:02 ` Linus Torvalds
2011-03-18  7:09   ` Tony Lindgren
2011-03-18  8:06     ` Ohad Ben-Cohen
2011-03-18 23:43       ` Tony Lindgren

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=BANLkTimkHZ01LfRoOha79QPyRaaDKo7T-Q@mail.gmail.com \
    --to=21cnbao@gmail.com \
    --cc=arnd@arndb.de \
    --cc=catalin.marinas@arm.com \
    --cc=david@lang.hm \
    --cc=davidb@codeaurora.org \
    --cc=hpa@zytor.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=mingo@elte.hu \
    --cc=nico@fluxnic.net \
    --cc=tglx@linutronix.de \
    --cc=tony@atomide.com \
    --cc=torvalds@linux-foundation.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).