All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mike Frysinger <vapier@gentoo.org>
To: Benson Leung <bleung@chromium.org>
Cc: len.brown@intel.com, colin.king@canonical.com,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 1/1] tools/power x86_energy_perf_policy: fix cpuid for i686
Date: Mon, 18 Feb 2013 00:17:29 -0500	[thread overview]
Message-ID: <201302180017.30445.vapier@gentoo.org> (raw)
In-Reply-To: <1360870558-11711-2-git-send-email-bleung@chromium.org>

[-- Attachment #1: Type: Text/Plain, Size: 532 bytes --]

On Thursday 14 February 2013 14:35:58 Benson Leung wrote:
> +	asm volatile ("mov %%ebx, %%edi;" /* save ebx (for PIC) */
> +		      "cpuid;"
> +		      "mov %%ebx, %%esi;" /* pass to caller */
> +		      "mov %%edi, %%ebx;" /* restore ebx */
> +		      :"+a" (_eax), "=S" (_ebx), "=c" (_ecx), "=d" (_edx)
> +		      :      /* inputs: eax is handled above */
> +		      :"edi" /* clobbers: we hit edi directly */);

i've written a better version since:
https://github.com/linux-test-project/ltp/blob/master/include/ltp_cpuid.h
-mike

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

  parent reply	other threads:[~2013-02-18  5:17 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-14 19:35 [PATCH v3 1/1] tools/power x86_energy_perf_policy: fix cpuid for i686 Benson Leung
2013-02-14 19:35 ` Benson Leung
2013-02-18  5:06   ` Len Brown
2013-02-18  5:17   ` Mike Frysinger [this message]
2013-02-19 20:18 ` [PATCH v4 0/1] " Benson Leung
2013-02-19 20:18   ` [PATCH v4 1/1] " Benson Leung

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=201302180017.30445.vapier@gentoo.org \
    --to=vapier@gentoo.org \
    --cc=bleung@chromium.org \
    --cc=colin.king@canonical.com \
    --cc=len.brown@intel.com \
    --cc=linux-kernel@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.