Lines Matching +full:8 +full:dev
33 struct device *dev = kobj_to_dev(kobj); in cpumap_read() local
34 struct node *node_dev = to_node(dev); in cpumap_read()
41 cpumask_and(mask, cpumask_of_node(node_dev->dev.id), cpu_online_mask); in cpumap_read()
54 struct device *dev = kobj_to_dev(kobj); in cpulist_read() local
55 struct node *node_dev = to_node(dev); in cpulist_read()
62 cpumask_and(mask, cpumask_of_node(node_dev->dev.id), cpu_online_mask); in cpulist_read()
74 * @dev: Device for this memory access class
80 struct device dev; member
87 #define to_access_nodes(dev) container_of(dev, struct node_access_nodes, dev) argument
119 device_unregister(&c->dev); in node_remove_accesses()
123 static void node_access_release(struct device *dev) in node_access_release() argument
125 kfree(to_access_nodes(dev)); in node_access_release()
132 struct device *dev; in node_init_node_access() local
143 dev = &access_node->dev; in node_init_node_access()
144 dev->parent = &node->dev; in node_init_node_access()
145 dev->release = node_access_release; in node_init_node_access()
146 dev->groups = node_access_node_groups; in node_init_node_access()
147 if (dev_set_name(dev, "access%u", access)) in node_init_node_access()
150 if (device_register(dev)) in node_init_node_access()
153 pm_runtime_no_callbacks(dev); in node_init_node_access()
157 kfree_const(dev->kobj.name); in node_init_node_access()
165 static ssize_t property##_show(struct device *dev, \
170 to_access_nodes(dev)->hmem_attrs.property); \
210 if (sysfs_add_file_to_group(&c->dev.kobj, access_attrs[i], in node_set_perf_attrs()
221 * @dev: Device represeting the cache level
226 struct device dev; member
230 #define to_cache_info(device) container_of(device, struct node_cache_info, dev)
233 static ssize_t name##_show(struct device *dev, \
238 to_cache_info(dev)->cache_attrs.name); \
256 static void node_cache_release(struct device *dev) in node_cache_release() argument
258 kfree(dev); in node_cache_release()
261 static void node_cacheinfo_release(struct device *dev) in node_cacheinfo_release() argument
263 struct node_cache_info *info = to_cache_info(dev); in node_cacheinfo_release()
269 struct device *dev; in node_init_cache_dev() local
271 dev = kzalloc(sizeof(*dev), GFP_KERNEL); in node_init_cache_dev()
272 if (!dev) in node_init_cache_dev()
275 device_initialize(dev); in node_init_cache_dev()
276 dev->parent = &node->dev; in node_init_cache_dev()
277 dev->release = node_cache_release; in node_init_cache_dev()
278 if (dev_set_name(dev, "memory_side_cache")) in node_init_cache_dev()
281 if (device_add(dev)) in node_init_cache_dev()
284 pm_runtime_no_callbacks(dev); in node_init_cache_dev()
285 node->cache_dev = dev; in node_init_cache_dev()
288 put_device(dev); in node_init_cache_dev()
299 struct device *dev; in node_add_cache() local
308 dev_warn(&node->dev, in node_add_cache()
324 dev = &info->dev; in node_add_cache()
325 device_initialize(dev); in node_add_cache()
326 dev->parent = node->cache_dev; in node_add_cache()
327 dev->release = node_cacheinfo_release; in node_add_cache()
328 dev->groups = cache_groups; in node_add_cache()
329 if (dev_set_name(dev, "index%d", cache_attrs->level)) in node_add_cache()
333 if (device_add(dev)) { in node_add_cache()
334 dev_warn(&node->dev, "failed to add cache level:%d\n", in node_add_cache()
338 pm_runtime_no_callbacks(dev); in node_add_cache()
342 put_device(dev); in node_add_cache()
354 device_unregister(&info->dev); in node_remove_caches()
369 static ssize_t node_read_meminfo(struct device *dev, in node_read_meminfo() argument
373 int nid = dev->id; in node_read_meminfo()
386 "Node %d MemTotal: %8lu kB\n" in node_read_meminfo()
387 "Node %d MemFree: %8lu kB\n" in node_read_meminfo()
388 "Node %d MemUsed: %8lu kB\n" in node_read_meminfo()
389 "Node %d SwapCached: %8lu kB\n" in node_read_meminfo()
390 "Node %d Active: %8lu kB\n" in node_read_meminfo()
391 "Node %d Inactive: %8lu kB\n" in node_read_meminfo()
392 "Node %d Active(anon): %8lu kB\n" in node_read_meminfo()
393 "Node %d Inactive(anon): %8lu kB\n" in node_read_meminfo()
394 "Node %d Active(file): %8lu kB\n" in node_read_meminfo()
395 "Node %d Inactive(file): %8lu kB\n" in node_read_meminfo()
396 "Node %d Unevictable: %8lu kB\n" in node_read_meminfo()
397 "Node %d Mlocked: %8lu kB\n", in node_read_meminfo()
415 "Node %d HighTotal: %8lu kB\n" in node_read_meminfo()
416 "Node %d HighFree: %8lu kB\n" in node_read_meminfo()
417 "Node %d LowTotal: %8lu kB\n" in node_read_meminfo()
418 "Node %d LowFree: %8lu kB\n", in node_read_meminfo()
425 "Node %d Dirty: %8lu kB\n" in node_read_meminfo()
426 "Node %d Writeback: %8lu kB\n" in node_read_meminfo()
427 "Node %d FilePages: %8lu kB\n" in node_read_meminfo()
428 "Node %d Mapped: %8lu kB\n" in node_read_meminfo()
429 "Node %d AnonPages: %8lu kB\n" in node_read_meminfo()
430 "Node %d Shmem: %8lu kB\n" in node_read_meminfo()
431 "Node %d KernelStack: %8lu kB\n" in node_read_meminfo()
433 "Node %d ShadowCallStack:%8lu kB\n" in node_read_meminfo()
435 "Node %d PageTables: %8lu kB\n" in node_read_meminfo()
436 "Node %d SecPageTables: %8lu kB\n" in node_read_meminfo()
437 "Node %d NFS_Unstable: %8lu kB\n" in node_read_meminfo()
438 "Node %d Bounce: %8lu kB\n" in node_read_meminfo()
439 "Node %d WritebackTmp: %8lu kB\n" in node_read_meminfo()
440 "Node %d KReclaimable: %8lu kB\n" in node_read_meminfo()
441 "Node %d Slab: %8lu kB\n" in node_read_meminfo()
442 "Node %d SReclaimable: %8lu kB\n" in node_read_meminfo()
443 "Node %d SUnreclaim: %8lu kB\n" in node_read_meminfo()
445 "Node %d AnonHugePages: %8lu kB\n" in node_read_meminfo()
446 "Node %d ShmemHugePages: %8lu kB\n" in node_read_meminfo()
447 "Node %d ShmemPmdMapped: %8lu kB\n" in node_read_meminfo()
448 "Node %d FileHugePages: %8lu kB\n" in node_read_meminfo()
449 "Node %d FilePmdMapped: %8lu kB\n" in node_read_meminfo()
452 "Node %d Unaccepted: %8lu kB\n" in node_read_meminfo()
495 static ssize_t node_read_numastat(struct device *dev, in node_read_numastat() argument
506 sum_zone_numa_event_state(dev->id, NUMA_HIT), in node_read_numastat()
507 sum_zone_numa_event_state(dev->id, NUMA_MISS), in node_read_numastat()
508 sum_zone_numa_event_state(dev->id, NUMA_FOREIGN), in node_read_numastat()
509 sum_zone_numa_event_state(dev->id, NUMA_INTERLEAVE_HIT), in node_read_numastat()
510 sum_zone_numa_event_state(dev->id, NUMA_LOCAL), in node_read_numastat()
511 sum_zone_numa_event_state(dev->id, NUMA_OTHER)); in node_read_numastat()
515 static ssize_t node_read_vmstat(struct device *dev, in node_read_vmstat() argument
518 int nid = dev->id; in node_read_vmstat()
549 static ssize_t node_read_distance(struct device *dev, in node_read_distance() argument
552 int nid = dev->id; in node_read_distance()
602 static void node_device_release(struct device *dev) in node_device_release() argument
604 kfree(to_node(dev)); in node_device_release()
617 node->dev.id = num; in register_node()
618 node->dev.bus = &node_subsys; in register_node()
619 node->dev.release = node_device_release; in register_node()
620 node->dev.groups = node_dev_groups; in register_node()
621 error = device_register(&node->dev); in register_node()
624 put_device(&node->dev); in register_node()
646 device_unregister(&node->dev); in unregister_node()
666 ret = sysfs_create_link(&node_devices[nid]->dev.kobj, in register_cpu_under_node()
673 &node_devices[nid]->dev.kobj, in register_cpu_under_node()
674 kobject_name(&node_devices[nid]->dev.kobj)); in register_cpu_under_node()
708 ret = sysfs_add_link_to_group(&initiator->dev.kobj, "targets", in register_memory_node_under_compute_node()
709 &targ_node->dev.kobj, in register_memory_node_under_compute_node()
710 dev_name(&targ_node->dev)); in register_memory_node_under_compute_node()
714 ret = sysfs_add_link_to_group(&target->dev.kobj, "initiators", in register_memory_node_under_compute_node()
715 &init_node->dev.kobj, in register_memory_node_under_compute_node()
716 dev_name(&init_node->dev)); in register_memory_node_under_compute_node()
722 sysfs_remove_link_from_group(&initiator->dev.kobj, "targets", in register_memory_node_under_compute_node()
723 dev_name(&targ_node->dev)); in register_memory_node_under_compute_node()
738 sysfs_remove_link(&node_devices[nid]->dev.kobj, in unregister_cpu_under_node()
741 kobject_name(&node_devices[nid]->dev.kobj)); in unregister_cpu_under_node()
764 ret = sysfs_create_link_nowarn(&node_devices[nid]->dev.kobj, in do_register_memory_block_under_node()
765 &mem_blk->dev.kobj, in do_register_memory_block_under_node()
766 kobject_name(&mem_blk->dev.kobj)); in do_register_memory_block_under_node()
768 dev_err_ratelimited(&node_devices[nid]->dev, in do_register_memory_block_under_node()
770 kobject_name(&mem_blk->dev.kobj), ret); in do_register_memory_block_under_node()
772 ret = sysfs_create_link_nowarn(&mem_blk->dev.kobj, in do_register_memory_block_under_node()
773 &node_devices[nid]->dev.kobj, in do_register_memory_block_under_node()
774 kobject_name(&node_devices[nid]->dev.kobj)); in do_register_memory_block_under_node()
776 dev_err_ratelimited(&mem_blk->dev, in do_register_memory_block_under_node()
778 kobject_name(&node_devices[nid]->dev.kobj), in do_register_memory_block_under_node()
844 sysfs_remove_link(&node_devices[mem_blk->nid]->dev.kobj, in unregister_memory_block_under_nodes()
845 kobject_name(&mem_blk->dev.kobj)); in unregister_memory_block_under_nodes()
846 sysfs_remove_link(&mem_blk->dev.kobj, in unregister_memory_block_under_nodes()
847 kobject_name(&node_devices[mem_blk->nid]->dev.kobj)); in unregister_memory_block_under_nodes()
911 static ssize_t show_node_state(struct device *dev, in show_node_state() argument