Subject: [PATCH] Avoid compile warnings on Sibyte using 2.6.10-rc3

From: Manish Lachwani <[email-masked]>
Date: Wed, 15 Dec 2004 15:56:32 -0800

Hi Ralf,

The attached patch is needed to prevent the compilation warnings that
occur when using 2.6.10-rc3 on Sibyte. Please review 

Thanks
Manish Lachwani

--- include/asm-mips/cpu-features.h.orig	2004-12-15 11:18:23.000000000 -0800
+++ include/asm-mips/cpu-features.h	2004-12-15 11:18:43.000000000 -0800
@@ -92,8 +92,10 @@
 #define cpu_icache_snoops_remote_store	(cpu_data[0].icache.flags & MIPS_IC_SNOOPS_REMOTE)
 #endif
 #else
+#ifndef cpu_icache_snoops_remote_store
 #define cpu_icache_snoops_remote_store	1
 #endif
+#endif
 
 /*
  * Certain CPUs may throw bizarre exceptions if not the whole cacheline

---

From: "Steven J. Hill" <[email-masked]>
Date: Wed, 15 Dec 2004 21:11:57 -0600

> occur when using 2.6.10-rc3 on Sibyte. Please review 
I don't ever see any warning associated with this. Can you provide a
little more information?

-Steve

---

From: Manish Lachwani <[email-masked]>
Date: Wed, 15 Dec 2004 19:28:11 -0800

> I don't ever see any warning associated with this. Can you provide a
Hi Steve,

When did you last sync with CVS?  There was a change introduced : 
http://www.linux-mips.org/cvsweb/linux/include/asm-mips/mach-sibyte/cpu-feature-overrides.h.diff?r1=1.1&r2=1.2

There is another #define in include/asm-mips/

#ifdef CONFIG_SMP
#ifndef cpu_icache_snoops_remote_store
#define cpu_icache_snoops_remote_store  (cpu_data[0].icache.flags & 
MIPS_IC_SNOOPS_REMOTE)
#endif
#else
#define cpu_icache_snoops_remote_store  1
#endif

And if running Sibyte in UP mode, cpu_icache_snoops_remote_store is 
redefined

Thanks
Manish

---

From: "Steven J. Hill" <[email-masked]>
Date: Wed, 15 Dec 2004 21:49:15 -0600

> When did you last sync with CVS?  There was a change introduced : 
Literally 10 minutes ago and I did a fresh compile.

> And if running Sibyte in UP mode, cpu_icache_snoops_remote_store is 
I do not run in UP mode, so that is why I did not see it. I suggest
a different version attached. How does that work for you?

-Steve

Index: cpu-features.h
===================================================================
RCS file: /home/cvs/linux/include/asm-mips/cpu-features.h,v
retrieving revision 1.9
diff -u -r1.9 cpu-features.h
--- cpu-features.h	7 Dec 2004 02:08:34 -0000	1.9
+++ cpu-features.h	16 Dec 2004 03:42:03 -0000
@@ -87,13 +87,13 @@
  * that did the store so we can't optimize this into only doing the flush on
  * the local CPU.
  */
-#ifdef CONFIG_SMP
 #ifndef cpu_icache_snoops_remote_store
+#ifdef CONFIG_SMP
 #define cpu_icache_snoops_remote_store	(cpu_data[0].icache.flags & MIPS_IC_SNOOPS_REMOTE)
-#endif
 #else
 #define cpu_icache_snoops_remote_store	1
 #endif
+#endif
 
 /*

---

From: Manish Lachwani <[email-masked]>
Date: Wed, 15 Dec 2004 19:49:57 -0800

Steven J. Hill wrote:

>------------------------------------------------------------------------
>
>Index: cpu-features.h
Looks good to me

Thanks
Manish Lachwani

---

From: Manish Lachwani <[email-masked]>
Date: Wed, 15 Dec 2004 19:54:23 -0800

On a side note, I think this problem will appear on other arches as well 
when running in UP mode.

Thanks
Manish Lachwani

---

From: "Maciej W. Rozycki" <[email-masked]>
Date: Thu, 16 Dec 2004 03:57:45 +0000 (GMT)

> a different version attached. How does that work for you?

 This begs for indentation. ;-)

  Maciej