On 07/03/2013 08:51 AM, Chen Gang wrote: > On 07/02/2013 06:57 PM, Geert Uytterhoeven wrote: >> On Tue, Jul 2, 2013 at 10:00 AM, Chen Gang <gang.c...@asianux.com> wrote: >>>> On 07/02/2013 03:19 PM, Geert Uytterhoeven wrote: >>>>>> On Tue, Jul 2, 2013 at 4:13 AM, Chen Gang <gang.c...@asianux.com> wrote: >>>>>>>>>> 'asm-generic' need provide necessary configuration checking, if can't >>>>>>>>>> pass checking, 'asm-generic' shouldn't implement it. >>>>>>>>>> >>>>>>>>>> For 'COMPILE_TEST', according to its help contents, 'asm-generic' >>>>>>>>>> need >>>>>>>>>> let it pass configuration checking, and provide related dummy >>>>>>>>>> contents >>>>>>>>>> for it. >>>>>>>>>> >>>>>>>>>> Part of 'COMPLE_TEST' help contents in "init/Kconfig": >>>>>>>>>> >>>>>>>>>> "...Despite they cannot be loaded there (or even when they load >>>>>>>>>> they cannot be used due to missing HW support)..." >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> Signed-off-by: Chen Gang <gang.c...@asianux.com> >>>>>> NAKed-by: Geert Uytterhoeven <ge...@linux-m68k.org> >>>>>> >>>>>> Please don't clutter the code with checks for CONFIG_COMPILE_TEST. >>>> >>>> Do you mean: 'asm-generic' should not support 'COMPILE_TEST' (the >>>> platform should not support 'COMPILE_TEST") ? >>>> >>>> Or you mean: 'COMPILE_TEST' should not exist in kernel ? >> I mean that COMPILE_TEST should exist in Kconfig files only. >> It's only meant to have more compile coverage, not to "fix" (through #ifdef) >> more code to make it compile. > > If so, can we allow the module to 'COMPILE_TEST' under one platform > which not support the related HW ? > > e.g. "...Despite they cannot be loaded there (or even when they load > they cannot be used due to missing HW support)...". > > > 'asm-generic' need provide generic layer to users (both architecture > guys and module guys). > > So for 'default', it can depend on some conditions (e.g. HW support); > but for 'generic', it need try to be independent from any conditions. > > And it is also necessary for 'generic' to provide the configuration > checking features, but this checking must be no negative effect (or > consistent) with its 'generic' services. > > So it is necessary to check 'NOMMU', 'CONFIG_HAS_IOMEM' ..., but it > also necessary to consider about 'COMPILE_TEST' to be consistent with > its 'generic' services. > > > BTW: 20% code are for 80% features, but the left 20% features, need 80% > code, if we have to make it complete, we have to face this 'rule'. > >
It is necessary to let the 'COMPILE_TEST' related members to know about it (better to provide their own opinions), it may be helpful for our discussion, so I list the details below. -------------------------------commit begin---------------------------------- commit 4bb1667255a86360721291fe59991d033bbc2f2a Author: Jiri Slaby <jsl...@suse.cz> Date: Wed May 22 10:56:24 2013 +0200 build some drivers only when compile-testing Some drivers can be built on more platforms than they run on. This is a burden for users and distributors who package a kernel. They have to manually deselect some (for them useless) drivers when updating their configs via oldconfig. And yet, sometimes it is even impossible to disable the drivers without patching the kernel. Introduce a new config option COMPILE_TEST and make all those drivers to depend on the platform they run on, or on the COMPILE_TEST option. Now, when users/distributors choose COMPILE_TEST=n they will not have the drivers in their allmodconfig setups, but developers still can compile-test them with COMPILE_TEST=y. Now the drivers where we use this new option: * PTP_1588_CLOCK_PCH: The PCH EG20T is only compatible with Intel Atom processors so it should depend on x86. * FB_GEODE: Geode is 32-bit only so only enable it for X86_32. * USB_CHIPIDEA_IMX: The OF_DEVICE dependency will be met on powerpc systems -- which do not actually support the hardware via that method. * INTEL_MID_PTI: It is specific to the Penwell type of Intel Atom device. [v2] * remove EXPERT dependency [gregkh - remove chipidea portion, as it's incorrect, and also doesn't apply to my driver-core tree] Signed-off-by: Jiri Slaby <jsl...@suse.cz> Cc: Andrew Morton <a...@linux-foundation.org> Cc: Linus Torvalds <torva...@linux-foundation.org> Cc: Jeff Mahoney <je...@suse.com> Cc: Alexander Shishkin <alexander.shish...@linux.intel.com> Cc: linux-...@vger.kernel.org Cc: Florian Tobias Schandinat <florianschandi...@gmx.de> Cc: linux-ge...@lists.infradead.org Cc: linux-fb...@vger.kernel.org Cc: Richard Cochran <richardcoch...@gmail.com> Cc: net...@vger.kernel.org Cc: Ben Hutchings <b...@decadent.org.uk> Cc: "Keller, Jacob E" <jacob.e.kel...@intel.com> Signed-off-by: Greg Kroah-Hartman <gre...@linuxfoundation.org> diff --git a/init/Kconfig b/init/Kconfig index 55ccdf6..1e825c2 100644 --- a/init/Kconfig +++ b/init/Kconfig @@ -53,6 +53,20 @@ config CROSS_COMPILE need to set this unless you want the configured kernel build directory to select the cross-compiler automatically. +config COMPILE_TEST + bool "Compile also drivers which will not load" + default n + help + Some drivers can be compiled on a different platform than they are + intended to be run on. Despite they cannot be loaded there (or even + when they load they cannot be used due to missing HW support), + developers still, opposing to distributors, might want to build such + drivers to compile-test them. + + If you are a developer and want to build everything available, say Y + here. If you are a user/distributor, say N here to exclude useless + drivers to be distributed. + -------------------------------commit end------------------------------------ Thanks. -- Chen Gang ------------------------------------------------------------------------------ This SF.net email is sponsored by Windows: Build for Windows Store. http://p.sf.net/sfu/windows-dev2dev _______________________________________________ User-mode-linux-devel mailing list User-mode-linux-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel