[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH 12/37] xen/x86: decouple nodes_cover_memory from E820 map
On 27.01.2022 10:03, Wei Chen wrote: >> From: Jan Beulich <jbeulich@xxxxxxxx> >> Sent: 2022年1月27日 16:09 >> >> On 27.01.2022 09:03, Wei Chen wrote: >>>> From: Jan Beulich <jbeulich@xxxxxxxx> >>>> Sent: 2022年1月25日 0:59 >>>> >>>> On 23.09.2021 14:02, Wei Chen wrote: >>>>> We will reuse nodes_cover_memory for Arm to check its bootmem >>>>> info. So we introduce two arch helpers to get memory map's >>>>> entry number and specified entry's range: >>>>> arch_get_memory_bank_number >>>>> arch_get_memory_bank_range >>>> >>>> I'm sorry, but personally I see no way for you to introduce the term >>>> "memory bank" into x86 code. >>> >>> In my latest changes, I have updated these two helpers to: >>> uint32_t __init arch_meminfo_get_nr_bank(void) >>> __init arch_meminfo_get_ram_bank_range(...) >>> I am sorry, I forgot to change the commit log accordingly. >>> I will update it in next version. >> >> I'm sorry for the ambiguity of my earlier reply, but my objection was >> against "bank", not "memory". As an aside, you also don't want the > > How about arch_meminfo_get_nr_map/ arch_meminfo_get_map_range? > I am sorry, I am not very familiar with e820 map, could you > give me some suggestions? First of all I don't think you need a "get_nr" function at all, which eliminates the need to find a good name for it. The "get_range" function can easily provide back a unique indicator when the passed in index is beyond the number of regions. For this function's name, how about arch_get_memory_map() or arch_get_memory_map_block() or arch_get_memory_map_range() (in order of my personal preference)? Jan
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |