[PATCHES] move code for !STATIC_MAP to extra module
Dominik Brodowski
linux at dominikbrodowski.de
Sun Nov 7 06:13:50 EST 2004
Partly based on the idea Russell King had a few months ago, the second
patchset makes it easier to distinguish between SS_CAP_STATIC_MAP sockets
and !SS_CAP_STATIC_MAP sockets. This patchset adds a re-direction layer,
and moves the !STATIC-only code from rsrc_mgr to a new library rsrc_nostatic.
In future, some snippets from cs.c's resource management may be moved to
rsrc_nostatic and, if necessary, to a rsrc_static library.
all-in-one-patch: http://www.brodo.de/patches/2004-11-07/pcmcia-b22-complete
tarball: http://www.brodo.de/patches/2004-11-07/pcmcia-b22-move-nonstatic-map-code.tar.bz2
http://www.brodo.de/patches/2004-11-07/pcmcia-b22-move-nonstatic-map-code/01-per_socket_db
Make the io and mem db per-socket, as different sockets may have different
requirements or may not even need the resource db at all (SS_CAP_STATIC_MAP)
http://www.brodo.de/patches/2004-11-07/pcmcia-b22-move-nonstatic-map-code/02-validate-mem
validate_mem() does only make sense for !SS_CAP_STATIC_MAP sockets. Therefore,
re-direct validate_mem() calls only for those. The newly added redirection
layer will allow for a "library" module named "rsrc_nostatic" which contains
the resource database handling code, and it will only need to be loaded for
the drivers which need it.
http://www.brodo.de/patches/2004-11-07/pcmcia-b22-move-nonstatic-map-code/03-adjust_io_region
Calls to adjust_io_region only happen if !SS_CAP_STATIC_MAP.
http://www.brodo.de/patches/2004-11-07/pcmcia-b22-move-nonstatic-map-code/04-find_io_region
Calls to find_io_region only happen if !SS_CAP_STATIC_MAP.
http://www.brodo.de/patches/2004-11-07/pcmcia-b22-move-nonstatic-map-code/05-find_mem_region
Calls to adjust_mem_region only happen if !SS_CAP_STATIC_MAP.
http://www.brodo.de/patches/2004-11-07/pcmcia-b22-move-nonstatic-map-code/06-adjust_and_release_resources
re-direct calls to adjust_resource_info for MEM and IO.
http://www.brodo.de/patches/2004-11-07/pcmcia-b22-move-nonstatic-map-code/07-move-to-rsrc_nostatic
Move all the "nonstatic" code to a new file, and link it into pcmcia_core.ko
http://www.brodo.de/patches/2004-11-07/pcmcia-b22-move-nonstatic-map-code/08-nonstatic-module
Make rsrc_nostatic an independent module.
More information about the linux-pcmcia
mailing list