* [PATCH] MIPS: Get rid of CONFIG_CPU_HAS_LLSC again
@ 2013-03-05 10:03 Paul Bolle
2013-03-05 11:51 ` Jonas Gorski
0 siblings, 1 reply; 6+ messages in thread
From: Paul Bolle @ 2013-03-05 10:03 UTC (permalink / raw)
To: Ralf Baechle; +Cc: linux-mips, linux-kernel
Commit f7ade3c168e4f437c11f57be012992bbb0e3075c ("MIPS: Get rid of
CONFIG_CPU_HAS_LLSC") did what it promised to do. But since then that
macro and its Kconfig symbol popped up again. Get rid of those again.
Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
---
0) Untested.
1) The related commits are 1c773ea4dceff889c2f872343609a87ae0cfbf56
("MIPS: Netlogic: Add XLP makefiles and config") and
3070033a16edcc21688d5ea8967c89522f833862 ("MIPS: Add core files for MIPS
SEAD-3 development platform.").
arch/mips/Kconfig | 1 -
arch/mips/include/asm/mach-sead3/cpu-feature-overrides.h | 3 ---
2 files changed, 4 deletions(-)
diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
index ae9c716..310f1e6 100644
--- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig
@@ -1493,7 +1493,6 @@ config CPU_XLP
select CPU_SUPPORTS_32BIT_KERNEL
select CPU_SUPPORTS_64BIT_KERNEL
select CPU_SUPPORTS_HIGHMEM
- select CPU_HAS_LLSC
select WEAK_ORDERING
select WEAK_REORDERING_BEYOND_LLSC
select CPU_HAS_PREFETCH
diff --git a/arch/mips/include/asm/mach-sead3/cpu-feature-overrides.h b/arch/mips/include/asm/mach-sead3/cpu-feature-overrides.h
index d9c8284..2a945b4 100644
--- a/arch/mips/include/asm/mach-sead3/cpu-feature-overrides.h
+++ b/arch/mips/include/asm/mach-sead3/cpu-feature-overrides.h
@@ -28,9 +28,6 @@
/* #define cpu_has_prefetch ? */
#define cpu_has_mcheck 1
/* #define cpu_has_ejtag ? */
-#ifdef CONFIG_CPU_HAS_LLSC
-#define cpu_has_llsc 1
-#else
#define cpu_has_llsc 0
#endif
/* #define cpu_has_vtag_icache ? */
--
1.7.11.7
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] MIPS: Get rid of CONFIG_CPU_HAS_LLSC again
2013-03-05 10:03 [PATCH] MIPS: Get rid of CONFIG_CPU_HAS_LLSC again Paul Bolle
@ 2013-03-05 11:51 ` Jonas Gorski
2013-03-05 12:20 ` [PATCH v2] " Paul Bolle
0 siblings, 1 reply; 6+ messages in thread
From: Jonas Gorski @ 2013-03-05 11:51 UTC (permalink / raw)
To: Paul Bolle; +Cc: Ralf Baechle, linux-mips, linux-kernel
On 5 March 2013 11:03, Paul Bolle <pebolle@tiscali.nl> wrote:
> Commit f7ade3c168e4f437c11f57be012992bbb0e3075c ("MIPS: Get rid of
> CONFIG_CPU_HAS_LLSC") did what it promised to do. But since then that
> macro and its Kconfig symbol popped up again. Get rid of those again.
>
> Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
> ---
> 0) Untested.
Obviously :p.
> 1) The related commits are 1c773ea4dceff889c2f872343609a87ae0cfbf56
> ("MIPS: Netlogic: Add XLP makefiles and config") and
> 3070033a16edcc21688d5ea8967c89522f833862 ("MIPS: Add core files for MIPS
> SEAD-3 development platform.").
>
> arch/mips/Kconfig | 1 -
> arch/mips/include/asm/mach-sead3/cpu-feature-overrides.h | 3 ---
> 2 files changed, 4 deletions(-)
>
> diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
> index ae9c716..310f1e6 100644
> --- a/arch/mips/Kconfig
> +++ b/arch/mips/Kconfig
> @@ -1493,7 +1493,6 @@ config CPU_XLP
> select CPU_SUPPORTS_32BIT_KERNEL
> select CPU_SUPPORTS_64BIT_KERNEL
> select CPU_SUPPORTS_HIGHMEM
> - select CPU_HAS_LLSC
> select WEAK_ORDERING
> select WEAK_REORDERING_BEYOND_LLSC
> select CPU_HAS_PREFETCH
> diff --git a/arch/mips/include/asm/mach-sead3/cpu-feature-overrides.h b/arch/mips/include/asm/mach-sead3/cpu-feature-overrides.h
> index d9c8284..2a945b4 100644
> --- a/arch/mips/include/asm/mach-sead3/cpu-feature-overrides.h
> +++ b/arch/mips/include/asm/mach-sead3/cpu-feature-overrides.h
> @@ -28,9 +28,6 @@
> /* #define cpu_has_prefetch ? */
> #define cpu_has_mcheck 1
> /* #define cpu_has_ejtag ? */
> -#ifdef CONFIG_CPU_HAS_LLSC
> -#define cpu_has_llsc 1
> -#else
> #define cpu_has_llsc 0
> #endif
You need to remove these two lines, too, else you have an #endif without an #if.
> /* #define cpu_has_vtag_icache ? */
> --
> 1.7.11.7
>
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH v2] MIPS: Get rid of CONFIG_CPU_HAS_LLSC again
2013-03-05 11:51 ` Jonas Gorski
@ 2013-03-05 12:20 ` Paul Bolle
2013-03-05 12:55 ` Jonas Gorski
2013-03-12 16:09 ` Ralf Baechle
0 siblings, 2 replies; 6+ messages in thread
From: Paul Bolle @ 2013-03-05 12:20 UTC (permalink / raw)
To: Ralf Baechle; +Cc: Jonas Gorski, linux-mips, linux-kernel
Commit f7ade3c168e4f437c11f57be012992bbb0e3075c ("MIPS: Get rid of
CONFIG_CPU_HAS_LLSC") did what it promised to do. But since then that
macro and its Kconfig symbol popped up again. Get rid of those again.
Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
---
0) This version fixes an embarrassing dangling "#endif" spotted by
Jonas. Thanks for that! Still untested.
1) The related commits are 1c773ea4dceff889c2f872343609a87ae0cfbf56
("MIPS: Netlogic: Add XLP makefiles and config") and
3070033a16edcc21688d5ea8967c89522f833862 ("MIPS: Add core files for MIPS
SEAD-3 development platform.").
arch/mips/Kconfig | 1 -
arch/mips/include/asm/mach-sead3/cpu-feature-overrides.h | 4 ----
2 files changed, 5 deletions(-)
diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
index ae9c716..310f1e6 100644
--- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig
@@ -1493,7 +1493,6 @@ config CPU_XLP
select CPU_SUPPORTS_32BIT_KERNEL
select CPU_SUPPORTS_64BIT_KERNEL
select CPU_SUPPORTS_HIGHMEM
- select CPU_HAS_LLSC
select WEAK_ORDERING
select WEAK_REORDERING_BEYOND_LLSC
select CPU_HAS_PREFETCH
diff --git a/arch/mips/include/asm/mach-sead3/cpu-feature-overrides.h b/arch/mips/include/asm/mach-sead3/cpu-feature-overrides.h
index d9c8284..b40f37f 100644
--- a/arch/mips/include/asm/mach-sead3/cpu-feature-overrides.h
+++ b/arch/mips/include/asm/mach-sead3/cpu-feature-overrides.h
@@ -28,11 +28,7 @@
/* #define cpu_has_prefetch ? */
#define cpu_has_mcheck 1
/* #define cpu_has_ejtag ? */
-#ifdef CONFIG_CPU_HAS_LLSC
-#define cpu_has_llsc 1
-#else
#define cpu_has_llsc 0
-#endif
/* #define cpu_has_vtag_icache ? */
/* #define cpu_has_dc_aliases ? */
/* #define cpu_has_ic_fills_f_dc ? */
--
1.7.11.7
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH v2] MIPS: Get rid of CONFIG_CPU_HAS_LLSC again
2013-03-05 12:20 ` [PATCH v2] " Paul Bolle
@ 2013-03-05 12:55 ` Jonas Gorski
2013-03-05 13:06 ` Paul Bolle
2013-03-12 16:09 ` Ralf Baechle
1 sibling, 1 reply; 6+ messages in thread
From: Jonas Gorski @ 2013-03-05 12:55 UTC (permalink / raw)
To: Paul Bolle; +Cc: Ralf Baechle, linux-mips, linux-kernel
On 5 March 2013 13:20, Paul Bolle <pebolle@tiscali.nl> wrote:
> Commit f7ade3c168e4f437c11f57be012992bbb0e3075c ("MIPS: Get rid of
> CONFIG_CPU_HAS_LLSC") did what it promised to do. But since then that
> macro and its Kconfig symbol popped up again. Get rid of those again.
Now let's do a review of the contents.
> Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
> ---
> 0) This version fixes an embarrassing dangling "#endif" spotted by
> Jonas. Thanks for that! Still untested.
>
> 1) The related commits are 1c773ea4dceff889c2f872343609a87ae0cfbf56
> ("MIPS: Netlogic: Add XLP makefiles and config") and
> 3070033a16edcc21688d5ea8967c89522f833862 ("MIPS: Add core files for MIPS
> SEAD-3 development platform.").
>
> arch/mips/Kconfig | 1 -
> arch/mips/include/asm/mach-sead3/cpu-feature-overrides.h | 4 ----
> 2 files changed, 5 deletions(-)
>
> diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
> index ae9c716..310f1e6 100644
> --- a/arch/mips/Kconfig
> +++ b/arch/mips/Kconfig
> @@ -1493,7 +1493,6 @@ config CPU_XLP
> select CPU_SUPPORTS_32BIT_KERNEL
> select CPU_SUPPORTS_64BIT_KERNEL
> select CPU_SUPPORTS_HIGHMEM
> - select CPU_HAS_LLSC
> select WEAK_ORDERING
> select WEAK_REORDERING_BEYOND_LLSC
> select CPU_HAS_PREFETCH
> diff --git a/arch/mips/include/asm/mach-sead3/cpu-feature-overrides.h b/arch/mips/include/asm/mach-sead3/cpu-feature-overrides.h
> index d9c8284..b40f37f 100644
> --- a/arch/mips/include/asm/mach-sead3/cpu-feature-overrides.h
> +++ b/arch/mips/include/asm/mach-sead3/cpu-feature-overrides.h
> @@ -28,11 +28,7 @@
> /* #define cpu_has_prefetch ? */
> #define cpu_has_mcheck 1
> /* #define cpu_has_ejtag ? */
> -#ifdef CONFIG_CPU_HAS_LLSC
> -#define cpu_has_llsc 1
> -#else
> #define cpu_has_llsc 0
> -#endif
Hm, shouldn't you leave cpu_has_llsc set to 1? At least the "old" path
SEAD3 => CPU_MIPS32_R1/R2/64_R1 => select CPU_HAS_LLSC for all three
would have always caused this to be 1.
> /* #define cpu_has_vtag_icache ? */
> /* #define cpu_has_dc_aliases ? */
> /* #define cpu_has_ic_fills_f_dc ? */
> --
> 1.7.11.7
>
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v2] MIPS: Get rid of CONFIG_CPU_HAS_LLSC again
2013-03-05 12:55 ` Jonas Gorski
@ 2013-03-05 13:06 ` Paul Bolle
0 siblings, 0 replies; 6+ messages in thread
From: Paul Bolle @ 2013-03-05 13:06 UTC (permalink / raw)
To: Jonas Gorski; +Cc: Ralf Baechle, linux-mips, linux-kernel
On Tue, 2013-03-05 at 13:55 +0100, Jonas Gorski wrote:
> On 5 March 2013 13:20, Paul Bolle <pebolle@tiscali.nl> wrote:
> > diff --git a/arch/mips/include/asm/mach-sead3/cpu-feature-overrides.h b/arch/mips/include/asm/mach-sead3/cpu-feature-overrides.h
> > index d9c8284..b40f37f 100644
> > --- a/arch/mips/include/asm/mach-sead3/cpu-feature-overrides.h
> > +++ b/arch/mips/include/asm/mach-sead3/cpu-feature-overrides.h
> > @@ -28,11 +28,7 @@
> > /* #define cpu_has_prefetch ? */
> > #define cpu_has_mcheck 1
> > /* #define cpu_has_ejtag ? */
> > -#ifdef CONFIG_CPU_HAS_LLSC
> > -#define cpu_has_llsc 1
> > -#else
> > #define cpu_has_llsc 0
> > -#endif
>
> Hm, shouldn't you leave cpu_has_llsc set to 1? At least the "old" path
> SEAD3 => CPU_MIPS32_R1/R2/64_R1 => select CPU_HAS_LLSC for all three
> would have always caused this to be 1.
That would mean an actual change to the code. See, there's no Kconfig
symbol CPU_HAS_LLSC since v2.6.32. This means that CONFIG_CPU_HAS_LLSC
has not been defined ever since and that SEAD3 has been having
cpu_has_llsc set to 0 for some time now. My patch just removes dead
code.
Perhaps SEAD3 need cpu_has_llsc set to 1. I wouldn't know. Anyhow, that
should be done in another patch, with (runtime) testing, etc.
Paul Bolle
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v2] MIPS: Get rid of CONFIG_CPU_HAS_LLSC again
2013-03-05 12:20 ` [PATCH v2] " Paul Bolle
2013-03-05 12:55 ` Jonas Gorski
@ 2013-03-12 16:09 ` Ralf Baechle
1 sibling, 0 replies; 6+ messages in thread
From: Ralf Baechle @ 2013-03-12 16:09 UTC (permalink / raw)
To: Paul Bolle; +Cc: Jonas Gorski, linux-mips, linux-kernel, Chris Dearman
On Tue, Mar 05, 2013 at 01:20:20PM +0100, Paul Bolle wrote:
> Commit f7ade3c168e4f437c11f57be012992bbb0e3075c ("MIPS: Get rid of
> CONFIG_CPU_HAS_LLSC") did what it promised to do. But since then that
> macro and its Kconfig symbol popped up again. Get rid of those again.
>
> Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
> ---
> 0) This version fixes an embarrassing dangling "#endif" spotted by
> Jonas. Thanks for that! Still untested.
Thanks, I've applied your v2 patch.
It's good that your cleanup doesn't change the behaviour of the existing
code - however the current behaviour doesn't seem to be the intended
behaviour so I'm going to commit a separate patch to define cpu_has_llsc
to 1.
Ralf
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2013-03-12 16:09 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-05 10:03 [PATCH] MIPS: Get rid of CONFIG_CPU_HAS_LLSC again Paul Bolle
2013-03-05 11:51 ` Jonas Gorski
2013-03-05 12:20 ` [PATCH v2] " Paul Bolle
2013-03-05 12:55 ` Jonas Gorski
2013-03-05 13:06 ` Paul Bolle
2013-03-12 16:09 ` Ralf Baechle
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox