/kernel/linux/linux-6.6/arch/powerpc/platforms/pseries/ |
H A D | hotplug-memory.c | 102 * The associativity lookup array index for this lmb is in find_aa_index() 110 static int update_lmb_associativity_index(struct drmem_lmb *lmb) in update_lmb_associativity_index() argument 122 lmb_node = dlpar_configure_connector(cpu_to_be32(lmb->drc_index), in update_lmb_associativity_index() 160 lmb->aa_index = aa_index; in update_lmb_associativity_index() 164 static struct memory_block *lmb_to_memblock(struct drmem_lmb *lmb) in lmb_to_memblock() argument 169 section_nr = pfn_to_section_nr(PFN_DOWN(lmb->base_addr)); in lmb_to_memblock() 179 struct drmem_lmb *lmb, *start, *end; in get_lmb_range() local 183 for_each_drmem_lmb(lmb) { in get_lmb_range() 184 if (lmb->drc_index == drc_index) { in get_lmb_range() 185 start = lmb; in get_lmb_range() 204 dlpar_change_lmb_state(struct drmem_lmb *lmb, bool online) dlpar_change_lmb_state() argument 225 dlpar_online_lmb(struct drmem_lmb *lmb) dlpar_online_lmb() argument 231 dlpar_offline_lmb(struct drmem_lmb *lmb) dlpar_offline_lmb() argument 285 lmb_is_removable(struct drmem_lmb *lmb) lmb_is_removable() argument 305 dlpar_remove_lmb(struct drmem_lmb *lmb) dlpar_remove_lmb() argument 337 struct drmem_lmb *lmb; dlpar_memory_remove_by_count() local 420 struct drmem_lmb *lmb; dlpar_memory_remove_by_index() local 453 struct drmem_lmb *lmb, *start_lmb, *end_lmb; dlpar_memory_remove_by_ic() local 548 dlpar_remove_lmb(struct drmem_lmb *lmb) dlpar_remove_lmb() argument 567 dlpar_add_lmb(struct drmem_lmb *lmb) dlpar_add_lmb() argument 608 struct drmem_lmb *lmb; dlpar_memory_add_by_count() local 698 struct drmem_lmb *lmb; dlpar_memory_add_by_index() local 732 struct drmem_lmb *lmb, *start_lmb, *end_lmb; dlpar_memory_add_by_ic() local [all...] |
/kernel/linux/linux-5.10/arch/powerpc/platforms/pseries/ |
H A D | hotplug-memory.c | 39 prop = of_get_property(np, "ibm,lmb-size", &len); in pseries_memory_block_size() 151 * The associativity lookup array index for this lmb is in find_aa_index() 159 static int update_lmb_associativity_index(struct drmem_lmb *lmb) in update_lmb_associativity_index() argument 171 lmb_node = dlpar_configure_connector(cpu_to_be32(lmb->drc_index), in update_lmb_associativity_index() 209 lmb->aa_index = aa_index; in update_lmb_associativity_index() 213 static struct memory_block *lmb_to_memblock(struct drmem_lmb *lmb) in lmb_to_memblock() argument 219 section_nr = pfn_to_section_nr(PFN_DOWN(lmb->base_addr)); in lmb_to_memblock() 230 struct drmem_lmb *lmb, *start, *end; in get_lmb_range() local 234 for_each_drmem_lmb(lmb) { in get_lmb_range() 235 if (lmb in get_lmb_range() 255 dlpar_change_lmb_state(struct drmem_lmb *lmb, bool online) dlpar_change_lmb_state() argument 276 dlpar_online_lmb(struct drmem_lmb *lmb) dlpar_online_lmb() argument 282 dlpar_offline_lmb(struct drmem_lmb *lmb) dlpar_offline_lmb() argument 351 lmb_is_removable(struct drmem_lmb *lmb) lmb_is_removable() argument 370 dlpar_remove_lmb(struct drmem_lmb *lmb) dlpar_remove_lmb() argument 405 struct drmem_lmb *lmb; dlpar_memory_remove_by_count() local 480 struct drmem_lmb *lmb; dlpar_memory_remove_by_index() local 513 struct drmem_lmb *lmb, *start_lmb, *end_lmb; dlpar_memory_remove_by_ic() local 595 dlpar_remove_lmb(struct drmem_lmb *lmb) dlpar_remove_lmb() argument 614 dlpar_add_lmb(struct drmem_lmb *lmb) dlpar_add_lmb() argument 655 struct drmem_lmb *lmb; dlpar_memory_add_by_count() local 735 struct drmem_lmb *lmb; dlpar_memory_add_by_index() local 769 struct drmem_lmb *lmb, *start_lmb, *end_lmb; dlpar_memory_add_by_ic() local [all...] |
/kernel/linux/linux-6.6/arch/powerpc/mm/ |
H A D | drmem.c | 31 static u32 drmem_lmb_flags(struct drmem_lmb *lmb) in drmem_lmb_flags() argument 34 * Return the value of the lmb flags field minus the reserved in drmem_lmb_flags() 37 return lmb->flags & ~DRMEM_LMB_RESERVED; in drmem_lmb_flags() 69 struct drmem_lmb *lmb; in drmem_update_dt_v1() local 81 for_each_drmem_lmb(lmb) { in drmem_update_dt_v1() 82 dr_cell->base_addr = cpu_to_be64(lmb->base_addr); in drmem_update_dt_v1() 83 dr_cell->drc_index = cpu_to_be32(lmb->drc_index); in drmem_update_dt_v1() 84 dr_cell->aa_index = cpu_to_be32(lmb->aa_index); in drmem_update_dt_v1() 85 dr_cell->flags = cpu_to_be32(drmem_lmb_flags(lmb)); in drmem_update_dt_v1() 95 struct drmem_lmb *lmb) in init_drconf_v2_cell() 94 init_drconf_v2_cell(struct of_drconf_cell_v2 *dr_cell, struct drmem_lmb *lmb) init_drconf_v2_cell() argument 108 struct drmem_lmb *lmb, *prev_lmb; drmem_update_dt_v2() local 201 read_drconf_v1_cell(struct drmem_lmb *lmb, const __be32 **prop) read_drconf_v1_cell() argument 222 struct drmem_lmb lmb; __walk_drmem_v1_lmbs() local 257 struct drmem_lmb lmb; __walk_drmem_v2_lmbs() local 324 struct drmem_lmb *lmb; update_lmb() local 427 struct drmem_lmb *lmb; init_drmem_v1_lmbs() local 444 struct drmem_lmb *lmb; init_drmem_v2_lmbs() local [all...] |
H A D | numa.c | 586 static int __init get_nid_and_numa_distance(struct drmem_lmb *lmb) in get_nid_and_numa_distance() argument 601 !(lmb->flags & DRCONF_MEM_AI_INVALID) && lmb->aa_index < aa.n_arrays) { in get_nid_and_numa_distance() 604 index = lmb->aa_index * aa.array_sz; in get_nid_and_numa_distance() 622 int of_drconf_to_nid_single(struct drmem_lmb *lmb) in of_drconf_to_nid_single() argument 637 !(lmb->flags & DRCONF_MEM_AI_INVALID) && lmb->aa_index < aa.n_arrays) { in of_drconf_to_nid_single() 640 index = lmb->aa_index * aa.array_sz; in of_drconf_to_nid_single() 838 * For each lmb in ibm,dynamic-memory a corresponding in read_usm_ranges() 850 static int __init numa_setup_drmem_lmb(struct drmem_lmb *lmb, in numa_setup_drmem_lmb() argument 1259 struct drmem_lmb *lmb; hot_add_drconf_scn_to_nid() local [all...] |
/kernel/linux/linux-5.10/arch/powerpc/include/asm/ |
H A D | drmem.h | 28 static inline struct drmem_lmb *drmem_lmb_next(struct drmem_lmb *lmb, in drmem_lmb_next() argument 36 if (((++lmb - start) % 16) == 0) in drmem_lmb_next() 39 return lmb; in drmem_lmb_next() 42 #define for_each_drmem_lmb_in_range(lmb, start, end) \ 43 for ((lmb) = (start); (lmb) < (end); lmb = drmem_lmb_next(lmb, start)) 45 #define for_each_drmem_lmb(lmb) \ 46 for_each_drmem_lmb_in_range((lmb), \ 90 drmem_mark_lmb_reserved(struct drmem_lmb *lmb) drmem_mark_lmb_reserved() argument 95 drmem_remove_lmb_reservation(struct drmem_lmb *lmb) drmem_remove_lmb_reservation() argument 100 drmem_lmb_reserved(struct drmem_lmb *lmb) drmem_lmb_reserved() argument 116 invalidate_lmb_associativity_index(struct drmem_lmb *lmb) invalidate_lmb_associativity_index() argument [all...] |
H A D | topology.h | 66 int of_drconf_to_nid_single(struct drmem_lmb *lmb); 97 static inline int of_drconf_to_nid_single(struct drmem_lmb *lmb) in of_drconf_to_nid_single() argument
|
/kernel/linux/linux-6.6/arch/powerpc/include/asm/ |
H A D | drmem.h | 31 static inline struct drmem_lmb *drmem_lmb_next(struct drmem_lmb *lmb, in drmem_lmb_next() argument 39 if (((++lmb - start) % 16) == 0) in drmem_lmb_next() 42 return lmb; in drmem_lmb_next() 45 #define for_each_drmem_lmb_in_range(lmb, start, end) \ 46 for ((lmb) = (start); (lmb) < (end); lmb = drmem_lmb_next(lmb, start)) 48 #define for_each_drmem_lmb(lmb) \ 49 for_each_drmem_lmb_in_range((lmb), \ 93 drmem_mark_lmb_reserved(struct drmem_lmb *lmb) drmem_mark_lmb_reserved() argument 98 drmem_remove_lmb_reservation(struct drmem_lmb *lmb) drmem_remove_lmb_reservation() argument 103 drmem_lmb_reserved(struct drmem_lmb *lmb) drmem_lmb_reserved() argument 120 invalidate_lmb_associativity_index(struct drmem_lmb *lmb) invalidate_lmb_associativity_index() argument [all...] |
H A D | topology.h | 66 int of_drconf_to_nid_single(struct drmem_lmb *lmb); 97 static inline int of_drconf_to_nid_single(struct drmem_lmb *lmb) in of_drconf_to_nid_single() argument
|
/kernel/linux/linux-5.10/arch/powerpc/mm/ |
H A D | drmem.c | 30 static u32 drmem_lmb_flags(struct drmem_lmb *lmb) in drmem_lmb_flags() argument 33 * Return the value of the lmb flags field minus the reserved in drmem_lmb_flags() 36 return lmb->flags & ~DRMEM_LMB_RESERVED; in drmem_lmb_flags() 68 struct drmem_lmb *lmb; in drmem_update_dt_v1() local 80 for_each_drmem_lmb(lmb) { in drmem_update_dt_v1() 81 dr_cell->base_addr = cpu_to_be64(lmb->base_addr); in drmem_update_dt_v1() 82 dr_cell->drc_index = cpu_to_be32(lmb->drc_index); in drmem_update_dt_v1() 83 dr_cell->aa_index = cpu_to_be32(lmb->aa_index); in drmem_update_dt_v1() 84 dr_cell->flags = cpu_to_be32(drmem_lmb_flags(lmb)); in drmem_update_dt_v1() 94 struct drmem_lmb *lmb) in init_drconf_v2_cell() 93 init_drconf_v2_cell(struct of_drconf_cell_v2 *dr_cell, struct drmem_lmb *lmb) init_drconf_v2_cell() argument 107 struct drmem_lmb *lmb, *prev_lmb; drmem_update_dt_v2() local 194 read_drconf_v1_cell(struct drmem_lmb *lmb, const __be32 **prop) read_drconf_v1_cell() argument 215 struct drmem_lmb lmb; __walk_drmem_v1_lmbs() local 250 struct drmem_lmb lmb; __walk_drmem_v2_lmbs() local 381 struct drmem_lmb *lmb; init_drmem_v1_lmbs() local 398 struct drmem_lmb *lmb; init_drmem_v2_lmbs() local [all...] |
H A D | numa.c | 595 static int get_nid_and_numa_distance(struct drmem_lmb *lmb) in get_nid_and_numa_distance() argument 610 !(lmb->flags & DRCONF_MEM_AI_INVALID) && lmb->aa_index < aa.n_arrays) { in get_nid_and_numa_distance() 613 index = lmb->aa_index * aa.array_sz; in get_nid_and_numa_distance() 631 int of_drconf_to_nid_single(struct drmem_lmb *lmb) in of_drconf_to_nid_single() argument 646 !(lmb->flags & DRCONF_MEM_AI_INVALID) && lmb->aa_index < aa.n_arrays) { in of_drconf_to_nid_single() 649 index = lmb->aa_index * aa.array_sz; in of_drconf_to_nid_single() 847 * For each lmb in ibm,dynamic-memory a corresponding in read_usm_ranges() 859 static int __init numa_setup_drmem_lmb(struct drmem_lmb *lmb, in numa_setup_drmem_lmb() argument 1273 struct drmem_lmb *lmb; hot_add_drconf_scn_to_nid() local [all...] |
/kernel/linux/linux-5.10/arch/powerpc/kernel/ |
H A D | prom.c | 473 static int __init early_init_drmem_lmb(struct drmem_lmb *lmb, in early_init_drmem_lmb() argument 480 base = lmb->base_addr; in early_init_drmem_lmb() 488 if ((lmb->flags & DRCONF_MEM_RESERVED) || in early_init_drmem_lmb() 489 !(lmb->flags & DRCONF_MEM_ASSIGNED)) in early_init_drmem_lmb() 527 if (lmb->flags & DRCONF_MEM_HOTREMOVABLE) in early_init_drmem_lmb()
|
/kernel/linux/linux-6.6/arch/powerpc/kernel/ |
H A D | prom.c | 511 static int __init early_init_drmem_lmb(struct drmem_lmb *lmb, in early_init_drmem_lmb() argument 518 base = lmb->base_addr; in early_init_drmem_lmb() 526 if ((lmb->flags & DRCONF_MEM_RESERVED) || in early_init_drmem_lmb() 527 !(lmb->flags & DRCONF_MEM_ASSIGNED)) in early_init_drmem_lmb() 565 if (lmb->flags & DRCONF_MEM_HOTREMOVABLE) in early_init_drmem_lmb()
|
/kernel/linux/linux-5.10/arch/powerpc/kexec/ |
H A D | file_load_64.c | 506 * @lmb: LMB info. 512 static int kdump_setup_usable_lmb(struct drmem_lmb *lmb, const __be32 **usm, in kdump_setup_usable_lmb() argument 534 base = lmb->base_addr; in kdump_setup_usable_lmb()
|
/kernel/linux/linux-6.6/arch/powerpc/kexec/ |
H A D | file_load_64.c | 511 * @lmb: LMB info. 517 static int kdump_setup_usable_lmb(struct drmem_lmb *lmb, const __be32 **usm, in kdump_setup_usable_lmb() argument 539 base = lmb->base_addr; in kdump_setup_usable_lmb()
|