--- zzzz-none-000/linux-2.6.19.2/include/linux/mmzone.h 2007-01-10 19:10:37.000000000 +0000 +++ davinci-8020-5505/linux-2.6.19.2/include/linux/mmzone.h 2008-06-19 07:46:28.000000000 +0000 @@ -218,9 +218,13 @@ * under - it drives the swappiness decision: whether to unmap mapped * pages. * - * Access to both this field is quite racy even on uniprocessor. But + * temp_priority is used to remember the scanning priority at which + * this zone was successfully refilled to free_pages == pages_high. + * + * Access to both these fields is quite racy even on uniprocessor. But * it is expected to average out OK. */ + int temp_priority; int prev_priority; @@ -643,6 +647,15 @@ static inline int pfn_valid(unsigned long pfn) { +#if defined(CONFIG_MIPS) +#if defined(CONFIG_MIPS_UR8) + unsigned int ram_start = CONFIG_MIPS_UR8_PHY_MEMSTART; +#endif /*--- #if defined(CONFIG_MIPS_UR8) ---*/ + /*--- Speicher Spar Hack Anfang ---*/ + if(pfn < (ram_start >> PAGE_SHIFT)) + return 0; + /*--- Speicher Spar Hack Ende ---*/ +#endif /*--- #if defined(CONFIG_MIPS) ---*/ if (pfn_to_section_nr(pfn) >= NR_MEM_SECTIONS) return 0; return valid_section(__nr_to_section(pfn_to_section_nr(pfn))); @@ -676,6 +689,22 @@ #define early_pfn_in_nid(pfn, nid) (1) #endif +#if defined(CONFIG_MIPS) +/*--- Speicher Spar Hack Anfang ---*/ +static inline int _early_pfn_valid(unsigned long pfn) { +#if defined(CONFIG_MIPS_UR8) + unsigned int ram_start = CONFIG_MIPS_UR8_PHY_MEMSTART; +#endif /*--- #if defined(CONFIG_MIPS_UR8) ---*/ + /*--- Speicher Spar Hack ---*/ + if(pfn < (ram_start >> PAGE_SHIFT)) + return 0; + return 1; +} + +#define early_pfn_valid(pfn) _early_pfn_valid(pfn) +/*--- Speicher Spar Hack Ende ---*/ +#endif /*--- #if defined(CONFIG_MIPS) ---*/ + #ifndef early_pfn_valid #define early_pfn_valid(pfn) (1) #endif