2  *  linux/arch/arm/mm/copypage-v6.c 
   4  *  Copyright (C) 2002 Deep Blue Solutions Ltd, All Rights Reserved. 
   5  * This Edition is maintained by Matthew Veety (aliasxerog) <mveety@gmail.com> 
   7  * This program is free software; you can redistribute it and/or modify 
   8  * it under the terms of the GNU General Public License version 2 as 
   9  * published by the Free Software Foundation. 
  11 #include <linux/init.h> 
  12 #include <linux/spinlock.h> 
  14 #include <linux/highmem.h> 
  16 #include <asm/pgtable.h> 
  17 #include <asm/shmparam.h> 
  18 #include <asm/tlbflush.h> 
  19 #include <asm/cacheflush.h> 
  20 #include <asm/cachetype.h> 
  28 #define from_address    (0xffff8000) 
  29 #define to_address      (0xffffc000) 
  32  * Copy the user page.  No aliasing to deal with so we can just 
  33  * attack the kernel's existing mapping of these pages. 
  36 static void v6_copy_user_highpage_nonaliasing(struct page 
*to
, 
  37         struct page 
*from
, unsigned long vaddr
) 
  41         kfrom 
= kmap_atomic(from
, KM_USER0
); 
  42         kto 
= kmap_atomic(to
, KM_USER1
); 
  43         copy_page(kto
, kfrom
); 
  44         kunmap_atomic(kto
, KM_USER1
); 
  45         kunmap_atomic(kfrom
, KM_USER0
); 
  49  * Clear the user page.  No aliasing to deal with so we can just 
  50  * attack the kernel's existing mapping of this page. 
  52 static void v6_clear_user_highpage_nonaliasing(struct page 
*page
, unsigned long vaddr
) 
  54         void *kaddr 
= kmap_atomic(page
, KM_USER0
); 
  56         kunmap_atomic(kaddr
, KM_USER0
); 
  60 struct cpu_user_fns v6_user_fns __initdata 
= { 
  61         .cpu_clear_user_highpage 
= v6_clear_user_highpage_nonaliasing
, 
  62         .cpu_copy_user_highpage 
= v6_copy_user_highpage_nonaliasing
,