--- zzzz-none-000/linux-2.6.39.4/include/linux/mm.h 2011-08-03 19:43:28.000000000 +0000 +++ puma6-arm-6490-729/linux-2.6.39.4/include/linux/mm.h 2021-11-10 13:23:10.000000000 +0000 @@ -1,3 +1,11 @@ + +/****************************************************************** + + Includes Intel Corporation's changes/modifications dated: 01/2013. + Changed/modified portions - Copyright(c) 2013, Intel Corporation. + +******************************************************************/ + #ifndef _LINUX_MM_H #define _LINUX_MM_H @@ -22,6 +30,11 @@ struct user_struct; struct writeback_control; +#if defined(CONFIG_AVM_PAGE_TRACE) +unsigned long avm_get_page_current_pc(struct page *page); +void avm_set_page_current_pc(struct page *page, unsigned long pc); +#endif/*--- #if defined(CONFIG_AVM_PAGE_TRACE) ---*/ + #ifndef CONFIG_DISCONTIGMEM /* Don't use mapnrs, do it properly */ extern unsigned long max_mapnr; #endif @@ -31,6 +44,10 @@ extern void * high_memory; extern int page_cluster; +#if defined(CONFIG_MACH_PUMA6) +extern phys_addr_t puma6_memory_end; +#endif + #ifdef CONFIG_SYSCTL extern int sysctl_legacy_va_layout; #else @@ -284,6 +301,9 @@ } extern int page_is_ram(unsigned long pfn); +#ifdef CONFIG_ARCH_GEN3 +int range_is_sys_ram(unsigned long pfn, unsigned long size); +#endif /* Support for virtually mapped pages */ struct page *vmalloc_to_page(const void *addr); @@ -314,21 +334,23 @@ } #endif -static inline void compound_lock(struct page *page) +extern void kvfree(const void *addr); + +static inline void compound_lock(struct page *page __attribute__((unused))) { #ifdef CONFIG_TRANSPARENT_HUGEPAGE bit_spin_lock(PG_compound_lock, &page->flags); #endif } -static inline void compound_unlock(struct page *page) +static inline void compound_unlock(struct page *page __attribute__((unused))) { #ifdef CONFIG_TRANSPARENT_HUGEPAGE bit_spin_unlock(PG_compound_lock, &page->flags); #endif } -static inline unsigned long compound_lock_irqsave(struct page *page) +static inline unsigned long compound_lock_irqsave(struct page *page __attribute__((unused))) { unsigned long uninitialized_var(flags); #ifdef CONFIG_TRANSPARENT_HUGEPAGE @@ -338,8 +360,8 @@ return flags; } -static inline void compound_unlock_irqrestore(struct page *page, - unsigned long flags) +static inline void compound_unlock_irqrestore(struct page *page __attribute__((unused)), + unsigned long flags __attribute__((unused))) { #ifdef CONFIG_TRANSPARENT_HUGEPAGE compound_unlock(page); @@ -657,7 +679,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; @@ -1157,7 +1179,7 @@ #if defined(SPLIT_RSS_COUNTING) void sync_mm_rss(struct task_struct *task, struct mm_struct *mm); #else -static inline void sync_mm_rss(struct task_struct *task, struct mm_struct *mm) +static inline void sync_mm_rss(struct task_struct *task __attribute__((unused)), struct mm_struct *mm __attribute__((unused))) { } #endif @@ -1202,8 +1224,8 @@ } #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; } @@ -1212,8 +1234,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; } @@ -1363,7 +1385,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; } @@ -1493,7 +1515,12 @@ void task_dirty_inc(struct task_struct *tsk); /* readahead.c */ -#define VM_MAX_READAHEAD 128 /* kbytes */ +#if defined (CONFIG_AVM_KERNEL) + /*= 20160914 AVM/WKR larger USB storage transfers for more speed =*/ + #define VM_MAX_READAHEAD 512 /* kbytes */ +#else + #define VM_MAX_READAHEAD 128 /* kbytes */ +#endif #define VM_MIN_READAHEAD 16 /* kbytes (includes current page) */ int force_page_cache_readahead(struct address_space *mapping, struct file *filp, @@ -1578,6 +1605,7 @@ #define FOLL_MLOCK 0x40 /* mark page as mlocked */ #define FOLL_SPLIT 0x80 /* don't return transhuge pages, split them */ #define FOLL_HWPOISON 0x100 /* check page is hwpoisoned */ +#define FOLL_COW 0x4000 typedef int (*pte_fn_t)(pte_t *pte, pgtable_t token, unsigned long addr, void *data); @@ -1607,7 +1635,7 @@ #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) { }