mach header files

Arnd Bergmann arnd at arndb.de
Fri Apr 4 11:49:58 PDT 2014


On Friday 04 April 2014 14:01:43 Kent Borg wrote:
> On 04/04/2014 09:24 AM, Arnd Bergmann wrote:
> > Basically at this point we expect zero code in arch/arm/mach-* for a 
> > new platform. 
> 
> I am in a position similar to Phil's, bringing up Linux on emulated 
> hardware. And obviously I look at existing code to see how things are done.
> 
> What is the cleanest look-here-first, least mach-code, SMP example for 
> me to try to slavishly copy?

The trouble with examples here is that the good ones are those
without any code, which is harder to copy than the bad ones ;-)

mach-sunxi is a rather good example, since it was added only
recently. Note that the platsmp.c code in there is only used
for the sun6i variant, which doesn't have a boot loader
implementing the PSCI SMP code yet. IIRC sun7i does this right,
so the .smp pointer is empty.

Most of the code in mach-sunxi is actually just the system-restart
implementation, and my feeling is that this should just be moved
into the watchdog timer driver (there is still some discussion
about that).

Once these things are both done, you can boot a sunxi machine
without any code in mach-sunxi.

An ideal example is mach-moxart, which has zero code.

Can you say what platform you are working on? If I can see
your code, that would make it easier to give you advice.

	Arnd



More information about the linux-arm-kernel mailing list