diff options
author | ian <ian@FreeBSD.org> | 2014-02-08 22:21:38 +0000 |
---|---|---|
committer | ian <ian@FreeBSD.org> | 2014-02-08 22:21:38 +0000 |
commit | 5da54698fa93663e708069fcb779720291895435 (patch) | |
tree | ba2a39fcaa3ecafa8056165f8d0b934acd71e312 /sys/arm/xscale/i80321 | |
parent | 2c14a9960a252fb6a8620e30817461845e43f148 (diff) | |
download | FreeBSD-src-5da54698fa93663e708069fcb779720291895435.zip FreeBSD-src-5da54698fa93663e708069fcb779720291895435.tar.gz |
Remove the ARM_USE_SMALL_ALLOC option and code related to it.
This was an optimization used only by a few xscale platforms. Part of
the optimization was to create a direct map for all physical pages, and
that resulted in making multiple mappings of pages in a way that bypassed
the logic in pmap.c to handle VIVT cache aliasing. It also just generally
made the code more complex and hard to maintain for all SoCs.
Reviewed by: cognet
Diffstat (limited to 'sys/arm/xscale/i80321')
-rw-r--r-- | sys/arm/xscale/i80321/ep80219_machdep.c | 35 | ||||
-rw-r--r-- | sys/arm/xscale/i80321/iq31244_machdep.c | 35 |
2 files changed, 0 insertions, 70 deletions
diff --git a/sys/arm/xscale/i80321/ep80219_machdep.c b/sys/arm/xscale/i80321/ep80219_machdep.c index 3c52d55..44610ea 100644 --- a/sys/arm/xscale/i80321/ep80219_machdep.c +++ b/sys/arm/xscale/i80321/ep80219_machdep.c @@ -231,21 +231,6 @@ initarm(struct arm_boot_params *abp) valloc_pages(kernelstack, KSTACK_PAGES); alloc_pages(minidataclean.pv_pa, 1); valloc_pages(msgbufpv, round_page(msgbufsize) / PAGE_SIZE); -#ifdef ARM_USE_SMALL_ALLOC - freemempos -= PAGE_SIZE; - freemem_pt = trunc_page(freemem_pt); - freemem_after = freemempos - ((freemem_pt - 0xa0100000) / - PAGE_SIZE) * sizeof(struct arm_small_page); - arm_add_smallalloc_pages((void *)(freemem_after + 0x20000000), - (void *)0xc0100000, freemem_pt - 0xa0100000, 1); - freemem_after -= ((freemem_after - 0xa0001000) / PAGE_SIZE) * - sizeof(struct arm_small_page); - arm_add_smallalloc_pages((void *)(freemem_after + 0x20000000), - (void *)0xc0001000, trunc_page(freemem_after) - 0xa0001000, 0); - - freemempos = trunc_page(freemem_after); - freemempos -= PAGE_SIZE; -#endif /* * Allocate memory for the l1 and l2 page tables. The scheme to avoid * wasting memory by allocating the l1pt on the first 16k memory was @@ -285,15 +270,6 @@ initarm(struct arm_boot_params *abp) VM_PROT_READ|VM_PROT_WRITE, PTE_CACHE); -#ifdef ARM_USE_SMALL_ALLOC - if ((freemem_after + 2 * PAGE_SIZE) <= afterkern) { - arm_add_smallalloc_pages((void *)(freemem_after), - (void*)(freemem_after + PAGE_SIZE), - afterkern - (freemem_after + PAGE_SIZE), 0); - - } -#endif - /* Map the Mini-Data cache clean area. */ xscale_setup_minidata(l1pagetable, afterkern, minidataclean.pv_pa); @@ -359,10 +335,6 @@ initarm(struct arm_boot_params *abp) arm_vector_init(ARM_VECTORS_HIGH, ARM_VEC_ALL); pmap_curmaxkvaddr = afterkern + PAGE_SIZE; - /* - * ARM_USE_SMALL_ALLOC uses dump_avail, so it must be filled before - * calling pmap_bootstrap. - */ dump_avail[0] = 0xa0000000; dump_avail[1] = 0xa0000000 + memsize; dump_avail[2] = 0; @@ -375,13 +347,6 @@ initarm(struct arm_boot_params *abp) mutex_init(); i = 0; -#ifdef ARM_USE_SMALL_ALLOC - phys_avail[i++] = 0xa0000000; - phys_avail[i++] = 0xa0001000; /* - *XXX: Gross hack to get our - * pages in the vm_page_array - . */ -#endif phys_avail[i++] = round_page(virtual_avail - KERNBASE + IQ80321_SDRAM_START); phys_avail[i++] = trunc_page(0xa0000000 + memsize - 1); phys_avail[i++] = 0; diff --git a/sys/arm/xscale/i80321/iq31244_machdep.c b/sys/arm/xscale/i80321/iq31244_machdep.c index b9af11a..d6b1b93 100644 --- a/sys/arm/xscale/i80321/iq31244_machdep.c +++ b/sys/arm/xscale/i80321/iq31244_machdep.c @@ -232,21 +232,6 @@ initarm(struct arm_boot_params *abp) valloc_pages(kernelstack, KSTACK_PAGES); alloc_pages(minidataclean.pv_pa, 1); valloc_pages(msgbufpv, round_page(msgbufsize) / PAGE_SIZE); -#ifdef ARM_USE_SMALL_ALLOC - freemempos -= PAGE_SIZE; - freemem_pt = trunc_page(freemem_pt); - freemem_after = freemempos - ((freemem_pt - 0xa0100000) / - PAGE_SIZE) * sizeof(struct arm_small_page); - arm_add_smallalloc_pages((void *)(freemem_after + 0x20000000), - (void *)0xc0100000, freemem_pt - 0xa0100000, 1); - freemem_after -= ((freemem_after - 0xa0001000) / PAGE_SIZE) * - sizeof(struct arm_small_page); - arm_add_smallalloc_pages((void *)(freemem_after + 0x20000000), - (void *)0xc0001000, trunc_page(freemem_after) - 0xa0001000, 0); - - freemempos = trunc_page(freemem_after); - freemempos -= PAGE_SIZE; -#endif /* * Allocate memory for the l1 and l2 page tables. The scheme to avoid * wasting memory by allocating the l1pt on the first 16k memory was @@ -286,15 +271,6 @@ initarm(struct arm_boot_params *abp) VM_PROT_READ|VM_PROT_WRITE, PTE_CACHE); -#ifdef ARM_USE_SMALL_ALLOC - if ((freemem_after + 2 * PAGE_SIZE) <= afterkern) { - arm_add_smallalloc_pages((void *)(freemem_after), - (void*)(freemem_after + PAGE_SIZE), - afterkern - (freemem_after + PAGE_SIZE), 0); - - } -#endif - /* Map the Mini-Data cache clean area. */ xscale_setup_minidata(l1pagetable, afterkern, minidataclean.pv_pa); @@ -360,10 +336,6 @@ initarm(struct arm_boot_params *abp) arm_vector_init(ARM_VECTORS_HIGH, ARM_VEC_ALL); pmap_curmaxkvaddr = afterkern + PAGE_SIZE; - /* - * ARM_USE_SMALL_ALLOC uses dump_avail, so it must be filled before - * calling pmap_bootstrap. - */ dump_avail[0] = 0xa0000000; dump_avail[1] = 0xa0000000 + memsize; dump_avail[2] = 0; @@ -376,13 +348,6 @@ initarm(struct arm_boot_params *abp) mutex_init(); i = 0; -#ifdef ARM_USE_SMALL_ALLOC - phys_avail[i++] = 0xa0000000; - phys_avail[i++] = 0xa0001000; /* - *XXX: Gross hack to get our - * pages in the vm_page_array - . */ -#endif phys_avail[i++] = round_page(virtual_avail - KERNBASE + SDRAM_START); phys_avail[i++] = trunc_page(0xa0000000 + memsize - 1); phys_avail[i++] = 0; |