--- zzzz-none-000/linux-2.6.28.10/include/linux/mm.h 2009-05-02 18:54:43.000000000 +0000 +++ fusiv-7390-686/linux-2.6.28.10/include/linux/mm.h 2012-02-14 14:37:49.000000000 +0000 @@ -509,7 +509,7 @@ return (page->flags >> ZONEID_PGSHIFT) & ZONEID_MASK; } -static inline int zone_to_nid(struct zone *zone) +static inline int zone_to_nid(struct zone *zone __attribute__ ((unused))) { #ifdef CONFIG_NUMA return zone->node; @@ -878,8 +878,8 @@ extern pte_t *get_locked_pte(struct mm_struct *mm, unsigned long addr, spinlock_t **ptl); #ifdef __PAGETABLE_PUD_FOLDED -static inline int __pud_alloc(struct mm_struct *mm, pgd_t *pgd, - unsigned long address) +static inline int __pud_alloc(struct mm_struct *mm __attribute__ ((unused)), pgd_t *pgd __attribute__ ((unused)), + unsigned long address __attribute__ ((unused))) { return 0; } @@ -888,8 +888,8 @@ #endif #ifdef __PAGETABLE_PMD_FOLDED -static inline int __pmd_alloc(struct mm_struct *mm, pud_t *pud, - unsigned long address) +static inline int __pmd_alloc(struct mm_struct *mm __attribute__ ((unused)), pud_t *pud __attribute__ ((unused)), + unsigned long address __attribute__ ((unused))) { return 0; } @@ -1031,7 +1031,7 @@ #if !defined(CONFIG_ARCH_POPULATES_NODE_MAP) && \ !defined(CONFIG_HAVE_ARCH_EARLY_PFN_TO_NID) -static inline int __early_pfn_to_nid(unsigned long pfn) +static inline int __early_pfn_to_nid(unsigned long pfn __attribute__ ((unused))) { return 0; } @@ -1105,10 +1105,10 @@ extern void added_exe_file_vma(struct mm_struct *mm); extern void removed_exe_file_vma(struct mm_struct *mm); #else -static inline void added_exe_file_vma(struct mm_struct *mm) +static inline void added_exe_file_vma(struct mm_struct *mm __attribute__ ((unused))) {} -static inline void removed_exe_file_vma(struct mm_struct *mm) +static inline void removed_exe_file_vma(struct mm_struct *mm __attribute__ ((unused))) {} #endif /* CONFIG_PROC_FS */ @@ -1234,8 +1234,8 @@ #ifdef CONFIG_PROC_FS void vm_stat_account(struct mm_struct *, unsigned long, struct file *, long); #else -static inline void vm_stat_account(struct mm_struct *mm, - unsigned long flags, struct file *file, long pages) +static inline void vm_stat_account(struct mm_struct *mm __attribute__ ((unused)), + unsigned long flags __attribute__ ((unused)), struct file *file __attribute__ ((unused)), long pages __attribute__ ((unused))) { } #endif /* CONFIG_PROC_FS */ @@ -1254,12 +1254,12 @@ #endif /* CONFIG_HIBERNATION */ #else static inline void -kernel_map_pages(struct page *page, int numpages, int enable) {} +kernel_map_pages(struct page *page __attribute__ ((unused)), int numpages __attribute__ ((unused)), int enable __attribute__ ((unused))) {} static inline void enable_debug_pagealloc(void) { } #ifdef CONFIG_HIBERNATION -static inline bool kernel_page_present(struct page *page) { return true; } +static inline bool kernel_page_present(struct page *page __attribute__ ((unused))) { return true; } #endif /* CONFIG_HIBERNATION */ #endif @@ -1297,6 +1297,14 @@ unsigned long pages, int node); int vmemmap_populate(struct page *start_page, unsigned long pages, int node); void vmemmap_populate_print_last(void); +#ifdef CONFIG_FUSIV_USB_OPTIMIZATION +/* + * Function checks read/write page cache and if there are more pages then try + * to free unused pages + */ +#define FUSIV_MAX_CACHE_MEM_THRHLD (10*1024*1024)/PAGE_SIZE // No of pages +unsigned long fusiv_invalidate_mapping_pages(struct address_space *mapping,pgoff_t end); +#endif #endif /* __KERNEL__ */ #endif /* _LINUX_MM_H */