diff options
Diffstat (limited to 'drivers/pci/pci-sysfs.c')
-rw-r--r-- | drivers/pci/pci-sysfs.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/pci/pci-sysfs.c b/drivers/pci/pci-sysfs.c index 7a94076752d0..cd913a2a416f 100644 --- a/drivers/pci/pci-sysfs.c +++ b/drivers/pci/pci-sysfs.c | |||
@@ -143,6 +143,14 @@ static ssize_t is_enabled_show(struct device *dev, | |||
143 | return sprintf (buf, "%u\n", atomic_read(&pdev->enable_cnt)); | 143 | return sprintf (buf, "%u\n", atomic_read(&pdev->enable_cnt)); |
144 | } | 144 | } |
145 | 145 | ||
146 | #ifdef CONFIG_NUMA | ||
147 | static ssize_t | ||
148 | numa_node_show(struct device *dev, struct device_attribute *attr, char *buf) | ||
149 | { | ||
150 | return sprintf (buf, "%d\n", dev->numa_node); | ||
151 | } | ||
152 | #endif | ||
153 | |||
146 | static ssize_t | 154 | static ssize_t |
147 | msi_bus_show(struct device *dev, struct device_attribute *attr, char *buf) | 155 | msi_bus_show(struct device *dev, struct device_attribute *attr, char *buf) |
148 | { | 156 | { |
@@ -194,6 +202,9 @@ struct device_attribute pci_dev_attrs[] = { | |||
194 | __ATTR_RO(irq), | 202 | __ATTR_RO(irq), |
195 | __ATTR_RO(local_cpus), | 203 | __ATTR_RO(local_cpus), |
196 | __ATTR_RO(modalias), | 204 | __ATTR_RO(modalias), |
205 | #ifdef CONFIG_NUMA | ||
206 | __ATTR_RO(numa_node), | ||
207 | #endif | ||
197 | __ATTR(enable, 0600, is_enabled_show, is_enabled_store), | 208 | __ATTR(enable, 0600, is_enabled_show, is_enabled_store), |
198 | __ATTR(broken_parity_status,(S_IRUGO|S_IWUSR), | 209 | __ATTR(broken_parity_status,(S_IRUGO|S_IWUSR), |
199 | broken_parity_status_show,broken_parity_status_store), | 210 | broken_parity_status_show,broken_parity_status_store), |