On Mon, Dec 04, 2017 at 11:37:11PM +0100, Borislav Petkov wrote:
On Thu, Nov 30, 2017 at 12:40:41PM -0800, Tony Luck wrote:
WTF, there are *two* string arrays with memory types?! How did that
Can you please remove that above in a prepatch and switch to
edac_mem_types? Or should we switch to this mem_types array instead and
kill edac_mem_types since former is visible in sysfs?
Oops. I didn't stare hard enough as I walked the "grep" output
to just blindly add a new case everywhere for the new type.
Need to resolve the differences:
1) MEM_LRDDR3 only appears in one of the tables
2) edac_mem_types is exported from edac_mc.c and used
by two drivers
3) mem_types is static in edac_mc_sysfs.c, but values
are visible to user via sysfs
4) Strings are different between the two :-(
Since the drivers that use edac_mem_types only do so in edac_dbg()
output, I think it's safe to declare those strings as the non-canon
So the plan: copy the strings from mem_types to edac_mem_types
and then make edac_mc_sysfs.c pick up the exported list from edac_mc.c
instead of having its own static version.
Both files have the same build scope:
edac_core-y := edac_mc.o edac_device.o edac_mc_sysfs.o
so there shouldn't be any weird dependency problems.