lkml.org 
[lkml]   [2013]   [May]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: What is listed in /sys/module?
Date
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.


\
 
 \ /
  Last update: 2013-05-30 08:21    [W:0.048 / U:1.544 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site