Lines Matching refs:Lxcache

28  * Support routines for managing per-Lxcache state.
606 cmd_Lxcache_t *Lxcache)
611 fltnm = cmd_type_to_str(Lxcache->Lxcache_type);
614 * We first create a new Lxcache and add the event ep
615 * that is in Lxcache to the new case we create.
616 * we then destroy the Lxcache that has the event ep in its SERD engine.
618 new_Lxcache = cmd_Lxcache_create(hdl, Lxcache->xr, cpu,
620 Lxcache->Lxcache_type,
621 Lxcache->Lxcache_index, Lxcache->Lxcache_way, Lxcache->Lxcache_bit);
624 "\n%s:cpu_id %d:Failed to create a Lxcache for"
626 fltnm, cpu->cpu_cpuid, Lxcache->Lxcache_index,
627 Lxcache->Lxcache_way, Lxcache->Lxcache_bit);
631 cmd_Lxcache_destroy(hdl, cpu, Lxcache);
637 cmd_Lxcache_t *Lxcache, const char *fltnm, int32_t reason)
645 * We need to update the Lxcache asru to reflect
648 Lxcache->Lxcache_bit &= CLEAR_MSB_BIT;
650 Lxcache->Lxcache_asru_nvl,
652 Lxcache->Lxcache_bit);
665 ret = cmd_Lxcache_retire(hdl, cpu, Lxcache, fltnm, certainty);
667 Lxcache->Lxcache_bit |= SET_MSB_BIT;
670 Lxcache->Lxcache_reason = reason;
673 * Lxcache.
678 cmd_reason_to_str(Lxcache->Lxcache_reason),
679 cmd_flags_to_str(Lxcache->Lxcache_flags));
680 cmd_Lxcache_write(hdl, Lxcache);
692 * a new Lxcache if we were successful in determining a way to retire.
818 " destroy this Lxcache now.\n",
862 * We need to create a new Lxcache struture.
863 * The existing Lxcache is for anonymous way.
895 " anonymous Lxcache now.\n",
899 * recheck_of_tags. Delete the Lxcache.
909 cmd_Lxcache_t *Lxcache;
914 * We search thru the entire Lxcache structures to find
917 Lxcache = cmd_Lxcache_lookup_by_timeout_id(id);
918 if (Lxcache == NULL) {
920 "Could not find Lxcache for timeout_id 0x%x\n", id);
925 cmd_type_to_str(Lxcache->Lxcache_type),
926 Lxcache->Lxcache_index);
931 Lxcache->Lxcache_timeout_id = -1;
932 switch (Lxcache->Lxcache_type) {
935 (void) cmd_txce(hdl, Lxcache->Lxcache_ep,
936 Lxcache->Lxcache_nvl,
937 class, Lxcache->Lxcache_clcode);
941 (void) cmd_l3_thce(hdl, Lxcache->Lxcache_ep,
942 Lxcache->Lxcache_nvl,
943 class, Lxcache->Lxcache_clcode);
949 Lxcache->Lxcache_type,
950 Lxcache->Lxcache_index);
965 cmd_Lxcache_t *Lxcache, *suspect_Lxcache, *retired_Lxcache;
1016 * We will create a Lxcache structure for this index with way
1023 Lxcache = cmd_Lxcache_lookup_by_type_index_way_bit(cpu, pstype,
1031 if (Lxcache == NULL) {
1045 Lxcache->Lxcache_retry_count);
1046 if (Lxcache->Lxcache_retry_count >=
1051 * when the Lxcache gets destroyed.
1057 if (Lxcache->Lxcache_nvl != NULL) {
1058 nvlist_free(Lxcache->Lxcache_nvl);
1059 Lxcache->Lxcache_nvl = NULL;
1064 Lxcache->Lxcache_timeout_id = -1;
1065 Lxcache->Lxcache_retry_count = 0;
1068 Lxcache->Lxcache_retry_count++;
1069 Lxcache->Lxcache_timeout_id =
1074 Lxcache->Lxcache_retry_count] * NANOSEC));
1079 * Check if we already have a Lxcache structure
1082 if (Lxcache == NULL) {
1083 Lxcache = cmd_Lxcache_create(hdl, 0, cpu,
1085 if (Lxcache == NULL) {
1087 "\n%s:cpu_id %d Failed to create Lxcache"
1093 if (Lxcache->Lxcache_timeout_id != -1) {
1119 if (Lxcache->Lxcache_nvl == NULL) {
1120 if (nvlist_dup(nvl, &Lxcache->Lxcache_nvl, 0) != 0) {
1127 if (nvlist_add_int32(Lxcache->Lxcache_nvl,
1142 Lxcache->Lxcache_clcode = (clcode | CMD_CPU_LEVEL_CORE);
1143 if (Lxcache->Lxcache_ep == NULL) {
1144 Lxcache->Lxcache_ep = ep;
1153 Lxcache->Lxcache_serdnm =
1157 if (!fmd_serd_exists(hdl, Lxcache->Lxcache_serdnm)) {
1158 fmd_serd_create(hdl, Lxcache->Lxcache_serdnm,
1165 Lxcache->Lxcache_serdnm);
1168 Lxcache->Lxcache_serdnm,
1171 Lxcache->Lxcache_retry_count++;
1172 Lxcache->Lxcache_timeout_id =
1176 Lxcache->Lxcache_retry_count] * NANOSEC));
1222 if ((Lxcache = cmd_Lxcache_lookup_by_type_index_way_bit(cpu, pstype,
1225 Lxcache->Lxcache_case.cc_cp != NULL &&
1226 fmd_case_solved(hdl, Lxcache->Lxcache_case.cc_cp)) {
1229 fltnm, cpu->cpu_cpuid, Lxcache->Lxcache_bufname);
1234 if (Lxcache == NULL)
1235 Lxcache = cmd_Lxcache_create(hdl, 0, cpu, cpu->cpu_asru_nvl,
1237 if (Lxcache == NULL) {
1239 "\n%s:cpu %d: Failed to create Lxcache for index %d",
1245 if (cmd_create_case_for_Lxcache(hdl, cpu, Lxcache) == B_FALSE) {
1249 if (Lxcache->Lxcache_case.cc_serdnm == NULL) {
1250 Lxcache->Lxcache_case.cc_serdnm = cmd_Lxcache_serdnm_create(hdl,
1253 if (!fmd_serd_exists(hdl, Lxcache->Lxcache_case.cc_serdnm)) {
1254 fmd_serd_create(hdl, Lxcache->Lxcache_case.cc_serdnm,
1260 Lxcache->Lxcache_case.cc_serdnm);
1265 fltnm, cpu->cpu_cpuid, Lxcache->Lxcache_case.cc_serdnm);
1267 (void) fmd_serd_record(hdl, Lxcache->Lxcache_case.cc_serdnm, ep);
1275 if (fmd_serd_fired(hdl, Lxcache->Lxcache_case.cc_serdnm) ==
1280 fltnm, cpu->cpu_cpuid, Lxcache->Lxcache_case.cc_serdnm);
1281 fmd_case_add_serd(hdl, Lxcache->Lxcache_case.cc_cp,
1282 Lxcache->Lxcache_case.cc_serdnm);
1283 fmd_serd_reset(hdl, Lxcache->Lxcache_case.cc_serdnm);
1292 anonymous_Lxcache = Lxcache;
1466 " destroy this Lxcache now.\n",
1478 Lxcache->Lxcache_way)
1504 if ((errno = nvlist_add_uint16(Lxcache->Lxcache_asru_nvl,
1507 (errno = fmd_nvl_fmri_expand(hdl, Lxcache->Lxcache_asru_nvl)) != 0)
1508 fmd_hdl_abort(hdl, "failed to build Lxcache fmri");
1509 Lxcache->Lxcache_ep = ep;
1510 return (cmd_Lxcache_retire_as_reason(hdl, cpu, Lxcache, fltnm,
1623 cmd_Lxcache_t *suspect_Lxcache, *Lxcache, *anonymous_Lxcache;
1784 Lxcache = cmd_Lxcache_lookup_by_type_index_way_bit(xr->xr_cpu, type,
1787 if (Lxcache == NULL) {
1793 Lxcache = cmd_Lxcache_create(hdl, xr, xr->xr_cpu,
1797 if (Lxcache == NULL) {
1799 "\n%s:cpu_id %d:Failed to create a Lxcache for"
1802 Lxcache->Lxcache_index,
1803 Lxcache->Lxcache_way, Lxcache->Lxcache_bit);
1807 if (cmd_create_case_for_Lxcache(hdl, cpu, Lxcache) == B_FALSE)
1809 if (Lxcache->Lxcache_case.cc_serdnm == NULL) {
1810 Lxcache->Lxcache_case.cc_serdnm =
1815 Lxcache->Lxcache_case.cc_serdnm)) {
1817 Lxcache->Lxcache_case.cc_serdnm,
1823 Lxcache->Lxcache_case.cc_serdnm);
1827 if ((Lxcache->Lxcache_case.cc_cp != NULL) &&
1828 fmd_case_solved(hdl, Lxcache->Lxcache_case.cc_cp)) {
1832 Lxcache->Lxcache_bufname);
1838 cache_ed->ed_fltnm, xr->xr_cpuid, Lxcache->Lxcache_case.cc_serdnm);
1840 if (fmd_serd_record(hdl, Lxcache->Lxcache_case.cc_serdnm, ep)
1846 Lxcache->Lxcache_case.cc_serdnm);
1847 fmd_case_add_serd(hdl, Lxcache->Lxcache_case.cc_cp,
1848 Lxcache->Lxcache_case.cc_serdnm);
1849 fmd_serd_reset(hdl, Lxcache->Lxcache_case.cc_serdnm);
1859 Lxcache->Lxcache_index, Lxcache->Lxcache_bit);
1861 cpu, type, Lxcache->Lxcache_index, Lxcache->Lxcache_bit,
1906 Lxcache->Lxcache_index);
1914 Lxcache->Lxcache_index, Lxcache->Lxcache_way);
1922 Lxcache->Lxcache_index, ways_retired);
1929 ret = cmd_Lxcache_retire_as_reason(hdl, cpu, Lxcache,
1938 Lxcache->Lxcache_index,
1958 anonymous_Lxcache = Lxcache;