Skip to content

Commit d3c251a

Browse files
rppttorvalds
authored andcommitted
arch, mm: remove stale mentions of DISCONIGMEM
There are several places that mention DISCONIGMEM in comments or have stale code guarded by CONFIG_DISCONTIGMEM. Remove the dead code and update the comments. Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Mike Rapoport <[email protected]> Acked-by: Arnd Bergmann <[email protected]> Reviewed-by: David Hildenbrand <[email protected]> Cc: Geert Uytterhoeven <[email protected]> Cc: Ivan Kokshaysky <[email protected]> Cc: Jonathan Corbet <[email protected]> Cc: Matt Turner <[email protected]> Cc: Richard Henderson <[email protected]> Cc: Vineet Gupta <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
1 parent bb1c50d commit d3c251a

File tree

7 files changed

+6
-27
lines changed

7 files changed

+6
-27
lines changed

arch/ia64/kernel/topology.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,8 @@
33
* License. See the file "COPYING" in the main directory of this archive
44
* for more details.
55
*
6-
* This file contains NUMA specific variables and functions which can
7-
* be split away from DISCONTIGMEM and are used on NUMA machines with
8-
* contiguous memory.
6+
* This file contains NUMA specific variables and functions which are used on
7+
* NUMA machines with contiguous memory.
98
* 2002/08/07 Erich Focht <[email protected]>
109
* Populate cpu entries in sysfs for non-numa systems as well
1110
* Intel Corporation - Ashok Raj

arch/ia64/mm/numa.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,8 @@
33
* License. See the file "COPYING" in the main directory of this archive
44
* for more details.
55
*
6-
* This file contains NUMA specific variables and functions which can
7-
* be split away from DISCONTIGMEM and are used on NUMA machines with
8-
* contiguous memory.
6+
* This file contains NUMA specific variables and functions which are used on
7+
* NUMA machines with contiguous memory.
98
*
109
* 2002/08/07 Erich Focht <[email protected]>
1110
*/

arch/mips/include/asm/mmzone.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,4 @@
2020
#define nid_to_addrbase(nid) 0
2121
#endif
2222

23-
#ifdef CONFIG_DISCONTIGMEM
24-
25-
#define pfn_to_nid(pfn) pa_to_nid((pfn) << PAGE_SHIFT)
26-
27-
#endif /* CONFIG_DISCONTIGMEM */
28-
2923
#endif /* _ASM_MMZONE_H_ */

arch/mips/mm/init.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -454,9 +454,6 @@ void __init mem_init(void)
454454
BUILD_BUG_ON(IS_ENABLED(CONFIG_32BIT) && (_PFN_SHIFT > PAGE_SHIFT));
455455

456456
#ifdef CONFIG_HIGHMEM
457-
#ifdef CONFIG_DISCONTIGMEM
458-
#error "CONFIG_HIGHMEM and CONFIG_DISCONTIGMEM dont work together yet"
459-
#endif
460457
max_mapnr = highend_pfn ? highend_pfn : max_low_pfn;
461458
#else
462459
max_mapnr = max_low_pfn;

arch/nds32/include/asm/memory.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -76,18 +76,12 @@
7676
* virt_to_page(k) convert a _valid_ virtual address to struct page *
7777
* virt_addr_valid(k) indicates whether a virtual address is valid
7878
*/
79-
#ifndef CONFIG_DISCONTIGMEM
80-
8179
#define ARCH_PFN_OFFSET PHYS_PFN_OFFSET
8280
#define pfn_valid(pfn) ((pfn) >= PHYS_PFN_OFFSET && (pfn) < (PHYS_PFN_OFFSET + max_mapnr))
8381

8482
#define virt_to_page(kaddr) (pfn_to_page(__pa(kaddr) >> PAGE_SHIFT))
8583
#define virt_addr_valid(kaddr) ((unsigned long)(kaddr) >= PAGE_OFFSET && (unsigned long)(kaddr) < (unsigned long)high_memory)
8684

87-
#else /* CONFIG_DISCONTIGMEM */
88-
#error CONFIG_DISCONTIGMEM is not supported yet.
89-
#endif /* !CONFIG_DISCONTIGMEM */
90-
9185
#define page_to_phys(page) (page_to_pfn(page) << PAGE_SHIFT)
9286

9387
#endif

arch/xtensa/include/asm/page.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -192,10 +192,6 @@ static inline unsigned long ___pa(unsigned long va)
192192
#define pfn_valid(pfn) \
193193
((pfn) >= ARCH_PFN_OFFSET && ((pfn) - ARCH_PFN_OFFSET) < max_mapnr)
194194

195-
#ifdef CONFIG_DISCONTIGMEM
196-
# error CONFIG_DISCONTIGMEM not supported
197-
#endif
198-
199195
#define virt_to_page(kaddr) pfn_to_page(__pa(kaddr) >> PAGE_SHIFT)
200196
#define page_to_virt(page) __va(page_to_pfn(page) << PAGE_SHIFT)
201197
#define virt_addr_valid(kaddr) pfn_valid(__pa(kaddr) >> PAGE_SHIFT)

include/linux/gfp.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -494,8 +494,8 @@ static inline int gfp_zonelist(gfp_t flags)
494494
* There are two zonelists per node, one for all zones with memory and
495495
* one containing just zones from the node the zonelist belongs to.
496496
*
497-
* For the normal case of non-DISCONTIGMEM systems the NODE_DATA() gets
498-
* optimized to &contig_page_data at compile-time.
497+
* For the case of non-NUMA systems the NODE_DATA() gets optimized to
498+
* &contig_page_data at compile-time.
499499
*/
500500
static inline struct zonelist *node_zonelist(int nid, gfp_t flags)
501501
{

0 commit comments

Comments
 (0)