From: akpm@linux-foundation.org Subject: + mm-printk-use-memblock-apis-for-early-memory-allocations.patch added to -mm tree Date: Mon, 09 Dec 2013 16:29:17 -0800 Message-ID: <52a6605d.fYSqUU3RHdTZfAAU%akpm@linux-foundation.org> Reply-To: linux-kernel@vger.kernel.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Return-path: Received: from mail.linuxfoundation.org ([140.211.169.12]:55669 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751478Ab3LJA3S (ORCPT ); Mon, 9 Dec 2013 19:29:18 -0500 Sender: mm-commits-owner@vger.kernel.org List-Id: mm-commits@vger.kernel.org To: mm-commits@vger.kernel.org, yinghai@kernel.org, tony@atomide.com, tj@kernel.org, rjw@sisk.pl, pavel@ucw.cz, paul@pwsan.com, mhocko@suse.cz, linux@arm.linux.org.uk, konrad.wilk@oracle.com, kamezawa.hiroyu@jp.fujitsu.com, hpa@zytor.com, hannes@cmpxchg.org, grygorii.strashko@ti.com, gregkh@linuxfoundation.org, cl@linux-foundation.org, arnd@arndb.de, santosh.shilimkar@ti.com Subject: + mm-printk-use-memblock-apis-for-early-memory-allocations.patch added to -mm tree To: santosh.shilimkar@ti.com,arnd@arndb.de,cl@linux-foundation.org,gregkh@linuxfoundation.org,grygorii.strashko@ti.com,hannes@cmpxchg.org,hpa@zytor.com,kamezawa.hiroyu@jp.fujitsu.com,konrad.wilk@oracle.com,linux@arm.linux.org.uk,mhocko@suse.cz,paul@pwsan.com,pavel@ucw.cz,rjw@sisk.pl,tj@kernel.org,tony@atomide.com,yinghai@kernel.org From: akpm@linux-foundation.org Date: Mon, 09 Dec 2013 16:29:17 -0800 The patch titled Subject: kernel/printk/printk.c: use memblock apis for early memory allocations has been added to the -mm tree. Its filename is mm-printk-use-memblock-apis-for-early-memory-allocations.patch This patch should soon appear at http://ozlabs.org/~akpm/mmots/broken-out/mm-printk-use-memblock-apis-for-early-memory-allocations.patch and later at http://ozlabs.org/~akpm/mmotm/broken-out/mm-printk-use-memblock-apis-for-early-memory-allocations.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/SubmitChecklist when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: Santosh Shilimkar Subject: kernel/printk/printk.c: use memblock apis for early memory allocations Switch to memblock interfaces for early memory allocator instead of bootmem allocator. No functional change in beahvior than what it is in current code from bootmem users points of view. Archs already converted to NO_BOOTMEM now directly use memblock interfaces instead of bootmem wrappers build on top of memblock. And the archs which still uses bootmem, these new apis just fallback to exiting bootmem APIs. Signed-off-by: Grygorii Strashko Signed-off-by: Santosh Shilimkar Cc: Yinghai Lu Cc: Tejun Heo Cc: "Rafael J. Wysocki" Cc: Arnd Bergmann Cc: Christoph Lameter Cc: Greg Kroah-Hartman Cc: H. Peter Anvin Cc: Johannes Weiner Cc: KAMEZAWA Hiroyuki Cc: Konrad Rzeszutek Wilk Cc: Michal Hocko Cc: Paul Walmsley Cc: Pavel Machek Cc: Russell King Cc: Tony Lindgren Signed-off-by: Andrew Morton --- kernel/printk/printk.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff -puN kernel/printk/printk.c~mm-printk-use-memblock-apis-for-early-memory-allocations kernel/printk/printk.c --- a/kernel/printk/printk.c~mm-printk-use-memblock-apis-for-early-memory-allocations +++ a/kernel/printk/printk.c @@ -757,14 +757,10 @@ void __init setup_log_buf(int early) return; if (early) { - unsigned long mem; - - mem = memblock_alloc(new_log_buf_len, PAGE_SIZE); - if (!mem) - return; - new_log_buf = __va(mem); + new_log_buf = + memblock_virt_alloc(new_log_buf_len, PAGE_SIZE); } else { - new_log_buf = alloc_bootmem_nopanic(new_log_buf_len); + new_log_buf = memblock_virt_alloc_nopanic(new_log_buf_len, 0); } if (unlikely(!new_log_buf)) { _ Patches currently in -mm which might be from santosh.shilimkar@ti.com are mm-memblock-debug-correct-displaying-of-upper-memory-boundary.patch mm-memblock-debug-dont-free-reserved-array-if-arch_discard_memblock.patch mm-bootmem-remove-duplicated-declaration-of-__free_pages_bootmem.patch mm-memblock-remove-unnecessary-inclusions-of-bootmemh.patch mm-memblock-drop-warn-and-use-smp_cache_bytes-as-a-default-alignment.patch mm-memblock-reorder-parameters-of-memblock_find_in_range_node.patch mm-memblock-switch-to-use-numa_no_node-instead-of-max_numnodes.patch mm-memblock-add-memblock-memory-allocation-apis.patch mm-memblock-add-memblock-memory-allocation-apis-fix.patch mm-init-use-memblock-apis-for-early-memory-allocations.patch mm-printk-use-memblock-apis-for-early-memory-allocations.patch mm-page_alloc-use-memblock-apis-for-early-memory-allocations.patch mm-power-use-memblock-apis-for-early-memory-allocations.patch lib-swiotlbc-use-memblock-apis-for-early-memory-allocations.patch lib-cpumaskc-use-memblock-apis-for-early-memory-allocations.patch mm-sparse-use-memblock-apis-for-early-memory-allocations.patch mm-hugetlb-use-memblock-apis-for-early-memory-allocations.patch mm-page_cgroup-use-memblock-apis-for-early-memory-allocations.patch mm-percpu-use-memblock-apis-for-early-memory-allocations.patch mm-memory_hotplug-use-memblock-apis-for-early-memory-allocations.patch drivers-firmware-memmapc-use-memblock-apis-for-early-memory-allocations.patch arch-arm-kernel-use-memblock-apis-for-early-memory-allocations.patch arch-arm-mm-initc-use-memblock-apis-for-early-memory-allocations.patch arch-arm-mach-omap2-omap_hwmodc-use-memblock-apis-for-early-memory-allocations.patch linux-next.patch