linux-mips-fnet
[Top] [All Lists]

Patches needed for new gcc

To: linux-mips@fnet.fr
Subject: Patches needed for new gcc
From: Warner Losh <imp@village.org>
Date: Mon, 28 Aug 1995 20:37:36 -0600
The io.h macros are wrong.  They mostly kinda sorta worked with the
old GCC, but advances in technology have caused them to be slightly
incorrect.  Here's a patch, taken in spirit from the 1.3.19 patch,
that seems to correct the problem.  It is short, so I'm including it
here.

Also, there is at least one location in the sources that tries to
include /usr/src/linux/mumble, blah.  This is not correct, since most
people not running on Linux will not have their kernels there.  Since
Linux/MIPS isn't self hosting, and since I don't think that we need
the module in question, I just change the include.  Please find
enclosed a patch for that as well.

So far these are the only two significant changes I've had to make.  I
did have to change linux-mipsel-gcc to gcc -b mipsel-unknown-linux in
one of the make file templates, but that doesn't count much :-).

Warner

*** org/include/asm-mips/io.h   Mon Aug 28 20:23:55 1995
--- ./include/asm-mips/io.h     Mon Aug 28 20:24:44 1995
***************
*** 57,66 ****
  
  #define __OUT(m,s) \
  __OUT1(s) __OUT2(m) : : "r" (value), "i" (0), "r" (PORT_BASE+port)); } \
! __OUT1(s##c) __OUT2(m) : : "r" (value), "i" (port), "r" (PORT_BASE)); } \
  __OUT1(s##_p) __OUT2(m) : : "r" (value), "i" (0), "r" (PORT_BASE+port)); \
        SLOW_DOWN_IO; } \
! __OUT1(s##c_p) __OUT2(m) : : "r" (value), "i" (port), "r" (PORT_BASE)); \
        SLOW_DOWN_IO; }
  
  #define __IN1(s) \
--- 57,66 ----
  
  #define __OUT(m,s) \
  __OUT1(s) __OUT2(m) : : "r" (value), "i" (0), "r" (PORT_BASE+port)); } \
! __OUT1(s##c) __OUT2(m) : : "r" (value), "id" (port), "r" (PORT_BASE)); } \
  __OUT1(s##_p) __OUT2(m) : : "r" (value), "i" (0), "r" (PORT_BASE+port)); \
        SLOW_DOWN_IO; } \
! __OUT1(s##c_p) __OUT2(m) : : "r" (value), "id" (port), "r" (PORT_BASE)); \
        SLOW_DOWN_IO; }
  
  #define __IN1(s) \
***************
*** 74,82 ****
  
  #define __IN(m,s) \
  __IN1(s) __IN2(m) : "=r" (_v) : "i" (0), "r" (PORT_BASE+port)); return _v; } \
! __IN1(s##c) __IN2(m) : "=r" (_v) : "i" (port), "r" (PORT_BASE)); return _v; } 
\
  __IN1(s##_p) __IN2(m) : "=r" (_v) : "i" (0), "r" (PORT_BASE+port)); 
SLOW_DOWN_IO; return _v; } \
! __IN1(s##c_p) __IN2(m) : "=r" (_v) : "i" (port), "r" (PORT_BASE)); 
SLOW_DOWN_IO; return _v; }
  
  #define __INS1(s) \
  extern inline void __ins##s(unsigned int port, void * addr, unsigned long 
count) {
--- 74,82 ----
  
  #define __IN(m,s) \
  __IN1(s) __IN2(m) : "=r" (_v) : "i" (0), "r" (PORT_BASE+port)); return _v; } \
! __IN1(s##c) __IN2(m) : "=r" (_v) : "id" (port), "r" (PORT_BASE)); return _v; 
} \
  __IN1(s##_p) __IN2(m) : "=r" (_v) : "i" (0), "r" (PORT_BASE+port)); 
SLOW_DOWN_IO; return _v; } \
! __IN1(s##c_p) __IN2(m) : "=r" (_v) : "id" (port), "r" (PORT_BASE)); 
SLOW_DOWN_IO; return _v; }
  
  #define __INS1(s) \
  extern inline void __ins##s(unsigned int port, void * addr, unsigned long 
count) {
*** org/drivers/block/aztcd.c   Mon Aug 28 18:15:13 1995
--- ./drivers/block/aztcd.c     Mon Aug 28 18:16:52 1995
***************
*** 135,141 ****
  #define MAJOR_NR AZTECH_CDROM_MAJOR 
  
  #ifdef MODULE
! # include "/usr/src/linux/drivers/block/blk.h"
  #else
  # include "blk.h"
  # define MOD_INC_USE_COUNT
--- 135,141 ----
  #define MAJOR_NR AZTECH_CDROM_MAJOR 
  
  #ifdef MODULE
! # include "blk.h"
  #else
  # include "blk.h"
  # define MOD_INC_USE_COUNT

<Prev in Thread] Current Thread [Next in Thread>