From mboxrd@z Thu Jan 1 00:00:00 1970 From: tony@atomide.com (Tony Lindgren) Date: Tue, 14 Feb 2012 12:43:39 -0800 Subject: [PATCH 00/15] mach/io.h cleanup and removal In-Reply-To: <4F3AB8FE.2060704@gmail.com> References: <1329169408-17253-1-git-send-email-robherring2@gmail.com> <4F39D2EE.80806@gmail.com> <20120214172423.GO1426@atomide.com> <201202141757.03748.arnd@arndb.de> <4F3AB8FE.2060704@gmail.com> Message-ID: <20120214204339.GV1426@atomide.com> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org * Rob Herring [120214 11:10]: > On 02/14/2012 11:57 AM, Arnd Bergmann wrote: > > On Tuesday 14 February 2012, Tony Lindgren wrote: > >> Yes should be just the legacy drivers needing this for most part, > >> so that's currently most of omap1 drivers for us. > >> > >> Anyways I'm using plat/omap-iomap.h for the name, so if somebody > >> has better ideas for naming to avoid further search and replace > >> later on, let me know. > >> > >> I guess in the long run we could have > >> > >> #include > >> > >> instead of > >> > >> #include > >> > >> as the plat can't be used for multi-subarch builds. > > > > I think it /could/ be used, we just need to make a definite > > decision which way we want to go for header files that > > are defined by a platform and used by code outside of that > > platform such as device drivers. > > > > The two main approaches that I can see are > > > > a) make every header file name unique for platforms that you want to > > build together, and just add every path at the compiler command line. > > Not too much work, but somewhat error prone when you start having > > file name conflicts. > > > > b) move all platform specific header files into a directory named after > > the platform and change all device drivers using this. Lots of work, but > > probably better in the long run. > > > > c) Don't allow mach includes in drivers and sound dirs for > multi-platform kernels. This is already the case for any multi-arch > driver. A lot of the headers are platform_data structs or things that > should be cleaned up or need common infrastructure. Some cases I've > found seem like the include is unnecessary. Also, just fixing up the > name or path is no guarantee of avoiding namespace collisions. Out of the three options c) makes most sense for multi-subarch kernels. And that avoids having to sort out the name collisions with defines. For dealing with legacy platforms, I too would prefer b). Regards, Tony