Linux-kernel mailing list archive 1998-48,: [PATCH] Fix to truncate memory_end if > possible maximum

# [PATCH] Fix to truncate memory_end if > possible maximum

Perry Harrington (pedward@sun4.apsoft.com)
Fri, 4 Dec 1998 11:37:29 -0800 (PST)

- Messages sorted by: [ date ][ thread ][ subject ][ author ]
- Next message: Glynn Clements: "Re: /proc and /kern"
- Previous message: Chris Evans: "Re: [PATCH] swapin readahead and fixes"

Here's a patch to setup.c in the i386 architecture to fix the problems
with people specifying > 960MB of RAM on 2.1 kernels.

I haven't compiled it, but it passes my sanity checking of the code.

--Perry

PS: This is sent to Linus and Alan, so you both have it.

-------------------------------------------------8<--------------------------
--- setup.c.old Fri Dec 4 11:36:41 1998
+++ setup.c Fri Dec 4 11:36:43 1998
@@ -146,13 +146,6 @@
}
#endif

-#define VMALLOC_RESERVE (64 << 20) /* 64MB for vmalloc */
-#define MAXMEM ((unsigned long)(-PAGE_OFFSET-VMALLOC_RESERVE))
-
- if (memory_end > MAXMEM)
- memory_end = MAXMEM;
-
- memory_end &= PAGE_MASK;
#ifdef CONFIG_BLK_DEV_RAM
rd_image_start = RAMDISK_FLAGS & RAMDISK_IMAGE_START_MASK;
rd_prompt = ((RAMDISK_FLAGS & RAMDISK_PROMPT_FLAG) != 0);
@@ -199,6 +192,16 @@
break;
*(to++) = c;
}
+
+/* truncate memory_end to the maximum possible value if it's greater 12/04/98 pedward */
+#define VMALLOC_RESERVE (64 << 20) /* 64MB for vmalloc */
+#define MAXMEM ((unsigned long)(-PAGE_OFFSET-VMALLOC_RESERVE))
+
+ if (memory_end > MAXMEM)
+ memory_end = MAXMEM;
+
+ memory_end &= PAGE_MASK;
+
*to = '\0';
*cmdline_p = command_line;
memory_end += PAGE_OFFSET;

-------------------------------------------------8<--------------------------

    --
    Perry Harrington       Linux rules all OSes.    APSoft      ()
    email: perry@apsoft.com 			Think Blue. /\

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

- Next message: Glynn Clements: "Re: /proc and /kern"
- Previous message: Chris Evans: "Re: [PATCH] swapin readahead and fixes"