1 /**************************************************************************** 2 **************************************************************************** 3 *** 4 *** This header was automatically generated from a Linux kernel header 5 *** of the same name, to make information necessary for userspace to 6 *** call into the kernel available to libc. It contains only constants, 7 *** structures, and macros generated from the original header, and thus, 8 *** contains no copyrightable information. 9 *** 10 **************************************************************************** 11 ****************************************************************************/ 12 #ifndef _ASM_FIXMAP_H 13 #define _ASM_FIXMAP_H 14 15 #include <linux/kernel.h> 16 #include <asm/page.h> 17 18 enum fixed_addresses { 19 #define FIX_N_COLOURS 16 20 FIX_CMAP_BEGIN, 21 FIX_CMAP_END = FIX_CMAP_BEGIN + FIX_N_COLOURS, 22 FIX_UNCACHED, 23 __end_of_fixed_addresses 24 }; 25 26 #define set_fixmap(idx, phys) __set_fixmap(idx, phys, PAGE_KERNEL) 27 28 #define set_fixmap_nocache(idx, phys) __set_fixmap(idx, phys, PAGE_KERNEL_NOCACHE) 29 30 #define FIXADDR_TOP (P4SEG - PAGE_SIZE) 31 #define FIXADDR_SIZE (__end_of_fixed_addresses << PAGE_SHIFT) 32 #define FIXADDR_START (FIXADDR_TOP - FIXADDR_SIZE) 33 34 #define __fix_to_virt(x) (FIXADDR_TOP - ((x) << PAGE_SHIFT)) 35 #define __virt_to_fix(x) ((FIXADDR_TOP - ((x)&PAGE_MASK)) >> PAGE_SHIFT) 36 37 #endif 38