--- zzzz-none-000/linux-4.4.60/arch/arm/mm/init.c 2017-04-08 07:53:53.000000000 +0000 +++ dragonfly-4020-701/linux-4.4.60/arch/arm/mm/init.c 2018-11-08 13:36:17.000000000 +0000 @@ -152,7 +152,8 @@ */ zone_size[0] = max_low - min; #ifdef CONFIG_HIGHMEM - zone_size[ZONE_HIGHMEM] = max_high - max_low; + if (max_high >= max_low) + zone_size[ZONE_HIGHMEM] = max_high - max_low; #endif /* @@ -748,11 +749,18 @@ #endif } +#if defined(CONFIG_AVM_ENHANCED) +void __init avm_mtd_cleanup(void); +#endif void free_initmem(void) { fix_kernmem_perms(); free_tcmmem(); +#if defined(CONFIG_AVM_ENHANCED) + avm_mtd_cleanup(); +#endif + poison_init_mem(__init_begin, __init_end - __init_begin); if (!machine_is_integrator() && !machine_is_cintegrator()) free_initmem_default(-1);