Skip to content

Commit b633648

Browse files
committed
MIPS: MT: Remove SMTC support
Nobody is maintaining SMTC anymore and there also seems to be no userbase. Which is a pity - the SMTC technology primarily developed by Kevin D. Kissell <kevink@paralogos.com> is an ingenious demonstration for the MT ASE's power and elegance. Based on Markos Chandras <Markos.Chandras@imgtec.com> patch https://patchwork.linux-mips.org/patch/6719/ which while very similar did no longer apply cleanly when I tried to merge it plus some additional post-SMTC cleanup - SMTC was a feature as tricky to remove as it was to merge once upon a time. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
1 parent 8b2e62c commit b633648

64 files changed

Lines changed: 71 additions & 4096 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎arch/mips/Kconfig‎

Lines changed: 4 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1852,7 +1852,7 @@ config FORCE_MAX_ZONEORDER
18521852

18531853
config CEVT_GIC
18541854
bool "Use GIC global counter for clock events"
1855-
depends on IRQ_GIC && !(MIPS_SEAD3 || MIPS_MT_SMTC)
1855+
depends on IRQ_GIC && !MIPS_SEAD3
18561856
help
18571857
Use the GIC global counter for the clock events. The R4K clock
18581858
event driver is always present, so if the platform ends up not
@@ -1936,24 +1936,6 @@ config MIPS_MT_SMP
19361936
Intel Hyperthreading feature. For further information go to
19371937
<http://www.imgtec.com/mips/mips-multithreading.asp>.
19381938

1939-
config MIPS_MT_SMTC
1940-
bool "Use all TCs on all VPEs for SMP (DEPRECATED)"
1941-
depends on CPU_MIPS32_R2
1942-
depends on SYS_SUPPORTS_MULTITHREADING
1943-
depends on !MIPS_CPS
1944-
select CPU_MIPSR2_IRQ_VI
1945-
select CPU_MIPSR2_IRQ_EI
1946-
select MIPS_MT
1947-
select SMP
1948-
select SMP_UP
1949-
select SYS_SUPPORTS_SMP
1950-
select NR_CPUS_DEFAULT_8
1951-
help
1952-
This is a kernel model which is known as SMTC. This is
1953-
supported on cores with the MT ASE and presents all TCs
1954-
available on all VPEs to support SMP. For further
1955-
information see <http://www.linux-mips.org/wiki/34K#SMTC>.
1956-
19571939
endchoice
19581940

19591941
config MIPS_MT
@@ -1977,7 +1959,7 @@ config SYS_SUPPORTS_MULTITHREADING
19771959
config MIPS_MT_FPAFF
19781960
bool "Dynamic FPU affinity for FP-intensive threads"
19791961
default y
1980-
depends on MIPS_MT_SMP || MIPS_MT_SMTC
1962+
depends on MIPS_MT_SMP
19811963

19821964
config MIPS_VPE_LOADER
19831965
bool "VPE loader support."
@@ -1999,29 +1981,6 @@ config MIPS_VPE_LOADER_MT
19991981
default "y"
20001982
depends on MIPS_VPE_LOADER && !MIPS_CMP
20011983

2002-
config MIPS_MT_SMTC_IM_BACKSTOP
2003-
bool "Use per-TC register bits as backstop for inhibited IM bits"
2004-
depends on MIPS_MT_SMTC
2005-
default n
2006-
help
2007-
To support multiple TC microthreads acting as "CPUs" within
2008-
a VPE, VPE-wide interrupt mask bits must be specially manipulated
2009-
during interrupt handling. To support legacy drivers and interrupt
2010-
controller management code, SMTC has a "backstop" to track and
2011-
if necessary restore the interrupt mask. This has some performance
2012-
impact on interrupt service overhead.
2013-
2014-
config MIPS_MT_SMTC_IRQAFF
2015-
bool "Support IRQ affinity API"
2016-
depends on MIPS_MT_SMTC
2017-
default n
2018-
help
2019-
Enables SMP IRQ affinity API (/proc/irq/*/smp_affinity, etc.)
2020-
for SMTC Linux kernel. Requires platform support, of which
2021-
an example can be found in the MIPS kernel i8259 and Malta
2022-
platform code. Adds some overhead to interrupt dispatch, and
2023-
should be used only if you know what you are doing.
2024-
20251984
config MIPS_VPE_LOADER_TOM
20261985
bool "Load VPE program into memory hidden from linux"
20271986
depends on MIPS_VPE_LOADER
@@ -2049,7 +2008,7 @@ config MIPS_VPE_APSP_API_MT
20492008

20502009
config MIPS_CMP
20512010
bool "MIPS CMP framework support (DEPRECATED)"
2052-
depends on SYS_SUPPORTS_MIPS_CMP && !MIPS_MT_SMTC
2011+
depends on SYS_SUPPORTS_MIPS_CMP
20532012
select MIPS_GIC_IPI
20542013
select SYNC_R4K
20552014
select WEAK_ORDERING
@@ -2256,7 +2215,7 @@ config NODES_SHIFT
22562215

22572216
config HW_PERF_EVENTS
22582217
bool "Enable hardware performance counter support for perf events"
2259-
depends on PERF_EVENTS && !MIPS_MT_SMTC && OPROFILE=n && (CPU_MIPS32 || CPU_MIPS64 || CPU_R10000 || CPU_SB1 || CPU_CAVIUM_OCTEON || CPU_XLP)
2218+
depends on PERF_EVENTS && OPROFILE=n && (CPU_MIPS32 || CPU_MIPS64 || CPU_R10000 || CPU_SB1 || CPU_CAVIUM_OCTEON || CPU_XLP)
22602219
default y
22612220
help
22622221
Enable hardware performance counter support for perf events. If

‎arch/mips/Kconfig.debug‎

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -79,15 +79,6 @@ config CMDLINE_OVERRIDE
7979

8080
Normally, you will choose 'N' here.
8181

82-
config SMTC_IDLE_HOOK_DEBUG
83-
bool "Enable additional debug checks before going into CPU idle loop"
84-
depends on DEBUG_KERNEL && MIPS_MT_SMTC
85-
help
86-
This option enables Enable additional debug checks before going into
87-
CPU idle loop. For details on these checks, see
88-
arch/mips/kernel/smtc.c. This debugging option result in significant
89-
overhead so should be disabled in production kernels.
90-
9182
config SB1XXX_CORELIS
9283
bool "Corelis Debugger"
9384
depends on SIBYTE_SB1xxx_SOC

‎arch/mips/configs/maltasmtc_defconfig‎

Lines changed: 0 additions & 196 deletions
This file was deleted.

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

Lines changed: 2 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -17,26 +17,8 @@
1717
#ifdef CONFIG_64BIT
1818
#include <asm/asmmacro-64.h>
1919
#endif
20-
#ifdef CONFIG_MIPS_MT_SMTC
21-
#include <asm/mipsmtregs.h>
22-
#endif
23-
24-
#ifdef CONFIG_MIPS_MT_SMTC
25-
.macro local_irq_enable reg=t0
26-
mfc0 \reg, CP0_TCSTATUS
27-
ori \reg, \reg, TCSTATUS_IXMT
28-
xori \reg, \reg, TCSTATUS_IXMT
29-
mtc0 \reg, CP0_TCSTATUS
30-
_ehb
31-
.endm
3220

33-
.macro local_irq_disable reg=t0
34-
mfc0 \reg, CP0_TCSTATUS
35-
ori \reg, \reg, TCSTATUS_IXMT
36-
mtc0 \reg, CP0_TCSTATUS
37-
_ehb
38-
.endm
39-
#elif defined(CONFIG_CPU_MIPSR2)
21+
#ifdef CONFIG_CPU_MIPSR2
4022
.macro local_irq_enable reg=t0
4123
ei
4224
irq_enable_hazard
@@ -71,7 +53,7 @@
7153
sw \reg, TI_PRE_COUNT($28)
7254
#endif
7355
.endm
74-
#endif /* CONFIG_MIPS_MT_SMTC */
56+
#endif /* CONFIG_CPU_MIPSR2 */
7557

7658
.macro fpu_save_16even thread tmp=t0
7759
cfc1 \tmp, fcr31

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

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -65,17 +65,12 @@ struct cpuinfo_mips {
6565
#ifdef CONFIG_64BIT
6666
int vmbits; /* Virtual memory size in bits */
6767
#endif
68-
#if defined(CONFIG_MIPS_MT_SMP) || defined(CONFIG_MIPS_MT_SMTC)
68+
#ifdef CONFIG_MIPS_MT_SMP
6969
/*
70-
* In the MIPS MT "SMTC" model, each TC is considered
71-
* to be a "CPU" for the purposes of scheduling, but
72-
* exception resources, ASID spaces, etc, are common
73-
* to all TCs within the same VPE.
70+
* There is not necessarily a 1:1 mapping of VPE num to CPU number
71+
* in particular on multi-core systems.
7472
*/
7573
int vpe_id; /* Virtual Processor number */
76-
#endif
77-
#ifdef CONFIG_MIPS_MT_SMTC
78-
int tc_id; /* Thread Context number */
7974
#endif
8075
void *data; /* Additional data */
8176
unsigned int watch_reg_count; /* Number that exist */
@@ -117,7 +112,7 @@ struct proc_cpuinfo_notifier_args {
117112
unsigned long n;
118113
};
119114

120-
#if defined(CONFIG_MIPS_MT_SMP) || defined(CONFIG_MIPS_MT_SMTC)
115+
#ifdef CONFIG_MIPS_MT_SMP
121116
# define cpu_vpe_id(cpuinfo) ((cpuinfo)->vpe_id)
122117
#else
123118
# define cpu_vpe_id(cpuinfo) 0

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

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,7 @@
4848
enum fixed_addresses {
4949
#define FIX_N_COLOURS 8
5050
FIX_CMAP_BEGIN,
51-
#ifdef CONFIG_MIPS_MT_SMTC
52-
FIX_CMAP_END = FIX_CMAP_BEGIN + (FIX_N_COLOURS * NR_CPUS * 2),
53-
#else
5451
FIX_CMAP_END = FIX_CMAP_BEGIN + (FIX_N_COLOURS * 2),
55-
#endif
5652
#ifdef CONFIG_HIGHMEM
5753
/* reserved pte's for temporary kernel mappings */
5854
FIX_KMAP_BEGIN = FIX_CMAP_END + 1,

0 commit comments

Comments
 (0)