x86, hweight: Use a 32-bit popcnt for __arch_hweight32()
[linux-2.6/btrfs-unstable.git] / arch / x86 / include / asm / page_32_types.h
blob6f1b7331313f1af2744c50accfecd26e069a5bed
1 #ifndef _ASM_X86_PAGE_32_DEFS_H
2 #define _ASM_X86_PAGE_32_DEFS_H
4 #include <linux/const.h>
6 /*
7 * This handles the memory map.
9 * A __PAGE_OFFSET of 0xC0000000 means that the kernel has
10 * a virtual address space of one gigabyte, which limits the
11 * amount of physical memory you can use to about 950MB.
13 * If you want more physical memory than this then see the CONFIG_HIGHMEM4G
14 * and CONFIG_HIGHMEM64G options in the kernel configuration.
16 #define __PAGE_OFFSET _AC(CONFIG_PAGE_OFFSET, UL)
18 #ifdef CONFIG_4KSTACKS
19 #define THREAD_ORDER 0
20 #else
21 #define THREAD_ORDER 1
22 #endif
23 #define THREAD_SIZE (PAGE_SIZE << THREAD_ORDER)
25 #define STACKFAULT_STACK 0
26 #define DOUBLEFAULT_STACK 1
27 #define NMI_STACK 0
28 #define DEBUG_STACK 0
29 #define MCE_STACK 0
30 #define N_EXCEPTION_STACKS 1
32 #ifdef CONFIG_X86_PAE
33 /* 44=32+12, the limit we can fit into an unsigned long pfn */
34 #define __PHYSICAL_MASK_SHIFT 44
35 #define __VIRTUAL_MASK_SHIFT 32
37 #else /* !CONFIG_X86_PAE */
38 #define __PHYSICAL_MASK_SHIFT 32
39 #define __VIRTUAL_MASK_SHIFT 32
40 #endif /* CONFIG_X86_PAE */
43 * Kernel image size is limited to 512 MB (see in arch/x86/kernel/head_32.S)
45 #define KERNEL_IMAGE_SIZE (512 * 1024 * 1024)
47 #ifndef __ASSEMBLY__
50 * This much address space is reserved for vmalloc() and iomap()
51 * as well as fixmap mappings.
53 extern unsigned int __VMALLOC_RESERVE;
54 extern int sysctl_legacy_va_layout;
56 extern void find_low_pfn_range(void);
57 extern void setup_bootmem_allocator(void);
59 #endif /* !__ASSEMBLY__ */
61 #endif /* _ASM_X86_PAGE_32_DEFS_H */