<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/include/linux/module.h, branch Colibri_T30_LinuxImageV2.1Beta2_20140206</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>module.h: split out the EXPORT_SYMBOL into export.h</title>
<updated>2012-02-03T13:20:04+00:00</updated>
<author>
<name>Paul Gortmaker</name>
<email>paul.gortmaker@windriver.com</email>
</author>
<published>2011-05-23T18:11:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=c8bee9dfd45d9bc9e35cc735567f25a210e87a5c'/>
<id>c8bee9dfd45d9bc9e35cc735567f25a210e87a5c</id>
<content type='text'>
A lot of files pull in module.h when all they are really
looking for is the basic EXPORT_SYMBOL functionality. The
recent data from Ingo[1] shows that this is one of several
instances that has a significant impact on compile times,
and it should be targeted for factoring out (as done here).

Note that several commonly used header files in include/*
directly include &lt;linux/module.h&gt; themselves (some 34 of them!)
The most commonly used ones of these will have to be made
independent of module.h before the full benefit of this change
can be realized.

We also transition THIS_MODULE from module.h to export.h,
since there are lots of files with subsystem structs that
in turn will have a struct module *owner and only be doing:

	.owner = THIS_MODULE;

and absolutely nothing else modular. So, we also want to have
the THIS_MODULE definition present in the lightweight header.

[1] https://lkml.org/lkml/2011/5/23/76

Change-Id: I52c16cc63f483d7c572cd0ef2475ef642dfa11c1
Signed-off-by: Paul Gortmaker &lt;paul.gortmaker@windriver.com&gt;
Signed-off-by: Hiroshi DOYU &lt;hdoyu@nvidia.com&gt;
[Hiroshi DOYU: Backported from v3.3-rc1 for DMABUF]
Reviewed-on: http://git-master/r/78383
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Varun Wadekar &lt;vwadekar@nvidia.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
A lot of files pull in module.h when all they are really
looking for is the basic EXPORT_SYMBOL functionality. The
recent data from Ingo[1] shows that this is one of several
instances that has a significant impact on compile times,
and it should be targeted for factoring out (as done here).

Note that several commonly used header files in include/*
directly include &lt;linux/module.h&gt; themselves (some 34 of them!)
The most commonly used ones of these will have to be made
independent of module.h before the full benefit of this change
can be realized.

We also transition THIS_MODULE from module.h to export.h,
since there are lots of files with subsystem structs that
in turn will have a struct module *owner and only be doing:

	.owner = THIS_MODULE;

and absolutely nothing else modular. So, we also want to have
the THIS_MODULE definition present in the lightweight header.

[1] https://lkml.org/lkml/2011/5/23/76

Change-Id: I52c16cc63f483d7c572cd0ef2475ef642dfa11c1
Signed-off-by: Paul Gortmaker &lt;paul.gortmaker@windriver.com&gt;
Signed-off-by: Hiroshi DOYU &lt;hdoyu@nvidia.com&gt;
[Hiroshi DOYU: Backported from v3.3-rc1 for DMABUF]
Reviewed-on: http://git-master/r/78383
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Varun Wadekar &lt;vwadekar@nvidia.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>module: add /sys/module/&lt;name&gt;/uevent files</title>
<updated>2011-07-24T12:36:04+00:00</updated>
<author>
<name>Kay Sievers</name>
<email>kay.sievers@vrfy.org</email>
</author>
<published>2011-07-24T12:36:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=88bfa3247961fe5f3623f4d2cf1cd5dc72457598'/>
<id>88bfa3247961fe5f3623f4d2cf1cd5dc72457598</id>
<content type='text'>
Userspace wants to manage module parameters with udev rules.
This currently only works for loaded modules, but not for
built-in ones.

To allow access to the built-in modules we need to
re-trigger all module load events that happened before any
userspace was running. We already do the same thing for all
devices, subsystems(buses) and drivers.

This adds the currently missing /sys/module/&lt;name&gt;/uevent files
to all module entries.

Signed-off-by: Kay Sievers &lt;kay.sievers@vrfy.org&gt;
Signed-off-by: Rusty Russell &lt;rusty@rustcorp.com.au&gt; (split &amp; trivial fix)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Userspace wants to manage module parameters with udev rules.
This currently only works for loaded modules, but not for
built-in ones.

To allow access to the built-in modules we need to
re-trigger all module load events that happened before any
userspace was running. We already do the same thing for all
devices, subsystems(buses) and drivers.

This adds the currently missing /sys/module/&lt;name&gt;/uevent files
to all module entries.

Signed-off-by: Kay Sievers &lt;kay.sievers@vrfy.org&gt;
Signed-off-by: Rusty Russell &lt;rusty@rustcorp.com.au&gt; (split &amp; trivial fix)
</pre>
</div>
</content>
</entry>
<entry>
<title>module: change attr callbacks to take struct module_kobject</title>
<updated>2011-07-24T12:36:04+00:00</updated>
<author>
<name>Kay Sievers</name>
<email>kay.sievers@vrfy.org</email>
</author>
<published>2011-07-24T12:36:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=4befb026cf74b52fc7d382142bbfc0e9b6aab5e7'/>
<id>4befb026cf74b52fc7d382142bbfc0e9b6aab5e7</id>
<content type='text'>
This simplifies the next patch, where we have an attribute on a
builtin module (ie. module == NULL).

Signed-off-by: Kay Sievers &lt;kay.sievers@vrfy.org&gt;
Signed-off-by: Rusty Russell &lt;rusty@rustcorp.com.au&gt; (split into 2)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This simplifies the next patch, where we have an attribute on a
builtin module (ie. module == NULL).

Signed-off-by: Kay Sievers &lt;kay.sievers@vrfy.org&gt;
Signed-off-by: Rusty Russell &lt;rusty@rustcorp.com.au&gt; (split into 2)
</pre>
</div>
</content>
</entry>
<entry>
<title>module: Sort exported symbols</title>
<updated>2011-05-19T07:25:27+00:00</updated>
<author>
<name>Alessio Igor Bogani</name>
<email>abogani@kernel.org</email>
</author>
<published>2011-04-14T12:59:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=f02e8a6596b7dc9b2171f7ff5654039ef0950cdc'/>
<id>f02e8a6596b7dc9b2171f7ff5654039ef0950cdc</id>
<content type='text'>
This patch places every exported symbol in its own section
(i.e. "___ksymtab+printk").  Thus the linker will use its SORT() directive
to sort and finally merge all symbol in the right and final section
(i.e. "__ksymtab").

The symbol prefixed archs use an underscore as prefix for symbols.
To avoid collision we use a different character to create the temporary
section names.

This work was supported by a hardware donation from the CE Linux Forum.

Signed-off-by: Alessio Igor Bogani &lt;abogani@kernel.org&gt;
Signed-off-by: Rusty Russell &lt;rusty@rustcorp.com.au&gt; (folded in '+' fixup)
Tested-by: Dirk Behme &lt;dirk.behme@googlemail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch places every exported symbol in its own section
(i.e. "___ksymtab+printk").  Thus the linker will use its SORT() directive
to sort and finally merge all symbol in the right and final section
(i.e. "__ksymtab").

The symbol prefixed archs use an underscore as prefix for symbols.
To avoid collision we use a different character to create the temporary
section names.

This work was supported by a hardware donation from the CE Linux Forum.

Signed-off-by: Alessio Igor Bogani &lt;abogani@kernel.org&gt;
Signed-off-by: Rusty Russell &lt;rusty@rustcorp.com.au&gt; (folded in '+' fixup)
Tested-by: Dirk Behme &lt;dirk.behme@googlemail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>module: each_symbol_section instead of each_symbol</title>
<updated>2011-05-19T07:25:26+00:00</updated>
<author>
<name>Rusty Russell</name>
<email>rusty@rustcorp.com.au</email>
</author>
<published>2011-04-19T19:49:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=de4d8d53465483168d6a627d409ee2d09d8e3308'/>
<id>de4d8d53465483168d6a627d409ee2d09d8e3308</id>
<content type='text'>
Instead of having a callback function for each symbol in the kernel,
have a callback for each array of symbols.

This eases the logic when we move to sorted symbols and binary search.

Signed-off-by: Rusty Russell &lt;rusty@rustcorp.com.au&gt;
Signed-off-by: Alessio Igor Bogani &lt;abogani@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Instead of having a callback function for each symbol in the kernel,
have a callback for each array of symbols.

This eases the logic when we move to sorted symbols and binary search.

Signed-off-by: Rusty Russell &lt;rusty@rustcorp.com.au&gt;
Signed-off-by: Alessio Igor Bogani &lt;abogani@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>module: remove 64 bit alignment padding from struct module with CONFIG_TRACE*</title>
<updated>2011-05-19T07:25:25+00:00</updated>
<author>
<name>Richard Kennedy</name>
<email>richard@rsk.demon.co.uk</email>
</author>
<published>2011-05-19T22:55:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=a288bd651f4180c224cfddf837a0416157a36661'/>
<id>a288bd651f4180c224cfddf837a0416157a36661</id>
<content type='text'>
Reorder struct module to remove 24 bytes of alignment padding on 64 bit
builds when the CONFIG_TRACE options are selected. This allows the
structure to fit into one fewer cache lines, and its size drops from 592
to 568 on x86_64.

Signed-off-by: Richard Kennedy &lt;richard@rsk.demon.co.uk&gt;
Signed-off-by: Rusty Russell &lt;rusty@rustcorp.com.au&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Reorder struct module to remove 24 bytes of alignment padding on 64 bit
builds when the CONFIG_TRACE options are selected. This allows the
structure to fit into one fewer cache lines, and its size drops from 592
to 568 on x86_64.

Signed-off-by: Richard Kennedy &lt;richard@rsk.demon.co.uk&gt;
Signed-off-by: Rusty Russell &lt;rusty@rustcorp.com.au&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>module: do not hide __modver_version_show declaration behind ifdef</title>
<updated>2011-05-19T07:25:25+00:00</updated>
<author>
<name>Dmitry Torokhov</name>
<email>dtor@vmware.com</email>
</author>
<published>2011-02-08T00:02:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=9b73a5840c7d5f77e5766626716df13787cb258c'/>
<id>9b73a5840c7d5f77e5766626716df13787cb258c</id>
<content type='text'>
Doing so prevents the following warning from sparse:

  CHECK   kernel/params.c
kernel/params.c:817:9: warning: symbol '__modver_version_show' was not
declared. Should it be static?

since kernel/params.c is never compiled with MODULE being set.

Signed-off-by: Dmitry Torokhov &lt;dtor@vmware.com&gt;
Signed-off-by: Rusty Russell &lt;rusty@rustcorp.com.au&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Doing so prevents the following warning from sparse:

  CHECK   kernel/params.c
kernel/params.c:817:9: warning: symbol '__modver_version_show' was not
declared. Should it be static?

since kernel/params.c is never compiled with MODULE being set.

Signed-off-by: Dmitry Torokhov &lt;dtor@vmware.com&gt;
Signed-off-by: Rusty Russell &lt;rusty@rustcorp.com.au&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>module: deal with alignment issues in built-in module versions</title>
<updated>2011-05-19T07:25:24+00:00</updated>
<author>
<name>Dmitry Torokhov</name>
<email>dtor@vmware.com</email>
</author>
<published>2011-02-08T00:02:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=b4bc842802db3314f9a657094da0450a903ea619'/>
<id>b4bc842802db3314f9a657094da0450a903ea619</id>
<content type='text'>
On m68k natural alignment is 2-byte boundary but we are trying to
align structures in __modver section on sizeof(void *) boundary.
This causes trouble when we try to access elements in this section
in array-like fashion when create "version" attributes for built-in
modules.

Moreover, as DaveM said, we can't reliably put structures into
independent objects, put them into a special section, and then expect
array access over them (via the section boundaries) after linking the
objects together to just "work" due to variable alignment choices in
different situations. The only solution that seems to work reliably
is to make an array of plain pointers to the objects in question and
put those pointers in the special section.

Reported-by: Geert Uytterhoeven &lt;geert@linux-m68k.org&gt;
Signed-off-by: Dmitry Torokhov &lt;dtor@vmware.com&gt;
Signed-off-by: Rusty Russell &lt;rusty@rustcorp.com.au&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
On m68k natural alignment is 2-byte boundary but we are trying to
align structures in __modver section on sizeof(void *) boundary.
This causes trouble when we try to access elements in this section
in array-like fashion when create "version" attributes for built-in
modules.

Moreover, as DaveM said, we can't reliably put structures into
independent objects, put them into a special section, and then expect
array access over them (via the section boundaries) after linking the
objects together to just "work" due to variable alignment choices in
different situations. The only solution that seems to work reliably
is to make an array of plain pointers to the objects in question and
put those pointers in the special section.

Reported-by: Geert Uytterhoeven &lt;geert@linux-m68k.org&gt;
Signed-off-by: Dmitry Torokhov &lt;dtor@vmware.com&gt;
Signed-off-by: Rusty Russell &lt;rusty@rustcorp.com.au&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>module: explicitly align module_version_attribute structure</title>
<updated>2011-02-21T23:21:53+00:00</updated>
<author>
<name>Dmitry Torokhov</name>
<email>dtor@vmware.com</email>
</author>
<published>2011-02-04T21:30:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=98562ad8cb03fa6b7ba7f50168cdb34a98abcc1d'/>
<id>98562ad8cb03fa6b7ba7f50168cdb34a98abcc1d</id>
<content type='text'>
We force particular alignment when we generate attribute structures
when generation MODULE_VERSION() data and we need to make sure that
this alignment is followed when we iterate over these structures,
otherwise we may crash on platforms whose natural alignment is not
sizeof(void *), such as m68k.

Reported-by: Geert Uytterhoeven &lt;geert@linux-m68k.org&gt;
Signed-off-by: Dmitry Torokhov &lt;dtor@vmware.com&gt;
[ There are more issues here, but the fixes are incredibly ugly - Linus ]
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We force particular alignment when we generate attribute structures
when generation MODULE_VERSION() data and we need to make sure that
this alignment is followed when we iterate over these structures,
otherwise we may crash on platforms whose natural alignment is not
sizeof(void *), such as m68k.

Reported-by: Geert Uytterhoeven &lt;geert@linux-m68k.org&gt;
Signed-off-by: Dmitry Torokhov &lt;dtor@vmware.com&gt;
[ There are more issues here, but the fixes are incredibly ugly - Linus ]
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>tracepoints: Fix section alignment using pointer array</title>
<updated>2011-02-03T14:28:46+00:00</updated>
<author>
<name>Mathieu Desnoyers</name>
<email>mathieu.desnoyers@efficios.com</email>
</author>
<published>2011-01-26T22:26:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=654986462939cd7ec18f276c6379a334dac106a7'/>
<id>654986462939cd7ec18f276c6379a334dac106a7</id>
<content type='text'>
Make the tracepoints more robust, making them solid enough to handle compiler
changes by not relying on anything based on compiler-specific behavior with
respect to structure alignment. Implement an approach proposed by David Miller:
use an array of const pointers to refer to the individual structures, and export
this pointer array through the linker script rather than the structures per se.
It will consume 32 extra bytes per tracepoint (24 for structure padding and 8
for the pointers), but are less likely to break due to compiler changes.

History:

commit 7e066fb8 tracepoints: add DECLARE_TRACE() and DEFINE_TRACE()
added the aligned(32) type and variable attribute to the tracepoint structures
to deal with gcc happily aligning statically defined structures on 32-byte
multiples.

One attempt was to use a 8-byte alignment for tracepoint structures by applying
both the variable and type attribute to tracepoint structures definitions and
declarations. It worked fine with gcc 4.5.1, but broke with gcc 4.4.4 and 4.4.5.

The reason is that the "aligned" attribute only specify the _minimum_ alignment
for a structure, leaving both the compiler and the linker free to align on
larger multiples. Because tracepoint.c expects the structures to be placed as an
array within each section, up-alignment cause NULL-pointer exceptions due to the
extra unexpected padding.

(this patch applies on top of -tip)

Signed-off-by: Mathieu Desnoyers &lt;mathieu.desnoyers@efficios.com&gt;
Acked-by: David S. Miller &lt;davem@davemloft.net&gt;
LKML-Reference: &lt;20110126222622.GA10794@Krystal&gt;
CC: Frederic Weisbecker &lt;fweisbec@gmail.com&gt;
CC: Ingo Molnar &lt;mingo@elte.hu&gt;
CC: Thomas Gleixner &lt;tglx@linutronix.de&gt;
CC: Andrew Morton &lt;akpm@linux-foundation.org&gt;
CC: Peter Zijlstra &lt;peterz@infradead.org&gt;
CC: Rusty Russell &lt;rusty@rustcorp.com.au&gt;
Signed-off-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Make the tracepoints more robust, making them solid enough to handle compiler
changes by not relying on anything based on compiler-specific behavior with
respect to structure alignment. Implement an approach proposed by David Miller:
use an array of const pointers to refer to the individual structures, and export
this pointer array through the linker script rather than the structures per se.
It will consume 32 extra bytes per tracepoint (24 for structure padding and 8
for the pointers), but are less likely to break due to compiler changes.

History:

commit 7e066fb8 tracepoints: add DECLARE_TRACE() and DEFINE_TRACE()
added the aligned(32) type and variable attribute to the tracepoint structures
to deal with gcc happily aligning statically defined structures on 32-byte
multiples.

One attempt was to use a 8-byte alignment for tracepoint structures by applying
both the variable and type attribute to tracepoint structures definitions and
declarations. It worked fine with gcc 4.5.1, but broke with gcc 4.4.4 and 4.4.5.

The reason is that the "aligned" attribute only specify the _minimum_ alignment
for a structure, leaving both the compiler and the linker free to align on
larger multiples. Because tracepoint.c expects the structures to be placed as an
array within each section, up-alignment cause NULL-pointer exceptions due to the
extra unexpected padding.

(this patch applies on top of -tip)

Signed-off-by: Mathieu Desnoyers &lt;mathieu.desnoyers@efficios.com&gt;
Acked-by: David S. Miller &lt;davem@davemloft.net&gt;
LKML-Reference: &lt;20110126222622.GA10794@Krystal&gt;
CC: Frederic Weisbecker &lt;fweisbec@gmail.com&gt;
CC: Ingo Molnar &lt;mingo@elte.hu&gt;
CC: Thomas Gleixner &lt;tglx@linutronix.de&gt;
CC: Andrew Morton &lt;akpm@linux-foundation.org&gt;
CC: Peter Zijlstra &lt;peterz@infradead.org&gt;
CC: Rusty Russell &lt;rusty@rustcorp.com.au&gt;
Signed-off-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
