diff options
author | Glenn Elliott <gelliott@cs.unc.edu> | 2012-03-04 19:47:13 -0500 |
---|---|---|
committer | Glenn Elliott <gelliott@cs.unc.edu> | 2012-03-04 19:47:13 -0500 |
commit | c71c03bda1e86c9d5198c5d83f712e695c4f2a1e (patch) | |
tree | ecb166cb3e2b7e2adb3b5e292245fefd23381ac8 /drivers/edac/amd64_edac_inj.c | |
parent | ea53c912f8a86a8567697115b6a0d8152beee5c8 (diff) | |
parent | 6a00f206debf8a5c8899055726ad127dbeeed098 (diff) |
Merge branch 'mpi-master' into wip-k-fmlpwip-k-fmlp
Conflicts:
litmus/sched_cedf.c
Diffstat (limited to 'drivers/edac/amd64_edac_inj.c')
-rw-r--r-- | drivers/edac/amd64_edac_inj.c | 25 |
1 files changed, 8 insertions, 17 deletions
diff --git a/drivers/edac/amd64_edac_inj.c b/drivers/edac/amd64_edac_inj.c index 29f1f7a612d9..303f10e03dda 100644 --- a/drivers/edac/amd64_edac_inj.c +++ b/drivers/edac/amd64_edac_inj.c | |||
@@ -23,9 +23,7 @@ static ssize_t amd64_inject_section_store(struct mem_ctl_info *mci, | |||
23 | if (ret != -EINVAL) { | 23 | if (ret != -EINVAL) { |
24 | 24 | ||
25 | if (value > 3) { | 25 | if (value > 3) { |
26 | amd64_printk(KERN_WARNING, | 26 | amd64_warn("%s: invalid section 0x%lx\n", __func__, value); |
27 | "%s: invalid section 0x%lx\n", | ||
28 | __func__, value); | ||
29 | return -EINVAL; | 27 | return -EINVAL; |
30 | } | 28 | } |
31 | 29 | ||
@@ -58,9 +56,7 @@ static ssize_t amd64_inject_word_store(struct mem_ctl_info *mci, | |||
58 | if (ret != -EINVAL) { | 56 | if (ret != -EINVAL) { |
59 | 57 | ||
60 | if (value > 8) { | 58 | if (value > 8) { |
61 | amd64_printk(KERN_WARNING, | 59 | amd64_warn("%s: invalid word 0x%lx\n", __func__, value); |
62 | "%s: invalid word 0x%lx\n", | ||
63 | __func__, value); | ||
64 | return -EINVAL; | 60 | return -EINVAL; |
65 | } | 61 | } |
66 | 62 | ||
@@ -92,9 +88,8 @@ static ssize_t amd64_inject_ecc_vector_store(struct mem_ctl_info *mci, | |||
92 | if (ret != -EINVAL) { | 88 | if (ret != -EINVAL) { |
93 | 89 | ||
94 | if (value & 0xFFFF0000) { | 90 | if (value & 0xFFFF0000) { |
95 | amd64_printk(KERN_WARNING, | 91 | amd64_warn("%s: invalid EccVector: 0x%lx\n", |
96 | "%s: invalid EccVector: 0x%lx\n", | 92 | __func__, value); |
97 | __func__, value); | ||
98 | return -EINVAL; | 93 | return -EINVAL; |
99 | } | 94 | } |
100 | 95 | ||
@@ -122,15 +117,13 @@ static ssize_t amd64_inject_read_store(struct mem_ctl_info *mci, | |||
122 | /* Form value to choose 16-byte section of cacheline */ | 117 | /* Form value to choose 16-byte section of cacheline */ |
123 | section = F10_NB_ARRAY_DRAM_ECC | | 118 | section = F10_NB_ARRAY_DRAM_ECC | |
124 | SET_NB_ARRAY_ADDRESS(pvt->injection.section); | 119 | SET_NB_ARRAY_ADDRESS(pvt->injection.section); |
125 | pci_write_config_dword(pvt->misc_f3_ctl, | 120 | amd64_write_pci_cfg(pvt->F3, F10_NB_ARRAY_ADDR, section); |
126 | F10_NB_ARRAY_ADDR, section); | ||
127 | 121 | ||
128 | word_bits = SET_NB_DRAM_INJECTION_READ(pvt->injection.word, | 122 | word_bits = SET_NB_DRAM_INJECTION_READ(pvt->injection.word, |
129 | pvt->injection.bit_map); | 123 | pvt->injection.bit_map); |
130 | 124 | ||
131 | /* Issue 'word' and 'bit' along with the READ request */ | 125 | /* Issue 'word' and 'bit' along with the READ request */ |
132 | pci_write_config_dword(pvt->misc_f3_ctl, | 126 | amd64_write_pci_cfg(pvt->F3, F10_NB_ARRAY_DATA, word_bits); |
133 | F10_NB_ARRAY_DATA, word_bits); | ||
134 | 127 | ||
135 | debugf0("section=0x%x word_bits=0x%x\n", section, word_bits); | 128 | debugf0("section=0x%x word_bits=0x%x\n", section, word_bits); |
136 | 129 | ||
@@ -157,15 +150,13 @@ static ssize_t amd64_inject_write_store(struct mem_ctl_info *mci, | |||
157 | /* Form value to choose 16-byte section of cacheline */ | 150 | /* Form value to choose 16-byte section of cacheline */ |
158 | section = F10_NB_ARRAY_DRAM_ECC | | 151 | section = F10_NB_ARRAY_DRAM_ECC | |
159 | SET_NB_ARRAY_ADDRESS(pvt->injection.section); | 152 | SET_NB_ARRAY_ADDRESS(pvt->injection.section); |
160 | pci_write_config_dword(pvt->misc_f3_ctl, | 153 | amd64_write_pci_cfg(pvt->F3, F10_NB_ARRAY_ADDR, section); |
161 | F10_NB_ARRAY_ADDR, section); | ||
162 | 154 | ||
163 | word_bits = SET_NB_DRAM_INJECTION_WRITE(pvt->injection.word, | 155 | word_bits = SET_NB_DRAM_INJECTION_WRITE(pvt->injection.word, |
164 | pvt->injection.bit_map); | 156 | pvt->injection.bit_map); |
165 | 157 | ||
166 | /* Issue 'word' and 'bit' along with the READ request */ | 158 | /* Issue 'word' and 'bit' along with the READ request */ |
167 | pci_write_config_dword(pvt->misc_f3_ctl, | 159 | amd64_write_pci_cfg(pvt->F3, F10_NB_ARRAY_DATA, word_bits); |
168 | F10_NB_ARRAY_DATA, word_bits); | ||
169 | 160 | ||
170 | debugf0("section=0x%x word_bits=0x%x\n", section, word_bits); | 161 | debugf0("section=0x%x word_bits=0x%x\n", section, word_bits); |
171 | 162 | ||