Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/x86/x86 Use CPU_IS_PRIMARY macro in cpu_stop(), cpu...
details: https://anonhg.NetBSD.org/src/rev/65d0d0fe2689
branches: trunk
changeset: 936512:65d0d0fe2689
user: fcambus <fcambus%NetBSD.org@localhost>
date: Tue Jul 28 14:49:55 2020 +0000
description:
Use CPU_IS_PRIMARY macro in cpu_stop(), cpu_resume(), and cpu_get_tsc_freq()
on x86.
OK kamil@
diffstat:
sys/arch/x86/x86/cpu.c | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diffs (45 lines):
diff -r 1b13970d6670 -r 65d0d0fe2689 sys/arch/x86/x86/cpu.c
--- a/sys/arch/x86/x86/cpu.c Tue Jul 28 14:35:34 2020 +0000
+++ b/sys/arch/x86/x86/cpu.c Tue Jul 28 14:49:55 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cpu.c,v 1.195 2020/07/14 00:45:53 yamaguchi Exp $ */
+/* $NetBSD: cpu.c,v 1.196 2020/07/28 14:49:55 fcambus Exp $ */
/*
* Copyright (c) 2000-2020 NetBSD Foundation, Inc.
@@ -62,7 +62,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.195 2020/07/14 00:45:53 yamaguchi Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.196 2020/07/28 14:49:55 fcambus Exp $");
#include "opt_ddb.h"
#include "opt_mpbios.h" /* for MPDEBUG */
@@ -1224,7 +1224,7 @@
KASSERT((ci->ci_flags & CPUF_PRESENT) != 0);
- if ((ci->ci_flags & CPUF_PRIMARY) != 0)
+ if (CPU_IS_PRIMARY(ci))
return true;
if (ci->ci_data.cpu_idlelwp == NULL)
@@ -1269,7 +1269,7 @@
if ((ci->ci_flags & CPUF_PRESENT) == 0)
return true;
- if ((ci->ci_flags & CPUF_PRIMARY) != 0)
+ if (CPU_IS_PRIMARY(ci))
goto out;
if (ci->ci_data.cpu_idlelwp == NULL)
@@ -1312,7 +1312,7 @@
uint64_t freq = 0, freq_from_cpuid, t0, t1;
int64_t overhead;
- if ((ci->ci_flags & CPUF_PRIMARY) != 0 && cpu_hascounter()) {
+ if (CPU_IS_PRIMARY(ci) && cpu_hascounter()) {
/*
* If it's the first call of this function, try to get TSC
* freq from CPUID by calling cpu_tsc_freq_cpuid().
Home |
Main Index |
Thread Index |
Old Index