Message ID | 422c809f03f043d0950d8362214818e956a9daee.1366841993.git.yann.morin.1998@free.fr (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Thursday 25 April 2013 00:29:53 Yann E. MORIN wrote: > From: "Yann E. MORIN" <yann.morin.1998@free.fr> > > Currently, randconfig does randomise choice entries, unless KCONFIG_ALLCONFIG > is specified. > > For example, given those two files (Thomas' test-case): This patch has made it into linux-next today, and while I agree with the basic idea, it seems to cause regressions for me. For these ARM defconfigs, 'make' always asks about USB_GADGET now after doing any of these defconfigs: am200epdkit_defconfig at91_dt_defconfig at91rm9200_defconfig at91sam9260_defconfig at91sam9261_defconfig at91sam9263_defconfig at91sam9g20_defconfig at91sam9g45_defconfig corgi_defconfig ezx_defconfig h5000_defconfig imote2_defconfig kzm9g_defconfig lpc32xx_defconfig lubbock_defconfig mackerel_defconfig magician_defconfig mini2440_defconfig msm_defconfig omap1_defconfig prima2_defconfig sama5_defconfig tct_hammer_defconfig ~/arm-soc$ make at91_dt_defconfig make[1]: Entering directory `/git/arm-soc' GEN /git/arm-soc/obj-tmp/Makefile HOSTCC scripts/kconfig/zconf.tab.o HOSTLD scripts/kconfig/conf # # configuration written to .config # make[1]: Leaving directory `/git/arm-soc' ~/arm-soc$ make -sj40 make[1]: Entering directory `/git/arm-soc' GEN /git/arm-soc/obj-tmp/Makefile scripts/kconfig/conf --silentoldconfig Kconfig * * Restart config... * * * USB Gadget Support * USB Gadget Support (USB_GADGET) [Y/n/m/?] y Debugging messages (DEVELOPMENT) (USB_GADGET_DEBUG) [N/y/?] n Debugging information files (DEVELOPMENT) (USB_GADGET_DEBUG_FILES) [N/y/?] n Debugging information files in debugfs (DEVELOPMENT) (USB_GADGET_DEBUG_FS) [N/y/?] n Maximum VBUS Power usage (2-500 mA) (USB_GADGET_VBUS_DRAW) [2] 2 Number of storage pipeline buffers (USB_GADGET_STORAGE_NUM_BUFFERS) [2] 2 USB Gadget Drivers [M/y/?] (NEW) I'm taking Greg on Cc here so he's aware of the problem and knows it's not caused by any of the USB Kconfig changes that I and others submitted recently. It took me a while to confirm that it's just your patch and not mine that caused the problem. Arnd -- To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Arnd, All, On Fri, Apr 26, 2013 at 02:05:37PM +0200, Arnd Bergmann wrote: > On Thursday 25 April 2013 00:29:53 Yann E. MORIN wrote: > > From: "Yann E. MORIN" <yann.morin.1998@free.fr> > > > > Currently, randconfig does randomise choice entries, unless KCONFIG_ALLCONFIG > > is specified. > > > > For example, given those two files (Thomas' test-case): > > This patch has made it into linux-next today, and while I agree with > the basic idea, it seems to cause regressions for me. Yes, this has already been noticed. Thanks for the report. So far, we have a plan B (which is to revert that patch). I'll work on plan A when I'm back home after work (GMT+2 here, so in about 5h from now). Sorry for the annoyance... Regards, Yann E. MORIN.
On Fri, Apr 26, 2013 at 02:05:37PM +0200, Arnd Bergmann wrote: > On Thursday 25 April 2013 00:29:53 Yann E. MORIN wrote: > > From: "Yann E. MORIN" <yann.morin.1998@free.fr> > > > > Currently, randconfig does randomise choice entries, unless KCONFIG_ALLCONFIG > > is specified. > > > > For example, given those two files (Thomas' test-case): > > This patch has made it into linux-next today, and while I agree with > the basic idea, it seems to cause regressions for me. > > For these ARM defconfigs, 'make' always asks about USB_GADGET now OK, I threw in the towel on that one for tonight. I'll send a patch to revert this changeset, in the coming minutes. It will have to be revisited later on, and hopefully we can come to a proper solution during the pre-rc1 window, or at worst, early during the -rc phase (as I'm on holidays the next two weeks, I should find sometime to gather what remains of my courage to look at that again). Really sorry for the inconvenience... :-( Regards, Yann E. MORIN.
On Saturday 27 April 2013, Yann E. MORIN wrote: > > On Fri, Apr 26, 2013 at 02:05:37PM +0200, Arnd Bergmann wrote: > > On Thursday 25 April 2013 00:29:53 Yann E. MORIN wrote: > > > From: "Yann E. MORIN" <yann.morin.1998@free.fr> > > > > > > Currently, randconfig does randomise choice entries, unless KCONFIG_ALLCONFIG > > > is specified. > > > > > > For example, given those two files (Thomas' test-case): > > > > This patch has made it into linux-next today, and while I agree with > > the basic idea, it seems to cause regressions for me. > > > > For these ARM defconfigs, 'make' always asks about USB_GADGET now > > OK, I threw in the towel on that one for tonight. > I'll send a patch to revert this changeset, in the coming minutes. > > It will have to be revisited later on, and hopefully we can come to a > proper solution during the pre-rc1 window, or at worst, early during the > -rc phase (as I'm on holidays the next two weeks, I should find sometime > to gather what remains of my courage to look at that again). Ok, fair enough. For my own testing, I've actually started relying on the behavior that is meant to be changed by the patch, even though I realize that we should really randomize choice statements. It's easy enough for me to change my script to always select CONFIG_ARCH_MUTLIPLATFORM for ARM testing in the future. Arnd -- To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Arnd, All, On Sat, Apr 27, 2013 at 11:01:00PM +0200, Arnd Bergmann wrote: > On Saturday 27 April 2013, Yann E. MORIN wrote: > > > > On Fri, Apr 26, 2013 at 02:05:37PM +0200, Arnd Bergmann wrote: > > > On Thursday 25 April 2013 00:29:53 Yann E. MORIN wrote: > > > > From: "Yann E. MORIN" <yann.morin.1998@free.fr> > > > > > > > > Currently, randconfig does randomise choice entries, unless KCONFIG_ALLCONFIG > > > > is specified. > > > > > > > > For example, given those two files (Thomas' test-case): > > > > > > This patch has made it into linux-next today, and while I agree with > > > the basic idea, it seems to cause regressions for me. > > > > > > For these ARM defconfigs, 'make' always asks about USB_GADGET now > > > > OK, I threw in the towel on that one for tonight. > > I'll send a patch to revert this changeset, in the coming minutes. > > > > It will have to be revisited later on, and hopefully we can come to a > > proper solution during the pre-rc1 window, or at worst, early during the > > -rc phase (as I'm on holidays the next two weeks, I should find sometime > > to gather what remains of my courage to look at that again). > > Ok, fair enough. For my own testing, I've actually started relying on the > behavior that is meant to be changed by the patch, even though I realize > that we should really randomize choice statements. > > It's easy enough for me to change my script to always select > CONFIG_ARCH_MUTLIPLATFORM for ARM testing in the future. Fact is, choices are properly randomised, unless KCONFIG_ALLCONFIG is passed. So, if you currently rely on choices not being randomised, it means you're using KCONFIG_ALLCONFIG [*] so you can set CONFIG_ARCH_MULTIPLATFORM in the defconfig you use. Which should not change your workflow by much, I believe. [*] If not, then we have another issue. Can you confirm you're already using KCONFIG_ALLCONFIG? If not, can you explain how you handle CONFIG_ARCH_MULTIPLATFORM always being set? Regards, Yann E. MORIN.
On Sunday 28 April 2013, Yann E. MORIN wrote: > Fact is, choices are properly randomised, unless KCONFIG_ALLCONFIG is > passed. > > So, if you currently rely on choices not being randomised, it means > you're using KCONFIG_ALLCONFIG [*] so you can set CONFIG_ARCH_MULTIPLATFORM > in the defconfig you use. Yes, you are right, I can easily do this. Arnd -- To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/scripts/kconfig/confdata.c b/scripts/kconfig/confdata.c index 2e35d4b..8927480 100644 --- a/scripts/kconfig/confdata.c +++ b/scripts/kconfig/confdata.c @@ -288,8 +288,6 @@ load: for_all_symbols(i, sym) { sym->flags |= SYMBOL_CHANGED; sym->flags &= ~(def_flags|SYMBOL_VALID); - if (sym_is_choice(sym)) - sym->flags |= def_flags; switch (sym->type) { case S_INT: case S_HEX: @@ -379,13 +377,13 @@ setsym: case mod: if (cs->def[def].tri == yes) { conf_warning("%s creates inconsistent choice state", sym->name); - cs->flags &= ~def_flags; } break; case yes: if (cs->def[def].tri != no) conf_warning("override: %s changes choice state", sym->name); cs->def[def].val = sym; + cs->flags |= def_flags; break; } cs->def[def].tri = EXPR_OR(cs->def[def].tri, sym->def[def].tri); @@ -791,6 +789,8 @@ int conf_write(const char *name) sym_calc_value(sym); if (!(sym->flags & SYMBOL_WRITE)) goto next; + if (sym_is_choice_value(sym) && !menu_is_visible(menu->parent)) + goto next; sym->flags &= ~SYMBOL_WRITE; conf_write_symbol(out, sym, &kconfig_printer_cb, NULL); @@ -1077,6 +1077,7 @@ static void randomize_choice_values(struct symbol *csym) else { sym->def[S_DEF_USER].tri = no; } + sym->flags &= ~(SYMBOL_VALID); } csym->flags |= SYMBOL_DEF_USER; /* clear VALID to get value calculated */