Commit fec1d37f authored by Richard Henderson's avatar Richard Henderson Committed by Linus Torvalds

[PATCH] Alpha: UP1500 pci_mem fix

From: Ivan Kokshaysky <ink@jurassic.park.msu.ru>

The memory reserved for PCI probe is not freed properly in some cases,
for instance with a 3.5Gb of RAM.

Forward port from 2.4.
parent 7a538652
......@@ -225,11 +225,13 @@ nautilus_init_pci(void)
if (request_resource(&iomem_resource, bus->resource[1]) < 0)
printk(KERN_ERR "Failed to request MEM on hose 0\n");
if (pci_mem < memtop && pci_mem > alpha_mv.min_mem_address) {
if (pci_mem < memtop)
memtop = pci_mem;
if (memtop > alpha_mv.min_mem_address) {
free_reserved_mem(__va(alpha_mv.min_mem_address),
__va(pci_mem));
__va(memtop));
printk("nautilus_init_pci: %ldk freed\n",
(pci_mem - alpha_mv.min_mem_address) >> 10);
(memtop - alpha_mv.min_mem_address) >> 10);
}
if ((IRONGATE0->dev_vendor >> 16) > 0x7006) /* Albacore? */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment