<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux.git/drivers/edac/edac_module.h, branch v3.16.2</title>
<subtitle>Clone of https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git</subtitle>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/'/>
<entry>
<title>EDAC: Poll timeout cannot be zero, p2</title>
<updated>2014-02-14T09:40:29+00:00</updated>
<author>
<name>Borislav Petkov</name>
<email>bp@suse.de</email>
</author>
<published>2014-02-03T20:05:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/commit/?id=9da21b1509d8aa7ab4846722817d16c72d656c91'/>
<id>9da21b1509d8aa7ab4846722817d16c72d656c91</id>
<content type='text'>
Sanitize code even more to accept unsigned longs only and to not allow
polling intervals below 1 second as this is unnecessary and doesn't make
much sense anyway for polling errors.

Signed-off-by: Borislav Petkov &lt;bp@suse.de&gt;
Link: http://lkml.kernel.org/r/1391457913-881-1-git-send-email-prarit@redhat.com
Cc: Doug Thompson &lt;dougthompson@xmission.com&gt;
Cc: &lt;stable@vger.kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Sanitize code even more to accept unsigned longs only and to not allow
polling intervals below 1 second as this is unnecessary and doesn't make
much sense anyway for polling errors.

Signed-off-by: Borislav Petkov &lt;bp@suse.de&gt;
Link: http://lkml.kernel.org/r/1391457913-881-1-git-send-email-prarit@redhat.com
Cc: Doug Thompson &lt;dougthompson@xmission.com&gt;
Cc: &lt;stable@vger.kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>edac: create top-level debugfs directory</title>
<updated>2012-06-12T15:15:49+00:00</updated>
<author>
<name>Rob Herring</name>
<email>rob.herring@calxeda.com</email>
</author>
<published>2012-06-12T02:32:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/commit/?id=e7930ba49e469d9ce7374a788336caf955f8d7e2'/>
<id>e7930ba49e469d9ce7374a788336caf955f8d7e2</id>
<content type='text'>
Create a single, top-level "edac" directory for debugfs. An "mc[0-N]"
directory is then created for each memory controller. Individual drivers
can create additional entries such as h/w error injection control.

Signed-off-by: Rob Herring &lt;rob.herring@calxeda.com&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Create a single, top-level "edac" directory for debugfs. An "mc[0-N]"
directory is then created for each memory controller. Individual drivers
can create additional entries such as h/w error injection control.

Signed-off-by: Rob Herring &lt;rob.herring@calxeda.com&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>edac_mc: Cleanup per-dimm_info debug messages</title>
<updated>2012-06-11T16:23:49+00:00</updated>
<author>
<name>Mauro Carvalho Chehab</name>
<email>mchehab@redhat.com</email>
</author>
<published>2012-04-30T13:24:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/commit/?id=6e84d359b2bea5ce659b3c3e5d3003fb11bd91d5'/>
<id>6e84d359b2bea5ce659b3c3e5d3003fb11bd91d5</id>
<content type='text'>
The edac_mc_alloc() routine allocates one dimm_info device for all
possible memories, including the non-filled ones. The debug messages
there are somewhat confusing. So, cleans them, by moving the code
that prints the memory location to edac_mc, and using it on both
edac_mc_sysfs and edac_mc.

Also, only dumps information when DIMM/ranks are actually
filled.

After this patch, a dimm-based memory controller will print the debug
info as:

[ 1011.380027] EDAC DEBUG: edac_mc_dump_csrow: csrow-&gt;csrow_idx = 0
[ 1011.380029] EDAC DEBUG: edac_mc_dump_csrow:   csrow = ffff8801169be000
[ 1011.380031] EDAC DEBUG: edac_mc_dump_csrow:   csrow-&gt;first_page = 0x0
[ 1011.380032] EDAC DEBUG: edac_mc_dump_csrow:   csrow-&gt;last_page = 0x0
[ 1011.380034] EDAC DEBUG: edac_mc_dump_csrow:   csrow-&gt;page_mask = 0x0
[ 1011.380035] EDAC DEBUG: edac_mc_dump_csrow:   csrow-&gt;nr_channels = 3
[ 1011.380037] EDAC DEBUG: edac_mc_dump_csrow:   csrow-&gt;channels = ffff8801149c2840
[ 1011.380039] EDAC DEBUG: edac_mc_dump_csrow:   csrow-&gt;mci = ffff880117426000
[ 1011.380041] EDAC DEBUG: edac_mc_dump_channel:   channel-&gt;chan_idx = 0
[ 1011.380042] EDAC DEBUG: edac_mc_dump_channel:     channel = ffff8801149c2860
[ 1011.380044] EDAC DEBUG: edac_mc_dump_channel:     channel-&gt;csrow = ffff8801169be000
[ 1011.380046] EDAC DEBUG: edac_mc_dump_channel:     channel-&gt;dimm = ffff88010fe90400
...
[ 1011.380095] EDAC DEBUG: edac_mc_dump_dimm: dimm0: channel 0 slot 0 mapped as virtual row 0, chan 0
[ 1011.380097] EDAC DEBUG: edac_mc_dump_dimm:   dimm = ffff88010fe90400
[ 1011.380099] EDAC DEBUG: edac_mc_dump_dimm:   dimm-&gt;label = 'CPU#0Channel#0_DIMM#0'
[ 1011.380101] EDAC DEBUG: edac_mc_dump_dimm:   dimm-&gt;nr_pages = 0x40000
[ 1011.380103] EDAC DEBUG: edac_mc_dump_dimm:   dimm-&gt;grain = 8
[ 1011.380104] EDAC DEBUG: edac_mc_dump_dimm:   dimm-&gt;nr_pages = 0x40000
...

(a rank-based memory controller would print, instead of "dimm?", "rank?"
 on the above debug info)

Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The edac_mc_alloc() routine allocates one dimm_info device for all
possible memories, including the non-filled ones. The debug messages
there are somewhat confusing. So, cleans them, by moving the code
that prints the memory location to edac_mc, and using it on both
edac_mc_sysfs and edac_mc.

Also, only dumps information when DIMM/ranks are actually
filled.

After this patch, a dimm-based memory controller will print the debug
info as:

[ 1011.380027] EDAC DEBUG: edac_mc_dump_csrow: csrow-&gt;csrow_idx = 0
[ 1011.380029] EDAC DEBUG: edac_mc_dump_csrow:   csrow = ffff8801169be000
[ 1011.380031] EDAC DEBUG: edac_mc_dump_csrow:   csrow-&gt;first_page = 0x0
[ 1011.380032] EDAC DEBUG: edac_mc_dump_csrow:   csrow-&gt;last_page = 0x0
[ 1011.380034] EDAC DEBUG: edac_mc_dump_csrow:   csrow-&gt;page_mask = 0x0
[ 1011.380035] EDAC DEBUG: edac_mc_dump_csrow:   csrow-&gt;nr_channels = 3
[ 1011.380037] EDAC DEBUG: edac_mc_dump_csrow:   csrow-&gt;channels = ffff8801149c2840
[ 1011.380039] EDAC DEBUG: edac_mc_dump_csrow:   csrow-&gt;mci = ffff880117426000
[ 1011.380041] EDAC DEBUG: edac_mc_dump_channel:   channel-&gt;chan_idx = 0
[ 1011.380042] EDAC DEBUG: edac_mc_dump_channel:     channel = ffff8801149c2860
[ 1011.380044] EDAC DEBUG: edac_mc_dump_channel:     channel-&gt;csrow = ffff8801169be000
[ 1011.380046] EDAC DEBUG: edac_mc_dump_channel:     channel-&gt;dimm = ffff88010fe90400
...
[ 1011.380095] EDAC DEBUG: edac_mc_dump_dimm: dimm0: channel 0 slot 0 mapped as virtual row 0, chan 0
[ 1011.380097] EDAC DEBUG: edac_mc_dump_dimm:   dimm = ffff88010fe90400
[ 1011.380099] EDAC DEBUG: edac_mc_dump_dimm:   dimm-&gt;label = 'CPU#0Channel#0_DIMM#0'
[ 1011.380101] EDAC DEBUG: edac_mc_dump_dimm:   dimm-&gt;nr_pages = 0x40000
[ 1011.380103] EDAC DEBUG: edac_mc_dump_dimm:   dimm-&gt;grain = 8
[ 1011.380104] EDAC DEBUG: edac_mc_dump_dimm:   dimm-&gt;nr_pages = 0x40000
...

(a rank-based memory controller would print, instead of "dimm?", "rank?"
 on the above debug info)

Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>edac: rewrite the sysfs code to use struct device</title>
<updated>2012-06-11T16:23:30+00:00</updated>
<author>
<name>Mauro Carvalho Chehab</name>
<email>mchehab@redhat.com</email>
</author>
<published>2012-04-16T19:41:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/commit/?id=7a623c039075e4ea21648d88133fafa6dcfd113d'/>
<id>7a623c039075e4ea21648d88133fafa6dcfd113d</id>
<content type='text'>
The EDAC subsystem uses the old struct sysdev approach,
creating all nodes using the raw sysfs API. This is bad,
as the API is deprecated.

As we'll be changing the EDAC API, let's first port the existing
code to struct device.

There's one drawback on this patch: driver-specific sysfs
nodes, used by mpc85xx_edac, amd64_edac and i7core_edac
 won't be created anymore. While it would be possible to
also port the device-specific code, that would mix kobj with
struct device, with is not recommended. Also, it is easier and nicer
to move the code to the drivers, instead, as the core can get rid
of some complex logic that just emulates what the device_add()
and device_create_file() already does.

The next patches will convert the driver-specific code to use
the device-specific calls. Then, the remaining bits of the old
sysfs API will be removed.

NOTE: a per-MC bus is required, otherwise devices with more than
one memory controller will hit a bug like the one below:

[  819.094946] EDAC DEBUG: find_mci_by_dev: find_mci_by_dev()
[  819.094948] EDAC DEBUG: edac_create_sysfs_mci_device: edac_create_sysfs_mci_device() idx=1
[  819.094952] EDAC DEBUG: edac_create_sysfs_mci_device: edac_create_sysfs_mci_device(): creating device mc1
[  819.094967] EDAC DEBUG: edac_create_sysfs_mci_device: edac_create_sysfs_mci_device creating dimm0, located at channel 0 slot 0
[  819.094984] ------------[ cut here ]------------
[  819.100142] WARNING: at fs/sysfs/dir.c:481 sysfs_add_one+0xc1/0xf0()
[  819.107282] Hardware name: S2600CP
[  819.111078] sysfs: cannot create duplicate filename '/bus/edac/devices/dimm0'
[  819.119062] Modules linked in: sb_edac(+) edac_core ip6table_filter ip6_tables ebtable_nat ebtables ipt_MASQUERADE iptable_nat nf_nat nf_conntrack_ipv4 nf_defrag_ipv4 xt_state nf_conntrack ipt_REJECT xt_CHECKSUM iptable_mangle iptable_filter ip_tables bridge stp llc sunrpc binfmt_misc dm_mirror dm_region_hash dm_log vhost_net macvtap macvlan tun kvm microcode pcspkr iTCO_wdt iTCO_vendor_support igb i2c_i801 i2c_core sg ioatdma dca sr_mod cdrom sd_mod crc_t10dif ahci libahci isci libsas libata scsi_transport_sas scsi_mod wmi dm_mod [last unloaded: scsi_wait_scan]
[  819.175748] Pid: 10902, comm: modprobe Not tainted 3.3.0-0.11.el7.v12.2.x86_64 #1
[  819.184113] Call Trace:
[  819.186868]  [&lt;ffffffff8105adaf&gt;] warn_slowpath_common+0x7f/0xc0
[  819.193573]  [&lt;ffffffff8105aea6&gt;] warn_slowpath_fmt+0x46/0x50
[  819.200000]  [&lt;ffffffff811f53d1&gt;] sysfs_add_one+0xc1/0xf0
[  819.206025]  [&lt;ffffffff811f5cf5&gt;] sysfs_do_create_link+0x135/0x220
[  819.212944]  [&lt;ffffffff811f7023&gt;] ? sysfs_create_group+0x13/0x20
[  819.219656]  [&lt;ffffffff811f5df3&gt;] sysfs_create_link+0x13/0x20
[  819.226109]  [&lt;ffffffff813b04f6&gt;] bus_add_device+0xe6/0x1b0
[  819.232350]  [&lt;ffffffff813ae7cb&gt;] device_add+0x2db/0x460
[  819.238300]  [&lt;ffffffffa0325634&gt;] edac_create_dimm_object+0x84/0xf0 [edac_core]
[  819.246460]  [&lt;ffffffffa0325e18&gt;] edac_create_sysfs_mci_device+0xe8/0x290 [edac_core]
[  819.255215]  [&lt;ffffffffa0322e2a&gt;] edac_mc_add_mc+0x5a/0x2c0 [edac_core]
[  819.262611]  [&lt;ffffffffa03412df&gt;] sbridge_register_mci+0x1bc/0x279 [sb_edac]
[  819.270493]  [&lt;ffffffffa03417a3&gt;] sbridge_probe+0xef/0x175 [sb_edac]
[  819.277630]  [&lt;ffffffff813ba4e8&gt;] ? pm_runtime_enable+0x58/0x90
[  819.284268]  [&lt;ffffffff812f430c&gt;] local_pci_probe+0x5c/0xd0
[  819.290508]  [&lt;ffffffff812f5ba1&gt;] __pci_device_probe+0xf1/0x100
[  819.297117]  [&lt;ffffffff812f5bea&gt;] pci_device_probe+0x3a/0x60
[  819.303457]  [&lt;ffffffff813b1003&gt;] really_probe+0x73/0x270
[  819.309496]  [&lt;ffffffff813b138e&gt;] driver_probe_device+0x4e/0xb0
[  819.316104]  [&lt;ffffffff813b149b&gt;] __driver_attach+0xab/0xb0
[  819.322337]  [&lt;ffffffff813b13f0&gt;] ? driver_probe_device+0xb0/0xb0
[  819.329151]  [&lt;ffffffff813af5d6&gt;] bus_for_each_dev+0x56/0x90
[  819.335489]  [&lt;ffffffff813b0d7e&gt;] driver_attach+0x1e/0x20
[  819.341534]  [&lt;ffffffff813b0980&gt;] bus_add_driver+0x1b0/0x2a0
[  819.347884]  [&lt;ffffffffa0347000&gt;] ? 0xffffffffa0346fff
[  819.353641]  [&lt;ffffffff813b19f6&gt;] driver_register+0x76/0x140
[  819.359980]  [&lt;ffffffff8159f18b&gt;] ? printk+0x51/0x53
[  819.365524]  [&lt;ffffffffa0347000&gt;] ? 0xffffffffa0346fff
[  819.371291]  [&lt;ffffffff812f5896&gt;] __pci_register_driver+0x56/0xd0
[  819.378096]  [&lt;ffffffffa0347054&gt;] sbridge_init+0x54/0x1000 [sb_edac]
[  819.385231]  [&lt;ffffffff8100203f&gt;] do_one_initcall+0x3f/0x170
[  819.391577]  [&lt;ffffffff810bcd2e&gt;] sys_init_module+0xbe/0x230
[  819.397926]  [&lt;ffffffff815bb529&gt;] system_call_fastpath+0x16/0x1b
[  819.404633] ---[ end trace 1654fdd39556689f ]---

This happens because the bus is not being properly initialized.
Instead of putting the memory sub-devices inside the memory controller,
it is putting everything under the same directory:

$ tree /sys/bus/edac/
/sys/bus/edac/
├── devices
│   ├── all_channel_counts -&gt; ../../../devices/system/edac/mc/mc0/all_channel_counts
│   ├── csrow0 -&gt; ../../../devices/system/edac/mc/mc0/csrow0
│   ├── csrow1 -&gt; ../../../devices/system/edac/mc/mc0/csrow1
│   ├── csrow2 -&gt; ../../../devices/system/edac/mc/mc0/csrow2
│   ├── dimm0 -&gt; ../../../devices/system/edac/mc/mc0/dimm0
│   ├── dimm1 -&gt; ../../../devices/system/edac/mc/mc0/dimm1
│   ├── dimm3 -&gt; ../../../devices/system/edac/mc/mc0/dimm3
│   ├── dimm6 -&gt; ../../../devices/system/edac/mc/mc0/dimm6
│   ├── inject_addrmatch -&gt; ../../../devices/system/edac/mc/mc0/inject_addrmatch
│   ├── mc -&gt; ../../../devices/system/edac/mc
│   └── mc0 -&gt; ../../../devices/system/edac/mc/mc0
├── drivers
├── drivers_autoprobe
├── drivers_probe
└── uevent

On a multi-memory controller system, the names "csrow%d" and "dimm%d"
should be under "mc%d", and not at the main hierarchy level.

So, we need to create a per-MC bus, in order to have its own namespace.

Reviewed-by: Aristeu Rozanski &lt;arozansk@redhat.com&gt;
Cc: Doug Thompson &lt;norsk5@yahoo.com&gt;
Cc: Greg K H &lt;gregkh@linuxfoundation.org&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The EDAC subsystem uses the old struct sysdev approach,
creating all nodes using the raw sysfs API. This is bad,
as the API is deprecated.

As we'll be changing the EDAC API, let's first port the existing
code to struct device.

There's one drawback on this patch: driver-specific sysfs
nodes, used by mpc85xx_edac, amd64_edac and i7core_edac
 won't be created anymore. While it would be possible to
also port the device-specific code, that would mix kobj with
struct device, with is not recommended. Also, it is easier and nicer
to move the code to the drivers, instead, as the core can get rid
of some complex logic that just emulates what the device_add()
and device_create_file() already does.

The next patches will convert the driver-specific code to use
the device-specific calls. Then, the remaining bits of the old
sysfs API will be removed.

NOTE: a per-MC bus is required, otherwise devices with more than
one memory controller will hit a bug like the one below:

[  819.094946] EDAC DEBUG: find_mci_by_dev: find_mci_by_dev()
[  819.094948] EDAC DEBUG: edac_create_sysfs_mci_device: edac_create_sysfs_mci_device() idx=1
[  819.094952] EDAC DEBUG: edac_create_sysfs_mci_device: edac_create_sysfs_mci_device(): creating device mc1
[  819.094967] EDAC DEBUG: edac_create_sysfs_mci_device: edac_create_sysfs_mci_device creating dimm0, located at channel 0 slot 0
[  819.094984] ------------[ cut here ]------------
[  819.100142] WARNING: at fs/sysfs/dir.c:481 sysfs_add_one+0xc1/0xf0()
[  819.107282] Hardware name: S2600CP
[  819.111078] sysfs: cannot create duplicate filename '/bus/edac/devices/dimm0'
[  819.119062] Modules linked in: sb_edac(+) edac_core ip6table_filter ip6_tables ebtable_nat ebtables ipt_MASQUERADE iptable_nat nf_nat nf_conntrack_ipv4 nf_defrag_ipv4 xt_state nf_conntrack ipt_REJECT xt_CHECKSUM iptable_mangle iptable_filter ip_tables bridge stp llc sunrpc binfmt_misc dm_mirror dm_region_hash dm_log vhost_net macvtap macvlan tun kvm microcode pcspkr iTCO_wdt iTCO_vendor_support igb i2c_i801 i2c_core sg ioatdma dca sr_mod cdrom sd_mod crc_t10dif ahci libahci isci libsas libata scsi_transport_sas scsi_mod wmi dm_mod [last unloaded: scsi_wait_scan]
[  819.175748] Pid: 10902, comm: modprobe Not tainted 3.3.0-0.11.el7.v12.2.x86_64 #1
[  819.184113] Call Trace:
[  819.186868]  [&lt;ffffffff8105adaf&gt;] warn_slowpath_common+0x7f/0xc0
[  819.193573]  [&lt;ffffffff8105aea6&gt;] warn_slowpath_fmt+0x46/0x50
[  819.200000]  [&lt;ffffffff811f53d1&gt;] sysfs_add_one+0xc1/0xf0
[  819.206025]  [&lt;ffffffff811f5cf5&gt;] sysfs_do_create_link+0x135/0x220
[  819.212944]  [&lt;ffffffff811f7023&gt;] ? sysfs_create_group+0x13/0x20
[  819.219656]  [&lt;ffffffff811f5df3&gt;] sysfs_create_link+0x13/0x20
[  819.226109]  [&lt;ffffffff813b04f6&gt;] bus_add_device+0xe6/0x1b0
[  819.232350]  [&lt;ffffffff813ae7cb&gt;] device_add+0x2db/0x460
[  819.238300]  [&lt;ffffffffa0325634&gt;] edac_create_dimm_object+0x84/0xf0 [edac_core]
[  819.246460]  [&lt;ffffffffa0325e18&gt;] edac_create_sysfs_mci_device+0xe8/0x290 [edac_core]
[  819.255215]  [&lt;ffffffffa0322e2a&gt;] edac_mc_add_mc+0x5a/0x2c0 [edac_core]
[  819.262611]  [&lt;ffffffffa03412df&gt;] sbridge_register_mci+0x1bc/0x279 [sb_edac]
[  819.270493]  [&lt;ffffffffa03417a3&gt;] sbridge_probe+0xef/0x175 [sb_edac]
[  819.277630]  [&lt;ffffffff813ba4e8&gt;] ? pm_runtime_enable+0x58/0x90
[  819.284268]  [&lt;ffffffff812f430c&gt;] local_pci_probe+0x5c/0xd0
[  819.290508]  [&lt;ffffffff812f5ba1&gt;] __pci_device_probe+0xf1/0x100
[  819.297117]  [&lt;ffffffff812f5bea&gt;] pci_device_probe+0x3a/0x60
[  819.303457]  [&lt;ffffffff813b1003&gt;] really_probe+0x73/0x270
[  819.309496]  [&lt;ffffffff813b138e&gt;] driver_probe_device+0x4e/0xb0
[  819.316104]  [&lt;ffffffff813b149b&gt;] __driver_attach+0xab/0xb0
[  819.322337]  [&lt;ffffffff813b13f0&gt;] ? driver_probe_device+0xb0/0xb0
[  819.329151]  [&lt;ffffffff813af5d6&gt;] bus_for_each_dev+0x56/0x90
[  819.335489]  [&lt;ffffffff813b0d7e&gt;] driver_attach+0x1e/0x20
[  819.341534]  [&lt;ffffffff813b0980&gt;] bus_add_driver+0x1b0/0x2a0
[  819.347884]  [&lt;ffffffffa0347000&gt;] ? 0xffffffffa0346fff
[  819.353641]  [&lt;ffffffff813b19f6&gt;] driver_register+0x76/0x140
[  819.359980]  [&lt;ffffffff8159f18b&gt;] ? printk+0x51/0x53
[  819.365524]  [&lt;ffffffffa0347000&gt;] ? 0xffffffffa0346fff
[  819.371291]  [&lt;ffffffff812f5896&gt;] __pci_register_driver+0x56/0xd0
[  819.378096]  [&lt;ffffffffa0347054&gt;] sbridge_init+0x54/0x1000 [sb_edac]
[  819.385231]  [&lt;ffffffff8100203f&gt;] do_one_initcall+0x3f/0x170
[  819.391577]  [&lt;ffffffff810bcd2e&gt;] sys_init_module+0xbe/0x230
[  819.397926]  [&lt;ffffffff815bb529&gt;] system_call_fastpath+0x16/0x1b
[  819.404633] ---[ end trace 1654fdd39556689f ]---

This happens because the bus is not being properly initialized.
Instead of putting the memory sub-devices inside the memory controller,
it is putting everything under the same directory:

$ tree /sys/bus/edac/
/sys/bus/edac/
├── devices
│   ├── all_channel_counts -&gt; ../../../devices/system/edac/mc/mc0/all_channel_counts
│   ├── csrow0 -&gt; ../../../devices/system/edac/mc/mc0/csrow0
│   ├── csrow1 -&gt; ../../../devices/system/edac/mc/mc0/csrow1
│   ├── csrow2 -&gt; ../../../devices/system/edac/mc/mc0/csrow2
│   ├── dimm0 -&gt; ../../../devices/system/edac/mc/mc0/dimm0
│   ├── dimm1 -&gt; ../../../devices/system/edac/mc/mc0/dimm1
│   ├── dimm3 -&gt; ../../../devices/system/edac/mc/mc0/dimm3
│   ├── dimm6 -&gt; ../../../devices/system/edac/mc/mc0/dimm6
│   ├── inject_addrmatch -&gt; ../../../devices/system/edac/mc/mc0/inject_addrmatch
│   ├── mc -&gt; ../../../devices/system/edac/mc
│   └── mc0 -&gt; ../../../devices/system/edac/mc/mc0
├── drivers
├── drivers_autoprobe
├── drivers_probe
└── uevent

On a multi-memory controller system, the names "csrow%d" and "dimm%d"
should be under "mc%d", and not at the main hierarchy level.

So, we need to create a per-MC bus, in order to have its own namespace.

Reviewed-by: Aristeu Rozanski &lt;arozansk@redhat.com&gt;
Cc: Doug Thompson &lt;norsk5@yahoo.com&gt;
Cc: Greg K H &lt;gregkh@linuxfoundation.org&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>edac: rewrite edac_align_ptr()</title>
<updated>2012-05-28T22:10:59+00:00</updated>
<author>
<name>Mauro Carvalho Chehab</name>
<email>mchehab@redhat.com</email>
</author>
<published>2012-04-16T13:18:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/commit/?id=93e4fe64ece4eccf0ff4ac69bceb389290b8ab7c'/>
<id>93e4fe64ece4eccf0ff4ac69bceb389290b8ab7c</id>
<content type='text'>
The edac_align_ptr() function is used to prepare data for a single
memory allocation kzalloc() call. It counts how many bytes are needed
by some data structure.

Using it as-is is not that trivial, as the quantity of memory elements
reserved is not there, but, instead, it is on a next call.

In order to avoid mistakes when using it, move the number of allocated
elements into it, making easier to use it.

Reviewed-by: Borislav Petkov &lt;bp@amd64.org&gt;
Cc: Aristeu Rozanski &lt;arozansk@redhat.com&gt;
Cc: Doug Thompson &lt;norsk5@yahoo.com&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The edac_align_ptr() function is used to prepare data for a single
memory allocation kzalloc() call. It counts how many bytes are needed
by some data structure.

Using it as-is is not that trivial, as the quantity of memory elements
reserved is not there, but, instead, it is on a next call.

In order to avoid mistakes when using it, move the number of allocated
elements into it, making easier to use it.

Reviewed-by: Borislav Petkov &lt;bp@amd64.org&gt;
Cc: Aristeu Rozanski &lt;arozansk@redhat.com&gt;
Cc: Doug Thompson &lt;norsk5@yahoo.com&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>edac: convert sysdev_class to a regular subsystem</title>
<updated>2011-12-14T23:21:07+00:00</updated>
<author>
<name>Kay Sievers</name>
<email>kay.sievers@vrfy.org</email>
</author>
<published>2011-12-14T23:21:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/commit/?id=fe5ff8b84c8b03348a2f64ea9d884348faec2217'/>
<id>fe5ff8b84c8b03348a2f64ea9d884348faec2217</id>
<content type='text'>
After all sysdev classes are ported to regular driver core entities, the
sysdev implementation will be entirely removed from the kernel.

Cc: Doug Thompson &lt;dougthompson@xmission.com&gt;
Cc: Paul Gortmaker &lt;paul.gortmaker@windriver.com&gt;
Cc: Lucas De Marchi &lt;lucas.demarchi@profusion.mobi&gt;
Cc: Borislav Petkov &lt;borislav.petkov@amd.com&gt;
Signed-off-by: Kay Sievers &lt;kay.sievers@vrfy.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
After all sysdev classes are ported to regular driver core entities, the
sysdev implementation will be entirely removed from the kernel.

Cc: Doug Thompson &lt;dougthompson@xmission.com&gt;
Cc: Paul Gortmaker &lt;paul.gortmaker@windriver.com&gt;
Cc: Lucas De Marchi &lt;lucas.demarchi@profusion.mobi&gt;
Cc: Borislav Petkov &lt;borislav.petkov@amd.com&gt;
Signed-off-by: Kay Sievers &lt;kay.sievers@vrfy.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>EDAC: Export edac sysfs class to users.</title>
<updated>2010-10-21T12:47:59+00:00</updated>
<author>
<name>Borislav Petkov</name>
<email>borislav.petkov@amd.com</email>
</author>
<published>2010-09-02T15:26:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/commit/?id=30e1f7a8122145f44f45c95366e27b6bb0b08428'/>
<id>30e1f7a8122145f44f45c95366e27b6bb0b08428</id>
<content type='text'>
Move toplevel sysfs class to the stub and make it available to
non-modularized code too. Add proper refcounting of its users and move
the registration functionality into the reference counting routines.

Signed-off-by: Borislav Petkov &lt;borislav.petkov@amd.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Move toplevel sysfs class to the stub and make it available to
non-modularized code too. Add proper refcounting of its users and move
the registration functionality into the reference counting routines.

Signed-off-by: Borislav Petkov &lt;borislav.petkov@amd.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>edac: remove unneeded functions and add static accessor</title>
<updated>2008-04-29T15:06:26+00:00</updated>
<author>
<name>Adrian Bunk</name>
<email>bunk@kernel.org</email>
</author>
<published>2008-04-29T08:03:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/commit/?id=1a45027d1afd7e85254b5ef8535e93ce3d588cf4'/>
<id>1a45027d1afd7e85254b5ef8535e93ce3d588cf4</id>
<content type='text'>
Collection of patches, merged into one, from Adrian that do the following:

1) This patch makes the following needlessly global functions static:
- edac_pci_get_log_pe()
- edac_pci_get_log_npe()
- edac_pci_get_panic_on_pe()
- edac_pci_unregister_sysfs_instance_kobj()
- edac_pci_main_kobj_setup()

2) Remove unneeded function edac_device_find()

3) Added #if 0 around function  edac_pci_find()

4) make the needlessly global edac_pci_generic_check() static

5) Removed function edac_check_mc_devices()

Doug Thompson modified Adrian's patches, to bettern represent
the direction of EDAC, and make them one patch.

Cc: Alan Cox &lt;alan@lxorguk.ukuu.org.uk&gt;
Signed-off-by: Adrian Bunk &lt;bunk@kernel.org&gt;
Signed-off-by: Doug Thompson &lt;dougthompson@xmission.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Collection of patches, merged into one, from Adrian that do the following:

1) This patch makes the following needlessly global functions static:
- edac_pci_get_log_pe()
- edac_pci_get_log_npe()
- edac_pci_get_panic_on_pe()
- edac_pci_unregister_sysfs_instance_kobj()
- edac_pci_main_kobj_setup()

2) Remove unneeded function edac_device_find()

3) Added #if 0 around function  edac_pci_find()

4) make the needlessly global edac_pci_generic_check() static

5) Removed function edac_check_mc_devices()

Doug Thompson modified Adrian's patches, to bettern represent
the direction of EDAC, and make them one patch.

Cc: Alan Cox &lt;alan@lxorguk.ukuu.org.uk&gt;
Signed-off-by: Adrian Bunk &lt;bunk@kernel.org&gt;
Signed-off-by: Doug Thompson &lt;dougthompson@xmission.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>drivers/edac: fix edac_pci sysfs</title>
<updated>2007-07-26T18:35:18+00:00</updated>
<author>
<name>Doug Thompson</name>
<email>dougthompson@xmission.com</email>
</author>
<published>2007-07-26T17:41:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/commit/?id=d4c1465b7de9686c4c5aa533b15c09ab014aab3a'/>
<id>d4c1465b7de9686c4c5aa533b15c09ab014aab3a</id>
<content type='text'>
This patch fixes sysfs exit code for the EDAC PCI device in a similiar manner
and the previous fixes for EDAC_MC and EDAC_DEVICE.

It removes the old (and incorrect) completion model and uses reference counts
on per instance kobjects and on the edac core module.

This pattern was applied to the edac_mc and edac_device code, but the EDAC PCI
code was missed.  In addition, this fixes a system hang after a low level
driver was unloaded.  (A cleanup function was called twice, which really
screwed things up)

Cc: Greg KH &lt;greg@kroah.com&gt;
Cc: Alan Cox &lt;alan@lxorguk.ukuu.org.uk&gt;
Signed-off-by:  Doug Thompson &lt;dougthompson@xmission.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch fixes sysfs exit code for the EDAC PCI device in a similiar manner
and the previous fixes for EDAC_MC and EDAC_DEVICE.

It removes the old (and incorrect) completion model and uses reference counts
on per instance kobjects and on the edac core module.

This pattern was applied to the edac_mc and edac_device code, but the EDAC PCI
code was missed.  In addition, this fixes a system hang after a low level
driver was unloaded.  (A cleanup function was called twice, which really
screwed things up)

Cc: Greg KH &lt;greg@kroah.com&gt;
Cc: Alan Cox &lt;alan@lxorguk.ukuu.org.uk&gt;
Signed-off-by:  Doug Thompson &lt;dougthompson@xmission.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>drivers/edac: fix reset edac_mc pollmsec</title>
<updated>2007-07-26T18:35:18+00:00</updated>
<author>
<name>Doug Thompson</name>
<email>dougthompson@xmission.com</email>
</author>
<published>2007-07-26T17:41:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/commit/?id=bce19683c17485b584b62b984d6dcf5332181588'/>
<id>bce19683c17485b584b62b984d6dcf5332181588</id>
<content type='text'>
This fixes a deadlock that could occur on a 'setup' and 'teardown' sequence of
the workq for a edac_mc control structure instance.  A similiar fix was
previously implemented for the edac_device code.

In addition, the edac_mc device code there was missing code to allow the workq
period valu to be altered via sysfs control.

This patch adds that fix on the code, and allows for the changing of the
period value as well.

Cc: Alan Cox &lt;alan@lxorguk.ukuu.org.uk&gt;
Signed-off-by: Doug Thompson &lt;dougthompson@xmission.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This fixes a deadlock that could occur on a 'setup' and 'teardown' sequence of
the workq for a edac_mc control structure instance.  A similiar fix was
previously implemented for the edac_device code.

In addition, the edac_mc device code there was missing code to allow the workq
period valu to be altered via sysfs control.

This patch adds that fix on the code, and allows for the changing of the
period value as well.

Cc: Alan Cox &lt;alan@lxorguk.ukuu.org.uk&gt;
Signed-off-by: Doug Thompson &lt;dougthompson@xmission.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
