Re: [PATCH] bigphysarea for 2.6.10 en 2.6.11

From: P
Date: Mon Jun 13 2005 - 04:30:10 EST


Remy Böhmer wrote:
I have pulled the bigphysarea patch (as posted by Nick Martin for
kernel 2.6.9) towards the kernels 2.6.10 and 2.6.11.
Maybe there is somebody out there who can use it.

(it only suits the i386 kernel, I have not done this job for other platforms.)
First the 2.6.10 version is listed below, after this the 2.6.11 version

Have fun with it!

Remy

linux-2.6.10.bigphys/mm/bigphysarea.c
--- linux-2.6.10.orig/mm/bigphysarea.c Wed Dec 31 19:00:00 1969
+++ linux-2.6.10.bigphys/mm/bigphysarea.c Mon Nov 15 15:49:01 2004
+static
+int __init bigphysarea_setup(char *str)
+{
+ int par;
+ if (get_option(&str,&par)) {
+ bigphysarea_pages = par;
+ // Alloc the memory
+ bigphysarea =
alloc_bootmem_low_pages(bigphysarea_pages<<PAGE_SHIFT);
+ if (!bigphysarea) {
+ printk(KERN_CRIT "bigphysarea: not enough
memory for %d pages\n",bigphysarea_pages);
+ return -ENOMEM;
+ }
+
+ // register the resource for it
+ mem_resource.start = bigphysarea;

That should be: mem_resource.start = virt_to_phys(bigphysarea);
Otherwise you could get a collision?

--
Pádraig Brady - http://www.pixelbeat.org
--
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/