Skip to contentSkip to conversation

arm64: mm: Fix build error with CONFIG_SPARSEMEM_VMEMMAP disabled

PATCH New Jungseung Lee 2 participants 2 messages May 4, 2015 arm64

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 arm64: mm: Fix build error with CONFIG_SPARSEMEM_VMEMMAP disabled

This fix the below build error:

arch/arm64/mm/dump.c: In function ?ptdump_init?:
arch/arm64/mm/dump.c:331:18: error: ?VMEMMAP_START_NR? undeclared (first use in this function)
address_markers[VMEMMAP_START_NR].start_address =

                  ^

arch/arm64/mm/dump.c:331:18: note: each undeclared identifier is reported only once for each function it appears in
arch/arm64/mm/dump.c:333:18: error: ?VMEMMAP_END_NR? undeclared (first use in this function)
address_markers[VMEMMAP_END_NR].start_address =

                  ^
---
 arch/arm64/mm/dump.c | 2 ++
 1 file changed, 2 insertions(+)
arch/arm64/mm/dump.c +2 -0
index 74c2567..f3d6221 100644
@@ -328,10 +328,12 @@ static int ptdump_init(void)
 			for (j = 0; j < pg_level[i].num; j++)
 				pg_level[i].mask |= pg_level[i].bits[j].mask;
 
+#ifdef CONFIG_SPARSEMEM_VMEMMAP
 	address_markers[VMEMMAP_START_NR].start_address =
 				(unsigned long)virt_to_page(PAGE_OFFSET);
 	address_markers[VMEMMAP_END_NR].start_address =
 				(unsigned long)virt_to_page(high_memory);
+#endif
 
 	pe = debugfs_create_file("kernel_page_tables", 0400, NULL, NULL,
 				 &ptdump_fops);
Signature · 1 line
1.9.1
#1 lore raw

PATCH 1/1 arm64: mm: Fix build error with CONFIG_SPARSEMEM_VMEMMAP disabled

Quoted 25 lines · Jungseung Lee

This fix the below build error:

arch/arm64/mm/dump.c: In function ?ptdump_init?:
arch/arm64/mm/dump.c:331:18: error: ?VMEMMAP_START_NR? undeclared (first use in this function)
address_markers[VMEMMAP_START_NR].start_address =

                   ^

arch/arm64/mm/dump.c:331:18: note: each undeclared identifier is reported only once for each function it appears in
arch/arm64/mm/dump.c:333:18: error: ?VMEMMAP_END_NR? undeclared (first use in this function)
address_markers[VMEMMAP_END_NR].start_address =

                   ^
---
  arch/arm64/mm/dump.c | 2 ++
  1 file changed, 2 insertions(+)
arch/arm64/mm/dump.c +0 -0
index 74c2567..f3d6221 100644
@@ -328,10 +328,12 @@ static int ptdump_init(void)
  			for (j = 0; j < pg_level[i].num; j++)
  				pg_level[i].mask |= pg_level[i].bits[j].mask;

arch/arm64/mm/dump.c static int ptdump_init(void) · line 339

Quoted 10 lines
arch/arm64/mm/dump.c +2 -0
 
+#ifdef CONFIG_SPARSEMEM_VMEMMAP
  	address_markers[VMEMMAP_START_NR].start_address =
  				(unsigned long)virt_to_page(PAGE_OFFSET);
  	address_markers[VMEMMAP_END_NR].start_address =
  				(unsigned long)virt_to_page(high_memory);
+#endif
 
  	pe = debugfs_create_file("kernel_page_tables", 0400, NULL, NULL,
  				 &ptdump_fops);

Did something change recently to make SPARSEMEM_VMEMMAP actually deselectable? For some reason I thought that couldn't be turned off.