Re: Memory region check in drivers/pcmcia/rsrc_mgr.c

Jeff Garzik (jgarzik@mandrakesoft.com)
Sat, 07 Jul 2001 07:51:11 -0400


Paul Mackerras wrote:
> In drivers/pcmcia/rsrc_mgr.c, there is code that check whether a given
> range of PCI memory addresses are available for the pcmcia code to
> use. This code uses a macro, check_mem_resource(), to check whether a
> particular region is available, defined like this:
>
> #define check_mem_resource(b,n) check_resource(&iomem_resource, (b), (n))
[...]
> I think that
> we should be using check_mem_region instead,

AFAICS you are correct.

check_xxx is deprecated, though. Is it possible to move a request_xxx
earlier in the logic?

check_xxx is inherently racy.

-- 
Jeff Garzik      | A recent study has shown that too much soup
Building 1024    | can cause malaise in laboratory mice.
MandrakeSoft     |
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/