OpenSolaris

Printable Version Enter a New Search
Bug ID 6721626
Synopsis Misplaced subscriber entries and superfluous #ifdefs in the cpumem-retire agent
State 10-Fix Delivered (Fix available in build)
Category:Subcategory fma:cpu
Keywords rtiq_reviewed
Responsible Engineer Jakub Jermar
Reported Against
Duplicate Of
Introduced In solaris_nevada
Commit to Fix snv_98
Fixed In snv_98
Release Fixed solaris_nevada(snv_98)
Related Bugs 6693986 , 6718558
Submit Date 2-July-2008
Last Update Date 10-September-2008
Description
The cpumem-retire agent's cma_subrs[] array in cma_main.c is defined using three #ifdef branches, like this:

#if defined(sun4v)
...
#elif defined(opl)
...
#else /* Generic */
...
#endif

The generic part contains subscriber entries that are sun4v specific:

197         { "fault.cpu.ultraSPARC-T1.freg", FM_FMRI_SCHEME_CPU,
198             FM_CPU_SCHEME_VERSION, NULL },
199         { "fault.cpu.ultraSPARC-T1.l2cachedata", FM_FMRI_SCHEME_CPU,
200             FM_CPU_SCHEME_VERSION, NULL },
201         { "fault.cpu.ultraSPARC-T1.l2cachetag", FM_FMRI_SCHEME_CPU,
202             FM_CPU_SCHEME_VERSION, NULL },
203         { "fault.cpu.ultraSPARC-T1.l2cachectl", FM_FMRI_SCHEME_CPU,
204             FM_CPU_SCHEME_VERSION, NULL },
205         { "fault.cpu.ultraSPARC-T1.mau", FM_FMRI_SCHEME_CPU,
206             FM_CPU_SCHEME_VERSION, NULL },

The impact of this is that the nvl2subr() routine will not find these entries and will generate a secondary error report.

The generic part also contains superfluous #ifdefs which always evaluate to true:

227 #ifndef sun4v
228 #ifndef opl
229         { "fault.cpu.ultraSPARC-IVplus.l2cachedata-line",
230             FM_FMRI_SCHEME_CPU, FM_CPU_SCHEME_VERSION,
231             cma_cache_way_retire },
232         { "fault.cpu.ultraSPARC-IVplus.l3cachedata-line",
233             FM_FMRI_SCHEME_CPU, FM_CPU_SCHEME_VERSION,
234             cma_cache_way_retire },
235         { "fault.cpu.ultraSPARC-IVplus.l2cachetag-line",
236             FM_FMRI_SCHEME_CPU, FM_CPU_SCHEME_VERSION,
237             cma_cache_way_retire },
238         { "fault.cpu.ultraSPARC-IVplus.l3cachetag-line",
239             FM_FMRI_SCHEME_CPU, FM_CPU_SCHEME_VERSION,
240             cma_cache_way_retire },
241 #endif
242 #endif
Work Around
N/A
Comments
N/A