[PATCH] alpha compilation fixes

From: Andrzej Krzysztofowicz (ankry@green.mif.pg.gda.pl)
Date: Sat Feb 17 2001 - 18:51:42 EST


Hi Alan,

  The following patch contains some alpha compilation fixes:

- struct termios has different field sequence - initializers fixed,
- synclink.c contains i386 assembler debugging code,
- isa_check_signature() undefined
- some memcpy*/memset* functions/function prototypes do not return value on
  some architectures (including alpha) - do not rely on value returning,
  [ maybe the functions/prototypes should be fixed ? ]
- undefined ioctls,
- other minor fixes (delay, loops_per_jiffy).

diff -bur linux-2.4.1-ac17/drivers/char/istallion.c linuxx/drivers/char/istallion.c
--- linux-2.4.1-ac17/drivers/char/istallion.c Sat Feb 10 23:16:18 2001
+++ linuxx/drivers/char/istallion.c Sat Feb 17 23:39:56 2001
@@ -213,12 +213,8 @@
  * at 9600 baud, 8 data bits, no parity, 1 stop bit.
  */
 static struct termios stli_deftermios = {
- 0,
- 0,
- (B9600 | CS8 | CREAD | HUPCL | CLOCAL),
- 0,
- 0,
- INIT_C_CC
+ c_cflag: (B9600 | CS8 | CREAD | HUPCL | CLOCAL),
+ c_cc: INIT_C_CC,
 };
 
 /*
diff -bur linux-2.4.1-ac17/drivers/char/stallion.c linuxx/drivers/char/stallion.c
--- linux-2.4.1-ac17/drivers/char/stallion.c Sat Feb 10 23:16:19 2001
+++ linuxx/drivers/char/stallion.c Sat Feb 17 23:39:56 2001
@@ -165,12 +165,8 @@
  * at 9600, 8 data bits, 1 stop bit.
  */
 static struct termios stl_deftermios = {
- 0,
- 0,
- (B9600 | CS8 | CREAD | HUPCL | CLOCAL),
- 0,
- 0,
- INIT_C_CC
+ c_cflag: (B9600 | CS8 | CREAD | HUPCL | CLOCAL),
+ c_cc: INIT_C_CC,
 };
 
 /*
diff -bur linux-2.4.1-ac17/drivers/char/synclink.c linuxx/drivers/char/synclink.c
--- linux-2.4.1-ac17/drivers/char/synclink.c Sat Feb 10 23:16:19 2001
+++ linuxx/drivers/char/synclink.c Sat Feb 17 23:39:56 2001
@@ -54,7 +54,11 @@
  */
 
 #define VERSION(ver,rel,seq) (((ver)<<16) | ((rel)<<8) | (seq))
-#define BREAKPOINT() asm(" int $3");
+#if defined(__i386__)
+# define BREAKPOINT() asm(" int $3");
+#else
+# define BREAKPOINT() { }
+#endif
 
 #define MAX_ISA_DEVICES 10
 #define MAX_PCI_DEVICES 10
diff -bur linux-2.4.1-ac17/drivers/isdn/sc/shmem.c linuxx/drivers/isdn/sc/shmem.c
--- linux-2.4.1-ac17/drivers/isdn/sc/shmem.c Thu Feb 27 19:57:30 1997
+++ linuxx/drivers/isdn/sc/shmem.c Sat Feb 17 23:39:56 2001
@@ -72,8 +72,9 @@
                 adapter[card]->ioport[adapter[card]->shmem_pgport]);
         pr_debug("%s: set page to %#x\n",adapter[card]->devicename,
                 ((adapter[card]->shmem_magic + ch * SRAM_PAGESIZE)>>14)|0x80);
- ret = memcpy_toio(adapter[card]->rambase +
+ memcpy_toio(adapter[card]->rambase +
                 ((unsigned long) dest % 0x4000), src, n);
+ ret = (void *)(adapter[card]->rambase + ((unsigned long) dest % 0x4000));
         pr_debug("%s: copying %d bytes from %#x to %#x\n",adapter[card]->devicename, n,
                  (unsigned long) src, adapter[card]->rambase + ((unsigned long) dest %0x4000));
         restore_flags(flags);
@@ -116,8 +117,9 @@
                 adapter[card]->ioport[adapter[card]->shmem_pgport]);
         pr_debug("%s: set page to %#x\n",adapter[card]->devicename,
                 ((adapter[card]->shmem_magic + ch * SRAM_PAGESIZE)>>14)|0x80);
- ret = memcpy_fromio(dest,(void *)(adapter[card]->rambase +
+ memcpy_fromio(dest,(void *)(adapter[card]->rambase +
                 ((unsigned long) src % 0x4000)), n);
+ ret = dest;
 /* pr_debug("%s: copying %d bytes from %#x to %#x\n",
                 adapter[card]->devicename, n,
                 adapter[card]->rambase + ((unsigned long) src %0x4000), (unsigned long) dest); */
@@ -157,8 +159,9 @@
                 adapter[card]->ioport[adapter[card]->shmem_pgport]);
         pr_debug("%s: set page to %#x\n",adapter[card]->devicename,
                 ((adapter[card]->shmem_magic + ch * SRAM_PAGESIZE)>>14)|0x80);
- ret = memset_io(adapter[card]->rambase +
+ memset_io(adapter[card]->rambase +
                 ((unsigned long) dest % 0x4000), c, n);
+ ret = (void *)(adapter[card]->rambase + ((unsigned long) dest % 0x4000));
         restore_flags(flags);
 
         return ret;
diff -bur linux-2.4.1-ac17/drivers/net/wan/c101.c linuxx/drivers/net/wan/c101.c
--- linux-2.4.1-ac17/drivers/net/wan/c101.c Sat Feb 10 23:16:03 2001
+++ linuxx/drivers/net/wan/c101.c Sat Feb 17 23:39:57 2001
@@ -25,7 +25,7 @@
 #include <linux/netdevice.h>
 #include "syncppp.h"
 #include <linux/hdlc.h>
-#include <asm/delay.h>
+#include <linux/delay.h>
 #include <asm/io.h>
 
 #include "hd64570.h"
diff -bur linux-2.4.1-ac17/drivers/sound/wavfront.c linuxx/drivers/sound/wavfront.c
--- linux-2.4.1-ac17/drivers/sound/wavfront.c Wed Feb 14 20:14:49 2001
+++ linuxx/drivers/sound/wavfront.c Sat Feb 17 23:40:03 2001
@@ -94,7 +94,7 @@
 #ifdef CONFIG_SMP
 #define LOOPS_PER_TICK cpu_data[smp_processor_id()].loops_per_jiffy
 #else
-#define LOOPS_PER_TICK loops_per_sec
+#define LOOPS_PER_TICK loops_per_jiffy
 #endif
 #endif
 
diff -bur linux-2.4.1-ac17/include/asm-alpha/io.h linuxx/include/asm-alpha/io.h
--- linux-2.4.1-ac17/include/asm-alpha/io.h Wed Feb 14 20:15:14 2001
+++ linuxx/include/asm-alpha/io.h Sat Feb 17 23:40:04 2001
@@ -455,6 +455,23 @@
 #define isa_memcpy_fromio(a,b,c) memcpy_fromio((a),__ioremap(b),(c))
 #define isa_memcpy_toio(a,b,c) memcpy_toio(__ioremap(a),(b),(c))
 
+static inline int
+isa_check_signature(unsigned long io_addr, const unsigned char *signature,
+ int length)
+{
+ int retval = 0;
+ do {
+ if (isa_readb(io_addr) != *signature)
+ goto out;
+ io_addr++;
+ signature++;
+ length--;
+ } while (length);
+ retval = 1;
+out:
+ return retval;
+}
+
 
 /*
  * The Alpha Jensen hardware for some rather strange reason puts
diff -bur linux-2.4.1-ac17/include/asm-alpha/ioctls.h linuxx/include/asm-alpha/ioctls.h
--- linux-2.4.1-ac17/include/asm-alpha/ioctls.h Wed Feb 7 22:43:52 2001
+++ linuxx/include/asm-alpha/ioctls.h Sat Feb 17 23:40:04 2001
@@ -107,5 +107,7 @@
 
 #define TIOCMIWAIT 0x545C /* wait for a change on serial input line(s) */
 #define TIOCGICOUNT 0x545D /* read serial port inline interrupt counts */
+#define TIOCGHAYESESP 0x545E /* Get Hayes ESP configuration */
+#define TIOCSHAYESESP 0x545F /* Set Hayes ESP configuration */
 
 #endif /* _ASM_ALPHA_IOCTLS_H */

-- 
=======================================================================
  Andrzej M. Krzysztofowicz               ankry@mif.pg.gda.pl
  phone (48)(58) 347 14 61
Faculty of Applied Phys. & Math.,   Technical University of Gdansk
-
To unsubscribe from this list: send the line "unsubscribe linux-alpha" in
the body of a message to majordomo@vger.kernel.org



This archive was generated by hypermail 2b29 : Fri Feb 23 2001 - 21:00:34 EST