Skip to contentSkip to conversation

m68k/nommu: fix build when CPU is not coldfire

PATCH In review Thadeu Lima de Souza Cascardo 2 participants 3 messages Feb 17, 2013 – Feb 21, 2013 m68k architecture

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 m68k/nommu: fix build when CPU is not coldfire

Commit dd1cb3a7c43508c29e17836628090c0735bd3137 unified mm/init.c for both MMU and non-MMU m68k platforms. However, it broke when we build a non-MMU M68K Classic CPU kernel.

This fix builds a section that came from the MMU version only when we are building a MMU kernel.

---
 arch/m68k/mm/init.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/m68k/mm/init.c +1 -1
index afd8106f..519aad8 100644
@@ -188,7 +188,7 @@ void __init mem_init(void)
 		}
 	}
 
-#if !defined(CONFIG_SUN3) && !defined(CONFIG_COLDFIRE)
+#if defined(CONFIG_MMU) && !defined(CONFIG_SUN3) && !defined(CONFIG_COLDFIRE)
 	/* insert pointer tables allocated so far into the tablelist */
 	init_pointer_table((unsigned long)kernel_pg_dir);
 	for (i = 0; i < PTRS_PER_PGD; i++) {
Signature · 1 line
1.7.10.4
#1 lore raw

Hi Thadeu,

Quoted 1 line · Thadeu Lima de Souza Cascardo

Commit dd1cb3a7c43508c29e17836628090c0735bd3137 unified mm/init.c for both MMU

         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Its good practice to include the text title of the patch along with the commit id.

Quoted 5 lines

and non-MMU m68k platforms. However, it broke when we build a non-MMU M68K Classic CPU kernel.

This fix builds a section that came from the MMU version only when we are building a MMU kernel.

Looks good thanks. I will push this into the m68knommu git tree.

Regards
Greg

Quoted 19 lines
---
  arch/m68k/mm/init.c |    2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
arch/m68k/mm/init.c +1 -1
index afd8106f..519aad8 100644
@@ -188,7 +188,7 @@ void __init mem_init(void)
  		}
  	}
 
-#if !defined(CONFIG_SUN3) && !defined(CONFIG_COLDFIRE)
+#if defined(CONFIG_MMU) && !defined(CONFIG_SUN3) && !defined(CONFIG_COLDFIRE)
  	/* insert pointer tables allocated so far into the tablelist */
  	init_pointer_table((unsigned long)kernel_pg_dir);
  	for (i = 0; i < PTRS_PER_PGD; i++) {
#2 lore raw
In reply to Thadeu Lima de Souza Cascardo

Hi Thadeu,

Quoted 1 line · Thadeu Lima de Souza Cascardo

Commit dd1cb3a7c43508c29e17836628090c0735bd3137 unified mm/init.c for both MMU

         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Its good practice to include the text title of the patch along with the commit id.

Quoted 5 lines

and non-MMU m68k platforms. However, it broke when we build a non-MMU M68K Classic CPU kernel.

This fix builds a section that came from the MMU version only when we are building a MMU kernel.

Looks good thanks. I will push this into the m68knommu git tree.

Regards
Greg

Quoted 19 lines
---
  arch/m68k/mm/init.c |    2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
arch/m68k/mm/init.c +1 -1
index afd8106f..519aad8 100644
@@ -188,7 +188,7 @@ void __init mem_init(void)
  		}
  	}
 
-#if !defined(CONFIG_SUN3) && !defined(CONFIG_COLDFIRE)
+#if defined(CONFIG_MMU) && !defined(CONFIG_SUN3) && !defined(CONFIG_COLDFIRE)
  	/* insert pointer tables allocated so far into the tablelist */
  	init_pointer_table((unsigned long)kernel_pg_dir);
  	for (i = 0; i < PTRS_PER_PGD; i++) {