lkml.org 
[lkml]   [1999]   [Aug]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: New kernel/resource.c
Date
Jes Sorensen writes:
> The only thing that sucks about this is when you have adapters with
> the exact same chips on them on both PCI and SBUS and you would like
> to write a generic driver which determines at runtime what type of bus
> it is on. Having to recompile the same code with new macros one for
> sbus and one for pci is evil as well.
>
> Not sure what the pretty solution is though.

Exactly the same thing happens on some ARM machines, where we have
two different address spaces. One of them is a PC view of the IO devices,
which is 0x0000 to 0xffff. The other is for expansion cards and other
internal devices, which have bit 31 set.
Unfortunately, with the current resource implementation, it totally rules
out IDE and serial expansion cards since check_resource says the region
is busy.

For now, I am having to alter resource.c such that the IO region covers
the full 32-bit address range, which IMHO is not good. At least the old
resource.c allowed you to register anything...

I think that the resouce management should be able to handle multiple IO
areas, and select the appropriate one dependent on the address given.
This would allow drivers to be more or less bus independent when it comes
to checking IO regions.

The only other way around this problem I can see is to make all drivers
know about multiple buses (even the generic ones), which IMHO will be
totally disgusting.
_____
|_____| ------------------------------------------------- ---+---+-
| | Russell King rmk@arm.linux.org.uk --- ---
| | | | http://www.arm.linux.org.uk/~rmk/aboutme.html / / |
| +-+-+ --- -+-
/ | THE developer of ARM Linux |+| /|\
/ | | | --- |
+-+-+ ------------------------------------------------- /\\\ |
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:53    [from the cache]
©2003-2014 Jasper Spaans. Advertise on this site