From b2dd867477c080de713e366809b71fd500a6b300 Mon Sep 17 00:00:00 2001 From: Andrew Morton Date: Wed, 1 Oct 2003 10:57:58 -0700 Subject: [PATCH] memory writeback/invalidation fixes From: "David S. Miller" This attempts to take care of 2 of the MM todos I had on my backlog: 1) Zap the stupid flush_cache_all() thing with more meaningful interfaces. 2) Resolve the ptrace user page access issues, first stage. The "first stage" mentioned for #2 is simply creating the user page accesor interfaces. The next stage needs to be mucking with get_user_pages() so that we can control when the flush_dcache_page() occurs. Then we: 1) For every platform where flush_dcache_page() is a non-nop add a call to the beginning of copy_{from,to}_user_page(). 2) Make access_process_vm() set the "no dcache flush" bit in it's call to get_user_pages(). The idea also was that we'd consolidate the write etc. boolean args passed to get_user_pages() into flag bits too. But at least with the below, we can delete that reminder FIXME comment from kernel/ptrace.c, the platforms have the necessary tools and just need to make use of it :) As a bonus I noticed that VMALLOC_VMADDR() did absolutely nothing. After all of this I only have 1 real TODO left, and that's dealing with the SMP TLB/pte invalidation stuff, very low priority until someone starts doing more work with sparc32/SMP in 2.6.x :) --- include/asm-alpha/cacheflush.h | 9 +++++++++ include/asm-alpha/pgtable.h | 1 - include/asm-arm/arch-adifcc/vmalloc.h | 1 - include/asm-arm/arch-anakin/vmalloc.h | 3 +-- include/asm-arm/arch-cl7500/vmalloc.h | 1 - include/asm-arm/arch-clps711x/vmalloc.h | 1 - include/asm-arm/arch-ebsa110/vmalloc.h | 1 - include/asm-arm/arch-ebsa285/vmalloc.h | 1 - include/asm-arm/arch-epxa10db/vmalloc.h | 1 - include/asm-arm/arch-integrator/vmalloc.h | 1 - include/asm-arm/arch-iop3xx/vmalloc.h | 1 - include/asm-arm/arch-l7200/vmalloc.h | 1 - include/asm-arm/arch-nexuspci/vmalloc.h | 1 - include/asm-arm/arch-pxa/vmalloc.h | 1 - include/asm-arm/arch-rpc/vmalloc.h | 1 - include/asm-arm/arch-sa1100/vmalloc.h | 1 - include/asm-arm/arch-shark/vmalloc.h | 1 - include/asm-arm/arch-tbox/vmalloc.h | 1 - include/asm-arm/cacheflush.h | 9 +++++++++ include/asm-arm26/cacheflush.h | 7 +++++++ include/asm-arm26/pgtable.h | 1 - include/asm-cris/arch-v10/pgtable.h | 2 -- include/asm-cris/cacheflush.h | 7 +++++++ include/asm-h8300/cacheflush.h | 8 +++++++- include/asm-i386/cacheflush.h | 7 +++++++ include/asm-i386/highmem.h | 2 ++ include/asm-i386/pgtable.h | 1 - include/asm-ia64/cacheflush.h | 9 +++++++++ include/asm-ia64/pgtable.h | 1 - include/asm-m68k/cacheflush.h | 7 +++++++ include/asm-m68k/pgtable.h | 2 -- include/asm-m68knommu/cacheflush.h | 6 ++++++ include/asm-mips/cacheflush.h | 8 ++++++++ include/asm-mips/highmem.h | 2 ++ include/asm-mips/pgtable-32.h | 1 - include/asm-mips/pgtable-64.h | 1 - include/asm-parisc/cacheflush.h | 10 ++++++++++ include/asm-parisc/pgtable.h | 1 - include/asm-ppc/cacheflush.h | 9 +++++++++ include/asm-ppc/highmem.h | 2 ++ include/asm-ppc/pgtable.h | 1 - include/asm-ppc64/cacheflush.h | 10 ++++++++++ include/asm-ppc64/pgtable.h | 1 - include/asm-s390/cacheflush.h | 7 +++++++ include/asm-s390/pgtable.h | 1 - include/asm-sh/cacheflush.h | 10 ++++++++++ include/asm-sh/pgtable.h | 1 - include/asm-sparc/cacheflush.h | 8 ++++++++ include/asm-sparc/highmem.h | 2 ++ include/asm-sparc/pgtable.h | 2 -- include/asm-sparc64/cacheflush.h | 8 ++++++++ include/asm-sparc64/pgtable.h | 1 - include/asm-um/pgtable.h | 1 - include/asm-v850/cacheflush.h | 8 ++++++++ include/asm-x86_64/cacheflush.h | 7 +++++++ include/asm-x86_64/pgtable.h | 1 - 56 files changed, 162 insertions(+), 38 deletions(-) (limited to 'include') diff --git a/include/asm-alpha/cacheflush.h b/include/asm-alpha/cacheflush.h index 1604d6cd22df..68babfa19303 100644 --- a/include/asm-alpha/cacheflush.h +++ b/include/asm-alpha/cacheflush.h @@ -10,6 +10,8 @@ #define flush_cache_range(vma, start, end) do { } while (0) #define flush_cache_page(vma, vmaddr) do { } while (0) #define flush_dcache_page(page) do { } while (0) +#define flush_cache_vmap(start, end) do { } while (0) +#define flush_cache_vunmap(start, end) do { } while (0) /* Note that the following two definitions are _highly_ dependent on the contexts in which they are used in the kernel. I personally @@ -60,4 +62,11 @@ extern void flush_icache_user_range(struct vm_area_struct *vma, #define flush_icache_page(vma, page) \ flush_icache_user_range((vma), (page), 0, 0) +#define copy_to_user_page(vma, page, vaddr, dst, src, len) \ +do { memcpy(dst, src, len); \ + flush_icache_user_range(vma, page, vaddr, len); \ +} while (0) +#define copy_from_user_page(vma, page, vaddr, dst, src, len) \ + memcpy(dst, src, len) + #endif /* _ALPHA_CACHEFLUSH_H */ diff --git a/include/asm-alpha/pgtable.h b/include/asm-alpha/pgtable.h index 60bf13e10b4e..62954be6f0e4 100644 --- a/include/asm-alpha/pgtable.h +++ b/include/asm-alpha/pgtable.h @@ -49,7 +49,6 @@ #else #define VMALLOC_START (-2*PGDIR_SIZE) #endif -#define VMALLOC_VMADDR(x) ((unsigned long)(x)) #define VMALLOC_END (-PGDIR_SIZE) /* diff --git a/include/asm-arm/arch-adifcc/vmalloc.h b/include/asm-arm/arch-adifcc/vmalloc.h index c97b56b30d97..a6c4617996b6 100644 --- a/include/asm-arm/arch-adifcc/vmalloc.h +++ b/include/asm-arm/arch-adifcc/vmalloc.h @@ -12,7 +12,6 @@ */ #define VMALLOC_OFFSET (8*1024*1024) #define VMALLOC_START (((unsigned long)high_memory + VMALLOC_OFFSET) & ~(VMALLOC_OFFSET-1)) -#define VMALLOC_VMADDR(x) ((unsigned long)(x)) #define VMALLOC_END (0xe8000000) #define MODULE_START (PAGE_OFFSET - 16*1048576) diff --git a/include/asm-arm/arch-anakin/vmalloc.h b/include/asm-arm/arch-anakin/vmalloc.h index 913837cc41c9..85a859fb54f3 100644 --- a/include/asm-arm/arch-anakin/vmalloc.h +++ b/include/asm-arm/arch-anakin/vmalloc.h @@ -19,8 +19,7 @@ * linux/arch/arm/kernel/traps.c) */ #define VMALLOC_ARCH_OFFSET (8 * 1024 * 1024) -#define VMALLOC_VMADDR(a) ((unsigned int) (a)) -#define VMALLOC_START ((VMALLOC_VMADDR(high_memory) + VMALLOC_ARCH_OFFSET) & ~(VMALLOC_ARCH_OFFSET - 1)) +#define VMALLOC_START (((unsigned long) (high_memory) + VMALLOC_ARCH_OFFSET) & ~(VMALLOC_ARCH_OFFSET - 1)) #define VMALLOC_END (PAGE_OFFSET + 0x10000000) #define MODULE_START (PAGE_OFFSET - 16*1048576) diff --git a/include/asm-arm/arch-cl7500/vmalloc.h b/include/asm-arm/arch-cl7500/vmalloc.h index 0e7e4b55270b..45679f3a5038 100644 --- a/include/asm-arm/arch-cl7500/vmalloc.h +++ b/include/asm-arm/arch-cl7500/vmalloc.h @@ -12,7 +12,6 @@ */ #define VMALLOC_OFFSET (8*1024*1024) #define VMALLOC_START (((unsigned long)high_memory + VMALLOC_OFFSET) & ~(VMALLOC_OFFSET-1)) -#define VMALLOC_VMADDR(x) ((unsigned long)(x)) #define VMALLOC_END (PAGE_OFFSET + 0x1c000000) #define MODULE_START (PAGE_OFFSET - 16*1048576) diff --git a/include/asm-arm/arch-clps711x/vmalloc.h b/include/asm-arm/arch-clps711x/vmalloc.h index b5d34fcb7ea0..c7d04badb864 100644 --- a/include/asm-arm/arch-clps711x/vmalloc.h +++ b/include/asm-arm/arch-clps711x/vmalloc.h @@ -28,7 +28,6 @@ */ #define VMALLOC_OFFSET (8*1024*1024) #define VMALLOC_START (((unsigned long)high_memory + VMALLOC_OFFSET) & ~(VMALLOC_OFFSET-1)) -#define VMALLOC_VMADDR(x) ((unsigned long)(x)) #define VMALLOC_END (PAGE_OFFSET + 0x10000000) #define MODULE_START (PAGE_OFFSET - 16*1048576) diff --git a/include/asm-arm/arch-ebsa110/vmalloc.h b/include/asm-arm/arch-ebsa110/vmalloc.h index 6b6b233de95a..999cd2eb17db 100644 --- a/include/asm-arm/arch-ebsa110/vmalloc.h +++ b/include/asm-arm/arch-ebsa110/vmalloc.h @@ -18,7 +18,6 @@ */ #define VMALLOC_OFFSET (8*1024*1024) #define VMALLOC_START (((unsigned long)high_memory + VMALLOC_OFFSET) & ~(VMALLOC_OFFSET-1)) -#define VMALLOC_VMADDR(x) ((unsigned long)(x)) #define VMALLOC_END (PAGE_OFFSET + 0x1f000000) #define MODULE_START (PAGE_OFFSET - 16*1048576) diff --git a/include/asm-arm/arch-ebsa285/vmalloc.h b/include/asm-arm/arch-ebsa285/vmalloc.h index 31b2c6715620..48db55f784f9 100644 --- a/include/asm-arm/arch-ebsa285/vmalloc.h +++ b/include/asm-arm/arch-ebsa285/vmalloc.h @@ -18,7 +18,6 @@ */ #define VMALLOC_OFFSET (8*1024*1024) #define VMALLOC_START (((unsigned long)high_memory + VMALLOC_OFFSET) & ~(VMALLOC_OFFSET-1)) -#define VMALLOC_VMADDR(x) ((unsigned long)(x)) #ifdef CONFIG_ARCH_FOOTBRIDGE #define VMALLOC_END (PAGE_OFFSET + 0x30000000) diff --git a/include/asm-arm/arch-epxa10db/vmalloc.h b/include/asm-arm/arch-epxa10db/vmalloc.h index d6961cf75699..904c8e1d8bdf 100644 --- a/include/asm-arm/arch-epxa10db/vmalloc.h +++ b/include/asm-arm/arch-epxa10db/vmalloc.h @@ -28,7 +28,6 @@ */ #define VMALLOC_OFFSET (8*1024*1024) #define VMALLOC_START (((unsigned long)high_memory + VMALLOC_OFFSET) & ~(VMALLOC_OFFSET-1)) -#define VMALLOC_VMADDR(x) ((unsigned long)(x)) #define VMALLOC_END (PAGE_OFFSET + 0x10000000) #define MODULE_START (PAGE_OFFSET - 16*1048576) diff --git a/include/asm-arm/arch-integrator/vmalloc.h b/include/asm-arm/arch-integrator/vmalloc.h index 41b5a1b84b11..85c48104d31b 100644 --- a/include/asm-arm/arch-integrator/vmalloc.h +++ b/include/asm-arm/arch-integrator/vmalloc.h @@ -28,7 +28,6 @@ */ #define VMALLOC_OFFSET (8*1024*1024) #define VMALLOC_START (((unsigned long)high_memory + VMALLOC_OFFSET) & ~(VMALLOC_OFFSET-1)) -#define VMALLOC_VMADDR(x) ((unsigned long)(x)) #define VMALLOC_END (PAGE_OFFSET + 0x10000000) #define MODULE_START (PAGE_OFFSET - 16*1048576) diff --git a/include/asm-arm/arch-iop3xx/vmalloc.h b/include/asm-arm/arch-iop3xx/vmalloc.h index f38a1b80d145..41247f6eb90f 100644 --- a/include/asm-arm/arch-iop3xx/vmalloc.h +++ b/include/asm-arm/arch-iop3xx/vmalloc.h @@ -12,7 +12,6 @@ */ #define VMALLOC_OFFSET (8*1024*1024) #define VMALLOC_START (((unsigned long)high_memory + VMALLOC_OFFSET) & ~(VMALLOC_OFFSET-1)) -#define VMALLOC_VMADDR(x) ((unsigned long)(x)) #define VMALLOC_END (0xe8000000) #define MODULE_START (PAGE_OFFSET - 16*1048576) diff --git a/include/asm-arm/arch-l7200/vmalloc.h b/include/asm-arm/arch-l7200/vmalloc.h index 7c19757c1b00..830d1ae7c6ff 100644 --- a/include/asm-arm/arch-l7200/vmalloc.h +++ b/include/asm-arm/arch-l7200/vmalloc.h @@ -12,7 +12,6 @@ */ #define VMALLOC_OFFSET (8*1024*1024) #define VMALLOC_START (((unsigned long)high_memory + VMALLOC_OFFSET) & ~(VMALLOC_OFFSET-1)) -#define VMALLOC_VMADDR(x) ((unsigned long)(x)) #define VMALLOC_END (PAGE_OFFSET + 0x10000000) #define MODULE_START (PAGE_OFFSET - 16*1048576) diff --git a/include/asm-arm/arch-nexuspci/vmalloc.h b/include/asm-arm/arch-nexuspci/vmalloc.h index 877a164f5668..4522c0c9a0ad 100644 --- a/include/asm-arm/arch-nexuspci/vmalloc.h +++ b/include/asm-arm/arch-nexuspci/vmalloc.h @@ -12,7 +12,6 @@ */ #define VMALLOC_OFFSET (8*1024*1024) #define VMALLOC_START (((unsigned long)high_memory + VMALLOC_OFFSET) & ~(VMALLOC_OFFSET-1)) -#define VMALLOC_VMADDR(x) ((unsigned long)(x)) #define VMALLOC_END (PAGE_OFFSET + 0x20000000) #define MODULE_START (PAGE_OFFSET - 16*1048576) diff --git a/include/asm-arm/arch-pxa/vmalloc.h b/include/asm-arm/arch-pxa/vmalloc.h index a3a19b8100c4..a7a34c72e81f 100644 --- a/include/asm-arm/arch-pxa/vmalloc.h +++ b/include/asm-arm/arch-pxa/vmalloc.h @@ -19,7 +19,6 @@ */ #define VMALLOC_OFFSET (8*1024*1024) #define VMALLOC_START (((unsigned long)high_memory + VMALLOC_OFFSET) & ~(VMALLOC_OFFSET-1)) -#define VMALLOC_VMADDR(x) ((unsigned long)(x)) #define VMALLOC_END (0xe8000000) #define MODULE_START (PAGE_OFFSET - 16*1048576) diff --git a/include/asm-arm/arch-rpc/vmalloc.h b/include/asm-arm/arch-rpc/vmalloc.h index f47bed41b2bb..6807904a48b2 100644 --- a/include/asm-arm/arch-rpc/vmalloc.h +++ b/include/asm-arm/arch-rpc/vmalloc.h @@ -18,7 +18,6 @@ */ #define VMALLOC_OFFSET (8*1024*1024) #define VMALLOC_START (((unsigned long)high_memory + VMALLOC_OFFSET) & ~(VMALLOC_OFFSET-1)) -#define VMALLOC_VMADDR(x) ((unsigned long)(x)) #define VMALLOC_END (PAGE_OFFSET + 0x1c000000) #define MODULE_START (PAGE_OFFSET - 16*1048576) diff --git a/include/asm-arm/arch-sa1100/vmalloc.h b/include/asm-arm/arch-sa1100/vmalloc.h index 35c2f3fe740e..57d351f202c6 100644 --- a/include/asm-arm/arch-sa1100/vmalloc.h +++ b/include/asm-arm/arch-sa1100/vmalloc.h @@ -12,7 +12,6 @@ */ #define VMALLOC_OFFSET (8*1024*1024) #define VMALLOC_START (((unsigned long)high_memory + VMALLOC_OFFSET) & ~(VMALLOC_OFFSET-1)) -#define VMALLOC_VMADDR(x) ((unsigned long)(x)) #define VMALLOC_END (0xe8000000) #define MODULE_START (PAGE_OFFSET - 16*1048576) diff --git a/include/asm-arm/arch-shark/vmalloc.h b/include/asm-arm/arch-shark/vmalloc.h index 8a45e9d954c6..346e3b1d719b 100644 --- a/include/asm-arm/arch-shark/vmalloc.h +++ b/include/asm-arm/arch-shark/vmalloc.h @@ -12,7 +12,6 @@ */ #define VMALLOC_OFFSET (8*1024*1024) #define VMALLOC_START (((unsigned long)high_memory + VMALLOC_OFFSET) & ~(VMALLOC_OFFSET-1)) -#define VMALLOC_VMADDR(x) ((unsigned long)(x)) #define VMALLOC_END (PAGE_OFFSET + 0x10000000) #define MODULE_START (PAGE_OFFSET - 16*1048576) diff --git a/include/asm-arm/arch-tbox/vmalloc.h b/include/asm-arm/arch-tbox/vmalloc.h index c620d349a698..c53f69b224cd 100644 --- a/include/asm-arm/arch-tbox/vmalloc.h +++ b/include/asm-arm/arch-tbox/vmalloc.h @@ -12,7 +12,6 @@ */ #define VMALLOC_OFFSET (8*1024*1024) #define VMALLOC_START (((unsigned long)high_memory + VMALLOC_OFFSET) & ~(VMALLOC_OFFSET-1)) -#define VMALLOC_VMADDR(x) ((unsigned long)(x)) #define VMALLOC_END (PAGE_OFFSET + 0x10000000) #define MODULE_START (PAGE_OFFSET - 16*1048576) diff --git a/include/asm-arm/cacheflush.h b/include/asm-arm/cacheflush.h index cff6d6f05913..fbe02c9470aa 100644 --- a/include/asm-arm/cacheflush.h +++ b/include/asm-arm/cacheflush.h @@ -207,6 +207,15 @@ extern void dmac_inv_range(unsigned long, unsigned long); extern void dmac_clean_range(unsigned long, unsigned long); extern void dmac_flush_range(unsigned long, unsigned long); +#define flush_cache_vmap(start, end) flush_cache_all() +#define flush_cache_vunmap(start, end) flush_cache_all() +#define copy_to_user_page(vma, page, vaddr, dst, src, len) \ +do { memcpy(dst, src, len); \ + flush_icache_user_range(vma, page, vaddr, len); \ +} while (0) +#define copy_from_user_page(vma, page, vaddr, dst, src, len) \ + memcpy(dst, src, len) + #endif /* diff --git a/include/asm-arm26/cacheflush.h b/include/asm-arm26/cacheflush.h index 7af6c20234e6..6829621986e5 100644 --- a/include/asm-arm26/cacheflush.h +++ b/include/asm-arm26/cacheflush.h @@ -25,6 +25,8 @@ #define flush_cache_range(vma,start,end) do { } while (0) #define flush_cache_page(vma,vmaddr) do { } while (0) #define flush_page_to_ram(page) do { } while (0) +#define flush_cache_vmap(start, end) do { } while (0) +#define flush_cache_vunmap(start, end) do { } while (0) #define invalidate_dcache_range(start,end) do { } while (0) #define clean_dcache_range(start,end) do { } while (0) @@ -37,6 +39,11 @@ #define flush_icache_range(start,end) do { } while (0) #define flush_icache_page(vma,page) do { } while (0) +#define copy_to_user_page(vma, page, vaddr, dst, src, len) \ + memcpy(dst, src, len) +#define copy_from_user_page(vma, page, vaddr, dst, src, len) \ + memcpy(dst, src, len) + /* DAG: ARM3 will flush cache on MEMC updates anyway? so don't bother */ /* IM : Yes, it will, but only if setup to do so (we do this). */ #define clean_cache_area(_start,_size) do { } while (0) diff --git a/include/asm-arm26/pgtable.h b/include/asm-arm26/pgtable.h index 3fb067eaf801..55b667aa7d2f 100644 --- a/include/asm-arm26/pgtable.h +++ b/include/asm-arm26/pgtable.h @@ -173,7 +173,6 @@ extern struct page *empty_zero_page; * area for the same reason. ;) FIXME: surely 1 page not 4k ? */ #define VMALLOC_START 0x01a00000 -#define VMALLOC_VMADDR(x) ((unsigned long)(x)) #define VMALLOC_END 0x01c00000 /* Is pmd_page supposed to return a pointer to a page in some arches? ours seems to diff --git a/include/asm-cris/arch-v10/pgtable.h b/include/asm-cris/arch-v10/pgtable.h index 65eecd1e6538..2a2576d1fc97 100644 --- a/include/asm-cris/arch-v10/pgtable.h +++ b/include/asm-cris/arch-v10/pgtable.h @@ -7,11 +7,9 @@ #ifdef CONFIG_CRIS_LOW_MAP #define VMALLOC_START KSEG_7 -#define VMALLOC_VMADDR(x) ((unsigned long)(x)) #define VMALLOC_END KSEG_8 #else #define VMALLOC_START KSEG_D -#define VMALLOC_VMADDR(x) ((unsigned long)(x)) #define VMALLOC_END KSEG_E #endif diff --git a/include/asm-cris/cacheflush.h b/include/asm-cris/cacheflush.h index 6be38857a0ae..31602059890e 100644 --- a/include/asm-cris/cacheflush.h +++ b/include/asm-cris/cacheflush.h @@ -16,6 +16,13 @@ #define flush_icache_range(start, end) do { } while (0) #define flush_icache_page(vma,pg) do { } while (0) #define flush_icache_user_range(vma,pg,adr,len) do { } while (0) +#define flush_cache_vmap(start, end) do { } while (0) +#define flush_cache_vunmap(start, end) do { } while (0) + +#define copy_to_user_page(vma, page, vaddr, dst, src, len) \ + memcpy(dst, src, len) +#define copy_from_user_page(vma, page, vaddr, dst, src, len) \ + memcpy(dst, src, len) void global_flush_tlb(void); int change_page_attr(struct page *page, int numpages, pgprot_t prot); diff --git a/include/asm-h8300/cacheflush.h b/include/asm-h8300/cacheflush.h index 6cd61c3a358c..429eee0270fe 100644 --- a/include/asm-h8300/cacheflush.h +++ b/include/asm-h8300/cacheflush.h @@ -11,7 +11,6 @@ */ #define flush_cache_all() -#define flush_cache_all() #define flush_cache_mm(mm) #define flush_cache_range(vma,a,b) #define flush_cache_page(vma,p) @@ -20,6 +19,8 @@ #define flush_icache() #define flush_icache_page(vma,page) #define flush_icache_range(start,len) +#define flush_cache_vmap(start, end) +#define flush_cache_vunmap(start, end) #define cache_push_v(vaddr,len) #define cache_push(paddr,len) #define cache_clear(paddr,len) @@ -28,4 +29,9 @@ #define flush_icache_user_range(vma,page,addr,len) +#define copy_to_user_page(vma, page, vaddr, dst, src, len) \ + memcpy(dst, src, len) +#define copy_from_user_page(vma, page, vaddr, dst, src, len) \ + memcpy(dst, src, len) + #endif /* _ASM_H8300_CACHEFLUSH_H */ diff --git a/include/asm-i386/cacheflush.h b/include/asm-i386/cacheflush.h index d3ce5511dbbc..9f78028b23e4 100644 --- a/include/asm-i386/cacheflush.h +++ b/include/asm-i386/cacheflush.h @@ -13,6 +13,13 @@ #define flush_icache_range(start, end) do { } while (0) #define flush_icache_page(vma,pg) do { } while (0) #define flush_icache_user_range(vma,pg,adr,len) do { } while (0) +#define flush_cache_vmap(start, end) do { } while (0) +#define flush_cache_vunmap(start, end) do { } while (0) + +#define copy_to_user_page(vma, page, vaddr, dst, src, len) \ + memcpy(dst, src, len) +#define copy_from_user_page(vma, page, vaddr, dst, src, len) \ + memcpy(dst, src, len) void global_flush_tlb(void); int change_page_attr(struct page *page, int numpages, pgprot_t prot); diff --git a/include/asm-i386/highmem.h b/include/asm-i386/highmem.h index 207fc9c5f43d..454b23ffd78a 100644 --- a/include/asm-i386/highmem.h +++ b/include/asm-i386/highmem.h @@ -63,6 +63,8 @@ void *kmap_atomic(struct page *page, enum km_type type); void kunmap_atomic(void *kvaddr, enum km_type type); struct page *kmap_atomic_to_page(void *ptr); +#define flush_cache_kmaps() do { } while (0) + #endif /* __KERNEL__ */ #endif /* _ASM_HIGHMEM_H */ diff --git a/include/asm-i386/pgtable.h b/include/asm-i386/pgtable.h index 869ec6c25786..741069aeadb9 100644 --- a/include/asm-i386/pgtable.h +++ b/include/asm-i386/pgtable.h @@ -85,7 +85,6 @@ void paging_init(void); #define VMALLOC_OFFSET (8*1024*1024) #define VMALLOC_START (((unsigned long) high_memory + 2*VMALLOC_OFFSET-1) & \ ~(VMALLOC_OFFSET-1)) -#define VMALLOC_VMADDR(x) ((unsigned long)(x)) #ifdef CONFIG_HIGHMEM # define VMALLOC_END (PKMAP_BASE-2*PAGE_SIZE) #else diff --git a/include/asm-ia64/cacheflush.h b/include/asm-ia64/cacheflush.h index 0fa5ae0c6416..8aefdd6b60b3 100644 --- a/include/asm-ia64/cacheflush.h +++ b/include/asm-ia64/cacheflush.h @@ -21,6 +21,8 @@ #define flush_cache_range(vma, start, end) do { } while (0) #define flush_cache_page(vma, vmaddr) do { } while (0) #define flush_icache_page(vma,page) do { } while (0) +#define flush_cache_vmap(start, end) do { } while (0) +#define flush_cache_vunmap(start, end) do { } while (0) #define flush_dcache_page(page) \ do { \ @@ -35,4 +37,11 @@ do { \ flush_icache_range(_addr, _addr + (len)); \ } while (0) +#define copy_to_user_page(vma, page, vaddr, dst, src, len) \ +do { memcpy(dst, src, len); \ + flush_icache_user_range(vma, page, vaddr, len); \ +} while (0) +#define copy_from_user_page(vma, page, vaddr, dst, src, len) \ + memcpy(dst, src, len) + #endif /* _ASM_IA64_CACHEFLUSH_H */ diff --git a/include/asm-ia64/pgtable.h b/include/asm-ia64/pgtable.h index 3da4c69db572..9f1f917e9b13 100644 --- a/include/asm-ia64/pgtable.h +++ b/include/asm-ia64/pgtable.h @@ -207,7 +207,6 @@ ia64_phys_addr_valid (unsigned long addr) #define RGN_KERNEL 7 #define VMALLOC_START 0xa000000200000000 -#define VMALLOC_VMADDR(x) ((unsigned long)(x)) #ifdef CONFIG_VIRTUAL_MEM_MAP # define VMALLOC_END_INIT (0xa000000000000000 + (1UL << (4*PAGE_SHIFT - 9))) # define VMALLOC_END vmalloc_end diff --git a/include/asm-m68k/cacheflush.h b/include/asm-m68k/cacheflush.h index 4aaf74d4874a..bb8d618a2d9d 100644 --- a/include/asm-m68k/cacheflush.h +++ b/include/asm-m68k/cacheflush.h @@ -80,6 +80,9 @@ extern void cache_push_v(unsigned long vaddr, int len); #define flush_cache_all() __flush_cache_all() +#define flush_cache_vmap(start, end) flush_cache_all() +#define flush_cache_vunmap(start, end) flush_cache_all() + extern inline void flush_cache_mm(struct mm_struct *mm) { if (mm == current->mm) @@ -127,6 +130,10 @@ extern inline void __flush_page_to_ram(void *vaddr) #define flush_dcache_page(page) __flush_page_to_ram(page_address(page)) #define flush_icache_page(vma, page) __flush_page_to_ram(page_address(page)) #define flush_icache_user_range(vma,pg,adr,len) do { } while (0) +#define copy_to_user_page(vma, page, vaddr, dst, src, len) \ + memcpy(dst, src, len) +#define copy_from_user_page(vma, page, vaddr, dst, src, len) \ + memcpy(dst, src, len) extern void flush_icache_range(unsigned long address, unsigned long endaddr); diff --git a/include/asm-m68k/pgtable.h b/include/asm-m68k/pgtable.h index 832995cd8398..54dc37121130 100644 --- a/include/asm-m68k/pgtable.h +++ b/include/asm-m68k/pgtable.h @@ -79,12 +79,10 @@ */ #define VMALLOC_OFFSET (8*1024*1024) #define VMALLOC_START (((unsigned long) high_memory + VMALLOC_OFFSET) & ~(VMALLOC_OFFSET-1)) -#define VMALLOC_VMADDR(x) ((unsigned long)(x)) #define VMALLOC_END KMAP_START #else extern unsigned long vmalloc_end; #define VMALLOC_START 0x0f800000 -#define VMALLOC_VMADDR(x) ((unsigned long)(x)) #define VMALLOC_END vmalloc_end #endif /* CONFIG_SUN3 */ diff --git a/include/asm-m68knommu/cacheflush.h b/include/asm-m68knommu/cacheflush.h index 5429ea10ed3c..3789be803aed 100644 --- a/include/asm-m68knommu/cacheflush.h +++ b/include/asm-m68knommu/cacheflush.h @@ -15,7 +15,13 @@ #define flush_icache_range(start,len) __flush_cache_all() #define flush_icache_page(vma,pg) do { } while (0) #define flush_icache_user_range(vma,pg,adr,len) do { } while (0) +#define flush_cache_vmap(start, end) flush_cache_all() +#define flush_cache_vunmap(start, end) flush_cache_all() +#define copy_to_user_page(vma, page, vaddr, dst, src, len) \ + memcpy(dst, src, len) +#define copy_from_user_page(vma, page, vaddr, dst, src, len) \ + memcpy(dst, src, len) extern inline void __flush_cache_all(void) { diff --git a/include/asm-mips/cacheflush.h b/include/asm-mips/cacheflush.h index 6090877e6f64..5f432f507cb3 100644 --- a/include/asm-mips/cacheflush.h +++ b/include/asm-mips/cacheflush.h @@ -43,7 +43,15 @@ extern void (*flush_icache_page)(struct vm_area_struct *vma, extern void (*flush_icache_range)(unsigned long start, unsigned long end); #define flush_icache_user_range(vma, page, addr, len) \ flush_icache_page(vma, page) +#define flush_cache_vmap(start, end) flush_cache_all() +#define flush_cache_vunmap(start, end) flush_cache_all() +#define copy_to_user_page(vma, page, vaddr, dst, src, len) \ +do { memcpy(dst, src, len); \ + flush_icache_user_range(vma, page, vaddr, len); \ +} while (0) +#define copy_from_user_page(vma, page, vaddr, dst, src, len) \ + memcpy(dst, src, len) extern void (*flush_cache_sigtramp)(unsigned long addr); extern void (*flush_icache_all)(void); diff --git a/include/asm-mips/highmem.h b/include/asm-mips/highmem.h index 36f5da14b1a1..963c9c6c81c9 100644 --- a/include/asm-mips/highmem.h +++ b/include/asm-mips/highmem.h @@ -54,6 +54,8 @@ extern void *kmap_atomic(struct page *page, enum km_type type); extern void kunmap_atomic(void *kvaddr, enum km_type type); extern struct page *kmap_atomic_to_page(void *ptr); +#define flush_cache_kmaps() flush_cache_all() + #endif /* __KERNEL__ */ #endif /* _ASM_HIGHMEM_H */ diff --git a/include/asm-mips/pgtable-32.h b/include/asm-mips/pgtable-32.h index 83a446eff0d9..c2dcefb10392 100644 --- a/include/asm-mips/pgtable-32.h +++ b/include/asm-mips/pgtable-32.h @@ -79,7 +79,6 @@ extern int add_temporary_entry(unsigned long entrylo0, unsigned long entrylo1, #define FIRST_USER_PGD_NR 0 #define VMALLOC_START KSEG2 -#define VMALLOC_VMADDR(x) ((unsigned long)(x)) #if CONFIG_HIGHMEM # define VMALLOC_END (PKMAP_BASE-2*PAGE_SIZE) diff --git a/include/asm-mips/pgtable-64.h b/include/asm-mips/pgtable-64.h index 5e80af4559b7..448a0d335f6e 100644 --- a/include/asm-mips/pgtable-64.h +++ b/include/asm-mips/pgtable-64.h @@ -64,7 +64,6 @@ #define FIRST_USER_PGD_NR 0 #define VMALLOC_START XKSEG -#define VMALLOC_VMADDR(x) ((unsigned long)(x)) #define VMALLOC_END \ (VMALLOC_START + ((1 << PGD_ORDER) * PTRS_PER_PTE * PAGE_SIZE)) diff --git a/include/asm-parisc/cacheflush.h b/include/asm-parisc/cacheflush.h index b88200337cca..52b0c6a96aea 100644 --- a/include/asm-parisc/cacheflush.h +++ b/include/asm-parisc/cacheflush.h @@ -30,6 +30,9 @@ static inline void flush_cache_all(void) on_each_cpu(cacheflush_h_tmp_function, NULL, 1, 1); } +#define flush_cache_vmap(start, end) flush_cache_all() +#define flush_cache_vunmap(start, end) flush_cache_all() + /* The following value needs to be tuned and probably scaled with the * cache size. */ @@ -82,6 +85,13 @@ static inline void flush_dcache_page(struct page *page) flush_user_dcache_range(addr, addr + len); \ flush_user_icache_range(addr, addr + len); } while (0) +#define copy_to_user_page(vma, page, vaddr, dst, src, len) \ +do { memcpy(dst, src, len); \ + flush_icache_user_range(vma, page, vaddr, len); \ +} while (0) +#define copy_from_user_page(vma, page, vaddr, dst, src, len) \ + memcpy(dst, src, len) + static inline void flush_cache_range(struct vm_area_struct *vma, unsigned long start, unsigned long end) { diff --git a/include/asm-parisc/pgtable.h b/include/asm-parisc/pgtable.h index 79d19128946f..b7f2daf59ecb 100644 --- a/include/asm-parisc/pgtable.h +++ b/include/asm-parisc/pgtable.h @@ -109,7 +109,6 @@ extern void *vmalloc_start; #define PCXL_DMA_MAP_SIZE (8*1024*1024) #define VMALLOC_START ((unsigned long)vmalloc_start) -#define VMALLOC_VMADDR(x) ((unsigned long)(x)) /* this is a fixmap remnant, see fixmap.h */ #define VMALLOC_END (TMPALIAS_MAP_START) #endif diff --git a/include/asm-ppc/cacheflush.h b/include/asm-ppc/cacheflush.h index 07ff115090ca..e84fa9c095b2 100644 --- a/include/asm-ppc/cacheflush.h +++ b/include/asm-ppc/cacheflush.h @@ -24,12 +24,21 @@ #define flush_cache_range(vma, a, b) do { } while (0) #define flush_cache_page(vma, p) do { } while (0) #define flush_icache_page(vma, page) do { } while (0) +#define flush_cache_vmap(start, end) do { } while (0) +#define flush_cache_vunmap(start, end) do { } while (0) extern void flush_dcache_page(struct page *page); extern void flush_icache_range(unsigned long, unsigned long); extern void flush_icache_user_range(struct vm_area_struct *vma, struct page *page, unsigned long addr, int len); +#define copy_to_user_page(vma, page, vaddr, dst, src, len) \ +do { memcpy(dst, src, len); \ + flush_icache_user_range(vma, page, vaddr, len); \ +} while (0) +#define copy_from_user_page(vma, page, vaddr, dst, src, len) \ + memcpy(dst, src, len) + extern void __flush_dcache_icache(void *page_va); extern void __flush_dcache_icache_phys(unsigned long physaddr); diff --git a/include/asm-ppc/highmem.h b/include/asm-ppc/highmem.h index bac02b7d293e..a4aac1adf9f3 100644 --- a/include/asm-ppc/highmem.h +++ b/include/asm-ppc/highmem.h @@ -132,6 +132,8 @@ static inline struct page *kmap_atomic_to_page(void *ptr) return pte_page(kmap_pte[idx]); } +#define flush_cache_kmaps() flush_cache_all() + #endif /* __KERNEL__ */ #endif /* _ASM_HIGHMEM_H */ diff --git a/include/asm-ppc/pgtable.h b/include/asm-ppc/pgtable.h index 2823193a9c9e..ad364a9fe357 100644 --- a/include/asm-ppc/pgtable.h +++ b/include/asm-ppc/pgtable.h @@ -129,7 +129,6 @@ extern unsigned long ioremap_bot, ioremap_base; #else #define VMALLOC_START ((((long)high_memory + VMALLOC_OFFSET) & ~(VMALLOC_OFFSET-1))) #endif -#define VMALLOC_VMADDR(x) ((unsigned long)(x)) #define VMALLOC_END ioremap_bot /* diff --git a/include/asm-ppc64/cacheflush.h b/include/asm-ppc64/cacheflush.h index 78d06ab52f63..0f9377426791 100644 --- a/include/asm-ppc64/cacheflush.h +++ b/include/asm-ppc64/cacheflush.h @@ -14,12 +14,22 @@ #define flush_cache_range(vma, start, end) do { } while (0) #define flush_cache_page(vma, vmaddr) do { } while (0) #define flush_icache_page(vma, page) do { } while (0) +#define flush_cache_vmap(start, end) do { } while (0) +#define flush_cache_vunmap(start, end) do { } while (0) extern void flush_dcache_page(struct page *page); extern void flush_icache_range(unsigned long, unsigned long); extern void flush_icache_user_range(struct vm_area_struct *vma, struct page *page, unsigned long addr, int len); + +#define copy_to_user_page(vma, page, vaddr, dst, src, len) \ +do { memcpy(dst, src, len); \ + flush_icache_user_range(vma, page, vaddr, len); \ +} while (0) +#define copy_from_user_page(vma, page, vaddr, dst, src, len) \ + memcpy(dst, src, len) + extern void __flush_dcache_icache(void *page_va); #endif /* _PPC64_CACHEFLUSH_H */ diff --git a/include/asm-ppc64/pgtable.h b/include/asm-ppc64/pgtable.h index 49a90176473a..c53351975e69 100644 --- a/include/asm-ppc64/pgtable.h +++ b/include/asm-ppc64/pgtable.h @@ -45,7 +45,6 @@ * Define the address range of the vmalloc VM area. */ #define VMALLOC_START (0xD000000000000000) -#define VMALLOC_VMADDR(x) ((unsigned long)(x)) #define VMALLOC_END (VMALLOC_START + VALID_EA_BITS) /* diff --git a/include/asm-s390/cacheflush.h b/include/asm-s390/cacheflush.h index 3c5416fe2158..d1ff292fd794 100644 --- a/include/asm-s390/cacheflush.h +++ b/include/asm-s390/cacheflush.h @@ -13,5 +13,12 @@ #define flush_icache_range(start, end) do { } while (0) #define flush_icache_page(vma,pg) do { } while (0) #define flush_icache_user_range(vma,pg,adr,len) do { } while (0) +#define flush_cache_vmap(start, end) do { } while (0) +#define flush_cache_vunmap(start, end) do { } while (0) + +#define copy_to_user_page(vma, page, vaddr, dst, src, len) \ + memcpy(dst, src, len) +#define copy_from_user_page(vma, page, vaddr, dst, src, len) \ + memcpy(dst, src, len) #endif /* _S390_CACHEFLUSH_H */ diff --git a/include/asm-s390/pgtable.h b/include/asm-s390/pgtable.h index 83813096fa26..002a4ed74b41 100644 --- a/include/asm-s390/pgtable.h +++ b/include/asm-s390/pgtable.h @@ -117,7 +117,6 @@ extern char empty_zero_page[PAGE_SIZE]; #define VMALLOC_OFFSET (8*1024*1024) #define VMALLOC_START (((unsigned long) high_memory + VMALLOC_OFFSET) \ & ~(VMALLOC_OFFSET-1)) -#define VMALLOC_VMADDR(x) ((unsigned long)(x)) #ifndef __s390x__ # define VMALLOC_END (0x7fffffffL) #else /* __s390x__ */ diff --git a/include/asm-sh/cacheflush.h b/include/asm-sh/cacheflush.h index 056962184cef..24ce48670ec7 100644 --- a/include/asm-sh/cacheflush.h +++ b/include/asm-sh/cacheflush.h @@ -10,4 +10,14 @@ extern void __flush_purge_region(void *start, int size); /* Flush (invalidate only) a region (smaller than a page) */ extern void __flush_invalidate_region(void *start, int size); +#define flush_cache_vmap(start, end) flush_cache_all() +#define flush_cache_vunmap(start, end) flush_cache_all() + +#define copy_to_user_page(vma, page, vaddr, dst, src, len) \ +do { memcpy(dst, src, len); \ + flush_icache_user_range(vma, page, vaddr, len); \ +} while (0) +#define copy_from_user_page(vma, page, vaddr, dst, src, len) \ + memcpy(dst, src, len) + #endif /* __ASM_SH_CACHEFLUSH_H */ diff --git a/include/asm-sh/pgtable.h b/include/asm-sh/pgtable.h index 5839ab953b26..962729a5d153 100644 --- a/include/asm-sh/pgtable.h +++ b/include/asm-sh/pgtable.h @@ -51,7 +51,6 @@ extern unsigned long empty_zero_page[1024]; * Currently only 4-enty (16kB) is used (see arch/sh/mm/cache.c) */ #define VMALLOC_START (P3SEG+0x00100000) -#define VMALLOC_VMADDR(x) ((unsigned long)(x)) #define VMALLOC_END P4SEG /* 0x001 WT-bit on SH-4, 0 on SH-3 */ diff --git a/include/asm-sparc/cacheflush.h b/include/asm-sparc/cacheflush.h index e2e0bc4166ac..ac9f8acde00d 100644 --- a/include/asm-sparc/cacheflush.h +++ b/include/asm-sparc/cacheflush.h @@ -56,6 +56,11 @@ BTFIXUPDEF_CALL(void, flush_cache_page, struct vm_area_struct *, unsigned long) #define flush_icache_user_range(vma,pg,adr,len) do { } while (0) +#define copy_to_user_page(vma, page, vaddr, dst, src, len) \ + memcpy(dst, src, len) +#define copy_from_user_page(vma, page, vaddr, dst, src, len) \ + memcpy(dst, src, len) + BTFIXUPDEF_CALL(void, __flush_page_to_ram, unsigned long) BTFIXUPDEF_CALL(void, flush_sig_insns, struct mm_struct *, unsigned long) @@ -66,4 +71,7 @@ extern void sparc_flush_page_to_ram(struct page *page); #define flush_dcache_page(page) sparc_flush_page_to_ram(page) +#define flush_cache_vmap(start, end) flush_cache_all() +#define flush_cache_vunmap(start, end) flush_cache_all() + #endif /* _SPARC_CACHEFLUSH_H */ diff --git a/include/asm-sparc/highmem.h b/include/asm-sparc/highmem.h index 68d6402b3aa3..2e5dba9bfc28 100644 --- a/include/asm-sparc/highmem.h +++ b/include/asm-sparc/highmem.h @@ -89,6 +89,8 @@ static inline struct page *kmap_atomic_to_page(void *ptr) return pte_page(*pte); } +#define flush_cache_kmaps() flush_cache_all() + #endif /* __KERNEL__ */ #endif /* _ASM_HIGHMEM_H */ diff --git a/include/asm-sparc/pgtable.h b/include/asm-sparc/pgtable.h index 137421b5bdc4..bba6e03c4cbb 100644 --- a/include/asm-sparc/pgtable.h +++ b/include/asm-sparc/pgtable.h @@ -101,8 +101,6 @@ BTFIXUPDEF_SIMM13(ptrs_per_pmd) BTFIXUPDEF_SIMM13(ptrs_per_pgd) BTFIXUPDEF_SIMM13(user_ptrs_per_pgd) -#define VMALLOC_VMADDR(x) ((unsigned long)(x)) - #define pte_ERROR(e) __builtin_trap() #define pmd_ERROR(e) __builtin_trap() #define pgd_ERROR(e) __builtin_trap() diff --git a/include/asm-sparc64/cacheflush.h b/include/asm-sparc64/cacheflush.h index 6175a244513f..040b97a25cbe 100644 --- a/include/asm-sparc64/cacheflush.h +++ b/include/asm-sparc64/cacheflush.h @@ -48,6 +48,14 @@ extern void smp_flush_cache_all(void); #define flush_icache_page(vma, pg) do { } while(0) #define flush_icache_user_range(vma,pg,adr,len) do { } while (0) +#define copy_to_user_page(vma, page, vaddr, dst, src, len) \ + memcpy(dst, src, len) +#define copy_from_user_page(vma, page, vaddr, dst, src, len) \ + memcpy(dst, src, len) + extern void flush_dcache_page(struct page *page); +#define flush_cache_vmap(start, end) flush_cache_all() +#define flush_cache_vunmap(start, end) flush_cache_all() + #endif /* _SPARC64_CACHEFLUSH_H */ diff --git a/include/asm-sparc64/pgtable.h b/include/asm-sparc64/pgtable.h index 43325ac0f8d0..779f6e7ce65f 100644 --- a/include/asm-sparc64/pgtable.h +++ b/include/asm-sparc64/pgtable.h @@ -30,7 +30,6 @@ #define MODULES_LEN 0x000000007e000000 #define MODULES_END 0x0000000080000000 #define VMALLOC_START 0x0000000140000000 -#define VMALLOC_VMADDR(x) ((unsigned long)(x)) #define VMALLOC_END 0x0000000200000000 #define LOW_OBP_ADDRESS 0x00000000f0000000 #define HI_OBP_ADDRESS 0x0000000100000000 diff --git a/include/asm-um/pgtable.h b/include/asm-um/pgtable.h index 961a6af9b44b..2d7896deac9e 100644 --- a/include/asm-um/pgtable.h +++ b/include/asm-um/pgtable.h @@ -69,7 +69,6 @@ extern unsigned long high_physmem; #define VMALLOC_OFFSET (__va_space) #define VMALLOC_START (((unsigned long) high_physmem + VMALLOC_OFFSET) & ~(VMALLOC_OFFSET-1)) -#define VMALLOC_VMADDR(x) ((unsigned long)(x)) #ifdef CONFIG_HIGHMEM # define VMALLOC_END (PKMAP_BASE-2*PAGE_SIZE) diff --git a/include/asm-v850/cacheflush.h b/include/asm-v850/cacheflush.h index e2c616a32804..32fdf158a7e4 100644 --- a/include/asm-v850/cacheflush.h +++ b/include/asm-v850/cacheflush.h @@ -27,6 +27,8 @@ #define flush_cache_range(vma, start, end) ((void)0) #define flush_cache_page(vma, vmaddr) ((void)0) #define flush_dcache_page(page) ((void)0) +#define flush_cache_vmap(start, end) ((void)0) +#define flush_cache_vunmap(start, end) ((void)0) #ifdef CONFIG_NO_CACHE @@ -55,5 +57,11 @@ extern void flush_cache_sigtramp (unsigned long addr); #endif /* CONFIG_NO_CACHE */ +#define copy_to_user_page(vma, page, vaddr, dst, src, len) \ +do { memcpy(dst, src, len); \ + flush_icache_user_range(vma, page, vaddr, len); \ +} while (0) +#define copy_from_user_page(vma, page, vaddr, dst, src, len) \ + memcpy(dst, src, len) #endif /* __V850_CACHEFLUSH_H__ */ diff --git a/include/asm-x86_64/cacheflush.h b/include/asm-x86_64/cacheflush.h index c4d74b23326c..5ab521e3dc70 100644 --- a/include/asm-x86_64/cacheflush.h +++ b/include/asm-x86_64/cacheflush.h @@ -13,6 +13,13 @@ #define flush_icache_range(start, end) do { } while (0) #define flush_icache_page(vma,pg) do { } while (0) #define flush_icache_user_range(vma,pg,adr,len) do { } while (0) +#define flush_cache_vmap(start, end) do { } while (0) +#define flush_cache_vunmap(start, end) do { } while (0) + +#define copy_to_user_page(vma, page, vaddr, dst, src, len) \ + memcpy(dst, src, len) +#define copy_from_user_page(vma, page, vaddr, dst, src, len) \ + memcpy(dst, src, len) void global_flush_tlb(void); int change_page_attr(struct page *page, int numpages, pgprot_t prot); diff --git a/include/asm-x86_64/pgtable.h b/include/asm-x86_64/pgtable.h index 8d92a190eb9a..8e7afb86395a 100644 --- a/include/asm-x86_64/pgtable.h +++ b/include/asm-x86_64/pgtable.h @@ -126,7 +126,6 @@ static inline void set_pml4(pml4_t *dst, pml4_t val) #ifndef __ASSEMBLY__ #define VMALLOC_START 0xffffff0000000000 #define VMALLOC_END 0xffffff7fffffffff -#define VMALLOC_VMADDR(x) ((unsigned long)(x)) #define MODULES_VADDR 0xffffffffa0000000 #define MODULES_END 0xffffffffafffffff #define MODULES_LEN (MODULES_END - MODULES_VADDR) -- cgit v1.2.3