aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/edac/edac_pci_sysfs.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/edac/edac_pci_sysfs.c')
-rw-r--r--drivers/edac/edac_pci_sysfs.c46
1 files changed, 23 insertions, 23 deletions
diff --git a/drivers/edac/edac_pci_sysfs.c b/drivers/edac/edac_pci_sysfs.c
index f471659a1c35..804833ce0fef 100644
--- a/drivers/edac/edac_pci_sysfs.c
+++ b/drivers/edac/edac_pci_sysfs.c
@@ -61,7 +61,7 @@ static ssize_t instance_pe_count_show(struct edac_pci_ctl_info *pci, char *data)
61} 61}
62 62
63static ssize_t instance_npe_count_show(struct edac_pci_ctl_info *pci, 63static ssize_t instance_npe_count_show(struct edac_pci_ctl_info *pci,
64 char *data) 64 char *data)
65{ 65{
66 return sprintf(data, "%u\n", atomic_read(&pci->counters.npe_count)); 66 return sprintf(data, "%u\n", atomic_read(&pci->counters.npe_count));
67} 67}
@@ -89,7 +89,7 @@ struct instance_attribute {
89 89
90/* Function to 'show' fields from the edac_pci 'instance' structure */ 90/* Function to 'show' fields from the edac_pci 'instance' structure */
91static ssize_t edac_pci_instance_show(struct kobject *kobj, 91static ssize_t edac_pci_instance_show(struct kobject *kobj,
92 struct attribute *attr, char *buffer) 92 struct attribute *attr, char *buffer)
93{ 93{
94 struct edac_pci_ctl_info *pci = to_instance(kobj); 94 struct edac_pci_ctl_info *pci = to_instance(kobj);
95 struct instance_attribute *instance_attr = to_instance_attr(attr); 95 struct instance_attribute *instance_attr = to_instance_attr(attr);
@@ -101,8 +101,8 @@ static ssize_t edac_pci_instance_show(struct kobject *kobj,
101 101
102/* Function to 'store' fields into the edac_pci 'instance' structure */ 102/* Function to 'store' fields into the edac_pci 'instance' structure */
103static ssize_t edac_pci_instance_store(struct kobject *kobj, 103static ssize_t edac_pci_instance_store(struct kobject *kobj,
104 struct attribute *attr, 104 struct attribute *attr,
105 const char *buffer, size_t count) 105 const char *buffer, size_t count)
106{ 106{
107 struct edac_pci_ctl_info *pci = to_instance(kobj); 107 struct edac_pci_ctl_info *pci = to_instance(kobj);
108 struct instance_attribute *instance_attr = to_instance_attr(attr); 108 struct instance_attribute *instance_attr = to_instance_attr(attr);
@@ -212,8 +212,8 @@ static ssize_t edac_pci_dev_show(struct kobject *kobj, struct attribute *attr,
212} 212}
213 213
214static ssize_t edac_pci_dev_store(struct kobject *kobj, 214static ssize_t edac_pci_dev_store(struct kobject *kobj,
215 struct attribute *attr, const char *buffer, 215 struct attribute *attr, const char *buffer,
216 size_t count) 216 size_t count)
217{ 217{
218 struct edac_pci_dev_attribute *edac_pci_dev; 218 struct edac_pci_dev_attribute *edac_pci_dev;
219 edac_pci_dev = (struct edac_pci_dev_attribute *)attr; 219 edac_pci_dev = (struct edac_pci_dev_attribute *)attr;
@@ -246,13 +246,13 @@ static struct edac_pci_dev_attribute edac_pci_attr_##_name = { \
246 246
247/* PCI Parity control files */ 247/* PCI Parity control files */
248EDAC_PCI_ATTR(check_pci_errors, S_IRUGO | S_IWUSR, edac_pci_int_show, 248EDAC_PCI_ATTR(check_pci_errors, S_IRUGO | S_IWUSR, edac_pci_int_show,
249 edac_pci_int_store); 249 edac_pci_int_store);
250EDAC_PCI_ATTR(edac_pci_log_pe, S_IRUGO | S_IWUSR, edac_pci_int_show, 250EDAC_PCI_ATTR(edac_pci_log_pe, S_IRUGO | S_IWUSR, edac_pci_int_show,
251 edac_pci_int_store); 251 edac_pci_int_store);
252EDAC_PCI_ATTR(edac_pci_log_npe, S_IRUGO | S_IWUSR, edac_pci_int_show, 252EDAC_PCI_ATTR(edac_pci_log_npe, S_IRUGO | S_IWUSR, edac_pci_int_show,
253 edac_pci_int_store); 253 edac_pci_int_store);
254EDAC_PCI_ATTR(edac_pci_panic_on_pe, S_IRUGO | S_IWUSR, edac_pci_int_show, 254EDAC_PCI_ATTR(edac_pci_panic_on_pe, S_IRUGO | S_IWUSR, edac_pci_int_show,
255 edac_pci_int_store); 255 edac_pci_int_store);
256EDAC_PCI_ATTR(pci_parity_count, S_IRUGO, edac_pci_int_show, NULL); 256EDAC_PCI_ATTR(pci_parity_count, S_IRUGO, edac_pci_int_show, NULL);
257EDAC_PCI_ATTR(pci_nonparity_count, S_IRUGO, edac_pci_int_show, NULL); 257EDAC_PCI_ATTR(pci_nonparity_count, S_IRUGO, edac_pci_int_show, NULL);
258 258
@@ -405,7 +405,7 @@ static u16 get_pci_parity_status(struct pci_dev *dev, int secondary)
405 } 405 }
406 406
407 status &= PCI_STATUS_DETECTED_PARITY | PCI_STATUS_SIG_SYSTEM_ERROR | 407 status &= PCI_STATUS_DETECTED_PARITY | PCI_STATUS_SIG_SYSTEM_ERROR |
408 PCI_STATUS_PARITY; 408 PCI_STATUS_PARITY;
409 409
410 if (status) 410 if (status)
411 /* reset only the bits we are interested in */ 411 /* reset only the bits we are interested in */
@@ -449,23 +449,23 @@ static void edac_pci_dev_parity_test(struct pci_dev *dev)
449 if (status) { 449 if (status) {
450 if (status & (PCI_STATUS_SIG_SYSTEM_ERROR)) { 450 if (status & (PCI_STATUS_SIG_SYSTEM_ERROR)) {
451 edac_printk(KERN_CRIT, EDAC_PCI, 451 edac_printk(KERN_CRIT, EDAC_PCI,
452 "Signaled System Error on %s\n", 452 "Signaled System Error on %s\n",
453 pci_name(dev)); 453 pci_name(dev));
454 atomic_inc(&pci_nonparity_count); 454 atomic_inc(&pci_nonparity_count);
455 } 455 }
456 456
457 if (status & (PCI_STATUS_PARITY)) { 457 if (status & (PCI_STATUS_PARITY)) {
458 edac_printk(KERN_CRIT, EDAC_PCI, 458 edac_printk(KERN_CRIT, EDAC_PCI,
459 "Master Data Parity Error on %s\n", 459 "Master Data Parity Error on %s\n",
460 pci_name(dev)); 460 pci_name(dev));
461 461
462 atomic_inc(&pci_parity_count); 462 atomic_inc(&pci_parity_count);
463 } 463 }
464 464
465 if (status & (PCI_STATUS_DETECTED_PARITY)) { 465 if (status & (PCI_STATUS_DETECTED_PARITY)) {
466 edac_printk(KERN_CRIT, EDAC_PCI, 466 edac_printk(KERN_CRIT, EDAC_PCI,
467 "Detected Parity Error on %s\n", 467 "Detected Parity Error on %s\n",
468 pci_name(dev)); 468 pci_name(dev));
469 469
470 atomic_inc(&pci_parity_count); 470 atomic_inc(&pci_parity_count);
471 } 471 }
@@ -486,23 +486,23 @@ static void edac_pci_dev_parity_test(struct pci_dev *dev)
486 if (status) { 486 if (status) {
487 if (status & (PCI_STATUS_SIG_SYSTEM_ERROR)) { 487 if (status & (PCI_STATUS_SIG_SYSTEM_ERROR)) {
488 edac_printk(KERN_CRIT, EDAC_PCI, "Bridge " 488 edac_printk(KERN_CRIT, EDAC_PCI, "Bridge "
489 "Signaled System Error on %s\n", 489 "Signaled System Error on %s\n",
490 pci_name(dev)); 490 pci_name(dev));
491 atomic_inc(&pci_nonparity_count); 491 atomic_inc(&pci_nonparity_count);
492 } 492 }
493 493
494 if (status & (PCI_STATUS_PARITY)) { 494 if (status & (PCI_STATUS_PARITY)) {
495 edac_printk(KERN_CRIT, EDAC_PCI, "Bridge " 495 edac_printk(KERN_CRIT, EDAC_PCI, "Bridge "
496 "Master Data Parity Error on " 496 "Master Data Parity Error on "
497 "%s\n", pci_name(dev)); 497 "%s\n", pci_name(dev));
498 498
499 atomic_inc(&pci_parity_count); 499 atomic_inc(&pci_parity_count);
500 } 500 }
501 501
502 if (status & (PCI_STATUS_DETECTED_PARITY)) { 502 if (status & (PCI_STATUS_DETECTED_PARITY)) {
503 edac_printk(KERN_CRIT, EDAC_PCI, "Bridge " 503 edac_printk(KERN_CRIT, EDAC_PCI, "Bridge "
504 "Detected Parity Error on %s\n", 504 "Detected Parity Error on %s\n",
505 pci_name(dev)); 505 pci_name(dev));
506 506
507 atomic_inc(&pci_parity_count); 507 atomic_inc(&pci_parity_count);
508 } 508 }