From: Jens Axboe <axboe@kernel.dk>
To: Li Zhong <zhong@linux.vnet.ibm.com>, fio@vger.kernel.org
Subject: Re: [RFC PATCH] powerpc: enable cpu clock for powerpc64
Date: Fri, 4 Dec 2015 10:24:51 -0700 [thread overview]
Message-ID: <5661CC63.7070305@kernel.dk> (raw)
In-Reply-To: <1449208206.30683.9.camel@TP420>
On 12/03/2015 10:50 PM, Li Zhong wrote:
> This patch tries to enable cpu clock for powerpc64, the code is copied from
> mftb() in kernel source.
>
> The two instructions after mfspr are added in the kernel to solve an erratum on
> Cell and fsl booke CPUs. On those CPUs, 64 bits mftb is not atomic, so it is
> possible that the low order 32 bits are already reset to 0x00000000 but the
> high order bits are not yet incremented by one.
>
> Don't know how to tell whether it will be running on those CPUs or not, I just
> keep the above fix for all ppc64 CPUs. Even if we have some method to check
> whether we are on those CPUs or not at run time, I think the check won't cost
> less than the two added instructions. Maybe we could use the similar fix up
> code kernel uses to dynamically patch the instructions with nops if not needed.
> But that would add much more complexity.
Thanks, applied. I don't have any powerpc hw, so I'll depend on your
testing for this.
--
Jens Axboe
next prev parent reply other threads:[~2015-12-04 17:24 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-04 5:50 [RFC PATCH] powerpc: enable cpu clock for powerpc64 Li Zhong
2015-12-04 17:24 ` Jens Axboe [this message]
2015-12-07 7:21 ` zhong
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=5661CC63.7070305@kernel.dk \
--to=axboe@kernel.dk \
--cc=fio@vger.kernel.org \
--cc=zhong@linux.vnet.ibm.com \
/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