Re: DEC PWS433a and 2.1.61VGER don't match...

Matti Aarnio (matti.aarnio@tele.fi)
Tue, 11 Nov 1997 22:17:45 +0200 (EET)


> Date: Tue, 11 Nov 1997 11:14:57 -0800
> From: "David S. Miller" <davem@dm.cobaltmicro.com>
> Date: Mon, 10 Nov 1997 21:45:35 +0200 (EET)
> From: Matti Aarnio <matti.aarnio@tele.fi>
>
> I have been wondering, why my test kernels of VGER series
> have rather consistently failed to boot with AIC7XXX SCSI
> controller, and today I finally found a small difference
> between working arch/alpha/kernel/pyxis.c, and failing one
> (on VGER series):
>
> #define vuip volatile unsigned int *
>
> Ok: *((vuip)SOME_ADDRESS) = ...
> Fail: *(viup)SOME_ADDRESS = ...
>
> This smells of a GCC bug, but it is very strange. What does CPP
> pre-processed output of these two cases look like btw?

Bug in Alpha targetted gcc 2.7.2.3 ? What else would be new ?
(No, I can't point my finger at anything definitive, just that
sometimes my programs don't work at Alpha with GCC compilation.
Those failing modules are huge, and fail only with -O ... )

Most of what appears in the source with (vuip) cast are macroes,
and it may well be that a macro-expansion surprise has bitten
in here... Hmm.. No, can't say it definitely, but most of
include/asm-alpha/pyxis.h defined values are within parens.
Perhaps the pcibios_*() routines were only ones failing ?
Those cast unsigned long coded addresses to pointers, and
try to store/extract data thru cast pointers.

> Does any portable way exist for doing this type
> of architecture specific linkages on modules, or should we just
> yield, and add things like this on net/ipv6/Makefile:
>
> ifeq ($(ARCH),alpha)
> IPV6_OBJS += ../../arch/alpha/lib/csum_ipv6_magic.o
> endif
>
> No this is horrible. Can we find some other way to deal with this?
> I really think maybe that csum_ipv6_magic code should be in the other
> checksum.c code, #ifdef'd out when IPv6 is not compiled in. Would
> this work?

Nope, IPv4 and IPv6 codes should not be mixed to such
an extent that we can not have IPv6 without IPv4.
(Or am I just weirdo with this type of thinking ?)

Do note that all works just fine when you do monolithic
kernel compilation. This problem appears only at modular
IPv6. (I have no idea, why same source on intel box did
not need special tricks for producing working ipv6 module.)

> Later,
> David S. Miller
> davem@dm.cobaltmicro.com

/Matti Aarnio <matti.aarnio@tele.fi>