From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Henk Vergonet <rememberme@god.dyndns.org>
Cc: linux-kernel@vger.kernel.org
Subject: Re: RFC: Harmonised parameter passing
Date: Tue, 8 Mar 2005 10:14:32 -0500 [thread overview]
Message-ID: <d120d5000503080714ba3843d@mail.gmail.com> (raw)
In-Reply-To: <20050308145923.GA9914@god.dyndns.org>
On Tue, 8 Mar 2005 15:59:23 +0100, Henk Vergonet
<rememberme@god.dyndns.org> wrote:
>
> Hi,
>
> The current method of parameter passing to drivers build as a module is extremely usefull.
> Modules don't have to write there own parsing code, there's a nice macro that can be used to document specifics of the parameter and so on.
>
> Could we extend this method where we use the same methodology for inbound drivers? (Currently a lot of drivers use their own parameter parsing code when it comes to passing values at kernel boot time.)
>
> so we could do the regular:
>
> insmod mcd io=0x340
>
> for modules, or with kernel boot parameters:
>
> mcd.io=0x340
>
> for in-kernel drivers.
>
Umm.. This is already done. For parameters defined with module_param()
you use <paramname>=<value> for modules and
<modulename>.<paramname>=<value> for built-in case.
> My proposal would be to introduce something like:
>
> DRIVER_PARM_DESC(variable, description);
> DRIVER_PARM(variable, type, scope);
>
> where scope can be:
> PARM_SCOPE_MODULE => This parameter is used in module context.
> PARM_SCOPE_KERNEL => This parameter is used in kernel context.
> PARM_SCOPE_MODULE | PARM_SCOPE_KERNEL
> => This parameter is used in both kernel and module context, which should be the default if scope is omitted.
>
Why would you want parameters that only work for modules? I'd consider
it a bug, not a feature, when parameter works only when code is
modularized.
--
Dmitry
next prev parent reply other threads:[~2005-03-08 15:14 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-03-08 14:59 RFC: Harmonised parameter passing Henk Vergonet
2005-03-08 15:14 ` Dmitry Torokhov [this message]
2005-03-08 15:47 ` Henk Vergonet
2005-03-08 15:58 ` Dmitry Torokhov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=d120d5000503080714ba3843d@mail.gmail.com \
--to=dmitry.torokhov@gmail.com \
--cc=dtor_core@ameritech.net \
--cc=linux-kernel@vger.kernel.org \
--cc=rememberme@god.dyndns.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox