From: Thomas Schenk <[EMAIL PROTECTED]>
Date: Fri, 22 Jan 1999 09:01:48 -0600
I rebuilt the 2.2.0-pre9 kernel with this patch and haven't been able to
reproduce the problem yet. The first sign that things looked better was
that the amount of memory reported in /proc/meminfo was close to the whole
2 Gigs instead of 1.5 Gigs as it had been previously. I will continue
beating on the machine to see if I can repeat the problem, but I don't
think that I will be able.
This is so cool. Thanks.
You're welcome.
Date: Fri, 22 Jan 1999 18:35:35 +0100 (CET)
From: MOLNAR Ingo <[EMAIL PROTECTED]>
On Fri, 22 Jan 1999, David S. Miller wrote:
> the + - variant just hides the real bug. If it makes a difference, then
ugh, sorry. I was confused. This is clearly an io.h bug. (i have
incorrectly assumed that we still use the | and ^ variant, but we dont.
Thus any non-power-of-two 2^32-__PAGE_OFFSET value caused incorrect kernel
code. Brrr, incidentally, i have introduced this originally but just
forgot about it ...)
the patch is 100% perfect. The reason why we didnt notice this earlier was
that the default __PAGE_OFFSET makes both versions work right...
The problem that bit the BusLogic driver is that with the default PAGE_OFFSET,
bus_to_virt(virt_to_bus(x)) == x for all interesting x.
With the change to PAGE_OFFSET, this was no longer true, and
BusLogic_ScanIncomingMailboxes translates a bus address back to a virtual
address, which is where I expect it died. Since the translation worked both
directions it seemed wasteful to store both bus and virtual addresses.
Unfortunately, I believe that even with my initial patch io.h is still broken
for memory mapped devices. My understanding is that to access memory mapped
devices one calls ioremap to get a virtual mapping, and then use readb/writeb
etc to access the device. I've used this before in both 2.0 and 2.1/2.2. This
is clearly broken by:
#define readb(addr) (*(volatile unsigned char *) __io_virt(addr))
#define writeb(b,addr) (*(volatile unsigned char *) __io_virt(addr) = (b))
since they are incorrectly translating a kernel virtual address (addr) before
accessing the location. Again, with the default PAGE_OFFSET and __io_virt this
behavior wasn't apparent. Changing PAGE_OFFSET to 0x7000000 also causes my
DAC960 driver to die, and the point of death is the first writeb to the device.
I haven't had time to test this theory as yet. Anyone more familiar with this
code care to comment? From IO-mapping.txt it seems pretty clear that the
current code is incorrect.
Leonard
-
Linux SMP list: FIRST see FAQ at http://www.irisa.fr/prive/mentre/smp-faq/
To Unsubscribe: send "unsubscribe linux-smp" to [EMAIL PROTECTED]