Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

x86: mm: Re-use the early_ioremap fixed area

The temp fixed area is only used during boot for early_ioremap(), and
it is unused when ioremap() is functional. vmalloc/pkmap area become
available after early boot so the temp fixed area is available for
re-use.

The virtual address is more precious on i386, especially turning on
high memory. So we can re-use the virtual address space.

Remove the now unused defines FIXADDR_BOOT_START and FIXADDR_BOOT_SIZE.

Signed-off-by: Minfei Huang <mnfhuang@gmail.com>
Cc: pbonzini@redhat.com
Cc: bp@suse.de
Link: http://lkml.kernel.org/r/1414582717-32729-1-git-send-email-mnfhuang@gmail.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>

authored by

Minfei Huang and committed by
Thomas Gleixner
63e7b6d9 96e70f83

+16 -15
-2
arch/x86/include/asm/fixmap.h
··· 136 136 extern void reserve_top_address(unsigned long reserve); 137 137 138 138 #define FIXADDR_SIZE (__end_of_permanent_fixed_addresses << PAGE_SHIFT) 139 - #define FIXADDR_BOOT_SIZE (__end_of_fixed_addresses << PAGE_SHIFT) 140 139 #define FIXADDR_START (FIXADDR_TOP - FIXADDR_SIZE) 141 - #define FIXADDR_BOOT_START (FIXADDR_TOP - FIXADDR_BOOT_SIZE) 142 140 143 141 extern int fixmaps_set; 144 142
+14 -11
arch/x86/include/asm/highmem.h
··· 38 38 /* 39 39 * Ordering is: 40 40 * 41 - * FIXADDR_TOP 42 - * fixed_addresses 43 - * FIXADDR_START 44 - * temp fixed addresses 45 - * FIXADDR_BOOT_START 46 - * Persistent kmap area 47 - * PKMAP_BASE 48 - * VMALLOC_END 49 - * Vmalloc area 50 - * VMALLOC_START 51 - * high_memory 41 + * high memory on: high_memory off: 42 + * FIXADDR_TOP FIXADDR_TOP 43 + * fixed addresses fixed addresses 44 + * FIXADDR_START FIXADDR_START 45 + * temp fixed addresses/persistent kmap area VMALLOC_END 46 + * PKMAP_BASE temp fixed addresses/vmalloc area 47 + * VMALLOC_END VMALLOC_START 48 + * vmalloc area high_memory 49 + * VMALLOC_START 50 + * high_memory 51 + * 52 + * The temp fixed area is only used during boot for early_ioremap(), and 53 + * it is unused when the ioremap() is functional. vmalloc/pkmap area become 54 + * available after early boot so the temp fixed area is available for re-use. 52 55 */ 53 56 #define LAST_PKMAP_MASK (LAST_PKMAP-1) 54 57 #define PKMAP_NR(virt) ((virt-PKMAP_BASE) >> PAGE_SHIFT)
+2 -2
arch/x86/include/asm/pgtable_32_types.h
··· 37 37 #define LAST_PKMAP 1024 38 38 #endif 39 39 40 - #define PKMAP_BASE ((FIXADDR_BOOT_START - PAGE_SIZE * (LAST_PKMAP + 1)) \ 40 + #define PKMAP_BASE ((FIXADDR_START - PAGE_SIZE * (LAST_PKMAP + 1)) \ 41 41 & PMD_MASK) 42 42 43 43 #ifdef CONFIG_HIGHMEM 44 44 # define VMALLOC_END (PKMAP_BASE - 2 * PAGE_SIZE) 45 45 #else 46 - # define VMALLOC_END (FIXADDR_BOOT_START - 2 * PAGE_SIZE) 46 + # define VMALLOC_END (FIXADDR_START - 2 * PAGE_SIZE) 47 47 #endif 48 48 49 49 #define MODULES_VADDR VMALLOC_START