return count;
}
+static DEVICE_ATTR_RW(broken_parity_status);
- static ssize_t local_cpus_show(struct device *dev,
- struct device_attribute *attr, char *buf)
- {
+ static ssize_t pci_dev_show_local_cpu(struct device *dev,
+ int type,
+ struct device_attribute *attr,
+ char *buf)
+ {
const struct cpumask *mask;
int len;
buf[len] = '\0';
return len;
}
+
+ static ssize_t local_cpus_show(struct device *dev,
+ struct device_attribute *attr, char *buf)
+ {
+ return pci_dev_show_local_cpu(dev, 1, attr, buf);
+ }
+static DEVICE_ATTR_RO(local_cpus);
static ssize_t local_cpulist_show(struct device *dev,
struct device_attribute *attr, char *buf)
{
- const struct cpumask *mask;
- int len;
-
- #ifdef CONFIG_NUMA
- mask = (dev_to_node(dev) == -1) ? cpu_online_mask :
- cpumask_of_node(dev_to_node(dev));
- #else
- mask = cpumask_of_pcibus(to_pci_dev(dev)->bus);
- #endif
- len = cpulist_scnprintf(buf, PAGE_SIZE-2, mask);
- buf[len++] = '\n';
- buf[len] = '\0';
- return len;
+ return pci_dev_show_local_cpu(dev, 0, attr, buf);
}
+static DEVICE_ATTR_RO(local_cpulist);
/*
* PCI Bus Class Devices