diff options
| author | John Levon <john.levon@joyent.com> | 2019-05-20 14:28:30 +0000 |
|---|---|---|
| committer | Jerry Jelinek <jerry.jelinek@joyent.com> | 2019-05-22 14:57:24 +0000 |
| commit | c3377ee9a5b3bff76dbf51347a8de3d215eb6cca (patch) | |
| tree | a25e6e2ef6a0822cb88190fd7c261be5a0692350 /usr/src/uts/sun4/os | |
| parent | 3f1d0a2eaba951f44d96bed559e6ed4487ec298c (diff) | |
| download | illumos-joyent-c3377ee9a5b3bff76dbf51347a8de3d215eb6cca.tar.gz | |
11048 need a way to disable SMT
Reviewed by: Jerry Jelinek <jerry.jelinek@joyent.com>
Reviewed by: Robert Mustacchi <rm@joyent.com>
Reviewed by: Patrick Mooney <patrick.mooney@joyent.com>
Reviewed by: Andy Fiddaman <omnios@citrus-it.co.uk>
Reviewed by: Gergo Doma <domag02@gmail.com>
Approved by: Gordon Ross <gwr@nexenta.com>
Diffstat (limited to 'usr/src/uts/sun4/os')
| -rw-r--r-- | usr/src/uts/sun4/os/intr.c | 6 | ||||
| -rw-r--r-- | usr/src/uts/sun4/os/mp_startup.c | 8 |
2 files changed, 12 insertions, 2 deletions
diff --git a/usr/src/uts/sun4/os/intr.c b/usr/src/uts/sun4/os/intr.c index 3a7143115d..dfcbd991f7 100644 --- a/usr/src/uts/sun4/os/intr.c +++ b/usr/src/uts/sun4/os/intr.c @@ -23,7 +23,7 @@ * Use is subject to license terms. */ /* - * Copyright (c) 2013, Joyent, Inc. All rights reserved. + * Copyright 2019 Joyent, Inc. */ /* * Copyright 2019 Peter Tribble. @@ -326,7 +326,7 @@ siron_cpu_setup(cpu_setup_t what, int id, void *arg) /* * no_ivintr() - * called by setvecint_tl1() through sys_trap() + * called by setvecint_tl1() through sys_trap() * vector interrupt received but not valid or not * registered in intr_vec_table * considered as a spurious mondo interrupt @@ -420,6 +420,7 @@ cpu_disable_intr(struct cpu *cp) * function, since it checks for this in the cpu flags. */ cp->cpu_flags &= ~CPU_ENABLE; + ncpus_intr_enabled--; intr_redist_all_cpus(); @@ -438,6 +439,7 @@ cpu_enable_intr(struct cpu *cp) ASSERT(MUTEX_HELD(&cpu_lock)); cp->cpu_flags |= CPU_ENABLE; + ncpus_intr_enabled++; intr_redist_all_cpus(); } diff --git a/usr/src/uts/sun4/os/mp_startup.c b/usr/src/uts/sun4/os/mp_startup.c index ae68a23f8b..8cf6e1fa81 100644 --- a/usr/src/uts/sun4/os/mp_startup.c +++ b/usr/src/uts/sun4/os/mp_startup.c @@ -24,6 +24,10 @@ * Use is subject to license terms. */ +/* + * Copyright 2019 Joyent, Inc. + */ + #include <sys/sysmacros.h> #include <sys/prom_plat.h> #include <sys/prom_debug.h> @@ -162,6 +166,10 @@ cold_flag_set(int cpuid) ASSERT(MUTEX_HELD(&cpu_lock)); cp = cpu[cpuid]; + + if (!(cpu->cpu_flags & CPU_ENABLE)) + ncpus_intr_enabled++; + cp->cpu_flags |= CPU_RUNNING | CPU_ENABLE | CPU_EXISTS; cpu_add_active(cp); /* |
