* [PATCH] x86: drop deprecated DISCONTIGMEM support for 32-bit
@ 2020-02-23 9:43 Mike Rapoport
2020-02-24 20:58 ` Dave Hansen
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Mike Rapoport @ 2020-02-23 9:43 UTC (permalink / raw)
To: linux-kernel
Cc: Andy Lutomirski, Borislav Petkov, Dave Hansen, H. Peter Anvin,
Ingo Molnar, Peter Zijlstra, Thomas Gleixner, x86, Mike Rapoport,
Mike Rapoport
From: Mike Rapoport <rppt@linux.ibm.com>
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>
---
arch/x86/Kconfig | 9 -------
arch/x86/include/asm/mmzone_32.h | 39 -------------------------------
arch/x86/include/asm/pgtable_32.h | 3 +--
arch/x86/mm/numa_32.c | 34 ---------------------------
4 files changed, 1 insertion(+), 84 deletions(-)
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index beea77046f9b..e3fc3aa80f97 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -1613,19 +1613,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
diff --git a/arch/x86/include/asm/mmzone_32.h b/arch/x86/include/asm/mmzone_32.h
index 73d8dd14dda2..2d4515e8b7df 100644
--- a/arch/x86/include/asm/mmzone_32.h
+++ b/arch/x86/include/asm/mmzone_32.h
@@ -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 */
diff --git a/arch/x86/include/asm/pgtable_32.h b/arch/x86/include/asm/pgtable_32.h
index 0dca7f7aeff2..be7b19646897 100644
--- a/arch/x86/include/asm/pgtable_32.h
+++ b/arch/x86/include/asm/pgtable_32.h
@@ -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)
diff --git a/arch/x86/mm/numa_32.c b/arch/x86/mm/numa_32.c
index f2bd3d61e16b..104544359d69 100644
--- a/arch/x86/mm/numa_32.c
+++ b/arch/x86/mm/numa_32.c
@@ -27,40 +27,6 @@
#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)
--
2.24.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] x86: drop deprecated DISCONTIGMEM support for 32-bit
2020-02-23 9:43 [PATCH] x86: drop deprecated DISCONTIGMEM support for 32-bit Mike Rapoport
@ 2020-02-24 20:58 ` Dave Hansen
2020-05-28 5:05 ` Mike Rapoport
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Dave Hansen @ 2020-02-24 20:58 UTC (permalink / raw)
To: Mike Rapoport, linux-kernel
Cc: Andy Lutomirski, Borislav Petkov, H. Peter Anvin, Ingo Molnar,
Peter Zijlstra, Thomas Gleixner, x86, Mike Rapoport
On 2/23/20 1:43 AM, Mike Rapoport wrote:
> 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.
No complaints from me. By my grepping, this leaves zero "DISCONTIGMEM"s
in arch/x86/.
Acked-by: Dave Hansen <dave.hansen@intel.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] x86: drop deprecated DISCONTIGMEM support for 32-bit
2020-02-23 9:43 [PATCH] x86: drop deprecated DISCONTIGMEM support for 32-bit Mike Rapoport
2020-02-24 20:58 ` Dave Hansen
@ 2020-05-28 5:05 ` Mike Rapoport
2020-05-28 14:12 ` Dave Hansen
2020-05-28 19:28 ` [tip: x86/cleanups] x86/mm: Drop " tip-bot2 for Mike Rapoport
3 siblings, 0 replies; 5+ messages in thread
From: Mike Rapoport @ 2020-05-28 5:05 UTC (permalink / raw)
To: x86
Cc: Andy Lutomirski, Borislav Petkov, Dave Hansen, H. Peter Anvin,
Ingo Molnar, Peter Zijlstra, Thomas Gleixner, x86, Mike Rapoport,
linux-kernel
Gentle ping...
On Sun, Feb 23, 2020 at 11:43:22AM +0200, Mike Rapoport wrote:
> From: Mike Rapoport <rppt@linux.ibm.com>
>
> 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>
> ---
> arch/x86/Kconfig | 9 -------
> arch/x86/include/asm/mmzone_32.h | 39 -------------------------------
> arch/x86/include/asm/pgtable_32.h | 3 +--
> arch/x86/mm/numa_32.c | 34 ---------------------------
> 4 files changed, 1 insertion(+), 84 deletions(-)
>
> diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
> index beea77046f9b..e3fc3aa80f97 100644
> --- a/arch/x86/Kconfig
> +++ b/arch/x86/Kconfig
> @@ -1613,19 +1613,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
> diff --git a/arch/x86/include/asm/mmzone_32.h b/arch/x86/include/asm/mmzone_32.h
> index 73d8dd14dda2..2d4515e8b7df 100644
> --- a/arch/x86/include/asm/mmzone_32.h
> +++ b/arch/x86/include/asm/mmzone_32.h
> @@ -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 */
> diff --git a/arch/x86/include/asm/pgtable_32.h b/arch/x86/include/asm/pgtable_32.h
> index 0dca7f7aeff2..be7b19646897 100644
> --- a/arch/x86/include/asm/pgtable_32.h
> +++ b/arch/x86/include/asm/pgtable_32.h
> @@ -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)
> diff --git a/arch/x86/mm/numa_32.c b/arch/x86/mm/numa_32.c
> index f2bd3d61e16b..104544359d69 100644
> --- a/arch/x86/mm/numa_32.c
> +++ b/arch/x86/mm/numa_32.c
> @@ -27,40 +27,6 @@
>
> #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)
> --
> 2.24.0
>
--
Sincerely yours,
Mike.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] x86: drop deprecated DISCONTIGMEM support for 32-bit
2020-02-23 9:43 [PATCH] x86: drop deprecated DISCONTIGMEM support for 32-bit Mike Rapoport
2020-02-24 20:58 ` Dave Hansen
2020-05-28 5:05 ` Mike Rapoport
@ 2020-05-28 14:12 ` Dave Hansen
2020-05-28 19:28 ` [tip: x86/cleanups] x86/mm: Drop " tip-bot2 for Mike Rapoport
3 siblings, 0 replies; 5+ messages in thread
From: Dave Hansen @ 2020-05-28 14:12 UTC (permalink / raw)
To: Mike Rapoport, linux-kernel
Cc: Andy Lutomirski, Borislav Petkov, Dave Hansen, H. Peter Anvin,
Ingo Molnar, Peter Zijlstra, Thomas Gleixner, x86, Mike Rapoport
On 2/23/20 1:43 AM, Mike Rapoport wrote:
> From: Mike Rapoport <rppt@linux.ibm.com>
>
> 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>
Looks good. I'm fairly sure most of the the Sequent NUMA-Qs and IBM
x440s are relegated to museums at this point. Folks at IBM worked
really hard to get this in, back in the day, if I remember correctly.
Acked-by: Dave Hansen <dave.hansen@linux.intel.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
* [tip: x86/cleanups] x86/mm: Drop deprecated DISCONTIGMEM support for 32-bit
2020-02-23 9:43 [PATCH] x86: drop deprecated DISCONTIGMEM support for 32-bit Mike Rapoport
` (2 preceding siblings ...)
2020-05-28 14:12 ` Dave Hansen
@ 2020-05-28 19:28 ` tip-bot2 for Mike Rapoport
3 siblings, 0 replies; 5+ messages in thread
From: tip-bot2 for Mike Rapoport @ 2020-05-28 19:28 UTC (permalink / raw)
To: linux-tip-commits; +Cc: Mike Rapoport, Borislav Petkov, Dave Hansen, x86, LKML
The following commit has been merged into the x86/cleanups branch of tip:
Commit-ID: 431732651cc16caebcd334b7b7476bfe0c4a2903
Gitweb: https://git.kernel.org/tip/431732651cc16caebcd334b7b7476bfe0c4a2903
Author: Mike Rapoport <rppt@linux.ibm.com>
AuthorDate: Sun, 23 Feb 2020 11:43:22 +02:00
Committer: Borislav Petkov <bp@suse.de>
CommitterDate: Thu, 28 May 2020 18:34:30 +02:00
x86/mm: Drop deprecated DISCONTIGMEM support for 32-bit
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 | 9 +-------
arch/x86/include/asm/mmzone_32.h | 39 +------------------------------
arch/x86/include/asm/pgtable_32.h | 3 +--
arch/x86/mm/numa_32.c | 34 +--------------------------
4 files changed, 1 insertion(+), 84 deletions(-)
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index 1d6104e..f0aa194 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -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
diff --git a/arch/x86/include/asm/mmzone_32.h b/arch/x86/include/asm/mmzone_32.h
index 73d8dd1..2d4515e 100644
--- a/arch/x86/include/asm/mmzone_32.h
+++ b/arch/x86/include/asm/mmzone_32.h
@@ -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 */
diff --git a/arch/x86/include/asm/pgtable_32.h b/arch/x86/include/asm/pgtable_32.h
index 0dca7f7..be7b196 100644
--- a/arch/x86/include/asm/pgtable_32.h
+++ b/arch/x86/include/asm/pgtable_32.h
@@ -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)
diff --git a/arch/x86/mm/numa_32.c b/arch/x86/mm/numa_32.c
index f2bd3d6..1045443 100644
--- a/arch/x86/mm/numa_32.c
+++ b/arch/x86/mm/numa_32.c
@@ -27,40 +27,6 @@
#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)
^ permalink raw reply related [flat|nested] 5+ messages in thread
end of thread, other threads:[~2020-05-28 19:28 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-02-23 9:43 [PATCH] x86: drop deprecated DISCONTIGMEM support for 32-bit Mike Rapoport
2020-02-24 20:58 ` Dave Hansen
2020-05-28 5:05 ` Mike Rapoport
2020-05-28 14:12 ` Dave Hansen
2020-05-28 19:28 ` [tip: x86/cleanups] x86/mm: Drop " tip-bot2 for Mike Rapoport
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.