Most recent kernel where this bug did not occur: Distribution: Hardware Environment: Software Environment: Problem Description: When there are so many cx88 devices present in a system (in my case, a 8-chip cx88 based tv card), ioremap() can fail after a couple devices got registered and not enough space left for mapping. Steps to reproduce:
Created attachment 13125 [details] quick patch to cx88-cards.c This should prevent kernel oops. However, it only left me with 6 useable video devices from a 8-chip card. I notice that request_mem_region() asks for the whole MMIO space, which is 32M each in my case. This is quite a lot when you have so many cx88 devices. I worked around by replacing pci_resource_len() with some value around 2-4MB and I can even have 16 chips (2 cards) running together (change CX88_MAXBOARDS to 16, of course). So I think requesting the whole mmio region is overkill, maybe a configurable mmio size via modparams or defaulting to a saner value would be nice.
Created attachment 13126 [details] configurable mmio size patch add mmio_size module params, with previous ioremap() fix
Queued a fix for the ioremap case and for the kmalloc as well