All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] MIPS: Fix early CM probing
@ 2016-02-08 17:46 ` Paul Burton
  0 siblings, 0 replies; 6+ messages in thread
From: Paul Burton @ 2016-02-08 17:46 UTC (permalink / raw)
  To: linux-mips
  Cc: Paul Burton, Andrzej Hajda, Aaro Koskinen, Masahiro Yamada,
	Rob Herring, Alexander Sverdlin, Peter Hurley, linux-kernel,
	Leonid Yegoshin, Jaedon Shin, James Hogan, Jonas Gorski,
	Markos Chandras, Ralf Baechle

Commit c014d164f21d ("MIPS: Add platform callback before initializing
the L2 cache") added a platform_early_l2_init function in order to allow
platforms to probe for the CM before L2 initialisation is performed, so
that CM GCRs are available to mips_sc_probe.

That commit actually fails to do anything useful, since it checks
mips_cm_revision to determine whether it should call mips_cm_probe but
the result of mips_cm_revision will always be 0 until mips_cm_probe has
been called. Thus the "early" mips_cm_probe call never occurs.

Fix this & drop the useless weak platform_early_l2_init function by
simply calling mips_cm_probe from setup_arch. For platforms that don't
select CONFIG_MIPS_CM this will be a no-op, and for those that do it
removes the requirement for them to call mips_cm_probe manually
(although doing so isn't harmful for now).

Signed-off-by: Paul Burton <paul.burton@imgtec.com>
---

 arch/mips/kernel/setup.c         |  1 +
 arch/mips/mm/sc-mips.c           | 10 ----------
 arch/mips/mti-malta/malta-init.c |  8 --------
 3 files changed, 1 insertion(+), 18 deletions(-)

diff --git a/arch/mips/kernel/setup.c b/arch/mips/kernel/setup.c
index 569a7d5..5fdaf8b 100644
--- a/arch/mips/kernel/setup.c
+++ b/arch/mips/kernel/setup.c
@@ -782,6 +782,7 @@ static inline void prefill_possible_map(void) {}
 void __init setup_arch(char **cmdline_p)
 {
 	cpu_probe();
+	mips_cm_probe();
 	prom_init();
 
 	setup_early_fdc_console();
diff --git a/arch/mips/mm/sc-mips.c b/arch/mips/mm/sc-mips.c
index 3bd0597..2496475 100644
--- a/arch/mips/mm/sc-mips.c
+++ b/arch/mips/mm/sc-mips.c
@@ -181,10 +181,6 @@ static int __init mips_sc_probe_cm3(void)
 	return 1;
 }
 
-void __weak platform_early_l2_init(void)
-{
-}
-
 static inline int __init mips_sc_probe(void)
 {
 	struct cpuinfo_mips *c = &current_cpu_data;
@@ -194,12 +190,6 @@ static inline int __init mips_sc_probe(void)
 	/* Mark as not present until probe completed */
 	c->scache.flags |= MIPS_CACHE_NOT_PRESENT;
 
-	/*
-	 * Do we need some platform specific probing before
-	 * we configure L2?
-	 */
-	platform_early_l2_init();
-
 	if (mips_cm_revision() >= CM_REV_CM3)
 		return mips_sc_probe_cm3();
 
diff --git a/arch/mips/mti-malta/malta-init.c b/arch/mips/mti-malta/malta-init.c
index 571148c..dc2c521 100644
--- a/arch/mips/mti-malta/malta-init.c
+++ b/arch/mips/mti-malta/malta-init.c
@@ -293,7 +293,6 @@ mips_pci_controller:
 	console_config();
 #endif
 	/* Early detection of CMP support */
-	mips_cm_probe();
 	mips_cpc_probe();
 
 	if (!register_cps_smp_ops())
@@ -304,10 +303,3 @@ mips_pci_controller:
 		return;
 	register_up_smp_ops();
 }
-
-void platform_early_l2_init(void)
-{
-	/* L2 configuration lives in the CM3 */
-	if (mips_cm_revision() >= CM_REV_CM3)
-		mips_cm_probe();
-}
-- 
2.7.0

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH] MIPS: Fix early CM probing
@ 2016-02-08 17:46 ` Paul Burton
  0 siblings, 0 replies; 6+ messages in thread
From: Paul Burton @ 2016-02-08 17:46 UTC (permalink / raw)
  To: linux-mips
  Cc: Paul Burton, Andrzej Hajda, Aaro Koskinen, Masahiro Yamada,
	Rob Herring, Alexander Sverdlin, Peter Hurley, linux-kernel,
	Leonid Yegoshin, Jaedon Shin, James Hogan, Jonas Gorski,
	Markos Chandras, Ralf Baechle

Commit c014d164f21d ("MIPS: Add platform callback before initializing
the L2 cache") added a platform_early_l2_init function in order to allow
platforms to probe for the CM before L2 initialisation is performed, so
that CM GCRs are available to mips_sc_probe.

That commit actually fails to do anything useful, since it checks
mips_cm_revision to determine whether it should call mips_cm_probe but
the result of mips_cm_revision will always be 0 until mips_cm_probe has
been called. Thus the "early" mips_cm_probe call never occurs.

Fix this & drop the useless weak platform_early_l2_init function by
simply calling mips_cm_probe from setup_arch. For platforms that don't
select CONFIG_MIPS_CM this will be a no-op, and for those that do it
removes the requirement for them to call mips_cm_probe manually
(although doing so isn't harmful for now).

Signed-off-by: Paul Burton <paul.burton@imgtec.com>
---

 arch/mips/kernel/setup.c         |  1 +
 arch/mips/mm/sc-mips.c           | 10 ----------
 arch/mips/mti-malta/malta-init.c |  8 --------
 3 files changed, 1 insertion(+), 18 deletions(-)

diff --git a/arch/mips/kernel/setup.c b/arch/mips/kernel/setup.c
index 569a7d5..5fdaf8b 100644
--- a/arch/mips/kernel/setup.c
+++ b/arch/mips/kernel/setup.c
@@ -782,6 +782,7 @@ static inline void prefill_possible_map(void) {}
 void __init setup_arch(char **cmdline_p)
 {
 	cpu_probe();
+	mips_cm_probe();
 	prom_init();
 
 	setup_early_fdc_console();
diff --git a/arch/mips/mm/sc-mips.c b/arch/mips/mm/sc-mips.c
index 3bd0597..2496475 100644
--- a/arch/mips/mm/sc-mips.c
+++ b/arch/mips/mm/sc-mips.c
@@ -181,10 +181,6 @@ static int __init mips_sc_probe_cm3(void)
 	return 1;
 }
 
-void __weak platform_early_l2_init(void)
-{
-}
-
 static inline int __init mips_sc_probe(void)
 {
 	struct cpuinfo_mips *c = &current_cpu_data;
@@ -194,12 +190,6 @@ static inline int __init mips_sc_probe(void)
 	/* Mark as not present until probe completed */
 	c->scache.flags |= MIPS_CACHE_NOT_PRESENT;
 
-	/*
-	 * Do we need some platform specific probing before
-	 * we configure L2?
-	 */
-	platform_early_l2_init();
-
 	if (mips_cm_revision() >= CM_REV_CM3)
 		return mips_sc_probe_cm3();
 
diff --git a/arch/mips/mti-malta/malta-init.c b/arch/mips/mti-malta/malta-init.c
index 571148c..dc2c521 100644
--- a/arch/mips/mti-malta/malta-init.c
+++ b/arch/mips/mti-malta/malta-init.c
@@ -293,7 +293,6 @@ mips_pci_controller:
 	console_config();
 #endif
 	/* Early detection of CMP support */
-	mips_cm_probe();
 	mips_cpc_probe();
 
 	if (!register_cps_smp_ops())
@@ -304,10 +303,3 @@ mips_pci_controller:
 		return;
 	register_up_smp_ops();
 }
-
-void platform_early_l2_init(void)
-{
-	/* L2 configuration lives in the CM3 */
-	if (mips_cm_revision() >= CM_REV_CM3)
-		mips_cm_probe();
-}
-- 
2.7.0

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] MIPS: Fix early CM probing
  2016-02-08 17:46 ` Paul Burton
  (?)
@ 2016-02-09 15:46 ` Alexander Sverdlin
  -1 siblings, 0 replies; 6+ messages in thread
From: Alexander Sverdlin @ 2016-02-09 15:46 UTC (permalink / raw)
  To: EXT Paul Burton, linux-mips
  Cc: Andrzej Hajda, Aaro Koskinen, Masahiro Yamada, Rob Herring,
	Alexander Sverdlin, Peter Hurley, linux-kernel, Leonid Yegoshin,
	Jaedon Shin, James Hogan, Jonas Gorski, Markos Chandras,
	Ralf Baechle

Hi!

On 08.02.2016 18:46, EXT Paul Burton wrote:
> Commit c014d164f21d ("MIPS: Add platform callback before initializing
> the L2 cache") added a platform_early_l2_init function in order to allow
> platforms to probe for the CM before L2 initialisation is performed, so
> that CM GCRs are available to mips_sc_probe.
> 
> That commit actually fails to do anything useful, since it checks
> mips_cm_revision to determine whether it should call mips_cm_probe but
> the result of mips_cm_revision will always be 0 until mips_cm_probe has
> been called. Thus the "early" mips_cm_probe call never occurs.
> 
> Fix this & drop the useless weak platform_early_l2_init function by
> simply calling mips_cm_probe from setup_arch. For platforms that don't
> select CONFIG_MIPS_CM this will be a no-op, and for those that do it
> removes the requirement for them to call mips_cm_probe manually
> (although doing so isn't harmful for now).
> 
> Signed-off-by: Paul Burton <paul.burton@imgtec.com>

Reviewed-by: Alexander Sverdlin <alexander.sverdlin@nokia.com>

> ---
> 
>  arch/mips/kernel/setup.c         |  1 +
>  arch/mips/mm/sc-mips.c           | 10 ----------
>  arch/mips/mti-malta/malta-init.c |  8 --------
>  3 files changed, 1 insertion(+), 18 deletions(-)
> 
> diff --git a/arch/mips/kernel/setup.c b/arch/mips/kernel/setup.c
> index 569a7d5..5fdaf8b 100644
> --- a/arch/mips/kernel/setup.c
> +++ b/arch/mips/kernel/setup.c
> @@ -782,6 +782,7 @@ static inline void prefill_possible_map(void) {}
>  void __init setup_arch(char **cmdline_p)
>  {
>  	cpu_probe();
> +	mips_cm_probe();
>  	prom_init();
>  
>  	setup_early_fdc_console();
> diff --git a/arch/mips/mm/sc-mips.c b/arch/mips/mm/sc-mips.c
> index 3bd0597..2496475 100644
> --- a/arch/mips/mm/sc-mips.c
> +++ b/arch/mips/mm/sc-mips.c
> @@ -181,10 +181,6 @@ static int __init mips_sc_probe_cm3(void)
>  	return 1;
>  }
>  
> -void __weak platform_early_l2_init(void)
> -{
> -}
> -
>  static inline int __init mips_sc_probe(void)
>  {
>  	struct cpuinfo_mips *c = &current_cpu_data;
> @@ -194,12 +190,6 @@ static inline int __init mips_sc_probe(void)
>  	/* Mark as not present until probe completed */
>  	c->scache.flags |= MIPS_CACHE_NOT_PRESENT;
>  
> -	/*
> -	 * Do we need some platform specific probing before
> -	 * we configure L2?
> -	 */
> -	platform_early_l2_init();
> -
>  	if (mips_cm_revision() >= CM_REV_CM3)
>  		return mips_sc_probe_cm3();
>  
> diff --git a/arch/mips/mti-malta/malta-init.c b/arch/mips/mti-malta/malta-init.c
> index 571148c..dc2c521 100644
> --- a/arch/mips/mti-malta/malta-init.c
> +++ b/arch/mips/mti-malta/malta-init.c
> @@ -293,7 +293,6 @@ mips_pci_controller:
>  	console_config();
>  #endif
>  	/* Early detection of CMP support */
> -	mips_cm_probe();
>  	mips_cpc_probe();
>  
>  	if (!register_cps_smp_ops())
> @@ -304,10 +303,3 @@ mips_pci_controller:
>  		return;
>  	register_up_smp_ops();
>  }
> -
> -void platform_early_l2_init(void)
> -{
> -	/* L2 configuration lives in the CM3 */
> -	if (mips_cm_revision() >= CM_REV_CM3)
> -		mips_cm_probe();
> -}
> 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] MIPS: Fix early CM probing
@ 2018-01-01 23:12   ` NeilBrown
  0 siblings, 0 replies; 6+ messages in thread
From: NeilBrown @ 2018-01-01 23:12 UTC (permalink / raw)
  To: Paul Burton, linux-mips
  Cc: Paul Burton, Andrzej Hajda, Aaro Koskinen, Masahiro Yamada,
	Rob Herring, Alexander Sverdlin, Peter Hurley, linux-kernel,
	Leonid Yegoshin, Jaedon Shin, James Hogan, Jonas Gorski,
	Markos Chandras, Ralf Baechle

[-- Attachment #1: Type: text/plain, Size: 3874 bytes --]

On Mon, Feb 08 2016, Paul Burton wrote:

> Commit c014d164f21d ("MIPS: Add platform callback before initializing
> the L2 cache") added a platform_early_l2_init function in order to allow
> platforms to probe for the CM before L2 initialisation is performed, so
> that CM GCRs are available to mips_sc_probe.
>
> That commit actually fails to do anything useful, since it checks
> mips_cm_revision to determine whether it should call mips_cm_probe but
> the result of mips_cm_revision will always be 0 until mips_cm_probe has
> been called. Thus the "early" mips_cm_probe call never occurs.
>
> Fix this & drop the useless weak platform_early_l2_init function by
> simply calling mips_cm_probe from setup_arch. For platforms that don't
> select CONFIG_MIPS_CM this will be a no-op, and for those that do it
> removes the requirement for them to call mips_cm_probe manually
> (although doing so isn't harmful for now).
>
> Signed-off-by: Paul Burton <paul.burton@imgtec.com>

Hi,
 this change breaks the "gnubee" open-hardware NAS board (gnubee.org),
 which is based on a mediatek mt7621 SOC (which admittedly needs a bunch
 of other patches to work at all).

 I forward ported the patches from a mostly-working 4.4-based release to
 upstream and it didn't even print anything to the console.   "git
 bisect" led me to this patch.
 Reverting the change to setup_arch() means my mainline-based kernel
 gets a lot further.

 Based on the description above, I thought that maybe I should just
 disabled CONFIG_MIPS_CM, but that is selected automatically by
 CONFIG_MIPS_GIC, and I suspect that I need that.

 Can you suggest anything I might try to isolate why mips_cm_probe()
 might be causing a problem on this hardware?

Thanks,
NeilBrown


> ---
>
>  arch/mips/kernel/setup.c         |  1 +
>  arch/mips/mm/sc-mips.c           | 10 ----------
>  arch/mips/mti-malta/malta-init.c |  8 --------
>  3 files changed, 1 insertion(+), 18 deletions(-)
>
> diff --git a/arch/mips/kernel/setup.c b/arch/mips/kernel/setup.c
> index 569a7d5..5fdaf8b 100644
> --- a/arch/mips/kernel/setup.c
> +++ b/arch/mips/kernel/setup.c
> @@ -782,6 +782,7 @@ static inline void prefill_possible_map(void) {}
>  void __init setup_arch(char **cmdline_p)
>  {
>  	cpu_probe();
> +	mips_cm_probe();
>  	prom_init();
>  
>  	setup_early_fdc_console();
> diff --git a/arch/mips/mm/sc-mips.c b/arch/mips/mm/sc-mips.c
> index 3bd0597..2496475 100644
> --- a/arch/mips/mm/sc-mips.c
> +++ b/arch/mips/mm/sc-mips.c
> @@ -181,10 +181,6 @@ static int __init mips_sc_probe_cm3(void)
>  	return 1;
>  }
>  
> -void __weak platform_early_l2_init(void)
> -{
> -}
> -
>  static inline int __init mips_sc_probe(void)
>  {
>  	struct cpuinfo_mips *c = &current_cpu_data;
> @@ -194,12 +190,6 @@ static inline int __init mips_sc_probe(void)
>  	/* Mark as not present until probe completed */
>  	c->scache.flags |= MIPS_CACHE_NOT_PRESENT;
>  
> -	/*
> -	 * Do we need some platform specific probing before
> -	 * we configure L2?
> -	 */
> -	platform_early_l2_init();
> -
>  	if (mips_cm_revision() >= CM_REV_CM3)
>  		return mips_sc_probe_cm3();
>  
> diff --git a/arch/mips/mti-malta/malta-init.c b/arch/mips/mti-malta/malta-init.c
> index 571148c..dc2c521 100644
> --- a/arch/mips/mti-malta/malta-init.c
> +++ b/arch/mips/mti-malta/malta-init.c
> @@ -293,7 +293,6 @@ mips_pci_controller:
>  	console_config();
>  #endif
>  	/* Early detection of CMP support */
> -	mips_cm_probe();
>  	mips_cpc_probe();
>  
>  	if (!register_cps_smp_ops())
> @@ -304,10 +303,3 @@ mips_pci_controller:
>  		return;
>  	register_up_smp_ops();
>  }
> -
> -void platform_early_l2_init(void)
> -{
> -	/* L2 configuration lives in the CM3 */
> -	if (mips_cm_revision() >= CM_REV_CM3)
> -		mips_cm_probe();
> -}
> -- 
> 2.7.0

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] MIPS: Fix early CM probing
@ 2018-01-01 23:12   ` NeilBrown
  0 siblings, 0 replies; 6+ messages in thread
From: NeilBrown @ 2018-01-01 23:12 UTC (permalink / raw)
  To: Paul Burton, linux-mips
  Cc: Andrzej Hajda, Aaro Koskinen, Masahiro Yamada, Rob Herring,
	Alexander Sverdlin, Peter Hurley, linux-kernel, Leonid Yegoshin,
	Jaedon Shin, James Hogan, Jonas Gorski, Markos Chandras,
	Ralf Baechle

[-- Attachment #1: Type: text/plain, Size: 3874 bytes --]

On Mon, Feb 08 2016, Paul Burton wrote:

> Commit c014d164f21d ("MIPS: Add platform callback before initializing
> the L2 cache") added a platform_early_l2_init function in order to allow
> platforms to probe for the CM before L2 initialisation is performed, so
> that CM GCRs are available to mips_sc_probe.
>
> That commit actually fails to do anything useful, since it checks
> mips_cm_revision to determine whether it should call mips_cm_probe but
> the result of mips_cm_revision will always be 0 until mips_cm_probe has
> been called. Thus the "early" mips_cm_probe call never occurs.
>
> Fix this & drop the useless weak platform_early_l2_init function by
> simply calling mips_cm_probe from setup_arch. For platforms that don't
> select CONFIG_MIPS_CM this will be a no-op, and for those that do it
> removes the requirement for them to call mips_cm_probe manually
> (although doing so isn't harmful for now).
>
> Signed-off-by: Paul Burton <paul.burton@imgtec.com>

Hi,
 this change breaks the "gnubee" open-hardware NAS board (gnubee.org),
 which is based on a mediatek mt7621 SOC (which admittedly needs a bunch
 of other patches to work at all).

 I forward ported the patches from a mostly-working 4.4-based release to
 upstream and it didn't even print anything to the console.   "git
 bisect" led me to this patch.
 Reverting the change to setup_arch() means my mainline-based kernel
 gets a lot further.

 Based on the description above, I thought that maybe I should just
 disabled CONFIG_MIPS_CM, but that is selected automatically by
 CONFIG_MIPS_GIC, and I suspect that I need that.

 Can you suggest anything I might try to isolate why mips_cm_probe()
 might be causing a problem on this hardware?

Thanks,
NeilBrown


> ---
>
>  arch/mips/kernel/setup.c         |  1 +
>  arch/mips/mm/sc-mips.c           | 10 ----------
>  arch/mips/mti-malta/malta-init.c |  8 --------
>  3 files changed, 1 insertion(+), 18 deletions(-)
>
> diff --git a/arch/mips/kernel/setup.c b/arch/mips/kernel/setup.c
> index 569a7d5..5fdaf8b 100644
> --- a/arch/mips/kernel/setup.c
> +++ b/arch/mips/kernel/setup.c
> @@ -782,6 +782,7 @@ static inline void prefill_possible_map(void) {}
>  void __init setup_arch(char **cmdline_p)
>  {
>  	cpu_probe();
> +	mips_cm_probe();
>  	prom_init();
>  
>  	setup_early_fdc_console();
> diff --git a/arch/mips/mm/sc-mips.c b/arch/mips/mm/sc-mips.c
> index 3bd0597..2496475 100644
> --- a/arch/mips/mm/sc-mips.c
> +++ b/arch/mips/mm/sc-mips.c
> @@ -181,10 +181,6 @@ static int __init mips_sc_probe_cm3(void)
>  	return 1;
>  }
>  
> -void __weak platform_early_l2_init(void)
> -{
> -}
> -
>  static inline int __init mips_sc_probe(void)
>  {
>  	struct cpuinfo_mips *c = &current_cpu_data;
> @@ -194,12 +190,6 @@ static inline int __init mips_sc_probe(void)
>  	/* Mark as not present until probe completed */
>  	c->scache.flags |= MIPS_CACHE_NOT_PRESENT;
>  
> -	/*
> -	 * Do we need some platform specific probing before
> -	 * we configure L2?
> -	 */
> -	platform_early_l2_init();
> -
>  	if (mips_cm_revision() >= CM_REV_CM3)
>  		return mips_sc_probe_cm3();
>  
> diff --git a/arch/mips/mti-malta/malta-init.c b/arch/mips/mti-malta/malta-init.c
> index 571148c..dc2c521 100644
> --- a/arch/mips/mti-malta/malta-init.c
> +++ b/arch/mips/mti-malta/malta-init.c
> @@ -293,7 +293,6 @@ mips_pci_controller:
>  	console_config();
>  #endif
>  	/* Early detection of CMP support */
> -	mips_cm_probe();
>  	mips_cpc_probe();
>  
>  	if (!register_cps_smp_ops())
> @@ -304,10 +303,3 @@ mips_pci_controller:
>  		return;
>  	register_up_smp_ops();
>  }
> -
> -void platform_early_l2_init(void)
> -{
> -	/* L2 configuration lives in the CM3 */
> -	if (mips_cm_revision() >= CM_REV_CM3)
> -		mips_cm_probe();
> -}
> -- 
> 2.7.0

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] MIPS: Fix early CM probing
  2016-02-08 17:46 ` Paul Burton
                   ` (2 preceding siblings ...)
  (?)
@ 2018-01-01 23:56 ` NeilBrown
  -1 siblings, 0 replies; 6+ messages in thread
From: NeilBrown @ 2018-01-01 23:56 UTC (permalink / raw)
  To: Paul Burton, linux-mips
  Cc: Andrzej Hajda, Aaro Koskinen, Masahiro Yamada, Rob Herring,
	Alexander Sverdlin, Peter Hurley, linux-kernel, Leonid Yegoshin,
	Jaedon Shin, James Hogan, Jonas Gorski, Ralf Baechle

[-- Attachment #1: Type: text/plain, Size: 3934 bytes --]


[Resending with some addresses converted to @mips.com]

On Mon, Feb 08 2016, Paul Burton wrote:

> Commit c014d164f21d ("MIPS: Add platform callback before initializing
> the L2 cache") added a platform_early_l2_init function in order to allow
> platforms to probe for the CM before L2 initialisation is performed, so
> that CM GCRs are available to mips_sc_probe.
>
> That commit actually fails to do anything useful, since it checks
> mips_cm_revision to determine whether it should call mips_cm_probe but
> the result of mips_cm_revision will always be 0 until mips_cm_probe has
> been called. Thus the "early" mips_cm_probe call never occurs.
>
> Fix this & drop the useless weak platform_early_l2_init function by
> simply calling mips_cm_probe from setup_arch. For platforms that don't
> select CONFIG_MIPS_CM this will be a no-op, and for those that do it
> removes the requirement for them to call mips_cm_probe manually
> (although doing so isn't harmful for now).
>
> Signed-off-by: Paul Burton <paul.burton@imgtec.com>

Hi,
 this change breaks the "gnubee" open-hardware NAS board (gnubee.org),
 which is based on a mediatek mt7621 SOC (which admittedly needs a bunch
 of other patches to work at all).

 I forward ported the patches from a mostly-working 4.4-based release to
 upstream and it didn't even print anything to the console.   "git
 bisect" led me to this patch.
 Reverting the change to setup_arch() means my mainline-based kernel
 gets a lot further.

 Based on the description above, I thought that maybe I should just
 disabled CONFIG_MIPS_CM, but that is selected automatically by
 CONFIG_MIPS_GIC, and I suspect that I need that.

 Can you suggest anything I might try to isolate why mips_cm_probe()
 might be causing a problem on this hardware?

Thanks,
NeilBrown


> ---
>
>  arch/mips/kernel/setup.c         |  1 +
>  arch/mips/mm/sc-mips.c           | 10 ----------
>  arch/mips/mti-malta/malta-init.c |  8 --------
>  3 files changed, 1 insertion(+), 18 deletions(-)
>
> diff --git a/arch/mips/kernel/setup.c b/arch/mips/kernel/setup.c
> index 569a7d5..5fdaf8b 100644
> --- a/arch/mips/kernel/setup.c
> +++ b/arch/mips/kernel/setup.c
> @@ -782,6 +782,7 @@ static inline void prefill_possible_map(void) {}
>  void __init setup_arch(char **cmdline_p)
>  {
>  	cpu_probe();
> +	mips_cm_probe();
>  	prom_init();
>  
>  	setup_early_fdc_console();
> diff --git a/arch/mips/mm/sc-mips.c b/arch/mips/mm/sc-mips.c
> index 3bd0597..2496475 100644
> --- a/arch/mips/mm/sc-mips.c
> +++ b/arch/mips/mm/sc-mips.c
> @@ -181,10 +181,6 @@ static int __init mips_sc_probe_cm3(void)
>  	return 1;
>  }
>  
> -void __weak platform_early_l2_init(void)
> -{
> -}
> -
>  static inline int __init mips_sc_probe(void)
>  {
>  	struct cpuinfo_mips *c = &current_cpu_data;
> @@ -194,12 +190,6 @@ static inline int __init mips_sc_probe(void)
>  	/* Mark as not present until probe completed */
>  	c->scache.flags |= MIPS_CACHE_NOT_PRESENT;
>  
> -	/*
> -	 * Do we need some platform specific probing before
> -	 * we configure L2?
> -	 */
> -	platform_early_l2_init();
> -
>  	if (mips_cm_revision() >= CM_REV_CM3)
>  		return mips_sc_probe_cm3();
>  
> diff --git a/arch/mips/mti-malta/malta-init.c b/arch/mips/mti-malta/malta-init.c
> index 571148c..dc2c521 100644
> --- a/arch/mips/mti-malta/malta-init.c
> +++ b/arch/mips/mti-malta/malta-init.c
> @@ -293,7 +293,6 @@ mips_pci_controller:
>  	console_config();
>  #endif
>  	/* Early detection of CMP support */
> -	mips_cm_probe();
>  	mips_cpc_probe();
>  
>  	if (!register_cps_smp_ops())
> @@ -304,10 +303,3 @@ mips_pci_controller:
>  		return;
>  	register_up_smp_ops();
>  }
> -
> -void platform_early_l2_init(void)
> -{
> -	/* L2 configuration lives in the CM3 */
> -	if (mips_cm_revision() >= CM_REV_CM3)
> -		mips_cm_probe();
> -}
> -- 
> 2.7.0

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2018-01-01 23:57 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-08 17:46 [PATCH] MIPS: Fix early CM probing Paul Burton
2016-02-08 17:46 ` Paul Burton
2016-02-09 15:46 ` Alexander Sverdlin
2018-01-01 23:12 ` NeilBrown
2018-01-01 23:12   ` NeilBrown
2018-01-01 23:56 ` NeilBrown

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.