Message ID | 20220331074055.125824-4-wangkefeng.wang@huawei.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | arm64: mm: Do not defer reserve_crashkernel() | expand |
On 3/31/2022 12:40 AM, Kefeng Wang wrote: > Directly use max_pfn for max and no one use min, kill them. > > Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com> Looks good. Reference to dma32_phys_limit in zone_sizes_init() depends on what you do with my comment [1]. [1] https://lore.kernel.org/all/69c1e722-33ea-95cf-de84-aed3022cb042@linux.microsoft.com/ Reviewed-by: Vijay Balakrishna <vijayb@linux.microsoft.com> > --- > arch/arm64/mm/init.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/arch/arm64/mm/init.c b/arch/arm64/mm/init.c > index 0aafa9181607..80e9ff37b697 100644 > --- a/arch/arm64/mm/init.c > +++ b/arch/arm64/mm/init.c > @@ -181,7 +181,7 @@ static phys_addr_t __init max_zone_phys(unsigned int zone_bits) > return min(zone_mask, memblock_end_of_DRAM() - 1) + 1; > } > > -static void __init zone_sizes_init(unsigned long min, unsigned long max) > +static void __init zone_sizes_init(void) > { > unsigned long max_zone_pfns[MAX_NR_ZONES] = {0}; > #ifdef CONFIG_ZONE_DMA > @@ -199,7 +199,7 @@ static void __init zone_sizes_init(unsigned long min, unsigned long max) > #ifdef CONFIG_ZONE_DMA32 > max_zone_pfns[ZONE_DMA32] = PFN_DOWN(dma32_phys_limit); > #endif > - max_zone_pfns[ZONE_NORMAL] = max; > + max_zone_pfns[ZONE_NORMAL] = max_pfn; > > free_area_init(max_zone_pfns); > } > @@ -401,7 +401,7 @@ void __init bootmem_init(void) > * done after the fixed reservations > */ > sparse_init(); > - zone_sizes_init(min, max); > + zone_sizes_init(); > > /* > * Reserve the CMA area after arm64_dma_phys_limit was initialised.
On 2022/4/2 1:05, Vijay Balakrishna wrote: > > > On 3/31/2022 12:40 AM, Kefeng Wang wrote: >> Directly use max_pfn for max and no one use min, kill them. >> >> Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com> > > Looks good. Reference to dma32_phys_limit in zone_sizes_init() > depends on what you do with my comment [1]. > > [1] > https://lore.kernel.org/all/69c1e722-33ea-95cf-de84-aed3022cb042@linux.microsoft.com/ Ok, will drop dma32_phys_limit and directly use max_zone_phys(32). > > Reviewed-by: Vijay Balakrishna <vijayb@linux.microsoft.com> > Thanks.
diff --git a/arch/arm64/mm/init.c b/arch/arm64/mm/init.c index 0aafa9181607..80e9ff37b697 100644 --- a/arch/arm64/mm/init.c +++ b/arch/arm64/mm/init.c @@ -181,7 +181,7 @@ static phys_addr_t __init max_zone_phys(unsigned int zone_bits) return min(zone_mask, memblock_end_of_DRAM() - 1) + 1; } -static void __init zone_sizes_init(unsigned long min, unsigned long max) +static void __init zone_sizes_init(void) { unsigned long max_zone_pfns[MAX_NR_ZONES] = {0}; #ifdef CONFIG_ZONE_DMA @@ -199,7 +199,7 @@ static void __init zone_sizes_init(unsigned long min, unsigned long max) #ifdef CONFIG_ZONE_DMA32 max_zone_pfns[ZONE_DMA32] = PFN_DOWN(dma32_phys_limit); #endif - max_zone_pfns[ZONE_NORMAL] = max; + max_zone_pfns[ZONE_NORMAL] = max_pfn; free_area_init(max_zone_pfns); } @@ -401,7 +401,7 @@ void __init bootmem_init(void) * done after the fixed reservations */ sparse_init(); - zone_sizes_init(min, max); + zone_sizes_init(); /* * Reserve the CMA area after arm64_dma_phys_limit was initialised.
Directly use max_pfn for max and no one use min, kill them. Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com> --- arch/arm64/mm/init.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)