patch-2.4.0-test11 linux/include/asm-i386/highmem.h
Next file: linux/include/asm-i386/i387.h
Previous file: linux/include/asm-i386/elf.h
Back to the patch index
Back to the overall index
- Lines: 56
- Date:
Sat Nov 18 20:56:59 2000
- Orig file:
v2.4.0-test10/linux/include/asm-i386/highmem.h
- Orig date:
Fri Sep 8 12:52:42 2000
diff -u --recursive --new-file v2.4.0-test10/linux/include/asm-i386/highmem.h linux/include/asm-i386/highmem.h
@@ -53,19 +53,19 @@
#define PKMAP_NR(virt) ((virt-PKMAP_BASE) >> PAGE_SHIFT)
#define PKMAP_ADDR(nr) (PKMAP_BASE + ((nr) << PAGE_SHIFT))
-extern unsigned long FASTCALL(kmap_high(struct page *page));
+extern void * FASTCALL(kmap_high(struct page *page));
extern void FASTCALL(kunmap_high(struct page *page));
-extern inline unsigned long kmap(struct page *page)
+static inline void *kmap(struct page *page)
{
if (in_interrupt())
BUG();
if (page < highmem_start_page)
- return (unsigned long) page_address(page);
+ return page_address(page);
return kmap_high(page);
}
-extern inline void kunmap(struct page *page)
+static inline void kunmap(struct page *page)
{
if (in_interrupt())
BUG();
@@ -80,13 +80,13 @@
* be used in IRQ contexts, so in some (very limited) cases we need
* it.
*/
-extern inline unsigned long kmap_atomic(struct page *page, enum km_type type)
+static inline void *kmap_atomic(struct page *page, enum km_type type)
{
enum fixed_addresses idx;
unsigned long vaddr;
if (page < highmem_start_page)
- return (unsigned long) page_address(page);
+ return page_address(page);
idx = type + KM_TYPE_NR*smp_processor_id();
vaddr = __fix_to_virt(FIX_KMAP_BEGIN + idx);
@@ -97,12 +97,13 @@
set_pte(kmap_pte-idx, mk_pte(page, kmap_prot));
__flush_tlb_one(vaddr);
- return vaddr;
+ return (void*) vaddr;
}
-extern inline void kunmap_atomic(unsigned long vaddr, enum km_type type)
+static inline void kunmap_atomic(void *kvaddr, enum km_type type)
{
#if HIGHMEM_DEBUG
+ unsigned long vaddr = (unsigned long) kvaddr;
enum fixed_addresses idx = type + KM_TYPE_NR*smp_processor_id();
if (vaddr < FIXADDR_START) // FIXME
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)