public inbox for cygwin-cvs@sourceware.org
help / color / mirror / Atom feed
From: Corinna Vinschen <corinna@sourceware.org>
To: cygwin-cvs@sourceware.org
Subject: [newlib-cygwin] format_proc_cpuinfo: add Linux 5.13 AMD/Hygon rapl
Date: Tue,  6 Jul 2021 14:06:46 +0000 (GMT)	[thread overview]
Message-ID: <20210706140646.CDA27385E83D@sourceware.org> (raw)

https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=7323efd73c2faf192160149dd13a96762a1975b0

commit 7323efd73c2faf192160149dd13a96762a1975b0
Author: Brian Inglis <Brian.Inglis@SystematicSW.ab.ca>
Date:   Tue Jun 29 11:09:24 2021 -0600

    format_proc_cpuinfo: add Linux 5.13 AMD/Hygon rapl
    
    Linux 5.13 Opossums on Parade added features and changes:
    add AMD 0x80000007 EDX:14 rapl runtime average power limit

Diff:
---
 winsup/cygwin/fhandler_proc.cc | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/winsup/cygwin/fhandler_proc.cc b/winsup/cygwin/fhandler_proc.cc
index eb4efb07d..66d19ab82 100644
--- a/winsup/cygwin/fhandler_proc.cc
+++ b/winsup/cygwin/fhandler_proc.cc
@@ -1165,6 +1165,14 @@ format_proc_cpuinfo (void *, char *&destbuf)
 	  ftcprint (features1,  0, "aperfmperf");   /* P state hw coord fb */
 	}
 
+      /* cpuid 0x80000007 edx Advanced power management */
+      if (maxe >= 0x80000007)
+	{
+	  cpuid (&unused, &unused, &unused, &features2, 0x80000007);
+
+	  ftcprint (features2, 14, "rapl"); /* runtime avg power limit */
+	}
+
       /* Penwell, Cloverview, ... TSC doesn't sleep on S3 */
       if (is_intel && family == 6)
 	switch (model)


                 reply	other threads:[~2021-07-06 14:06 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210706140646.CDA27385E83D@sourceware.org \
    --to=corinna@sourceware.org \
    --cc=cygwin-cvs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).