Date: Sun, 1 Dec 2019 16:02:15 +0000 (UTC) From: Konstantin Belousov <kib@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r355263 - stable/12/sys/amd64/include Message-ID: <201912011602.xB1G2FMA055676@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201912011602.xB1G2FMA055676>