Re: check/request_region() changes in 2.3.xx

From: Jeff Garzik (jgarzik@mandrakesoft.com)
Date: Thu May 11 2000 - 20:50:52 EST


Kirk Reiser wrote:
>
> Hi Folks: I have just started porting my speakup patches to the
> latest 2.3.xx kernels and have run into some changes which have
> occurred since we had them running under the earlier 2.3.xx kernels.
>
> It seems that we are now calling check_region() and request_region()
> before the kmalloc() function is available. At least, we are getting
> kmalloc() returns a NULL pointer error. We make the call out of a
> couple of functions which are called from console_init(). We probe
> for synthesizer cards from our initialization functions but are
> running into problems because of check_region() and request_region().
>
> I have a couple of questions I guess. Are there functions we can use
> that early which won't run into the kmalloc() problem? How early in
> the boot sequence can people use check_region and request_region?
> Does anyone have other suggestions how we could get our ports
> registered?

For resources, you can create static resource structures, fill them with
the desired I/O region values, and register them with the resource
system. Look at how check_region and request_region work under the
hood, if you haven't already.

As for early memory allocation, you can use "bootmem" for that, but I
suspect static resource records is what you are looking for.

        Jeff

-- 
Jeff Garzik              | ILOVEYOU, Linux.
Building 1024            |
MandrakeSoft, Inc.       |

- 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/



This archive was generated by hypermail 2b29 : Mon May 15 2000 - 21:00:19 EST