Skip to contentSkip to conversation

m68k: use of 64 div instruction is chip specific

PATCH In review [email protected] 2 participants 2 messages Oct 21, 2011 m68k architecture

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 m68k: use of 64 div instruction is chip specific

From: Greg Ungerer <[email protected]>

The use of the 64 div instruction should not be based on whether we are running MMU enabled or not. It is chip specific. The original 68000 family and the ColdFire CPU family do not support it, the other 680x0 CPU varients do. So make the conditional check based on that, not CONFIG_MMU.

---
 arch/m68k/include/asm/div64.h |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
arch/m68k/include/asm/div64.h +4 -4
index edb6614..7265e40 100644
@@ -1,7 +1,9 @@
 #ifndef _M68K_DIV64_H
 #define _M68K_DIV64_H
 
-#ifdef CONFIG_MMU
+#if defined(CONFIG_M68000) || defined(CONFIG_COLDFIRE)
+#include <asm-generic/div64.h>
+#else
 
 #include <linux/types.h>
 
@@ -27,8 +29,6 @@
 	__rem;							\
 })
 
-#else
-#include <asm-generic/div64.h>
-#endif /* CONFIG_MMU */
+#endif /* CONFIG_M68000 || CONFIG_COLDFIRE */
 
 #endif /* _M68K_DIV64_H */
Signature · 1 line
1.7.0.4
maintainer Acked-by on v1 1/1
#1 lore raw
Quoted 9 lines · On Fri, Oct 21, 2011 at 09:08, <[email protected]> wrote:

From: Greg Ungerer <[email protected]>

The use of the 64 div instruction should not be based on whether we are running MMU enabled or not. It is chip specific. The original 68000 family and the ColdFire CPU family do not support it, the other 680x0 CPU varients do. So make the conditional check based on that, not CONFIG_MMU.

Quoted 20 lines

---
 arch/m68k/include/asm/div64.h |    8 ++++----

 1 files changed, 4 insertions(+), 4 deletions(-)
arch/m68k/include/asm/div64.h +3 -1
index edb6614..7265e40 100644
@@ -1,7 +1,9 @@
  #ifndef _M68K_DIV64_H
  #define _M68K_DIV64_H
 
-#ifdef CONFIG_MMU
+#if defined(CONFIG_M68000) || defined(CONFIG_COLDFIRE)
+#include <asm-generic/div64.h>
+#else
 
  #include <linux/types.h>
 

arch/m68k/include/asm/div64.h line 34

Quoted 9 lines
arch/m68k/include/asm/div64.h +1 -3
@@ -27,8 +29,6 @@
        __rem;                                                  \
  })
 
-#else
-#include <asm-generic/div64.h>
-#endif /* CONFIG_MMU */
+#endif /* CONFIG_M68000 || CONFIG_COLDFIRE */
 
  #endif /* _M68K_DIV64_H */

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds