mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-22 23:04:43 +00:00
Merge branch 'pci/misc' into next
* pci/misc: PCI: Report pci_pme_active() kmalloc failure mn10300/PCI: Remove useless pcibios_last_bus frv/PCI: Remove pcibios_last_bus PCI: Fail MSI/MSI-X initialization if device is not in PCI_D0 x86/PCI: Coalesce multiple overlapping host bridge windows MAINTAINERS: Add arch/x86/pci to PCI file patterns PCI/PM: Remove pci_pm_complete() PCI: Add pci_dev_show_local_cpu() to simplify code mn10300/PCI: Remove unused pci_mem_start cris/PCI: Remove unused pci_mem_start PCI: Make pci_dev_pm_ops static Conflicts: drivers/pci/pci-sysfs.c
This commit is contained in:
commit
33de1b8bf6
13 changed files with 34 additions and 90 deletions
|
@ -76,27 +76,10 @@ static ssize_t broken_parity_status_store(struct device *dev,
|
|||
}
|
||||
static DEVICE_ATTR_RW(broken_parity_status);
|
||||
|
||||
static ssize_t local_cpus_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 = cpumask_scnprintf(buf, PAGE_SIZE-2, mask);
|
||||
buf[len++] = '\n';
|
||||
buf[len] = '\0';
|
||||
return len;
|
||||
}
|
||||
static DEVICE_ATTR_RO(local_cpus);
|
||||
|
||||
static ssize_t local_cpulist_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;
|
||||
|
@ -107,11 +90,27 @@ static ssize_t local_cpulist_show(struct device *dev,
|
|||
#else
|
||||
mask = cpumask_of_pcibus(to_pci_dev(dev)->bus);
|
||||
#endif
|
||||
len = cpulist_scnprintf(buf, PAGE_SIZE-2, mask);
|
||||
len = type ?
|
||||
cpumask_scnprintf(buf, PAGE_SIZE-2, mask) :
|
||||
cpulist_scnprintf(buf, PAGE_SIZE-2, mask);
|
||||
|
||||
buf[len++] = '\n';
|
||||
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)
|
||||
{
|
||||
return pci_dev_show_local_cpu(dev, 0, attr, buf);
|
||||
}
|
||||
static DEVICE_ATTR_RO(local_cpulist);
|
||||
|
||||
/*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue