* [PATCH] const mips_io_port_base !?
@ 2001-11-27 0:02 Florian Lohoff
2001-11-27 6:15 ` Ralf Baechle
0 siblings, 1 reply; 8+ messages in thread
From: Florian Lohoff @ 2001-11-27 0:02 UTC (permalink / raw)
To: linux-mips
[-- Attachment #1: Type: text/plain, Size: 760 bytes --]
For the reason of compilability one should build a consensus ...
diff -u -r1.29 io.h
--- include/asm-mips/io.h 2001/11/26 11:14:37 1.29
+++ include/asm-mips/io.h 2001/11/27 01:00:07
@@ -60,7 +60,7 @@
* instruction, so the lower 16 bits must be zero. Should be true on
* on any sane architecture; generic code does not use this assumption.
*/
-extern const unsigned long mips_io_port_base;
+extern unsigned long mips_io_port_base;
#define set_io_port_base(base) \
do { * (unsigned long *) &mips_io_port_base = (base); } while (0)
Or the other way round ...
Flo
--
Florian Lohoff flo@rfc822.org +49-5201-669912
Nine nineth on september the 9th Welcome to the new billenium
[-- Attachment #2: Type: application/pgp-signature, Size: 232 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] const mips_io_port_base !?
2001-11-27 0:02 [PATCH] const mips_io_port_base !? Florian Lohoff
@ 2001-11-27 6:15 ` Ralf Baechle
2001-11-28 13:13 ` Florian Lohoff
0 siblings, 1 reply; 8+ messages in thread
From: Ralf Baechle @ 2001-11-27 6:15 UTC (permalink / raw)
To: Florian Lohoff; +Cc: linux-mips
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 ...
Ralf
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] const mips_io_port_base !?
2001-11-27 6:15 ` Ralf Baechle
@ 2001-11-28 13:13 ` Florian Lohoff
2001-11-28 17:16 ` H . J . Lu
0 siblings, 1 reply; 8+ messages in thread
From: Florian Lohoff @ 2001-11-28 13:13 UTC (permalink / raw)
To: Ralf Baechle; +Cc: linux-mips
[-- Attachment #1: Type: text/plain, Size: 2402 bytes --]
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
instead.
Warning: The -march option is incompatible to -mipsN and therefore
ignored.
setup.c:109: conflicting types for `mips_io_port_base'
/home/mnt/mips/dec/linux/include/asm/io.h:63: previous declaration of
`mips_io_port_base'
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#
(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
--disable-shared
Thread model: single
gcc version 3.0.2 20010825 (Debian prerelease)
(flo@paradigm)/home/mnt/mips/dec/linux# mipsel-linux-as --version
GNU assembler 2.11.92.0.10 Debian/GNU Linux
Copyright 2001 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms
of
the GNU General Public License. This program has absolutely no
warranty.
This assembler was configured for a target of `mipsel-linux'.
--
Florian Lohoff flo@rfc822.org +49-5201-669912
Nine nineth on september the 9th Welcome to the new billenium
[-- Attachment #2: Type: application/pgp-signature, Size: 232 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] const mips_io_port_base !?
2001-11-28 13:13 ` Florian Lohoff
@ 2001-11-28 17:16 ` H . J . Lu
2001-11-28 17:23 ` James Simmons
0 siblings, 1 reply; 8+ messages in thread
From: H . J . Lu @ 2001-11-28 17:16 UTC (permalink / raw)
To: Florian Lohoff; +Cc: Ralf Baechle, linux-mips
On Wed, Nov 28, 2001 at 02:13:39PM +0100, Florian Lohoff wrote:
> GNU assembler 2.11.92.0.10 Debian/GNU Linux
You need binutils 2.11.92.0.12 and also read my README.
H.J.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] const mips_io_port_base !?
2001-11-28 17:16 ` H . J . Lu
@ 2001-11-28 17:23 ` James Simmons
2001-11-29 3:55 ` Ralf Baechle
0 siblings, 1 reply; 8+ messages in thread
From: James Simmons @ 2001-11-28 17:23 UTC (permalink / raw)
To: Ralf Baechle; +Cc: linux-mips
Ralph please apply this patch to arch/mips/kernel/setup.c. Some compilers
don't like the conflict of definition in io.h and setup.c. Thanks.
--- setup.c.orig Wed Nov 28 10:19:09 2001
+++ setup.c Wed Nov 28 10:19:20 2001
@@ -106,7 +106,7 @@
* mips_io_port_base is the begin of the address space to which x86 style
* I/O ports are mapped.
*/
-unsigned long mips_io_port_base; EXPORT_SYMBOL(mips_io_port_base);
+const unsigned long mips_io_port_base; EXPORT_SYMBOL(mips_io_port_base);
/*
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] const mips_io_port_base !?
2001-11-28 17:23 ` James Simmons
@ 2001-11-29 3:55 ` Ralf Baechle
2001-11-29 4:14 ` Paul Mundt
0 siblings, 1 reply; 8+ messages in thread
From: Ralf Baechle @ 2001-11-29 3:55 UTC (permalink / raw)
To: James Simmons; +Cc: linux-mips
On Wed, Nov 28, 2001 at 09:23:10AM -0800, James Simmons wrote:
> Ralph please apply this patch to arch/mips/kernel/setup.c. Some compilers
> don't like the conflict of definition in io.h and setup.c. Thanks.
Will do. For curiosity's sake, which compilers do complain?
Ralf
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] const mips_io_port_base !?
2001-11-29 3:55 ` Ralf Baechle
@ 2001-11-29 4:14 ` Paul Mundt
2001-11-29 14:18 ` Ralf Baechle
0 siblings, 1 reply; 8+ messages in thread
From: Paul Mundt @ 2001-11-29 4:14 UTC (permalink / raw)
To: Ralf Baechle; +Cc: James Simmons, linux-mips
[-- Attachment #1: Type: text/plain, Size: 438 bytes --]
On Thu, Nov 29, 2001 at 02:55:13PM +1100, Ralf Baechle wrote:
> > Ralph please apply this patch to arch/mips/kernel/setup.c. Some compilers
> > don't like the conflict of definition in io.h and setup.c. Thanks.
>
> Will do. For curiosity's sake, which compilers do complain?
>
GCC 3.0.2 was the one that complained for me.. 2.95.3 had no problems.
Regards,
--
Paul Mundt <pmundt@mvista.com>
MontaVista Software, Inc.
[-- Attachment #2: Type: application/pgp-signature, Size: 240 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] const mips_io_port_base !?
2001-11-29 4:14 ` Paul Mundt
@ 2001-11-29 14:18 ` Ralf Baechle
0 siblings, 0 replies; 8+ messages in thread
From: Ralf Baechle @ 2001-11-29 14:18 UTC (permalink / raw)
To: Paul Mundt; +Cc: James Simmons, linux-mips
On Wed, Nov 28, 2001 at 08:14:33PM -0800, Paul Mundt wrote:
> > > Ralph please apply this patch to arch/mips/kernel/setup.c. Some compilers
> > > don't like the conflict of definition in io.h and setup.c. Thanks.
> >
> > Will do. For curiosity's sake, which compilers do complain?
> >
> GCC 3.0.2 was the one that complained for me.. 2.95.3 had no problems.
Thanks, fix is now in cvs.
Ralf
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2001-11-29 15:19 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-11-27 0:02 [PATCH] const mips_io_port_base !? Florian Lohoff
2001-11-27 6:15 ` Ralf Baechle
2001-11-28 13:13 ` Florian Lohoff
2001-11-28 17:16 ` H . J . Lu
2001-11-28 17:23 ` James Simmons
2001-11-29 3:55 ` Ralf Baechle
2001-11-29 4:14 ` Paul Mundt
2001-11-29 14:18 ` Ralf Baechle
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.