mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* isa_virt_to_bus and co. on alpha (take 2)
@ 2004-02-27  0:03 Jakub Bogusz
  0 siblings, 0 replies; only message in thread
From: Jakub Bogusz @ 2004-02-27  0:03 UTC (permalink / raw)
  To: linux-kernel

[-- Attachment #1: Type: text/plain, Size: 1977 bytes --]

Once again (as I previously mentioned in
http://www.ussg.iu.edu/hypermail/linux/kernel/0402.3/0442.html) the
problem is that on alpha CONFIG_ISA is set (to y), but isa_virt_to_bus,
isa_page_to_bus, isa_bus_to_virt are not defined, which results in the
following unresolved symbols:

*** Warning: "isa_virt_to_bus" [drivers/scsi/wd7000.ko] undefined!
*** Warning: "isa_page_to_bus" [drivers/scsi/wd7000.ko] undefined!
*** Warning: "isa_bus_to_virt" [drivers/scsi/wd7000.ko] undefined!
*** Warning: "isa_virt_to_bus" [drivers/char/tpqic02.ko] undefined!
*** Warning: "isa_virt_to_bus" [drivers/char/synclink.ko] undefined!
*** Warning: "isa_bus_to_virt" [drivers/net/ni65.ko] undefined!
*** Warning: "isa_virt_to_bus" [drivers/net/ni65.ko] undefined!
*** Warning: "isa_bus_to_virt" [drivers/net/ni52.ko] undefined!
*** Warning: "isa_virt_to_bus" [net/irda/irda.ko] undefined!
*** Warning: "isa_virt_to_bus" [drivers/net/cs89x0.ko] undefined!
*** Warning: "isa_bus_to_virt" [drivers/net/3c515.ko] undefined!
*** Warning: "isa_virt_to_bus" [drivers/net/3c515.ko] undefined!
*** Warning: "isa_virt_to_bus" [drivers/net/3c505.ko] undefined!

After some investigation (comparing changes in include/asm-i386/io.h,
drivers/scsi/wd7000.c and code in include/asm-alpha/io.h with probably
missing changes) I see that previous proposal was probably incorrect,
and this one should be better...

isa_virt_to_bus and isa_bus_to_virt defines are based on changes for
i386 (where virt_to_bus and bus_to_virt defines have been basically
renamed to isa_virt_to_bus and isa_bus_to_virt - the only difference
is that on alpha virt_to_bus/bus_to_virt and virt_to_phys/phys_to_virt
are not 1:1).

Unlike on i386, on alpha there was no page_to_bus - but I see that it's
something like phys_to_bus(page_to_phys) - so I wrote one basing on
virt_to_bus().

But I'm still not sure - are these changes correct?


-- 
Jakub Bogusz    http://cyber.cs.net.pl/~qboosh/
PLD Team        http://www.pld-linux.org/

[-- Attachment #2: linux-alpha-isa.patch --]
[-- Type: text/plain, Size: 538 bytes --]

--- linux-2.6.3/include/asm-alpha/io.h.orig	2004-02-18 04:59:27.000000000 +0100
+++ linux-2.6.3/include/asm-alpha/io.h	2004-02-25 13:42:10.000000000 +0100
@@ -118,6 +118,15 @@
 	return (long)address <= 0 ? NULL : virt;
 }
 
+#define isa_virt_to_bus virt_to_bus
+#define isa_bus_to_virt bus_to_virt
+static inline unsigned long isa_page_to_bus(struct page *page)
+{
+	unsigned long phys = page_to_phys(page);
+	unsigned long bus = phys + __direct_map_base;
+	return phys <= __direct_map_size ? bus : 0;
+}
+
 #else /* !__KERNEL__ */
 
 /*

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2004-02-26 23:58 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-02-27  0:03 isa_virt_to_bus and co. on alpha (take 2) Jakub Bogusz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®