HomeFreeBSD

hwpmc: Move 4 bits of mode to extend class size to 8

Description

hwpmc: Move 4 bits of mode to extend class size to 8

Since r289025 we have had at least 5 bits class size.
Before that it was even 16 bits, but macro handling conversion between
pmcid and set of CPU, MODE, CLASS, ROWINDEX still use 4 bits class size
and 8 bits mode size.

This breaks some libpmc API methods, like pmc_capabilities.

Since we only have 4 modes and MODE field is a number (not a bitfield)
this patch moves 4 bits of mode to extend the CLASS field.

Reviewed by: mhorne, emaste
Sponsored by: Ampere Computing LLC
Submitted by: Klara Inc.
Differential Revision: https://reviews.freebsd.org/D30047

Details

Provenance
rayAuthored on May 26 2021, 6:39 PM
allanjudeCommitted on May 26 2021, 6:40 PM
Reviewer
mhorne
Differential Revision
D30047: hwpmc: Move 4 bits of mode to extend class size to 8.
Parents
rGc358f1857f0c: tcp: Use local CC data only in the correct context
Branches
Unknown
Tags
Unknown