patch-2.3.99-pre2 linux/include/linux/highmem.h
Next file: linux/include/linux/i2c-algo-pcf.h
Previous file: linux/include/linux/hdreg.h
Back to the patch index
Back to the overall index
- Lines: 34
- Date:
Sat Mar 18 12:11:01 2000
- Orig file:
v2.3.99-pre1/linux/include/linux/highmem.h
- Orig date:
Tue Dec 7 09:32:51 1999
diff -u --recursive --new-file v2.3.99-pre1/linux/include/linux/highmem.h linux/include/linux/highmem.h
@@ -29,6 +29,15 @@
#endif /* CONFIG_HIGHMEM */
/* when CONFIG_HIGHMEM is not set these will be plain clear/copy_page */
+extern inline void clear_user_highpage(struct page *page, unsigned long vaddr)
+{
+ unsigned long kaddr;
+
+ kaddr = kmap(page);
+ clear_user_page((void *)kaddr, vaddr);
+ kunmap(page);
+}
+
extern inline void clear_highpage(struct page *page)
{
unsigned long kaddr;
@@ -62,6 +71,17 @@
memset((void *)(kaddr + offset), 0, size);
flush_page_to_ram(page);
kunmap(page);
+}
+
+extern inline void copy_user_highpage(struct page *to, struct page *from, unsigned long vaddr)
+{
+ unsigned long vfrom, vto;
+
+ vfrom = kmap(from);
+ vto = kmap(to);
+ copy_user_page((void *)vto, (void *)vfrom, vaddr);
+ kunmap(from);
+ kunmap(to);
}
extern inline void copy_highpage(struct page *to, struct page *from)
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)