]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
x86/mm: Drop deprecated DISCONTIGMEM support for 32-bit
authorMike Rapoport <rppt@linux.ibm.com>
Sun, 23 Feb 2020 09:43:22 +0000 (11:43 +0200)
committerBorislav Petkov <bp@suse.de>
Thu, 28 May 2020 16:34:30 +0000 (18:34 +0200)
The DISCONTIGMEM support was marked as deprecated in v5.2 and since there
were no complaints about it for almost 5 releases it can be completely
removed.

Signed-off-by: Mike Rapoport <rppt@linux.ibm.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Acked-by: Dave Hansen <dave.hansen@linux.intel.com>
Link: https://lkml.kernel.org/r/20200223094322.15206-1-rppt@kernel.org
arch/x86/Kconfig
arch/x86/include/asm/mmzone_32.h
arch/x86/include/asm/pgtable_32.h
arch/x86/mm/numa_32.c

index 1d6104ea8af0309d437766a72657989f88b2d4d9..f0aa19469d4bc1fb2301d64526ada4ef2b93b802 100644 (file)
@@ -1610,19 +1610,10 @@ config NODES_SHIFT
          Specify the maximum number of NUMA Nodes available on the target
          system.  Increases memory reserved to accommodate various tables.
 
-config ARCH_HAVE_MEMORY_PRESENT
-       def_bool y
-       depends on X86_32 && DISCONTIGMEM
-
 config ARCH_FLATMEM_ENABLE
        def_bool y
        depends on X86_32 && !NUMA
 
-config ARCH_DISCONTIGMEM_ENABLE
-       def_bool n
-       depends on NUMA && X86_32
-       depends on BROKEN
-
 config ARCH_SPARSEMEM_ENABLE
        def_bool y
        depends on X86_64 || NUMA || X86_32 || X86_32_NON_STANDARD
index 73d8dd14dda268ee2ae9a4ab6f56f493e7cf4c04..2d4515e8b7df88a9d396b27fd6bcaf9187e489d4 100644 (file)
@@ -14,43 +14,4 @@ extern struct pglist_data *node_data[];
 #define NODE_DATA(nid) (node_data[nid])
 #endif /* CONFIG_NUMA */
 
-#ifdef CONFIG_DISCONTIGMEM
-
-/*
- * generic node memory support, the following assumptions apply:
- *
- * 1) memory comes in 64Mb contiguous chunks which are either present or not
- * 2) we will not have more than 64Gb in total
- *
- * for now assume that 64Gb is max amount of RAM for whole system
- *    64Gb / 4096bytes/page = 16777216 pages
- */
-#define MAX_NR_PAGES 16777216
-#define MAX_SECTIONS 1024
-#define PAGES_PER_SECTION (MAX_NR_PAGES/MAX_SECTIONS)
-
-extern s8 physnode_map[];
-
-static inline int pfn_to_nid(unsigned long pfn)
-{
-#ifdef CONFIG_NUMA
-       return((int) physnode_map[(pfn) / PAGES_PER_SECTION]);
-#else
-       return 0;
-#endif
-}
-
-static inline int pfn_valid(int pfn)
-{
-       int nid = pfn_to_nid(pfn);
-
-       if (nid >= 0)
-               return (pfn < node_end_pfn(nid));
-       return 0;
-}
-
-#define early_pfn_valid(pfn)   pfn_valid((pfn))
-
-#endif /* CONFIG_DISCONTIGMEM */
-
 #endif /* _ASM_X86_MMZONE_32_H */
index 0dca7f7aeff2baa141cba616446227909b60d76f..be7b196468971375e85da5f9fac723ad5a83473b 100644 (file)
@@ -66,8 +66,7 @@ do {                                          \
 #endif /* !__ASSEMBLY__ */
 
 /*
- * kern_addr_valid() is (1) for FLATMEM and (0) for
- * SPARSEMEM and DISCONTIGMEM
+ * kern_addr_valid() is (1) for FLATMEM and (0) for SPARSEMEM
  */
 #ifdef CONFIG_FLATMEM
 #define kern_addr_valid(addr)  (1)
index f2bd3d61e16bb2157ea227d9533fc4845cf1c79e..104544359d69cd20ef1e37449d32a687ee1f3433 100644 (file)
 
 #include "numa_internal.h"
 
-#ifdef CONFIG_DISCONTIGMEM
-/*
- * 4) physnode_map     - the mapping between a pfn and owning node
- * physnode_map keeps track of the physical memory layout of a generic
- * numa node on a 64Mb break (each element of the array will
- * represent 64Mb of memory and will be marked by the node id.  so,
- * if the first gig is on node 0, and the second gig is on node 1
- * physnode_map will contain:
- *
- *     physnode_map[0-15] = 0;
- *     physnode_map[16-31] = 1;
- *     physnode_map[32- ] = -1;
- */
-s8 physnode_map[MAX_SECTIONS] __read_mostly = { [0 ... (MAX_SECTIONS - 1)] = -1};
-EXPORT_SYMBOL(physnode_map);
-
-void memory_present(int nid, unsigned long start, unsigned long end)
-{
-       unsigned long pfn;
-
-       printk(KERN_INFO "Node: %d, start_pfn: %lx, end_pfn: %lx\n",
-                       nid, start, end);
-       printk(KERN_DEBUG "  Setting physnode_map array to node %d for pfns:\n", nid);
-       printk(KERN_DEBUG "  ");
-       start = round_down(start, PAGES_PER_SECTION);
-       end = round_up(end, PAGES_PER_SECTION);
-       for (pfn = start; pfn < end; pfn += PAGES_PER_SECTION) {
-               physnode_map[pfn / PAGES_PER_SECTION] = nid;
-               printk(KERN_CONT "%lx ", pfn);
-       }
-       printk(KERN_CONT "\n");
-}
-#endif
-
 extern unsigned long highend_pfn, highstart_pfn;
 
 void __init initmem_init(void)