On Fri, Jan 23, 2009 at 11:05:38PM +0300, Sergei Shtylyov wrote: > Hello. > > Mark A. Greer wrote: > >> On the cost side of the equation, things are going to be messier in >> mach-davinci because there will now be parallel files (e.g., a davinci >> devices.c file and a da8xx devices.c file, a davinci irq.c >> file and a da8xx irq.c file). > > There won't be DA8xx irq.c file as cp_intc is not specific to DA8xx.
Okay. I think we're speaking in generalities mostly but you are correct. >> A somewhat related point, use of cpu_is_*. I think it would be smarter >> to factor out the use of those calls as much as you can. If you had one >> overall board.c file that did the cpu_is_*'s and hooked up the correct >> device data, platform_data, etc. (or called a routine in an SoC specific >> file that did the hooking up). It would make the code more modular, >> easier to follow, and easier to add support for new variants. > >> It would also allow you to alloc space for and copy the necessary data >> and make the structs that now can't be __initdata, __initdata. > > With the static data being turning into dynamic, what's the win of > converting to __initdata? Lets say each board has 1KB of static data and there are 10 boards. That's 10KB of static data but only 1KB is useful. If you figure out what board the kernel is running on, alloc 1KB of space, copy the correct 1KB of static data to it during init time, reference the copied data and not the original static data, you can make the static data __initdata and it'll disappear. You still have the data that you need and you save 9KB. Mark -- _______________________________________________ Davinci-linux-open-source mailing list [email protected] http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source
