From patchwork Thu Jun 23 19:18:27 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Arnaud Lacombe X-Patchwork-Id: 913372 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.4) with ESMTP id p5NJHd64023098 for ; Thu, 23 Jun 2011 19:18:32 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932702Ab1FWTSc (ORCPT ); Thu, 23 Jun 2011 15:18:32 -0400 Received: from mail-pv0-f174.google.com ([74.125.83.174]:60603 "EHLO mail-pv0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932600Ab1FWTSa (ORCPT ); Thu, 23 Jun 2011 15:18:30 -0400 Received: by pvg12 with SMTP id 12so1310548pvg.19 for ; Thu, 23 Jun 2011 12:18:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=7LErSmwpXk5X9V7jygJoPnG5MyqzSZMNjexNXJ0JFBg=; b=KboR2vDxeyRUL8SvmzKcvGUVGKXi7VMG9JQhYUpfgeCr/swbSTZQJ6I4El+qO1/o9y Z3bMF1+g8ucNLRj/UvZRXEFuZFE6ekwa23EX0dX/jqbriTf9NKymoA9r9RO3/afbFB4V wOUi2XOgyp2Qz60YG3KcCVZnqyiDVPl56vEKQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=NsrJfFDzhS6Br6FHASZAdBF/+SFOVAdXp5za7gU/SsumozS2UAZ9jsOT+Vck8qkCD7 7IpO3a1PtPYY37qawxUHNJanst63/qRymK3t+9skTRKZa6RUU6tk+wr7PEkU3u1WHw+U L3dNMQR1zinZcfsDR/FsomaX17hpVoHaKjixA= MIME-Version: 1.0 Received: by 10.68.17.102 with SMTP id n6mr255565pbd.419.1308856707300; Thu, 23 Jun 2011 12:18:27 -0700 (PDT) Received: by 10.68.56.8 with HTTP; Thu, 23 Jun 2011 12:18:27 -0700 (PDT) In-Reply-To: <20110623163105.GC16892@linux-mips.org> References: <20110623114536.GA14011@linux-mips.org> <20110623163105.GC16892@linux-mips.org> Date: Thu, 23 Jun 2011 15:18:27 -0400 Message-ID: Subject: Re: [PATCH] STAGING: Comedi: Build only on arches providing PAGE_KERNEL_NOCACHE From: Arnaud Lacombe To: Ralf Baechle Cc: Geert Uytterhoeven , Greg Kroah-Hartman , devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, David Howells , linux-m32r@ml.linux-m32r.org, linux-m32r-ja@ml.linux-m32r.org, linux-am33-list@redhat.com, Paul Mundt , linux-sh@vger.kernel.org, Chris Metcalf , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , x86@kernel.org, linux-arch@vger.kernel.org, Michal Marek , linux-kbuild@vger.kernel.org Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Thu, 23 Jun 2011 19:18:33 +0000 (UTC) Hi, On Thu, Jun 23, 2011 at 12:31 PM, Ralf Baechle wrote: > On Thu, Jun 23, 2011 at 06:01:47PM +0200, Geert Uytterhoeven wrote: > >> If only to get m68k/allmodconfig going again (hmm, there's another >> staging driver >> preventing a green light). > > I ran into this doing an allyesconfig.  Allyesconfig has one disadvantage, > for choice it will only select the first or default option which means > that option gets exercised well and all the other options not at all.  On > MIPS that'd be IP22, 32-bit, R4x00, big endian, 4K pages, no multithreading, > 250Hz.  Make randconfig disables lots of things so often misses the > opportunity to trigger some issues. > > I'd really want an "make allrandconfig" which enables as many options as > possible but picks a random one from choice statements, something like that. > Something like the attached patch ? [sorry for the attachment, gmail is so much a PITA for that ...] - Arnaud ps: the patch breaks all the others *config target. >  Ralf > -- > 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 > From f4b15f8ac27ce0913cb4dca0b0e26f1aaf30025e Mon Sep 17 00:00:00 2001 From: Arnaud Lacombe Date: Thu, 23 Jun 2011 15:11:24 -0400 Subject: [PATCH] allyesrandchoiceconfig --- scripts/kconfig/Makefile | 2 +- scripts/kconfig/conf.c | 7 +++++++ scripts/kconfig/confdata.c | 14 +++++++++++--- scripts/kconfig/lkc.h | 1 + 4 files changed, 20 insertions(+), 4 deletions(-) diff --git a/scripts/kconfig/Makefile b/scripts/kconfig/Makefile index faa9a47..4eb9eac 100644 --- a/scripts/kconfig/Makefile +++ b/scripts/kconfig/Makefile @@ -98,7 +98,7 @@ update-po-config: $(obj)/kxgettext $(obj)/gconf.glade.h PHONY += allnoconfig allyesconfig allmodconfig alldefconfig randconfig -allnoconfig allyesconfig allmodconfig alldefconfig randconfig: $(obj)/conf +allnoconfig allyesconfig allyesrandchoiceconfig allmodconfig alldefconfig randconfig: $(obj)/conf $< --$@ $(Kconfig) PHONY += listnewconfig oldnoconfig savedefconfig defconfig diff --git a/scripts/kconfig/conf.c b/scripts/kconfig/conf.c index 006ad81..9b1c324 100644 --- a/scripts/kconfig/conf.c +++ b/scripts/kconfig/conf.c @@ -33,6 +33,7 @@ enum input_mode { savedefconfig, listnewconfig, oldnoconfig, + allyesrandchoiceconfig, } input_mode = oldaskconfig; char *defconfig_file; @@ -453,6 +454,7 @@ static struct option long_opts[] = { {"randconfig", no_argument, NULL, randconfig}, {"listnewconfig", no_argument, NULL, listnewconfig}, {"oldnoconfig", no_argument, NULL, oldnoconfig}, + {"allyesrandchoiceconfig", no_argument, NULL, allyesrandchoiceconfig}, {NULL, 0, NULL, 0} }; @@ -476,6 +478,7 @@ int main(int ac, char **av) case savedefconfig: defconfig_file = optarg; break; + case allyesrandchoiceconfig: case randconfig: { struct timeval now; @@ -579,6 +582,10 @@ int main(int ac, char **av) case allnoconfig: conf_set_all_new_symbols(def_no); break; + case allyesrandchoiceconfig: + conf_set_all_new_symbols(def_yes); + conf_set_all_new_choice_symbols(def_random); + break; case allyesconfig: conf_set_all_new_symbols(def_yes); break; diff --git a/scripts/kconfig/confdata.c b/scripts/kconfig/confdata.c index 2bafd9a..e96b95a 100644 --- a/scripts/kconfig/confdata.c +++ b/scripts/kconfig/confdata.c @@ -945,6 +945,7 @@ static void randomize_choice_values(struct symbol *csym) cnt = 0; expr_list_for_each_sym(prop->expr, e, sym) { + printf("%s %d %d\n", sym->name, def, cnt+1); if (def == cnt++) { sym->def[S_DEF_USER].tri = yes; csym->def[S_DEF_USER].val = sym; @@ -980,12 +981,14 @@ static void set_all_choice_values(struct symbol *csym) void conf_set_all_new_symbols(enum conf_def_mode mode) { - struct symbol *sym, *csym; + struct symbol *sym; int i, cnt; for_all_symbols(i, sym) { if (sym_has_value(sym)) continue; + if (sym_is_choice(sym)) + continue; switch (sym_get_type(sym)) { case S_BOOLEAN: case S_TRISTATE: @@ -1006,14 +1009,19 @@ void conf_set_all_new_symbols(enum conf_def_mode mode) default: continue; } - if (!(sym_is_choice(sym) && mode == def_random)) - sym->flags |= SYMBOL_DEF_USER; + sym->flags |= SYMBOL_DEF_USER; break; default: break; } } +} + +void conf_set_all_new_choice_symbols(enum conf_def_mode mode) +{ + struct symbol *csym; + int i; sym_clear_all_valid(); diff --git a/scripts/kconfig/lkc.h b/scripts/kconfig/lkc.h index febf0c9..672c78f 100644 --- a/scripts/kconfig/lkc.h +++ b/scripts/kconfig/lkc.h @@ -91,6 +91,7 @@ char *conf_get_default_confname(void); void sym_set_change_count(int count); void sym_add_change_count(int count); void conf_set_all_new_symbols(enum conf_def_mode mode); +void conf_set_all_new_choice_symbols(enum conf_def_mode mode); /* confdata.c and expr.c */ static inline void xfwrite(const void *str, size_t len, size_t count, FILE *out) -- 1.7.3.4.574.g608b.dirty