svn commit: r355263 - stable/12/sys/amd64/include
Konstantin Belousov
kib at FreeBSD.org
Sun Dec 1 16:02:16 UTC 2019
Author: kib
Date: Sun Dec 1 16:02:15 2019
New Revision: 355263
URL: https://svnweb.freebsd.org/changeset/base/355263
Log:
MFC r355060:
amd64: assert that EARLY_COUNTER does not corrupt memory.
Modified:
stable/12/sys/amd64/include/counter.h
Directory Properties:
stable/12/ (props changed)
Modified: stable/12/sys/amd64/include/counter.h
==============================================================================
--- stable/12/sys/amd64/include/counter.h Sun Dec 1 15:59:04 2019 (r355262)
+++ stable/12/sys/amd64/include/counter.h Sun Dec 1 16:02:15 2019 (r355263)
@@ -82,6 +82,7 @@ static inline void
counter_u64_add(counter_u64_t c, int64_t inc)
{
+ KASSERT(IS_BSP() || c != EARLY_COUNTER, ("EARLY_COUNTER used on AP"));
__asm __volatile("addq\t%1,%%gs:(%0)"
:
: "r" ((char *)c - (char *)&__pcpu[0]), "ri" (inc)
More information about the svn-src-stable-12
mailing list