[Top] [All Lists]

Re: [PATCH] const mips_io_port_base !?

To: Ralf Baechle <>
Subject: Re: [PATCH] const mips_io_port_base !?
From: Florian Lohoff <>
Date: Wed, 28 Nov 2001 14:13:39 +0100
In-reply-to: <>
Organization: rfc822 - pure communication
References: <> <>
User-agent: Mutt/1.3.23i
On Tue, Nov 27, 2001 at 05:15:44PM +1100, Ralf Baechle wrote:
> On Tue, Nov 27, 2001 at 01:02:14AM +0100, Florian Lohoff wrote:
> Blame whoever designed C that there is no sane way to give a variable an
> attribute like "will never change again after the first initalization thus
> keeping the value in a register beyond function calls and any other kind
> of memory barrier is ok".  This inconsistence merily achieves a better
> optimization of the code; the set_* function is intended to hide this cute
> little standard violation away ...

The problem is that it doesnt build without the patch:

mipsel-linux-gcc -I /home/mnt/mips/dec/linux/include/asm/gcc
-D__KERNEL__ -I/home/mnt/mips/dec/linux/include -Wall
-Wstrict-prototypes -Wno-trigraphs -O2 -fomit-frame-pointer
-fno-strict-aliasing -fno-common -G 0 -mno-abicalls -fno-pic -mcpu=r4600
-mips2 -Wa,--trap -pipe    -DEXPORT_SYMTAB -c setup.c
Assembler messages:
Warning: The -mcpu option is deprecated.  Please use -march and -mtune
Warning: The -march option is incompatible to -mipsN and therefore
setup.c:109: conflicting types for `mips_io_port_base'
/home/mnt/mips/dec/linux/include/asm/io.h:63: previous declaration of
setup.c: In function `setup_arch':
setup.c:678: warning: unused variable `tmp'
setup.c:679: warning: unused variable `initrd_header'
make[1]: *** [setup.o] Error 1
make[1]: Leaving directory `/home/mnt/mips/dec/linux/arch/mips/kernel'
make: *** [_dir_arch/mips/kernel] Error 2

(flo@paradigm)/home/mnt/mips/dec/linux# mipsel-linux-gcc -v
Reading specs from /usr/local/lib/gcc-lib/mipsel-linux/3.0.2/specs
Configured with: ./configure --target=mipsel-linux --enable-languages=c
Thread model: single
gcc version 3.0.2 20010825 (Debian prerelease)
(flo@paradigm)/home/mnt/mips/dec/linux# mipsel-linux-as --version
GNU assembler Debian/GNU Linux
Copyright 2001 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms
the GNU General Public License.  This program has absolutely no
This assembler was configured for a target of `mipsel-linux'.

Florian Lohoff                     +49-5201-669912
Nine nineth on september the 9th              Welcome to the new billenium

Attachment: pgpDdOf0EJMst.pgp
Description: PGP signature

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