<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/sys/dev/hwpmc, branch releng/12.4</title>
<subtitle>FreeBSD source tree</subtitle>
<id>https://cgit-dev.freebsd.org/src/atom?h=releng%2F12.4</id>
<link rel='self' href='https://cgit-dev.freebsd.org/src/atom?h=releng%2F12.4'/>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/'/>
<updated>2022-07-24T11:01:20Z</updated>
<entry>
<title>Adjust pmc_thread_descriptor_pool_drain() definition to avoid clang 15 warning</title>
<updated>2022-07-24T11:01:20Z</updated>
<author>
<name>Dimitry Andric</name>
<email>dim@FreeBSD.org</email>
</author>
<published>2022-07-21T18:31:56Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=207d91d4bf485e2a32861932cf1fc9732c55f863'/>
<id>urn:sha1:207d91d4bf485e2a32861932cf1fc9732c55f863</id>
<content type='text'>
With clang 15, the following -Werror warning is produced:

    sys/dev/hwpmc/hwpmc_mod.c:2462:33: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
    pmc_thread_descriptor_pool_drain()
                                    ^
                                     void

This is because pmc_thread_descriptor_pool_drain() is declared with a
(void) argument list, but defined with an empty argument list. Make the
definition match the declaration.

MFC after:	3 days

(cherry picked from commit 555d2c9394fa673241fd26a95152adfb9d20952e)
</content>
</entry>
<entry>
<title>Adjust pcm_md_initialize() definition to avoid clang 15 warning</title>
<updated>2022-07-24T11:01:20Z</updated>
<author>
<name>Dimitry Andric</name>
<email>dim@FreeBSD.org</email>
</author>
<published>2022-07-21T18:23:19Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=89029f10c35ccf9a35a009323d2bb237c4070b78'/>
<id>urn:sha1:89029f10c35ccf9a35a009323d2bb237c4070b78</id>
<content type='text'>
With clang 15, the following -Werror warning is produced:

    sys/dev/hwpmc/hwpmc_x86.c:245:18: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
    pcm_md_initialize()
                     ^
                      void

This is because pcm_md_initialize() is declared with a (void) argument
list, but defined with an empty argument list. Make the definition match
the declaration.

MFC after:	3 days

(cherry picked from commit dc0cde7a21a6aab0a5e876d8f890764e32718932)
</content>
</entry>
<entry>
<title>Fix unused variable warnings in hwpmc_mod.c</title>
<updated>2022-07-24T11:01:19Z</updated>
<author>
<name>Dimitry Andric</name>
<email>dim@FreeBSD.org</email>
</author>
<published>2022-07-21T18:35:41Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=c7f584db172e65d81ee59d9b36933799719f12bf'/>
<id>urn:sha1:c7f584db172e65d81ee59d9b36933799719f12bf</id>
<content type='text'>
With clang 15, the following -Werror warnings are produced:

    sys/dev/hwpmc/hwpmc_mod.c:4805:6: error: variable 'nfree' set but not used [-Werror,-Wunused-but-set-variable]
            int nfree;
                ^
    sys/dev/hwpmc/hwpmc_mod.c:4804:6: error: variable 'ncallchains' set but not used [-Werror,-Wunused-but-set-variable]
            int ncallchains;
                ^

The 'nfree' and 'ncallchains' variables were used in KASSERTs, but these
were removed due to refactoring in d9f1b8dbf29d. Remove the variables
since they no longer serve any purpose.

MFC after:      3 days

(cherry picked from commit 38a9b8a00ce933e99b4a643cdcc3220be82e7d62)
</content>
</entry>
<entry>
<title>Adjust pcmlog_{initialize,shutdown}() definitions to avoid clang 15 warning</title>
<updated>2022-07-24T11:01:18Z</updated>
<author>
<name>Dimitry Andric</name>
<email>dim@FreeBSD.org</email>
</author>
<published>2022-07-21T18:20:56Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=ec8cb457937be63a998106695de5b7e4e0bead56'/>
<id>urn:sha1:ec8cb457937be63a998106695de5b7e4e0bead56</id>
<content type='text'>
With clang 15, the following -Werror warnings are produced:

    sys/dev/hwpmc/hwpmc_logging.c:1228:18: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
    pmclog_initialize()
                     ^
                      void
    sys/dev/hwpmc/hwpmc_logging.c:1277:16: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
    pmclog_shutdown()
                   ^
                    void

This is because pcmlog_{initialize,shutdown}() are declared with (void)
argument lists, but defined with empty argument lists. Make the
definitions match the declarations.

MFC after:	3 days

(cherry picked from commit ba95c556029357800d18a5bc5abd02a2b7d0c9de)
</content>
</entry>
<entry>
<title>hwpmc(4): Fix a typo in a sysctl description</title>
<updated>2022-01-29T08:45:36Z</updated>
<author>
<name>Gordon Bergling</name>
<email>gbe@FreeBSD.org</email>
</author>
<published>2022-01-26T19:18:57Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=37bc66bde8a7a74a2285f8d4e33dd230efda402e'/>
<id>urn:sha1:37bc66bde8a7a74a2285f8d4e33dd230efda402e</id>
<content type='text'>
- s/avalable/available/

(cherry picked from commit 9966757dd6efe7514290d41cae761baf389dcfc2)
</content>
</entry>
<entry>
<title>hwpmc: Add IDs for Intel Comet/Ice/Tiger/Rocketlake CPUs.</title>
<updated>2021-12-26T00:47:46Z</updated>
<author>
<name>Alexander Motin</name>
<email>mav@FreeBSD.org</email>
</author>
<published>2021-11-26T00:17:58Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=d2138bddf3ecf171dfe8a92f2cf74f9487b09630'/>
<id>urn:sha1:d2138bddf3ecf171dfe8a92f2cf74f9487b09630</id>
<content type='text'>
MFC after:	1 month

(cherry picked from commit 913c07a04998b8cd11dc428f5d00fae7dd392244)
</content>
</entry>
<entry>
<title>hwpmc: initialize arm64 counter/interrupt state</title>
<updated>2021-11-15T15:22:35Z</updated>
<author>
<name>Mitchell Horne</name>
<email>mhorne@FreeBSD.org</email>
</author>
<published>2021-11-08T19:33:25Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=c8a4404da737ea7e859287094de38953a84bdd68'/>
<id>urn:sha1:c8a4404da737ea7e859287094de38953a84bdd68</id>
<content type='text'>
Performance counters and overflow interrupts are assumed to be disabled
by default, but this is not guaranteed. Ensure we disable both during
per-cpu initialization, before enabling the PMU. Otherwise, some systems
(such as the Ampere eMAG) would experience an interrupt storm upon
loading the hwpmc module.

Reviewed by:	br
MFC after:	5 days
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D32854

(cherry picked from commit b826cc3caf6abc6a5d1926bd478b464938d45697)
</content>
</entry>
<entry>
<title>hwpmc: disable uncore class on Sandy Bridge and newer</title>
<updated>2021-08-11T17:07:59Z</updated>
<author>
<name>Mitchell Horne</name>
<email>mhorne@FreeBSD.org</email>
</author>
<published>2021-08-04T17:31:36Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=88ef00584bc7f9f9e19546bc3ef8682d5c4d6cb6'/>
<id>urn:sha1:88ef00584bc7f9f9e19546bc3ef8682d5c4d6cb6</id>
<content type='text'>
It was written for Nehalem and Westmere, with minor but incomplete
updates for Sandy Bridge in 78d763a29b15. The uncore architecture
changed significantly with this generation, bringing new layouts and
locations for some MSRs.

Misprogramming these MSRs in ucp_start_pmc() may panic the system, and
this is trivially reproducible via pmcstat(8) on at least Broadwell and
Haswell. Disable the class on these CPUs until it can be updated more
completely and leave a TODO comment detailing some of the work required.
Note that the nclasses value for Broadwell was already incorrect and
doesn't need changing.

The result is that any uncore events listed by pmcstat -L will no longer
be allocatable, but this is already the case for newer generations of
Intel CPUs.

PR:		253687
Reported by:	Zhenlei Huang &lt;zlei.huang@gmail.com&gt;
Reviewed by:	kib
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D31389

(cherry picked from commit 4f35e8cba232d9256ab1399b8adfb761988e5eff)
</content>
</entry>
<entry>
<title>MFC r359438 and r359477:</title>
<updated>2020-08-19T13:07:04Z</updated>
<author>
<name>Hans Petter Selasky</name>
<email>hselasky@FreeBSD.org</email>
</author>
<published>2020-08-19T13:07:04Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=898a95874a5bde996e5e3455d62aa3e5f927b7c1'/>
<id>urn:sha1:898a95874a5bde996e5e3455d62aa3e5f927b7c1</id>
<content type='text'>
Remove the "config" taskqgroup and its KPIs.

Equivalent functionality is already provided by taskqueue(9), just use
that instead.

Interfaces may be detached from a taskqueue_thread task, for example by
prison_complete(), so after r359438, when draining the queue we may end
up deadlocking.
</content>
</entry>
<entry>
<title>MFC r363630:</title>
<updated>2020-08-04T12:04:47Z</updated>
<author>
<name>Ryan Moeller</name>
<email>freqlabs@FreeBSD.org</email>
</author>
<published>2020-08-04T12:04:47Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=83fbe66ef7255fa4d1223ea0bd82fc54e1e8122d'/>
<id>urn:sha1:83fbe66ef7255fa4d1223ea0bd82fc54e1e8122d</id>
<content type='text'>
libpmc: Use known pmc_cpuid buffer size

Use the existing PMC_CPUID_LEN to size pmc_cpuid in the kernel and various
buffers for reading it in libpmc.  This avoids some extra syscalls and
malloc/frees.

While in here, use strlcpy to copy a user-provided cpuid string instead of
memcpy, to make sure we terminate the buffer.

Reviewed by:    mav
Sponsored by:   iXsystems, Inc.
Differential Revision:  https://reviews.freebsd.org/D25679
</content>
</entry>
</feed>
