Skip to contentSkip to conversation

m68k: Remove duplicate FPU config option

PATCH In review Geert Uytterhoeven 2 participants 11 messages Jun 7, 2012 – Jun 8, 2012 m68k architecture

lore
Share & tools
lore

Geert Uytterhoeven

author maintainer
#0 lore raw

PATCH 1/5 m68k: Remove duplicate FPU config option

It's also defined in arch/m68k/Kconfig.cpu

---
 arch/m68k/Kconfig |    3 ---
 1 files changed, 0 insertions(+), 3 deletions(-)
arch/m68k/Kconfig +0 -3
index 1471201..bc8cc50 100644
@@ -62,9 +62,6 @@ config CPU_HAS_NO_MULDIV64
 config CPU_HAS_ADDRESS_SPACES
 	bool
 
-config FPU
-	bool
-
 config HZ
 	int
 	default 1000 if CLEOPATRA
Signature · 1 line
1.7.0.4
author maintainer
#1 lore raw

PATCH 2/5 m68k: Move CPU_HAS_* config options

They belong together with the CPU selection

---
 arch/m68k/Kconfig     |    9 ---------
 arch/m68k/Kconfig.cpu |    9 +++++++++
 2 files changed, 9 insertions(+), 9 deletions(-)
arch/m68k/Kconfig +0 -9
index bc8cc50..87b504c 100644
@@ -53,15 +53,6 @@ config ZONE_DMA
 	bool
 	default y
 
-config CPU_HAS_NO_BITFIELDS
-	bool
-
-config CPU_HAS_NO_MULDIV64
-	bool
-
-config CPU_HAS_ADDRESS_SPACES
-	bool
-
 config HZ
 	int
 	default 1000 if CLEOPATRA
arch/m68k/Kconfig.cpu +9 -0
index 2b53254..6cd8c1a 100644
@@ -360,6 +360,15 @@ config NODES_SHIFT
 	default "3"
 	depends on !SINGLE_MEMORY_CHUNK
 
+config CPU_HAS_NO_BITFIELDS
+	bool
+
+config CPU_HAS_NO_MULDIV64
+	bool
+
+config CPU_HAS_ADDRESS_SPACES
+	bool
+
 config FPU
 	bool
 
Signature · 1 line
1.7.0.4
author maintainer
#3 lore raw

PATCH 3/5 m68k: delay, muldi3 - Use CONFIG_CPU_HAS_NO_MULDIV64

In reply to Geert Uytterhoeven

instead of open coding CONFIG_M68000 || CONFIG_COLDFIRE

---
 arch/m68k/include/asm/delay.h |    2 +-
 arch/m68k/lib/muldi3.c        |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
arch/m68k/include/asm/delay.h +1 -1
index 9c09bec..12d8fe4 100644
@@ -43,7 +43,7 @@ static inline void __delay(unsigned long loops)
 extern void __bad_udelay(void);
 
 
-#if defined(CONFIG_M68000) || defined(CONFIG_COLDFIRE)
+#ifdef CONFIG_CPU_HAS_NO_MULDIV64
 /*
  * The simpler m68k and ColdFire processors do not have a 32*32->64
  * multiply instruction. So we need to handle them a little differently.
arch/m68k/lib/muldi3.c +1 -1
index 79e928a..ee5f0b1 100644
@@ -19,7 +19,7 @@ along with GNU CC; see the file COPYING.  If not, write to
 the Free Software Foundation, 59 Temple Place - Suite 330,
 Boston, MA 02111-1307, USA.  */
 
-#if defined(CONFIG_M68000) || defined(CONFIG_COLDFIRE)
+#ifdef CONFIG_CPU_HAS_NO_MULDIV64
 
 #define SI_TYPE_SIZE 32
 #define __BITS4 (SI_TYPE_SIZE / 4)
Signature · 1 line
1.7.0.4
author maintainer
#6 lore raw

PATCH 4/5 m68k: Introduce config option CPU_HAS_NO_UNALIGNED

In reply to Geert Uytterhoeven

Use CONFIG_CPU_HAS_NO_UNALIGNED instead of open coding CONFIG_M68000 || CONFIG_COLDFIRE

---
 arch/m68k/Kconfig.cpu             |    5 +++++
 arch/m68k/include/asm/unaligned.h |    4 ++--
 2 files changed, 7 insertions(+), 2 deletions(-)
arch/m68k/Kconfig.cpu +5 -0
index 6cd8c1a..c4ed650 100644
@@ -27,6 +27,7 @@ config COLDFIRE
 	select ARCH_HAVE_CUSTOM_GPIO_H
 	select CPU_HAS_NO_BITFIELDS
 	select CPU_HAS_NO_MULDIV64
+	select CPU_HAS_NO_UNALIGNED
 	select GENERIC_CSUM
 
 endchoice
@@ -37,6 +38,7 @@ config M68000
 	bool
 	select CPU_HAS_NO_BITFIELDS
 	select CPU_HAS_NO_MULDIV64
+	select CPU_HAS_NO_UNALIGNED
 	select GENERIC_CSUM
 	help
 	  The Freescale (was Motorola) 68000 CPU is the first generation of
@@ -366,6 +368,9 @@ config CPU_HAS_NO_BITFIELDS
 config CPU_HAS_NO_MULDIV64
 	bool
 
+config CPU_HAS_NO_UNALIGNED
+	bool
+
 config CPU_HAS_ADDRESS_SPACES
 	bool
 
arch/m68k/include/asm/unaligned.h +2 -2
index f4043ae..2b3ca0b 100644
@@ -2,7 +2,7 @@
 #define _ASM_M68K_UNALIGNED_H
 
 
-#if defined(CONFIG_COLDFIRE) || defined(CONFIG_M68000)
+#ifdef CONFIG_CPU_HAS_NO_UNALIGNED
 #include <linux/unaligned/be_struct.h>
 #include <linux/unaligned/le_byteshift.h>
 #include <linux/unaligned/generic.h>
@@ -12,7 +12,7 @@
 
 #else
 /*
- * The m68k can do unaligned accesses itself. 
+ * The m68k can do unaligned accesses itself.
  */
 #include <linux/unaligned/access_ok.h>
 #include <linux/unaligned/generic.h>
Signature · 1 line
1.7.0.4
author maintainer
#8 lore raw

PATCH 5/5 m68k: CPU32 does not support unaligned accesses

In reply to Geert Uytterhoeven

Hence select CPU_HAS_NO_UNALIGNED

---
 arch/m68k/Kconfig.cpu |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
arch/m68k/Kconfig.cpu +1 -0
index c4ed650..d4f3a98 100644
@@ -50,6 +50,7 @@ config M68000
 config MCPU32
 	bool
 	select CPU_HAS_NO_BITFIELDS
+	select CPU_HAS_NO_UNALIGNED
 	help
 	  The Freescale (was then Motorola) CPU32 is a CPU core that is
 	  based on the 68020 processor. For the most part it is used in
Signature · 1 line
1.7.0.4
author maintainer
#4 lore raw

PATCH 3/5 m68k: delay, muldi3 - Use CONFIG_CPU_HAS_NO_MULDIV64

In reply to Geert Uytterhoeven

instead of open coding CONFIG_M68000 || CONFIG_COLDFIRE

---
 arch/m68k/include/asm/delay.h |    2 +-
 arch/m68k/lib/muldi3.c        |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
arch/m68k/include/asm/delay.h +1 -1
index 9c09bec..12d8fe4 100644
@@ -43,7 +43,7 @@ static inline void __delay(unsigned long loops)
 extern void __bad_udelay(void);
 
 
-#if defined(CONFIG_M68000) || defined(CONFIG_COLDFIRE)
+#ifdef CONFIG_CPU_HAS_NO_MULDIV64
 /*
  * The simpler m68k and ColdFire processors do not have a 32*32->64
  * multiply instruction. So we need to handle them a little differently.
arch/m68k/lib/muldi3.c +1 -1
index 79e928a..ee5f0b1 100644
@@ -19,7 +19,7 @@ along with GNU CC; see the file COPYING.  If not, write to
 the Free Software Foundation, 59 Temple Place - Suite 330,
 Boston, MA 02111-1307, USA.  */
 
-#if defined(CONFIG_M68000) || defined(CONFIG_COLDFIRE)
+#ifdef CONFIG_CPU_HAS_NO_MULDIV64
 
 #define SI_TYPE_SIZE 32
 #define __BITS4 (SI_TYPE_SIZE / 4)
Signature · 1 line
1.7.0.4
Acked-by on v1 1/5
#10 lore raw
In reply to Geert Uytterhoeven
Quoted 1 line · Geert Uytterhoeven

It's also defined in arch/m68k/Kconfig.cpu

Yep :-)

Quoted 1 line

Thanks
Greg

Quoted 17 lines
  arch/m68k/Kconfig |    3 ---
  1 files changed, 0 insertions(+), 3 deletions(-)
arch/m68k/Kconfig +0 -3
index 1471201..bc8cc50 100644
@@ -62,9 +62,6 @@ config CPU_HAS_NO_MULDIV64
  config CPU_HAS_ADDRESS_SPACES
  	bool
 
-config FPU
-	bool
-
  config HZ
  	int
  	default 1000 if CLEOPATRA
Signature · 5 lines
------------------------------------------------------------------------
Greg Ungerer  --  Principal Engineer        EMAIL:     [email protected]
SnapGear Group, McAfee                      PHONE:       +61 7 3435 2888
8 Gardner Close                             FAX:         +61 7 3217 5323
Milton, QLD, 4064, Australia                WEB: http://www.SnapGear.com
Acked-by on v1 2/5
#2 lore raw

Re: [PATCH 2/5] m68k: Move CPU_HAS_* config options

In reply to Geert Uytterhoeven
Quoted 3 lines · Geert Uytterhoeven

They belong together with the CPU selection

Regards
Greg

Quoted 44 lines
  arch/m68k/Kconfig     |    9 ---------
  arch/m68k/Kconfig.cpu |    9 +++++++++
  2 files changed, 9 insertions(+), 9 deletions(-)
arch/m68k/Kconfig +0 -9
index bc8cc50..87b504c 100644
@@ -53,15 +53,6 @@ config ZONE_DMA
  	bool
  	default y
 
-config CPU_HAS_NO_BITFIELDS
-	bool
-
-config CPU_HAS_NO_MULDIV64
-	bool
-
-config CPU_HAS_ADDRESS_SPACES
-	bool
-
  config HZ
  	int
  	default 1000 if CLEOPATRA
arch/m68k/Kconfig.cpu +9 -0
index 2b53254..6cd8c1a 100644
@@ -360,6 +360,15 @@ config NODES_SHIFT
  	default "3"
  	depends on !SINGLE_MEMORY_CHUNK
 
+config CPU_HAS_NO_BITFIELDS
+	bool
+
+config CPU_HAS_NO_MULDIV64
+	bool
+
+config CPU_HAS_ADDRESS_SPACES
+	bool
+
  config FPU
  	bool
 
Signature · 5 lines
------------------------------------------------------------------------
Greg Ungerer  --  Principal Engineer        EMAIL:     [email protected]
SnapGear Group, McAfee                      PHONE:       +61 7 3435 2888
8 Gardner Close                             FAX:         +61 7 3217 5323
Milton, QLD, 4064, Australia                WEB: http://www.SnapGear.com
Acked-by on v1 3/5
#5 lore raw

Re: [PATCH 3/5] m68k: delay, muldi3 - Use CONFIG_CPU_HAS_NO_MULDIV64

In reply to Geert Uytterhoeven
Quoted 3 lines · Geert Uytterhoeven

instead of open coding CONFIG_M68000 || CONFIG_COLDFIRE

Regards
Greg

Quoted 30 lines
  arch/m68k/include/asm/delay.h |    2 +-
  arch/m68k/lib/muldi3.c        |    2 +-
  2 files changed, 2 insertions(+), 2 deletions(-)
arch/m68k/include/asm/delay.h +1 -1
index 9c09bec..12d8fe4 100644
@@ -43,7 +43,7 @@ static inline void __delay(unsigned long loops)
  extern void __bad_udelay(void);
 
 
-#if defined(CONFIG_M68000) || defined(CONFIG_COLDFIRE)
+#ifdef CONFIG_CPU_HAS_NO_MULDIV64
  /*
   * The simpler m68k and ColdFire processors do not have a 32*32->64
   * multiply instruction. So we need to handle them a little differently.
arch/m68k/lib/muldi3.c +1 -1
index 79e928a..ee5f0b1 100644
@@ -19,7 +19,7 @@ along with GNU CC; see the file COPYING.  If not, write to
  the Free Software Foundation, 59 Temple Place - Suite 330,
  Boston, MA 02111-1307, USA.  */
 
-#if defined(CONFIG_M68000) || defined(CONFIG_COLDFIRE)
+#ifdef CONFIG_CPU_HAS_NO_MULDIV64
 
  #define SI_TYPE_SIZE 32
  #define __BITS4 (SI_TYPE_SIZE / 4)
Signature · 5 lines
------------------------------------------------------------------------
Greg Ungerer  --  Principal Engineer        EMAIL:     [email protected]
SnapGear Group, McAfee                      PHONE:       +61 7 3435 2888
8 Gardner Close                             FAX:         +61 7 3217 5323
Milton, QLD, 4064, Australia                WEB: http://www.SnapGear.com
Acked-by on v1 4/5
#7 lore raw

Re: [PATCH 4/5] m68k: Introduce config option CPU_HAS_NO_UNALIGNED

In reply to Geert Uytterhoeven
Quoted 4 lines · Geert Uytterhoeven

Use CONFIG_CPU_HAS_NO_UNALIGNED instead of open coding CONFIG_M68000 || CONFIG_COLDFIRE

Regards
Greg

Quoted 57 lines
---
  arch/m68k/Kconfig.cpu             |    5 +++++
  arch/m68k/include/asm/unaligned.h |    4 ++--
  2 files changed, 7 insertions(+), 2 deletions(-)
arch/m68k/Kconfig.cpu +5 -0
index 6cd8c1a..c4ed650 100644
@@ -27,6 +27,7 @@ config COLDFIRE
  	select ARCH_HAVE_CUSTOM_GPIO_H
  	select CPU_HAS_NO_BITFIELDS
  	select CPU_HAS_NO_MULDIV64
+	select CPU_HAS_NO_UNALIGNED
  	select GENERIC_CSUM
 
  endchoice
@@ -37,6 +38,7 @@ config M68000
  	bool
  	select CPU_HAS_NO_BITFIELDS
  	select CPU_HAS_NO_MULDIV64
+	select CPU_HAS_NO_UNALIGNED
  	select GENERIC_CSUM
  	help
  	  The Freescale (was Motorola) 68000 CPU is the first generation of
@@ -366,6 +368,9 @@ config CPU_HAS_NO_BITFIELDS
  config CPU_HAS_NO_MULDIV64
  	bool
 
+config CPU_HAS_NO_UNALIGNED
+	bool
+
  config CPU_HAS_ADDRESS_SPACES
  	bool
 
arch/m68k/include/asm/unaligned.h +2 -2
index f4043ae..2b3ca0b 100644
@@ -2,7 +2,7 @@
  #define _ASM_M68K_UNALIGNED_H
 
 
-#if defined(CONFIG_COLDFIRE) || defined(CONFIG_M68000)
+#ifdef CONFIG_CPU_HAS_NO_UNALIGNED
  #include<linux/unaligned/be_struct.h>
  #include<linux/unaligned/le_byteshift.h>
  #include<linux/unaligned/generic.h>
@@ -12,7 +12,7 @@
 
  #else
  /*
- * The m68k can do unaligned accesses itself.
+ * The m68k can do unaligned accesses itself.
   */
  #include<linux/unaligned/access_ok.h>
  #include<linux/unaligned/generic.h>
Signature · 5 lines
------------------------------------------------------------------------
Greg Ungerer  --  Principal Engineer        EMAIL:     [email protected]
SnapGear Group, McAfee                      PHONE:       +61 7 3435 2888
8 Gardner Close                             FAX:         +61 7 3217 5323
Milton, QLD, 4064, Australia                WEB: http://www.SnapGear.com
Acked-by on v1 5/5
#9 lore raw

Re: [PATCH 5/5] m68k: CPU32 does not support unaligned accesses

In reply to Geert Uytterhoeven
Quoted 4 lines · Geert Uytterhoeven

Hence select CPU_HAS_NO_UNALIGNED

Regards
Greg

Quoted 16 lines
---
  arch/m68k/Kconfig.cpu |    1 +
  1 files changed, 1 insertions(+), 0 deletions(-)
arch/m68k/Kconfig.cpu +1 -0
index c4ed650..d4f3a98 100644
@@ -50,6 +50,7 @@ config M68000
  config MCPU32
  	bool
  	select CPU_HAS_NO_BITFIELDS
+	select CPU_HAS_NO_UNALIGNED
  	help
  	  The Freescale (was then Motorola) CPU32 is a CPU core that is
  	  based on the 68020 processor. For the most part it is used in
Signature · 5 lines
------------------------------------------------------------------------
Greg Ungerer  --  Principal Engineer        EMAIL:     [email protected]
SnapGear Group, McAfee                      PHONE:       +61 7 3435 2888
8 Gardner Close                             FAX:         +61 7 3217 5323
Milton, QLD, 4064, Australia                WEB: http://www.SnapGear.com