Re: [PATCH] BadRAM for 2.5.73-mm2

From: Oleg Drokin (
Date: Wed Jul 02 2003 - 01:23:24 EST


On Wed, Jul 02, 2003 at 03:33:26AM +0000, wrote:

> It will probably apply cleanly to 2.5.73 as well but I haven't checked it
> yet...


> It is based it on

and this patches both have a bug that effectively disables all highmem (if present)
when badram patch is activated. I contacted Rick, but never got any answer back.
(in fact I got an auto reply from some Debian bugtracking system, but that's about it).
Corrected 2.4.21 version of the patch is available at

The arch/i386/mm/init.c part:
> +void __init one_highpage_init(struct page *page, int pfn, int bad_ppro,
> + _Bool *bad)
> {
> + *bad = 0;
> if (page_is_ram(pfn) && !(bad_ppro && page_kills_ppro(pfn))) {
> ClearPageReserved(page);
> set_bit(PG_highmem, &page->flags);
> set_page_count(page, 1);
> - __free_page(page);
> + if (PageBad(page))
> + *bad = 1;
> + else
> +#else
> + __free_page(page);
> +#endif
> totalhigh_pages++;

should obviously get "#else" replaced with "#endif" and original "#endif" should be removed
because otherwise all of the highmem pages are either bad or used right from the initialisation.
(Yes, I have highmem (2G RAM) system with 2 bits bad and I am too lazy to to go to the store to
replace the RAM modules, so I given a patch a try and discovered this problem (which is there
for a long time it seems). I suspect that I am the only one who runs this patch on highmem system,
though ;) )

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

This archive was generated by hypermail 2b29 : Mon Jul 07 2003 - 22:00:15 EST