diff -urN high-debug-ref/arch/i386/config.in high-debug/arch/i386/config.in --- high-debug-ref/arch/i386/config.in Fri Sep 21 06:37:16 2001 +++ high-debug/arch/i386/config.in Fri Sep 21 06:38:14 2001 @@ -399,6 +399,9 @@ bool ' Spinlock debugging' CONFIG_DEBUG_SPINLOCK bool ' Verbose BUG() reporting (adds 70K)' CONFIG_DEBUG_BUGVERBOSE bool ' Debug allocation faliures' CONFIG_DEBUG_GFP + if [ "$CONFIG_HIGHMEM" = "y" ]; then + bool 'Debug HIGHMEM on lowmem machines' CONFIG_HIGHMEM_DEBUG + fi fi endmenu diff -urN high-debug-ref/arch/i386/kernel/setup.c high-debug/arch/i386/kernel/setup.c --- high-debug-ref/arch/i386/kernel/setup.c Thu Sep 20 01:43:27 2001 +++ high-debug/arch/i386/kernel/setup.c Fri Sep 21 06:37:54 2001 @@ -821,7 +821,19 @@ */ #define VMALLOC_RESERVE (unsigned long)(128 << 20) #define MAXMEM (unsigned long)(-PAGE_OFFSET-VMALLOC_RESERVE) +#ifdef CONFIG_HIGHMEM_DEBUG +#define MAXMEM_PFN \ +({ \ + int __max_pfn; \ + if (max_pfn > PFN_DOWN(MAXMEM)) \ + __max_pfn = PFN_DOWN(MAXMEM); \ + else \ + __max_pfn = max_pfn / 2; \ + __max_pfn; \ +}) +#else #define MAXMEM_PFN PFN_DOWN(MAXMEM) +#endif #define MAX_NONPAE_PFN (1 << 20) /*