Lines Matching full:inject
258 struct i7core_inject inject; member
656 Also, since a change at an inject parameter will be applied only at enable,
664 pvt->inject.enable = 0; in disable_inject()
666 if (!pvt->pci_ch[pvt->inject.channel][0]) in disable_inject()
669 pci_write_config_dword(pvt->pci_ch[pvt->inject.channel][0], in disable_inject()
676 * i7core inject inject.section
678 * accept and store error injection inject.section value
691 if (pvt->inject.enable) in i7core_inject_section_store()
698 pvt->inject.section = (u32) value; in i7core_inject_section_store()
708 return sprintf(data, "0x%08x\n", pvt->inject.section); in i7core_inject_section_show()
712 * i7core inject.type
714 * accept and store error injection inject.section value
716 * bit 1 - inject ECC error
717 * bit 2 - inject parity error
728 if (pvt->inject.enable) in i7core_inject_type_store()
735 pvt->inject.type = (u32) value; in i7core_inject_type_store()
746 return sprintf(data, "0x%08x\n", pvt->inject.type); in i7core_inject_type_show()
752 * The type of error (UE/CE) will depend on the inject.eccmask value:
768 if (pvt->inject.enable) in i7core_inject_eccmask_store()
775 pvt->inject.eccmask = (u32) value; in i7core_inject_eccmask_store()
786 return sprintf(data, "0x%08x\n", pvt->inject.eccmask); in i7core_inject_eccmask_show()
792 * The type of error (UE/CE) will depend on the inject.eccmask value:
814 if (pvt->inject.enable) \
825 pvt->inject.param = value; \
840 if (pvt->inject.param < 0) \
843 return sprintf(data, "%d\n", pvt->inject.param);\
903 * inject mask, then it will produce just one error. Otherwise, it will repeat
921 if (!pvt->pci_ch[pvt->inject.channel][0]) in i7core_inject_enable_store()
929 pvt->inject.enable = 1; in i7core_inject_enable_store()
935 /* Sets pvt->inject.dimm mask */ in i7core_inject_enable_store()
936 if (pvt->inject.dimm < 0) in i7core_inject_enable_store()
939 if (pvt->channel[pvt->inject.channel].dimms > 2) in i7core_inject_enable_store()
940 mask |= (pvt->inject.dimm & 0x3LL) << 35; in i7core_inject_enable_store()
942 mask |= (pvt->inject.dimm & 0x1LL) << 36; in i7core_inject_enable_store()
945 /* Sets pvt->inject.rank mask */ in i7core_inject_enable_store()
946 if (pvt->inject.rank < 0) in i7core_inject_enable_store()
949 if (pvt->channel[pvt->inject.channel].dimms > 2) in i7core_inject_enable_store()
950 mask |= (pvt->inject.rank & 0x1LL) << 34; in i7core_inject_enable_store()
952 mask |= (pvt->inject.rank & 0x3LL) << 34; in i7core_inject_enable_store()
955 /* Sets pvt->inject.bank mask */ in i7core_inject_enable_store()
956 if (pvt->inject.bank < 0) in i7core_inject_enable_store()
959 mask |= (pvt->inject.bank & 0x15LL) << 30; in i7core_inject_enable_store()
961 /* Sets pvt->inject.page mask */ in i7core_inject_enable_store()
962 if (pvt->inject.page < 0) in i7core_inject_enable_store()
965 mask |= (pvt->inject.page & 0xffff) << 14; in i7core_inject_enable_store()
967 /* Sets pvt->inject.column mask */ in i7core_inject_enable_store()
968 if (pvt->inject.col < 0) in i7core_inject_enable_store()
971 mask |= (pvt->inject.col & 0x3fff); in i7core_inject_enable_store()
980 injectmask = (pvt->inject.type & 1) | in i7core_inject_enable_store()
981 (pvt->inject.section & 0x3) << 1 | in i7core_inject_enable_store()
982 (pvt->inject.type & 0x6) << (3 - 1); in i7core_inject_enable_store()
988 write_and_test(pvt->pci_ch[pvt->inject.channel][0], in i7core_inject_enable_store()
990 write_and_test(pvt->pci_ch[pvt->inject.channel][0], in i7core_inject_enable_store()
993 write_and_test(pvt->pci_ch[pvt->inject.channel][0], in i7core_inject_enable_store()
994 MC_CHANNEL_ERROR_MASK, pvt->inject.eccmask); in i7core_inject_enable_store()
996 write_and_test(pvt->pci_ch[pvt->inject.channel][0], in i7core_inject_enable_store()
1007 edac_dbg(0, "Error inject addr match 0x%016llx, ecc 0x%08x, inject 0x%08x\n", in i7core_inject_enable_store()
1008 mask, pvt->inject.eccmask, injectmask); in i7core_inject_enable_store()
1022 if (!pvt->pci_ch[pvt->inject.channel][0]) in i7core_inject_enable_show()
1025 pci_read_config_dword(pvt->pci_ch[pvt->inject.channel][0], in i7core_inject_enable_show()
1028 edac_dbg(0, "Inject error read: 0x%018x\n", injectmask); in i7core_inject_enable_show()
1031 pvt->inject.enable = 1; in i7core_inject_enable_show()
1033 return sprintf(data, "%d\n", pvt->inject.enable); in i7core_inject_enable_show()
1131 * inject sysfs attributes
2210 pvt->inject.channel = 0; in i7core_register_mci()
2211 pvt->inject.dimm = -1; in i7core_register_mci()
2212 pvt->inject.rank = -1; in i7core_register_mci()
2213 pvt->inject.bank = -1; in i7core_register_mci()
2214 pvt->inject.page = -1; in i7core_register_mci()
2215 pvt->inject.col = -1; in i7core_register_mci()