Skip to content

Commit 268a2d6

Browse files
FlyGoatpaulburton
authored andcommitted
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
1 parent 2409839 commit 268a2d6

34 files changed

Lines changed: 95 additions & 96 deletions

‎arch/mips/Kconfig‎

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1377,9 +1377,9 @@ choice
13771377
prompt "CPU type"
13781378
default CPU_R4X00
13791379

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
13831383
select ARCH_HAS_PHYS_TO_DMA
13841384
select CPU_SUPPORTS_64BIT_KERNEL
13851385
select CPU_SUPPORTS_HIGHMEM
@@ -1394,19 +1394,19 @@ config CPU_LOONGSON3
13941394
select GPIOLIB
13951395
select SWIOTLB
13961396
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.
13991399

1400-
config LOONGSON3_ENHANCEMENT
1401-
bool "New Loongson 3 CPU Enhancements"
1400+
config LOONGSON64_ENHANCEMENT
1401+
bool "New Loongson GSx64E CPU Enhancements"
14021402
default n
14031403
select CPU_MIPSR2
14041404
select CPU_HAS_PREFETCH
1405-
depends on CPU_LOONGSON3
1405+
depends on CPU_LOONGSON64
14061406
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
14081408
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
14101410
Local register, Read-Inhibit/Execute-Inhibit, SFB (Store Fill Buffer),
14111411
Fast TLB refill support, etc.
14121412

@@ -1418,7 +1418,7 @@ config LOONGSON3_ENHANCEMENT
14181418
config CPU_LOONGSON3_WORKAROUNDS
14191419
bool "Old Loongson 3 LLSC Workarounds"
14201420
default y if SMP
1421-
depends on CPU_LOONGSON3
1421+
depends on CPU_LOONGSON64
14221422
help
14231423
Loongson 3 processors have the llsc issues which require workarounds.
14241424
Without workarounds the system may hang unexpectedly.
@@ -1433,7 +1433,7 @@ config CPU_LOONGSON3_WORKAROUNDS
14331433
config CPU_LOONGSON2E
14341434
bool "Loongson 2E"
14351435
depends on SYS_HAS_CPU_LOONGSON2E
1436-
select CPU_LOONGSON2
1436+
select CPU_LOONGSON2EF
14371437
help
14381438
The Loongson 2E processor implements the MIPS III instruction set
14391439
with many extensions.
@@ -1444,7 +1444,7 @@ config CPU_LOONGSON2E
14441444
config CPU_LOONGSON2F
14451445
bool "Loongson 2F"
14461446
depends on SYS_HAS_CPU_LOONGSON2F
1447-
select CPU_LOONGSON2
1447+
select CPU_LOONGSON2EF
14481448
select GPIOLIB
14491449
help
14501450
The Loongson 2F processor implements the MIPS III instruction set
@@ -1857,7 +1857,7 @@ config SYS_SUPPORTS_ZBOOT_UART_PROM
18571857
bool
18581858
select SYS_SUPPORTS_ZBOOT
18591859

1860-
config CPU_LOONGSON2
1860+
config CPU_LOONGSON2EF
18611861
bool
18621862
select CPU_SUPPORTS_32BIT_KERNEL
18631863
select CPU_SUPPORTS_64BIT_KERNEL
@@ -1900,7 +1900,7 @@ config CPU_BMIPS5000
19001900
select SYS_SUPPORTS_HOTPLUG_CPU
19011901
select CPU_HAS_RIXI
19021902

1903-
config SYS_HAS_CPU_LOONGSON3
1903+
config SYS_HAS_CPU_LOONGSON64
19041904
bool
19051905
select CPU_SUPPORTS_CPUFREQ
19061906
select CPU_HAS_RIXI
@@ -2162,7 +2162,7 @@ choice
21622162

21632163
config PAGE_SIZE_4KB
21642164
bool "4kB"
2165-
depends on !CPU_LOONGSON2 && !CPU_LOONGSON3
2165+
depends on !CPU_LOONGSON2EF && !CPU_LOONGSON64
21662166
help
21672167
This option select the standard 4kB Linux page size. On some
21682168
R3000-family processors this is the only available page size. Using
@@ -2616,7 +2616,7 @@ config CPU_SUPPORTS_MSA
26162616

26172617
config ARCH_FLATMEM_ENABLE
26182618
def_bool y
2619-
depends on !NUMA && !CPU_LOONGSON2
2619+
depends on !NUMA && !CPU_LOONGSON2EF
26202620

26212621
config ARCH_SPARSEMEM_ENABLE
26222622
bool
@@ -2697,7 +2697,7 @@ config NODES_SHIFT
26972697

26982698
config HW_PERF_EVENTS
26992699
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)
27012701
default y
27022702
help
27032703
Enable hardware performance counter support for perf events. If

‎arch/mips/include/asm/cop2.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ extern void nlm_cop2_restore(struct nlm_cop2_state *);
3333
#define cop2_present 1
3434
#define cop2_lazy_restore 0
3535

36-
#elif defined(CONFIG_CPU_LOONGSON3)
36+
#elif defined(CONFIG_CPU_LOONGSON64)
3737

3838
#define cop2_present 1
3939
#define cop2_lazy_restore 1

‎arch/mips/include/asm/cpu-type.h‎

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,12 @@
1515
static inline int __pure __get_cpu_type(const int cpu_type)
1616
{
1717
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:
2120
#endif
2221

23-
#ifdef CONFIG_SYS_HAS_CPU_LOONGSON3
24-
case CPU_LOONGSON3:
22+
#ifdef CONFIG_SYS_HAS_CPU_LOONGSON64
23+
case CPU_LOONGSON64:
2524
#endif
2625

2726
#if defined(CONFIG_SYS_HAS_CPU_LOONGSON1B) || \

‎arch/mips/include/asm/cpu.h‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -319,8 +319,8 @@ enum cpu_type_enum {
319319
/*
320320
* MIPS64 class processors
321321
*/
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,
324324
CPU_CAVIUM_OCTEON2, CPU_CAVIUM_OCTEON3, CPU_XLR, CPU_XLP, CPU_I6500,
325325

326326
CPU_QEMU_GENERIC,

‎arch/mips/include/asm/hazards.h‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
* TLB hazards
2424
*/
2525
#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)
2727

2828
/*
2929
* MIPSR2 defines ehb for hazard avoidance
@@ -158,7 +158,7 @@ do { \
158158
} while (0)
159159

160160
#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) || \
162162
defined(CONFIG_CPU_R10000) || defined(CONFIG_CPU_R5500) || defined(CONFIG_CPU_XLR)
163163

164164
/*

‎arch/mips/include/asm/io.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@ static inline void iounmap(const volatile void __iomem *addr)
306306
#undef __IS_KSEG1
307307
}
308308

309-
#if defined(CONFIG_CPU_CAVIUM_OCTEON) || defined(CONFIG_CPU_LOONGSON3)
309+
#if defined(CONFIG_CPU_CAVIUM_OCTEON) || defined(CONFIG_CPU_LOONGSON64)
310310
#define war_io_reorder_wmb() wmb()
311311
#else
312312
#define war_io_reorder_wmb() barrier()

‎arch/mips/include/asm/irqflags.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ static inline unsigned long arch_local_irq_save(void)
4141
" .set push \n"
4242
" .set reorder \n"
4343
" .set noat \n"
44-
#if defined(CONFIG_CPU_LOONGSON3) || defined (CONFIG_CPU_LOONGSON1)
44+
#if defined(CONFIG_CPU_LOONGSON64) || defined (CONFIG_CPU_LOONGSON1)
4545
" mfc0 %[flags], $12 \n"
4646
" di \n"
4747
#else

‎arch/mips/include/asm/mach-loongson64/cpu-feature-overrides.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
#define cpu_has_vtag_icache 0
4545
#define cpu_has_watch 1
4646

47-
#ifdef CONFIG_CPU_LOONGSON3
47+
#ifdef CONFIG_CPU_LOONGSON64
4848
#define cpu_has_wsbh 1
4949
#define cpu_has_ic_fills_f_dc 1
5050
#define cpu_hwrena_impl_bits 0xc0000000

‎arch/mips/include/asm/mach-loongson64/irq.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
#include <boot_param.h>
66

7-
#ifdef CONFIG_CPU_LOONGSON3
7+
#ifdef CONFIG_CPU_LOONGSON64
88

99
/* cpu core interrupt numbers */
1010
#define MIPS_CPU_IRQ_BASE 56

‎arch/mips/include/asm/mach-loongson64/kernel-entry-init.h‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
* Override macros used in arch/mips/kernel/head.S.
1818
*/
1919
.macro kernel_entry_setup
20-
#ifdef CONFIG_CPU_LOONGSON3
20+
#ifdef CONFIG_CPU_LOONGSON64
2121
.set push
2222
.set mips64
2323
/* Set LPA on LOONGSON3 config3 */
@@ -54,7 +54,7 @@
5454
* Do SMP slave processor setup.
5555
*/
5656
.macro smp_slave_setup
57-
#ifdef CONFIG_CPU_LOONGSON3
57+
#ifdef CONFIG_CPU_LOONGSON64
5858
.set push
5959
.set mips64
6060
/* Set LPA on LOONGSON3 config3 */

0 commit comments

Comments
 (0)