bigphysarea for 2.6.10 en 2.6.11
Quoted 2 lines · On Mon Jun 13 2005 Pádraig Brady wrote:
That should be: mem_resource.start =
virt_to_phys(bigphysarea); Otherwise you could get a collision?
Yes, the collision has occured for me with 2.4 kernel on Dell 2850 system. Requesting the resource using the virtual address collided with the physical address of the PCI expansion slots.
An overlap could also occur because the end address passed to request_resource() is one too big. The code should be:
// register the resource for it
mem_resource.start = virt_to_phys(bigphysarea);
mem_resource.end = mem_resource.start
+ (bigphysarea_pages << PAGE_SHIFT) - 1;
request_resource(&iomem_resource, &mem_resource);Note that this may not work for systems such as SGI altix 350 using IA64 processors that do not support the virt_to_phys operation. I don;t know what should be done on such a system.
Perhaps it is not necessary to mark the resource busy with request_resource() since the memory is allocated from the Kernel at boot time and should not be available for any other use anyway.
Any thoughts on this?