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

tile: remove set/clear_fixmap APIs

Nothing in the codebase was using them, and as written they took
"unsigned long" as the physical address rather than "phys_addr_t",
which is wrong on tilepro anyway. Rather than fixing stale APIs,
just remove them; if there's ever demand for them on this platform,
we can put them back.

Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>

+1 -61
-8
arch/tile/include/asm/fixmap.h
··· 78 78 #endif 79 79 }; 80 80 81 - extern void __set_fixmap(enum fixed_addresses idx, 82 - unsigned long phys, pgprot_t flags); 83 - 84 - #define set_fixmap(idx, phys) \ 85 - __set_fixmap(idx, phys, PAGE_KERNEL) 86 - #define clear_fixmap(idx) \ 87 - __set_fixmap(idx, 0, __pgprot(0)) 88 - 89 81 #define __FIXADDR_SIZE (__end_of_permanent_fixed_addresses << PAGE_SHIFT) 90 82 #define __FIXADDR_BOOT_SIZE (__end_of_fixed_addresses << PAGE_SHIFT) 91 83 #define FIXADDR_START (FIXADDR_TOP + PAGE_SIZE - __FIXADDR_SIZE)
+1 -4
arch/tile/mm/init.c
··· 777 777 778 778 kernel_physical_mapping_init(pgd_base); 779 779 780 - /* 781 - * Fixed mappings, only the page table structure has to be 782 - * created - mappings will be set by set_fixmap(): 783 - */ 780 + /* Fixed mappings, only the page table structure has to be created. */ 784 781 page_table_range_init(fix_to_virt(__end_of_fixed_addresses - 1), 785 782 FIXADDR_TOP, pgd_base); 786 783
-49
arch/tile/mm/pgtable.c
··· 83 83 } 84 84 } 85 85 86 - /* 87 - * Associate a virtual page frame with a given physical page frame 88 - * and protection flags for that frame. 89 - */ 90 - static void set_pte_pfn(unsigned long vaddr, unsigned long pfn, pgprot_t flags) 91 - { 92 - pgd_t *pgd; 93 - pud_t *pud; 94 - pmd_t *pmd; 95 - pte_t *pte; 96 - 97 - pgd = swapper_pg_dir + pgd_index(vaddr); 98 - if (pgd_none(*pgd)) { 99 - BUG(); 100 - return; 101 - } 102 - pud = pud_offset(pgd, vaddr); 103 - if (pud_none(*pud)) { 104 - BUG(); 105 - return; 106 - } 107 - pmd = pmd_offset(pud, vaddr); 108 - if (pmd_none(*pmd)) { 109 - BUG(); 110 - return; 111 - } 112 - pte = pte_offset_kernel(pmd, vaddr); 113 - /* <pfn,flags> stored as-is, to permit clearing entries */ 114 - set_pte(pte, pfn_pte(pfn, flags)); 115 - 116 - /* 117 - * It's enough to flush this one mapping. 118 - * This appears conservative since it is only called 119 - * from __set_fixmap. 120 - */ 121 - local_flush_tlb_page(NULL, vaddr, PAGE_SIZE); 122 - } 123 - 124 - void __set_fixmap(enum fixed_addresses idx, unsigned long phys, pgprot_t flags) 125 - { 126 - unsigned long address = __fix_to_virt(idx); 127 - 128 - if (idx >= __end_of_fixed_addresses) { 129 - BUG(); 130 - return; 131 - } 132 - set_pte_pfn(address, phys >> PAGE_SHIFT, flags); 133 - } 134 - 135 86 /** 136 87 * shatter_huge_page() - ensure a given address is mapped by a small page. 137 88 *