[merged] sh-prefer-memblock-apis-returning-virtual-address.patch removed from -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     Subject: sh: prefer memblock APIs returning virtual address
has been removed from the -mm tree.  Its filename was
     sh-prefer-memblock-apis-returning-virtual-address.patch

This patch was dropped because it was merged into mainline or a subsystem tree

------------------------------------------------------
From: Mike Rapoport <rppt@xxxxxxxxxxxxx>
Subject: sh: prefer memblock APIs returning virtual address

Rather than use the memblock_alloc_base that returns a physical address
and then convert this address to the virtual one, use appropriate memblock
function that returns a virtual address.

There is a small functional change in the allocation of then NODE_DATA(). 
Instead of panicing if the local allocation failed, the non-local
allocation attempt will be made.

Link: http://lkml.kernel.org/r/1546248566-14910-4-git-send-email-rppt@xxxxxxxxxxxxx
Signed-off-by: Mike Rapoport <rppt@xxxxxxxxxxxxx>
Cc: Arnd Bergmann <arnd@xxxxxxxx>
Cc: Benjamin Herrenschmidt <benh@xxxxxxxxxxxxxxxxxxx>
Cc: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Cc: "David S. Miller" <davem@xxxxxxxxxxxxx>
Cc: Greentime Hu <green.hu@xxxxxxxxx>
Cc: Guan Xuetao <gxt@xxxxxxxxxx>
Cc: Heiko Carstens <heiko.carstens@xxxxxxxxxx>
Cc: Jonas Bonn <jonas@xxxxxxxxxxxx>
Cc: Mark Salter <msalter@xxxxxxxxxx>
Cc: Martin Schwidefsky <schwidefsky@xxxxxxxxxx>
Cc: Michael Ellerman <mpe@xxxxxxxxxxxxxx>
Cc: Michal Hocko <mhocko@xxxxxxxx>
Cc: Michal Simek <michal.simek@xxxxxxxxxx>
Cc: Michal Simek <monstr@xxxxxxxxx>
Cc: Paul Mackerras <paulus@xxxxxxxxx>
Cc: Rich Felker <dalias@xxxxxxxx>
Cc: Russell King <linux@xxxxxxxxxxxxxxx>
Cc: Stafford Horne <shorne@xxxxxxxxx>
Cc: Stefan Kristiansson <stefan.kristiansson@xxxxxxxxxxxxx>
Cc: Vincent Chen <deanbo422@xxxxxxxxx>
Cc: Yoshinori Sato <ysato@xxxxxxxxxxxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---


--- a/arch/sh/mm/init.c~sh-prefer-memblock-apis-returning-virtual-address
+++ a/arch/sh/mm/init.c
@@ -192,24 +192,16 @@ void __init page_table_range_init(unsign
 void __init allocate_pgdat(unsigned int nid)
 {
 	unsigned long start_pfn, end_pfn;
-#ifdef CONFIG_NEED_MULTIPLE_NODES
-	unsigned long phys;
-#endif
 
 	get_pfn_range_for_nid(nid, &start_pfn, &end_pfn);
 
 #ifdef CONFIG_NEED_MULTIPLE_NODES
-	phys = __memblock_alloc_base(sizeof(struct pglist_data),
-				SMP_CACHE_BYTES, end_pfn << PAGE_SHIFT);
-	/* Retry with all of system memory */
-	if (!phys)
-		phys = __memblock_alloc_base(sizeof(struct pglist_data),
-					SMP_CACHE_BYTES, memblock_end_of_DRAM());
-	if (!phys)
+	NODE_DATA(nid) = memblock_alloc_try_nid_nopanic(
+				sizeof(struct pglist_data),
+				SMP_CACHE_BYTES, MEMBLOCK_LOW_LIMIT,
+				MEMBLOCK_ALLOC_ACCESSIBLE, nid);
+	if (!NODE_DATA(nid))
 		panic("Can't allocate pgdat for node %d\n", nid);
-
-	NODE_DATA(nid) = __va(phys);
-	memset(NODE_DATA(nid), 0, sizeof(struct pglist_data));
 #endif
 
 	NODE_DATA(nid)->node_start_pfn = start_pfn;
--- a/arch/sh/mm/numa.c~sh-prefer-memblock-apis-returning-virtual-address
+++ a/arch/sh/mm/numa.c
@@ -41,9 +41,8 @@ void __init setup_bootmem_node(int nid,
 	__add_active_range(nid, start_pfn, end_pfn);
 
 	/* Node-local pgdat */
-	NODE_DATA(nid) = __va(memblock_alloc_base(sizeof(struct pglist_data),
-					     SMP_CACHE_BYTES, end));
-	memset(NODE_DATA(nid), 0, sizeof(struct pglist_data));
+	NODE_DATA(nid) = memblock_alloc_node(sizeof(struct pglist_data),
+					     SMP_CACHE_BYTES, nid);
 
 	NODE_DATA(nid)->node_start_pfn = start_pfn;
 	NODE_DATA(nid)->node_spanned_pages = end_pfn - start_pfn;
_

Patches currently in -mm which might be from rppt@xxxxxxxxxxxxx are

openrisc-prefer-memblock-apis-returning-virtual-address.patch
powerpc-use-memblock-functions-returning-virtual-address-fix.patch
memblock-replace-memblock_alloc_baseanywhere-with-memblock_phys_alloc.patch
memblock-drop-memblock_alloc_base_nid.patch
memblock-emphasize-that-memblock_alloc_range-returns-a-physical-address.patch
memblock-memblock_phys_alloc_try_nid-dont-panic.patch
memblock-memblock_phys_alloc-dont-panic.patch
memblock-drop-__memblock_alloc_base.patch
memblock-drop-memblock_alloc_base.patch
memblock-refactor-internal-allocation-functions.patch
memblock-refactor-internal-allocation-functions-fix.patch
memblock-make-memblock_find_in_range_node-and-choose_memblock_flags-static.patch
arch-use-memblock_alloc-instead-of-memblock_alloc_fromsize-align-0.patch
arch-dont-memset0-memory-returned-by-memblock_alloc.patch
ia64-add-checks-for-the-return-value-of-memblock_alloc.patch
sparc-add-checks-for-the-return-value-of-memblock_alloc.patch
mm-percpu-add-checks-for-the-return-value-of-memblock_alloc.patch
init-main-add-checks-for-the-return-value-of-memblock_alloc.patch
swiotlb-add-checks-for-the-return-value-of-memblock_alloc.patch
treewide-add-checks-for-the-return-value-of-memblock_alloc.patch
treewide-add-checks-for-the-return-value-of-memblock_alloc-fix-2.patch
treewide-add-checks-for-the-return-value-of-memblock_alloc-fix-3.patch
memblock-memblock_alloc_try_nid-dont-panic.patch
memblock-drop-memblock_alloc__nopanic-variants.patch
memblock-remove-memblock_setclear_region_flags.patch
memblock-split-checks-whether-a-region-should-be-skipped-to-a-helper-function.patch
memblock-update-comments-and-kernel-doc.patch
of-fix-kmemleak-crash-caused-by-imbalance-in-early-memory-reservation.patch
of-fix-kmemleak-crash-caused-by-imbalance-in-early-memory-reservation-fix.patch




[Index of Archives]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux