Skip to content

Commit 6b2ad8d

Browse files
rppttorvalds
authored andcommitted
m68k/mm: make node data and node setup depend on CONFIG_DISCONTIGMEM
The pg_data_t node structures and their initialization currently depends on !CONFIG_SINGLE_MEMORY_CHUNK. Since they are required only for DISCONTIGMEM make this dependency explicit and replace usage of CONFIG_SINGLE_MEMORY_CHUNK with CONFIG_DISCONTIGMEM where appropriate. The CONFIG_SINGLE_MEMORY_CHUNK was implicitly disabled on the ColdFire MMU variant, although it always presumed a single memory bank. As there is no actual need for DISCONTIGMEM in this case, make sure that ColdFire MMU systems set CONFIG_SINGLE_MEMORY_CHUNK to 'y'. Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Mike Rapoport <[email protected]> Cc: Alexey Dobriyan <[email protected]> Cc: Catalin Marinas <[email protected]> Cc: Geert Uytterhoeven <[email protected]> Cc: Greg Ungerer <[email protected]> Cc: John Paul Adrian Glaubitz <[email protected]> Cc: Jonathan Corbet <[email protected]> Cc: Matt Turner <[email protected]> Cc: Meelis Roos <[email protected]> Cc: Michael Schmitz <[email protected]> Cc: Russell King <[email protected]> Cc: Tony Luck <[email protected]> Cc: Vineet Gupta <[email protected]> Cc: Will Deacon <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
1 parent 050b2da commit 6b2ad8d

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

arch/m68k/Kconfig.cpu

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,7 @@ config RMW_INSNS
373373
config SINGLE_MEMORY_CHUNK
374374
bool "Use one physical chunk of memory only" if ADVANCED && !SUN3
375375
depends on MMU
376-
default y if SUN3
376+
default y if SUN3 || MMU_COLDFIRE
377377
select NEED_MULTIPLE_NODES
378378
help
379379
Ignore all but the first contiguous chunk of physical memory for VM
@@ -406,7 +406,7 @@ config M68K_L2_CACHE
406406
config NODES_SHIFT
407407
int
408408
default "3"
409-
depends on !SINGLE_MEMORY_CHUNK
409+
depends on DISCONTIGMEM
410410

411411
config CPU_HAS_NO_BITFIELDS
412412
bool

arch/m68k/include/asm/page_mm.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ static inline void *__va(unsigned long x)
126126

127127
extern int m68k_virt_to_node_shift;
128128

129-
#ifdef CONFIG_SINGLE_MEMORY_CHUNK
129+
#ifndef CONFIG_DISCONTIGMEM
130130
#define __virt_to_node(addr) (&pg_data_map[0])
131131
#else
132132
extern struct pglist_data *pg_data_table[];

arch/m68k/include/asm/virtconvert.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ static inline void *phys_to_virt(unsigned long address)
2929
}
3030

3131
/* Permanent address of a page. */
32-
#if defined(CONFIG_MMU) && defined(CONFIG_SINGLE_MEMORY_CHUNK)
32+
#if defined(CONFIG_MMU) && !defined(CONFIG_DISCONTIGMEM)
3333
#define page_to_phys(page) \
3434
__pa(PAGE_OFFSET + (((page) - pg_data_map[0].node_mem_map) << PAGE_SHIFT))
3535
#else

arch/m68k/mm/init.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,14 +47,14 @@ EXPORT_SYMBOL(pg_data_map);
4747

4848
int m68k_virt_to_node_shift;
4949

50-
#ifndef CONFIG_SINGLE_MEMORY_CHUNK
50+
#ifdef CONFIG_DISCONTIGMEM
5151
pg_data_t *pg_data_table[65];
5252
EXPORT_SYMBOL(pg_data_table);
5353
#endif
5454

5555
void __init m68k_setup_node(int node)
5656
{
57-
#ifndef CONFIG_SINGLE_MEMORY_CHUNK
57+
#ifdef CONFIG_DISCONTIGMEM
5858
struct m68k_mem_info *info = m68k_memory + node;
5959
int i, end;
6060

0 commit comments

Comments
 (0)