Esempio n. 1
0
static int local_cpus_show(int node)
{
  const cpumask_t *mask;
  int len = 1;

#ifdef CONFIG_NUMA
  mask = cpumask_of_pcibus(node);
#else
  mask = cpumask_of_node(node);
#endif
  printf("mask: %ld\n", *mask);

  return len;
}
Esempio n. 2
0
/*
<<<<<<< HEAD
=======
 * PCI Bus Class Devices
 */
static ssize_t pci_bus_show_cpuaffinity(struct device *dev,
					int type,
					struct device_attribute *attr,
					char *buf)
{
	int ret;
	const struct cpumask *cpumask;

	cpumask = cpumask_of_pcibus(to_pci_bus(dev));
	ret = type?
		cpulist_scnprintf(buf, PAGE_SIZE-2, cpumask) :
		cpumask_scnprintf(buf, PAGE_SIZE-2, cpumask);
	buf[ret++] = '\n';
	buf[ret] = '\0';
	return ret;
}