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

MIPS: Loongson64: Rename CPU TYPES

CPU_LOONGSON2 -> CPU_LOONGSON2EF
CPU_LOONGSON3 -> CPU_LOONGSON64

As newer loongson-2 products (2G/2H/2K1000) can share kernel
implementation with loongson-3 while 2E/2F are less similar with
other LOONGSON64 products.

Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
Signed-off-by: Paul Burton <paulburton@kernel.org>
Cc: linux-mips@vger.kernel.org
Cc: chenhc@lemote.com
Cc: paul.burton@mips.com

authored by

Jiaxun Yang and committed by
Paul Burton
268a2d60 2409839a

+95 -96
+18 -18
arch/mips/Kconfig
··· 1377 1377 prompt "CPU type" 1378 1378 default CPU_R4X00 1379 1379 1380 - config CPU_LOONGSON3 1381 - bool "Loongson 3 CPU" 1382 - depends on SYS_HAS_CPU_LOONGSON3 1380 + config CPU_LOONGSON64 1381 + bool "Loongson GSx64 CPU" 1382 + depends on SYS_HAS_CPU_LOONGSON64 1383 1383 select ARCH_HAS_PHYS_TO_DMA 1384 1384 select CPU_SUPPORTS_64BIT_KERNEL 1385 1385 select CPU_SUPPORTS_HIGHMEM ··· 1394 1394 select GPIOLIB 1395 1395 select SWIOTLB 1396 1396 help 1397 - The Loongson 3 processor implements the MIPS64R2 instruction 1398 - set with many extensions. 1397 + The Loongson GSx64 series of processor cores implements the 1398 + MIPS64R2 instruction set with many extensions. 1399 1399 1400 - config LOONGSON3_ENHANCEMENT 1401 - bool "New Loongson 3 CPU Enhancements" 1400 + config LOONGSON64_ENHANCEMENT 1401 + bool "New Loongson GSx64E CPU Enhancements" 1402 1402 default n 1403 1403 select CPU_MIPSR2 1404 1404 select CPU_HAS_PREFETCH 1405 - depends on CPU_LOONGSON3 1405 + depends on CPU_LOONGSON64 1406 1406 help 1407 - New Loongson 3 CPU (since Loongson-3A R2, as opposed to Loongson-3A 1407 + New Loongson GSx64E cores (since Loongson-3A R2, as opposed to Loongson-3A 1408 1408 R1, Loongson-3B R1 and Loongson-3B R2) has many enhancements, such as 1409 - FTLB, L1-VCache, EI/DI/Wait/Prefetch instruction, DSP/DSPv2 ASE, User 1409 + FTLB, L1-VCache, EI/DI/Wait/Prefetch instruction, DSP/DSPr2 ASE, User 1410 1410 Local register, Read-Inhibit/Execute-Inhibit, SFB (Store Fill Buffer), 1411 1411 Fast TLB refill support, etc. 1412 1412 ··· 1418 1418 config CPU_LOONGSON3_WORKAROUNDS 1419 1419 bool "Old Loongson 3 LLSC Workarounds" 1420 1420 default y if SMP 1421 - depends on CPU_LOONGSON3 1421 + depends on CPU_LOONGSON64 1422 1422 help 1423 1423 Loongson 3 processors have the llsc issues which require workarounds. 1424 1424 Without workarounds the system may hang unexpectedly. ··· 1433 1433 config CPU_LOONGSON2E 1434 1434 bool "Loongson 2E" 1435 1435 depends on SYS_HAS_CPU_LOONGSON2E 1436 - select CPU_LOONGSON2 1436 + select CPU_LOONGSON2EF 1437 1437 help 1438 1438 The Loongson 2E processor implements the MIPS III instruction set 1439 1439 with many extensions. ··· 1444 1444 config CPU_LOONGSON2F 1445 1445 bool "Loongson 2F" 1446 1446 depends on SYS_HAS_CPU_LOONGSON2F 1447 - select CPU_LOONGSON2 1447 + select CPU_LOONGSON2EF 1448 1448 select GPIOLIB 1449 1449 help 1450 1450 The Loongson 2F processor implements the MIPS III instruction set ··· 1857 1857 bool 1858 1858 select SYS_SUPPORTS_ZBOOT 1859 1859 1860 - config CPU_LOONGSON2 1860 + config CPU_LOONGSON2EF 1861 1861 bool 1862 1862 select CPU_SUPPORTS_32BIT_KERNEL 1863 1863 select CPU_SUPPORTS_64BIT_KERNEL ··· 1900 1900 select SYS_SUPPORTS_HOTPLUG_CPU 1901 1901 select CPU_HAS_RIXI 1902 1902 1903 - config SYS_HAS_CPU_LOONGSON3 1903 + config SYS_HAS_CPU_LOONGSON64 1904 1904 bool 1905 1905 select CPU_SUPPORTS_CPUFREQ 1906 1906 select CPU_HAS_RIXI ··· 2162 2162 2163 2163 config PAGE_SIZE_4KB 2164 2164 bool "4kB" 2165 - depends on !CPU_LOONGSON2 && !CPU_LOONGSON3 2165 + depends on !CPU_LOONGSON2EF && !CPU_LOONGSON64 2166 2166 help 2167 2167 This option select the standard 4kB Linux page size. On some 2168 2168 R3000-family processors this is the only available page size. Using ··· 2616 2616 2617 2617 config ARCH_FLATMEM_ENABLE 2618 2618 def_bool y 2619 - depends on !NUMA && !CPU_LOONGSON2 2619 + depends on !NUMA && !CPU_LOONGSON2EF 2620 2620 2621 2621 config ARCH_SPARSEMEM_ENABLE 2622 2622 bool ··· 2697 2697 2698 2698 config HW_PERF_EVENTS 2699 2699 bool "Enable hardware performance counter support for perf events" 2700 - depends on PERF_EVENTS && !OPROFILE && (CPU_MIPS32 || CPU_MIPS64 || CPU_R10000 || CPU_SB1 || CPU_CAVIUM_OCTEON || CPU_XLP || CPU_LOONGSON3) 2700 + depends on PERF_EVENTS && !OPROFILE && (CPU_MIPS32 || CPU_MIPS64 || CPU_R10000 || CPU_SB1 || CPU_CAVIUM_OCTEON || CPU_XLP || CPU_LOONGSON64) 2701 2701 default y 2702 2702 help 2703 2703 Enable hardware performance counter support for perf events. If
+1 -1
arch/mips/include/asm/cop2.h
··· 33 33 #define cop2_present 1 34 34 #define cop2_lazy_restore 0 35 35 36 - #elif defined(CONFIG_CPU_LOONGSON3) 36 + #elif defined(CONFIG_CPU_LOONGSON64) 37 37 38 38 #define cop2_present 1 39 39 #define cop2_lazy_restore 1
+4 -5
arch/mips/include/asm/cpu-type.h
··· 15 15 static inline int __pure __get_cpu_type(const int cpu_type) 16 16 { 17 17 switch (cpu_type) { 18 - #if defined(CONFIG_SYS_HAS_CPU_LOONGSON2E) || \ 19 - defined(CONFIG_SYS_HAS_CPU_LOONGSON2F) 20 - case CPU_LOONGSON2: 18 + #if defined(CONFIG_SYS_HAS_CPU_LOONGSON2EF) 19 + case CPU_LOONGSON2EF: 21 20 #endif 22 21 23 - #ifdef CONFIG_SYS_HAS_CPU_LOONGSON3 24 - case CPU_LOONGSON3: 22 + #ifdef CONFIG_SYS_HAS_CPU_LOONGSON64 23 + case CPU_LOONGSON64: 25 24 #endif 26 25 27 26 #if defined(CONFIG_SYS_HAS_CPU_LOONGSON1B) || \
+2 -2
arch/mips/include/asm/cpu.h
··· 319 319 /* 320 320 * MIPS64 class processors 321 321 */ 322 - CPU_5KC, CPU_5KE, CPU_20KC, CPU_25KF, CPU_SB1, CPU_SB1A, CPU_LOONGSON2, 323 - CPU_LOONGSON3, CPU_CAVIUM_OCTEON, CPU_CAVIUM_OCTEON_PLUS, 322 + CPU_5KC, CPU_5KE, CPU_20KC, CPU_25KF, CPU_SB1, CPU_SB1A, CPU_LOONGSON2EF, 323 + CPU_LOONGSON64, CPU_CAVIUM_OCTEON, CPU_CAVIUM_OCTEON_PLUS, 324 324 CPU_CAVIUM_OCTEON2, CPU_CAVIUM_OCTEON3, CPU_XLR, CPU_XLP, CPU_I6500, 325 325 326 326 CPU_QEMU_GENERIC,
+2 -2
arch/mips/include/asm/hazards.h
··· 23 23 * TLB hazards 24 24 */ 25 25 #if (defined(CONFIG_CPU_MIPSR2) || defined(CONFIG_CPU_MIPSR6)) && \ 26 - !defined(CONFIG_CPU_CAVIUM_OCTEON) && !defined(CONFIG_LOONGSON3_ENHANCEMENT) 26 + !defined(CONFIG_CPU_CAVIUM_OCTEON) && !defined(CONFIG_LOONGSON64_ENHANCEMENT) 27 27 28 28 /* 29 29 * MIPSR2 defines ehb for hazard avoidance ··· 158 158 } while (0) 159 159 160 160 #elif defined(CONFIG_MIPS_ALCHEMY) || defined(CONFIG_CPU_CAVIUM_OCTEON) || \ 161 - defined(CONFIG_CPU_LOONGSON2) || defined(CONFIG_LOONGSON3_ENHANCEMENT) || \ 161 + defined(CONFIG_CPU_LOONGSON2EF) || defined(CONFIG_LOONGSON64_ENHANCEMENT) || \ 162 162 defined(CONFIG_CPU_R10000) || defined(CONFIG_CPU_R5500) || defined(CONFIG_CPU_XLR) 163 163 164 164 /*
+1 -1
arch/mips/include/asm/io.h
··· 306 306 #undef __IS_KSEG1 307 307 } 308 308 309 - #if defined(CONFIG_CPU_CAVIUM_OCTEON) || defined(CONFIG_CPU_LOONGSON3) 309 + #if defined(CONFIG_CPU_CAVIUM_OCTEON) || defined(CONFIG_CPU_LOONGSON64) 310 310 #define war_io_reorder_wmb() wmb() 311 311 #else 312 312 #define war_io_reorder_wmb() barrier()
+1 -1
arch/mips/include/asm/irqflags.h
··· 41 41 " .set push \n" 42 42 " .set reorder \n" 43 43 " .set noat \n" 44 - #if defined(CONFIG_CPU_LOONGSON3) || defined (CONFIG_CPU_LOONGSON1) 44 + #if defined(CONFIG_CPU_LOONGSON64) || defined (CONFIG_CPU_LOONGSON1) 45 45 " mfc0 %[flags], $12 \n" 46 46 " di \n" 47 47 #else
+1 -1
arch/mips/include/asm/mach-loongson64/cpu-feature-overrides.h
··· 44 44 #define cpu_has_vtag_icache 0 45 45 #define cpu_has_watch 1 46 46 47 - #ifdef CONFIG_CPU_LOONGSON3 47 + #ifdef CONFIG_CPU_LOONGSON64 48 48 #define cpu_has_wsbh 1 49 49 #define cpu_has_ic_fills_f_dc 1 50 50 #define cpu_hwrena_impl_bits 0xc0000000
+1 -1
arch/mips/include/asm/mach-loongson64/irq.h
··· 4 4 5 5 #include <boot_param.h> 6 6 7 - #ifdef CONFIG_CPU_LOONGSON3 7 + #ifdef CONFIG_CPU_LOONGSON64 8 8 9 9 /* cpu core interrupt numbers */ 10 10 #define MIPS_CPU_IRQ_BASE 56
+2 -2
arch/mips/include/asm/mach-loongson64/kernel-entry-init.h
··· 17 17 * Override macros used in arch/mips/kernel/head.S. 18 18 */ 19 19 .macro kernel_entry_setup 20 - #ifdef CONFIG_CPU_LOONGSON3 20 + #ifdef CONFIG_CPU_LOONGSON64 21 21 .set push 22 22 .set mips64 23 23 /* Set LPA on LOONGSON3 config3 */ ··· 54 54 * Do SMP slave processor setup. 55 55 */ 56 56 .macro smp_slave_setup 57 - #ifdef CONFIG_CPU_LOONGSON3 57 + #ifdef CONFIG_CPU_LOONGSON64 58 58 .set push 59 59 .set mips64 60 60 /* Set LPA on LOONGSON3 config3 */
+1 -1
arch/mips/include/asm/mach-loongson64/loongson.h
··· 109 109 #define LOONGSON_PCICFG_SIZE 0x00000800 /* 2K */ 110 110 #define LOONGSON_PCICFG_TOP (LOONGSON_PCICFG_BASE+LOONGSON_PCICFG_SIZE-1) 111 111 112 - #ifdef CONFIG_CPU_LOONGSON3 112 + #ifdef CONFIG_CPU_LOONGSON64 113 113 #define LOONGSON_PCIIO_BASE loongson_sysconf.pci_io_base 114 114 #else 115 115 #define LOONGSON_PCIIO_BASE 0x1fd00000
+1 -1
arch/mips/include/asm/mach-loongson64/pci.h
··· 35 35 #else /* loongson2f/32bit & loongson2e */ 36 36 37 37 /* this pci memory space is mapped by pcimap in pci.c */ 38 - #ifdef CONFIG_CPU_LOONGSON3 38 + #ifdef CONFIG_CPU_LOONGSON64 39 39 #define LOONGSON_PCI_MEM_START 0x40000000UL 40 40 #define LOONGSON_PCI_MEM_END 0x7effffffUL 41 41 #else
+4 -4
arch/mips/include/asm/module.h
··· 121 121 #define MODULE_PROC_FAMILY "SB1 " 122 122 #elif defined CONFIG_CPU_LOONGSON1 123 123 #define MODULE_PROC_FAMILY "LOONGSON1 " 124 - #elif defined CONFIG_CPU_LOONGSON2 125 - #define MODULE_PROC_FAMILY "LOONGSON2 " 126 - #elif defined CONFIG_CPU_LOONGSON3 127 - #define MODULE_PROC_FAMILY "LOONGSON3 " 124 + #elif defined CONFIG_CPU_LOONGSON2EF 125 + #define MODULE_PROC_FAMILY "LOONGSON2EF " 126 + #elif defined CONFIG_CPU_LOONGSON64 127 + #define MODULE_PROC_FAMILY "LOONGSON64 " 128 128 #elif defined CONFIG_CPU_CAVIUM_OCTEON 129 129 #define MODULE_PROC_FAMILY "OCTEON " 130 130 #elif defined CONFIG_CPU_XLR
+1 -1
arch/mips/include/asm/processor.h
··· 385 385 #define KSTK_ESP(tsk) (task_pt_regs(tsk)->regs[29]) 386 386 #define KSTK_STATUS(tsk) (task_pt_regs(tsk)->cp0_status) 387 387 388 - #ifdef CONFIG_CPU_LOONGSON3 388 + #ifdef CONFIG_CPU_LOONGSON64 389 389 /* 390 390 * Loongson-3's SFB (Store-Fill-Buffer) may buffer writes indefinitely when a 391 391 * tight read loop is executed, because reads take priority over writes & the
+2 -2
arch/mips/include/asm/r4kcache.h
··· 72 72 static inline void flush_icache_line(unsigned long addr) 73 73 { 74 74 switch (boot_cpu_type()) { 75 - case CPU_LOONGSON2: 75 + case CPU_LOONGSON2EF: 76 76 cache_op(Hit_Invalidate_I_Loongson2, addr); 77 77 break; 78 78 ··· 154 154 static inline int protected_flush_icache_line(unsigned long addr) 155 155 { 156 156 switch (boot_cpu_type()) { 157 - case CPU_LOONGSON2: 157 + case CPU_LOONGSON2EF: 158 158 return protected_cache_op(Hit_Invalidate_I_Loongson2, addr); 159 159 160 160 default:
+8 -8
arch/mips/kernel/cpu-probe.c
··· 608 608 if (!(flags & FTLB_EN)) 609 609 return 1; 610 610 return 0; 611 - case CPU_LOONGSON3: 611 + case CPU_LOONGSON64: 612 612 /* Flush ITLB, DTLB, VTLB and FTLB */ 613 613 write_c0_diag(LOONGSON_DIAG_ITLB | LOONGSON_DIAG_DTLB | 614 614 LOONGSON_DIAG_VTLB | LOONGSON_DIAG_FTLB); ··· 1529 1529 case PRID_IMP_LOONGSON_64C: /* Loongson-2/3 */ 1530 1530 switch (c->processor_id & PRID_REV_MASK) { 1531 1531 case PRID_REV_LOONGSON2E: 1532 - c->cputype = CPU_LOONGSON2; 1532 + c->cputype = CPU_LOONGSON2EF; 1533 1533 __cpu_name[cpu] = "ICT Loongson-2"; 1534 1534 set_elf_platform(cpu, "loongson2e"); 1535 1535 set_isa(c, MIPS_CPU_ISA_III); 1536 1536 c->fpu_msk31 |= FPU_CSR_CONDX; 1537 1537 break; 1538 1538 case PRID_REV_LOONGSON2F: 1539 - c->cputype = CPU_LOONGSON2; 1539 + c->cputype = CPU_LOONGSON2EF; 1540 1540 __cpu_name[cpu] = "ICT Loongson-2"; 1541 1541 set_elf_platform(cpu, "loongson2f"); 1542 1542 set_isa(c, MIPS_CPU_ISA_III); 1543 1543 c->fpu_msk31 |= FPU_CSR_CONDX; 1544 1544 break; 1545 1545 case PRID_REV_LOONGSON3A_R1: 1546 - c->cputype = CPU_LOONGSON3; 1546 + c->cputype = CPU_LOONGSON64; 1547 1547 __cpu_name[cpu] = "ICT Loongson-3"; 1548 1548 set_elf_platform(cpu, "loongson3a"); 1549 1549 set_isa(c, MIPS_CPU_ISA_M64R1); ··· 1552 1552 break; 1553 1553 case PRID_REV_LOONGSON3B_R1: 1554 1554 case PRID_REV_LOONGSON3B_R2: 1555 - c->cputype = CPU_LOONGSON3; 1555 + c->cputype = CPU_LOONGSON64; 1556 1556 __cpu_name[cpu] = "ICT Loongson-3"; 1557 1557 set_elf_platform(cpu, "loongson3b"); 1558 1558 set_isa(c, MIPS_CPU_ISA_M64R1); ··· 1908 1908 switch (c->processor_id & PRID_REV_MASK) { 1909 1909 case PRID_REV_LOONGSON3A_R2_0: 1910 1910 case PRID_REV_LOONGSON3A_R2_1: 1911 - c->cputype = CPU_LOONGSON3; 1911 + c->cputype = CPU_LOONGSON64; 1912 1912 __cpu_name[cpu] = "ICT Loongson-3"; 1913 1913 set_elf_platform(cpu, "loongson3a"); 1914 1914 set_isa(c, MIPS_CPU_ISA_M64R2); 1915 1915 break; 1916 1916 case PRID_REV_LOONGSON3A_R3_0: 1917 1917 case PRID_REV_LOONGSON3A_R3_1: 1918 - c->cputype = CPU_LOONGSON3; 1918 + c->cputype = CPU_LOONGSON64; 1919 1919 __cpu_name[cpu] = "ICT Loongson-3"; 1920 1920 set_elf_platform(cpu, "loongson3a"); 1921 1921 set_isa(c, MIPS_CPU_ISA_M64R2); ··· 1929 1929 MIPS_ASE_LOONGSON_EXT | MIPS_ASE_LOONGSON_EXT2); 1930 1930 break; 1931 1931 case PRID_IMP_LOONGSON_64G: 1932 - c->cputype = CPU_LOONGSON3; 1932 + c->cputype = CPU_LOONGSON64; 1933 1933 __cpu_name[cpu] = "ICT Loongson-3"; 1934 1934 set_elf_platform(cpu, "loongson3a"); 1935 1935 set_isa(c, MIPS_CPU_ISA_M64R2);
+1 -1
arch/mips/kernel/idle.c
··· 178 178 case CPU_XLP: 179 179 cpu_wait = r4k_wait; 180 180 break; 181 - case CPU_LOONGSON3: 181 + case CPU_LOONGSON64: 182 182 if ((c->processor_id & (PRID_IMP_MASK | PRID_REV_MASK)) >= 183 183 (PRID_IMP_LOONGSON_64C | PRID_REV_LOONGSON3A_R2_0)) 184 184 cpu_wait = r4k_wait;
+2 -2
arch/mips/kernel/perf_event_mipsxx.c
··· 1623 1623 raw_event.cntr_mask = 1624 1624 raw_id > 127 ? CNTR_ODD : CNTR_EVEN; 1625 1625 break; 1626 - case CPU_LOONGSON3: 1626 + case CPU_LOONGSON64: 1627 1627 raw_event.cntr_mask = raw_id > 127 ? CNTR_ODD : CNTR_EVEN; 1628 1628 break; 1629 1629 } ··· 1769 1769 mipspmu.general_event_map = &mipsxxcore_event_map; 1770 1770 mipspmu.cache_event_map = &mipsxxcore_cache_map; 1771 1771 break; 1772 - case CPU_LOONGSON3: 1772 + case CPU_LOONGSON64: 1773 1773 mipspmu.name = "mips/loongson3"; 1774 1774 mipspmu.general_event_map = &loongson3_event_map; 1775 1775 mipspmu.cache_event_map = &loongson3_cache_map;
+1 -1
arch/mips/kernel/setup.c
··· 287 287 * Initialize the bootmem allocator. It also setup initrd related data 288 288 * if needed. 289 289 */ 290 - #if defined(CONFIG_SGI_IP27) || (defined(CONFIG_CPU_LOONGSON3) && defined(CONFIG_NUMA)) 290 + #if defined(CONFIG_SGI_IP27) || (defined(CONFIG_CPU_LOONGSON64) && defined(CONFIG_NUMA)) 291 291 292 292 static void __init bootmem_init(void) 293 293 {
+1 -1
arch/mips/kernel/traps.c
··· 2394 2394 else { 2395 2395 if (cpu_has_vtag_icache) 2396 2396 set_except_vector(EXCCODE_RI, handle_ri_rdhwr_tlbp); 2397 - else if (current_cpu_type() == CPU_LOONGSON3) 2397 + else if (current_cpu_type() == CPU_LOONGSON64) 2398 2398 set_except_vector(EXCCODE_RI, handle_ri_rdhwr_tlbp); 2399 2399 else 2400 2400 set_except_vector(EXCCODE_RI, handle_ri_rdhwr);
+2 -2
arch/mips/lib/csum_partial.S
··· 279 279 #endif 280 280 281 281 /* odd buffer alignment? */ 282 - #if defined(CONFIG_CPU_MIPSR2) || defined(CONFIG_CPU_LOONGSON3) 282 + #if defined(CONFIG_CPU_MIPSR2) || defined(CONFIG_CPU_LOONGSON64) 283 283 .set push 284 284 .set arch=mips32r2 285 285 wsbh v1, sum ··· 732 732 addu sum, v1 733 733 #endif 734 734 735 - #if defined(CONFIG_CPU_MIPSR2) || defined(CONFIG_CPU_LOONGSON3) 735 + #if defined(CONFIG_CPU_MIPSR2) || defined(CONFIG_CPU_LOONGSON64) 736 736 .set push 737 737 .set arch=mips32r2 738 738 wsbh v1, sum
+1 -1
arch/mips/loongson64/Kconfig
··· 79 79 select I8259 80 80 select IRQ_MIPS_CPU 81 81 select NR_CPUS_DEFAULT_4 82 - select SYS_HAS_CPU_LOONGSON3 82 + select SYS_HAS_CPU_LOONGSON64 83 83 select SYS_HAS_EARLY_PRINTK 84 84 select SYS_SUPPORTS_SMP 85 85 select SYS_SUPPORTS_HOTPLUG_CPU
+1 -1
arch/mips/loongson64/Makefile
··· 21 21 # All Loongson-3 family machines 22 22 # 23 23 24 - obj-$(CONFIG_CPU_LOONGSON3) += loongson-3/ 24 + obj-$(CONFIG_CPU_LOONGSON64) += loongson-3/
+6 -6
arch/mips/loongson64/Platform
··· 3 3 # 4 4 5 5 # Only gcc >= 4.4 have Loongson specific support 6 - cflags-$(CONFIG_CPU_LOONGSON2) += -Wa,--trap 6 + cflags-$(CONFIG_CPU_LOONGSON2EF) += -Wa,--trap 7 7 cflags-$(CONFIG_CPU_LOONGSON2E) += \ 8 8 $(call cc-option,-march=loongson2e,-march=r4600) 9 9 cflags-$(CONFIG_CPU_LOONGSON2F) += \ ··· 22 22 endif 23 23 endif 24 24 25 - cflags-$(CONFIG_CPU_LOONGSON3) += -Wa,--trap 25 + cflags-$(CONFIG_CPU_LOONGSON64) += -Wa,--trap 26 26 27 27 # 28 28 # Some versions of binutils, not currently mainline as of 2019/02/04, support ··· 44 44 # binutils does not merge support for the flag then we can revisit & remove 45 45 # this later - for now it ensures vendor toolchains don't cause problems. 46 46 # 47 - cflags-$(CONFIG_CPU_LOONGSON3) += $(call as-option,-Wa$(comma)-mno-fix-loongson3-llsc,) 47 + cflags-$(CONFIG_CPU_LOONGSON64) += $(call as-option,-Wa$(comma)-mno-fix-loongson3-llsc,) 48 48 49 49 # 50 50 # binutils from v2.25 on and gcc starting from v4.9.0 treat -march=loongson3a ··· 55 55 # 56 56 ifeq ($(call cc-ifversion, -ge, 0409, y), y) 57 57 ifeq ($(call ld-ifversion, -ge, 225000000, y), y) 58 - cflags-$(CONFIG_CPU_LOONGSON3) += \ 58 + cflags-$(CONFIG_CPU_LOONGSON64) += \ 59 59 $(call cc-option,-march=loongson3a -U_MIPS_ISA -D_MIPS_ISA=_MIPS_ISA_MIPS64) 60 60 else 61 - cflags-$(CONFIG_CPU_LOONGSON3) += \ 61 + cflags-$(CONFIG_CPU_LOONGSON64) += \ 62 62 $(call cc-option,-march=mips64r2,-mips64r2 -U_MIPS_ISA -D_MIPS_ISA=_MIPS_ISA_MIPS64) 63 63 endif 64 64 else 65 - cflags-$(CONFIG_CPU_LOONGSON3) += \ 65 + cflags-$(CONFIG_CPU_LOONGSON64) += \ 66 66 $(call cc-option,-march=mips64r2,-mips64r2 -U_MIPS_ISA -D_MIPS_ISA=_MIPS_ISA_MIPS64) 67 67 endif 68 68
+1 -1
arch/mips/loongson64/common/pci.c
··· 87 87 #endif 88 88 register_pci_controller(&loongson_pci_controller); 89 89 90 - #ifdef CONFIG_CPU_LOONGSON3 90 + #ifdef CONFIG_CPU_LOONGSON64 91 91 sbx00_acpi_init(); 92 92 #endif 93 93
+16 -16
arch/mips/mm/c-r4k.c
··· 324 324 r4k_blast_icache_page = (void *)cache_noop; 325 325 else if (ic_lsize == 16) 326 326 r4k_blast_icache_page = blast_icache16_page; 327 - else if (ic_lsize == 32 && current_cpu_type() == CPU_LOONGSON2) 327 + else if (ic_lsize == 32 && current_cpu_type() == CPU_LOONGSON2EF) 328 328 r4k_blast_icache_page = loongson2_blast_icache32_page; 329 329 else if (ic_lsize == 32) 330 330 r4k_blast_icache_page = blast_icache32_page; ··· 373 373 else if (TX49XX_ICACHE_INDEX_INV_WAR) 374 374 r4k_blast_icache_page_indexed = 375 375 tx49_blast_icache32_page_indexed; 376 - else if (current_cpu_type() == CPU_LOONGSON2) 376 + else if (current_cpu_type() == CPU_LOONGSON2EF) 377 377 r4k_blast_icache_page_indexed = 378 378 loongson2_blast_icache32_page_indexed; 379 379 else ··· 399 399 r4k_blast_icache = blast_r4600_v1_icache32; 400 400 else if (TX49XX_ICACHE_INDEX_INV_WAR) 401 401 r4k_blast_icache = tx49_blast_icache32; 402 - else if (current_cpu_type() == CPU_LOONGSON2) 402 + else if (current_cpu_type() == CPU_LOONGSON2EF) 403 403 r4k_blast_icache = loongson2_blast_icache32; 404 404 else 405 405 r4k_blast_icache = blast_icache32; ··· 469 469 { 470 470 unsigned long sc_lsize = cpu_scache_line_size(); 471 471 472 - if (current_cpu_type() != CPU_LOONGSON3) 472 + if (current_cpu_type() != CPU_LOONGSON64) 473 473 r4k_blast_scache_node = (void *)cache_noop; 474 474 else if (sc_lsize == 16) 475 475 r4k_blast_scache_node = blast_scache16_node; ··· 484 484 static inline void local_r4k___flush_cache_all(void * args) 485 485 { 486 486 switch (current_cpu_type()) { 487 - case CPU_LOONGSON2: 487 + case CPU_LOONGSON2EF: 488 488 case CPU_R4000SC: 489 489 case CPU_R4000MC: 490 490 case CPU_R4400SC: ··· 501 501 r4k_blast_scache(); 502 502 break; 503 503 504 - case CPU_LOONGSON3: 504 + case CPU_LOONGSON64: 505 505 /* Use get_ebase_cpunum() for both NUMA=y/n */ 506 506 r4k_blast_scache_node(get_ebase_cpunum() >> 2); 507 507 break; ··· 774 774 r4k_blast_icache(); 775 775 else { 776 776 switch (boot_cpu_type()) { 777 - case CPU_LOONGSON2: 777 + case CPU_LOONGSON2EF: 778 778 protected_loongson2_blast_icache_range(start, end); 779 779 break; 780 780 ··· 867 867 preempt_disable(); 868 868 if (cpu_has_inclusive_pcaches) { 869 869 if (size >= scache_size) { 870 - if (current_cpu_type() != CPU_LOONGSON3) 870 + if (current_cpu_type() != CPU_LOONGSON64) 871 871 r4k_blast_scache(); 872 872 else 873 873 r4k_blast_scache_node(pa_to_nid(addr)); ··· 908 908 preempt_disable(); 909 909 if (cpu_has_inclusive_pcaches) { 910 910 if (size >= scache_size) { 911 - if (current_cpu_type() != CPU_LOONGSON3) 911 + if (current_cpu_type() != CPU_LOONGSON64) 912 912 r4k_blast_scache(); 913 913 else 914 914 r4k_blast_scache_node(pa_to_nid(addr)); ··· 1228 1228 c->options |= MIPS_CPU_PREFETCH; 1229 1229 break; 1230 1230 1231 - case CPU_LOONGSON2: 1231 + case CPU_LOONGSON2EF: 1232 1232 icache_size = 1 << (12 + ((config & CONF_IC) >> 9)); 1233 1233 c->icache.linesz = 16 << ((config & CONF_IB) >> 5); 1234 1234 if (prid & 0x3) ··· 1246 1246 c->dcache.waybit = 0; 1247 1247 break; 1248 1248 1249 - case CPU_LOONGSON3: 1249 + case CPU_LOONGSON64: 1250 1250 config1 = read_c0_config1(); 1251 1251 lsize = (config1 >> 19) & 7; 1252 1252 if (lsize) ··· 1457 1457 c->dcache.flags &= ~MIPS_CACHE_ALIASES; 1458 1458 break; 1459 1459 1460 - case CPU_LOONGSON2: 1460 + case CPU_LOONGSON2EF: 1461 1461 /* 1462 1462 * LOONGSON2 has 4 way icache, but when using indexed cache op, 1463 1463 * one op will act on all 4 ways ··· 1483 1483 struct cpuinfo_mips *c = &current_cpu_data; 1484 1484 unsigned int config2, lsize; 1485 1485 1486 - if (current_cpu_type() != CPU_LOONGSON3) 1486 + if (current_cpu_type() != CPU_LOONGSON64) 1487 1487 return; 1488 1488 1489 1489 config2 = read_c0_config2(); ··· 1658 1658 #endif 1659 1659 return; 1660 1660 1661 - case CPU_LOONGSON2: 1661 + case CPU_LOONGSON2EF: 1662 1662 loongson2_sc_init(); 1663 1663 return; 1664 1664 1665 - case CPU_LOONGSON3: 1665 + case CPU_LOONGSON64: 1666 1666 loongson3_sc_init(); 1667 1667 return; 1668 1668 ··· 1931 1931 /* Optimization: an L2 flush implicitly flushes the L1 */ 1932 1932 current_cpu_data.options |= MIPS_CPU_INCLUSIVE_CACHES; 1933 1933 break; 1934 - case CPU_LOONGSON3: 1934 + case CPU_LOONGSON64: 1935 1935 /* Loongson-3 maintains cache coherency by hardware */ 1936 1936 __flush_cache_all = cache_noop; 1937 1937 __flush_cache_vmap = cache_noop;
+1 -1
arch/mips/mm/page.c
··· 187 187 } 188 188 break; 189 189 190 - case CPU_LOONGSON3: 190 + case CPU_LOONGSON64: 191 191 /* Loongson-3 only support the Pref_Load/Pref_Store. */ 192 192 pref_bias_clear_store = 128; 193 193 pref_bias_copy_load = 128;
+2 -2
arch/mips/mm/tlb-r4k.c
··· 35 35 static inline void flush_micro_tlb(void) 36 36 { 37 37 switch (current_cpu_type()) { 38 - case CPU_LOONGSON2: 38 + case CPU_LOONGSON2EF: 39 39 write_c0_diag(LOONGSON_DIAG_ITLB); 40 40 break; 41 - case CPU_LOONGSON3: 41 + case CPU_LOONGSON64: 42 42 write_c0_diag(LOONGSON_DIAG_ITLB | LOONGSON_DIAG_DTLB); 43 43 break; 44 44 default:
+3 -3
arch/mips/mm/tlbex.c
··· 571 571 case CPU_BMIPS4350: 572 572 case CPU_BMIPS4380: 573 573 case CPU_BMIPS5000: 574 - case CPU_LOONGSON2: 575 - case CPU_LOONGSON3: 574 + case CPU_LOONGSON2EF: 575 + case CPU_LOONGSON64: 576 576 case CPU_R5500: 577 577 if (m4kc_tlbp_war()) 578 578 uasm_i_nop(p); ··· 1370 1370 switch (boot_cpu_type()) { 1371 1371 default: 1372 1372 if (sizeof(long) == 4) { 1373 - case CPU_LOONGSON2: 1373 + case CPU_LOONGSON2EF: 1374 1374 /* Loongson2 ebase is different than r4k, we have more space */ 1375 1375 if ((p - tlb_handler) > 64) 1376 1376 panic("TLB refill handler space exceeded");
+2 -2
arch/mips/oprofile/Makefile
··· 14 14 oprofile-$(CONFIG_CPU_R10000) += op_model_mipsxx.o 15 15 oprofile-$(CONFIG_CPU_SB1) += op_model_mipsxx.o 16 16 oprofile-$(CONFIG_CPU_XLR) += op_model_mipsxx.o 17 - oprofile-$(CONFIG_CPU_LOONGSON2) += op_model_loongson2.o 18 - oprofile-$(CONFIG_CPU_LOONGSON3) += op_model_loongson3.o 17 + oprofile-$(CONFIG_CPU_LOONGSON2EF) += op_model_loongson2.o 18 + oprofile-$(CONFIG_CPU_LOONGSON64) += op_model_loongson3.o
+2 -2
arch/mips/oprofile/common.c
··· 104 104 lmodel = &op_model_mipsxx_ops; 105 105 break; 106 106 107 - case CPU_LOONGSON2: 107 + case CPU_LOONGSON2EF: 108 108 lmodel = &op_model_loongson2_ops; 109 109 break; 110 - case CPU_LOONGSON3: 110 + case CPU_LOONGSON64: 111 111 lmodel = &op_model_loongson3_ops; 112 112 break; 113 113 };
+1 -1
drivers/gpio/Kconfig
··· 298 298 299 299 config GPIO_LOONGSON 300 300 bool "Loongson-2/3 GPIO support" 301 - depends on CPU_LOONGSON2 || CPU_LOONGSON3 301 + depends on CPU_LOONGSON2EF || CPU_LOONGSON64 302 302 help 303 303 driver for GPIO functionality on Loongson-2F/3A/3B processors. 304 304
+1 -1
drivers/gpio/gpio-loongson.c
··· 22 22 #define STLS2F_N_GPIO 4 23 23 #define STLS3A_N_GPIO 16 24 24 25 - #ifdef CONFIG_CPU_LOONGSON3 25 + #ifdef CONFIG_CPU_LOONGSON64 26 26 #define LOONGSON_N_GPIO STLS3A_N_GPIO 27 27 #else 28 28 #define LOONGSON_N_GPIO STLS2F_N_GPIO
+1 -1
include/drm/drm_cache.h
··· 45 45 { 46 46 #if defined(CONFIG_PPC) && !defined(CONFIG_NOT_COHERENT_CACHE) 47 47 return false; 48 - #elif defined(CONFIG_MIPS) && defined(CONFIG_CPU_LOONGSON3) 48 + #elif defined(CONFIG_MIPS) && defined(CONFIG_CPU_LOONGSON64) 49 49 return false; 50 50 #elif defined(CONFIG_ARM) || defined(CONFIG_ARM64) 51 51 /*