Received: by 2002:ac0:a591:0:0:0:0:0 with SMTP id m17-v6csp708632imm; Thu, 5 Jul 2018 07:38:22 -0700 (PDT) X-Google-Smtp-Source: AAOMgpcDL26l0rHq2VCVwGjoB3+UXj0FAP93gOmT2h4dSGeZh/MQCUEh/GwwYvD1FqYKlPEv/+j2 X-Received: by 2002:a62:968f:: with SMTP id s15-v6mr6707998pfk.191.1530801502481; Thu, 05 Jul 2018 07:38:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530801502; cv=none; d=google.com; s=arc-20160816; b=s7nOZCTDFQ2yoriYdm5UJHo4BIg2wQuaZSZ0KAKhrYvXGJebfR38zgg+2eUqUk4blm hJ4CjyjFAoOwkTI9KeMqy94TJjVa6ud5hEBNlEoQyGbXt53/Sw2knp2N9pGAL/oWPt5F a+mKdmhwBaMsNC8VgVue9j47L8LC5QzBsS6KbuByoUfykq0HLjSg+dNKOt+lhoXuWXxm vutwfIE4CNUVne+FFGD407z2Eqy7uJYhmwgwjuSmxuc8DRsAhttnHTY2Y0SXfVFqDpUC gR+9RaRWMz1522O9NKMjQK7GBnv2l3EKXu9gq+BgcfmXPgZdF+6BhnVmGfDdBhKdpKS4 GyAw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :organization:references:in-reply-to:date:cc:to:from:subject :message-id:arc-authentication-results; bh=PkasgYuo1HZVpZwpVSWCZ+KZ3PDDjzJfHLsXU1AtrXs=; b=dxwHbnl75UJPE/ws5whT7t4m/IREfiu8t5DeVJJ9XDKXw594n4cm9USGdXUoSqiC6X cs2gVG6gQUmIbtAPvGc/gFS/6Mgottd2KE7HrWoYf6A/PEQ55O6X4Qko5ZGlC18Pc27m JprV9g4FM+1vDGV0r1NdxAODtq5Bt3kC86FkZX8cHi1+SFAyTOQBwIWwjHUqCzD92Qsw 40wV8tjBbyWUkn2TeFEvciCUb2XoPPDEK5kW94JZMoLmiIk9TjV3bs1XF2fLZvDh2/8s wCh1W8ngzi7xFJXb8FEBneKXHORnkKm2BDy5vg2qy7sEyX6xGjpAUo6YBTzh3or/opUK JUzQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v41-v6si6223626plg.451.2018.07.05.07.38.06; Thu, 05 Jul 2018 07:38:22 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753946AbeGEORw (ORCPT + 99 others); Thu, 5 Jul 2018 10:17:52 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:43600 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753870AbeGEORt (ORCPT ); Thu, 5 Jul 2018 10:17:49 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id C8E2040073BA; Thu, 5 Jul 2018 14:17:48 +0000 (UTC) Received: from ovpn-121-174.rdu2.redhat.com (ovpn-121-174.rdu2.redhat.com [10.10.121.174]) by smtp.corp.redhat.com (Postfix) with ESMTP id 27133111E418; Thu, 5 Jul 2018 14:17:48 +0000 (UTC) Message-ID: <535c14f5856b912fb4adb0c4c3c7bd16ae12c691.camel@redhat.com> Subject: Re: [PATCH] c6x: switch to NO_BOOTMEM From: Mark Salter To: Mike Rapoport , Aurelien Jacquiot Cc: Michal Hocko , linux-c6x , linux-mm , lkml Date: Thu, 05 Jul 2018 10:17:47 -0400 In-Reply-To: <20180704132510.GI4352@rapoport-lnx> References: <1530101360-5768-1-git-send-email-rppt@linux.vnet.ibm.com> <20180704132510.GI4352@rapoport-lnx> Organization: Red Hat, Inc Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.6]); Thu, 05 Jul 2018 14:17:48 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.6]); Thu, 05 Jul 2018 14:17:48 +0000 (UTC) for IP:'10.11.54.3' DOMAIN:'int-mx03.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'msalter@redhat.com' RCPT:'' Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 2018-07-04 at 16:25 +0300, Mike Rapoport wrote: > Any comments on this? > > On Wed, Jun 27, 2018 at 03:09:20PM +0300, Mike Rapoport wrote: > > The c6x is already using memblock and does most of early memory > > reservations with it, so it was only a matter of removing the bootmem > > initialization and handover of the memory from memblock to bootmem. > > > > Signed-off-by: Mike Rapoport > > --- > > arch/c6x/Kconfig | 1 + > > arch/c6x/kernel/setup.c | 26 +------------------------- > > 2 files changed, 2 insertions(+), 25 deletions(-) > > > > diff --git a/arch/c6x/Kconfig b/arch/c6x/Kconfig > > index bf59855628ac..054c7c963180 100644 > > --- a/arch/c6x/Kconfig > > +++ b/arch/c6x/Kconfig > > @@ -14,6 +14,7 @@ config C6X > > select GENERIC_IRQ_SHOW > > select HAVE_ARCH_TRACEHOOK > > select HAVE_MEMBLOCK > > + select NO_BOOTMEM > > select SPARSE_IRQ > > select IRQ_DOMAIN > > select OF > > diff --git a/arch/c6x/kernel/setup.c b/arch/c6x/kernel/setup.c > > index 786e36e2f61d..cc74cb9d349b 100644 > > --- a/arch/c6x/kernel/setup.c > > +++ b/arch/c6x/kernel/setup.c > > @@ -296,7 +296,6 @@ notrace void __init machine_init(unsigned long dt_ptr) > > > > void __init setup_arch(char **cmdline_p) > > { > > - int bootmap_size; > > struct memblock_region *reg; > > > > printk(KERN_INFO "Initializing kernel\n"); > > @@ -353,16 +352,6 @@ void __init setup_arch(char **cmdline_p) > > init_mm.end_data = memory_start; > > init_mm.brk = memory_start; > > > > - /* > > - * Give all the memory to the bootmap allocator, tell it to put the > > - * boot mem_map at the start of memory > > - */ > > - bootmap_size = init_bootmem_node(NODE_DATA(0), > > - memory_start >> PAGE_SHIFT, > > - PAGE_OFFSET >> PAGE_SHIFT, > > - memory_end >> PAGE_SHIFT); > > - memblock_reserve(memory_start, bootmap_size); > > - > > unflatten_device_tree(); > > > > c6x_cache_init(); > > @@ -397,22 +386,9 @@ void __init setup_arch(char **cmdline_p) > > /* Initialize the coherent memory allocator */ > > coherent_mem_init(dma_start, dma_size); > > > > - /* > > - * Free all memory as a starting point. > > - */ > > - free_bootmem(PAGE_OFFSET, memory_end - PAGE_OFFSET); > > - > > - /* > > - * Then reserve memory which is already being used. > > - */ > > - for_each_memblock(reserved, reg) { > > - pr_debug("reserved - 0x%08x-0x%08x\n", > > - (u32) reg->base, (u32) reg->size); > > - reserve_bootmem(reg->base, reg->size, BOOTMEM_DEFAULT); > > - } > > - > > max_low_pfn = PFN_DOWN(memory_end); > > min_low_pfn = PFN_UP(memory_start); > > + max_pfn = max_low_pfn; > > max_mapnr = max_low_pfn - min_low_pfn; > > > > /* Get kmalloc into gear */ > > -- > > 2.7.4 > > > > Thanks. Looks fine. I'll pull it into c6x tree for next merge window.