2004-06-03 14:15:52

by Zhu Yi

[permalink] [raw]
Subject: RE: idebus setup problem (2.6.7-rc1)

Rusty Russell wrote:
>
> Dislike this idea. If you have hundreds of parameters, maybe it's
> supposed to be a PITA?

What's your idea to make module_param support alterable param
names like ide3=xxx ?

Thanks,
-yi


2004-06-03 21:31:18

by Herbert Poetzl

[permalink] [raw]
Subject: Re: idebus setup problem (2.6.7-rc1)

On Thu, Jun 03, 2004 at 10:05:08PM +0800, Zhu, Yi wrote:
> Rusty Russell wrote:
> >
> > Dislike this idea. If you have hundreds of parameters, maybe it's
> > supposed to be a PITA?
>
> What's your idea to make module_param support alterable param
> names like ide3=xxx ?

hmm, what about making all those something like:

ide=3:foo,bar;4:wossname

where ':' and ';' are arbitrarily chosen atm ...
or, if it should be handled at the 'argument' level
maybe the 'notion' of arrays would help, something
like

ide[3]=foo,bar

where ide is defined as array of strings, size 16

best,
Herbert

> Thanks,
> -yi
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to [email protected]
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/

Subject: Re: idebus setup problem (2.6.7-rc1)

On Thursday 03 of June 2004 23:31, Herbert Poetzl wrote:
> On Thu, Jun 03, 2004 at 10:05:08PM +0800, Zhu, Yi wrote:
> > Rusty Russell wrote:
> > > Dislike this idea. If you have hundreds of parameters, maybe it's
> > > supposed to be a PITA?
> >
> > What's your idea to make module_param support alterable param
> > names like ide3=xxx ?
>
> hmm, what about making all those something like:
>
> ide=3:foo,bar;4:wossname

We are in stable kernel and in 2.7 'idex=' and 'hdx=' will die.

> where ':' and ';' are arbitrarily chosen atm ...
> or, if it should be handled at the 'argument' level
> maybe the 'notion' of arrays would help, something
> like
>
> ide[3]=foo,bar
>
> where ide is defined as array of strings, size 16

Sounds awful.

Cheers,
Bartlomiej

2004-06-04 04:34:25

by Rusty Russell

[permalink] [raw]
Subject: Re: idebus setup problem (2.6.7-rc1)

On Fri, 2004-06-04 at 07:44, Bartlomiej Zolnierkiewicz wrote:
> On Thursday 03 of June 2004 23:31, Herbert Poetzl wrote:
> > On Thu, Jun 03, 2004 at 10:05:08PM +0800, Zhu, Yi wrote:
> > > Rusty Russell wrote:
> > > > Dislike this idea. If you have hundreds of parameters, maybe it's
> > > > supposed to be a PITA?
> > >
> > > What's your idea to make module_param support alterable param
> > > names like ide3=xxx ?
> >
> > hmm, what about making all those something like:
> >
> > ide=3:foo,bar;4:wossname
>
> We are in stable kernel and in 2.7 'idex=' and 'hdx=' will die.

Yes, and if you want to clean this up for 2.6, I'd recommend simply
putting twenty module_param_call() lines.

It's ugly, but that's because it's doing ugly things, IMHO, and I don't
think Bart would disagree?

Rusty.
--
Anyone who quotes me in their signature is an idiot -- Rusty Russell

Subject: Re: idebus setup problem (2.6.7-rc1)

On Friday 04 of June 2004 06:32, Rusty Russell wrote:
> On Fri, 2004-06-04 at 07:44, Bartlomiej Zolnierkiewicz wrote:
> > On Thursday 03 of June 2004 23:31, Herbert Poetzl wrote:
> > > On Thu, Jun 03, 2004 at 10:05:08PM +0800, Zhu, Yi wrote:
> > > > Rusty Russell wrote:
> > > > > Dislike this idea. If you have hundreds of parameters, maybe it's
> > > > > supposed to be a PITA?
> > > >
> > > > What's your idea to make module_param support alterable param
> > > > names like ide3=xxx ?
> > >
> > > hmm, what about making all those something like:
> > >
> > > ide=3:foo,bar;4:wossname
> >
> > We are in stable kernel and in 2.7 'idex=' and 'hdx=' will die.
>
> Yes, and if you want to clean this up for 2.6, I'd recommend simply
> putting twenty module_param_call() lines.

10 for "idex="
20 for "hdx="
1 for "idebus="
1 for "ide="

I tried it once and result was uglier than the current behavior
(part of the problem is that MAX_HWIFS is arch/config dependent).

Why can't we apply this minimal fix from Yi for now?

--- linux-2.6.7-rc1-mm1.orig/init/main.c 2004-05-28 12:39:15.549314064 +0800
+++ linux-2.6.7-rc1-mm1/init/main.c 2004-05-28 12:40:29.399087192 +0800
@@ -162,7 +162,7 @@ static int __init obsolete_checksetup(ch
p = &__setup_start;
do {
int n = strlen(p->str);
- if (len <= n && !strncmp(line, p->str, n)) {
+ if (n == 0 || (len <= n && !strncmp(line, p->str, n))) {
/* Already done in parse_early_param? */
if (p->early)
return 1;

> It's ugly, but that's because it's doing ugly things, IMHO, and I don't
> think Bart would disagree?
>
> Rusty.