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

MIPS: Remove unused R8000 CPU support

Our R8000 CPU support can only be included if a system selects
CONFIG_SYS_HAS_CPU_R8000. No system does, making all R8000-related CPU
support dead code. Remove it.

Signed-off-by: Paul Burton <paul.burton@mips.com>
Cc: linux-mips@vger.kernel.org

+5 -293
+5 -19
arch/mips/Kconfig
··· 1652 1652 help 1653 1653 QED / PMC-Sierra RM52xx-series ("Nevada") processors. 1654 1654 1655 - config CPU_R8000 1656 - bool "R8000" 1657 - depends on SYS_HAS_CPU_R8000 1658 - select CPU_HAS_PREFETCH 1659 - select CPU_HAS_LOAD_STORE_LR 1660 - select CPU_SUPPORTS_64BIT_KERNEL 1661 - help 1662 - MIPS Technologies R8000 processors. Note these processors are 1663 - uncommon and the support for them is incomplete. 1664 - 1665 1655 config CPU_R10000 1666 1656 bool "R10000" 1667 1657 depends on SYS_HAS_CPU_R10000 ··· 1959 1969 config SYS_HAS_CPU_NEVADA 1960 1970 bool 1961 1971 1962 - config SYS_HAS_CPU_R8000 1963 - bool 1964 - 1965 1972 config SYS_HAS_CPU_R10000 1966 1973 bool 1967 1974 select ARCH_HAS_SYNC_DMA_FOR_CPU if DMA_NONCOHERENT ··· 2159 2172 2160 2173 config PAGE_SIZE_8KB 2161 2174 bool "8kB" 2162 - depends on CPU_R8000 || CPU_CAVIUM_OCTEON 2175 + depends on CPU_CAVIUM_OCTEON 2163 2176 depends on !MIPS_VA_BITS_48 2164 2177 help 2165 2178 Using 8kB page size will result in higher performance kernel at 2166 2179 the price of higher memory consumption. This option is available 2167 - only on R8000 and cnMIPS processors. Note that you will need a 2168 - suitable Linux distribution to support this. 2180 + only on cnMIPS processors. Note that you will need a suitable Linux 2181 + distribution to support this. 2169 2182 2170 2183 config PAGE_SIZE_16KB 2171 2184 bool "16kB" ··· 2256 2269 2257 2270 config CPU_GENERIC_DUMP_TLB 2258 2271 bool 2259 - default y if !(CPU_R3000 || CPU_R8000 || CPU_TX39XX) 2272 + default y if !(CPU_R3000 || CPU_TX39XX) 2260 2273 2261 2274 config MIPS_FP_SUPPORT 2262 2275 bool "Floating Point support" if EXPERT ··· 2285 2298 2286 2299 config CPU_R4K_CACHE_TLB 2287 2300 bool 2288 - default y if !(CPU_R3000 || CPU_R8000 || CPU_SB1 || CPU_TX39XX || CPU_CAVIUM_OCTEON) 2301 + default y if !(CPU_R3000 || CPU_SB1 || CPU_TX39XX || CPU_CAVIUM_OCTEON) 2289 2302 2290 2303 config MIPS_MT_SMP 2291 2304 bool "MIPS MT SMP support (1 TC on each available VPE)" ··· 2542 2555 config MIPS_ASID_SHIFT 2543 2556 int 2544 2557 default 6 if CPU_R3000 || CPU_TX39XX 2545 - default 4 if CPU_R8000 2546 2558 default 0 2547 2559 2548 2560 config MIPS_ASID_BITS
-1
arch/mips/Makefile
··· 183 183 -Wa,--trap 184 184 cflags-$(CONFIG_CPU_SB1) += $(call cc-option,-mno-mdmx) 185 185 cflags-$(CONFIG_CPU_SB1) += $(call cc-option,-mno-mips3d) 186 - cflags-$(CONFIG_CPU_R8000) += -march=r8000 -Wa,--trap 187 186 cflags-$(CONFIG_CPU_R10000) += $(call cc-option,-march=r10000,-march=r8000) \ 188 187 -Wa,--trap 189 188 cflags-$(CONFIG_CPU_CAVIUM_OCTEON) += $(call cc-option,-march=octeon) -Wa,--trap
-9
arch/mips/include/asm/addrspace.h
··· 135 135 */ 136 136 #define TO_PHYS_MASK _CONST64_(0x07ffffffffffffff) /* 2^^59 - 1 */ 137 137 138 - #ifndef CONFIG_CPU_R8000 139 - 140 - /* 141 - * The R8000 doesn't have the 32-bit compat spaces so we don't define them 142 - * in order to catch bugs in the source code. 143 - */ 144 - 145 138 #define COMPAT_K1BASE32 _CONST64_(0xffffffffa0000000) 146 139 #define PHYS_TO_COMPATK1(x) ((x) | COMPAT_K1BASE32) /* 32-bit compat k1 */ 147 - 148 - #endif 149 140 150 141 #define KDM_TO_PHYS(x) (_ACAST64_ (x) & TO_PHYS_MASK) 151 142 #define PHYS_TO_K0(x) (_ACAST64_ (x) | CAC_BASE)
-4
arch/mips/include/asm/cpu-type.h
··· 146 146 case CPU_NEVADA: 147 147 #endif 148 148 149 - #ifdef CONFIG_SYS_HAS_CPU_R8000 150 - case CPU_R8000: 151 - #endif 152 - 153 149 #ifdef CONFIG_SYS_HAS_CPU_R10000 154 150 case CPU_R10000: 155 151 case CPU_R12000:
-5
arch/mips/include/asm/cpu.h
··· 301 301 CPU_SR71000, CPU_TX49XX, 302 302 303 303 /* 304 - * R8000 class processors 305 - */ 306 - CPU_R8000, 307 - 308 - /* 309 304 * TX3900 class processors 310 305 */ 311 306 CPU_TX3912, CPU_TX3922, CPU_TX3927,
-2
arch/mips/include/asm/module.h
··· 113 113 #define MODULE_PROC_FAMILY "R5500 " 114 114 #elif defined CONFIG_CPU_NEVADA 115 115 #define MODULE_PROC_FAMILY "NEVADA " 116 - #elif defined CONFIG_CPU_R8000 117 - #define MODULE_PROC_FAMILY "R8000 " 118 116 #elif defined CONFIG_CPU_R10000 119 117 #define MODULE_PROC_FAMILY "R10000 " 120 118 #elif defined CONFIG_CPU_RM7000
-9
arch/mips/kernel/cpu-probe.c
··· 1491 1491 */ 1492 1492 c->tlbsize = (read_c0_info() & (1 << 29)) ? 64 : 48; 1493 1493 break; 1494 - case PRID_IMP_R8000: 1495 - c->cputype = CPU_R8000; 1496 - __cpu_name[cpu] = "RM8000"; 1497 - set_isa(c, MIPS_CPU_ISA_IV); 1498 - c->options = MIPS_CPU_TLB | MIPS_CPU_4KEX | 1499 - MIPS_CPU_FPU | MIPS_CPU_32FPR | 1500 - MIPS_CPU_LLSC; 1501 - c->tlbsize = 384; /* has weird TLB: 3-way x 128 */ 1502 - break; 1503 1494 case PRID_IMP_R10000: 1504 1495 c->cputype = CPU_R10000; 1505 1496 __cpu_name[cpu] = "R10000";
-1
arch/mips/mm/Makefile
··· 30 30 31 31 obj-$(CONFIG_CPU_R4K_CACHE_TLB) += c-r4k.o cex-gen.o tlb-r4k.o 32 32 obj-$(CONFIG_CPU_R3000) += c-r3k.o tlb-r3k.o 33 - obj-$(CONFIG_CPU_R8000) += c-r4k.o cex-gen.o tlb-r8k.o 34 33 obj-$(CONFIG_CPU_SB1) += c-r4k.o cerr-sb1.o cex-sb1.o tlb-r4k.o 35 34 obj-$(CONFIG_CPU_TX39XX) += c-tx39.o tlb-r3k.o 36 35 obj-$(CONFIG_CPU_CAVIUM_OCTEON) += c-octeon.o cex-oct.o tlb-r4k.o
-239
arch/mips/mm/tlb-r8k.c
··· 1 - /* 2 - * This file is subject to the terms and conditions of the GNU General Public 3 - * License. See the file "COPYING" in the main directory of this archive 4 - * for more details. 5 - * 6 - * Copyright (C) 1996 David S. Miller (davem@davemloft.net) 7 - * Copyright (C) 1997, 1998, 1999, 2000 Ralf Baechle ralf@gnu.org 8 - * Carsten Langgaard, carstenl@mips.com 9 - * Copyright (C) 2002 MIPS Technologies, Inc. All rights reserved. 10 - */ 11 - #include <linux/sched.h> 12 - #include <linux/smp.h> 13 - #include <linux/mm.h> 14 - 15 - #include <asm/cpu.h> 16 - #include <asm/bootinfo.h> 17 - #include <asm/mmu_context.h> 18 - #include <asm/pgtable.h> 19 - 20 - extern void build_tlb_refill_handler(void); 21 - 22 - #define TFP_TLB_SIZE 384 23 - #define TFP_TLB_SET_SHIFT 7 24 - 25 - /* CP0 hazard avoidance. */ 26 - #define BARRIER __asm__ __volatile__(".set noreorder\n\t" \ 27 - "nop; nop; nop; nop; nop; nop;\n\t" \ 28 - ".set reorder\n\t") 29 - 30 - void local_flush_tlb_all(void) 31 - { 32 - unsigned long flags; 33 - unsigned long old_ctx; 34 - int entry; 35 - 36 - local_irq_save(flags); 37 - /* Save old context and create impossible VPN2 value */ 38 - old_ctx = read_c0_entryhi(); 39 - write_c0_entrylo(0); 40 - 41 - for (entry = 0; entry < TFP_TLB_SIZE; entry++) { 42 - write_c0_tlbset(entry >> TFP_TLB_SET_SHIFT); 43 - write_c0_vaddr(entry << PAGE_SHIFT); 44 - write_c0_entryhi(CKSEG0 + (entry << (PAGE_SHIFT + 1))); 45 - mtc0_tlbw_hazard(); 46 - tlb_write(); 47 - } 48 - tlbw_use_hazard(); 49 - write_c0_entryhi(old_ctx); 50 - local_irq_restore(flags); 51 - } 52 - 53 - void local_flush_tlb_range(struct vm_area_struct *vma, unsigned long start, 54 - unsigned long end) 55 - { 56 - struct mm_struct *mm = vma->vm_mm; 57 - int cpu = smp_processor_id(); 58 - unsigned long flags; 59 - int oldpid, newpid, size; 60 - 61 - if (!cpu_context(cpu, mm)) 62 - return; 63 - 64 - size = (end - start + (PAGE_SIZE - 1)) >> PAGE_SHIFT; 65 - size = (size + 1) >> 1; 66 - 67 - local_irq_save(flags); 68 - 69 - if (size > TFP_TLB_SIZE / 2) { 70 - drop_mmu_context(mm); 71 - goto out_restore; 72 - } 73 - 74 - oldpid = read_c0_entryhi(); 75 - newpid = cpu_asid(cpu, mm); 76 - 77 - write_c0_entrylo(0); 78 - 79 - start &= PAGE_MASK; 80 - end += (PAGE_SIZE - 1); 81 - end &= PAGE_MASK; 82 - while (start < end) { 83 - signed long idx; 84 - 85 - write_c0_vaddr(start); 86 - write_c0_entryhi(start); 87 - start += PAGE_SIZE; 88 - tlb_probe(); 89 - idx = read_c0_tlbset(); 90 - if (idx < 0) 91 - continue; 92 - 93 - write_c0_entryhi(CKSEG0 + (idx << (PAGE_SHIFT + 1))); 94 - tlb_write(); 95 - } 96 - write_c0_entryhi(oldpid); 97 - 98 - out_restore: 99 - local_irq_restore(flags); 100 - } 101 - 102 - /* Usable for KV1 addresses only! */ 103 - void local_flush_tlb_kernel_range(unsigned long start, unsigned long end) 104 - { 105 - unsigned long size, flags; 106 - 107 - size = (end - start + (PAGE_SIZE - 1)) >> PAGE_SHIFT; 108 - size = (size + 1) >> 1; 109 - 110 - if (size > TFP_TLB_SIZE / 2) { 111 - local_flush_tlb_all(); 112 - return; 113 - } 114 - 115 - local_irq_save(flags); 116 - 117 - write_c0_entrylo(0); 118 - 119 - start &= PAGE_MASK; 120 - end += (PAGE_SIZE - 1); 121 - end &= PAGE_MASK; 122 - while (start < end) { 123 - signed long idx; 124 - 125 - write_c0_vaddr(start); 126 - write_c0_entryhi(start); 127 - start += PAGE_SIZE; 128 - tlb_probe(); 129 - idx = read_c0_tlbset(); 130 - if (idx < 0) 131 - continue; 132 - 133 - write_c0_entryhi(CKSEG0 + (idx << (PAGE_SHIFT + 1))); 134 - tlb_write(); 135 - } 136 - 137 - local_irq_restore(flags); 138 - } 139 - 140 - void local_flush_tlb_page(struct vm_area_struct *vma, unsigned long page) 141 - { 142 - int cpu = smp_processor_id(); 143 - unsigned long flags; 144 - int oldpid, newpid; 145 - signed long idx; 146 - 147 - if (!cpu_context(cpu, vma->vm_mm)) 148 - return; 149 - 150 - newpid = cpu_asid(cpu, vma->vm_mm); 151 - page &= PAGE_MASK; 152 - local_irq_save(flags); 153 - oldpid = read_c0_entryhi(); 154 - write_c0_vaddr(page); 155 - write_c0_entryhi(newpid); 156 - tlb_probe(); 157 - idx = read_c0_tlbset(); 158 - if (idx < 0) 159 - goto finish; 160 - 161 - write_c0_entrylo(0); 162 - write_c0_entryhi(CKSEG0 + (idx << (PAGE_SHIFT + 1))); 163 - tlb_write(); 164 - 165 - finish: 166 - write_c0_entryhi(oldpid); 167 - local_irq_restore(flags); 168 - } 169 - 170 - /* 171 - * We will need multiple versions of update_mmu_cache(), one that just 172 - * updates the TLB with the new pte(s), and another which also checks 173 - * for the R4k "end of page" hardware bug and does the needy. 174 - */ 175 - void __update_tlb(struct vm_area_struct * vma, unsigned long address, pte_t pte) 176 - { 177 - unsigned long flags; 178 - pgd_t *pgdp; 179 - pmd_t *pmdp; 180 - pte_t *ptep; 181 - int pid; 182 - 183 - /* 184 - * Handle debugger faulting in for debugee. 185 - */ 186 - if (current->active_mm != vma->vm_mm) 187 - return; 188 - 189 - pid = read_c0_entryhi() & cpu_asid_mask(&current_cpu_data); 190 - 191 - local_irq_save(flags); 192 - address &= PAGE_MASK; 193 - write_c0_vaddr(address); 194 - write_c0_entryhi(pid); 195 - pgdp = pgd_offset(vma->vm_mm, address); 196 - pmdp = pmd_offset(pgdp, address); 197 - ptep = pte_offset_map(pmdp, address); 198 - tlb_probe(); 199 - 200 - write_c0_entrylo(pte_val(*ptep++) >> 6); 201 - tlb_write(); 202 - 203 - write_c0_entryhi(pid); 204 - local_irq_restore(flags); 205 - } 206 - 207 - static void probe_tlb(unsigned long config) 208 - { 209 - struct cpuinfo_mips *c = &current_cpu_data; 210 - 211 - c->tlbsize = 3 * 128; /* 3 sets each 128 entries */ 212 - } 213 - 214 - void tlb_init(void) 215 - { 216 - unsigned int config = read_c0_config(); 217 - unsigned long status; 218 - 219 - probe_tlb(config); 220 - 221 - status = read_c0_status(); 222 - status &= ~(ST0_UPS | ST0_KPS); 223 - #ifdef CONFIG_PAGE_SIZE_4KB 224 - status |= (TFP_PAGESIZE_4K << 32) | (TFP_PAGESIZE_4K << 36); 225 - #elif defined(CONFIG_PAGE_SIZE_8KB) 226 - status |= (TFP_PAGESIZE_8K << 32) | (TFP_PAGESIZE_8K << 36); 227 - #elif defined(CONFIG_PAGE_SIZE_16KB) 228 - status |= (TFP_PAGESIZE_16K << 32) | (TFP_PAGESIZE_16K << 36); 229 - #elif defined(CONFIG_PAGE_SIZE_64KB) 230 - status |= (TFP_PAGESIZE_64K << 32) | (TFP_PAGESIZE_64K << 36); 231 - #endif 232 - write_c0_status(status); 233 - 234 - write_c0_wired(0); 235 - 236 - local_flush_tlb_all(); 237 - 238 - build_tlb_refill_handler(); 239 - }
-4
arch/mips/mm/tlbex.c
··· 2633 2633 #endif 2634 2634 break; 2635 2635 2636 - case CPU_R8000: 2637 - panic("No R8000 TLB refill handler yet"); 2638 - break; 2639 - 2640 2636 default: 2641 2637 if (cpu_has_ldpte) 2642 2638 setup_pw();