[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH 24/37] xen/arm: implement two arch helpers to get memory map info
On Thu, 23 Sep 2021, Wei Chen wrote: > These two helpers are architecture APIs that are required by > nodes_cover_memory. > > Signed-off-by: Wei Chen <wei.chen@xxxxxxx> > --- > xen/arch/arm/numa.c | 14 ++++++++++++++ > 1 file changed, 14 insertions(+) > > diff --git a/xen/arch/arm/numa.c b/xen/arch/arm/numa.c > index 3f08870d69..3755b01ef4 100644 > --- a/xen/arch/arm/numa.c > +++ b/xen/arch/arm/numa.c > @@ -67,3 +67,17 @@ uint8_t __node_distance(nodeid_t from, nodeid_t to) > return node_distance_map[from][to]; > } > EXPORT_SYMBOL(__node_distance); > + > +uint32_t __init arch_meminfo_get_nr_bank(void) > +{ > + return bootinfo.mem.nr_banks; > +} > + > +int __init arch_meminfo_get_ram_bank_range(uint32_t bank, > + paddr_t *start, paddr_t *end) > +{ > + *start = bootinfo.mem.bank[bank].start; > + *end = bootinfo.mem.bank[bank].start + bootinfo.mem.bank[bank].size; > + > + return 0; > +} The rest of the file is indented using spaces, while this patch is using tabs. Also, given the implementation, it looks like arch_meminfo_get_ram_bank_range should either return void or bool.
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |