Re: [PATCH] STAGING: Comedi: Build only on arches providing PAGE_KERNEL_NOCACHE

From: Arnaud Lacombe
Date: Thu Jun 23 2011 - 15:18:36 EST


Hi,

On Thu, Jun 23, 2011 at 12:31 PM, Ralf Baechle <ralf@xxxxxxxxxxxxxx> 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@xxxxxxxxxxxxxxx
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
From f4b15f8ac27ce0913cb4dca0b0e26f1aaf30025e Mon Sep 17 00:00:00 2001
From: Arnaud Lacombe <lacombar@xxxxxxxxx>
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