<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/include/linux/edac.h, branch v3.7</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>edac: allow specifying the error count with fake_inject</title>
<updated>2012-06-27T12:01:30+00:00</updated>
<author>
<name>Mauro Carvalho Chehab</name>
<email>mchehab@redhat.com</email>
</author>
<published>2012-06-12T13:55:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=38ced28b21efff18fd5e5c98a92830e8f0031cee'/>
<id>38ced28b21efff18fd5e5c98a92830e8f0031cee</id>
<content type='text'>
In order to test if the error counters are properly incremented,
add a way to specify how many errors were generated by a trace.

Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In order to test if the error counters are properly incremented,
add a way to specify how many errors were generated by a trace.

Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>edac: change the mem allocation scheme to make Documentation/kobject.txt happy</title>
<updated>2012-06-11T16:23:45+00:00</updated>
<author>
<name>Mauro Carvalho Chehab</name>
<email>mchehab@redhat.com</email>
</author>
<published>2012-04-24T18:05:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=de3910eb79ac8c0f29a11224661c0ebaaf813039'/>
<id>de3910eb79ac8c0f29a11224661c0ebaaf813039</id>
<content type='text'>
Kernel kobjects have rigid rules: each container object should be
dynamically allocated, and can't be allocated into a single kmalloc.

EDAC never obeyed this rule: it has a single malloc function that
allocates all needed data into a single kzalloc.

As this is not accepted anymore, change the allocation schema of the
EDAC *_info structs to enforce this Kernel standard.

Acked-by: Chris Metcalf &lt;cmetcalf@tilera.com&gt;
Cc: Aristeu Rozanski &lt;arozansk@redhat.com&gt;
Cc: Doug Thompson &lt;norsk5@yahoo.com&gt;
Cc: Greg K H &lt;gregkh@linuxfoundation.org&gt;
Cc: Borislav Petkov &lt;borislav.petkov@amd.com&gt;
Cc: Mark Gross &lt;mark.gross@intel.com&gt;
Cc: Tim Small &lt;tim@buttersideup.com&gt;
Cc: Ranganathan Desikan &lt;ravi@jetztechnologies.com&gt;
Cc: "Arvind R." &lt;arvino55@gmail.com&gt;
Cc: Olof Johansson &lt;olof@lixom.net&gt;
Cc: Egor Martovetsky &lt;egor@pasemi.com&gt;
Cc: Michal Marek &lt;mmarek@suse.cz&gt;
Cc: Jiri Kosina &lt;jkosina@suse.cz&gt;
Cc: Dmitry Eremin-Solenikov &lt;dbaryshkov@gmail.com&gt;
Cc: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
Cc: Hitoshi Mitake &lt;h.mitake@gmail.com&gt;
Cc: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Cc: Shaohui Xie &lt;Shaohui.Xie@freescale.com&gt;
Cc: linuxppc-dev@lists.ozlabs.org
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Kernel kobjects have rigid rules: each container object should be
dynamically allocated, and can't be allocated into a single kmalloc.

EDAC never obeyed this rule: it has a single malloc function that
allocates all needed data into a single kzalloc.

As this is not accepted anymore, change the allocation schema of the
EDAC *_info structs to enforce this Kernel standard.

Acked-by: Chris Metcalf &lt;cmetcalf@tilera.com&gt;
Cc: Aristeu Rozanski &lt;arozansk@redhat.com&gt;
Cc: Doug Thompson &lt;norsk5@yahoo.com&gt;
Cc: Greg K H &lt;gregkh@linuxfoundation.org&gt;
Cc: Borislav Petkov &lt;borislav.petkov@amd.com&gt;
Cc: Mark Gross &lt;mark.gross@intel.com&gt;
Cc: Tim Small &lt;tim@buttersideup.com&gt;
Cc: Ranganathan Desikan &lt;ravi@jetztechnologies.com&gt;
Cc: "Arvind R." &lt;arvino55@gmail.com&gt;
Cc: Olof Johansson &lt;olof@lixom.net&gt;
Cc: Egor Martovetsky &lt;egor@pasemi.com&gt;
Cc: Michal Marek &lt;mmarek@suse.cz&gt;
Cc: Jiri Kosina &lt;jkosina@suse.cz&gt;
Cc: Dmitry Eremin-Solenikov &lt;dbaryshkov@gmail.com&gt;
Cc: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
Cc: Hitoshi Mitake &lt;h.mitake@gmail.com&gt;
Cc: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Cc: Shaohui Xie &lt;Shaohui.Xie@freescale.com&gt;
Cc: linuxppc-dev@lists.ozlabs.org
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>edac: Add debufs nodes to allow doing fake error inject</title>
<updated>2012-06-11T16:23:43+00:00</updated>
<author>
<name>Mauro Carvalho Chehab</name>
<email>mchehab@redhat.com</email>
</author>
<published>2012-03-26T12:35:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=452a6bf955ee1842361742833e40e046287308f4'/>
<id>452a6bf955ee1842361742833e40e046287308f4</id>
<content type='text'>
Sometimes, it is useful to have a mechanism that generates fake
errors, in order to test the EDAC core code, and the userspace
tools.

Provide such mechanism by adding a few debugfs nodes.

Reviewed-by: 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>
Sometimes, it is useful to have a mechanism that generates fake
errors, in order to test the EDAC core code, and the userspace
tools.

Provide such mechanism by adding a few debugfs nodes.

Reviewed-by: 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: Get rid of the old kobj's from the edac mc code</title>
<updated>2012-06-11T16:23:41+00:00</updated>
<author>
<name>Mauro Carvalho Chehab</name>
<email>mchehab@redhat.com</email>
</author>
<published>2012-03-21T19:55:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=d90c008963ef638cb7ab7d5eb76362b3c2d379bc'/>
<id>d90c008963ef638cb7ab7d5eb76362b3c2d379bc</id>
<content type='text'>
Now that al users for the old kobj raw access are gone,
we can get rid of the legacy kobj-based structures and
data.

Reviewed-by: Aristeu Rozanski &lt;arozansk@redhat.com&gt;
Cc: Doug Thompson &lt;norsk5@yahoo.com&gt;
Cc: Michal Marek &lt;mmarek@suse.cz&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>
Now that al users for the old kobj raw access are gone,
we can get rid of the legacy kobj-based structures and
data.

Reviewed-by: Aristeu Rozanski &lt;arozansk@redhat.com&gt;
Cc: Doug Thompson &lt;norsk5@yahoo.com&gt;
Cc: Michal Marek &lt;mmarek@suse.cz&gt;
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.toradex.cn/cgit/linux-toradex.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: use Documentation-nano format for some data structs</title>
<updated>2012-06-11T14:56:07+00:00</updated>
<author>
<name>Mauro Carvalho Chehab</name>
<email>mchehab@redhat.com</email>
</author>
<published>2012-03-21T19:21:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=b0610bb82abd1c4ac97c33f0312cd7fd72eaa325'/>
<id>b0610bb82abd1c4ac97c33f0312cd7fd72eaa325</id>
<content type='text'>
No functional changes. Just comment improvements.

Reviewed-by: 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>
No functional changes. Just comment improvements.

Reviewed-by: 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: Rename the parent dev to pdev</title>
<updated>2012-06-11T14:56:06+00:00</updated>
<author>
<name>Mauro Carvalho Chehab</name>
<email>mchehab@redhat.com</email>
</author>
<published>2012-03-16T10:44:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=fd687502dc8037aa5a4b84c570ada971106574ee'/>
<id>fd687502dc8037aa5a4b84c570ada971106574ee</id>
<content type='text'>
As EDAC doesn't use struct device itself, it created a parent dev
pointer called as "pdev".  Now that we'll be converting it to use
struct device, instead of struct devsys, this needs to be fixed.

No functional changes.

Reviewed-by: Aristeu Rozanski &lt;arozansk@redhat.com&gt;
Acked-by: Chris Metcalf &lt;cmetcalf@tilera.com&gt;
Cc: Doug Thompson &lt;norsk5@yahoo.com&gt;
Cc: Borislav Petkov &lt;borislav.petkov@amd.com&gt;
Cc: Mark Gross &lt;mark.gross@intel.com&gt;
Cc: Jason Uhlenkott &lt;juhlenko@akamai.com&gt;
Cc: Tim Small &lt;tim@buttersideup.com&gt;
Cc: Ranganathan Desikan &lt;ravi@jetztechnologies.com&gt;
Cc: "Arvind R." &lt;arvino55@gmail.com&gt;
Cc: Olof Johansson &lt;olof@lixom.net&gt;
Cc: Egor Martovetsky &lt;egor@pasemi.com&gt;
Cc: Michal Marek &lt;mmarek@suse.cz&gt;
Cc: Jiri Kosina &lt;jkosina@suse.cz&gt;
Cc: Joe Perches &lt;joe@perches.com&gt;
Cc: Dmitry Eremin-Solenikov &lt;dbaryshkov@gmail.com&gt;
Cc: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
Cc: Hitoshi Mitake &lt;h.mitake@gmail.com&gt;
Cc: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Cc: "Niklas Söderlund" &lt;niklas.soderlund@ericsson.com&gt;
Cc: Shaohui Xie &lt;Shaohui.Xie@freescale.com&gt;
Cc: Josh Boyer &lt;jwboyer@gmail.com&gt;
Cc: linuxppc-dev@lists.ozlabs.org
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
As EDAC doesn't use struct device itself, it created a parent dev
pointer called as "pdev".  Now that we'll be converting it to use
struct device, instead of struct devsys, this needs to be fixed.

No functional changes.

Reviewed-by: Aristeu Rozanski &lt;arozansk@redhat.com&gt;
Acked-by: Chris Metcalf &lt;cmetcalf@tilera.com&gt;
Cc: Doug Thompson &lt;norsk5@yahoo.com&gt;
Cc: Borislav Petkov &lt;borislav.petkov@amd.com&gt;
Cc: Mark Gross &lt;mark.gross@intel.com&gt;
Cc: Jason Uhlenkott &lt;juhlenko@akamai.com&gt;
Cc: Tim Small &lt;tim@buttersideup.com&gt;
Cc: Ranganathan Desikan &lt;ravi@jetztechnologies.com&gt;
Cc: "Arvind R." &lt;arvino55@gmail.com&gt;
Cc: Olof Johansson &lt;olof@lixom.net&gt;
Cc: Egor Martovetsky &lt;egor@pasemi.com&gt;
Cc: Michal Marek &lt;mmarek@suse.cz&gt;
Cc: Jiri Kosina &lt;jkosina@suse.cz&gt;
Cc: Joe Perches &lt;joe@perches.com&gt;
Cc: Dmitry Eremin-Solenikov &lt;dbaryshkov@gmail.com&gt;
Cc: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
Cc: Hitoshi Mitake &lt;h.mitake@gmail.com&gt;
Cc: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Cc: "Niklas Söderlund" &lt;niklas.soderlund@ericsson.com&gt;
Cc: Shaohui Xie &lt;Shaohui.Xie@freescale.com&gt;
Cc: Josh Boyer &lt;jwboyer@gmail.com&gt;
Cc: linuxppc-dev@lists.ozlabs.org
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>edac: Initialize the dimm label with the known information</title>
<updated>2012-05-28T22:13:50+00:00</updated>
<author>
<name>Mauro Carvalho Chehab</name>
<email>mchehab@redhat.com</email>
</author>
<published>2012-02-09T14:05:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=5926ff502f6b93ca0c1654f8a5c5317ea236dbdb'/>
<id>5926ff502f6b93ca0c1654f8a5c5317ea236dbdb</id>
<content type='text'>
While userspace doesn't fill the dimm labels, add there the dimm location,
as described by the used memory model. This could eventually match what
is described at the dmidecode, making easier for people to identify the
memory.

For example, on an Intel motherboard where the DMI table is reliable,
the first memory stick is described as:

Memory Device
	Array Handle: 0x0029
	Error Information Handle: Not Provided
	Total Width: 64 bits
	Data Width: 64 bits
	Size: 2048 MB
	Form Factor: DIMM
	Set: 1
	Locator: A1_DIMM0
	Bank Locator: A1_Node0_Channel0_Dimm0
	Type: &lt;OUT OF SPEC&gt;
	Type Detail: Synchronous
	Speed: 800 MHz
	Manufacturer: A1_Manufacturer0
	Serial Number: A1_SerNum0
	Asset Tag: A1_AssetTagNum0
	Part Number: A1_PartNum0

The memory named as "A1_DIMM0" is physically located at the first
memory controller (node 0), at channel 0, dimm slot 0.

After this patch, the memory label will be filled with:
	/sys/devices/system/edac/mc/csrow0/ch0_dimm_label:mc#0channel#0slot#0

And (after the new EDAC API patches) as:
	/sys/devices/system/edac/mc/mc0/dimm0/dimm_label:mc#0channel#0slot#0

So, even if the memory label is not initialized on userspace, an useful
information with the error location is filled there, expecially since
several systems/motherboards are provided with enough info to map from
channel/slot (or branch/channel/slot) into the DIMM label. So, letting the
EDAC core fill it by default is a good thing.

It should noticed that, as the label filling happens at the
edac_mc_alloc(), drivers can override it to better describe the memories
(and some actually do it).

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>
While userspace doesn't fill the dimm labels, add there the dimm location,
as described by the used memory model. This could eventually match what
is described at the dmidecode, making easier for people to identify the
memory.

For example, on an Intel motherboard where the DMI table is reliable,
the first memory stick is described as:

Memory Device
	Array Handle: 0x0029
	Error Information Handle: Not Provided
	Total Width: 64 bits
	Data Width: 64 bits
	Size: 2048 MB
	Form Factor: DIMM
	Set: 1
	Locator: A1_DIMM0
	Bank Locator: A1_Node0_Channel0_Dimm0
	Type: &lt;OUT OF SPEC&gt;
	Type Detail: Synchronous
	Speed: 800 MHz
	Manufacturer: A1_Manufacturer0
	Serial Number: A1_SerNum0
	Asset Tag: A1_AssetTagNum0
	Part Number: A1_PartNum0

The memory named as "A1_DIMM0" is physically located at the first
memory controller (node 0), at channel 0, dimm slot 0.

After this patch, the memory label will be filled with:
	/sys/devices/system/edac/mc/csrow0/ch0_dimm_label:mc#0channel#0slot#0

And (after the new EDAC API patches) as:
	/sys/devices/system/edac/mc/mc0/dimm0/dimm_label:mc#0channel#0slot#0

So, even if the memory label is not initialized on userspace, an useful
information with the error location is filled there, expecially since
several systems/motherboards are provided with enough info to map from
channel/slot (or branch/channel/slot) into the DIMM label. So, letting the
EDAC core fill it by default is a good thing.

It should noticed that, as the label filling happens at the
edac_mc_alloc(), drivers can override it to better describe the memories
(and some actually do it).

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: Change internal representation to work with layers</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-18T18:20:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=4275be63559719c3149b19751029f1b0f1b26775'/>
<id>4275be63559719c3149b19751029f1b0f1b26775</id>
<content type='text'>
Change the EDAC internal representation to work with non-csrow
based memory controllers.

There are lots of those memory controllers nowadays, and more
are coming. So, the EDAC internal representation needs to be
changed, in order to work with those memory controllers, while
preserving backward compatibility with the old ones.

The edac core was written with the idea that memory controllers
are able to directly access csrows.

This is not true for FB-DIMM and RAMBUS memory controllers.

Also, some recent advanced memory controllers don't present a per-csrows
view. Instead, they view memories as DIMMs, instead of ranks.

So, change the allocation and error report routines to allow
them to work with all types of architectures.

This will allow the removal of several hacks with FB-DIMM and RAMBUS
memory controllers.

Also, several tests were done on different platforms using different
x86 drivers.

TODO: a multi-rank DIMMs are currently represented by multiple DIMM
entries in struct dimm_info. That means that changing a label for one
rank won't change the same label for the other ranks at the same DIMM.
This bug is present since the beginning of the EDAC, so it is not a big
deal. However, on several drivers, it is possible to fix this issue, but
it should be a per-driver fix, as the csrow =&gt; DIMM arrangement may not
be equal for all. So, don't try to fix it here yet.

I tried to make this patch as short as possible, preceding it with
several other patches that simplified the logic here. Yet, as the
internal API changes, all drivers need changes. The changes are
generally bigger in the drivers for FB-DIMMs.

Cc: Aristeu Rozanski &lt;arozansk@redhat.com&gt;
Cc: Doug Thompson &lt;norsk5@yahoo.com&gt;
Cc: Borislav Petkov &lt;borislav.petkov@amd.com&gt;
Cc: Mark Gross &lt;mark.gross@intel.com&gt;
Cc: Jason Uhlenkott &lt;juhlenko@akamai.com&gt;
Cc: Tim Small &lt;tim@buttersideup.com&gt;
Cc: Ranganathan Desikan &lt;ravi@jetztechnologies.com&gt;
Cc: "Arvind R." &lt;arvino55@gmail.com&gt;
Cc: Olof Johansson &lt;olof@lixom.net&gt;
Cc: Egor Martovetsky &lt;egor@pasemi.com&gt;
Cc: Chris Metcalf &lt;cmetcalf@tilera.com&gt;
Cc: Michal Marek &lt;mmarek@suse.cz&gt;
Cc: Jiri Kosina &lt;jkosina@suse.cz&gt;
Cc: Joe Perches &lt;joe@perches.com&gt;
Cc: Dmitry Eremin-Solenikov &lt;dbaryshkov@gmail.com&gt;
Cc: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
Cc: Hitoshi Mitake &lt;h.mitake@gmail.com&gt;
Cc: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Cc: "Niklas Söderlund" &lt;niklas.soderlund@ericsson.com&gt;
Cc: Shaohui Xie &lt;Shaohui.Xie@freescale.com&gt;
Cc: Josh Boyer &lt;jwboyer@gmail.com&gt;
Cc: linuxppc-dev@lists.ozlabs.org
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Change the EDAC internal representation to work with non-csrow
based memory controllers.

There are lots of those memory controllers nowadays, and more
are coming. So, the EDAC internal representation needs to be
changed, in order to work with those memory controllers, while
preserving backward compatibility with the old ones.

The edac core was written with the idea that memory controllers
are able to directly access csrows.

This is not true for FB-DIMM and RAMBUS memory controllers.

Also, some recent advanced memory controllers don't present a per-csrows
view. Instead, they view memories as DIMMs, instead of ranks.

So, change the allocation and error report routines to allow
them to work with all types of architectures.

This will allow the removal of several hacks with FB-DIMM and RAMBUS
memory controllers.

Also, several tests were done on different platforms using different
x86 drivers.

TODO: a multi-rank DIMMs are currently represented by multiple DIMM
entries in struct dimm_info. That means that changing a label for one
rank won't change the same label for the other ranks at the same DIMM.
This bug is present since the beginning of the EDAC, so it is not a big
deal. However, on several drivers, it is possible to fix this issue, but
it should be a per-driver fix, as the csrow =&gt; DIMM arrangement may not
be equal for all. So, don't try to fix it here yet.

I tried to make this patch as short as possible, preceding it with
several other patches that simplified the logic here. Yet, as the
internal API changes, all drivers need changes. The changes are
generally bigger in the drivers for FB-DIMMs.

Cc: Aristeu Rozanski &lt;arozansk@redhat.com&gt;
Cc: Doug Thompson &lt;norsk5@yahoo.com&gt;
Cc: Borislav Petkov &lt;borislav.petkov@amd.com&gt;
Cc: Mark Gross &lt;mark.gross@intel.com&gt;
Cc: Jason Uhlenkott &lt;juhlenko@akamai.com&gt;
Cc: Tim Small &lt;tim@buttersideup.com&gt;
Cc: Ranganathan Desikan &lt;ravi@jetztechnologies.com&gt;
Cc: "Arvind R." &lt;arvino55@gmail.com&gt;
Cc: Olof Johansson &lt;olof@lixom.net&gt;
Cc: Egor Martovetsky &lt;egor@pasemi.com&gt;
Cc: Chris Metcalf &lt;cmetcalf@tilera.com&gt;
Cc: Michal Marek &lt;mmarek@suse.cz&gt;
Cc: Jiri Kosina &lt;jkosina@suse.cz&gt;
Cc: Joe Perches &lt;joe@perches.com&gt;
Cc: Dmitry Eremin-Solenikov &lt;dbaryshkov@gmail.com&gt;
Cc: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
Cc: Hitoshi Mitake &lt;h.mitake@gmail.com&gt;
Cc: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Cc: "Niklas Söderlund" &lt;niklas.soderlund@ericsson.com&gt;
Cc: Shaohui Xie &lt;Shaohui.Xie@freescale.com&gt;
Cc: Josh Boyer &lt;jwboyer@gmail.com&gt;
Cc: linuxppc-dev@lists.ozlabs.org
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>edac.h: Add generic layers for describing a memory location</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-16T16:04:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=982216a4290543fe73ae4f0a156f3d7906bd9b73'/>
<id>982216a4290543fe73ae4f0a156f3d7906bd9b73</id>
<content type='text'>
The edac core were written with the idea that memory controllers
are able to directly access csrows, and that the channels are
used inside a csrows select.

This is not true for FB-DIMM and RAMBUS memory controllers.

Also, some recent advanced memory controllers don't present a per-csrows
view. Instead, they view memories as DIMMs, instead of ranks, accessed
via csrow/channel.

So, changes are needed in order to allow the EDAC core to
work with all types of architectures.

In preparation for handling non-csrows based memory controllers,
add some memory structs and a macro:

enum hw_event_mc_err_type: describes the type of error
			   (corrected, uncorrected, fatal)

To be used by the new edac_mc_handle_error function;

enum edac_mc_layer: describes the type of a given memory
architecture layer (branch, channel, slot, csrow).

struct edac_mc_layer: describes the properties of a memory
		      layer (type, size, and if the layer
		      will be used on a virtual csrow.

EDAC_DIMM_PTR() - as the number of layers can vary from 1 to 3,
this macro converts from an address with up to 3 layers into
a linear address.

Reviewed-by: Borislav Petkov &lt;bp@amd64.org&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 core were written with the idea that memory controllers
are able to directly access csrows, and that the channels are
used inside a csrows select.

This is not true for FB-DIMM and RAMBUS memory controllers.

Also, some recent advanced memory controllers don't present a per-csrows
view. Instead, they view memories as DIMMs, instead of ranks, accessed
via csrow/channel.

So, changes are needed in order to allow the EDAC core to
work with all types of architectures.

In preparation for handling non-csrows based memory controllers,
add some memory structs and a macro:

enum hw_event_mc_err_type: describes the type of error
			   (corrected, uncorrected, fatal)

To be used by the new edac_mc_handle_error function;

enum edac_mc_layer: describes the type of a given memory
architecture layer (branch, channel, slot, csrow).

struct edac_mc_layer: describes the properties of a memory
		      layer (type, size, and if the layer
		      will be used on a virtual csrow.

EDAC_DIMM_PTR() - as the number of layers can vary from 1 to 3,
this macro converts from an address with up to 3 layers into
a linear address.

Reviewed-by: Borislav Petkov &lt;bp@amd64.org&gt;
Cc: Doug Thompson &lt;norsk5@yahoo.com&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@redhat.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
