2012-06-07 18:48:04

by Geert Uytterhoeven

[permalink] [raw]
Subject: [PATCH 1/5] m68k: Remove duplicate FPU config option

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

Signed-off-by: Geert Uytterhoeven <[email protected]>
---
arch/m68k/Kconfig | 3 ---
1 files changed, 0 insertions(+), 3 deletions(-)

diff --git a/arch/m68k/Kconfig b/arch/m68k/Kconfig
index 1471201..bc8cc50 100644
--- a/arch/m68k/Kconfig
+++ b/arch/m68k/Kconfig
@@ -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
--
1.7.0.4


2012-06-07 18:47:23

by Geert Uytterhoeven

[permalink] [raw]
Subject: [PATCH 2/5] m68k: Move CPU_HAS_* config options

They belong together with the CPU selection

Signed-off-by: Geert Uytterhoeven <[email protected]>
---
arch/m68k/Kconfig | 9 ---------
arch/m68k/Kconfig.cpu | 9 +++++++++
2 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/arch/m68k/Kconfig b/arch/m68k/Kconfig
index bc8cc50..87b504c 100644
--- a/arch/m68k/Kconfig
+++ b/arch/m68k/Kconfig
@@ -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
diff --git a/arch/m68k/Kconfig.cpu b/arch/m68k/Kconfig.cpu
index 2b53254..6cd8c1a 100644
--- a/arch/m68k/Kconfig.cpu
+++ b/arch/m68k/Kconfig.cpu
@@ -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

--
1.7.0.4

2012-06-07 18:47:20

by Geert Uytterhoeven

[permalink] [raw]
Subject: [PATCH 5/5] m68k: CPU32 does not support unaligned accesses

Hence select CPU_HAS_NO_UNALIGNED

Reported-by: Philippe De Muyter <[email protected]>
Signed-off-by: Geert Uytterhoeven <[email protected]>
---
arch/m68k/Kconfig.cpu | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/arch/m68k/Kconfig.cpu b/arch/m68k/Kconfig.cpu
index c4ed650..d4f3a98 100644
--- a/arch/m68k/Kconfig.cpu
+++ b/arch/m68k/Kconfig.cpu
@@ -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
--
1.7.0.4

2012-06-07 18:48:22

by Geert Uytterhoeven

[permalink] [raw]
Subject: [PATCH 3/5] m68k: delay, muldi3 - Use CONFIG_CPU_HAS_NO_MULDIV64

instead of open coding CONFIG_M68000 || CONFIG_COLDFIRE

Signed-off-by: Geert Uytterhoeven <[email protected]>
---
arch/m68k/include/asm/delay.h | 2 +-
arch/m68k/lib/muldi3.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/m68k/include/asm/delay.h b/arch/m68k/include/asm/delay.h
index 9c09bec..12d8fe4 100644
--- a/arch/m68k/include/asm/delay.h
+++ b/arch/m68k/include/asm/delay.h
@@ -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.
diff --git a/arch/m68k/lib/muldi3.c b/arch/m68k/lib/muldi3.c
index 79e928a..ee5f0b1 100644
--- a/arch/m68k/lib/muldi3.c
+++ b/arch/m68k/lib/muldi3.c
@@ -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)
--
1.7.0.4

2012-06-07 18:48:20

by Geert Uytterhoeven

[permalink] [raw]
Subject: [PATCH 4/5] m68k: Introduce config option CPU_HAS_NO_UNALIGNED

Use CONFIG_CPU_HAS_NO_UNALIGNED instead of open coding CONFIG_M68000 ||
CONFIG_COLDFIRE

Signed-off-by: Geert Uytterhoeven <[email protected]>
---
arch/m68k/Kconfig.cpu | 5 +++++
arch/m68k/include/asm/unaligned.h | 4 ++--
2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/arch/m68k/Kconfig.cpu b/arch/m68k/Kconfig.cpu
index 6cd8c1a..c4ed650 100644
--- a/arch/m68k/Kconfig.cpu
+++ b/arch/m68k/Kconfig.cpu
@@ -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

diff --git a/arch/m68k/include/asm/unaligned.h b/arch/m68k/include/asm/unaligned.h
index f4043ae..2b3ca0b 100644
--- a/arch/m68k/include/asm/unaligned.h
+++ b/arch/m68k/include/asm/unaligned.h
@@ -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>
--
1.7.0.4

2012-06-08 01:35:54

by Greg Ungerer

[permalink] [raw]
Subject: Re: [PATCH 1/5] m68k: Remove duplicate FPU config option

On 08/06/12 04:47, Geert Uytterhoeven wrote:
> It's also defined in arch/m68k/Kconfig.cpu

Yep :-)


> Signed-off-by: Geert Uytterhoeven<[email protected]>

Acked-by: Greg Ungerer<[email protected]>

Thanks
Greg


> arch/m68k/Kconfig | 3 ---
> 1 files changed, 0 insertions(+), 3 deletions(-)
>
> diff --git a/arch/m68k/Kconfig b/arch/m68k/Kconfig
> index 1471201..bc8cc50 100644
> --- a/arch/m68k/Kconfig
> +++ b/arch/m68k/Kconfig
> @@ -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


--
------------------------------------------------------------------------
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

2012-06-08 01:40:23

by Greg Ungerer

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

On 08/06/12 04:47, Geert Uytterhoeven wrote:
> They belong together with the CPU selection
>
> Signed-off-by: Geert Uytterhoeven<[email protected]>

Acked-by: Greg Ungerer<[email protected]>

Regards
Greg


> arch/m68k/Kconfig | 9 ---------
> arch/m68k/Kconfig.cpu | 9 +++++++++
> 2 files changed, 9 insertions(+), 9 deletions(-)
>
> diff --git a/arch/m68k/Kconfig b/arch/m68k/Kconfig
> index bc8cc50..87b504c 100644
> --- a/arch/m68k/Kconfig
> +++ b/arch/m68k/Kconfig
> @@ -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
> diff --git a/arch/m68k/Kconfig.cpu b/arch/m68k/Kconfig.cpu
> index 2b53254..6cd8c1a 100644
> --- a/arch/m68k/Kconfig.cpu
> +++ b/arch/m68k/Kconfig.cpu
> @@ -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
>


--
------------------------------------------------------------------------
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

2012-06-08 03:49:45

by Greg Ungerer

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

On 08/06/12 04:47, Geert Uytterhoeven wrote:
> instead of open coding CONFIG_M68000 || CONFIG_COLDFIRE
>
> Signed-off-by: Geert Uytterhoeven<[email protected]>

Acked-by: Greg Ungerer<[email protected]>

Regards
Greg


> arch/m68k/include/asm/delay.h | 2 +-
> arch/m68k/lib/muldi3.c | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/m68k/include/asm/delay.h b/arch/m68k/include/asm/delay.h
> index 9c09bec..12d8fe4 100644
> --- a/arch/m68k/include/asm/delay.h
> +++ b/arch/m68k/include/asm/delay.h
> @@ -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.
> diff --git a/arch/m68k/lib/muldi3.c b/arch/m68k/lib/muldi3.c
> index 79e928a..ee5f0b1 100644
> --- a/arch/m68k/lib/muldi3.c
> +++ b/arch/m68k/lib/muldi3.c
> @@ -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)


--
------------------------------------------------------------------------
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

2012-06-08 03:55:20

by Greg Ungerer

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

On 08/06/12 04:47, Geert Uytterhoeven wrote:
> Use CONFIG_CPU_HAS_NO_UNALIGNED instead of open coding CONFIG_M68000 ||
> CONFIG_COLDFIRE
>
> Signed-off-by: Geert Uytterhoeven<[email protected]>

Acked-by: Greg Ungerer<[email protected]>

Regards
Greg



> ---
> arch/m68k/Kconfig.cpu | 5 +++++
> arch/m68k/include/asm/unaligned.h | 4 ++--
> 2 files changed, 7 insertions(+), 2 deletions(-)
>
> diff --git a/arch/m68k/Kconfig.cpu b/arch/m68k/Kconfig.cpu
> index 6cd8c1a..c4ed650 100644
> --- a/arch/m68k/Kconfig.cpu
> +++ b/arch/m68k/Kconfig.cpu
> @@ -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
>
> diff --git a/arch/m68k/include/asm/unaligned.h b/arch/m68k/include/asm/unaligned.h
> index f4043ae..2b3ca0b 100644
> --- a/arch/m68k/include/asm/unaligned.h
> +++ b/arch/m68k/include/asm/unaligned.h
> @@ -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>


--
------------------------------------------------------------------------
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

2012-06-08 03:56:36

by Greg Ungerer

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

On 08/06/12 04:47, Geert Uytterhoeven wrote:
> Hence select CPU_HAS_NO_UNALIGNED
>
> Reported-by: Philippe De Muyter<[email protected]>
> Signed-off-by: Geert Uytterhoeven<[email protected]>

Acked-by: Greg Ungerer<[email protected]>

Regards
Greg


> ---
> arch/m68k/Kconfig.cpu | 1 +
> 1 files changed, 1 insertions(+), 0 deletions(-)
>
> diff --git a/arch/m68k/Kconfig.cpu b/arch/m68k/Kconfig.cpu
> index c4ed650..d4f3a98 100644
> --- a/arch/m68k/Kconfig.cpu
> +++ b/arch/m68k/Kconfig.cpu
> @@ -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


--
------------------------------------------------------------------------
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