Lines Matching full:memory
184 * Returns the property linux,drconf-usable-memory if
188 static const u32 *of_get_usable_memory(struct device_node *memory) in of_get_usable_memory() argument
192 prop = of_get_property(memory, "linux,drconf-usable-memory", &len); in of_get_usable_memory()
378 struct device_node *memory = NULL; in get_n_mem_cells() local
380 memory = of_find_node_by_type(memory, "memory"); in get_n_mem_cells()
381 if (!memory) in get_n_mem_cells()
382 panic("numa.c: No memory nodes found!"); in get_n_mem_cells()
384 *n_addr_cells = of_n_addr_cells(memory); in get_n_mem_cells()
385 *n_size_cells = of_n_size_cells(memory); in get_n_mem_cells()
386 of_node_put(memory); in get_n_mem_cells()
413 * Read the next memblock list entry from the ibm,dynamic-memory property
432 * Retrieve and validate the ibm,dynamic-memory property of the device tree.
434 * The layout of the ibm,dynamic-memory property is a number N of memblock
438 static int of_get_drconf_memory(struct device_node *memory, const u32 **dm) in of_get_drconf_memory() argument
443 prop = of_get_property(memory, "ibm,dynamic-memory", &len); in of_get_drconf_memory()
460 * Retrieve and validate the ibm,lmb-size property for drconf memory
463 static u64 of_get_lmb_size(struct device_node *memory) in of_get_lmb_size() argument
468 prop = of_get_property(memory, "ibm,lmb-size", &len); in of_get_lmb_size()
483 * memory from the ibm,associativity-lookup-arrays property of the
491 static int of_get_assoc_arrays(struct device_node *memory, in of_get_assoc_arrays() argument
497 prop = of_get_property(memory, "ibm,associativity-lookup-arrays", &len); in of_get_assoc_arrays()
515 * This is like of_node_to_nid_single() for memory represented in the
516 * ibm,dynamic-reconfiguration-memory node.
591 * Check and possibly modify a memory region to enforce the memory limit.
593 * Returns the size the region should have to enforce the memory limit.
596 * discarded as it lies wholly above the memory limit.
604 * having memory holes below the limit. Also, in the case of in numa_enforce_memory_limit()
619 * linux,drconf-usable-memory property
624 * For each lmb in ibm,dynamic-memory a corresponding in read_usm_ranges()
625 * entry in linux,drconf-usable-memory property contains in read_usm_ranges()
627 * read the counter from linux,drconf-usable-memory in read_usm_ranges()
633 * Extract NUMA information from the ibm,dynamic-reconfiguration-memory
636 static void __init parse_drconf_memory(struct device_node *memory) in parse_drconf_memory() argument
644 n = of_get_drconf_memory(memory, &dm); in parse_drconf_memory()
648 lmb_size = of_get_lmb_size(memory); in parse_drconf_memory()
652 rc = of_get_assoc_arrays(memory, &aa); in parse_drconf_memory()
657 usm = of_get_usable_memory(memory); in parse_drconf_memory()
700 struct device_node *memory; in parse_numa_properties() local
714 dbg("NUMA associativity depth for CPU/Memory: %d\n", min_common_depth); in parse_numa_properties()
732 * cpus into nodes once the memory scan has discovered in parse_numa_properties()
742 for_each_node_by_type(memory, "memory") { in parse_numa_properties()
750 memcell_buf = of_get_property(memory, in parse_numa_properties()
751 "linux,usable-memory", &len); in parse_numa_properties()
753 memcell_buf = of_get_property(memory, "reg", &len); in parse_numa_properties()
765 * Assumption: either all memory nodes or none will in parse_numa_properties()
769 nid = of_node_to_nid_single(memory); in parse_numa_properties()
791 * ibm,dynamic-memory property in the in parse_numa_properties()
792 * ibm,dynamic-reconfiguration-memory node. in parse_numa_properties()
794 memory = of_find_node_by_path("/ibm,dynamic-reconfiguration-memory"); in parse_numa_properties()
795 if (memory) in parse_numa_properties()
796 parse_drconf_memory(memory); in parse_numa_properties()
811 printk(KERN_DEBUG "Memory hole size: %ldMB\n", in setup_nonnuma()
814 for_each_memblock(memory, reg) { in setup_nonnuma()
871 printk(KERN_DEBUG "Node %d Memory:", node); in dump_numa_memory_topology()
895 * Allocate some memory, satisfying the memblock or bootmem allocator where
899 * Returns the virtual address of the memory.
911 /* retry over all memory */ in careful_zallocation()
930 * instead of the MEMBLOCK. We don't free the MEMBLOCK memory in careful_zallocation()
1125 * Find the node associated with a hot added memory section for
1126 * memory represented in the device tree by the property
1127 * ibm,dynamic-reconfiguration-memory/ibm,dynamic-memory.
1129 static int hot_add_drconf_scn_to_nid(struct device_node *memory, in hot_add_drconf_scn_to_nid() argument
1138 drconf_cell_cnt = of_get_drconf_memory(memory, &dm); in hot_add_drconf_scn_to_nid()
1142 lmb_size = of_get_lmb_size(memory); in hot_add_drconf_scn_to_nid()
1146 rc = of_get_assoc_arrays(memory, &aa); in hot_add_drconf_scn_to_nid()
1173 * Find the node associated with a hot added memory section for memory
1174 * represented in the device tree as a node (i.e. memory@XXXX) for
1179 struct device_node *memory; in hot_add_node_scn_to_nid() local
1182 for_each_node_by_type(memory, "memory") { in hot_add_node_scn_to_nid()
1188 memcell_buf = of_get_property(memory, "reg", &len); in hot_add_node_scn_to_nid()
1202 nid = of_node_to_nid_single(memory); in hot_add_node_scn_to_nid()
1210 of_node_put(memory); in hot_add_node_scn_to_nid()
1216 * Find the node associated with a hot added memory section. Section
1222 struct device_node *memory = NULL; in hot_add_scn_to_nid() local
1228 memory = of_find_node_by_path("/ibm,dynamic-reconfiguration-memory"); in hot_add_scn_to_nid()
1229 if (memory) { in hot_add_scn_to_nid()
1230 nid = hot_add_drconf_scn_to_nid(memory, scn_addr); in hot_add_scn_to_nid()
1231 of_node_put(memory); in hot_add_scn_to_nid()
1255 struct device_node *memory = NULL; in hot_add_drconf_memory_max() local
1260 memory = of_find_node_by_path("/ibm,dynamic-reconfiguration-memory"); in hot_add_drconf_memory_max()
1261 if (memory) { in hot_add_drconf_memory_max()
1262 drconf_cell_cnt = of_get_drconf_memory(memory, &dm); in hot_add_drconf_memory_max()
1263 lmb_size = of_get_lmb_size(memory); in hot_add_drconf_memory_max()
1264 of_node_put(memory); in hot_add_drconf_memory_max()
1270 * memory_hotplug_max - return max address of memory that may be added
1272 * This is currently only used on systems that support drconfig memory