Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753432AbbHaW6Y (ORCPT ); Mon, 31 Aug 2015 18:58:24 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:45223 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752353AbbHaW6X (ORCPT ); Mon, 31 Aug 2015 18:58:23 -0400 Date: Mon, 31 Aug 2015 15:58:22 -0700 From: Andrew Morton To: Alexander Kuleshov Cc: Tony Luck , Pekka Enberg , Mel Gorman , Xishi Qiu , Baoquan He , Robin Holt , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v1] mm/memblock: Add memblock_first_region_size() helper Message-Id: <20150831155822.20d35ce3c5101c940c4d0365@linux-foundation.org> In-Reply-To: <1440703185-16072-1-git-send-email-kuleshovmail@gmail.com> References: <1440703185-16072-1-git-send-email-kuleshovmail@gmail.com> X-Mailer: Sylpheed 3.4.1 (GTK+ 2.24.23; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1204 Lines: 34 On Fri, 28 Aug 2015 01:19:45 +0600 Alexander Kuleshov wrote: > Some architectures (like s390, microblaze and etc...) require size > of the first memory region. This patch provides new memblock_first_region_size() > helper for this case. > > ... > > --- a/mm/memblock.c > +++ b/mm/memblock.c > @@ -1463,6 +1463,11 @@ phys_addr_t __init_memblock memblock_end_of_DRAM(void) > return (memblock.memory.regions[idx].base + memblock.memory.regions[idx].size); > } > > +phys_addr_t __init_memblock memblock_first_region_size(void) > +{ > + return memblock.memory.regions[0].size; > +} > + > void __init memblock_enforce_memory_limit(phys_addr_t limit) > { > phys_addr_t max_addr = (phys_addr_t)ULLONG_MAX; We tend to avoid merging functions which have no callers. Some actual callsites should be included in the patch or patch series, please. This is so we know it's useful, that it's getting runtime tested and to aid review. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/