All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* Patches for all four au1000 setup.c files
@ 2003-03-21  8:55 Hartvig Ekner
  2003-03-21 15:58 ` Pete Popov
  2003-03-21 19:39 ` Jeff Baitis
  0 siblings, 2 replies; 7+ messages in thread
From: Hartvig Ekner @ 2003-03-21  8:55 UTC (permalink / raw
  To: Linux MIPS mailing list

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

Hi,

the patches below for all four au1000 setup.c files removes the wbflush() routine, as this is no longer necessary
(handled by the generic code now, which does a sync). This also means that it is not necessary to say yes to
CONFIG_CPU_ADVANCED and override the CPU_HAS_WB setting, as the generic MIPS32 code will do just fine.

The patch for the db1x00 setup.c file also fixes a bug which prevented VRA from being used with Audio Codecs
which support it.

/Hartvig



[-- Attachment #2: setup.patch --]
[-- Type: text/plain, Size: 4138 bytes --]

Index: db1x00/setup.c
===================================================================
RCS file: /home/cvs/linux/arch/mips/au1000/db1x00/Attic/setup.c,v
retrieving revision 1.1.2.3
diff -u -r1.1.2.3 setup.c
--- db1x00/setup.c	7 Jan 2003 10:41:30 -0000	1.1.2.3
+++ db1x00/setup.c	21 Mar 2003 08:44:49 -0000
@@ -61,7 +61,6 @@
 extern struct ide_ops *ide_ops;
 #endif
 
-void (*__wbflush) (void);
 extern struct rtc_ops no_rtc_ops;
 extern char * __init prom_getcmdline(void);
 extern void au1000_restart(char *);
@@ -76,11 +75,6 @@
 
 void __init bus_error_init(void) { /* nothing */ }
 
-void au1x00_wbflush(void)
-{
-	__asm__ volatile ("sync");
-}
-
 void __init au1x00_setup(void)
 {
 	char *argptr;
@@ -109,14 +103,13 @@
     }
 #endif
 
-#if defined(CONFIG_SOUND_AU1000) && !defined(CONFIG_CPU_AU1000)
+#if defined(CONFIG_SOUND_AU1X00) && !defined(CONFIG_CPU_AU1000)
 	// au1000 does not support vra, au1500 and au1100 do
-    strcat(argptr, " au1000_audio=vra");
-    argptr = prom_getcmdline();
+	strcat(argptr, " au1000_audio=vra");
+	argptr = prom_getcmdline();
 #endif
 
 	rtc_ops = &no_rtc_ops;
-	__wbflush = au1x00_wbflush;
 	_machine_restart = au1000_restart;
 	_machine_halt = au1000_halt;
 	_machine_power_off = au1000_power_off;
Index: pb1000/setup.c
===================================================================
RCS file: /home/cvs/linux/arch/mips/au1000/pb1000/setup.c,v
retrieving revision 1.8.2.8
diff -u -r1.8.2.8 setup.c
--- pb1000/setup.c	11 Dec 2002 06:12:29 -0000	1.8.2.8
+++ pb1000/setup.c	21 Mar 2003 08:44:50 -0000
@@ -67,7 +67,6 @@
 extern struct ide_ops *ide_ops;
 #endif
 
-void (*__wbflush) (void);
 extern struct rtc_ops no_rtc_ops;
 extern char * __init prom_getcmdline(void);
 extern void au1000_restart(char *);
@@ -78,11 +77,6 @@
 
 void __init bus_error_init(void) { /* nothing */ }
 
-void au1000_wbflush(void)
-{
-	__asm__ volatile ("sync");
-}
-
 void __init au1x00_setup(void)
 {
 	char *argptr;
@@ -103,7 +97,6 @@
 #endif
 
 	rtc_ops = &no_rtc_ops;
-        __wbflush = au1000_wbflush;
 	_machine_restart = au1000_restart;
 	_machine_halt = au1000_halt;
 	_machine_power_off = au1000_power_off;
Index: pb1100/setup.c
===================================================================
RCS file: /home/cvs/linux/arch/mips/au1000/pb1100/setup.c,v
retrieving revision 1.1.2.6
diff -u -r1.1.2.6 setup.c
--- pb1100/setup.c	31 Dec 2002 05:00:22 -0000	1.1.2.6
+++ pb1100/setup.c	21 Mar 2003 08:44:50 -0000
@@ -71,7 +71,6 @@
 extern struct rtc_ops pb1500_rtc_ops;
 #endif
 
-void (*__wbflush) (void);
 extern char * __init prom_getcmdline(void);
 extern void au1000_restart(char *);
 extern void au1000_halt(void);
@@ -82,11 +81,6 @@
 
 void __init bus_error_init(void) { /* nothing */ }
 
-void au1100_wbflush(void)
-{
-	__asm__ volatile ("sync");
-}
-
 void __init au1x00_setup(void)
 {
 	char *argptr;
@@ -112,7 +106,6 @@
 	argptr = prom_getcmdline();
 #endif
 
-        __wbflush = au1100_wbflush;
 	_machine_restart = au1000_restart;
 	_machine_halt = au1000_halt;
 	_machine_power_off = au1000_power_off;
Index: pb1500/setup.c
===================================================================
RCS file: /home/cvs/linux/arch/mips/au1000/pb1500/setup.c,v
retrieving revision 1.1.2.10
diff -u -r1.1.2.10 setup.c
--- pb1500/setup.c	29 Dec 2002 10:30:35 -0000	1.1.2.10
+++ pb1500/setup.c	21 Mar 2003 08:44:50 -0000
@@ -43,7 +43,6 @@
 #include <asm/mipsregs.h>
 #include <asm/reboot.h>
 #include <asm/pgtable.h>
-#include <asm/wbflush.h>
 #include <asm/au1000.h>
 #include <asm/pb1500.h>
 
@@ -72,7 +71,6 @@
 extern struct rtc_ops pb1500_rtc_ops;
 #endif
 
-void (*__wbflush) (void);
 extern char * __init prom_getcmdline(void);
 extern void au1000_restart(char *);
 extern void au1000_halt(void);
@@ -87,11 +85,6 @@
 
 void __init bus_error_init(void) { /* nothing */ }
 
-void au1500_wbflush(void)
-{
-	__asm__ volatile ("sync");
-}
-
 void __init au1x00_setup(void)
 {
 	char *argptr;
@@ -117,7 +110,6 @@
 	argptr = prom_getcmdline();
 #endif
 
-        __wbflush = au1500_wbflush;
 	_machine_restart = au1000_restart;
 	_machine_halt = au1000_halt;
 	_machine_power_off = au1000_power_off;

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

* Re: Patches for all four au1000 setup.c files
  2003-03-21  8:55 Patches for all four au1000 setup.c files Hartvig Ekner
@ 2003-03-21 15:58 ` Pete Popov
  2003-03-21 19:39 ` Jeff Baitis
  1 sibling, 0 replies; 7+ messages in thread
From: Pete Popov @ 2003-03-21 15:58 UTC (permalink / raw
  To: Hartvig Ekner; +Cc: Linux MIPS mailing list

Thanks, I'll take care of them.

Pete

On Fri, 2003-03-21 at 00:55, Hartvig Ekner wrote:
> Hi,
> 
> the patches below for all four au1000 setup.c files removes the wbflush() routine, as this is no longer necessary
> (handled by the generic code now, which does a sync). This also means that it is not necessary to say yes to
> CONFIG_CPU_ADVANCED and override the CPU_HAS_WB setting, as the generic MIPS32 code will do just fine.
> 
> The patch for the db1x00 setup.c file also fixes a bug which prevented VRA from being used with Audio Codecs
> which support it.
> 
> /Hartvig
> 
> 
> 
> ______________________________________________________________________
> 
> Index: db1x00/setup.c
> ===================================================================
> RCS file: /home/cvs/linux/arch/mips/au1000/db1x00/Attic/setup.c,v
> retrieving revision 1.1.2.3
> diff -u -r1.1.2.3 setup.c
> --- db1x00/setup.c	7 Jan 2003 10:41:30 -0000	1.1.2.3
> +++ db1x00/setup.c	21 Mar 2003 08:44:49 -0000
> @@ -61,7 +61,6 @@
>  extern struct ide_ops *ide_ops;
>  #endif
>  
> -void (*__wbflush) (void);
>  extern struct rtc_ops no_rtc_ops;
>  extern char * __init prom_getcmdline(void);
>  extern void au1000_restart(char *);
> @@ -76,11 +75,6 @@
>  
>  void __init bus_error_init(void) { /* nothing */ }
>  
> -void au1x00_wbflush(void)
> -{
> -	__asm__ volatile ("sync");
> -}
> -
>  void __init au1x00_setup(void)
>  {
>  	char *argptr;
> @@ -109,14 +103,13 @@
>      }
>  #endif
>  
> -#if defined(CONFIG_SOUND_AU1000) && !defined(CONFIG_CPU_AU1000)
> +#if defined(CONFIG_SOUND_AU1X00) && !defined(CONFIG_CPU_AU1000)
>  	// au1000 does not support vra, au1500 and au1100 do
> -    strcat(argptr, " au1000_audio=vra");
> -    argptr = prom_getcmdline();
> +	strcat(argptr, " au1000_audio=vra");
> +	argptr = prom_getcmdline();
>  #endif
>  
>  	rtc_ops = &no_rtc_ops;
> -	__wbflush = au1x00_wbflush;
>  	_machine_restart = au1000_restart;
>  	_machine_halt = au1000_halt;
>  	_machine_power_off = au1000_power_off;
> Index: pb1000/setup.c
> ===================================================================
> RCS file: /home/cvs/linux/arch/mips/au1000/pb1000/setup.c,v
> retrieving revision 1.8.2.8
> diff -u -r1.8.2.8 setup.c
> --- pb1000/setup.c	11 Dec 2002 06:12:29 -0000	1.8.2.8
> +++ pb1000/setup.c	21 Mar 2003 08:44:50 -0000
> @@ -67,7 +67,6 @@
>  extern struct ide_ops *ide_ops;
>  #endif
>  
> -void (*__wbflush) (void);
>  extern struct rtc_ops no_rtc_ops;
>  extern char * __init prom_getcmdline(void);
>  extern void au1000_restart(char *);
> @@ -78,11 +77,6 @@
>  
>  void __init bus_error_init(void) { /* nothing */ }
>  
> -void au1000_wbflush(void)
> -{
> -	__asm__ volatile ("sync");
> -}
> -
>  void __init au1x00_setup(void)
>  {
>  	char *argptr;
> @@ -103,7 +97,6 @@
>  #endif
>  
>  	rtc_ops = &no_rtc_ops;
> -        __wbflush = au1000_wbflush;
>  	_machine_restart = au1000_restart;
>  	_machine_halt = au1000_halt;
>  	_machine_power_off = au1000_power_off;
> Index: pb1100/setup.c
> ===================================================================
> RCS file: /home/cvs/linux/arch/mips/au1000/pb1100/setup.c,v
> retrieving revision 1.1.2.6
> diff -u -r1.1.2.6 setup.c
> --- pb1100/setup.c	31 Dec 2002 05:00:22 -0000	1.1.2.6
> +++ pb1100/setup.c	21 Mar 2003 08:44:50 -0000
> @@ -71,7 +71,6 @@
>  extern struct rtc_ops pb1500_rtc_ops;
>  #endif
>  
> -void (*__wbflush) (void);
>  extern char * __init prom_getcmdline(void);
>  extern void au1000_restart(char *);
>  extern void au1000_halt(void);
> @@ -82,11 +81,6 @@
>  
>  void __init bus_error_init(void) { /* nothing */ }
>  
> -void au1100_wbflush(void)
> -{
> -	__asm__ volatile ("sync");
> -}
> -
>  void __init au1x00_setup(void)
>  {
>  	char *argptr;
> @@ -112,7 +106,6 @@
>  	argptr = prom_getcmdline();
>  #endif
>  
> -        __wbflush = au1100_wbflush;
>  	_machine_restart = au1000_restart;
>  	_machine_halt = au1000_halt;
>  	_machine_power_off = au1000_power_off;
> Index: pb1500/setup.c
> ===================================================================
> RCS file: /home/cvs/linux/arch/mips/au1000/pb1500/setup.c,v
> retrieving revision 1.1.2.10
> diff -u -r1.1.2.10 setup.c
> --- pb1500/setup.c	29 Dec 2002 10:30:35 -0000	1.1.2.10
> +++ pb1500/setup.c	21 Mar 2003 08:44:50 -0000
> @@ -43,7 +43,6 @@
>  #include <asm/mipsregs.h>
>  #include <asm/reboot.h>
>  #include <asm/pgtable.h>
> -#include <asm/wbflush.h>
>  #include <asm/au1000.h>
>  #include <asm/pb1500.h>
>  
> @@ -72,7 +71,6 @@
>  extern struct rtc_ops pb1500_rtc_ops;
>  #endif
>  
> -void (*__wbflush) (void);
>  extern char * __init prom_getcmdline(void);
>  extern void au1000_restart(char *);
>  extern void au1000_halt(void);
> @@ -87,11 +85,6 @@
>  
>  void __init bus_error_init(void) { /* nothing */ }
>  
> -void au1500_wbflush(void)
> -{
> -	__asm__ volatile ("sync");
> -}
> -
>  void __init au1x00_setup(void)
>  {
>  	char *argptr;
> @@ -117,7 +110,6 @@
>  	argptr = prom_getcmdline();
>  #endif
>  
> -        __wbflush = au1500_wbflush;
>  	_machine_restart = au1000_restart;
>  	_machine_halt = au1000_halt;
>  	_machine_power_off = au1000_power_off;

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

* Re: Patches for all four au1000 setup.c files
  2003-03-21  8:55 Patches for all four au1000 setup.c files Hartvig Ekner
  2003-03-21 15:58 ` Pete Popov
@ 2003-03-21 19:39 ` Jeff Baitis
  2003-03-21 22:12   ` Hartvig Ekner
  1 sibling, 1 reply; 7+ messages in thread
From: Jeff Baitis @ 2003-03-21 19:39 UTC (permalink / raw
  To: Hartvig Ekner; +Cc: Linux MIPS mailing list

On the subject of __wbflush():

It seems to me that setup.c should be exporting __wbflush, since there are some
modules that require this symbol. Try compiling the 8139 ethernet module, or
HostAP wireless drivers :)

Are the following patches correct?
Thanks!

-Jeff

Index: Makefile
===================================================================
RCS file: /home/cvs/linux/arch/mips/au1000/db1x00/Attic/Makefile,v
retrieving revision 1.1.2.2
diff -u -r1.1.2.2 Makefile
--- Makefile    5 Mar 2003 08:18:58 -0000       1.1.2.2
+++ Makefile    21 Mar 2003 19:34:11 -0000
@@ -19,4 +19,6 @@
 
 obj-y := init.o setup.o
 
+export-objs := setup.o
+
 include $(TOPDIR)/Rules.make


Index: setup.c
===================================================================
RCS file: /home/cvs/linux/arch/mips/au1000/db1x00/Attic/setup.c,v
retrieving revision 1.1.2.3
diff -u -r1.1.2.3 setup.c
--- setup.c     7 Jan 2003 10:41:30 -0000       1.1.2.3
+++ setup.c     21 Mar 2003 19:34:19 -0000
@@ -242,3 +242,7 @@
                return phys_addr;
 }
 #endif
+
+#include <linux/module.h>
+EXPORT_SYMBOL(__wbflush);
+






On Fri, Mar 21, 2003 at 09:55:10AM +0100, Hartvig Ekner wrote:
> Hi,
> 
> the patches below for all four au1000 setup.c files removes the wbflush() routine, as this is no longer necessary
> (handled by the generic code now, which does a sync). This also means that it is not necessary to say yes to
> CONFIG_CPU_ADVANCED and override the CPU_HAS_WB setting, as the generic MIPS32 code will do just fine.
> 
> The patch for the db1x00 setup.c file also fixes a bug which prevented VRA from being used with Audio Codecs
> which support it.
> 
> /Hartvig
> 
> 

> Index: db1x00/setup.c
> ===================================================================
> RCS file: /home/cvs/linux/arch/mips/au1000/db1x00/Attic/setup.c,v
> retrieving revision 1.1.2.3
> diff -u -r1.1.2.3 setup.c
> --- db1x00/setup.c	7 Jan 2003 10:41:30 -0000	1.1.2.3
> +++ db1x00/setup.c	21 Mar 2003 08:44:49 -0000
> @@ -61,7 +61,6 @@
>  extern struct ide_ops *ide_ops;
>  #endif
>  
> -void (*__wbflush) (void);
>  extern struct rtc_ops no_rtc_ops;
>  extern char * __init prom_getcmdline(void);
>  extern void au1000_restart(char *);
> @@ -76,11 +75,6 @@
>  
>  void __init bus_error_init(void) { /* nothing */ }
>  
> -void au1x00_wbflush(void)
> -{
> -	__asm__ volatile ("sync");
> -}
> -
>  void __init au1x00_setup(void)
>  {
>  	char *argptr;
> @@ -109,14 +103,13 @@
>      }
>  #endif
>  
> -#if defined(CONFIG_SOUND_AU1000) && !defined(CONFIG_CPU_AU1000)
> +#if defined(CONFIG_SOUND_AU1X00) && !defined(CONFIG_CPU_AU1000)
>  	// au1000 does not support vra, au1500 and au1100 do
> -    strcat(argptr, " au1000_audio=vra");
> -    argptr = prom_getcmdline();
> +	strcat(argptr, " au1000_audio=vra");
> +	argptr = prom_getcmdline();
>  #endif
>  
>  	rtc_ops = &no_rtc_ops;
> -	__wbflush = au1x00_wbflush;
>  	_machine_restart = au1000_restart;
>  	_machine_halt = au1000_halt;
>  	_machine_power_off = au1000_power_off;
> Index: pb1000/setup.c
> ===================================================================
> RCS file: /home/cvs/linux/arch/mips/au1000/pb1000/setup.c,v
> retrieving revision 1.8.2.8
> diff -u -r1.8.2.8 setup.c
> --- pb1000/setup.c	11 Dec 2002 06:12:29 -0000	1.8.2.8
> +++ pb1000/setup.c	21 Mar 2003 08:44:50 -0000
> @@ -67,7 +67,6 @@
>  extern struct ide_ops *ide_ops;
>  #endif
>  
> -void (*__wbflush) (void);
>  extern struct rtc_ops no_rtc_ops;
>  extern char * __init prom_getcmdline(void);
>  extern void au1000_restart(char *);
> @@ -78,11 +77,6 @@
>  
>  void __init bus_error_init(void) { /* nothing */ }
>  
> -void au1000_wbflush(void)
> -{
> -	__asm__ volatile ("sync");
> -}
> -
>  void __init au1x00_setup(void)
>  {
>  	char *argptr;
> @@ -103,7 +97,6 @@
>  #endif
>  
>  	rtc_ops = &no_rtc_ops;
> -        __wbflush = au1000_wbflush;
>  	_machine_restart = au1000_restart;
>  	_machine_halt = au1000_halt;
>  	_machine_power_off = au1000_power_off;
> Index: pb1100/setup.c
> ===================================================================
> RCS file: /home/cvs/linux/arch/mips/au1000/pb1100/setup.c,v
> retrieving revision 1.1.2.6
> diff -u -r1.1.2.6 setup.c
> --- pb1100/setup.c	31 Dec 2002 05:00:22 -0000	1.1.2.6
> +++ pb1100/setup.c	21 Mar 2003 08:44:50 -0000
> @@ -71,7 +71,6 @@
>  extern struct rtc_ops pb1500_rtc_ops;
>  #endif
>  
> -void (*__wbflush) (void);
>  extern char * __init prom_getcmdline(void);
>  extern void au1000_restart(char *);
>  extern void au1000_halt(void);
> @@ -82,11 +81,6 @@
>  
>  void __init bus_error_init(void) { /* nothing */ }
>  
> -void au1100_wbflush(void)
> -{
> -	__asm__ volatile ("sync");
> -}
> -
>  void __init au1x00_setup(void)
>  {
>  	char *argptr;
> @@ -112,7 +106,6 @@
>  	argptr = prom_getcmdline();
>  #endif
>  
> -        __wbflush = au1100_wbflush;
>  	_machine_restart = au1000_restart;
>  	_machine_halt = au1000_halt;
>  	_machine_power_off = au1000_power_off;
> Index: pb1500/setup.c
> ===================================================================
> RCS file: /home/cvs/linux/arch/mips/au1000/pb1500/setup.c,v
> retrieving revision 1.1.2.10
> diff -u -r1.1.2.10 setup.c
> --- pb1500/setup.c	29 Dec 2002 10:30:35 -0000	1.1.2.10
> +++ pb1500/setup.c	21 Mar 2003 08:44:50 -0000
> @@ -43,7 +43,6 @@
>  #include <asm/mipsregs.h>
>  #include <asm/reboot.h>
>  #include <asm/pgtable.h>
> -#include <asm/wbflush.h>
>  #include <asm/au1000.h>
>  #include <asm/pb1500.h>
>  
> @@ -72,7 +71,6 @@
>  extern struct rtc_ops pb1500_rtc_ops;
>  #endif
>  
> -void (*__wbflush) (void);
>  extern char * __init prom_getcmdline(void);
>  extern void au1000_restart(char *);
>  extern void au1000_halt(void);
> @@ -87,11 +85,6 @@
>  
>  void __init bus_error_init(void) { /* nothing */ }
>  
> -void au1500_wbflush(void)
> -{
> -	__asm__ volatile ("sync");
> -}
> -
>  void __init au1x00_setup(void)
>  {
>  	char *argptr;
> @@ -117,7 +110,6 @@
>  	argptr = prom_getcmdline();
>  #endif
>  
> -        __wbflush = au1500_wbflush;
>  	_machine_restart = au1000_restart;
>  	_machine_halt = au1000_halt;
>  	_machine_power_off = au1000_power_off;


-- 
         Jeffrey Baitis - Associate Software Engineer

                    Evolution Robotics, Inc.
                     130 West Union Street
                       Pasadena CA 91103

 tel: 626.535.2776  |  fax: 626.535.2777  |  baitisj@evolution.com 

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

* Re: Patches for all four au1000 setup.c files
  2003-03-21 19:39 ` Jeff Baitis
@ 2003-03-21 22:12   ` Hartvig Ekner
  2003-03-21 22:33     ` Juan Quintela
  0 siblings, 1 reply; 7+ messages in thread
From: Hartvig Ekner @ 2003-03-21 22:12 UTC (permalink / raw
  To: baitisj; +Cc: Linux MIPS mailing list

Hi Jeff,

Are you talking about these two 8139 files from 2.4?

/home/hartvige/src/linux/linux-ralf/drivers/net> ls *8139*.c
8139cp.c  8139too.c

I can't see that they are using wbflush in any way. Grepping after wbflush through the
entire 2.4 tree, it seems wbflush is something only present on some dec platforms and then
the au1000 stuff - which would mean that any driver directly calling __wbflush would be
unable to compile/load on the majority of kernels. Or am I missing something? (I haven't
been using modules under MIPS at all).

In fact, I can't find a single file including wbflush.h except system.h, and it doesn't look
like anybody else should directly be including the wbflush.h file, but only use the macros
in system.h:

#define wmb()           fast_wmb()
#define rmb()           fast_rmb()
#define mb()            wbflush();
#define iob()           wbflush();

(which are differently defined if there is no WB configured).

/Hartvig

Jeff Baitis wrote:

> On the subject of __wbflush():
>
> It seems to me that setup.c should be exporting __wbflush, since there are some
> modules that require this symbol. Try compiling the 8139 ethernet module, or
> HostAP wireless drivers :)
>
> Are the following patches correct?
> Thanks!
>
> -Jeff
>
> Index: Makefile
> ===================================================================
> RCS file: /home/cvs/linux/arch/mips/au1000/db1x00/Attic/Makefile,v
> retrieving revision 1.1.2.2
> diff -u -r1.1.2.2 Makefile
> --- Makefile    5 Mar 2003 08:18:58 -0000       1.1.2.2
> +++ Makefile    21 Mar 2003 19:34:11 -0000
> @@ -19,4 +19,6 @@
>
>  obj-y := init.o setup.o
>
> +export-objs := setup.o
> +
>  include $(TOPDIR)/Rules.make
>
> Index: setup.c
> ===================================================================
> RCS file: /home/cvs/linux/arch/mips/au1000/db1x00/Attic/setup.c,v
> retrieving revision 1.1.2.3
> diff -u -r1.1.2.3 setup.c
> --- setup.c     7 Jan 2003 10:41:30 -0000       1.1.2.3
> +++ setup.c     21 Mar 2003 19:34:19 -0000
> @@ -242,3 +242,7 @@
>                 return phys_addr;
>  }
>  #endif
> +
> +#include <linux/module.h>
> +EXPORT_SYMBOL(__wbflush);
> +
>
> On Fri, Mar 21, 2003 at 09:55:10AM +0100, Hartvig Ekner wrote:
> > Hi,
> >
> > the patches below for all four au1000 setup.c files removes the wbflush() routine, as this is no longer necessary
> > (handled by the generic code now, which does a sync). This also means that it is not necessary to say yes to
> > CONFIG_CPU_ADVANCED and override the CPU_HAS_WB setting, as the generic MIPS32 code will do just fine.
> >
> > The patch for the db1x00 setup.c file also fixes a bug which prevented VRA from being used with Audio Codecs
> > which support it.
> >
> > /Hartvig
> >
> >
>
> > Index: db1x00/setup.c
> > ===================================================================
> > RCS file: /home/cvs/linux/arch/mips/au1000/db1x00/Attic/setup.c,v
> > retrieving revision 1.1.2.3
> > diff -u -r1.1.2.3 setup.c
> > --- db1x00/setup.c    7 Jan 2003 10:41:30 -0000       1.1.2.3
> > +++ db1x00/setup.c    21 Mar 2003 08:44:49 -0000
> > @@ -61,7 +61,6 @@
> >  extern struct ide_ops *ide_ops;
> >  #endif
> >
> > -void (*__wbflush) (void);
> >  extern struct rtc_ops no_rtc_ops;
> >  extern char * __init prom_getcmdline(void);
> >  extern void au1000_restart(char *);
> > @@ -76,11 +75,6 @@
> >
> >  void __init bus_error_init(void) { /* nothing */ }
> >
> > -void au1x00_wbflush(void)
> > -{
> > -     __asm__ volatile ("sync");
> > -}
> > -
> >  void __init au1x00_setup(void)
> >  {
> >       char *argptr;
> > @@ -109,14 +103,13 @@
> >      }
> >  #endif
> >
> > -#if defined(CONFIG_SOUND_AU1000) && !defined(CONFIG_CPU_AU1000)
> > +#if defined(CONFIG_SOUND_AU1X00) && !defined(CONFIG_CPU_AU1000)
> >       // au1000 does not support vra, au1500 and au1100 do
> > -    strcat(argptr, " au1000_audio=vra");
> > -    argptr = prom_getcmdline();
> > +     strcat(argptr, " au1000_audio=vra");
> > +     argptr = prom_getcmdline();
> >  #endif
> >
> >       rtc_ops = &no_rtc_ops;
> > -     __wbflush = au1x00_wbflush;
> >       _machine_restart = au1000_restart;
> >       _machine_halt = au1000_halt;
> >       _machine_power_off = au1000_power_off;
> > Index: pb1000/setup.c
> > ===================================================================
> > RCS file: /home/cvs/linux/arch/mips/au1000/pb1000/setup.c,v
> > retrieving revision 1.8.2.8
> > diff -u -r1.8.2.8 setup.c
> > --- pb1000/setup.c    11 Dec 2002 06:12:29 -0000      1.8.2.8
> > +++ pb1000/setup.c    21 Mar 2003 08:44:50 -0000
> > @@ -67,7 +67,6 @@
> >  extern struct ide_ops *ide_ops;
> >  #endif
> >
> > -void (*__wbflush) (void);
> >  extern struct rtc_ops no_rtc_ops;
> >  extern char * __init prom_getcmdline(void);
> >  extern void au1000_restart(char *);
> > @@ -78,11 +77,6 @@
> >
> >  void __init bus_error_init(void) { /* nothing */ }
> >
> > -void au1000_wbflush(void)
> > -{
> > -     __asm__ volatile ("sync");
> > -}
> > -
> >  void __init au1x00_setup(void)
> >  {
> >       char *argptr;
> > @@ -103,7 +97,6 @@
> >  #endif
> >
> >       rtc_ops = &no_rtc_ops;
> > -        __wbflush = au1000_wbflush;
> >       _machine_restart = au1000_restart;
> >       _machine_halt = au1000_halt;
> >       _machine_power_off = au1000_power_off;
> > Index: pb1100/setup.c
> > ===================================================================
> > RCS file: /home/cvs/linux/arch/mips/au1000/pb1100/setup.c,v
> > retrieving revision 1.1.2.6
> > diff -u -r1.1.2.6 setup.c
> > --- pb1100/setup.c    31 Dec 2002 05:00:22 -0000      1.1.2.6
> > +++ pb1100/setup.c    21 Mar 2003 08:44:50 -0000
> > @@ -71,7 +71,6 @@
> >  extern struct rtc_ops pb1500_rtc_ops;
> >  #endif
> >
> > -void (*__wbflush) (void);
> >  extern char * __init prom_getcmdline(void);
> >  extern void au1000_restart(char *);
> >  extern void au1000_halt(void);
> > @@ -82,11 +81,6 @@
> >
> >  void __init bus_error_init(void) { /* nothing */ }
> >
> > -void au1100_wbflush(void)
> > -{
> > -     __asm__ volatile ("sync");
> > -}
> > -
> >  void __init au1x00_setup(void)
> >  {
> >       char *argptr;
> > @@ -112,7 +106,6 @@
> >       argptr = prom_getcmdline();
> >  #endif
> >
> > -        __wbflush = au1100_wbflush;
> >       _machine_restart = au1000_restart;
> >       _machine_halt = au1000_halt;
> >       _machine_power_off = au1000_power_off;
> > Index: pb1500/setup.c
> > ===================================================================
> > RCS file: /home/cvs/linux/arch/mips/au1000/pb1500/setup.c,v
> > retrieving revision 1.1.2.10
> > diff -u -r1.1.2.10 setup.c
> > --- pb1500/setup.c    29 Dec 2002 10:30:35 -0000      1.1.2.10
> > +++ pb1500/setup.c    21 Mar 2003 08:44:50 -0000
> > @@ -43,7 +43,6 @@
> >  #include <asm/mipsregs.h>
> >  #include <asm/reboot.h>
> >  #include <asm/pgtable.h>
> > -#include <asm/wbflush.h>
> >  #include <asm/au1000.h>
> >  #include <asm/pb1500.h>
> >
> > @@ -72,7 +71,6 @@
> >  extern struct rtc_ops pb1500_rtc_ops;
> >  #endif
> >
> > -void (*__wbflush) (void);
> >  extern char * __init prom_getcmdline(void);
> >  extern void au1000_restart(char *);
> >  extern void au1000_halt(void);
> > @@ -87,11 +85,6 @@
> >
> >  void __init bus_error_init(void) { /* nothing */ }
> >
> > -void au1500_wbflush(void)
> > -{
> > -     __asm__ volatile ("sync");
> > -}
> > -
> >  void __init au1x00_setup(void)
> >  {
> >       char *argptr;
> > @@ -117,7 +110,6 @@
> >       argptr = prom_getcmdline();
> >  #endif
> >
> > -        __wbflush = au1500_wbflush;
> >       _machine_restart = au1000_restart;
> >       _machine_halt = au1000_halt;
> >       _machine_power_off = au1000_power_off;
>
> --
>          Jeffrey Baitis - Associate Software Engineer
>
>                     Evolution Robotics, Inc.
>                      130 West Union Street
>                        Pasadena CA 91103
>
>  tel: 626.535.2776  |  fax: 626.535.2777  |  baitisj@evolution.com

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

* Re: Patches for all four au1000 setup.c files
  2003-03-21 22:12   ` Hartvig Ekner
@ 2003-03-21 22:33     ` Juan Quintela
  2003-03-21 22:45       ` Hartvig Ekner
  0 siblings, 1 reply; 7+ messages in thread
From: Juan Quintela @ 2003-03-21 22:33 UTC (permalink / raw
  To: Hartvig Ekner; +Cc: baitisj, Linux MIPS mailing list

>>>>> "hartvig" == Hartvig Ekner <hartvig@ekner.info> writes:


hartvig> I can't see that they are using wbflush in any way. Grepping
hartvig> after wbflush through the entire 2.4 tree, it seems wbflush
hartvig> is something only present on some dec platforms and then the
hartvig> au1000 stuff - which would mean that any driver directly
hartvig> calling __wbflush would be unable to compile/load on the
hartvig> majority of kernels. Or am I missing something? (I haven't
hartvig> been using modules under MIPS at all).

Yes, you missed the definition of mb() :p

quintela$ grep "mb(" drivers/net/8139* | grep -v rmb | grep -v wmb
drivers/net/8139too.c:          mb();
quintela$ 


hartvig> In fact, I can't find a single file including wbflush.h
hartvig> except system.h, and it doesn't look like anybody else should
hartvig> directly be including the wbflush.h file, but only use the
hartvig> macros in system.h:

hartvig> #define wmb()           fast_wmb()
hartvig> #define rmb()           fast_rmb()
hartvig> #define mb()            wbflush();
hartvig> #define iob()           wbflush();

hartvig> (which are differently defined if there is no WB configured).

but WB is configured in :)

quintela$ grep WB arch/mips/defconfig-pb1*
arch/mips/defconfig-pb1000:CONFIG_CPU_HAS_WB=y
arch/mips/defconfig-pb1100:CONFIG_CPU_HAS_WB=y
arch/mips/defconfig-pb1500:CONFIG_CPU_HAS_WB=y
quintela$ 

Other thing is that this machine should be using wbflush at all, but
that is a different story.  I agree with  (/me looks in archive),
*your* patch removing wbflush for that boards.  They are only doing
"sync" ond wbflush, and that is the thing that __sync() already does.

I.e. If I have to chooses wich patch to integrate, the one exporting
__wbflush(), or the one removing it altogether from pb1*, I will
choose removing it.  It looks superflous.

Later, Juan "who don't have that processor, and handwaving is easy".

-- 
In theory, practice and theory are the same, but in practice they 
are different -- Larry McVoy

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

* Re: Patches for all four au1000 setup.c files
  2003-03-21 22:33     ` Juan Quintela
@ 2003-03-21 22:45       ` Hartvig Ekner
  2003-03-25  2:04         ` Jeff Baitis
  0 siblings, 1 reply; 7+ messages in thread
From: Hartvig Ekner @ 2003-03-21 22:45 UTC (permalink / raw
  To: Juan Quintela; +Cc: baitisj, Linux MIPS mailing list

Hi Juan,

Juan Quintela wrote:

> >>>>> "hartvig" == Hartvig Ekner <hartvig@ekner.info> writes:
>
> hartvig> I can't see that they are using wbflush in any way. Grepping
> hartvig> after wbflush through the entire 2.4 tree, it seems wbflush
> hartvig> is something only present on some dec platforms and then the
> hartvig> au1000 stuff - which would mean that any driver directly
> hartvig> calling __wbflush would be unable to compile/load on the
> hartvig> majority of kernels. Or am I missing something? (I haven't
> hartvig> been using modules under MIPS at all).
>
> Yes, you missed the definition of mb() :p
>
> quintela$ grep "mb(" drivers/net/8139* | grep -v rmb | grep -v wmb
> drivers/net/8139too.c:          mb();
> quintela$
>
> hartvig> In fact, I can't find a single file including wbflush.h
> hartvig> except system.h, and it doesn't look like anybody else should
> hartvig> directly be including the wbflush.h file, but only use the
> hartvig> macros in system.h:
>
> hartvig> #define wmb()           fast_wmb()
> hartvig> #define rmb()           fast_rmb()
> hartvig> #define mb()            wbflush();
> hartvig> #define iob()           wbflush();
>
> hartvig> (which are differently defined if there is no WB configured).
>
> but WB is configured in :)
>

That's the problem! Wb does not need to be configured in, it is a mistake. My patch was missing
the required fixes to the defconfig files, it was only described in the mail.  So I think the only
thing missing is a patch to fix all the pb/db defconfig files to look like this:

# CONFIG_CPU_ADVANCED is not set
CONFIG_CPU_HAS_LLSC=y
# CONFIG_CPU_HAS_LLDSCD is not set
# CONFIG_CPU_HAS_WB is not set
CONFIG_CPU_HAS_SYNC=y

... which is the setting also used by all other MIPS32 CPUs. Then everything should be ok.

/Hartvig

>
> quintela$ grep WB arch/mips/defconfig-pb1*
> arch/mips/defconfig-pb1000:CONFIG_CPU_HAS_WB=y
> arch/mips/defconfig-pb1100:CONFIG_CPU_HAS_WB=y
> arch/mips/defconfig-pb1500:CONFIG_CPU_HAS_WB=y
> quintela$
>
> Other thing is that this machine should be using wbflush at all, but
> that is a different story.  I agree with  (/me looks in archive),
> *your* patch removing wbflush for that boards.  They are only doing
> "sync" ond wbflush, and that is the thing that __sync() already does.
>
> I.e. If I have to chooses wich patch to integrate, the one exporting
> __wbflush(), or the one removing it altogether from pb1*, I will
> choose removing it.  It looks superflous.
>
> Later, Juan "who don't have that processor, and handwaving is easy".
>
> --
> In theory, practice and theory are the same, but in practice they
> are different -- Larry McVoy

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

* Re: Patches for all four au1000 setup.c files
  2003-03-21 22:45       ` Hartvig Ekner
@ 2003-03-25  2:04         ` Jeff Baitis
  0 siblings, 0 replies; 7+ messages in thread
From: Jeff Baitis @ 2003-03-25  2:04 UTC (permalink / raw
  To: Hartvig Ekner; +Cc: Juan Quintela, Linux MIPS mailing list

Yes. mb() was at the heart of the problem.

I've applied the patches that remove wbflush, and de-configured my .config,
and everything is compiling just fine!

Thanks,

Jeff

On Fri, Mar 21, 2003 at 11:45:41PM +0100, Hartvig Ekner wrote:
> Hi Juan,
> 
> Juan Quintela wrote:
> 
> > >>>>> "hartvig" == Hartvig Ekner <hartvig@ekner.info> writes:
> >
> > hartvig> I can't see that they are using wbflush in any way. Grepping
> > hartvig> after wbflush through the entire 2.4 tree, it seems wbflush
> > hartvig> is something only present on some dec platforms and then the
> > hartvig> au1000 stuff - which would mean that any driver directly
> > hartvig> calling __wbflush would be unable to compile/load on the
> > hartvig> majority of kernels. Or am I missing something? (I haven't
> > hartvig> been using modules under MIPS at all).
> >
> > Yes, you missed the definition of mb() :p
> >
> > quintela$ grep "mb(" drivers/net/8139* | grep -v rmb | grep -v wmb
> > drivers/net/8139too.c:          mb();
> > quintela$
> >
> > hartvig> In fact, I can't find a single file including wbflush.h
> > hartvig> except system.h, and it doesn't look like anybody else should
> > hartvig> directly be including the wbflush.h file, but only use the
> > hartvig> macros in system.h:
> >
> > hartvig> #define wmb()           fast_wmb()
> > hartvig> #define rmb()           fast_rmb()
> > hartvig> #define mb()            wbflush();
> > hartvig> #define iob()           wbflush();
> >
> > hartvig> (which are differently defined if there is no WB configured).
> >
> > but WB is configured in :)
> >
> 
> That's the problem! Wb does not need to be configured in, it is a mistake. My patch was missing
> the required fixes to the defconfig files, it was only described in the mail.  So I think the only
> thing missing is a patch to fix all the pb/db defconfig files to look like this:
> 
> # CONFIG_CPU_ADVANCED is not set
> CONFIG_CPU_HAS_LLSC=y
> # CONFIG_CPU_HAS_LLDSCD is not set
> # CONFIG_CPU_HAS_WB is not set
> CONFIG_CPU_HAS_SYNC=y
> 
> ... which is the setting also used by all other MIPS32 CPUs. Then everything should be ok.
> 
> /Hartvig
> 
> >
> > quintela$ grep WB arch/mips/defconfig-pb1*
> > arch/mips/defconfig-pb1000:CONFIG_CPU_HAS_WB=y
> > arch/mips/defconfig-pb1100:CONFIG_CPU_HAS_WB=y
> > arch/mips/defconfig-pb1500:CONFIG_CPU_HAS_WB=y
> > quintela$
> >
> > Other thing is that this machine should be using wbflush at all, but
> > that is a different story.  I agree with  (/me looks in archive),
> > *your* patch removing wbflush for that boards.  They are only doing
> > "sync" ond wbflush, and that is the thing that __sync() already does.
> >
> > I.e. If I have to chooses wich patch to integrate, the one exporting
> > __wbflush(), or the one removing it altogether from pb1*, I will
> > choose removing it.  It looks superflous.
> >
> > Later, Juan "who don't have that processor, and handwaving is easy".
> >
> > --
> > In theory, practice and theory are the same, but in practice they
> > are different -- Larry McVoy
> 

-- 
         Jeffrey Baitis - Associate Software Engineer

                    Evolution Robotics, Inc.
                     130 West Union Street
                       Pasadena CA 91103

 tel: 626.535.2776  |  fax: 626.535.2777  |  baitisj@evolution.com 

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

end of thread, other threads:[~2003-03-25  2:04 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-03-21  8:55 Patches for all four au1000 setup.c files Hartvig Ekner
2003-03-21 15:58 ` Pete Popov
2003-03-21 19:39 ` Jeff Baitis
2003-03-21 22:12   ` Hartvig Ekner
2003-03-21 22:33     ` Juan Quintela
2003-03-21 22:45       ` Hartvig Ekner
2003-03-25  2:04         ` Jeff Baitis

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.