All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rusty Russell <rusty@rustcorp.com.au>
To: Jean Delvare <khali@linux-fr.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: LKML <linux-kernel@vger.kernel.org>
Subject: Re: What is listed in /sys/module?
Date: Thu, 30 May 2013 10:24:31 +0930	[thread overview]
Message-ID: <878v2xmgmw.fsf@rustcorp.com.au> (raw)
In-Reply-To: <20130529102735.3ce72ecc@endymion.delvare>

Jean Delvare <khali@linux-fr.org> writes:
> Hi Greg, Rusty,
>
> I have a question related to /sys/module and can't seem to find the
> answer by myself so I hope you can explain.
>
> I noticed that /sys/module contains more than /proc/modules. At first I
> thought that any potentially modular piece of code would show up
> in /sys/module, so /sys/module would include both actual modules and
> "built-in modules".
>
> However I then noticed that some built-in modules do _not_ show up
> in /sys/module. For example, I have USB and I2C core support built into
> my 3.9.4 kernel, /sys/module/usbcore exists but /sys/module/i2c_core
> does not. CONFIG_SENSORS_W83795=y did not give me /sys/module/w83795
> either.

Yes.  /sys/module entries are created for builtin "modules" with
parameters.  This is because, the module names are discovered by
scouring the parameters: see param_sysfs_builtin().

Two things to note about builtin modules:

1) There is nothing other than parameters in /sys/module/, except a
   uevent which is used for managing the parameters.  So, without
   parameters, it would be an empty directory.

2) We actually do generate a list of builtin modules these days, called
   modules.builtin.  So we could generate sysfs dirs from this.

If you want to make it consistent, I look forward to your patch!

Cheers,
Rusty.

  reply	other threads:[~2013-05-30  5:35 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-29  8:27 What is listed in /sys/module? Jean Delvare
2013-05-30  0:54 ` Rusty Russell [this message]
2013-05-30  6:23   ` anish singh
2013-05-30  8:34     ` Jean Delvare
2013-05-30  9:26       ` anish singh
2013-05-30  9:38         ` Jean Delvare

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=878v2xmgmw.fsf@rustcorp.com.au \
    --to=rusty@rustcorp.com.au \
    --cc=gregkh@linuxfoundation.org \
    --cc=khali@linux-fr.org \
    --cc=linux-kernel@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.